mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
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:
parent
4decff9907
commit
df46717bf0
@ -1,20 +1,13 @@
|
|||||||
(function($) {
|
(function($) {
|
||||||
/**
|
/**
|
||||||
* @class CMS-specific form behaviour
|
* Alert the user on change of page-type - this might have implications
|
||||||
* @name ss.EditForm
|
* on the available form fields etc.
|
||||||
|
* @name ss.EditFormClassName
|
||||||
*/
|
*/
|
||||||
$('.CMSMain #Form_EditForm').concrete('ss', function($){
|
$('#Form_EditForm :input[name=ClassName]').concrete('ss', function($){
|
||||||
return/** @lends ss.EditForm */{
|
return/** @lends ss.EditFormClassName */{
|
||||||
onmatch: function() {
|
onchange: function() {
|
||||||
// Alert the user on change of page-type - this might have implications
|
alert(ss.i18n._t('CMSMAIN.ALERTCLASSNAME'));
|
||||||
// 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();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
@ -28,7 +21,7 @@
|
|||||||
|
|
||||||
FilterRegex: /[^A-Za-z0-9-]+/,
|
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,
|
MaxLength: 50,
|
||||||
|
|
||||||
|
@ -25,6 +25,8 @@ if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
|
|||||||
'ModelAdmin.VALIDATIONERROR': "Validation Error",
|
'ModelAdmin.VALIDATIONERROR': "Validation Error",
|
||||||
'LeftAndMain.PAGEWASDELETED': "This page was deleted. To edit a page, select it from the left.",
|
'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.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.'
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user