diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-08-24 23:20:01 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-09-16 07:23:26 +0200 |
commit | fdb95613e9b133feed7b7dbad22dc289a54ef094 (patch) | |
tree | 1a56906ef86da1b219d4fdafe3fd324d535b2327 /core/js/sharedialoglinkshareview.js | |
parent | f709022559d434612f995ecce56a65b034590f6b (diff) | |
download | nextcloud-server-fdb95613e9b133feed7b7dbad22dc289a54ef094.tar.gz nextcloud-server-fdb95613e9b133feed7b7dbad22dc289a54ef094.zip |
simplification, and throwing where throwing is needed
Diffstat (limited to 'core/js/sharedialoglinkshareview.js')
-rw-r--r-- | core/js/sharedialoglinkshareview.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js index ca6413761b0..ff22b629dc4 100644 --- a/core/js/sharedialoglinkshareview.js +++ b/core/js/sharedialoglinkshareview.js @@ -85,7 +85,7 @@ if(!_.isUndefined(options.configModel)) { this.configModel = options.configModel; } else { - console.warn('missing OC.Share.ShareConfigModel'); + throw 'missing OC.Share.ShareConfigModel'; } }, @@ -96,8 +96,7 @@ || !this.showLink || !this.configModel.isShareWithLinkAllowed()) { - this.$el.empty(); - this.$el.append(linkShareTemplate({ + this.$el.html(linkShareTemplate({ shareAllowed: false, noSharingPlaceholder: t('core', 'Resharing is not allowed') })); @@ -114,8 +113,7 @@ publicUploadChecked = 'checked="checked"'; } - this.$el.empty(); - this.$el.append(linkShareTemplate({ + this.$el.html(linkShareTemplate({ shareAllowed: true, linkShareLabel: t('core', 'Share link'), urlLabel: t('core', 'Link'), |