Skip to content
This repository
Browse code

BUGFIX: Buttons in the cms that didnt have .ss-ui-button werent becom…

…ing buttons because we changed buttons to trigger on onadd, but the ss-ui-button class was being added dynamically
  • Loading branch information...
commit acee026875351122f6fc8fc686fd43e7bf52871e 1 parent 8ae4597
Hamish Friedlander authored June 15, 2012 chillu committed June 15, 2012

Showing 1 changed file with 3 additions and 18 deletions. Show diff stats Hide diff stats

  1. 21  admin/javascript/LeftAndMain.js
21  admin/javascript/LeftAndMain.js
@@ -444,26 +444,11 @@ jQuery.noConflict();
444 444
 			}
445 445
 		});
446 446
 
447  
-		/**
448  
-		 * Make all buttons "hoverable" with jQuery theming.
449  
-		 * Also sets the clicked button on a form submission, making it available through
450  
-		 * a new 'clickedButton' property on the form DOM element.
451  
-		 */
452  
-		$('.cms input[type="submit"], .cms button, .cms input[type="reset"]').entwine({
453  
-			onmatch: function() {
454  
-				if(!this.hasClass('ss-ui-button')) this.addClass('ss-ui-button');
455  
-				
456  
-				this._super();
457  
-			},
458  
-			onunmatch: function() {
459  
-				this._super();
460  
-			}
461  
-		});
462  
-
463  
-		$('.cms .ss-ui-button').entwine({
  447
+		/** Make all buttons "hoverable" with jQuery theming. */
  448
+		$('.cms input[type="submit"], .cms button, .cms input[type="reset"], .cms .ss-ui-button').entwine({
464 449
 			onadd: function() {
  450
+				this.addClass('ss-ui-button');
465 451
 				if(!this.data('button')) this.button();
466  
-
467 452
 				this._super();
468 453
 			},
469 454
 			onremove: function() {

0 notes on commit acee026

Please sign in to comment.
Something went wrong with that request. Please try again.