moved testing stuff to ownfiles.

This commit is contained in:
Manuel Friedli 2014-06-26 08:00:15 +02:00
parent b4f2a466b7
commit 0d90b3dd76
4 changed files with 95 additions and 68 deletions

View file

@ -13,8 +13,8 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
var layout = { var layout = {
language: 'Bärndütsch', "language": 'Bärndütsch',
values: [ "values": [
[l('E', 'on'), l('S', 'on'),l('K'),l('I', 'on'),l('S', 'on'),l('C', 'on'),l('H', 'on'),l('A'),m('F', 5, 25, 35, 55),m('Ü', 5, 25, 35, 55),m('F', 5, 25, 35, 55)], [l('E', 'on'), l('S', 'on'),l('K'),l('I', 'on'),l('S', 'on'),l('C', 'on'),l('H', 'on'),l('A'),m('F', 5, 25, 35, 55),m('Ü', 5, 25, 35, 55),m('F', 5, 25, 35, 55)],
[m('V', 15, 45), m('I', 15, 45),m('E', 15, 45),m('R', 15, 45),m('T', 15, 45),m('U', 15, 45),l('B'),l('F'),m('Z', 10, 50),m('Ä', 10, 50),m('Ä', 10, 50)], [m('V', 15, 45), m('I', 15, 45),m('E', 15, 45),m('R', 15, 45),m('T', 15, 45),m('U', 15, 45),l('B'),l('F'),m('Z', 10, 50),m('Ä', 10, 50),m('Ä', 10, 50)],
[m('Z', 20, 40), m('W', 20, 40),m('Ä', 20, 40),m('N', 20, 40),m('Z', 20, 40),m('G', 20, 40),l('S'),l('I'),m('V', 25, 40, 45, 50, 55),m('O', 25, 40, 45, 50, 55),m('R', 25, 40, 45, 50, 55)], [m('Z', 20, 40), m('W', 20, 40),m('Ä', 20, 40),m('N', 20, 40),m('Z', 20, 40),m('G', 20, 40),l('S'),l('I'),m('V', 25, 40, 45, 50, 55),m('O', 25, 40, 45, 50, 55),m('R', 25, 40, 45, 50, 55)],
@ -28,59 +28,3 @@ var layout = {
] ]
}; };
window._uhr.languages['de_CH'] = layout; window._uhr.languages['de_CH'] = layout;
var newLayout = {
version: 2,
_es_isch: {1:[1,2,4,5,6,7]},
_genau: {3:[7,8,9,10,11]},
_ab: {4:[4,5]},
_vor: {4:[1,2,3]},
_haubi: {4:[7,8,9,10,11]},
_5: {1:[9,10,11]},
_10: {2:[9,10,11]},
_15: {2:[1,2,3,4,5,6]},
_20: {3:[1,2,3,4,5,6]},
language: 'Bärndütsch (nöi)',
letters: [
'ESKISCHAFÜF',
'VIERTUBFZÄÄ',
'ZWÄNZGGENAU',
'VORABOHAUBI',
'EISZWÖISFRÜ',
'VIERIFÜFIQT',
'SÄCHSISIBNI',
'ACHTINÜNIEL',
'ZÄNIERBEUFI',
'ZWÜUFINAUHR'
],
permanent: this._es_isch,
minutes: {
0: this._genau,
1: {},
5: [this._5, this._ab],
10: [this._10, this._ab],
15: [this._15, this._ab],
20: [this._20, this._ab],
25: [this._5, this._vor, this._haubi],
30: [this._haubi],
35: [this._5, this._ab, this._haubi],
40: [this._20, this._vor],
45: [this._15, this._vor],
50: [this._10, this._vor],
55: [this._5, this._vor]
},
hours: {
0: {10:[1,2,3,4,5,6]},
1: {5:[1,2,3]},
2: {5:[4,5,6,7]},
3: {5:[9,10,11]},
4: {6:[1,2,3,4,5]},
5: {6:[6,7,8,9]},
6: {7:[1,2,3,4,5,6]},
7: {7:[7,8,9,10,11]},
8: {8:[1,2,3,4,5]},
9: {8:[6,7,8,9]},
10: {9:[1,2,3,4]},
11: {9:[8,9,10,11]}
}
};
window._uhr.languages['de_CH2'] = newLayout;

21
uhr-de_CH_TEST.js Normal file
View file

@ -0,0 +1,21 @@
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var layout = {
"version": 2,
"helper": {1:[1,2,4,5,6,7]},
"language": 'Bärndütsch (test)',
"permanent": this.helper,
};
window._uhr.languages['de_CH_TEST'] = layout;

70
uhr-de_CH_new.js Normal file
View file

@ -0,0 +1,70 @@
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
var layout = {
"version": 2,
"_es_isch": {1:[1,2,4,5,6,7]},
"_genau": {3:[7,8,9,10,11]},
"_ab": {4:[4,5]},
"_vor": {4:[1,2,3]},
"_haubi": {4:[7,8,9,10,11]},
"_5": {1:[9,10,11]},
"_10": {2:[9,10,11]},
"_15": {2:[1,2,3,4,5,6]},
"_20": {3:[1,2,3,4,5,6]},
"language": 'Bärndütsch (nöi)',
"letters": [
'ESKISCHAFÜF',
'VIERTUBFZÄÄ',
'ZWÄNZGGENAU',
'VORABOHAUBI',
'EISZWÖISFRÜ',
'VIERIFÜFIQT',
'SÄCHSISIBNI',
'ACHTINÜNIEL',
'ZÄNIERBEUFI',
'ZWÜUFINAUHR'
],
"permanent": this._es_isch,
"minutes": {
"0": this._genau,
"1": {},
"5": [this._5, this._ab],
"10": [this._10, this._ab],
"15": [this._15, this._ab],
"20": [this._20, this._ab],
"25": [this._5, this._vor, this._haubi],
"30": [this._haubi],
"35": [this._5, this._ab, this._haubi],
"40": [this._20, this._vor],
"45": [this._15, this._vor],
"50": [this._10, this._vor],
"55": [this._5, this._vor]
},
"hours": {
"0": {10:[1,2,3,4,5,6]},
"1": {5:[1,2,3]},
"2": {5:[4,5,6,7]},
"3": {5:[9,10,11]},
"4": {6:[1,2,3,4,5]},
"5": {6:[6,7,8,9]},
"6": {7:[1,2,3,4,5,6]},
"7": {7:[7,8,9,10,11]},
"8": {8:[1,2,3,4,5]},
"9": {8:[6,7,8,9]},
"10": {9:[1,2,3,4]},
"11": {9:[8,9,10,11]}
}
};
window._uhr.languages['de_CH_new'] = layout;

12
uhr.js
View file

@ -286,18 +286,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
function UhrRenderer(layout, renderarea) { function UhrRenderer(layout, renderarea) {
this.layout = layout; this.layout = layout;
this.renderarea = renderarea; this.renderarea = renderarea;
this._debug = true;
this._parseLayoutV2 = function() { this._parseLayoutV2 = function() {
if (this._debug) console.log("attempting to parse layout v2"); console.log("attempting to parse layout v2");
var letters = []; var letters = [];
console.log("lett:"+typeof this.layout.letters); console.log(this.layout);
console.log(this.layout.letters);
console.log("perm:"+typeof this.layout.permanent);
console.log(this.layout.permanent);
console.log("mins:"+typeof this.layout.minutes);
console.log(this.layout.minutes);
console.log("hour:"+typeof this.layout.hours);
console.log(this.layout.hours);
return letters; return letters;
} }
} }