Changeset 9140
- Timestamp:
- 10/13/2008 11:09:15 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/widgets.php
r9053 r9140 306 306 <?php if ( $control ) : ?> 307 307 308 <a class="widget-action widget-control-save hide-if-no-js edit alignleft" href="#save:<?php echo $id_format; ?>"><?php _e(' Change'); ?></a>308 <a class="widget-action widget-control-save hide-if-no-js edit alignleft" href="#save:<?php echo $id_format; ?>"><?php _e('Done'); ?></a> 309 309 310 310 <?php endif; ?> -
trunk/wp-admin/js/widgets.js
r7881 r9140 1 1 jQuery(function($) { 2 2 $('.noscript-action').remove(); 3 4 var reminded = false; 5 var lameWidgetReminder = function() { 6 if ( reminded ) 7 return; 8 window.onbeforeunload = function () { return widgetsL10n.lamerReminder }; 9 $('div.wrap:first').prepend( '<div class="updated" style="display:none"><p>' + widgetsL10n.lameReminder + '</p></div>' ).children( ':first' ).slideDown(); 10 $('#current-widgets .submit input[name=save-widgets]').css( 'background-color', '#ffffe0' ).click( function() { 11 window.onbeforeunload = null; 12 } ); 13 reminded = true; 14 }; 3 15 4 16 var increment = 1; … … 85 97 $('#widget-count').text( n.toString() ) 86 98 99 lameWidgetReminder(); 87 100 return false; 88 101 }; … … 97 110 // onclick for save links 98 111 $('a.widget-control-save', context).click( function() { 112 lameWidgetReminder(); 99 113 toggleWidget( $(this).parents('li:first'), false ).blur() 100 114 return false; -
trunk/wp-includes/script-loader.php
r9114 r9140 223 223 'confirmText' => __("Are you sure you want to delete the file '%title%'?\nClick ok to delete or cancel to go back.") 224 224 ) ); 225 $scripts->add( 'admin-widgets', '/wp-admin/js/widgets.js', array( 'interface' ), '2008 0503' );225 $scripts->add( 'admin-widgets', '/wp-admin/js/widgets.js', array( 'interface' ), '20081010' ); 226 226 $scripts->localize( 'admin-widgets', 'widgetsL10n', array( 227 227 'add' => __('Add'), 228 228 'edit' => __('Edit'), 229 229 'cancel' => __('Cancel'), 230 'lameReminder' => __('Remember to click the "Save Changes" button at the bottom of the Current Widgets column after you\'re all done!'), 231 'lamerReminder' => __("You're about to leave without having saved your changes!") 230 232 )); 231 233
Note: See TracChangeset
for help on using the changeset viewer.