Skip to content
This repository

Various fixes #198

Merged
merged 4 commits into from almost 3 years ago

2 participants

Rouven Weßling Louis Landry
This page is out of date. Refresh to see the latest.
2  docs/manual/appendices/changelog.xml
@@ -308,7 +308,7 @@
308 308 <para>New JHttp class.</para>
309 309 </listitem>
310 310 <listitem>
311   - <para></para>
  311 + <para>More JavaScript functions have been moved to the Joomla namespaced and updated.</para>
312 312 </listitem>
313 313 <listitem>
314 314 <para></para>
17 media/system/css/modal.css
@@ -4,7 +4,7 @@
4 4 * Allows to open various content as modal,
5 5 * centered and animated box.
6 6 *
7   - * @version 1.2
  7 + * @version 1.3
8 8 *
9 9 * @license MIT-style license
10 10 * @author Harald Kirschner <mail [at] digitarald.de>
@@ -31,6 +31,11 @@
31 31 border-radius: 3px;
32 32 }
33 33
  34 +#sbox-window[aria-hidden=true],
  35 +#sbox-overlay[aria-hidden=true] {
  36 + display: none;
  37 +}
  38 +
34 39 #sbox-btn-close {
35 40 position: absolute;
36 41 width: 30px;
@@ -41,10 +46,6 @@
41 46 border: none;
42 47 }
43 48
44   -.sbox-window-ie6 #sbox-btn-close {
45   - background-image: url(../images/modal/closebox.gif);
46   -}
47   -
48 49 .sbox-loading #sbox-content {
49 50 background-image: url(../images/modal/spinner.gif);
50 51 background-repeat: no-repeat;
@@ -77,10 +78,16 @@
77 78 overflow: visible;
78 79 }
79 80
  81 +/* Hides scrollbars */
  82 +.body-overlayed {
  83 + overflow: hidden;
  84 +}
  85 +
80 86 /* Hides flash (Firefox problem) and selects (IE) */
81 87 .body-overlayed embed, .body-overlayed object, .body-overlayed select {
82 88 visibility: hidden;
83 89 }
  90 +
84 91 #sbox-window embed, #sbox-window object, #sbox-window select {
85 92 visibility: visible;
86 93 }
17 media/system/css/modal_msie.css
... ... @@ -1,17 +0,0 @@
1   -/**
2   - * SqueezeBox - Expandable Lightbox
3   - *
4   - * Allows to open various content as modal,
5   - * centered and animated box.
6   - *
7   - * @version 1.1 rc4
8   - *
9   - * @license MIT-style license
10   - * @author Harald Kirschner <mail [at] digitarald.de>
11   - * @copyright Author
12   - */
13   -
14   -#sbox-overlay {
15   - zoom: 1;
16   -}
17   -
BIN  media/system/images/modal/closebox.gif
43 media/system/js/modal-uncompressed.js
@@ -4,12 +4,12 @@
4 4 * Allows to open various content as modal,
5 5 * centered and animated box.
6 6 *
7   - * Dependencies: MooTools 1.2 or newer
  7 + * Dependencies: MooTools 1.3 or newer
8 8 *
9 9 * Inspired by
10 10 * ... Lokesh Dhakar - The original Lightbox v2
11 11 *
12   - * @version 1.2
  12 + * @version 1.3
