lsd_rails 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Packages/art/Source/ART.Path.js +1 -1
- data/Packages/art/Source/ART.SVG.js +4 -3
- data/Packages/art/Source/ART.VML.js +8 -2
- data/Packages/mootools-core/Docs/Browser/Browser.md +1 -1
- data/Packages/mootools-core/Docs/Core/Core.md +1 -1
- data/Packages/{mootools-more → mootools-core}/Docs/Element/Element.Delegation.md +58 -38
- data/Packages/mootools-core/Docs/Element/Element.md +5 -5
- data/Packages/mootools-core/Docs/Fx/Fx.Morph.md +5 -1
- data/Packages/mootools-core/Docs/Intro.md +3 -1
- data/Packages/mootools-core/Docs/Request/Request.HTML.md +3 -3
- data/Packages/mootools-core/Docs/Request/Request.JSON.md +1 -1
- data/Packages/mootools-core/Docs/Request/Request.md +12 -12
- data/Packages/mootools-core/Docs/Slick/Slick.md +318 -0
- data/Packages/mootools-core/Docs/Types/{Event.md → DOMEvent.md} +37 -27
- data/Packages/mootools-core/Docs/Types/Function.md +2 -2
- data/Packages/mootools-core/Docs/Types/String.md +4 -4
- data/Packages/mootools-core/Source/Class/Class.Extras.js +1 -1
- data/Packages/mootools-core/Source/Core/Core.js +3 -3
- data/Packages/mootools-core/Source/Element/Element.Delegation.js +198 -0
- data/Packages/mootools-core/Source/Element/Element.Dimensions.js +1 -2
- data/Packages/mootools-core/Source/Element/Element.Event.js +22 -7
- data/Packages/mootools-core/Source/Element/Element.Style.js +65 -50
- data/Packages/mootools-core/Source/Element/Element.js +289 -200
- data/Packages/mootools-core/Source/Fx/Fx.Tween.js +16 -10
- data/Packages/mootools-core/Source/Fx/Fx.js +6 -6
- data/Packages/mootools-core/Source/Request/Request.js +7 -7
- data/Packages/mootools-core/Source/Slick/Slick.Finder.js +23 -10
- data/Packages/mootools-core/Source/Types/Array.js +7 -7
- data/Packages/mootools-core/Source/Types/DOMEvent.js +125 -0
- data/Packages/mootools-core/Source/Types/Function.js +20 -10
- data/Packages/mootools-core/Source/Types/String.js +10 -10
- data/Packages/mootools-core/Source/Utilities/DOMReady.js +2 -2
- data/Packages/mootools-core/build +0 -2
- data/Packages/mootools-core/package.yml +2 -1
- data/Packages/mootools-more/Docs/Element/Element.Event.Pseudos.md +9 -9
- data/Packages/mootools-more/Docs/Forms/Form.Validator.md +20 -4
- data/Packages/mootools-more/Docs/Interface/HtmlTable.md +19 -0
- data/Packages/mootools-more/Docs/Interface/Tips.md +2 -2
- data/Packages/mootools-more/Docs/Types/Number.Format.md +10 -2
- data/Packages/mootools-more/Source/Class/Events.Pseudos.js +39 -62
- data/Packages/mootools-more/Source/Element/Element.Event.Pseudos.Keys.js +24 -25
- data/Packages/mootools-more/Source/Element/Element.Event.Pseudos.js +5 -5
- data/Packages/mootools-more/Source/Forms/Form.Validator.js +14 -2
- data/Packages/mootools-more/Source/Forms/OverText.js +0 -1
- data/Packages/mootools-more/Source/Interface/HtmlTable.js +21 -14
- data/Packages/mootools-more/Source/Locale/Locale.en-US.Form.Validator.js +1 -0
- data/Packages/mootools-more/Source/Locale/Locale.fr-FR.Form.Validator.js +1 -0
- data/Packages/mootools-more/Source/Locale/Locale.nl-NL.Form.Validator.js +1 -0
- data/Packages/mootools-more/Source/More/More.js +2 -2
- data/Packages/mootools-more/Source/Types/Date.js +2 -1
- data/Packages/mootools-more/Source/Types/Number.Format.js +6 -4
- data/Packages/mootools-more/Source/Utilities/Group.js +17 -23
- data/Packages/mootools-more/Tests/Interactive/Drag/Drag.Move_(container).html +2 -2
- data/Packages/mootools-more/Tests/Interactive/Element/Element.Event.Pseudos.html +10 -10
- data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(id).html +15 -4
- data/Packages/mootools-more/Tests/Interactive/Interface/HtmlTable_(zebra).html +4 -1
- data/Packages/mootools-more/Tests/Interactive/Interface/Keyboard_(nested).html +19 -26
- data/Packages/mootools-more/Tests/Interactive/Interface/Keyboard_(single).html +21 -24
- data/Packages/mootools-more/Tests/Specs/1.3/Class/Events.Pseudos.js +7 -154
- data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Delegation.js +2 -4
- data/Packages/mootools-more/Tests/Specs/1.3/Element/Element.Event.Pseudos.js +13 -21
- data/Packages/mootools-more/Tests/Specs/1.3/Forms/Form.Validator.js +14 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Interface/HtmlTable.js +29 -14
- data/Packages/mootools-more/Tests/Specs/1.3/Types/Date.js +1 -0
- data/Packages/mootools-more/Tests/Specs/1.3/Types/Number.Format.js +4 -1
- data/Packages/mootools-more/Tests/Specs/Configuration.js +136 -4
- data/Packages/mootools-more/package.yml +0 -1
- data/lib/lsd/railtie.rb +2 -2
- data/lib/lsd/widget_generator.rb +1 -1
- metadata +32 -39
- data/Packages/mootools-core/Source/Types/Event.js +0 -135
- data/Packages/mootools-more/Source/Element/Element.Delegation.js +0 -140
@@ -0,0 +1,198 @@
|
|
1
|
+
/*
|
2
|
+
---
|
3
|
+
|
4
|
+
name: Element.Delegation
|
5
|
+
|
6
|
+
description: Extends the Element native object to include the delegate method for more efficient event management.
|
7
|
+
|
8
|
+
license: MIT-style license.
|
9
|
+
|
10
|
+
requires: [Element.Event]
|
11
|
+
|
12
|
+
provides: [Element.Delegation]
|
13
|
+
|
14
|
+
...
|
15
|
+
*/
|
16
|
+
|
17
|
+
(function(){
|
18
|
+
|
19
|
+
var eventListenerSupport = !!window.addEventListener;
|
20
|
+
|
21
|
+
Element.NativeEvents.focusin = Element.NativeEvents.focusout = 2;
|
22
|
+
|
23
|
+
var bubbleUp = function(self, match, fn, event){
|
24
|
+
var target = event.target;
|
25
|
+
while (target && target != self){
|
26
|
+
if (match(target, event)) return fn.call(target, event, target);
|
27
|
+
target = document.id(target.parentNode);
|
28
|
+
}
|
29
|
+
};
|
30
|
+
|
31
|
+
var map = {
|
32
|
+
mouseenter: {
|
33
|
+
base: 'mouseover'
|
34
|
+
},
|
35
|
+
mouseleave: {
|
36
|
+
base: 'mouseout'
|
37
|
+
},
|
38
|
+
focus: {
|
39
|
+
base: 'focus' + (eventListenerSupport ? '' : 'in'),
|
40
|
+
capture: true
|
41
|
+
},
|
42
|
+
blur: {
|
43
|
+
base: eventListenerSupport ? 'blur' : 'focusout',
|
44
|
+
capture: true
|
45
|
+
}
|
46
|
+
};
|
47
|
+
|
48
|
+
/*<ltIE9>*/
|
49
|
+
var _key = '$delegation:';
|
50
|
+
var formObserver = function(type){
|
51
|
+
|
52
|
+
return {
|
53
|
+
|
54
|
+
base: 'focusin',
|
55
|
+
|
56
|
+
remove: function(self, uid){
|
57
|
+
var list = self.retrieve(_key + type + 'listeners', {})[uid];
|
58
|
+
if (list && list.forms) for (var i = list.forms.length; i--;){
|
59
|
+
list.forms[i].removeEvent(type, list.fns[i]);
|
60
|
+
}
|
61
|
+
},
|
62
|
+
|
63
|
+
listen: function(self, match, fn, event, uid){
|
64
|
+
var target = event.target,
|
65
|
+
form = (target.get('tag') == 'form') ? target : event.target.getParent('form');
|
66
|
+
if (!form) return;
|
67
|
+
|
68
|
+
var listeners = self.retrieve(_key + type + 'listeners', {}),
|
69
|
+
listener = listeners[uid] || {forms: [], fns: []},
|
70
|
+
forms = listener.forms, fns = listener.fns;
|
71
|
+
|
72
|
+
if (forms.indexOf(form) != -1) return;
|
73
|
+
forms.push(form);
|
74
|
+
|
75
|
+
var _fn = function(event){
|
76
|
+
bubbleUp(self, match, fn, event);
|
77
|
+
};
|
78
|
+
form.addEvent(type, _fn);
|
79
|
+
fns.push(_fn);
|
80
|
+
|
81
|
+
listeners[uid] = listener;
|
82
|
+
self.store(_key + type + 'listeners', listeners);
|
83
|
+
}
|
84
|
+
};
|
85
|
+
};
|
86
|
+
|
87
|
+
var inputObserver = function(type){
|
88
|
+
return {
|
89
|
+
base: 'focusin',
|
90
|
+
listen: function(self, match, fn, event){
|
91
|
+
var events = {blur: function(){
|
92
|
+
this.removeEvents(events);
|
93
|
+
}};
|
94
|
+
events[type] = function(event){
|
95
|
+
bubbleUp(self, match, fn, event);
|
96
|
+
};
|
97
|
+
event.target.addEvents(events);
|
98
|
+
}
|
99
|
+
};
|
100
|
+
};
|
101
|
+
|
102
|
+
if (!eventListenerSupport) Object.append(map, {
|
103
|
+
submit: formObserver('submit'),
|
104
|
+
reset: formObserver('reset'),
|
105
|
+
change: inputObserver('change'),
|
106
|
+
select: inputObserver('select')
|
107
|
+
});
|
108
|
+
/*</ltIE9>*/
|
109
|
+
|
110
|
+
var proto = Element.prototype,
|
111
|
+
addEvent = proto.addEvent,
|
112
|
+
removeEvent = proto.removeEvent;
|
113
|
+
|
114
|
+
var relay = function(old, method){
|
115
|
+
return function(type, fn, useCapture){
|
116
|
+
if (type.indexOf(':relay') == -1) return old.call(this, type, fn, useCapture);
|
117
|
+
var parsed = Slick.parse(type).expressions[0][0];
|
118
|
+
if (parsed.pseudos[0].key != 'relay') return old.call(this, type, fn, useCapture);
|
119
|
+
var newType = parsed.tag;
|
120
|
+
parsed.pseudos.slice(1).each(function(pseudo){
|
121
|
+
newType += ':' + pseudo.key + (pseudo.value ? '(' + pseudo.value + ')' : '');
|
122
|
+
});
|
123
|
+
return method.call(this, newType, parsed.pseudos[0].value, fn);
|
124
|
+
};
|
125
|
+
};
|
126
|
+
|
127
|
+
var delegation = {
|
128
|
+
|
129
|
+
addEvent: function(type, match, fn){
|
130
|
+
var storage = this.retrieve('$delegates', {}), stored = storage[type];
|
131
|
+
if (stored) for (var _uid in stored){
|
132
|
+
if (stored[_uid].fn == fn && stored[_uid].match == match) return this;
|
133
|
+
}
|
134
|
+
|
135
|
+
var _type = type, _match = match, _fn = fn, _map = map[type] || {};
|
136
|
+
type = _map.base || _type;
|
137
|
+
|
138
|
+
match = function(target){
|
139
|
+
return Slick.match(target, _match);
|
140
|
+
};
|
141
|
+
|
142
|
+
var elementEvent = Element.Events[_type];
|
143
|
+
if (elementEvent && elementEvent.condition){
|
144
|
+
var __match = match, condition = elementEvent.condition;
|
145
|
+
match = function(target, event){
|
146
|
+
return __match(target, event) && condition.call(target, event, type);
|
147
|
+
};
|
148
|
+
}
|
149
|
+
|
150
|
+
var self = this, uid = String.uniqueID();
|
151
|
+
var delegator = _map.listen ? function(event){
|
152
|
+
_map.listen(self, match, fn, event, uid);
|
153
|
+
} : function(event){
|
154
|
+
bubbleUp(self, match, fn, event);
|
155
|
+
};
|
156
|
+
|
157
|
+
if (!stored) stored = {};
|
158
|
+
stored[uid] = {
|
159
|
+
match: _match,
|
160
|
+
fn: _fn,
|
161
|
+
delegator: delegator
|
162
|
+
};
|
163
|
+
storage[_type] = stored;
|
164
|
+
return addEvent.call(this, type, delegator, _map.capture);
|
165
|
+
},
|
166
|
+
|
167
|
+
removeEvent: function(type, match, fn, _uid){
|
168
|
+
var storage = this.retrieve('$delegates', {}), stored = storage[type];
|
169
|
+
if (!stored) return this;
|
170
|
+
|
171
|
+
if (_uid){
|
172
|
+
var _type = type, delegator = stored[_uid].delegator, _map = map[type] || {};
|
173
|
+
type = _map.base || _type;
|
174
|
+
if (_map.remove) _map.remove(this, _uid);
|
175
|
+
delete stored[_uid];
|
176
|
+
storage[_type] = stored;
|
177
|
+
return removeEvent.call(this, type, delegator);
|
178
|
+
}
|
179
|
+
|
180
|
+
var __uid, s;
|
181
|
+
if (fn) for (__uid in stored){
|
182
|
+
s = stored[__uid];
|
183
|
+
if (s.match == match && s.fn == fn) return delegation.removeEvent.call(this, type, match, fn, __uid);
|
184
|
+
} else for (__uid in stored){
|
185
|
+
s = stored[__uid];
|
186
|
+
if (s.match == match) delegation.removeEvent.call(this, type, match, s.fn, __uid);
|
187
|
+
}
|
188
|
+
return this;
|
189
|
+
}
|
190
|
+
|
191
|
+
};
|
192
|
+
|
193
|
+
[Element, Window, Document].invoke('implement', {
|
194
|
+
addEvent: relay(addEvent, delegation.addEvent),
|
195
|
+
removeEvent: relay(removeEvent, delegation.removeEvent)
|
196
|
+
});
|
197
|
+
|
198
|
+
})();
|
@@ -137,14 +137,13 @@ Element.implement({
|
|
137
137
|
},
|
138
138
|
|
139
139
|
getPosition: function(relative){
|
140
|
-
if (isBody(this)) return {x: 0, y: 0};
|
141
140
|
var offset = this.getOffsets(),
|
142
141
|
scroll = this.getScrolls();
|
143
142
|
var position = {
|
144
143
|
x: offset.x - scroll.x,
|
145
144
|
y: offset.y - scroll.y
|
146
145
|
};
|
147
|
-
|
146
|
+
|
148
147
|
if (relative && (relative = document.id(relative))){
|
149
148
|
var relativePosition = relative.getPosition();
|
150
149
|
return {x: position.x - relativePosition.x - leftBorder(relative), y: position.y - relativePosition.y - topBorder(relative)};
|
@@ -32,14 +32,14 @@ Element.Properties.events = {set: function(events){
|
|
32
32
|
condition = fn,
|
33
33
|
self = this;
|
34
34
|
if (custom){
|
35
|
-
if (custom.onAdd) custom.onAdd.call(this, fn);
|
35
|
+
if (custom.onAdd) custom.onAdd.call(this, fn, type);
|
36
36
|
if (custom.condition){
|
37
37
|
condition = function(event){
|
38
|
-
if (custom.condition.call(this, event)) return fn.call(this, event);
|
38
|
+
if (custom.condition.call(this, event, type)) return fn.call(this, event);
|
39
39
|
return true;
|
40
40
|
};
|
41
41
|
}
|
42
|
-
realType = custom.base
|
42
|
+
if (custom.base) realType = Function.from(custom.base).call(this, type);
|
43
43
|
}
|
44
44
|
var defn = function(){
|
45
45
|
return fn.call(self);
|
@@ -48,7 +48,7 @@ Element.Properties.events = {set: function(events){
|
|
48
48
|
if (nativeEvent){
|
49
49
|
if (nativeEvent == 2){
|
50
50
|
defn = function(event){
|
51
|
-
event = new
|
51
|
+
event = new DOMEvent(event, self.getWindow());
|
52
52
|
if (condition.call(self, event) === false) event.stop();
|
53
53
|
};
|
54
54
|
}
|
@@ -69,8 +69,8 @@ Element.Properties.events = {set: function(events){
|
|
69
69
|
delete list.values[index];
|
70
70
|
var custom = Element.Events[type];
|
71
71
|
if (custom){
|
72
|
-
if (custom.onRemove) custom.onRemove.call(this, fn);
|
73
|
-
type = custom.base
|
72
|
+
if (custom.onRemove) custom.onRemove.call(this, fn, type);
|
73
|
+
if (custom.base) type = Function.from(custom.base).call(this, type);
|
74
74
|
}
|
75
75
|
return (Element.NativeEvents[type]) ? this.removeListener(type, value, arguments[2]) : this;
|
76
76
|
},
|
@@ -136,7 +136,7 @@ Element.NativeEvents = {
|
|
136
136
|
orientationchange: 2, // mobile
|
137
137
|
touchstart: 2, touchmove: 2, touchend: 2, touchcancel: 2, // touch
|
138
138
|
gesturestart: 2, gesturechange: 2, gestureend: 2, // gesture
|
139
|
-
focus: 2, blur: 2, change: 2, reset: 2, select: 2, submit: 2, //form elements
|
139
|
+
focus: 2, blur: 2, change: 2, reset: 2, select: 2, submit: 2, paste: 2, oninput: 2, //form elements
|
140
140
|
load: 2, unload: 1, beforeunload: 2, resize: 1, move: 1, DOMContentLoaded: 1, readystatechange: 1, //window
|
141
141
|
error: 1, abort: 1, scroll: 1 //misc
|
142
142
|
};
|
@@ -166,6 +166,21 @@ Element.Events = {
|
|
166
166
|
|
167
167
|
};
|
168
168
|
|
169
|
+
/*<ltIE9>*/
|
170
|
+
if (!window.addEventListener){
|
171
|
+
Element.NativeEvents.propertychange = 2;
|
172
|
+
Element.Events.change = {
|
173
|
+
base: function(){
|
174
|
+
var type = this.type;
|
175
|
+
return (this.get('tag') == 'input' && (type == 'radio' || type == 'checkbox')) ? 'propertychange' : 'change'
|
176
|
+
},
|
177
|
+
condition: function(event){
|
178
|
+
return !!(this.type != 'radio' || this.checked);
|
179
|
+
}
|
180
|
+
}
|
181
|
+
}
|
182
|
+
/*</ltIE9>*/
|
183
|
+
|
169
184
|
//<1.2compat>
|
170
185
|
|
171
186
|
Element.Events = new Hash(Element.Events);
|
@@ -22,41 +22,38 @@ Element.Properties.styles = {set: function(styles){
|
|
22
22
|
this.setStyles(styles);
|
23
23
|
}};
|
24
24
|
|
25
|
-
var hasOpacity = (html.style.opacity != null)
|
26
|
-
|
25
|
+
var hasOpacity = (html.style.opacity != null),
|
26
|
+
hasFilter = (html.style.filter != null),
|
27
|
+
reAlpha = /alpha\(opacity=([\d.]+)\)/i;
|
27
28
|
|
28
|
-
var
|
29
|
-
|
30
|
-
|
31
|
-
element.style.opacity = opacity;
|
32
|
-
} else {
|
33
|
-
opacity = (opacity * 100).limit(0, 100).round();
|
34
|
-
opacity = (opacity == 100) ? '' : 'alpha(opacity=' + opacity + ')';
|
35
|
-
var filter = element.style.filter || element.getComputedStyle('filter') || '';
|
36
|
-
element.style.filter = reAlpha.test(filter) ? filter.replace(reAlpha, opacity) : filter + opacity;
|
37
|
-
}
|
29
|
+
var setVisibility = function(element, opacity){
|
30
|
+
element.store('$opacity', opacity);
|
31
|
+
element.style.visibility = opacity > 0 ? 'visible' : 'hidden';
|
38
32
|
};
|
39
33
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
34
|
+
var setOpacity = (hasOpacity ? function(element, opacity){
|
35
|
+
element.style.opacity = opacity;
|
36
|
+
} : (hasFilter ? function(element, opacity){
|
37
|
+
if (!element.currentStyle || !element.currentStyle.hasLayout) element.style.zoom = 1;
|
38
|
+
opacity = (opacity * 100).limit(0, 100).round();
|
39
|
+
opacity = (opacity == 100) ? '' : 'alpha(opacity=' + opacity + ')';
|
40
|
+
var filter = element.style.filter || element.getComputedStyle('filter') || '';
|
41
|
+
element.style.filter = reAlpha.test(filter) ? filter.replace(reAlpha, opacity) : filter + opacity;
|
42
|
+
} : setVisibility));
|
43
|
+
|
44
|
+
var getOpacity = (hasOpacity ? function(element){
|
45
|
+
var opacity = element.style.opacity || element.getComputedStyle('opacity');
|
46
|
+
return (opacity == '') ? 1 : opacity.toFloat();
|
47
|
+
} : (hasFilter ? function(element){
|
48
|
+
var filter = (element.style.filter || element.getComputedStyle('filter')),
|
49
|
+
opacity;
|
50
|
+
if (filter) opacity = filter.match(reAlpha);
|
51
|
+
return (opacity == null || filter == null) ? 1 : (opacity[1] / 100);
|
52
|
+
} : function(element){
|
53
|
+
var opacity = element.retrieve('$opacity');
|
54
|
+
if (opacity == null) opacity = (element.style.visibility == 'hidden' ? 0 : 1);
|
55
|
+
return opacity;
|
56
|
+
}));
|
60
57
|
|
61
58
|
var floatName = (html.style.cssFloat == null) ? 'styleFloat' : 'cssFloat';
|
62
59
|
|
@@ -69,21 +66,12 @@ Element.implement({
|
|
69
66
|
return (computed) ? computed.getPropertyValue((property == floatName) ? 'float' : property.hyphenate()) : null;
|
70
67
|
},
|
71
68
|
|
72
|
-
setOpacity: function(value){
|
73
|
-
setOpacity(this, value);
|
74
|
-
return this;
|
75
|
-
},
|
76
|
-
|
77
|
-
getOpacity: function(){
|
78
|
-
return this.get('opacity');
|
79
|
-
},
|
80
|
-
|
81
69
|
setStyle: function(property, value){
|
82
|
-
|
83
|
-
|
84
|
-
|
70
|
+
if (property == 'opacity'){
|
71
|
+
setOpacity(this, parseFloat(value));
|
72
|
+
return this;
|
85
73
|
}
|
86
|
-
property = property.camelCase();
|
74
|
+
property = (property == 'float' ? floatName : property).camelCase();
|
87
75
|
if (typeOf(value) != 'string'){
|
88
76
|
var map = (Element.Styles[property] || '@').split(' ');
|
89
77
|
value = Array.from(value).map(function(val, i){
|
@@ -98,11 +86,8 @@ Element.implement({
|
|
98
86
|
},
|
99
87
|
|
100
88
|
getStyle: function(property){
|
101
|
-
|
102
|
-
|
103
|
-
case 'float': property = floatName;
|
104
|
-
}
|
105
|
-
property = property.camelCase();
|
89
|
+
if (property == 'opacity') return getOpacity(this);
|
90
|
+
property = (property == 'float' ? floatName : property).camelCase();
|
106
91
|
var result = this.style[property];
|
107
92
|
if (!result || property == 'zIndex'){
|
108
93
|
result = [];
|
@@ -157,6 +142,36 @@ Element.Styles = {
|
|
157
142
|
zIndex: '@', 'zoom': '@', fontWeight: '@', textIndent: '@px', opacity: '@'
|
158
143
|
};
|
159
144
|
|
145
|
+
//<1.3compat>
|
146
|
+
|
147
|
+
Element.implement({
|
148
|
+
|
149
|
+
setOpacity: function(value){
|
150
|
+
setOpacity(this, value);
|
151
|
+
return this;
|
152
|
+
},
|
153
|
+
|
154
|
+
getOpacity: function(){
|
155
|
+
return getOpacity(this);
|
156
|
+
}
|
157
|
+
|
158
|
+
});
|
159
|
+
|
160
|
+
Element.Properties.opacity = {
|
161
|
+
|
162
|
+
set: function(opacity){
|
163
|
+
setOpacity(this, opacity);
|
164
|
+
setVisibility(this, opacity);
|
165
|
+
},
|
166
|
+
|
167
|
+
get: function(){
|
168
|
+
return getOpacity(this);
|
169
|
+
}
|
170
|
+
|
171
|
+
};
|
172
|
+
|
173
|
+
//</1.3compat>
|
174
|
+
|
160
175
|
//<1.2compat>
|
161
176
|
|
162
177
|
Element.Styles = new Hash(Element.Styles);
|