[pve-devel] r6268 - pve-manager/pve2/www/manager/data
svn-commits at proxmox.com
svn-commits at proxmox.com
Fri Jul 8 11:11:28 CEST 2011
Author: dietmar
Date: 2011-07-08 11:11:28 +0200 (Fri, 08 Jul 2011)
New Revision: 6268
Modified:
pve-manager/pve2/www/manager/data/DiffStore.js
Log:
make lint happy
Modified: pve-manager/pve2/www/manager/data/DiffStore.js
===================================================================
--- pve-manager/pve2/www/manager/data/DiffStore.js 2011-07-08 09:09:09 UTC (rev 6267)
+++ pve-manager/pve2/www/manager/data/DiffStore.js 2011-07-08 09:11:28 UTC (rev 6268)
@@ -8,12 +8,15 @@
constructor: function(config) {
var me = this;
- var config = config || {};
+ config = config || {};
- if (!config.rstore)
+ if (!config.rstore) {
throw "no rstore specified";
- if (!config.rstore.model)
+ }
+
+ if (!config.rstore.model) {
throw "no rstore model specified";
+ }
var rstore = config.rstore;
@@ -29,10 +32,11 @@
var cond_add_item = function(data, id) {
var olditem = me.getById(id);
if (olditem) {
- olditem.beginEdit()
+ olditem.beginEdit();
me.model.prototype.fields.eachKey(function(field) {
- if (olditem.data[field] !== data[field])
+ if (olditem.data[field] !== data[field]) {
olditem.set(field, data[field]);
+ }
});
olditem.endEdit(true);
olditem.commit();
@@ -45,22 +49,24 @@
me.mon(rstore, 'load', function(s, records, success) {
- if (!success)
+ if (!success) {
return;
+ }
me.suspendEvents();
// remove vanished items
(me.snapshot || me.data).each(function(olditem) {
var item = rstore.getById(olditem.getId());
- if (!item)
+ if (!item) {
me.remove(olditem);
+ }
});
rstore.each(function(item) {
cond_add_item(item.data, item.getId());
});
-
+
me.filter();
first_load = false;
More information about the pve-devel
mailing list