From 051ec353ab768f5408a2b006365c62b1e49b5ec7 Mon Sep 17 00:00:00 2001 From: Julian Seidenberg Date: Tue, 7 Aug 2012 18:37:10 +1200 Subject: [PATCH] MINOR: refactoring from JSLint --- javascript/DMSGridField.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/javascript/DMSGridField.js b/javascript/DMSGridField.js index 4e53c48..ec18f8b 100644 --- a/javascript/DMSGridField.js +++ b/javascript/DMSGridField.js @@ -39,7 +39,7 @@ //we have page with DMSDocuments on it, and we have documents that only exist on this page if (deleteButtons.length > 0) { var message = "Are you sure you want to delete this page? Deleting this page will delete "+deleteButtons.length; - if (deleteButtons.length == 1) { + if (deleteButtons.length === 1) { message += " document that is associated only with this page. This document is:\n\n"; } else { message += " documents that are associated only with this page. These documents are:\n\n"; @@ -58,19 +58,28 @@ return true; } - }) + }); $('#Form_EditForm_action_deletefromlive').entwine({ onclick: function(e) { - if (this.confirmBeforeDelete()) this._super(e); - else return false; + if (this.confirmBeforeDelete()) { + this._super(e); + } else { + return false; + } } }); $('#Form_EditForm_action_delete').entwine({ onclick: function(e) { - if (this.confirmBeforeDelete()) this._super(e); - else return false; + if (this.confirmBeforeDelete()) { + this._super(e); + } else { + return false; + } + } + }); + } });