[Groonga-commit] groonga/gcs [ember] Delete the specified domain actually

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Oct 4 18:17:41 JST 2012


YUKI Hiroshi	2012-10-04 18:17:41 +0900 (Thu, 04 Oct 2012)

  New Revision: 2d0c3fccb164fbb55d9f873d7472362b80e02eeb
  https://github.com/groonga/gcs/commit/2d0c3fccb164fbb55d9f873d7472362b80e02eeb

  Log:
    Delete the specified domain actually

  Modified files:
    public/js/gcs/models.js
    public/js/gcs/views.js

  Modified: public/js/gcs/models.js (+1 -4)
===================================================================
--- public/js/gcs/models.js    2012-10-04 18:09:53 +0900 (600e1aa)
+++ public/js/gcs/models.js    2012-10-04 18:17:41 +0900 (40271e1)
@@ -108,10 +108,7 @@ App.Adapter = DS.Adapter.extend({
           DomainName: model.get('name')
         },
         success: function(data) {
-          var domainStatus = $(data).find('DeleteDomainResult > DomainStatus');
-          self.processDomainStatus(domainStatus, function(domain) {
-            store.didDeleteRecord(model);
-          });
+          store.didDeleteRecord(model);
         },
         error: function(data) {
           console.log(data);

  Modified: public/js/gcs/views.js (+5 -2)
===================================================================
--- public/js/gcs/views.js    2012-10-04 18:09:53 +0900 (9435841)
+++ public/js/gcs/views.js    2012-10-04 18:17:41 +0900 (38d9a06)
@@ -83,8 +83,11 @@ App.DomainDeleteView = Ember.View.extend({
     submit: function(event) {
       event.preventDefault();
       var domainName = this.get('controller.domainName');
-      var domain = App.store.deleteRecord(App.Domain, {name: domainName});
-      App.store.commit();
+      var record = App.store.find(App.Domain, domainName);
+      if (record) {
+        App.store.deleteRecord(record);
+        App.store.commit();
+      }
     }
   })
 });
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index