BUG: Editing collections loading indicator (#63)
This commit is contained in:
		
							parent
							
								
									a4264ac16c
								
							
						
					
					
						commit
						dcbad4d54b
					
				
					 2 changed files with 12 additions and 4 deletions
				
			
		|  | @ -29,11 +29,15 @@ export default Controller.extend(ValidationMixin, { | |||
|   actions: { | ||||
|     onSave(changeset) { | ||||
|       const postSave = () => { this.transitionToRoute('collections.index'); }; | ||||
|       return this.validationSave(changeset, postSave); | ||||
|       return this.transitionToRoute('loading').then(() => { | ||||
|         return this.validationSave(changeset, postSave); | ||||
|       }); | ||||
|     }, | ||||
|     onCancel(changeset) { | ||||
|       const postCancel = () => { this.transitionToRoute('collections.index'); }; | ||||
|       return this.validationCancel(changeset, postCancel); | ||||
|       return this.transitionToRoute('loading').then(() => { | ||||
|         return this.validationCancel(changeset, postCancel); | ||||
|       }); | ||||
|     }, | ||||
|   }, | ||||
| }); | ||||
|  |  | |||
|  | @ -32,14 +32,18 @@ export default Controller.extend(ValidationMixin, { | |||
|         // Use the model's ID here because of the ArrayProxy in the route
 | ||||
|         this.transitionToRoute('collections.detail', this.get('model.id')); | ||||
|       }; | ||||
|       return this.validationSave(changesets, postSave); | ||||
|       return this.transitionToRoute('loading').then(() => { | ||||
|         return this.validationSave(changesets, postSave); | ||||
|       }); | ||||
|     }, | ||||
|     onCancel(changesets) { | ||||
|       const postCancel = () => { | ||||
|         // Use the model's ID here because of the ArrayProxy in the route
 | ||||
|         return this.transitionToRoute('collections.detail', this.get('model.id')); | ||||
|       }; | ||||
|       return this.validationCancel(changesets, postCancel); | ||||
|       return this.transitionToRoute('loading').then(() => { | ||||
|         return this.validationCancel(changesets, postCancel); | ||||
|       }); | ||||
|     }, | ||||
|   }, | ||||
| }); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 GitHub
							GitHub