FEATURE: create hyperlinked images from the image insertion dialog

This commit is contained in:
Régis Hanol
2014-03-31 18:18:39 +02:00
parent d84b2b5117
commit 7e33834afe
5 changed files with 32 additions and 7 deletions
@@ -10,10 +10,14 @@
Discourse.UploadSelectorController = Discourse.Controller.extend(Discourse.ModalFunctionality, {
remote: Em.computed.not("local"),
local: false,
showMore: false,
init: function() {
this._super();
this.set("local", this.get("allowLocal"));
this.setProperties({
local: this.get("allowLocal"),
showMore: false
});
},
allowLocal: function() {
@@ -21,8 +25,9 @@ Discourse.UploadSelectorController = Discourse.Controller.extend(Discourse.Modal
}.property(),
actions: {
useLocal: function() { this.set("local", true); },
useRemote: function() { this.set("local", false); }
useLocal: function() { this.setProperties({ local: true, showMore: false}); },
useRemote: function() { this.set("local", false); },
toggleShowMore: function() { this.toggleProperty("showMore"); }
}
});