diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-01 20:46:29 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-10-04 09:53:45 +0200 |
commit | b0fd31496b5edb95264c0ea3139692b5969f40e0 (patch) | |
tree | 77f0034a4759edccf2c3993ce4cefa12e25b077e /core/js/sharedialogview.js | |
parent | b10cddebe583dff888d844c550f607d52b496d49 (diff) | |
download | nextcloud-server-b0fd31496b5edb95264c0ea3139692b5969f40e0.tar.gz nextcloud-server-b0fd31496b5edb95264c0ea3139692b5969f40e0.zip |
Move OC.Share to compiled handlebars
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'core/js/sharedialogview.js')
-rw-r--r-- | core/js/sharedialogview.js | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js index f5b876c37be..9c648357e61 100644 --- a/core/js/sharedialogview.js +++ b/core/js/sharedialogview.js @@ -15,20 +15,6 @@ OC.Share = {}; } - var TEMPLATE_BASE = - '<div class="resharerInfoView subView"></div>' + - '{{#if isSharingAllowed}}' + - '<label for="shareWith-{{cid}}" class="hidden-visually">{{shareLabel}}</label>' + - '<div class="oneline">' + - ' <input id="shareWith-{{cid}}" class="shareWithField" type="text" placeholder="{{sharePlaceholder}}" />' + - ' <span class="shareWithLoading icon-loading-small hidden"></span>'+ - ' <span class="shareWithConfirm icon icon-confirm"></span>' + - '</div>' + - '{{/if}}' + - '<div class="linkShareView subView"></div>' + - '<div class="shareeListView subView"></div>' + - '<div class="loading hidden" style="height: 50px"></div>'; - /** * @class OCA.Share.ShareDialogView * @member {OC.Share.ShareItemModel} model @@ -663,7 +649,7 @@ render: function() { var self = this; - var baseTemplate = this._getTemplate('base', TEMPLATE_BASE); + var baseTemplate = OC.Share.Templates['sharedialogview']; this.$el.html(baseTemplate({ cid: this.cid, @@ -739,20 +725,6 @@ return t('core', 'Name...'); }, - /** - * - * @param {string} key - an identifier for the template - * @param {string} template - the HTML to be compiled by Handlebars - * @returns {Function} from Handlebars - * @private - */ - _getTemplate: function (key, template) { - if (!this._templates[key]) { - this._templates[key] = Handlebars.compile(template); - } - return this._templates[key]; - }, - }); OC.Share.ShareDialogView = ShareDialogView; |