File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
stage/package/src/main/content/jcr_root/libs/composum/pages/stage/edit/js Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 920
920
// abstract: return the concrete servlet action selector
921
921
} ,
922
922
923
- doSubmit : function ( ) {
923
+ doSubmit : function ( ignoredOnSuccess , onError ) {
924
924
var u = dialogs . const . edit . url . version ;
925
925
var data = this . getActionData ( ) ;
926
926
core . ajaxPost ( u . base + this . submitActionKey ( ) , data , { } ,
927
927
_ . bind ( function ( result ) {
928
928
this . triggerStateChange ( data ) ;
929
929
this . hide ( ) ;
930
- } , this ) , _ . bind ( this . onError , this ) ) ;
930
+ } , this ) , _ . bind ( function ( xhr ) {
931
+ if ( _ . isFunction ( onError ) ) {
932
+ onError ( xhr ) ;
933
+ } else {
934
+ this . onError ( xhr ) ;
935
+ }
936
+ } , this ) ) ;
931
937
} ,
932
938
933
939
/**
988
994
dialogs . ElementDialog . prototype . show . apply ( this ) ;
989
995
} else {
990
996
// the show() is suppressed if no unresolved references found
991
- this . doSubmit ( ) ;
997
+ this . doSubmit ( undefined , _ . bind ( function ( xhr ) {
998
+ core . alert ( xhr ) ;
999
+ } , this ) ) ;
992
1000
this . onClose ( ) ;
993
1001
}
994
1002
}
You can’t perform that action at this time.
0 commit comments