mirror of
https://github.com/silverstripe/silverstripe-dms
synced 2024-10-22 14:05:56 +02:00
MINOR: refactoring from JSLint
This commit is contained in:
parent
4854be9eea
commit
051ec353ab
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user