From 8bf45c52e27957460796744e0d8507e5b7d250c0 Mon Sep 17 00:00:00 2001 From: Hayden Smith Date: Tue, 12 Aug 2008 23:53:08 +0000 Subject: [PATCH] Merged [47102]: Optimization for Behaviour sheets that allows you to provide a unique identifier so that duplicate sheets aren't applied twice. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@60556 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- javascript/GenericDataAdmin_left.js | 6 +++--- javascript/MemberTableField_popup.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/javascript/GenericDataAdmin_left.js b/javascript/GenericDataAdmin_left.js index c5f4b974..268c5858 100755 --- a/javascript/GenericDataAdmin_left.js +++ b/javascript/GenericDataAdmin_left.js @@ -8,7 +8,7 @@ LeftPane.prototype = { effectDuration: .7, initialize: function() { - Behaviour.register({ + Behaviour.register('LeftPane',{ '#Form_CreationForm_action_createRecord': { onclick: this.addNewRecord.bind(this) }, @@ -49,7 +49,7 @@ LeftPane.prototype = { var toggleLinks = document.getElementsBySelector('div#LeftPane .ToggleAdvancedSearchFields'); if(toggleLinks && toggleLinks[0]) toggleLinks[0].style.display = "block"; - Behaviour.register({ + Behaviour.register('LeftPane_initAdvancedSearch',{ "div#LeftPane .ToggleAdvancedSearchFields a":{ onclick: function(e){ var el = Event.element(e); @@ -153,7 +153,7 @@ ResultTable = Class.create(); ResultTable.applyTo('#ResultTable_holder'); ResultTable.prototype = { initialize: function() { - Behaviour.register({ + Behaviour.register('ResultTable',{ "#LeftPane a.show":{ onclick: function(e){ var openTab = $('Form_EditForm').getCurrentTab(); diff --git a/javascript/MemberTableField_popup.js b/javascript/MemberTableField_popup.js index fa0ecfbd..80e242a8 100755 --- a/javascript/MemberTableField_popup.js +++ b/javascript/MemberTableField_popup.js @@ -3,7 +3,7 @@ MemberTableFieldPopupForm.prototype = { initialize: function() { this.ComplexTableFieldPopupForm.initialize(); - Behaviour.register({ + Behaviour.register('MemberTableFieldPopupForm',{ "div.MemberTableField_Popup .Actions input.action": { onclick: this.submitForm.bind(this) }