mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
no need for a computed property
This commit is contained in:
parent
27985292e3
commit
cf3c4fd743
@ -20,15 +20,12 @@ Discourse.UploadSelectorView = Discourse.ModalBodyView.extend({
|
|||||||
}.property("controller.local"),
|
}.property("controller.local"),
|
||||||
|
|
||||||
hint: function() {
|
hint: function() {
|
||||||
|
// cf. http://stackoverflow.com/a/9851769/11983
|
||||||
|
var isChrome = !!window.chrome && !(!!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0);
|
||||||
// chrome is the only browser that support copy & paste of images.
|
// chrome is the only browser that support copy & paste of images.
|
||||||
return I18n.t("upload_selector.hint" + (this.get("isChrome") ? "_for_chrome" : ""));
|
return I18n.t("upload_selector.hint" + (this.get("isChrome") ? "_for_chrome" : ""));
|
||||||
}.property(),
|
}.property(),
|
||||||
|
|
||||||
isChrome: function() {
|
|
||||||
// cf. http://stackoverflow.com/a/9851769/11983
|
|
||||||
return !!window.chrome && !(!!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0);
|
|
||||||
}.property(),
|
|
||||||
|
|
||||||
didInsertElement: function() {
|
didInsertElement: function() {
|
||||||
this._super();
|
this._super();
|
||||||
this.selectedChanged();
|
this.selectedChanged();
|
||||||
|
Loading…
Reference in New Issue
Block a user