Commits

Sebastian Sdorra  committed 07bf093

improve debug message

  • Participants
  • Parent commits e4e4c60

Comments (0)

Files changed (1)

File scm-webapp/src/main/webapp/resources/js/sonia.rest.js

     if ( this.selModel.hasSelection() ){
       var id = this.selModel.getSelected().data[this.idField];
 
-      if ( debug ){
-        console.debug( 'remove item ' + id );
-      }
-
       var store = this.store;
       var url = String.format( this.restRemoveUrlPattern, id );
 
         buttons: Ext.MessageBox.OKCANCEL,
         icon: Ext.MessageBox.QUESTION,
         fn: function(result){
+
+          if ( debug ){
+            console.debug( 'remove item ' + id );
+          }
+
           if ( result == 'ok' ){
             Ext.Ajax.request({
               url: url,
               }
             });
           }
+          
         }
       });