Revision f0532b59

b/ui/static/snf/js/views.js
245 245
            this.vm = undefined;
246 246
            this.view_id_tpl = this.view_id;
247 247

  
248
            _.bindAll(this, "handle_vm_change", "handle_vm_remove");
248
            _.bindAll(this, "_handle_vm_change", "_handle_vm_remove");
249 249
        },
250 250

  
251 251
        set_vm: function(vm) {
......
257 257

  
258 258
        bind_vm_handlers: function() {
259 259
            this.log.debug("binding handlers");
260
            this.vm.bind("change", this.handle_vm_change);
261
            storage.vms.bind("remove", this.handle_vm_remove);
260
            this.vm.bind("change", this._handle_vm_change);
261
            storage.vms.bind("remove", this._handle_vm_remove);
262 262
        },
263 263
        
264 264
        unbind_vm_handlers: function() {
265 265
            this.log.debug("unbinding handlers", this.vm);
266 266
            if (!this.vm) { return };
267
            this.vm.unbind("change", this.handle_vm_change);
268
            storage.vms.unbind("remove", this.handle_vm_remove);
267
            this.vm.unbind("change", this._handle_vm_change);
268
            storage.vms.unbind("remove", this._handle_vm_remove);
269 269
        },
270 270
        
271 271
        _update_vm_details: function() { 
......
278 278
        },
279 279

  
280 280
        update_vm_details: function() {},
281

  
282
        handle_vm_remove: function(vm, collection) {
281
        handle_vm_remove: function() {},
282
        handle_vm_change: function () {},
283
        
284
        _handle_vm_remove: function(vm, collection) {
283 285
            if (this.vm && vm.id == this.vm.id) {
284 286
                this.hide();
285 287
            }
288
            this.handle_vm_remove();
286 289
        },
287

  
288
        handle_vm_change: function(vm) {
290
        
291
        _handle_vm_change: function(vm) {
289 292
            this._update_vm_details();
293
            this.handle_vm_change(vm);
290 294
        },
291 295
        
292 296
        beforeClose: function() {

Also available in: Unified diff