mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR: using better type checking
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.2@95352 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
65d72f947d
commit
17d19c2de5
@ -140,7 +140,7 @@ CMSForm.prototype = {
|
|||||||
var __callAfter = callAfter;
|
var __callAfter = callAfter;
|
||||||
var __form = this;
|
var __form = this;
|
||||||
|
|
||||||
if(__form.notify && __form.elements.ID != undefined) __form.notify('BeforeSave', __form.elements.ID.value);
|
if(__form.notify && typeof __form.elements.ID != 'undefined') __form.notify('BeforeSave', __form.elements.ID.value);
|
||||||
|
|
||||||
// validate if required
|
// validate if required
|
||||||
if(this.validate && !this.validate()) {
|
if(this.validate && !this.validate()) {
|
||||||
@ -153,7 +153,7 @@ CMSForm.prototype = {
|
|||||||
Ajax.Evaluator(response);
|
Ajax.Evaluator(response);
|
||||||
__form.resetElements();
|
__form.resetElements();
|
||||||
if(__callAfter) __callAfter();
|
if(__callAfter) __callAfter();
|
||||||
if(__form.notify && __form.elements.ID != undefined) __form.notify('PageSaved', __form.elements.ID.value);
|
if(__form.notify && typeof __form.elements.ID != 'undefined') __form.notify('PageSaved', __form.elements.ID.value);
|
||||||
_AJAX_LOADING = false;
|
_AJAX_LOADING = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user