]> www.average.org Git - mkgallery.git/commitdiff
fix image centering issue
authorEugene Crosser <crosser@average.org>
Mon, 1 Sep 2008 11:15:00 +0000 (11:15 +0000)
committerEugene Crosser <crosser@average.org>
Mon, 1 Sep 2008 11:15:00 +0000 (11:15 +0000)
include/gallery.css
include/gallery.js
include/show.js
include/showwin.js
mkgallery.pl

index e06e65af103a62f38f46680a75ae6e804e7e2981..fa3ad84f04f3de13a270c6c41f144c69c62c021d 100644 (file)
@@ -5,7 +5,7 @@
        http://www.average.org/mkgallery/
 */
 
        http://www.average.org/mkgallery/
 */
 
-img {
+.slideimage img {
  clear:both;
  border-style: inset;
  border-color: gray;
  clear:both;
  border-style: inset;
  border-color: gray;
@@ -13,6 +13,13 @@ img {
  margin: 0.2ex;
 }
 
  margin: 0.2ex;
 }
 
+.slideshowContainer img {
+ clear:both;
+ border-style: none;
+ margin: 0px;
+ padding: 0px;
+}
+
 table.slide {
  float: left;
  width: 210px;
 table.slide {
  float: left;
  width: 210px;
index e4eeef39ebd4ba18b2b8acc47b0fe105013091fc..d5ff7755778ee00dd4a786dd1fa5871268b82d7e 100644 (file)
@@ -120,4 +120,11 @@ function init_gallery() {
 }
 
 /* Initialization */
 }
 
 /* Initialization */
-window.addEvent('domready',init_gallery)
+window.addEvent('domready',init_gallery);
+
+/* This is how I would like it done for explorer:
+window.addEvent('readystatechange',function(parm){
+       alert('readystatechange, parm='+parm);
+       init_gallery();
+});
+/* but it does not seem to work */
index 248dee6829f6d755a851ea387c5268e47dddc56e..52452329e72abf6892c54603a2bdc5943615ee45 100644 (file)
@@ -139,6 +139,7 @@ var Show = new Class({
                this.options.cbStart();
                this.isplaying = play;
                this.controls.running(this.isplaying);
                this.options.cbStart();
                this.isplaying = play;
                this.controls.running(this.isplaying);
+               this.updatecoords();
                this.show(id);
                return false; /* to make it usable from href links */
        },
                this.show(id);
                return false; /* to make it usable from href links */
        },
index 96568269b88b35f44adffbc9ba751442c16b8cf0..00f91ce3727cb48e9efc3c1c1e332ed35c47555b 100644 (file)
@@ -9,7 +9,7 @@
 */
 
 /*
 */
 
 /*
-       Hidable "fullscreen" Window for Slideshow
+       Hideable "fullscreen" Window for Slideshow
 */
 
 var showWindow = new Class({
 */
 
 var showWindow = new Class({
@@ -20,6 +20,7 @@ var showWindow = new Class({
                        container: document.body,
                        tohide: '',
                        onClick: $empty,
                        container: document.body,
                        tohide: '',
                        onClick: $empty,
+                       onKeypress: $empty,
                }
        },
 
                }
        },
 
@@ -43,10 +44,10 @@ var showWindow = new Class({
                        display: 'none'
                }).addEvent('click', function(){
                        this.options.onClick()
                        display: 'none'
                }).addEvent('click', function(){
                        this.options.onClick()
+               }.bind(this)).addEvent('keypress', function(){
+                       this.options.onKeypress()
                }.bind(this)).injectInside(this.options.container);
 
                }.bind(this)).injectInside(this.options.container);
 
-               this.position();
-
                window.addEvent('resize', this.position.bind(this));
                window.addEvent('scroll', this.position.bind(this));
        },
                window.addEvent('resize', this.position.bind(this));
                window.addEvent('scroll', this.position.bind(this));
        },
@@ -93,6 +94,7 @@ var showWindow = new Class({
                        'overflow-x': 'hidden',
                        'overflow-y': 'hidden',
                });
                        'overflow-x': 'hidden',
                        'overflow-y': 'hidden',
                });
+               this.position();
                this.container.setStyle('display', 'block');
        },
 
                this.container.setStyle('display', 'block');
        },
 
index 6b3febe6c8a3adfd40aa75859d6b4a4cd8875f7d..a486e1b29dd8af353a54cf6563e4d9291298b72a 100755 (executable)
@@ -595,7 +595,9 @@ sub endindex {
        my $self = shift;
        my $IND = $self->{-IND};
 
        my $self = shift;
        my $IND = $self->{-IND};
 
-       print $IND end_center,end_div,end_html,"\n";
+       print $IND end_center,end_div,
+       # "\n",'<script type="text/javascript">init_gallery();</script>',"\n",
+       end_html,"\n";
 
        close($IND) if ($IND);
        undef $self->{-IND};
 
        close($IND) if ($IND);
        undef $self->{-IND};