wp/wp-includes/js/wp-lists.js
changeset 5 5e2f62d02dcd
parent 0 d970ebf37754
child 7 cf61fcea0001
equal deleted inserted replaced
4:346c88efed21 5:5e2f62d02dcd
       
     1 /* global ajaxurl, wpAjax */
     1 (function($) {
     2 (function($) {
     2 var fs = {add:'ajaxAdd',del:'ajaxDel',dim:'ajaxDim',process:'process',recolor:'recolor'}, wpList;
     3 var fs = {add:'ajaxAdd',del:'ajaxDel',dim:'ajaxDim',process:'process',recolor:'recolor'}, wpList;
     3 
     4 
     4 wpList = {
     5 wpList = {
     5 	settings: {
     6 	settings: {
   306 
   307 
   307 		return color || '#ffffff';
   308 		return color || '#ffffff';
   308 	},
   309 	},
   309 
   310 
   310 	add: function( e, s ) {
   311 	add: function( e, s ) {
   311 		e = $( $.trim(e) ); // Trim leading whitespaces
   312 		if ( 'string' == typeof e ) {
       
   313 			e = $( $.trim( e ) ); // Trim leading whitespaces
       
   314 		} else {
       
   315 			e = $( e );
       
   316 		}
   312 
   317 
   313 		var list = $(this), old = false, _s = { pos: 0, id: 0, oldId: null }, ba, ref, color;
   318 		var list = $(this), old = false, _s = { pos: 0, id: 0, oldId: null }, ba, ref, color;
   314 
   319 
   315 		if ( 'string' == typeof s )
   320 		if ( 'string' == typeof s )
   316 			s = { what: s };
   321 			s = { what: s };