BUGFIX Fixed ClassName change detection in javascript

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92775 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-21 03:17:54 +00:00
parent 4decff9907
commit df46717bf0
2 changed files with 11 additions and 16 deletions

View File

@ -1,20 +1,13 @@
(function($) {
/**
* @class CMS-specific form behaviour
* @name ss.EditForm
* Alert the user on change of page-type - this might have implications
* on the available form fields etc.
* @name ss.EditFormClassName
*/
$('.CMSMain #Form_EditForm').concrete('ss', function($){
return/** @lends ss.EditForm */{
onmatch: function() {
// Alert the user on change of page-type - this might have implications
// on the available form fields etc.
this.find(':input[name=ClassName]').bind('change',
function() {
alert('The page type will be updated after the page is saved');
}
);
this._super();
$('#Form_EditForm :input[name=ClassName]').concrete('ss', function($){
return/** @lends ss.EditFormClassName */{
onchange: function() {
alert(ss.i18n._t('CMSMAIN.ALERTCLASSNAME'));
}
};
});
@ -28,7 +21,7 @@
FilterRegex: /[^A-Za-z0-9-]+/,
ValidationMessage: 'URLs can only be made up of letters, digits and hyphens.',
ValidationMessage: ss.i18n._t('CMSMAIN.URLSEGMENTVALIDATION'),
MaxLength: 50,

View File

@ -25,6 +25,8 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
'ModelAdmin.VALIDATIONERROR': "Validation Error",
'LeftAndMain.PAGEWASDELETED': "This page was deleted. To edit a page, select it from the left.",
'LeftAndMain.CONFIRMUNSAVED': "Are you sure you want to navigate away from this page?\n\nWARNING: Your changes have not been saved.\n\nPress OK to continue, or Cancel to stay on the current page.",
'LeftAndMain.CONFIRMUNSAVEDSHORT': "WARNING: Your changes have not been saved."
'LeftAndMain.CONFIRMUNSAVEDSHORT': "WARNING: Your changes have not been saved.",
'CMSMAIN.ALERTCLASSNAME': 'The page type will be updated after the page is saved',
'CMSMAIN.URLSEGMENTVALIDATION': 'URLs can only be made up of letters, digits and hyphens.'
});
}