ENHANCEMENT #1848 - Select the title field for new pages

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@63528 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-10-02 10:11:08 +00:00
parent 1c9c600e68
commit 743dce78b7

View File

@ -136,6 +136,12 @@ CMSForm.prototype = {
if(this.resetElements) this.resetElements();
window.ontabschanged();
// If there's a title field and it's got a "new XX" value, focus/select that first
// This is really a little too CMS-specific (as opposed to LeftAndMain), but the cleanup can happen after jQuery refactoring
if($('Form_EditForm_Title') && $('Form_EditForm_Title').value.match(/^new/i)) {
$('Form_EditForm_Title').select();
}
},
/**
* Save the contens of the form, by submitting it and resetting is changed checker