YUKI Hiroshi
null+****@clear*****
Thu Oct 4 18:56:13 JST 2012
YUKI Hiroshi 2012-10-04 18:56:13 +0900 (Thu, 04 Oct 2012) New Revision: 979298ff4abaa8f095eae77661533dce8720c232 https://github.com/groonga/gcs/commit/979298ff4abaa8f095eae77661533dce8720c232 Log: Transit to the index page after the current domain is deleted successfully Modified files: public/js/gcs/controllers.js public/js/gcs/router.js Modified: public/js/gcs/controllers.js (+2 -0) =================================================================== --- public/js/gcs/controllers.js 2012-10-04 18:47:18 +0900 (dd68d39) +++ public/js/gcs/controllers.js 2012-10-04 18:56:13 +0900 (319976d) @@ -121,7 +121,9 @@ App.DomainController = Ember.ObjectController.extend({ if (record && confirm('Do you really want this domain to be deleted?')) { App.store.deleteRecord(record); App.store.commit(); + return true; } + return false; } }); Modified: public/js/gcs/router.js (+2 -1) =================================================================== --- public/js/gcs/router.js 2012-10-04 18:47:18 +0900 (215e3b6) +++ public/js/gcs/router.js 2012-10-04 18:56:13 +0900 (e7beb69) @@ -45,7 +45,8 @@ App.Router = Ember.Router.extend({ domainController.connectOutlet('domainShow', domain); }, delete: function(router) { - router.get('domainController').delete(); + if (router.get('domainController').delete()) + router.transitionTo('root.index'); } }), search: Ember.Route.extend(App.WithDomain, { -------------- next part -------------- HTML����������������������������... 다운로드