]> www.average.org Git - mkgallery.git/commitdiff
mame concealable elements on info page. hide them when loaded to info frame.
authorEugene Crosser <crosser@average.org>
Wed, 20 Aug 2008 11:13:33 +0000 (11:13 +0000)
committerEugene Crosser <crosser@average.org>
Wed, 20 Aug 2008 11:13:33 +0000 (11:13 +0000)
include/gallery.js
include/infopage.js [new file with mode: 0644]
mkgallery.pl

index 9b37b4aea6424107452f5e4a498ed78f923fdde6..a45f1d10a3c3aacdf88f09135eb01df7fc699adc 100644 (file)
@@ -2,7 +2,7 @@
         This is a part of mkgallery.pl suite
         http://www.average.org/mkgallery/
 
-       Uses mootools (1.1) http://www.mootools.net/
+       Uses mootools (1.2) http://www.mootools.net/
        Uses slideshow http://www.phatfusion.net/slideshow/
 */
 
diff --git a/include/infopage.js b/include/infopage.js
new file mode 100644 (file)
index 0000000..1914a19
--- /dev/null
@@ -0,0 +1,18 @@
+/*
+        This is a part of mkgallery.pl suite
+        http://www.average.org/mkgallery/
+
+       Uses mootools (1.1) http://www.mootools.net/
+*/
+
+function process_infopage() {
+       parsedurl = parseUrl(document.URL)
+       if (parsedurl['query'] == 'conceal'){
+               $$('.conceal').each(function(el){
+                       el.setStyle('display', 'none')
+               })
+       }
+}
+
+/* Initialization */
+window.addEvent('domready',process_infopage)
index 1c5fd98d0f4592353585307ccec7fc2a27a824a3..26e1729e3d11bddad9967ce68abe190cc9a905f1 100755 (executable)
@@ -524,13 +524,19 @@ sub makeaux {
                my $imgsrc = sprintf("../.%s/%s",$sizes[0],$name);
                print $F start_html(-title=>$title,
                                -encoding=>"utf-8",
-                               -style=>{-src=>$inc."gallery.css"},),"\n",
+                               -style=>{-src=>$inc."gallery.css"},
+                               -script=>[
+                                       {-src=>$inc."mootools.js"},
+                                       {-src=>$inc."urlparser.js"},
+                                       {-src=>$inc."infopage.js"},
+                               ]),"\n",
                        start_center,"\n",
                        h1($title),"\n",
                        table({-class=>'ipage'},
                                Tr(td(img({-src=>$imgsrc})),
                                        td($self->infotable))),
-                       a({-href=>'../index.html'},'Index'),"\n",
+                       a({-href=>'../index.html',-class=>'conceal'},
+                               'Index'),"\n",
                        end_center,"\n",
                        end_html,"\n";
                close($F);
@@ -671,8 +677,8 @@ sub img_entry {
        print $IND a({-name=>$i}),"\n",
                start_table({-class=>'slide'}),start_Tr,start_td,"\n",
                div({-class=>'slidetitle',-id=>$name},
-                       a({-href=>".html/$name-info.html",
-                               -title=>'Image Info',
+                       a({-href=>".html/$name-info.html?conceal",
+                               -title=>'Image Info: '.$name,
                                -class=>'infoBox'},
                                $title)),"\n",
                div({-class=>'slideimage',-id=>$name},