Commit 7103a980 authored by gijs's avatar gijs

More visual fixes

parent d631633f
This diff is collapsed.
......@@ -495,7 +495,7 @@ window.W = window.W || {};
'title': title,
'changed': (this.model.get('title') !== title)
};
} else {
} else if (this.ui.file.get(0).files.length > 0) {
if (title == '') {
// If no title was provided tack filename
title = this.ui.file.get(0).files[0].name;
......@@ -505,6 +505,8 @@ window.W = window.W || {};
title: title,
file: this.ui.file.get(0).files[0]
};
} else {
return {};
}
}
});
......@@ -1516,9 +1518,14 @@ window.W = window.W || {};
},
attributes: function () {
if (this.getAltSymbol()) {
return {
'data-tag': this.collection.first().get('tag'),
'data-alternative': this.getAltSymbol()
}
}
return {
'data-tag': this.collection.first().get('tag'),
'data-alternative': this.getAltSymbol()
}
},
......@@ -1777,6 +1784,7 @@ window.W = window.W || {};
if (this.model.changedAttributes(data)) {
this.markChanged();
this.model.set(data);
} else {
this.toggleForm();
}
......@@ -1785,6 +1793,9 @@ window.W = window.W || {};
markChanged: function () {
this.ui.save.prop('disabled', false);
this.hasChanges = true;
/* If a change has been detected in the model, rerender the slider */
var sliderView = new W.SliderView({ depth: this.model.getDepth() });
this.showChildView('slider', sliderView);
},
unfold: function (view, event) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment