]> www.average.org Git - mkgallery.git/blobdiff - include/showwin.js
switch to "new" slideshow (which is not working yet)
[mkgallery.git] / include / showwin.js
index daec73a234cb46fab57ffcf3ae744df6acf11a5d..3fac7f6b7de60a29bccb29fa38516cc41447cf0e 100644 (file)
@@ -16,9 +16,9 @@ var showWindow = new Class({
 
        getOptions: function(){
                return {
-                       embed: [],
                        zIndex: 2,
                        container: document.body,
+                       tohide: '',
                        onClick: $empty,
                }
        },
@@ -27,6 +27,7 @@ var showWindow = new Class({
                this.setOptions(this.getOptions(), options);
 
                this.options.container = $(this.options.container);
+               this.options.tohide = $(this.options.tohide);
 
                this.container = new Element('div').addClass(name).
                setProperties({
@@ -44,16 +45,6 @@ var showWindow = new Class({
                        this.options.onClick()
                }.bind(this)).injectInside(this.options.container);
 
-               this.embedded = [];
-               this.options.embed.each(function(el){
-                       var sub = new Element('div');
-                       sub.addClass(el).setProperties({
-                               id: el,
-                               name: el,
-                       }).injectInside(this.container);
-                       this.embedded.push(sub);
-               },this);
-
                this.position();
 
                window.addEvent('resize', this.position.bind(this));
@@ -76,10 +67,16 @@ var showWindow = new Class({
        },
 
        show: function(){
+               if (this.options.tohide) {
+                       this.options.tohide.setStyle('display', 'none');
+               }
                this.container.setStyle('display', 'block');
        },
 
        hide: function(){
+               if (this.options.tohide) {
+                       this.options.tohide.setStyle('display', 'block');
+               }
                this.container.setStyle('display', 'none');
        }
 })