intermediate commit
This commit is contained in:
parent
afe923c136
commit
09562d47a4
4 changed files with 4835 additions and 15 deletions
37
js/uhr.js
37
js/uhr.js
|
@ -14,7 +14,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/
|
||||
(function ($) {
|
||||
'use strict';
|
||||
|
||||
var uhrGlobals = {
|
||||
"id": 0,
|
||||
"languages": [],
|
||||
"themes": [],
|
||||
register: function register(code, language) {
|
||||
this.languages.reduce(function(element) {
|
||||
if (code === element.code) {
|
||||
console.error("Error: Language code '" + code + "' cannot be registered for language '" + language.language + "' because it is already registered for language '" + element.language + "'!");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}, true);
|
||||
}
|
||||
};
|
||||
if (window.uhr !== undefined) {
|
||||
return;
|
||||
}
|
||||
|
@ -434,23 +447,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
* @param style Die CSS-Styleklassen des Buchstabens.
|
||||
*/
|
||||
function Letter(value, style) {
|
||||
this.value = value;
|
||||
this.style = style || '';
|
||||
this.getStyle = function() {
|
||||
return 'item letter ' + this.style;
|
||||
};
|
||||
this.getValue = function() {
|
||||
return value;
|
||||
}
|
||||
var myValue = value;
|
||||
var myStyle = style || '';
|
||||
this.addStyle = function(style) {
|
||||
if (this.style == '') {
|
||||
this.style = style;
|
||||
if (myStyle == '') {
|
||||
myStyle = style;
|
||||
} else {
|
||||
this.style += ' ' + style;
|
||||
myStyle += ' ' + style;
|
||||
}
|
||||
}
|
||||
this.toString = function () {
|
||||
return '<span class="item letter ' + myStyle + '">' + myValue + '</span>';
|
||||
};
|
||||
}
|
||||
Letter.prototype.toString = function letterToString() {
|
||||
return '<span class="' + this.getStyle() + '">' + this.getValue() + '</span>';
|
||||
};
|
||||
})(jQuery);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue