MINOR: refactoring from JSLint

This commit is contained in:
Julian Seidenberg 2012-08-07 18:37:10 +12:00
parent 4854be9eea
commit 051ec353ab

View File

@ -39,7 +39,7 @@
//we have page with DMSDocuments on it, and we have documents that only exist on this page //we have page with DMSDocuments on it, and we have documents that only exist on this page
if (deleteButtons.length > 0) { if (deleteButtons.length > 0) {
var message = "Are you sure you want to delete this page? Deleting this page will delete "+deleteButtons.length; 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"; message += " document that is associated only with this page. This document is:\n\n";
} else { } else {
message += " documents that are associated only with this page. These documents are:\n\n"; message += " documents that are associated only with this page. These documents are:\n\n";
@ -58,19 +58,28 @@
return true; return true;
} }
}) });
$('#Form_EditForm_action_deletefromlive').entwine({ $('#Form_EditForm_action_deletefromlive').entwine({
onclick: function(e) { onclick: function(e) {
if (this.confirmBeforeDelete()) this._super(e); if (this.confirmBeforeDelete()) {
else return false; this._super(e);
} else {
return false;
}
} }
}); });
$('#Form_EditForm_action_delete').entwine({ $('#Form_EditForm_action_delete').entwine({
onclick: function(e) { onclick: function(e) {
if (this.confirmBeforeDelete()) this._super(e); if (this.confirmBeforeDelete()) {
else return false; this._super(e);
} else {
return false;
}
}
});
} }
}); });