no more JSHint errors for now
This commit is contained in:
parent
ec8a185dd7
commit
de75a3bdaf
1 changed files with 12 additions and 11 deletions
15
js/uhr.js
15
js/uhr.js
|
@ -326,7 +326,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
language: 'de_CH',
|
||||
theme: uhrGlobals.themes[0].styleClass,
|
||||
force: false,
|
||||
controls: true
|
||||
controls: true,
|
||||
cookiePath: undefined
|
||||
},
|
||||
"start": start,
|
||||
"stop": stop,
|
||||
|
@ -348,7 +349,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
if (layout.parsed === undefined) {
|
||||
switch (layout.version) {
|
||||
case 2:
|
||||
var delegate = new _UhrRendererV2Delegate(layout);
|
||||
var delegate = new UhrRendererV2Delegate(layout);
|
||||
var parsedLayout = delegate.parse();
|
||||
Object.defineProperty(layout, "parsed", {"value": parsedLayout, "writable": false, "configurable": false});
|
||||
break;
|
||||
|
@ -375,12 +376,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
});
|
||||
};
|
||||
}
|
||||
function _UhrRendererV2Delegate(layout) {
|
||||
function UhrRendererV2Delegate(layout) {
|
||||
function parseArrayOrObject(letters, styleClass, input) {
|
||||
if (Array.isArray(input)) {
|
||||
input.forEach(function (item) {
|
||||
parseObject(letters, styleClass, item);
|
||||
}, this);
|
||||
});
|
||||
} else {
|
||||
parseObject(letters, styleClass, input);
|
||||
}
|
||||
|
@ -426,13 +427,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
function Letter(value, style) {
|
||||
var myValue = value;
|
||||
var myStyle = style || '';
|
||||
this.addStyle = function(style) {
|
||||
if (myStyle == '') {
|
||||
this.addStyle = function (style) {
|
||||
if (myStyle === '') {
|
||||
myStyle = style;
|
||||
} else {
|
||||
myStyle += ' ' + style;
|
||||
}
|
||||
}
|
||||
};
|
||||
this.toString = function () {
|
||||
return '<span class="item letter ' + myStyle + '">' + myValue + '</span>';
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue