intermediate commit
This commit is contained in:
parent
afe923c136
commit
09562d47a4
4 changed files with 4835 additions and 15 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1 +1,4 @@
|
||||||
*~
|
*~
|
||||||
|
.idea
|
||||||
|
atlassian-ide-plugin.xml
|
||||||
|
uhr.iml
|
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 ($) {
|
(function ($) {
|
||||||
'use strict';
|
'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) {
|
if (window.uhr !== undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -434,23 +447,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
* @param style Die CSS-Styleklassen des Buchstabens.
|
* @param style Die CSS-Styleklassen des Buchstabens.
|
||||||
*/
|
*/
|
||||||
function Letter(value, style) {
|
function Letter(value, style) {
|
||||||
this.value = value;
|
var myValue = value;
|
||||||
this.style = style || '';
|
var myStyle = style || '';
|
||||||
this.getStyle = function() {
|
|
||||||
return 'item letter ' + this.style;
|
|
||||||
};
|
|
||||||
this.getValue = function() {
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
this.addStyle = function(style) {
|
this.addStyle = function(style) {
|
||||||
if (this.style == '') {
|
if (myStyle == '') {
|
||||||
this.style = style;
|
myStyle = style;
|
||||||
} else {
|
} else {
|
||||||
this.style += ' ' + style;
|
myStyle += ' ' + style;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
this.toString = function () {
|
||||||
Letter.prototype.toString = function letterToString() {
|
return '<span class="item letter ' + myStyle + '">' + myValue + '</span>';
|
||||||
return '<span class="' + this.getStyle() + '">' + this.getValue() + '</span>';
|
|
||||||
};
|
};
|
||||||
|
}
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
4782
test/lib/chai.js
Normal file
4782
test/lib/chai.js
Normal file
File diff suppressed because it is too large
Load diff
28
test/test.html
Normal file
28
test/test.html
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head lang="en">
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Test</title>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/uhr.css"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/uhr-black.css" data-class="black"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/uhr-pink.css" data-class="pink"/>
|
||||||
|
<link rel="stylesheet" type="text/css" href="../css/uhr-blue.css" data-class="blue"/>
|
||||||
|
<script src="../lib/jquery-2.1.0.min.js"></script>
|
||||||
|
<script src="../lib/jquery-ui-1.10.4.custom.min.js"></script>
|
||||||
|
<script src="../lib/jquery-cookie-1.4.0.js"></script>
|
||||||
|
<script src="../js/uhr.js"></script>
|
||||||
|
<script src="../js/uhr-de_CH.js"></script>
|
||||||
|
<script src="../js/uhr-de_CH_genau.js"></script>
|
||||||
|
<script src="../js/uhr-de.js"></script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="u1"></div>
|
||||||
|
<div id="u2"></div>
|
||||||
|
<div id="u3"></div>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(document).ready(function () {
|
||||||
|
$('div').uhr({'width':'200px','controls':false});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in a new issue