xooie 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/vendor/assets/javascripts/xooie/addons/base.js +1 -1
- data/vendor/assets/javascripts/xooie/addons/carousel_lentils.js +1 -1
- data/vendor/assets/javascripts/xooie/addons/carousel_pagination.js +1 -1
- data/vendor/assets/javascripts/xooie/addons/tab_animation.js +1 -1
- data/vendor/assets/javascripts/xooie/event_handler.js +1 -1
- data/vendor/assets/javascripts/xooie/helpers.js +1 -1
- data/vendor/assets/javascripts/xooie/stylesheet.js +30 -11
- data/vendor/assets/javascripts/xooie/widgets/base.js +1 -1
- data/vendor/assets/javascripts/xooie/widgets/carousel.js +1 -1
- data/vendor/assets/javascripts/xooie/widgets/dialog.js +1 -1
- data/vendor/assets/javascripts/xooie/widgets/dropdown.js +1 -1
- data/vendor/assets/javascripts/xooie/widgets/tab.js +1 -1
- data/vendor/assets/javascripts/xooie/xooie.js +1 -1
- metadata +2 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* Copyright
|
2
|
+
* Copyright 2013 Comcast
|
3
3
|
*
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
* you may not use this file except in compliance with the License.
|
@@ -14,9 +14,15 @@
|
|
14
14
|
* limitations under the License.
|
15
15
|
*/
|
16
16
|
|
17
|
-
define('xooie/stylesheet', ['jquery'], function(
|
17
|
+
define('xooie/stylesheet', ['jquery', 'xooie/helpers'], function($, helpers) {
|
18
|
+
|
19
|
+
|
20
|
+
function nameCheck (index, name) {
|
21
|
+
return document.styleSheets[index].ownerNode.getAttribute('id') === name;
|
22
|
+
}
|
23
|
+
|
18
24
|
var Stylesheet = function(name){
|
19
|
-
var
|
25
|
+
var title;
|
20
26
|
|
21
27
|
//check to see if a stylesheet already exists with this name
|
22
28
|
this.element = $('style[id=' + name + ']');
|
@@ -30,17 +36,11 @@ define('xooie/stylesheet', ['jquery'], function($) {
|
|
30
36
|
this.element.appendTo($('head'));
|
31
37
|
}
|
32
38
|
|
33
|
-
|
34
|
-
for (i = 0; i < document.styleSheets.length; i += 1){
|
35
|
-
if (document.styleSheets[i].ownerNode.getAttribute('id') === name) {
|
36
|
-
this._index = i;
|
37
|
-
}
|
38
|
-
}
|
39
|
-
}
|
39
|
+
this._name = name;
|
40
40
|
};
|
41
41
|
|
42
42
|
Stylesheet.prototype.get = function(){
|
43
|
-
return document.styleSheets[this.
|
43
|
+
return document.styleSheets[this.getIndex()];
|
44
44
|
};
|
45
45
|
|
46
46
|
Stylesheet.prototype.getRule = function(ruleName){
|
@@ -109,6 +109,25 @@ define('xooie/stylesheet', ['jquery'], function($) {
|
|
109
109
|
return false;
|
110
110
|
};
|
111
111
|
|
112
|
+
Stylesheet.prototype.getIndex = function() {
|
113
|
+
var i;
|
114
|
+
|
115
|
+
if (helpers.isUndefined(document.styleSheets)) {
|
116
|
+
return;
|
117
|
+
}
|
118
|
+
|
119
|
+
if (!helpers.isUndefined(this._index) && nameCheck(this._index, this._name)) {
|
120
|
+
return this._index;
|
121
|
+
} else {
|
122
|
+
for (i = 0; i < document.styleSheets.length; i += 1){
|
123
|
+
if (nameCheck(i, this._name)) {
|
124
|
+
this._index = i;
|
125
|
+
return i;
|
126
|
+
}
|
127
|
+
}
|
128
|
+
}
|
129
|
+
};
|
130
|
+
|
112
131
|
return Stylesheet;
|
113
132
|
|
114
133
|
});
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: xooie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.0.
|
5
|
+
version: 1.0.3
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Andrew Larkin
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2013-11-
|
13
|
+
date: 2013-11-15 00:00:00 Z
|
14
14
|
dependencies: []
|
15
15
|
|
16
16
|
description: A highly modular, extensible JavaScript UI framework.
|