Skip to content

Commit

Permalink
enable all fields on reset
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Andrei committed Jun 24, 2014
1 parent 836d26f commit d3dd380
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions data.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ function save (callback) {
self.data = data[0];
callback(null, self.data);
self.emit('saved', null, self.data, true);
self.emit('dataSet', self.data);
return;
}

Expand Down
6 changes: 3 additions & 3 deletions ui/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ function fillForm () {
for (var field in fields) {
if (!fields.hasOwnProperty(field)) continue;

// enable field
enableField.call(self, field);

for (var i = 0, l = fields[field].value.length; i < l; ++i) {

// change value using filters
Expand Down Expand Up @@ -228,6 +225,9 @@ function reset (formOnly) {
for (var field in fields) {
if (!fields.hasOwnProperty(field)) continue;

// enable all fields
enableField.call(self, field);

for (var i = 0, l = fields[field].value.length; i < l; ++i) {
// textarea inputs
if (fields[field].value[i].html) {
Expand Down

0 comments on commit d3dd380

Please # to comment.