0
1
Fork 0

Errores solucionados

This commit is contained in:
Juan Ferrer Toribio 2017-05-11 17:38:31 +02:00
parent 06bd47bf91
commit ff0b899fa2
6 changed files with 15 additions and 23 deletions

View File

@ -80,6 +80,6 @@ module.exports = new Class
,onRowUpdate: function (model, row)
{
if (row == this._row)
this.changed ();
this.rowChanged();
}
});

View File

@ -119,17 +119,5 @@ module.exports = new Class
{
return this._model.setByIndex (this._row, column, value);
}
,keys: function ()
{
return this._model ?
this.model.keys () : null;
}
,getParams: function ()
{
return this._model ?
this.model.getObject (this._row) : null;
}
});

View File

@ -30,7 +30,7 @@ module.exports = new Class
,set: function (x)
{
this._row = x;
this.updateParams ();
this.rowChanged ();
}
,get: function ()
{
@ -62,18 +62,22 @@ module.exports = new Class
Object.assign (this, {
_model: null
,_row: -1
,_rowLock: false
});
this.parent (props);
}
,_paramsChanged: function (diff)
{
if (!this._rowLock)
for (var key in diff)
this._model.set (this._row, key, diff[key]);
}
,updateParams: function ()
,rowChanged: function ()
{
this._rowLock = true;
this.params = this._model.getObject (this._row);
this._rowLock = false;
}
});

View File

@ -42,7 +42,7 @@ module.exports = new Class
,_paramsChanged: function ()
{
this._updateHash ();
this.updateHash ();
}
/**
@ -63,7 +63,7 @@ module.exports = new Class
params[key] = this._params[key];
}
return this.renderHash (object);
return this.renderHash (params);
}
/**
@ -138,6 +138,8 @@ module.exports = new Class
if (kvPair[0])
newMap[decodeURIComponent (kvPair[0])] = this.parseValue (kvPair[1]);
}
return newMap;
}
,renderValue: function (v)

View File

@ -15,7 +15,7 @@ module.exports = new Class
type: Object
,set: function (x)
{
this._setAll (x);
this.setAll (x);
}
,get: function ()
{
@ -27,7 +27,7 @@ module.exports = new Class
type: Object
,set: function (x)
{
this._setAll (x);
this.setAll (x);
}
,get: function ()
{
@ -67,7 +67,7 @@ module.exports = new Class
,setAll: function (params)
{
var diff = Value.diff (this._params, params);
if (diff)
{
this._params = Value.kvClone (params);

View File

@ -79,11 +79,9 @@ function partialDiff (orgObject, newObject)
function kvClone (object)
{
var key;
var copy = {};
var keys = Object.keys (object);
for (var i = keys.length; --i; key = keys[i])
for (var key in object)
copy[key] = simpleClone (object[key]);
return copy;