less stupid initalization of subviews
This commit is contained in:
parent
ffd4e0dc5a
commit
8f3884145e
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue