changeset 271:d38df8be9dd7

arnica_slides: tango icons for media control, replaced start/stop button by an icon too
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 14 Sep 2008 22:48:33 +0200
parents 4e0a4ce23497
children 06580f8a45fd
files data/plugin/action/arnica_slides.py htdocs/arnica/css/arnica_slides.css htdocs/arnica/img/arnica_first_slide.png htdocs/arnica/img/arnica_first_slide_disabled.png htdocs/arnica/img/arnica_last_slide.png htdocs/arnica/img/arnica_last_slide_disabled.png htdocs/arnica/img/arnica_next_slide.png htdocs/arnica/img/arnica_next_slide_disabled.png htdocs/arnica/img/arnica_pause_slide.png htdocs/arnica/img/arnica_previous_slide.png htdocs/arnica/img/arnica_stop_slide.png
diffstat 11 files changed, 20 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/arnica_slides.py	Sun Sep 14 22:46:33 2008 +0200
+++ b/data/plugin/action/arnica_slides.py	Sun Sep 14 22:48:33 2008 +0200
@@ -74,6 +74,7 @@
 var theImages = new Array();
 var preloaded_images = new Array();
 var AttachFile_action = '?action=AttachFile&do=get&target=';
+var AutoPlay = 'Stop';
 
 function load_image(index) {
     var list = document.slideform.webnail_list.value;
@@ -159,7 +160,14 @@
 }
 
 function arnica_ap(text) {
-   document.slideform.slidebutton.value = (text == "Stop") ? "Start" : "Stop";
+   if (AutoPlay == "Stop") {
+      document.getElementById("arnica_autoplay_slide").innerHTML =  '<a class="pause_slide" onclick="arnica_ap(text);" title="AutoPlay">';
+      AutoPlay = "Start";
+   } else {
+      document.getElementById("arnica_autoplay_slide").innerHTML =  '<a class="stop_slide" onclick="arnica_ap(text);" title="AutoPlay">';
+      AutoPlay = "Stop";
+   }
+
    arnica_rotate();
 }
 
@@ -173,7 +181,7 @@
 }
 
 function arnica_rotate() {
-   if (document.slideform.slidebutton.value == "Stop") {
+   if (AutoPlay == "Start") {
       current = (current == document.slideform.slide.length-1) ? 0 : current+1;
       load_image(current);
       document.images.show.src = theImages[current].src;
@@ -226,7 +234,6 @@
 <input type="hidden" name="exif_date" value="%(this_exif_date_list)s">
 <label>Slide: <select name="slide" onChange="arnica_change();" >
 %(option_webnails)s</select></label>
-<input type="button" name="slidebutton" onClick="arnica_ap(this.value);" value="Start" title="AutoPlay">
 <label>Duration (sec):<input type="text" name="duration" value="3.0" size="3"></label>
 </div>
 </form>
@@ -234,6 +241,7 @@
 <div class="navigation-button">
 <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>
+<span id="arnica_autoplay_slide"><a class="stop_slide" onclick="arnica_ap(this.value);" title="AutoPlay"></a></span>
 <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>
--- a/htdocs/arnica/css/arnica_slides.css	Sun Sep 14 22:46:33 2008 +0200
+++ b/htdocs/arnica/css/arnica_slides.css	Sun Sep 14 22:48:33 2008 +0200
@@ -9,13 +9,16 @@
 
 body { min-height: 100%; position: relative; }
 
-a.first_slide:before {content: url(../../arnica/img/arnica_first_slide.png); margin: 0 0.1em;}
-a.first_slide_disabled:before {content: url(../../arnica/img/arnica_first_slide_disabled.png); margin: 0 0.1em;}
+a.first_slide:before {content: url(../../arnica/img/arnica_first_slide.png); margin: 0 0.1em; width: 32px; height: 32px}
+a.first_slide_disabled:before {content: url(../../arnica/img/arnica_first_slide_disabled.png); margin: 0 0.1em; width: 32px; height: 32px}
+a.stop_slide:before {content: url(../../arnica/img/arnica_stop_slide.png); margin: 0 0.1em; width: 32px; height: 32px}
 
-a.previous_slide:before {content: url(../../arnica/img/arnica_previous_slide.png); margin: 0 0.1em;}
-a.next_slide:before {content: url(../../arnica/img/arnica_next_slide.png); margin: 0 0.1em;}
-a.last_slide:before {content: url(../../arnica/img/arnica_last_slide.png); margin: 0 0.1em;}
-a.last_slide_disabled:before {content: url(../../arnica/img/arnica_last_slide_disabled.png); margin: 0 0.1em;}
+
+a.previous_slide:before {content: url(../../arnica/img/arnica_previous_slide.png); margin: 0 0.1em; width: 32px; height: 32px}
+a.next_slide:before {content: url(../../arnica/img/arnica_next_slide.png); margin: 0 0.1em; width: 32px; height: 32px}
+a.pause_slide:before {content: url(../../arnica/img/arnica_pause_slide.png); margin: 0 0.1em; width: 32px; height: 32px}
+a.last_slide:before {content: url(../../arnica/img/arnica_last_slide.png); margin: 0 0.1em; width: 32px; height: 32px}
+a.last_slide_disabled:before {content: url(../../arnica/img/arnica_last_slide_disabled.png); margin: 0 0.1em; width: 32px; height: 32px}
 
 
 div.arnica-slides {
Binary file htdocs/arnica/img/arnica_first_slide.png has changed
Binary file htdocs/arnica/img/arnica_first_slide_disabled.png has changed
Binary file htdocs/arnica/img/arnica_last_slide.png has changed
Binary file htdocs/arnica/img/arnica_last_slide_disabled.png has changed
Binary file htdocs/arnica/img/arnica_next_slide.png has changed
Binary file htdocs/arnica/img/arnica_next_slide_disabled.png has changed
Binary file htdocs/arnica/img/arnica_pause_slide.png has changed
Binary file htdocs/arnica/img/arnica_previous_slide.png has changed
Binary file htdocs/arnica/img/arnica_stop_slide.png has changed