re-indented the code
This commit is contained in:
parent
de75a3bdaf
commit
6f6feb5cf5
1 changed files with 46 additions and 41 deletions
27
js/uhr.js
27
js/uhr.js
|
@ -1,17 +1,17 @@
|
||||||
/*
|
/*
|
||||||
This program is free software: you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
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/>.
|
||||||
*/
|
*/
|
||||||
(function ($) {
|
(function ($) {
|
||||||
'use strict';
|
'use strict';
|
||||||
var uhrGlobals = {
|
var uhrGlobals = {
|
||||||
|
@ -376,6 +376,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function UhrRendererV2Delegate(layout) {
|
function UhrRendererV2Delegate(layout) {
|
||||||
function parseArrayOrObject(letters, styleClass, input) {
|
function parseArrayOrObject(letters, styleClass, input) {
|
||||||
if (Array.isArray(input)) {
|
if (Array.isArray(input)) {
|
||||||
|
@ -386,6 +387,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
parseObject(letters, styleClass, input);
|
parseObject(letters, styleClass, input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseObject(letters, styleClass, object) {
|
function parseObject(letters, styleClass, object) {
|
||||||
Object.keys(object).forEach(function (y) {
|
Object.keys(object).forEach(function (y) {
|
||||||
var highlightLetters = object[y];
|
var highlightLetters = object[y];
|
||||||
|
@ -394,6 +396,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseTimeDefinition(letters, styleClass, definition) {
|
function parseTimeDefinition(letters, styleClass, definition) {
|
||||||
Object.keys(definition).forEach(function (listString) {
|
Object.keys(definition).forEach(function (listString) {
|
||||||
var array = listString.split(',');
|
var array = listString.split(',');
|
||||||
|
@ -403,6 +406,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.parse = function parse() {
|
this.parse = function parse() {
|
||||||
var letters = [];
|
var letters = [];
|
||||||
layout.letters.forEach(function (string) {
|
layout.letters.forEach(function (string) {
|
||||||
|
@ -419,6 +423,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
return letters;
|
return letters;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ein Buchstabe. Hilfsklasse für den Renderer und Inhalt der Layout-Arrays.
|
* Ein Buchstabe. Hilfsklasse für den Renderer und Inhalt der Layout-Arrays.
|
||||||
* @param value Der Buchstabe, der Dargestellt werden soll.
|
* @param value Der Buchstabe, der Dargestellt werden soll.
|
||||||
|
|
Loading…
Reference in a new issue