From: Eugene Crosser Date: Wed, 20 Aug 2008 11:13:33 +0000 (+0000) Subject: mame concealable elements on info page. hide them when loaded to info frame. X-Git-Tag: 2.00~49 X-Git-Url: http://www.average.org/gitweb/?p=mkgallery.git;a=commitdiff_plain;h=1826ee90530507454b5cdd69a76a385f63f5e8d5 mame concealable elements on info page. hide them when loaded to info frame. --- diff --git a/include/gallery.js b/include/gallery.js index 9b37b4a..a45f1d1 100644 --- a/include/gallery.js +++ b/include/gallery.js @@ -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 index 0000000..1914a19 --- /dev/null +++ b/include/infopage.js @@ -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) diff --git a/mkgallery.pl b/mkgallery.pl index 1c5fd98..26e1729 100755 --- a/mkgallery.pl +++ b/mkgallery.pl @@ -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},