updates for page management, and replacing empty options with Constant empty options for pageData in EditConfigurationTemplateModel in populateDropdowns and also logging error if name in pageData already in use for that field name
This commit is contained in:
parent
a3fec6ed18
commit
7e2a5d22d4
14 changed files with 403 additions and 50 deletions
49
webapp/web/js/pageDeletion.js
Normal file
49
webapp/web/js/pageDeletion.js
Normal file
|
@ -0,0 +1,49 @@
|
|||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||
|
||||
var pageDeletion = {
|
||||
// on initial page setup
|
||||
onLoad:function(){
|
||||
if (this.disableFormInUnsupportedBrowsers()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.initObjects();
|
||||
this.bindEventListeners();
|
||||
},
|
||||
initObjects:function() {
|
||||
this.deleteLinks = $("a[cmd='deletePage']");
|
||||
},
|
||||
bindEventListeners:function() {
|
||||
this.deleteLinks.click(function(event) {
|
||||
var href=$(this).attr("href");
|
||||
var pageTitle = $(this).attr("pageTitle");
|
||||
var confirmResult = confirm("Are you sure you wish to delete this page: " + pageTitle + "?");
|
||||
if(confirmResult) {
|
||||
//Continue with the link
|
||||
return true;
|
||||
} else {
|
||||
event.preventDefault();
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
disableFormInUnsupportedBrowsers: function() {
|
||||
var disableWrapper = $('#ie67DisableWrapper');
|
||||
|
||||
// Check for unsupported browsers only if the element exists on the page
|
||||
if (disableWrapper.length) {
|
||||
if (vitro.browserUtils.isIELessThan8()) {
|
||||
disableWrapper.show();
|
||||
$('.noIE67').hide();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
pageDeletion.onLoad();
|
||||
});
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue