X-Git-Url: http://www.average.org/gitweb/?p=mkgallery.git;a=blobdiff_plain;f=include%2Fshowwin.js;h=dfd3714f8ec668a14cf74e7fa029c9ef236050af;hp=00f91ce3727cb48e9efc3c1c1e332ed35c47555b;hb=7a52825ce5f25653945b6f1ba8f1aa0098f95863;hpb=9e2f170c6e4ffb4f6ba758387c5689142615ecbd diff --git a/include/showwin.js b/include/showwin.js index 00f91ce..dfd3714 100644 --- a/include/showwin.js +++ b/include/showwin.js @@ -19,8 +19,7 @@ var showWindow = new Class({ zIndex: 2, container: document.body, tohide: '', - onClick: $empty, - onKeypress: $empty, + onClick: $empty } }, @@ -33,7 +32,7 @@ var showWindow = new Class({ this.container = new Element('div').addClass(name). setProperties({ id: name, - name: name, + name: name }).setStyles({ position: 'absolute', left: '0px', @@ -44,8 +43,6 @@ var showWindow = new Class({ display: 'none' }).addEvent('click', function(){ this.options.onClick() - }.bind(this)).addEvent('keypress', function(){ - this.options.onKeypress() }.bind(this)).injectInside(this.options.container); window.addEvent('resize', this.position.bind(this)); @@ -73,7 +70,7 @@ var showWindow = new Class({ return { width: this.w, height: this.h, - top: this.s, + top: this.s }; }, @@ -83,7 +80,7 @@ var showWindow = new Class({ 'display' ); this.options.tohide.setStyles({ - display: 'none', + display: 'none' }); } this.bodystyles = document.body.getStyles( @@ -92,7 +89,7 @@ var showWindow = new Class({ document.body.setStyles({ overflow: 'hidden', 'overflow-x': 'hidden', - 'overflow-y': 'hidden', + 'overflow-y': 'hidden' }); this.position(); this.container.setStyle('display', 'block'); @@ -104,7 +101,12 @@ var showWindow = new Class({ } document.body.setStyles(this.bodystyles); this.container.setStyle('display', 'none'); + }, + + grab: function(obj){ + return this.container.grab(obj); } -}) +}); + showWindow.implement(new Options);