summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-08-21 20:05:50 +0200
committerVincent Petry <pvince81@owncloud.com>2015-09-16 07:23:26 +0200
commit8f3884145e3992ec5195d6bdd7c4c97926c0c582 (patch)
tree74333fa64bd6ab125572850c82e2bef88e179f77
parentffd4e0dc5a1977885b639b3ba1bb87a533e6a75a (diff)
downloadnextcloud-server-8f3884145e3992ec5195d6bdd7c4c97926c0c582.tar.gz
nextcloud-server-8f3884145e3992ec5195d6bdd7c4c97926c0c582.zip
less stupid initalization of subviews
-rw-r--r--core/js/sharedialogview.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js
index cdf5214fa65..b33130a83dc 100644
--- a/core/js/sharedialogview.js
+++ b/core/js/sharedialogview.js
@@ -93,18 +93,18 @@
configModel: this.configModel
};
- this.resharerInfoView = _.isUndefined(options.resharerInfoView)
- ? new OC.Share.ShareDialogResharerInfoView(subViewOptions)
- : options.resharerInfoView;
-
- this.linkShareView = _.isUndefined(options.linkShareView)
- ? new OC.Share.ShareDialogLinkShareView(subViewOptions)
- : options.linkShareView;
-
- this.expirationView = _.isUndefined(options.expirationView)
- ? new OC.Share.ShareDialogExpirationView(subViewOptions)
- : options.expirationView;
+ var subViews = {
+ resharerInfoView: 'ShareDialogResharerInfoView',
+ linkShareView: 'ShareDialogLinkShareView',
+ expirationView: 'ShareDialogExpirationView'
+ };
+ for(var name in subViews) {
+ var className = subViews[name];
+ this[name] = _.isUndefined(options[name])
+ ? new OC.Share[className](subViewOptions)
+ : options[name];
+ }
},
render: function() {