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 ($) {
|
||||
'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);
|
||||
|
|
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