Changeset 168823
- Timestamp:
- 10/30/2009 07:46:35 PM (16 years ago)
- Location:
- fidgetr/trunk
- Files:
-
- 3 edited
-
fidgetr.php (modified) (3 diffs)
-
fidgetr_ajax.js (modified) (4 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
fidgetr/trunk/fidgetr.php
r168138 r168823 4 4 Plugin URI: http://langui.sh/fidgetr 5 5 Description: A themeable Flickr widget (multi-widget supported) that can fetch pictures and comments and style them in a myriad of attractive ways. 6 Version: 2. 06 Version: 2.1 7 7 Author: Paul Kehrer 8 8 Author URI: http://langui.sh/ … … 15 15 require_once("flickrApi.class.php"); 16 16 17 define('FIDGETR_VERSION','2. 0');17 define('FIDGETR_VERSION','2.1'); 18 18 19 19 if (!defined('WP_CONTENT_URL')) { … … 457 457 } 458 458 459 add_action('widgets_init','fidgetr_register' ,1);459 add_action('widgets_init','fidgetr_register'); 460 460 461 461 //pretty safe to assume we would like jquery available for use within all themes -
fidgetr/trunk/fidgetr_ajax.js
r168138 r168823 3 3 var spinner; 4 4 var return_element; 5 var photoset_select; 5 6 jQuery(document).ready(function() { 6 7 jQuery('.fidgetr_username').keyup(function() { … … 10 11 } 11 12 username_fidgetr = jQuery(this).val(); 12 spinner = jQuery(this).parent().parent().find('.fidgetr_loading'); 13 return_element = jQuery(this).parent().parent().parent().find('.fidgetr_return'); 14 fidgetrTimeoutId = setTimeout('queryFlickr(username_fidgetr)',800); 13 spinner = jQuery(this).closest('div.widget').find('img.ajax-feedback'); 14 return_element = jQuery(this).closest('div').find('.fidgetr_return'); 15 photoset_select = jQuery(this).closest('div').find('.fidgetr_photoset'); 16 fidgetrTimeoutId = setTimeout('nsidQuery(username_fidgetr)',800); 15 17 } 16 18 }); 17 19 }); 18 20 19 function queryFlickr(value) {20 spinner. show();21 function nsidQuery(value) { 22 spinner.css('visibility','visible'); 21 23 jQuery.post("admin-ajax.php", { 22 24 action: 'fidgetr_user_check_ajax', … … 28 30 //ability to comprehend. let's strip it off. 29 31 var truncated_response = response.substring(0, response.length - 1); 32 if(truncated_response.match('green') != null) { //valid response is shown as green. this is not a great hack... 33 photosetQuery(); 34 } 30 35 return_element.fadeOut(); 31 36 setTimeout('finishAjax(\''+escape(truncated_response) + '\')', 400); … … 34 39 35 40 function finishAjax(response) { 36 spinner. hide();41 spinner.css('visibility','hidden'); 37 42 return_element.html(unescape(response)); 38 43 return_element.fadeIn(); 39 44 } 45 46 function photosetQuery() { 47 jQuery.post("admin-ajax.php", { 48 action: 'fidgetr_photoset_fetch_ajax', 49 cookie: encodeURIComponent(document.cookie), 50 username: username_fidgetr 51 }, 52 function(response) { 53 //wp returns a 0 after all ajax calls for reasons that are beyond my 54 //ability to comprehend. let's strip it off. 55 var truncated_response = response.substring(0, response.length - 1); 56 photoset_select.html(truncated_response); 57 }); 58 } -
fidgetr/trunk/readme.txt
r168138 r168823 4 4 Tags: flickr, photos, widgets, sidebar, photography, pictures, photo, widget, picture 5 5 Requires at least: 2.8 6 Tested up to: 2. 8.56 Tested up to: 2.9 7 7 Stable tag: 2.0 8 8 … … 16 16 17 17 == Changelog == 18 19 = 2.1 = 20 * Changing user updates available photosets via AJAX in the widget admin. 21 * Refactored some functions. 22 * Tested with WP 2.9. 18 23 19 24 = 2.0 =
Note: See TracChangeset
for help on using the changeset viewer.