Changeset 476472
- Timestamp:
- 12/16/2011 06:02:01 PM (14 years ago)
- Location:
- featured-posts-scroll/branches/varsize
- Files:
-
- 3 edited
-
featured-posts-scroll.php (modified) (2 diffs)
-
js/featuredpostslides.js.php (modified) (13 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
featured-posts-scroll/branches/varsize/featured-posts-scroll.php
r473938 r476472 252 252 $post_heading_text = get_option('fps_heading_text'); 253 253 254 $post_autoscroll = get_option('fps_autoscroll');255 256 254 $post_arrow_position = get_option('fps_arrow_position'); 257 255 258 256 $fps_image_full_size = get_option('fps_image_full_size'); 259 260 261 257 262 258 $wrapper_classes .= "featured-posts-wrapper fps-single"; … … 264 260 $bg_classes .= "featured-posts-background fps-single"; 265 261 $li_classes = ""; 266 267 // Check if auto scrolling is enabled268 if ($post_autoscroll == '1')269 {270 $wrapper_classes .= " fps-autoscroll";271 }272 262 273 263 // Generate the main output. -
featured-posts-scroll/branches/varsize/js/featuredpostslides.js.php
r473938 r476472 6 6 7 7 <?php 8 $post_autoscroll = get_option('fps_autoscroll'); 8 9 $post_scroll_speed = get_option('fps_scroll_speed'); 9 10 $post_scroll_fadeInSpeed = get_option('fps_scroll_fadeInSpeed'); … … 17 18 18 19 (function($j) { 19 var type = 'none'; // Type of slider present (v1.0 only supports 'single')20 var fp g_animLocked = new Array(); // Lock object for animations20 var type = 'none'; 21 var fps_animLocked = new Array(); // Lock object for animations 21 22 var autoscrollInterval = new Array(); 22 23 … … 44 45 45 46 // release animation locks 46 for (var i=1; i<=fp g_animLocked.length; i++)47 { 48 fp g_animLocked[i-1] = false;47 for (var i=1; i<=fps_animLocked.length; i++) 48 { 49 fps_animLocked[i-1] = false; 49 50 } 50 51 }; … … 58 59 $j('.scrollFeaturedPostsRight').each(function(index) { 59 60 $j(this).click(function() { 60 if (fp g_animLocked[index] == false)61 if (fps_animLocked[index] == false) 61 62 { 62 63 FeaturedPostsLib.fps.scrollFeaturedPosts(this, 'right', index); … … 68 69 $j('.scrollFeaturedPostsLeft').each(function(index) { 69 70 $j(this).click(function() { 70 if (fp g_animLocked[index] == false)71 if (fps_animLocked[index] == false) 71 72 { 72 73 FeaturedPostsLib.fps.scrollFeaturedPosts(this, 'left', index); … … 78 79 $j('.scrollFeaturedPostsRight-below').each(function(index) { 79 80 $j(this).click(function() { 80 if (fp g_animLocked[index] == false)81 if (fps_animLocked[index] == false) 81 82 { 82 83 FeaturedPostsLib.fps.scrollFeaturedPosts(this, 'right', index); … … 88 89 $j('.scrollFeaturedPostsLeft-below').each(function(index) { 89 90 $j(this).click(function() { 90 if (fp g_animLocked[index] == false)91 if (fps_animLocked[index] == false) 91 92 { 92 93 FeaturedPostsLib.fps.scrollFeaturedPosts(this, 'left', index); … … 111 112 $j('ul.fps-slideNumberList').each(function(index) { 112 113 $j(this).children('li').click(function() { 113 if (fp g_animLocked[index] == false)114 if (fps_animLocked[index] == false) 114 115 { 115 116 scrollToPost(this, index); … … 124 125 function initAutoscroll() 125 126 { 126 if (type != 'none' )127 if (type != 'none' && 1 == <?php echo $post_autoscroll ?>) 127 128 { 128 129 $j('.featured-posts-wrapper').each(function(index) { 129 fpg_animLocked[index] = true; 130 if ($j(this).hasClass('fps-autoscroll')) 131 { 132 if ($j('.featured-posts-wrapper').slice(index,index+1).children('.scrollFeaturedPostsRight').length > 0) 133 { 134 var callback = 135 "FeaturedPostsLib.fps.scrollFeaturedPosts(jQuery('.featured-posts-wrapper').slice(" + 136 index + "," + (index + 1) + ").children('.scrollFeaturedPostsRight'), 'right', " + index + ")"; 137 autoscrollInterval[index] = setInterval( 138 callback, <?php echo $post_scroll_interval ?>); 139 } 140 else 141 { 142 var callback = 143 "FeaturedPostsLib.fps.scrollFeaturedPosts(jQuery('.featured-posts-wrapper').slice(" + 144 index + "," + (index + 1) + ").children('.scrollFeaturedPostsRight-below'), 'right', " + index + ")"; 145 autoscrollInterval[index] = setInterval( 146 callback, <?php echo $post_scroll_interval ?>); 147 } 130 fps_animLocked[index] = true; 131 132 if ($j('.featured-posts-wrapper').slice(index,index+1).children('.scrollFeaturedPostsRight').length > 0) 133 { 134 var callback = 135 "FeaturedPostsLib.fps.scrollFeaturedPosts(jQuery('.featured-posts-wrapper').slice(" + 136 index + "," + (index + 1) + ").children('.scrollFeaturedPostsRight'), 'right', " + index + ")"; 137 autoscrollInterval[index] = setInterval( 138 callback, <?php echo $post_scroll_interval ?>); 139 } 140 else 141 { 142 var callback = 143 "FeaturedPostsLib.fps.scrollFeaturedPosts(jQuery('.featured-posts-wrapper').slice(" + 144 index + "," + (index + 1) + ").children('.scrollFeaturedPostsRight-below'), 'right', " + index + ")"; 145 autoscrollInterval[index] = setInterval( 146 callback, <?php echo $post_scroll_interval ?>); 148 147 } 149 148 }); … … 157 156 { 158 157 // lock animations 159 fp g_animLocked[index] = true;158 fps_animLocked[index] = true; 160 159 161 160 var currentItem = $j(slideButton).parent().siblings('ul.featured-posts').children('li:visible'); … … 174 173 FeaturedPostsLib.fps.scrollFeaturedPosts = function(button, dir, index) 175 174 { 176 if (fp g_animLocked[index] != true)175 if (fps_animLocked[index] != true) 177 176 { 178 177 // lock animations 179 fp g_animLocked[index] = true;178 fps_animLocked[index] = true; 180 179 181 180 // get the currently displayed element(s) … … 184 183 var nextItem; 185 184 186 if (type == 'single') 187 { 188 if (dir == 'right') 189 { 190 nextItem = currentItem.next(); 191 192 if (nextItem.length == 0) 193 { 194 nextItem = currentItem.siblings().first(); 195 } 196 } 197 else if (dir == 'left') 198 { 199 nextItem = currentItem.prev(); 200 201 if (nextItem.length == 0) 202 { 203 nextItem = currentItem.siblings().last(); 204 } 185 if (dir == 'right') 186 { 187 nextItem = currentItem.next(); 188 189 if (nextItem.length == 0) 190 { 191 nextItem = currentItem.siblings().first(); 192 } 193 } 194 else if (dir == 'left') 195 { 196 nextItem = currentItem.prev(); 197 198 if (nextItem.length == 0) 199 { 200 nextItem = currentItem.siblings().last(); 205 201 } 206 202 } … … 253 249 toHide.css('float',''); 254 250 $j(toShow).find('.fps-text').fadeIn(<?php echo $post_scroll_fadeInSpeed ?>, function() { 255 fp g_animLocked[index] = false;251 fps_animLocked[index] = false; 256 252 }); 257 253 }); -
featured-posts-scroll/branches/varsize/readme.txt
r475101 r476472 87 87 88 88 1. Admin Screen 89 2. Appearance Customization 90 3. New Features: Slide Numbers, Alternate Arrow Position, Custom Sizing 91 4. New in Release 1.13: Borderless Arrow Position, Drop Shadow Spread Parameter 89 2. New Features: Slide Numbers, Alternate Arrow Position, Custom Sizing 90 3. New in Release 1.13: Borderless Arrow Position, Drop Shadow Spread Parameter 92 91 93 92 == Changelog == … … 181 180 = 1.23 = 182 181 * Reorganized/renamed some CSS and JS files. Removed files that are no longer used. 183 * Code refactoring and cleanup: activate/deactivate functions, admin page. 182 * Code refactoring and cleanup: activate/deactivate functions, admin page 183 * Removed dead code from JS file.
Note: See TracChangeset
for help on using the changeset viewer.