less stupid initalization of subviews
This commit is contained in:
parent
ffd4e0dc5a
commit
8f3884145e
|
@ -93,18 +93,18 @@
|
||||||
configModel: this.configModel
|
configModel: this.configModel
|
||||||
};
|
};
|
||||||
|
|
||||||
this.resharerInfoView = _.isUndefined(options.resharerInfoView)
|
var subViews = {
|
||||||
? new OC.Share.ShareDialogResharerInfoView(subViewOptions)
|
resharerInfoView: 'ShareDialogResharerInfoView',
|
||||||
: options.resharerInfoView;
|
linkShareView: 'ShareDialogLinkShareView',
|
||||||
|
expirationView: 'ShareDialogExpirationView'
|
||||||
this.linkShareView = _.isUndefined(options.linkShareView)
|
};
|
||||||
? new OC.Share.ShareDialogLinkShareView(subViewOptions)
|
|
||||||
: options.linkShareView;
|
|
||||||
|
|
||||||
this.expirationView = _.isUndefined(options.expirationView)
|
|
||||||
? new OC.Share.ShareDialogExpirationView(subViewOptions)
|
|
||||||
: options.expirationView;
|
|
||||||
|
|
||||||
|
for(var name in subViews) {
|
||||||
|
var className = subViews[name];
|
||||||
|
this[name] = _.isUndefined(options[name])
|
||||||
|
? new OC.Share[className](subViewOptions)
|
||||||
|
: options[name];
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
|
|
Loading…
Reference in New Issue