From 2170835aeb580d8489c96e070ad037410f2ddb57 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 12 Dec 2011 18:35:25 +0100 Subject: [PATCH] BUGFIX Using faster entwine selectors (class/attr rather than CSS3 pseudo selectors) --- admin/javascript/LeftAndMain.EditForm.js | 2 +- admin/javascript/LeftAndMain.Tree.js | 2 +- admin/javascript/LeftAndMain.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/javascript/LeftAndMain.EditForm.js b/admin/javascript/LeftAndMain.EditForm.js index b6eb2009b..3e21e6840 100644 --- a/admin/javascript/LeftAndMain.EditForm.js +++ b/admin/javascript/LeftAndMain.EditForm.js @@ -175,7 +175,7 @@ * We need this onclick overloading because we can't get to the * clicked button from a form.onsubmit event. */ - $('.cms-edit-form .Actions :submit').entwine({ + $('.cms-edit-form .Actions input, .cms-edit-form .Actions button').entwine({ /** * Function: onclick diff --git a/admin/javascript/LeftAndMain.Tree.js b/admin/javascript/LeftAndMain.Tree.js index f99102cb3..62f0b244b 100644 --- a/admin/javascript/LeftAndMain.Tree.js +++ b/admin/javascript/LeftAndMain.Tree.js @@ -303,7 +303,7 @@ } }); - $('.cms-tree-view-modes :input[name=view-mode]').entwine({ + $('.cms-tree-view-modes input.view-mode').entwine({ onmatch: function() { // set active by default this.trigger('click'); diff --git a/admin/javascript/LeftAndMain.js b/admin/javascript/LeftAndMain.js index 0ed468d88..53898ee70 100644 --- a/admin/javascript/LeftAndMain.js +++ b/admin/javascript/LeftAndMain.js @@ -180,7 +180,7 @@ * Also sets the clicked button on a form submission, making it available through * a new 'clickedButton' property on the form DOM element. */ - $('.cms-container :submit, .cms-container button, .cms-container :reset').entwine({ + $('.cms-container input[type="submit"], .cms-container button, .cms-container input[type="reset"]').entwine({ onmatch: function() { // TODO Adding classes in onmatch confuses entwine var self = this;