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