changeset 119:0dc7c254c5a8

arnica_slides: images of controls moved to css
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Fri, 27 Jun 2008 16:42:12 +0200
parents 267d1b2c2337
children 65c46d7d48f1
files data/plugin/action/arnica_slides.py htdocs/modern/css/arnica_slides.css
diffstat 2 files changed, 29 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/arnica_slides.py	Fri Jun 27 12:26:44 2008 +0200
+++ b/data/plugin/action/arnica_slides.py	Fri Jun 27 16:42:12 2008 +0200
@@ -8,7 +8,7 @@
     @copyright: 2008 by MoinMoin:ReimarBauer
     @license: GNU GPL, see COPYING for details.
 """
-Dependencies = []
+#Dependencies = []
 import os
 
 from MoinMoin import log
@@ -129,10 +129,6 @@
      return text[0]+'//'+text[2];
 }
 
-function arnica_show_image(image) {
-    return arnica_getserver() + '%(htdocs)s' + '/common/arnica/' + image;
-}
-
 function arnica_add_comments() {
   var alias_text = document.slideform.alias.value;
   var exif_date_text = document.slideform.exif_date.value;
@@ -150,8 +146,8 @@
       arnica_add_comments();
    }
    else arnica_first_slide();
-   document.getElementById("arnica_first_slide").innerHTML = '<img src="'+arnica_show_image('arnica_first_slide.png')+'" onclick="arnica_first_slide();" name="fs"  title="first slide" >';
-   document.getElementById("arnica_last_slide").innerHTML = '<img src="'+arnica_show_image('arnica_last_slide.png')+'" onclick="arnica_last_slide();" name="fs"  title="last slide" >';
+   document.getElementById("arnica_first_slide").innerHTML = '<a class="first_slide" onclick="arnica_first_slide();" name="fs"  title="first slide" >';
+   document.getElementById("arnica_last_slide").innerHTML = '<a class="last_slide" onclick="arnica_last_slide();" name="fs"  title="last slide" >';
 }
 
 function arnica_previous_slide() {
@@ -161,8 +157,8 @@
       arnica_add_comments();
    }
    else arnica_last_slide();
-   document.getElementById("arnica_first_slide").innerHTML = '<img src="'+arnica_show_image('arnica_first_slide.png')+'" onclick="arnica_first_slide();" name="fs"  title="first slide" >';
-   document.getElementById("arnica_last_slide").innerHTML = '<img src="'+arnica_show_image('arnica_last_slide.png')+'" onclick="arnica_last_slide();" name="fs"  title="last slide" >';
+   document.getElementById("arnica_first_slide").innerHTML = '<a class="first_slide" onclick="arnica_first_slide();" name="fs"  title="first slide" >';
+   document.getElementById("arnica_last_slide").innerHTML = '<a class="last_slide" onclick="arnica_last_slide();" name="fs"  title="last slide" >';
 }
 
 function arnica_first_slide() {
@@ -170,8 +166,8 @@
    document.images.show.src = theImages[0].src;
    document.slideform.slide.selectedIndex = 0;
    arnica_add_comments();
-   document.getElementById("arnica_first_slide").innerHTML = '<img src="'+arnica_show_image('arnica_first_slide_disabled.png')+'" title="first slide" >';
-   document.getElementById("arnica_last_slide").innerHTML = '<img src="'+arnica_show_image('arnica_last_slide.png')+'" onclick="arnica_last_slide();" name="fs"  title="last slide" >';
+   document.getElementById("arnica_first_slide").innerHTML = '<a class="first_slide_disabled" title="first slide" >';
+   document.getElementById("arnica_last_slide").innerHTML = '<a class="last_slide" onclick="arnica_last_slide();" name="fs"  title="last slide" >';
 }
 
 function arnica_last_slide() {
@@ -179,8 +175,8 @@
    document.images.show.src = theImages[current].src;
    document.slideform.slide.selectedIndex = current;
    arnica_add_comments();
-   document.getElementById("arnica_first_slide").innerHTML = '<img src="'+arnica_show_image('arnica_first_slide.png')+'" onclick="arnica_first_slide();" name="fs"  title="first slide" >';
-   document.getElementById("arnica_last_slide").innerHTML = '<img src="'+arnica_show_image('arnica_last_slide_disabled.png')+'" title="last slide" >';
+   document.getElementById("arnica_first_slide").innerHTML = '<a class="first_slide" onclick="arnica_first_slide();" name="fs"  title="first slide" >';
+   document.getElementById("arnica_last_slide").innerHTML = '<a class="last_slide_disabled" title="last slide" >';
 }
 
 function arnica_ap(text) {
@@ -192,8 +188,8 @@
    current = document.slideform.slide.selectedIndex;
    document.images.show.src = theImages[current].src;
    arnica_add_comments();
-   document.getElementById("arnica_first_slide").innerHTML = '<img src="'+arnica_show_image('arnica_first_slide.png') +'" onclick="arnica_first_slide();" name="fs"  title="first slide" >';
-   document.getElementById("arnica_last_slide").innerHTML = '<img src="'+arnica_show_image('arnica_last_slide.png')+'" onclick="arnica_last_slide();" name="fs"  title="last slide" >';
+   document.getElementById("arnica_first_slide").innerHTML = '<a class="first_slide" onclick="arnica_first_slide();" name="fs"  title="first slide" >';
+   document.getElementById("arnica_last_slide").innerHTML = '<a class="last_slide" onclick="arnica_last_slide();" name="fs"  title="last slide" >';
 }
 
 function arnica_rotate() {
@@ -202,8 +198,8 @@
       document.images.show.src = theImages[current].src;
       document.slideform.slide.selectedIndex = current;
       arnica_add_comments();
-      document.getElementById("arnica_first_slide").innerHTML = '<img src="'+arnica_show_image('arnica_first_slide.png')+'" onclick="arnica_first_slide();" name="fs"  title="first slide" >';
-      document.getElementById("arnica_last_slide").innerHTML = '<img src="'+arnica_show_image('arnica_last_slide.png')+'" onclick="arnica_last_slide();" name="fs"  title="last slide" >';
+      document.getElementById("arnica_first_slide").innerHTML = '<a class="first_slide" onclick="arnica_first_slide();" name="fs"  title="first slide" >';
+      document.getElementById("arnica_last_slide").innerHTML = '<a class="last_slide" onclick="arnica_last_slide();" name="fs"  title="last slide" >';
       rotate_delay = document.slideform.duration.value * 1000.;
       window.setTimeout("arnica_rotate()", rotate_delay);
    }
@@ -254,13 +250,13 @@
 </form>
 </div>
 <div class="navigation_button">
-<span id="arnica_first_slide"><img src="%(server)s%(htdocs)s/common/arnica/arnica_first_slide.png" onclick="arnica_first_slide();" name="fs"  title="first slide" ></SPAN>
-<img src="%(server)s%(htdocs)s/common/arnica/arnica_previous.png" onclick="arnica_previous_slide();"  title="previous slide" >
-<img src="%(server)s%(htdocs)s/common/arnica/arnica_next.png" onClick="arnica_next_slide();"  title="next slide" >
-<span id="arnica_last_slide"><img src="%(server)s%(htdocs)s/common/arnica/arnica_last_slide.png" onClick="arnica_last_slide();"  title="last slide" ></SPAN>
+<span id="arnica_first_slide"><a class="first_slide" onclick="arnica_first_slide();" name="fs"  title="first slide" ></a></span>
+<a class="previous_slide" onclick="arnica_previous_slide();"  title="previous slide"></a>
+<a class="next_slide" onClick="arnica_next_slide();"  title="next slide"></a>
+<span id="arnica_last_slide"><a class="last_slide" onClick="arnica_last_slide();" title="last slide" ></a></span>
 </div>
 <div class="image">
-<img src="%(server)s%(this_image)s" class="arnica_slide" name="show">
+<img src="%(server)s%(this_image)s" name="show">
 </div>
 <div class="image_description">
 <span id="arnica_alias_text">%(this_alias_text)s</span>,
--- a/htdocs/modern/css/arnica_slides.css	Fri Jun 27 12:26:44 2008 +0200
+++ b/htdocs/modern/css/arnica_slides.css	Fri Jun 27 16:42:12 2008 +0200
@@ -6,7 +6,18 @@
 */
 
 html { height: 100%; background: #fff; }
+
 body { min-height: 100%; position: relative; }
+
+a.first_slide:before {content: url(../../common/arnica/arnica_first_slide.png); margin: 0 0.1em;}
+a.first_slide_disabled:before {content: url(../../common/arnica/arnica_first_slide_disabled.png); margin: 0 0.1em;}
+
+a.previous_slide:before {content: url(../../common/arnica/arnica_previous_slide.png); margin: 0 0.1em;}
+a.next_slide:before {content: url(../../common/arnica/arnica_next_slide.png); margin: 0 0.1em;}
+a.last_slide:before {content: url(../../common/arnica/arnica_last_slide.png); margin: 0 0.1em;}
+a.last_slide_disabled:before {content: url(../../common/arnica/arnica_last_slide_disabled.png); margin: 0 0.1em;}
+
+
 div.arnica {
     position: relative;
     display: inline-block;