13 13 *
14 14 * @license MIT-style license
15 15 * @author Harald Kirschner <mail [at] digitarald.de>
@@ -45,6 +45,7 @@ var SqueezeBox = {
45 45 parse: false, // 'rel'
46 46 parseSecure: false,
47 47 shadow: true,
  48 + overlay: true,
48 49 document: null,
49 50 ajaxOptions: {}
50 51 },
@@ -69,11 +70,15 @@ var SqueezeBox = {
69 70 build: function() {
70 71 this.overlay = new Element('div', {
71 72 id: 'sbox-overlay',
72   - styles: {display: 'none', zIndex: this.options.zIndex}
  73 + 'aria-hidden': 'true',
  74 + styles: { zIndex: this.options.zIndex},
  75 + tabindex: -1
73 76 });
74 77 this.win = new Element('div', {
75 78 id: 'sbox-window',
76   - styles: {display: 'none', zIndex: this.options.zIndex + 2}
  79 + role: 'dialog',
  80 + 'aria-hidden': 'true',
  81 + styles: {zIndex: this.options.zIndex + 2}
77 82 });
78 83 if (this.options.shadow) {
79 84 if (Browser.chrome
@@ -93,7 +98,8 @@ var SqueezeBox = {
93 98 }
94 99 }
95 100 this.content = new Element('div', {id: 'sbox-content'}).inject(this.win);
96   - this.closeBtn = new Element('a', {id: 'sbox-btn-close', href: '#'}).inject(this.win);
  101 + this.closeBtn = new Element('a', {id: 'sbox-btn-close', href: '#', role: 'button'}).inject(this.win);
  102 + this.closeBtn.setProperty('aria-controls', 'sbox-window');
97 103 this.fx = {
98 104 overlay: new Fx.Tween(this.overlay, Object.merge({
99 105 property: 'opacity',
@@ -160,7 +166,6 @@ var SqueezeBox = {
160 166 assignOptions: function() {
161 167 this.overlay.addClass(this.options.classOverlay);
162 168 this.win.addClass(this.options.classWindow);
163   - if (Browser.ie6) this.win.addClass('sbox-window-ie6');
164 169 },
165 170
166 171 close: function(e) {
@@ -168,7 +173,7 @@ var SqueezeBox = {
168 173 if (stoppable) e.stop();
169 174 if (!this.isOpen || (stoppable && !Function.from(this.options.closable).call(this, e))) return this;
170 175 this.fx.overlay.start(0).chain(this.toggleOverlay.bind(this));
171   - this.win.setStyle('display', 'none');
  176 + this.win.setProperty('aria-hidden', 'true');
172 177 this.fireEvent('onClose', [this.content]);
173 178 this.trash();
174 179 this.toggleListeners();
@@ -220,6 +225,7 @@ var SqueezeBox = {
220 225 this.toggleListeners(true);
221 226 this.resize(size, true);
222 227 this.isOpen = true;
  228 + this.win.setProperty('aria-hidden', 'false');
223 229 this.fireEvent('onOpen', [this.content]);
224 230 } else {
225 231 this.resize(size);
@@ -245,7 +251,7 @@ var SqueezeBox = {
245 251 if (!instantly) {
246 252 this.fx.win.start(to).chain(this.showContent.bind(this));
247 253 } else {
248   - this.win.setStyles(to).setStyle('display', '');
  254 + this.win.setStyles(to);
249 255 this.showTimer = this.showContent.delay(50, this);
250 256 }
251 257 return this.reposition();
@@ -262,17 +268,22 @@ var SqueezeBox = {
262 268 toggleLoading: function(state) {
263 269 this.isLoading = state;
264 270 this.win[(state) ? 'addClass' : 'removeClass']('sbox-loading');
265   - if (state) this.fireEvent('onLoading', [this.win]);
  271 + if (state) {
  272 + this.win.setProperty('aria-busy', state);
  273 + this.fireEvent('onLoading', [this.win]);
  274 + }
266 275 },
267 276
268 277 toggleOverlay: function(state) {
269   - var full = this.doc.getSize().x;
270   - this.overlay.setStyle('display', (state) ? '' : 'none');
271   - this.doc.body[(state) ? 'addClass' : 'removeClass']('body-overlayed');
272   - if (state) {
273   - this.scrollOffset = this.doc.getWindow().getSize().x - full;
274   - } else {
275   - this.doc.body.setStyle('margin-right', '');
  278 + if (this.options.overlay) {
  279 + var full = this.doc.getSize().x;
  280 + this.overlay.set('aria-hidden', (state) ? 'false' : 'true');
  281 + this.doc.body[(state) ? 'addClass' : 'removeClass']('body-overlayed');
  282 + if (state) {
  283 + this.scrollOffset = this.doc.getWindow().getSize().x - full;
  284 + } else {
  285 + this.doc.body.setStyle('margin-right', '');
  286 + }
276 287 }
277 288 },
278 289
31 media/system/js/modal.js
... ... @@ -1,20 +1,23 @@
1 1 /*
2   - MIT-style license
  2 + MIT-style license
  3 + @author Harald Kirschner <mail [at] digitarald.de>
  4 + @author Rouven Weßling <me [at] rouvenwessling.de>
  5 + @copyright Author
3 6 */
4   -var SqueezeBox={presets:{onOpen:function(){},onClose:function(){},onUpdate:function(){},onResize:function(){},onMove:function(){},onShow:function(){},onHide:function(){},size:{x:600,y:450},sizeLoading:{x:200,y:150},marginInner:{x:20,y:20},marginImage:{x:50,y:75},handler:!1,target:null,closable:!0,closeBtn:!0,zIndex:65555,overlayOpacity:0.7,classWindow:"",classOverlay:"",overlayFx:{},resizeFx:{},contentFx:{},parse:!1,parseSecure:!1,shadow:!0,document:null,ajaxOptions:{}},initialize:function(a){if(this.options)return this;
5   -this.presets=Object.merge(this.presets,a);this.doc=this.presets.document||document;this.options={};this.setOptions(this.presets).build();this.bound={window:this.reposition.bind(this,[null]),scroll:this.checkTarget.bind(this),close:this.close.bind(this),key:this.onKey.bind(this)};this.isOpen=this.isLoading=!1;return this},build:function(){this.overlay=new Element("div",{id:"sbox-overlay",styles:{display:"none",zIndex:this.options.zIndex}});this.win=new Element("div",{id:"sbox-window",styles:{display:"none",
6   -zIndex:this.options.zIndex+2}});if(this.options.shadow)if(Browser.chrome||Browser.safari&&Browser.version>=3||Browser.opera&&Browser.version>=10.5||Browser.firefox&&Browser.version>=3.5||Browser.ie&&Browser.version>=9)this.win.addClass("shadow");else if(!Browser.ie6){var a=(new Element("div",{"class":"sbox-bg-wrap"})).inject(this.win),b=function(a){this.overlay.fireEvent("click",[a])}.bind(this);["n","ne","e","se","s","sw","w","nw"].each(function(c){(new Element("div",{"class":"sbox-bg sbox-bg-"+
7   -c})).inject(a).addEvent("click",b)})}this.content=(new Element("div",{id:"sbox-content"})).inject(this.win);this.closeBtn=(new Element("a",{id:"sbox-btn-close",href:"#"})).inject(this.win);this.fx={overlay:(new Fx.Tween(this.overlay,Object.merge({property:"opacity",onStart:Events.prototype.clearChain,duration:250,link:"cancel"},this.options.overlayFx))).set(0),win:new Fx.Morph(this.win,Object.merge({onStart:Events.prototype.clearChain,unit:"px",duration:750,transition:Fx.Transitions.Quint.easeOut,
8   -link:"cancel",unit:"px"},this.options.resizeFx)),content:(new Fx.Tween(this.content,Object.merge({property:"opacity",duration:250,link:"cancel"},this.options.contentFx))).set(0)};document.id(this.doc.body).adopt(this.overlay,this.win)},assign:function(a,b){return(document.id(a)||$$(a)).addEvent("click",function(){return!SqueezeBox.fromElement(this,b)})},open:function(a,b){this.initialize();this.element!=null&&this.trash();this.element=document.id(a)||!1;this.setOptions(Object.merge(this.presets,b||
9   -{}));if(this.element&&this.options.parse){var c=this.element.getProperty(this.options.parse);c&&(c=JSON.decode(c,this.options.parseSecure))&&this.setOptions(c)}this.url=(this.element?this.element.get("href"):a)||this.options.url||"";this.assignOptions();var d=d||this.options.handler;if(d)return this.setContent(d,this.parsers[d].call(this,!0));return this.parsers.some(function(a,b){var c=a.call(this);if(c)return this.setContent(b,c),!0;return!1},this)},fromElement:function(a,b){return this.open(a,
10   -b)},assignOptions:function(){this.overlay.addClass(this.options.classOverlay);this.win.addClass(this.options.classWindow);Browser.ie6&&this.win.addClass("sbox-window-ie6")},close:function(a){var b=typeOf(a)=="event";b&&a.stop();if(!this.isOpen||b&&!Function.from(this.options.closable).call(this,a))return this;this.fx.overlay.start(0).chain(this.toggleOverlay.bind(this));this.win.setStyle("display","none");this.fireEvent("onClose",[this.content]);this.trash();this.toggleListeners();this.isOpen=!1;
11   -return this},trash:function(){this.element=this.asset=null;this.content.empty();this.options={};this.removeEvents().setOptions(this.presets).callChain()},onError:function(){this.asset=null;this.setContent("string",this.options.errorMsg||"An error occurred")},setContent:function(a,b){if(!this.handlers[a])return!1;this.content.className="sbox-content-"+a;this.applyTimer=this.applyContent.delay(this.fx.overlay.options.duration,this,this.handlers[a].call(this,b));if(this.overlay.retrieve("opacity"))return this;
  7 +var SqueezeBox={presets:{onOpen:function(){},onClose:function(){},onUpdate:function(){},onResize:function(){},onMove:function(){},onShow:function(){},onHide:function(){},size:{x:600,y:450},sizeLoading:{x:200,y:150},marginInner:{x:20,y:20},marginImage:{x:50,y:75},handler:!1,target:null,closable:!0,closeBtn:!0,zIndex:65555,overlayOpacity:0.7,classWindow:"",classOverlay:"",overlayFx:{},resizeFx:{},contentFx:{},parse:!1,parseSecure:!1,shadow:!0,overlay:!0,document:null,ajaxOptions:{}},initialize:function(a){if(this.options)return this;
  8 +this.presets=Object.merge(this.presets,a);this.doc=this.presets.document||document;this.options={};this.setOptions(this.presets).build();this.bound={window:this.reposition.bind(this,[null]),scroll:this.checkTarget.bind(this),close:this.close.bind(this),key:this.onKey.bind(this)};this.isOpen=this.isLoading=!1;return this},build:function(){this.overlay=new Element("div",{id:"sbox-overlay","aria-hidden":"true",styles:{zIndex:this.options.zIndex},tabindex:-1});this.win=new Element("div",{id:"sbox-window",
  9 +role:"dialog","aria-hidden":"true",styles:{zIndex:this.options.zIndex+2}});if(this.options.shadow)if(Browser.chrome||Browser.safari&&Browser.version>=3||Browser.opera&&Browser.version>=10.5||Browser.firefox&&Browser.version>=3.5||Browser.ie&&Browser.version>=9)this.win.addClass("shadow");else if(!Browser.ie6){var a=(new Element("div",{"class":"sbox-bg-wrap"})).inject(this.win),b=function(a){this.overlay.fireEvent("click",[a])}.bind(this);["n","ne","e","se","s","sw","w","nw"].each(function(c){(new Element("div",
  10 +{"class":"sbox-bg sbox-bg-"+c})).inject(a).addEvent("click",b)})}this.content=(new Element("div",{id:"sbox-content"})).inject(this.win);this.closeBtn=(new Element("a",{id:"sbox-btn-close",href:"#",role:"button"})).inject(this.win);this.closeBtn.setProperty("aria-controls","sbox-window");this.fx={overlay:(new Fx.Tween(this.overlay,Object.merge({property:"opacity",onStart:Events.prototype.clearChain,duration:250,link:"cancel"},this.options.overlayFx))).set(0),win:new Fx.Morph(this.win,Object.merge({onStart:Events.prototype.clearChain,
  11 +unit:"px",duration:750,transition:Fx.Transitions.Quint.easeOut,link:"cancel",unit:"px"},this.options.resizeFx)),content:(new Fx.Tween(this.content,Object.merge({property:"opacity",duration:250,link:"cancel"},this.options.contentFx))).set(0)};document.id(this.doc.body).adopt(this.overlay,this.win)},assign:function(a,b){return(document.id(a)||$$(a)).addEvent("click",function(){return!SqueezeBox.fromElement(this,b)})},open:function(a,b){this.initialize();this.element!=null&&this.trash();this.element=
  12 +document.id(a)||!1;this.setOptions(Object.merge(this.presets,b||{}));if(this.element&&this.options.parse){var c=this.element.getProperty(this.options.parse);c&&(c=JSON.decode(c,this.options.parseSecure))&&this.setOptions(c)}this.url=(this.element?this.element.get("href"):a)||this.options.url||"";this.assignOptions();var d=d||this.options.handler;if(d)return this.setContent(d,this.parsers[d].call(this,!0));return this.parsers.some(function(a,b){var c=a.call(this);if(c)return this.setContent(b,c),!0;
  13 +return!1},this)},fromElement:function(a,b){return this.open(a,b)},assignOptions:function(){this.overlay.addClass(this.options.classOverlay);this.win.addClass(this.options.classWindow)},close:function(a){var b=typeOf(a)=="event";b&&a.stop();if(!this.isOpen||b&&!Function.from(this.options.closable).call(this,a))return this;this.fx.overlay.start(0).chain(this.toggleOverlay.bind(this));this.win.setProperty("aria-hidden","true");this.fireEvent("onClose",[this.content]);this.trash();this.toggleListeners();
  14 +this.isOpen=!1;return this},trash:function(){this.element=this.asset=null;this.content.empty();this.options={};this.removeEvents().setOptions(this.presets).callChain()},onError:function(){this.asset=null;this.setContent("string",this.options.errorMsg||"An error occurred")},setContent:function(a,b){if(!this.handlers[a])return!1;this.content.className="sbox-content-"+a;this.applyTimer=this.applyContent.delay(this.fx.overlay.options.duration,this,this.handlers[a].call(this,b));if(this.overlay.retrieve("opacity"))return this;
12 15 this.toggleOverlay(!0);this.fx.overlay.start(this.options.overlayOpacity);return this.reposition()},applyContent:function(a,b){if(this.isOpen||this.applyTimer)this.applyTimer=clearTimeout(this.applyTimer),this.hideContent(),a?(this.isLoading&&this.toggleLoading(!1),this.fireEvent("onUpdate",[this.content],20)):this.toggleLoading(!0),a&&(["string","array"].contains(typeOf(a))?this.content.set("html",a):a!==this.content&&this.content.contains(a)||this.content.adopt(a)),this.callChain(),this.isOpen?
13   -this.resize(b):(this.toggleListeners(!0),this.resize(b,!0),this.isOpen=!0,this.fireEvent("onOpen",[this.content]))},resize:function(a,b){this.showTimer=clearTimeout(this.showTimer||null);var c=this.doc.getSize(),d=this.doc.getScroll();this.size=Object.merge(this.isLoading?this.options.sizeLoading:this.options.size,a);this.size.x==self.getSize().x&&(this.size.y-=50,this.size.x-=20);c={width:this.size.x,height:this.size.y,left:(d.x+(c.x-this.size.x-this.options.marginInner.x)/2).toInt(),top:(d.y+(c.y-
14   -this.size.y-this.options.marginInner.y)/2).toInt()};this.hideContent();b?(this.win.setStyles(c).setStyle("display",""),this.showTimer=this.showContent.delay(50,this)):this.fx.win.start(c).chain(this.showContent.bind(this));return this.reposition()},toggleListeners:function(a){a=a?"addEvent":"removeEvent";this.closeBtn[a]("click",this.bound.close);this.overlay[a]("click",this.bound.close);this.doc[a]("keydown",this.bound.key)[a]("mousewheel",this.bound.scroll);this.doc.getWindow()[a]("resize",this.bound.window)[a]("scroll",
15   -this.bound.window)},toggleLoading:function(a){this.isLoading=a;this.win[a?"addClass":"removeClass"]("sbox-loading");a&&this.fireEvent("onLoading",[this.win])},toggleOverlay:function(a){var b=this.doc.getSize().x;this.overlay.setStyle("display",a?"":"none");this.doc.body[a?"addClass":"removeClass"]("body-overlayed");a?this.scrollOffset=this.doc.getWindow().getSize().x-b:this.doc.body.setStyle("margin-right","")},showContent:function(){this.content.get("opacity")&&this.fireEvent("onShow",[this.win]);
16   -this.fx.content.start(1)},hideContent:function(){this.content.get("opacity")||this.fireEvent("onHide",[this.win]);this.fx.content.cancel().set(0)},onKey:function(a){switch(a.key){case "esc":this.close(a);case "up":case "down":return!1}},checkTarget:function(a){return a.target!==this.content&&this.content.contains(a.target)},reposition:function(){var a=this.doc.getSize(),b=this.doc.getScroll(),c=this.doc.getScrollSize(),d=this.overlay.getStyles("height"),d=parseInt(d.height);c.y>d&&a.y>=d&&(this.overlay.setStyles({width:c.x+
17   -"px",height:c.y+"px"}),this.win.setStyles({left:(b.x+(a.x-this.win.offsetWidth)/2-this.scrollOffset).toInt()+"px",top:(b.y+(a.y-this.win.offsetHeight)/2).toInt()+"px"}));return this.fireEvent("onMove",[this.overlay,this.win])},removeEvents:function(a){if(!this.$events)return this;a?this.$events[a]&&(this.$events[a]=null):this.$events=null;return this},extend:function(a){return Object.append(this,a)},handlers:new Hash,parsers:new Hash};SqueezeBox.extend(new Events(function(){})).extend(new Options(function(){})).extend(new Chain(function(){}));
  16 +this.resize(b):(this.toggleListeners(!0),this.resize(b,!0),this.isOpen=!0,this.win.setProperty("aria-hidden","false"),this.fireEvent("onOpen",[this.content]))},resize:function(a,b){this.showTimer=clearTimeout(this.showTimer||null);var c=this.doc.getSize(),d=this.doc.getScroll();this.size=Object.merge(this.isLoading?this.options.sizeLoading:this.options.size,a);this.size.x==self.getSize().x&&(this.size.y-=50,this.size.x-=20);c={width:this.size.x,height:this.size.y,left:(d.x+(c.x-this.size.x-this.options.marginInner.x)/
  17 +2).toInt(),top:(d.y+(c.y-this.size.y-this.options.marginInner.y)/2).toInt()};this.hideContent();b?(this.win.setStyles(c),this.showTimer=this.showContent.delay(50,this)):this.fx.win.start(c).chain(this.showContent.bind(this));return this.reposition()},toggleListeners:function(a){a=a?"addEvent":"removeEvent";this.closeBtn[a]("click",this.bound.close);this.overlay[a]("click",this.bound.close);this.doc[a]("keydown",this.bound.key)[a]("mousewheel",this.bound.scroll);this.doc.getWindow()[a]("resize",this.bound.window)[a]("scroll",
  18 +this.bound.window)},toggleLoading:function(a){this.isLoading=a;this.win[a?"addClass":"removeClass"]("sbox-loading");a&&(this.win.setProperty("aria-busy",a),this.fireEvent("onLoading",[this.win]))},toggleOverlay:function(a){if(this.options.overlay){var b=this.doc.getSize().x;this.overlay.set("aria-hidden",a?"false":"true");this.doc.body[a?"addClass":"removeClass"]("body-overlayed");a?this.scrollOffset=this.doc.getWindow().getSize().x-b:this.doc.body.setStyle("margin-right","")}},showContent:function(){this.content.get("opacity")&&
  19 +this.fireEvent("onShow",[this.win]);this.fx.content.start(1)},hideContent:function(){this.content.get("opacity")||this.fireEvent("onHide",[this.win]);this.fx.content.cancel().set(0)},onKey:function(a){switch(a.key){case "esc":this.close(a);case "up":case "down":return!1}},checkTarget:function(a){return a.target!==this.content&&this.content.contains(a.target)},reposition:function(){var a=this.doc.getSize(),b=this.doc.getScroll(),c=this.doc.getScrollSize(),d=this.overlay.getStyles("height"),d=parseInt(d.height);
  20 +c.y>d&&a.y>=d&&(this.overlay.setStyles({width:c.x+"px",height:c.y+"px"}),this.win.setStyles({left:(b.x+(a.x-this.win.offsetWidth)/2-this.scrollOffset).toInt()+"px",top:(b.y+(a.y-this.win.offsetHeight)/2).toInt()+"px"}));return this.fireEvent("onMove",[this.overlay,this.win])},removeEvents:function(a){if(!this.$events)return this;a?this.$events[a]&&(this.$events[a]=null):this.$events=null;return this},extend:function(a){return Object.append(this,a)},handlers:new Hash,parsers:new Hash};SqueezeBox.extend(new Events(function(){})).extend(new Options(function(){})).extend(new Chain(function(){}));
18 21 SqueezeBox.parsers.extend({image:function(a){return a||/\.(?:jpg|png|gif)$/i.test(this.url)?this.url:!1},clone:function(a){if(document.id(this.options.target))return document.id(this.options.target);if(this.element&&!this.element.parentNode)return this.element;var b=this.url.match(/#([\w-]+)$/);return b?document.id(b[1]):a?this.element:!1},ajax:function(a){return a||this.url&&!/^(?:javascript|#)/i.test(this.url)?this.url:!1},iframe:function(a){return a||this.url?this.url:!1},string:function(){return!0}});
19 22 SqueezeBox.handlers.extend({image:function(a){var b,c=new Image;this.asset=null;c.onload=c.onabort=c.onerror=function(){c.onload=c.onabort=c.onerror=null;if(c.width){var a=this.doc.getSize();a.x-=this.options.marginImage.x;a.y-=this.options.marginImage.y;b={x:c.width,y:c.height};for(var e=2;e--;)if(b.x>a.x)b.y*=a.x/b.x,b.x=a.x;else if(b.y>a.y)b.x*=a.y/b.y,b.y=a.y;b.x=b.x.toInt();b.y=b.y.toInt();this.asset=document.id(c);c=null;this.asset.width=b.x;this.asset.height=b.y;this.applyContent(this.asset,
20 23 b)}else this.onError.delay(10,this)}.bind(this);c.src=a;if(c&&c.onload&&c.complete)c.onload();return this.asset?[this.asset,b]:null},clone:function(a){if(a)return a.clone();return this.onError()},adopt:function(a){if(a)return a;return this.onError()},ajax:function(a){var b=this.options.ajaxOptions||{};this.asset=(new Request.HTML(Object.merge({method:"get",evalScripts:!1},this.options.ajaxOptions))).addEvents({onSuccess:function(a){this.applyContent(a);b.evalScripts!==null&&!b.evalScripts&&Browser.exec(this.asset.response.javascript);
4 media/system/js/multiselect.js
@@ -13,7 +13,9 @@
13 13 initialize : function(table) {
14 14 this.table = document.id(table);
15 15 this.boxes = table.getElements('input[type=checkbox]');
16   - this.boxes.addEvent('click', this.doselect.bindWithEvent(this));
  16 + this.boxes.addEvent('click', function(e){
  17 + this.doselect(e);
  18 + }.bind(this));
17 19 },
18 20 doselect: function(e) {
19 21 var current = document.id(e.target);

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.