@@ -456,9 +456,17 @@ Evol.i18n = {
456456 //Print:'Print',
457457 //pdf:'PDF',
458458
459+ // --- buttons ---
460+ Save :'Save' ,
461+ SaveAdd :'Save and Add Another' ,
462+ Cancel :'Cancel' ,
463+
459464 // --- msg & status ---
465+ saved : 'Record saved.' ,
460466 DeleteEntity :'Delete {0} "{1}"?' , // {0}=entity {1}=leadfield value,
461467 DeleteEntities : 'Delete {0} {1}?' , // delete 5 tasks
468+ NoChange :'No Change' ,
469+ NoX :'No {0}' ,
462470 Back2SearchResults :'Back to search results' ,
463471 yes : 'Yes' ,
464472 no : 'No' ,
@@ -473,13 +481,6 @@ Evol.i18n = {
473481 'sgn_money' : '$' , // indicator for money
474482 'sgn_email' : '@' , // indicator for email
475483
476- // --- buttons ---
477- Save :'Save' ,
478- SaveAdd :'Save and Add Another' ,
479- Cancel :'Cancel' ,
480- NoChange :'No Change' ,
481- NoX :'No {0}' ,
482-
483484 // --- status ---
484485 status :{
485486 added :'New {0} "{1}" added.' ,
@@ -1562,6 +1563,7 @@ Evol.ViewMany.List = Evol.ViewMany.extend({
15621563 this . $ ( '.table > tbody' ) . html ( h . join ( '' ) ) ;
15631564 //this.options.pageIndex=pageIdx;
15641565 this . $el . trigger ( 'status' , this . pageSummary ( pageIdx , pSize , this . collection . length , uim . entity , uim . entities ) ) ;
1566+ return this ;
15651567 } ,
15661568
15671569 _HTMLlistBody : function ( h , fields , pSize , icon , pageIdx , selectable ) {
@@ -2911,6 +2913,7 @@ Evol.ViewOne.Wizard = Evol.ViewOne.extend({
29112913 $ ( d ) . attr ( 'class' , 'badge present' ) ;
29122914 }
29132915 } ) ;
2916+ return this ;
29142917 }
29152918
29162919} ) ;
@@ -4512,7 +4515,7 @@ Evol.ViewToolbar = Backbone.View.extend({
45124515 collec . create ( this . getData ( ) , {
45134516 success : function ( m ) {
45144517 fnSuccess ( m ) ;
4515- that . setMessage ( 'Record saved.' , Evol . i18n . getLabel ( 'status.added' , entityName , _ . escape ( vw . getTitle ( ) ) ) , 'success' ) ;
4518+ that . setMessage ( Evol . i18n . saved , Evol . i18n . getLabel ( 'status.added' , entityName , _ . escape ( vw . getTitle ( ) ) ) , 'success' ) ;
45164519 } ,
45174520 error :function ( err ) {
45184521 alert ( 'error' ) ;
@@ -4528,7 +4531,7 @@ Evol.ViewToolbar = Backbone.View.extend({
45284531 this . model . save ( '' , '' , {
45294532 success : function ( m ) {
45304533 fnSuccess ( m ) ;
4531- that . setMessage ( 'Record saved.' , Evol . i18n . getLabel ( 'status.updated' , Evol . UI . capitalize ( entityName ) , _ . escape ( vw . getTitle ( ) ) ) , 'success' ) ;
4534+ that . setMessage ( Evol . i18n . saved , Evol . i18n . getLabel ( 'status.updated' , Evol . UI . capitalize ( entityName ) , _ . escape ( vw . getTitle ( ) ) ) , 'success' ) ;
45324535 } ,
45334536 error :function ( err ) {
45344537 alert ( 'error' ) ;
@@ -4640,8 +4643,8 @@ Evol.ViewToolbar = Backbone.View.extend({
46404643 action_view : function ( evt , actionId ) {
46414644 switch ( actionId ) {
46424645 case 'cancel' :
4643- if ( this . curView . viewName === 'edit ' && ! this . model . isNew ) {
4644- this . setView ( 'view' ) ;
4646+ if ( this . curView . cardinality === '1 ' && ! this . model . isNew ) {
4647+ this . setView ( this . _prevOne || 'view' ) ;
46454648 } else {
46464649 this . setView ( this . _prevMany || 'list' ) ;
46474650 }
0 commit comments