simplification, and throwing where throwing is needed

remotes/origin/db-empty-migrate
Arthur Schiwon 9 years ago committed by Vincent Petry
parent f709022559
commit fdb95613e9
  1. 5
      core/js/sharedialogexpirationview.js
  2. 8
      core/js/sharedialoglinkshareview.js
  3. 5
      core/js/sharedialogresharerinfoview.js
  4. 2
      core/js/sharedialogview.js

@ -48,7 +48,7 @@
if(!_.isUndefined(options.configModel)) {
this.configModel = options.configModel;
} else {
console.warn('missing OC.Share.ShareConfigModel');
throw 'missing OC.Share.ShareConfigModel';
}
},
@ -64,8 +64,7 @@
}
var expirationTemplate = this.template();
this.$el.empty();
this.$el.append(expirationTemplate({
this.$el.html(expirationTemplate({
setExpirationLabel: t('core', 'Set expiration date'),
expirationLabel: t('core', 'Expiration'),
expirationDatePlaceholder: t('core', 'Expiration date'),

@ -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'),

@ -58,7 +58,7 @@
if(!_.isUndefined(options.configModel)) {
this.configModel = options.configModel;
} else {
console.warn('missing OC.Share.ShareConfigModel');
throw 'missing OC.Share.ShareConfigModel';
}
},
@ -90,8 +90,7 @@
);
}
this.$el.empty();
this.$el.append(reshareTemplate({
this.$el.html(reshareTemplate({
avatarEnabled: this.configModel.areAvatarsEnabled(),
sharedByText: sharedByText
}));

@ -81,7 +81,7 @@
if(!_.isUndefined(options.configModel)) {
this.configModel = options.configModel;
} else {
console.warn('missing OC.Share.ShareConfigModel');
throw 'missing OC.Share.ShareConfigModel';
}
var subViewOptions = {

Loading…
Cancel
Save