Changeset 577263
- Timestamp:
- 07/25/2012 04:46:45 PM (14 years ago)
- Location:
- ds-gallery/trunk
- Files:
-
- 4 edited
-
ds-gallery-admin.php (modified) (3 diffs)
-
ds-gallery.php (modified) (3 diffs)
-
js/script.js (modified) (2 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ds-gallery/trunk/ds-gallery-admin.php
r576781 r577263 38 38 update_option('dsGalIncludejQuery',$dsGalIncludejQuery); 39 39 40 $dsGalArrowKeys = $_POST['dsGalArrowKeys']; 41 update_option('dsGalArrowKeys',$dsGalArrowKeys); 42 43 $dsGalImgClick = $_POST['dsGalImgClick']; 44 update_option('dsGalImgClick',$dsGalImgClick); 45 40 46 ?> 41 47 <div class="updated"><p><strong><?php _e('Options saved.' ); ?></strong></p></div> … … 55 61 $dsGalArrowTouch = get_option('dsGalArrowTouch'); 56 62 $dsGalIncludejQuery = get_option('dsGalIncludejQuery'); 63 $dsGalArrowKeys = get_option('dsGalArrowKeys'); 64 $dsGalImgClick = get_option('dsGalImgClick'); 57 65 } 58 66 … … 81 89 <p><?php _e("Gallery height: " ); ?><input type="text" name="dsgal_height" value="<?php echo $dsgal_height; ?>" size="5"><?php _e(" ex: 350px, defaults to 450px" ); ?></p> 82 90 <p><?php _e("Include jQuery?"); ?> <input type="checkbox" name="dsGalIncludejQuery" value="Yes"<?php if($dsGalIncludejQuery=="Yes"){ print " checked"; }?>> (Select this if you're not already loading jQuery up in your theme)</p> 91 <p><?php _e("Use arrowkeys to navigate images?"); ?> <input type="checkbox" name="dsGalArrowKeys" value="Yes"<?php if($dsGalArrowKeys=="Yes"){ print " checked"; }?>> (Left and Right arrow keys will do the same as prev and next arrows)</p> 92 <p><?php _e("Advance to the next slide when the slideshow image is clicked?"); ?> <input type="checkbox" name="dsGalImgClick" value="Yes"<?php if($dsGalImgClick=="Yes"){ print " checked"; }?>></p> 83 93 <hr style="background-color:#bcbcbc;border:none;height:5px;overflow:hidden;margin:25px 0;" /> 84 94 <h3>Advanced Settings</h3> -
ds-gallery/trunk/ds-gallery.php
r576781 r577263 32 32 global $post; 33 33 // Gather plugin options 34 $extraClass = ""; 34 35 $showthumbs = get_option('dsgal_showthumbs'); 35 36 $transition = get_option('dsgal_transition'); … … 44 45 $dsGalArrowTouch = get_option('dsGalArrowTouch'); 45 46 $dsGalIncludejQuery = get_option('dsGalIncludejQuery'); 47 $dsGalArrowKeys = get_option('dsGalArrowKeys'); if($dsGalArrowKeys == "Yes"){ $extraClass .= " arrowKeysOn"; } 48 $dsGalImgClick = get_option('dsGalImgClick'); if($dsGalImgClick == "Yes"){ $extraClass .= " imgClickOn"; } 46 49 if($smSize == ""){ $smSize = "thumbnail"; } 47 50 … … 50 53 $attachments = get_posts($args); 51 54 if ($attachments && count($attachments)>1) { 52 echo "<div class=\"ds-gallery-full clearfix ds-gal-".$transition." touch-arrows-" . $dsGalArrowTouch . "\" style=\"";55 echo "<div class=\"ds-gallery-full clearfix ds-gal-".$transition." touch-arrows-" . $dsGalArrowTouch . $extraClass . "\" style=\""; 53 56 if($dsgal_width != ""){ print "width:".$dsgal_width."; "; } 54 57 if($dsgal_height != ""){ print "height:".$dsgal_height."; "; } -
ds-gallery/trunk/js/script.js
r576781 r577263 39 39 dsGal.doImgChange(); 40 40 }) 41 if($(".ds-gallery-full").hasClass("arrowKeysOn")){ 42 $(document).keydown(function(e){ 43 if (e.keyCode == 37) { 44 dsGal.moveLeft(); 45 dsGal.doImgChange(); 46 return false; 47 } 48 if (e.keyCode == 39) { 49 dsGal.moveRight(); 50 dsGal.doImgChange(); 51 return false; 52 } 53 }); 54 } 55 if($(".ds-gallery-full").hasClass("imgClickOn")){ 56 $(".ds-gallery-large img, .overImgLayer").live("click",function(){ 57 dsGal.moveRight(); 58 dsGal.doImgChange(); 59 }) 60 } 41 61 dsGal.dsLoadImages(); 42 62 dsGal.initEvents(); … … 102 122 dsGal.dsGalCurrentImg--; 103 123 if(dsGal.dsGalCurrentImg < 1){ dsGal.dsGalCurrentImg = dsGal.dsGalTotalImg; } 124 dsGal.setNewActive(dsGal.dsGalCurrentImg); 104 125 }, 105 126 moveRight:function(){ 106 127 dsGal.dsGalCurrentImg++; 107 128 if(dsGal.dsGalCurrentImg > dsGal.dsGalTotalImg){ dsGal.dsGalCurrentImg = 1; } 129 dsGal.setNewActive(dsGal.dsGalCurrentImg); 108 130 }, 109 131 goBack: function(){ -
ds-gallery/trunk/readme.txt
r576784 r577263 44 44 45 45 == Changelog == 46 = 0.2 = 47 Added arrow key navigation, clicking images to advance. New admin options for each 48 46 49 = 0.1 = 47 50 Initial Commit
Note: See TracChangeset
for help on using the changeset viewer.