cambio aspa en textfield

modificado funcionario getModifiedData
el descriptor no envía datos al servidor
This commit is contained in:
nelo 2017-02-28 12:07:16 +01:00
parent ded4e07ab7
commit 807d1c4ab9
3 changed files with 7 additions and 10 deletions

View File

@ -12,7 +12,7 @@ export const COMPONENT = {
var self = this;
$scope.$watch('descriptor.client.active', function(newValue, oldValue) {
if (oldValue !== undefined)
$http.put(`/client/api/Clients/${self.client.id}/activate`, {});
$http.put(`/client/api/Clients/${self.client.id}/activate`);
});
}
};

View File

@ -7,17 +7,14 @@ export default function getModifiedData(object, objectOld) {
var val = object[k];
var valOld = objectOld[k];
if (val instanceof Object) {
if (!isEqual(val, valOld)) {
if (!isEqual(val, valOld)) {
if (val instanceof Object) {
newObject[k] = getModifiedData(val, valOld);
}
else {
newObject[k] = val;
}
}
else if (val instanceof Array && val.length !== valOld.length) {
newObject[k] = val;
}
else if (val !== valOld) {
newObject[k] = val;
}
}
return newObject;

View File

@ -10,7 +10,7 @@
ng-blur="onBlurInput($event)"
/>
<button type="button" class="mdl-chip__action" ng-click="clickClear('*[model]*')">
<i class="material-icons">cancel</i>
<i class="material-icons">clear</i>
</button>
<label class="mdl-textfield__label" translate>*[label]*</label>
</div>