summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/js/dist/share_backend.js24
-rw-r--r--core/js/dist/share_backend.js.map1
-rw-r--r--core/js/dist/systemtags.js2
-rw-r--r--core/js/dist/systemtags.js.map2
-rw-r--r--core/js/merged-share-backend.js9
-rw-r--r--core/js/share.js399
-rw-r--r--core/js/share/sharedialoglinkshareview.handlebars40
-rw-r--r--core/js/share/sharedialoglinkshareview_popover_menu.handlebars121
-rw-r--r--core/js/share/sharedialoglinkshareview_popover_menu_pending.handlebars20
-rw-r--r--core/js/share/sharedialogresharerinfoview.handlebars5
-rw-r--r--core/js/share/sharedialogshareelistview.handlebars32
-rw-r--r--core/js/share/sharedialogshareelistview_popover_menu.handlebars107
-rw-r--r--core/js/share/sharedialogview.handlebars12
-rw-r--r--core/js/shareconfigmodel.js72
-rw-r--r--core/js/sharedialoglinkshareview.js954
-rw-r--r--core/js/sharedialogresharerinfoview.js159
-rw-r--r--core/js/sharedialogshareelistview.js777
-rw-r--r--core/js/sharedialogview.js1137
-rw-r--r--core/js/shareitemmodel.js945
-rw-r--r--core/js/sharesocialmanager.js54
-rw-r--r--core/js/sharetemplates.js686
-rw-r--r--core/webpack.js1
22 files changed, 2 insertions, 5557 deletions
diff --git a/core/js/dist/share_backend.js b/core/js/dist/share_backend.js
deleted file mode 100644
index c72516337e2..00000000000
--- a/core/js/dist/share_backend.js
+++ /dev/null
@@ -1,24 +0,0 @@
-!function(e){var a={};function t(n){if(a[n])return a[n].exports;var s=a[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,t),s.l=!0,s.exports}t.m=e,t.c=a,t.d=function(e,a,n){t.o(e,a)||Object.defineProperty(e,a,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,a){if(1&a&&(e=t(e)),8&a)return e;if(4&a&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&a&&"string"!=typeof e)for(var s in e)t.d(n,s,function(a){return e[a]}.bind(null,s));return n},t.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(a,"a",a),a},t.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},t.p="",t(t.s=0)}([function(e,a,t){"use strict";t.r(a);t(1),t(2),t(3),t(4),t(5),t(6),t(7),t(8),t(9)},function(e,a){!function(){OC.Share||(OC.Share={},OC.Share.Types={});var e=OC.Backbone.Model.extend({defaults:{publicUploadEnabled:!1,enforcePasswordForPublicLink:OC.appConfig.core.enforcePasswordForPublicLink,enableLinkPasswordByDefault:OC.appConfig.core.enableLinkPasswordByDefault,isDefaultExpireDateEnforced:!0===OC.appConfig.core.defaultExpireDateEnforced,isDefaultExpireDateEnabled:!0===OC.appConfig.core.defaultExpireDateEnabled,isRemoteShareAllowed:OC.appConfig.core.remoteShareAllowed,isMailShareAllowed:void 0!==OC.appConfig.shareByMailEnabled,defaultExpireDate:OC.appConfig.core.defaultExpireDate,isResharingAllowed:OC.appConfig.core.resharingAllowed,isPasswordForMailSharesRequired:void 0!==OC.appConfig.shareByMail&&OC.appConfig.shareByMail.enforcePasswordProtection,allowGroupSharing:OC.appConfig.core.allowGroupSharing},isPublicUploadEnabled:function(){return"yes"===$("#filestable").data("allow-public-upload")},isShareWithLinkAllowed:function(){return"yes"===$("#allowShareWithLink").val()},getFederatedShareDocLink:function(){return OC.appConfig.core.federatedCloudShareDoc},getDefaultExpirationDateString:function(){var e="";if(this.get("isDefaultExpireDateEnabled")){var a=moment.utc(),t=this.get("defaultExpireDate");a.add(t,"days"),e=a.format("YYYY-MM-DD 00:00:00")}return e}});OC.Share.ShareConfigModel=e}()},function(e,a){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var n,s;n=Handlebars.template,(s=OC.Share.Templates=OC.Share.Templates||{}).sharedialoglinkshareview=n({1:function(e,a,t,n,s){e.propertyIsEnumerable;var i,l=null!=a?a:e.nullContext||{};return'<ul class="shareWithList">\n'+(null!=(i=t.if.call(l,null!=a?a.nolinkShares:a,{name:"if",hash:{},fn:e.program(2,s,0),inverse:e.noop,data:s}))?i:"")+(null!=(i=t.each.call(l,null!=a?a.linkShares:a,{name:"each",hash:{},fn:e.program(7,s,0),inverse:e.noop,data:s}))?i:"")+"</ul>\n"},2:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h=e.escapeExpression;return'\t\t<li data-share-id="'+h("function"===t(r=null!=(r=n.newShareId||(null!=a?a.newShareId:a))?r:d)?r.call(o,{name:"newShareId",hash:{},data:i}):r)+'">\n\t\t\t<div class="avatar icon-public-white"></div>\n\t\t\t<span class="username">'+h("function"===t(r=null!=(r=n.newShareLabel||(null!=a?a.newShareLabel:a))?r:d)?r.call(o,{name:"newShareLabel",hash:{},data:i}):r)+'</span>\n\t\t\t<span class="sharingOptionsGroup">\n\t\t\t\t<div class="share-menu">\n\t\t\t\t\t<a href="#" class="icon icon-add new-share has-tooltip '+(null!=(l=n.if.call(o,null!=a?a.showPending:a,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?l:"")+'" title="'+h("function"===t(r=null!=(r=n.newShareTitle||(null!=a?a.newShareTitle:a))?r:d)?r.call(o,{name:"newShareTitle",hash:{},data:i}):r)+'"></a>\n\t\t\t\t\t<span class="icon icon-loading-small '+(null!=(l=n.unless.call(o,null!=a?a.showPending:a,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?l:"")+'"></span>\n'+(null!=(l=n.if.call(o,null!=a?a.showPending:a,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?l:"")+"\t\t\t\t</div>\n\t\t\t</span>\n\t\t</li>\n"},3:function(e,a,t,n,s){return"hidden"},5:function(e,a,t,n,s){var i,l;return e.propertyIsEnumerable,"\t\t\t\t\t\t"+(null!=(i="function"==typeof(l=null!=(l=t.pendingPopoverMenu||(null!=a?a.pendingPopoverMenu:a))?l:e.hooks.helperMissing)?l.call(null!=a?a:e.nullContext||{},{name:"pendingPopoverMenu",hash:{},data:s}):l)?i:"")+"\n"},7:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h="function",c=e.escapeExpression;return'\t\t<li data-share-id="'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'">\n\t\t\t<div class="avatar icon-public-white"></div>\n\t\t\t<span class="username" title="'+c(t(r=null!=(r=n.linkShareCreationDate||(null!=a?a.linkShareCreationDate:a))?r:d)===h?r.call(o,{name:"linkShareCreationDate",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.linkShareLabel||(null!=a?a.linkShareLabel:a))?r:d)===h?r.call(o,{name:"linkShareLabel",hash:{},data:i}):r)+'</span>\n\t\t\t\n\t\t\t<span class="sharingOptionsGroup">\n\t\t\t\t<a href="#" class="clipboard-button icon icon-clippy has-tooltip" data-clipboard-text="'+c(t(r=null!=(r=n.shareLinkURL||(null!=a?a.shareLinkURL:a))?r:d)===h?r.call(o,{name:"shareLinkURL",hash:{},data:i}):r)+'" title="'+c(t(r=null!=(r=n.copyLabel||(null!=a?a.copyLabel:a))?r:d)===h?r.call(o,{name:"copyLabel",hash:{},data:i}):r)+'"></a>\n\t\t\t\t<div class="share-menu">\n\t\t\t\t\t<a href="#" class="icon icon-more '+(null!=(l=n.if.call(o,null!=a?a.showPending:a,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?l:"")+'"></a>\n\t\t\t\t\t<span class="icon icon-loading-small '+(null!=(l=n.unless.call(o,null!=a?a.showPending:a,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?l:"")+'"></span>\n'+(null!=(l=n.if.call(o,null!=a?a.showPending:a,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.program(8,i,0),data:i}))?l:"")+"\t\t\t\t</div>\n\t\t\t</span>\n\t\t</li>\n"},8:function(e,a,t,n,s){var i,l;return e.propertyIsEnumerable,"\t\t\t\t\t\t"+(null!=(i="function"==typeof(l=null!=(l=t.popoverMenu||(null!=a?a.popoverMenu:a))?l:e.hooks.helperMissing)?l.call(null!=a?a:e.nullContext||{},{name:"popoverMenu",hash:{},data:s}):l)?i:"")+"\n"},10:function(e,a,t,n,s){var i;return e.propertyIsEnumerable,(null!=(i=t.if.call(null!=a?a:e.nullContext||{},null!=a?a.noSharingPlaceholder:a,{name:"if",hash:{},fn:e.program(11,s,0),inverse:e.noop,data:s}))?i:"")+"\n"},11:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r=null!=a?a:e.nullContext||{},o=e.hooks.helperMissing,d=e.escapeExpression;return'<input id="shareWith-'+d("function"===t(l=null!=(l=n.cid||(null!=a?a.cid:a))?l:o)?l.call(r,{name:"cid",hash:{},data:i}):l)+'" class="shareWithField" type="text" placeholder="'+d("function"===t(l=null!=(l=n.noSharingPlaceholder||(null!=a?a.noSharingPlaceholder:a))?l:o)?l.call(r,{name:"noSharingPlaceholder",hash:{},data:i}):l)+'" disabled="disabled" />'},compiler:[8,">= 4.3.0"],main:function(e,a,t,n,s){var i;return e.propertyIsEnumerable,null!=(i=t.if.call(null!=a?a:e.nullContext||{},null!=a?a.shareAllowed:a,{name:"if",hash:{},fn:e.program(1,s,0),inverse:e.program(10,s,0),data:s}))?i:""},useData:!0}),s.sharedialoglinkshareview_popover_menu=n({1:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h="function",c=e.escapeExpression;return'\t\t\t<li>\n\t\t\t\t<span class="menuitem">\n\t\t\t\t\t<span class="icon-loading-small hidden"></span>\n\t\t\t\t\t<input type="radio" name="publicUpload" value="'+c(t(r=null!=(r=n.publicUploadRValue||(null!=a?a.publicUploadRValue:a))?r:d)===h?r.call(o,{name:"publicUploadRValue",hash:{},data:i}):r)+'" id="sharingDialogAllowPublicUpload-r-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'" class="radio publicUploadRadio" '+(null!=(l=t(r=null!=(r=n.publicUploadRChecked||(null!=a?a.publicUploadRChecked:a))?r:d)===h?r.call(o,{name:"publicUploadRChecked",hash:{},data:i}):r)?l:"")+' />\n\t\t\t\t\t<label for="sharingDialogAllowPublicUpload-r-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.publicUploadRLabel||(null!=a?a.publicUploadRLabel:a))?r:d)===h?r.call(o,{name:"publicUploadRLabel",hash:{},data:i}):r)+'</label>\n\t\t\t\t</span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<span class="menuitem">\n\t\t\t\t\t<span class="icon-loading-small hidden"></span>\n\t\t\t\t\t<input type="radio" name="publicUpload" value="'+c(t(r=null!=(r=n.publicUploadRWValue||(null!=a?a.publicUploadRWValue:a))?r:d)===h?r.call(o,{name:"publicUploadRWValue",hash:{},data:i}):r)+'" id="sharingDialogAllowPublicUpload-rw-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'" class="radio publicUploadRadio" '+(null!=(l=t(r=null!=(r=n.publicUploadRWChecked||(null!=a?a.publicUploadRWChecked:a))?r:d)===h?r.call(o,{name:"publicUploadRWChecked",hash:{},data:i}):r)?l:"")+' />\n\t\t\t\t\t<label for="sharingDialogAllowPublicUpload-rw-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.publicUploadRWLabel||(null!=a?a.publicUploadRWLabel:a))?r:d)===h?r.call(o,{name:"publicUploadRWLabel",hash:{},data:i}):r)+'</label>\n\t\t\t\t</span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<span class="menuitem">\n\t\t\t\t\t<span class="icon-loading-small hidden"></span>\n\t\t\t\t\t<input type="radio" name="publicUpload" value="'+c(t(r=null!=(r=n.publicUploadWValue||(null!=a?a.publicUploadWValue:a))?r:d)===h?r.call(o,{name:"publicUploadWValue",hash:{},data:i}):r)+'" id="sharingDialogAllowPublicUpload-w-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'" class="radio publicUploadRadio" '+(null!=(l=t(r=null!=(r=n.publicUploadWChecked||(null!=a?a.publicUploadWChecked:a))?r:d)===h?r.call(o,{name:"publicUploadWChecked",hash:{},data:i}):r)?l:"")+' />\n\t\t\t\t\t<label for="sharingDialogAllowPublicUpload-w-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.publicUploadWLabel||(null!=a?a.publicUploadWLabel:a))?r:d)===h?r.call(o,{name:"publicUploadWLabel",hash:{},data:i}):r)+"</label>\n\t\t\t\t</span>\n\t\t\t</li>\n"},3:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h=e.escapeExpression;return'\t\t\t<li id="allowPublicEditingWrapper">\n\t\t\t\t<span class="menuitem">\n\t\t\t\t\t<span class="icon-loading-small hidden"></span>\n\t\t\t\t\t<input type="checkbox" name="allowPublicEditing" id="sharingDialogAllowPublicEditing-'+h("function"===t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)?r.call(o,{name:"cid",hash:{},data:i}):r)+'" class="checkbox publicEditingCheckbox" '+(null!=(l="function"===t(r=null!=(r=n.publicEditingChecked||(null!=a?a.publicEditingChecked:a))?r:d)?r.call(o,{name:"publicEditingChecked",hash:{},data:i}):r)?l:"")+' />\n\t\t\t\t\t<label for="sharingDialogAllowPublicEditing-'+h("function"===t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)?r.call(o,{name:"cid",hash:{},data:i}):r)+'">'+h("function"===t(r=null!=(r=n.publicEditingLabel||(null!=a?a.publicEditingLabel:a))?r:d)?r.call(o,{name:"publicEditingLabel",hash:{},data:i}):r)+"</label>\n\t\t\t\t</span>\n\t\t\t</li>\n"},5:function(e,a,t,n,s){return'checked="checked"'},7:function(e,a,t,n,s){return'disabled="disabled"'},9:function(e,a,t,n,s){return"hidden"},11:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h=e.escapeExpression;return'\t\t\t<li>\n\t\t\t\t<span class="shareOption menuitem">\n\t\t\t\t\t<span class="icon-loading-small hidden"></span>\n\t\t\t\t\t<input type="checkbox" name="passwordByTalk" id="passwordByTalk-'+h("function"===t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)?r.call(o,{name:"cid",hash:{},data:i}):r)+'" class="checkbox passwordByTalkCheckbox"\n\t\t\t\t\t'+(null!=(l=n.if.call(o,null!=a?a.isPasswordByTalkSet:a,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?l:"")+' />\n\t\t\t\t\t<label for="passwordByTalk-'+h("function"===t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)?r.call(o,{name:"cid",hash:{},data:i}):r)+'">'+h("function"===t(r=null!=(r=n.passwordByTalkLabel||(null!=a?a.passwordByTalkLabel:a))?r:d)?r.call(o,{name:"passwordByTalkLabel",hash:{},data:i}):r)+"</label>\n\t\t\t\t</span>\n\t\t\t</li>\n"},13:function(e,a,t,n,s){return"datepicker"},15:function(e,a,t,n,s){var i;return e.propertyIsEnumerable,e.escapeExpression("function"==typeof(i=null!=(i=t.expireDate||(null!=a?a.expireDate:a))?i:e.hooks.helperMissing)?i.call(null!=a?a:e.nullContext||{},{name:"expireDate",hash:{},data:s}):i)},17:function(e,a,t,n,s){var i;return e.propertyIsEnumerable,e.escapeExpression("function"==typeof(i=null!=(i=t.defaultExpireDate||(null!=a?a.defaultExpireDate:a))?i:e.hooks.helperMissing)?i.call(null!=a?a:e.nullContext||{},{name:"defaultExpireDate",hash:{},data:s}):i)},19:function(e,a,t,n,s){return"readonly"},21:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r=null!=a?a:e.nullContext||{},o=e.hooks.helperMissing,d=e.escapeExpression;return'\t\t\t<li>\n\t\t\t\t<a href="#" class="menuitem pop-up" data-url="'+d("function"===t(l=null!=(l=n.url||(null!=a?a.url:a))?l:o)?l.call(r,{name:"url",hash:{},data:i}):l)+'" data-window="'+d("function"===t(l=null!=(l=n.newWindow||(null!=a?a.newWindow:a))?l:o)?l.call(r,{name:"newWindow",hash:{},data:i}):l)+'">\n\t\t\t\t\t<span class="icon '+d("function"===t(l=null!=(l=n.iconClass||(null!=a?a.iconClass:a))?l:o)?l.call(r,{name:"iconClass",hash:{},data:i}):l)+'"></span>\n\t\t\t\t\t<span>'+d("function"===t(l=null!=(l=n.label||(null!=a?a.label:a))?l:o)?l.call(r,{name:"label",hash:{},data:i}):l)+"</span>\n\t\t\t\t</a>\n\t\t\t</li>\n"},compiler:[8,">= 4.3.0"],main:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h="function",c=e.escapeExpression;return'<div class="popovermenu menu">\n\t<ul>\n\t\t<li class="hidden linkTextMenu">\n\t\t\t<span class="menuitem icon-link-text">\n\t\t\t\t<input id="linkText-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'" class="linkText" type="text" readonly="readonly" value="'+c(t(r=null!=(r=n.shareLinkURL||(null!=a?a.shareLinkURL:a))?r:d)===h?r.call(o,{name:"shareLinkURL",hash:{},data:i}):r)+'" />\n\t\t\t</span>\n\t\t</li>\n'+(null!=(l=n.if.call(o,null!=a?a.publicUpload:a,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?l:"")+(null!=(l=n.if.call(o,null!=a?a.publicEditing:a,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?l:"")+'\t\t\t<li>\n\t\t\t\t<span class="menuitem">\n\t\t\t\t\t<span class="icon-loading-small hidden"></span>\n\t\t\t\t\t<input type="checkbox" name="hideDownload" id="sharingDialogHideDownload-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'" class="checkbox hideDownloadCheckbox"\n\t\t\t\t\t'+(null!=(l=n.if.call(o,null!=a?a.hideDownload:a,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?l:"")+' />\n\t\t\t\t\t<label for="sharingDialogHideDownload-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.hideDownloadLabel||(null!=a?a.hideDownloadLabel:a))?r:d)===h?r.call(o,{name:"hideDownloadLabel",hash:{},data:i}):r)+'</label>\n\t\t\t\t</span>\n\t\t\t</li>\n\t\t\t<li>\n\t\t\t\t<span class="menuitem">\n\t\t\t\t\t<input type="checkbox" name="showPassword" id="showPassword-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'" class="checkbox showPasswordCheckbox"\n\t\t\t\t\t'+(null!=(l=n.if.call(o,null!=a?a.isPasswordSet:a,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?l:"")+" "+(null!=(l=n.if.call(o,null!=a?a.isPasswordEnforced:a,{name:"if",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?l:"")+' value="1" />\n\t\t\t\t\t<label for="showPassword-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.enablePasswordLabel||(null!=a?a.enablePasswordLabel:a))?r:d)===h?r.call(o,{name:"enablePasswordLabel",hash:{},data:i}):r)+'</label>\n\t\t\t\t</span>\n\t\t\t</li>\n\t\t\t<li class="'+(null!=(l=n.unless.call(o,null!=a?a.isPasswordSet:a,{name:"unless",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))?l:"")+' linkPassMenu">\n\t\t\t\t<span class="menuitem icon-share-pass">\n\t\t\t\t\t<input id="linkPassText-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'" class="linkPassText" type="password" placeholder="'+c(t(r=null!=(r=n.passwordPlaceholder||(null!=a?a.passwordPlaceholder:a))?r:d)===h?r.call(o,{name:"passwordPlaceholder",hash:{},data:i}):r)+'" autocomplete="new-password" />\n\t\t\t\t\t<input type="submit" class="icon-confirm share-pass-submit" value="" />\n\t\t\t\t\t<span class="icon icon-loading-small hidden"></span>\n\t\t\t\t</span>\n\t\t\t</li>\n'+(null!=(l=n.if.call(o,null!=a?a.showPasswordByTalkCheckBox:a,{name:"if",hash:{},fn:e.program(11,i,0),inverse:e.noop,data:i}))?l:"")+'\t\t<li>\n\t\t\t<span class="menuitem">\n\t\t\t\t<input id="expireDate-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'" type="checkbox" name="expirationDate" class="expireDate checkbox"\n\t\t\t\t'+(null!=(l=n.if.call(o,null!=a?a.hasExpireDate:a,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?l:"")+" "+(null!=(l=n.if.call(o,null!=a?a.isExpirationEnforced:a,{name:"if",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?l:"")+' />\n\t\t\t\t<label for="expireDate-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.expireDateLabel||(null!=a?a.expireDateLabel:a))?r:d)===h?r.call(o,{name:"expireDateLabel",hash:{},data:i}):r)+'</label>\n\t\t\t</span>\n\t\t</li>\n\t\t<li class="'+(null!=(l=n.unless.call(o,null!=a?a.hasExpireDate:a,{name:"unless",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))?l:"")+'">\n\t\t\t<span class="menuitem icon-expiredate expirationDateContainer-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'">\n\t\t\t\t<label for="expirationDatePicker-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'" class="hidden-visually" value="'+c(t(r=null!=(r=n.expirationDate||(null!=a?a.expirationDate:a))?r:d)===h?r.call(o,{name:"expirationDate",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.expirationLabel||(null!=a?a.expirationLabel:a))?r:d)===h?r.call(o,{name:"expirationLabel",hash:{},data:i}):r)+'</label>\n\t\t\t\t\x3c!-- do not use the datepicker if enforced --\x3e\n\t\t\t\t<input id="expirationDatePicker-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+'" class="'+(null!=(l=n.unless.call(o,null!=a?a.isExpirationEnforced:a,{name:"unless",hash:{},fn:e.program(13,i,0),inverse:e.noop,data:i}))?l:"")+'" type="text"\n\t\t\t\t\tplaceholder="'+c(t(r=null!=(r=n.expirationDatePlaceholder||(null!=a?a.expirationDatePlaceholder:a))?r:d)===h?r.call(o,{name:"expirationDatePlaceholder",hash:{},data:i}):r)+'" value="'+(null!=(l=n.if.call(o,null!=a?a.hasExpireDate:a,{name:"if",hash:{},fn:e.program(15,i,0),inverse:e.program(17,i,0),data:i}))?l:"")+'"\n\t\t\t\t\tdata-max-date="'+c(t(r=null!=(r=n.maxDate||(null!=a?a.maxDate:a))?r:d)===h?r.call(o,{name:"maxDate",hash:{},data:i}):r)+'" '+(null!=(l=n.if.call(o,null!=a?a.isExpirationEnforced:a,{name:"if",hash:{},fn:e.program(19,i,0),inverse:e.noop,data:i}))?l:"")+' />\n\t\t\t</span>\n\t\t\t</li>\n\t\t<li>\n\t\t\t<a href="#" class="share-add">\n\t\t\t\t<span class="icon-loading-small hidden"></span>\n\t\t\t\t<span class="icon icon-edit"></span>\n\t\t\t\t<span>'+c(t(r=null!=(r=n.addNoteLabel||(null!=a?a.addNoteLabel:a))?r:d)===h?r.call(o,{name:"addNoteLabel",hash:{},data:i}):r)+'</span>\n\t\t\t\t<input type="button" class="share-note-delete icon-delete '+(null!=(l=n.unless.call(o,null!=a?a.hasNote:a,{name:"unless",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))?l:"")+'">\n\t\t\t</a>\n\t\t</li>\n\t\t<li class="share-note-form share-note-link '+(null!=(l=n.unless.call(o,null!=a?a.hasNote:a,{name:"unless",hash:{},fn:e.program(9,i,0),inverse:e.noop,data:i}))?l:"")+'">\n\t\t\t<span class="menuitem icon-note">\n\t\t\t\t<textarea class="share-note">'+c(t(r=null!=(r=n.shareNote||(null!=a?a.shareNote:a))?r:d)===h?r.call(o,{name:"shareNote",hash:{},data:i}):r)+'</textarea>\n\t\t\t\t<input type="submit" class="icon-confirm share-note-submit" value="" id="add-note-'+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" />\n\t\t\t</span>\n\t\t</li>\n'+(null!=(l=n.each.call(o,null!=a?a.social:a,{name:"each",hash:{},fn:e.program(21,i,0),inverse:e.noop,data:i}))?l:"")+'\t\t<li>\n\t\t\t<a href="#" class="unshare"><span class="icon-loading-small hidden"></span><span class="icon icon-delete"></span><span>'+c(t(r=null!=(r=n.unshareLinkLabel||(null!=a?a.unshareLinkLabel:a))?r:d)===h?r.call(o,{name:"unshareLinkLabel",hash:{},data:i}):r)+'</span></a>\n\t\t</li>\n\t\t<li>\n\t\t\t<a href="#" class="new-share">\n\t\t\t\t<span class="icon-loading-small hidden"></span>\n\t\t\t\t<span class="icon icon-add"></span>\n\t\t\t\t<span>'+c(t(r=null!=(r=n.newShareLabel||(null!=a?a.newShareLabel:a))?r:d)===h?r.call(o,{name:"newShareLabel",hash:{},data:i}):r)+"</span>\n\t\t\t</a>\n\t\t</li>\n\t</ul>\n</div>\n"},useData:!0}),s.sharedialoglinkshareview_popover_menu_pending=n({1:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r=null!=a?a:e.nullContext||{},o=e.hooks.helperMissing,d=e.escapeExpression;return'\t\t\t<li>\n\t\t\t\t<span class="menuitem icon-info">\n\t\t\t\t\t<p>'+d("function"===t(l=null!=(l=n.enforcedPasswordLabel||(null!=a?a.enforcedPasswordLabel:a))?l:o)?l.call(r,{name:"enforcedPasswordLabel",hash:{},data:i}):l)+'</p>\n\t\t\t\t</span>\n\t\t\t</li>\n\t\t\t<li class="linkPassMenu">\n\t\t\t\t<span class="menuitem">\n\t\t\t\t\t<form autocomplete="off" class="enforcedPassForm">\n\t\t\t\t\t\t<input id="enforcedPassText" required class="enforcedPassText" type="password"\n\t\t\t\t\t\t\tplaceholder="'+d("function"===t(l=null!=(l=n.passwordPlaceholder||(null!=a?a.passwordPlaceholder:a))?l:o)?l.call(r,{name:"passwordPlaceholder",hash:{},data:i}):l)+'" autocomplete="enforcedPassText" minlength="'+d("function"===t(l=null!=(l=n.minPasswordLength||(null!=a?a.minPasswordLength:a))?l:o)?l.call(r,{name:"minPasswordLength",hash:{},data:i}):l)+'" />\n\t\t\t\t\t\t<input type="submit" value=" " class="primary icon-checkmark-white">\n\t\t\t\t\t</form>\n\t\t\t\t</span>\n\t\t\t</li>\n'},compiler:[8,">= 4.3.0"],main:function(e,a,t,n,s){var i;return e.propertyIsEnumerable,'<div class="popovermenu open menu pending">\n\t<ul>\n'+(null!=(i=t.if.call(null!=a?a:e.nullContext||{},null!=a?a.isPasswordEnforced:a,{name:"if",hash:{},fn:e.program(1,s,0),inverse:e.noop,data:s}))?i:"")+"\t</ul>\n</div>\n"},useData:!0}),s.sharedialogresharerinfoview=n({1:function(e,a,t,n,s){var i;return e.propertyIsEnumerable,'<div class="share-note">'+e.escapeExpression("function"==typeof(i=null!=(i=t.shareNote||(null!=a?a.shareNote:a))?i:e.hooks.helperMissing)?i.call(null!=a?a:e.nullContext||{},{name:"shareNote",hash:{},data:s}):i)+"</div>"},compiler:[8,">= 4.3.0"],main:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h=e.escapeExpression;return'<span class="reshare">\n\t<div class="avatar" data-userName="'+h("function"===t(r=null!=(r=n.reshareOwner||(null!=a?a.reshareOwner:a))?r:d)?r.call(o,{name:"reshareOwner",hash:{},data:i}):r)+'"></div>\n\t'+h("function"===t(r=null!=(r=n.sharedByText||(null!=a?a.sharedByText:a))?r:d)?r.call(o,{name:"sharedByText",hash:{},data:i}):r)+"\n</span>\n"+(null!=(l=n.if.call(o,null!=a?a.hasShareNote:a,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?l:"")+"\n"},useData:!0}),s.sharedialogshareelistview=n({1:function(e,a,t,n,s){var i;return e.propertyIsEnumerable,null!=(i=t.unless.call(null!=a?a:e.nullContext||{},null!=a?a.isShareWithCurrentUser:a,{name:"unless",hash:{},fn:e.program(2,s,0),inverse:e.noop,data:s}))?i:""},2:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h="function",c=e.escapeExpression;return'\t\t<li data-share-id="'+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" data-share-type="'+c(t(r=null!=(r=n.shareType||(null!=a?a.shareType:a))?r:d)===h?r.call(o,{name:"shareType",hash:{},data:i}):r)+'" data-share-with="'+c(t(r=null!=(r=n.shareWith||(null!=a?a.shareWith:a))?r:d)===h?r.call(o,{name:"shareWith",hash:{},data:i}):r)+'">\n\t\t\t<div class="avatar '+(null!=(l=n.if.call(o,null!=a?a.modSeed:a,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?l:"")+'" data-username="'+c(t(r=null!=(r=n.shareWith||(null!=a?a.shareWith:a))?r:d)===h?r.call(o,{name:"shareWith",hash:{},data:i}):r)+'" data-avatar="'+c(t(r=null!=(r=n.shareWithAvatar||(null!=a?a.shareWithAvatar:a))?r:d)===h?r.call(o,{name:"shareWithAvatar",hash:{},data:i}):r)+'" data-displayname="'+c(t(r=null!=(r=n.shareWithDisplayName||(null!=a?a.shareWithDisplayName:a))?r:d)===h?r.call(o,{name:"shareWithDisplayName",hash:{},data:i}):r)+'" '+(null!=(l=n.if.call(o,null!=a?a.modSeed:a,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?l:"")+'></div>\n\t\t\t<span class="username" title="'+c(t(r=null!=(r=n.shareWithTitle||(null!=a?a.shareWithTitle:a))?r:d)===h?r.call(o,{name:"shareWithTitle",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.shareWithDisplayName||(null!=a?a.shareWithDisplayName:a))?r:d)===h?r.call(o,{name:"shareWithDisplayName",hash:{},data:i}):r)+"</span>\n"+(null!=(l=n.if.call(o,null!=a?a.canUpdateShareSettings:a,{name:"if",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?l:"")+"\t\t</li>\n"},3:function(e,a,t,n,s){return"imageplaceholderseed"},5:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r=null!=a?a:e.nullContext||{},o=e.hooks.helperMissing,d=e.escapeExpression;return'data-seed="'+d("function"===t(l=null!=(l=n.shareWith||(null!=a?a.shareWith:a))?l:o)?l.call(r,{name:"shareWith",hash:{},data:i}):l)+" "+d("function"===t(l=null!=(l=n.shareType||(null!=a?a.shareType:a))?l:o)?l.call(r,{name:"shareType",hash:{},data:i}):l)+'"'},7:function(e,a,t,n,s){e.propertyIsEnumerable;var i,l,r=null!=a?a:e.nullContext||{};return'\t\t\t<span class="sharingOptionsGroup">\n'+(null!=(i=t.if.call(r,null!=a?a.editPermissionPossible:a,{name:"if",hash:{},fn:e.program(8,s,0),inverse:e.noop,data:s}))?i:"")+'\t\t\t\t<div tabindex="0" class="share-menu"><span class="icon icon-more"></span>\n\t\t\t\t\t'+(null!=(i="function"==typeof(l=null!=(l=t.popoverMenu||(null!=a?a.popoverMenu:a))?l:e.hooks.helperMissing)?l.call(r,{name:"popoverMenu",hash:{},data:s}):l)?i:"")+"\n\t\t\t\t</div>\n\t\t\t</span>\n"},8:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r=null!=a?a:e.nullContext||{},o=e.hooks.helperMissing,d="function",h=e.escapeExpression;return'\t\t\t\t\t<span>\n\t\t\t\t\t\t<input id="canEdit-'+h(t(l=null!=(l=n.cid||(null!=a?a.cid:a))?l:o)===d?l.call(r,{name:"cid",hash:{},data:i}):l)+"-"+h(t(l=null!=(l=n.shareId||(null!=a?a.shareId:a))?l:o)===d?l.call(r,{name:"shareId",hash:{},data:i}):l)+'" type="checkbox" name="edit" class="permissions checkbox" />\n\t\t\t\t\t\t<label for="canEdit-'+h(t(l=null!=(l=n.cid||(null!=a?a.cid:a))?l:o)===d?l.call(r,{name:"cid",hash:{},data:i}):l)+"-"+h(t(l=null!=(l=n.shareId||(null!=a?a.shareId:a))?l:o)===d?l.call(r,{name:"shareId",hash:{},data:i}):l)+'">'+h(t(l=null!=(l=n.canEditLabel||(null!=a?a.canEditLabel:a))?l:o)===d?l.call(r,{name:"canEditLabel",hash:{},data:i}):l)+"</label>\n\t\t\t\t\t</span>\n"},10:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r=null!=a?a:e.nullContext||{},o=e.hooks.helperMissing,d="function",h=e.escapeExpression;return'\t\t<li data-share-id="'+h(t(l=null!=(l=n.shareId||(null!=a?a.shareId:a))?l:o)===d?l.call(r,{name:"shareId",hash:{},data:i}):l)+'" data-share-type="'+h(t(l=null!=(l=n.shareType||(null!=a?a.shareType:a))?l:o)===d?l.call(r,{name:"shareType",hash:{},data:i}):l)+'">\n\t\t\t<div class="avatar" data-username="'+h(t(l=null!=(l=n.shareInitiator||(null!=a?a.shareInitiator:a))?l:o)===d?l.call(r,{name:"shareInitiator",hash:{},data:i}):l)+'"></div>\n\t\t\t<span class="has-tooltip username" title="'+h(t(l=null!=(l=n.shareInitiator||(null!=a?a.shareInitiator:a))?l:o)===d?l.call(r,{name:"shareInitiator",hash:{},data:i}):l)+'">'+h(t(l=null!=(l=n.shareInitiatorText||(null!=a?a.shareInitiatorText:a))?l:o)===d?l.call(r,{name:"shareInitiatorText",hash:{},data:i}):l)+'</span>\n\t\t\t<span class="sharingOptionsGroup">\n\t\t\t\t<a href="#" class="unshare"><span class="icon-loading-small hidden"></span><span class="icon icon-delete"></span><span class="hidden-visually">'+h(t(l=null!=(l=n.unshareLabel||(null!=a?a.unshareLabel:a))?l:o)===d?l.call(r,{name:"unshareLabel",hash:{},data:i}):l)+"</span></a>\n\t\t\t</span>\n\t\t</li>\n"},compiler:[8,">= 4.3.0"],main:function(e,a,t,n,s){e.propertyIsEnumerable;var i,l=null!=a?a:e.nullContext||{};return'<ul id="shareWithList" class="shareWithList">\n'+(null!=(i=t.each.call(l,null!=a?a.sharees:a,{name:"each",hash:{},fn:e.program(1,s,0),inverse:e.noop,data:s}))?i:"")+(null!=(i=t.each.call(l,null!=a?a.linkReshares:a,{name:"each",hash:{},fn:e.program(10,s,0),inverse:e.noop,data:s}))?i:"")+"</ul>\n"},useData:!0}),s.sharedialogshareelistview_popover_menu=n({1:function(e,a,t,n,s){var i;return e.propertyIsEnumerable," "+(null!=(i=t.if.call(null!=a?a:e.nullContext||{},null!=a?a.sharePermissionPossible:a,{name:"if",hash:{},fn:e.program(2,s,0),inverse:e.noop,data:s}))?i:"")+" "},2:function(e,a,t,n,s){var i;return e.propertyIsEnumerable," "+(null!=(i=t.unless.call(null!=a?a:e.nullContext||{},null!=a?a.isMailShare:a,{name:"unless",hash:{},fn:e.program(3,s,0),inverse:e.noop,data:s}))?i:"")+" "},3:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h="function",c=e.escapeExpression;return'\n\t\t\t<li>\n\t\t\t\t<span class="menuitem">\n\t\t\t\t\t<input id="canShare-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" type="checkbox" name="share" class="permissions checkbox" '+(null!=(l=n.if.call(o,null!=a?a.hasSharePermission:a,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?l:"")+' data-permissions="'+c(t(r=null!=(r=n.sharePermission||(null!=a?a.sharePermission:a))?r:d)===h?r.call(o,{name:"sharePermission",hash:{},data:i}):r)+'" />\n\t\t\t\t\t<label for="canShare-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.canShareLabel||(null!=a?a.canShareLabel:a))?r:d)===h?r.call(o,{name:"canShareLabel",hash:{},data:i}):r)+"</label>\n\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t"},4:function(e,a,t,n,s){return'checked="checked"'},6:function(e,a,t,n,s){e.propertyIsEnumerable;var i,l=null!=a?a:e.nullContext||{};return"\t\t\t"+(null!=(i=t.if.call(l,null!=a?a.createPermissionPossible:a,{name:"if",hash:{},fn:e.program(7,s,0),inverse:e.noop,data:s}))?i:"")+"\n\t\t\t"+(null!=(i=t.if.call(l,null!=a?a.updatePermissionPossible:a,{name:"if",hash:{},fn:e.program(10,s,0),inverse:e.noop,data:s}))?i:"")+"\n\t\t\t"+(null!=(i=t.if.call(l,null!=a?a.deletePermissionPossible:a,{name:"if",hash:{},fn:e.program(13,s,0),inverse:e.noop,data:s}))?i:"")+"\n"},7:function(e,a,t,n,s){var i;return e.propertyIsEnumerable,null!=(i=t.unless.call(null!=a?a:e.nullContext||{},null!=a?a.isMailShare:a,{name:"unless",hash:{},fn:e.program(8,s,0),inverse:e.noop,data:s}))?i:""},8:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h="function",c=e.escapeExpression;return'\n\t\t\t\t<li>\n\t\t\t\t\t<span class="menuitem">\n\t\t\t\t\t\t<input id="canCreate-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" type="checkbox" name="create" class="permissions checkbox" '+(null!=(l=n.if.call(o,null!=a?a.hasCreatePermission:a,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?l:"")+' data-permissions="'+c(t(r=null!=(r=n.createPermission||(null!=a?a.createPermission:a))?r:d)===h?r.call(o,{name:"createPermission",hash:{},data:i}):r)+'"/>\n\t\t\t\t\t\t<label for="canCreate-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.createPermissionLabel||(null!=a?a.createPermissionLabel:a))?r:d)===h?r.call(o,{name:"createPermissionLabel",hash:{},data:i}):r)+"</label>\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t"},10:function(e,a,t,n,s){var i;return e.propertyIsEnumerable,null!=(i=t.unless.call(null!=a?a:e.nullContext||{},null!=a?a.isMailShare:a,{name:"unless",hash:{},fn:e.program(11,s,0),inverse:e.noop,data:s}))?i:""},11:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h="function",c=e.escapeExpression;return'\n\t\t\t\t<li>\n\t\t\t\t\t<span class="menuitem">\n\t\t\t\t\t\t<input id="canUpdate-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" type="checkbox" name="update" class="permissions checkbox" '+(null!=(l=n.if.call(o,null!=a?a.hasUpdatePermission:a,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?l:"")+' data-permissions="'+c(t(r=null!=(r=n.updatePermission||(null!=a?a.updatePermission:a))?r:d)===h?r.call(o,{name:"updatePermission",hash:{},data:i}):r)+'"/>\n\t\t\t\t\t\t<label for="canUpdate-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.updatePermissionLabel||(null!=a?a.updatePermissionLabel:a))?r:d)===h?r.call(o,{name:"updatePermissionLabel",hash:{},data:i}):r)+"</label>\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t\t"},13:function(e,a,t,n,s){var i;return e.propertyIsEnumerable,null!=(i=t.unless.call(null!=a?a:e.nullContext||{},null!=a?a.isMailShare:a,{name:"unless",hash:{},fn:e.program(14,s,0),inverse:e.noop,data:s}))?i:""},14:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h="function",c=e.escapeExpression;return'\n\t\t\t\t<li>\n\t\t\t\t\t<span class="menuitem">\n\t\t\t\t\t\t<input id="canDelete-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" type="checkbox" name="delete" class="permissions checkbox" '+(null!=(l=n.if.call(o,null!=a?a.hasDeletePermission:a,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?l:"")+' data-permissions="'+c(t(r=null!=(r=n.deletePermission||(null!=a?a.deletePermission:a))?r:d)===h?r.call(o,{name:"deletePermission",hash:{},data:i}):r)+'"/>\n\t\t\t\t\t\t<label for="canDelete-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.deletePermissionLabel||(null!=a?a.deletePermissionLabel:a))?r:d)===h?r.call(o,{name:"deletePermissionLabel",hash:{},data:i}):r)+"</label>\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t\t"},16:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h="function",c=e.escapeExpression;return(null!=(l=n.if.call(o,null!=a?a.hasCreatePermission:a,{name:"if",hash:{},fn:e.program(17,i,0),inverse:e.noop,data:i}))?l:"")+'\t\t\t<li>\n\t\t\t\t<span class="menuitem">\n\t\t\t\t\t<input id="password-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" type="checkbox" name="password" class="password checkbox" '+(null!=(l=n.if.call(o,null!=a?a.isPasswordSet:a,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?l:"")+(null!=(l=n.if.call(o,null!=a?a.isPasswordSet:a,{name:"if",hash:{},fn:e.program(19,i,0),inverse:e.noop,data:i}))?l:"")+'" />\n\t\t\t\t\t<label for="password-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.passwordLabel||(null!=a?a.passwordLabel:a))?r:d)===h?r.call(o,{name:"passwordLabel",hash:{},data:i}):r)+'</label>\n\t\t\t\t</span>\n\t\t\t</li>\n\t\t\t<li class="passwordMenu-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+" "+(null!=(l=n.unless.call(o,null!=a?a.isPasswordSet:a,{name:"unless",hash:{},fn:e.program(22,i,0),inverse:e.noop,data:i}))?l:"")+'">\n\t\t\t\t<span class="passwordContainer-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+' icon-passwordmail menuitem">\n\t\t\t\t\t<label for="passwordField-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" class="hidden-visually" value="'+c(t(r=null!=(r=n.password||(null!=a?a.password:a))?r:d)===h?r.call(o,{name:"password",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.passwordLabel||(null!=a?a.passwordLabel:a))?r:d)===h?r.call(o,{name:"passwordLabel",hash:{},data:i}):r)+'</label>\n\t\t\t\t\t<input id="passwordField-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" class="passwordField" type="password" placeholder="'+c(t(r=null!=(r=n.passwordPlaceholder||(null!=a?a.passwordPlaceholder:a))?r:d)===h?r.call(o,{name:"passwordPlaceholder",hash:{},data:i}):r)+'" value="'+c(t(r=null!=(r=n.passwordValue||(null!=a?a.passwordValue:a))?r:d)===h?r.call(o,{name:"passwordValue",hash:{},data:i}):r)+'" autocomplete="new-password" />\n\t\t\t\t\t<span class="icon-loading-small hidden"></span>\n\t\t\t\t</span>\n\t\t\t</li>\n'+(null!=(l=n.if.call(o,null!=a?a.isTalkEnabled:a,{name:"if",hash:{},fn:e.program(24,i,0),inverse:e.noop,data:i}))?l:"")},17:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h="function",c=e.escapeExpression;return'\t\t\t\t<li>\n\t\t\t\t\t<span class="menuitem">\n\t\t\t\t\t\t<input id="secureDrop-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" type="checkbox" name="secureDrop" class="checkbox secureDrop" '+(null!=(l=n.if.call(o,null!=a?a.secureDropMode:a,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?l:"")+' data-permissions="'+c(t(r=null!=(r=n.readPermission||(null!=a?a.readPermission:a))?r:d)===h?r.call(o,{name:"readPermission",hash:{},data:i}):r)+'"/>\n\t\t\t\t\t\t<label for="secureDrop-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.secureDropLabel||(null!=a?a.secureDropLabel:a))?r:d)===h?r.call(o,{name:"secureDropLabel",hash:{},data:i}):r)+"</label>\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n"},19:function(e,a,t,n,s){var i;return e.propertyIsEnumerable,null!=(i=t.if.call(null!=a?a:e.nullContext||{},null!=a?a.isPasswordForMailSharesRequired:a,{name:"if",hash:{},fn:e.program(20,s,0),inverse:e.noop,data:s}))?i:""},20:function(e,a,t,n,s){return'disabled=""'},22:function(e,a,t,n,s){return"hidden"},24:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h="function",c=e.escapeExpression;return'\t\t\t\t<li>\n\t\t\t\t\t<span class="menuitem">\n\t\t\t\t\t\t<input id="passwordByTalk-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" type="checkbox" name="passwordByTalk" class="passwordByTalk checkbox" '+(null!=(l=n.if.call(o,null!=a?a.isPasswordByTalkSet:a,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?l:"")+' />\n\t\t\t\t\t\t<label for="passwordByTalk-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.passwordByTalkLabel||(null!=a?a.passwordByTalkLabel:a))?r:d)===h?r.call(o,{name:"passwordByTalkLabel",hash:{},data:i}):r)+'</label>\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t\t<li class="passwordByTalkMenu-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+" "+(null!=(l=n.unless.call(o,null!=a?a.isPasswordByTalkSet:a,{name:"unless",hash:{},fn:e.program(22,i,0),inverse:e.noop,data:i}))?l:"")+'">\n\t\t\t\t\t<span class="passwordByTalkContainer-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+' icon-passwordtalk menuitem">\n\t\t\t\t\t\t<label for="passwordByTalkField-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" class="hidden-visually" value="'+c(t(r=null!=(r=n.password||(null!=a?a.password:a))?r:d)===h?r.call(o,{name:"password",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.passwordByTalkLabel||(null!=a?a.passwordByTalkLabel:a))?r:d)===h?r.call(o,{name:"passwordByTalkLabel",hash:{},data:i}):r)+'</label>\n\t\t\t\t\t\t<input id="passwordByTalkField-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" class="passwordField" type="password" placeholder="'+c(t(r=null!=(r=n.passwordByTalkPlaceholder||(null!=a?a.passwordByTalkPlaceholder:a))?r:d)===h?r.call(o,{name:"passwordByTalkPlaceholder",hash:{},data:i}):r)+'" value="'+c(t(r=null!=(r=n.passwordValue||(null!=a?a.passwordValue:a))?r:d)===h?r.call(o,{name:"passwordValue",hash:{},data:i}):r)+'" autocomplete="new-password" />\n\t\t\t\t\t\t<span class="icon-loading-small hidden"></span>\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n'},26:function(e,a,t,n,s){var i;return e.propertyIsEnumerable,e.escapeExpression("function"==typeof(i=null!=(i=t.expireDate||(null!=a?a.expireDate:a))?i:e.hooks.helperMissing)?i.call(null!=a?a:e.nullContext||{},{name:"expireDate",hash:{},data:s}):i)},28:function(e,a,t,n,s){var i;return e.propertyIsEnumerable,e.escapeExpression("function"==typeof(i=null!=(i=t.defaultExpireDate||(null!=a?a.defaultExpireDate:a))?i:e.hooks.helperMissing)?i.call(null!=a?a:e.nullContext||{},{name:"defaultExpireDate",hash:{},data:s}):i)},30:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h=e.escapeExpression;return'\t\t\t<li>\n\t\t\t\t<a href="#" class="share-add">\n\t\t\t\t\t<span class="icon-loading-small hidden"></span>\n\t\t\t\t\t<span class="icon icon-edit"></span>\n\t\t\t\t\t<span>'+h("function"===t(r=null!=(r=n.addNoteLabel||(null!=a?a.addNoteLabel:a))?r:d)?r.call(o,{name:"addNoteLabel",hash:{},data:i}):r)+'</span>\n\t\t\t\t\t<input type="button" class="share-note-delete icon-delete '+(null!=(l=n.unless.call(o,null!=a?a.hasNote:a,{name:"unless",hash:{},fn:e.program(22,i,0),inverse:e.noop,data:i}))?l:"")+'">\n\t\t\t\t</a>\n\t\t\t</li>\n\t\t\t<li class="share-note-form '+(null!=(l=n.unless.call(o,null!=a?a.hasNote:a,{name:"unless",hash:{},fn:e.program(22,i,0),inverse:e.noop,data:i}))?l:"")+'">\n\t\t\t\t<span class="menuitem icon-note">\n\t\t\t\t\t<textarea class="share-note">'+h("function"===t(r=null!=(r=n.shareNote||(null!=a?a.shareNote:a))?r:d)?r.call(o,{name:"shareNote",hash:{},data:i}):r)+'</textarea>\n\t\t\t\t\t<input type="submit" class="icon-confirm share-note-submit" value="" id="add-note-'+h("function"===t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" />\n\t\t\t\t</span>\n\t\t\t</li>\n'},compiler:[8,">= 4.3.0"],main:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r,o=null!=a?a:e.nullContext||{},d=e.hooks.helperMissing,h="function",c=e.escapeExpression;return'<div class="popovermenu bubble hidden menu">\n\t<ul>\n\t\t'+(null!=(l=n.if.call(o,null!=a?a.isResharingAllowed:a,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?l:"")+"\n"+(null!=(l=n.if.call(o,null!=a?a.isFolder:a,{name:"if",hash:{},fn:e.program(6,i,0),inverse:e.noop,data:i}))?l:"")+(null!=(l=n.if.call(o,null!=a?a.isMailShare:a,{name:"if",hash:{},fn:e.program(16,i,0),inverse:e.noop,data:i}))?l:"")+'\t\t<li>\n\t\t\t<span class="menuitem">\n\t\t\t\t<input id="expireDate-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" type="checkbox" name="expirationDate" class="expireDate checkbox" '+(null!=(l=n.if.call(o,null!=a?a.hasExpireDate:a,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?l:"")+'" />\n\t\t\t\t<label for="expireDate-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.expireDateLabel||(null!=a?a.expireDateLabel:a))?r:d)===h?r.call(o,{name:"expireDateLabel",hash:{},data:i}):r)+'</label>\n\t\t\t</span>\n\t\t</li>\n\t\t<li class="expirationDateMenu-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+" "+(null!=(l=n.unless.call(o,null!=a?a.hasExpireDate:a,{name:"unless",hash:{},fn:e.program(22,i,0),inverse:e.noop,data:i}))?l:"")+'">\n\t\t\t<span class="expirationDateContainer-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+' icon-expiredate menuitem">\n\t\t\t\t<label for="expirationDatePicker-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" class="hidden-visually" value="'+c(t(r=null!=(r=n.expirationDate||(null!=a?a.expirationDate:a))?r:d)===h?r.call(o,{name:"expirationDate",hash:{},data:i}):r)+'">'+c(t(r=null!=(r=n.expirationLabel||(null!=a?a.expirationLabel:a))?r:d)===h?r.call(o,{name:"expirationLabel",hash:{},data:i}):r)+'</label>\n\t\t\t\t<input id="expirationDatePicker-'+c(t(r=null!=(r=n.cid||(null!=a?a.cid:a))?r:d)===h?r.call(o,{name:"cid",hash:{},data:i}):r)+"-"+c(t(r=null!=(r=n.shareId||(null!=a?a.shareId:a))?r:d)===h?r.call(o,{name:"shareId",hash:{},data:i}):r)+'" class="datepicker" type="text" placeholder="'+c(t(r=null!=(r=n.expirationDatePlaceholder||(null!=a?a.expirationDatePlaceholder:a))?r:d)===h?r.call(o,{name:"expirationDatePlaceholder",hash:{},data:i}):r)+'" value="'+(null!=(l=n.if.call(o,null!=a?a.hasExpireDate:a,{name:"if",hash:{},fn:e.program(26,i,0),inverse:e.program(28,i,0),data:i}))?l:"")+'" />\n\t\t\t</span>\n\t\t</li>\n'+(null!=(l=n.if.call(o,null!=a?a.isNoteAvailable:a,{name:"if",hash:{},fn:e.program(30,i,0),inverse:e.noop,data:i}))?l:"")+'\t\t<li>\n\t\t\t<a href="#" class="unshare"><span class="icon-loading-small hidden"></span><span class="icon icon-delete"></span><span>'+c(t(r=null!=(r=n.unshareLabel||(null!=a?a.unshareLabel:a))?r:d)===h?r.call(o,{name:"unshareLabel",hash:{},data:i}):r)+"</span></a>\n\t\t</li>\n\t</ul>\n</div>\n"},useData:!0}),s.sharedialogview=n({1:function(e,a,n,s,i){e.propertyIsEnumerable;var l,r=null!=a?a:e.nullContext||{},o=e.hooks.helperMissing,d=e.escapeExpression;return'\t<label for="shareWith-'+d("function"===t(l=null!=(l=n.cid||(null!=a?a.cid:a))?l:o)?l.call(r,{name:"cid",hash:{},data:i}):l)+'" class="hidden-visually">'+d("function"===t(l=null!=(l=n.shareLabel||(null!=a?a.shareLabel:a))?l:o)?l.call(r,{name:"shareLabel",hash:{},data:i}):l)+'</label>\n\t<div class="oneline">\n\t\t<input id="shareWith-'+d("function"===t(l=null!=(l=n.cid||(null!=a?a.cid:a))?l:o)?l.call(r,{name:"cid",hash:{},data:i}):l)+'" class="shareWithField" type="text" placeholder="'+d("function"===t(l=null!=(l=n.sharePlaceholder||(null!=a?a.sharePlaceholder:a))?l:o)?l.call(r,{name:"sharePlaceholder",hash:{},data:i}):l)+'" />\n\t\t<span class="shareWithLoading icon-loading-small hidden"></span>\n\t\t<span class="shareWithConfirm icon icon-confirm"></span>\n\t</div>\n'},compiler:[8,">= 4.3.0"],main:function(e,a,t,n,s){var i;return e.propertyIsEnumerable,'<div class="resharerInfoView subView"></div>\n'+(null!=(i=t.if.call(null!=a?a:e.nullContext||{},null!=a?a.isSharingAllowed:a,{name:"if",hash:{},fn:e.program(1,s,0),inverse:e.noop,data:s}))?i:"")+'<div class="linkShareView subView"></div>\n<div class="shareeListView subView"></div>\n<div class="loading hidden" style="height: 50px"></div>\n'},useData:!0})},function(e,a){!function(){OC.Share||(OC.Share={},OC.Share.Types={});var e=["id","file_parent","mail_send","file_source","item_source","permissions","storage","share_type","parent","stime"],a=OC.Backbone.Model.extend({_linkShareId:null,initialize:function(e,a){_.isUndefined(a.configModel)||(this.configModel=a.configModel),_.isUndefined(a.fileInfoModel)||(this.fileInfoModel=a.fileInfoModel),_.bindAll(this,"addShare")},defaults:{allowPublicUploadStatus:!1,permissions:0,linkShares:[]},saveLinkShare:function(e,a){a=a||{};var t,n=null;(e=_.extend({},e)).expiration&&(e.expireDate=e.expiration,delete e.expiration);var s=this.get("linkShares"),i=_.findIndex(s,(function(a){return a.id===e.cid}));return s.length>0&&-1!==i?(n=s[i].id,t=this.updateShare(n,e,a)):(e=_.defaults(e,{hideDownload:!1,password:"",passwordChanged:!1,sendPasswordByTalk:!1,permissions:OC.PERMISSION_READ,expireDate:this.configModel.getDefaultExpirationDateString(),shareType:OC.Share.SHARE_TYPE_LINK}),t=this.addShare(e,a)),t},addShare:function(e,a){e.shareType;e=_.extend({},e);var t=OC.getCapabilities().files_sharing.default_permissions||OC.PERMISSION_ALL,n=OC.PERMISSION_READ;return this.updatePermissionPossible()&&(n|=OC.PERMISSION_UPDATE),this.createPermissionPossible()&&(n|=OC.PERMISSION_CREATE),this.deletePermissionPossible()&&(n|=OC.PERMISSION_DELETE),this.configModel.get("isResharingAllowed")&&this.sharePermissionPossible()&&(n|=OC.PERMISSION_SHARE),e.permissions=t&n,_.isUndefined(e.path)&&(e.path=this.fileInfoModel.getFullPath()),this._addOrUpdateShare({type:"POST",url:this._getUrl("shares"),data:e,dataType:"json"},a)},updateShare:function(e,a,t){return this._addOrUpdateShare({type:"PUT",url:this._getUrl("shares/"+encodeURIComponent(e)),data:a,dataType:"json"},t)},_addOrUpdateShare:function(e,a){var n=this;return a=a||{},$.ajax(e).always((function(){_.isFunction(a.complete)&&a.complete(n)})).done((function(){n.fetch().done((function(){_.isFunction(a.success)&&a.success(n)}))})).fail((function(e){var s=t("core","Error"),i=e.responseJSON;i&&i.ocs&&i.ocs.meta&&(s=i.ocs.meta.message),_.isFunction(a.error)?a.error(n,s):OC.dialogs.alert(s,t("core","Error while sharing"))}))},removeShare:function(e,a){var n=this;return a=a||{},$.ajax({type:"DELETE",url:this._getUrl("shares/"+encodeURIComponent(e))}).done((function(){n.fetch({success:function(){_.isFunction(a.success)&&a.success(n)}})})).fail((function(e){var s=t("core","Error"),i=e.responseJSON;i.ocs&&i.ocs.meta&&(s=i.ocs.meta.message),_.isFunction(a.error)?a.error(n,s):OC.dialogs.alert(s,t("core","Error removing share"))}))},isPublicUploadAllowed:function(){return this.get("allowPublicUploadStatus")},isPublicEditingAllowed:function(){return this.get("allowPublicEditingStatus")},isHideFileListSet:function(){return this.get("hideFileListStatus")},isFolder:function(){return"folder"===this.get("itemType")},isFile:function(){return"file"===this.get("itemType")},hasReshare:function(){var e=this.get("reshare");return _.isObject(e)&&!_.isUndefined(e.uid_owner)},hasUserShares:function(){return this.getSharesWithCurrentItem().length>0},hasLinkShares:function(){var e=this.get("linkShares");return!!(e&&e.length>0)},getReshareOwner:function(){return this.get("reshare").uid_owner},getReshareOwnerDisplayname:function(){return this.get("reshare").displayname_owner},getReshareNote:function(){return this.get("reshare").note},getReshareWith:function(){return this.get("reshare").share_with},getReshareWithDisplayName:function(){var e=this.get("reshare");return e.share_with_displayname||e.share_with},getReshareType:function(){return this.get("reshare").share_type},getExpireDate:function(e){return this._shareExpireDate(e)},getNote:function(e){return this._shareNote(e)},getSharesWithCurrentItem:function(){var e=this.get("shares")||[],a=this.fileInfoModel.get("id");return _.filter(e,(function(e){return e.item_source===a}))},getShareWith:function(e){var a=this.get("shares")[e];if(!_.isObject(a))throw"Unknown Share";return a.share_with},getShareWithDisplayName:function(e){var a=this.get("shares")[e];if(!_.isObject(a))throw"Unknown Share";return a.share_with_displayname},getShareWithAvatar:function(e){var a=this.get("shares")[e];if(!_.isObject(a))throw"Unknown Share";return a.share_with_avatar},getSharedBy:function(e){var a=this.get("shares")[e];if(!_.isObject(a))throw"Unknown Share";return a.uid_owner},getSharedByDisplayName:function(e){var a=this.get("shares")[e];if(!_.isObject(a))throw"Unknown Share";return a.displayname_owner},getFileOwnerUid:function(e){var a=this.get("shares")[e];if(!_.isObject(a))throw"Unknown Share";return a.uid_file_owner},findShareWithIndex:function(e){var a=this.get("shares");if(!_.isArray(a))throw"Unknown Share";for(var t=0;t<a.length;t++){if(a[t].id===e)return t}throw"Unknown Sharee"},getShareType:function(e){var a=this.get("shares")[e];if(!_.isObject(a))throw"Unknown Share";return a.share_type},_shareHasPermission:function(e,a){var t=this.get("shares")[e];if(!_.isObject(t))throw"Unknown Share";return(t.permissions&a)===a},_shareExpireDate:function(e){var a=this.get("shares")[e];if(!_.isObject(a))throw"Unknown Share";return a.expiration},_shareNote:function(e){var a=this.get("shares")[e];if(!_.isObject(a))throw"Unknown Share";return a.note},getPermissions:function(){return this.get("permissions")},sharePermissionPossible:function(){return(this.get("permissions")&OC.PERMISSION_SHARE)===OC.PERMISSION_SHARE},hasSharePermission:function(e){return this._shareHasPermission(e,OC.PERMISSION_SHARE)},createPermissionPossible:function(){return(this.get("permissions")&OC.PERMISSION_CREATE)===OC.PERMISSION_CREATE},hasCreatePermission:function(e){return this._shareHasPermission(e,OC.PERMISSION_CREATE)},updatePermissionPossible:function(){return(this.get("permissions")&OC.PERMISSION_UPDATE)===OC.PERMISSION_UPDATE},hasUpdatePermission:function(e){return this._shareHasPermission(e,OC.PERMISSION_UPDATE)},deletePermissionPossible:function(){return(this.get("permissions")&OC.PERMISSION_DELETE)===OC.PERMISSION_DELETE},hasDeletePermission:function(e){return this._shareHasPermission(e,OC.PERMISSION_DELETE)},hasReadPermission:function(e){return this._shareHasPermission(e,OC.PERMISSION_READ)},editPermissionPossible:function(){return this.createPermissionPossible()||this.updatePermissionPossible()||this.deletePermissionPossible()},editPermissionState:function(e){var a=this.hasCreatePermission(e),t=this.hasUpdatePermission(e),n=this.hasDeletePermission(e);return this.isFile()?a||t||n?"checked":"":a||t||n?this.createPermissionPossible()&&!a||this.updatePermissionPossible()&&!t||this.deletePermissionPossible()&&!n?"indeterminate":"checked":""},linkSharePermissions:function(e){var a=this.get("linkShares"),t=_.findIndex(a,(function(a){return a.id===e}));return this.hasLinkShares()&&a.length>0&&-1!==t?a[t].permissions:-1},_getUrl:function(e,a){return a=_.extend({format:"json"},a||{}),OC.linkToOCS("apps/files_sharing/api/v1",2)+e+"?"+OC.buildQueryString(a)},_fetchShares:function(){var e=this.fileInfoModel.getFullPath();return $.ajax({type:"GET",url:this._getUrl("shares",{path:e,reshares:!0})})},_fetchReshare:function(){if(this._reshareFetched)return $.Deferred().resolve([{ocs:{data:[this.get("reshare")]}}]);var e=this.fileInfoModel.getFullPath();return this._reshareFetched=!0,$.ajax({type:"GET",url:this._getUrl("shares",{path:e,shared_with_me:!0})})},_groupReshares:function(e){if(!e||!e.length)return!1;var a=e.shift(),t=a.permissions;return _.each(e,(function(e){e.share_type===OC.Share.SHARE_TYPE_USER&&a.share_type===OC.Share.SHARE_TYPE_GROUP&&(a=e),t|=e.permissions})),a.permissions=t,a},fetch:function(e){var a=this;this.trigger("request",this);var t=$.when(this._fetchShares(),this._fetchReshare());return t.done((function(t,n){a.trigger("sync","GET",this);var s={};_.each(t[0].ocs.data,(function(e){s[e.id]=e}));var i=!1;n[0].ocs.data.length&&(i=a._groupReshares(n[0].ocs.data)),a.set(a.parse({shares:s,reshare:i})),!_.isUndefined(e)&&_.isFunction(e.success)&&e.success()})),t},_legacyFillCurrentShares:function(e){var a=this.fileInfoModel.get("id");if(!e||!e.length)return delete OC.Share.statuses[a],OC.Share.currentShares={},void(OC.Share.itemShares=[]);var t=OC.Share.statuses[a];t||(t={link:!1},OC.Share.statuses[a]=t),t.link=!1,OC.Share.currentShares={},OC.Share.itemShares=[],_.each(e,(function(e){e.share_type===OC.Share.SHARE_TYPE_LINK?(OC.Share.itemShares[e.share_type]=!0,t.link=!0):(OC.Share.itemShares[e.share_type]||(OC.Share.itemShares[e.share_type]=[]),OC.Share.itemShares[e.share_type].push(e.share_with))}))},parse:function(a){if(!1===a)return console.warn("no data was returned"),this.trigger("fetchError"),{};var t=this.fileInfoModel.get("permissions");_.isUndefined(a.reshare)||_.isUndefined(a.reshare.permissions)||a.reshare.uid_owner===OC.currentUser||(t&=a.reshare.permissions);var n=!1;_.isUndefined(a.shares)||$.each(a.shares,(function(e,a){if(a.share_type===OC.Share.SHARE_TYPE_LINK)return n=!!(a.permissions&OC.PERMISSION_CREATE),!0}));var s=!0;_.isUndefined(a.shares)||$.each(a.shares,(function(e,a){if(a.share_type===OC.Share.SHARE_TYPE_LINK)return s=!!(a.permissions&OC.PERMISSION_UPDATE),!0}));var i=!1;_.isUndefined(a.shares)||$.each(a.shares,(function(e,a){if(a.share_type===OC.Share.SHARE_TYPE_LINK)return i=!(a.permissions&OC.PERMISSION_READ),!0}));var l=_.map(a.shares,(function(a){var t;for(t=0;t<e.length;t++){var n=e[t];_.isUndefined(a[n])||(a[n]=parseInt(a[n],10))}return a}));this._legacyFillCurrentShares(l);var r=[];return l=_.reject(l,(function(e){if(e.share_type===OC.Share.SHARE_TYPE_LINK&&(e.file_source===this.get("itemSource")||e.item_source===this.get("itemSource"))){if(e.uid_owner!==OC.currentUser)return;window.location.protocol,window.location.host;if(e.token)OC.generateUrl("/s/")+e.token;else{var a=this.fileInfoModel.get("path")+"/"+this.fileInfoModel.get("name"),t="/"+OC.currentUser+"/files"+a,n=this.fileInfoModel.isDirectory()?"folder":"file";OC.linkTo("","public.php")+"?service=files&"+n+"="+encodeURIComponent(t)}return r.push(_.extend({},e,{hideDownload:!!e.hide_download,password:e.share_with,sendPasswordByTalk:e.send_password_by_talk})),e}}),this),{reshare:a.reshare,shares:l,linkShares:r,permissions:t,allowPublicUploadStatus:n,allowPublicEditingStatus:s,hideFileListStatus:i}},_parseTime:function(e){if(_.isString(e)){if(""===e||e.length>1&&"0"===e[0]&&"x"===e[1])return null;e=parseInt(e,10),isNaN(e)&&(e=null)}return e},getShareTypes:function(){var e;return e=_.pluck(this.getSharesWithCurrentItem(),"share_type"),this.hasLinkShares()&&e.push(OC.Share.SHARE_TYPE_LINK),_.uniq(e)}});OC.Share.ShareItemModel=a}()},function(e,a){
-/**
- * @copyright 2017, Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-!function(){OC.Share||(OC.Share={}),OC.Share.Social={};var e=OC.Backbone.Model.extend({defaults:{key:null,url:null,name:null,iconClass:null,newWindow:!0}});OC.Share.Social.Model=e;var a=OC.Backbone.Collection.extend({model:OC.Share.Social.Model,comparator:"key"});OC.Share.Social.Collection=new a}()},function(e,a){!function(){OC.Share||(OC.Share={});var e=OC.Backbone.View.extend({id:"shareDialogResharerInfo",tagName:"div",className:"reshare",configModel:void 0,_template:void 0,initialize:function(e){var a=this;if(this.model.on("change:reshare",(function(){a.render()})),_.isUndefined(e.configModel))throw"missing OC.Share.ShareConfigModel";this.configModel=e.configModel},render:function(){if(!this.model.hasReshare()||this.model.getReshareOwner()===OC.currentUser)return this.$el.empty(),this;var e=this.template(),a=this.model.getReshareOwnerDisplayname(),n=this.model.getReshareNote(),s="";return s=this.model.getReshareType()===OC.Share.SHARE_TYPE_GROUP?t("core","Shared with you and the group {group} by {owner}",{group:this.model.getReshareWithDisplayName(),owner:a},void 0,{escape:!1}):this.model.getReshareType()===OC.Share.SHARE_TYPE_CIRCLE?t("core","Shared with you and {circle} by {owner}",{circle:this.model.getReshareWithDisplayName(),owner:a},void 0,{escape:!1}):this.model.getReshareType()===OC.Share.SHARE_TYPE_ROOM?this.model.get("reshare").share_with_displayname?t("core","Shared with you and the conversation {conversation} by {owner}",{conversation:this.model.getReshareWithDisplayName(),owner:a},void 0,{escape:!1}):t("core","Shared with you in a conversation by {owner}",{owner:a},void 0,{escape:!1}):t("core","Shared with you by {owner}",{owner:a},void 0,{escape:!1}),this.$el.html(e({reshareOwner:this.model.getReshareOwner(),sharedByText:s,shareNote:n,hasShareNote:""!==n})),this.$el.find(".avatar").each((function(){var e=$(this);e.avatar(e.data("username"),32)})),this.$el.find(".reshare").contactsMenu(this.model.getReshareOwner(),OC.Share.SHARE_TYPE_USER,this.$el),this},template:function(){return OC.Share.Templates.sharedialogresharerinfoview}});OC.Share.ShareDialogResharerInfoView=e}()},function(e,a){!function(){OC.Share||(OC.Share={});var e=t("core","Choose a password for the public link"),a=t("core",'Choose a password for the public link or press the "Enter" key'),n=OC.Backbone.View.extend({id:"shareDialogLinkShare",configModel:void 0,showLink:!0,showPending:!1,password:"",newShareId:"new-share",events:{"click .share-menu .icon-more":"onToggleMenu","change .hideDownloadCheckbox":"onHideDownloadChange","click input.share-pass-submit":"onPasswordEntered","keyup input.linkPassText":"onPasswordKeyUp","change .showPasswordCheckbox":"onShowPasswordClick","change .passwordByTalkCheckbox":"onPasswordByTalkChange","change .publicEditingCheckbox":"onAllowPublicEditingChange","click .linkText":"onLinkTextClick","click .pop-up":"onPopUpClick","change .publicUploadRadio":"onPublicUploadChange","click .expireDate":"onExpireDateChange","change .datepicker":"onChangeExpirationDate","click .datepicker":"showDatePicker","click .share-add":"showNoteForm","click .share-note-delete":"deleteNote","click .share-note-submit":"updateNote","click .unshare":"onUnshare","click .new-share":"newShare","submit .enforcedPassForm":"enforcedPasswordSet"},initialize:function(e){var a=this;if(this.model.on("change:permissions",(function(){a.render()})),this.model.on("change:itemType",(function(){a.render()})),this.model.on("change:allowPublicUploadStatus",(function(){a.render()})),this.model.on("change:hideFileListStatus",(function(){a.render()})),this.model.on("change:linkShares",(function(e,t){var n,s=e.previous("linkShares");if(s.length===t.length)for(n=0;n<t.length;n++){if(t[n].id!==s[n].id)return;if(t[n].password!==s[n].password)return void a.render()}})),_.isUndefined(e.configModel))throw"missing OC.Share.ShareConfigModel";this.configModel=e.configModel;var n=new Clipboard(".clipboard-button");n.on("success",(function(e){var a=$(e.trigger);a.tooltip("hide").attr("data-original-title",t("core","Copied!")).tooltip("fixTitle").tooltip({placement:"bottom",trigger:"manual"}).tooltip("show"),_.delay((function(){a.tooltip("hide").attr("data-original-title",t("core","Copy link")).tooltip("fixTitle")}),3e3)})),n.on("error",(function(e){var a=$(e.trigger),n=a.next(".share-menu").find(".popovermenu"),s=n.find("li.linkTextMenu"),i=s.find(".linkText");a.closest("li[data-share-id]").data("share-id");OC.showMenu(null,n);var l="";l=/iPhone|iPad/i.test(navigator.userAgent)?t("core","Not supported!"):/Mac/i.test(navigator.userAgent)?t("core","Press ⌘-C to copy."):t("core","Press Ctrl-C to copy."),s.removeClass("hidden"),i.select(),i.tooltip("hide").attr("data-original-title",l).tooltip("fixTitle").tooltip({placement:"bottom",trigger:"manual"}).tooltip("show"),_.delay((function(){i.tooltip("hide"),i.attr("data-original-title",t("core","Copy")).tooltip("fixTitle")}),3e3)}))},newShare:function(e){var a=this,n=$(e.target).closest("li[data-share-id]"),s=n.data("share-id"),i=n.find(".share-menu > .icon-loading-small");if(!i.hasClass("hidden")&&""===this.password)return!1;n.find(".icon").addClass("hidden"),i.removeClass("hidden"),OC.hideMenus();var l={},r=this.configModel.get("enforcePasswordForPublicLink");if(this.configModel.get("isDefaultExpireDateEnforced")){var o=this.configModel.get("defaultExpireDate"),d=moment().add(o,"day").format("DD-MM-YYYY");l.expireDate=d}r&&""!==this.password&&(l.password=this.password);var h=!1;r&&!this.showPending&&""===this.password?(this.showPending=s,(a=this.render()).$el.find(".pending #enforcedPassText").focus()):$.when(this.model.saveLinkShare(l,{success:function(){if(i.addClass("hidden"),n.find(".icon").removeClass("hidden"),a.render(),h)a.$el.find("li[data-share-id]"),a.$el.find('li[data-share-id="'+h+'"]')},error:function(){}})).fail((function(e){if(a.password="",r&&e&&e.responseJSON&&e.responseJSON.ocs.meta&&e.responseJSON.ocs.meta.message){var s=a.$el.find(".pending #enforcedPassText");s.tooltip("destroy"),s.attr("title",e.responseJSON.ocs.meta.message),s.tooltip({placement:"bottom",trigger:"manual"}),s.tooltip("show")}else OC.Notification.showTemporary(t("core","Unable to create a link share")),i.addClass("hidden"),n.find(".icon").removeClass("hidden")})).then((function(e){h=e.ocs.data.id}))},enforcedPasswordSet:function(e){e.preventDefault();var a=$(e.target).find("input.enforcedPassText");this.password=a.val(),this.showPending=!1,this.newShare(e)},onLinkTextClick:function(e){var a=$(e.target).closest("li[data-share-id]").find(".linkText");a.focus(),a.select()},onHideDownloadChange:function(e){var a=$(e.target).closest("li[data-share-id]"),n=a.data("share-id"),s=a.find(".hideDownloadCheckbox");s.siblings(".icon-loading-small").removeClass("hidden").addClass("inlineblock");var i=!1;s.is(":checked")&&(i=!0),this.model.saveLinkShare({hideDownload:i,cid:n},{success:function(){s.siblings(".icon-loading-small").addClass("hidden").removeClass("inlineblock")},error:function(e,a){OC.Notification.showTemporary(t("core","Unable to toggle this option")),s.siblings(".icon-loading-small").addClass("hidden").removeClass("inlineblock")}})},onShowPasswordClick:function(e){var a=$(e.target).closest("li[data-share-id]"),t=a.data("share-id");a.find(".linkPass").slideToggle(OC.menuSpeed),a.find(".linkPassMenu").toggleClass("hidden"),a.find(".showPasswordCheckbox").is(":checked")?OC.Util.isIE()||a.find(".linkPassText").focus():this.model.saveLinkShare({password:"",cid:t})},onPasswordKeyUp:function(e){13===e.keyCode&&this.onPasswordEntered(e)},onPasswordEntered:function(t){var n=$(t.target).closest("li[data-share-id]"),s=n.data("share-id"),i=n.find(".linkPassMenu .icon-loading-small");if(i.hasClass("hidden")){var l=n.find(".linkPassText");l.removeClass("error"),l.parent().find("input").removeClass("error");var r=l.val();if(n.find(".linkPassText").attr("placeholder")===a)r===a&&(r="");else if(""===r||"**********"===r||r===e)return;i.removeClass("hidden").addClass("inlineblock"),this.model.saveLinkShare({password:r,cid:s},{complete:function(e){i.removeClass("inlineblock").addClass("hidden")},error:function(e,a){l.parent().find("input").addClass("error");var t=l.parent();t.tooltip("destroy"),l.addClass("error"),t.attr("title",a),t.tooltip({placement:"bottom",trigger:"manual"}),t.tooltip("show")}})}},onPasswordByTalkChange:function(e){var a=$(e.target).closest("li[data-share-id]"),n=a.data("share-id"),s=a.find(".passwordByTalkCheckbox");s.siblings(".icon-loading-small").removeClass("hidden").addClass("inlineblock");var i=!1;s.is(":checked")&&(i=!0),this.model.saveLinkShare({sendPasswordByTalk:i,cid:n},{success:function(){s.siblings(".icon-loading-small").addClass("hidden").removeClass("inlineblock")},error:function(e,a){OC.Notification.showTemporary(t("core","Unable to toggle this option")),s.siblings(".icon-loading-small").addClass("hidden").removeClass("inlineblock")}})},onAllowPublicEditingChange:function(e){var a=$(e.target).closest("li[data-share-id]"),n=a.data("share-id"),s=a.find(".publicEditingCheckbox");s.siblings(".icon-loading-small").removeClass("hidden").addClass("inlineblock");var i=OC.PERMISSION_READ;s.is(":checked")&&(i=OC.PERMISSION_UPDATE|OC.PERMISSION_READ),this.model.saveLinkShare({permissions:i,cid:n},{success:function(){s.siblings(".icon-loading-small").addClass("hidden").removeClass("inlineblock")},error:function(e,a){OC.Notification.showTemporary(t("core","Unable to toggle this option")),s.siblings(".icon-loading-small").addClass("hidden").removeClass("inlineblock")}})},onPublicUploadChange:function(e){var a=$(e.target).closest("li[data-share-id]").data("share-id"),t=e.currentTarget.value;this.model.saveLinkShare({permissions:t,cid:a})},showNoteForm:function(e){e.preventDefault(),e.stopPropagation();var a=$(e.target),t=(a.closest("li[data-share-id]"),a.closest("li")),n=t.next("li.share-note-form");t.find(".share-note-delete").toggleClass("hidden"),n.toggleClass("hidden"),n.find("textarea").focus()},deleteNote:function(e){e.preventDefault(),e.stopPropagation();var a=$(e.target),t=a.closest("li[data-share-id]").data("share-id"),n=a.closest("li"),s=n.next("li.share-note-form");s.find(".share-note").val(""),s.addClass("hidden"),n.find(".share-note-delete").addClass("hidden"),this.sendNote("",t,n)},updateNote:function(e){e.preventDefault(),e.stopPropagation();var a=$(e.target),t=a.closest("li[data-share-id]").data("share-id"),n=a.closest("li.share-note-form"),s=n.prev("li"),i=n.find(".share-note").val().trim();i.length<1||this.sendNote(i,t,s)},sendNote:function(e,a,t){var n=t.next("li.share-note-form"),s=n.find("input.share-note-submit"),i=n.find("input.share-note-error");s.prop("disabled",!0),t.find(".icon-loading-small").removeClass("hidden"),t.find(".icon-edit").hide();$.ajax({method:"PUT",url:OC.linkToOCS("apps/files_sharing/api/v1/shares",2)+a+"?"+OC.buildQueryString({format:"json"}),data:{note:e},complete:function(){s.prop("disabled",!1),t.find(".icon-loading-small").addClass("hidden"),t.find(".icon-edit").show()},error:function(){i.show(),setTimeout((function(){i.hide()}),3e3)}})},render:function(){this.$el.find(".has-tooltip").tooltip(),this.password="";var n=this.template(),s=this.model.sharePermissionPossible();if(!s||!this.showLink||!this.configModel.isShareWithLinkAllowed()){var i={shareAllowed:!1};return s||(i.noSharingPlaceholder=t("core","Resharing is not allowed")),this.$el.html(n(i)),this}var l=this.model.isFolder()&&this.model.createPermissionPossible()&&this.configModel.isPublicUploadEnabled(),r="";this.model.isPublicEditingAllowed()&&(r='checked="checked"');var o=this.configModel.get("enforcePasswordForPublicLink"),d=(this.configModel.get("enableLinkPasswordByDefault"),this.configModel.get("enforcePasswordForPublicLink")?e:a),h=!this.model.isFolder()&&this.model.updatePermissionPossible(),c=this.configModel.get("isDefaultExpireDateEnforced"),u=new Date;u.setDate(u.getDate()+1),$.datepicker.setDefaults({minDate:u}),this.$el.find(".datepicker").datepicker({dateFormat:"dd-mm-yy"});var p=4;OC.getCapabilities().password_policy&&OC.getCapabilities().password_policy.minLength&&(p=OC.getCapabilities().password_policy.minLength);var m={urlLabel:t("core","Link"),hideDownloadLabel:t("core","Hide download"),enablePasswordLabel:o?t("core","Password protection enforced"):t("core","Password protect"),passwordLabel:t("core","Password"),passwordPlaceholderInitial:d,publicUpload:l,publicEditing:h,publicEditingChecked:r,publicEditingLabel:t("core","Allow editing"),mailPrivatePlaceholder:t("core","Email link to person"),mailButtonText:t("core","Send"),publicUploadRWLabel:t("core","Allow upload and editing"),publicUploadRLabel:t("core","Read only"),publicUploadWLabel:t("core","File drop (upload only)"),publicUploadRWValue:OC.PERMISSION_UPDATE|OC.PERMISSION_CREATE|OC.PERMISSION_READ|OC.PERMISSION_DELETE,publicUploadRValue:OC.PERMISSION_READ,publicUploadWValue:OC.PERMISSION_CREATE,expireDateLabel:c?t("core","Expiration date enforced"):t("core","Set expiration date"),expirationLabel:t("core","Expiration"),expirationDatePlaceholder:t("core","Expiration date"),isExpirationEnforced:c,isPasswordEnforced:o,defaultExpireDate:moment().add(1,"day").format("DD-MM-YYYY"),addNoteLabel:t("core","Note to recipient"),unshareLabel:t("core","Unshare"),unshareLinkLabel:t("core","Delete share link"),newShareLabel:t("core","Add another link")},f={isPasswordEnforced:o,enforcedPasswordLabel:t("core","Password protection for links is mandatory"),passwordPlaceholder:d,minPasswordLength:p},g=this.pendingPopoverMenuTemplate(_.extend({},f)),v=this.getShareeList();if(_.isArray(v))for(var S=0;S<v.length;S++){var C=[];OC.Share.Social.Collection.each((function(e){var a=e.get("url");a=a.replace("{{reference}}",v[S].shareLinkURL),C.push({url:a,label:t("core","Share to {name}",{name:e.get("name")}),name:e.get("name"),iconClass:e.get("iconClass"),newWindow:e.get("newWindow")})}));var b=this.getPopoverObject(v[S]);v[S].popoverMenu=this.popoverMenuTemplate(_.extend({},m,b,{social:C})),v[S].pendingPopoverMenu=g}return this.$el.html(n({linkShares:v,shareAllowed:!0,nolinkShares:0===v.length,newShareLabel:t("core","Share link"),newShareTitle:t("core","New share link"),pendingPopoverMenu:g,showPending:this.showPending===this.newShareId,newShareId:this.newShareId})),this.delegateEvents(),autosize(this.$el.find(".share-note-form .share-note")),this},onToggleMenu:function(e){e.preventDefault(),e.stopPropagation();var a=$(e.target).closest("li[data-share-id]"),t=a.find(".sharingOptionsGroup .popovermenu");a.data("share-id");OC.showMenu(null,t);var n=!0===this.configModel.get("enableLinkPasswordByDefault");!(""!==t.find(".linkPassText").val())&&n&&t.find(".linkPassText").focus()},template:function(){return OC.Share.Templates.sharedialoglinkshareview},popoverMenuTemplate:function(e){return OC.Share.Templates.sharedialoglinkshareview_popover_menu(e)},pendingPopoverMenuTemplate:function(e){return OC.Share.Templates.sharedialoglinkshareview_popover_menu_pending(e)},onPopUpClick:function(e){e.preventDefault(),e.stopPropagation();var a=$(e.currentTarget).data("url"),t=$(e.currentTarget).data("window");if($(e.currentTarget).tooltip("hide"),a)if(!0===t){var n=screen.width/2-300,s=screen.height/2-200;window.open(a,"name","width=600, height=400, top="+s+", left="+n)}else window.location.href=a},onExpireDateChange:function(e){var a=$(e.target),t=a.closest("li[data-share-id]").data("share-id"),n=$("#expirationDateContainer-"+t),s=a.prop("checked");n.toggleClass("hidden",!s),s?(a.closest("li").next("li").removeClass("hidden"),this.showDatePicker(e)):(a.closest("li").next("li").addClass("hidden"),this.setExpirationDate("",t))},showDatePicker:function(e){var a=$(e.target),t=a.closest("li[data-share-id]").data("share-id"),n=a.data("max-date"),s="#expirationDatePicker-"+t,i=this;$(s).datepicker({dateFormat:"dd-mm-yy",onSelect:function(e){i.setExpirationDate(e,t)},maxDate:n}),$(s).datepicker("show"),$(s).focus()},setExpirationDate:function(e,a){this.model.saveLinkShare({expireDate:e,cid:a})},onChangeExpirationDate:function(e){var a=$(e.target),t=a.val(),n=a.closest("li[data-share-id]").data("share-id"),s="#expirationDatePicker-"+n;this.setExpirationDate(t,n),$(s).datepicker("hide")},getShareeList:function(){var e=this.model.get("linkShares");if(!this.model.hasLinkShares())return[];for(var a=[],t=0;t<e.length;t++){var n=this.getShareeObject(t);a.push(_.extend({},n))}return a},getShareeObject:function(e){var a=this.model.get("linkShares")[e];return _.extend({},a,{cid:a.id,shareAllowed:!0,linkShareLabel:a.label?a.label:t("core","Share link"),popoverMenu:{},shareLinkURL:a.url,newShareTitle:t("core","New share link"),copyLabel:t("core","Copy link"),showPending:this.showPending===a.id,linkShareCreationDate:t("core","Created on {time}",{time:moment(1e3*a.stime).format("LLLL")})})},getPopoverObject:function(a){var n="",s="",i="";switch(this.model.linkSharePermissions(a.id)){case OC.PERMISSION_READ:s="checked";break;case OC.PERMISSION_CREATE:i="checked";break;case OC.PERMISSION_UPDATE|OC.PERMISSION_CREATE|OC.PERMISSION_READ|OC.PERMISSION_DELETE:n="checked"}var l,r=!!a.password,o=!0===this.configModel.get("enableLinkPasswordByDefault"),d=this.configModel.get("enforcePasswordForPublicLink"),h=this.configModel.get("isDefaultExpireDateEnforced"),c=this.configModel.get("defaultExpireDate"),u=!!a.expiration||h;u&&(l=moment(a.expiration,"YYYY-MM-DD").format("DD-MM-YYYY"));var p=void 0!==OC.appswebroots.spreed,m=a.sendPasswordByTalk,f=a.hideDownload,g=null;if(u&&h){var v=a.stime;_.isNumber(v)&&(v=new Date(1e3*v)),v||(v=new Date),v=OC.Util.stripTime(v).getTime(),g=new Date(v+24*c*3600*1e3)}return{cid:a.id,shareLinkURL:a.url,passwordPlaceholder:r?"**********":e,isPasswordSet:r||o||d,showPasswordByTalkCheckBox:p&&r,passwordByTalkLabel:t("core","Password protect by Talk"),isPasswordByTalkSet:m,publicUploadRWChecked:n,publicUploadRChecked:s,publicUploadWChecked:i,hasExpireDate:u,expireDate:l,shareNote:a.note,hasNote:""!==a.note,maxDate:g,hideDownload:f,isExpirationEnforced:h}},onUnshare:function(e){e.preventDefault(),e.stopPropagation();var a=this,n=$(e.target);n.is("a")||(n=n.closest("a"));var s=n.find(".icon-loading-small").eq(0);if(!s.hasClass("hidden"))return!1;s.removeClass("hidden");var i=n.closest("li[data-share-id]"),l=i.data("share-id");return a.model.removeShare(l,{success:function(){i.remove(),a.render()},error:function(){s.addClass("hidden"),OC.Notification.showTemporary(t("core","Could not unshare"))}}),!1}});OC.Share.ShareDialogLinkShareView=n}()},function(e,a){!function(){var e=t("core","Choose a password for the mail share");OC.Share||(OC.Share={});var a=OC.Backbone.View.extend({id:"shareDialogLinkShare",configModel:void 0,_menuOpen:!1,_renderPermissionChange:!1,events:{"click .unshare":"onUnshare","click .share-add":"showNoteForm","click .share-note-delete":"deleteNote","click .share-note-submit":"updateNote","click .share-menu .icon-more":"onToggleMenu","click .permissions":"onPermissionChange","click .expireDate":"onExpireDateChange","click .password":"onMailSharePasswordProtectChange","click .passwordByTalk":"onMailSharePasswordProtectByTalkChange","click .secureDrop":"onSecureDropChange","keyup input.passwordField":"onMailSharePasswordKeyUp","focusout input.passwordField":"onMailSharePasswordEntered","change .datepicker":"onChangeExpirationDate","click .datepicker":"showDatePicker"},initialize:function(e){if(_.isUndefined(e.configModel))throw"missing OC.Share.ShareConfigModel";this.configModel=e.configModel;var a=this;this.model.on("change:shares",(function(){a.render()}))},getShareeObject:function(a){var n=this.model.getShareWith(a),s=this.model.getShareWithDisplayName(a),i=this.model.getShareWithAvatar(a),l="",r=this.model.getShareType(a),o=this.model.getSharedBy(a),d=this.model.getSharedByDisplayName(a),h=this.model.getFileOwnerUid(a);if(r===OC.Share.SHARE_TYPE_GROUP?s=s+" ("+t("core","group")+")":r===OC.Share.SHARE_TYPE_REMOTE?s=s+" ("+t("core","remote")+")":r===OC.Share.SHARE_TYPE_REMOTE_GROUP?s=s+" ("+t("core","remote group")+")":r===OC.Share.SHARE_TYPE_EMAIL?s=s+" ("+t("core","email")+")":r===OC.Share.SHARE_TYPE_CIRCLE||r===OC.Share.SHARE_TYPE_ROOM&&(s=s+" ("+t("core","conversation")+")"),r===OC.Share.SHARE_TYPE_GROUP?l=n+" ("+t("core","group")+")":r===OC.Share.SHARE_TYPE_REMOTE?l=n+" ("+t("core","remote")+")":r===OC.Share.SHARE_TYPE_REMOTE_GROUP?l=n+" ("+t("core","remote group")+")":r===OC.Share.SHARE_TYPE_EMAIL?l=n+" ("+t("core","email")+")":r===OC.Share.SHARE_TYPE_CIRCLE&&(l=n,n="circle-"+a),o!==OC.getCurrentUser().uid){var c=""===l;c||(l+=" ("),l+=t("core","shared by {sharer}",{sharer:d}),c||(l+=")")}var u=this.model.get("shares")[a],p=u.password,m=null!==p&&""!==p,f=u.send_password_by_talk,g=this.model.getNote(a);return _.extend({},{cid:this.cid,hasSharePermission:this.model.hasSharePermission(a),editPermissionState:this.model.editPermissionState(a),hasCreatePermission:this.model.hasCreatePermission(a),hasUpdatePermission:this.model.hasUpdatePermission(a),hasDeletePermission:this.model.hasDeletePermission(a),sharedBy:o,sharedByDisplayName:d,shareWith:n,shareWithDisplayName:s,shareWithAvatar:i,shareWithTitle:l,shareType:r,shareId:this.model.get("shares")[a].id,modSeed:i||r!==OC.Share.SHARE_TYPE_USER&&r!==OC.Share.SHARE_TYPE_CIRCLE&&r!==OC.Share.SHARE_TYPE_ROOM,owner:h,isShareWithCurrentUser:r===OC.Share.SHARE_TYPE_USER&&n===OC.getCurrentUser().uid,canUpdateShareSettings:o===OC.getCurrentUser().uid||h===OC.getCurrentUser().uid,isRemoteShare:r===OC.Share.SHARE_TYPE_REMOTE,isRemoteGroupShare:r===OC.Share.SHARE_TYPE_REMOTE_GROUP,isNoteAvailable:r!==OC.Share.SHARE_TYPE_REMOTE&&r!==OC.Share.SHARE_TYPE_REMOTE_GROUP,isMailShare:r===OC.Share.SHARE_TYPE_EMAIL,isCircleShare:r===OC.Share.SHARE_TYPE_CIRCLE,isFileSharedByMail:r===OC.Share.SHARE_TYPE_EMAIL&&!this.model.isFolder(),isPasswordSet:m&&!f,isPasswordByTalkSet:m&&f,isTalkEnabled:void 0!==OC.appswebroots.spreed,secureDropMode:!this.model.hasReadPermission(a),hasExpireDate:null!==this.model.getExpireDate(a),shareNote:g,hasNote:""!==g,expireDate:moment(this.model.getExpireDate(a),"YYYY-MM-DD").format("DD-MM-YYYY"),passwordPlaceholder:m?"**********":e,passwordByTalkPlaceholder:m&&f?"**********":e})},getShareProperties:function(){return{unshareLabel:t("core","Unshare"),addNoteLabel:t("core","Note to recipient"),canShareLabel:t("core","Can reshare"),canEditLabel:t("core","Can edit"),createPermissionLabel:t("core","Can create"),updatePermissionLabel:t("core","Can change"),deletePermissionLabel:t("core","Can delete"),secureDropLabel:t("core","File drop (upload only)"),expireDateLabel:t("core","Set expiration date"),passwordLabel:t("core","Password protect"),passwordByTalkLabel:t("core","Password protect by Talk"),crudsLabel:t("core","Access control"),expirationDatePlaceholder:t("core","Expiration date"),defaultExpireDate:moment().add(1,"day").format("DD-MM-YYYY"),triangleSImage:OC.imagePath("core","actions/triangle-s"),isResharingAllowed:this.configModel.get("isResharingAllowed"),isPasswordForMailSharesRequired:this.configModel.get("isPasswordForMailSharesRequired"),sharePermissionPossible:this.model.sharePermissionPossible(),editPermissionPossible:this.model.editPermissionPossible(),createPermissionPossible:this.model.createPermissionPossible(),updatePermissionPossible:this.model.updatePermissionPossible(),deletePermissionPossible:this.model.deletePermissionPossible(),sharePermission:OC.PERMISSION_SHARE,createPermission:OC.PERMISSION_CREATE,updatePermission:OC.PERMISSION_UPDATE,deletePermission:OC.PERMISSION_DELETE,readPermission:OC.PERMISSION_READ,isFolder:this.model.isFolder()}},getShareeList:function(){var e=this.getShareProperties();if(!this.model.hasUserShares())return[];for(var a=this.model.get("shares"),t=[],n=0;n<a.length;n++){var s=this.getShareeObject(n);s.shareType!==OC.Share.SHARE_TYPE_LINK&&t.push(_.extend({},e,s))}return t},getLinkReshares:function(){var e={unshareLabel:t("core","Unshare")};if(!this.model.hasUserShares())return[];for(var a=this.model.get("shares"),n=[],s=0;s<a.length;s++){var i=this.getShareeObject(s);i.shareType===OC.Share.SHARE_TYPE_LINK&&n.push(_.extend({},e,i,{shareInitiator:a[s].uid_owner,shareInitiatorText:t("core","{shareInitiatorDisplayName} shared via link",{shareInitiatorDisplayName:a[s].displayname_owner})}))}return n},render:function(){if(this._renderPermissionChange){var e=parseInt(this._renderPermissionChange,10),a=this.model.findShareWithIndex(e),t=this.getShareeObject(a);$.extend(t,this.getShareProperties()),this.$("li[data-share-id="+e+"]").find(".sharingOptionsGroup .popovermenu").replaceWith(this.popoverMenuTemplate(t))}else this.$el.html(this.template({cid:this.cid,sharees:this.getShareeList(),linkReshares:this.getLinkReshares()})),this.$(".avatar").each((function(){var e=$(this);e.hasClass("imageplaceholderseed")?(e.css({width:32,height:32}),e.data("avatar")?(e.css("border-radius","0%"),e.css("background","url("+e.data("avatar")+") no-repeat"),e.css("background-size","31px")):e.imageplaceholder(e.data("seed"))):e.avatar(e.data("username"),32,void 0,void 0,void 0,e.data("displayname"))})),this.$(".has-tooltip").tooltip({placement:"bottom"}),this.$("ul.shareWithList > li").each((function(){var e=$(this),a=e.data("share-with"),t=e.data("share-type");e.find("div.avatar, span.username").contactsMenu(a,t,e)}));var n=this;if(this.getShareeList().forEach((function(e){var a=n.$("#canEdit-"+n.cid+"-"+e.shareId);1===a.length&&(a.prop("checked","checked"===e.editPermissionState),e.isFolder&&a.prop("indeterminate","indeterminate"===e.editPermissionState))})),this.$(".popovermenu").on("afterHide",(function(){n._menuOpen=!1})),this.$(".popovermenu").on("beforeHide",(function(){var e=parseInt(n._menuOpen,10);if(!_.isNaN(e)){var a=".expirationDateContainer-"+n.cid+"-"+e,t="#expirationDatePicker-"+n.cid+"-"+e,s="#expireDate-"+n.cid+"-"+e;$(s).prop("checked")&&($(t).removeClass("hidden-visually"),$(a).removeClass("hasDatepicker"),$(a+" .ui-datepicker").hide())}})),!1!==this._menuOpen){var s=parseInt(this._menuOpen,10);if(!_.isNaN(s)){var i="li[data-share-id="+s+"]";OC.showMenu(null,this.$(i+" .sharingOptionsGroup .popovermenu"))}}return this._renderPermissionChange=!1,autosize(this.$el.find(".share-note-form .share-note")),this.delegateEvents(),this},template:function(e){var a=e.sharees;if(_.isArray(a))for(var t=0;t<a.length;t++)e.sharees[t].popoverMenu=this.popoverMenuTemplate(a[t]);return OC.Share.Templates.sharedialogshareelistview(e)},popoverMenuTemplate:function(e){return OC.Share.Templates.sharedialogshareelistview_popover_menu(e)},showNoteForm:function(e){e.preventDefault(),e.stopPropagation();var a=$(e.target).closest("li"),t=a.next("li.share-note-form");a.find(".share-note-delete").toggleClass("hidden"),t.toggleClass("hidden"),t.find("textarea").focus()},deleteNote:function(e){e.preventDefault(),e.stopPropagation();var a=$(e.target),t=a.closest("li[data-share-id]").data("share-id"),n=a.closest("li"),s=n.next("li.share-note-form");console.log(s.find(".share-note")),s.find(".share-note").val(""),s.addClass("hidden"),n.find(".share-note-delete").addClass("hidden"),this.sendNote("",t,n)},updateNote:function(e){e.preventDefault(),e.stopPropagation();var a=$(e.target),t=a.closest("li[data-share-id]").data("share-id"),n=a.closest("li.share-note-form"),s=n.prev("li"),i=n.find(".share-note").val().trim();i.length<1||this.sendNote(i,t,s)},sendNote:function(e,a,t){var n=t.next("li.share-note-form"),s=n.find("input.share-note-submit"),i=n.find("input.share-note-error");s.prop("disabled",!0),t.find(".icon-loading-small").removeClass("hidden"),t.find(".icon-edit").hide();$.ajax({method:"PUT",url:OC.linkToOCS("apps/files_sharing/api/v1/shares",2)+a+"?"+OC.buildQueryString({format:"json"}),data:{note:e},complete:function(){s.prop("disabled",!1),t.find(".icon-loading-small").addClass("hidden"),t.find(".icon-edit").show()},error:function(){i.show(),setTimeout((function(){i.hide()}),3e3)}})},onUnshare:function(e){e.preventDefault(),e.stopPropagation();var a=$(e.target);a.is("a")||(a=a.closest("a"));var n=a.find(".icon-loading-small").eq(0);if(!n.hasClass("hidden"))return!1;n.removeClass("hidden");var s=a.closest("li[data-share-id]"),i=s.data("share-id");return this.model.removeShare(i).done((function(){s.remove()})).fail((function(){n.addClass("hidden"),OC.Notification.showTemporary(t("core","Could not unshare"))})),!1},onToggleMenu:function(e){e.preventDefault(),e.stopPropagation();var a=$(e.target).closest("li[data-share-id]"),t=a.find(".sharingOptionsGroup .popovermenu");OC.showMenu(null,t),this._menuOpen=a.data("share-id")},onExpireDateChange:function(e){var a=$(e.target),t=a.closest("li[data-share-id]").data("share-id"),n=".expirationDateContainer-"+this.cid+"-"+t,s=$(n),i=a.prop("checked");s.toggleClass("hidden",!i),i?(a.closest("li").next("li").removeClass("hidden"),this.showDatePicker(e)):(a.closest("li").next("li").addClass("hidden"),this.setExpirationDate(t,""))},showDatePicker:function(e){var a=$(e.target).closest("li[data-share-id]").data("share-id"),t="#expirationDatePicker-"+this.cid+"-"+a,n=this;$(t).datepicker({dateFormat:"dd-mm-yy",onSelect:function(e){n.setExpirationDate(a,e)}}),$(t).focus()},setExpirationDate:function(e,a){this.model.updateShare(e,{expireDate:a},{})},onMailSharePasswordProtectChange:function(a){var t=$(a.target),n=t.closest("li[data-share-id]").data("share-id"),s=".passwordMenu-"+this.cid+"-"+n,i=$(s),l=this.$el.find(s+" .icon-loading-small"),r="#passwordField-"+this.cid+"-"+n,o=$(r),d=t.prop("checked"),h=$("#passwordByTalk-"+this.cid+"-"+n),c=h.prop("checked");if(d||c){if(d){if(c){this.model.updateShare(n,{sendPasswordByTalk:!1});var u=".passwordByTalkMenu-"+this.cid+"-"+n;$(u).addClass("hidden"),h.prop("checked",!1)}i.toggleClass("hidden",!d),o="#passwordField-"+this.cid+"-"+n,this.$(o).focus()}}else this.model.updateShare(n,{password:"",sendPasswordByTalk:!1}),o.attr("value",""),o.removeClass("error"),o.tooltip("hide"),l.addClass("hidden"),o.attr("placeholder",e),i.toggleClass("hidden",!d)},onMailSharePasswordProtectByTalkChange:function(a){var t=$(a.target),n=t.closest("li[data-share-id]").data("share-id"),s=".passwordByTalkMenu-"+this.cid+"-"+n,i=$(s),l=this.$el.find(s+" .icon-loading-small"),r="#passwordByTalkField-"+this.cid+"-"+n,o=$(r),d=t.prop("checked"),h=$("#password-"+this.cid+"-"+n),c=h.prop("checked");if(d){if(d){if(c){var u=".passwordMenu-"+this.cid+"-"+n;$(u).addClass("hidden"),h.prop("checked",!1)}i.toggleClass("hidden",!d),o="#passwordByTalkField-"+this.cid+"-"+n,this.$(o).focus()}}else this.model.updateShare(n,{password:"",sendPasswordByTalk:!1}),o.attr("value",""),o.removeClass("error"),o.tooltip("hide"),l.addClass("hidden"),o.attr("placeholder",e),i.toggleClass("hidden",!d)},onMailSharePasswordKeyUp:function(e){13===e.keyCode&&this.onMailSharePasswordEntered(e)},onMailSharePasswordEntered:function(a){var t,n=$(a.target),s=n.closest("li[data-share-id]").data("share-id"),i=".passwordMenu-"+this.cid+"-"+s,l=".passwordByTalkMenu-"+this.cid+"-"+s,r=n.attr("id").startsWith("passwordByTalk");if((t=r?this.$el.find(l+" .icon-loading-small"):this.$el.find(i+" .icon-loading-small")).hasClass("hidden")){n.removeClass("error");var o=n.val();""!==o&&"**********"!==o&&o!==e&&(t.removeClass("hidden").addClass("inlineblock"),this.model.updateShare(s,{password:o,sendPasswordByTalk:r},{error:function(e,a){n.tooltip("destroy"),t.removeClass("inlineblock").addClass("hidden"),n.addClass("error"),n.attr("title",a),n.tooltip({placement:"bottom",trigger:"manual"}),n.tooltip("show")},success:function(e,a){n.blur(),n.attr("value",""),n.attr("placeholder","**********"),t.removeClass("inlineblock").addClass("hidden")}}))}},onPermissionChange:function(e){e.preventDefault(),e.stopPropagation();var a=$(e.target),n=a.closest("li[data-share-id]"),s=n.data("share-id"),i=OC.PERMISSION_READ;if(this.model.isFolder()){var l,r=$(".permissions",n).not('input[name="edit"]').not('input[name="share"]');if("edit"===a.attr("name"))l=a.is(":checked"),$(r).prop("checked",l),l&&(i|=OC.PERMISSION_CREATE|OC.PERMISSION_UPDATE|OC.PERMISSION_DELETE);else{var o=r.filter(":checked").length;l=o===r.length;var d=$('input[name="edit"]',n);d.prop("checked",l),d.prop("indeterminate",!l&&o>0)}}else"edit"===a.attr("name")&&a.is(":checked")&&(i|=OC.PERMISSION_UPDATE);$(".permissions",n).not('input[name="edit"]').filter(":checked").each((function(e,a){i|=$(a).data("permissions")})),n.find("input[type=checkbox]").prop("disabled",!0);var h=function(){n.find("input[type=checkbox]").prop("disabled",!1)};this.model.updateShare(s,{permissions:i},{error:function(e,a){OC.dialogs.alert(a,t("core","Error while sharing")),h()},success:h}),this._renderPermissionChange=s},onSecureDropChange:function(e){e.preventDefault(),e.stopPropagation();var a=$(e.target),n=a.closest("li[data-share-id]"),s=n.data("share-id"),i=OC.PERMISSION_CREATE|OC.PERMISSION_UPDATE|OC.PERMISSION_DELETE|OC.PERMISSION_READ;a.is(":checked")&&(i=OC.PERMISSION_CREATE|OC.PERMISSION_UPDATE|OC.PERMISSION_DELETE),n.find("input[type=checkbox]").prop("disabled",!0);var l=function(){n.find("input[type=checkbox]").prop("disabled",!1)};this.model.updateShare(s,{permissions:i},{error:function(e,a){OC.dialogs.alert(a,t("core","Error while sharing")),l()},success:l}),this._renderPermissionChange=s}});OC.Share.ShareDialogShareeListView=a}()},function(e,a){!function(){OC.Share||(OC.Share={});var e=OC.Backbone.View.extend({_templates:{},_showLink:!0,_lookup:!1,_lookupAllowed:!1,tagName:"div",configModel:void 0,resharerInfoView:void 0,linkShareView:void 0,shareeListView:void 0,_lastSuggestions:void 0,_lastRecommendations:void 0,_pendingOperationsCount:0,events:{"focus .shareWithField":"onShareWithFieldFocus","input .shareWithField":"onShareWithFieldChanged","click .shareWithConfirm":"_confirmShare"},initialize:function(e){var a=this;if(this.model.on("fetchError",(function(){OC.Notification.showTemporary(t("core","Share details could not be loaded for this item."))})),_.isUndefined(e.configModel))throw"missing OC.Share.ShareConfigModel";this.configModel=e.configModel,this.configModel.on("change:isRemoteShareAllowed",(function(){a.render()})),this.configModel.on("change:isRemoteGroupShareAllowed",(function(){a.render()})),this.model.on("change:permissions",(function(){a.render()})),this.model.on("request",this._onRequest,this),this.model.on("sync",this._onEndRequest,this);var n={model:this.model,configModel:this.configModel},s={resharerInfoView:"ShareDialogResharerInfoView",linkShareView:"ShareDialogLinkShareView",shareeListView:"ShareDialogShareeListView"};for(var i in s){var l=s[i];this[i]=_.isUndefined(e[i])?new OC.Share[l](n):e[i]}_.bindAll(this,"autocompleteHandler","_onSelectRecipient","onShareWithFieldChanged","onShareWithFieldFocus"),OC.Plugins.attach("OC.Share.ShareDialogView",this)},onShareWithFieldChanged:function(){var e=this.$el.find(".shareWithField");e.val().length<2&&e.removeClass("error").tooltip("hide")},onShareWithFieldFocus:function(){var e=this.$el.find(".shareWithField");e.autocomplete("search",e.val())},_getSuggestions:function(e,a,n,s){if(this._lastSuggestions&&this._lastSuggestions.searchTerm===e&&this._lastSuggestions.lookup===s&&this._lastSuggestions.perPage===a&&this._lastSuggestions.model===n)return this._lastSuggestions.promise;var i=$.Deferred(),l=this;return $.get(OC.linkToOCS("apps/files_sharing/api/v1")+"sharees",{format:"json",search:e,lookup:s,perPage:a,itemType:n.get("itemType")},(function(s){if(100===s.ocs.meta.statuscode){var r=function(e,a,t,s,i,l,r){var o,d,h,c,u,p,m,f,g;for(void 0===i&&(i=[]),void 0===l&&(l=[]),void 0===r&&(r=[]),o=e.length,f=0;f<o;f++)if(e[f].value.shareWith===OC.currentUser){e.splice(f,1);break}if(n.hasReshare())for(o=e.length,f=0;f<o;f++)if(e[f].value.shareWith===n.getReshareOwner()){e.splice(f,1);break}var v=n.get("shares"),S=v.length;for(f=0;f<S;f++){var C=v[f];if(C.share_type===OC.Share.SHARE_TYPE_USER){for(o=e.length,g=0;g<o;g++)if(e[g].value.shareWith===C.share_with){e.splice(g,1);break}}else if(C.share_type===OC.Share.SHARE_TYPE_GROUP){for(d=a.length,g=0;g<d;g++)if(a[g].value.shareWith===C.share_with){a.splice(g,1);break}}else if(C.share_type===OC.Share.SHARE_TYPE_REMOTE){for(h=t.length,g=0;g<h;g++)if(t[g].value.shareWith===C.share_with){t.splice(g,1);break}}else if(C.share_type===OC.Share.SHARE_TYPE_REMOTE_GROUP){for(c=s.length,g=0;g<c;g++)if(s[g].value.shareWith===C.share_with){s.splice(g,1);break}}else if(C.share_type===OC.Share.SHARE_TYPE_EMAIL){for(u=i.length,g=0;g<u;g++)if(i[g].value.shareWith===C.share_with){i.splice(g,1);break}}else if(C.share_type===OC.Share.SHARE_TYPE_CIRCLE){for(p=l.length,g=0;g<p;g++)if(l[g].value.shareWith===C.share_with){l.splice(g,1);break}}else if(C.share_type===OC.Share.SHARE_TYPE_ROOM)for(m=r.length,g=0;g<m;g++)if(r[g].value.shareWith===C.share_with){r.splice(g,1);break}}};r(s.ocs.data.exact.users,s.ocs.data.exact.groups,s.ocs.data.exact.remotes,s.ocs.data.exact.remote_groups,s.ocs.data.exact.emails,s.ocs.data.exact.circles,s.ocs.data.exact.rooms);var o=s.ocs.data.exact.users,d=s.ocs.data.exact.groups,h=s.ocs.data.exact.remotes,c=s.ocs.data.exact.remote_groups,u=[];void 0!==s.ocs.data.emails&&(u=s.ocs.data.exact.emails);var p=[];void 0!==s.ocs.data.circles&&(p=s.ocs.data.exact.circles);var m=[];void 0!==s.ocs.data.rooms&&(m=s.ocs.data.exact.rooms);var f=o.concat(d).concat(h).concat(c).concat(u).concat(p).concat(m);r(s.ocs.data.users,s.ocs.data.groups,s.ocs.data.remotes,s.ocs.data.remote_groups,s.ocs.data.emails,s.ocs.data.circles,s.ocs.data.rooms);var g=s.ocs.data.users,v=s.ocs.data.groups,S=s.ocs.data.remotes,C=s.ocs.data.remote_groups,b=s.ocs.data.lookup,w=s.ocs.data.lookupEnabled,E=[];void 0!==s.ocs.data.emails&&(E=s.ocs.data.emails);var P=[];void 0!==s.ocs.data.circles&&(P=s.ocs.data.circles);var _=[];void 0!==s.ocs.data.rooms&&(_=s.ocs.data.rooms);for(var k=f.concat(g).concat(v).concat(S).concat(C).concat(E).concat(P).concat(_).concat(b).sort((T="uuid",function(e,a){var t="",n="";return void 0!==e[T]&&(t=e[T]),void 0!==a[T]&&(n=a[T]),t<n?-1:t>n?1:0})),O=null,y=k.length,x=(s=[],0);x<y;x++)void 0!==k[x].uuid&&k[x].uuid===O&&(k[x].merged=!0),e!==k[x].name&&void 0!==k[x].merged||s.push(k[x]),O=k[x].uuid;var I=OC.config["sharing.maxAutocompleteResults"]>0&&Math.min(a,OC.config["sharing.maxAutocompleteResults"])<=Math.max(g.length+o.length,v.length+d.length,C.length+c.length,S.length+h.length,E.length+u.length,P.length+p.length,_.length+m.length,b.length);!l._lookup&&w&&s.push({label:t("core","Search globally"),value:{},lookup:!0}),i.resolve(s,f,I,w)}else i.reject(s.ocs.meta.message);var T})).fail((function(){i.reject()})),this._lastSuggestions={searchTerm:e,lookup:s,perPage:a,model:n,promise:i.promise()},this._lastSuggestions.promise},_getRecommendations:function(e){if(this._lastRecommendations&&this._lastRecommendations.model===e)return this._lastRecommendations.promise;var a=$.Deferred();return $.get(OC.linkToOCS("apps/files_sharing/api/v1")+"sharees_recommended",{format:"json",itemType:e.get("itemType")},(function(t){if(100===t.ocs.meta.statuscode){var n=function(a,t,n,s,i,l,r){var o,d,h,c,u,p,m,f,g;for(void 0===i&&(i=[]),void 0===l&&(l=[]),void 0===r&&(r=[]),o=a.length,f=0;f<o;f++)if(a[f].value.shareWith===OC.currentUser){a.splice(f,1);break}if(e.hasReshare())for(o=a.length,f=0;f<o;f++)if(a[f].value.shareWith===e.getReshareOwner()){a.splice(f,1);break}var v=e.get("shares"),S=v.length;for(f=0;f<S;f++){var C=v[f];if(C.share_type===OC.Share.SHARE_TYPE_USER){for(o=a.length,g=0;g<o;g++)if(a[g].value.shareWith===C.share_with){a.splice(g,1);break}}else if(C.share_type===OC.Share.SHARE_TYPE_GROUP){for(d=t.length,g=0;g<d;g++)if(t[g].value.shareWith===C.share_with){t.splice(g,1);break}}else if(C.share_type===OC.Share.SHARE_TYPE_REMOTE){for(h=n.length,g=0;g<h;g++)if(n[g].value.shareWith===C.share_with){n.splice(g,1);break}}else if(C.share_type===OC.Share.SHARE_TYPE_REMOTE_GROUP){for(c=s.length,g=0;g<c;g++)if(s[g].value.shareWith===C.share_with){s.splice(g,1);break}}else if(C.share_type===OC.Share.SHARE_TYPE_EMAIL){for(u=i.length,g=0;g<u;g++)if(i[g].value.shareWith===C.share_with){i.splice(g,1);break}}else if(C.share_type===OC.Share.SHARE_TYPE_CIRCLE){for(p=l.length,g=0;g<p;g++)if(l[g].value.shareWith===C.share_with){l.splice(g,1);break}}else if(C.share_type===OC.Share.SHARE_TYPE_ROOM)for(m=r.length,g=0;g<m;g++)if(r[g].value.shareWith===C.share_with){r.splice(g,1);break}}};n(t.ocs.data.exact.users,t.ocs.data.exact.groups,t.ocs.data.exact.remotes,t.ocs.data.exact.remote_groups,t.ocs.data.exact.emails,t.ocs.data.exact.circles,t.ocs.data.exact.rooms);var s=t.ocs.data.exact.users,i=t.ocs.data.exact.groups,l=t.ocs.data.exact.remotes||[],r=t.ocs.data.exact.remote_groups||[],o=[];void 0!==t.ocs.data.emails&&(o=t.ocs.data.exact.emails);var d=[];void 0!==t.ocs.data.circles&&(d=t.ocs.data.exact.circles);var h=[];void 0!==t.ocs.data.rooms&&(h=t.ocs.data.exact.rooms);var c=s.concat(i).concat(l).concat(r).concat(o).concat(d).concat(h);n(t.ocs.data.users,t.ocs.data.groups,t.ocs.data.remotes,t.ocs.data.remote_groups,t.ocs.data.emails,t.ocs.data.circles,t.ocs.data.rooms);var u=t.ocs.data.users,p=t.ocs.data.groups,m=t.ocs.data.remotes||[],f=t.ocs.data.remote_groups||[],g=t.ocs.data.lookup||[],v=[];void 0!==t.ocs.data.emails&&(v=t.ocs.data.emails);var S=[];void 0!==t.ocs.data.circles&&(S=t.ocs.data.circles);var C=[];void 0!==t.ocs.data.rooms&&(C=t.ocs.data.rooms);for(var b=c.concat(u).concat(p).concat(m).concat(f).concat(v).concat(S).concat(C).concat(g).sort((_="uuid",function(e,a){var t="",n="";return void 0!==e[_]&&(t=e[_]),void 0!==a[_]&&(n=a[_]),t<n?-1:t>n?1:0})),w=null,E=b.length,P=(t=[],0);P<E;P++)void 0!==b[P].uuid&&b[P].uuid===w&&(b[P].merged=!0),void 0===b[P].merged&&t.push(b[P]),w=b[P].uuid;a.resolve(t,c,!1)}else a.reject(t.ocs.meta.message);var _})).fail((function(){a.reject()})),this._lastRecommendations={model:e,promise:a.promise()},this._lastRecommendations.promise},recommendationHandler:function(e){var a=$(".shareWithField");this._getRecommendations(this.model).done((function(t){console.info("recommendations",t),t.length>0?(a.autocomplete("option","autoFocus",!0),e(t)):(console.info("no sharing recommendations found"),e())})).fail((function(e){console.error("could not load recommendations",e)}))},autocompleteHandler:function(e,a){if(0===e.term.length)return console.info(e.term,"empty search term -> using recommendations"),void this.recommendationHandler(a);var s=$(".shareWithField"),i=this,l=this.$el.find(".shareWithLoading"),r=this.$el.find(".shareWithConfirm"),o=OC.config["sharing.minSearchStringLength"];if(e.term.trim().length<o){var d=n("core","At least {count} character is needed for autocompletion","At least {count} characters are needed for autocompletion",o,{count:o});return s.addClass("error").attr("data-original-title",d).tooltip("hide").tooltip({placement:"bottom",trigger:"manual"}).tooltip("fixTitle").tooltip("show"),void a()}l.removeClass("hidden"),l.addClass("inlineblock"),r.addClass("hidden"),this._pendingOperationsCount++,s.removeClass("error").tooltip("hide");var h=parseInt(OC.config["sharing.maxAutocompleteResults"],10)||200;this._getSuggestions(e.term.trim(),h,i.model,i._lookup).done((function(e,n,o){if(i._pendingOperationsCount--,0===i._pendingOperationsCount&&(l.addClass("hidden"),l.removeClass("inlineblock"),r.removeClass("hidden")),e.length>0){if(s.autocomplete("option","autoFocus",!0),a(e),o){var d=t("core","This list is maybe truncated - please refine your search term to see more results.");$(".ui-autocomplete").append('<li class="autocomplete-note">'+d+"</li>")}}else{var h=t("core","No users or groups found for {search}",{search:s.val()});i.configModel.get("allowGroupSharing")||(h=t("core","No users found for {search}",{search:$(".shareWithField").val()})),s.addClass("error").attr("data-original-title",h).tooltip("hide").tooltip({placement:"top",trigger:"manual"}).tooltip("fixTitle").tooltip("show"),a()}})).fail((function(e){i._pendingOperationsCount--,0===i._pendingOperationsCount&&(l.addClass("hidden"),l.removeClass("inlineblock"),r.removeClass("hidden")),e?OC.Notification.showTemporary(t("core",'An error occurred ("{message}"). Please try again',{message:e})):OC.Notification.showTemporary(t("core","An error occurred. Please try again"))}))},autocompleteRenderItem:function(e,a){var n="icon-user",s=escapeHTML(a.label),i="",l="";void 0!==a.type&&null!==a.type&&(l=function(e){switch(e){case"HOME":return t("core","Home");case"WORK":return t("core","Work");case"OTHER":return t("core","Other");default:return""+e}}(a.type)+" "),void 0!==a.name&&(s=escapeHTML(a.name)),a.value.shareType===OC.Share.SHARE_TYPE_GROUP?n="icon-contacts-dark":a.value.shareType===OC.Share.SHARE_TYPE_REMOTE?(n="icon-shared",i+=a.value.shareWith):a.value.shareType===OC.Share.SHARE_TYPE_REMOTE_GROUP?(s=t("core","{sharee} (remote group)",{sharee:s},void 0,{escape:!1}),n="icon-shared",i+=a.value.shareWith):a.value.shareType===OC.Share.SHARE_TYPE_EMAIL?(n="icon-mail",i+=a.value.shareWith):a.value.shareType===OC.Share.SHARE_TYPE_CIRCLE?(s=t("core","{sharee} ({type}, {owner})",{sharee:s,type:a.value.circleInfo,owner:a.value.circleOwner},void 0,{escape:!1}),n="icon-circle"):a.value.shareType===OC.Share.SHARE_TYPE_ROOM&&(n="icon-talk");var r=$("<div class='share-autocomplete-item'/>");if(a.merged)r.addClass("merged"),s=a.value.shareWith,i=l;else if(a.lookup)s=a.label,n=!1,r.append('<span class="icon icon-search search-globally"></span>');else{var o=$("<div class='avatardiv'></div>").appendTo(r);a.value.shareType===OC.Share.SHARE_TYPE_USER||a.value.shareType===OC.Share.SHARE_TYPE_CIRCLE?o.avatar(a.value.shareWith,32,void 0,void 0,void 0,a.label):(void 0===a.uuid&&(a.uuid=s),o.imageplaceholder(a.uuid,s,32)),i=l+i}return""!==i&&r.addClass("with-description"),$("<div class='autocomplete-item-text'></div>").html(s.replace(new RegExp(this.term,"gi"),"<span class='ui-state-highlight'>$&</span>")+'<span class="autocomplete-item-details">'+i+"</span>").appendTo(r),r.attr("title",a.value.shareWith),n&&r.append('<span class="icon '+n+'" title="'+s+'"></span>'),r=$("<a>").append(r),$("<li>").addClass(a.value.shareType===OC.Share.SHARE_TYPE_GROUP?"group":"user").append(r).appendTo(e)},_onSelectRecipient:function(e,a){var t=this;if(9==e.keyCode)return e.preventDefault(),void 0!==a.item.name?e.target.value=a.item.name:e.target.value=a.item.label,setTimeout((function(){$(e.target).attr("disabled",!1).autocomplete("search",$(e.target).val())}),0),!1;if(a.item.lookup){this._lookup=!0;var n=this.$el.find(".shareWithField"),s=n.val();return setTimeout((function(){console.debug("searching again, but globally. search term: "+s),n.autocomplete("search",s)}),0),!1}e.preventDefault(),e.stopImmediatePropagation(),$(e.target).attr("disabled",!0).val(a.item.label);var i=this.$el.find(".shareWithLoading"),l=this.$el.find(".shareWithConfirm");i.removeClass("hidden"),i.addClass("inlineblock"),l.addClass("hidden"),this._pendingOperationsCount++,this.model.addShare(a.item.value,{success:function(){t._lastSuggestions=void 0,$(e.target).val("").attr("disabled",!1),t._pendingOperationsCount--,0===t._pendingOperationsCount&&(i.addClass("hidden"),i.removeClass("inlineblock"),l.removeClass("hidden"))},error:function(a,n){OC.Notification.showTemporary(n),$(e.target).attr("disabled",!1).autocomplete("search",$(e.target).val()),t._pendingOperationsCount--,0===t._pendingOperationsCount&&(i.addClass("hidden"),i.removeClass("inlineblock"),l.removeClass("hidden"))}})},_confirmShare:function(){var e=this,a=$(".shareWithField"),t=this.$el.find(".shareWithLoading"),n=this.$el.find(".shareWithConfirm");t.removeClass("hidden"),t.addClass("inlineblock"),n.addClass("hidden"),this._pendingOperationsCount++,a.prop("disabled",!0),a.autocomplete("close"),a.autocomplete("disable");var s=function(){e._pendingOperationsCount--,0===e._pendingOperationsCount&&(t.addClass("hidden"),t.removeClass("inlineblock"),n.removeClass("hidden")),a.prop("disabled",!1),a.focus()},i=parseInt(OC.config["sharing.maxAutocompleteResults"],10)||200;this._getSuggestions(a.val(),i,this.model,this._lookup).done((function(t,n){if(0===t.length)return s(),void a.autocomplete("enable");if(1!==n.length)return s(),void a.autocomplete("enable");e.model.addShare(n[0].value,{success:function(){e._lastSuggestions=void 0,a.val(""),s(),a.autocomplete("enable")},error:function(e,t){s(),a.autocomplete("enable"),OC.Notification.showTemporary(t)}})})).fail((function(e){s(),a.autocomplete("enable")}))},_toggleLoading:function(e){this._loading=e,this.$el.find(".subView").toggleClass("hidden",e),this.$el.find(".loading").toggleClass("hidden",!e)},_onRequest:function(){this._loadingOnce||this._toggleLoading(!0)},_onEndRequest:function(){this._toggleLoading(!1),this._loadingOnce||(this._loadingOnce=!0)},render:function(){var e=this,a=OC.Share.Templates.sharedialogview;this.$el.html(a({cid:this.cid,shareLabel:t("core","Share"),sharePlaceholder:this._renderSharePlaceholderPart(),isSharingAllowed:this.model.sharePermissionPossible()}));var n=this.$el.find(".shareWithField");if(n.length){n.autocomplete({minLength:0,delay:750,focus:function(e){e.preventDefault()},source:this.autocompleteHandler,select:this._onSelectRecipient,open:function(){var e=$(this).autocomplete("widget"),a=e.find("li").size();e.removeClass("item-count-1"),e.removeClass("item-count-2"),a<=2&&e.addClass("item-count-"+a)}}).data("ui-autocomplete")._renderItem=this.autocompleteRenderItem,n.on("keydown",null,(function(a){return 13!==a.keyCode||(e._confirmShare(),!1)}))}return this.resharerInfoView.$el=this.$el.find(".resharerInfoView"),this.resharerInfoView.render(),this.linkShareView.$el=this.$el.find(".linkShareView"),this.linkShareView.render(),this.shareeListView.$el=this.$el.find(".shareeListView"),this.shareeListView.render(),this.$el.find(".hasTooltip").tooltip(),this},setShowLink:function(e){this._showLink="boolean"!=typeof e||e,this.linkShareView.showLink=this._showLink},_renderSharePlaceholderPart:function(){var e=this.configModel.get("isRemoteShareAllowed"),a=this.configModel.get("isMailShareAllowed");return!e&&a?t("core","Name or email address..."):e&&!a?t("core","Name or federated cloud ID..."):e&&a?t("core","Name, federated cloud ID or email address..."):t("core","Name...")}});OC.Share.ShareDialogView=e}()},function(e,a){OC.Share=_.extend(OC.Share||{},{SHARE_TYPE_USER:0,SHARE_TYPE_GROUP:1,SHARE_TYPE_LINK:3,SHARE_TYPE_EMAIL:4,SHARE_TYPE_REMOTE:6,SHARE_TYPE_CIRCLE:7,SHARE_TYPE_GUEST:8,SHARE_TYPE_REMOTE_GROUP:9,SHARE_TYPE_ROOM:10,_REMOTE_OWNER_REGEXP:new RegExp("^([^@]*)@(([^@]*)@)?([^/]*)([/](.*)?)?$"),itemShares:[],statuses:{},currentShares:{},droppedDown:!1,loadIcons:function(e,a,t){var n=a.dirInfo.path;"/"===n&&(n=""),n+="/"+a.dirInfo.name,$.get(OC.linkToOCS("apps/files_sharing/api/v1",2)+"shares",{subfiles:"true",path:n,format:"json"},(function(n){n&&200===n.ocs.meta.statuscode&&(OC.Share.statuses={},$.each(n.ocs.data,(function(e,a){a.item_source in OC.Share.statuses||(OC.Share.statuses[a.item_source]={link:!1}),a.share_type===OC.Share.SHARE_TYPE_LINK&&(OC.Share.statuses[a.item_source]={link:!0})})),_.isFunction(t)?t(OC.Share.statuses):OC.Share.updateIcons(e,a))}))},updateIcons:function(e,a){var n,s,i;for(n in!a&&OCA.Files&&(a=OCA.Files.App.fileList),a&&(s=a.$fileList,i=a.getCurrentDirectory()),OC.Share.statuses){var l="icon-shared",r=OC.Share.statuses[n],o=r.link;if(o&&(l="icon-public"),"file"!==e&&"folder"!==e)$('a.share[data-item="'+n+'"] .icon').removeClass("icon-shared icon-public").addClass(l);else{var d,h=s.find('tr[data-id="'+n+'"]'),c=OC.imagePath("core","filetypes/folder-shared");if(h.length>0)this.markFileAsShared(h,!0,o);else{var u=i;if(u.length>1)for(var p="",m=u;m!=p;){if(m===r.path&&!r.link){var f,g=s.find('.fileactions .action[data-action="Share"]'),v=s.find(".filename");for(f=0;f<g.length;f++)(d=$(g[f]).find("img")).attr("src")!==OC.imagePath("core","actions/public")&&(d.attr("src",image),$(g[f]).addClass("permanent"),$(g[f]).html("<span> "+t("core","Shared")+"</span>").prepend(d));for(f=0;f<v.length;f++)"dir"===$(v[f]).closest("tr").data("type")&&$(v[f]).find(".thumbnail").css("background-image","url("+c+")")}p=m,m=OC.Share.dirname(m)}}}}},updateIcon:function(e,a){var t=!1,n=!1,s="";if($.each(OC.Share.itemShares,(function(e){OC.Share.itemShares[e]&&(e==OC.Share.SHARE_TYPE_LINK?1==OC.Share.itemShares[e]&&(t=!0,s="icon-public",n=!0):OC.Share.itemShares[e].length>0&&(t=!0,s="icon-shared"))})),"file"!=e&&"folder"!=e)$('a.share[data-item="'+a+'"] .icon').removeClass("icon-shared icon-public").addClass(s);else{var i=$("tr").filterAttr("data-id",String(a));i.length>0&&i.each((function(){OC.Share.markFileAsShared($(this),t,n)}))}t?(OC.Share.statuses[a]=OC.Share.statuses[a]||{},OC.Share.statuses[a].link=n):delete OC.Share.statuses[a]},_formatRemoteShare:function(e,a,t){var n=this._REMOTE_OWNER_REGEXP.exec(e);if(!n)return'<span class="avatar" data-username="'+escapeHTML(e)+'" title="'+t+" "+escapeHTML(a)+'"></span>'+('<span class="hidden-visually">'+t+" "+escapeHTML(a)+"</span> ");var s=n[1],i=n[3],l=n[4],r=t+" "+s;i&&(r+="@"+i),l&&(i||(i="…"),r+="@"+l);var o='<span class="remoteAddress" title="'+escapeHTML(r)+'">';return o+='<span class="username">'+escapeHTML(s)+"</span>",i&&(o+='<span class="userDomain">@'+escapeHTML(i)+"</span>"),o+="</span> "},_formatShareList:function(e){var a=this;return(e=_.toArray(e)).sort((function(e,a){return e.shareWithDisplayName.localeCompare(a.shareWithDisplayName)})),$.map(e,(function(e){return a._formatRemoteShare(e.shareWith,e.shareWithDisplayName,t("core","Shared with"))}))},markFileAsShared:function(e,a,n){var s,i,l,r,o=e.find('.fileactions .action[data-action="Share"]'),d=e.data("type"),h=o.find(".icon"),c=e.attr("data-share-owner-id"),u=e.attr("data-share-owner"),p=e.attr("data-mounttype"),m="icon-shared";if(o.removeClass("shared-style"),"dir"===d&&(a||n||c))r=void 0!==p&&"shared-root"!==p&&"shared"!==p?OC.MimeType.getIconUrl("dir-"+p):n?OC.MimeType.getIconUrl("dir-public"):OC.MimeType.getIconUrl("dir-shared"),e.find(".filename .thumbnail").css("background-image","url("+r+")"),e.attr("data-icon",r);else if("dir"===d){"true"===e.attr("data-e2eencrypted")?(r=OC.MimeType.getIconUrl("dir-encrypted"),e.attr("data-icon",r)):p&&0===p.indexOf("external")?(r=OC.MimeType.getIconUrl("dir-external"),e.attr("data-icon",r)):(r=OC.MimeType.getIconUrl("dir"),e.removeAttr("data-icon")),e.find(".filename .thumbnail").css("background-image","url("+r+")")}a||c?(i=e.data("share-recipient-data"),o.addClass("shared-style"),l="<span>"+t("core","Shared")+"</span>",c?(s=t("core","Shared by"),l=this._formatRemoteShare(c,u,s)):i&&(l=this._formatShareList(i)),o.html(l).prepend(h),(c||i)&&(o.find(".avatar").each((function(){$(this).avatar($(this).data("username"),32)})),o.find("span[title]").tooltip({placement:"top"}))):o.html('<span class="hidden-visually">'+t("core","Shared")+"</span>").prepend(h);n&&(m="icon-public"),h.removeClass("icon-shared icon-public").addClass(m)},showDropDown:function(e,a,t,n,s,i){var l=new OC.Share.ShareConfigModel,r={itemType:e,itemSource:a,possiblePermissions:s},o=new OC.Share.ShareItemModel(r,{configModel:l}),d=new OC.Share.ShareDialogView({id:"dropdown",model:o,configModel:l,className:"drop shareDropDown",attributes:{"data-item-source-name":i,"data-item-type":e,"data-item-source":a}});d.setShowLink(n);var h=d.render().$el;h.appendTo(t),h.slideDown(OC.menuSpeed,(function(){OC.Share.droppedDown=!0})),o.fetch()},hideDropDown:function(e){OC.Share.currentShares=null,$("#dropdown").slideUp(OC.menuSpeed,(function(){OC.Share.droppedDown=!1,$("#dropdown").remove(),"undefined"!=typeof FileActions&&$("tr").removeClass("mouseOver"),e&&e.call()}))},dirname:function(e){return e.replace(/\\/g,"/").replace(/\/[^\/]*$/,"")}}),$(document).ready((function(){if("undefined"!=typeof monthNames){var e=new Date;e.setDate(e.getDate()+1),$.datepicker.setDefaults({monthNames:monthNames,monthNamesShort:monthNamesShort,dayNames:dayNames,dayNamesMin:dayNamesMin,dayNamesShort:dayNamesShort,firstDay:firstDay,minDate:e})}$(this).click((function(e){var a=$(e.target),t=!a.is(".drop, .ui-datepicker-next, .ui-datepicker-prev, .ui-icon")&&!a.closest("#ui-datepicker-div").length&&!a.closest(".ui-autocomplete").length;OC.Share&&OC.Share.droppedDown&&t&&0===$("#dropdown").has(e.target).length&&OC.Share.hideDropDown()}))}))}]);
-//# sourceMappingURL=share_backend.js.map \ No newline at end of file
diff --git a/core/js/dist/share_backend.js.map b/core/js/dist/share_backend.js.map
deleted file mode 100644
index f348e16de9b..00000000000
--- a/core/js/dist/share_backend.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./core/js/merged-share-backend.js","webpack:///./core/js/shareconfigmodel.js","webpack:///./core/js/sharetemplates.js","webpack:///./core/js/shareitemmodel.js","webpack:///./core/js/sharesocialmanager.js","webpack:///./core/js/sharedialogresharerinfoview.js","webpack:///./core/js/sharedialoglinkshareview.js","webpack:///./core/js/sharedialogshareelistview.js","webpack:///./core/js/sharedialogview.js","webpack:///./core/js/share.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","OC","Share","Types","ShareConfigModel","Backbone","Model","extend","defaults","publicUploadEnabled","enforcePasswordForPublicLink","appConfig","core","enableLinkPasswordByDefault","isDefaultExpireDateEnforced","defaultExpireDateEnforced","isDefaultExpireDateEnabled","defaultExpireDateEnabled","isRemoteShareAllowed","remoteShareAllowed","isMailShareAllowed","undefined","shareByMailEnabled","defaultExpireDate","isResharingAllowed","resharingAllowed","isPasswordForMailSharesRequired","shareByMail","enforcePasswordProtection","allowGroupSharing","isPublicUploadEnabled","$","data","isShareWithLinkAllowed","val","getFederatedShareDocLink","federatedCloudShareDoc","getDefaultExpirationDateString","expireDateString","this","date","moment","utc","expireAfterDays","add","format","template","templates","Handlebars","Templates","container","depth0","helpers","partials","propertyIsEnumerable","stack1","alias2","nullContext","nolinkShares","program","noop","each","linkShares","helper","alias3","hooks","helperMissing","alias5","escapeExpression","newShareId","newShareLabel","showPending","newShareTitle","unless","pendingPopoverMenu","alias4","cid","linkShareCreationDate","linkShareLabel","shareLinkURL","copyLabel","popoverMenu","noSharingPlaceholder","shareAllowed","publicUploadRValue","publicUploadRChecked","publicUploadRLabel","publicUploadRWValue","publicUploadRWChecked","publicUploadRWLabel","publicUploadWValue","publicUploadWChecked","publicUploadWLabel","publicEditingChecked","publicEditingLabel","isPasswordByTalkSet","passwordByTalkLabel","expireDate","url","newWindow","iconClass","label","publicUpload","publicEditing","hideDownload","hideDownloadLabel","isPasswordSet","isPasswordEnforced","enablePasswordLabel","passwordPlaceholder","showPasswordByTalkCheckBox","hasExpireDate","isExpirationEnforced","expireDateLabel","expirationDate","expirationLabel","expirationDatePlaceholder","maxDate","addNoteLabel","hasNote","shareNote","shareId","social","unshareLinkLabel","enforcedPasswordLabel","minPasswordLength","reshareOwner","sharedByText","hasShareNote","isShareWithCurrentUser","shareType","shareWith","modSeed","shareWithAvatar","shareWithDisplayName","shareWithTitle","canUpdateShareSettings","editPermissionPossible","canEditLabel","shareInitiator","shareInitiatorText","unshareLabel","sharees","linkReshares","sharePermissionPossible","isMailShare","hasSharePermission","sharePermission","canShareLabel","createPermissionPossible","updatePermissionPossible","deletePermissionPossible","hasCreatePermission","createPermission","createPermissionLabel","hasUpdatePermission","updatePermission","updatePermissionLabel","hasDeletePermission","deletePermission","deletePermissionLabel","passwordLabel","password","passwordValue","isTalkEnabled","secureDropMode","readPermission","secureDropLabel","passwordByTalkPlaceholder","isFolder","isNoteAvailable","shareLabel","sharePlaceholder","isSharingAllowed","SHARE_RESPONSE_INT_PROPS","ShareItemModel","_linkShareId","initialize","attributes","options","_","isUndefined","configModel","fileInfoModel","bindAll","allowPublicUploadStatus","permissions","saveLinkShare","expiration","shareIndex","findIndex","share","id","length","updateShare","passwordChanged","sendPasswordByTalk","PERMISSION_READ","SHARE_TYPE_LINK","addShare","defaultPermissions","getCapabilities","PERMISSION_ALL","possiblePermissions","PERMISSION_UPDATE","PERMISSION_CREATE","PERMISSION_DELETE","PERMISSION_SHARE","path","getFullPath","_addOrUpdateShare","type","_getUrl","dataType","attrs","encodeURIComponent","ajaxSettings","self","ajax","always","isFunction","complete","done","fetch","success","fail","xhr","msg","result","responseJSON","ocs","meta","message","error","dialogs","alert","removeShare","isPublicUploadAllowed","isPublicEditingAllowed","isHideFileListSet","isFile","hasReshare","reshare","isObject","uid_owner","hasUserShares","getSharesWithCurrentItem","hasLinkShares","getReshareOwner","getReshareOwnerDisplayname","displayname_owner","getReshareNote","note","getReshareWith","share_with","getReshareWithDisplayName","share_with_displayname","getReshareType","share_type","getExpireDate","_shareExpireDate","getNote","_shareNote","shares","fileId","filter","item_source","getShareWith","getShareWithDisplayName","getShareWithAvatar","share_with_avatar","getSharedBy","getSharedByDisplayName","getFileOwnerUid","uid_file_owner","findShareWithIndex","isArray","getShareType","_shareHasPermission","permission","getPermissions","hasReadPermission","editPermissionState","hcp","hup","hdp","linkSharePermissions","base","params","linkToOCS","buildQueryString","_fetchShares","reshares","_fetchReshare","_reshareFetched","Deferred","resolve","shared_with_me","_groupReshares","superShare","shift","combinedPermissions","SHARE_TYPE_USER","SHARE_TYPE_GROUP","model","trigger","deferred","when","data1","data2","sharesMap","shareItem","set","parse","_legacyFillCurrentShares","statuses","currentShares","itemShares","currentShareStatus","link","push","console","warn","currentUser","allowPublicEditingStatus","hideFileListStatus","map","prop","parseInt","reject","file_source","window","location","protocol","host","token","generateUrl","fullPath","isDirectory","linkTo","hide_download","send_password_by_talk","_parseTime","time","isString","isNaN","getShareTypes","pluck","uniq","Social","SocialModel","SocialCollection","Collection","comparator","ShareDialogResharerInfoView","View","tagName","className","_template","view","on","render","$el","empty","reshareTemplate","ownerDisplayName","group","owner","escape","SHARE_TYPE_CIRCLE","circle","SHARE_TYPE_ROOM","conversation","html","find","$this","avatar","contactsMenu","PASSWORD_PLACEHOLDER_MESSAGE","PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL","ShareDialogLinkShareView","showLink","events","previousLinkShares","previous","clipboard","Clipboard","e","$trigger","tooltip","attr","placement","delay","$menu","next","$linkTextMenu","$input","closest","showMenu","actionMsg","test","navigator","userAgent","removeClass","select","newShare","event","$li","target","$loading","hasClass","addClass","hideMenus","shareData","defaultExpireDays","focus","response","Notification","showTemporary","then","enforcedPasswordSet","preventDefault","onLinkTextClick","onHideDownloadChange","$checkbox","siblings","is","obj","onShowPasswordClick","slideToggle","menuSpeed","toggleClass","Util","isIE","onPasswordKeyUp","keyCode","onPasswordEntered","parent","$container","onPasswordByTalkChange","onAllowPublicEditingChange","onPublicUploadChange","currentTarget","showNoteForm","stopPropagation","$element","$form","deleteNote","sendNote","updateNote","prev","trim","$submit","$error","hide","method","show","setTimeout","linkShareTemplate","templateData","passwordPlaceholderInitial","publicEditable","minDate","Date","setDate","getDate","datepicker","setDefaults","dateFormat","password_policy","minLength","popoverBase","urlLabel","mailPrivatePlaceholder","mailButtonText","pendingPopover","pendingPopoverMenuTemplate","getShareeList","replace","popover","getPopoverObject","popoverMenuTemplate","delegateEvents","autosize","onToggleMenu","isPasswordEnabledByDefault","onPopUpClick","left","screen","width","top","height","open","href","onExpireDateChange","datePicker","state","showDatePicker","setExpirationDate","expirationDatePicker","onSelect","onChangeExpirationDate","list","index","getShareeObject","stime","appswebroots","shareTime","isNumber","stripTime","getTime","onUnshare","eq","remove","ShareDialogShareeListView","_menuOpen","_renderPermissionChange","sharedBy","sharedByDisplayName","fileOwnerUid","SHARE_TYPE_REMOTE","SHARE_TYPE_REMOTE_GROUP","SHARE_TYPE_EMAIL","getCurrentUser","uid","sharer","hasPassword","isRemoteShare","isRemoteGroupShare","isCircleShare","isFileSharedByMail","getShareProperties","crudsLabel","triangleSImage","imagePath","universal","getLinkReshares","shareInitiatorDisplayName","permissionChangeShareId","shareWithIndex","sharee","replaceWith","css","imageplaceholder","_this","forEach","$edit","datePickerClass","datePickerInput","expireDateCheckbox","liSelector","log","onMailSharePasswordProtectChange","element","passwordContainerClass","passwordContainer","loading","inputClass","passwordField","passwordByTalkElement","passwordByTalkState","passwordByTalkContainerClass","onMailSharePasswordProtectByTalkChange","passwordByTalkContainer","passwordByTalkField","passwordElement","passwordState","onMailSharePasswordKeyUp","onMailSharePasswordEntered","startsWith","blur","onPermissionChange","checked","$checkboxes","not","numberChecked","$editCb","checkbox","enableCb","elem","onSecureDropChange","ShareDialogView","_templates","_showLink","_lookup","_lookupAllowed","resharerInfoView","linkShareView","shareeListView","_lastSuggestions","_lastRecommendations","_pendingOperationsCount","_onRequest","_onEndRequest","subViewOptions","subViews","Plugins","attach","onShareWithFieldChanged","onShareWithFieldFocus","$shareWithField","autocomplete","_getSuggestions","searchTerm","perPage","lookup","promise","search","itemType","statuscode","users","groups","remotes","remote_groups","emails","circles","rooms","usersLength","groupsLength","remotesLength","remoteGroupsLength","emailsLength","circlesLength","roomsLength","j","splice","sharesLength","exact","exactUsers","exactGroups","exactRemotes","exactRemoteGroups","exactEmails","exactCircles","exactRooms","exactMatches","concat","remoteGroups","lookupEnabled","grouped","sort","a","b","aProperty","bProperty","previousUuid","groupedLength","uuid","merged","moreResultsAvailable","config","Math","min","max","_getRecommendations","recommendationHandler","suggestions","info","autocompleteHandler","term","$confirm","count","title","append","autocompleteRenderItem","ul","item","icon","text","escapeHTML","description","getTranslatedType","circleInfo","circleOwner","insert","appendTo","RegExp","_onSelectRecipient","debug","stopImmediatePropagation","_confirmShare","restoreUI","_toggleLoading","_loading","_loadingOnce","baseTemplate","_renderSharePlaceholderPart","$shareField","source","numberOfItems","size","_renderItem","setShowLink","allowRemoteSharing","allowMailSharing","SHARE_TYPE_GUEST","_REMOTE_OWNER_REGEXP","droppedDown","loadIcons","fileList","callback","dirInfo","subfiles","it","updateIcons","$fileList","currentDir","OCA","Files","App","getCurrentDirectory","hasLink","img","file","shareFolder","markFileAsShared","dir","last","actions","files","image","prepend","dirname","updateIcon","itemSource","$tr","filterAttr","String","_formatRemoteShare","parts","exec","userName","userDomain","server","_formatShareList","recipients","_parent","toArray","localeCompare","recipient","hasShares","avatars","shareFolderIcon","action","ownerId","mountType","MimeType","getIconUrl","indexOf","removeAttr","showDropDown","filename","itemModel","dialogView","$dialog","slideDown","hideDropDown","slideUp","FileActions","document","ready","monthNames","monthNamesShort","dayNames","dayNamesMin","dayNamesShort","firstDay","click","isMatched","has"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAA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X/a,EAAEQ,MAAMwtB,OAAM,SAASzW,GACtB,IAAIE,EAASzX,EAAEuX,EAAME,QACjBwW,GAAaxW,EAAOkB,GAAG,+DACtBlB,EAAOX,QAAQ,sBAAsB5M,SAAWuN,EAAOX,QAAQ,oBAAoB5M,OACpFhM,GAAGC,OAASD,GAAGC,MAAMurB,aAAeuE,GAAyD,IAA5CjuB,EAAE,aAAakuB,IAAI3W,EAAME,QAAQvN,QACrFhM,GAAGC,MAAMkvB","file":"share_backend.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import './shareconfigmodel.js'\nimport './sharetemplates.js'\nimport './shareitemmodel.js'\nimport './sharesocialmanager.js'\nimport './sharedialogresharerinfoview.js'\nimport './sharedialoglinkshareview.js'\nimport './sharedialogshareelistview.js'\nimport './sharedialogview.js'\nimport './share.js'\n","/* eslint-disable */\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* global moment, OC */\n\n(function() {\n\tif (!OC.Share) {\n\t\tOC.Share = {}\n\t\tOC.Share.Types = {}\n\t}\n\n\t// FIXME: the config model should populate its own model attributes based on\n\t// the old DOM-based config\n\tvar ShareConfigModel = OC.Backbone.Model.extend({\n\t\tdefaults: {\n\t\t\tpublicUploadEnabled: false,\n\t\t\tenforcePasswordForPublicLink: OC.appConfig.core.enforcePasswordForPublicLink,\n\t\t\tenableLinkPasswordByDefault: OC.appConfig.core.enableLinkPasswordByDefault,\n\t\t\tisDefaultExpireDateEnforced: OC.appConfig.core.defaultExpireDateEnforced === true,\n\t\t\tisDefaultExpireDateEnabled: OC.appConfig.core.defaultExpireDateEnabled === true,\n\t\t\tisRemoteShareAllowed: OC.appConfig.core.remoteShareAllowed,\n\t\t\tisMailShareAllowed: OC.appConfig.shareByMailEnabled !== undefined,\n\t\t\tdefaultExpireDate: OC.appConfig.core.defaultExpireDate,\n\t\t\tisResharingAllowed: OC.appConfig.core.resharingAllowed,\n\t\t\tisPasswordForMailSharesRequired: (OC.appConfig.shareByMail === undefined) ? false : OC.appConfig.shareByMail.enforcePasswordProtection,\n\t\t\tallowGroupSharing: OC.appConfig.core.allowGroupSharing\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tisPublicUploadEnabled: function() {\n\t\t\tvar publicUploadEnabled = $('#filestable').data('allow-public-upload')\n\t\t\treturn publicUploadEnabled === 'yes'\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tisShareWithLinkAllowed: function() {\n\t\t\treturn $('#allowShareWithLink').val() === 'yes'\n\t\t},\n\n\t\t/**\n\t\t * @returns {string}\n\t\t */\n\t\tgetFederatedShareDocLink: function() {\n\t\t\treturn OC.appConfig.core.federatedCloudShareDoc\n\t\t},\n\n\t\tgetDefaultExpirationDateString: function() {\n\t\t\tvar expireDateString = ''\n\t\t\tif (this.get('isDefaultExpireDateEnabled')) {\n\t\t\t\tvar date = moment.utc()\n\t\t\t\tvar expireAfterDays = this.get('defaultExpireDate')\n\t\t\t\tdate.add(expireAfterDays, 'days')\n\t\t\t\texpireDateString = date.format('YYYY-MM-DD 00:00:00')\n\t\t\t}\n\t\t\treturn expireDateString\n\t\t}\n\t})\n\n\tOC.Share.ShareConfigModel = ShareConfigModel\n})()\n","(function() {\n var template = Handlebars.template, templates = OC.Share.Templates = OC.Share.Templates || {};\ntemplates['sharedialoglinkshareview'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \"<ul class=\\\"shareWithList\\\">\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.nolinkShares : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers.each.call(alias2,(depth0 != null ? depth0.linkShares : depth0),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</ul>\\n\";\n},\"2\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\t\t<li data-share-id=\\\"\"\n + alias5(((helper = (helper = helpers.newShareId || (depth0 != null ? depth0.newShareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"newShareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t\t\t<div class=\\\"avatar icon-public-white\\\"></div>\\n\t\t\t<span class=\\\"username\\\">\"\n + alias5(((helper = (helper = helpers.newShareLabel || (depth0 != null ? depth0.newShareLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"newShareLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t<span class=\\\"sharingOptionsGroup\\\">\\n\t\t\t\t<div class=\\\"share-menu\\\">\\n\t\t\t\t\t<a href=\\\"#\\\" class=\\\"icon icon-add new-share has-tooltip \"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.showPending : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" title=\\\"\"\n + alias5(((helper = (helper = helpers.newShareTitle || (depth0 != null ? depth0.newShareTitle : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"newShareTitle\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></a>\\n\t\t\t\t\t<span class=\\\"icon icon-loading-small \"\n + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.showPending : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\"></span>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.showPending : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t\t\t</div>\\n\t\t\t</span>\\n\t\t</li>\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n return \"hidden\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable;\n\n return \"\t\t\t\t\t\t\"\n + ((stack1 = ((helper = (helper = helpers.pendingPopoverMenu || (depth0 != null ? depth0.pendingPopoverMenu : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"pendingPopoverMenu\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\t\t<li data-share-id=\\\"\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t\t\t<div class=\\\"avatar icon-public-white\\\"></div>\\n\t\t\t<span class=\\\"username\\\" title=\\\"\"\n + alias5(((helper = (helper = helpers.linkShareCreationDate || (depth0 != null ? depth0.linkShareCreationDate : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"linkShareCreationDate\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.linkShareLabel || (depth0 != null ? depth0.linkShareLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"linkShareLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t\\n\t\t\t<span class=\\\"sharingOptionsGroup\\\">\\n\t\t\t\t<a href=\\\"#\\\" class=\\\"clipboard-button icon icon-clippy has-tooltip\\\" data-clipboard-text=\\\"\"\n + alias5(((helper = (helper = helpers.shareLinkURL || (depth0 != null ? depth0.shareLinkURL : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareLinkURL\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" title=\\\"\"\n + alias5(((helper = (helper = helpers.copyLabel || (depth0 != null ? depth0.copyLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"copyLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></a>\\n\t\t\t\t<div class=\\\"share-menu\\\">\\n\t\t\t\t\t<a href=\\\"#\\\" class=\\\"icon icon-more \"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.showPending : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\"></a>\\n\t\t\t\t\t<span class=\\\"icon icon-loading-small \"\n + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.showPending : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\"></span>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.showPending : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.program(8, data, 0),\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t\t\t</div>\\n\t\t\t</span>\\n\t\t</li>\\n\";\n},\"8\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable;\n\n return \"\t\t\t\t\t\t\"\n + ((stack1 = ((helper = (helper = helpers.popoverMenu || (depth0 != null ? depth0.popoverMenu : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"popoverMenu\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"\\n\";\n},\"10\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.noSharingPlaceholder : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(11, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\n\";\n},\"11\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"<input id=\\\"shareWith-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"shareWithField\\\" type=\\\"text\\\" placeholder=\\\"\"\n + alias5(((helper = (helper = helpers.noSharingPlaceholder || (depth0 != null ? depth0.noSharingPlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"noSharingPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" disabled=\\\"disabled\\\" />\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.shareAllowed : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(10, data, 0),\"data\":data})) != null ? stack1 : \"\");\n},\"useData\":true});\ntemplates['sharedialoglinkshareview_popover_menu'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t<input type=\\\"radio\\\" name=\\\"publicUpload\\\" value=\\\"\"\n + alias5(((helper = (helper = helpers.publicUploadRValue || (depth0 != null ? depth0.publicUploadRValue : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"publicUploadRValue\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" id=\\\"sharingDialogAllowPublicUpload-r-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"radio publicUploadRadio\\\" \"\n + ((stack1 = ((helper = (helper = helpers.publicUploadRChecked || (depth0 != null ? depth0.publicUploadRChecked : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"publicUploadRChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicUpload-r-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.publicUploadRLabel || (depth0 != null ? depth0.publicUploadRLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"publicUploadRLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t<input type=\\\"radio\\\" name=\\\"publicUpload\\\" value=\\\"\"\n + alias5(((helper = (helper = helpers.publicUploadRWValue || (depth0 != null ? depth0.publicUploadRWValue : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"publicUploadRWValue\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" id=\\\"sharingDialogAllowPublicUpload-rw-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"radio publicUploadRadio\\\" \"\n + ((stack1 = ((helper = (helper = helpers.publicUploadRWChecked || (depth0 != null ? depth0.publicUploadRWChecked : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"publicUploadRWChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicUpload-rw-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.publicUploadRWLabel || (depth0 != null ? depth0.publicUploadRWLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"publicUploadRWLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t<input type=\\\"radio\\\" name=\\\"publicUpload\\\" value=\\\"\"\n + alias5(((helper = (helper = helpers.publicUploadWValue || (depth0 != null ? depth0.publicUploadWValue : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"publicUploadWValue\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" id=\\\"sharingDialogAllowPublicUpload-w-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"radio publicUploadRadio\\\" \"\n + ((stack1 = ((helper = (helper = helpers.publicUploadWChecked || (depth0 != null ? depth0.publicUploadWChecked : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"publicUploadWChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicUpload-w-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.publicUploadWLabel || (depth0 != null ? depth0.publicUploadWLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"publicUploadWLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\t\t\t<li id=\\\"allowPublicEditingWrapper\\\">\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t<input type=\\\"checkbox\\\" name=\\\"allowPublicEditing\\\" id=\\\"sharingDialogAllowPublicEditing-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"checkbox publicEditingCheckbox\\\" \"\n + ((stack1 = ((helper = (helper = helpers.publicEditingChecked || (depth0 != null ? depth0.publicEditingChecked : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"publicEditingChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicEditing-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.publicEditingLabel || (depth0 != null ? depth0.publicEditingLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"publicEditingLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n return \"checked=\\\"checked\\\"\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n return \"disabled=\\\"disabled\\\"\";\n},\"9\":function(container,depth0,helpers,partials,data) {\n return \"hidden\";\n},\"11\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\t\t\t<li>\\n\t\t\t\t<span class=\\\"shareOption menuitem\\\">\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t<input type=\\\"checkbox\\\" name=\\\"passwordByTalk\\\" id=\\\"passwordByTalk-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"checkbox passwordByTalkCheckbox\\\"\\n\t\t\t\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isPasswordByTalkSet : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t\t<label for=\\\"passwordByTalk-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.passwordByTalkLabel || (depth0 != null ? depth0.passwordByTalkLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"passwordByTalkLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\";\n},\"13\":function(container,depth0,helpers,partials,data) {\n return \"datepicker\";\n},\"15\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return container.escapeExpression(((helper = (helper = helpers.expireDate || (depth0 != null ? depth0.expireDate : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"expireDate\",\"hash\":{},\"data\":data}) : helper)));\n},\"17\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return container.escapeExpression(((helper = (helper = helpers.defaultExpireDate || (depth0 != null ? depth0.defaultExpireDate : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"defaultExpireDate\",\"hash\":{},\"data\":data}) : helper)));\n},\"19\":function(container,depth0,helpers,partials,data) {\n return \"readonly\";\n},\"21\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\t\t\t<li>\\n\t\t\t\t<a href=\\\"#\\\" class=\\\"menuitem pop-up\\\" data-url=\\\"\"\n + alias5(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"url\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" data-window=\\\"\"\n + alias5(((helper = (helper = helpers.newWindow || (depth0 != null ? depth0.newWindow : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"newWindow\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t\t\t\t\t<span class=\\\"icon \"\n + alias5(((helper = (helper = helpers.iconClass || (depth0 != null ? depth0.iconClass : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"iconClass\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></span>\\n\t\t\t\t\t<span>\"\n + alias5(((helper = (helper = helpers.label || (depth0 != null ? depth0.label : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"label\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t\t</a>\\n\t\t\t</li>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"<div class=\\\"popovermenu menu\\\">\\n\t<ul>\\n\t\t<li class=\\\"hidden linkTextMenu\\\">\\n\t\t\t<span class=\\\"menuitem icon-link-text\\\">\\n\t\t\t\t<input id=\\\"linkText-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"linkText\\\" type=\\\"text\\\" readonly=\\\"readonly\\\" value=\\\"\"\n + alias5(((helper = (helper = helpers.shareLinkURL || (depth0 != null ? depth0.shareLinkURL : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareLinkURL\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" />\\n\t\t\t</span>\\n\t\t</li>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.publicUpload : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.publicEditing : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t<input type=\\\"checkbox\\\" name=\\\"hideDownload\\\" id=\\\"sharingDialogHideDownload-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"checkbox hideDownloadCheckbox\\\"\\n\t\t\t\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.hideDownload : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogHideDownload-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.hideDownloadLabel || (depth0 != null ? depth0.hideDownloadLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"hideDownloadLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<input type=\\\"checkbox\\\" name=\\\"showPassword\\\" id=\\\"showPassword-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"checkbox showPasswordCheckbox\\\"\\n\t\t\t\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isPasswordSet : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" \"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isPasswordEnforced : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" value=\\\"1\\\" />\\n\t\t\t\t\t<label for=\\\"showPassword-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.enablePasswordLabel || (depth0 != null ? depth0.enablePasswordLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"enablePasswordLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\t\t\t<li class=\\\"\"\n + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.isPasswordSet : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(9, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" linkPassMenu\\\">\\n\t\t\t\t<span class=\\\"menuitem icon-share-pass\\\">\\n\t\t\t\t\t<input id=\\\"linkPassText-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"linkPassText\\\" type=\\\"password\\\" placeholder=\\\"\"\n + alias5(((helper = (helper = helpers.passwordPlaceholder || (depth0 != null ? depth0.passwordPlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"passwordPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" autocomplete=\\\"new-password\\\" />\\n\t\t\t\t\t<input type=\\\"submit\\\" class=\\\"icon-confirm share-pass-submit\\\" value=\\\"\\\" />\\n\t\t\t\t\t<span class=\\\"icon icon-loading-small hidden\\\"></span>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.showPasswordByTalkCheckBox : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(11, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t<li>\\n\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t<input id=\\\"expireDate-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"expirationDate\\\" class=\\\"expireDate checkbox\\\"\\n\t\t\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.hasExpireDate : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" \"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isExpirationEnforced : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t<label for=\\\"expireDate-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.expireDateLabel || (depth0 != null ? depth0.expireDateLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"expireDateLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t</span>\\n\t\t</li>\\n\t\t<li class=\\\"\"\n + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.hasExpireDate : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(9, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t<span class=\\\"menuitem icon-expiredate expirationDateContainer-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t\t\t\t<label for=\\\"expirationDatePicker-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n + alias5(((helper = (helper = helpers.expirationDate || (depth0 != null ? depth0.expirationDate : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"expirationDate\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.expirationLabel || (depth0 != null ? depth0.expirationLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"expirationLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t<!-- do not use the datepicker if enforced -->\\n\t\t\t\t<input id=\\\"expirationDatePicker-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"\"\n + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.isExpirationEnforced : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(13, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" type=\\\"text\\\"\\n\t\t\t\t\tplaceholder=\\\"\"\n + alias5(((helper = (helper = helpers.expirationDatePlaceholder || (depth0 != null ? depth0.expirationDatePlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"expirationDatePlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" value=\\\"\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.hasExpireDate : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(15, data, 0),\"inverse\":container.program(17, data, 0),\"data\":data})) != null ? stack1 : \"\")\n + \"\\\"\\n\t\t\t\t\tdata-max-date=\\\"\"\n + alias5(((helper = (helper = helpers.maxDate || (depth0 != null ? depth0.maxDate : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"maxDate\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isExpirationEnforced : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(19, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" />\\n\t\t\t</span>\\n\t\t\t</li>\\n\t\t<li>\\n\t\t\t<a href=\\\"#\\\" class=\\\"share-add\\\">\\n\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t<span class=\\\"icon icon-edit\\\"></span>\\n\t\t\t\t<span>\"\n + alias5(((helper = (helper = helpers.addNoteLabel || (depth0 != null ? depth0.addNoteLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"addNoteLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t\t<input type=\\\"button\\\" class=\\\"share-note-delete icon-delete \"\n + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.hasNote : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(9, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t</a>\\n\t\t</li>\\n\t\t<li class=\\\"share-note-form share-note-link \"\n + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.hasNote : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(9, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t<span class=\\\"menuitem icon-note\\\">\\n\t\t\t\t<textarea class=\\\"share-note\\\">\"\n + alias5(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareNote\",\"hash\":{},\"data\":data}) : helper)))\n + \"</textarea>\\n\t\t\t\t<input type=\\\"submit\\\" class=\\\"icon-confirm share-note-submit\\\" value=\\\"\\\" id=\\\"add-note-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" />\\n\t\t\t</span>\\n\t\t</li>\\n\"\n + ((stack1 = helpers.each.call(alias2,(depth0 != null ? depth0.social : depth0),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(21, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t<li>\\n\t\t\t<a href=\\\"#\\\" class=\\\"unshare\\\"><span class=\\\"icon-loading-small hidden\\\"></span><span class=\\\"icon icon-delete\\\"></span><span>\"\n + alias5(((helper = (helper = helpers.unshareLinkLabel || (depth0 != null ? depth0.unshareLinkLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"unshareLinkLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span></a>\\n\t\t</li>\\n\t\t<li>\\n\t\t\t<a href=\\\"#\\\" class=\\\"new-share\\\">\\n\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t<span class=\\\"icon icon-add\\\"></span>\\n\t\t\t\t<span>\"\n + alias5(((helper = (helper = helpers.newShareLabel || (depth0 != null ? depth0.newShareLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"newShareLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t</a>\\n\t\t</li>\\n\t</ul>\\n</div>\\n\";\n},\"useData\":true});\ntemplates['sharedialoglinkshareview_popover_menu_pending'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem icon-info\\\">\\n\t\t\t\t\t<p>\"\n + alias5(((helper = (helper = helpers.enforcedPasswordLabel || (depth0 != null ? depth0.enforcedPasswordLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"enforcedPasswordLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\t\t\t<li class=\\\"linkPassMenu\\\">\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<form autocomplete=\\\"off\\\" class=\\\"enforcedPassForm\\\">\\n\t\t\t\t\t\t<input id=\\\"enforcedPassText\\\" required class=\\\"enforcedPassText\\\" type=\\\"password\\\"\\n\t\t\t\t\t\t\tplaceholder=\\\"\"\n + alias5(((helper = (helper = helpers.passwordPlaceholder || (depth0 != null ? depth0.passwordPlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"passwordPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" autocomplete=\\\"enforcedPassText\\\" minlength=\\\"\"\n + alias5(((helper = (helper = helpers.minPasswordLength || (depth0 != null ? depth0.minPasswordLength : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"minPasswordLength\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" />\\n\t\t\t\t\t\t<input type=\\\"submit\\\" value=\\\" \\\" class=\\\"primary icon-checkmark-white\\\">\\n\t\t\t\t\t</form>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return \"<div class=\\\"popovermenu open menu pending\\\">\\n\t<ul>\\n\"\n + ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isPasswordEnforced : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t</ul>\\n</div>\\n\";\n},\"useData\":true});\ntemplates['sharedialogresharerinfoview'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \"<div class=\\\"share-note\\\">\"\n + container.escapeExpression(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"shareNote\",\"hash\":{},\"data\":data}) : helper)))\n + \"</div>\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"<span class=\\\"reshare\\\">\\n\t<div class=\\\"avatar\\\" data-userName=\\\"\"\n + alias5(((helper = (helper = helpers.reshareOwner || (depth0 != null ? depth0.reshareOwner : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"reshareOwner\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></div>\\n\t\"\n + alias5(((helper = (helper = helpers.sharedByText || (depth0 != null ? depth0.sharedByText : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"sharedByText\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\n</span>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.hasShareNote : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\n\";\n},\"useData\":true});\ntemplates['sharedialogshareelistview'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isShareWithCurrentUser : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"2\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\t\t<li data-share-id=\\\"\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" data-share-type=\\\"\"\n + alias5(((helper = (helper = helpers.shareType || (depth0 != null ? depth0.shareType : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareType\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" data-share-with=\\\"\"\n + alias5(((helper = (helper = helpers.shareWith || (depth0 != null ? depth0.shareWith : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareWith\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t\t\t<div class=\\\"avatar \"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.modSeed : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" data-username=\\\"\"\n + alias5(((helper = (helper = helpers.shareWith || (depth0 != null ? depth0.shareWith : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareWith\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" data-avatar=\\\"\"\n + alias5(((helper = (helper = helpers.shareWithAvatar || (depth0 != null ? depth0.shareWithAvatar : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareWithAvatar\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" data-displayname=\\\"\"\n + alias5(((helper = (helper = helpers.shareWithDisplayName || (depth0 != null ? depth0.shareWithDisplayName : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareWithDisplayName\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.modSeed : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"></div>\\n\t\t\t<span class=\\\"username\\\" title=\\\"\"\n + alias5(((helper = (helper = helpers.shareWithTitle || (depth0 != null ? depth0.shareWithTitle : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareWithTitle\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.shareWithDisplayName || (depth0 != null ? depth0.shareWithDisplayName : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareWithDisplayName\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.canUpdateShareSettings : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t</li>\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n return \"imageplaceholderseed\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"data-seed=\\\"\"\n + alias5(((helper = (helper = helpers.shareWith || (depth0 != null ? depth0.shareWith : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareWith\",\"hash\":{},\"data\":data}) : helper)))\n + \" \"\n + alias5(((helper = (helper = helpers.shareType || (depth0 != null ? depth0.shareType : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareType\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \"\t\t\t<span class=\\\"sharingOptionsGroup\\\">\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.editPermissionPossible : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(8, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t\t\t<div tabindex=\\\"0\\\" class=\\\"share-menu\\\"><span class=\\\"icon icon-more\\\"></span>\\n\t\t\t\t\t\"\n + ((stack1 = ((helper = (helper = helpers.popoverMenu || (depth0 != null ? depth0.popoverMenu : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(alias2,{\"name\":\"popoverMenu\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"\\n\t\t\t\t</div>\\n\t\t\t</span>\\n\";\n},\"8\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\t\t\t\t\t<span>\\n\t\t\t\t\t\t<input id=\\\"canEdit-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"edit\\\" class=\\\"permissions checkbox\\\" />\\n\t\t\t\t\t\t<label for=\\\"canEdit-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.canEditLabel || (depth0 != null ? depth0.canEditLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"canEditLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t</span>\\n\";\n},\"10\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\t\t<li data-share-id=\\\"\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" data-share-type=\\\"\"\n + alias5(((helper = (helper = helpers.shareType || (depth0 != null ? depth0.shareType : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareType\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\t\t\t<div class=\\\"avatar\\\" data-username=\\\"\"\n + alias5(((helper = (helper = helpers.shareInitiator || (depth0 != null ? depth0.shareInitiator : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareInitiator\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></div>\\n\t\t\t<span class=\\\"has-tooltip username\\\" title=\\\"\"\n + alias5(((helper = (helper = helpers.shareInitiator || (depth0 != null ? depth0.shareInitiator : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareInitiator\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.shareInitiatorText || (depth0 != null ? depth0.shareInitiatorText : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareInitiatorText\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t<span class=\\\"sharingOptionsGroup\\\">\\n\t\t\t\t<a href=\\\"#\\\" class=\\\"unshare\\\"><span class=\\\"icon-loading-small hidden\\\"></span><span class=\\\"icon icon-delete\\\"></span><span class=\\\"hidden-visually\\\">\"\n + alias5(((helper = (helper = helpers.unshareLabel || (depth0 != null ? depth0.unshareLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"unshareLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span></a>\\n\t\t\t</span>\\n\t\t</li>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \"<ul id=\\\"shareWithList\\\" class=\\\"shareWithList\\\">\\n\"\n + ((stack1 = helpers.each.call(alias2,(depth0 != null ? depth0.sharees : depth0),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers.each.call(alias2,(depth0 != null ? depth0.linkReshares : depth0),{\"name\":\"each\",\"hash\":{},\"fn\":container.program(10, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</ul>\\n\";\n},\"useData\":true});\ntemplates['sharedialogshareelistview_popover_menu'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return \" \"\n + ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.sharePermissionPossible : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" \";\n},\"2\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return \" \"\n + ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isMailShare : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" \";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\\n\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<input id=\\\"canShare-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"share\\\" class=\\\"permissions checkbox\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.hasSharePermission : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" data-permissions=\\\"\"\n + alias5(((helper = (helper = helpers.sharePermission || (depth0 != null ? depth0.sharePermission : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"sharePermission\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" />\\n\t\t\t\t\t<label for=\\\"canShare-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.canShareLabel || (depth0 != null ? depth0.canShareLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"canShareLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t\t</li>\\n\t\t\t\";\n},\"4\":function(container,depth0,helpers,partials,data) {\n return \"checked=\\\"checked\\\"\";\n},\"6\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \"\t\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.createPermissionPossible : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\n\t\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.updatePermissionPossible : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(10, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\n\t\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.deletePermissionPossible : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(13, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isMailShare : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(8, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"8\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\\n\t\t\t\t<li>\\n\t\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t\t<input id=\\\"canCreate-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"create\\\" class=\\\"permissions checkbox\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.hasCreatePermission : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" data-permissions=\\\"\"\n + alias5(((helper = (helper = helpers.createPermission || (depth0 != null ? depth0.createPermission : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"createPermission\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"canCreate-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.createPermissionLabel || (depth0 != null ? depth0.createPermissionLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"createPermissionLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t</span>\\n\t\t\t\t</li>\\n\t\t\t\";\n},\"10\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isMailShare : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(11, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"11\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\\n\t\t\t\t<li>\\n\t\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t\t<input id=\\\"canUpdate-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"update\\\" class=\\\"permissions checkbox\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.hasUpdatePermission : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" data-permissions=\\\"\"\n + alias5(((helper = (helper = helpers.updatePermission || (depth0 != null ? depth0.updatePermission : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"updatePermission\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"canUpdate-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.updatePermissionLabel || (depth0 != null ? depth0.updatePermissionLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"updatePermissionLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t</span>\\n\t\t\t\t</li>\\n\t\t\t\t\";\n},\"13\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isMailShare : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(14, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"14\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\\n\t\t\t\t<li>\\n\t\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t\t<input id=\\\"canDelete-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"delete\\\" class=\\\"permissions checkbox\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.hasDeletePermission : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" data-permissions=\\\"\"\n + alias5(((helper = (helper = helpers.deletePermission || (depth0 != null ? depth0.deletePermission : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"deletePermission\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"canDelete-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.deletePermissionLabel || (depth0 != null ? depth0.deletePermissionLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"deletePermissionLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t</span>\\n\t\t\t\t</li>\\n\t\t\t\t\";\n},\"16\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.hasCreatePermission : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(17, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t\t<li>\\n\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t<input id=\\\"password-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"password\\\" class=\\\"password checkbox\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isPasswordSet : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isPasswordSet : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(19, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" />\\n\t\t\t\t\t<label for=\\\"password-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.passwordLabel || (depth0 != null ? depth0.passwordLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"passwordLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\t\t\t<li class=\\\"passwordMenu-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \" \"\n + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.isPasswordSet : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(22, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t\t<span class=\\\"passwordContainer-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \" icon-passwordmail menuitem\\\">\\n\t\t\t\t\t<label for=\\\"passwordField-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n + alias5(((helper = (helper = helpers.password || (depth0 != null ? depth0.password : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"password\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.passwordLabel || (depth0 != null ? depth0.passwordLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"passwordLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t<input id=\\\"passwordField-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"passwordField\\\" type=\\\"password\\\" placeholder=\\\"\"\n + alias5(((helper = (helper = helpers.passwordPlaceholder || (depth0 != null ? depth0.passwordPlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"passwordPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" value=\\\"\"\n + alias5(((helper = (helper = helpers.passwordValue || (depth0 != null ? depth0.passwordValue : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"passwordValue\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" autocomplete=\\\"new-password\\\" />\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isTalkEnabled : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(24, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"17\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\t\t\t\t<li>\\n\t\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t\t<input id=\\\"secureDrop-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"secureDrop\\\" class=\\\"checkbox secureDrop\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.secureDropMode : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" data-permissions=\\\"\"\n + alias5(((helper = (helper = helpers.readPermission || (depth0 != null ? depth0.readPermission : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"readPermission\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"secureDrop-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.secureDropLabel || (depth0 != null ? depth0.secureDropLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"secureDropLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t</span>\\n\t\t\t\t</li>\\n\";\n},\"19\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isPasswordForMailSharesRequired : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(20, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"20\":function(container,depth0,helpers,partials,data) {\n return \"disabled=\\\"\\\"\";\n},\"22\":function(container,depth0,helpers,partials,data) {\n return \"hidden\";\n},\"24\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\t\t\t\t<li>\\n\t\t\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t\t\t<input id=\\\"passwordByTalk-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"passwordByTalk\\\" class=\\\"passwordByTalk checkbox\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isPasswordByTalkSet : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" />\\n\t\t\t\t\t\t<label for=\\\"passwordByTalk-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.passwordByTalkLabel || (depth0 != null ? depth0.passwordByTalkLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"passwordByTalkLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t</span>\\n\t\t\t\t</li>\\n\t\t\t\t<li class=\\\"passwordByTalkMenu-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \" \"\n + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.isPasswordByTalkSet : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(22, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t\t\t<span class=\\\"passwordByTalkContainer-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \" icon-passwordtalk menuitem\\\">\\n\t\t\t\t\t\t<label for=\\\"passwordByTalkField-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n + alias5(((helper = (helper = helpers.password || (depth0 != null ? depth0.password : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"password\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.passwordByTalkLabel || (depth0 != null ? depth0.passwordByTalkLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"passwordByTalkLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t\t\t<input id=\\\"passwordByTalkField-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"passwordField\\\" type=\\\"password\\\" placeholder=\\\"\"\n + alias5(((helper = (helper = helpers.passwordByTalkPlaceholder || (depth0 != null ? depth0.passwordByTalkPlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"passwordByTalkPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" value=\\\"\"\n + alias5(((helper = (helper = helpers.passwordValue || (depth0 != null ? depth0.passwordValue : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"passwordValue\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" autocomplete=\\\"new-password\\\" />\\n\t\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t</span>\\n\t\t\t\t</li>\\n\";\n},\"26\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return container.escapeExpression(((helper = (helper = helpers.expireDate || (depth0 != null ? depth0.expireDate : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"expireDate\",\"hash\":{},\"data\":data}) : helper)));\n},\"28\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return container.escapeExpression(((helper = (helper = helpers.defaultExpireDate || (depth0 != null ? depth0.defaultExpireDate : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"defaultExpireDate\",\"hash\":{},\"data\":data}) : helper)));\n},\"30\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\t\t\t<li>\\n\t\t\t\t<a href=\\\"#\\\" class=\\\"share-add\\\">\\n\t\t\t\t\t<span class=\\\"icon-loading-small hidden\\\"></span>\\n\t\t\t\t\t<span class=\\\"icon icon-edit\\\"></span>\\n\t\t\t\t\t<span>\"\n + alias5(((helper = (helper = helpers.addNoteLabel || (depth0 != null ? depth0.addNoteLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"addNoteLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\t\t\t\t\t<input type=\\\"button\\\" class=\\\"share-note-delete icon-delete \"\n + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.hasNote : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(22, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t\t</a>\\n\t\t\t</li>\\n\t\t\t<li class=\\\"share-note-form \"\n + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.hasNote : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(22, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t\t<span class=\\\"menuitem icon-note\\\">\\n\t\t\t\t\t<textarea class=\\\"share-note\\\">\"\n + alias5(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareNote\",\"hash\":{},\"data\":data}) : helper)))\n + \"</textarea>\\n\t\t\t\t\t<input type=\\\"submit\\\" class=\\\"icon-confirm share-note-submit\\\" value=\\\"\\\" id=\\\"add-note-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" />\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"<div class=\\\"popovermenu bubble hidden menu\\\">\\n\t<ul>\\n\t\t\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isResharingAllowed : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isFolder : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(6, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isMailShare : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(16, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t<li>\\n\t\t\t<span class=\\\"menuitem\\\">\\n\t\t\t\t<input id=\\\"expireDate-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" type=\\\"checkbox\\\" name=\\\"expirationDate\\\" class=\\\"expireDate checkbox\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.hasExpireDate : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" />\\n\t\t\t\t<label for=\\\"expireDate-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.expireDateLabel || (depth0 != null ? depth0.expireDateLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"expireDateLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t</span>\\n\t\t</li>\\n\t\t<li class=\\\"expirationDateMenu-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \" \"\n + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.hasExpireDate : depth0),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(22, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\">\\n\t\t\t<span class=\\\"expirationDateContainer-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \" icon-expiredate menuitem\\\">\\n\t\t\t\t<label for=\\\"expirationDatePicker-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n + alias5(((helper = (helper = helpers.expirationDate || (depth0 != null ? depth0.expirationDate : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"expirationDate\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\"\n + alias5(((helper = (helper = helpers.expirationLabel || (depth0 != null ? depth0.expirationLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"expirationLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t\t\t\t<input id=\\\"expirationDatePicker-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-\"\n + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"datepicker\\\" type=\\\"text\\\" placeholder=\\\"\"\n + alias5(((helper = (helper = helpers.expirationDatePlaceholder || (depth0 != null ? depth0.expirationDatePlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"expirationDatePlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" value=\\\"\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.hasExpireDate : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(26, data, 0),\"inverse\":container.program(28, data, 0),\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" />\\n\t\t\t</span>\\n\t\t</li>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isNoteAvailable : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(30, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\t\t<li>\\n\t\t\t<a href=\\\"#\\\" class=\\\"unshare\\\"><span class=\\\"icon-loading-small hidden\\\"></span><span class=\\\"icon icon-delete\\\"></span><span>\"\n + alias5(((helper = (helper = helpers.unshareLabel || (depth0 != null ? depth0.unshareLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"unshareLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span></a>\\n\t\t</li>\\n\t</ul>\\n</div>\\n\";\n},\"useData\":true});\ntemplates['sharedialogview'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"\t<label for=\\\"shareWith-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"hidden-visually\\\">\"\n + alias5(((helper = (helper = helpers.shareLabel || (depth0 != null ? depth0.shareLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"shareLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t<div class=\\\"oneline\\\">\\n\t\t<input id=\\\"shareWith-\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" class=\\\"shareWithField\\\" type=\\\"text\\\" placeholder=\\\"\"\n + alias5(((helper = (helper = helpers.sharePlaceholder || (depth0 != null ? depth0.sharePlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"sharePlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\" />\\n\t\t<span class=\\\"shareWithLoading icon-loading-small hidden\\\"></span>\\n\t\t<span class=\\\"shareWithConfirm icon icon-confirm\\\"></span>\\n\t</div>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return \"<div class=\\\"resharerInfoView subView\\\"></div>\\n\"\n + ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isSharingAllowed : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"<div class=\\\"linkShareView subView\\\"></div>\\n<div class=\\\"shareeListView subView\\\"></div>\\n<div class=\\\"loading hidden\\\" style=\\\"height: 50px\\\"></div>\\n\";\n},\"useData\":true});\n})();","/* eslint-disable */\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function() {\n\tif (!OC.Share) {\n\t\tOC.Share = {}\n\t\tOC.Share.Types = {}\n\t}\n\n\t/**\n\t * @typedef {object} OC.Share.Types.LinkShareInfo\n\t * @property {string} token\n\t * @property {bool} hideDownload\n\t * @property {string|null} password\n\t * @property {bool} sendPasswordByTalk\n\t * @property {number} permissions\n\t * @property {Date} expiration\n\t * @property {number} stime share time\n\t */\n\n\t/**\n\t * @typedef {object} OC.Share.Types.Reshare\n\t * @property {string} uid_owner\n\t * @property {number} share_type\n\t * @property {string} share_with\n\t * @property {string} displayname_owner\n\t * @property {number} permissions\n\t */\n\n\t/**\n\t * @typedef {object} OC.Share.Types.ShareInfo\n\t * @property {number} share_type\n\t * @property {number} permissions\n\t * @property {number} file_source optional\n\t * @property {number} item_source\n\t * @property {string} token\n\t * @property {string} share_with\n\t * @property {string} share_with_displayname\n\t * @property {string} share_with_avatar\n\t * @property {string} mail_send\n\t * @property {Date} expiration optional?\n\t * @property {number} stime optional?\n\t * @property {string} uid_owner\n\t * @property {string} displayname_owner\n\t */\n\n\t/**\n\t * @typedef {object} OC.Share.Types.ShareItemInfo\n\t * @property {OC.Share.Types.Reshare} reshare\n\t * @property {OC.Share.Types.ShareInfo[]} shares\n\t * @property {OC.Share.Types.LinkShareInfo|undefined} linkShare\n\t */\n\n\t/**\n\t * These properties are sometimes returned by the server as strings instead\n\t * of integers, so we need to convert them accordingly...\n\t */\n\tvar SHARE_RESPONSE_INT_PROPS = [\n\t\t'id', 'file_parent', 'mail_send', 'file_source', 'item_source', 'permissions',\n\t\t'storage', 'share_type', 'parent', 'stime'\n\t]\n\n\t/**\n\t * @class OCA.Share.ShareItemModel\n\t * @classdesc\n\t *\n\t * Represents the GUI of the share dialogue\n\t *\n\t * // FIXME: use OC Share API once #17143 is done\n\t *\n\t * // TODO: this really should be a collection of share item models instead,\n\t * where the link share is one of them\n\t */\n\tvar ShareItemModel = OC.Backbone.Model.extend({\n\t\t/**\n\t\t * share id of the link share, if applicable\n\t\t */\n\t\t_linkShareId: null,\n\n\t\tinitialize: function(attributes, options) {\n\t\t\tif (!_.isUndefined(options.configModel)) {\n\t\t\t\tthis.configModel = options.configModel\n\t\t\t}\n\t\t\tif (!_.isUndefined(options.fileInfoModel)) {\n\t\t\t\t/** @type {OC.Files.FileInfo} **/\n\t\t\t\tthis.fileInfoModel = options.fileInfoModel\n\t\t\t}\n\n\t\t\t_.bindAll(this, 'addShare')\n\t\t},\n\n\t\tdefaults: {\n\t\t\tallowPublicUploadStatus: false,\n\t\t\tpermissions: 0,\n\t\t\tlinkShares: []\n\t\t},\n\n\t\t/**\n\t\t * Saves the current link share information.\n\t\t *\n\t\t * This will trigger an ajax call and, if successful, refetch the model\n\t\t * afterwards. Callbacks \"success\", \"error\" and \"complete\" can be given\n\t\t * in the options object; \"success\" is called after a successful save\n\t\t * once the model is refetch, \"error\" is called after a failed save, and\n\t\t * \"complete\" is called both after a successful save and after a failed\n\t\t * save. Note that \"complete\" is called before \"success\" and \"error\" are\n\t\t * called (unlike in jQuery, in which it is called after them); this\n\t\t * ensures that \"complete\" is called even if refetching the model fails.\n\t\t *\n\t\t * TODO: this should be a separate model\n\t\t */\n\t\tsaveLinkShare: function(attributes, options) {\n\t\t\toptions = options || {}\n\t\t\tattributes = _.extend({}, attributes)\n\n\t\t\tvar shareId = null\n\t\t\tvar call\n\n\t\t\t// oh yeah...\n\t\t\tif (attributes.expiration) {\n\t\t\t\tattributes.expireDate = attributes.expiration\n\t\t\t\tdelete attributes.expiration\n\t\t\t}\n\n\t\t\tvar linkShares = this.get('linkShares')\n\t\t\tvar shareIndex = _.findIndex(linkShares, function(share) { return share.id === attributes.cid })\n\n\t\t\tif (linkShares.length > 0 && shareIndex !== -1) {\n\t\t\t\tshareId = linkShares[shareIndex].id\n\n\t\t\t\t// note: update can only update a single value at a time\n\t\t\t\tcall = this.updateShare(shareId, attributes, options)\n\t\t\t} else {\n\t\t\t\tattributes = _.defaults(attributes, {\n\t\t\t\t\thideDownload: false,\n\t\t\t\t\tpassword: '',\n\t\t\t\t\tpasswordChanged: false,\n\t\t\t\t\tsendPasswordByTalk: false,\n\t\t\t\t\tpermissions: OC.PERMISSION_READ,\n\t\t\t\t\texpireDate: this.configModel.getDefaultExpirationDateString(),\n\t\t\t\t\tshareType: OC.Share.SHARE_TYPE_LINK\n\t\t\t\t})\n\n\t\t\t\tcall = this.addShare(attributes, options)\n\t\t\t}\n\n\t\t\treturn call\n\t\t},\n\n\t\taddShare: function(attributes, options) {\n\t\t\tvar shareType = attributes.shareType\n\t\t\tattributes = _.extend({}, attributes)\n\n\t\t\t// get default permissions\n\t\t\tvar defaultPermissions = OC.getCapabilities()['files_sharing']['default_permissions'] || OC.PERMISSION_ALL\n\t\t\tvar possiblePermissions = OC.PERMISSION_READ\n\n\t\t\tif (this.updatePermissionPossible()) {\n\t\t\t\tpossiblePermissions = possiblePermissions | OC.PERMISSION_UPDATE\n\t\t\t}\n\t\t\tif (this.createPermissionPossible()) {\n\t\t\t\tpossiblePermissions = possiblePermissions | OC.PERMISSION_CREATE\n\t\t\t}\n\t\t\tif (this.deletePermissionPossible()) {\n\t\t\t\tpossiblePermissions = possiblePermissions | OC.PERMISSION_DELETE\n\t\t\t}\n\t\t\tif (this.configModel.get('isResharingAllowed') && (this.sharePermissionPossible())) {\n\t\t\t\tpossiblePermissions = possiblePermissions | OC.PERMISSION_SHARE\n\t\t\t}\n\n\t\t\tattributes.permissions = defaultPermissions & possiblePermissions\n\t\t\tif (_.isUndefined(attributes.path)) {\n\t\t\t\tattributes.path = this.fileInfoModel.getFullPath()\n\t\t\t}\n\n\t\t\treturn this._addOrUpdateShare({\n\t\t\t\ttype: 'POST',\n\t\t\t\turl: this._getUrl('shares'),\n\t\t\t\tdata: attributes,\n\t\t\t\tdataType: 'json'\n\t\t\t}, options)\n\t\t},\n\n\t\tupdateShare: function(shareId, attrs, options) {\n\t\t\treturn this._addOrUpdateShare({\n\t\t\t\ttype: 'PUT',\n\t\t\t\turl: this._getUrl('shares/' + encodeURIComponent(shareId)),\n\t\t\t\tdata: attrs,\n\t\t\t\tdataType: 'json'\n\t\t\t}, options)\n\t\t},\n\n\t\t_addOrUpdateShare: function(ajaxSettings, options) {\n\t\t\tvar self = this\n\t\t\toptions = options || {}\n\n\t\t\treturn $.ajax(\n\t\t\t\tajaxSettings\n\t\t\t).always(function() {\n\t\t\t\tif (_.isFunction(options.complete)) {\n\t\t\t\t\toptions.complete(self)\n\t\t\t\t}\n\t\t\t}).done(function() {\n\t\t\t\tself.fetch().done(function() {\n\t\t\t\t\tif (_.isFunction(options.success)) {\n\t\t\t\t\t\toptions.success(self)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}).fail(function(xhr) {\n\t\t\t\tvar msg = t('core', 'Error')\n\t\t\t\tvar result = xhr.responseJSON\n\t\t\t\tif (result && result.ocs && result.ocs.meta) {\n\t\t\t\t\tmsg = result.ocs.meta.message\n\t\t\t\t}\n\n\t\t\t\tif (_.isFunction(options.error)) {\n\t\t\t\t\toptions.error(self, msg)\n\t\t\t\t} else {\n\t\t\t\t\tOC.dialogs.alert(msg, t('core', 'Error while sharing'))\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * Deletes the share with the given id\n\t\t *\n\t\t * @param {int} shareId share id\n\t\t * @returns {jQuery}\n\t\t */\n\t\tremoveShare: function(shareId, options) {\n\t\t\tvar self = this\n\t\t\toptions = options || {}\n\t\t\treturn $.ajax({\n\t\t\t\ttype: 'DELETE',\n\t\t\t\turl: this._getUrl('shares/' + encodeURIComponent(shareId))\n\t\t\t}).done(function() {\n\t\t\t\tself.fetch({\n\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\tif (_.isFunction(options.success)) {\n\t\t\t\t\t\t\toptions.success(self)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}).fail(function(xhr) {\n\t\t\t\tvar msg = t('core', 'Error')\n\t\t\t\tvar result = xhr.responseJSON\n\t\t\t\tif (result.ocs && result.ocs.meta) {\n\t\t\t\t\tmsg = result.ocs.meta.message\n\t\t\t\t}\n\n\t\t\t\tif (_.isFunction(options.error)) {\n\t\t\t\t\toptions.error(self, msg)\n\t\t\t\t} else {\n\t\t\t\t\tOC.dialogs.alert(msg, t('core', 'Error removing share'))\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tisPublicUploadAllowed: function() {\n\t\t\treturn this.get('allowPublicUploadStatus')\n\t\t},\n\n\t\tisPublicEditingAllowed: function() {\n\t\t\treturn this.get('allowPublicEditingStatus')\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tisHideFileListSet: function() {\n\t\t\treturn this.get('hideFileListStatus')\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tisFolder: function() {\n\t\t\treturn this.get('itemType') === 'folder'\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tisFile: function() {\n\t\t\treturn this.get('itemType') === 'file'\n\t\t},\n\n\t\t/**\n\t\t * whether this item has reshare information\n\t\t * @returns {boolean}\n\t\t */\n\t\thasReshare: function() {\n\t\t\tvar reshare = this.get('reshare')\n\t\t\treturn _.isObject(reshare) && !_.isUndefined(reshare.uid_owner)\n\t\t},\n\n\t\t/**\n\t\t * whether this item has user share information\n\t\t * @returns {boolean}\n\t\t */\n\t\thasUserShares: function() {\n\t\t\treturn this.getSharesWithCurrentItem().length > 0\n\t\t},\n\n\t\t/**\n\t\t * Returns whether this item has link shares\n\t\t *\n\t\t * @returns {bool} true if a link share exists, false otherwise\n\t\t */\n\t\thasLinkShares: function() {\n\t\t\tvar linkShares = this.get('linkShares')\n\t\t\tif (linkShares && linkShares.length > 0) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t\treturn false\n\t\t},\n\n\t\t/**\n\t\t * @returns {string}\n\t\t */\n\t\tgetReshareOwner: function() {\n\t\t\treturn this.get('reshare').uid_owner\n\t\t},\n\n\t\t/**\n\t\t * @returns {string}\n\t\t */\n\t\tgetReshareOwnerDisplayname: function() {\n\t\t\treturn this.get('reshare').displayname_owner\n\t\t},\n\n\t\t/**\n\t\t * @returns {string}\n\t\t */\n\t\tgetReshareNote: function() {\n\t\t\treturn this.get('reshare').note\n\t\t},\n\n\t\t/**\n\t\t * @returns {string}\n\t\t */\n\t\tgetReshareWith: function() {\n\t\t\treturn this.get('reshare').share_with\n\t\t},\n\n\t\t/**\n\t\t * @returns {string}\n\t\t */\n\t\tgetReshareWithDisplayName: function() {\n\t\t\tvar reshare = this.get('reshare')\n\t\t\treturn reshare.share_with_displayname || reshare.share_with\n\t\t},\n\n\t\t/**\n\t\t * @returns {number}\n\t\t */\n\t\tgetReshareType: function() {\n\t\t\treturn this.get('reshare').share_type\n\t\t},\n\n\t\tgetExpireDate: function(shareIndex) {\n\t\t\treturn this._shareExpireDate(shareIndex)\n\t\t},\n\n\t\tgetNote: function(shareIndex) {\n\t\t\treturn this._shareNote(shareIndex)\n\t\t},\n\n\t\t/**\n\t\t * Returns all share entries that only apply to the current item\n\t\t * (file/folder)\n\t\t *\n\t\t * @returns {Array.<OC.Share.Types.ShareInfo>}\n\t\t */\n\t\tgetSharesWithCurrentItem: function() {\n\t\t\tvar shares = this.get('shares') || []\n\t\t\tvar fileId = this.fileInfoModel.get('id')\n\t\t\treturn _.filter(shares, function(share) {\n\t\t\t\treturn share.item_source === fileId\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t * @param shareIndex\n\t\t * @returns {string}\n\t\t */\n\t\tgetShareWith: function(shareIndex) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex]\n\t\t\tif (!_.isObject(share)) {\n\t\t\t\tthrow 'Unknown Share'\n\t\t\t}\n\t\t\treturn share.share_with\n\t\t},\n\n\t\t/**\n\t\t * @param shareIndex\n\t\t * @returns {string}\n\t\t */\n\t\tgetShareWithDisplayName: function(shareIndex) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex]\n\t\t\tif (!_.isObject(share)) {\n\t\t\t\tthrow 'Unknown Share'\n\t\t\t}\n\t\t\treturn share.share_with_displayname\n\t\t},\n\n\t\t/**\n\t\t * @param shareIndex\n\t\t * @returns {string}\n\t\t */\n\t\tgetShareWithAvatar: function(shareIndex) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex]\n\t\t\tif (!_.isObject(share)) {\n\t\t\t\tthrow 'Unknown Share'\n\t\t\t}\n\t\t\treturn share.share_with_avatar\n\t\t},\n\n\t\t/**\n\t\t * @param shareIndex\n\t\t * @returns {string}\n\t\t */\n\t\tgetSharedBy: function(shareIndex) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex]\n\t\t\tif (!_.isObject(share)) {\n\t\t\t\tthrow 'Unknown Share'\n\t\t\t}\n\t\t\treturn share.uid_owner\n\t\t},\n\n\t\t/**\n\t\t * @param shareIndex\n\t\t * @returns {string}\n\t\t */\n\t\tgetSharedByDisplayName: function(shareIndex) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex]\n\t\t\tif (!_.isObject(share)) {\n\t\t\t\tthrow 'Unknown Share'\n\t\t\t}\n\t\t\treturn share.displayname_owner\n\t\t},\n\n\t\t/**\n\t\t * @param shareIndex\n\t\t * @returns {string}\n\t\t */\n\t\tgetFileOwnerUid: function(shareIndex) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex]\n\t\t\tif (!_.isObject(share)) {\n\t\t\t\tthrow 'Unknown Share'\n\t\t\t}\n\t\t\treturn share.uid_file_owner\n\t\t},\n\n\t\t/**\n\t\t * returns the array index of a sharee for a provided shareId\n\t\t *\n\t\t * @param shareId\n\t\t * @returns {number}\n\t\t */\n\t\tfindShareWithIndex: function(shareId) {\n\t\t\tvar shares = this.get('shares')\n\t\t\tif (!_.isArray(shares)) {\n\t\t\t\tthrow 'Unknown Share'\n\t\t\t}\n\t\t\tfor (var i = 0; i < shares.length; i++) {\n\t\t\t\tvar shareWith = shares[i]\n\t\t\t\tif (shareWith.id === shareId) {\n\t\t\t\t\treturn i\n\t\t\t\t}\n\t\t\t}\n\t\t\tthrow 'Unknown Sharee'\n\t\t},\n\n\t\tgetShareType: function(shareIndex) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex]\n\t\t\tif (!_.isObject(share)) {\n\t\t\t\tthrow 'Unknown Share'\n\t\t\t}\n\t\t\treturn share.share_type\n\t\t},\n\n\t\t/**\n\t\t * whether a share from shares has the requested permission\n\t\t *\n\t\t * @param {number} shareIndex\n\t\t * @param {number} permission\n\t\t * @returns {boolean}\n\t\t * @private\n\t\t */\n\t\t_shareHasPermission: function(shareIndex, permission) {\n\t\t\t/** @type OC.Share.Types.ShareInfo **/\n\t\t\tvar share = this.get('shares')[shareIndex]\n\t\t\tif (!_.isObject(share)) {\n\t\t\t\tthrow 'Unknown Share'\n\t\t\t}\n\t\t\treturn (share.permissions & permission) === permission\n\t\t},\n\n\t\t_shareExpireDate: function(shareIndex) {\n\t\t\tvar share = this.get('shares')[shareIndex]\n\t\t\tif (!_.isObject(share)) {\n\t\t\t\tthrow 'Unknown Share'\n\t\t\t}\n\t\t\tvar date2 = share.expiration\n\t\t\treturn date2\n\t\t},\n\n\t\t_shareNote: function(shareIndex) {\n\t\t\tvar share = this.get('shares')[shareIndex]\n\t\t\tif (!_.isObject(share)) {\n\t\t\t\tthrow 'Unknown Share'\n\t\t\t}\n\t\t\treturn share.note\n\t\t},\n\n\t\t/**\n\t\t * @returns {int}\n\t\t */\n\t\tgetPermissions: function() {\n\t\t\treturn this.get('permissions')\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tsharePermissionPossible: function() {\n\t\t\treturn (this.get('permissions') & OC.PERMISSION_SHARE) === OC.PERMISSION_SHARE\n\t\t},\n\n\t\t/**\n\t\t * @param {number} shareIndex\n\t\t * @returns {boolean}\n\t\t */\n\t\thasSharePermission: function(shareIndex) {\n\t\t\treturn this._shareHasPermission(shareIndex, OC.PERMISSION_SHARE)\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tcreatePermissionPossible: function() {\n\t\t\treturn (this.get('permissions') & OC.PERMISSION_CREATE) === OC.PERMISSION_CREATE\n\t\t},\n\n\t\t/**\n\t\t * @param {number} shareIndex\n\t\t * @returns {boolean}\n\t\t */\n\t\thasCreatePermission: function(shareIndex) {\n\t\t\treturn this._shareHasPermission(shareIndex, OC.PERMISSION_CREATE)\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tupdatePermissionPossible: function() {\n\t\t\treturn (this.get('permissions') & OC.PERMISSION_UPDATE) === OC.PERMISSION_UPDATE\n\t\t},\n\n\t\t/**\n\t\t * @param {number} shareIndex\n\t\t * @returns {boolean}\n\t\t */\n\t\thasUpdatePermission: function(shareIndex) {\n\t\t\treturn this._shareHasPermission(shareIndex, OC.PERMISSION_UPDATE)\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\tdeletePermissionPossible: function() {\n\t\t\treturn (this.get('permissions') & OC.PERMISSION_DELETE) === OC.PERMISSION_DELETE\n\t\t},\n\n\t\t/**\n\t\t * @param {number} shareIndex\n\t\t * @returns {boolean}\n\t\t */\n\t\thasDeletePermission: function(shareIndex) {\n\t\t\treturn this._shareHasPermission(shareIndex, OC.PERMISSION_DELETE)\n\t\t},\n\n\t\thasReadPermission: function(shareIndex) {\n\t\t\treturn this._shareHasPermission(shareIndex, OC.PERMISSION_READ)\n\t\t},\n\n\t\t/**\n\t\t * @returns {boolean}\n\t\t */\n\t\teditPermissionPossible: function() {\n\t\t\treturn this.createPermissionPossible()\n\t\t\t\t || this.updatePermissionPossible()\n\t\t\t\t || this.deletePermissionPossible()\n\t\t},\n\n\t\t/**\n\t\t * @returns {string}\n\t\t * The state that the 'can edit' permission checkbox should have.\n\t\t * Possible values:\n\t\t * - empty string: no permission\n\t\t * - 'checked': all applicable permissions\n\t\t * - 'indeterminate': some but not all permissions\n\t\t */\n\t\teditPermissionState: function(shareIndex) {\n\t\t\tvar hcp = this.hasCreatePermission(shareIndex)\n\t\t\tvar hup = this.hasUpdatePermission(shareIndex)\n\t\t\tvar hdp = this.hasDeletePermission(shareIndex)\n\t\t\tif (this.isFile()) {\n\t\t\t\tif (hcp || hup || hdp) {\n\t\t\t\t\treturn 'checked'\n\t\t\t\t}\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif (!hcp && !hup && !hdp) {\n\t\t\t\treturn ''\n\t\t\t}\n\t\t\tif ((this.createPermissionPossible() && !hcp)\n\t\t\t\t|| (this.updatePermissionPossible() && !hup)\n\t\t\t\t|| (this.deletePermissionPossible() && !hdp)) {\n\t\t\t\treturn 'indeterminate'\n\t\t\t}\n\t\t\treturn 'checked'\n\t\t},\n\n\t\t/**\n\t\t * @returns {int}\n\t\t */\n\t\tlinkSharePermissions: function(shareId) {\n\t\t\tvar linkShares = this.get('linkShares')\n\t\t\tvar shareIndex = _.findIndex(linkShares, function(share) { return share.id === shareId })\n\n\t\t\tif (!this.hasLinkShares()) {\n\t\t\t\treturn -1\n\t\t\t} else if (linkShares.length > 0 && shareIndex !== -1) {\n\t\t\t\treturn linkShares[shareIndex].permissions\n\t\t\t}\n\t\t\treturn -1\n\t\t},\n\n\t\t_getUrl: function(base, params) {\n\t\t\tparams = _.extend({ format: 'json' }, params || {})\n\t\t\treturn OC.linkToOCS('apps/files_sharing/api/v1', 2) + base + '?' + OC.buildQueryString(params)\n\t\t},\n\n\t\t_fetchShares: function() {\n\t\t\tvar path = this.fileInfoModel.getFullPath()\n\t\t\treturn $.ajax({\n\t\t\t\ttype: 'GET',\n\t\t\t\turl: this._getUrl('shares', { path: path, reshares: true })\n\t\t\t})\n\t\t},\n\n\t\t_fetchReshare: function() {\n\t\t\t// only fetch original share once\n\t\t\tif (!this._reshareFetched) {\n\t\t\t\tvar path = this.fileInfoModel.getFullPath()\n\t\t\t\tthis._reshareFetched = true\n\t\t\t\treturn $.ajax({\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\turl: this._getUrl('shares', { path: path, shared_with_me: true })\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\treturn $.Deferred().resolve([{\n\t\t\t\t\tocs: {\n\t\t\t\t\t\tdata: [this.get('reshare')]\n\t\t\t\t\t}\n\t\t\t\t}])\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Group reshares into a single super share element.\n\t\t * Does this by finding the most precise share and\n\t\t * combines the permissions to be the most permissive.\n\t\t *\n\t\t * @param {Array} reshares\n\t\t * @returns {Object} reshare\n\t\t */\n\t\t_groupReshares: function(reshares) {\n\t\t\tif (!reshares || !reshares.length) {\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tvar superShare = reshares.shift()\n\t\t\tvar combinedPermissions = superShare.permissions\n\t\t\t_.each(reshares, function(reshare) {\n\t\t\t\t// use share have higher priority than group share\n\t\t\t\tif (reshare.share_type === OC.Share.SHARE_TYPE_USER && superShare.share_type === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\t\tsuperShare = reshare\n\t\t\t\t}\n\t\t\t\tcombinedPermissions |= reshare.permissions\n\t\t\t})\n\n\t\t\tsuperShare.permissions = combinedPermissions\n\t\t\treturn superShare\n\t\t},\n\n\t\tfetch: function(options) {\n\t\t\tvar model = this\n\t\t\tthis.trigger('request', this)\n\n\t\t\tvar deferred = $.when(\n\t\t\t\tthis._fetchShares(),\n\t\t\t\tthis._fetchReshare()\n\t\t\t)\n\t\t\tdeferred.done(function(data1, data2) {\n\t\t\t\tmodel.trigger('sync', 'GET', this)\n\t\t\t\tvar sharesMap = {}\n\t\t\t\t_.each(data1[0].ocs.data, function(shareItem) {\n\t\t\t\t\tsharesMap[shareItem.id] = shareItem\n\t\t\t\t})\n\n\t\t\t\tvar reshare = false\n\t\t\t\tif (data2[0].ocs.data.length) {\n\t\t\t\t\treshare = model._groupReshares(data2[0].ocs.data)\n\t\t\t\t}\n\n\t\t\t\tmodel.set(model.parse({\n\t\t\t\t\tshares: sharesMap,\n\t\t\t\t\treshare: reshare\n\t\t\t\t}))\n\n\t\t\t\tif (!_.isUndefined(options) && _.isFunction(options.success)) {\n\t\t\t\t\toptions.success()\n\t\t\t\t}\n\t\t\t})\n\n\t\t\treturn deferred\n\t\t},\n\n\t\t/**\n\t\t * Updates OC.Share.itemShares and OC.Share.statuses.\n\t\t *\n\t\t * This is required in case the user navigates away and comes back,\n\t\t * the share statuses from the old arrays are still used to fill in the icons\n\t\t * in the file list.\n\t\t */\n\t\t_legacyFillCurrentShares: function(shares) {\n\t\t\tvar fileId = this.fileInfoModel.get('id')\n\t\t\tif (!shares || !shares.length) {\n\t\t\t\tdelete OC.Share.statuses[fileId]\n\t\t\t\tOC.Share.currentShares = {}\n\t\t\t\tOC.Share.itemShares = []\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tvar currentShareStatus = OC.Share.statuses[fileId]\n\t\t\tif (!currentShareStatus) {\n\t\t\t\tcurrentShareStatus = { link: false }\n\t\t\t\tOC.Share.statuses[fileId] = currentShareStatus\n\t\t\t}\n\t\t\tcurrentShareStatus.link = false\n\n\t\t\tOC.Share.currentShares = {}\n\t\t\tOC.Share.itemShares = []\n\t\t\t_.each(shares,\n\t\t\t\t/**\n\t\t\t\t * @param {OC.Share.Types.ShareInfo} share\n\t\t\t\t */\n\t\t\t\tfunction(share) {\n\t\t\t\t\tif (share.share_type === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\tOC.Share.itemShares[share.share_type] = true\n\t\t\t\t\t\tcurrentShareStatus.link = true\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!OC.Share.itemShares[share.share_type]) {\n\t\t\t\t\t\t\tOC.Share.itemShares[share.share_type] = []\n\t\t\t\t\t\t}\n\t\t\t\t\t\tOC.Share.itemShares[share.share_type].push(share.share_with)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t)\n\t\t},\n\n\t\tparse: function(data) {\n\t\t\tif (data === false) {\n\t\t\t\tconsole.warn('no data was returned')\n\t\t\t\tthis.trigger('fetchError')\n\t\t\t\treturn {}\n\t\t\t}\n\n\t\t\tvar permissions = this.fileInfoModel.get('permissions')\n\t\t\tif (!_.isUndefined(data.reshare) && !_.isUndefined(data.reshare.permissions) && data.reshare.uid_owner !== OC.currentUser) {\n\t\t\t\tpermissions = permissions & data.reshare.permissions\n\t\t\t}\n\n\t\t\tvar allowPublicUploadStatus = false\n\t\t\tif (!_.isUndefined(data.shares)) {\n\t\t\t\t$.each(data.shares, function(key, value) {\n\t\t\t\t\tif (value.share_type === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\tallowPublicUploadStatus = !!((value.permissions & OC.PERMISSION_CREATE))\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tvar allowPublicEditingStatus = true\n\t\t\tif (!_.isUndefined(data.shares)) {\n\t\t\t\t$.each(data.shares, function(key, value) {\n\t\t\t\t\tif (value.share_type === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\tallowPublicEditingStatus = !!((value.permissions & OC.PERMISSION_UPDATE))\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tvar hideFileListStatus = false\n\t\t\tif (!_.isUndefined(data.shares)) {\n\t\t\t\t$.each(data.shares, function(key, value) {\n\t\t\t\t\tif (value.share_type === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\thideFileListStatus = !((value.permissions & OC.PERMISSION_READ))\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t/** @type {OC.Share.Types.ShareInfo[]} **/\n\t\t\tvar shares = _.map(data.shares, function(share) {\n\t\t\t\t// properly parse some values because sometimes the server\n\t\t\t\t// returns integers as string...\n\t\t\t\tvar i\n\t\t\t\tfor (i = 0; i < SHARE_RESPONSE_INT_PROPS.length; i++) {\n\t\t\t\t\tvar prop = SHARE_RESPONSE_INT_PROPS[i]\n\t\t\t\t\tif (!_.isUndefined(share[prop])) {\n\t\t\t\t\t\tshare[prop] = parseInt(share[prop], 10)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn share\n\t\t\t})\n\n\t\t\tthis._legacyFillCurrentShares(shares)\n\n\t\t\tvar linkShares = []\n\t\t\t// filter out the share by link\n\t\t\tshares = _.reject(shares,\n\t\t\t\t/**\n\t\t\t\t * @param {OC.Share.Types.ShareInfo} share\n\t\t\t\t */\n\t\t\t\tfunction(share) {\n\t\t\t\t\tvar isShareLink\n\t\t\t\t\t\t= share.share_type === OC.Share.SHARE_TYPE_LINK\n\t\t\t\t\t\t&& (share.file_source === this.get('itemSource')\n\t\t\t\t\t\t|| share.item_source === this.get('itemSource'))\n\n\t\t\t\t\tif (isShareLink) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Ignore reshared link shares for now\n\t\t\t\t\t\t * FIXME: Find a way to display properly\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (share.uid_owner !== OC.currentUser) {\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar link = window.location.protocol + '//' + window.location.host\n\t\t\t\t\t\tif (!share.token) {\n\t\t\t\t\t\t\t// pre-token link\n\t\t\t\t\t\t\tvar fullPath = this.fileInfoModel.get('path') + '/'\n\t\t\t\t\t\t\t\t+ this.fileInfoModel.get('name')\n\t\t\t\t\t\t\tvar location = '/' + OC.currentUser + '/files' + fullPath\n\t\t\t\t\t\t\tvar type = this.fileInfoModel.isDirectory() ? 'folder' : 'file'\n\t\t\t\t\t\t\tlink += OC.linkTo('', 'public.php') + '?service=files&'\n\t\t\t\t\t\t\t\t+ type + '=' + encodeURIComponent(location)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tlink += OC.generateUrl('/s/') + share.token\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlinkShares.push(_.extend({}, share, {\n\t\t\t\t\t\t\t// hide_download is returned as an int, so force it\n\t\t\t\t\t\t\t// to a boolean\n\t\t\t\t\t\t\thideDownload: !!share.hide_download,\n\t\t\t\t\t\t\tpassword: share.share_with,\n\t\t\t\t\t\t\tsendPasswordByTalk: share.send_password_by_talk\n\t\t\t\t\t\t}))\n\n\t\t\t\t\t\treturn share\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tthis\n\t\t\t)\n\n\t\t\treturn {\n\t\t\t\treshare: data.reshare,\n\t\t\t\tshares: shares,\n\t\t\t\tlinkShares: linkShares,\n\t\t\t\tpermissions: permissions,\n\t\t\t\tallowPublicUploadStatus: allowPublicUploadStatus,\n\t\t\t\tallowPublicEditingStatus: allowPublicEditingStatus,\n\t\t\t\thideFileListStatus: hideFileListStatus\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Parses a string to an valid integer (unix timestamp)\n\t\t * @param time\n\t\t * @returns {*}\n\t\t * @internal Only used to work around a bug in the backend\n\t\t */\n\t\t_parseTime: function(time) {\n\t\t\tif (_.isString(time)) {\n\t\t\t\t// skip empty strings and hex values\n\t\t\t\tif (time === '' || (time.length > 1 && time[0] === '0' && time[1] === 'x')) {\n\t\t\t\t\treturn null\n\t\t\t\t}\n\t\t\t\ttime = parseInt(time, 10)\n\t\t\t\tif (isNaN(time)) {\n\t\t\t\t\ttime = null\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn time\n\t\t},\n\n\t\t/**\n\t\t * Returns a list of share types from the existing shares.\n\t\t *\n\t\t * @returns {Array.<int>} array of share types\n\t\t */\n\t\tgetShareTypes: function() {\n\t\t\tvar result\n\t\t\tresult = _.pluck(this.getSharesWithCurrentItem(), 'share_type')\n\t\t\tif (this.hasLinkShares()) {\n\t\t\t\tresult.push(OC.Share.SHARE_TYPE_LINK)\n\t\t\t}\n\t\t\treturn _.uniq(result)\n\t\t}\n\t})\n\n\tOC.Share.ShareItemModel = ShareItemModel\n})()\n","/**\n * @copyright 2017, Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license GNU AGPL version 3 or any later version\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n(function() {\n\tif (!OC.Share) {\n\t\tOC.Share = {}\n\t}\n\n\tOC.Share.Social = {}\n\n\tvar SocialModel = OC.Backbone.Model.extend({\n\t\tdefaults: {\n\t\t\t/** used for sorting social buttons */\n\t\t\tkey: null,\n\t\t\t/** url to open, {{reference}} will be replaced with the link */\n\t\t\turl: null,\n\t\t\t/** Name to show in the tooltip */\n\t\t\tname: null,\n\t\t\t/** Icon class to display */\n\t\t\ticonClass: null,\n\t\t\t/** Open in new windows */\n\t\t\tnewWindow: true\n\t\t}\n\t})\n\n\tOC.Share.Social.Model = SocialModel\n\n\tvar SocialCollection = OC.Backbone.Collection.extend({\n\t\tmodel: OC.Share.Social.Model,\n\n\t\tcomparator: 'key'\n\t})\n\n\tOC.Share.Social.Collection = new SocialCollection()\n})()\n","/* eslint-disable */\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* globals Handlebars */\n\n(function() {\n\tif (!OC.Share) {\n\t\tOC.Share = {}\n\t}\n\n\t/**\n\t * @class OCA.Share.ShareDialogView\n\t * @member {OC.Share.ShareItemModel} model\n\t * @member {jQuery} $el\n\t * @memberof OCA.Sharing\n\t * @classdesc\n\t *\n\t * Represents the GUI of the share dialogue\n\t *\n\t */\n\tvar ShareDialogResharerInfoView = OC.Backbone.View.extend({\n\t\t/** @type {string} **/\n\t\tid: 'shareDialogResharerInfo',\n\n\t\t/** @type {string} **/\n\t\ttagName: 'div',\n\n\t\t/** @type {string} **/\n\t\tclassName: 'reshare',\n\n\t\t/** @type {OC.Share.ShareConfigModel} **/\n\t\tconfigModel: undefined,\n\n\t\t/** @type {Function} **/\n\t\t_template: undefined,\n\n\t\tinitialize: function(options) {\n\t\t\tvar view = this\n\n\t\t\tthis.model.on('change:reshare', function() {\n\t\t\t\tview.render()\n\t\t\t})\n\n\t\t\tif (!_.isUndefined(options.configModel)) {\n\t\t\t\tthis.configModel = options.configModel\n\t\t\t} else {\n\t\t\t\tthrow 'missing OC.Share.ShareConfigModel'\n\t\t\t}\n\t\t},\n\n\t\trender: function() {\n\t\t\tif (!this.model.hasReshare()\n\t\t\t\t|| this.model.getReshareOwner() === OC.currentUser) {\n\t\t\t\tthis.$el.empty()\n\t\t\t\treturn this\n\t\t\t}\n\n\t\t\tvar reshareTemplate = this.template()\n\t\t\tvar ownerDisplayName = this.model.getReshareOwnerDisplayname()\n\t\t\tvar shareNote = this.model.getReshareNote()\n\n\t\t\tvar sharedByText = ''\n\n\t\t\tif (this.model.getReshareType() === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\tsharedByText = t(\n\t\t\t\t\t'core',\n\t\t\t\t\t'Shared with you and the group {group} by {owner}',\n\t\t\t\t\t{\n\t\t\t\t\t\tgroup: this.model.getReshareWithDisplayName(),\n\t\t\t\t\t\towner: ownerDisplayName\n\t\t\t\t\t},\n\t\t\t\t\tundefined,\n\t\t\t\t\t{ escape: false }\n\t\t\t\t)\n\t\t\t} else if (this.model.getReshareType() === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\tsharedByText = t(\n\t\t\t\t\t'core',\n\t\t\t\t\t'Shared with you and {circle} by {owner}',\n\t\t\t\t\t{\n\t\t\t\t\t\tcircle: this.model.getReshareWithDisplayName(),\n\t\t\t\t\t\towner: ownerDisplayName\n\t\t\t\t\t},\n\t\t\t\t\tundefined,\n\t\t\t\t\t{ escape: false }\n\t\t\t\t)\n\t\t\t} else if (this.model.getReshareType() === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\tif (this.model.get('reshare').share_with_displayname) {\n\t\t\t\t\tsharedByText = t(\n\t\t\t\t\t\t'core',\n\t\t\t\t\t\t'Shared with you and the conversation {conversation} by {owner}',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tconversation: this.model.getReshareWithDisplayName(),\n\t\t\t\t\t\t\towner: ownerDisplayName\n\t\t\t\t\t\t},\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t{ escape: false }\n\t\t\t\t\t)\n\t\t\t\t} else {\n\t\t\t\t\tsharedByText = t(\n\t\t\t\t\t\t'core',\n\t\t\t\t\t\t'Shared with you in a conversation by {owner}',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\towner: ownerDisplayName\n\t\t\t\t\t\t},\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\t{ escape: false }\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsharedByText = t(\n\t\t\t\t\t'core',\n\t\t\t\t\t'Shared with you by {owner}',\n\t\t\t\t\t{ owner: ownerDisplayName },\n\t\t\t\t\tundefined,\n\t\t\t\t\t{ escape: false }\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tthis.$el.html(reshareTemplate({\n\t\t\t\treshareOwner: this.model.getReshareOwner(),\n\t\t\t\tsharedByText: sharedByText,\n\t\t\t\tshareNote: shareNote,\n\t\t\t\thasShareNote: shareNote !== ''\n\t\t\t}))\n\n\t\t\tthis.$el.find('.avatar').each(function() {\n\t\t\t\tvar $this = $(this)\n\t\t\t\t$this.avatar($this.data('username'), 32)\n\t\t\t})\n\n\t\t\tthis.$el.find('.reshare').contactsMenu(\n\t\t\t\tthis.model.getReshareOwner(),\n\t\t\t\tOC.Share.SHARE_TYPE_USER,\n\t\t\t\tthis.$el)\n\n\t\t\treturn this\n\t\t},\n\n\t\t/**\n\t\t * @returns {Function} from Handlebars\n\t\t * @private\n\t\t */\n\t\ttemplate: function() {\n\t\t\treturn OC.Share.Templates['sharedialogresharerinfoview']\n\t\t}\n\n\t})\n\n\tOC.Share.ShareDialogResharerInfoView = ShareDialogResharerInfoView\n\n})()\n","/* eslint-disable */\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* globals Clipboard, Handlebars */\n\n(function() {\n\tif (!OC.Share) {\n\t\tOC.Share = {}\n\t}\n\n\tvar PASSWORD_PLACEHOLDER = '**********'\n\tvar PASSWORD_PLACEHOLDER_MESSAGE = t('core', 'Choose a password for the public link')\n\tvar PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL = t('core', 'Choose a password for the public link or press the \"Enter\" key')\n\n\t/**\n\t * @class OCA.Share.ShareDialogLinkShareView\n\t * @member {OC.Share.ShareItemModel} model\n\t * @member {jQuery} $el\n\t * @memberof OCA.Sharing\n\t * @classdesc\n\t *\n\t * Represents the GUI of the share dialogue\n\t *\n\t */\n\tvar ShareDialogLinkShareView = OC.Backbone.View.extend({\n\t\t/** @type {string} **/\n\t\tid: 'shareDialogLinkShare',\n\n\t\t/** @type {OC.Share.ShareConfigModel} **/\n\t\tconfigModel: undefined,\n\n\t\t/** @type {boolean} **/\n\t\tshowLink: true,\n\n\t\t/** @type {boolean} **/\n\t\tshowPending: false,\n\n\t\t/** @type {string} **/\n\t\tpassword: '',\n\n\t\t/** @type {string} **/\n\t\tnewShareId: 'new-share',\n\n\t\tevents: {\n\t\t\t// open menu\n\t\t\t'click .share-menu .icon-more': 'onToggleMenu',\n\t\t\t// hide download\n\t\t\t'change .hideDownloadCheckbox': 'onHideDownloadChange',\n\t\t\t// password\n\t\t\t'click input.share-pass-submit': 'onPasswordEntered',\n\t\t\t'keyup input.linkPassText': 'onPasswordKeyUp', // check for the enter key\n\t\t\t'change .showPasswordCheckbox': 'onShowPasswordClick',\n\t\t\t'change .passwordByTalkCheckbox': 'onPasswordByTalkChange',\n\t\t\t'change .publicEditingCheckbox': 'onAllowPublicEditingChange',\n\t\t\t// copy link url\n\t\t\t'click .linkText': 'onLinkTextClick',\n\t\t\t// social\n\t\t\t'click .pop-up': 'onPopUpClick',\n\t\t\t// permission change\n\t\t\t'change .publicUploadRadio': 'onPublicUploadChange',\n\t\t\t// expire date\n\t\t\t'click .expireDate': 'onExpireDateChange',\n\t\t\t'change .datepicker': 'onChangeExpirationDate',\n\t\t\t'click .datepicker': 'showDatePicker',\n\t\t\t// note\n\t\t\t'click .share-add': 'showNoteForm',\n\t\t\t'click .share-note-delete': 'deleteNote',\n\t\t\t'click .share-note-submit': 'updateNote',\n\t\t\t// remove\n\t\t\t'click .unshare': 'onUnshare',\n\t\t\t// new share\n\t\t\t'click .new-share': 'newShare',\n\t\t\t// enforced pass set\n\t\t\t'submit .enforcedPassForm': 'enforcedPasswordSet'\n\t\t},\n\n\t\tinitialize: function(options) {\n\t\t\tvar view = this\n\n\t\t\tthis.model.on('change:permissions', function() {\n\t\t\t\tview.render()\n\t\t\t})\n\n\t\t\tthis.model.on('change:itemType', function() {\n\t\t\t\tview.render()\n\t\t\t})\n\n\t\t\tthis.model.on('change:allowPublicUploadStatus', function() {\n\t\t\t\tview.render()\n\t\t\t})\n\n\t\t\tthis.model.on('change:hideFileListStatus', function() {\n\t\t\t\tview.render()\n\t\t\t})\n\n\t\t\tthis.model.on('change:linkShares', function(model, linkShares) {\n\t\t\t\t// The \"Password protect by Talk\" item is shown only when there\n\t\t\t\t// is a password. Unfortunately there is no fine grained\n\t\t\t\t// rendering of items in the link shares, so the whole view\n\t\t\t\t// needs to be rendered again when the password of a share\n\t\t\t\t// changes.\n\t\t\t\t// Note that this event handler is concerned only about password\n\t\t\t\t// changes; other changes in the link shares does not trigger\n\t\t\t\t// a rendering, so the view must be rendered again as needed in\n\t\t\t\t// those cases (for example, when a link share is removed).\n\n\t\t\t\tvar previousLinkShares = model.previous('linkShares')\n\t\t\t\tif (previousLinkShares.length !== linkShares.length) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tvar i\n\t\t\t\tfor (i = 0; i < linkShares.length; i++) {\n\t\t\t\t\tif (linkShares[i].id !== previousLinkShares[i].id) {\n\t\t\t\t\t\t// A resorting should never happen, but just in case.\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\n\t\t\t\t\tif (linkShares[i].password !== previousLinkShares[i].password) {\n\t\t\t\t\t\tview.render()\n\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\n\t\t\tif (!_.isUndefined(options.configModel)) {\n\t\t\t\tthis.configModel = options.configModel\n\t\t\t} else {\n\t\t\t\tthrow 'missing OC.Share.ShareConfigModel'\n\t\t\t}\n\n\t\t\tvar clipboard = new Clipboard('.clipboard-button')\n\t\t\tclipboard.on('success', function(e) {\n\t\t\t\tvar $trigger = $(e.trigger)\n\n\t\t\t\t$trigger.tooltip('hide')\n\t\t\t\t\t.attr('data-original-title', t('core', 'Copied!'))\n\t\t\t\t\t.tooltip('fixTitle')\n\t\t\t\t\t.tooltip({ placement: 'bottom', trigger: 'manual' })\n\t\t\t\t\t.tooltip('show')\n\t\t\t\t_.delay(function() {\n\t\t\t\t\t$trigger.tooltip('hide')\n\t\t\t\t\t\t.attr('data-original-title', t('core', 'Copy link'))\n\t\t\t\t\t\t.tooltip('fixTitle')\n\t\t\t\t}, 3000)\n\t\t\t})\n\t\t\tclipboard.on('error', function(e) {\n\t\t\t\tvar $trigger = $(e.trigger)\n\t\t\t\tvar $menu = $trigger.next('.share-menu').find('.popovermenu')\n\t\t\t\tvar $linkTextMenu = $menu.find('li.linkTextMenu')\n\t\t\t\tvar $input = $linkTextMenu.find('.linkText')\n\n\t\t\t\tvar $li = $trigger.closest('li[data-share-id]')\n\t\t\t\tvar shareId = $li.data('share-id')\n\n\t\t\t\t// show menu\n\t\t\t\tOC.showMenu(null, $menu)\n\n\t\t\t\tvar actionMsg = ''\n\t\t\t\tif (/iPhone|iPad/i.test(navigator.userAgent)) {\n\t\t\t\t\tactionMsg = t('core', 'Not supported!')\n\t\t\t\t} else if (/Mac/i.test(navigator.userAgent)) {\n\t\t\t\t\tactionMsg = t('core', 'Press ⌘-C to copy.')\n\t\t\t\t} else {\n\t\t\t\t\tactionMsg = t('core', 'Press Ctrl-C to copy.')\n\t\t\t\t}\n\n\t\t\t\t$linkTextMenu.removeClass('hidden')\n\t\t\t\t$input.select()\n\t\t\t\t$input.tooltip('hide')\n\t\t\t\t\t.attr('data-original-title', actionMsg)\n\t\t\t\t\t.tooltip('fixTitle')\n\t\t\t\t\t.tooltip({ placement: 'bottom', trigger: 'manual' })\n\t\t\t\t\t.tooltip('show')\n\t\t\t\t_.delay(function() {\n\t\t\t\t\t$input.tooltip('hide')\n\t\t\t\t\t$input.attr('data-original-title', t('core', 'Copy'))\n\t\t\t\t\t\t .tooltip('fixTitle')\n\t\t\t\t}, 3000)\n\t\t\t})\n\t\t},\n\n\t\tnewShare: function(event) {\n\t\t\tvar self = this\n\t\t\tvar $target = $(event.target)\n\t\t\tvar $li = $target.closest('li[data-share-id]')\n\t\t\tvar shareId = $li.data('share-id')\n\t\t\tvar $loading = $li.find('.share-menu > .icon-loading-small')\n\n\t\t\tif (!$loading.hasClass('hidden') && this.password === '') {\n\t\t\t\t// in process\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\t// hide all icons and show loading\n\t\t\t$li.find('.icon').addClass('hidden')\n\t\t\t$loading.removeClass('hidden')\n\n\t\t\t// hide menu\n\t\t\tOC.hideMenus()\n\n\t\t\tvar shareData = {}\n\n\t\t\tvar isPasswordEnforced = this.configModel.get('enforcePasswordForPublicLink')\n\t\t\tvar isExpirationEnforced = this.configModel.get('isDefaultExpireDateEnforced')\n\n\t\t\t// set default expire date\n\t\t\tif (isExpirationEnforced) {\n\t\t\t\tvar defaultExpireDays = this.configModel.get('defaultExpireDate')\n\t\t\t\tvar expireDate = moment().add(defaultExpireDays, 'day').format('DD-MM-YYYY')\n\t\t\t\tshareData.expireDate = expireDate\n\t\t\t}\n\n\t\t\t// if password is set, add to data\n\t\t\tif (isPasswordEnforced && this.password !== '') {\n\t\t\t\tshareData.password = this.password\n\t\t\t}\n\n\t\t\tvar newShareId = false\n\n\t\t\t// We need a password before the share creation\n\t\t\tif (isPasswordEnforced && !this.showPending && this.password === '') {\n\t\t\t\tthis.showPending = shareId\n\t\t\t\tvar self = this.render()\n\t\t\t\tself.$el.find('.pending #enforcedPassText').focus()\n\t\t\t} else {\n\t\t\t\t// else, we have a password or it is not enforced\n\t\t\t\t$.when(this.model.saveLinkShare(shareData, {\n\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\t$loading.addClass('hidden')\n\t\t\t\t\t\t$li.find('.icon').removeClass('hidden')\n\t\t\t\t\t\tself.render()\n\t\t\t\t\t\t// open the menu by default\n\t\t\t\t\t\t// we can only do that after the render\n\t\t\t\t\t\tif (newShareId) {\n\t\t\t\t\t\t\tvar shares = self.$el.find('li[data-share-id]')\n\t\t\t\t\t\t\tvar $newShare = self.$el.find('li[data-share-id=\"' + newShareId + '\"]')\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\terror: function() {\n\t\t\t\t\t\t// empty function to override the default Dialog warning\n\t\t\t\t\t}\n\t\t\t\t})).fail(function(response) {\n\t\t\t\t\t// password failure? Show error\n\t\t\t\t\tself.password = ''\n\t\t\t\t\tif (isPasswordEnforced && response && response.responseJSON && response.responseJSON.ocs.meta && response.responseJSON.ocs.meta.message) {\n\t\t\t\t\t\tvar $input = self.$el.find('.pending #enforcedPassText')\n\t\t\t\t\t\t$input.tooltip('destroy')\n\t\t\t\t\t\t$input.attr('title', response.responseJSON.ocs.meta.message)\n\t\t\t\t\t\t$input.tooltip({ placement: 'bottom', trigger: 'manual' })\n\t\t\t\t\t\t$input.tooltip('show')\n\t\t\t\t\t} else {\n\t\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Unable to create a link share'))\n\t\t\t\t\t\t$loading.addClass('hidden')\n\t\t\t\t\t\t$li.find('.icon').removeClass('hidden')\n\t\t\t\t\t}\n\t\t\t\t}).then(function(response) {\n\t\t\t\t\t// resolve before success\n\t\t\t\t\tnewShareId = response.ocs.data.id\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\n\t\tenforcedPasswordSet: function(event) {\n\t\t\tevent.preventDefault()\n\t\t\tvar $form = $(event.target)\n\t\t\tvar $input = $form.find('input.enforcedPassText')\n\t\t\tthis.password = $input.val()\n\t\t\tthis.showPending = false\n\t\t\tthis.newShare(event)\n\t\t},\n\n\t\tonLinkTextClick: function(event) {\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar $el = $li.find('.linkText')\n\t\t\t$el.focus()\n\t\t\t$el.select()\n\t\t},\n\n\t\tonHideDownloadChange: function(event) {\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = $li.data('share-id')\n\t\t\tvar $checkbox = $li.find('.hideDownloadCheckbox')\n\t\t\t$checkbox.siblings('.icon-loading-small').removeClass('hidden').addClass('inlineblock')\n\n\t\t\tvar hideDownload = false\n\t\t\tif ($checkbox.is(':checked')) {\n\t\t\t\thideDownload = true\n\t\t\t}\n\n\t\t\tthis.model.saveLinkShare({\n\t\t\t\thideDownload: hideDownload,\n\t\t\t\tcid: shareId\n\t\t\t}, {\n\t\t\t\tsuccess: function() {\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock')\n\t\t\t\t},\n\t\t\t\terror: function(obj, msg) {\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Unable to toggle this option'))\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock')\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\tonShowPasswordClick: function(event) {\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = $li.data('share-id')\n\t\t\t$li.find('.linkPass').slideToggle(OC.menuSpeed)\n\t\t\t$li.find('.linkPassMenu').toggleClass('hidden')\n\t\t\tif (!$li.find('.showPasswordCheckbox').is(':checked')) {\n\t\t\t\tthis.model.saveLinkShare({\n\t\t\t\t\tpassword: '',\n\t\t\t\t\tcid: shareId\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tif (!OC.Util.isIE()) {\n\t\t\t\t\t$li.find('.linkPassText').focus()\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tonPasswordKeyUp: function(event) {\n\t\t\tif (event.keyCode === 13) {\n\t\t\t\tthis.onPasswordEntered(event)\n\t\t\t}\n\t\t},\n\n\t\tonPasswordEntered: function(event) {\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = $li.data('share-id')\n\t\t\tvar $loading = $li.find('.linkPassMenu .icon-loading-small')\n\t\t\tif (!$loading.hasClass('hidden')) {\n\t\t\t\t// still in process\n\t\t\t\treturn\n\t\t\t}\n\t\t\tvar $input = $li.find('.linkPassText')\n\t\t\t$input.removeClass('error')\n\t\t\t$input.parent().find('input').removeClass('error')\n\t\t\tvar password = $input.val()\n\n\t\t\tif ($li.find('.linkPassText').attr('placeholder') === PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL) {\n\n\t\t\t\t// in IE9 the password might be the placeholder due to bugs in the placeholders polyfill\n\t\t\t\tif (password === PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL) {\n\t\t\t\t\tpassword = ''\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// in IE9 the password might be the placeholder due to bugs in the placeholders polyfill\n\t\t\t\tif (password === '' || password === PASSWORD_PLACEHOLDER || password === PASSWORD_PLACEHOLDER_MESSAGE) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$loading\n\t\t\t\t.removeClass('hidden')\n\t\t\t\t.addClass('inlineblock')\n\n\t\t\tthis.model.saveLinkShare({\n\t\t\t\tpassword: password,\n\t\t\t\tcid: shareId\n\t\t\t}, {\n\t\t\t\tcomplete: function(model) {\n\t\t\t\t\t$loading.removeClass('inlineblock').addClass('hidden')\n\t\t\t\t},\n\t\t\t\terror: function(model, msg) {\n\t\t\t\t\t// Add visual feedback to both the input and the submit button\n\t\t\t\t\t$input.parent().find('input').addClass('error')\n\n\t\t\t\t\t// destroy old tooltips\n\t\t\t\t\tvar $container = $input.parent()\n\t\t\t\t\t$container.tooltip('destroy')\n\t\t\t\t\t$input.addClass('error')\n\t\t\t\t\t$container.attr('title', msg)\n\t\t\t\t\t$container.tooltip({ placement: 'bottom', trigger: 'manual' })\n\t\t\t\t\t$container.tooltip('show')\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\tonPasswordByTalkChange: function(event) {\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = $li.data('share-id')\n\t\t\tvar $checkbox = $li.find('.passwordByTalkCheckbox')\n\t\t\t$checkbox.siblings('.icon-loading-small').removeClass('hidden').addClass('inlineblock')\n\n\t\t\tvar sendPasswordByTalk = false\n\t\t\tif ($checkbox.is(':checked')) {\n\t\t\t\tsendPasswordByTalk = true\n\t\t\t}\n\n\t\t\tthis.model.saveLinkShare({\n\t\t\t\tsendPasswordByTalk: sendPasswordByTalk,\n\t\t\t\tcid: shareId\n\t\t\t}, {\n\t\t\t\tsuccess: function() {\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock')\n\t\t\t\t},\n\t\t\t\terror: function(obj, msg) {\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Unable to toggle this option'))\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock')\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\tonAllowPublicEditingChange: function(event) {\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = $li.data('share-id')\n\t\t\tvar $checkbox = $li.find('.publicEditingCheckbox')\n\t\t\t$checkbox.siblings('.icon-loading-small').removeClass('hidden').addClass('inlineblock')\n\n\t\t\tvar permissions = OC.PERMISSION_READ\n\t\t\tif ($checkbox.is(':checked')) {\n\t\t\t\tpermissions = OC.PERMISSION_UPDATE | OC.PERMISSION_READ\n\t\t\t}\n\n\t\t\tthis.model.saveLinkShare({\n\t\t\t\tpermissions: permissions,\n\t\t\t\tcid: shareId\n\t\t\t}, {\n\t\t\t\tsuccess: function() {\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock')\n\t\t\t\t},\n\t\t\t\terror: function(obj, msg) {\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Unable to toggle this option'))\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock')\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\tonPublicUploadChange: function(event) {\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = $li.data('share-id')\n\t\t\tvar permissions = event.currentTarget.value\n\t\t\tthis.model.saveLinkShare({\n\t\t\t\tpermissions: permissions,\n\t\t\t\tcid: shareId\n\t\t\t})\n\t\t},\n\n\t\tshowNoteForm: function(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tvar self = this\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar $menu = $element.closest('li')\n\t\t\tvar $form = $menu.next('li.share-note-form')\n\n\t\t\t// show elements\n\t\t\t$menu.find('.share-note-delete').toggleClass('hidden')\n\t\t\t$form.toggleClass('hidden')\n\t\t\t$form.find('textarea').focus()\n\t\t},\n\n\t\tdeleteNote: function(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tvar self = this\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = $li.data('share-id')\n\t\t\tvar $menu = $element.closest('li')\n\t\t\tvar $form = $menu.next('li.share-note-form')\n\n\t\t\t$form.find('.share-note').val('')\n\n\t\t\t$form.addClass('hidden')\n\t\t\t$menu.find('.share-note-delete').addClass('hidden')\n\n\t\t\tself.sendNote('', shareId, $menu)\n\t\t},\n\n\t\tupdateNote: function(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tvar self = this\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = $li.data('share-id')\n\t\t\tvar $form = $element.closest('li.share-note-form')\n\t\t\tvar $menu = $form.prev('li')\n\t\t\tvar message = $form.find('.share-note').val().trim()\n\n\t\t\tif (message.length < 1) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tself.sendNote(message, shareId, $menu)\n\t\t},\n\n\t\tsendNote: function(note, shareId, $menu) {\n\t\t\tvar $form = $menu.next('li.share-note-form')\n\t\t\tvar $submit = $form.find('input.share-note-submit')\n\t\t\tvar $error = $form.find('input.share-note-error')\n\n\t\t\t$submit.prop('disabled', true)\n\t\t\t$menu.find('.icon-loading-small').removeClass('hidden')\n\t\t\t$menu.find('.icon-edit').hide()\n\n\t\t\tvar complete = function() {\n\t\t\t\t$submit.prop('disabled', false)\n\t\t\t\t$menu.find('.icon-loading-small').addClass('hidden')\n\t\t\t\t$menu.find('.icon-edit').show()\n\t\t\t}\n\t\t\tvar error = function() {\n\t\t\t\t$error.show()\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t$error.hide()\n\t\t\t\t}, 3000)\n\t\t\t}\n\n\t\t\t// send data\n\t\t\t$.ajax({\n\t\t\t\tmethod: 'PUT',\n\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1/shares', 2) + shareId + '?' + OC.buildQueryString({ format: 'json' }),\n\t\t\t\tdata: { note: note },\n\t\t\t\tcomplete: complete,\n\t\t\t\terror: error\n\t\t\t})\n\t\t},\n\n\t\trender: function() {\n\t\t\tthis.$el.find('.has-tooltip').tooltip()\n\n\t\t\t// reset previously set passwords\n\t\t\tthis.password = ''\n\n\t\t\tvar linkShareTemplate = this.template()\n\t\t\tvar resharingAllowed = this.model.sharePermissionPossible()\n\n\t\t\tif (!resharingAllowed\n\t\t\t\t|| !this.showLink\n\t\t\t\t|| !this.configModel.isShareWithLinkAllowed()) {\n\t\t\t\tvar templateData = { shareAllowed: false }\n\t\t\t\tif (!resharingAllowed) {\n\t\t\t\t\t// add message\n\t\t\t\t\ttemplateData.noSharingPlaceholder = t('core', 'Resharing is not allowed')\n\t\t\t\t}\n\t\t\t\tthis.$el.html(linkShareTemplate(templateData))\n\t\t\t\treturn this\n\t\t\t}\n\n\t\t\tvar publicUpload\n\t\t\t\t= this.model.isFolder()\n\t\t\t\t&& this.model.createPermissionPossible()\n\t\t\t\t&& this.configModel.isPublicUploadEnabled()\n\n\t\t\tvar publicEditingChecked = ''\n\t\t\tif (this.model.isPublicEditingAllowed()) {\n\t\t\t\tpublicEditingChecked = 'checked=\"checked\"'\n\t\t\t}\n\n\t\t\tvar isPasswordEnforced = this.configModel.get('enforcePasswordForPublicLink')\n\t\t\tvar isPasswordEnabledByDefault = this.configModel.get('enableLinkPasswordByDefault') === true\n\t\t\tvar passwordPlaceholderInitial = this.configModel.get('enforcePasswordForPublicLink')\n\t\t\t\t? PASSWORD_PLACEHOLDER_MESSAGE : PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL\n\n\t\t\tvar publicEditable\n\t\t\t\t= !this.model.isFolder()\n\t\t\t\t&& this.model.updatePermissionPossible()\n\n\t\t\tvar isExpirationEnforced = this.configModel.get('isDefaultExpireDateEnforced')\n\n\t\t\t// what if there is another date picker on that page?\n\t\t\tvar minDate = new Date()\n\t\t\t// min date should always be the next day\n\t\t\tminDate.setDate(minDate.getDate() + 1)\n\n\t\t\t$.datepicker.setDefaults({\n\t\t\t\tminDate: minDate\n\t\t\t})\n\n\t\t\tthis.$el.find('.datepicker').datepicker({ dateFormat: 'dd-mm-yy' })\n\n\t\t\tvar minPasswordLength = 4\n\t\t\t// password policy?\n\t\t\tif (OC.getCapabilities().password_policy && OC.getCapabilities().password_policy.minLength) {\n\t\t\t\tminPasswordLength = OC.getCapabilities().password_policy.minLength\n\t\t\t}\n\n\t\t\tvar popoverBase = {\n\t\t\t\turlLabel: t('core', 'Link'),\n\t\t\t\thideDownloadLabel: t('core', 'Hide download'),\n\t\t\t\tenablePasswordLabel: isPasswordEnforced ? t('core', 'Password protection enforced') : t('core', 'Password protect'),\n\t\t\t\tpasswordLabel: t('core', 'Password'),\n\t\t\t\tpasswordPlaceholderInitial: passwordPlaceholderInitial,\n\t\t\t\tpublicUpload: publicUpload,\n\t\t\t\tpublicEditing: publicEditable,\n\t\t\t\tpublicEditingChecked: publicEditingChecked,\n\t\t\t\tpublicEditingLabel: t('core', 'Allow editing'),\n\t\t\t\tmailPrivatePlaceholder: t('core', 'Email link to person'),\n\t\t\t\tmailButtonText: t('core', 'Send'),\n\t\t\t\tpublicUploadRWLabel: t('core', 'Allow upload and editing'),\n\t\t\t\tpublicUploadRLabel: t('core', 'Read only'),\n\t\t\t\tpublicUploadWLabel: t('core', 'File drop (upload only)'),\n\t\t\t\tpublicUploadRWValue: OC.PERMISSION_UPDATE | OC.PERMISSION_CREATE | OC.PERMISSION_READ | OC.PERMISSION_DELETE,\n\t\t\t\tpublicUploadRValue: OC.PERMISSION_READ,\n\t\t\t\tpublicUploadWValue: OC.PERMISSION_CREATE,\n\t\t\t\texpireDateLabel: isExpirationEnforced ? t('core', 'Expiration date enforced') : t('core', 'Set expiration date'),\n\t\t\t\texpirationLabel: t('core', 'Expiration'),\n\t\t\t\texpirationDatePlaceholder: t('core', 'Expiration date'),\n\t\t\t\tisExpirationEnforced: isExpirationEnforced,\n\t\t\t\tisPasswordEnforced: isPasswordEnforced,\n\t\t\t\tdefaultExpireDate: moment().add(1, 'day').format('DD-MM-YYYY'), // Can't expire today\n\t\t\t\taddNoteLabel: t('core', 'Note to recipient'),\n\t\t\t\tunshareLabel: t('core', 'Unshare'),\n\t\t\t\tunshareLinkLabel: t('core', 'Delete share link'),\n\t\t\t\tnewShareLabel: t('core', 'Add another link')\n\t\t\t}\n\n\t\t\tvar pendingPopover = {\n\t\t\t\tisPasswordEnforced: isPasswordEnforced,\n\t\t\t\tenforcedPasswordLabel: t('core', 'Password protection for links is mandatory'),\n\t\t\t\tpasswordPlaceholder: passwordPlaceholderInitial,\n\t\t\t\tminPasswordLength: minPasswordLength\n\t\t\t}\n\t\t\tvar pendingPopoverMenu = this.pendingPopoverMenuTemplate(_.extend({}, pendingPopover))\n\n\t\t\tvar linkShares = this.getShareeList()\n\t\t\tif (_.isArray(linkShares)) {\n\t\t\t\tfor (var i = 0; i < linkShares.length; i++) {\n\t\t\t\t\tvar social = []\n\t\t\t\t\tOC.Share.Social.Collection.each(function(model) {\n\t\t\t\t\t\tvar url = model.get('url')\n\t\t\t\t\t\turl = url.replace('{{reference}}', linkShares[i].shareLinkURL)\n\t\t\t\t\t\tsocial.push({\n\t\t\t\t\t\t\turl: url,\n\t\t\t\t\t\t\tlabel: t('core', 'Share to {name}', { name: model.get('name') }),\n\t\t\t\t\t\t\tname: model.get('name'),\n\t\t\t\t\t\t\ticonClass: model.get('iconClass'),\n\t\t\t\t\t\t\tnewWindow: model.get('newWindow')\n\t\t\t\t\t\t})\n\t\t\t\t\t})\n\t\t\t\t\tvar popover = this.getPopoverObject(linkShares[i])\n\t\t\t\t\tlinkShares[i].popoverMenu = this.popoverMenuTemplate(_.extend({}, popoverBase, popover, { social: social }))\n\t\t\t\t\tlinkShares[i].pendingPopoverMenu = pendingPopoverMenu\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.$el.html(linkShareTemplate({\n\t\t\t\tlinkShares: linkShares,\n\t\t\t\tshareAllowed: true,\n\t\t\t\tnolinkShares: linkShares.length === 0,\n\t\t\t\tnewShareLabel: t('core', 'Share link'),\n\t\t\t\tnewShareTitle: t('core', 'New share link'),\n\t\t\t\tpendingPopoverMenu: pendingPopoverMenu,\n\t\t\t\tshowPending: this.showPending === this.newShareId,\n\t\t\t\tnewShareId: this.newShareId\n\t\t\t}))\n\n\t\t\tthis.delegateEvents()\n\n\t\t\t// new note autosize\n\t\t\tautosize(this.$el.find('.share-note-form .share-note'))\n\n\t\t\treturn this\n\t\t},\n\n\t\tonToggleMenu: function(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar $menu = $li.find('.sharingOptionsGroup .popovermenu')\n\t\t\tvar shareId = $li.data('share-id')\n\n\t\t\tOC.showMenu(null, $menu)\n\n\t\t\t// focus the password if not set and enforced\n\t\t\tvar isPasswordEnabledByDefault = this.configModel.get('enableLinkPasswordByDefault') === true\n\t\t\tvar haspassword = $menu.find('.linkPassText').val() !== ''\n\n\t\t\tif (!haspassword && isPasswordEnabledByDefault) {\n\t\t\t\t$menu.find('.linkPassText').focus()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * @returns {Function} from Handlebars\n\t\t * @private\n\t\t */\n\t\ttemplate: function() {\n\t\t\treturn OC.Share.Templates['sharedialoglinkshareview']\n\t\t},\n\n\t\t/**\n\t\t * renders the popover template and returns the resulting HTML\n\t\t *\n\t\t * @param {Object} data\n\t\t * @returns {string}\n\t\t */\n\t\tpopoverMenuTemplate: function(data) {\n\t\t\treturn OC.Share.Templates['sharedialoglinkshareview_popover_menu'](data)\n\t\t},\n\n\t\t/**\n\t\t * renders the pending popover template and returns the resulting HTML\n\t\t *\n\t\t * @param {Object} data\n\t\t * @returns {string}\n\t\t */\n\t\tpendingPopoverMenuTemplate: function(data) {\n\t\t\treturn OC.Share.Templates['sharedialoglinkshareview_popover_menu_pending'](data)\n\t\t},\n\n\t\tonPopUpClick: function(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\n\t\t\tvar url = $(event.currentTarget).data('url')\n\t\t\tvar newWindow = $(event.currentTarget).data('window')\n\t\t\t$(event.currentTarget).tooltip('hide')\n\t\t\tif (url) {\n\t\t\t\tif (newWindow === true) {\n\t\t\t\t\tvar width = 600\n\t\t\t\t\tvar height = 400\n\t\t\t\t\tvar left = (screen.width / 2) - (width / 2)\n\t\t\t\t\tvar top = (screen.height / 2) - (height / 2)\n\n\t\t\t\t\twindow.open(url, 'name', 'width=' + width + ', height=' + height + ', top=' + top + ', left=' + left)\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = url\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tonExpireDateChange: function(event) {\n\t\t\tvar $element = $(event.target)\n\t\t\tvar li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = li.data('share-id')\n\t\t\tvar expirationDatePicker = '#expirationDateContainer-' + shareId\n\t\t\tvar datePicker = $(expirationDatePicker)\n\t\t\tvar state = $element.prop('checked')\n\t\t\tdatePicker.toggleClass('hidden', !state)\n\n\t\t\tif (!state) {\n\t\t\t\t// disabled, let's hide the input and\n\t\t\t\t// set the expireDate to nothing\n\t\t\t\t$element.closest('li').next('li').addClass('hidden')\n\t\t\t\tthis.setExpirationDate('', shareId)\n\t\t\t} else {\n\t\t\t\t// enabled, show the input and the datepicker\n\t\t\t\t$element.closest('li').next('li').removeClass('hidden')\n\t\t\t\tthis.showDatePicker(event)\n\n\t\t\t}\n\t\t},\n\n\t\tshowDatePicker: function(event) {\n\t\t\tvar $element = $(event.target)\n\t\t\tvar li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = li.data('share-id')\n\t\t\tvar maxDate = $element.data('max-date')\n\t\t\tvar expirationDatePicker = '#expirationDatePicker-' + shareId\n\t\t\tvar self = this\n\n\t\t\t$(expirationDatePicker).datepicker({\n\t\t\t\tdateFormat: 'dd-mm-yy',\n\t\t\t\tonSelect: function(expireDate) {\n\t\t\t\t\tself.setExpirationDate(expireDate, shareId)\n\t\t\t\t},\n\t\t\t\tmaxDate: maxDate\n\t\t\t})\n\t\t\t$(expirationDatePicker).datepicker('show')\n\t\t\t$(expirationDatePicker).focus()\n\n\t\t},\n\n\t\tsetExpirationDate: function(expireDate, shareId) {\n\t\t\tthis.model.saveLinkShare({ expireDate: expireDate, cid: shareId })\n\t\t},\n\n\t\tonChangeExpirationDate: function(event) {\n\t\t\tvar $element = $(event.target)\n\t\t\tvar expireDate = $element.val()\n\t\t\tvar li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = li.data('share-id')\n\t\t\tvar expirationDatePicker = '#expirationDatePicker-' + shareId\n\n\t\t\tthis.setExpirationDate(expireDate, shareId)\n\t\t\t$(expirationDatePicker).datepicker('hide')\n\t\t},\n\n\t\t/**\n\t\t * get an array of sharees' share properties\n\t\t *\n\t\t * @returns {Array}\n\t\t */\n\t\tgetShareeList: function() {\n\t\t\tvar shares = this.model.get('linkShares')\n\n\t\t\tif (!this.model.hasLinkShares()) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\tvar list = []\n\t\t\tfor (var index = 0; index < shares.length; index++) {\n\t\t\t\tvar share = this.getShareeObject(index)\n\t\t\t\t// first empty {} is necessary, otherwise we get in trouble\n\t\t\t\t// with references\n\t\t\t\tlist.push(_.extend({}, share))\n\t\t\t}\n\n\t\t\treturn list\n\t\t},\n\n\t\t/**\n\t\t *\n\t\t * @param {OC.Share.Types.ShareInfo} shareInfo\n\t\t * @returns {object}\n\t\t */\n\t\tgetShareeObject: function(shareIndex) {\n\t\t\tvar share = this.model.get('linkShares')[shareIndex]\n\n\t\t\treturn _.extend({}, share, {\n\t\t\t\tcid: share.id,\n\t\t\t\tshareAllowed: true,\n\t\t\t\tlinkShareLabel: share.label ? share.label : t('core', 'Share link'),\n\t\t\t\tpopoverMenu: {},\n\t\t\t\tshareLinkURL: share.url,\n\t\t\t\tnewShareTitle: t('core', 'New share link'),\n\t\t\t\tcopyLabel: t('core', 'Copy link'),\n\t\t\t\tshowPending: this.showPending === share.id,\n\t\t\t\tlinkShareCreationDate: t('core', 'Created on {time}', { time: moment(share.stime * 1000).format('LLLL') })\n\t\t\t})\n\t\t},\n\n\t\tgetPopoverObject: function(share) {\n\t\t\tvar publicUploadRWChecked = ''\n\t\t\tvar publicUploadRChecked = ''\n\t\t\tvar publicUploadWChecked = ''\n\n\t\t\tswitch (this.model.linkSharePermissions(share.id)) {\n\t\t\tcase OC.PERMISSION_READ:\n\t\t\t\tpublicUploadRChecked = 'checked'\n\t\t\t\tbreak\n\t\t\tcase OC.PERMISSION_CREATE:\n\t\t\t\tpublicUploadWChecked = 'checked'\n\t\t\t\tbreak\n\t\t\tcase OC.PERMISSION_UPDATE | OC.PERMISSION_CREATE | OC.PERMISSION_READ | OC.PERMISSION_DELETE:\n\t\t\t\tpublicUploadRWChecked = 'checked'\n\t\t\t\tbreak\n\t\t\t}\n\n\t\t\tvar isPasswordSet = !!share.password\n\t\t\tvar isPasswordEnabledByDefault = this.configModel.get('enableLinkPasswordByDefault') === true\n\t\t\tvar isPasswordEnforced = this.configModel.get('enforcePasswordForPublicLink')\n\t\t\tvar isExpirationEnforced = this.configModel.get('isDefaultExpireDateEnforced')\n\t\t\tvar defaultExpireDays = this.configModel.get('defaultExpireDate')\n\t\t\tvar hasExpireDate = !!share.expiration || isExpirationEnforced\n\n\t\t\tvar expireDate\n\t\t\tif (hasExpireDate) {\n\t\t\t\texpireDate = moment(share.expiration, 'YYYY-MM-DD').format('DD-MM-YYYY')\n\t\t\t}\n\n\t\t\tvar isTalkEnabled = OC.appswebroots['spreed'] !== undefined\n\t\t\tvar sendPasswordByTalk = share.sendPasswordByTalk\n\n\t\t\tvar hideDownload = share.hideDownload\n\n\t\t\tvar maxDate = null\n\n\t\t\tif (hasExpireDate) {\n\t\t\t\tif (isExpirationEnforced) {\n\t\t\t\t\t// TODO: hack: backend returns string instead of integer\n\t\t\t\t\tvar shareTime = share.stime\n\t\t\t\t\tif (_.isNumber(shareTime)) {\n\t\t\t\t\t\tshareTime = new Date(shareTime * 1000)\n\t\t\t\t\t}\n\t\t\t\t\tif (!shareTime) {\n\t\t\t\t\t\tshareTime = new Date() // now\n\t\t\t\t\t}\n\t\t\t\t\tshareTime = OC.Util.stripTime(shareTime).getTime()\n\t\t\t\t\tmaxDate = new Date(shareTime + defaultExpireDays * 24 * 3600 * 1000)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcid: share.id,\n\t\t\t\tshareLinkURL: share.url,\n\t\t\t\tpasswordPlaceholder: isPasswordSet ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,\n\t\t\t\tisPasswordSet: isPasswordSet || isPasswordEnabledByDefault || isPasswordEnforced,\n\t\t\t\tshowPasswordByTalkCheckBox: isTalkEnabled && isPasswordSet,\n\t\t\t\tpasswordByTalkLabel: t('core', 'Password protect by Talk'),\n\t\t\t\tisPasswordByTalkSet: sendPasswordByTalk,\n\t\t\t\tpublicUploadRWChecked: publicUploadRWChecked,\n\t\t\t\tpublicUploadRChecked: publicUploadRChecked,\n\t\t\t\tpublicUploadWChecked: publicUploadWChecked,\n\t\t\t\thasExpireDate: hasExpireDate,\n\t\t\t\texpireDate: expireDate,\n\t\t\t\tshareNote: share.note,\n\t\t\t\thasNote: share.note !== '',\n\t\t\t\tmaxDate: maxDate,\n\t\t\t\thideDownload: hideDownload,\n\t\t\t\tisExpirationEnforced: isExpirationEnforced\n\t\t\t}\n\t\t},\n\n\t\tonUnshare: function(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tvar self = this\n\t\t\tvar $element = $(event.target)\n\t\t\tif (!$element.is('a')) {\n\t\t\t\t$element = $element.closest('a')\n\t\t\t}\n\n\t\t\tvar $loading = $element.find('.icon-loading-small').eq(0)\n\t\t\tif (!$loading.hasClass('hidden')) {\n\t\t\t\t// in process\n\t\t\t\treturn false\n\t\t\t}\n\t\t\t$loading.removeClass('hidden')\n\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\n\t\t\tvar shareId = $li.data('share-id')\n\n\t\t\tself.model.removeShare(shareId, {\n\t\t\t\tsuccess: function() {\n\t\t\t\t\t$li.remove()\n\t\t\t\t\tself.render()\n\t\t\t\t},\n\t\t\t\terror: function() {\n\t\t\t\t\t$loading.addClass('hidden')\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Could not unshare'))\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn false\n\t\t}\n\n\t})\n\n\tOC.Share.ShareDialogLinkShareView = ShareDialogLinkShareView\n\n})()\n","/* eslint-disable */\n/* global OC, Handlebars */\n\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* globals Handlebars */\n\n(function() {\n\n\tvar PASSWORD_PLACEHOLDER = '**********'\n\tvar PASSWORD_PLACEHOLDER_MESSAGE = t('core', 'Choose a password for the mail share')\n\n\tif (!OC.Share) {\n\t\tOC.Share = {}\n\t}\n\n\t/**\n\t * @class OCA.Share.ShareDialogShareeListView\n\t * @member {OC.Share.ShareItemModel} model\n\t * @member {jQuery} $el\n\t * @memberof OCA.Sharing\n\t * @classdesc\n\t *\n\t * Represents the sharee list part in the GUI of the share dialogue\n\t *\n\t */\n\tvar ShareDialogShareeListView = OC.Backbone.View.extend({\n\t\t/** @type {string} **/\n\t\tid: 'shareDialogLinkShare',\n\n\t\t/** @type {OC.Share.ShareConfigModel} **/\n\t\tconfigModel: undefined,\n\n\t\t_menuOpen: false,\n\n\t\t/** @type {boolean|number} **/\n\t\t_renderPermissionChange: false,\n\n\t\tevents: {\n\t\t\t'click .unshare': 'onUnshare',\n\t\t\t'click .share-add': 'showNoteForm',\n\t\t\t'click .share-note-delete': 'deleteNote',\n\t\t\t'click .share-note-submit': 'updateNote',\n\t\t\t'click .share-menu .icon-more': 'onToggleMenu',\n\t\t\t'click .permissions': 'onPermissionChange',\n\t\t\t'click .expireDate': 'onExpireDateChange',\n\t\t\t'click .password': 'onMailSharePasswordProtectChange',\n\t\t\t'click .passwordByTalk': 'onMailSharePasswordProtectByTalkChange',\n\t\t\t'click .secureDrop': 'onSecureDropChange',\n\t\t\t'keyup input.passwordField': 'onMailSharePasswordKeyUp',\n\t\t\t'focusout input.passwordField': 'onMailSharePasswordEntered',\n\t\t\t'change .datepicker': 'onChangeExpirationDate',\n\t\t\t'click .datepicker': 'showDatePicker'\n\t\t},\n\n\t\tinitialize: function(options) {\n\t\t\tif (!_.isUndefined(options.configModel)) {\n\t\t\t\tthis.configModel = options.configModel\n\t\t\t} else {\n\t\t\t\tthrow 'missing OC.Share.ShareConfigModel'\n\t\t\t}\n\n\t\t\tvar view = this\n\t\t\tthis.model.on('change:shares', function() {\n\t\t\t\tview.render()\n\t\t\t})\n\t\t},\n\n\t\t/**\n\t\t *\n\t\t * @param {OC.Share.Types.ShareInfo} shareInfo\n\t\t * @returns {object}\n\t\t */\n\t\tgetShareeObject: function(shareIndex) {\n\t\t\tvar shareWith = this.model.getShareWith(shareIndex)\n\t\t\tvar shareWithDisplayName = this.model.getShareWithDisplayName(shareIndex)\n\t\t\tvar shareWithAvatar = this.model.getShareWithAvatar(shareIndex)\n\t\t\tvar shareWithTitle = ''\n\t\t\tvar shareType = this.model.getShareType(shareIndex)\n\t\t\tvar sharedBy = this.model.getSharedBy(shareIndex)\n\t\t\tvar sharedByDisplayName = this.model.getSharedByDisplayName(shareIndex)\n\t\t\tvar fileOwnerUid = this.model.getFileOwnerUid(shareIndex)\n\n\t\t\tvar hasPermissionOverride = {}\n\t\t\tif (shareType === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\tshareWithDisplayName = shareWithDisplayName + ' (' + t('core', 'group') + ')'\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\tshareWithDisplayName = shareWithDisplayName + ' (' + t('core', 'remote') + ')'\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP) {\n\t\t\t\tshareWithDisplayName = shareWithDisplayName + ' (' + t('core', 'remote group') + ')'\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\tshareWithDisplayName = shareWithDisplayName + ' (' + t('core', 'email') + ')'\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\tshareWithDisplayName = shareWithDisplayName + ' (' + t('core', 'conversation') + ')'\n\t\t\t}\n\n\t\t\tif (shareType === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\tshareWithTitle = shareWith + ' (' + t('core', 'group') + ')'\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\tshareWithTitle = shareWith + ' (' + t('core', 'remote') + ')'\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP) {\n\t\t\t\tshareWithTitle = shareWith + ' (' + t('core', 'remote group') + ')'\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\tshareWithTitle = shareWith + ' (' + t('core', 'email') + ')'\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\tshareWithTitle = shareWith\n\t\t\t\t// Force \"shareWith\" in the template to a safe value, as the\n\t\t\t\t// original \"shareWith\" returned by the model may contain\n\t\t\t\t// problematic characters like \"'\".\n\t\t\t\tshareWith = 'circle-' + shareIndex\n\t\t\t}\n\n\t\t\tif (sharedBy !== OC.getCurrentUser().uid) {\n\t\t\t\tvar empty = shareWithTitle === ''\n\t\t\t\tif (!empty) {\n\t\t\t\t\tshareWithTitle += ' ('\n\t\t\t\t}\n\t\t\t\tshareWithTitle += t('core', 'shared by {sharer}', { sharer: sharedByDisplayName })\n\t\t\t\tif (!empty) {\n\t\t\t\t\tshareWithTitle += ')'\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar share = this.model.get('shares')[shareIndex]\n\t\t\tvar password = share.password\n\t\t\tvar hasPassword = password !== null && password !== ''\n\t\t\tvar sendPasswordByTalk = share.send_password_by_talk\n\n\t\t\tvar shareNote = this.model.getNote(shareIndex)\n\n\t\t\treturn _.extend(hasPermissionOverride, {\n\t\t\t\tcid: this.cid,\n\t\t\t\thasSharePermission: this.model.hasSharePermission(shareIndex),\n\t\t\t\teditPermissionState: this.model.editPermissionState(shareIndex),\n\t\t\t\thasCreatePermission: this.model.hasCreatePermission(shareIndex),\n\t\t\t\thasUpdatePermission: this.model.hasUpdatePermission(shareIndex),\n\t\t\t\thasDeletePermission: this.model.hasDeletePermission(shareIndex),\n\t\t\t\tsharedBy: sharedBy,\n\t\t\t\tsharedByDisplayName: sharedByDisplayName,\n\t\t\t\tshareWith: shareWith,\n\t\t\t\tshareWithDisplayName: shareWithDisplayName,\n\t\t\t\tshareWithAvatar: shareWithAvatar,\n\t\t\t\tshareWithTitle: shareWithTitle,\n\t\t\t\tshareType: shareType,\n\t\t\t\tshareId: this.model.get('shares')[shareIndex].id,\n\t\t\t\tmodSeed: shareWithAvatar || (shareType !== OC.Share.SHARE_TYPE_USER && shareType !== OC.Share.SHARE_TYPE_CIRCLE && shareType !== OC.Share.SHARE_TYPE_ROOM),\n\t\t\t\towner: fileOwnerUid,\n\t\t\t\tisShareWithCurrentUser: (shareType === OC.Share.SHARE_TYPE_USER && shareWith === OC.getCurrentUser().uid),\n\t\t\t\tcanUpdateShareSettings: (sharedBy === OC.getCurrentUser().uid || fileOwnerUid === OC.getCurrentUser().uid),\n\t\t\t\tisRemoteShare: shareType === OC.Share.SHARE_TYPE_REMOTE,\n\t\t\t\tisRemoteGroupShare: shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP,\n\t\t\t\tisNoteAvailable: shareType !== OC.Share.SHARE_TYPE_REMOTE && shareType !== OC.Share.SHARE_TYPE_REMOTE_GROUP,\n\t\t\t\tisMailShare: shareType === OC.Share.SHARE_TYPE_EMAIL,\n\t\t\t\tisCircleShare: shareType === OC.Share.SHARE_TYPE_CIRCLE,\n\t\t\t\tisFileSharedByMail: shareType === OC.Share.SHARE_TYPE_EMAIL && !this.model.isFolder(),\n\t\t\t\tisPasswordSet: hasPassword && !sendPasswordByTalk,\n\t\t\t\tisPasswordByTalkSet: hasPassword && sendPasswordByTalk,\n\t\t\t\tisTalkEnabled: OC.appswebroots['spreed'] !== undefined,\n\t\t\t\tsecureDropMode: !this.model.hasReadPermission(shareIndex),\n\t\t\t\thasExpireDate: this.model.getExpireDate(shareIndex) !== null,\n\t\t\t\tshareNote: shareNote,\n\t\t\t\thasNote: shareNote !== '',\n\t\t\t\texpireDate: moment(this.model.getExpireDate(shareIndex), 'YYYY-MM-DD').format('DD-MM-YYYY'),\n\t\t\t\t// The password placeholder does not take into account if\n\t\t\t\t// sending the password by Talk is enabled or not; when\n\t\t\t\t// switching from sending the password by Talk to sending the\n\t\t\t\t// password by email the password is reused and the share\n\t\t\t\t// updated, so the placeholder already shows the password in the\n\t\t\t\t// brief time between disabling sending the password by email\n\t\t\t\t// and receiving the updated share.\n\t\t\t\tpasswordPlaceholder: hasPassword ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,\n\t\t\t\tpasswordByTalkPlaceholder: (hasPassword && sendPasswordByTalk) ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE\n\t\t\t})\n\t\t},\n\n\t\tgetShareProperties: function() {\n\t\t\treturn {\n\t\t\t\tunshareLabel: t('core', 'Unshare'),\n\t\t\t\taddNoteLabel: t('core', 'Note to recipient'),\n\t\t\t\tcanShareLabel: t('core', 'Can reshare'),\n\t\t\t\tcanEditLabel: t('core', 'Can edit'),\n\t\t\t\tcreatePermissionLabel: t('core', 'Can create'),\n\t\t\t\tupdatePermissionLabel: t('core', 'Can change'),\n\t\t\t\tdeletePermissionLabel: t('core', 'Can delete'),\n\t\t\t\tsecureDropLabel: t('core', 'File drop (upload only)'),\n\t\t\t\texpireDateLabel: t('core', 'Set expiration date'),\n\t\t\t\tpasswordLabel: t('core', 'Password protect'),\n\t\t\t\tpasswordByTalkLabel: t('core', 'Password protect by Talk'),\n\t\t\t\tcrudsLabel: t('core', 'Access control'),\n\t\t\t\texpirationDatePlaceholder: t('core', 'Expiration date'),\n\t\t\t\tdefaultExpireDate: moment().add(1, 'day').format('DD-MM-YYYY'), // Can't expire today\n\t\t\t\ttriangleSImage: OC.imagePath('core', 'actions/triangle-s'),\n\t\t\t\tisResharingAllowed: this.configModel.get('isResharingAllowed'),\n\t\t\t\tisPasswordForMailSharesRequired: this.configModel.get('isPasswordForMailSharesRequired'),\n\t\t\t\tsharePermissionPossible: this.model.sharePermissionPossible(),\n\t\t\t\teditPermissionPossible: this.model.editPermissionPossible(),\n\t\t\t\tcreatePermissionPossible: this.model.createPermissionPossible(),\n\t\t\t\tupdatePermissionPossible: this.model.updatePermissionPossible(),\n\t\t\t\tdeletePermissionPossible: this.model.deletePermissionPossible(),\n\t\t\t\tsharePermission: OC.PERMISSION_SHARE,\n\t\t\t\tcreatePermission: OC.PERMISSION_CREATE,\n\t\t\t\tupdatePermission: OC.PERMISSION_UPDATE,\n\t\t\t\tdeletePermission: OC.PERMISSION_DELETE,\n\t\t\t\treadPermission: OC.PERMISSION_READ,\n\t\t\t\tisFolder: this.model.isFolder()\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * get an array of sharees' share properties\n\t\t *\n\t\t * @returns {Array}\n\t\t */\n\t\tgetShareeList: function() {\n\t\t\tvar universal = this.getShareProperties()\n\n\t\t\tif (!this.model.hasUserShares()) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\tvar shares = this.model.get('shares')\n\t\t\tvar list = []\n\t\t\tfor (var index = 0; index < shares.length; index++) {\n\t\t\t\tvar share = this.getShareeObject(index)\n\n\t\t\t\tif (share.shareType === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\t// first empty {} is necessary, otherwise we get in trouble\n\t\t\t\t// with references\n\t\t\t\tlist.push(_.extend({}, universal, share))\n\t\t\t}\n\n\t\t\treturn list\n\t\t},\n\n\t\tgetLinkReshares: function() {\n\t\t\tvar universal = {\n\t\t\t\tunshareLabel: t('core', 'Unshare')\n\t\t\t}\n\n\t\t\tif (!this.model.hasUserShares()) {\n\t\t\t\treturn []\n\t\t\t}\n\n\t\t\tvar shares = this.model.get('shares')\n\t\t\tvar list = []\n\t\t\tfor (var index = 0; index < shares.length; index++) {\n\t\t\t\tvar share = this.getShareeObject(index)\n\n\t\t\t\tif (share.shareType !== OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\t// first empty {} is necessary, otherwise we get in trouble\n\t\t\t\t// with references\n\t\t\t\tlist.push(_.extend({}, universal, share, {\n\t\t\t\t\tshareInitiator: shares[index].uid_owner,\n\t\t\t\t\tshareInitiatorText: t('core', '{shareInitiatorDisplayName} shared via link', { shareInitiatorDisplayName: shares[index].displayname_owner })\n\t\t\t\t}))\n\t\t\t}\n\n\t\t\treturn list\n\t\t},\n\n\t\trender: function() {\n\t\t\tif (!this._renderPermissionChange) {\n\t\t\t\tthis.$el.html(this.template({\n\t\t\t\t\tcid: this.cid,\n\t\t\t\t\tsharees: this.getShareeList(),\n\t\t\t\t\tlinkReshares: this.getLinkReshares()\n\t\t\t\t}))\n\n\t\t\t\tthis.$('.avatar').each(function() {\n\t\t\t\t\tvar $this = $(this)\n\n\t\t\t\t\tif ($this.hasClass('imageplaceholderseed')) {\n\t\t\t\t\t\t$this.css({ width: 32, height: 32 })\n\t\t\t\t\t\tif ($this.data('avatar')) {\n\t\t\t\t\t\t\t$this.css('border-radius', '0%')\n\t\t\t\t\t\t\t$this.css('background', 'url(' + $this.data('avatar') + ') no-repeat')\n\t\t\t\t\t\t\t$this.css('background-size', '31px')\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this.imageplaceholder($this.data('seed'))\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// user, size, ie8fix, hidedefault, callback, displayname\n\t\t\t\t\t\t$this.avatar($this.data('username'), 32, undefined, undefined, undefined, $this.data('displayname'))\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tthis.$('.has-tooltip').tooltip({\n\t\t\t\t\tplacement: 'bottom'\n\t\t\t\t})\n\n\t\t\t\tthis.$('ul.shareWithList > li').each(function() {\n\t\t\t\t\tvar $this = $(this)\n\n\t\t\t\t\tvar shareWith = $this.data('share-with')\n\t\t\t\t\tvar shareType = $this.data('share-type')\n\n\t\t\t\t\t$this.find('div.avatar, span.username').contactsMenu(shareWith, shareType, $this)\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tvar permissionChangeShareId = parseInt(this._renderPermissionChange, 10)\n\t\t\t\tvar shareWithIndex = this.model.findShareWithIndex(permissionChangeShareId)\n\t\t\t\tvar sharee = this.getShareeObject(shareWithIndex)\n\t\t\t\t$.extend(sharee, this.getShareProperties())\n\t\t\t\tvar $li = this.$('li[data-share-id=' + permissionChangeShareId + ']')\n\t\t\t\t$li.find('.sharingOptionsGroup .popovermenu').replaceWith(this.popoverMenuTemplate(sharee))\n\t\t\t}\n\n\t\t\tvar _this = this\n\t\t\tthis.getShareeList().forEach(function(sharee) {\n\t\t\t\tvar $edit = _this.$('#canEdit-' + _this.cid + '-' + sharee.shareId)\n\t\t\t\tif ($edit.length === 1) {\n\t\t\t\t\t$edit.prop('checked', sharee.editPermissionState === 'checked')\n\t\t\t\t\tif (sharee.isFolder) {\n\t\t\t\t\t\t$edit.prop('indeterminate', sharee.editPermissionState === 'indeterminate')\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tthis.$('.popovermenu').on('afterHide', function() {\n\t\t\t\t_this._menuOpen = false\n\t\t\t})\n\t\t\tthis.$('.popovermenu').on('beforeHide', function() {\n\t\t\t\tvar shareId = parseInt(_this._menuOpen, 10)\n\t\t\t\tif (!_.isNaN(shareId)) {\n\t\t\t\t\tvar datePickerClass = '.expirationDateContainer-' + _this.cid + '-' + shareId\n\t\t\t\t\tvar datePickerInput = '#expirationDatePicker-' + _this.cid + '-' + shareId\n\t\t\t\t\tvar expireDateCheckbox = '#expireDate-' + _this.cid + '-' + shareId\n\t\t\t\t\tif ($(expireDateCheckbox).prop('checked')) {\n\t\t\t\t\t\t$(datePickerInput).removeClass('hidden-visually')\n\t\t\t\t\t\t$(datePickerClass).removeClass('hasDatepicker')\n\t\t\t\t\t\t$(datePickerClass + ' .ui-datepicker').hide()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t\tif (this._menuOpen !== false) {\n\t\t\t\t// Open menu again if it was opened before\n\t\t\t\tvar shareId = parseInt(this._menuOpen, 10)\n\t\t\t\tif (!_.isNaN(shareId)) {\n\t\t\t\t\tvar liSelector = 'li[data-share-id=' + shareId + ']'\n\t\t\t\t\tOC.showMenu(null, this.$(liSelector + ' .sharingOptionsGroup .popovermenu'))\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._renderPermissionChange = false\n\n\t\t\t// new note autosize\n\t\t\tautosize(this.$el.find('.share-note-form .share-note'))\n\n\t\t\tthis.delegateEvents()\n\n\t\t\treturn this\n\t\t},\n\n\t\t/**\n\t\t * @returns {Function} from Handlebars\n\t\t * @private\n\t\t */\n\t\ttemplate: function(data) {\n\t\t\tvar sharees = data.sharees\n\t\t\tif (_.isArray(sharees)) {\n\t\t\t\tfor (var i = 0; i < sharees.length; i++) {\n\t\t\t\t\tdata.sharees[i].popoverMenu = this.popoverMenuTemplate(sharees[i])\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn OC.Share.Templates['sharedialogshareelistview'](data)\n\t\t},\n\n\t\t/**\n\t\t * renders the popover template and returns the resulting HTML\n\t\t *\n\t\t * @param {Object} data\n\t\t * @returns {string}\n\t\t */\n\t\tpopoverMenuTemplate: function(data) {\n\t\t\treturn OC.Share.Templates['sharedialogshareelistview_popover_menu'](data)\n\t\t},\n\n\t\tshowNoteForm: function(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $menu = $element.closest('li')\n\t\t\tvar $form = $menu.next('li.share-note-form')\n\n\t\t\t// show elements\n\t\t\t$menu.find('.share-note-delete').toggleClass('hidden')\n\t\t\t$form.toggleClass('hidden')\n\t\t\t$form.find('textarea').focus()\n\t\t},\n\n\t\tdeleteNote: function(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tvar self = this\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = $li.data('share-id')\n\t\t\tvar $menu = $element.closest('li')\n\t\t\tvar $form = $menu.next('li.share-note-form')\n\n\t\t\tconsole.log($form.find('.share-note'))\n\t\t\t$form.find('.share-note').val('')\n\n\t\t\t$form.addClass('hidden')\n\t\t\t$menu.find('.share-note-delete').addClass('hidden')\n\n\t\t\tself.sendNote('', shareId, $menu)\n\t\t},\n\n\t\tupdateNote: function(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tvar self = this\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = $li.data('share-id')\n\t\t\tvar $form = $element.closest('li.share-note-form')\n\t\t\tvar $menu = $form.prev('li')\n\t\t\tvar message = $form.find('.share-note').val().trim()\n\n\t\t\tif (message.length < 1) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tself.sendNote(message, shareId, $menu)\n\n\t\t},\n\n\t\tsendNote: function(note, shareId, $menu) {\n\t\t\tvar $form = $menu.next('li.share-note-form')\n\t\t\tvar $submit = $form.find('input.share-note-submit')\n\t\t\tvar $error = $form.find('input.share-note-error')\n\n\t\t\t$submit.prop('disabled', true)\n\t\t\t$menu.find('.icon-loading-small').removeClass('hidden')\n\t\t\t$menu.find('.icon-edit').hide()\n\n\t\t\tvar complete = function() {\n\t\t\t\t$submit.prop('disabled', false)\n\t\t\t\t$menu.find('.icon-loading-small').addClass('hidden')\n\t\t\t\t$menu.find('.icon-edit').show()\n\t\t\t}\n\t\t\tvar error = function() {\n\t\t\t\t$error.show()\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t$error.hide()\n\t\t\t\t}, 3000)\n\t\t\t}\n\n\t\t\t// send data\n\t\t\t$.ajax({\n\t\t\t\tmethod: 'PUT',\n\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1/shares', 2) + shareId + '?' + OC.buildQueryString({ format: 'json' }),\n\t\t\t\tdata: { note: note },\n\t\t\t\tcomplete: complete,\n\t\t\t\terror: error\n\t\t\t})\n\t\t},\n\n\t\tonUnshare: function(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tvar self = this\n\t\t\tvar $element = $(event.target)\n\t\t\tif (!$element.is('a')) {\n\t\t\t\t$element = $element.closest('a')\n\t\t\t}\n\n\t\t\tvar $loading = $element.find('.icon-loading-small').eq(0)\n\t\t\tif (!$loading.hasClass('hidden')) {\n\t\t\t\t// in process\n\t\t\t\treturn false\n\t\t\t}\n\t\t\t$loading.removeClass('hidden')\n\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\n\t\t\tvar shareId = $li.data('share-id')\n\n\t\t\tself.model.removeShare(shareId)\n\t\t\t\t.done(function() {\n\t\t\t\t\t$li.remove()\n\t\t\t\t})\n\t\t\t\t.fail(function() {\n\t\t\t\t\t$loading.addClass('hidden')\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Could not unshare'))\n\t\t\t\t})\n\t\t\treturn false\n\t\t},\n\n\t\tonToggleMenu: function(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar $menu = $li.find('.sharingOptionsGroup .popovermenu')\n\n\t\t\tOC.showMenu(null, $menu)\n\t\t\tthis._menuOpen = $li.data('share-id')\n\t\t},\n\n\t\tonExpireDateChange: function(event) {\n\t\t\tvar $element = $(event.target)\n\t\t\tvar li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = li.data('share-id')\n\t\t\tvar datePickerClass = '.expirationDateContainer-' + this.cid + '-' + shareId\n\t\t\tvar datePicker = $(datePickerClass)\n\t\t\tvar state = $element.prop('checked')\n\t\t\tdatePicker.toggleClass('hidden', !state)\n\t\t\tif (!state) {\n\t\t\t\t// disabled, let's hide the input and\n\t\t\t\t// set the expireDate to nothing\n\t\t\t\t$element.closest('li').next('li').addClass('hidden')\n\t\t\t\tthis.setExpirationDate(shareId, '')\n\t\t\t} else {\n\t\t\t\t// enabled, show the input and the datepicker\n\t\t\t\t$element.closest('li').next('li').removeClass('hidden')\n\t\t\t\tthis.showDatePicker(event)\n\n\t\t\t}\n\t\t},\n\n\t\tshowDatePicker: function(event) {\n\t\t\tvar element = $(event.target)\n\t\t\tvar li = element.closest('li[data-share-id]')\n\t\t\tvar shareId = li.data('share-id')\n\t\t\tvar expirationDatePicker = '#expirationDatePicker-' + this.cid + '-' + shareId\n\t\t\tvar view = this\n\t\t\t$(expirationDatePicker).datepicker({\n\t\t\t\tdateFormat: 'dd-mm-yy',\n\t\t\t\tonSelect: function(expireDate) {\n\t\t\t\t\tview.setExpirationDate(shareId, expireDate)\n\t\t\t\t}\n\t\t\t})\n\t\t\t$(expirationDatePicker).focus()\n\n\t\t},\n\n\t\tsetExpirationDate: function(shareId, expireDate) {\n\t\t\tthis.model.updateShare(shareId, { expireDate: expireDate }, {})\n\t\t},\n\n\t\tonMailSharePasswordProtectChange: function(event) {\n\t\t\tvar element = $(event.target)\n\t\t\tvar li = element.closest('li[data-share-id]')\n\t\t\tvar shareId = li.data('share-id')\n\t\t\tvar passwordContainerClass = '.passwordMenu-' + this.cid + '-' + shareId\n\t\t\tvar passwordContainer = $(passwordContainerClass)\n\t\t\tvar loading = this.$el.find(passwordContainerClass + ' .icon-loading-small')\n\t\t\tvar inputClass = '#passwordField-' + this.cid + '-' + shareId\n\t\t\tvar passwordField = $(inputClass)\n\t\t\tvar state = element.prop('checked')\n\t\t\tvar passwordByTalkElement = $('#passwordByTalk-' + this.cid + '-' + shareId)\n\t\t\tvar passwordByTalkState = passwordByTalkElement.prop('checked')\n\t\t\tif (!state && !passwordByTalkState) {\n\t\t\t\tthis.model.updateShare(shareId, { password: '', sendPasswordByTalk: false })\n\t\t\t\tpasswordField.attr('value', '')\n\t\t\t\tpasswordField.removeClass('error')\n\t\t\t\tpasswordField.tooltip('hide')\n\t\t\t\tloading.addClass('hidden')\n\t\t\t\tpasswordField.attr('placeholder', PASSWORD_PLACEHOLDER_MESSAGE)\n\t\t\t\t// We first need to reset the password field before we hide it\n\t\t\t\tpasswordContainer.toggleClass('hidden', !state)\n\t\t\t} else if (state) {\n\t\t\t\tif (passwordByTalkState) {\n\t\t\t\t\t// Switching from sending the password by Talk to sending\n\t\t\t\t\t// the password by mail can be done keeping the previous\n\t\t\t\t\t// password sent by Talk.\n\t\t\t\t\tthis.model.updateShare(shareId, { sendPasswordByTalk: false })\n\n\t\t\t\t\tvar passwordByTalkContainerClass = '.passwordByTalkMenu-' + this.cid + '-' + shareId\n\t\t\t\t\tvar passwordByTalkContainer = $(passwordByTalkContainerClass)\n\t\t\t\t\tpasswordByTalkContainer.addClass('hidden')\n\t\t\t\t\tpasswordByTalkElement.prop('checked', false)\n\t\t\t\t}\n\n\t\t\t\tpasswordContainer.toggleClass('hidden', !state)\n\t\t\t\tpasswordField = '#passwordField-' + this.cid + '-' + shareId\n\t\t\t\tthis.$(passwordField).focus()\n\t\t\t}\n\t\t},\n\n\t\tonMailSharePasswordProtectByTalkChange: function(event) {\n\t\t\tvar element = $(event.target)\n\t\t\tvar li = element.closest('li[data-share-id]')\n\t\t\tvar shareId = li.data('share-id')\n\t\t\tvar passwordByTalkContainerClass = '.passwordByTalkMenu-' + this.cid + '-' + shareId\n\t\t\tvar passwordByTalkContainer = $(passwordByTalkContainerClass)\n\t\t\tvar loading = this.$el.find(passwordByTalkContainerClass + ' .icon-loading-small')\n\t\t\tvar inputClass = '#passwordByTalkField-' + this.cid + '-' + shareId\n\t\t\tvar passwordByTalkField = $(inputClass)\n\t\t\tvar state = element.prop('checked')\n\t\t\tvar passwordElement = $('#password-' + this.cid + '-' + shareId)\n\t\t\tvar passwordState = passwordElement.prop('checked')\n\t\t\tif (!state) {\n\t\t\t\tthis.model.updateShare(shareId, { password: '', sendPasswordByTalk: false })\n\t\t\t\tpasswordByTalkField.attr('value', '')\n\t\t\t\tpasswordByTalkField.removeClass('error')\n\t\t\t\tpasswordByTalkField.tooltip('hide')\n\t\t\t\tloading.addClass('hidden')\n\t\t\t\tpasswordByTalkField.attr('placeholder', PASSWORD_PLACEHOLDER_MESSAGE)\n\t\t\t\t// We first need to reset the password field before we hide it\n\t\t\t\tpasswordByTalkContainer.toggleClass('hidden', !state)\n\t\t\t} else if (state) {\n\t\t\t\tif (passwordState) {\n\t\t\t\t\t// Enabling sending the password by Talk requires a new\n\t\t\t\t\t// password to be given (the one sent by mail is not reused,\n\t\t\t\t\t// as it would defeat the purpose of checking the identity\n\t\t\t\t\t// of the sharee by Talk if it was already sent by mail), so\n\t\t\t\t\t// the share is not updated until the user explicitly gives\n\t\t\t\t\t// the new password.\n\n\t\t\t\t\tvar passwordContainerClass = '.passwordMenu-' + this.cid + '-' + shareId\n\t\t\t\t\tvar passwordContainer = $(passwordContainerClass)\n\t\t\t\t\tpasswordContainer.addClass('hidden')\n\t\t\t\t\tpasswordElement.prop('checked', false)\n\t\t\t\t}\n\n\t\t\t\tpasswordByTalkContainer.toggleClass('hidden', !state)\n\t\t\t\tpasswordByTalkField = '#passwordByTalkField-' + this.cid + '-' + shareId\n\t\t\t\tthis.$(passwordByTalkField).focus()\n\t\t\t}\n\t\t},\n\n\t\tonMailSharePasswordKeyUp: function(event) {\n\t\t\tif (event.keyCode === 13) {\n\t\t\t\tthis.onMailSharePasswordEntered(event)\n\t\t\t}\n\t\t},\n\n\t\tonMailSharePasswordEntered: function(event) {\n\t\t\tvar passwordField = $(event.target)\n\t\t\tvar li = passwordField.closest('li[data-share-id]')\n\t\t\tvar shareId = li.data('share-id')\n\t\t\tvar passwordContainerClass = '.passwordMenu-' + this.cid + '-' + shareId\n\t\t\tvar passwordByTalkContainerClass = '.passwordByTalkMenu-' + this.cid + '-' + shareId\n\t\t\tvar sendPasswordByTalk = passwordField.attr('id').startsWith('passwordByTalk')\n\t\t\tvar loading\n\t\t\tif (sendPasswordByTalk) {\n\t\t\t\tloading = this.$el.find(passwordByTalkContainerClass + ' .icon-loading-small')\n\t\t\t} else {\n\t\t\t\tloading = this.$el.find(passwordContainerClass + ' .icon-loading-small')\n\t\t\t}\n\t\t\tif (!loading.hasClass('hidden')) {\n\t\t\t\t// still in process\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tpasswordField.removeClass('error')\n\t\t\tvar password = passwordField.val()\n\t\t\t// in IE9 the password might be the placeholder due to bugs in the placeholders polyfill\n\t\t\tif (password === '' || password === PASSWORD_PLACEHOLDER || password === PASSWORD_PLACEHOLDER_MESSAGE) {\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tloading\n\t\t\t\t.removeClass('hidden')\n\t\t\t\t.addClass('inlineblock')\n\n\t\t\tthis.model.updateShare(shareId, {\n\t\t\t\tpassword: password,\n\t\t\t\tsendPasswordByTalk: sendPasswordByTalk\n\t\t\t}, {\n\t\t\t\terror: function(model, msg) {\n\t\t\t\t\t// destroy old tooltips\n\t\t\t\t\tpasswordField.tooltip('destroy')\n\t\t\t\t\tloading.removeClass('inlineblock').addClass('hidden')\n\t\t\t\t\tpasswordField.addClass('error')\n\t\t\t\t\tpasswordField.attr('title', msg)\n\t\t\t\t\tpasswordField.tooltip({ placement: 'bottom', trigger: 'manual' })\n\t\t\t\t\tpasswordField.tooltip('show')\n\t\t\t\t},\n\t\t\t\tsuccess: function(model, msg) {\n\t\t\t\t\tpasswordField.blur()\n\t\t\t\t\tpasswordField.attr('value', '')\n\t\t\t\t\tpasswordField.attr('placeholder', PASSWORD_PLACEHOLDER)\n\t\t\t\t\tloading.removeClass('inlineblock').addClass('hidden')\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\tonPermissionChange: function(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = $li.data('share-id')\n\n\t\t\tvar permissions = OC.PERMISSION_READ\n\n\t\t\tif (this.model.isFolder()) {\n\t\t\t\t// adjust checkbox states\n\t\t\t\tvar $checkboxes = $('.permissions', $li).not('input[name=\"edit\"]').not('input[name=\"share\"]')\n\t\t\t\tvar checked\n\t\t\t\tif ($element.attr('name') === 'edit') {\n\t\t\t\t\tchecked = $element.is(':checked')\n\t\t\t\t\t// Check/uncheck Create, Update, and Delete checkboxes if Edit is checked/unck\n\t\t\t\t\t$($checkboxes).prop('checked', checked)\n\t\t\t\t\tif (checked) {\n\t\t\t\t\t\tpermissions |= OC.PERMISSION_CREATE | OC.PERMISSION_UPDATE | OC.PERMISSION_DELETE\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar numberChecked = $checkboxes.filter(':checked').length\n\t\t\t\t\tchecked = numberChecked === $checkboxes.length\n\t\t\t\t\tvar $editCb = $('input[name=\"edit\"]', $li)\n\t\t\t\t\t$editCb.prop('checked', checked)\n\t\t\t\t\t$editCb.prop('indeterminate', !checked && numberChecked > 0)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($element.attr('name') === 'edit' && $element.is(':checked')) {\n\t\t\t\t\tpermissions |= OC.PERMISSION_UPDATE\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$('.permissions', $li).not('input[name=\"edit\"]').filter(':checked').each(function(index, checkbox) {\n\t\t\t\tpermissions |= $(checkbox).data('permissions')\n\t\t\t})\n\n\t\t\t/** disable checkboxes during save operation to avoid race conditions **/\n\t\t\t$li.find('input[type=checkbox]').prop('disabled', true)\n\t\t\tvar enableCb = function() {\n\t\t\t\t$li.find('input[type=checkbox]').prop('disabled', false)\n\t\t\t}\n\t\t\tvar errorCb = function(elem, msg) {\n\t\t\t\tOC.dialogs.alert(msg, t('core', 'Error while sharing'))\n\t\t\t\tenableCb()\n\t\t\t}\n\n\t\t\tthis.model.updateShare(shareId, { permissions: permissions }, { error: errorCb, success: enableCb })\n\n\t\t\tthis._renderPermissionChange = shareId\n\t\t},\n\n\t\tonSecureDropChange: function(event) {\n\t\t\tevent.preventDefault()\n\t\t\tevent.stopPropagation()\n\t\t\tvar $element = $(event.target)\n\t\t\tvar $li = $element.closest('li[data-share-id]')\n\t\t\tvar shareId = $li.data('share-id')\n\n\t\t\tvar permissions = OC.PERMISSION_CREATE | OC.PERMISSION_UPDATE | OC.PERMISSION_DELETE | OC.PERMISSION_READ\n\t\t\tif ($element.is(':checked')) {\n\t\t\t\tpermissions = OC.PERMISSION_CREATE | OC.PERMISSION_UPDATE | OC.PERMISSION_DELETE\n\t\t\t}\n\n\t\t\t/** disable checkboxes during save operation to avoid race conditions **/\n\t\t\t$li.find('input[type=checkbox]').prop('disabled', true)\n\t\t\tvar enableCb = function() {\n\t\t\t\t$li.find('input[type=checkbox]').prop('disabled', false)\n\t\t\t}\n\t\t\tvar errorCb = function(elem, msg) {\n\t\t\t\tOC.dialogs.alert(msg, t('core', 'Error while sharing'))\n\t\t\t\tenableCb()\n\t\t\t}\n\n\t\t\tthis.model.updateShare(shareId, { permissions: permissions }, { error: errorCb, success: enableCb })\n\n\t\t\tthis._renderPermissionChange = shareId\n\t\t}\n\n\t})\n\n\tOC.Share.ShareDialogShareeListView = ShareDialogShareeListView\n\n})()\n","/* eslint-disable */\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* globals Handlebars */\n\n(function() {\n\tif (!OC.Share) {\n\t\tOC.Share = {}\n\t}\n\n\t/**\n\t * @class OCA.Share.ShareDialogView\n\t * @member {OC.Share.ShareItemModel} model\n\t * @member {jQuery} $el\n\t * @memberof OCA.Sharing\n\t * @classdesc\n\t *\n\t * Represents the GUI of the share dialogue\n\t *\n\t */\n\tvar ShareDialogView = OC.Backbone.View.extend({\n\t\t/** @type {Object} **/\n\t\t_templates: {},\n\n\t\t/** @type {boolean} **/\n\t\t_showLink: true,\n\n\t\t_lookup: false,\n\n\t\t_lookupAllowed: false,\n\n\t\t/** @type {string} **/\n\t\ttagName: 'div',\n\n\t\t/** @type {OC.Share.ShareConfigModel} **/\n\t\tconfigModel: undefined,\n\n\t\t/** @type {object} **/\n\t\tresharerInfoView: undefined,\n\n\t\t/** @type {object} **/\n\t\tlinkShareView: undefined,\n\n\t\t/** @type {object} **/\n\t\tshareeListView: undefined,\n\n\t\t/** @type {object} **/\n\t\t_lastSuggestions: undefined,\n\n\t\t/** @type {object} **/\n\t\t_lastRecommendations: undefined,\n\n\t\t/** @type {int} **/\n\t\t_pendingOperationsCount: 0,\n\n\t\tevents: {\n\t\t\t'focus .shareWithField': 'onShareWithFieldFocus',\n\t\t\t'input .shareWithField': 'onShareWithFieldChanged',\n\t\t\t'click .shareWithConfirm': '_confirmShare'\n\t\t},\n\n\t\tinitialize: function(options) {\n\t\t\tvar view = this\n\n\t\t\tthis.model.on('fetchError', function() {\n\t\t\t\tOC.Notification.showTemporary(t('core', 'Share details could not be loaded for this item.'))\n\t\t\t})\n\n\t\t\tif (!_.isUndefined(options.configModel)) {\n\t\t\t\tthis.configModel = options.configModel\n\t\t\t} else {\n\t\t\t\tthrow 'missing OC.Share.ShareConfigModel'\n\t\t\t}\n\n\t\t\tthis.configModel.on('change:isRemoteShareAllowed', function() {\n\t\t\t\tview.render()\n\t\t\t})\n\t\t\tthis.configModel.on('change:isRemoteGroupShareAllowed', function() {\n\t\t\t\tview.render()\n\t\t\t})\n\t\t\tthis.model.on('change:permissions', function() {\n\t\t\t\tview.render()\n\t\t\t})\n\n\t\t\tthis.model.on('request', this._onRequest, this)\n\t\t\tthis.model.on('sync', this._onEndRequest, this)\n\n\t\t\tvar subViewOptions = {\n\t\t\t\tmodel: this.model,\n\t\t\t\tconfigModel: this.configModel\n\t\t\t}\n\n\t\t\tvar subViews = {\n\t\t\t\tresharerInfoView: 'ShareDialogResharerInfoView',\n\t\t\t\tlinkShareView: 'ShareDialogLinkShareView',\n\t\t\t\tshareeListView: 'ShareDialogShareeListView'\n\t\t\t}\n\n\t\t\tfor (var name in subViews) {\n\t\t\t\tvar className = subViews[name]\n\t\t\t\tthis[name] = _.isUndefined(options[name])\n\t\t\t\t\t? new OC.Share[className](subViewOptions)\n\t\t\t\t\t: options[name]\n\t\t\t}\n\n\t\t\t_.bindAll(this,\n\t\t\t\t'autocompleteHandler',\n\t\t\t\t'_onSelectRecipient',\n\t\t\t\t'onShareWithFieldChanged',\n\t\t\t\t'onShareWithFieldFocus'\n\t\t\t)\n\n\t\t\tOC.Plugins.attach('OC.Share.ShareDialogView', this)\n\t\t},\n\n\t\tonShareWithFieldChanged: function() {\n\t\t\tvar $el = this.$el.find('.shareWithField')\n\t\t\tif ($el.val().length < 2) {\n\t\t\t\t$el.removeClass('error').tooltip('hide')\n\t\t\t}\n\t\t},\n\n\t\t/* trigger search after the field was re-selected */\n\t\tonShareWithFieldFocus: function() {\n\t\t\tvar $shareWithField = this.$el.find('.shareWithField')\n\t\t\t$shareWithField.autocomplete('search', $shareWithField.val())\n\t\t},\n\n\t\t_getSuggestions: function(searchTerm, perPage, model, lookup) {\n\t\t\tif (this._lastSuggestions\n\t\t\t\t&& this._lastSuggestions.searchTerm === searchTerm\n\t\t\t\t&& this._lastSuggestions.lookup === lookup\n\t\t\t\t&& this._lastSuggestions.perPage === perPage\n\t\t\t\t&& this._lastSuggestions.model === model) {\n\t\t\t\treturn this._lastSuggestions.promise\n\t\t\t}\n\n\t\t\tvar deferred = $.Deferred()\n\t\t\tvar view = this\n\n\t\t\t$.get(\n\t\t\t\tOC.linkToOCS('apps/files_sharing/api/v1') + 'sharees',\n\t\t\t\t{\n\t\t\t\t\tformat: 'json',\n\t\t\t\t\tsearch: searchTerm,\n\t\t\t\t\tlookup: lookup,\n\t\t\t\t\tperPage: perPage,\n\t\t\t\t\titemType: model.get('itemType')\n\t\t\t\t},\n\t\t\t\tfunction(result) {\n\t\t\t\t\tif (result.ocs.meta.statuscode === 100) {\n\t\t\t\t\t\tvar filter = function(users, groups, remotes, remote_groups, emails, circles, rooms) {\n\t\t\t\t\t\t\tif (typeof (emails) === 'undefined') {\n\t\t\t\t\t\t\t\temails = []\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof (circles) === 'undefined') {\n\t\t\t\t\t\t\t\tcircles = []\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof (rooms) === 'undefined') {\n\t\t\t\t\t\t\t\trooms = []\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar usersLength\n\t\t\t\t\t\t\tvar groupsLength\n\t\t\t\t\t\t\tvar remotesLength\n\t\t\t\t\t\t\tvar remoteGroupsLength\n\t\t\t\t\t\t\tvar emailsLength\n\t\t\t\t\t\t\tvar circlesLength\n\t\t\t\t\t\t\tvar roomsLength\n\n\t\t\t\t\t\t\tvar i, j\n\n\t\t\t\t\t\t\t// Filter out the current user\n\t\t\t\t\t\t\tusersLength = users.length\n\t\t\t\t\t\t\tfor (i = 0; i < usersLength; i++) {\n\t\t\t\t\t\t\t\tif (users[i].value.shareWith === OC.currentUser) {\n\t\t\t\t\t\t\t\t\tusers.splice(i, 1)\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Filter out the owner of the share\n\t\t\t\t\t\t\tif (model.hasReshare()) {\n\t\t\t\t\t\t\t\tusersLength = users.length\n\t\t\t\t\t\t\t\tfor (i = 0; i < usersLength; i++) {\n\t\t\t\t\t\t\t\t\tif (users[i].value.shareWith === model.getReshareOwner()) {\n\t\t\t\t\t\t\t\t\t\tusers.splice(i, 1)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar shares = model.get('shares')\n\t\t\t\t\t\t\tvar sharesLength = shares.length\n\n\t\t\t\t\t\t\t// Now filter out all sharees that are already shared with\n\t\t\t\t\t\t\tfor (i = 0; i < sharesLength; i++) {\n\t\t\t\t\t\t\t\tvar share = shares[i]\n\n\t\t\t\t\t\t\t\tif (share.share_type === OC.Share.SHARE_TYPE_USER) {\n\t\t\t\t\t\t\t\t\tusersLength = users.length\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < usersLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (users[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tusers.splice(j, 1)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\t\t\t\t\t\tgroupsLength = groups.length\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < groupsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (groups[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tgroups.splice(j, 1)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\t\t\t\t\t\tremotesLength = remotes.length\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < remotesLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (remotes[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tremotes.splice(j, 1)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE_GROUP) {\n\t\t\t\t\t\t\t\t\tremoteGroupsLength = remote_groups.length\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < remoteGroupsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (remote_groups[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tremote_groups.splice(j, 1)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\t\t\t\t\t\temailsLength = emails.length\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < emailsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (emails[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\temails.splice(j, 1)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\t\t\t\t\t\tcirclesLength = circles.length\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < circlesLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (circles[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tcircles.splice(j, 1)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\t\t\t\t\t\troomsLength = rooms.length\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < roomsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (rooms[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\trooms.splice(j, 1)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfilter(\n\t\t\t\t\t\t\tresult.ocs.data.exact.users,\n\t\t\t\t\t\t\tresult.ocs.data.exact.groups,\n\t\t\t\t\t\t\tresult.ocs.data.exact.remotes,\n\t\t\t\t\t\t\tresult.ocs.data.exact.remote_groups,\n\t\t\t\t\t\t\tresult.ocs.data.exact.emails,\n\t\t\t\t\t\t\tresult.ocs.data.exact.circles,\n\t\t\t\t\t\t\tresult.ocs.data.exact.rooms\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\tvar exactUsers = result.ocs.data.exact.users\n\t\t\t\t\t\tvar exactGroups = result.ocs.data.exact.groups\n\t\t\t\t\t\tvar exactRemotes = result.ocs.data.exact.remotes\n\t\t\t\t\t\tvar exactRemoteGroups = result.ocs.data.exact.remote_groups\n\t\t\t\t\t\tvar exactEmails = []\n\t\t\t\t\t\tif (typeof (result.ocs.data.emails) !== 'undefined') {\n\t\t\t\t\t\t\texactEmails = result.ocs.data.exact.emails\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar exactCircles = []\n\t\t\t\t\t\tif (typeof (result.ocs.data.circles) !== 'undefined') {\n\t\t\t\t\t\t\texactCircles = result.ocs.data.exact.circles\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar exactRooms = []\n\t\t\t\t\t\tif (typeof (result.ocs.data.rooms) !== 'undefined') {\n\t\t\t\t\t\t\texactRooms = result.ocs.data.exact.rooms\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar exactMatches = exactUsers.concat(exactGroups).concat(exactRemotes).concat(exactRemoteGroups).concat(exactEmails).concat(exactCircles).concat(exactRooms)\n\n\t\t\t\t\t\tfilter(\n\t\t\t\t\t\t\tresult.ocs.data.users,\n\t\t\t\t\t\t\tresult.ocs.data.groups,\n\t\t\t\t\t\t\tresult.ocs.data.remotes,\n\t\t\t\t\t\t\tresult.ocs.data.remote_groups,\n\t\t\t\t\t\t\tresult.ocs.data.emails,\n\t\t\t\t\t\t\tresult.ocs.data.circles,\n\t\t\t\t\t\t\tresult.ocs.data.rooms\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\tvar users = result.ocs.data.users\n\t\t\t\t\t\tvar groups = result.ocs.data.groups\n\t\t\t\t\t\tvar remotes = result.ocs.data.remotes\n\t\t\t\t\t\tvar remoteGroups = result.ocs.data.remote_groups\n\t\t\t\t\t\tvar lookup = result.ocs.data.lookup\n\t\t\t\t\t\tvar lookupEnabled = result.ocs.data.lookupEnabled\n\t\t\t\t\t\tvar emails = []\n\t\t\t\t\t\tif (typeof (result.ocs.data.emails) !== 'undefined') {\n\t\t\t\t\t\t\temails = result.ocs.data.emails\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar circles = []\n\t\t\t\t\t\tif (typeof (result.ocs.data.circles) !== 'undefined') {\n\t\t\t\t\t\t\tcircles = result.ocs.data.circles\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar rooms = []\n\t\t\t\t\t\tif (typeof (result.ocs.data.rooms) !== 'undefined') {\n\t\t\t\t\t\t\trooms = result.ocs.data.rooms\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar suggestions = exactMatches.concat(users).concat(groups).concat(remotes).concat(remoteGroups).concat(emails).concat(circles).concat(rooms).concat(lookup)\n\n\t\t\t\t\t\tfunction dynamicSort(property) {\n\t\t\t\t\t\t\treturn function(a, b) {\n\t\t\t\t\t\t\t\tvar aProperty = ''\n\t\t\t\t\t\t\t\tvar bProperty = ''\n\t\t\t\t\t\t\t\tif (typeof a[property] !== 'undefined') {\n\t\t\t\t\t\t\t\t\taProperty = a[property]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (typeof b[property] !== 'undefined') {\n\t\t\t\t\t\t\t\t\tbProperty = b[property]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn (aProperty < bProperty) ? -1 : (aProperty > bProperty) ? 1 : 0\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Sort share entries by uuid to properly group them\n\t\t\t\t\t\t */\n\t\t\t\t\t\tvar grouped = suggestions.sort(dynamicSort('uuid'))\n\n\t\t\t\t\t\tvar previousUuid = null\n\t\t\t\t\t\tvar groupedLength = grouped.length\n\t\t\t\t\t\tvar result = []\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * build the result array that only contains all contact entries from\n\t\t\t\t\t\t * merged contacts, if the search term matches its contact name\n\t\t\t\t\t\t */\n\t\t\t\t\t\tfor (var i = 0; i < groupedLength; i++) {\n\t\t\t\t\t\t\tif (typeof grouped[i].uuid !== 'undefined' && grouped[i].uuid === previousUuid) {\n\t\t\t\t\t\t\t\tgrouped[i].merged = true\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (searchTerm === grouped[i].name || typeof grouped[i].merged === 'undefined') {\n\t\t\t\t\t\t\t\tresult.push(grouped[i])\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpreviousUuid = grouped[i].uuid\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar moreResultsAvailable\n\t\t\t\t\t\t\t= (\n\t\t\t\t\t\t\t\tOC.config['sharing.maxAutocompleteResults'] > 0\n\t\t\t\t\t\t\t\t&& Math.min(perPage, OC.config['sharing.maxAutocompleteResults'])\n\t\t\t\t\t\t\t\t\t<= Math.max(\n\t\t\t\t\t\t\t\t\t\tusers.length + exactUsers.length,\n\t\t\t\t\t\t\t\t\t\tgroups.length + exactGroups.length,\n\t\t\t\t\t\t\t\t\t\tremoteGroups.length + exactRemoteGroups.length,\n\t\t\t\t\t\t\t\t\t\tremotes.length + exactRemotes.length,\n\t\t\t\t\t\t\t\t\t\temails.length + exactEmails.length,\n\t\t\t\t\t\t\t\t\t\tcircles.length + exactCircles.length,\n\t\t\t\t\t\t\t\t\t\trooms.length + exactRooms.length,\n\t\t\t\t\t\t\t\t\t\tlookup.length\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\tif (!view._lookup && lookupEnabled) {\n\t\t\t\t\t\t\tresult.push(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: t('core', 'Search globally'),\n\t\t\t\t\t\t\t\t\tvalue: {},\n\t\t\t\t\t\t\t\t\tlookup: true\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdeferred.resolve(result, exactMatches, moreResultsAvailable, lookupEnabled)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdeferred.reject(result.ocs.meta.message)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t).fail(function() {\n\t\t\t\tdeferred.reject()\n\t\t\t})\n\n\t\t\tthis._lastSuggestions = {\n\t\t\t\tsearchTerm: searchTerm,\n\t\t\t\tlookup: lookup,\n\t\t\t\tperPage: perPage,\n\t\t\t\tmodel: model,\n\t\t\t\tpromise: deferred.promise()\n\t\t\t}\n\n\t\t\treturn this._lastSuggestions.promise\n\t\t},\n\n\t\t_getRecommendations: function(model) {\n\t\t\tif (this._lastRecommendations\n\t\t\t\t&& this._lastRecommendations.model === model) {\n\t\t\t\treturn this._lastRecommendations.promise\n\t\t\t}\n\n\t\t\tvar deferred = $.Deferred()\n\n\t\t\t$.get(\n\t\t\t\tOC.linkToOCS('apps/files_sharing/api/v1') + 'sharees_recommended',\n\t\t\t\t{\n\t\t\t\t\tformat: 'json',\n\t\t\t\t\titemType: model.get('itemType')\n\t\t\t\t},\n\t\t\t\tfunction(result) {\n\t\t\t\t\tif (result.ocs.meta.statuscode === 100) {\n\t\t\t\t\t\tvar filter = function(users, groups, remotes, remote_groups, emails, circles, rooms) {\n\t\t\t\t\t\t\tif (typeof (emails) === 'undefined') {\n\t\t\t\t\t\t\t\temails = []\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof (circles) === 'undefined') {\n\t\t\t\t\t\t\t\tcircles = []\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof (rooms) === 'undefined') {\n\t\t\t\t\t\t\t\trooms = []\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar usersLength\n\t\t\t\t\t\t\tvar groupsLength\n\t\t\t\t\t\t\tvar remotesLength\n\t\t\t\t\t\t\tvar remoteGroupsLength\n\t\t\t\t\t\t\tvar emailsLength\n\t\t\t\t\t\t\tvar circlesLength\n\t\t\t\t\t\t\tvar roomsLength\n\n\t\t\t\t\t\t\tvar i, j\n\n\t\t\t\t\t\t\t// Filter out the current user\n\t\t\t\t\t\t\tusersLength = users.length\n\t\t\t\t\t\t\tfor (i = 0; i < usersLength; i++) {\n\t\t\t\t\t\t\t\tif (users[i].value.shareWith === OC.currentUser) {\n\t\t\t\t\t\t\t\t\tusers.splice(i, 1)\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Filter out the owner of the share\n\t\t\t\t\t\t\tif (model.hasReshare()) {\n\t\t\t\t\t\t\t\tusersLength = users.length\n\t\t\t\t\t\t\t\tfor (i = 0; i < usersLength; i++) {\n\t\t\t\t\t\t\t\t\tif (users[i].value.shareWith === model.getReshareOwner()) {\n\t\t\t\t\t\t\t\t\t\tusers.splice(i, 1)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar shares = model.get('shares')\n\t\t\t\t\t\t\tvar sharesLength = shares.length\n\n\t\t\t\t\t\t\t// Now filter out all sharees that are already shared with\n\t\t\t\t\t\t\tfor (i = 0; i < sharesLength; i++) {\n\t\t\t\t\t\t\t\tvar share = shares[i]\n\n\t\t\t\t\t\t\t\tif (share.share_type === OC.Share.SHARE_TYPE_USER) {\n\t\t\t\t\t\t\t\t\tusersLength = users.length\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < usersLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (users[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tusers.splice(j, 1)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\t\t\t\t\t\tgroupsLength = groups.length\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < groupsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (groups[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tgroups.splice(j, 1)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\t\t\t\t\t\tremotesLength = remotes.length\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < remotesLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (remotes[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tremotes.splice(j, 1)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE_GROUP) {\n\t\t\t\t\t\t\t\t\tremoteGroupsLength = remote_groups.length\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < remoteGroupsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (remote_groups[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tremote_groups.splice(j, 1)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\t\t\t\t\t\temailsLength = emails.length\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < emailsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (emails[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\temails.splice(j, 1)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\t\t\t\t\t\tcirclesLength = circles.length\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < circlesLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (circles[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tcircles.splice(j, 1)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\t\t\t\t\t\troomsLength = rooms.length\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < roomsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (rooms[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\trooms.splice(j, 1)\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfilter(\n\t\t\t\t\t\t\tresult.ocs.data.exact.users,\n\t\t\t\t\t\t\tresult.ocs.data.exact.groups,\n\t\t\t\t\t\t\tresult.ocs.data.exact.remotes,\n\t\t\t\t\t\t\tresult.ocs.data.exact.remote_groups,\n\t\t\t\t\t\t\tresult.ocs.data.exact.emails,\n\t\t\t\t\t\t\tresult.ocs.data.exact.circles,\n\t\t\t\t\t\t\tresult.ocs.data.exact.rooms\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\tvar exactUsers = result.ocs.data.exact.users\n\t\t\t\t\t\tvar exactGroups = result.ocs.data.exact.groups\n\t\t\t\t\t\tvar exactRemotes = result.ocs.data.exact.remotes || []\n\t\t\t\t\t\tvar exactRemoteGroups = result.ocs.data.exact.remote_groups || []\n\t\t\t\t\t\tvar exactEmails = []\n\t\t\t\t\t\tif (typeof (result.ocs.data.emails) !== 'undefined') {\n\t\t\t\t\t\t\texactEmails = result.ocs.data.exact.emails\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar exactCircles = []\n\t\t\t\t\t\tif (typeof (result.ocs.data.circles) !== 'undefined') {\n\t\t\t\t\t\t\texactCircles = result.ocs.data.exact.circles\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar exactRooms = []\n\t\t\t\t\t\tif (typeof (result.ocs.data.rooms) !== 'undefined') {\n\t\t\t\t\t\t\texactRooms = result.ocs.data.exact.rooms\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar exactMatches = exactUsers.concat(exactGroups).concat(exactRemotes).concat(exactRemoteGroups).concat(exactEmails).concat(exactCircles).concat(exactRooms)\n\n\t\t\t\t\t\tfilter(\n\t\t\t\t\t\t\tresult.ocs.data.users,\n\t\t\t\t\t\t\tresult.ocs.data.groups,\n\t\t\t\t\t\t\tresult.ocs.data.remotes,\n\t\t\t\t\t\t\tresult.ocs.data.remote_groups,\n\t\t\t\t\t\t\tresult.ocs.data.emails,\n\t\t\t\t\t\t\tresult.ocs.data.circles,\n\t\t\t\t\t\t\tresult.ocs.data.rooms\n\t\t\t\t\t\t)\n\n\t\t\t\t\t\tvar users = result.ocs.data.users\n\t\t\t\t\t\tvar groups = result.ocs.data.groups\n\t\t\t\t\t\tvar remotes = result.ocs.data.remotes || []\n\t\t\t\t\t\tvar remoteGroups = result.ocs.data.remote_groups || []\n\t\t\t\t\t\tvar lookup = result.ocs.data.lookup || []\n\t\t\t\t\t\tvar emails = []\n\t\t\t\t\t\tif (typeof (result.ocs.data.emails) !== 'undefined') {\n\t\t\t\t\t\t\temails = result.ocs.data.emails\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar circles = []\n\t\t\t\t\t\tif (typeof (result.ocs.data.circles) !== 'undefined') {\n\t\t\t\t\t\t\tcircles = result.ocs.data.circles\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar rooms = []\n\t\t\t\t\t\tif (typeof (result.ocs.data.rooms) !== 'undefined') {\n\t\t\t\t\t\t\trooms = result.ocs.data.rooms\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar suggestions = exactMatches.concat(users).concat(groups).concat(remotes).concat(remoteGroups).concat(emails).concat(circles).concat(rooms).concat(lookup)\n\n\t\t\t\t\t\tfunction dynamicSort(property) {\n\t\t\t\t\t\t\treturn function(a, b) {\n\t\t\t\t\t\t\t\tvar aProperty = ''\n\t\t\t\t\t\t\t\tvar bProperty = ''\n\t\t\t\t\t\t\t\tif (typeof a[property] !== 'undefined') {\n\t\t\t\t\t\t\t\t\taProperty = a[property]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (typeof b[property] !== 'undefined') {\n\t\t\t\t\t\t\t\t\tbProperty = b[property]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn (aProperty < bProperty) ? -1 : (aProperty > bProperty) ? 1 : 0\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Sort share entries by uuid to properly group them\n\t\t\t\t\t\t */\n\t\t\t\t\t\tvar grouped = suggestions.sort(dynamicSort('uuid'))\n\n\t\t\t\t\t\tvar previousUuid = null\n\t\t\t\t\t\tvar groupedLength = grouped.length\n\t\t\t\t\t\tvar result = []\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * build the result array that only contains all contact entries from\n\t\t\t\t\t\t * merged contacts, if the search term matches its contact name\n\t\t\t\t\t\t */\n\t\t\t\t\t\tfor (var i = 0; i < groupedLength; i++) {\n\t\t\t\t\t\t\tif (typeof grouped[i].uuid !== 'undefined' && grouped[i].uuid === previousUuid) {\n\t\t\t\t\t\t\t\tgrouped[i].merged = true\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof grouped[i].merged === 'undefined') {\n\t\t\t\t\t\t\t\tresult.push(grouped[i])\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpreviousUuid = grouped[i].uuid\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdeferred.resolve(result, exactMatches, false)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdeferred.reject(result.ocs.meta.message)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t).fail(function() {\n\t\t\t\tdeferred.reject()\n\t\t\t})\n\n\t\t\tthis._lastRecommendations = {\n\t\t\t\tmodel: model,\n\t\t\t\tpromise: deferred.promise()\n\t\t\t}\n\n\t\t\treturn this._lastRecommendations.promise\n\t\t},\n\n\t\trecommendationHandler: function(response) {\n\t\t\tvar view = this\n\t\t\tvar $shareWithField = $('.shareWithField')\n\t\t\tthis._getRecommendations(\n\t\t\t\tview.model\n\t\t\t).done(function(suggestions) {\n\t\t\t\tconsole.info('recommendations', suggestions)\n\t\t\t\tif (suggestions.length > 0) {\n\t\t\t\t\t$shareWithField\n\t\t\t\t\t\t.autocomplete('option', 'autoFocus', true)\n\n\t\t\t\t\tresponse(suggestions)\n\t\t\t\t} else {\n\t\t\t\t\tconsole.info('no sharing recommendations found')\n\t\t\t\t\tresponse()\n\t\t\t\t}\n\t\t\t}).fail(function(message) {\n\t\t\t\tconsole.error('could not load recommendations', message)\n\t\t\t})\n\t\t},\n\n\t\tautocompleteHandler: function(search, response) {\n\t\t\t// If nothing is entered we show recommendations instead of search\n\t\t\t// results\n\t\t\tif (search.term.length === 0) {\n\t\t\t\tconsole.info(search.term, 'empty search term -> using recommendations')\n\t\t\t\tthis.recommendationHandler(response)\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tvar $shareWithField = $('.shareWithField')\n\t\t\tvar view = this\n\t\t\tvar $loading = this.$el.find('.shareWithLoading')\n\t\t\tvar $confirm = this.$el.find('.shareWithConfirm')\n\n\t\t\tvar count = OC.config['sharing.minSearchStringLength']\n\t\t\tif (search.term.trim().length < count) {\n\t\t\t\tvar title = n('core',\n\t\t\t\t\t'At least {count} character is needed for autocompletion',\n\t\t\t\t\t'At least {count} characters are needed for autocompletion',\n\t\t\t\t\tcount,\n\t\t\t\t\t{ count: count }\n\t\t\t\t)\n\t\t\t\t$shareWithField.addClass('error')\n\t\t\t\t\t.attr('data-original-title', title)\n\t\t\t\t\t.tooltip('hide')\n\t\t\t\t\t.tooltip({\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\ttrigger: 'manual'\n\t\t\t\t\t})\n\t\t\t\t\t.tooltip('fixTitle')\n\t\t\t\t\t.tooltip('show')\n\t\t\t\tresponse()\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\t$loading.removeClass('hidden')\n\t\t\t$loading.addClass('inlineblock')\n\t\t\t$confirm.addClass('hidden')\n\t\t\tthis._pendingOperationsCount++\n\n\t\t\t$shareWithField.removeClass('error')\n\t\t\t\t.tooltip('hide')\n\n\t\t\tvar perPage = parseInt(OC.config['sharing.maxAutocompleteResults'], 10) || 200\n\t\t\tthis._getSuggestions(\n\t\t\t\tsearch.term.trim(),\n\t\t\t\tperPage,\n\t\t\t\tview.model,\n\t\t\t\tview._lookup\n\t\t\t).done(function(suggestions, exactMatches, moreResultsAvailable) {\n\t\t\t\tview._pendingOperationsCount--\n\t\t\t\tif (view._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden')\n\t\t\t\t\t$loading.removeClass('inlineblock')\n\t\t\t\t\t$confirm.removeClass('hidden')\n\t\t\t\t}\n\n\t\t\t\tif (suggestions.length > 0) {\n\t\t\t\t\t$shareWithField\n\t\t\t\t\t\t.autocomplete('option', 'autoFocus', true)\n\n\t\t\t\t\tresponse(suggestions)\n\n\t\t\t\t\t// show a notice that the list is truncated\n\t\t\t\t\t// this is the case if one of the search results is at least as long as the max result config option\n\t\t\t\t\tif (moreResultsAvailable) {\n\t\t\t\t\t\tvar message = t('core', 'This list is maybe truncated - please refine your search term to see more results.')\n\t\t\t\t\t\t$('.ui-autocomplete').append('<li class=\"autocomplete-note\">' + message + '</li>')\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tvar title = t('core', 'No users or groups found for {search}', { search: $shareWithField.val() })\n\t\t\t\t\tif (!view.configModel.get('allowGroupSharing')) {\n\t\t\t\t\t\ttitle = t('core', 'No users found for {search}', { search: $('.shareWithField').val() })\n\t\t\t\t\t}\n\t\t\t\t\t$shareWithField.addClass('error')\n\t\t\t\t\t\t.attr('data-original-title', title)\n\t\t\t\t\t\t.tooltip('hide')\n\t\t\t\t\t\t.tooltip({\n\t\t\t\t\t\t\tplacement: 'top',\n\t\t\t\t\t\t\ttrigger: 'manual'\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.tooltip('fixTitle')\n\t\t\t\t\t\t.tooltip('show')\n\t\t\t\t\tresponse()\n\t\t\t\t}\n\t\t\t}).fail(function(message) {\n\t\t\t\tview._pendingOperationsCount--\n\t\t\t\tif (view._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden')\n\t\t\t\t\t$loading.removeClass('inlineblock')\n\t\t\t\t\t$confirm.removeClass('hidden')\n\t\t\t\t}\n\n\t\t\t\tif (message) {\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'An error occurred (\"{message}\"). Please try again', { message: message }))\n\t\t\t\t} else {\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'An error occurred. Please try again'))\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\n\t\tautocompleteRenderItem: function(ul, item) {\n\t\t\tvar icon = 'icon-user'\n\t\t\tvar text = escapeHTML(item.label)\n\t\t\tvar description = ''\n\t\t\tvar type = ''\n\t\t\tvar getTranslatedType = function(type) {\n\t\t\t\tswitch (type) {\n\t\t\t\tcase 'HOME':\n\t\t\t\t\treturn t('core', 'Home')\n\t\t\t\tcase 'WORK':\n\t\t\t\t\treturn t('core', 'Work')\n\t\t\t\tcase 'OTHER':\n\t\t\t\t\treturn t('core', 'Other')\n\t\t\t\tdefault:\n\t\t\t\t\treturn '' + type\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (typeof item.type !== 'undefined' && item.type !== null) {\n\t\t\t\ttype = getTranslatedType(item.type) + ' '\n\t\t\t}\n\n\t\t\tif (typeof item.name !== 'undefined') {\n\t\t\t\ttext = escapeHTML(item.name)\n\t\t\t}\n\t\t\tif (item.value.shareType === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\ticon = 'icon-contacts-dark'\n\t\t\t} else if (item.value.shareType === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\ticon = 'icon-shared'\n\t\t\t\tdescription += item.value.shareWith\n\t\t\t} else if (item.value.shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP) {\n\t\t\t\ttext = t('core', '{sharee} (remote group)', { sharee: text }, undefined, { escape: false })\n\t\t\t\ticon = 'icon-shared'\n\t\t\t\tdescription += item.value.shareWith\n\t\t\t} else if (item.value.shareType === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\ticon = 'icon-mail'\n\t\t\t\tdescription += item.value.shareWith\n\t\t\t} else if (item.value.shareType === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\ttext = t('core', '{sharee} ({type}, {owner})', { sharee: text, type: item.value.circleInfo, owner: item.value.circleOwner }, undefined, { escape: false })\n\t\t\t\ticon = 'icon-circle'\n\t\t\t} else if (item.value.shareType === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\ticon = 'icon-talk'\n\t\t\t}\n\n\t\t\tvar insert = $(\"<div class='share-autocomplete-item'/>\")\n\t\t\tif (item.merged) {\n\t\t\t\tinsert.addClass('merged')\n\t\t\t\ttext = item.value.shareWith\n\t\t\t\tdescription = type\n\t\t\t} else if (item.lookup) {\n\t\t\t\ttext = item.label\n\t\t\t\ticon = false\n\t\t\t\tinsert.append('<span class=\"icon icon-search search-globally\"></span>')\n\t\t\t} else {\n\t\t\t\tvar avatar = $(\"<div class='avatardiv'></div>\").appendTo(insert)\n\t\t\t\tif (item.value.shareType === OC.Share.SHARE_TYPE_USER || item.value.shareType === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\t\tavatar.avatar(item.value.shareWith, 32, undefined, undefined, undefined, item.label)\n\t\t\t\t} else {\n\t\t\t\t\tif (typeof item.uuid === 'undefined') {\n\t\t\t\t\t\titem.uuid = text\n\t\t\t\t\t}\n\t\t\t\t\tavatar.imageplaceholder(item.uuid, text, 32)\n\t\t\t\t}\n\t\t\t\tdescription = type + description\n\t\t\t}\n\t\t\tif (description !== '') {\n\t\t\t\tinsert.addClass('with-description')\n\t\t\t}\n\n\t\t\t$(\"<div class='autocomplete-item-text'></div>\")\n\t\t\t\t.html(\n\t\t\t\t\ttext.replace(\n\t\t\t\t\t\tnew RegExp(this.term, 'gi'),\n\t\t\t\t\t\t\"<span class='ui-state-highlight'>$&</span>\")\n\t\t\t\t\t+ '<span class=\"autocomplete-item-details\">' + description + '</span>'\n\t\t\t\t)\n\t\t\t\t.appendTo(insert)\n\t\t\tinsert.attr('title', item.value.shareWith)\n\t\t\tif (icon) {\n\t\t\t\tinsert.append('<span class=\"icon ' + icon + '\" title=\"' + text + '\"></span>')\n\t\t\t}\n\t\t\tinsert = $('<a>')\n\t\t\t\t.append(insert)\n\t\t\treturn $('<li>')\n\t\t\t\t.addClass((item.value.shareType === OC.Share.SHARE_TYPE_GROUP) ? 'group' : 'user')\n\t\t\t\t.append(insert)\n\t\t\t\t.appendTo(ul)\n\t\t},\n\n\t\t_onSelectRecipient: function(e, s) {\n\t\t\tvar self = this\n\n\t\t\tif (e.keyCode == 9) {\n\t\t\t\te.preventDefault()\n\t\t\t\tif (typeof s.item.name !== 'undefined') {\n\t\t\t\t\te.target.value = s.item.name\n\t\t\t\t} else {\n\t\t\t\t\te.target.value = s.item.label\n\t\t\t\t}\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t$(e.target).attr('disabled', false)\n\t\t\t\t\t\t.autocomplete('search', $(e.target).val())\n\t\t\t\t}, 0)\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\tif (s.item.lookup) {\n\t\t\t\t// Retrigger search but with global lookup this time\n\t\t\t\tthis._lookup = true\n\t\t\t\tvar $shareWithField = this.$el.find('.shareWithField')\n\t\t\t\tvar val = $shareWithField.val()\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tconsole.debug('searching again, but globally. search term: ' + val)\n\t\t\t\t\t$shareWithField.autocomplete('search', val)\n\t\t\t\t}, 0)\n\t\t\t\treturn false\n\t\t\t}\n\n\t\t\te.preventDefault()\n\t\t\t// Ensure that the keydown handler for the input field is not\n\t\t\t// called; otherwise it would try to add the recipient again, which\n\t\t\t// would fail.\n\t\t\te.stopImmediatePropagation()\n\t\t\t$(e.target).attr('disabled', true)\n\t\t\t\t.val(s.item.label)\n\n\t\t\tvar $loading = this.$el.find('.shareWithLoading')\n\t\t\tvar $confirm = this.$el.find('.shareWithConfirm')\n\n\t\t\t$loading.removeClass('hidden')\n\t\t\t$loading.addClass('inlineblock')\n\t\t\t$confirm.addClass('hidden')\n\t\t\tthis._pendingOperationsCount++\n\n\t\t\tthis.model.addShare(s.item.value, { success: function() {\n\t\t\t\t// Adding a share changes the suggestions.\n\t\t\t\tself._lastSuggestions = undefined\n\n\t\t\t\t$(e.target).val('')\n\t\t\t\t\t.attr('disabled', false)\n\n\t\t\t\tself._pendingOperationsCount--\n\t\t\t\tif (self._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden')\n\t\t\t\t\t$loading.removeClass('inlineblock')\n\t\t\t\t\t$confirm.removeClass('hidden')\n\t\t\t\t}\n\t\t\t},\n\t\t\terror: function(obj, msg) {\n\t\t\t\tOC.Notification.showTemporary(msg)\n\t\t\t\t$(e.target).attr('disabled', false)\n\t\t\t\t\t.autocomplete('search', $(e.target).val())\n\n\t\t\t\tself._pendingOperationsCount--\n\t\t\t\tif (self._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden')\n\t\t\t\t\t$loading.removeClass('inlineblock')\n\t\t\t\t\t$confirm.removeClass('hidden')\n\t\t\t\t}\n\t\t\t} })\n\t\t},\n\n\t\t_confirmShare: function() {\n\t\t\tvar self = this\n\t\t\tvar $shareWithField = $('.shareWithField')\n\t\t\tvar $loading = this.$el.find('.shareWithLoading')\n\t\t\tvar $confirm = this.$el.find('.shareWithConfirm')\n\n\t\t\t$loading.removeClass('hidden')\n\t\t\t$loading.addClass('inlineblock')\n\t\t\t$confirm.addClass('hidden')\n\t\t\tthis._pendingOperationsCount++\n\n\t\t\t$shareWithField.prop('disabled', true)\n\n\t\t\t// Disabling the autocompletion does not clear its search timeout;\n\t\t\t// removing the focus from the input field does, but only if the\n\t\t\t// autocompletion is not disabled when the field loses the focus.\n\t\t\t// Thus, the field has to be disabled before disabling the\n\t\t\t// autocompletion to prevent an old pending search result from\n\t\t\t// appearing once the field is enabled again.\n\t\t\t$shareWithField.autocomplete('close')\n\t\t\t$shareWithField.autocomplete('disable')\n\n\t\t\tvar restoreUI = function() {\n\t\t\t\tself._pendingOperationsCount--\n\t\t\t\tif (self._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden')\n\t\t\t\t\t$loading.removeClass('inlineblock')\n\t\t\t\t\t$confirm.removeClass('hidden')\n\t\t\t\t}\n\n\t\t\t\t$shareWithField.prop('disabled', false)\n\t\t\t\t$shareWithField.focus()\n\t\t\t}\n\n\t\t\tvar perPage = parseInt(OC.config['sharing.maxAutocompleteResults'], 10) || 200\n\t\t\tthis._getSuggestions(\n\t\t\t\t$shareWithField.val(),\n\t\t\t\tperPage,\n\t\t\t\tthis.model,\n\t\t\t\tthis._lookup\n\t\t\t).done(function(suggestions, exactMatches) {\n\t\t\t\tif (suggestions.length === 0) {\n\t\t\t\t\trestoreUI()\n\n\t\t\t\t\t$shareWithField.autocomplete('enable')\n\n\t\t\t\t\t// There is no need to show an error message here; it will\n\t\t\t\t\t// be automatically shown when the autocomplete is activated\n\t\t\t\t\t// again (due to the focus on the field) and it finds no\n\t\t\t\t\t// matches.\n\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tif (exactMatches.length !== 1) {\n\t\t\t\t\trestoreUI()\n\n\t\t\t\t\t$shareWithField.autocomplete('enable')\n\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tvar actionSuccess = function() {\n\t\t\t\t\t// Adding a share changes the suggestions.\n\t\t\t\t\tself._lastSuggestions = undefined\n\n\t\t\t\t\t$shareWithField.val('')\n\n\t\t\t\t\trestoreUI()\n\n\t\t\t\t\t$shareWithField.autocomplete('enable')\n\t\t\t\t}\n\n\t\t\t\tvar actionError = function(obj, msg) {\n\t\t\t\t\trestoreUI()\n\n\t\t\t\t\t$shareWithField.autocomplete('enable')\n\n\t\t\t\t\tOC.Notification.showTemporary(msg)\n\t\t\t\t}\n\n\t\t\t\tself.model.addShare(exactMatches[0].value, {\n\t\t\t\t\tsuccess: actionSuccess,\n\t\t\t\t\terror: actionError\n\t\t\t\t})\n\t\t\t}).fail(function(message) {\n\t\t\t\trestoreUI()\n\n\t\t\t\t$shareWithField.autocomplete('enable')\n\n\t\t\t\t// There is no need to show an error message here; it will be\n\t\t\t\t// automatically shown when the autocomplete is activated again\n\t\t\t\t// (due to the focus on the field) and getting the suggestions\n\t\t\t\t// fail.\n\t\t\t})\n\t\t},\n\n\t\t_toggleLoading: function(state) {\n\t\t\tthis._loading = state\n\t\t\tthis.$el.find('.subView').toggleClass('hidden', state)\n\t\t\tthis.$el.find('.loading').toggleClass('hidden', !state)\n\t\t},\n\n\t\t_onRequest: function() {\n\t\t\t// only show the loading spinner for the first request (for now)\n\t\t\tif (!this._loadingOnce) {\n\t\t\t\tthis._toggleLoading(true)\n\t\t\t}\n\t\t},\n\n\t\t_onEndRequest: function() {\n\t\t\tvar self = this\n\t\t\tthis._toggleLoading(false)\n\t\t\tif (!this._loadingOnce) {\n\t\t\t\tthis._loadingOnce = true\n\t\t\t}\n\t\t},\n\n\t\trender: function() {\n\t\t\tvar self = this\n\t\t\tvar baseTemplate = OC.Share.Templates['sharedialogview']\n\n\t\t\tthis.$el.html(baseTemplate({\n\t\t\t\tcid: this.cid,\n\t\t\t\tshareLabel: t('core', 'Share'),\n\t\t\t\tsharePlaceholder: this._renderSharePlaceholderPart(),\n\t\t\t\tisSharingAllowed: this.model.sharePermissionPossible()\n\t\t\t}))\n\n\t\t\tvar $shareField = this.$el.find('.shareWithField')\n\t\t\tif ($shareField.length) {\n\t\t\t\tvar shareFieldKeydownHandler = function(event) {\n\t\t\t\t\tif (event.keyCode !== 13) {\n\t\t\t\t\t\treturn true\n\t\t\t\t\t}\n\n\t\t\t\t\tself._confirmShare()\n\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\t$shareField.autocomplete({\n\t\t\t\t\tminLength: 0,\n\t\t\t\t\tdelay: 750,\n\t\t\t\t\tfocus: function(event) {\n\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t},\n\t\t\t\t\tsource: this.autocompleteHandler,\n\t\t\t\t\tselect: this._onSelectRecipient,\n\t\t\t\t\topen: function() {\n\t\t\t\t\t\tvar autocomplete = $(this).autocomplete('widget')\n\t\t\t\t\t\tvar numberOfItems = autocomplete.find('li').size()\n\t\t\t\t\t\tautocomplete.removeClass('item-count-1')\n\t\t\t\t\t\tautocomplete.removeClass('item-count-2')\n\t\t\t\t\t\tif (numberOfItems <= 2) {\n\t\t\t\t\t\t\tautocomplete.addClass('item-count-' + numberOfItems)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}).data('ui-autocomplete')._renderItem = this.autocompleteRenderItem\n\n\t\t\t\t$shareField.on('keydown', null, shareFieldKeydownHandler)\n\t\t\t}\n\n\t\t\tthis.resharerInfoView.$el = this.$el.find('.resharerInfoView')\n\t\t\tthis.resharerInfoView.render()\n\n\t\t\tthis.linkShareView.$el = this.$el.find('.linkShareView')\n\t\t\tthis.linkShareView.render()\n\n\t\t\tthis.shareeListView.$el = this.$el.find('.shareeListView')\n\t\t\tthis.shareeListView.render()\n\n\t\t\tthis.$el.find('.hasTooltip').tooltip()\n\n\t\t\treturn this\n\t\t},\n\n\t\t/**\n\t\t * sets whether share by link should be displayed or not. Default is\n\t\t * true.\n\t\t *\n\t\t * @param {bool} showLink\n\t\t */\n\t\tsetShowLink: function(showLink) {\n\t\t\tthis._showLink = (typeof showLink === 'boolean') ? showLink : true\n\t\t\tthis.linkShareView.showLink = this._showLink\n\t\t},\n\n\t\t_renderSharePlaceholderPart: function() {\n\t\t\tvar allowRemoteSharing = this.configModel.get('isRemoteShareAllowed')\n\t\t\tvar allowMailSharing = this.configModel.get('isMailShareAllowed')\n\n\t\t\tif (!allowRemoteSharing && allowMailSharing) {\n\t\t\t\treturn t('core', 'Name or email address...')\n\t\t\t}\n\t\t\tif (allowRemoteSharing && !allowMailSharing) {\n\t\t\t\treturn t('core', 'Name or federated cloud ID...')\n\t\t\t}\n\t\t\tif (allowRemoteSharing && allowMailSharing) {\n\t\t\t\treturn t('core', 'Name, federated cloud ID or email address...')\n\t\t\t}\n\n\t\t\treturn \tt('core', 'Name...')\n\t\t}\n\n\t})\n\n\tOC.Share.ShareDialogView = ShareDialogView\n\n})()\n","/* eslint-disable */\n/**\n * @namespace\n */\nOC.Share = _.extend(OC.Share || {}, {\n\tSHARE_TYPE_USER: 0,\n\tSHARE_TYPE_GROUP: 1,\n\tSHARE_TYPE_LINK: 3,\n\tSHARE_TYPE_EMAIL: 4,\n\tSHARE_TYPE_REMOTE: 6,\n\tSHARE_TYPE_CIRCLE: 7,\n\tSHARE_TYPE_GUEST: 8,\n\tSHARE_TYPE_REMOTE_GROUP: 9,\n\tSHARE_TYPE_ROOM: 10,\n\n\t/**\n\t * Regular expression for splitting parts of remote share owners:\n\t * \"user@example.com/path/to/owncloud\"\n\t * \"user@anotherexample.com@example.com/path/to/owncloud\n\t */\n\t_REMOTE_OWNER_REGEXP: new RegExp('^([^@]*)@(([^@]*)@)?([^/]*)([/](.*)?)?$'),\n\n\t/**\n\t * @deprecated use OC.Share.currentShares instead\n\t */\n\titemShares: [],\n\t/**\n\t * Full list of all share statuses\n\t */\n\tstatuses: {},\n\t/**\n\t * Shares for the currently selected file.\n\t * (for which the dropdown is open)\n\t *\n\t * Key is item type and value is an array or\n\t * shares of the given item type.\n\t */\n\tcurrentShares: {},\n\t/**\n\t * Whether the share dropdown is opened.\n\t */\n\tdroppedDown: false,\n\t/**\n\t * Loads ALL share statuses from server, stores them in\n\t * OC.Share.statuses then calls OC.Share.updateIcons() to update the\n\t * files \"Share\" icon to \"Shared\" according to their share status and\n\t * share type.\n\t *\n\t * If a callback is specified, the update step is skipped.\n\t *\n\t * @param itemType item type\n\t * @param fileList file list instance, defaults to OCA.Files.App.fileList\n\t * @param callback function to call after the shares were loaded\n\t */\n\tloadIcons: function(itemType, fileList, callback) {\n\t\tvar path = fileList.dirInfo.path\n\t\tif (path === '/') {\n\t\t\tpath = ''\n\t\t}\n\t\tpath += '/' + fileList.dirInfo.name\n\n\t\t// Load all share icons\n\t\t$.get(\n\t\t\tOC.linkToOCS('apps/files_sharing/api/v1', 2) + 'shares',\n\t\t\t{\n\t\t\t\tsubfiles: 'true',\n\t\t\t\tpath: path,\n\t\t\t\tformat: 'json'\n\t\t\t}, function(result) {\n\t\t\t\tif (result && result.ocs.meta.statuscode === 200) {\n\t\t\t\t\tOC.Share.statuses = {}\n\t\t\t\t\t$.each(result.ocs.data, function(it, share) {\n\t\t\t\t\t\tif (!(share.item_source in OC.Share.statuses)) {\n\t\t\t\t\t\t\tOC.Share.statuses[share.item_source] = { link: false }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (share.share_type === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\t\tOC.Share.statuses[share.item_source] = { link: true }\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tif (_.isFunction(callback)) {\n\t\t\t\t\t\tcallback(OC.Share.statuses)\n\t\t\t\t\t} else {\n\t\t\t\t\t\tOC.Share.updateIcons(itemType, fileList)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t)\n\t},\n\t/**\n\t * Updates the files' \"Share\" icons according to the known\n\t * sharing states stored in OC.Share.statuses.\n\t * (not reloaded from server)\n\t *\n\t * @param itemType item type\n\t * @param fileList file list instance\n\t * defaults to OCA.Files.App.fileList\n\t */\n\tupdateIcons: function(itemType, fileList) {\n\t\tvar item\n\t\tvar $fileList\n\t\tvar currentDir\n\t\tif (!fileList && OCA.Files) {\n\t\t\tfileList = OCA.Files.App.fileList\n\t\t}\n\t\t// fileList is usually only defined in the files app\n\t\tif (fileList) {\n\t\t\t$fileList = fileList.$fileList\n\t\t\tcurrentDir = fileList.getCurrentDirectory()\n\t\t}\n\t\t// TODO: iterating over the files might be more efficient\n\t\tfor (item in OC.Share.statuses) {\n\t\t\tvar iconClass = 'icon-shared'\n\t\t\tvar data = OC.Share.statuses[item]\n\t\t\tvar hasLink = data.link\n\t\t\t// Links override shared in terms of icon display\n\t\t\tif (hasLink) {\n\t\t\t\ticonClass = 'icon-public'\n\t\t\t}\n\t\t\tif (itemType !== 'file' && itemType !== 'folder') {\n\t\t\t\t$('a.share[data-item=\"' + item + '\"] .icon').removeClass('icon-shared icon-public').addClass(iconClass)\n\t\t\t} else {\n\t\t\t\t// TODO: ultimately this part should be moved to files_sharing app\n\t\t\t\tvar file = $fileList.find('tr[data-id=\"' + item + '\"]')\n\t\t\t\tvar shareFolder = OC.imagePath('core', 'filetypes/folder-shared')\n\t\t\t\tvar img\n\t\t\t\tif (file.length > 0) {\n\t\t\t\t\tthis.markFileAsShared(file, true, hasLink)\n\t\t\t\t} else {\n\t\t\t\t\tvar dir = currentDir\n\t\t\t\t\tif (dir.length > 1) {\n\t\t\t\t\t\tvar last = ''\n\t\t\t\t\t\tvar path = dir\n\t\t\t\t\t\t// Search for possible parent folders that are shared\n\t\t\t\t\t\twhile (path != last) {\n\t\t\t\t\t\t\tif (path === data.path && !data.link) {\n\t\t\t\t\t\t\t\tvar actions = $fileList.find('.fileactions .action[data-action=\"Share\"]')\n\t\t\t\t\t\t\t\tvar files = $fileList.find('.filename')\n\t\t\t\t\t\t\t\tvar i\n\t\t\t\t\t\t\t\tfor (i = 0; i < actions.length; i++) {\n\t\t\t\t\t\t\t\t\t// TODO: use this.markFileAsShared()\n\t\t\t\t\t\t\t\t\timg = $(actions[i]).find('img')\n\t\t\t\t\t\t\t\t\tif (img.attr('src') !== OC.imagePath('core', 'actions/public')) {\n\t\t\t\t\t\t\t\t\t\timg.attr('src', image)\n\t\t\t\t\t\t\t\t\t\t$(actions[i]).addClass('permanent')\n\t\t\t\t\t\t\t\t\t\t$(actions[i]).html('<span> ' + t('core', 'Shared') + '</span>').prepend(img)\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor (i = 0; i < files.length; i++) {\n\t\t\t\t\t\t\t\t\tif ($(files[i]).closest('tr').data('type') === 'dir') {\n\t\t\t\t\t\t\t\t\t\t$(files[i]).find('.thumbnail').css('background-image', 'url(' + shareFolder + ')')\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlast = path\n\t\t\t\t\t\t\tpath = OC.Share.dirname(path)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tupdateIcon: function(itemType, itemSource) {\n\t\tvar shares = false\n\t\tvar link = false\n\t\tvar iconClass = ''\n\t\t$.each(OC.Share.itemShares, function(index) {\n\t\t\tif (OC.Share.itemShares[index]) {\n\t\t\t\tif (index == OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\tif (OC.Share.itemShares[index] == true) {\n\t\t\t\t\t\tshares = true\n\t\t\t\t\t\ticonClass = 'icon-public'\n\t\t\t\t\t\tlink = true\n\n\t\t\t\t\t}\n\t\t\t\t} else if (OC.Share.itemShares[index].length > 0) {\n\t\t\t\t\tshares = true\n\t\t\t\t\ticonClass = 'icon-shared'\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t\tif (itemType != 'file' && itemType != 'folder') {\n\t\t\t$('a.share[data-item=\"' + itemSource + '\"] .icon').removeClass('icon-shared icon-public').addClass(iconClass)\n\t\t} else {\n\t\t\tvar $tr = $('tr').filterAttr('data-id', String(itemSource))\n\t\t\tif ($tr.length > 0) {\n\t\t\t\t// it might happen that multiple lists exist in the DOM\n\t\t\t\t// with the same id\n\t\t\t\t$tr.each(function() {\n\t\t\t\t\tOC.Share.markFileAsShared($(this), shares, link)\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t\tif (shares) {\n\t\t\tOC.Share.statuses[itemSource] = OC.Share.statuses[itemSource] || {}\n\t\t\tOC.Share.statuses[itemSource].link = link\n\t\t} else {\n\t\t\tdelete OC.Share.statuses[itemSource]\n\t\t}\n\t},\n\t/**\n\t * Format a remote address\n\t *\n\t * @param {String} shareWith userid, full remote share, or whatever\n\t * @param {String} shareWithDisplayName\n\t * @param {String} message\n\t * @returns {String} HTML code to display\n\t */\n\t_formatRemoteShare: function(shareWith, shareWithDisplayName, message) {\n\t\tvar parts = this._REMOTE_OWNER_REGEXP.exec(shareWith)\n\t\tif (!parts) {\n\t\t\t// display avatar of the user\n\t\t\tvar avatar = '<span class=\"avatar\" data-username=\"' + escapeHTML(shareWith) + '\" title=\"' + message + ' ' + escapeHTML(shareWithDisplayName) + '\"></span>'\n\t\t\tvar hidden = '<span class=\"hidden-visually\">' + message + ' ' + escapeHTML(shareWithDisplayName) + '</span> '\n\t\t\treturn avatar + hidden\n\t\t}\n\n\t\tvar userName = parts[1]\n\t\tvar userDomain = parts[3]\n\t\tvar server = parts[4]\n\t\tvar tooltip = message + ' ' + userName\n\t\tif (userDomain) {\n\t\t\ttooltip += '@' + userDomain\n\t\t}\n\t\tif (server) {\n\t\t\tif (!userDomain) {\n\t\t\t\tuserDomain = '…'\n\t\t\t}\n\t\t\ttooltip += '@' + server\n\t\t}\n\n\t\tvar html = '<span class=\"remoteAddress\" title=\"' + escapeHTML(tooltip) + '\">'\n\t\thtml += '<span class=\"username\">' + escapeHTML(userName) + '</span>'\n\t\tif (userDomain) {\n\t\t\thtml += '<span class=\"userDomain\">@' + escapeHTML(userDomain) + '</span>'\n\t\t}\n\t\thtml += '</span> '\n\t\treturn html\n\t},\n\t/**\n\t * Loop over all recipients in the list and format them using\n\t * all kind of fancy magic.\n\t *\n\t * @param {Object} recipients array of all the recipients\n\t * @returns {String[]} modified list of recipients\n\t */\n\t_formatShareList: function(recipients) {\n\t\tvar _parent = this\n\t\trecipients = _.toArray(recipients)\n\t\trecipients.sort(function(a, b) {\n\t\t\treturn a.shareWithDisplayName.localeCompare(b.shareWithDisplayName)\n\t\t})\n\t\treturn $.map(recipients, function(recipient) {\n\t\t\treturn _parent._formatRemoteShare(recipient.shareWith, recipient.shareWithDisplayName, t('core', 'Shared with'))\n\t\t})\n\t},\n\t/**\n\t * Marks/unmarks a given file as shared by changing its action icon\n\t * and folder icon.\n\t *\n\t * @param $tr file element to mark as shared\n\t * @param hasShares whether shares are available\n\t * @param hasLink whether link share is available\n\t */\n\tmarkFileAsShared: function($tr, hasShares, hasLink) {\n\t\tvar action = $tr.find('.fileactions .action[data-action=\"Share\"]')\n\t\tvar type = $tr.data('type')\n\t\tvar icon = action.find('.icon')\n\t\tvar message, recipients, avatars\n\t\tvar ownerId = $tr.attr('data-share-owner-id')\n\t\tvar owner = $tr.attr('data-share-owner')\n\t\tvar mountType = $tr.attr('data-mounttype')\n\t\tvar shareFolderIcon\n\t\tvar iconClass = 'icon-shared'\n\t\taction.removeClass('shared-style')\n\t\t// update folder icon\n\t\tif (type === 'dir' && (hasShares || hasLink || ownerId)) {\n\t\t\tif (typeof mountType !== 'undefined' && mountType !== 'shared-root' && mountType !== 'shared') {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-' + mountType)\n\t\t\t} else if (hasLink) {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-public')\n\t\t\t} else {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-shared')\n\t\t\t}\n\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')')\n\t\t\t$tr.attr('data-icon', shareFolderIcon)\n\t\t} else if (type === 'dir') {\n\t\t\tvar isEncrypted = $tr.attr('data-e2eencrypted')\n\t\t\t// FIXME: duplicate of FileList._createRow logic for external folder,\n\t\t\t// need to refactor the icon logic into a single code path eventually\n\t\t\tif (isEncrypted === 'true') {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-encrypted')\n\t\t\t\t$tr.attr('data-icon', shareFolderIcon)\n\t\t\t} else if (mountType && mountType.indexOf('external') === 0) {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-external')\n\t\t\t\t$tr.attr('data-icon', shareFolderIcon)\n\t\t\t} else {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir')\n\t\t\t\t// back to default\n\t\t\t\t$tr.removeAttr('data-icon')\n\t\t\t}\n\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')')\n\t\t}\n\t\t// update share action text / icon\n\t\tif (hasShares || ownerId) {\n\t\t\trecipients = $tr.data('share-recipient-data')\n\t\t\taction.addClass('shared-style')\n\n\t\t\tavatars = '<span>' + t('core', 'Shared') + '</span>'\n\t\t\t// even if reshared, only show \"Shared by\"\n\t\t\tif (ownerId) {\n\t\t\t\tmessage = t('core', 'Shared by')\n\t\t\t\tavatars = this._formatRemoteShare(ownerId, owner, message)\n\t\t\t} else if (recipients) {\n\t\t\t\tavatars = this._formatShareList(recipients)\n\t\t\t}\n\t\t\taction.html(avatars).prepend(icon)\n\n\t\t\tif (ownerId || recipients) {\n\t\t\t\tvar avatarElement = action.find('.avatar')\n\t\t\t\tavatarElement.each(function() {\n\t\t\t\t\t$(this).avatar($(this).data('username'), 32)\n\t\t\t\t})\n\t\t\t\taction.find('span[title]').tooltip({ placement: 'top' })\n\t\t\t}\n\t\t} else {\n\t\t\taction.html('<span class=\"hidden-visually\">' + t('core', 'Shared') + '</span>').prepend(icon)\n\t\t}\n\t\tif (hasLink) {\n\t\t\ticonClass = 'icon-public'\n\t\t}\n\t\ticon.removeClass('icon-shared icon-public').addClass(iconClass)\n\t},\n\tshowDropDown: function(itemType, itemSource, appendTo, link, possiblePermissions, filename) {\n\t\tvar configModel = new OC.Share.ShareConfigModel()\n\t\tvar attributes = { itemType: itemType, itemSource: itemSource, possiblePermissions: possiblePermissions }\n\t\tvar itemModel = new OC.Share.ShareItemModel(attributes, { configModel: configModel })\n\t\tvar dialogView = new OC.Share.ShareDialogView({\n\t\t\tid: 'dropdown',\n\t\t\tmodel: itemModel,\n\t\t\tconfigModel: configModel,\n\t\t\tclassName: 'drop shareDropDown',\n\t\t\tattributes: {\n\t\t\t\t'data-item-source-name': filename,\n\t\t\t\t'data-item-type': itemType,\n\t\t\t\t'data-item-source': itemSource\n\t\t\t}\n\t\t})\n\t\tdialogView.setShowLink(link)\n\t\tvar $dialog = dialogView.render().$el\n\t\t$dialog.appendTo(appendTo)\n\t\t$dialog.slideDown(OC.menuSpeed, function() {\n\t\t\tOC.Share.droppedDown = true\n\t\t})\n\t\titemModel.fetch()\n\t},\n\thideDropDown: function(callback) {\n\t\tOC.Share.currentShares = null\n\t\t$('#dropdown').slideUp(OC.menuSpeed, function() {\n\t\t\tOC.Share.droppedDown = false\n\t\t\t$('#dropdown').remove()\n\t\t\tif (typeof FileActions !== 'undefined') {\n\t\t\t\t$('tr').removeClass('mouseOver')\n\t\t\t}\n\t\t\tif (callback) {\n\t\t\t\tcallback.call()\n\t\t\t}\n\t\t})\n\t},\n\tdirname: function(path) {\n\t\treturn path.replace(/\\\\/g, '/').replace(/\\/[^\\/]*$/, '')\n\t}\n})\n\n$(document).ready(function() {\n\tif (typeof monthNames !== 'undefined') {\n\t\t// min date should always be the next day\n\t\tvar minDate = new Date()\n\t\tminDate.setDate(minDate.getDate() + 1)\n\t\t$.datepicker.setDefaults({\n\t\t\tmonthNames: monthNames,\n\t\t\tmonthNamesShort: monthNamesShort,\n\t\t\tdayNames: dayNames,\n\t\t\tdayNamesMin: dayNamesMin,\n\t\t\tdayNamesShort: dayNamesShort,\n\t\t\tfirstDay: firstDay,\n\t\t\tminDate: minDate\n\t\t})\n\t}\n\n\t$(this).click(function(event) {\n\t\tvar target = $(event.target)\n\t\tvar isMatched = !target.is('.drop, .ui-datepicker-next, .ui-datepicker-prev, .ui-icon')\n\t\t\t&& !target.closest('#ui-datepicker-div').length && !target.closest('.ui-autocomplete').length\n\t\tif (OC.Share && OC.Share.droppedDown && isMatched && $('#dropdown').has(event.target).length === 0) {\n\t\t\tOC.Share.hideDropDown()\n\t\t}\n\t})\n\n})\n"],"sourceRoot":""} \ No newline at end of file
diff --git a/core/js/dist/systemtags.js b/core/js/dist/systemtags.js
index b24f4dcce12..60650e1f2b1 100644
--- a/core/js/dist/systemtags.js
+++ b/core/js/dist/systemtags.js
@@ -1,2 +1,2 @@
-!function(e){var t={};function n(s){if(t[s])return t[s].exports;var i=t[s]={i:s,l:!1,exports:{}};return e[s].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(s,i,function(t){return e[t]}.bind(null,i));return s},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=10)}([,,,,,,,,,,function(e,t,n){"use strict";n.r(t);n(11),n(12),n(13),n(14),n(15),n(16),n(17)},function(e,n){!function(e){e.SystemTags={getDescriptiveTag:function(e){if(_.isUndefined(e.name)&&!_.isUndefined(e.toJSON)&&(e=e.toJSON()),_.isUndefined(e.name))return $("<span>").addClass("non-existing-tag").text(t("core","Non-existing tag #{tag}",{tag:e}));var n,s=$("<span>");if(s.append(escapeHTML(e.name)),e.userAssignable||(n=t("core","restricted")),e.userVisible||(n=t("core","invisible")),n){var i=$("<em>").text(" "+t("core","({scope})",{scope:n}));s.append(i)}return s}}}(OC)},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var s,i;s=Handlebars.template,(i=OC.SystemTags.Templates=OC.SystemTags.Templates||{}).result=s({1:function(e,t,n,s,i){return" new-item"},3:function(e,t,n,s,i){var a,l;return e.propertyIsEnumerable,'\t\t<span class="label">'+(null!=(a="function"==typeof(l=null!=(l=n.tagMarkup||(null!=t?t.tagMarkup:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"tagMarkup",hash:{},data:i}):l)?a:"")+"</span>\n"},5:function(e,t,n,s,i){var a;return e.propertyIsEnumerable,'\t\t<span class="label">'+e.escapeExpression("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):a)+"</span>\n"},7:function(e,t,n,s,i){var a;return e.propertyIsEnumerable,'\t\t<span class="systemtags-actions">\n\t\t\t<a href="#" class="rename icon icon-rename" title="'+e.escapeExpression("function"==typeof(a=null!=(a=n.renameTooltip||(null!=t?t.renameTooltip:t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"renameTooltip",hash:{},data:i}):a)+'"></a>\n\t\t</span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,s,i,a){e.propertyIsEnumerable;var l,o,r,c=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing,d='<span class="systemtags-item'+(null!=(l=s.if.call(c,null!=t?t.isNew:t,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?l:"")+'" data-id="'+e.escapeExpression("function"===n(o=null!=(o=s.id||(null!=t?t.id:t))?o:u)?o.call(c,{name:"id",hash:{},data:a}):o)+'">\n<span class="checkmark icon icon-checkmark"></span>\n'+(null!=(l=s.if.call(c,null!=t?t.isAdmin:t,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.program(5,a,0),data:a}))?l:"");return o=null!=(o=s.allowActions||(null!=t?t.allowActions:t))?o:u,r={name:"allowActions",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a},l="function"===n(o)?o.call(c,r):o,s.allowActions||(l=e.hooks.blockHelperMissing.call(t,l,r)),null!=l&&(d+=l),d+"</span>\n"},useData:!0}),i.result_form=s({1:function(e,t,n,s,i){var a;return e.propertyIsEnumerable,'\t\t<a href="#" class="delete icon icon-delete" title="'+e.escapeExpression("function"==typeof(a=null!=(a=n.deleteTooltip||(null!=t?t.deleteTooltip:t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"deleteTooltip",hash:{},data:i}):a)+'"></a>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,s,i,a){e.propertyIsEnumerable;var l,o,r=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,u=e.escapeExpression;return'<form class="systemtags-rename-form">\n\t <label class="hidden-visually" for="'+u("function"===n(o=null!=(o=s.cid||(null!=t?t.cid:t))?o:c)?o.call(r,{name:"cid",hash:{},data:a}):o)+'-rename-input">'+u("function"===n(o=null!=(o=s.renameLabel||(null!=t?t.renameLabel:t))?o:c)?o.call(r,{name:"renameLabel",hash:{},data:a}):o)+'</label>\n\t<input id="'+u("function"===n(o=null!=(o=s.cid||(null!=t?t.cid:t))?o:c)?o.call(r,{name:"cid",hash:{},data:a}):o)+'-rename-input" type="text" value="'+u("function"===n(o=null!=(o=s.name||(null!=t?t.name:t))?o:c)?o.call(r,{name:"name",hash:{},data:a}):o)+'">\n'+(null!=(l=s.if.call(r,null!=t?t.isAdmin:t,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?l:"")+"</form>\n"},useData:!0}),i.selection=s({1:function(e,t,n,s,i){var a,l;return e.propertyIsEnumerable,'\t<span class="label">'+(null!=(a="function"==typeof(l=null!=(l=n.tagMarkup||(null!=t?t.tagMarkup:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"tagMarkup",hash:{},data:i}):l)?a:"")+"</span>\n"},3:function(e,t,n,s,i){var a;return e.propertyIsEnumerable,'\t<span class="label">'+e.escapeExpression("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):a)+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,s,i){var a;return e.propertyIsEnumerable,null!=(a=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.isAdmin:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?a:""},useData:!0})},function(e,t){!function(e){_.extend(e.Files.Client,{PROPERTY_FILEID:"{"+e.Files.Client.NS_OWNCLOUD+"}id",PROPERTY_CAN_ASSIGN:"{"+e.Files.Client.NS_OWNCLOUD+"}can-assign",PROPERTY_DISPLAYNAME:"{"+e.Files.Client.NS_OWNCLOUD+"}display-name",PROPERTY_USERVISIBLE:"{"+e.Files.Client.NS_OWNCLOUD+"}user-visible",PROPERTY_USERASSIGNABLE:"{"+e.Files.Client.NS_OWNCLOUD+"}user-assignable"});var t=e.Backbone.Model.extend({sync:e.Backbone.davSync,defaults:{userVisible:!0,userAssignable:!0,canAssign:!0},davProperties:{id:e.Files.Client.PROPERTY_FILEID,name:e.Files.Client.PROPERTY_DISPLAYNAME,userVisible:e.Files.Client.PROPERTY_USERVISIBLE,userAssignable:e.Files.Client.PROPERTY_USERASSIGNABLE,canAssign:e.Files.Client.PROPERTY_CAN_ASSIGN},parse:function(e){return{id:e.id,name:e.name,userVisible:!0===e.userVisible||"true"===e.userVisible,userAssignable:!0===e.userAssignable||"true"===e.userAssignable,canAssign:!0===e.canAssign||"true"===e.canAssign}}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagModel=t}(OC)},function(e,t){!function(e){var t=e.Backbone.Collection.extend({sync:e.Backbone.davSync,usePUT:!0,_objectId:null,_objectType:"files",model:e.SystemTags.SystemTagModel,url:function(){return e.linkToRemote("dav")+"/systemtags-relations/"+this._objectType+"/"+this._objectId},setObjectId:function(e){this._objectId=e},setObjectType:function(e){this._objectType=e},initialize:function(e,t){t=t||{},_.isUndefined(t.objectId)||(this._objectId=t.objectId),_.isUndefined(t.objectType)||(this._objectType=t.objectType)},getTagIds:function(){return this.map((function(e){return e.id}))}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsMappingCollection=t}(OC)},function(e,t){!function(e){var t=e.Backbone.Collection.extend({sync:e.Backbone.davSync,model:e.SystemTags.SystemTagModel,url:function(){return e.linkToRemote("dav")+"/systemtags/"},filterByName:function(e){return this.filter((function(t){return function(e,t){return e.get("name").substr(0,t.length).toLowerCase()===t.toLowerCase()}(t,e)}))},reset:function(){return this.fetched=!1,e.Backbone.Collection.prototype.reset.apply(this,arguments)},fetch:function(t){var n=this;if(t=t||{},this.fetched||t.force)return t.success&&t.success(this,null,t),this.trigger("sync",this,null,t),Promise.resolve();var s=t.success;return(t=_.extend({},t)).success=function(){if(n.fetched=!0,s)return s.apply(this,arguments)},e.Backbone.Collection.prototype.fetch.call(this,t)}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsCollection=t,e.SystemTags.collection=new e.SystemTags.SystemTagsCollection}(OC)},function(e,n){!function(e){var n=e.Backbone.View.extend({_rendered:!1,_newTag:null,_lastUsedTags:[],className:"systemTagsInputFieldContainer",template:function(e){return'<input class="systemTagsInputField" type="hidden" name="tags" value=""/>'},initialize:function(t){t=t||{},this._multiple=!!t.multiple,this._allowActions=_.isUndefined(t.allowActions)||!!t.allowActions,this._allowCreate=_.isUndefined(t.allowCreate)||!!t.allowCreate,this._isAdmin=!!t.isAdmin,_.isFunction(t.initSelection)&&(this._initSelection=t.initSelection),this.collection=t.collection||e.SystemTags.collection;var n=this;this.collection.on("change:name remove",(function(){_.defer(n._refreshSelection)})),_.defer(_.bind(this._getLastUsedTags,this)),_.bindAll(this,"_refreshSelection","_onClickRenameTag","_onClickDeleteTag","_onSelectTag","_onDeselectTag","_onSubmitRenameTag")},_getLastUsedTags:function(){var t=this;$.ajax({type:"GET",url:e.generateUrl("/apps/systemtags/lastused"),success:function(e){t._lastUsedTags=e}})},_refreshSelection:function(){this.$tagsField.select2("val",this.$tagsField.val())},_onClickRenameTag:function(n){var s=$(n.target).closest(".systemtags-item"),i=s.attr("data-id"),a=this.collection.get(i).get("name"),l=$(e.SystemTags.Templates.result_form({cid:this.cid,name:a,deleteTooltip:t("core","Delete"),renameLabel:t("core","Rename"),isAdmin:this._isAdmin}));return s.find(".label").after(l),s.find(".label, .systemtags-actions").addClass("hidden"),s.closest(".select2-result").addClass("has-form"),l.find("[title]").tooltip({placement:"bottom",container:"body"}),l.find("input").focus().selectRange(0,a.length),!1},_onSubmitRenameTag:function(e){e.preventDefault();var t=$(e.target),n=t.closest(".systemtags-item"),s=n.attr("data-id"),i=this.collection.get(s),a=$(e.target).find("input").val().trim();a&&a!==i.get("name")&&(i.save({name:a}),n.find(".label").text(a)),n.find(".label, .systemtags-actions").removeClass("hidden"),t.remove(),n.closest(".select2-result").removeClass("has-form")},_onClickDeleteTag:function(e){var t=$(e.target).closest(".systemtags-item"),n=t.attr("data-id");return this.collection.get(n).destroy(),$(e.target).tooltip("hide"),t.closest(".select2-result").remove(),!1},_addToSelect2Selection:function(e){var t=this.$tagsField.select2("data");t.push(e),this.$tagsField.select2("data",t)},_onSelectTag:function(e){var t,n=this;if(e.object&&e.object.isNew)return t=this.collection.create({name:e.object.name.trim(),userVisible:!0,userAssignable:!0,canAssign:!0},{success:function(e){n._addToSelect2Selection(e.toJSON()),n._lastUsedTags.unshift(e.id),n.trigger("select",e)},error:function(t,s){409===s.status&&(n.collection.reset(),n.collection.fetch({success:function(t){var s=t.where({name:e.object.name.trim(),userVisible:!0,userAssignable:!0});s.length&&(s=s[0],n._addToSelect2Selection(s.toJSON()),n.trigger("select",s))}}))}}),this.$tagsField.select2("close"),e.preventDefault(),!1;t=this.collection.get(e.object.id),this._lastUsedTags.unshift(t.id),this._newTag=null,this.trigger("select",t)},_onDeselectTag:function(e){this.trigger("deselect",e.choice.id)},_queryTagsAutocomplete:function(e){var t=this;this.collection.fetch({success:function(n){var s=n.filterByName(e.term.trim());t._isAdmin||(s=_.filter(s,(function(e){return e.get("canAssign")}))),e.callback({results:_.invoke(s,"toJSON")})}})},_preventDefault:function(e){e.stopPropagation()},_formatDropDownResult:function(n){return e.SystemTags.Templates.result(_.extend({renameTooltip:t("core","Rename"),allowActions:this._allowActions,tagMarkup:this._isAdmin?e.SystemTags.getDescriptiveTag(n)[0].innerHTML:null,isAdmin:this._isAdmin},n))},_formatSelection:function(t){return e.SystemTags.Templates.selection(_.extend({tagMarkup:this._isAdmin?e.SystemTags.getDescriptiveTag(t)[0].innerHTML:null,isAdmin:this._isAdmin},t))},_createSearchChoice:function(e){if(e=e.trim(),!this.collection.filter((function(t){return t.get("name")===e})).length)return this._newTag?this._newTag.name=e:this._newTag={id:-1,name:e,userAssignable:!0,userVisible:!0,canAssign:!0,isNew:!0},this._newTag},_initSelection:function(e,t){var n=this,s=$(e).val().split(",");function i(e){var t=e.toJSON();return n._isAdmin||t.canAssign||(t.locked=!0),t}this.collection.fetch({success:function(){t(function(e){var t=n.collection.filter((function(t){return e.indexOf(t.id)>=0&&(n._isAdmin||t.get("userVisible"))}));return _.map(t,i)}(s))}})},render:function(){var n=this;this.$el.html(this.template()),this.$el.find("[title]").tooltip({placement:"bottom"}),this.$tagsField=this.$el.find("[name=tags]"),this.$tagsField.select2({placeholder:t("core","Collaborative tags"),containerCssClass:"systemtags-select2-container",dropdownCssClass:"systemtags-select2-dropdown",closeOnSelect:!1,allowClear:!1,multiple:this._multiple,toggleSelect:this._multiple,query:_.bind(this._queryTagsAutocomplete,this),id:function(e){return e.id},initSelection:_.bind(this._initSelection,this),formatResult:_.bind(this._formatDropDownResult,this),formatSelection:_.bind(this._formatSelection,this),createSearchChoice:this._allowCreate?_.bind(this._createSearchChoice,this):void 0,sortResults:function(t){var s=_.pluck(n.$tagsField.select2("data"),"id");return t.sort((function(t,i){var a=s.indexOf(t.id)>=0,l=s.indexOf(i.id)>=0;if(a===l){var o=n._lastUsedTags.indexOf(t.id),r=n._lastUsedTags.indexOf(i.id);return o!==r?-1===r?-1:-1===o?1:o<r?-1:1:e.Util.naturalSortCompare(t.name,i.name)}return a&&!l?-1:1})),t},formatNoMatches:function(){return t("core","No tags found")}}).on("select2-selecting",this._onSelectTag).on("select2-removing",this._onDeselectTag);var s=this.$tagsField.select2("dropdown");s.on("mouseup",".rename",this._onClickRenameTag),s.on("mouseup",".delete",this._onClickDeleteTag),s.on("mouseup",".select2-result-selectable.has-form",this._preventDefault),s.on("submit",".systemtags-rename-form",this._onSubmitRenameTag),this.delegateEvents()},remove:function(){this.$tagsField&&this.$tagsField.select2("destroy")},getValues:function(){this.$tagsField.select2("val")},setValues:function(e){this.$tagsField.select2("val",e)},setData:function(e){this.$tagsField.select2("data",e)}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsInputField=n}(OC)},function(e,t,n){var s=n(18);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(20).default)("bdf318e0",s,!0,{})},function(e,t,n){(e.exports=n(19)(!1)).push([e.i,".systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemTagsInfoView,.systemtags-select2-container{width:100%}.systemTagsInfoView .select2-choices .select2-search-choice.select2-locked .label,.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:0.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}\n",""])},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",s=e[3];if(!s)return n;if(t&&"function"==typeof btoa){var i=(l=s,o=btoa(unescape(encodeURIComponent(JSON.stringify(l)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),"/*# ".concat(r," */")),a=s.sources.map((function(e){return"/*# sourceURL=".concat(s.sourceRoot).concat(e," */")}));return[n].concat(a).concat([i]).join("\n")}var l,o,r;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(n,"}"):n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var s={},i=0;i<this.length;i++){var a=this[i][0];null!=a&&(s[a]=!0)}for(var l=0;l<e.length;l++){var o=e[l];null!=o[0]&&s[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="(".concat(o[2],") and (").concat(n,")")),t.push(o))}},t}},function(e,t,n){"use strict";function s(e,t){for(var n=[],s={},i=0;i<t.length;i++){var a=t[i],l=a[0],o={id:e+":"+i,css:a[1],media:a[2],sourceMap:a[3]};s[l]?s[l].parts.push(o):n.push(s[l]={id:l,parts:[o]})}return n}n.r(t),n.d(t,"default",(function(){return f}));var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var a={},l=i&&(document.head||document.getElementsByTagName("head")[0]),o=null,r=0,c=!1,u=function(){},d=null,m="data-vue-ssr-id",p="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(e,t,n,i){c=n,d=i||{};var l=s(e,t);return g(l),function(t){for(var n=[],i=0;i<l.length;i++){var o=l[i];(r=a[o.id]).refs--,n.push(r)}t?g(l=s(e,t)):l=[];for(i=0;i<n.length;i++){var r;if(0===(r=n[i]).refs){for(var c=0;c<r.parts.length;c++)r.parts[c]();delete a[r.id]}}}}function g(e){for(var t=0;t<e.length;t++){var n=e[t],s=a[n.id];if(s){s.refs++;for(var i=0;i<s.parts.length;i++)s.parts[i](n.parts[i]);for(;i<n.parts.length;i++)s.parts.push(y(n.parts[i]));s.parts.length>n.parts.length&&(s.parts.length=n.parts.length)}else{var l=[];for(i=0;i<n.parts.length;i++)l.push(y(n.parts[i]));a[n.id]={id:n.id,refs:1,parts:l}}}}function h(){var e=document.createElement("style");return e.type="text/css",l.appendChild(e),e}function y(e){var t,n,s=document.querySelector("style["+m+'~="'+e.id+'"]');if(s){if(c)return u;s.parentNode.removeChild(s)}if(p){var i=r++;s=o||(o=h()),t=_.bind(null,s,i,!1),n=_.bind(null,s,i,!0)}else s=h(),t=T.bind(null,s),n=function(){s.parentNode.removeChild(s)};return t(e),function(s){if(s){if(s.css===e.css&&s.media===e.media&&s.sourceMap===e.sourceMap)return;t(e=s)}else n()}}var b,v=(b=[],function(e,t){return b[e]=t,b.filter(Boolean).join("\n")});function _(e,t,n,s){var i=n?"":s.css;if(e.styleSheet)e.styleSheet.cssText=v(t,i);else{var a=document.createTextNode(i),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(a,l[t]):e.appendChild(a)}}function T(e,t){var n=t.css,s=t.media,i=t.sourceMap;if(s&&e.setAttribute("media",s),d.ssrId&&e.setAttribute(m,t.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}}]);
+!function(e){var t={};function n(s){if(t[s])return t[s].exports;var i=t[s]={i:s,l:!1,exports:{}};return e[s].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(s,i,function(t){return e[t]}.bind(null,i));return s},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);n(1),n(2),n(3),n(4),n(5),n(6),n(7)},function(e,n){!function(e){e.SystemTags={getDescriptiveTag:function(e){if(_.isUndefined(e.name)&&!_.isUndefined(e.toJSON)&&(e=e.toJSON()),_.isUndefined(e.name))return $("<span>").addClass("non-existing-tag").text(t("core","Non-existing tag #{tag}",{tag:e}));var n,s=$("<span>");if(s.append(escapeHTML(e.name)),e.userAssignable||(n=t("core","restricted")),e.userVisible||(n=t("core","invisible")),n){var i=$("<em>").text(" "+t("core","({scope})",{scope:n}));s.append(i)}return s}}}(OC)},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var s,i;s=Handlebars.template,(i=OC.SystemTags.Templates=OC.SystemTags.Templates||{}).result=s({1:function(e,t,n,s,i){return" new-item"},3:function(e,t,n,s,i){var a,l;return e.propertyIsEnumerable,'\t\t<span class="label">'+(null!=(a="function"==typeof(l=null!=(l=n.tagMarkup||(null!=t?t.tagMarkup:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"tagMarkup",hash:{},data:i}):l)?a:"")+"</span>\n"},5:function(e,t,n,s,i){var a;return e.propertyIsEnumerable,'\t\t<span class="label">'+e.escapeExpression("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):a)+"</span>\n"},7:function(e,t,n,s,i){var a;return e.propertyIsEnumerable,'\t\t<span class="systemtags-actions">\n\t\t\t<a href="#" class="rename icon icon-rename" title="'+e.escapeExpression("function"==typeof(a=null!=(a=n.renameTooltip||(null!=t?t.renameTooltip:t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"renameTooltip",hash:{},data:i}):a)+'"></a>\n\t\t</span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,s,i,a){e.propertyIsEnumerable;var l,o,r,c=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing,d='<span class="systemtags-item'+(null!=(l=s.if.call(c,null!=t?t.isNew:t,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?l:"")+'" data-id="'+e.escapeExpression("function"===n(o=null!=(o=s.id||(null!=t?t.id:t))?o:u)?o.call(c,{name:"id",hash:{},data:a}):o)+'">\n<span class="checkmark icon icon-checkmark"></span>\n'+(null!=(l=s.if.call(c,null!=t?t.isAdmin:t,{name:"if",hash:{},fn:e.program(3,a,0),inverse:e.program(5,a,0),data:a}))?l:"");return o=null!=(o=s.allowActions||(null!=t?t.allowActions:t))?o:u,r={name:"allowActions",hash:{},fn:e.program(7,a,0),inverse:e.noop,data:a},l="function"===n(o)?o.call(c,r):o,s.allowActions||(l=e.hooks.blockHelperMissing.call(t,l,r)),null!=l&&(d+=l),d+"</span>\n"},useData:!0}),i.result_form=s({1:function(e,t,n,s,i){var a;return e.propertyIsEnumerable,'\t\t<a href="#" class="delete icon icon-delete" title="'+e.escapeExpression("function"==typeof(a=null!=(a=n.deleteTooltip||(null!=t?t.deleteTooltip:t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"deleteTooltip",hash:{},data:i}):a)+'"></a>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,s,i,a){e.propertyIsEnumerable;var l,o,r=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,u=e.escapeExpression;return'<form class="systemtags-rename-form">\n\t <label class="hidden-visually" for="'+u("function"===n(o=null!=(o=s.cid||(null!=t?t.cid:t))?o:c)?o.call(r,{name:"cid",hash:{},data:a}):o)+'-rename-input">'+u("function"===n(o=null!=(o=s.renameLabel||(null!=t?t.renameLabel:t))?o:c)?o.call(r,{name:"renameLabel",hash:{},data:a}):o)+'</label>\n\t<input id="'+u("function"===n(o=null!=(o=s.cid||(null!=t?t.cid:t))?o:c)?o.call(r,{name:"cid",hash:{},data:a}):o)+'-rename-input" type="text" value="'+u("function"===n(o=null!=(o=s.name||(null!=t?t.name:t))?o:c)?o.call(r,{name:"name",hash:{},data:a}):o)+'">\n'+(null!=(l=s.if.call(r,null!=t?t.isAdmin:t,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?l:"")+"</form>\n"},useData:!0}),i.selection=s({1:function(e,t,n,s,i){var a,l;return e.propertyIsEnumerable,'\t<span class="label">'+(null!=(a="function"==typeof(l=null!=(l=n.tagMarkup||(null!=t?t.tagMarkup:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"tagMarkup",hash:{},data:i}):l)?a:"")+"</span>\n"},3:function(e,t,n,s,i){var a;return e.propertyIsEnumerable,'\t<span class="label">'+e.escapeExpression("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):a)+"</span>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,s,i){var a;return e.propertyIsEnumerable,null!=(a=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.isAdmin:t,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?a:""},useData:!0})},function(e,t){!function(e){_.extend(e.Files.Client,{PROPERTY_FILEID:"{"+e.Files.Client.NS_OWNCLOUD+"}id",PROPERTY_CAN_ASSIGN:"{"+e.Files.Client.NS_OWNCLOUD+"}can-assign",PROPERTY_DISPLAYNAME:"{"+e.Files.Client.NS_OWNCLOUD+"}display-name",PROPERTY_USERVISIBLE:"{"+e.Files.Client.NS_OWNCLOUD+"}user-visible",PROPERTY_USERASSIGNABLE:"{"+e.Files.Client.NS_OWNCLOUD+"}user-assignable"});var t=e.Backbone.Model.extend({sync:e.Backbone.davSync,defaults:{userVisible:!0,userAssignable:!0,canAssign:!0},davProperties:{id:e.Files.Client.PROPERTY_FILEID,name:e.Files.Client.PROPERTY_DISPLAYNAME,userVisible:e.Files.Client.PROPERTY_USERVISIBLE,userAssignable:e.Files.Client.PROPERTY_USERASSIGNABLE,canAssign:e.Files.Client.PROPERTY_CAN_ASSIGN},parse:function(e){return{id:e.id,name:e.name,userVisible:!0===e.userVisible||"true"===e.userVisible,userAssignable:!0===e.userAssignable||"true"===e.userAssignable,canAssign:!0===e.canAssign||"true"===e.canAssign}}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagModel=t}(OC)},function(e,t){!function(e){var t=e.Backbone.Collection.extend({sync:e.Backbone.davSync,usePUT:!0,_objectId:null,_objectType:"files",model:e.SystemTags.SystemTagModel,url:function(){return e.linkToRemote("dav")+"/systemtags-relations/"+this._objectType+"/"+this._objectId},setObjectId:function(e){this._objectId=e},setObjectType:function(e){this._objectType=e},initialize:function(e,t){t=t||{},_.isUndefined(t.objectId)||(this._objectId=t.objectId),_.isUndefined(t.objectType)||(this._objectType=t.objectType)},getTagIds:function(){return this.map((function(e){return e.id}))}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsMappingCollection=t}(OC)},function(e,t){!function(e){var t=e.Backbone.Collection.extend({sync:e.Backbone.davSync,model:e.SystemTags.SystemTagModel,url:function(){return e.linkToRemote("dav")+"/systemtags/"},filterByName:function(e){return this.filter((function(t){return function(e,t){return e.get("name").substr(0,t.length).toLowerCase()===t.toLowerCase()}(t,e)}))},reset:function(){return this.fetched=!1,e.Backbone.Collection.prototype.reset.apply(this,arguments)},fetch:function(t){var n=this;if(t=t||{},this.fetched||t.force)return t.success&&t.success(this,null,t),this.trigger("sync",this,null,t),Promise.resolve();var s=t.success;return(t=_.extend({},t)).success=function(){if(n.fetched=!0,s)return s.apply(this,arguments)},e.Backbone.Collection.prototype.fetch.call(this,t)}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsCollection=t,e.SystemTags.collection=new e.SystemTags.SystemTagsCollection}(OC)},function(e,n){!function(e){var n=e.Backbone.View.extend({_rendered:!1,_newTag:null,_lastUsedTags:[],className:"systemTagsInputFieldContainer",template:function(e){return'<input class="systemTagsInputField" type="hidden" name="tags" value=""/>'},initialize:function(t){t=t||{},this._multiple=!!t.multiple,this._allowActions=_.isUndefined(t.allowActions)||!!t.allowActions,this._allowCreate=_.isUndefined(t.allowCreate)||!!t.allowCreate,this._isAdmin=!!t.isAdmin,_.isFunction(t.initSelection)&&(this._initSelection=t.initSelection),this.collection=t.collection||e.SystemTags.collection;var n=this;this.collection.on("change:name remove",(function(){_.defer(n._refreshSelection)})),_.defer(_.bind(this._getLastUsedTags,this)),_.bindAll(this,"_refreshSelection","_onClickRenameTag","_onClickDeleteTag","_onSelectTag","_onDeselectTag","_onSubmitRenameTag")},_getLastUsedTags:function(){var t=this;$.ajax({type:"GET",url:e.generateUrl("/apps/systemtags/lastused"),success:function(e){t._lastUsedTags=e}})},_refreshSelection:function(){this.$tagsField.select2("val",this.$tagsField.val())},_onClickRenameTag:function(n){var s=$(n.target).closest(".systemtags-item"),i=s.attr("data-id"),a=this.collection.get(i).get("name"),l=$(e.SystemTags.Templates.result_form({cid:this.cid,name:a,deleteTooltip:t("core","Delete"),renameLabel:t("core","Rename"),isAdmin:this._isAdmin}));return s.find(".label").after(l),s.find(".label, .systemtags-actions").addClass("hidden"),s.closest(".select2-result").addClass("has-form"),l.find("[title]").tooltip({placement:"bottom",container:"body"}),l.find("input").focus().selectRange(0,a.length),!1},_onSubmitRenameTag:function(e){e.preventDefault();var t=$(e.target),n=t.closest(".systemtags-item"),s=n.attr("data-id"),i=this.collection.get(s),a=$(e.target).find("input").val().trim();a&&a!==i.get("name")&&(i.save({name:a}),n.find(".label").text(a)),n.find(".label, .systemtags-actions").removeClass("hidden"),t.remove(),n.closest(".select2-result").removeClass("has-form")},_onClickDeleteTag:function(e){var t=$(e.target).closest(".systemtags-item"),n=t.attr("data-id");return this.collection.get(n).destroy(),$(e.target).tooltip("hide"),t.closest(".select2-result").remove(),!1},_addToSelect2Selection:function(e){var t=this.$tagsField.select2("data");t.push(e),this.$tagsField.select2("data",t)},_onSelectTag:function(e){var t,n=this;if(e.object&&e.object.isNew)return t=this.collection.create({name:e.object.name.trim(),userVisible:!0,userAssignable:!0,canAssign:!0},{success:function(e){n._addToSelect2Selection(e.toJSON()),n._lastUsedTags.unshift(e.id),n.trigger("select",e)},error:function(t,s){409===s.status&&(n.collection.reset(),n.collection.fetch({success:function(t){var s=t.where({name:e.object.name.trim(),userVisible:!0,userAssignable:!0});s.length&&(s=s[0],n._addToSelect2Selection(s.toJSON()),n.trigger("select",s))}}))}}),this.$tagsField.select2("close"),e.preventDefault(),!1;t=this.collection.get(e.object.id),this._lastUsedTags.unshift(t.id),this._newTag=null,this.trigger("select",t)},_onDeselectTag:function(e){this.trigger("deselect",e.choice.id)},_queryTagsAutocomplete:function(e){var t=this;this.collection.fetch({success:function(n){var s=n.filterByName(e.term.trim());t._isAdmin||(s=_.filter(s,(function(e){return e.get("canAssign")}))),e.callback({results:_.invoke(s,"toJSON")})}})},_preventDefault:function(e){e.stopPropagation()},_formatDropDownResult:function(n){return e.SystemTags.Templates.result(_.extend({renameTooltip:t("core","Rename"),allowActions:this._allowActions,tagMarkup:this._isAdmin?e.SystemTags.getDescriptiveTag(n)[0].innerHTML:null,isAdmin:this._isAdmin},n))},_formatSelection:function(t){return e.SystemTags.Templates.selection(_.extend({tagMarkup:this._isAdmin?e.SystemTags.getDescriptiveTag(t)[0].innerHTML:null,isAdmin:this._isAdmin},t))},_createSearchChoice:function(e){if(e=e.trim(),!this.collection.filter((function(t){return t.get("name")===e})).length)return this._newTag?this._newTag.name=e:this._newTag={id:-1,name:e,userAssignable:!0,userVisible:!0,canAssign:!0,isNew:!0},this._newTag},_initSelection:function(e,t){var n=this,s=$(e).val().split(",");function i(e){var t=e.toJSON();return n._isAdmin||t.canAssign||(t.locked=!0),t}this.collection.fetch({success:function(){t(function(e){var t=n.collection.filter((function(t){return e.indexOf(t.id)>=0&&(n._isAdmin||t.get("userVisible"))}));return _.map(t,i)}(s))}})},render:function(){var n=this;this.$el.html(this.template()),this.$el.find("[title]").tooltip({placement:"bottom"}),this.$tagsField=this.$el.find("[name=tags]"),this.$tagsField.select2({placeholder:t("core","Collaborative tags"),containerCssClass:"systemtags-select2-container",dropdownCssClass:"systemtags-select2-dropdown",closeOnSelect:!1,allowClear:!1,multiple:this._multiple,toggleSelect:this._multiple,query:_.bind(this._queryTagsAutocomplete,this),id:function(e){return e.id},initSelection:_.bind(this._initSelection,this),formatResult:_.bind(this._formatDropDownResult,this),formatSelection:_.bind(this._formatSelection,this),createSearchChoice:this._allowCreate?_.bind(this._createSearchChoice,this):void 0,sortResults:function(t){var s=_.pluck(n.$tagsField.select2("data"),"id");return t.sort((function(t,i){var a=s.indexOf(t.id)>=0,l=s.indexOf(i.id)>=0;if(a===l){var o=n._lastUsedTags.indexOf(t.id),r=n._lastUsedTags.indexOf(i.id);return o!==r?-1===r?-1:-1===o?1:o<r?-1:1:e.Util.naturalSortCompare(t.name,i.name)}return a&&!l?-1:1})),t},formatNoMatches:function(){return t("core","No tags found")}}).on("select2-selecting",this._onSelectTag).on("select2-removing",this._onDeselectTag);var s=this.$tagsField.select2("dropdown");s.on("mouseup",".rename",this._onClickRenameTag),s.on("mouseup",".delete",this._onClickDeleteTag),s.on("mouseup",".select2-result-selectable.has-form",this._preventDefault),s.on("submit",".systemtags-rename-form",this._onSubmitRenameTag),this.delegateEvents()},remove:function(){this.$tagsField&&this.$tagsField.select2("destroy")},getValues:function(){this.$tagsField.select2("val")},setValues:function(e){this.$tagsField.select2("val",e)},setData:function(e){this.$tagsField.select2("data",e)}});e.SystemTags=e.SystemTags||{},e.SystemTags.SystemTagsInputField=n}(OC)},function(e,t,n){var s=n(8);"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);(0,n(10).default)("bdf318e0",s,!0,{})},function(e,t,n){(e.exports=n(9)(!1)).push([e.i,".systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemTagsInfoView,.systemtags-select2-container{width:100%}.systemTagsInfoView .select2-choices .select2-search-choice.select2-locked .label,.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:0.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}\n",""])},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",s=e[3];if(!s)return n;if(t&&"function"==typeof btoa){var i=(l=s,o=btoa(unescape(encodeURIComponent(JSON.stringify(l)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),"/*# ".concat(r," */")),a=s.sources.map((function(e){return"/*# sourceURL=".concat(s.sourceRoot).concat(e," */")}));return[n].concat(a).concat([i]).join("\n")}var l,o,r;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(n,"}"):n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var s={},i=0;i<this.length;i++){var a=this[i][0];null!=a&&(s[a]=!0)}for(var l=0;l<e.length;l++){var o=e[l];null!=o[0]&&s[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="(".concat(o[2],") and (").concat(n,")")),t.push(o))}},t}},function(e,t,n){"use strict";function s(e,t){for(var n=[],s={},i=0;i<t.length;i++){var a=t[i],l=a[0],o={id:e+":"+i,css:a[1],media:a[2],sourceMap:a[3]};s[l]?s[l].parts.push(o):n.push(s[l]={id:l,parts:[o]})}return n}n.r(t),n.d(t,"default",(function(){return f}));var i="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var a={},l=i&&(document.head||document.getElementsByTagName("head")[0]),o=null,r=0,c=!1,u=function(){},d=null,m="data-vue-ssr-id",p="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function f(e,t,n,i){c=n,d=i||{};var l=s(e,t);return g(l),function(t){for(var n=[],i=0;i<l.length;i++){var o=l[i];(r=a[o.id]).refs--,n.push(r)}t?g(l=s(e,t)):l=[];for(i=0;i<n.length;i++){var r;if(0===(r=n[i]).refs){for(var c=0;c<r.parts.length;c++)r.parts[c]();delete a[r.id]}}}}function g(e){for(var t=0;t<e.length;t++){var n=e[t],s=a[n.id];if(s){s.refs++;for(var i=0;i<s.parts.length;i++)s.parts[i](n.parts[i]);for(;i<n.parts.length;i++)s.parts.push(y(n.parts[i]));s.parts.length>n.parts.length&&(s.parts.length=n.parts.length)}else{var l=[];for(i=0;i<n.parts.length;i++)l.push(y(n.parts[i]));a[n.id]={id:n.id,refs:1,parts:l}}}}function h(){var e=document.createElement("style");return e.type="text/css",l.appendChild(e),e}function y(e){var t,n,s=document.querySelector("style["+m+'~="'+e.id+'"]');if(s){if(c)return u;s.parentNode.removeChild(s)}if(p){var i=r++;s=o||(o=h()),t=_.bind(null,s,i,!1),n=_.bind(null,s,i,!0)}else s=h(),t=T.bind(null,s),n=function(){s.parentNode.removeChild(s)};return t(e),function(s){if(s){if(s.css===e.css&&s.media===e.media&&s.sourceMap===e.sourceMap)return;t(e=s)}else n()}}var b,v=(b=[],function(e,t){return b[e]=t,b.filter(Boolean).join("\n")});function _(e,t,n,s){var i=n?"":s.css;if(e.styleSheet)e.styleSheet.cssText=v(t,i);else{var a=document.createTextNode(i),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(a,l[t]):e.appendChild(a)}}function T(e,t){var n=t.css,s=t.media,i=t.sourceMap;if(s&&e.setAttribute("media",s),d.ssrId&&e.setAttribute(m,t.id),i&&(n+="\n/*# sourceURL="+i.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}}]);
//# sourceMappingURL=systemtags.js.map \ No newline at end of file
diff --git a/core/js/dist/systemtags.js.map b/core/js/dist/systemtags.js.map
index 03d1c3681b9..c34ee008c2a 100644
--- a/core/js/dist/systemtags.js.map
+++ b/core/js/dist/systemtags.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./core/js/systemtags/merged-systemtags.js","webpack:///./core/js/systemtags/systemtags.js","webpack:///./core/js/systemtags/templates.js","webpack:///./core/js/systemtags/systemtagmodel.js","webpack:///./core/js/systemtags/systemtagsmappingcollection.js","webpack:///./core/js/systemtags/systemtagscollection.js","webpack:///./core/js/systemtags/systemtagsinputfield.js","webpack:///./core/css/systemtags.scss?456a","webpack:///./core/css/systemtags.scss","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/vue-style-loader/lib/listToStyles.js","webpack:///./node_modules/vue-style-loader/lib/addStylesClient.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","OC","SystemTags","getDescriptiveTag","tag","_","isUndefined","toJSON","$","addClass","text","scope","$span","append","escapeHTML","userAssignable","userVisible","$tag","template","templates","Handlebars","Templates","container","depth0","helpers","partials","data","stack1","helper","propertyIsEnumerable","tagMarkup","hooks","helperMissing","nullContext","escapeExpression","renameTooltip","options","alias2","alias3","buffer","isNew","program","noop","id","isAdmin","allowActions","blockHelperMissing","deleteTooltip","alias5","cid","renameLabel","extend","Files","Client","PROPERTY_FILEID","NS_OWNCLOUD","PROPERTY_CAN_ASSIGN","PROPERTY_DISPLAYNAME","PROPERTY_USERVISIBLE","PROPERTY_USERASSIGNABLE","SystemTagModel","Backbone","Model","sync","davSync","defaults","canAssign","davProperties","parse","SystemTagsMappingCollection","Collection","usePUT","_objectId","_objectType","model","url","linkToRemote","this","setObjectId","objectId","setObjectType","objectType","initialize","models","getTagIds","map","SystemTagsCollection","filterByName","filter","term","substr","length","toLowerCase","filterFunction","reset","fetched","apply","arguments","fetch","self","force","success","trigger","Promise","resolve","collection","SystemTagsInputField","View","_rendered","_newTag","_lastUsedTags","className","_multiple","multiple","_allowActions","_allowCreate","allowCreate","_isAdmin","isFunction","initSelection","_initSelection","on","defer","_refreshSelection","_getLastUsedTags","bindAll","ajax","type","generateUrl","response","$tagsField","select2","val","_onClickRenameTag","ev","$item","target","closest","tagId","attr","oldName","$renameForm","find","after","tooltip","placement","focus","selectRange","_onSubmitRenameTag","preventDefault","$form","tagModel","newName","trim","save","removeClass","remove","_onClickDeleteTag","destroy","_addToSelect2Selection","selection","push","_onSelectTag","e","unshift","error","xhr","status","where","_onDeselectTag","choice","_queryTagsAutocomplete","query","tagModels","callback","results","invoke","_preventDefault","stopPropagation","_formatDropDownResult","innerHTML","_formatSelection","_createSearchChoice","entry","element","ids","split","modelToSelection","locked","selectedModels","indexOf","findSelectedObjects","render","$el","html","placeholder","containerCssClass","dropdownCssClass","closeOnSelect","allowClear","toggleSelect","formatResult","formatSelection","createSearchChoice","undefined","sortResults","selectedItems","pluck","sort","a","b","aSelected","bSelected","aLastUsed","bLastUsed","Util","naturalSortCompare","formatNoMatches","$dropDown","delegateEvents","getValues","setValues","values","setData","content","locals","add","default","useSourceMap","list","toString","item","cssMapping","btoa","sourceMapping","sourceMap","base64","unescape","encodeURIComponent","JSON","stringify","concat","sourceURLs","sources","source","sourceRoot","join","cssWithMappingToString","mediaQuery","alreadyImportedModules","_i","listToStyles","parentId","styles","newStyles","part","css","media","parts","hasDocument","document","DEBUG","Error","stylesInDom","head","getElementsByTagName","singletonElement","singletonCounter","isProduction","ssrIdKey","isOldIE","navigator","test","userAgent","addStylesClient","_isProduction","_options","addStylesToDom","newList","mayRemove","domStyle","refs","j","addStyle","createStyleElement","styleElement","createElement","appendChild","obj","update","querySelector","parentNode","removeChild","styleIndex","applyToSingletonTag","applyToTag","newObj","textStore","replaceText","index","replacement","Boolean","styleSheet","cssText","cssNode","createTextNode","childNodes","insertBefore","setAttribute","ssrId","firstChild"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC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AAK,QAI1C,SAASgD,EAAqBT,EAAcc,EAAO/I,EAAQoI,GACzD,IAAIhC,EAAMpG,EAAS,GAAKoI,EAAIhC,IAE5B,GAAI6B,EAAaiB,WACfjB,EAAaiB,WAAWC,QAAUL,EAAYC,EAAO3C,OAChD,CACL,IAAIgD,EAAU5C,SAAS6C,eAAejD,GAClCkD,EAAarB,EAAaqB,WAC1BA,EAAWP,IAAQd,EAAaO,YAAYc,EAAWP,IACvDO,EAAWvN,OACbkM,EAAasB,aAAaH,EAASE,EAAWP,IAE9Cd,EAAaE,YAAYiB,IAK/B,SAAST,EAAYV,EAAcG,GACjC,IAAIhC,EAAMgC,EAAIhC,IACVC,EAAQ+B,EAAI/B,MACZtB,EAAYqD,EAAIrD,UAiBpB,GAfIsB,GACF4B,EAAauB,aAAa,QAASnD,GAEjC7N,EAAQiR,OACVxB,EAAauB,aAAavC,EAAUmB,EAAIrP,IAGtCgM,IAGFqB,GAAO,mBAAqBrB,EAAUQ,QAAQ,GAAK,MAEnDa,GAAO,uDAAyDvB,KAAKI,SAASC,mBAAmBC,KAAKC,UAAUL,MAAgB,OAG9HkD,EAAaiB,WACfjB,EAAaiB,WAAWC,QAAU/C,MAC7B,CACL,KAAO6B,EAAayB,YAClBzB,EAAaO,YAAYP,EAAayB,YAExCzB,EAAaE,YAAY3B,SAAS6C,eAAejD","file":"systemtags.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n","import './systemtags.js'\nimport './templates.js'\nimport './systemtagmodel.js'\nimport './systemtagsmappingcollection.js'\nimport './systemtagscollection.js'\nimport './systemtagsinputfield.js'\n\nimport '../../css/systemtags.scss'\n","/* eslint-disable */\n/*\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\t/**\n\t * @namespace\n\t */\n\tOC.SystemTags = {\n\t\t/**\n\t\t *\n\t\t * @param {OC.SystemTags.SystemTagModel|Object|String} tag\n\t\t * @returns {jQuery}\n\t\t */\n\t\tgetDescriptiveTag: function(tag) {\n\t\t\tif (_.isUndefined(tag.name) && !_.isUndefined(tag.toJSON)) {\n\t\t\t\ttag = tag.toJSON()\n\t\t\t}\n\n\t\t\tif (_.isUndefined(tag.name)) {\n\t\t\t\treturn $('<span>').addClass('non-existing-tag').text(\n\t\t\t\t\tt('core', 'Non-existing tag #{tag}', {\n\t\t\t\t\t\ttag: tag\n\t\t\t\t\t})\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tvar $span = $('<span>')\n\t\t\t$span.append(escapeHTML(tag.name))\n\n\t\t\tvar scope\n\t\t\tif (!tag.userAssignable) {\n\t\t\t\tscope = t('core', 'restricted')\n\t\t\t}\n\t\t\tif (!tag.userVisible) {\n\t\t\t\t// invisible also implicitly means not assignable\n\t\t\t\tscope = t('core', 'invisible')\n\t\t\t}\n\t\t\tif (scope) {\n\t\t\t\tvar $tag = $('<em>').text(' '\n\t\t\t\t\t+ t('core', '({scope})', {\n\t\t\t\t\t\tscope: scope\n\t\t\t\t\t})\n\t\t\t\t)\n\t\t\t\t$span.append($tag)\n\t\t\t}\n\t\t\treturn $span\n\t\t}\n\t}\n})(OC)\n","(function() {\n var template = Handlebars.template, templates = OC.SystemTags.Templates = OC.SystemTags.Templates || {};\ntemplates['result'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n return \" new-item\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable;\n\n return \"\t\t<span class=\\\"label\\\">\"\n + ((stack1 = ((helper = (helper = helpers.tagMarkup || (depth0 != null ? depth0.tagMarkup : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"</span>\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \"\t\t<span class=\\\"label\\\">\"\n + container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \"\t\t<span class=\\\"systemtags-actions\\\">\\n\t\t\t<a href=\\\"#\\\" class=\\\"rename icon icon-rename\\\" title=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.renameTooltip || (depth0 != null ? depth0.renameTooltip : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"renameTooltip\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></a>\\n\t\t</span>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, options, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", buffer = \n \"<span class=\\\"systemtags-item\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isNew : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" data-id=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"id\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n<span class=\\\"checkmark icon icon-checkmark\\\"></span>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isAdmin : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.program(5, data, 0),\"data\":data})) != null ? stack1 : \"\");\n stack1 = ((helper = (helper = helpers.allowActions || (depth0 != null ? depth0.allowActions : depth0)) != null ? helper : alias3),(options={\"name\":\"allowActions\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data}),(typeof helper === alias4 ? helper.call(alias2,options) : helper));\n if (!helpers.allowActions) { stack1 = container.hooks.blockHelperMissing.call(depth0,stack1,options)}\n if (stack1 != null) { buffer += stack1; }\n return buffer + \"</span>\\n\";\n},\"useData\":true});\ntemplates['result_form'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \"\t\t<a href=\\\"#\\\" class=\\\"delete icon icon-delete\\\" title=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.deleteTooltip || (depth0 != null ? depth0.deleteTooltip : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"deleteTooltip\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></a>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"<form class=\\\"systemtags-rename-form\\\">\\n\t <label class=\\\"hidden-visually\\\" for=\\\"\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-rename-input\\\">\"\n + alias5(((helper = (helper = helpers.renameLabel || (depth0 != null ? depth0.renameLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"renameLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t<input id=\\\"\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-rename-input\\\" type=\\\"text\\\" value=\\\"\"\n + alias5(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isAdmin : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</form>\\n\";\n},\"useData\":true});\ntemplates['selection'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable;\n\n return \"\t<span class=\\\"label\\\">\"\n + ((stack1 = ((helper = (helper = helpers.tagMarkup || (depth0 != null ? depth0.tagMarkup : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"</span>\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \"\t<span class=\\\"label\\\">\"\n + container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isAdmin : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(3, data, 0),\"data\":data})) != null ? stack1 : \"\");\n},\"useData\":true});\n})();","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_FILEID:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}id',\n\t\tPROPERTY_CAN_ASSIGN: '{' + OC.Files.Client.NS_OWNCLOUD + '}can-assign',\n\t\tPROPERTY_DISPLAYNAME:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}display-name',\n\t\tPROPERTY_USERVISIBLE:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}user-visible',\n\t\tPROPERTY_USERASSIGNABLE: '{' + OC.Files.Client.NS_OWNCLOUD + '}user-assignable'\n\t})\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * System tag\n\t *\n\t */\n\tvar SystemTagModel = OC.Backbone.Model.extend(\n\t\t/** @lends OCA.SystemTags.SystemTagModel.prototype */ {\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tdefaults: {\n\t\t\t\tuserVisible: true,\n\t\t\t\tuserAssignable: true,\n\t\t\t\tcanAssign: true\n\t\t\t},\n\n\t\t\tdavProperties: {\n\t\t\t\t'id':\tOC.Files.Client.PROPERTY_FILEID,\n\t\t\t\t'name': OC.Files.Client.PROPERTY_DISPLAYNAME,\n\t\t\t\t'userVisible': OC.Files.Client.PROPERTY_USERVISIBLE,\n\t\t\t\t'userAssignable': OC.Files.Client.PROPERTY_USERASSIGNABLE,\n\t\t\t\t// read-only, effective permissions computed by the server,\n\t\t\t\t'canAssign': OC.Files.Client.PROPERTY_CAN_ASSIGN\n\t\t\t},\n\n\t\t\tparse: function(data) {\n\t\t\t\treturn {\n\t\t\t\t\tid: data.id,\n\t\t\t\t\tname: data.name,\n\t\t\t\t\tuserVisible: data.userVisible === true || data.userVisible === 'true',\n\t\t\t\t\tuserAssignable: data.userAssignable === true || data.userAssignable === 'true',\n\t\t\t\t\tcanAssign: data.canAssign === true || data.canAssign === 'true'\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagModel = SystemTagModel\n})(OC)\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\t/**\n\t * @class OC.SystemTags.SystemTagsMappingCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a an object\n\t *\n\t */\n\tvar SystemTagsMappingCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsMappingCollection.prototype */ {\n\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\t/**\n\t\t * Use PUT instead of PROPPATCH\n\t\t */\n\t\t\tusePUT: true,\n\n\t\t\t/**\n\t\t * Id of the file for which to filter activities by\n\t\t *\n\t\t * @var int\n\t\t */\n\t\t\t_objectId: null,\n\n\t\t\t/**\n\t\t * Type of the object to filter by\n\t\t *\n\t\t * @var string\n\t\t */\n\t\t\t_objectType: 'files',\n\n\t\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\t\turl: function() {\n\t\t\t\treturn OC.linkToRemote('dav') + '/systemtags-relations/' + this._objectType + '/' + this._objectId\n\t\t\t},\n\n\t\t\t/**\n\t\t * Sets the object id to filter by or null for all.\n\t\t *\n\t\t * @param {int} objectId file id or null\n\t\t */\n\t\t\tsetObjectId: function(objectId) {\n\t\t\t\tthis._objectId = objectId\n\t\t\t},\n\n\t\t\t/**\n\t\t * Sets the object type to filter by or null for all.\n\t\t *\n\t\t * @param {int} objectType file id or null\n\t\t */\n\t\t\tsetObjectType: function(objectType) {\n\t\t\t\tthis._objectType = objectType\n\t\t\t},\n\n\t\t\tinitialize: function(models, options) {\n\t\t\t\toptions = options || {}\n\t\t\t\tif (!_.isUndefined(options.objectId)) {\n\t\t\t\t\tthis._objectId = options.objectId\n\t\t\t\t}\n\t\t\t\tif (!_.isUndefined(options.objectType)) {\n\t\t\t\t\tthis._objectType = options.objectType\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetTagIds: function() {\n\t\t\t\treturn this.map(function(model) {\n\t\t\t\t\treturn model.id\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsMappingCollection = SystemTagsMappingCollection\n})(OC)\n","/* eslint-disable */\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\n\tfunction filterFunction(model, term) {\n\t\treturn model.get('name').substr(0, term.length).toLowerCase() === term.toLowerCase()\n\t}\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a file\n\t *\n\t */\n\tvar SystemTagsCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsCollection.prototype */ {\n\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\t\turl: function() {\n\t\t\t\treturn OC.linkToRemote('dav') + '/systemtags/'\n\t\t\t},\n\n\t\t\tfilterByName: function(name) {\n\t\t\t\treturn this.filter(function(model) {\n\t\t\t\t\treturn filterFunction(model, name)\n\t\t\t\t})\n\t\t\t},\n\n\t\t\treset: function() {\n\t\t\t\tthis.fetched = false\n\t\t\t\treturn OC.Backbone.Collection.prototype.reset.apply(this, arguments)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Lazy fetch.\n\t\t * Only fetches once, subsequent calls will directly call the success handler.\n\t\t *\n\t\t * @param options\n\t\t * @param [options.force] true to force fetch even if cached entries exist\n\t\t *\n\t\t * @see Backbone.Collection#fetch\n\t\t */\n\t\t\tfetch: function(options) {\n\t\t\t\tvar self = this\n\t\t\t\toptions = options || {}\n\t\t\t\tif (this.fetched || options.force) {\n\t\t\t\t// directly call handler\n\t\t\t\t\tif (options.success) {\n\t\t\t\t\t\toptions.success(this, null, options)\n\t\t\t\t\t}\n\t\t\t\t\t// trigger sync event\n\t\t\t\t\tthis.trigger('sync', this, null, options)\n\t\t\t\t\treturn Promise.resolve()\n\t\t\t\t}\n\n\t\t\t\tvar success = options.success\n\t\t\t\toptions = _.extend({}, options)\n\t\t\t\toptions.success = function() {\n\t\t\t\t\tself.fetched = true\n\t\t\t\t\tif (success) {\n\t\t\t\t\t\treturn success.apply(this, arguments)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn OC.Backbone.Collection.prototype.fetch.call(this, options)\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsCollection = SystemTagsCollection\n\n\t/**\n\t * @type OC.SystemTags.SystemTagsCollection\n\t */\n\tOC.SystemTags.collection = new OC.SystemTags.SystemTagsCollection()\n})(OC)\n","/* eslint-disable */\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* global Handlebars */\n\n(function(OC) {\n\n\t/**\n\t * @class OC.SystemTags.SystemTagsInputField\n\t * @classdesc\n\t *\n\t * Displays a file's system tags\n\t *\n\t */\n\tvar SystemTagsInputField = OC.Backbone.View.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsInputField.prototype */ {\n\n\t\t\t_rendered: false,\n\n\t\t\t_newTag: null,\n\n\t\t\t_lastUsedTags: [],\n\n\t\t\tclassName: 'systemTagsInputFieldContainer',\n\n\t\t\ttemplate: function(data) {\n\t\t\t\treturn '<input class=\"systemTagsInputField\" type=\"hidden\" name=\"tags\" value=\"\"/>'\n\t\t\t},\n\n\t\t\t/**\n\t\t * Creates a new SystemTagsInputField\n\t\t *\n\t\t * @param {Object} [options]\n\t\t * @param {string} [options.objectType=files] object type for which tags are assigned to\n\t\t * @param {bool} [options.multiple=false] whether to allow selecting multiple tags\n\t\t * @param {bool} [options.allowActions=true] whether tags can be renamed/delete within the dropdown\n\t\t * @param {bool} [options.allowCreate=true] whether new tags can be created\n\t\t * @param {bool} [options.isAdmin=true] whether the user is an administrator\n\t\t * @param {Function} options.initSelection function to convert selection to data\n\t\t */\n\t\t\tinitialize: function(options) {\n\t\t\t\toptions = options || {}\n\n\t\t\t\tthis._multiple = !!options.multiple\n\t\t\t\tthis._allowActions = _.isUndefined(options.allowActions) || !!options.allowActions\n\t\t\t\tthis._allowCreate = _.isUndefined(options.allowCreate) || !!options.allowCreate\n\t\t\t\tthis._isAdmin = !!options.isAdmin\n\n\t\t\t\tif (_.isFunction(options.initSelection)) {\n\t\t\t\t\tthis._initSelection = options.initSelection\n\t\t\t\t}\n\n\t\t\t\tthis.collection = options.collection || OC.SystemTags.collection\n\n\t\t\t\tvar self = this\n\t\t\t\tthis.collection.on('change:name remove', function() {\n\t\t\t\t// refresh selection\n\t\t\t\t\t_.defer(self._refreshSelection)\n\t\t\t\t})\n\n\t\t\t\t_.defer(_.bind(this._getLastUsedTags, this))\n\n\t\t\t\t_.bindAll(\n\t\t\t\t\tthis,\n\t\t\t\t\t'_refreshSelection',\n\t\t\t\t\t'_onClickRenameTag',\n\t\t\t\t\t'_onClickDeleteTag',\n\t\t\t\t\t'_onSelectTag',\n\t\t\t\t\t'_onDeselectTag',\n\t\t\t\t\t'_onSubmitRenameTag'\n\t\t\t\t)\n\t\t\t},\n\n\t\t\t_getLastUsedTags: function() {\n\t\t\t\tvar self = this\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\turl: OC.generateUrl('/apps/systemtags/lastused'),\n\t\t\t\t\tsuccess: function(response) {\n\t\t\t\t\t\tself._lastUsedTags = response\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t * Refreshes the selection, triggering a call to\n\t\t * select2's initSelection\n\t\t */\n\t\t\t_refreshSelection: function() {\n\t\t\t\tthis.$tagsField.select2('val', this.$tagsField.val())\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever the user clicked the \"rename\" action.\n\t\t * This will display the rename field.\n\t\t */\n\t\t\t_onClickRenameTag: function(ev) {\n\t\t\t\tvar $item = $(ev.target).closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tvar tagModel = this.collection.get(tagId)\n\n\t\t\t\tvar oldName = tagModel.get('name')\n\t\t\t\tvar $renameForm = $(OC.SystemTags.Templates['result_form']({\n\t\t\t\t\tcid: this.cid,\n\t\t\t\t\tname: oldName,\n\t\t\t\t\tdeleteTooltip: t('core', 'Delete'),\n\t\t\t\t\trenameLabel: t('core', 'Rename'),\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}))\n\t\t\t\t$item.find('.label').after($renameForm)\n\t\t\t\t$item.find('.label, .systemtags-actions').addClass('hidden')\n\t\t\t\t$item.closest('.select2-result').addClass('has-form')\n\n\t\t\t\t$renameForm.find('[title]').tooltip({\n\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\tcontainer: 'body'\n\t\t\t\t})\n\t\t\t\t$renameForm.find('input').focus().selectRange(0, oldName.length)\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever the rename form has been submitted after\n\t\t * the user entered a new tag name.\n\t\t * This will submit the change to the server.\n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t\t_onSubmitRenameTag: function(ev) {\n\t\t\t\tev.preventDefault()\n\t\t\t\tvar $form = $(ev.target)\n\t\t\t\tvar $item = $form.closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tvar tagModel = this.collection.get(tagId)\n\t\t\t\tvar newName = $(ev.target).find('input').val().trim()\n\t\t\t\tif (newName && newName !== tagModel.get('name')) {\n\t\t\t\t\ttagModel.save({ 'name': newName })\n\t\t\t\t\t// TODO: spinner, and only change text after finished saving\n\t\t\t\t\t$item.find('.label').text(newName)\n\t\t\t\t}\n\t\t\t\t$item.find('.label, .systemtags-actions').removeClass('hidden')\n\t\t\t\t$form.remove()\n\t\t\t\t$item.closest('.select2-result').removeClass('has-form')\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag must be deleted\n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t\t_onClickDeleteTag: function(ev) {\n\t\t\t\tvar $item = $(ev.target).closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tthis.collection.get(tagId).destroy()\n\t\t\t\t$(ev.target).tooltip('hide')\n\t\t\t\t$item.closest('.select2-result').remove()\n\t\t\t\t// TODO: spinner\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t_addToSelect2Selection: function(selection) {\n\t\t\t\tvar data = this.$tagsField.select2('data')\n\t\t\t\tdata.push(selection)\n\t\t\t\tthis.$tagsField.select2('data', data)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag is selected.\n\t\t * Also called whenever tag creation is requested through the dummy tag object.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t\t_onSelectTag: function(e) {\n\t\t\t\tvar self = this\n\t\t\t\tvar tag\n\t\t\t\tif (e.object && e.object.isNew) {\n\t\t\t\t// newly created tag, check if existing\n\t\t\t\t// create a new tag\n\t\t\t\t\ttag = this.collection.create({\n\t\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\t\tcanAssign: true\n\t\t\t\t\t}, {\n\t\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON())\n\t\t\t\t\t\t\tself._lastUsedTags.unshift(model.id)\n\t\t\t\t\t\t\tself.trigger('select', model)\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: function(model, xhr) {\n\t\t\t\t\t\t\tif (xhr.status === 409) {\n\t\t\t\t\t\t\t// re-fetch collection to get the missing tag\n\t\t\t\t\t\t\t\tself.collection.reset()\n\t\t\t\t\t\t\t\tself.collection.fetch({\n\t\t\t\t\t\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\t\t\t\t\t// find the tag in the collection\n\t\t\t\t\t\t\t\t\t\tvar model = collection.where({\n\t\t\t\t\t\t\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\t\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\t\t\t\t\t\tuserAssignable: true\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\tif (model.length) {\n\t\t\t\t\t\t\t\t\t\t\tmodel = model[0]\n\t\t\t\t\t\t\t\t\t\t\t// the tag already exists or was already assigned,\n\t\t\t\t\t\t\t\t\t\t\t// add it to the list anyway\n\t\t\t\t\t\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON())\n\t\t\t\t\t\t\t\t\t\t\tself.trigger('select', model)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tthis.$tagsField.select2('close')\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\treturn false\n\t\t\t\t} else {\n\t\t\t\t\ttag = this.collection.get(e.object.id)\n\t\t\t\t\tthis._lastUsedTags.unshift(tag.id)\n\t\t\t\t}\n\t\t\t\tthis._newTag = null\n\t\t\t\tthis.trigger('select', tag)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag gets deselected.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t\t_onDeselectTag: function(e) {\n\t\t\t\tthis.trigger('deselect', e.choice.id)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Autocomplete function for dropdown results\n\t\t *\n\t\t * @param {Object} query select2 query object\n\t\t */\n\t\t\t_queryTagsAutocomplete: function(query) {\n\t\t\t\tvar self = this\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\t\tvar tagModels = collection.filterByName(query.term.trim())\n\t\t\t\t\t\tif (!self._isAdmin) {\n\t\t\t\t\t\t\ttagModels = _.filter(tagModels, function(tagModel) {\n\t\t\t\t\t\t\t\treturn tagModel.get('canAssign')\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t\tquery.callback({\n\t\t\t\t\t\t\tresults: _.invoke(tagModels, 'toJSON')\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t_preventDefault: function(e) {\n\t\t\t\te.stopPropagation()\n\t\t\t},\n\n\t\t\t/**\n\t\t * Formats a single dropdown result\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @returns {string} HTML markup\n\t\t */\n\t\t\t_formatDropDownResult: function(data) {\n\t\t\t\treturn OC.SystemTags.Templates['result'](_.extend({\n\t\t\t\t\trenameTooltip: t('core', 'Rename'),\n\t\t\t\t\tallowActions: this._allowActions,\n\t\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data)[0].innerHTML : null,\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}, data))\n\t\t\t},\n\n\t\t\t/**\n\t\t * Formats a single selection item\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @returns {string} HTML markup\n\t\t */\n\t\t\t_formatSelection: function(data) {\n\t\t\t\treturn OC.SystemTags.Templates['selection'](_.extend({\n\t\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data)[0].innerHTML : null,\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}, data))\n\t\t\t},\n\n\t\t\t/**\n\t\t * Create new dummy choice for select2 when the user\n\t\t * types an arbitrary string\n\t\t *\n\t\t * @param {string} term entered term\n\t\t * @returns {Object} dummy tag\n\t\t */\n\t\t\t_createSearchChoice: function(term) {\n\t\t\t\tterm = term.trim()\n\t\t\t\tif (this.collection.filter(function(entry) {\n\t\t\t\t\treturn entry.get('name') === term\n\t\t\t\t}).length) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (!this._newTag) {\n\t\t\t\t\tthis._newTag = {\n\t\t\t\t\t\tid: -1,\n\t\t\t\t\t\tname: term,\n\t\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\tcanAssign: true,\n\t\t\t\t\t\tisNew: true\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis._newTag.name = term\n\t\t\t\t}\n\n\t\t\t\treturn this._newTag\n\t\t\t},\n\n\t\t\t_initSelection: function(element, callback) {\n\t\t\t\tvar self = this\n\t\t\t\tvar ids = $(element).val().split(',')\n\n\t\t\t\tfunction modelToSelection(model) {\n\t\t\t\t\tvar data = model.toJSON()\n\t\t\t\t\tif (!self._isAdmin && !data.canAssign) {\n\t\t\t\t\t// lock static tags for non-admins\n\t\t\t\t\t\tdata.locked = true\n\t\t\t\t\t}\n\t\t\t\t\treturn data\n\t\t\t\t}\n\n\t\t\t\tfunction findSelectedObjects(ids) {\n\t\t\t\t\tvar selectedModels = self.collection.filter(function(model) {\n\t\t\t\t\t\treturn ids.indexOf(model.id) >= 0 && (self._isAdmin || model.get('userVisible'))\n\t\t\t\t\t})\n\t\t\t\t\treturn _.map(selectedModels, modelToSelection)\n\t\t\t\t}\n\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\tcallback(findSelectedObjects(ids))\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t * Renders this details view\n\t\t */\n\t\t\trender: function() {\n\t\t\t\tvar self = this\n\t\t\t\tthis.$el.html(this.template())\n\n\t\t\t\tthis.$el.find('[title]').tooltip({ placement: 'bottom' })\n\t\t\t\tthis.$tagsField = this.$el.find('[name=tags]')\n\t\t\t\tthis.$tagsField.select2({\n\t\t\t\t\tplaceholder: t('core', 'Collaborative tags'),\n\t\t\t\t\tcontainerCssClass: 'systemtags-select2-container',\n\t\t\t\t\tdropdownCssClass: 'systemtags-select2-dropdown',\n\t\t\t\t\tcloseOnSelect: false,\n\t\t\t\t\tallowClear: false,\n\t\t\t\t\tmultiple: this._multiple,\n\t\t\t\t\ttoggleSelect: this._multiple,\n\t\t\t\t\tquery: _.bind(this._queryTagsAutocomplete, this),\n\t\t\t\t\tid: function(tag) {\n\t\t\t\t\t\treturn tag.id\n\t\t\t\t\t},\n\t\t\t\t\tinitSelection: _.bind(this._initSelection, this),\n\t\t\t\t\tformatResult: _.bind(this._formatDropDownResult, this),\n\t\t\t\t\tformatSelection: _.bind(this._formatSelection, this),\n\t\t\t\t\tcreateSearchChoice: this._allowCreate ? _.bind(this._createSearchChoice, this) : undefined,\n\t\t\t\t\tsortResults: function(results) {\n\t\t\t\t\t\tvar selectedItems = _.pluck(self.$tagsField.select2('data'), 'id')\n\t\t\t\t\t\tresults.sort(function(a, b) {\n\t\t\t\t\t\t\tvar aSelected = selectedItems.indexOf(a.id) >= 0\n\t\t\t\t\t\t\tvar bSelected = selectedItems.indexOf(b.id) >= 0\n\t\t\t\t\t\t\tif (aSelected === bSelected) {\n\t\t\t\t\t\t\t\tvar aLastUsed = self._lastUsedTags.indexOf(a.id)\n\t\t\t\t\t\t\t\tvar bLastUsed = self._lastUsedTags.indexOf(b.id)\n\n\t\t\t\t\t\t\t\tif (aLastUsed !== bLastUsed) {\n\t\t\t\t\t\t\t\t\tif (bLastUsed === -1) {\n\t\t\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (aLastUsed === -1) {\n\t\t\t\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn aLastUsed < bLastUsed ? -1 : 1\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Both not found\n\t\t\t\t\t\t\t\treturn OC.Util.naturalSortCompare(a.name, b.name)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (aSelected && !bSelected) {\n\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t})\n\t\t\t\t\t\treturn results\n\t\t\t\t\t},\n\t\t\t\t\tformatNoMatches: function() {\n\t\t\t\t\t\treturn t('core', 'No tags found')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t\t.on('select2-selecting', this._onSelectTag)\n\t\t\t\t\t.on('select2-removing', this._onDeselectTag)\n\n\t\t\t\tvar $dropDown = this.$tagsField.select2('dropdown')\n\t\t\t\t// register events for inside the dropdown\n\t\t\t\t$dropDown.on('mouseup', '.rename', this._onClickRenameTag)\n\t\t\t\t$dropDown.on('mouseup', '.delete', this._onClickDeleteTag)\n\t\t\t\t$dropDown.on('mouseup', '.select2-result-selectable.has-form', this._preventDefault)\n\t\t\t\t$dropDown.on('submit', '.systemtags-rename-form', this._onSubmitRenameTag)\n\n\t\t\t\tthis.delegateEvents()\n\t\t\t},\n\n\t\t\tremove: function() {\n\t\t\t\tif (this.$tagsField) {\n\t\t\t\t\tthis.$tagsField.select2('destroy')\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetValues: function() {\n\t\t\t\tthis.$tagsField.select2('val')\n\t\t\t},\n\n\t\t\tsetValues: function(values) {\n\t\t\t\tthis.$tagsField.select2('val', values)\n\t\t\t},\n\n\t\t\tsetData: function(data) {\n\t\t\t\tthis.$tagsField.select2('data', data)\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsInputField = SystemTagsInputField\n\n})(OC)\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./systemtags.scss\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"bdf318e0\", content, true, {});","exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemTagsInfoView,.systemtags-select2-container{width:100%}.systemTagsInfoView .select2-choices .select2-search-choice.select2-locked .label,.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:0.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}\\n\", \"\"]);\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \"{\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = modules[_i]; // skip already imported module\n // this implementation is not 100% perfect for weird media query combinations\n // when a module is imported multiple times with different media queries.\n // I hope this will never occur (Hey this way we have smaller bundles)\n\n if (item[0] == null || !alreadyImportedModules[item[0]]) {\n if (mediaQuery && !item[2]) {\n item[2] = mediaQuery;\n } else if (mediaQuery) {\n item[2] = \"(\".concat(item[2], \") and (\").concat(mediaQuery, \")\");\n }\n\n list.push(item);\n }\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot).concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","/**\n * Translates the list format produced by css-loader into something\n * easier to manipulate.\n */\nexport default function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}\n","/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n Modified by Evan You @yyx990803\n*/\n\nimport listToStyles from './listToStyles'\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n if (!hasDocument) {\n throw new Error(\n 'vue-style-loader cannot be used in a non-browser environment. ' +\n \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n ) }\n}\n\n/*\ntype StyleObject = {\n id: number;\n parts: Array<StyleObjectPart>\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n// tags it will allow on a page\nvar isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase())\n\nexport default function addStylesClient (parentId, list, _isProduction, _options) {\n isProduction = _isProduction\n\n options = _options || {}\n\n var styles = listToStyles(parentId, list)\n addStylesToDom(styles)\n\n return function update (newList) {\n var mayRemove = []\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n domStyle.refs--\n mayRemove.push(domStyle)\n }\n if (newList) {\n styles = listToStyles(parentId, newList)\n addStylesToDom(styles)\n } else {\n styles = []\n }\n for (var i = 0; i < mayRemove.length; i++) {\n var domStyle = mayRemove[i]\n if (domStyle.refs === 0) {\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j]()\n }\n delete stylesInDom[domStyle.id]\n }\n }\n }\n}\n\nfunction addStylesToDom (styles /* Array<StyleObject> */) {\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n if (domStyle) {\n domStyle.refs++\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j](item.parts[j])\n }\n for (; j < item.parts.length; j++) {\n domStyle.parts.push(addStyle(item.parts[j]))\n }\n if (domStyle.parts.length > item.parts.length) {\n domStyle.parts.length = item.parts.length\n }\n } else {\n var parts = []\n for (var j = 0; j < item.parts.length; j++) {\n parts.push(addStyle(item.parts[j]))\n }\n stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }\n }\n }\n}\n\nfunction createStyleElement () {\n var styleElement = document.createElement('style')\n styleElement.type = 'text/css'\n head.appendChild(styleElement)\n return styleElement\n}\n\nfunction addStyle (obj /* StyleObjectPart */) {\n var update, remove\n var styleElement = document.querySelector('style[' + ssrIdKey + '~=\"' + obj.id + '\"]')\n\n if (styleElement) {\n if (isProduction) {\n // has SSR styles and in production mode.\n // simply do nothing.\n return noop\n } else {\n // has SSR styles but in dev mode.\n // for some reason Chrome can't handle source map in server-rendered\n // style tags - source maps in <style> only works if the style tag is\n // created and inserted dynamically. So we remove the server rendered\n // styles and inject new ones.\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n if (isOldIE) {\n // use singleton mode for IE9.\n var styleIndex = singletonCounter++\n styleElement = singletonElement || (singletonElement = createStyleElement())\n update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)\n remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)\n } else {\n // use multi-style-tag mode in all other cases\n styleElement = createStyleElement()\n update = applyToTag.bind(null, styleElement)\n remove = function () {\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n update(obj)\n\n return function updateStyle (newObj /* StyleObjectPart */) {\n if (newObj) {\n if (newObj.css === obj.css &&\n newObj.media === obj.media &&\n newObj.sourceMap === obj.sourceMap) {\n return\n }\n update(obj = newObj)\n } else {\n remove()\n }\n }\n}\n\nvar replaceText = (function () {\n var textStore = []\n\n return function (index, replacement) {\n textStore[index] = replacement\n return textStore.filter(Boolean).join('\\n')\n }\n})()\n\nfunction applyToSingletonTag (styleElement, index, remove, obj) {\n var css = remove ? '' : obj.css\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css)\n } else {\n var cssNode = document.createTextNode(css)\n var childNodes = styleElement.childNodes\n if (childNodes[index]) styleElement.removeChild(childNodes[index])\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index])\n } else {\n styleElement.appendChild(cssNode)\n }\n }\n}\n\nfunction applyToTag (styleElement, obj) {\n var css = obj.css\n var media = obj.media\n var sourceMap = obj.sourceMap\n\n if (media) {\n styleElement.setAttribute('media', media)\n }\n if (options.ssrId) {\n styleElement.setAttribute(ssrIdKey, obj.id)\n }\n\n if (sourceMap) {\n // https://developer.chrome.com/devtools/docs/javascript-debugging\n // this makes source maps inside style tags work properly in Chrome\n css += '\\n/*# sourceURL=' + sourceMap.sources[0] + ' */'\n // http://stackoverflow.com/a/26603875\n css += '\\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'\n }\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild)\n }\n styleElement.appendChild(document.createTextNode(css))\n }\n}\n"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./core/js/systemtags/merged-systemtags.js","webpack:///./core/js/systemtags/systemtags.js","webpack:///./core/js/systemtags/templates.js","webpack:///./core/js/systemtags/systemtagmodel.js","webpack:///./core/js/systemtags/systemtagsmappingcollection.js","webpack:///./core/js/systemtags/systemtagscollection.js","webpack:///./core/js/systemtags/systemtagsinputfield.js","webpack:///./core/css/systemtags.scss?456a","webpack:///./core/css/systemtags.scss","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/vue-style-loader/lib/listToStyles.js","webpack:///./node_modules/vue-style-loader/lib/addStylesClient.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","OC","SystemTags","getDescriptiveTag","tag","_","isUndefined","toJSON","$","addClass","text","scope","$span","append","escapeHTML","userAssignable","userVisible","$tag","template","templates","Handlebars","Templates","container","depth0","helpers","partials","data","stack1","helper","propertyIsEnumerable","tagMarkup","hooks","helperMissing","nullContext","escapeExpression","renameTooltip","options","alias2","alias3","buffer","isNew","program","noop","id","isAdmin","allowActions","blockHelperMissing","deleteTooltip","alias5","cid","renameLabel","extend","Files","Client","PROPERTY_FILEID","NS_OWNCLOUD","PROPERTY_CAN_ASSIGN","PROPERTY_DISPLAYNAME","PROPERTY_USERVISIBLE","PROPERTY_USERASSIGNABLE","SystemTagModel","Backbone","Model","sync","davSync","defaults","canAssign","davProperties","parse","SystemTagsMappingCollection","Collection","usePUT","_objectId","_objectType","model","url","linkToRemote","this","setObjectId","objectId","setObjectType","objectType","initialize","models","getTagIds","map","SystemTagsCollection","filterByName","filter","term","substr","length","toLowerCase","filterFunction","reset","fetched","apply","arguments","fetch","self","force","success","trigger","Promise","resolve","collection","SystemTagsInputField","View","_rendered","_newTag","_lastUsedTags","className","_multiple","multiple","_allowActions","_allowCreate","allowCreate","_isAdmin","isFunction","initSelection","_initSelection","on","defer","_refreshSelection","_getLastUsedTags","bindAll","ajax","type","generateUrl","response","$tagsField","select2","val","_onClickRenameTag","ev","$item","target","closest","tagId","attr","oldName","$renameForm","find","after","tooltip","placement","focus","selectRange","_onSubmitRenameTag","preventDefault","$form","tagModel","newName","trim","save","removeClass","remove","_onClickDeleteTag","destroy","_addToSelect2Selection","selection","push","_onSelectTag","e","unshift","error","xhr","status","where","_onDeselectTag","choice","_queryTagsAutocomplete","query","tagModels","callback","results","invoke","_preventDefault","stopPropagation","_formatDropDownResult","innerHTML","_formatSelection","_createSearchChoice","entry","element","ids","split","modelToSelection","locked","selectedModels","indexOf","findSelectedObjects","render","$el","html","placeholder","containerCssClass","dropdownCssClass","closeOnSelect","allowClear","toggleSelect","formatResult","formatSelection","createSearchChoice","undefined","sortResults","selectedItems","pluck","sort","a","b","aSelected","bSelected","aLastUsed","bLastUsed","Util","naturalSortCompare","formatNoMatches","$dropDown","delegateEvents","getValues","setValues","values","setData","content","locals","add","default","useSourceMap","list","toString","item","cssMapping","btoa","sourceMapping","sourceMap","base64","unescape","encodeURIComponent","JSON","stringify","concat","sourceURLs","sources","source","sourceRoot","join","cssWithMappingToString","mediaQuery","alreadyImportedModules","_i","listToStyles","parentId","styles","newStyles","part","css","media","parts","hasDocument","document","DEBUG","Error","stylesInDom","head","getElementsByTagName","singletonElement","singletonCounter","isProduction","ssrIdKey","isOldIE","navigator","test","userAgent","addStylesClient","_isProduction","_options","addStylesToDom","newList","mayRemove","domStyle","refs","j","addStyle","createStyleElement","styleElement","createElement","appendChild","obj","update","querySelector","parentNode","removeChild","styleIndex","applyToSingletonTag","applyToTag","newObj","textStore","replaceText","index","replacement","Boolean","styleSheet","cssText","cssNode","createTextNode","childNodes","insertBefore","setAttribute","ssrId","firstChild"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,EAAo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AAavC,EAAUmB,EAAIrP,IAGtCgM,IAGFqB,GAAO,mBAAqBrB,EAAUQ,QAAQ,GAAK,MAEnDa,GAAO,uDAAyDvB,KAAKI,SAASC,mBAAmBC,KAAKC,UAAUL,MAAgB,OAG9HkD,EAAaiB,WACfjB,EAAaiB,WAAWC,QAAU/C,MAC7B,CACL,KAAO6B,EAAayB,YAClBzB,EAAaO,YAAYP,EAAayB,YAExCzB,EAAaE,YAAY3B,SAAS6C,eAAejD","file":"systemtags.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import './systemtags.js'\nimport './templates.js'\nimport './systemtagmodel.js'\nimport './systemtagsmappingcollection.js'\nimport './systemtagscollection.js'\nimport './systemtagsinputfield.js'\n\nimport '../../css/systemtags.scss'\n","/* eslint-disable */\n/*\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\t/**\n\t * @namespace\n\t */\n\tOC.SystemTags = {\n\t\t/**\n\t\t *\n\t\t * @param {OC.SystemTags.SystemTagModel|Object|String} tag\n\t\t * @returns {jQuery}\n\t\t */\n\t\tgetDescriptiveTag: function(tag) {\n\t\t\tif (_.isUndefined(tag.name) && !_.isUndefined(tag.toJSON)) {\n\t\t\t\ttag = tag.toJSON()\n\t\t\t}\n\n\t\t\tif (_.isUndefined(tag.name)) {\n\t\t\t\treturn $('<span>').addClass('non-existing-tag').text(\n\t\t\t\t\tt('core', 'Non-existing tag #{tag}', {\n\t\t\t\t\t\ttag: tag\n\t\t\t\t\t})\n\t\t\t\t)\n\t\t\t}\n\n\t\t\tvar $span = $('<span>')\n\t\t\t$span.append(escapeHTML(tag.name))\n\n\t\t\tvar scope\n\t\t\tif (!tag.userAssignable) {\n\t\t\t\tscope = t('core', 'restricted')\n\t\t\t}\n\t\t\tif (!tag.userVisible) {\n\t\t\t\t// invisible also implicitly means not assignable\n\t\t\t\tscope = t('core', 'invisible')\n\t\t\t}\n\t\t\tif (scope) {\n\t\t\t\tvar $tag = $('<em>').text(' '\n\t\t\t\t\t+ t('core', '({scope})', {\n\t\t\t\t\t\tscope: scope\n\t\t\t\t\t})\n\t\t\t\t)\n\t\t\t\t$span.append($tag)\n\t\t\t}\n\t\t\treturn $span\n\t\t}\n\t}\n})(OC)\n","(function() {\n var template = Handlebars.template, templates = OC.SystemTags.Templates = OC.SystemTags.Templates || {};\ntemplates['result'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n return \" new-item\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable;\n\n return \"\t\t<span class=\\\"label\\\">\"\n + ((stack1 = ((helper = (helper = helpers.tagMarkup || (depth0 != null ? depth0.tagMarkup : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"</span>\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \"\t\t<span class=\\\"label\\\">\"\n + container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \"\t\t<span class=\\\"systemtags-actions\\\">\\n\t\t\t<a href=\\\"#\\\" class=\\\"rename icon icon-rename\\\" title=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.renameTooltip || (depth0 != null ? depth0.renameTooltip : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"renameTooltip\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></a>\\n\t\t</span>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, options, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", buffer = \n \"<span class=\\\"systemtags-item\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isNew : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" data-id=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"id\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n<span class=\\\"checkmark icon icon-checkmark\\\"></span>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isAdmin : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.program(5, data, 0),\"data\":data})) != null ? stack1 : \"\");\n stack1 = ((helper = (helper = helpers.allowActions || (depth0 != null ? depth0.allowActions : depth0)) != null ? helper : alias3),(options={\"name\":\"allowActions\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data}),(typeof helper === alias4 ? helper.call(alias2,options) : helper));\n if (!helpers.allowActions) { stack1 = container.hooks.blockHelperMissing.call(depth0,stack1,options)}\n if (stack1 != null) { buffer += stack1; }\n return buffer + \"</span>\\n\";\n},\"useData\":true});\ntemplates['result_form'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \"\t\t<a href=\\\"#\\\" class=\\\"delete icon icon-delete\\\" title=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.deleteTooltip || (depth0 != null ? depth0.deleteTooltip : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"deleteTooltip\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></a>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4=\"function\", alias5=container.escapeExpression;\n\n return \"<form class=\\\"systemtags-rename-form\\\">\\n\t <label class=\\\"hidden-visually\\\" for=\\\"\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-rename-input\\\">\"\n + alias5(((helper = (helper = helpers.renameLabel || (depth0 != null ? depth0.renameLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"renameLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t<input id=\\\"\"\n + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-rename-input\\\" type=\\\"text\\\" value=\\\"\"\n + alias5(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.isAdmin : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</form>\\n\";\n},\"useData\":true});\ntemplates['selection'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=container.propertyIsEnumerable;\n\n return \"\t<span class=\\\"label\\\">\"\n + ((stack1 = ((helper = (helper = helpers.tagMarkup || (depth0 != null ? depth0.tagMarkup : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"</span>\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \"\t<span class=\\\"label\\\">\"\n + container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isAdmin : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(3, data, 0),\"data\":data})) != null ? stack1 : \"\");\n},\"useData\":true});\n})();","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_FILEID:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}id',\n\t\tPROPERTY_CAN_ASSIGN: '{' + OC.Files.Client.NS_OWNCLOUD + '}can-assign',\n\t\tPROPERTY_DISPLAYNAME:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}display-name',\n\t\tPROPERTY_USERVISIBLE:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}user-visible',\n\t\tPROPERTY_USERASSIGNABLE: '{' + OC.Files.Client.NS_OWNCLOUD + '}user-assignable'\n\t})\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * System tag\n\t *\n\t */\n\tvar SystemTagModel = OC.Backbone.Model.extend(\n\t\t/** @lends OCA.SystemTags.SystemTagModel.prototype */ {\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tdefaults: {\n\t\t\t\tuserVisible: true,\n\t\t\t\tuserAssignable: true,\n\t\t\t\tcanAssign: true\n\t\t\t},\n\n\t\t\tdavProperties: {\n\t\t\t\t'id':\tOC.Files.Client.PROPERTY_FILEID,\n\t\t\t\t'name': OC.Files.Client.PROPERTY_DISPLAYNAME,\n\t\t\t\t'userVisible': OC.Files.Client.PROPERTY_USERVISIBLE,\n\t\t\t\t'userAssignable': OC.Files.Client.PROPERTY_USERASSIGNABLE,\n\t\t\t\t// read-only, effective permissions computed by the server,\n\t\t\t\t'canAssign': OC.Files.Client.PROPERTY_CAN_ASSIGN\n\t\t\t},\n\n\t\t\tparse: function(data) {\n\t\t\t\treturn {\n\t\t\t\t\tid: data.id,\n\t\t\t\t\tname: data.name,\n\t\t\t\t\tuserVisible: data.userVisible === true || data.userVisible === 'true',\n\t\t\t\t\tuserAssignable: data.userAssignable === true || data.userAssignable === 'true',\n\t\t\t\t\tcanAssign: data.canAssign === true || data.canAssign === 'true'\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagModel = SystemTagModel\n})(OC)\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\t/**\n\t * @class OC.SystemTags.SystemTagsMappingCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a an object\n\t *\n\t */\n\tvar SystemTagsMappingCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsMappingCollection.prototype */ {\n\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\t/**\n\t\t * Use PUT instead of PROPPATCH\n\t\t */\n\t\t\tusePUT: true,\n\n\t\t\t/**\n\t\t * Id of the file for which to filter activities by\n\t\t *\n\t\t * @var int\n\t\t */\n\t\t\t_objectId: null,\n\n\t\t\t/**\n\t\t * Type of the object to filter by\n\t\t *\n\t\t * @var string\n\t\t */\n\t\t\t_objectType: 'files',\n\n\t\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\t\turl: function() {\n\t\t\t\treturn OC.linkToRemote('dav') + '/systemtags-relations/' + this._objectType + '/' + this._objectId\n\t\t\t},\n\n\t\t\t/**\n\t\t * Sets the object id to filter by or null for all.\n\t\t *\n\t\t * @param {int} objectId file id or null\n\t\t */\n\t\t\tsetObjectId: function(objectId) {\n\t\t\t\tthis._objectId = objectId\n\t\t\t},\n\n\t\t\t/**\n\t\t * Sets the object type to filter by or null for all.\n\t\t *\n\t\t * @param {int} objectType file id or null\n\t\t */\n\t\t\tsetObjectType: function(objectType) {\n\t\t\t\tthis._objectType = objectType\n\t\t\t},\n\n\t\t\tinitialize: function(models, options) {\n\t\t\t\toptions = options || {}\n\t\t\t\tif (!_.isUndefined(options.objectId)) {\n\t\t\t\t\tthis._objectId = options.objectId\n\t\t\t\t}\n\t\t\t\tif (!_.isUndefined(options.objectType)) {\n\t\t\t\t\tthis._objectType = options.objectType\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetTagIds: function() {\n\t\t\t\treturn this.map(function(model) {\n\t\t\t\t\treturn model.id\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsMappingCollection = SystemTagsMappingCollection\n})(OC)\n","/* eslint-disable */\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\n\tfunction filterFunction(model, term) {\n\t\treturn model.get('name').substr(0, term.length).toLowerCase() === term.toLowerCase()\n\t}\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a file\n\t *\n\t */\n\tvar SystemTagsCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsCollection.prototype */ {\n\n\t\t\tsync: OC.Backbone.davSync,\n\n\t\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\t\turl: function() {\n\t\t\t\treturn OC.linkToRemote('dav') + '/systemtags/'\n\t\t\t},\n\n\t\t\tfilterByName: function(name) {\n\t\t\t\treturn this.filter(function(model) {\n\t\t\t\t\treturn filterFunction(model, name)\n\t\t\t\t})\n\t\t\t},\n\n\t\t\treset: function() {\n\t\t\t\tthis.fetched = false\n\t\t\t\treturn OC.Backbone.Collection.prototype.reset.apply(this, arguments)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Lazy fetch.\n\t\t * Only fetches once, subsequent calls will directly call the success handler.\n\t\t *\n\t\t * @param options\n\t\t * @param [options.force] true to force fetch even if cached entries exist\n\t\t *\n\t\t * @see Backbone.Collection#fetch\n\t\t */\n\t\t\tfetch: function(options) {\n\t\t\t\tvar self = this\n\t\t\t\toptions = options || {}\n\t\t\t\tif (this.fetched || options.force) {\n\t\t\t\t// directly call handler\n\t\t\t\t\tif (options.success) {\n\t\t\t\t\t\toptions.success(this, null, options)\n\t\t\t\t\t}\n\t\t\t\t\t// trigger sync event\n\t\t\t\t\tthis.trigger('sync', this, null, options)\n\t\t\t\t\treturn Promise.resolve()\n\t\t\t\t}\n\n\t\t\t\tvar success = options.success\n\t\t\t\toptions = _.extend({}, options)\n\t\t\t\toptions.success = function() {\n\t\t\t\t\tself.fetched = true\n\t\t\t\t\tif (success) {\n\t\t\t\t\t\treturn success.apply(this, arguments)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn OC.Backbone.Collection.prototype.fetch.call(this, options)\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsCollection = SystemTagsCollection\n\n\t/**\n\t * @type OC.SystemTags.SystemTagsCollection\n\t */\n\tOC.SystemTags.collection = new OC.SystemTags.SystemTagsCollection()\n})(OC)\n","/* eslint-disable */\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* global Handlebars */\n\n(function(OC) {\n\n\t/**\n\t * @class OC.SystemTags.SystemTagsInputField\n\t * @classdesc\n\t *\n\t * Displays a file's system tags\n\t *\n\t */\n\tvar SystemTagsInputField = OC.Backbone.View.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsInputField.prototype */ {\n\n\t\t\t_rendered: false,\n\n\t\t\t_newTag: null,\n\n\t\t\t_lastUsedTags: [],\n\n\t\t\tclassName: 'systemTagsInputFieldContainer',\n\n\t\t\ttemplate: function(data) {\n\t\t\t\treturn '<input class=\"systemTagsInputField\" type=\"hidden\" name=\"tags\" value=\"\"/>'\n\t\t\t},\n\n\t\t\t/**\n\t\t * Creates a new SystemTagsInputField\n\t\t *\n\t\t * @param {Object} [options]\n\t\t * @param {string} [options.objectType=files] object type for which tags are assigned to\n\t\t * @param {bool} [options.multiple=false] whether to allow selecting multiple tags\n\t\t * @param {bool} [options.allowActions=true] whether tags can be renamed/delete within the dropdown\n\t\t * @param {bool} [options.allowCreate=true] whether new tags can be created\n\t\t * @param {bool} [options.isAdmin=true] whether the user is an administrator\n\t\t * @param {Function} options.initSelection function to convert selection to data\n\t\t */\n\t\t\tinitialize: function(options) {\n\t\t\t\toptions = options || {}\n\n\t\t\t\tthis._multiple = !!options.multiple\n\t\t\t\tthis._allowActions = _.isUndefined(options.allowActions) || !!options.allowActions\n\t\t\t\tthis._allowCreate = _.isUndefined(options.allowCreate) || !!options.allowCreate\n\t\t\t\tthis._isAdmin = !!options.isAdmin\n\n\t\t\t\tif (_.isFunction(options.initSelection)) {\n\t\t\t\t\tthis._initSelection = options.initSelection\n\t\t\t\t}\n\n\t\t\t\tthis.collection = options.collection || OC.SystemTags.collection\n\n\t\t\t\tvar self = this\n\t\t\t\tthis.collection.on('change:name remove', function() {\n\t\t\t\t// refresh selection\n\t\t\t\t\t_.defer(self._refreshSelection)\n\t\t\t\t})\n\n\t\t\t\t_.defer(_.bind(this._getLastUsedTags, this))\n\n\t\t\t\t_.bindAll(\n\t\t\t\t\tthis,\n\t\t\t\t\t'_refreshSelection',\n\t\t\t\t\t'_onClickRenameTag',\n\t\t\t\t\t'_onClickDeleteTag',\n\t\t\t\t\t'_onSelectTag',\n\t\t\t\t\t'_onDeselectTag',\n\t\t\t\t\t'_onSubmitRenameTag'\n\t\t\t\t)\n\t\t\t},\n\n\t\t\t_getLastUsedTags: function() {\n\t\t\t\tvar self = this\n\t\t\t\t$.ajax({\n\t\t\t\t\ttype: 'GET',\n\t\t\t\t\turl: OC.generateUrl('/apps/systemtags/lastused'),\n\t\t\t\t\tsuccess: function(response) {\n\t\t\t\t\t\tself._lastUsedTags = response\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t * Refreshes the selection, triggering a call to\n\t\t * select2's initSelection\n\t\t */\n\t\t\t_refreshSelection: function() {\n\t\t\t\tthis.$tagsField.select2('val', this.$tagsField.val())\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever the user clicked the \"rename\" action.\n\t\t * This will display the rename field.\n\t\t */\n\t\t\t_onClickRenameTag: function(ev) {\n\t\t\t\tvar $item = $(ev.target).closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tvar tagModel = this.collection.get(tagId)\n\n\t\t\t\tvar oldName = tagModel.get('name')\n\t\t\t\tvar $renameForm = $(OC.SystemTags.Templates['result_form']({\n\t\t\t\t\tcid: this.cid,\n\t\t\t\t\tname: oldName,\n\t\t\t\t\tdeleteTooltip: t('core', 'Delete'),\n\t\t\t\t\trenameLabel: t('core', 'Rename'),\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}))\n\t\t\t\t$item.find('.label').after($renameForm)\n\t\t\t\t$item.find('.label, .systemtags-actions').addClass('hidden')\n\t\t\t\t$item.closest('.select2-result').addClass('has-form')\n\n\t\t\t\t$renameForm.find('[title]').tooltip({\n\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\tcontainer: 'body'\n\t\t\t\t})\n\t\t\t\t$renameForm.find('input').focus().selectRange(0, oldName.length)\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever the rename form has been submitted after\n\t\t * the user entered a new tag name.\n\t\t * This will submit the change to the server.\n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t\t_onSubmitRenameTag: function(ev) {\n\t\t\t\tev.preventDefault()\n\t\t\t\tvar $form = $(ev.target)\n\t\t\t\tvar $item = $form.closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tvar tagModel = this.collection.get(tagId)\n\t\t\t\tvar newName = $(ev.target).find('input').val().trim()\n\t\t\t\tif (newName && newName !== tagModel.get('name')) {\n\t\t\t\t\ttagModel.save({ 'name': newName })\n\t\t\t\t\t// TODO: spinner, and only change text after finished saving\n\t\t\t\t\t$item.find('.label').text(newName)\n\t\t\t\t}\n\t\t\t\t$item.find('.label, .systemtags-actions').removeClass('hidden')\n\t\t\t\t$form.remove()\n\t\t\t\t$item.closest('.select2-result').removeClass('has-form')\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag must be deleted\n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t\t_onClickDeleteTag: function(ev) {\n\t\t\t\tvar $item = $(ev.target).closest('.systemtags-item')\n\t\t\t\tvar tagId = $item.attr('data-id')\n\t\t\t\tthis.collection.get(tagId).destroy()\n\t\t\t\t$(ev.target).tooltip('hide')\n\t\t\t\t$item.closest('.select2-result').remove()\n\t\t\t\t// TODO: spinner\n\t\t\t\treturn false\n\t\t\t},\n\n\t\t\t_addToSelect2Selection: function(selection) {\n\t\t\t\tvar data = this.$tagsField.select2('data')\n\t\t\t\tdata.push(selection)\n\t\t\t\tthis.$tagsField.select2('data', data)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag is selected.\n\t\t * Also called whenever tag creation is requested through the dummy tag object.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t\t_onSelectTag: function(e) {\n\t\t\t\tvar self = this\n\t\t\t\tvar tag\n\t\t\t\tif (e.object && e.object.isNew) {\n\t\t\t\t// newly created tag, check if existing\n\t\t\t\t// create a new tag\n\t\t\t\t\ttag = this.collection.create({\n\t\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\t\tcanAssign: true\n\t\t\t\t\t}, {\n\t\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON())\n\t\t\t\t\t\t\tself._lastUsedTags.unshift(model.id)\n\t\t\t\t\t\t\tself.trigger('select', model)\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: function(model, xhr) {\n\t\t\t\t\t\t\tif (xhr.status === 409) {\n\t\t\t\t\t\t\t// re-fetch collection to get the missing tag\n\t\t\t\t\t\t\t\tself.collection.reset()\n\t\t\t\t\t\t\t\tself.collection.fetch({\n\t\t\t\t\t\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\t\t\t\t\t// find the tag in the collection\n\t\t\t\t\t\t\t\t\t\tvar model = collection.where({\n\t\t\t\t\t\t\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\t\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\t\t\t\t\t\tuserAssignable: true\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t\tif (model.length) {\n\t\t\t\t\t\t\t\t\t\t\tmodel = model[0]\n\t\t\t\t\t\t\t\t\t\t\t// the tag already exists or was already assigned,\n\t\t\t\t\t\t\t\t\t\t\t// add it to the list anyway\n\t\t\t\t\t\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON())\n\t\t\t\t\t\t\t\t\t\t\tself.trigger('select', model)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tthis.$tagsField.select2('close')\n\t\t\t\t\te.preventDefault()\n\t\t\t\t\treturn false\n\t\t\t\t} else {\n\t\t\t\t\ttag = this.collection.get(e.object.id)\n\t\t\t\t\tthis._lastUsedTags.unshift(tag.id)\n\t\t\t\t}\n\t\t\t\tthis._newTag = null\n\t\t\t\tthis.trigger('select', tag)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Event handler whenever a tag gets deselected.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t\t_onDeselectTag: function(e) {\n\t\t\t\tthis.trigger('deselect', e.choice.id)\n\t\t\t},\n\n\t\t\t/**\n\t\t * Autocomplete function for dropdown results\n\t\t *\n\t\t * @param {Object} query select2 query object\n\t\t */\n\t\t\t_queryTagsAutocomplete: function(query) {\n\t\t\t\tvar self = this\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\t\tvar tagModels = collection.filterByName(query.term.trim())\n\t\t\t\t\t\tif (!self._isAdmin) {\n\t\t\t\t\t\t\ttagModels = _.filter(tagModels, function(tagModel) {\n\t\t\t\t\t\t\t\treturn tagModel.get('canAssign')\n\t\t\t\t\t\t\t})\n\t\t\t\t\t\t}\n\t\t\t\t\t\tquery.callback({\n\t\t\t\t\t\t\tresults: _.invoke(tagModels, 'toJSON')\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t_preventDefault: function(e) {\n\t\t\t\te.stopPropagation()\n\t\t\t},\n\n\t\t\t/**\n\t\t * Formats a single dropdown result\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @returns {string} HTML markup\n\t\t */\n\t\t\t_formatDropDownResult: function(data) {\n\t\t\t\treturn OC.SystemTags.Templates['result'](_.extend({\n\t\t\t\t\trenameTooltip: t('core', 'Rename'),\n\t\t\t\t\tallowActions: this._allowActions,\n\t\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data)[0].innerHTML : null,\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}, data))\n\t\t\t},\n\n\t\t\t/**\n\t\t * Formats a single selection item\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @returns {string} HTML markup\n\t\t */\n\t\t\t_formatSelection: function(data) {\n\t\t\t\treturn OC.SystemTags.Templates['selection'](_.extend({\n\t\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data)[0].innerHTML : null,\n\t\t\t\t\tisAdmin: this._isAdmin\n\t\t\t\t}, data))\n\t\t\t},\n\n\t\t\t/**\n\t\t * Create new dummy choice for select2 when the user\n\t\t * types an arbitrary string\n\t\t *\n\t\t * @param {string} term entered term\n\t\t * @returns {Object} dummy tag\n\t\t */\n\t\t\t_createSearchChoice: function(term) {\n\t\t\t\tterm = term.trim()\n\t\t\t\tif (this.collection.filter(function(entry) {\n\t\t\t\t\treturn entry.get('name') === term\n\t\t\t\t}).length) {\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\tif (!this._newTag) {\n\t\t\t\t\tthis._newTag = {\n\t\t\t\t\t\tid: -1,\n\t\t\t\t\t\tname: term,\n\t\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\tcanAssign: true,\n\t\t\t\t\t\tisNew: true\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthis._newTag.name = term\n\t\t\t\t}\n\n\t\t\t\treturn this._newTag\n\t\t\t},\n\n\t\t\t_initSelection: function(element, callback) {\n\t\t\t\tvar self = this\n\t\t\t\tvar ids = $(element).val().split(',')\n\n\t\t\t\tfunction modelToSelection(model) {\n\t\t\t\t\tvar data = model.toJSON()\n\t\t\t\t\tif (!self._isAdmin && !data.canAssign) {\n\t\t\t\t\t// lock static tags for non-admins\n\t\t\t\t\t\tdata.locked = true\n\t\t\t\t\t}\n\t\t\t\t\treturn data\n\t\t\t\t}\n\n\t\t\t\tfunction findSelectedObjects(ids) {\n\t\t\t\t\tvar selectedModels = self.collection.filter(function(model) {\n\t\t\t\t\t\treturn ids.indexOf(model.id) >= 0 && (self._isAdmin || model.get('userVisible'))\n\t\t\t\t\t})\n\t\t\t\t\treturn _.map(selectedModels, modelToSelection)\n\t\t\t\t}\n\n\t\t\t\tthis.collection.fetch({\n\t\t\t\t\tsuccess: function() {\n\t\t\t\t\t\tcallback(findSelectedObjects(ids))\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t},\n\n\t\t\t/**\n\t\t * Renders this details view\n\t\t */\n\t\t\trender: function() {\n\t\t\t\tvar self = this\n\t\t\t\tthis.$el.html(this.template())\n\n\t\t\t\tthis.$el.find('[title]').tooltip({ placement: 'bottom' })\n\t\t\t\tthis.$tagsField = this.$el.find('[name=tags]')\n\t\t\t\tthis.$tagsField.select2({\n\t\t\t\t\tplaceholder: t('core', 'Collaborative tags'),\n\t\t\t\t\tcontainerCssClass: 'systemtags-select2-container',\n\t\t\t\t\tdropdownCssClass: 'systemtags-select2-dropdown',\n\t\t\t\t\tcloseOnSelect: false,\n\t\t\t\t\tallowClear: false,\n\t\t\t\t\tmultiple: this._multiple,\n\t\t\t\t\ttoggleSelect: this._multiple,\n\t\t\t\t\tquery: _.bind(this._queryTagsAutocomplete, this),\n\t\t\t\t\tid: function(tag) {\n\t\t\t\t\t\treturn tag.id\n\t\t\t\t\t},\n\t\t\t\t\tinitSelection: _.bind(this._initSelection, this),\n\t\t\t\t\tformatResult: _.bind(this._formatDropDownResult, this),\n\t\t\t\t\tformatSelection: _.bind(this._formatSelection, this),\n\t\t\t\t\tcreateSearchChoice: this._allowCreate ? _.bind(this._createSearchChoice, this) : undefined,\n\t\t\t\t\tsortResults: function(results) {\n\t\t\t\t\t\tvar selectedItems = _.pluck(self.$tagsField.select2('data'), 'id')\n\t\t\t\t\t\tresults.sort(function(a, b) {\n\t\t\t\t\t\t\tvar aSelected = selectedItems.indexOf(a.id) >= 0\n\t\t\t\t\t\t\tvar bSelected = selectedItems.indexOf(b.id) >= 0\n\t\t\t\t\t\t\tif (aSelected === bSelected) {\n\t\t\t\t\t\t\t\tvar aLastUsed = self._lastUsedTags.indexOf(a.id)\n\t\t\t\t\t\t\t\tvar bLastUsed = self._lastUsedTags.indexOf(b.id)\n\n\t\t\t\t\t\t\t\tif (aLastUsed !== bLastUsed) {\n\t\t\t\t\t\t\t\t\tif (bLastUsed === -1) {\n\t\t\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (aLastUsed === -1) {\n\t\t\t\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn aLastUsed < bLastUsed ? -1 : 1\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Both not found\n\t\t\t\t\t\t\t\treturn OC.Util.naturalSortCompare(a.name, b.name)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (aSelected && !bSelected) {\n\t\t\t\t\t\t\t\treturn -1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn 1\n\t\t\t\t\t\t})\n\t\t\t\t\t\treturn results\n\t\t\t\t\t},\n\t\t\t\t\tformatNoMatches: function() {\n\t\t\t\t\t\treturn t('core', 'No tags found')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t\t.on('select2-selecting', this._onSelectTag)\n\t\t\t\t\t.on('select2-removing', this._onDeselectTag)\n\n\t\t\t\tvar $dropDown = this.$tagsField.select2('dropdown')\n\t\t\t\t// register events for inside the dropdown\n\t\t\t\t$dropDown.on('mouseup', '.rename', this._onClickRenameTag)\n\t\t\t\t$dropDown.on('mouseup', '.delete', this._onClickDeleteTag)\n\t\t\t\t$dropDown.on('mouseup', '.select2-result-selectable.has-form', this._preventDefault)\n\t\t\t\t$dropDown.on('submit', '.systemtags-rename-form', this._onSubmitRenameTag)\n\n\t\t\t\tthis.delegateEvents()\n\t\t\t},\n\n\t\t\tremove: function() {\n\t\t\t\tif (this.$tagsField) {\n\t\t\t\t\tthis.$tagsField.select2('destroy')\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tgetValues: function() {\n\t\t\t\tthis.$tagsField.select2('val')\n\t\t\t},\n\n\t\t\tsetValues: function(values) {\n\t\t\t\tthis.$tagsField.select2('val', values)\n\t\t\t},\n\n\t\t\tsetData: function(data) {\n\t\t\t\tthis.$tagsField.select2('data', data)\n\t\t\t}\n\t\t})\n\n\tOC.SystemTags = OC.SystemTags || {}\n\tOC.SystemTags.SystemTagsInputField = SystemTagsInputField\n\n})(OC)\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./systemtags.scss\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"bdf318e0\", content, true, {});","exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemTagsInfoView,.systemtags-select2-container{width:100%}.systemTagsInfoView .select2-choices .select2-search-choice.select2-locked .label,.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:0.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}\\n\", \"\"]);\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \"{\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = modules[_i]; // skip already imported module\n // this implementation is not 100% perfect for weird media query combinations\n // when a module is imported multiple times with different media queries.\n // I hope this will never occur (Hey this way we have smaller bundles)\n\n if (item[0] == null || !alreadyImportedModules[item[0]]) {\n if (mediaQuery && !item[2]) {\n item[2] = mediaQuery;\n } else if (mediaQuery) {\n item[2] = \"(\".concat(item[2], \") and (\").concat(mediaQuery, \")\");\n }\n\n list.push(item);\n }\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot).concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","/**\n * Translates the list format produced by css-loader into something\n * easier to manipulate.\n */\nexport default function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}\n","/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n Modified by Evan You @yyx990803\n*/\n\nimport listToStyles from './listToStyles'\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n if (!hasDocument) {\n throw new Error(\n 'vue-style-loader cannot be used in a non-browser environment. ' +\n \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n ) }\n}\n\n/*\ntype StyleObject = {\n id: number;\n parts: Array<StyleObjectPart>\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n// tags it will allow on a page\nvar isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase())\n\nexport default function addStylesClient (parentId, list, _isProduction, _options) {\n isProduction = _isProduction\n\n options = _options || {}\n\n var styles = listToStyles(parentId, list)\n addStylesToDom(styles)\n\n return function update (newList) {\n var mayRemove = []\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n domStyle.refs--\n mayRemove.push(domStyle)\n }\n if (newList) {\n styles = listToStyles(parentId, newList)\n addStylesToDom(styles)\n } else {\n styles = []\n }\n for (var i = 0; i < mayRemove.length; i++) {\n var domStyle = mayRemove[i]\n if (domStyle.refs === 0) {\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j]()\n }\n delete stylesInDom[domStyle.id]\n }\n }\n }\n}\n\nfunction addStylesToDom (styles /* Array<StyleObject> */) {\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n if (domStyle) {\n domStyle.refs++\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j](item.parts[j])\n }\n for (; j < item.parts.length; j++) {\n domStyle.parts.push(addStyle(item.parts[j]))\n }\n if (domStyle.parts.length > item.parts.length) {\n domStyle.parts.length = item.parts.length\n }\n } else {\n var parts = []\n for (var j = 0; j < item.parts.length; j++) {\n parts.push(addStyle(item.parts[j]))\n }\n stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }\n }\n }\n}\n\nfunction createStyleElement () {\n var styleElement = document.createElement('style')\n styleElement.type = 'text/css'\n head.appendChild(styleElement)\n return styleElement\n}\n\nfunction addStyle (obj /* StyleObjectPart */) {\n var update, remove\n var styleElement = document.querySelector('style[' + ssrIdKey + '~=\"' + obj.id + '\"]')\n\n if (styleElement) {\n if (isProduction) {\n // has SSR styles and in production mode.\n // simply do nothing.\n return noop\n } else {\n // has SSR styles but in dev mode.\n // for some reason Chrome can't handle source map in server-rendered\n // style tags - source maps in <style> only works if the style tag is\n // created and inserted dynamically. So we remove the server rendered\n // styles and inject new ones.\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n if (isOldIE) {\n // use singleton mode for IE9.\n var styleIndex = singletonCounter++\n styleElement = singletonElement || (singletonElement = createStyleElement())\n update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)\n remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)\n } else {\n // use multi-style-tag mode in all other cases\n styleElement = createStyleElement()\n update = applyToTag.bind(null, styleElement)\n remove = function () {\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n update(obj)\n\n return function updateStyle (newObj /* StyleObjectPart */) {\n if (newObj) {\n if (newObj.css === obj.css &&\n newObj.media === obj.media &&\n newObj.sourceMap === obj.sourceMap) {\n return\n }\n update(obj = newObj)\n } else {\n remove()\n }\n }\n}\n\nvar replaceText = (function () {\n var textStore = []\n\n return function (index, replacement) {\n textStore[index] = replacement\n return textStore.filter(Boolean).join('\\n')\n }\n})()\n\nfunction applyToSingletonTag (styleElement, index, remove, obj) {\n var css = remove ? '' : obj.css\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css)\n } else {\n var cssNode = document.createTextNode(css)\n var childNodes = styleElement.childNodes\n if (childNodes[index]) styleElement.removeChild(childNodes[index])\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index])\n } else {\n styleElement.appendChild(cssNode)\n }\n }\n}\n\nfunction applyToTag (styleElement, obj) {\n var css = obj.css\n var media = obj.media\n var sourceMap = obj.sourceMap\n\n if (media) {\n styleElement.setAttribute('media', media)\n }\n if (options.ssrId) {\n styleElement.setAttribute(ssrIdKey, obj.id)\n }\n\n if (sourceMap) {\n // https://developer.chrome.com/devtools/docs/javascript-debugging\n // this makes source maps inside style tags work properly in Chrome\n css += '\\n/*# sourceURL=' + sourceMap.sources[0] + ' */'\n // http://stackoverflow.com/a/26603875\n css += '\\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'\n }\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild)\n }\n styleElement.appendChild(document.createTextNode(css))\n }\n}\n"],"sourceRoot":""} \ No newline at end of file
diff --git a/core/js/merged-share-backend.js b/core/js/merged-share-backend.js
deleted file mode 100644
index b96783603a4..00000000000
--- a/core/js/merged-share-backend.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import './shareconfigmodel.js'
-import './sharetemplates.js'
-import './shareitemmodel.js'
-import './sharesocialmanager.js'
-import './sharedialogresharerinfoview.js'
-import './sharedialoglinkshareview.js'
-import './sharedialogshareelistview.js'
-import './sharedialogview.js'
-import './share.js'
diff --git a/core/js/share.js b/core/js/share.js
deleted file mode 100644
index 8dc5e490647..00000000000
--- a/core/js/share.js
+++ /dev/null
@@ -1,399 +0,0 @@
-/* eslint-disable */
-/**
- * @namespace
- */
-OC.Share = _.extend(OC.Share || {}, {
- SHARE_TYPE_USER: 0,
- SHARE_TYPE_GROUP: 1,
- SHARE_TYPE_LINK: 3,
- SHARE_TYPE_EMAIL: 4,
- SHARE_TYPE_REMOTE: 6,
- SHARE_TYPE_CIRCLE: 7,
- SHARE_TYPE_GUEST: 8,
- SHARE_TYPE_REMOTE_GROUP: 9,
- SHARE_TYPE_ROOM: 10,
-
- /**
- * Regular expression for splitting parts of remote share owners:
- * "user@example.com/path/to/owncloud"
- * "user@anotherexample.com@example.com/path/to/owncloud
- */
- _REMOTE_OWNER_REGEXP: new RegExp('^([^@]*)@(([^@]*)@)?([^/]*)([/](.*)?)?$'),
-
- /**
- * @deprecated use OC.Share.currentShares instead
- */
- itemShares: [],
- /**
- * Full list of all share statuses
- */
- statuses: {},
- /**
- * Shares for the currently selected file.
- * (for which the dropdown is open)
- *
- * Key is item type and value is an array or
- * shares of the given item type.
- */
- currentShares: {},
- /**
- * Whether the share dropdown is opened.
- */
- droppedDown: false,
- /**
- * Loads ALL share statuses from server, stores them in
- * OC.Share.statuses then calls OC.Share.updateIcons() to update the
- * files "Share" icon to "Shared" according to their share status and
- * share type.
- *
- * If a callback is specified, the update step is skipped.
- *
- * @param itemType item type
- * @param fileList file list instance, defaults to OCA.Files.App.fileList
- * @param callback function to call after the shares were loaded
- */
- loadIcons: function(itemType, fileList, callback) {
- var path = fileList.dirInfo.path
- if (path === '/') {
- path = ''
- }
- path += '/' + fileList.dirInfo.name
-
- // Load all share icons
- $.get(
- OC.linkToOCS('apps/files_sharing/api/v1', 2) + 'shares',
- {
- subfiles: 'true',
- path: path,
- format: 'json'
- }, function(result) {
- if (result && result.ocs.meta.statuscode === 200) {
- OC.Share.statuses = {}
- $.each(result.ocs.data, function(it, share) {
- if (!(share.item_source in OC.Share.statuses)) {
- OC.Share.statuses[share.item_source] = { link: false }
- }
- if (share.share_type === OC.Share.SHARE_TYPE_LINK) {
- OC.Share.statuses[share.item_source] = { link: true }
- }
- })
- if (_.isFunction(callback)) {
- callback(OC.Share.statuses)
- } else {
- OC.Share.updateIcons(itemType, fileList)
- }
- }
- }
- )
- },
- /**
- * Updates the files' "Share" icons according to the known
- * sharing states stored in OC.Share.statuses.
- * (not reloaded from server)
- *
- * @param itemType item type
- * @param fileList file list instance
- * defaults to OCA.Files.App.fileList
- */
- updateIcons: function(itemType, fileList) {
- var item
- var $fileList
- var currentDir
- if (!fileList && OCA.Files) {
- fileList = OCA.Files.App.fileList
- }
- // fileList is usually only defined in the files app
- if (fileList) {
- $fileList = fileList.$fileList
- currentDir = fileList.getCurrentDirectory()
- }
- // TODO: iterating over the files might be more efficient
- for (item in OC.Share.statuses) {
- var iconClass = 'icon-shared'
- var data = OC.Share.statuses[item]
- var hasLink = data.link
- // Links override shared in terms of icon display
- if (hasLink) {
- iconClass = 'icon-public'
- }
- if (itemType !== 'file' && itemType !== 'folder') {
- $('a.share[data-item="' + item + '"] .icon').removeClass('icon-shared icon-public').addClass(iconClass)
- } else {
- // TODO: ultimately this part should be moved to files_sharing app
- var file = $fileList.find('tr[data-id="' + item + '"]')
- var shareFolder = OC.imagePath('core', 'filetypes/folder-shared')
- var img
- if (file.length > 0) {
- this.markFileAsShared(file, true, hasLink)
- } else {
- var dir = currentDir
- if (dir.length > 1) {
- var last = ''
- var path = dir
- // Search for possible parent folders that are shared
- while (path != last) {
- if (path === data.path && !data.link) {
- var actions = $fileList.find('.fileactions .action[data-action="Share"]')
- var files = $fileList.find('.filename')
- var i
- for (i = 0; i < actions.length; i++) {
- // TODO: use this.markFileAsShared()
- img = $(actions[i]).find('img')
- if (img.attr('src') !== OC.imagePath('core', 'actions/public')) {
- img.attr('src', image)
- $(actions[i]).addClass('permanent')
- $(actions[i]).html('<span> ' + t('core', 'Shared') + '</span>').prepend(img)
- }
- }
- for (i = 0; i < files.length; i++) {
- if ($(files[i]).closest('tr').data('type') === 'dir') {
- $(files[i]).find('.thumbnail').css('background-image', 'url(' + shareFolder + ')')
- }
- }
- }
- last = path
- path = OC.Share.dirname(path)
- }
- }
- }
- }
- }
- },
- updateIcon: function(itemType, itemSource) {
- var shares = false
- var link = false
- var iconClass = ''
- $.each(OC.Share.itemShares, function(index) {
- if (OC.Share.itemShares[index]) {
- if (index == OC.Share.SHARE_TYPE_LINK) {
- if (OC.Share.itemShares[index] == true) {
- shares = true
- iconClass = 'icon-public'
- link = true
-
- }
- } else if (OC.Share.itemShares[index].length > 0) {
- shares = true
- iconClass = 'icon-shared'
- }
- }
- })
- if (itemType != 'file' && itemType != 'folder') {
- $('a.share[data-item="' + itemSource + '"] .icon').removeClass('icon-shared icon-public').addClass(iconClass)
- } else {
- var $tr = $('tr').filterAttr('data-id', String(itemSource))
- if ($tr.length > 0) {
- // it might happen that multiple lists exist in the DOM
- // with the same id
- $tr.each(function() {
- OC.Share.markFileAsShared($(this), shares, link)
- })
- }
- }
- if (shares) {
- OC.Share.statuses[itemSource] = OC.Share.statuses[itemSource] || {}
- OC.Share.statuses[itemSource].link = link
- } else {
- delete OC.Share.statuses[itemSource]
- }
- },
- /**
- * Format a remote address
- *
- * @param {String} shareWith userid, full remote share, or whatever
- * @param {String} shareWithDisplayName
- * @param {String} message
- * @returns {String} HTML code to display
- */
- _formatRemoteShare: function(shareWith, shareWithDisplayName, message) {
- var parts = this._REMOTE_OWNER_REGEXP.exec(shareWith)
- if (!parts) {
- // display avatar of the user
- var avatar = '<span class="avatar" data-username="' + escapeHTML(shareWith) + '" title="' + message + ' ' + escapeHTML(shareWithDisplayName) + '"></span>'
- var hidden = '<span class="hidden-visually">' + message + ' ' + escapeHTML(shareWithDisplayName) + '</span> '
- return avatar + hidden
- }
-
- var userName = parts[1]
- var userDomain = parts[3]
- var server = parts[4]
- var tooltip = message + ' ' + userName
- if (userDomain) {
- tooltip += '@' + userDomain
- }
- if (server) {
- if (!userDomain) {
- userDomain = '…'
- }
- tooltip += '@' + server
- }
-
- var html = '<span class="remoteAddress" title="' + escapeHTML(tooltip) + '">'
- html += '<span class="username">' + escapeHTML(userName) + '</span>'
- if (userDomain) {
- html += '<span class="userDomain">@' + escapeHTML(userDomain) + '</span>'
- }
- html += '</span> '
- return html
- },
- /**
- * Loop over all recipients in the list and format them using
- * all kind of fancy magic.
- *
- * @param {Object} recipients array of all the recipients
- * @returns {String[]} modified list of recipients
- */
- _formatShareList: function(recipients) {
- var _parent = this
- recipients = _.toArray(recipients)
- recipients.sort(function(a, b) {
- return a.shareWithDisplayName.localeCompare(b.shareWithDisplayName)
- })
- return $.map(recipients, function(recipient) {
- return _parent._formatRemoteShare(recipient.shareWith, recipient.shareWithDisplayName, t('core', 'Shared with'))
- })
- },
- /**
- * Marks/unmarks a given file as shared by changing its action icon
- * and folder icon.
- *
- * @param $tr file element to mark as shared
- * @param hasShares whether shares are available
- * @param hasLink whether link share is available
- */
- markFileAsShared: function($tr, hasShares, hasLink) {
- var action = $tr.find('.fileactions .action[data-action="Share"]')
- var type = $tr.data('type')
- var icon = action.find('.icon')
- var message, recipients, avatars
- var ownerId = $tr.attr('data-share-owner-id')
- var owner = $tr.attr('data-share-owner')
- var mountType = $tr.attr('data-mounttype')
- var shareFolderIcon
- var iconClass = 'icon-shared'
- action.removeClass('shared-style')
- // update folder icon
- if (type === 'dir' && (hasShares || hasLink || ownerId)) {
- if (typeof mountType !== 'undefined' && mountType !== 'shared-root' && mountType !== 'shared') {
- shareFolderIcon = OC.MimeType.getIconUrl('dir-' + mountType)
- } else if (hasLink) {
- shareFolderIcon = OC.MimeType.getIconUrl('dir-public')
- } else {
- shareFolderIcon = OC.MimeType.getIconUrl('dir-shared')
- }
- $tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')')
- $tr.attr('data-icon', shareFolderIcon)
- } else if (type === 'dir') {
- var isEncrypted = $tr.attr('data-e2eencrypted')
- // FIXME: duplicate of FileList._createRow logic for external folder,
- // need to refactor the icon logic into a single code path eventually
- if (isEncrypted === 'true') {
- shareFolderIcon = OC.MimeType.getIconUrl('dir-encrypted')
- $tr.attr('data-icon', shareFolderIcon)
- } else if (mountType && mountType.indexOf('external') === 0) {
- shareFolderIcon = OC.MimeType.getIconUrl('dir-external')
- $tr.attr('data-icon', shareFolderIcon)
- } else {
- shareFolderIcon = OC.MimeType.getIconUrl('dir')
- // back to default
- $tr.removeAttr('data-icon')
- }
- $tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')')
- }
- // update share action text / icon
- if (hasShares || ownerId) {
- recipients = $tr.data('share-recipient-data')
- action.addClass('shared-style')
-
- avatars = '<span>' + t('core', 'Shared') + '</span>'
- // even if reshared, only show "Shared by"
- if (ownerId) {
- message = t('core', 'Shared by')
- avatars = this._formatRemoteShare(ownerId, owner, message)
- } else if (recipients) {
- avatars = this._formatShareList(recipients)
- }
- action.html(avatars).prepend(icon)
-
- if (ownerId || recipients) {
- var avatarElement = action.find('.avatar')
- avatarElement.each(function() {
- $(this).avatar($(this).data('username'), 32)
- })
- action.find('span[title]').tooltip({ placement: 'top' })
- }
- } else {
- action.html('<span class="hidden-visually">' + t('core', 'Shared') + '</span>').prepend(icon)
- }
- if (hasLink) {
- iconClass = 'icon-public'
- }
- icon.removeClass('icon-shared icon-public').addClass(iconClass)
- },
- showDropDown: function(itemType, itemSource, appendTo, link, possiblePermissions, filename) {
- var configModel = new OC.Share.ShareConfigModel()
- var attributes = { itemType: itemType, itemSource: itemSource, possiblePermissions: possiblePermissions }
- var itemModel = new OC.Share.ShareItemModel(attributes, { configModel: configModel })
- var dialogView = new OC.Share.ShareDialogView({
- id: 'dropdown',
- model: itemModel,
- configModel: configModel,
- className: 'drop shareDropDown',
- attributes: {
- 'data-item-source-name': filename,
- 'data-item-type': itemType,
- 'data-item-source': itemSource
- }
- })
- dialogView.setShowLink(link)
- var $dialog = dialogView.render().$el
- $dialog.appendTo(appendTo)
- $dialog.slideDown(OC.menuSpeed, function() {
- OC.Share.droppedDown = true
- })
- itemModel.fetch()
- },
- hideDropDown: function(callback) {
- OC.Share.currentShares = null
- $('#dropdown').slideUp(OC.menuSpeed, function() {
- OC.Share.droppedDown = false
- $('#dropdown').remove()
- if (typeof FileActions !== 'undefined') {
- $('tr').removeClass('mouseOver')
- }
- if (callback) {
- callback.call()
- }
- })
- },
- dirname: function(path) {
- return path.replace(/\\/g, '/').replace(/\/[^\/]*$/, '')
- }
-})
-
-$(document).ready(function() {
- if (typeof monthNames !== 'undefined') {
- // min date should always be the next day
- var minDate = new Date()
- minDate.setDate(minDate.getDate() + 1)
- $.datepicker.setDefaults({
- monthNames: monthNames,
- monthNamesShort: monthNamesShort,
- dayNames: dayNames,
- dayNamesMin: dayNamesMin,
- dayNamesShort: dayNamesShort,
- firstDay: firstDay,
- minDate: minDate
- })
- }
-
- $(this).click(function(event) {
- var target = $(event.target)
- var isMatched = !target.is('.drop, .ui-datepicker-next, .ui-datepicker-prev, .ui-icon')
- && !target.closest('#ui-datepicker-div').length && !target.closest('.ui-autocomplete').length
- if (OC.Share && OC.Share.droppedDown && isMatched && $('#dropdown').has(event.target).length === 0) {
- OC.Share.hideDropDown()
- }
- })
-
-})
diff --git a/core/js/share/sharedialoglinkshareview.handlebars b/core/js/share/sharedialoglinkshareview.handlebars
deleted file mode 100644
index 5889806e1ca..00000000000
--- a/core/js/share/sharedialoglinkshareview.handlebars
+++ /dev/null
@@ -1,40 +0,0 @@
-{{#if shareAllowed}}
-<ul class="shareWithList">
- {{#if nolinkShares}}
- <li data-share-id="{{newShareId}}">
- <div class="avatar icon-public-white"></div>
- <span class="username">{{newShareLabel}}</span>
- <span class="sharingOptionsGroup">
- <div class="share-menu">
- <a href="#" class="icon icon-add new-share has-tooltip {{#if showPending}}hidden{{/if}}" title="{{newShareTitle}}"></a>
- <span class="icon icon-loading-small {{#unless showPending}}hidden{{/unless}}"></span>
- {{#if showPending}}
- {{{pendingPopoverMenu}}}
- {{/if}}
- </div>
- </span>
- </li>
- {{/if}}
- {{#each linkShares}}
- <li data-share-id="{{cid}}">
- <div class="avatar icon-public-white"></div>
- <span class="username" title="{{linkShareCreationDate}}">{{linkShareLabel}}</span>
-
- <span class="sharingOptionsGroup">
- <a href="#" class="clipboard-button icon icon-clippy has-tooltip" data-clipboard-text="{{shareLinkURL}}" title="{{copyLabel}}"></a>
- <div class="share-menu">
- <a href="#" class="icon icon-more {{#if showPending}}hidden{{/if}}"></a>
- <span class="icon icon-loading-small {{#unless showPending}}hidden{{/unless}}"></span>
- {{#if showPending}}
- {{{pendingPopoverMenu}}}
- {{else}}
- {{{popoverMenu}}}
- {{/if}}
- </div>
- </span>
- </li>
- {{/each}}
-</ul>
-{{else}}
-{{#if noSharingPlaceholder}}<input id="shareWith-{{cid}}" class="shareWithField" type="text" placeholder="{{noSharingPlaceholder}}" disabled="disabled" />{{/if}}
-{{/if}}
diff --git a/core/js/share/sharedialoglinkshareview_popover_menu.handlebars b/core/js/share/sharedialoglinkshareview_popover_menu.handlebars
deleted file mode 100644
index 2b4873bc56c..00000000000
--- a/core/js/share/sharedialoglinkshareview_popover_menu.handlebars
+++ /dev/null
@@ -1,121 +0,0 @@
-<div class="popovermenu menu">
- <ul>
- <li class="hidden linkTextMenu">
- <span class="menuitem icon-link-text">
- <input id="linkText-{{cid}}" class="linkText" type="text" readonly="readonly" value="{{shareLinkURL}}" />
- </span>
- </li>
- {{#if publicUpload}}
- <li>
- <span class="menuitem">
- <span class="icon-loading-small hidden"></span>
- <input type="radio" name="publicUpload" value="{{publicUploadRValue}}" id="sharingDialogAllowPublicUpload-r-{{cid}}" class="radio publicUploadRadio" {{{publicUploadRChecked}}} />
- <label for="sharingDialogAllowPublicUpload-r-{{cid}}">{{publicUploadRLabel}}</label>
- </span>
- </li>
- <li>
- <span class="menuitem">
- <span class="icon-loading-small hidden"></span>
- <input type="radio" name="publicUpload" value="{{publicUploadRWValue}}" id="sharingDialogAllowPublicUpload-rw-{{cid}}" class="radio publicUploadRadio" {{{publicUploadRWChecked}}} />
- <label for="sharingDialogAllowPublicUpload-rw-{{cid}}">{{publicUploadRWLabel}}</label>
- </span>
- </li>
- <li>
- <span class="menuitem">
- <span class="icon-loading-small hidden"></span>
- <input type="radio" name="publicUpload" value="{{publicUploadWValue}}" id="sharingDialogAllowPublicUpload-w-{{cid}}" class="radio publicUploadRadio" {{{publicUploadWChecked}}} />
- <label for="sharingDialogAllowPublicUpload-w-{{cid}}">{{publicUploadWLabel}}</label>
- </span>
- </li>
- {{/if}}
- {{#if publicEditing}}
- <li id="allowPublicEditingWrapper">
- <span class="menuitem">
- <span class="icon-loading-small hidden"></span>
- <input type="checkbox" name="allowPublicEditing" id="sharingDialogAllowPublicEditing-{{cid}}" class="checkbox publicEditingCheckbox" {{{publicEditingChecked}}} />
- <label for="sharingDialogAllowPublicEditing-{{cid}}">{{publicEditingLabel}}</label>
- </span>
- </li>
- {{/if}}
- <li>
- <span class="menuitem">
- <span class="icon-loading-small hidden"></span>
- <input type="checkbox" name="hideDownload" id="sharingDialogHideDownload-{{cid}}" class="checkbox hideDownloadCheckbox"
- {{#if hideDownload}}checked="checked"{{/if}} />
- <label for="sharingDialogHideDownload-{{cid}}">{{hideDownloadLabel}}</label>
- </span>
- </li>
- <li>
- <span class="menuitem">
- <input type="checkbox" name="showPassword" id="showPassword-{{cid}}" class="checkbox showPasswordCheckbox"
- {{#if isPasswordSet}}checked="checked"{{/if}} {{#if isPasswordEnforced}}disabled="disabled"{{/if}} value="1" />
- <label for="showPassword-{{cid}}">{{enablePasswordLabel}}</label>
- </span>
- </li>
- <li class="{{#unless isPasswordSet}}hidden{{/unless}} linkPassMenu">
- <span class="menuitem icon-share-pass">
- <input id="linkPassText-{{cid}}" class="linkPassText" type="password" placeholder="{{passwordPlaceholder}}" autocomplete="new-password" />
- <input type="submit" class="icon-confirm share-pass-submit" value="" />
- <span class="icon icon-loading-small hidden"></span>
- </span>
- </li>
- {{#if showPasswordByTalkCheckBox}}
- <li>
- <span class="shareOption menuitem">
- <span class="icon-loading-small hidden"></span>
- <input type="checkbox" name="passwordByTalk" id="passwordByTalk-{{cid}}" class="checkbox passwordByTalkCheckbox"
- {{#if isPasswordByTalkSet}}checked="checked"{{/if}} />
- <label for="passwordByTalk-{{cid}}">{{passwordByTalkLabel}}</label>
- </span>
- </li>
- {{/if}}
- <li>
- <span class="menuitem">
- <input id="expireDate-{{cid}}" type="checkbox" name="expirationDate" class="expireDate checkbox"
- {{#if hasExpireDate}}checked="checked"{{/if}} {{#if isExpirationEnforced}}disabled="disabled"{{/if}} />
- <label for="expireDate-{{cid}}">{{expireDateLabel}}</label>
- </span>
- </li>
- <li class="{{#unless hasExpireDate}}hidden{{/unless}}">
- <span class="menuitem icon-expiredate expirationDateContainer-{{cid}}">
- <label for="expirationDatePicker-{{cid}}" class="hidden-visually" value="{{expirationDate}}">{{expirationLabel}}</label>
- <!-- do not use the datepicker if enforced -->
- <input id="expirationDatePicker-{{cid}}" class="{{#unless isExpirationEnforced}}datepicker{{/unless}}" type="text"
- placeholder="{{expirationDatePlaceholder}}" value="{{#if hasExpireDate}}{{expireDate}}{{else}}{{defaultExpireDate}}{{/if}}"
- data-max-date="{{maxDate}}" {{#if isExpirationEnforced}}readonly{{/if}} />
- </span>
- </li>
- <li>
- <a href="#" class="share-add">
- <span class="icon-loading-small hidden"></span>
- <span class="icon icon-edit"></span>
- <span>{{addNoteLabel}}</span>
- <input type="button" class="share-note-delete icon-delete {{#unless hasNote}}hidden{{/unless}}">
- </a>
- </li>
- <li class="share-note-form share-note-link {{#unless hasNote}}hidden{{/unless}}">
- <span class="menuitem icon-note">
- <textarea class="share-note">{{shareNote}}</textarea>
- <input type="submit" class="icon-confirm share-note-submit" value="" id="add-note-{{shareId}}" />
- </span>
- </li>
- {{#each social}}
- <li>
- <a href="#" class="menuitem pop-up" data-url="{{url}}" data-window="{{newWindow}}">
- <span class="icon {{iconClass}}"></span>
- <span>{{label}}</span>
- </a>
- </li>
- {{/each}}
- <li>
- <a href="#" class="unshare"><span class="icon-loading-small hidden"></span><span class="icon icon-delete"></span><span>{{unshareLinkLabel}}</span></a>
- </li>
- <li>
- <a href="#" class="new-share">
- <span class="icon-loading-small hidden"></span>
- <span class="icon icon-add"></span>
- <span>{{newShareLabel}}</span>
- </a>
- </li>
- </ul>
-</div>
diff --git a/core/js/share/sharedialoglinkshareview_popover_menu_pending.handlebars b/core/js/share/sharedialoglinkshareview_popover_menu_pending.handlebars
deleted file mode 100644
index d9ff5659fc9..00000000000
--- a/core/js/share/sharedialoglinkshareview_popover_menu_pending.handlebars
+++ /dev/null
@@ -1,20 +0,0 @@
-<div class="popovermenu open menu pending">
- <ul>
- {{#if isPasswordEnforced}}
- <li>
- <span class="menuitem icon-info">
- <p>{{enforcedPasswordLabel}}</p>
- </span>
- </li>
- <li class="linkPassMenu">
- <span class="menuitem">
- <form autocomplete="off" class="enforcedPassForm">
- <input id="enforcedPassText" required class="enforcedPassText" type="password"
- placeholder="{{passwordPlaceholder}}" autocomplete="enforcedPassText" minlength="{{minPasswordLength}}" />
- <input type="submit" value=" " class="primary icon-checkmark-white">
- </form>
- </span>
- </li>
- {{/if}}
- </ul>
-</div>
diff --git a/core/js/share/sharedialogresharerinfoview.handlebars b/core/js/share/sharedialogresharerinfoview.handlebars
deleted file mode 100644
index 502356b6332..00000000000
--- a/core/js/share/sharedialogresharerinfoview.handlebars
+++ /dev/null
@@ -1,5 +0,0 @@
-<span class="reshare">
- <div class="avatar" data-userName="{{reshareOwner}}"></div>
- {{sharedByText}}
-</span>
-{{#if hasShareNote}}<div class="share-note">{{shareNote}}</div>{{/if}}
diff --git a/core/js/share/sharedialogshareelistview.handlebars b/core/js/share/sharedialogshareelistview.handlebars
deleted file mode 100644
index 18ff219c12a..00000000000
--- a/core/js/share/sharedialogshareelistview.handlebars
+++ /dev/null
@@ -1,32 +0,0 @@
-<ul id="shareWithList" class="shareWithList">
- {{#each sharees}}
- {{#unless isShareWithCurrentUser}}
- <li data-share-id="{{shareId}}" data-share-type="{{shareType}}" data-share-with="{{shareWith}}">
- <div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" data-avatar="{{shareWithAvatar}}" data-displayname="{{shareWithDisplayName}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>
- <span class="username" title="{{shareWithTitle}}">{{shareWithDisplayName}}</span>
- {{#if canUpdateShareSettings }}
- <span class="sharingOptionsGroup">
- {{#if editPermissionPossible}}
- <span>
- <input id="canEdit-{{cid}}-{{shareId}}" type="checkbox" name="edit" class="permissions checkbox" />
- <label for="canEdit-{{cid}}-{{shareId}}">{{canEditLabel}}</label>
- </span>
- {{/if}}
- <div tabindex="0" class="share-menu"><span class="icon icon-more"></span>
- {{{popoverMenu}}}
- </div>
- </span>
- {{/if}}
- </li>
- {{/unless}}
- {{/each}}
- {{#each linkReshares}}
- <li data-share-id="{{shareId}}" data-share-type="{{shareType}}">
- <div class="avatar" data-username="{{shareInitiator}}"></div>
- <span class="has-tooltip username" title="{{shareInitiator}}">{{shareInitiatorText}}</span>
- <span class="sharingOptionsGroup">
- <a href="#" class="unshare"><span class="icon-loading-small hidden"></span><span class="icon icon-delete"></span><span class="hidden-visually">{{unshareLabel}}</span></a>
- </span>
- </li>
- {{/each}}
-</ul>
diff --git a/core/js/share/sharedialogshareelistview_popover_menu.handlebars b/core/js/share/sharedialogshareelistview_popover_menu.handlebars
deleted file mode 100644
index 64fe51a3d24..00000000000
--- a/core/js/share/sharedialogshareelistview_popover_menu.handlebars
+++ /dev/null
@@ -1,107 +0,0 @@
-<div class="popovermenu bubble hidden menu">
- <ul>
- {{#if isResharingAllowed}} {{#if sharePermissionPossible}} {{#unless isMailShare}}
- <li>
- <span class="menuitem">
- <input id="canShare-{{cid}}-{{shareId}}" type="checkbox" name="share" class="permissions checkbox" {{#if hasSharePermission}}checked="checked"{{/if}} data-permissions="{{sharePermission}}" />
- <label for="canShare-{{cid}}-{{shareId}}">{{canShareLabel}}</label>
- </span>
- </li>
- {{/unless}} {{/if}} {{/if}}
- {{#if isFolder}}
- {{#if createPermissionPossible}}{{#unless isMailShare}}
- <li>
- <span class="menuitem">
- <input id="canCreate-{{cid}}-{{shareId}}" type="checkbox" name="create" class="permissions checkbox" {{#if hasCreatePermission}}checked="checked"{{/if}} data-permissions="{{createPermission}}"/>
- <label for="canCreate-{{cid}}-{{shareId}}">{{createPermissionLabel}}</label>
- </span>
- </li>
- {{/unless}}{{/if}}
- {{#if updatePermissionPossible}}{{#unless isMailShare}}
- <li>
- <span class="menuitem">
- <input id="canUpdate-{{cid}}-{{shareId}}" type="checkbox" name="update" class="permissions checkbox" {{#if hasUpdatePermission}}checked="checked"{{/if}} data-permissions="{{updatePermission}}"/>
- <label for="canUpdate-{{cid}}-{{shareId}}">{{updatePermissionLabel}}</label>
- </span>
- </li>
- {{/unless}}{{/if}}
- {{#if deletePermissionPossible}}{{#unless isMailShare}}
- <li>
- <span class="menuitem">
- <input id="canDelete-{{cid}}-{{shareId}}" type="checkbox" name="delete" class="permissions checkbox" {{#if hasDeletePermission}}checked="checked"{{/if}} data-permissions="{{deletePermission}}"/>
- <label for="canDelete-{{cid}}-{{shareId}}">{{deletePermissionLabel}}</label>
- </span>
- </li>
- {{/unless}}{{/if}}
- {{/if}}
- {{#if isMailShare}}
- {{#if hasCreatePermission}}
- <li>
- <span class="menuitem">
- <input id="secureDrop-{{cid}}-{{shareId}}" type="checkbox" name="secureDrop" class="checkbox secureDrop" {{#if secureDropMode}}checked="checked"{{/if}} data-permissions="{{readPermission}}"/>
- <label for="secureDrop-{{cid}}-{{shareId}}">{{secureDropLabel}}</label>
- </span>
- </li>
- {{/if}}
- <li>
- <span class="menuitem">
- <input id="password-{{cid}}-{{shareId}}" type="checkbox" name="password" class="password checkbox" {{#if isPasswordSet}}checked="checked"{{/if}}{{#if isPasswordSet}}{{#if isPasswordForMailSharesRequired}}disabled=""{{/if}}{{/if}}" />
- <label for="password-{{cid}}-{{shareId}}">{{passwordLabel}}</label>
- </span>
- </li>
- <li class="passwordMenu-{{cid}}-{{shareId}} {{#unless isPasswordSet}}hidden{{/unless}}">
- <span class="passwordContainer-{{cid}}-{{shareId}} icon-passwordmail menuitem">
- <label for="passwordField-{{cid}}-{{shareId}}" class="hidden-visually" value="{{password}}">{{passwordLabel}}</label>
- <input id="passwordField-{{cid}}-{{shareId}}" class="passwordField" type="password" placeholder="{{passwordPlaceholder}}" value="{{passwordValue}}" autocomplete="new-password" />
- <span class="icon-loading-small hidden"></span>
- </span>
- </li>
- {{#if isTalkEnabled}}
- <li>
- <span class="menuitem">
- <input id="passwordByTalk-{{cid}}-{{shareId}}" type="checkbox" name="passwordByTalk" class="passwordByTalk checkbox" {{#if isPasswordByTalkSet}}checked="checked"{{/if}} />
- <label for="passwordByTalk-{{cid}}-{{shareId}}">{{passwordByTalkLabel}}</label>
- </span>
- </li>
- <li class="passwordByTalkMenu-{{cid}}-{{shareId}} {{#unless isPasswordByTalkSet}}hidden{{/unless}}">
- <span class="passwordByTalkContainer-{{cid}}-{{shareId}} icon-passwordtalk menuitem">
- <label for="passwordByTalkField-{{cid}}-{{shareId}}" class="hidden-visually" value="{{password}}">{{passwordByTalkLabel}}</label>
- <input id="passwordByTalkField-{{cid}}-{{shareId}}" class="passwordField" type="password" placeholder="{{passwordByTalkPlaceholder}}" value="{{passwordValue}}" autocomplete="new-password" />
- <span class="icon-loading-small hidden"></span>
- </span>
- </li>
- {{/if}}
- {{/if}}
- <li>
- <span class="menuitem">
- <input id="expireDate-{{cid}}-{{shareId}}" type="checkbox" name="expirationDate" class="expireDate checkbox" {{#if hasExpireDate}}checked="checked"{{/if}}" />
- <label for="expireDate-{{cid}}-{{shareId}}">{{expireDateLabel}}</label>
- </span>
- </li>
- <li class="expirationDateMenu-{{cid}}-{{shareId}} {{#unless hasExpireDate}}hidden{{/unless}}">
- <span class="expirationDateContainer-{{cid}}-{{shareId}} icon-expiredate menuitem">
- <label for="expirationDatePicker-{{cid}}-{{shareId}}" class="hidden-visually" value="{{expirationDate}}">{{expirationLabel}}</label>
- <input id="expirationDatePicker-{{cid}}-{{shareId}}" class="datepicker" type="text" placeholder="{{expirationDatePlaceholder}}" value="{{#if hasExpireDate}}{{expireDate}}{{else}}{{defaultExpireDate}}{{/if}}" />
- </span>
- </li>
- {{#if isNoteAvailable}}
- <li>
- <a href="#" class="share-add">
- <span class="icon-loading-small hidden"></span>
- <span class="icon icon-edit"></span>
- <span>{{addNoteLabel}}</span>
- <input type="button" class="share-note-delete icon-delete {{#unless hasNote}}hidden{{/unless}}">
- </a>
- </li>
- <li class="share-note-form {{#unless hasNote}}hidden{{/unless}}">
- <span class="menuitem icon-note">
- <textarea class="share-note">{{shareNote}}</textarea>
- <input type="submit" class="icon-confirm share-note-submit" value="" id="add-note-{{shareId}}" />
- </span>
- </li>
- {{/if}}
- <li>
- <a href="#" class="unshare"><span class="icon-loading-small hidden"></span><span class="icon icon-delete"></span><span>{{unshareLabel}}</span></a>
- </li>
- </ul>
-</div>
diff --git a/core/js/share/sharedialogview.handlebars b/core/js/share/sharedialogview.handlebars
deleted file mode 100644
index d3d1a949be7..00000000000
--- a/core/js/share/sharedialogview.handlebars
+++ /dev/null
@@ -1,12 +0,0 @@
-<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>
diff --git a/core/js/shareconfigmodel.js b/core/js/shareconfigmodel.js
deleted file mode 100644
index 0d066116b53..00000000000
--- a/core/js/shareconfigmodel.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/* eslint-disable */
-/*
- * Copyright (c) 2015
- *
- * This file is licensed under the Affero General Public License version 3
- * or later.
- *
- * See the COPYING-README file.
- *
- */
-
-/* global moment, OC */
-
-(function() {
- if (!OC.Share) {
- OC.Share = {}
- OC.Share.Types = {}
- }
-
- // FIXME: the config model should populate its own model attributes based on
- // the old DOM-based config
- var ShareConfigModel = OC.Backbone.Model.extend({
- defaults: {
- publicUploadEnabled: false,
- enforcePasswordForPublicLink: OC.appConfig.core.enforcePasswordForPublicLink,
- enableLinkPasswordByDefault: OC.appConfig.core.enableLinkPasswordByDefault,
- isDefaultExpireDateEnforced: OC.appConfig.core.defaultExpireDateEnforced === true,
- isDefaultExpireDateEnabled: OC.appConfig.core.defaultExpireDateEnabled === true,
- isRemoteShareAllowed: OC.appConfig.core.remoteShareAllowed,
- isMailShareAllowed: OC.appConfig.shareByMailEnabled !== undefined,
- defaultExpireDate: OC.appConfig.core.defaultExpireDate,
- isResharingAllowed: OC.appConfig.core.resharingAllowed,
- isPasswordForMailSharesRequired: (OC.appConfig.shareByMail === undefined) ? false : OC.appConfig.shareByMail.enforcePasswordProtection,
- allowGroupSharing: OC.appConfig.core.allowGroupSharing
- },
-
- /**
- * @returns {boolean}
- */
- isPublicUploadEnabled: function() {
- var publicUploadEnabled = $('#filestable').data('allow-public-upload')
- return publicUploadEnabled === 'yes'
- },
-
- /**
- * @returns {boolean}
- */
- isShareWithLinkAllowed: function() {
- return $('#allowShareWithLink').val() === 'yes'
- },
-
- /**
- * @returns {string}
- */
- getFederatedShareDocLink: function() {
- return OC.appConfig.core.federatedCloudShareDoc
- },
-
- getDefaultExpirationDateString: function() {
- var expireDateString = ''
- if (this.get('isDefaultExpireDateEnabled')) {
- var date = moment.utc()
- var expireAfterDays = this.get('defaultExpireDate')
- date.add(expireAfterDays, 'days')
- expireDateString = date.format('YYYY-MM-DD 00:00:00')
- }
- return expireDateString
- }
- })
-
- OC.Share.ShareConfigModel = ShareConfigModel
-})()
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js
deleted file mode 100644
index 96ebd8ebbac..00000000000
--- a/core/js/sharedialoglinkshareview.js
+++ /dev/null
@@ -1,954 +0,0 @@
-/* eslint-disable */
-/*
- * Copyright (c) 2015
- *
- * This file is licensed under the Affero General Public License version 3
- * or later.
- *
- * See the COPYING-README file.
- *
- */
-
-/* globals Clipboard, Handlebars */
-
-(function() {
- if (!OC.Share) {
- OC.Share = {}
- }
-
- var PASSWORD_PLACEHOLDER = '**********'
- var PASSWORD_PLACEHOLDER_MESSAGE = t('core', 'Choose a password for the public link')
- var PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL = t('core', 'Choose a password for the public link or press the "Enter" key')
-
- /**
- * @class OCA.Share.ShareDialogLinkShareView
- * @member {OC.Share.ShareItemModel} model
- * @member {jQuery} $el
- * @memberof OCA.Sharing
- * @classdesc
- *
- * Represents the GUI of the share dialogue
- *
- */
- var ShareDialogLinkShareView = OC.Backbone.View.extend({
- /** @type {string} **/
- id: 'shareDialogLinkShare',
-
- /** @type {OC.Share.ShareConfigModel} **/
- configModel: undefined,
-
- /** @type {boolean} **/
- showLink: true,
-
- /** @type {boolean} **/
- showPending: false,
-
- /** @type {string} **/
- password: '',
-
- /** @type {string} **/
- newShareId: 'new-share',
-
- events: {
- // open menu
- 'click .share-menu .icon-more': 'onToggleMenu',
- // hide download
- 'change .hideDownloadCheckbox': 'onHideDownloadChange',
- // password
- 'click input.share-pass-submit': 'onPasswordEntered',
- 'keyup input.linkPassText': 'onPasswordKeyUp', // check for the enter key
- 'change .showPasswordCheckbox': 'onShowPasswordClick',
- 'change .passwordByTalkCheckbox': 'onPasswordByTalkChange',
- 'change .publicEditingCheckbox': 'onAllowPublicEditingChange',
- // copy link url
- 'click .linkText': 'onLinkTextClick',
- // social
- 'click .pop-up': 'onPopUpClick',
- // permission change
- 'change .publicUploadRadio': 'onPublicUploadChange',
- // expire date
- 'click .expireDate': 'onExpireDateChange',
- 'change .datepicker': 'onChangeExpirationDate',
- 'click .datepicker': 'showDatePicker',
- // note
- 'click .share-add': 'showNoteForm',
- 'click .share-note-delete': 'deleteNote',
- 'click .share-note-submit': 'updateNote',
- // remove
- 'click .unshare': 'onUnshare',
- // new share
- 'click .new-share': 'newShare',
- // enforced pass set
- 'submit .enforcedPassForm': 'enforcedPasswordSet'
- },
-
- initialize: function(options) {
- var view = this
-
- this.model.on('change:permissions', function() {
- view.render()
- })
-
- this.model.on('change:itemType', function() {
- view.render()
- })
-
- this.model.on('change:allowPublicUploadStatus', function() {
- view.render()
- })
-
- this.model.on('change:hideFileListStatus', function() {
- view.render()
- })
-
- this.model.on('change:linkShares', function(model, linkShares) {
- // The "Password protect by Talk" item is shown only when there
- // is a password. Unfortunately there is no fine grained
- // rendering of items in the link shares, so the whole view
- // needs to be rendered again when the password of a share
- // changes.
- // Note that this event handler is concerned only about password
- // changes; other changes in the link shares does not trigger
- // a rendering, so the view must be rendered again as needed in
- // those cases (for example, when a link share is removed).
-
- var previousLinkShares = model.previous('linkShares')
- if (previousLinkShares.length !== linkShares.length) {
- return
- }
-
- var i
- for (i = 0; i < linkShares.length; i++) {
- if (linkShares[i].id !== previousLinkShares[i].id) {
- // A resorting should never happen, but just in case.
- return
- }
-
- if (linkShares[i].password !== previousLinkShares[i].password) {
- view.render()
-
- return
- }
- }
- })
-
- if (!_.isUndefined(options.configModel)) {
- this.configModel = options.configModel
- } else {
- throw 'missing OC.Share.ShareConfigModel'
- }
-
- var clipboard = new Clipboard('.clipboard-button')
- clipboard.on('success', function(e) {
- var $trigger = $(e.trigger)
-
- $trigger.tooltip('hide')
- .attr('data-original-title', t('core', 'Copied!'))
- .tooltip('fixTitle')
- .tooltip({ placement: 'bottom', trigger: 'manual' })
- .tooltip('show')
- _.delay(function() {
- $trigger.tooltip('hide')
- .attr('data-original-title', t('core', 'Copy link'))
- .tooltip('fixTitle')
- }, 3000)
- })
- clipboard.on('error', function(e) {
- var $trigger = $(e.trigger)
- var $menu = $trigger.next('.share-menu').find('.popovermenu')
- var $linkTextMenu = $menu.find('li.linkTextMenu')
- var $input = $linkTextMenu.find('.linkText')
-
- var $li = $trigger.closest('li[data-share-id]')
- var shareId = $li.data('share-id')
-
- // show menu
- OC.showMenu(null, $menu)
-
- var actionMsg = ''
- if (/iPhone|iPad/i.test(navigator.userAgent)) {
- actionMsg = t('core', 'Not supported!')
- } else if (/Mac/i.test(navigator.userAgent)) {
- actionMsg = t('core', 'Press ⌘-C to copy.')
- } else {
- actionMsg = t('core', 'Press Ctrl-C to copy.')
- }
-
- $linkTextMenu.removeClass('hidden')
- $input.select()
- $input.tooltip('hide')
- .attr('data-original-title', actionMsg)
- .tooltip('fixTitle')
- .tooltip({ placement: 'bottom', trigger: 'manual' })
- .tooltip('show')
- _.delay(function() {
- $input.tooltip('hide')
- $input.attr('data-original-title', t('core', 'Copy'))
- .tooltip('fixTitle')
- }, 3000)
- })
- },
-
- newShare: function(event) {
- var self = this
- var $target = $(event.target)
- var $li = $target.closest('li[data-share-id]')
- var shareId = $li.data('share-id')
- var $loading = $li.find('.share-menu > .icon-loading-small')
-
- if (!$loading.hasClass('hidden') && this.password === '') {
- // in process
- return false
- }
-
- // hide all icons and show loading
- $li.find('.icon').addClass('hidden')
- $loading.removeClass('hidden')
-
- // hide menu
- OC.hideMenus()
-
- var shareData = {}
-
- var isPasswordEnforced = this.configModel.get('enforcePasswordForPublicLink')
- var isExpirationEnforced = this.configModel.get('isDefaultExpireDateEnforced')
-
- // set default expire date
- if (isExpirationEnforced) {
- var defaultExpireDays = this.configModel.get('defaultExpireDate')
- var expireDate = moment().add(defaultExpireDays, 'day').format('DD-MM-YYYY')
- shareData.expireDate = expireDate
- }
-
- // if password is set, add to data
- if (isPasswordEnforced && this.password !== '') {
- shareData.password = this.password
- }
-
- var newShareId = false
-
- // We need a password before the share creation
- if (isPasswordEnforced && !this.showPending && this.password === '') {
- this.showPending = shareId
- var self = this.render()
- self.$el.find('.pending #enforcedPassText').focus()
- } else {
- // else, we have a password or it is not enforced
- $.when(this.model.saveLinkShare(shareData, {
- success: function() {
- $loading.addClass('hidden')
- $li.find('.icon').removeClass('hidden')
- self.render()
- // open the menu by default
- // we can only do that after the render
- if (newShareId) {
- var shares = self.$el.find('li[data-share-id]')
- var $newShare = self.$el.find('li[data-share-id="' + newShareId + '"]')
- }
- },
- error: function() {
- // empty function to override the default Dialog warning
- }
- })).fail(function(response) {
- // password failure? Show error
- self.password = ''
- if (isPasswordEnforced && response && response.responseJSON && response.responseJSON.ocs.meta && response.responseJSON.ocs.meta.message) {
- var $input = self.$el.find('.pending #enforcedPassText')
- $input.tooltip('destroy')
- $input.attr('title', response.responseJSON.ocs.meta.message)
- $input.tooltip({ placement: 'bottom', trigger: 'manual' })
- $input.tooltip('show')
- } else {
- OC.Notification.showTemporary(t('core', 'Unable to create a link share'))
- $loading.addClass('hidden')
- $li.find('.icon').removeClass('hidden')
- }
- }).then(function(response) {
- // resolve before success
- newShareId = response.ocs.data.id
- })
- }
- },
-
- enforcedPasswordSet: function(event) {
- event.preventDefault()
- var $form = $(event.target)
- var $input = $form.find('input.enforcedPassText')
- this.password = $input.val()
- this.showPending = false
- this.newShare(event)
- },
-
- onLinkTextClick: function(event) {
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var $el = $li.find('.linkText')
- $el.focus()
- $el.select()
- },
-
- onHideDownloadChange: function(event) {
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var shareId = $li.data('share-id')
- var $checkbox = $li.find('.hideDownloadCheckbox')
- $checkbox.siblings('.icon-loading-small').removeClass('hidden').addClass('inlineblock')
-
- var hideDownload = false
- if ($checkbox.is(':checked')) {
- hideDownload = true
- }
-
- this.model.saveLinkShare({
- hideDownload: hideDownload,
- cid: shareId
- }, {
- success: function() {
- $checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock')
- },
- error: function(obj, msg) {
- OC.Notification.showTemporary(t('core', 'Unable to toggle this option'))
- $checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock')
- }
- })
- },
-
- onShowPasswordClick: function(event) {
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var shareId = $li.data('share-id')
- $li.find('.linkPass').slideToggle(OC.menuSpeed)
- $li.find('.linkPassMenu').toggleClass('hidden')
- if (!$li.find('.showPasswordCheckbox').is(':checked')) {
- this.model.saveLinkShare({
- password: '',
- cid: shareId
- })
- } else {
- if (!OC.Util.isIE()) {
- $li.find('.linkPassText').focus()
- }
- }
- },
-
- onPasswordKeyUp: function(event) {
- if (event.keyCode === 13) {
- this.onPasswordEntered(event)
- }
- },
-
- onPasswordEntered: function(event) {
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var shareId = $li.data('share-id')
- var $loading = $li.find('.linkPassMenu .icon-loading-small')
- if (!$loading.hasClass('hidden')) {
- // still in process
- return
- }
- var $input = $li.find('.linkPassText')
- $input.removeClass('error')
- $input.parent().find('input').removeClass('error')
- var password = $input.val()
-
- if ($li.find('.linkPassText').attr('placeholder') === PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL) {
-
- // in IE9 the password might be the placeholder due to bugs in the placeholders polyfill
- if (password === PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL) {
- password = ''
- }
- } else {
-
- // in IE9 the password might be the placeholder due to bugs in the placeholders polyfill
- if (password === '' || password === PASSWORD_PLACEHOLDER || password === PASSWORD_PLACEHOLDER_MESSAGE) {
- return
- }
- }
-
- $loading
- .removeClass('hidden')
- .addClass('inlineblock')
-
- this.model.saveLinkShare({
- password: password,
- cid: shareId
- }, {
- complete: function(model) {
- $loading.removeClass('inlineblock').addClass('hidden')
- },
- error: function(model, msg) {
- // Add visual feedback to both the input and the submit button
- $input.parent().find('input').addClass('error')
-
- // destroy old tooltips
- var $container = $input.parent()
- $container.tooltip('destroy')
- $input.addClass('error')
- $container.attr('title', msg)
- $container.tooltip({ placement: 'bottom', trigger: 'manual' })
- $container.tooltip('show')
- }
- })
- },
-
- onPasswordByTalkChange: function(event) {
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var shareId = $li.data('share-id')
- var $checkbox = $li.find('.passwordByTalkCheckbox')
- $checkbox.siblings('.icon-loading-small').removeClass('hidden').addClass('inlineblock')
-
- var sendPasswordByTalk = false
- if ($checkbox.is(':checked')) {
- sendPasswordByTalk = true
- }
-
- this.model.saveLinkShare({
- sendPasswordByTalk: sendPasswordByTalk,
- cid: shareId
- }, {
- success: function() {
- $checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock')
- },
- error: function(obj, msg) {
- OC.Notification.showTemporary(t('core', 'Unable to toggle this option'))
- $checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock')
- }
- })
- },
-
- onAllowPublicEditingChange: function(event) {
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var shareId = $li.data('share-id')
- var $checkbox = $li.find('.publicEditingCheckbox')
- $checkbox.siblings('.icon-loading-small').removeClass('hidden').addClass('inlineblock')
-
- var permissions = OC.PERMISSION_READ
- if ($checkbox.is(':checked')) {
- permissions = OC.PERMISSION_UPDATE | OC.PERMISSION_READ
- }
-
- this.model.saveLinkShare({
- permissions: permissions,
- cid: shareId
- }, {
- success: function() {
- $checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock')
- },
- error: function(obj, msg) {
- OC.Notification.showTemporary(t('core', 'Unable to toggle this option'))
- $checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock')
- }
- })
- },
-
- onPublicUploadChange: function(event) {
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var shareId = $li.data('share-id')
- var permissions = event.currentTarget.value
- this.model.saveLinkShare({
- permissions: permissions,
- cid: shareId
- })
- },
-
- showNoteForm: function(event) {
- event.preventDefault()
- event.stopPropagation()
- var self = this
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var $menu = $element.closest('li')
- var $form = $menu.next('li.share-note-form')
-
- // show elements
- $menu.find('.share-note-delete').toggleClass('hidden')
- $form.toggleClass('hidden')
- $form.find('textarea').focus()
- },
-
- deleteNote: function(event) {
- event.preventDefault()
- event.stopPropagation()
- var self = this
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var shareId = $li.data('share-id')
- var $menu = $element.closest('li')
- var $form = $menu.next('li.share-note-form')
-
- $form.find('.share-note').val('')
-
- $form.addClass('hidden')
- $menu.find('.share-note-delete').addClass('hidden')
-
- self.sendNote('', shareId, $menu)
- },
-
- updateNote: function(event) {
- event.preventDefault()
- event.stopPropagation()
- var self = this
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var shareId = $li.data('share-id')
- var $form = $element.closest('li.share-note-form')
- var $menu = $form.prev('li')
- var message = $form.find('.share-note').val().trim()
-
- if (message.length < 1) {
- return
- }
-
- self.sendNote(message, shareId, $menu)
- },
-
- sendNote: function(note, shareId, $menu) {
- var $form = $menu.next('li.share-note-form')
- var $submit = $form.find('input.share-note-submit')
- var $error = $form.find('input.share-note-error')
-
- $submit.prop('disabled', true)
- $menu.find('.icon-loading-small').removeClass('hidden')
- $menu.find('.icon-edit').hide()
-
- var complete = function() {
- $submit.prop('disabled', false)
- $menu.find('.icon-loading-small').addClass('hidden')
- $menu.find('.icon-edit').show()
- }
- var error = function() {
- $error.show()
- setTimeout(function() {
- $error.hide()
- }, 3000)
- }
-
- // send data
- $.ajax({
- method: 'PUT',
- url: OC.linkToOCS('apps/files_sharing/api/v1/shares', 2) + shareId + '?' + OC.buildQueryString({ format: 'json' }),
- data: { note: note },
- complete: complete,
- error: error
- })
- },
-
- render: function() {
- this.$el.find('.has-tooltip').tooltip()
-
- // reset previously set passwords
- this.password = ''
-
- var linkShareTemplate = this.template()
- var resharingAllowed = this.model.sharePermissionPossible()
-
- if (!resharingAllowed
- || !this.showLink
- || !this.configModel.isShareWithLinkAllowed()) {
- var templateData = { shareAllowed: false }
- if (!resharingAllowed) {
- // add message
- templateData.noSharingPlaceholder = t('core', 'Resharing is not allowed')
- }
- this.$el.html(linkShareTemplate(templateData))
- return this
- }
-
- var publicUpload
- = this.model.isFolder()
- && this.model.createPermissionPossible()
- && this.configModel.isPublicUploadEnabled()
-
- var publicEditingChecked = ''
- if (this.model.isPublicEditingAllowed()) {
- publicEditingChecked = 'checked="checked"'
- }
-
- var isPasswordEnforced = this.configModel.get('enforcePasswordForPublicLink')
- var isPasswordEnabledByDefault = this.configModel.get('enableLinkPasswordByDefault') === true
- var passwordPlaceholderInitial = this.configModel.get('enforcePasswordForPublicLink')
- ? PASSWORD_PLACEHOLDER_MESSAGE : PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL
-
- var publicEditable
- = !this.model.isFolder()
- && this.model.updatePermissionPossible()
-
- var isExpirationEnforced = this.configModel.get('isDefaultExpireDateEnforced')
-
- // what if there is another date picker on that page?
- var minDate = new Date()
- // min date should always be the next day
- minDate.setDate(minDate.getDate() + 1)
-
- $.datepicker.setDefaults({
- minDate: minDate
- })
-
- this.$el.find('.datepicker').datepicker({ dateFormat: 'dd-mm-yy' })
-
- var minPasswordLength = 4
- // password policy?
- if (OC.getCapabilities().password_policy && OC.getCapabilities().password_policy.minLength) {
- minPasswordLength = OC.getCapabilities().password_policy.minLength
- }
-
- var popoverBase = {
- urlLabel: t('core', 'Link'),
- hideDownloadLabel: t('core', 'Hide download'),
- enablePasswordLabel: isPasswordEnforced ? t('core', 'Password protection enforced') : t('core', 'Password protect'),
- passwordLabel: t('core', 'Password'),
- passwordPlaceholderInitial: passwordPlaceholderInitial,
- publicUpload: publicUpload,
- publicEditing: publicEditable,
- publicEditingChecked: publicEditingChecked,
- publicEditingLabel: t('core', 'Allow editing'),
- mailPrivatePlaceholder: t('core', 'Email link to person'),
- mailButtonText: t('core', 'Send'),
- publicUploadRWLabel: t('core', 'Allow upload and editing'),
- publicUploadRLabel: t('core', 'Read only'),
- publicUploadWLabel: t('core', 'File drop (upload only)'),
- publicUploadRWValue: OC.PERMISSION_UPDATE | OC.PERMISSION_CREATE | OC.PERMISSION_READ | OC.PERMISSION_DELETE,
- publicUploadRValue: OC.PERMISSION_READ,
- publicUploadWValue: OC.PERMISSION_CREATE,
- expireDateLabel: isExpirationEnforced ? t('core', 'Expiration date enforced') : t('core', 'Set expiration date'),
- expirationLabel: t('core', 'Expiration'),
- expirationDatePlaceholder: t('core', 'Expiration date'),
- isExpirationEnforced: isExpirationEnforced,
- isPasswordEnforced: isPasswordEnforced,
- defaultExpireDate: moment().add(1, 'day').format('DD-MM-YYYY'), // Can't expire today
- addNoteLabel: t('core', 'Note to recipient'),
- unshareLabel: t('core', 'Unshare'),
- unshareLinkLabel: t('core', 'Delete share link'),
- newShareLabel: t('core', 'Add another link')
- }
-
- var pendingPopover = {
- isPasswordEnforced: isPasswordEnforced,
- enforcedPasswordLabel: t('core', 'Password protection for links is mandatory'),
- passwordPlaceholder: passwordPlaceholderInitial,
- minPasswordLength: minPasswordLength
- }
- var pendingPopoverMenu = this.pendingPopoverMenuTemplate(_.extend({}, pendingPopover))
-
- var linkShares = this.getShareeList()
- if (_.isArray(linkShares)) {
- for (var i = 0; i < linkShares.length; i++) {
- var social = []
- OC.Share.Social.Collection.each(function(model) {
- var url = model.get('url')
- url = url.replace('{{reference}}', linkShares[i].shareLinkURL)
- social.push({
- url: url,
- label: t('core', 'Share to {name}', { name: model.get('name') }),
- name: model.get('name'),
- iconClass: model.get('iconClass'),
- newWindow: model.get('newWindow')
- })
- })
- var popover = this.getPopoverObject(linkShares[i])
- linkShares[i].popoverMenu = this.popoverMenuTemplate(_.extend({}, popoverBase, popover, { social: social }))
- linkShares[i].pendingPopoverMenu = pendingPopoverMenu
- }
- }
-
- this.$el.html(linkShareTemplate({
- linkShares: linkShares,
- shareAllowed: true,
- nolinkShares: linkShares.length === 0,
- newShareLabel: t('core', 'Share link'),
- newShareTitle: t('core', 'New share link'),
- pendingPopoverMenu: pendingPopoverMenu,
- showPending: this.showPending === this.newShareId,
- newShareId: this.newShareId
- }))
-
- this.delegateEvents()
-
- // new note autosize
- autosize(this.$el.find('.share-note-form .share-note'))
-
- return this
- },
-
- onToggleMenu: function(event) {
- event.preventDefault()
- event.stopPropagation()
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var $menu = $li.find('.sharingOptionsGroup .popovermenu')
- var shareId = $li.data('share-id')
-
- OC.showMenu(null, $menu)
-
- // focus the password if not set and enforced
- var isPasswordEnabledByDefault = this.configModel.get('enableLinkPasswordByDefault') === true
- var haspassword = $menu.find('.linkPassText').val() !== ''
-
- if (!haspassword && isPasswordEnabledByDefault) {
- $menu.find('.linkPassText').focus()
- }
- },
-
- /**
- * @returns {Function} from Handlebars
- * @private
- */
- template: function() {
- return OC.Share.Templates['sharedialoglinkshareview']
- },
-
- /**
- * renders the popover template and returns the resulting HTML
- *
- * @param {Object} data
- * @returns {string}
- */
- popoverMenuTemplate: function(data) {
- return OC.Share.Templates['sharedialoglinkshareview_popover_menu'](data)
- },
-
- /**
- * renders the pending popover template and returns the resulting HTML
- *
- * @param {Object} data
- * @returns {string}
- */
- pendingPopoverMenuTemplate: function(data) {
- return OC.Share.Templates['sharedialoglinkshareview_popover_menu_pending'](data)
- },
-
- onPopUpClick: function(event) {
- event.preventDefault()
- event.stopPropagation()
-
- var url = $(event.currentTarget).data('url')
- var newWindow = $(event.currentTarget).data('window')
- $(event.currentTarget).tooltip('hide')
- if (url) {
- if (newWindow === true) {
- var width = 600
- var height = 400
- var left = (screen.width / 2) - (width / 2)
- var top = (screen.height / 2) - (height / 2)
-
- window.open(url, 'name', 'width=' + width + ', height=' + height + ', top=' + top + ', left=' + left)
- } else {
- window.location.href = url
- }
- }
- },
-
- onExpireDateChange: function(event) {
- var $element = $(event.target)
- var li = $element.closest('li[data-share-id]')
- var shareId = li.data('share-id')
- var expirationDatePicker = '#expirationDateContainer-' + shareId
- var datePicker = $(expirationDatePicker)
- var state = $element.prop('checked')
- datePicker.toggleClass('hidden', !state)
-
- if (!state) {
- // disabled, let's hide the input and
- // set the expireDate to nothing
- $element.closest('li').next('li').addClass('hidden')
- this.setExpirationDate('', shareId)
- } else {
- // enabled, show the input and the datepicker
- $element.closest('li').next('li').removeClass('hidden')
- this.showDatePicker(event)
-
- }
- },
-
- showDatePicker: function(event) {
- var $element = $(event.target)
- var li = $element.closest('li[data-share-id]')
- var shareId = li.data('share-id')
- var maxDate = $element.data('max-date')
- var expirationDatePicker = '#expirationDatePicker-' + shareId
- var self = this
-
- $(expirationDatePicker).datepicker({
- dateFormat: 'dd-mm-yy',
- onSelect: function(expireDate) {
- self.setExpirationDate(expireDate, shareId)
- },
- maxDate: maxDate
- })
- $(expirationDatePicker).datepicker('show')
- $(expirationDatePicker).focus()
-
- },
-
- setExpirationDate: function(expireDate, shareId) {
- this.model.saveLinkShare({ expireDate: expireDate, cid: shareId })
- },
-
- onChangeExpirationDate: function(event) {
- var $element = $(event.target)
- var expireDate = $element.val()
- var li = $element.closest('li[data-share-id]')
- var shareId = li.data('share-id')
- var expirationDatePicker = '#expirationDatePicker-' + shareId
-
- this.setExpirationDate(expireDate, shareId)
- $(expirationDatePicker).datepicker('hide')
- },
-
- /**
- * get an array of sharees' share properties
- *
- * @returns {Array}
- */
- getShareeList: function() {
- var shares = this.model.get('linkShares')
-
- if (!this.model.hasLinkShares()) {
- return []
- }
-
- var list = []
- for (var index = 0; index < shares.length; index++) {
- var share = this.getShareeObject(index)
- // first empty {} is necessary, otherwise we get in trouble
- // with references
- list.push(_.extend({}, share))
- }
-
- return list
- },
-
- /**
- *
- * @param {OC.Share.Types.ShareInfo} shareInfo
- * @returns {object}
- */
- getShareeObject: function(shareIndex) {
- var share = this.model.get('linkShares')[shareIndex]
-
- return _.extend({}, share, {
- cid: share.id,
- shareAllowed: true,
- linkShareLabel: share.label ? share.label : t('core', 'Share link'),
- popoverMenu: {},
- shareLinkURL: share.url,
- newShareTitle: t('core', 'New share link'),
- copyLabel: t('core', 'Copy link'),
- showPending: this.showPending === share.id,
- linkShareCreationDate: t('core', 'Created on {time}', { time: moment(share.stime * 1000).format('LLLL') })
- })
- },
-
- getPopoverObject: function(share) {
- var publicUploadRWChecked = ''
- var publicUploadRChecked = ''
- var publicUploadWChecked = ''
-
- switch (this.model.linkSharePermissions(share.id)) {
- case OC.PERMISSION_READ:
- publicUploadRChecked = 'checked'
- break
- case OC.PERMISSION_CREATE:
- publicUploadWChecked = 'checked'
- break
- case OC.PERMISSION_UPDATE | OC.PERMISSION_CREATE | OC.PERMISSION_READ | OC.PERMISSION_DELETE:
- publicUploadRWChecked = 'checked'
- break
- }
-
- var isPasswordSet = !!share.password
- var isPasswordEnabledByDefault = this.configModel.get('enableLinkPasswordByDefault') === true
- var isPasswordEnforced = this.configModel.get('enforcePasswordForPublicLink')
- var isExpirationEnforced = this.configModel.get('isDefaultExpireDateEnforced')
- var defaultExpireDays = this.configModel.get('defaultExpireDate')
- var hasExpireDate = !!share.expiration || isExpirationEnforced
-
- var expireDate
- if (hasExpireDate) {
- expireDate = moment(share.expiration, 'YYYY-MM-DD').format('DD-MM-YYYY')
- }
-
- var isTalkEnabled = OC.appswebroots['spreed'] !== undefined
- var sendPasswordByTalk = share.sendPasswordByTalk
-
- var hideDownload = share.hideDownload
-
- var maxDate = null
-
- if (hasExpireDate) {
- if (isExpirationEnforced) {
- // TODO: hack: backend returns string instead of integer
- var shareTime = share.stime
- if (_.isNumber(shareTime)) {
- shareTime = new Date(shareTime * 1000)
- }
- if (!shareTime) {
- shareTime = new Date() // now
- }
- shareTime = OC.Util.stripTime(shareTime).getTime()
- maxDate = new Date(shareTime + defaultExpireDays * 24 * 3600 * 1000)
- }
- }
-
- return {
- cid: share.id,
- shareLinkURL: share.url,
- passwordPlaceholder: isPasswordSet ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,
- isPasswordSet: isPasswordSet || isPasswordEnabledByDefault || isPasswordEnforced,
- showPasswordByTalkCheckBox: isTalkEnabled && isPasswordSet,
- passwordByTalkLabel: t('core', 'Password protect by Talk'),
- isPasswordByTalkSet: sendPasswordByTalk,
- publicUploadRWChecked: publicUploadRWChecked,
- publicUploadRChecked: publicUploadRChecked,
- publicUploadWChecked: publicUploadWChecked,
- hasExpireDate: hasExpireDate,
- expireDate: expireDate,
- shareNote: share.note,
- hasNote: share.note !== '',
- maxDate: maxDate,
- hideDownload: hideDownload,
- isExpirationEnforced: isExpirationEnforced
- }
- },
-
- onUnshare: function(event) {
- event.preventDefault()
- event.stopPropagation()
- var self = this
- var $element = $(event.target)
- if (!$element.is('a')) {
- $element = $element.closest('a')
- }
-
- var $loading = $element.find('.icon-loading-small').eq(0)
- if (!$loading.hasClass('hidden')) {
- // in process
- return false
- }
- $loading.removeClass('hidden')
-
- var $li = $element.closest('li[data-share-id]')
-
- var shareId = $li.data('share-id')
-
- self.model.removeShare(shareId, {
- success: function() {
- $li.remove()
- self.render()
- },
- error: function() {
- $loading.addClass('hidden')
- OC.Notification.showTemporary(t('core', 'Could not unshare'))
- }
- })
- return false
- }
-
- })
-
- OC.Share.ShareDialogLinkShareView = ShareDialogLinkShareView
-
-})()
diff --git a/core/js/sharedialogresharerinfoview.js b/core/js/sharedialogresharerinfoview.js
deleted file mode 100644
index b235adf4352..00000000000
--- a/core/js/sharedialogresharerinfoview.js
+++ /dev/null
@@ -1,159 +0,0 @@
-/* eslint-disable */
-/*
- * Copyright (c) 2015
- *
- * This file is licensed under the Affero General Public License version 3
- * or later.
- *
- * See the COPYING-README file.
- *
- */
-
-/* globals Handlebars */
-
-(function() {
- if (!OC.Share) {
- OC.Share = {}
- }
-
- /**
- * @class OCA.Share.ShareDialogView
- * @member {OC.Share.ShareItemModel} model
- * @member {jQuery} $el
- * @memberof OCA.Sharing
- * @classdesc
- *
- * Represents the GUI of the share dialogue
- *
- */
- var ShareDialogResharerInfoView = OC.Backbone.View.extend({
- /** @type {string} **/
- id: 'shareDialogResharerInfo',
-
- /** @type {string} **/
- tagName: 'div',
-
- /** @type {string} **/
- className: 'reshare',
-
- /** @type {OC.Share.ShareConfigModel} **/
- configModel: undefined,
-
- /** @type {Function} **/
- _template: undefined,
-
- initialize: function(options) {
- var view = this
-
- this.model.on('change:reshare', function() {
- view.render()
- })
-
- if (!_.isUndefined(options.configModel)) {
- this.configModel = options.configModel
- } else {
- throw 'missing OC.Share.ShareConfigModel'
- }
- },
-
- render: function() {
- if (!this.model.hasReshare()
- || this.model.getReshareOwner() === OC.currentUser) {
- this.$el.empty()
- return this
- }
-
- var reshareTemplate = this.template()
- var ownerDisplayName = this.model.getReshareOwnerDisplayname()
- var shareNote = this.model.getReshareNote()
-
- var sharedByText = ''
-
- if (this.model.getReshareType() === OC.Share.SHARE_TYPE_GROUP) {
- sharedByText = t(
- 'core',
- 'Shared with you and the group {group} by {owner}',
- {
- group: this.model.getReshareWithDisplayName(),
- owner: ownerDisplayName
- },
- undefined,
- { escape: false }
- )
- } else if (this.model.getReshareType() === OC.Share.SHARE_TYPE_CIRCLE) {
- sharedByText = t(
- 'core',
- 'Shared with you and {circle} by {owner}',
- {
- circle: this.model.getReshareWithDisplayName(),
- owner: ownerDisplayName
- },
- undefined,
- { escape: false }
- )
- } else if (this.model.getReshareType() === OC.Share.SHARE_TYPE_ROOM) {
- if (this.model.get('reshare').share_with_displayname) {
- sharedByText = t(
- 'core',
- 'Shared with you and the conversation {conversation} by {owner}',
- {
- conversation: this.model.getReshareWithDisplayName(),
- owner: ownerDisplayName
- },
- undefined,
- { escape: false }
- )
- } else {
- sharedByText = t(
- 'core',
- 'Shared with you in a conversation by {owner}',
- {
- owner: ownerDisplayName
- },
- undefined,
- { escape: false }
- )
- }
- } else {
- sharedByText = t(
- 'core',
- 'Shared with you by {owner}',
- { owner: ownerDisplayName },
- undefined,
- { escape: false }
- )
- }
-
- this.$el.html(reshareTemplate({
- reshareOwner: this.model.getReshareOwner(),
- sharedByText: sharedByText,
- shareNote: shareNote,
- hasShareNote: shareNote !== ''
- }))
-
- this.$el.find('.avatar').each(function() {
- var $this = $(this)
- $this.avatar($this.data('username'), 32)
- })
-
- this.$el.find('.reshare').contactsMenu(
- this.model.getReshareOwner(),
- OC.Share.SHARE_TYPE_USER,
- this.$el)
-
- return this
- },
-
- /**
- * @returns {Function} from Handlebars
- * @private
- */
- template: function() {
- return OC.Share.Templates['sharedialogresharerinfoview']
- }
-
- })
-
- OC.Share.ShareDialogResharerInfoView = ShareDialogResharerInfoView
-
-})()
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js
deleted file mode 100644
index 5fdb352fd50..00000000000
--- a/core/js/sharedialogshareelistview.js
+++ /dev/null
@@ -1,777 +0,0 @@
-/* eslint-disable */
-/* global OC, Handlebars */
-
-/*
- * Copyright (c) 2015
- *
- * This file is licensed under the Affero General Public License version 3
- * or later.
- *
- * See the COPYING-README file.
- *
- */
-
-/* globals Handlebars */
-
-(function() {
-
- var PASSWORD_PLACEHOLDER = '**********'
- var PASSWORD_PLACEHOLDER_MESSAGE = t('core', 'Choose a password for the mail share')
-
- if (!OC.Share) {
- OC.Share = {}
- }
-
- /**
- * @class OCA.Share.ShareDialogShareeListView
- * @member {OC.Share.ShareItemModel} model
- * @member {jQuery} $el
- * @memberof OCA.Sharing
- * @classdesc
- *
- * Represents the sharee list part in the GUI of the share dialogue
- *
- */
- var ShareDialogShareeListView = OC.Backbone.View.extend({
- /** @type {string} **/
- id: 'shareDialogLinkShare',
-
- /** @type {OC.Share.ShareConfigModel} **/
- configModel: undefined,
-
- _menuOpen: false,
-
- /** @type {boolean|number} **/
- _renderPermissionChange: false,
-
- events: {
- 'click .unshare': 'onUnshare',
- 'click .share-add': 'showNoteForm',
- 'click .share-note-delete': 'deleteNote',
- 'click .share-note-submit': 'updateNote',
- 'click .share-menu .icon-more': 'onToggleMenu',
- 'click .permissions': 'onPermissionChange',
- 'click .expireDate': 'onExpireDateChange',
- 'click .password': 'onMailSharePasswordProtectChange',
- 'click .passwordByTalk': 'onMailSharePasswordProtectByTalkChange',
- 'click .secureDrop': 'onSecureDropChange',
- 'keyup input.passwordField': 'onMailSharePasswordKeyUp',
- 'focusout input.passwordField': 'onMailSharePasswordEntered',
- 'change .datepicker': 'onChangeExpirationDate',
- 'click .datepicker': 'showDatePicker'
- },
-
- initialize: function(options) {
- if (!_.isUndefined(options.configModel)) {
- this.configModel = options.configModel
- } else {
- throw 'missing OC.Share.ShareConfigModel'
- }
-
- var view = this
- this.model.on('change:shares', function() {
- view.render()
- })
- },
-
- /**
- *
- * @param {OC.Share.Types.ShareInfo} shareInfo
- * @returns {object}
- */
- getShareeObject: function(shareIndex) {
- var shareWith = this.model.getShareWith(shareIndex)
- var shareWithDisplayName = this.model.getShareWithDisplayName(shareIndex)
- var shareWithAvatar = this.model.getShareWithAvatar(shareIndex)
- var shareWithTitle = ''
- var shareType = this.model.getShareType(shareIndex)
- var sharedBy = this.model.getSharedBy(shareIndex)
- var sharedByDisplayName = this.model.getSharedByDisplayName(shareIndex)
- var fileOwnerUid = this.model.getFileOwnerUid(shareIndex)
-
- var hasPermissionOverride = {}
- if (shareType === OC.Share.SHARE_TYPE_GROUP) {
- shareWithDisplayName = shareWithDisplayName + ' (' + t('core', 'group') + ')'
- } else if (shareType === OC.Share.SHARE_TYPE_REMOTE) {
- shareWithDisplayName = shareWithDisplayName + ' (' + t('core', 'remote') + ')'
- } else if (shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP) {
- shareWithDisplayName = shareWithDisplayName + ' (' + t('core', 'remote group') + ')'
- } else if (shareType === OC.Share.SHARE_TYPE_EMAIL) {
- shareWithDisplayName = shareWithDisplayName + ' (' + t('core', 'email') + ')'
- } else if (shareType === OC.Share.SHARE_TYPE_CIRCLE) {
- } else if (shareType === OC.Share.SHARE_TYPE_ROOM) {
- shareWithDisplayName = shareWithDisplayName + ' (' + t('core', 'conversation') + ')'
- }
-
- if (shareType === OC.Share.SHARE_TYPE_GROUP) {
- shareWithTitle = shareWith + ' (' + t('core', 'group') + ')'
- } else if (shareType === OC.Share.SHARE_TYPE_REMOTE) {
- shareWithTitle = shareWith + ' (' + t('core', 'remote') + ')'
- } else if (shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP) {
- shareWithTitle = shareWith + ' (' + t('core', 'remote group') + ')'
- } else if (shareType === OC.Share.SHARE_TYPE_EMAIL) {
- shareWithTitle = shareWith + ' (' + t('core', 'email') + ')'
- } else if (shareType === OC.Share.SHARE_TYPE_CIRCLE) {
- shareWithTitle = shareWith
- // Force "shareWith" in the template to a safe value, as the
- // original "shareWith" returned by the model may contain
- // problematic characters like "'".
- shareWith = 'circle-' + shareIndex
- }
-
- if (sharedBy !== OC.getCurrentUser().uid) {
- var empty = shareWithTitle === ''
- if (!empty) {
- shareWithTitle += ' ('
- }
- shareWithTitle += t('core', 'shared by {sharer}', { sharer: sharedByDisplayName })
- if (!empty) {
- shareWithTitle += ')'
- }
- }
-
- var share = this.model.get('shares')[shareIndex]
- var password = share.password
- var hasPassword = password !== null && password !== ''
- var sendPasswordByTalk = share.send_password_by_talk
-
- var shareNote = this.model.getNote(shareIndex)
-
- return _.extend(hasPermissionOverride, {
- cid: this.cid,
- hasSharePermission: this.model.hasSharePermission(shareIndex),
- editPermissionState: this.model.editPermissionState(shareIndex),
- hasCreatePermission: this.model.hasCreatePermission(shareIndex),
- hasUpdatePermission: this.model.hasUpdatePermission(shareIndex),
- hasDeletePermission: this.model.hasDeletePermission(shareIndex),
- sharedBy: sharedBy,
- sharedByDisplayName: sharedByDisplayName,
- shareWith: shareWith,
- shareWithDisplayName: shareWithDisplayName,
- shareWithAvatar: shareWithAvatar,
- shareWithTitle: shareWithTitle,
- shareType: shareType,
- shareId: this.model.get('shares')[shareIndex].id,
- modSeed: shareWithAvatar || (shareType !== OC.Share.SHARE_TYPE_USER && shareType !== OC.Share.SHARE_TYPE_CIRCLE && shareType !== OC.Share.SHARE_TYPE_ROOM),
- owner: fileOwnerUid,
- isShareWithCurrentUser: (shareType === OC.Share.SHARE_TYPE_USER && shareWith === OC.getCurrentUser().uid),
- canUpdateShareSettings: (sharedBy === OC.getCurrentUser().uid || fileOwnerUid === OC.getCurrentUser().uid),
- isRemoteShare: shareType === OC.Share.SHARE_TYPE_REMOTE,
- isRemoteGroupShare: shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP,
- isNoteAvailable: shareType !== OC.Share.SHARE_TYPE_REMOTE && shareType !== OC.Share.SHARE_TYPE_REMOTE_GROUP,
- isMailShare: shareType === OC.Share.SHARE_TYPE_EMAIL,
- isCircleShare: shareType === OC.Share.SHARE_TYPE_CIRCLE,
- isFileSharedByMail: shareType === OC.Share.SHARE_TYPE_EMAIL && !this.model.isFolder(),
- isPasswordSet: hasPassword && !sendPasswordByTalk,
- isPasswordByTalkSet: hasPassword && sendPasswordByTalk,
- isTalkEnabled: OC.appswebroots['spreed'] !== undefined,
- secureDropMode: !this.model.hasReadPermission(shareIndex),
- hasExpireDate: this.model.getExpireDate(shareIndex) !== null,
- shareNote: shareNote,
- hasNote: shareNote !== '',
- expireDate: moment(this.model.getExpireDate(shareIndex), 'YYYY-MM-DD').format('DD-MM-YYYY'),
- // The password placeholder does not take into account if
- // sending the password by Talk is enabled or not; when
- // switching from sending the password by Talk to sending the
- // password by email the password is reused and the share
- // updated, so the placeholder already shows the password in the
- // brief time between disabling sending the password by email
- // and receiving the updated share.
- passwordPlaceholder: hasPassword ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,
- passwordByTalkPlaceholder: (hasPassword && sendPasswordByTalk) ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE
- })
- },
-
- getShareProperties: function() {
- return {
- unshareLabel: t('core', 'Unshare'),
- addNoteLabel: t('core', 'Note to recipient'),
- canShareLabel: t('core', 'Can reshare'),
- canEditLabel: t('core', 'Can edit'),
- createPermissionLabel: t('core', 'Can create'),
- updatePermissionLabel: t('core', 'Can change'),
- deletePermissionLabel: t('core', 'Can delete'),
- secureDropLabel: t('core', 'File drop (upload only)'),
- expireDateLabel: t('core', 'Set expiration date'),
- passwordLabel: t('core', 'Password protect'),
- passwordByTalkLabel: t('core', 'Password protect by Talk'),
- crudsLabel: t('core', 'Access control'),
- expirationDatePlaceholder: t('core', 'Expiration date'),
- defaultExpireDate: moment().add(1, 'day').format('DD-MM-YYYY'), // Can't expire today
- triangleSImage: OC.imagePath('core', 'actions/triangle-s'),
- isResharingAllowed: this.configModel.get('isResharingAllowed'),
- isPasswordForMailSharesRequired: this.configModel.get('isPasswordForMailSharesRequired'),
- sharePermissionPossible: this.model.sharePermissionPossible(),
- editPermissionPossible: this.model.editPermissionPossible(),
- createPermissionPossible: this.model.createPermissionPossible(),
- updatePermissionPossible: this.model.updatePermissionPossible(),
- deletePermissionPossible: this.model.deletePermissionPossible(),
- sharePermission: OC.PERMISSION_SHARE,
- createPermission: OC.PERMISSION_CREATE,
- updatePermission: OC.PERMISSION_UPDATE,
- deletePermission: OC.PERMISSION_DELETE,
- readPermission: OC.PERMISSION_READ,
- isFolder: this.model.isFolder()
- }
- },
-
- /**
- * get an array of sharees' share properties
- *
- * @returns {Array}
- */
- getShareeList: function() {
- var universal = this.getShareProperties()
-
- if (!this.model.hasUserShares()) {
- return []
- }
-
- var shares = this.model.get('shares')
- var list = []
- for (var index = 0; index < shares.length; index++) {
- var share = this.getShareeObject(index)
-
- if (share.shareType === OC.Share.SHARE_TYPE_LINK) {
- continue
- }
- // first empty {} is necessary, otherwise we get in trouble
- // with references
- list.push(_.extend({}, universal, share))
- }
-
- return list
- },
-
- getLinkReshares: function() {
- var universal = {
- unshareLabel: t('core', 'Unshare')
- }
-
- if (!this.model.hasUserShares()) {
- return []
- }
-
- var shares = this.model.get('shares')
- var list = []
- for (var index = 0; index < shares.length; index++) {
- var share = this.getShareeObject(index)
-
- if (share.shareType !== OC.Share.SHARE_TYPE_LINK) {
- continue
- }
- // first empty {} is necessary, otherwise we get in trouble
- // with references
- list.push(_.extend({}, universal, share, {
- shareInitiator: shares[index].uid_owner,
- shareInitiatorText: t('core', '{shareInitiatorDisplayName} shared via link', { shareInitiatorDisplayName: shares[index].displayname_owner })
- }))
- }
-
- return list
- },
-
- render: function() {
- if (!this._renderPermissionChange) {
- this.$el.html(this.template({
- cid: this.cid,
- sharees: this.getShareeList(),
- linkReshares: this.getLinkReshares()
- }))
-
- this.$('.avatar').each(function() {
- var $this = $(this)
-
- if ($this.hasClass('imageplaceholderseed')) {
- $this.css({ width: 32, height: 32 })
- if ($this.data('avatar')) {
- $this.css('border-radius', '0%')
- $this.css('background', 'url(' + $this.data('avatar') + ') no-repeat')
- $this.css('background-size', '31px')
- } else {
- $this.imageplaceholder($this.data('seed'))
- }
- } else {
- // user, size, ie8fix, hidedefault, callback, displayname
- $this.avatar($this.data('username'), 32, undefined, undefined, undefined, $this.data('displayname'))
- }
- })
-
- this.$('.has-tooltip').tooltip({
- placement: 'bottom'
- })
-
- this.$('ul.shareWithList > li').each(function() {
- var $this = $(this)
-
- var shareWith = $this.data('share-with')
- var shareType = $this.data('share-type')
-
- $this.find('div.avatar, span.username').contactsMenu(shareWith, shareType, $this)
- })
- } else {
- var permissionChangeShareId = parseInt(this._renderPermissionChange, 10)
- var shareWithIndex = this.model.findShareWithIndex(permissionChangeShareId)
- var sharee = this.getShareeObject(shareWithIndex)
- $.extend(sharee, this.getShareProperties())
- var $li = this.$('li[data-share-id=' + permissionChangeShareId + ']')
- $li.find('.sharingOptionsGroup .popovermenu').replaceWith(this.popoverMenuTemplate(sharee))
- }
-
- var _this = this
- this.getShareeList().forEach(function(sharee) {
- var $edit = _this.$('#canEdit-' + _this.cid + '-' + sharee.shareId)
- if ($edit.length === 1) {
- $edit.prop('checked', sharee.editPermissionState === 'checked')
- if (sharee.isFolder) {
- $edit.prop('indeterminate', sharee.editPermissionState === 'indeterminate')
- }
- }
- })
- this.$('.popovermenu').on('afterHide', function() {
- _this._menuOpen = false
- })
- this.$('.popovermenu').on('beforeHide', function() {
- var shareId = parseInt(_this._menuOpen, 10)
- if (!_.isNaN(shareId)) {
- var datePickerClass = '.expirationDateContainer-' + _this.cid + '-' + shareId
- var datePickerInput = '#expirationDatePicker-' + _this.cid + '-' + shareId
- var expireDateCheckbox = '#expireDate-' + _this.cid + '-' + shareId
- if ($(expireDateCheckbox).prop('checked')) {
- $(datePickerInput).removeClass('hidden-visually')
- $(datePickerClass).removeClass('hasDatepicker')
- $(datePickerClass + ' .ui-datepicker').hide()
- }
- }
- })
- if (this._menuOpen !== false) {
- // Open menu again if it was opened before
- var shareId = parseInt(this._menuOpen, 10)
- if (!_.isNaN(shareId)) {
- var liSelector = 'li[data-share-id=' + shareId + ']'
- OC.showMenu(null, this.$(liSelector + ' .sharingOptionsGroup .popovermenu'))
- }
- }
-
- this._renderPermissionChange = false
-
- // new note autosize
- autosize(this.$el.find('.share-note-form .share-note'))
-
- this.delegateEvents()
-
- return this
- },
-
- /**
- * @returns {Function} from Handlebars
- * @private
- */
- template: function(data) {
- var sharees = data.sharees
- if (_.isArray(sharees)) {
- for (var i = 0; i < sharees.length; i++) {
- data.sharees[i].popoverMenu = this.popoverMenuTemplate(sharees[i])
- }
- }
- return OC.Share.Templates['sharedialogshareelistview'](data)
- },
-
- /**
- * renders the popover template and returns the resulting HTML
- *
- * @param {Object} data
- * @returns {string}
- */
- popoverMenuTemplate: function(data) {
- return OC.Share.Templates['sharedialogshareelistview_popover_menu'](data)
- },
-
- showNoteForm: function(event) {
- event.preventDefault()
- event.stopPropagation()
- var $element = $(event.target)
- var $menu = $element.closest('li')
- var $form = $menu.next('li.share-note-form')
-
- // show elements
- $menu.find('.share-note-delete').toggleClass('hidden')
- $form.toggleClass('hidden')
- $form.find('textarea').focus()
- },
-
- deleteNote: function(event) {
- event.preventDefault()
- event.stopPropagation()
- var self = this
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var shareId = $li.data('share-id')
- var $menu = $element.closest('li')
- var $form = $menu.next('li.share-note-form')
-
- console.log($form.find('.share-note'))
- $form.find('.share-note').val('')
-
- $form.addClass('hidden')
- $menu.find('.share-note-delete').addClass('hidden')
-
- self.sendNote('', shareId, $menu)
- },
-
- updateNote: function(event) {
- event.preventDefault()
- event.stopPropagation()
- var self = this
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var shareId = $li.data('share-id')
- var $form = $element.closest('li.share-note-form')
- var $menu = $form.prev('li')
- var message = $form.find('.share-note').val().trim()
-
- if (message.length < 1) {
- return
- }
-
- self.sendNote(message, shareId, $menu)
-
- },
-
- sendNote: function(note, shareId, $menu) {
- var $form = $menu.next('li.share-note-form')
- var $submit = $form.find('input.share-note-submit')
- var $error = $form.find('input.share-note-error')
-
- $submit.prop('disabled', true)
- $menu.find('.icon-loading-small').removeClass('hidden')
- $menu.find('.icon-edit').hide()
-
- var complete = function() {
- $submit.prop('disabled', false)
- $menu.find('.icon-loading-small').addClass('hidden')
- $menu.find('.icon-edit').show()
- }
- var error = function() {
- $error.show()
- setTimeout(function() {
- $error.hide()
- }, 3000)
- }
-
- // send data
- $.ajax({
- method: 'PUT',
- url: OC.linkToOCS('apps/files_sharing/api/v1/shares', 2) + shareId + '?' + OC.buildQueryString({ format: 'json' }),
- data: { note: note },
- complete: complete,
- error: error
- })
- },
-
- onUnshare: function(event) {
- event.preventDefault()
- event.stopPropagation()
- var self = this
- var $element = $(event.target)
- if (!$element.is('a')) {
- $element = $element.closest('a')
- }
-
- var $loading = $element.find('.icon-loading-small').eq(0)
- if (!$loading.hasClass('hidden')) {
- // in process
- return false
- }
- $loading.removeClass('hidden')
-
- var $li = $element.closest('li[data-share-id]')
-
- var shareId = $li.data('share-id')
-
- self.model.removeShare(shareId)
- .done(function() {
- $li.remove()
- })
- .fail(function() {
- $loading.addClass('hidden')
- OC.Notification.showTemporary(t('core', 'Could not unshare'))
- })
- return false
- },
-
- onToggleMenu: function(event) {
- event.preventDefault()
- event.stopPropagation()
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var $menu = $li.find('.sharingOptionsGroup .popovermenu')
-
- OC.showMenu(null, $menu)
- this._menuOpen = $li.data('share-id')
- },
-
- onExpireDateChange: function(event) {
- var $element = $(event.target)
- var li = $element.closest('li[data-share-id]')
- var shareId = li.data('share-id')
- var datePickerClass = '.expirationDateContainer-' + this.cid + '-' + shareId
- var datePicker = $(datePickerClass)
- var state = $element.prop('checked')
- datePicker.toggleClass('hidden', !state)
- if (!state) {
- // disabled, let's hide the input and
- // set the expireDate to nothing
- $element.closest('li').next('li').addClass('hidden')
- this.setExpirationDate(shareId, '')
- } else {
- // enabled, show the input and the datepicker
- $element.closest('li').next('li').removeClass('hidden')
- this.showDatePicker(event)
-
- }
- },
-
- showDatePicker: function(event) {
- var element = $(event.target)
- var li = element.closest('li[data-share-id]')
- var shareId = li.data('share-id')
- var expirationDatePicker = '#expirationDatePicker-' + this.cid + '-' + shareId
- var view = this
- $(expirationDatePicker).datepicker({
- dateFormat: 'dd-mm-yy',
- onSelect: function(expireDate) {
- view.setExpirationDate(shareId, expireDate)
- }
- })
- $(expirationDatePicker).focus()
-
- },
-
- setExpirationDate: function(shareId, expireDate) {
- this.model.updateShare(shareId, { expireDate: expireDate }, {})
- },
-
- onMailSharePasswordProtectChange: function(event) {
- var element = $(event.target)
- var li = element.closest('li[data-share-id]')
- var shareId = li.data('share-id')
- var passwordContainerClass = '.passwordMenu-' + this.cid + '-' + shareId
- var passwordContainer = $(passwordContainerClass)
- var loading = this.$el.find(passwordContainerClass + ' .icon-loading-small')
- var inputClass = '#passwordField-' + this.cid + '-' + shareId
- var passwordField = $(inputClass)
- var state = element.prop('checked')
- var passwordByTalkElement = $('#passwordByTalk-' + this.cid + '-' + shareId)
- var passwordByTalkState = passwordByTalkElement.prop('checked')
- if (!state && !passwordByTalkState) {
- this.model.updateShare(shareId, { password: '', sendPasswordByTalk: false })
- passwordField.attr('value', '')
- passwordField.removeClass('error')
- passwordField.tooltip('hide')
- loading.addClass('hidden')
- passwordField.attr('placeholder', PASSWORD_PLACEHOLDER_MESSAGE)
- // We first need to reset the password field before we hide it
- passwordContainer.toggleClass('hidden', !state)
- } else if (state) {
- if (passwordByTalkState) {
- // Switching from sending the password by Talk to sending
- // the password by mail can be done keeping the previous
- // password sent by Talk.
- this.model.updateShare(shareId, { sendPasswordByTalk: false })
-
- var passwordByTalkContainerClass = '.passwordByTalkMenu-' + this.cid + '-' + shareId
- var passwordByTalkContainer = $(passwordByTalkContainerClass)
- passwordByTalkContainer.addClass('hidden')
- passwordByTalkElement.prop('checked', false)
- }
-
- passwordContainer.toggleClass('hidden', !state)
- passwordField = '#passwordField-' + this.cid + '-' + shareId
- this.$(passwordField).focus()
- }
- },
-
- onMailSharePasswordProtectByTalkChange: function(event) {
- var element = $(event.target)
- var li = element.closest('li[data-share-id]')
- var shareId = li.data('share-id')
- var passwordByTalkContainerClass = '.passwordByTalkMenu-' + this.cid + '-' + shareId
- var passwordByTalkContainer = $(passwordByTalkContainerClass)
- var loading = this.$el.find(passwordByTalkContainerClass + ' .icon-loading-small')
- var inputClass = '#passwordByTalkField-' + this.cid + '-' + shareId
- var passwordByTalkField = $(inputClass)
- var state = element.prop('checked')
- var passwordElement = $('#password-' + this.cid + '-' + shareId)
- var passwordState = passwordElement.prop('checked')
- if (!state) {
- this.model.updateShare(shareId, { password: '', sendPasswordByTalk: false })
- passwordByTalkField.attr('value', '')
- passwordByTalkField.removeClass('error')
- passwordByTalkField.tooltip('hide')
- loading.addClass('hidden')
- passwordByTalkField.attr('placeholder', PASSWORD_PLACEHOLDER_MESSAGE)
- // We first need to reset the password field before we hide it
- passwordByTalkContainer.toggleClass('hidden', !state)
- } else if (state) {
- if (passwordState) {
- // Enabling sending the password by Talk requires a new
- // password to be given (the one sent by mail is not reused,
- // as it would defeat the purpose of checking the identity
- // of the sharee by Talk if it was already sent by mail), so
- // the share is not updated until the user explicitly gives
- // the new password.
-
- var passwordContainerClass = '.passwordMenu-' + this.cid + '-' + shareId
- var passwordContainer = $(passwordContainerClass)
- passwordContainer.addClass('hidden')
- passwordElement.prop('checked', false)
- }
-
- passwordByTalkContainer.toggleClass('hidden', !state)
- passwordByTalkField = '#passwordByTalkField-' + this.cid + '-' + shareId
- this.$(passwordByTalkField).focus()
- }
- },
-
- onMailSharePasswordKeyUp: function(event) {
- if (event.keyCode === 13) {
- this.onMailSharePasswordEntered(event)
- }
- },
-
- onMailSharePasswordEntered: function(event) {
- var passwordField = $(event.target)
- var li = passwordField.closest('li[data-share-id]')
- var shareId = li.data('share-id')
- var passwordContainerClass = '.passwordMenu-' + this.cid + '-' + shareId
- var passwordByTalkContainerClass = '.passwordByTalkMenu-' + this.cid + '-' + shareId
- var sendPasswordByTalk = passwordField.attr('id').startsWith('passwordByTalk')
- var loading
- if (sendPasswordByTalk) {
- loading = this.$el.find(passwordByTalkContainerClass + ' .icon-loading-small')
- } else {
- loading = this.$el.find(passwordContainerClass + ' .icon-loading-small')
- }
- if (!loading.hasClass('hidden')) {
- // still in process
- return
- }
-
- passwordField.removeClass('error')
- var password = passwordField.val()
- // in IE9 the password might be the placeholder due to bugs in the placeholders polyfill
- if (password === '' || password === PASSWORD_PLACEHOLDER || password === PASSWORD_PLACEHOLDER_MESSAGE) {
- return
- }
-
- loading
- .removeClass('hidden')
- .addClass('inlineblock')
-
- this.model.updateShare(shareId, {
- password: password,
- sendPasswordByTalk: sendPasswordByTalk
- }, {
- error: function(model, msg) {
- // destroy old tooltips
- passwordField.tooltip('destroy')
- loading.removeClass('inlineblock').addClass('hidden')
- passwordField.addClass('error')
- passwordField.attr('title', msg)
- passwordField.tooltip({ placement: 'bottom', trigger: 'manual' })
- passwordField.tooltip('show')
- },
- success: function(model, msg) {
- passwordField.blur()
- passwordField.attr('value', '')
- passwordField.attr('placeholder', PASSWORD_PLACEHOLDER)
- loading.removeClass('inlineblock').addClass('hidden')
- }
- })
- },
-
- onPermissionChange: function(event) {
- event.preventDefault()
- event.stopPropagation()
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var shareId = $li.data('share-id')
-
- var permissions = OC.PERMISSION_READ
-
- if (this.model.isFolder()) {
- // adjust checkbox states
- var $checkboxes = $('.permissions', $li).not('input[name="edit"]').not('input[name="share"]')
- var checked
- if ($element.attr('name') === 'edit') {
- checked = $element.is(':checked')
- // Check/uncheck Create, Update, and Delete checkboxes if Edit is checked/unck
- $($checkboxes).prop('checked', checked)
- if (checked) {
- permissions |= OC.PERMISSION_CREATE | OC.PERMISSION_UPDATE | OC.PERMISSION_DELETE
- }
- } else {
- var numberChecked = $checkboxes.filter(':checked').length
- checked = numberChecked === $checkboxes.length
- var $editCb = $('input[name="edit"]', $li)
- $editCb.prop('checked', checked)
- $editCb.prop('indeterminate', !checked && numberChecked > 0)
- }
- } else {
- if ($element.attr('name') === 'edit' && $element.is(':checked')) {
- permissions |= OC.PERMISSION_UPDATE
- }
- }
-
- $('.permissions', $li).not('input[name="edit"]').filter(':checked').each(function(index, checkbox) {
- permissions |= $(checkbox).data('permissions')
- })
-
- /** disable checkboxes during save operation to avoid race conditions **/
- $li.find('input[type=checkbox]').prop('disabled', true)
- var enableCb = function() {
- $li.find('input[type=checkbox]').prop('disabled', false)
- }
- var errorCb = function(elem, msg) {
- OC.dialogs.alert(msg, t('core', 'Error while sharing'))
- enableCb()
- }
-
- this.model.updateShare(shareId, { permissions: permissions }, { error: errorCb, success: enableCb })
-
- this._renderPermissionChange = shareId
- },
-
- onSecureDropChange: function(event) {
- event.preventDefault()
- event.stopPropagation()
- var $element = $(event.target)
- var $li = $element.closest('li[data-share-id]')
- var shareId = $li.data('share-id')
-
- var permissions = OC.PERMISSION_CREATE | OC.PERMISSION_UPDATE | OC.PERMISSION_DELETE | OC.PERMISSION_READ
- if ($element.is(':checked')) {
- permissions = OC.PERMISSION_CREATE | OC.PERMISSION_UPDATE | OC.PERMISSION_DELETE
- }
-
- /** disable checkboxes during save operation to avoid race conditions **/
- $li.find('input[type=checkbox]').prop('disabled', true)
- var enableCb = function() {
- $li.find('input[type=checkbox]').prop('disabled', false)
- }
- var errorCb = function(elem, msg) {
- OC.dialogs.alert(msg, t('core', 'Error while sharing'))
- enableCb()
- }
-
- this.model.updateShare(shareId, { permissions: permissions }, { error: errorCb, success: enableCb })
-
- this._renderPermissionChange = shareId
- }
-
- })
-
- OC.Share.ShareDialogShareeListView = ShareDialogShareeListView
-
-})()
diff --git a/core/js/sharedialogview.js b/core/js/sharedialogview.js
deleted file mode 100644
index 9bc87a69463..00000000000
--- a/core/js/sharedialogview.js
+++ /dev/null
@@ -1,1137 +0,0 @@
-/* eslint-disable */
-/*
- * Copyright (c) 2015
- *
- * This file is licensed under the Affero General Public License version 3
- * or later.
- *
- * See the COPYING-README file.
- *
- */
-
-/* globals Handlebars */
-
-(function() {
- if (!OC.Share) {
- OC.Share = {}
- }
-
- /**
- * @class OCA.Share.ShareDialogView
- * @member {OC.Share.ShareItemModel} model
- * @member {jQuery} $el
- * @memberof OCA.Sharing
- * @classdesc
- *
- * Represents the GUI of the share dialogue
- *
- */
- var ShareDialogView = OC.Backbone.View.extend({
- /** @type {Object} **/
- _templates: {},
-
- /** @type {boolean} **/
- _showLink: true,
-
- _lookup: false,
-
- _lookupAllowed: false,
-
- /** @type {string} **/
- tagName: 'div',
-
- /** @type {OC.Share.ShareConfigModel} **/
- configModel: undefined,
-
- /** @type {object} **/
- resharerInfoView: undefined,
-
- /** @type {object} **/
- linkShareView: undefined,
-
- /** @type {object} **/
- shareeListView: undefined,
-
- /** @type {object} **/
- _lastSuggestions: undefined,
-
- /** @type {object} **/
- _lastRecommendations: undefined,
-
- /** @type {int} **/
- _pendingOperationsCount: 0,
-
- events: {
- 'focus .shareWithField': 'onShareWithFieldFocus',
- 'input .shareWithField': 'onShareWithFieldChanged',
- 'click .shareWithConfirm': '_confirmShare'
- },
-
- initialize: function(options) {
- var view = this
-
- this.model.on('fetchError', function() {
- OC.Notification.showTemporary(t('core', 'Share details could not be loaded for this item.'))
- })
-
- if (!_.isUndefined(options.configModel)) {
- this.configModel = options.configModel
- } else {
- throw 'missing OC.Share.ShareConfigModel'
- }
-
- this.configModel.on('change:isRemoteShareAllowed', function() {
- view.render()
- })
- this.configModel.on('change:isRemoteGroupShareAllowed', function() {
- view.render()
- })
- this.model.on('change:permissions', function() {
- view.render()
- })
-
- this.model.on('request', this._onRequest, this)
- this.model.on('sync', this._onEndRequest, this)
-
- var subViewOptions = {
- model: this.model,
- configModel: this.configModel
- }
-
- var subViews = {
- resharerInfoView: 'ShareDialogResharerInfoView',
- linkShareView: 'ShareDialogLinkShareView',
- shareeListView: 'ShareDialogShareeListView'
- }
-
- for (var name in subViews) {
- var className = subViews[name]
- this[name] = _.isUndefined(options[name])
- ? new OC.Share[className](subViewOptions)
- : options[name]
- }
-
- _.bindAll(this,
- 'autocompleteHandler',
- '_onSelectRecipient',
- 'onShareWithFieldChanged',
- 'onShareWithFieldFocus'
- )
-
- OC.Plugins.attach('OC.Share.ShareDialogView', this)
- },
-
- onShareWithFieldChanged: function() {
- var $el = this.$el.find('.shareWithField')
- if ($el.val().length < 2) {
- $el.removeClass('error').tooltip('hide')
- }
- },
-
- /* trigger search after the field was re-selected */
- onShareWithFieldFocus: function() {
- var $shareWithField = this.$el.find('.shareWithField')
- $shareWithField.autocomplete('search', $shareWithField.val())
- },
-
- _getSuggestions: function(searchTerm, perPage, model, lookup) {
- if (this._lastSuggestions
- && this._lastSuggestions.searchTerm === searchTerm
- && this._lastSuggestions.lookup === lookup
- && this._lastSuggestions.perPage === perPage
- && this._lastSuggestions.model === model) {
- return this._lastSuggestions.promise
- }
-
- var deferred = $.Deferred()
- var view = this
-
- $.get(
- OC.linkToOCS('apps/files_sharing/api/v1') + 'sharees',
- {
- format: 'json',
- search: searchTerm,
- lookup: lookup,
- perPage: perPage,
- itemType: model.get('itemType')
- },
- function(result) {
- if (result.ocs.meta.statuscode === 100) {
- var filter = function(users, groups, remotes, remote_groups, emails, circles, rooms) {
- if (typeof (emails) === 'undefined') {
- emails = []
- }
- if (typeof (circles) === 'undefined') {
- circles = []
- }
- if (typeof (rooms) === 'undefined') {
- rooms = []
- }
-
- var usersLength
- var groupsLength
- var remotesLength
- var remoteGroupsLength
- var emailsLength
- var circlesLength
- var roomsLength
-
- var i, j
-
- // Filter out the current user
- usersLength = users.length
- for (i = 0; i < usersLength; i++) {
- if (users[i].value.shareWith === OC.currentUser) {
- users.splice(i, 1)
- break
- }
- }
-
- // Filter out the owner of the share
- if (model.hasReshare()) {
- usersLength = users.length
- for (i = 0; i < usersLength; i++) {
- if (users[i].value.shareWith === model.getReshareOwner()) {
- users.splice(i, 1)
- break
- }
- }
- }
-
- var shares = model.get('shares')
- var sharesLength = shares.length
-
- // Now filter out all sharees that are already shared with
- for (i = 0; i < sharesLength; i++) {
- var share = shares[i]
-
- if (share.share_type === OC.Share.SHARE_TYPE_USER) {
- usersLength = users.length
- for (j = 0; j < usersLength; j++) {
- if (users[j].value.shareWith === share.share_with) {
- users.splice(j, 1)
- break
- }
- }
- } else if (share.share_type === OC.Share.SHARE_TYPE_GROUP) {
- groupsLength = groups.length
- for (j = 0; j < groupsLength; j++) {
- if (groups[j].value.shareWith === share.share_with) {
- groups.splice(j, 1)
- break
- }
- }
- } else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE) {
- remotesLength = remotes.length
- for (j = 0; j < remotesLength; j++) {
- if (remotes[j].value.shareWith === share.share_with) {
- remotes.splice(j, 1)
- break
- }
- }
- } else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE_GROUP) {
- remoteGroupsLength = remote_groups.length
- for (j = 0; j < remoteGroupsLength; j++) {
- if (remote_groups[j].value.shareWith === share.share_with) {
- remote_groups.splice(j, 1)
- break
- }
- }
- } else if (share.share_type === OC.Share.SHARE_TYPE_EMAIL) {
- emailsLength = emails.length
- for (j = 0; j < emailsLength; j++) {
- if (emails[j].value.shareWith === share.share_with) {
- emails.splice(j, 1)
- break
- }
- }
- } else if (share.share_type === OC.Share.SHARE_TYPE_CIRCLE) {
- circlesLength = circles.length
- for (j = 0; j < circlesLength; j++) {
- if (circles[j].value.shareWith === share.share_with) {
- circles.splice(j, 1)
- break
- }
- }
- } else if (share.share_type === OC.Share.SHARE_TYPE_ROOM) {
- roomsLength = rooms.length
- for (j = 0; j < roomsLength; j++) {
- if (rooms[j].value.shareWith === share.share_with) {
- rooms.splice(j, 1)
- break
- }
- }
- }
- }
- }
-
- filter(
- result.ocs.data.exact.users,
- result.ocs.data.exact.groups,
- result.ocs.data.exact.remotes,
- result.ocs.data.exact.remote_groups,
- result.ocs.data.exact.emails,
- result.ocs.data.exact.circles,
- result.ocs.data.exact.rooms
- )
-
- var exactUsers = result.ocs.data.exact.users
- var exactGroups = result.ocs.data.exact.groups
- var exactRemotes = result.ocs.data.exact.remotes
- var exactRemoteGroups = result.ocs.data.exact.remote_groups
- var exactEmails = []
- if (typeof (result.ocs.data.emails) !== 'undefined') {
- exactEmails = result.ocs.data.exact.emails
- }
- var exactCircles = []
- if (typeof (result.ocs.data.circles) !== 'undefined') {
- exactCircles = result.ocs.data.exact.circles
- }
- var exactRooms = []
- if (typeof (result.ocs.data.rooms) !== 'undefined') {
- exactRooms = result.ocs.data.exact.rooms
- }
-
- var exactMatches = exactUsers.concat(exactGroups).concat(exactRemotes).concat(exactRemoteGroups).concat(exactEmails).concat(exactCircles).concat(exactRooms)
-
- filter(
- result.ocs.data.users,
- result.ocs.data.groups,
- result.ocs.data.remotes,
- result.ocs.data.remote_groups,
- result.ocs.data.emails,
- result.ocs.data.circles,
- result.ocs.data.rooms
- )
-
- var users = result.ocs.data.users
- var groups = result.ocs.data.groups
- var remotes = result.ocs.data.remotes
- var remoteGroups = result.ocs.data.remote_groups
- var lookup = result.ocs.data.lookup
- var lookupEnabled = result.ocs.data.lookupEnabled
- var emails = []
- if (typeof (result.ocs.data.emails) !== 'undefined') {
- emails = result.ocs.data.emails
- }
- var circles = []
- if (typeof (result.ocs.data.circles) !== 'undefined') {
- circles = result.ocs.data.circles
- }
- var rooms = []
- if (typeof (result.ocs.data.rooms) !== 'undefined') {
- rooms = result.ocs.data.rooms
- }
-
- var suggestions = exactMatches.concat(users).concat(groups).concat(remotes).concat(remoteGroups).concat(emails).concat(circles).concat(rooms).concat(lookup)
-
- function dynamicSort(property) {
- return function(a, b) {
- var aProperty = ''
- var bProperty = ''
- if (typeof a[property] !== 'undefined') {
- aProperty = a[property]
- }
- if (typeof b[property] !== 'undefined') {
- bProperty = b[property]
- }
- return (aProperty < bProperty) ? -1 : (aProperty > bProperty) ? 1 : 0
- }
- }
-
- /**
- * Sort share entries by uuid to properly group them
- */
- var grouped = suggestions.sort(dynamicSort('uuid'))
-
- var previousUuid = null
- var groupedLength = grouped.length
- var result = []
- /**
- * build the result array that only contains all contact entries from
- * merged contacts, if the search term matches its contact name
- */
- for (var i = 0; i < groupedLength; i++) {
- if (typeof grouped[i].uuid !== 'undefined' && grouped[i].uuid === previousUuid) {
- grouped[i].merged = true
- }
- if (searchTerm === grouped[i].name || typeof grouped[i].merged === 'undefined') {
- result.push(grouped[i])
- }
- previousUuid = grouped[i].uuid
- }
- var moreResultsAvailable
- = (
- OC.config['sharing.maxAutocompleteResults'] > 0
- && Math.min(perPage, OC.config['sharing.maxAutocompleteResults'])
- <= Math.max(
- users.length + exactUsers.length,
- groups.length + exactGroups.length,
- remoteGroups.length + exactRemoteGroups.length,
- remotes.length + exactRemotes.length,
- emails.length + exactEmails.length,
- circles.length + exactCircles.length,
- rooms.length + exactRooms.length,
- lookup.length
- )
- )
- if (!view._lookup && lookupEnabled) {
- result.push(
- {
- label: t('core', 'Search globally'),
- value: {},
- lookup: true
- }
- )
- }
-
- deferred.resolve(result, exactMatches, moreResultsAvailable, lookupEnabled)
- } else {
- deferred.reject(result.ocs.meta.message)
- }
- }
- ).fail(function() {
- deferred.reject()
- })
-
- this._lastSuggestions = {
- searchTerm: searchTerm,
- lookup: lookup,
- perPage: perPage,
- model: model,
- promise: deferred.promise()
- }
-
- return this._lastSuggestions.promise
- },
-
- _getRecommendations: function(model) {
- if (this._lastRecommendations
- && this._lastRecommendations.model === model) {
- return this._lastRecommendations.promise
- }
-
- var deferred = $.Deferred()
-
- $.get(
- OC.linkToOCS('apps/files_sharing/api/v1') + 'sharees_recommended',
- {
- format: 'json',
- itemType: model.get('itemType')
- },
- function(result) {
- if (result.ocs.meta.statuscode === 100) {
- var filter = function(users, groups, remotes, remote_groups, emails, circles, rooms) {
- if (typeof (emails) === 'undefined') {
- emails = []
- }
- if (typeof (circles) === 'undefined') {
- circles = []
- }
- if (typeof (rooms) === 'undefined') {
- rooms = []
- }
-
- var usersLength
- var groupsLength
- var remotesLength
- var remoteGroupsLength
- var emailsLength
- var circlesLength
- var roomsLength
-
- var i, j
-
- // Filter out the current user
- usersLength = users.length
- for (i = 0; i < usersLength; i++) {
- if (users[i].value.shareWith === OC.currentUser) {
- users.splice(i, 1)
- break
- }
- }
-
- // Filter out the owner of the share
- if (model.hasReshare()) {
- usersLength = users.length
- for (i = 0; i < usersLength; i++) {
- if (users[i].value.shareWith === model.getReshareOwner()) {
- users.splice(i, 1)
- break
- }
- }
- }
-
- var shares = model.get('shares')
- var sharesLength = shares.length
-
- // Now filter out all sharees that are already shared with
- for (i = 0; i < sharesLength; i++) {
- var share = shares[i]
-
- if (share.share_type === OC.Share.SHARE_TYPE_USER) {
- usersLength = users.length
- for (j = 0; j < usersLength; j++) {
- if (users[j].value.shareWith === share.share_with) {
- users.splice(j, 1)
- break
- }
- }
- } else if (share.share_type === OC.Share.SHARE_TYPE_GROUP) {
- groupsLength = groups.length
- for (j = 0; j < groupsLength; j++) {
- if (groups[j].value.shareWith === share.share_with) {
- groups.splice(j, 1)
- break
- }
- }
- } else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE) {
- remotesLength = remotes.length
- for (j = 0; j < remotesLength; j++) {
- if (remotes[j].value.shareWith === share.share_with) {
- remotes.splice(j, 1)
- break
- }
- }
- } else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE_GROUP) {
- remoteGroupsLength = remote_groups.length
- for (j = 0; j < remoteGroupsLength; j++) {
- if (remote_groups[j].value.shareWith === share.share_with) {
- remote_groups.splice(j, 1)
- break
- }
- }
- } else if (share.share_type === OC.Share.SHARE_TYPE_EMAIL) {
- emailsLength = emails.length
- for (j = 0; j < emailsLength; j++) {
- if (emails[j].value.shareWith === share.share_with) {
- emails.splice(j, 1)
- break
- }
- }
- } else if (share.share_type === OC.Share.SHARE_TYPE_CIRCLE) {
- circlesLength = circles.length
- for (j = 0; j < circlesLength; j++) {
- if (circles[j].value.shareWith === share.share_with) {
- circles.splice(j, 1)
- break
- }
- }
- } else if (share.share_type === OC.Share.SHARE_TYPE_ROOM) {
- roomsLength = rooms.length
- for (j = 0; j < roomsLength; j++) {
- if (rooms[j].value.shareWith === share.share_with) {
- rooms.splice(j, 1)
- break
- }
- }
- }
- }
- }
-
- filter(
- result.ocs.data.exact.users,
- result.ocs.data.exact.groups,
- result.ocs.data.exact.remotes,
- result.ocs.data.exact.remote_groups,
- result.ocs.data.exact.emails,
- result.ocs.data.exact.circles,
- result.ocs.data.exact.rooms
- )
-
- var exactUsers = result.ocs.data.exact.users
- var exactGroups = result.ocs.data.exact.groups
- var exactRemotes = result.ocs.data.exact.remotes || []
- var exactRemoteGroups = result.ocs.data.exact.remote_groups || []
- var exactEmails = []
- if (typeof (result.ocs.data.emails) !== 'undefined') {
- exactEmails = result.ocs.data.exact.emails
- }
- var exactCircles = []
- if (typeof (result.ocs.data.circles) !== 'undefined') {
- exactCircles = result.ocs.data.exact.circles
- }
- var exactRooms = []
- if (typeof (result.ocs.data.rooms) !== 'undefined') {
- exactRooms = result.ocs.data.exact.rooms
- }
-
- var exactMatches = exactUsers.concat(exactGroups).concat(exactRemotes).concat(exactRemoteGroups).concat(exactEmails).concat(exactCircles).concat(exactRooms)
-
- filter(
- result.ocs.data.users,
- result.ocs.data.groups,
- result.ocs.data.remotes,
- result.ocs.data.remote_groups,
- result.ocs.data.emails,
- result.ocs.data.circles,
- result.ocs.data.rooms
- )
-
- var users = result.ocs.data.users
- var groups = result.ocs.data.groups
- var remotes = result.ocs.data.remotes || []
- var remoteGroups = result.ocs.data.remote_groups || []
- var lookup = result.ocs.data.lookup || []
- var emails = []
- if (typeof (result.ocs.data.emails) !== 'undefined') {
- emails = result.ocs.data.emails
- }
- var circles = []
- if (typeof (result.ocs.data.circles) !== 'undefined') {
- circles = result.ocs.data.circles
- }
- var rooms = []
- if (typeof (result.ocs.data.rooms) !== 'undefined') {
- rooms = result.ocs.data.rooms
- }
-
- var suggestions = exactMatches.concat(users).concat(groups).concat(remotes).concat(remoteGroups).concat(emails).concat(circles).concat(rooms).concat(lookup)
-
- function dynamicSort(property) {
- return function(a, b) {
- var aProperty = ''
- var bProperty = ''
- if (typeof a[property] !== 'undefined') {
- aProperty = a[property]
- }
- if (typeof b[property] !== 'undefined') {
- bProperty = b[property]
- }
- return (aProperty < bProperty) ? -1 : (aProperty > bProperty) ? 1 : 0
- }
- }
-
- /**
- * Sort share entries by uuid to properly group them
- */
- var grouped = suggestions.sort(dynamicSort('uuid'))
-
- var previousUuid = null
- var groupedLength = grouped.length
- var result = []
- /**
- * build the result array that only contains all contact entries from
- * merged contacts, if the search term matches its contact name
- */
- for (var i = 0; i < groupedLength; i++) {
- if (typeof grouped[i].uuid !== 'undefined' && grouped[i].uuid === previousUuid) {
- grouped[i].merged = true
- }
- if (typeof grouped[i].merged === 'undefined') {
- result.push(grouped[i])
- }
- previousUuid = grouped[i].uuid
- }
-
- deferred.resolve(result, exactMatches, false)
- } else {
- deferred.reject(result.ocs.meta.message)
- }
- }
- ).fail(function() {
- deferred.reject()
- })
-
- this._lastRecommendations = {
- model: model,
- promise: deferred.promise()
- }
-
- return this._lastRecommendations.promise
- },
-
- recommendationHandler: function(response) {
- var view = this
- var $shareWithField = $('.shareWithField')
- this._getRecommendations(
- view.model
- ).done(function(suggestions) {
- console.info('recommendations', suggestions)
- if (suggestions.length > 0) {
- $shareWithField
- .autocomplete('option', 'autoFocus', true)
-
- response(suggestions)
- } else {
- console.info('no sharing recommendations found')
- response()
- }
- }).fail(function(message) {
- console.error('could not load recommendations', message)
- })
- },
-
- autocompleteHandler: function(search, response) {
- // If nothing is entered we show recommendations instead of search
- // results
- if (search.term.length === 0) {
- console.info(search.term, 'empty search term -> using recommendations')
- this.recommendationHandler(response)
- return
- }
-
- var $shareWithField = $('.shareWithField')
- var view = this
- var $loading = this.$el.find('.shareWithLoading')
- var $confirm = this.$el.find('.shareWithConfirm')
-
- var count = OC.config['sharing.minSearchStringLength']
- if (search.term.trim().length < count) {
- var title = n('core',
- 'At least {count} character is needed for autocompletion',
- 'At least {count} characters are needed for autocompletion',
- count,
- { count: count }
- )
- $shareWithField.addClass('error')
- .attr('data-original-title', title)
- .tooltip('hide')
- .tooltip({
- placement: 'bottom',
- trigger: 'manual'
- })
- .tooltip('fixTitle')
- .tooltip('show')
- response()
- return
- }
-
- $loading.removeClass('hidden')
- $loading.addClass('inlineblock')
- $confirm.addClass('hidden')
- this._pendingOperationsCount++
-
- $shareWithField.removeClass('error')
- .tooltip('hide')
-
- var perPage = parseInt(OC.config['sharing.maxAutocompleteResults'], 10) || 200
- this._getSuggestions(
- search.term.trim(),
- perPage,
- view.model,
- view._lookup
- ).done(function(suggestions, exactMatches, moreResultsAvailable) {
- view._pendingOperationsCount--
- if (view._pendingOperationsCount === 0) {
- $loading.addClass('hidden')
- $loading.removeClass('inlineblock')
- $confirm.removeClass('hidden')
- }
-
- if (suggestions.length > 0) {
- $shareWithField
- .autocomplete('option', 'autoFocus', true)
-
- response(suggestions)
-
- // show a notice that the list is truncated
- // this is the case if one of the search results is at least as long as the max result config option
- if (moreResultsAvailable) {
- var message = t('core', 'This list is maybe truncated - please refine your search term to see more results.')
- $('.ui-autocomplete').append('<li class="autocomplete-note">' + message + '</li>')
- }
-
- } else {
- var title = t('core', 'No users or groups found for {search}', { search: $shareWithField.val() })
- if (!view.configModel.get('allowGroupSharing')) {
- title = t('core', 'No users found for {search}', { search: $('.shareWithField').val() })
- }
- $shareWithField.addClass('error')
- .attr('data-original-title', title)
- .tooltip('hide')
- .tooltip({
- placement: 'top',
- trigger: 'manual'
- })
- .tooltip('fixTitle')
- .tooltip('show')
- response()
- }
- }).fail(function(message) {
- view._pendingOperationsCount--
- if (view._pendingOperationsCount === 0) {
- $loading.addClass('hidden')
- $loading.removeClass('inlineblock')
- $confirm.removeClass('hidden')
- }
-
- if (message) {
- OC.Notification.showTemporary(t('core', 'An error occurred ("{message}"). Please try again', { message: message }))
- } else {
- OC.Notification.showTemporary(t('core', 'An error occurred. Please try again'))
- }
- })
- },
-
- autocompleteRenderItem: function(ul, item) {
- var icon = 'icon-user'
- var text = escapeHTML(item.label)
- var description = ''
- var type = ''
- var getTranslatedType = function(type) {
- switch (type) {
- case 'HOME':
- return t('core', 'Home')
- case 'WORK':
- return t('core', 'Work')
- case 'OTHER':
- return t('core', 'Other')
- default:
- return '' + type
- }
- }
- if (typeof item.type !== 'undefined' && item.type !== null) {
- type = getTranslatedType(item.type) + ' '
- }
-
- if (typeof item.name !== 'undefined') {
- text = escapeHTML(item.name)
- }
- if (item.value.shareType === OC.Share.SHARE_TYPE_GROUP) {
- icon = 'icon-contacts-dark'
- } else if (item.value.shareType === OC.Share.SHARE_TYPE_REMOTE) {
- icon = 'icon-shared'
- description += item.value.shareWith
- } else if (item.value.shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP) {
- text = t('core', '{sharee} (remote group)', { sharee: text }, undefined, { escape: false })
- icon = 'icon-shared'
- description += item.value.shareWith
- } else if (item.value.shareType === OC.Share.SHARE_TYPE_EMAIL) {
- icon = 'icon-mail'
- description += item.value.shareWith
- } else if (item.value.shareType === OC.Share.SHARE_TYPE_CIRCLE) {
- text = t('core', '{sharee} ({type}, {owner})', { sharee: text, type: item.value.circleInfo, owner: item.value.circleOwner }, undefined, { escape: false })
- icon = 'icon-circle'
- } else if (item.value.shareType === OC.Share.SHARE_TYPE_ROOM) {
- icon = 'icon-talk'
- }
-
- var insert = $("<div class='share-autocomplete-item'/>")
- if (item.merged) {
- insert.addClass('merged')
- text = item.value.shareWith
- description = type
- } else if (item.lookup) {
- text = item.label
- icon = false
- insert.append('<span class="icon icon-search search-globally"></span>')
- } else {
- var avatar = $("<div class='avatardiv'></div>").appendTo(insert)
- if (item.value.shareType === OC.Share.SHARE_TYPE_USER || item.value.shareType === OC.Share.SHARE_TYPE_CIRCLE) {
- avatar.avatar(item.value.shareWith, 32, undefined, undefined, undefined, item.label)
- } else {
- if (typeof item.uuid === 'undefined') {
- item.uuid = text
- }
- avatar.imageplaceholder(item.uuid, text, 32)
- }
- description = type + description
- }
- if (description !== '') {
- insert.addClass('with-description')
- }
-
- $("<div class='autocomplete-item-text'></div>")
- .html(
- text.replace(
- new RegExp(this.term, 'gi'),
- "<span class='ui-state-highlight'>$&</span>")
- + '<span class="autocomplete-item-details">' + description + '</span>'
- )
- .appendTo(insert)
- insert.attr('title', item.value.shareWith)
- if (icon) {
- insert.append('<span class="icon ' + icon + '" title="' + text + '"></span>')
- }
- insert = $('<a>')
- .append(insert)
- return $('<li>')
- .addClass((item.value.shareType === OC.Share.SHARE_TYPE_GROUP) ? 'group' : 'user')
- .append(insert)
- .appendTo(ul)
- },
-
- _onSelectRecipient: function(e, s) {
- var self = this
-
- if (e.keyCode == 9) {
- e.preventDefault()
- if (typeof s.item.name !== 'undefined') {
- e.target.value = s.item.name
- } else {
- e.target.value = s.item.label
- }
- setTimeout(function() {
- $(e.target).attr('disabled', false)
- .autocomplete('search', $(e.target).val())
- }, 0)
- return false
- }
-
- if (s.item.lookup) {
- // Retrigger search but with global lookup this time
- this._lookup = true
- var $shareWithField = this.$el.find('.shareWithField')
- var val = $shareWithField.val()
- setTimeout(function() {
- console.debug('searching again, but globally. search term: ' + val)
- $shareWithField.autocomplete('search', val)
- }, 0)
- return false
- }
-
- e.preventDefault()
- // Ensure that the keydown handler for the input field is not
- // called; otherwise it would try to add the recipient again, which
- // would fail.
- e.stopImmediatePropagation()
- $(e.target).attr('disabled', true)
- .val(s.item.label)
-
- var $loading = this.$el.find('.shareWithLoading')
- var $confirm = this.$el.find('.shareWithConfirm')
-
- $loading.removeClass('hidden')
- $loading.addClass('inlineblock')
- $confirm.addClass('hidden')
- this._pendingOperationsCount++
-
- this.model.addShare(s.item.value, { success: function() {
- // Adding a share changes the suggestions.
- self._lastSuggestions = undefined
-
- $(e.target).val('')
- .attr('disabled', false)
-
- self._pendingOperationsCount--
- if (self._pendingOperationsCount === 0) {
- $loading.addClass('hidden')
- $loading.removeClass('inlineblock')
- $confirm.removeClass('hidden')
- }
- },
- error: function(obj, msg) {
- OC.Notification.showTemporary(msg)
- $(e.target).attr('disabled', false)
- .autocomplete('search', $(e.target).val())
-
- self._pendingOperationsCount--
- if (self._pendingOperationsCount === 0) {
- $loading.addClass('hidden')
- $loading.removeClass('inlineblock')
- $confirm.removeClass('hidden')
- }
- } })
- },
-
- _confirmShare: function() {
- var self = this
- var $shareWithField = $('.shareWithField')
- var $loading = this.$el.find('.shareWithLoading')
- var $confirm = this.$el.find('.shareWithConfirm')
-
- $loading.removeClass('hidden')
- $loading.addClass('inlineblock')
- $confirm.addClass('hidden')
- this._pendingOperationsCount++
-
- $shareWithField.prop('disabled', true)
-
- // Disabling the autocompletion does not clear its search timeout;
- // removing the focus from the input field does, but only if the
- // autocompletion is not disabled when the field loses the focus.
- // Thus, the field has to be disabled before disabling the
- // autocompletion to prevent an old pending search result from
- // appearing once the field is enabled again.
- $shareWithField.autocomplete('close')
- $shareWithField.autocomplete('disable')
-
- var restoreUI = function() {
- self._pendingOperationsCount--
- if (self._pendingOperationsCount === 0) {
- $loading.addClass('hidden')
- $loading.removeClass('inlineblock')
- $confirm.removeClass('hidden')
- }
-
- $shareWithField.prop('disabled', false)
- $shareWithField.focus()
- }
-
- var perPage = parseInt(OC.config['sharing.maxAutocompleteResults'], 10) || 200
- this._getSuggestions(
- $shareWithField.val(),
- perPage,
- this.model,
- this._lookup
- ).done(function(suggestions, exactMatches) {
- if (suggestions.length === 0) {
- restoreUI()
-
- $shareWithField.autocomplete('enable')
-
- // There is no need to show an error message here; it will
- // be automatically shown when the autocomplete is activated
- // again (due to the focus on the field) and it finds no
- // matches.
-
- return
- }
-
- if (exactMatches.length !== 1) {
- restoreUI()
-
- $shareWithField.autocomplete('enable')
-
- return
- }
-
- var actionSuccess = function() {
- // Adding a share changes the suggestions.
- self._lastSuggestions = undefined
-
- $shareWithField.val('')
-
- restoreUI()
-
- $shareWithField.autocomplete('enable')
- }
-
- var actionError = function(obj, msg) {
- restoreUI()
-
- $shareWithField.autocomplete('enable')
-
- OC.Notification.showTemporary(msg)
- }
-
- self.model.addShare(exactMatches[0].value, {
- success: actionSuccess,
- error: actionError
- })
- }).fail(function(message) {
- restoreUI()
-
- $shareWithField.autocomplete('enable')
-
- // There is no need to show an error message here; it will be
- // automatically shown when the autocomplete is activated again
- // (due to the focus on the field) and getting the suggestions
- // fail.
- })
- },
-
- _toggleLoading: function(state) {
- this._loading = state
- this.$el.find('.subView').toggleClass('hidden', state)
- this.$el.find('.loading').toggleClass('hidden', !state)
- },
-
- _onRequest: function() {
- // only show the loading spinner for the first request (for now)
- if (!this._loadingOnce) {
- this._toggleLoading(true)
- }
- },
-
- _onEndRequest: function() {
- var self = this
- this._toggleLoading(false)
- if (!this._loadingOnce) {
- this._loadingOnce = true
- }
- },
-
- render: function() {
- var self = this
- var baseTemplate = OC.Share.Templates['sharedialogview']
-
- this.$el.html(baseTemplate({
- cid: this.cid,
- shareLabel: t('core', 'Share'),
- sharePlaceholder: this._renderSharePlaceholderPart(),
- isSharingAllowed: this.model.sharePermissionPossible()
- }))
-
- var $shareField = this.$el.find('.shareWithField')
- if ($shareField.length) {
- var shareFieldKeydownHandler = function(event) {
- if (event.keyCode !== 13) {
- return true
- }
-
- self._confirmShare()
-
- return false
- }
-
- $shareField.autocomplete({
- minLength: 0,
- delay: 750,
- focus: function(event) {
- event.preventDefault()
- },
- source: this.autocompleteHandler,
- select: this._onSelectRecipient,
- open: function() {
- var autocomplete = $(this).autocomplete('widget')
- var numberOfItems = autocomplete.find('li').size()
- autocomplete.removeClass('item-count-1')
- autocomplete.removeClass('item-count-2')
- if (numberOfItems <= 2) {
- autocomplete.addClass('item-count-' + numberOfItems)
- }
- }
- }).data('ui-autocomplete')._renderItem = this.autocompleteRenderItem
-
- $shareField.on('keydown', null, shareFieldKeydownHandler)
- }
-
- this.resharerInfoView.$el = this.$el.find('.resharerInfoView')
- this.resharerInfoView.render()
-
- this.linkShareView.$el = this.$el.find('.linkShareView')
- this.linkShareView.render()
-
- this.shareeListView.$el = this.$el.find('.shareeListView')
- this.shareeListView.render()
-
- this.$el.find('.hasTooltip').tooltip()
-
- return this
- },
-
- /**
- * sets whether share by link should be displayed or not. Default is
- * true.
- *
- * @param {bool} showLink
- */
- setShowLink: function(showLink) {
- this._showLink = (typeof showLink === 'boolean') ? showLink : true
- this.linkShareView.showLink = this._showLink
- },
-
- _renderSharePlaceholderPart: function() {
- var allowRemoteSharing = this.configModel.get('isRemoteShareAllowed')
- var allowMailSharing = this.configModel.get('isMailShareAllowed')
-
- if (!allowRemoteSharing && allowMailSharing) {
- return t('core', 'Name or email address...')
- }
- if (allowRemoteSharing && !allowMailSharing) {
- return t('core', 'Name or federated cloud ID...')
- }
- if (allowRemoteSharing && allowMailSharing) {
- return t('core', 'Name, federated cloud ID or email address...')
- }
-
- return t('core', 'Name...')
- }
-
- })
-
- OC.Share.ShareDialogView = ShareDialogView
-
-})()
diff --git a/core/js/shareitemmodel.js b/core/js/shareitemmodel.js
deleted file mode 100644
index e86731ab1b1..00000000000
--- a/core/js/shareitemmodel.js
+++ /dev/null
@@ -1,945 +0,0 @@
-/* eslint-disable */
-/*
- * Copyright (c) 2015
- *
- * This file is licensed under the Affero General Public License version 3
- * or later.
- *
- * See the COPYING-README file.
- *
- */
-
-(function() {
- if (!OC.Share) {
- OC.Share = {}
- OC.Share.Types = {}
- }
-
- /**
- * @typedef {object} OC.Share.Types.LinkShareInfo
- * @property {string} token
- * @property {bool} hideDownload
- * @property {string|null} password
- * @property {bool} sendPasswordByTalk
- * @property {number} permissions
- * @property {Date} expiration
- * @property {number} stime share time
- */
-
- /**
- * @typedef {object} OC.Share.Types.Reshare
- * @property {string} uid_owner
- * @property {number} share_type
- * @property {string} share_with
- * @property {string} displayname_owner
- * @property {number} permissions
- */
-
- /**
- * @typedef {object} OC.Share.Types.ShareInfo
- * @property {number} share_type
- * @property {number} permissions
- * @property {number} file_source optional
- * @property {number} item_source
- * @property {string} token
- * @property {string} share_with
- * @property {string} share_with_displayname
- * @property {string} share_with_avatar
- * @property {string} mail_send
- * @property {Date} expiration optional?
- * @property {number} stime optional?
- * @property {string} uid_owner
- * @property {string} displayname_owner
- */
-
- /**
- * @typedef {object} OC.Share.Types.ShareItemInfo
- * @property {OC.Share.Types.Reshare} reshare
- * @property {OC.Share.Types.ShareInfo[]} shares
- * @property {OC.Share.Types.LinkShareInfo|undefined} linkShare
- */
-
- /**
- * These properties are sometimes returned by the server as strings instead
- * of integers, so we need to convert them accordingly...
- */
- var SHARE_RESPONSE_INT_PROPS = [
- 'id', 'file_parent', 'mail_send', 'file_source', 'item_source', 'permissions',
- 'storage', 'share_type', 'parent', 'stime'
- ]
-
- /**
- * @class OCA.Share.ShareItemModel
- * @classdesc
- *
- * Represents the GUI of the share dialogue
- *
- * // FIXME: use OC Share API once #17143 is done
- *
- * // TODO: this really should be a collection of share item models instead,
- * where the link share is one of them
- */
- var ShareItemModel = OC.Backbone.Model.extend({
- /**
- * share id of the link share, if applicable
- */
- _linkShareId: null,
-
- initialize: function(attributes, options) {
- if (!_.isUndefined(options.configModel)) {
- this.configModel = options.configModel
- }
- if (!_.isUndefined(options.fileInfoModel)) {
- /** @type {OC.Files.FileInfo} **/
- this.fileInfoModel = options.fileInfoModel
- }
-
- _.bindAll(this, 'addShare')
- },
-
- defaults: {
- allowPublicUploadStatus: false,
- permissions: 0,
- linkShares: []
- },
-
- /**
- * Saves the current link share information.
- *
- * This will trigger an ajax call and, if successful, refetch the model
- * afterwards. Callbacks "success", "error" and "complete" can be given
- * in the options object; "success" is called after a successful save
- * once the model is refetch, "error" is called after a failed save, and
- * "complete" is called both after a successful save and after a failed
- * save. Note that "complete" is called before "success" and "error" are
- * called (unlike in jQuery, in which it is called after them); this
- * ensures that "complete" is called even if refetching the model fails.
- *
- * TODO: this should be a separate model
- */
- saveLinkShare: function(attributes, options) {
- options = options || {}
- attributes = _.extend({}, attributes)
-
- var shareId = null
- var call
-
- // oh yeah...
- if (attributes.expiration) {
- attributes.expireDate = attributes.expiration
- delete attributes.expiration
- }
-
- var linkShares = this.get('linkShares')
- var shareIndex = _.findIndex(linkShares, function(share) { return share.id === attributes.cid })
-
- if (linkShares.length > 0 && shareIndex !== -1) {
- shareId = linkShares[shareIndex].id
-
- // note: update can only update a single value at a time
- call = this.updateShare(shareId, attributes, options)
- } else {
- attributes = _.defaults(attributes, {
- hideDownload: false,
- password: '',
- passwordChanged: false,
- sendPasswordByTalk: false,
- permissions: OC.PERMISSION_READ,
- expireDate: this.configModel.getDefaultExpirationDateString(),
- shareType: OC.Share.SHARE_TYPE_LINK
- })
-
- call = this.addShare(attributes, options)
- }
-
- return call
- },
-
- addShare: function(attributes, options) {
- var shareType = attributes.shareType
- attributes = _.extend({}, attributes)
-
- // get default permissions
- var defaultPermissions = OC.getCapabilities()['files_sharing']['default_permissions'] || OC.PERMISSION_ALL
- var possiblePermissions = OC.PERMISSION_READ
-
- if (this.updatePermissionPossible()) {
- possiblePermissions = possiblePermissions | OC.PERMISSION_UPDATE
- }
- if (this.createPermissionPossible()) {
- possiblePermissions = possiblePermissions | OC.PERMISSION_CREATE
- }
- if (this.deletePermissionPossible()) {
- possiblePermissions = possiblePermissions | OC.PERMISSION_DELETE
- }
- if (this.configModel.get('isResharingAllowed') && (this.sharePermissionPossible())) {
- possiblePermissions = possiblePermissions | OC.PERMISSION_SHARE
- }
-
- attributes.permissions = defaultPermissions & possiblePermissions
- if (_.isUndefined(attributes.path)) {
- attributes.path = this.fileInfoModel.getFullPath()
- }
-
- return this._addOrUpdateShare({
- type: 'POST',
- url: this._getUrl('shares'),
- data: attributes,
- dataType: 'json'
- }, options)
- },
-
- updateShare: function(shareId, attrs, options) {
- return this._addOrUpdateShare({
- type: 'PUT',
- url: this._getUrl('shares/' + encodeURIComponent(shareId)),
- data: attrs,
- dataType: 'json'
- }, options)
- },
-
- _addOrUpdateShare: function(ajaxSettings, options) {
- var self = this
- options = options || {}
-
- return $.ajax(
- ajaxSettings
- ).always(function() {
- if (_.isFunction(options.complete)) {
- options.complete(self)
- }
- }).done(function() {
- self.fetch().done(function() {
- if (_.isFunction(options.success)) {
- options.success(self)
- }
- })
- }).fail(function(xhr) {
- var msg = t('core', 'Error')
- var result = xhr.responseJSON
- if (result && result.ocs && result.ocs.meta) {
- msg = result.ocs.meta.message
- }
-
- if (_.isFunction(options.error)) {
- options.error(self, msg)
- } else {
- OC.dialogs.alert(msg, t('core', 'Error while sharing'))
- }
- })
- },
-
- /**
- * Deletes the share with the given id
- *
- * @param {int} shareId share id
- * @returns {jQuery}
- */
- removeShare: function(shareId, options) {
- var self = this
- options = options || {}
- return $.ajax({
- type: 'DELETE',
- url: this._getUrl('shares/' + encodeURIComponent(shareId))
- }).done(function() {
- self.fetch({
- success: function() {
- if (_.isFunction(options.success)) {
- options.success(self)
- }
- }
- })
- }).fail(function(xhr) {
- var msg = t('core', 'Error')
- var result = xhr.responseJSON
- if (result.ocs && result.ocs.meta) {
- msg = result.ocs.meta.message
- }
-
- if (_.isFunction(options.error)) {
- options.error(self, msg)
- } else {
- OC.dialogs.alert(msg, t('core', 'Error removing share'))
- }
- })
- },
-
- /**
- * @returns {boolean}
- */
- isPublicUploadAllowed: function() {
- return this.get('allowPublicUploadStatus')
- },
-
- isPublicEditingAllowed: function() {
- return this.get('allowPublicEditingStatus')
- },
-
- /**
- * @returns {boolean}
- */
- isHideFileListSet: function() {
- return this.get('hideFileListStatus')
- },
-
- /**
- * @returns {boolean}
- */
- isFolder: function() {
- return this.get('itemType') === 'folder'
- },
-
- /**
- * @returns {boolean}
- */
- isFile: function() {
- return this.get('itemType') === 'file'
- },
-
- /**
- * whether this item has reshare information
- * @returns {boolean}
- */
- hasReshare: function() {
- var reshare = this.get('reshare')
- return _.isObject(reshare) && !_.isUndefined(reshare.uid_owner)
- },
-
- /**
- * whether this item has user share information
- * @returns {boolean}
- */
- hasUserShares: function() {
- return this.getSharesWithCurrentItem().length > 0
- },
-
- /**
- * Returns whether this item has link shares
- *
- * @returns {bool} true if a link share exists, false otherwise
- */
- hasLinkShares: function() {
- var linkShares = this.get('linkShares')
- if (linkShares && linkShares.length > 0) {
- return true
- }
- return false
- },
-
- /**
- * @returns {string}
- */
- getReshareOwner: function() {
- return this.get('reshare').uid_owner
- },
-
- /**
- * @returns {string}
- */
- getReshareOwnerDisplayname: function() {
- return this.get('reshare').displayname_owner
- },
-
- /**
- * @returns {string}
- */
- getReshareNote: function() {
- return this.get('reshare').note
- },
-
- /**
- * @returns {string}
- */
- getReshareWith: function() {
- return this.get('reshare').share_with
- },
-
- /**
- * @returns {string}
- */
- getReshareWithDisplayName: function() {
- var reshare = this.get('reshare')
- return reshare.share_with_displayname || reshare.share_with
- },
-
- /**
- * @returns {number}
- */
- getReshareType: function() {
- return this.get('reshare').share_type
- },
-
- getExpireDate: function(shareIndex) {
- return this._shareExpireDate(shareIndex)
- },
-
- getNote: function(shareIndex) {
- return this._shareNote(shareIndex)
- },
-
- /**
- * Returns all share entries that only apply to the current item
- * (file/folder)
- *
- * @returns {Array.<OC.Share.Types.ShareInfo>}
- */
- getSharesWithCurrentItem: function() {
- var shares = this.get('shares') || []
- var fileId = this.fileInfoModel.get('id')
- return _.filter(shares, function(share) {
- return share.item_source === fileId
- })
- },
-
- /**
- * @param shareIndex
- * @returns {string}
- */
- getShareWith: function(shareIndex) {
- /** @type OC.Share.Types.ShareInfo **/
- var share = this.get('shares')[shareIndex]
- if (!_.isObject(share)) {
- throw 'Unknown Share'
- }
- return share.share_with
- },
-
- /**
- * @param shareIndex
- * @returns {string}
- */
- getShareWithDisplayName: function(shareIndex) {
- /** @type OC.Share.Types.ShareInfo **/
- var share = this.get('shares')[shareIndex]
- if (!_.isObject(share)) {
- throw 'Unknown Share'
- }
- return share.share_with_displayname
- },
-
- /**
- * @param shareIndex
- * @returns {string}
- */
- getShareWithAvatar: function(shareIndex) {
- /** @type OC.Share.Types.ShareInfo **/
- var share = this.get('shares')[shareIndex]
- if (!_.isObject(share)) {
- throw 'Unknown Share'
- }
- return share.share_with_avatar
- },
-
- /**
- * @param shareIndex
- * @returns {string}
- */
- getSharedBy: function(shareIndex) {
- /** @type OC.Share.Types.ShareInfo **/
- var share = this.get('shares')[shareIndex]
- if (!_.isObject(share)) {
- throw 'Unknown Share'
- }
- return share.uid_owner
- },
-
- /**
- * @param shareIndex
- * @returns {string}
- */
- getSharedByDisplayName: function(shareIndex) {
- /** @type OC.Share.Types.ShareInfo **/
- var share = this.get('shares')[shareIndex]
- if (!_.isObject(share)) {
- throw 'Unknown Share'
- }
- return share.displayname_owner
- },
-
- /**
- * @param shareIndex
- * @returns {string}
- */
- getFileOwnerUid: function(shareIndex) {
- /** @type OC.Share.Types.ShareInfo **/
- var share = this.get('shares')[shareIndex]
- if (!_.isObject(share)) {
- throw 'Unknown Share'
- }
- return share.uid_file_owner
- },
-
- /**
- * returns the array index of a sharee for a provided shareId
- *
- * @param shareId
- * @returns {number}
- */
- findShareWithIndex: function(shareId) {
- var shares = this.get('shares')
- if (!_.isArray(shares)) {
- throw 'Unknown Share'
- }
- for (var i = 0; i < shares.length; i++) {
- var shareWith = shares[i]
- if (shareWith.id === shareId) {
- return i
- }
- }
- throw 'Unknown Sharee'
- },
-
- getShareType: function(shareIndex) {
- /** @type OC.Share.Types.ShareInfo **/
- var share = this.get('shares')[shareIndex]
- if (!_.isObject(share)) {
- throw 'Unknown Share'
- }
- return share.share_type
- },
-
- /**
- * whether a share from shares has the requested permission
- *
- * @param {number} shareIndex
- * @param {number} permission
- * @returns {boolean}
- * @private
- */
- _shareHasPermission: function(shareIndex, permission) {
- /** @type OC.Share.Types.ShareInfo **/
- var share = this.get('shares')[shareIndex]
- if (!_.isObject(share)) {
- throw 'Unknown Share'
- }
- return (share.permissions & permission) === permission
- },
-
- _shareExpireDate: function(shareIndex) {
- var share = this.get('shares')[shareIndex]
- if (!_.isObject(share)) {
- throw 'Unknown Share'
- }
- var date2 = share.expiration
- return date2
- },
-
- _shareNote: function(shareIndex) {
- var share = this.get('shares')[shareIndex]
- if (!_.isObject(share)) {
- throw 'Unknown Share'
- }
- return share.note
- },
-
- /**
- * @returns {int}
- */
- getPermissions: function() {
- return this.get('permissions')
- },
-
- /**
- * @returns {boolean}
- */
- sharePermissionPossible: function() {
- return (this.get('permissions') & OC.PERMISSION_SHARE) === OC.PERMISSION_SHARE
- },
-
- /**
- * @param {number} shareIndex
- * @returns {boolean}
- */
- hasSharePermission: function(shareIndex) {
- return this._shareHasPermission(shareIndex, OC.PERMISSION_SHARE)
- },
-
- /**
- * @returns {boolean}
- */
- createPermissionPossible: function() {
- return (this.get('permissions') & OC.PERMISSION_CREATE) === OC.PERMISSION_CREATE
- },
-
- /**
- * @param {number} shareIndex
- * @returns {boolean}
- */
- hasCreatePermission: function(shareIndex) {
- return this._shareHasPermission(shareIndex, OC.PERMISSION_CREATE)
- },
-
- /**
- * @returns {boolean}
- */
- updatePermissionPossible: function() {
- return (this.get('permissions') & OC.PERMISSION_UPDATE) === OC.PERMISSION_UPDATE
- },
-
- /**
- * @param {number} shareIndex
- * @returns {boolean}
- */
- hasUpdatePermission: function(shareIndex) {
- return this._shareHasPermission(shareIndex, OC.PERMISSION_UPDATE)
- },
-
- /**
- * @returns {boolean}
- */
- deletePermissionPossible: function() {
- return (this.get('permissions') & OC.PERMISSION_DELETE) === OC.PERMISSION_DELETE
- },
-
- /**
- * @param {number} shareIndex
- * @returns {boolean}
- */
- hasDeletePermission: function(shareIndex) {
- return this._shareHasPermission(shareIndex, OC.PERMISSION_DELETE)
- },
-
- hasReadPermission: function(shareIndex) {
- return this._shareHasPermission(shareIndex, OC.PERMISSION_READ)
- },
-
- /**
- * @returns {boolean}
- */
- editPermissionPossible: function() {
- return this.createPermissionPossible()
- || this.updatePermissionPossible()
- || this.deletePermissionPossible()
- },
-
- /**
- * @returns {string}
- * The state that the 'can edit' permission checkbox should have.
- * Possible values:
- * - empty string: no permission
- * - 'checked': all applicable permissions
- * - 'indeterminate': some but not all permissions
- */
- editPermissionState: function(shareIndex) {
- var hcp = this.hasCreatePermission(shareIndex)
- var hup = this.hasUpdatePermission(shareIndex)
- var hdp = this.hasDeletePermission(shareIndex)
- if (this.isFile()) {
- if (hcp || hup || hdp) {
- return 'checked'
- }
- return ''
- }
- if (!hcp && !hup && !hdp) {
- return ''
- }
- if ((this.createPermissionPossible() && !hcp)
- || (this.updatePermissionPossible() && !hup)
- || (this.deletePermissionPossible() && !hdp)) {
- return 'indeterminate'
- }
- return 'checked'
- },
-
- /**
- * @returns {int}
- */
- linkSharePermissions: function(shareId) {
- var linkShares = this.get('linkShares')
- var shareIndex = _.findIndex(linkShares, function(share) { return share.id === shareId })
-
- if (!this.hasLinkShares()) {
- return -1
- } else if (linkShares.length > 0 && shareIndex !== -1) {
- return linkShares[shareIndex].permissions
- }
- return -1
- },
-
- _getUrl: function(base, params) {
- params = _.extend({ format: 'json' }, params || {})
- return OC.linkToOCS('apps/files_sharing/api/v1', 2) + base + '?' + OC.buildQueryString(params)
- },
-
- _fetchShares: function() {
- var path = this.fileInfoModel.getFullPath()
- return $.ajax({
- type: 'GET',
- url: this._getUrl('shares', { path: path, reshares: true })
- })
- },
-
- _fetchReshare: function() {
- // only fetch original share once
- if (!this._reshareFetched) {
- var path = this.fileInfoModel.getFullPath()
- this._reshareFetched = true
- return $.ajax({
- type: 'GET',
- url: this._getUrl('shares', { path: path, shared_with_me: true })
- })
- } else {
- return $.Deferred().resolve([{
- ocs: {
- data: [this.get('reshare')]
- }
- }])
- }
- },
-
- /**
- * Group reshares into a single super share element.
- * Does this by finding the most precise share and
- * combines the permissions to be the most permissive.
- *
- * @param {Array} reshares
- * @returns {Object} reshare
- */
- _groupReshares: function(reshares) {
- if (!reshares || !reshares.length) {
- return false
- }
-
- var superShare = reshares.shift()
- var combinedPermissions = superShare.permissions
- _.each(reshares, function(reshare) {
- // use share have higher priority than group share
- if (reshare.share_type === OC.Share.SHARE_TYPE_USER && superShare.share_type === OC.Share.SHARE_TYPE_GROUP) {
- superShare = reshare
- }
- combinedPermissions |= reshare.permissions
- })
-
- superShare.permissions = combinedPermissions
- return superShare
- },
-
- fetch: function(options) {
- var model = this
- this.trigger('request', this)
-
- var deferred = $.when(
- this._fetchShares(),
- this._fetchReshare()
- )
- deferred.done(function(data1, data2) {
- model.trigger('sync', 'GET', this)
- var sharesMap = {}
- _.each(data1[0].ocs.data, function(shareItem) {
- sharesMap[shareItem.id] = shareItem
- })
-
- var reshare = false
- if (data2[0].ocs.data.length) {
- reshare = model._groupReshares(data2[0].ocs.data)
- }
-
- model.set(model.parse({
- shares: sharesMap,
- reshare: reshare
- }))
-
- if (!_.isUndefined(options) && _.isFunction(options.success)) {
- options.success()
- }
- })
-
- return deferred
- },
-
- /**
- * Updates OC.Share.itemShares and OC.Share.statuses.
- *
- * This is required in case the user navigates away and comes back,
- * the share statuses from the old arrays are still used to fill in the icons
- * in the file list.
- */
- _legacyFillCurrentShares: function(shares) {
- var fileId = this.fileInfoModel.get('id')
- if (!shares || !shares.length) {
- delete OC.Share.statuses[fileId]
- OC.Share.currentShares = {}
- OC.Share.itemShares = []
- return
- }
-
- var currentShareStatus = OC.Share.statuses[fileId]
- if (!currentShareStatus) {
- currentShareStatus = { link: false }
- OC.Share.statuses[fileId] = currentShareStatus
- }
- currentShareStatus.link = false
-
- OC.Share.currentShares = {}
- OC.Share.itemShares = []
- _.each(shares,
- /**
- * @param {OC.Share.Types.ShareInfo} share
- */
- function(share) {
- if (share.share_type === OC.Share.SHARE_TYPE_LINK) {
- OC.Share.itemShares[share.share_type] = true
- currentShareStatus.link = true
- } else {
- if (!OC.Share.itemShares[share.share_type]) {
- OC.Share.itemShares[share.share_type] = []
- }
- OC.Share.itemShares[share.share_type].push(share.share_with)
- }
- }
- )
- },
-
- parse: function(data) {
- if (data === false) {
- console.warn('no data was returned')
- this.trigger('fetchError')
- return {}
- }
-
- var permissions = this.fileInfoModel.get('permissions')
- if (!_.isUndefined(data.reshare) && !_.isUndefined(data.reshare.permissions) && data.reshare.uid_owner !== OC.currentUser) {
- permissions = permissions & data.reshare.permissions
- }
-
- var allowPublicUploadStatus = false
- if (!_.isUndefined(data.shares)) {
- $.each(data.shares, function(key, value) {
- if (value.share_type === OC.Share.SHARE_TYPE_LINK) {
- allowPublicUploadStatus = !!((value.permissions & OC.PERMISSION_CREATE))
- return true
- }
- })
- }
-
- var allowPublicEditingStatus = true
- if (!_.isUndefined(data.shares)) {
- $.each(data.shares, function(key, value) {
- if (value.share_type === OC.Share.SHARE_TYPE_LINK) {
- allowPublicEditingStatus = !!((value.permissions & OC.PERMISSION_UPDATE))
- return true
- }
- })
- }
-
- var hideFileListStatus = false
- if (!_.isUndefined(data.shares)) {
- $.each(data.shares, function(key, value) {
- if (value.share_type === OC.Share.SHARE_TYPE_LINK) {
- hideFileListStatus = !((value.permissions & OC.PERMISSION_READ))
- return true
- }
- })
- }
-
- /** @type {OC.Share.Types.ShareInfo[]} **/
- var shares = _.map(data.shares, function(share) {
- // properly parse some values because sometimes the server
- // returns integers as string...
- var i
- for (i = 0; i < SHARE_RESPONSE_INT_PROPS.length; i++) {
- var prop = SHARE_RESPONSE_INT_PROPS[i]
- if (!_.isUndefined(share[prop])) {
- share[prop] = parseInt(share[prop], 10)
- }
- }
- return share
- })
-
- this._legacyFillCurrentShares(shares)
-
- var linkShares = []
- // filter out the share by link
- shares = _.reject(shares,
- /**
- * @param {OC.Share.Types.ShareInfo} share
- */
- function(share) {
- var isShareLink
- = share.share_type === OC.Share.SHARE_TYPE_LINK
- && (share.file_source === this.get('itemSource')
- || share.item_source === this.get('itemSource'))
-
- if (isShareLink) {
- /**
- * Ignore reshared link shares for now
- * FIXME: Find a way to display properly
- */
- if (share.uid_owner !== OC.currentUser) {
- return
- }
-
- var link = window.location.protocol + '//' + window.location.host
- if (!share.token) {
- // pre-token link
- var fullPath = this.fileInfoModel.get('path') + '/'
- + this.fileInfoModel.get('name')
- var location = '/' + OC.currentUser + '/files' + fullPath
- var type = this.fileInfoModel.isDirectory() ? 'folder' : 'file'
- link += OC.linkTo('', 'public.php') + '?service=files&'
- + type + '=' + encodeURIComponent(location)
- } else {
- link += OC.generateUrl('/s/') + share.token
- }
- linkShares.push(_.extend({}, share, {
- // hide_download is returned as an int, so force it
- // to a boolean
- hideDownload: !!share.hide_download,
- password: share.share_with,
- sendPasswordByTalk: share.send_password_by_talk
- }))
-
- return share
- }
- },
- this
- )
-
- return {
- reshare: data.reshare,
- shares: shares,
- linkShares: linkShares,
- permissions: permissions,
- allowPublicUploadStatus: allowPublicUploadStatus,
- allowPublicEditingStatus: allowPublicEditingStatus,
- hideFileListStatus: hideFileListStatus
- }
- },
-
- /**
- * Parses a string to an valid integer (unix timestamp)
- * @param time
- * @returns {*}
- * @internal Only used to work around a bug in the backend
- */
- _parseTime: function(time) {
- if (_.isString(time)) {
- // skip empty strings and hex values
- if (time === '' || (time.length > 1 && time[0] === '0' && time[1] === 'x')) {
- return null
- }
- time = parseInt(time, 10)
- if (isNaN(time)) {
- time = null
- }
- }
- return time
- },
-
- /**
- * Returns a list of share types from the existing shares.
- *
- * @returns {Array.<int>} array of share types
- */
- getShareTypes: function() {
- var result
- result = _.pluck(this.getSharesWithCurrentItem(), 'share_type')
- if (this.hasLinkShares()) {
- result.push(OC.Share.SHARE_TYPE_LINK)
- }
- return _.uniq(result)
- }
- })
-
- OC.Share.ShareItemModel = ShareItemModel
-})()
diff --git a/core/js/sharesocialmanager.js b/core/js/sharesocialmanager.js
deleted file mode 100644
index 65fc4cd0f65..00000000000
--- a/core/js/sharesocialmanager.js
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * @copyright 2017, Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @author Roeland Jago Douma <roeland@famdouma.nl>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-(function() {
- if (!OC.Share) {
- OC.Share = {}
- }
-
- OC.Share.Social = {}
-
- var SocialModel = OC.Backbone.Model.extend({
- defaults: {
- /** used for sorting social buttons */
- key: null,
- /** url to open, {{reference}} will be replaced with the link */
- url: null,
- /** Name to show in the tooltip */
- name: null,
- /** Icon class to display */
- iconClass: null,
- /** Open in new windows */
- newWindow: true
- }
- })
-
- OC.Share.Social.Model = SocialModel
-
- var SocialCollection = OC.Backbone.Collection.extend({
- model: OC.Share.Social.Model,
-
- comparator: 'key'
- })
-
- OC.Share.Social.Collection = new SocialCollection()
-})()
diff --git a/core/js/sharetemplates.js b/core/js/sharetemplates.js
deleted file mode 100644
index a23b51b27bc..00000000000
--- a/core/js/sharetemplates.js
+++ /dev/null
@@ -1,686 +0,0 @@
-(function() {
- var template = Handlebars.template, templates = OC.Share.Templates = OC.Share.Templates || {};
-templates['sharedialoglinkshareview'] = template({"1":function(container,depth0,helpers,partials,data) {
- var stack1, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {});
-
- return "<ul class=\"shareWithList\">\n"
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.nolinkShares : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + ((stack1 = helpers.each.call(alias2,(depth0 != null ? depth0.linkShares : depth0),{"name":"each","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "</ul>\n";
-},"2":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return " <li data-share-id=\""
- + alias5(((helper = (helper = helpers.newShareId || (depth0 != null ? depth0.newShareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"newShareId","hash":{},"data":data}) : helper)))
- + "\">\n <div class=\"avatar icon-public-white\"></div>\n <span class=\"username\">"
- + alias5(((helper = (helper = helpers.newShareLabel || (depth0 != null ? depth0.newShareLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"newShareLabel","hash":{},"data":data}) : helper)))
- + "</span>\n <span class=\"sharingOptionsGroup\">\n <div class=\"share-menu\">\n <a href=\"#\" class=\"icon icon-add new-share has-tooltip "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.showPending : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\" title=\""
- + alias5(((helper = (helper = helpers.newShareTitle || (depth0 != null ? depth0.newShareTitle : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"newShareTitle","hash":{},"data":data}) : helper)))
- + "\"></a>\n <span class=\"icon icon-loading-small "
- + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.showPending : depth0),{"name":"unless","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\"></span>\n"
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.showPending : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " </div>\n </span>\n </li>\n";
-},"3":function(container,depth0,helpers,partials,data) {
- return "hidden";
-},"5":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable;
-
- return " "
- + ((stack1 = ((helper = (helper = helpers.pendingPopoverMenu || (depth0 != null ? depth0.pendingPopoverMenu : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"pendingPopoverMenu","hash":{},"data":data}) : helper))) != null ? stack1 : "")
- + "\n";
-},"7":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return " <li data-share-id=\""
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\">\n <div class=\"avatar icon-public-white\"></div>\n <span class=\"username\" title=\""
- + alias5(((helper = (helper = helpers.linkShareCreationDate || (depth0 != null ? depth0.linkShareCreationDate : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"linkShareCreationDate","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.linkShareLabel || (depth0 != null ? depth0.linkShareLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"linkShareLabel","hash":{},"data":data}) : helper)))
- + "</span>\n \n <span class=\"sharingOptionsGroup\">\n <a href=\"#\" class=\"clipboard-button icon icon-clippy has-tooltip\" data-clipboard-text=\""
- + alias5(((helper = (helper = helpers.shareLinkURL || (depth0 != null ? depth0.shareLinkURL : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareLinkURL","hash":{},"data":data}) : helper)))
- + "\" title=\""
- + alias5(((helper = (helper = helpers.copyLabel || (depth0 != null ? depth0.copyLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"copyLabel","hash":{},"data":data}) : helper)))
- + "\"></a>\n <div class=\"share-menu\">\n <a href=\"#\" class=\"icon icon-more "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.showPending : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\"></a>\n <span class=\"icon icon-loading-small "
- + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.showPending : depth0),{"name":"unless","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\"></span>\n"
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.showPending : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.program(8, data, 0),"data":data})) != null ? stack1 : "")
- + " </div>\n </span>\n </li>\n";
-},"8":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable;
-
- return " "
- + ((stack1 = ((helper = (helper = helpers.popoverMenu || (depth0 != null ? depth0.popoverMenu : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"popoverMenu","hash":{},"data":data}) : helper))) != null ? stack1 : "")
- + "\n";
-},"10":function(container,depth0,helpers,partials,data) {
- var stack1, alias1=container.propertyIsEnumerable;
-
- return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.noSharingPlaceholder : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\n";
-},"11":function(container,depth0,helpers,partials,data) {
- var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return "<input id=\"shareWith-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\" class=\"shareWithField\" type=\"text\" placeholder=\""
- + alias5(((helper = (helper = helpers.noSharingPlaceholder || (depth0 != null ? depth0.noSharingPlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"noSharingPlaceholder","hash":{},"data":data}) : helper)))
- + "\" disabled=\"disabled\" />";
-},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
- var stack1, alias1=container.propertyIsEnumerable;
-
- return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.shareAllowed : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.program(10, data, 0),"data":data})) != null ? stack1 : "");
-},"useData":true});
-templates['sharedialoglinkshareview_popover_menu'] = template({"1":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return " <li>\n <span class=\"menuitem\">\n <span class=\"icon-loading-small hidden\"></span>\n <input type=\"radio\" name=\"publicUpload\" value=\""
- + alias5(((helper = (helper = helpers.publicUploadRValue || (depth0 != null ? depth0.publicUploadRValue : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"publicUploadRValue","hash":{},"data":data}) : helper)))
- + "\" id=\"sharingDialogAllowPublicUpload-r-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\" class=\"radio publicUploadRadio\" "
- + ((stack1 = ((helper = (helper = helpers.publicUploadRChecked || (depth0 != null ? depth0.publicUploadRChecked : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"publicUploadRChecked","hash":{},"data":data}) : helper))) != null ? stack1 : "")
- + " />\n <label for=\"sharingDialogAllowPublicUpload-r-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.publicUploadRLabel || (depth0 != null ? depth0.publicUploadRLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"publicUploadRLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n <li>\n <span class=\"menuitem\">\n <span class=\"icon-loading-small hidden\"></span>\n <input type=\"radio\" name=\"publicUpload\" value=\""
- + alias5(((helper = (helper = helpers.publicUploadRWValue || (depth0 != null ? depth0.publicUploadRWValue : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"publicUploadRWValue","hash":{},"data":data}) : helper)))
- + "\" id=\"sharingDialogAllowPublicUpload-rw-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\" class=\"radio publicUploadRadio\" "
- + ((stack1 = ((helper = (helper = helpers.publicUploadRWChecked || (depth0 != null ? depth0.publicUploadRWChecked : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"publicUploadRWChecked","hash":{},"data":data}) : helper))) != null ? stack1 : "")
- + " />\n <label for=\"sharingDialogAllowPublicUpload-rw-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.publicUploadRWLabel || (depth0 != null ? depth0.publicUploadRWLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"publicUploadRWLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n <li>\n <span class=\"menuitem\">\n <span class=\"icon-loading-small hidden\"></span>\n <input type=\"radio\" name=\"publicUpload\" value=\""
- + alias5(((helper = (helper = helpers.publicUploadWValue || (depth0 != null ? depth0.publicUploadWValue : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"publicUploadWValue","hash":{},"data":data}) : helper)))
- + "\" id=\"sharingDialogAllowPublicUpload-w-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\" class=\"radio publicUploadRadio\" "
- + ((stack1 = ((helper = (helper = helpers.publicUploadWChecked || (depth0 != null ? depth0.publicUploadWChecked : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"publicUploadWChecked","hash":{},"data":data}) : helper))) != null ? stack1 : "")
- + " />\n <label for=\"sharingDialogAllowPublicUpload-w-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.publicUploadWLabel || (depth0 != null ? depth0.publicUploadWLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"publicUploadWLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n";
-},"3":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return " <li id=\"allowPublicEditingWrapper\">\n <span class=\"menuitem\">\n <span class=\"icon-loading-small hidden\"></span>\n <input type=\"checkbox\" name=\"allowPublicEditing\" id=\"sharingDialogAllowPublicEditing-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\" class=\"checkbox publicEditingCheckbox\" "
- + ((stack1 = ((helper = (helper = helpers.publicEditingChecked || (depth0 != null ? depth0.publicEditingChecked : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"publicEditingChecked","hash":{},"data":data}) : helper))) != null ? stack1 : "")
- + " />\n <label for=\"sharingDialogAllowPublicEditing-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.publicEditingLabel || (depth0 != null ? depth0.publicEditingLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"publicEditingLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n";
-},"5":function(container,depth0,helpers,partials,data) {
- return "checked=\"checked\"";
-},"7":function(container,depth0,helpers,partials,data) {
- return "disabled=\"disabled\"";
-},"9":function(container,depth0,helpers,partials,data) {
- return "hidden";
-},"11":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return " <li>\n <span class=\"shareOption menuitem\">\n <span class=\"icon-loading-small hidden\"></span>\n <input type=\"checkbox\" name=\"passwordByTalk\" id=\"passwordByTalk-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\" class=\"checkbox passwordByTalkCheckbox\"\n "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.isPasswordByTalkSet : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " />\n <label for=\"passwordByTalk-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.passwordByTalkLabel || (depth0 != null ? depth0.passwordByTalkLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"passwordByTalkLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n";
-},"13":function(container,depth0,helpers,partials,data) {
- return "datepicker";
-},"15":function(container,depth0,helpers,partials,data) {
- var helper, alias1=container.propertyIsEnumerable;
-
- return container.escapeExpression(((helper = (helper = helpers.expireDate || (depth0 != null ? depth0.expireDate : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"expireDate","hash":{},"data":data}) : helper)));
-},"17":function(container,depth0,helpers,partials,data) {
- var helper, alias1=container.propertyIsEnumerable;
-
- return container.escapeExpression(((helper = (helper = helpers.defaultExpireDate || (depth0 != null ? depth0.defaultExpireDate : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"defaultExpireDate","hash":{},"data":data}) : helper)));
-},"19":function(container,depth0,helpers,partials,data) {
- return "readonly";
-},"21":function(container,depth0,helpers,partials,data) {
- var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return " <li>\n <a href=\"#\" class=\"menuitem pop-up\" data-url=\""
- + alias5(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"url","hash":{},"data":data}) : helper)))
- + "\" data-window=\""
- + alias5(((helper = (helper = helpers.newWindow || (depth0 != null ? depth0.newWindow : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"newWindow","hash":{},"data":data}) : helper)))
- + "\">\n <span class=\"icon "
- + alias5(((helper = (helper = helpers.iconClass || (depth0 != null ? depth0.iconClass : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"iconClass","hash":{},"data":data}) : helper)))
- + "\"></span>\n <span>"
- + alias5(((helper = (helper = helpers.label || (depth0 != null ? depth0.label : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"label","hash":{},"data":data}) : helper)))
- + "</span>\n </a>\n </li>\n";
-},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return "<div class=\"popovermenu menu\">\n <ul>\n <li class=\"hidden linkTextMenu\">\n <span class=\"menuitem icon-link-text\">\n <input id=\"linkText-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\" class=\"linkText\" type=\"text\" readonly=\"readonly\" value=\""
- + alias5(((helper = (helper = helpers.shareLinkURL || (depth0 != null ? depth0.shareLinkURL : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareLinkURL","hash":{},"data":data}) : helper)))
- + "\" />\n </span>\n </li>\n"
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.publicUpload : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.publicEditing : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " <li>\n <span class=\"menuitem\">\n <span class=\"icon-loading-small hidden\"></span>\n <input type=\"checkbox\" name=\"hideDownload\" id=\"sharingDialogHideDownload-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\" class=\"checkbox hideDownloadCheckbox\"\n "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.hideDownload : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " />\n <label for=\"sharingDialogHideDownload-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.hideDownloadLabel || (depth0 != null ? depth0.hideDownloadLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"hideDownloadLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n <li>\n <span class=\"menuitem\">\n <input type=\"checkbox\" name=\"showPassword\" id=\"showPassword-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\" class=\"checkbox showPasswordCheckbox\"\n "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.isPasswordSet : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.isPasswordEnforced : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " value=\"1\" />\n <label for=\"showPassword-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.enablePasswordLabel || (depth0 != null ? depth0.enablePasswordLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"enablePasswordLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n <li class=\""
- + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.isPasswordSet : depth0),{"name":"unless","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " linkPassMenu\">\n <span class=\"menuitem icon-share-pass\">\n <input id=\"linkPassText-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\" class=\"linkPassText\" type=\"password\" placeholder=\""
- + alias5(((helper = (helper = helpers.passwordPlaceholder || (depth0 != null ? depth0.passwordPlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"passwordPlaceholder","hash":{},"data":data}) : helper)))
- + "\" autocomplete=\"new-password\" />\n <input type=\"submit\" class=\"icon-confirm share-pass-submit\" value=\"\" />\n <span class=\"icon icon-loading-small hidden\"></span>\n </span>\n </li>\n"
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.showPasswordByTalkCheckBox : depth0),{"name":"if","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " <li>\n <span class=\"menuitem\">\n <input id=\"expireDate-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\" type=\"checkbox\" name=\"expirationDate\" class=\"expireDate checkbox\"\n "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.hasExpireDate : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.isExpirationEnforced : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " />\n <label for=\"expireDate-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.expireDateLabel || (depth0 != null ? depth0.expireDateLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"expireDateLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n <li class=\""
- + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.hasExpireDate : depth0),{"name":"unless","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\">\n <span class=\"menuitem icon-expiredate expirationDateContainer-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\">\n <label for=\"expirationDatePicker-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\" class=\"hidden-visually\" value=\""
- + alias5(((helper = (helper = helpers.expirationDate || (depth0 != null ? depth0.expirationDate : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"expirationDate","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.expirationLabel || (depth0 != null ? depth0.expirationLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"expirationLabel","hash":{},"data":data}) : helper)))
- + "</label>\n <!-- do not use the datepicker if enforced -->\n <input id=\"expirationDatePicker-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\" class=\""
- + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.isExpirationEnforced : depth0),{"name":"unless","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\" type=\"text\"\n placeholder=\""
- + alias5(((helper = (helper = helpers.expirationDatePlaceholder || (depth0 != null ? depth0.expirationDatePlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"expirationDatePlaceholder","hash":{},"data":data}) : helper)))
- + "\" value=\""
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.hasExpireDate : depth0),{"name":"if","hash":{},"fn":container.program(15, data, 0),"inverse":container.program(17, data, 0),"data":data})) != null ? stack1 : "")
- + "\"\n data-max-date=\""
- + alias5(((helper = (helper = helpers.maxDate || (depth0 != null ? depth0.maxDate : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"maxDate","hash":{},"data":data}) : helper)))
- + "\" "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.isExpirationEnforced : depth0),{"name":"if","hash":{},"fn":container.program(19, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " />\n </span>\n </li>\n <li>\n <a href=\"#\" class=\"share-add\">\n <span class=\"icon-loading-small hidden\"></span>\n <span class=\"icon icon-edit\"></span>\n <span>"
- + alias5(((helper = (helper = helpers.addNoteLabel || (depth0 != null ? depth0.addNoteLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"addNoteLabel","hash":{},"data":data}) : helper)))
- + "</span>\n <input type=\"button\" class=\"share-note-delete icon-delete "
- + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.hasNote : depth0),{"name":"unless","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\">\n </a>\n </li>\n <li class=\"share-note-form share-note-link "
- + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.hasNote : depth0),{"name":"unless","hash":{},"fn":container.program(9, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\">\n <span class=\"menuitem icon-note\">\n <textarea class=\"share-note\">"
- + alias5(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareNote","hash":{},"data":data}) : helper)))
- + "</textarea>\n <input type=\"submit\" class=\"icon-confirm share-note-submit\" value=\"\" id=\"add-note-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" />\n </span>\n </li>\n"
- + ((stack1 = helpers.each.call(alias2,(depth0 != null ? depth0.social : depth0),{"name":"each","hash":{},"fn":container.program(21, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " <li>\n <a href=\"#\" class=\"unshare\"><span class=\"icon-loading-small hidden\"></span><span class=\"icon icon-delete\"></span><span>"
- + alias5(((helper = (helper = helpers.unshareLinkLabel || (depth0 != null ? depth0.unshareLinkLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"unshareLinkLabel","hash":{},"data":data}) : helper)))
- + "</span></a>\n </li>\n <li>\n <a href=\"#\" class=\"new-share\">\n <span class=\"icon-loading-small hidden\"></span>\n <span class=\"icon icon-add\"></span>\n <span>"
- + alias5(((helper = (helper = helpers.newShareLabel || (depth0 != null ? depth0.newShareLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"newShareLabel","hash":{},"data":data}) : helper)))
- + "</span>\n </a>\n </li>\n </ul>\n</div>\n";
-},"useData":true});
-templates['sharedialoglinkshareview_popover_menu_pending'] = template({"1":function(container,depth0,helpers,partials,data) {
- var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return " <li>\n <span class=\"menuitem icon-info\">\n <p>"
- + alias5(((helper = (helper = helpers.enforcedPasswordLabel || (depth0 != null ? depth0.enforcedPasswordLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"enforcedPasswordLabel","hash":{},"data":data}) : helper)))
- + "</p>\n </span>\n </li>\n <li class=\"linkPassMenu\">\n <span class=\"menuitem\">\n <form autocomplete=\"off\" class=\"enforcedPassForm\">\n <input id=\"enforcedPassText\" required class=\"enforcedPassText\" type=\"password\"\n placeholder=\""
- + alias5(((helper = (helper = helpers.passwordPlaceholder || (depth0 != null ? depth0.passwordPlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"passwordPlaceholder","hash":{},"data":data}) : helper)))
- + "\" autocomplete=\"enforcedPassText\" minlength=\""
- + alias5(((helper = (helper = helpers.minPasswordLength || (depth0 != null ? depth0.minPasswordLength : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"minPasswordLength","hash":{},"data":data}) : helper)))
- + "\" />\n <input type=\"submit\" value=\" \" class=\"primary icon-checkmark-white\">\n </form>\n </span>\n </li>\n";
-},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
- var stack1, alias1=container.propertyIsEnumerable;
-
- return "<div class=\"popovermenu open menu pending\">\n <ul>\n"
- + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isPasswordEnforced : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " </ul>\n</div>\n";
-},"useData":true});
-templates['sharedialogresharerinfoview'] = template({"1":function(container,depth0,helpers,partials,data) {
- var helper, alias1=container.propertyIsEnumerable;
-
- return "<div class=\"share-note\">"
- + container.escapeExpression(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"shareNote","hash":{},"data":data}) : helper)))
- + "</div>";
-},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return "<span class=\"reshare\">\n <div class=\"avatar\" data-userName=\""
- + alias5(((helper = (helper = helpers.reshareOwner || (depth0 != null ? depth0.reshareOwner : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"reshareOwner","hash":{},"data":data}) : helper)))
- + "\"></div>\n "
- + alias5(((helper = (helper = helpers.sharedByText || (depth0 != null ? depth0.sharedByText : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"sharedByText","hash":{},"data":data}) : helper)))
- + "\n</span>\n"
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.hasShareNote : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\n";
-},"useData":true});
-templates['sharedialogshareelistview'] = template({"1":function(container,depth0,helpers,partials,data) {
- var stack1, alias1=container.propertyIsEnumerable;
-
- return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isShareWithCurrentUser : depth0),{"name":"unless","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
-},"2":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return " <li data-share-id=\""
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" data-share-type=\""
- + alias5(((helper = (helper = helpers.shareType || (depth0 != null ? depth0.shareType : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareType","hash":{},"data":data}) : helper)))
- + "\" data-share-with=\""
- + alias5(((helper = (helper = helpers.shareWith || (depth0 != null ? depth0.shareWith : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareWith","hash":{},"data":data}) : helper)))
- + "\">\n <div class=\"avatar "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.modSeed : depth0),{"name":"if","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\" data-username=\""
- + alias5(((helper = (helper = helpers.shareWith || (depth0 != null ? depth0.shareWith : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareWith","hash":{},"data":data}) : helper)))
- + "\" data-avatar=\""
- + alias5(((helper = (helper = helpers.shareWithAvatar || (depth0 != null ? depth0.shareWithAvatar : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareWithAvatar","hash":{},"data":data}) : helper)))
- + "\" data-displayname=\""
- + alias5(((helper = (helper = helpers.shareWithDisplayName || (depth0 != null ? depth0.shareWithDisplayName : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareWithDisplayName","hash":{},"data":data}) : helper)))
- + "\" "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.modSeed : depth0),{"name":"if","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "></div>\n <span class=\"username\" title=\""
- + alias5(((helper = (helper = helpers.shareWithTitle || (depth0 != null ? depth0.shareWithTitle : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareWithTitle","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.shareWithDisplayName || (depth0 != null ? depth0.shareWithDisplayName : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareWithDisplayName","hash":{},"data":data}) : helper)))
- + "</span>\n"
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.canUpdateShareSettings : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " </li>\n";
-},"3":function(container,depth0,helpers,partials,data) {
- return "imageplaceholderseed";
-},"5":function(container,depth0,helpers,partials,data) {
- var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return "data-seed=\""
- + alias5(((helper = (helper = helpers.shareWith || (depth0 != null ? depth0.shareWith : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareWith","hash":{},"data":data}) : helper)))
- + " "
- + alias5(((helper = (helper = helpers.shareType || (depth0 != null ? depth0.shareType : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareType","hash":{},"data":data}) : helper)))
- + "\"";
-},"7":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {});
-
- return " <span class=\"sharingOptionsGroup\">\n"
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.editPermissionPossible : depth0),{"name":"if","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " <div tabindex=\"0\" class=\"share-menu\"><span class=\"icon icon-more\"></span>\n "
- + ((stack1 = ((helper = (helper = helpers.popoverMenu || (depth0 != null ? depth0.popoverMenu : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(alias2,{"name":"popoverMenu","hash":{},"data":data}) : helper))) != null ? stack1 : "")
- + "\n </div>\n </span>\n";
-},"8":function(container,depth0,helpers,partials,data) {
- var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return " <span>\n <input id=\"canEdit-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" type=\"checkbox\" name=\"edit\" class=\"permissions checkbox\" />\n <label for=\"canEdit-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.canEditLabel || (depth0 != null ? depth0.canEditLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"canEditLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n";
-},"10":function(container,depth0,helpers,partials,data) {
- var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return " <li data-share-id=\""
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" data-share-type=\""
- + alias5(((helper = (helper = helpers.shareType || (depth0 != null ? depth0.shareType : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareType","hash":{},"data":data}) : helper)))
- + "\">\n <div class=\"avatar\" data-username=\""
- + alias5(((helper = (helper = helpers.shareInitiator || (depth0 != null ? depth0.shareInitiator : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareInitiator","hash":{},"data":data}) : helper)))
- + "\"></div>\n <span class=\"has-tooltip username\" title=\""
- + alias5(((helper = (helper = helpers.shareInitiator || (depth0 != null ? depth0.shareInitiator : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareInitiator","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.shareInitiatorText || (depth0 != null ? depth0.shareInitiatorText : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareInitiatorText","hash":{},"data":data}) : helper)))
- + "</span>\n <span class=\"sharingOptionsGroup\">\n <a href=\"#\" class=\"unshare\"><span class=\"icon-loading-small hidden\"></span><span class=\"icon icon-delete\"></span><span class=\"hidden-visually\">"
- + alias5(((helper = (helper = helpers.unshareLabel || (depth0 != null ? depth0.unshareLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"unshareLabel","hash":{},"data":data}) : helper)))
- + "</span></a>\n </span>\n </li>\n";
-},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
- var stack1, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {});
-
- return "<ul id=\"shareWithList\" class=\"shareWithList\">\n"
- + ((stack1 = helpers.each.call(alias2,(depth0 != null ? depth0.sharees : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + ((stack1 = helpers.each.call(alias2,(depth0 != null ? depth0.linkReshares : depth0),{"name":"each","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "</ul>\n";
-},"useData":true});
-templates['sharedialogshareelistview_popover_menu'] = template({"1":function(container,depth0,helpers,partials,data) {
- var stack1, alias1=container.propertyIsEnumerable;
-
- return " "
- + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.sharePermissionPossible : depth0),{"name":"if","hash":{},"fn":container.program(2, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " ";
-},"2":function(container,depth0,helpers,partials,data) {
- var stack1, alias1=container.propertyIsEnumerable;
-
- return " "
- + ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isMailShare : depth0),{"name":"unless","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " ";
-},"3":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return "\n <li>\n <span class=\"menuitem\">\n <input id=\"canShare-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" type=\"checkbox\" name=\"share\" class=\"permissions checkbox\" "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.hasSharePermission : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " data-permissions=\""
- + alias5(((helper = (helper = helpers.sharePermission || (depth0 != null ? depth0.sharePermission : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"sharePermission","hash":{},"data":data}) : helper)))
- + "\" />\n <label for=\"canShare-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.canShareLabel || (depth0 != null ? depth0.canShareLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"canShareLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n ";
-},"4":function(container,depth0,helpers,partials,data) {
- return "checked=\"checked\"";
-},"6":function(container,depth0,helpers,partials,data) {
- var stack1, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {});
-
- return " "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.createPermissionPossible : depth0),{"name":"if","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\n "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.updatePermissionPossible : depth0),{"name":"if","hash":{},"fn":container.program(10, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\n "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.deletePermissionPossible : depth0),{"name":"if","hash":{},"fn":container.program(13, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\n";
-},"7":function(container,depth0,helpers,partials,data) {
- var stack1, alias1=container.propertyIsEnumerable;
-
- return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isMailShare : depth0),{"name":"unless","hash":{},"fn":container.program(8, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
-},"8":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return "\n <li>\n <span class=\"menuitem\">\n <input id=\"canCreate-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" type=\"checkbox\" name=\"create\" class=\"permissions checkbox\" "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.hasCreatePermission : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " data-permissions=\""
- + alias5(((helper = (helper = helpers.createPermission || (depth0 != null ? depth0.createPermission : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"createPermission","hash":{},"data":data}) : helper)))
- + "\"/>\n <label for=\"canCreate-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.createPermissionLabel || (depth0 != null ? depth0.createPermissionLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"createPermissionLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n ";
-},"10":function(container,depth0,helpers,partials,data) {
- var stack1, alias1=container.propertyIsEnumerable;
-
- return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isMailShare : depth0),{"name":"unless","hash":{},"fn":container.program(11, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
-},"11":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return "\n <li>\n <span class=\"menuitem\">\n <input id=\"canUpdate-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" type=\"checkbox\" name=\"update\" class=\"permissions checkbox\" "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.hasUpdatePermission : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " data-permissions=\""
- + alias5(((helper = (helper = helpers.updatePermission || (depth0 != null ? depth0.updatePermission : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"updatePermission","hash":{},"data":data}) : helper)))
- + "\"/>\n <label for=\"canUpdate-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.updatePermissionLabel || (depth0 != null ? depth0.updatePermissionLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"updatePermissionLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n ";
-},"13":function(container,depth0,helpers,partials,data) {
- var stack1, alias1=container.propertyIsEnumerable;
-
- return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isMailShare : depth0),{"name":"unless","hash":{},"fn":container.program(14, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
-},"14":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return "\n <li>\n <span class=\"menuitem\">\n <input id=\"canDelete-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" type=\"checkbox\" name=\"delete\" class=\"permissions checkbox\" "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.hasDeletePermission : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " data-permissions=\""
- + alias5(((helper = (helper = helpers.deletePermission || (depth0 != null ? depth0.deletePermission : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"deletePermission","hash":{},"data":data}) : helper)))
- + "\"/>\n <label for=\"canDelete-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.deletePermissionLabel || (depth0 != null ? depth0.deletePermissionLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"deletePermissionLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n ";
-},"16":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.hasCreatePermission : depth0),{"name":"if","hash":{},"fn":container.program(17, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " <li>\n <span class=\"menuitem\">\n <input id=\"password-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" type=\"checkbox\" name=\"password\" class=\"password checkbox\" "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.isPasswordSet : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.isPasswordSet : depth0),{"name":"if","hash":{},"fn":container.program(19, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\" />\n <label for=\"password-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.passwordLabel || (depth0 != null ? depth0.passwordLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"passwordLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n <li class=\"passwordMenu-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + " "
- + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.isPasswordSet : depth0),{"name":"unless","hash":{},"fn":container.program(22, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\">\n <span class=\"passwordContainer-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + " icon-passwordmail menuitem\">\n <label for=\"passwordField-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" class=\"hidden-visually\" value=\""
- + alias5(((helper = (helper = helpers.password || (depth0 != null ? depth0.password : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"password","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.passwordLabel || (depth0 != null ? depth0.passwordLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"passwordLabel","hash":{},"data":data}) : helper)))
- + "</label>\n <input id=\"passwordField-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" class=\"passwordField\" type=\"password\" placeholder=\""
- + alias5(((helper = (helper = helpers.passwordPlaceholder || (depth0 != null ? depth0.passwordPlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"passwordPlaceholder","hash":{},"data":data}) : helper)))
- + "\" value=\""
- + alias5(((helper = (helper = helpers.passwordValue || (depth0 != null ? depth0.passwordValue : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"passwordValue","hash":{},"data":data}) : helper)))
- + "\" autocomplete=\"new-password\" />\n <span class=\"icon-loading-small hidden\"></span>\n </span>\n </li>\n"
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.isTalkEnabled : depth0),{"name":"if","hash":{},"fn":container.program(24, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
-},"17":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return " <li>\n <span class=\"menuitem\">\n <input id=\"secureDrop-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" type=\"checkbox\" name=\"secureDrop\" class=\"checkbox secureDrop\" "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.secureDropMode : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " data-permissions=\""
- + alias5(((helper = (helper = helpers.readPermission || (depth0 != null ? depth0.readPermission : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"readPermission","hash":{},"data":data}) : helper)))
- + "\"/>\n <label for=\"secureDrop-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.secureDropLabel || (depth0 != null ? depth0.secureDropLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"secureDropLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n";
-},"19":function(container,depth0,helpers,partials,data) {
- var stack1, alias1=container.propertyIsEnumerable;
-
- return ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isPasswordForMailSharesRequired : depth0),{"name":"if","hash":{},"fn":container.program(20, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "");
-},"20":function(container,depth0,helpers,partials,data) {
- return "disabled=\"\"";
-},"22":function(container,depth0,helpers,partials,data) {
- return "hidden";
-},"24":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return " <li>\n <span class=\"menuitem\">\n <input id=\"passwordByTalk-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" type=\"checkbox\" name=\"passwordByTalk\" class=\"passwordByTalk checkbox\" "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.isPasswordByTalkSet : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " />\n <label for=\"passwordByTalk-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.passwordByTalkLabel || (depth0 != null ? depth0.passwordByTalkLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"passwordByTalkLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n <li class=\"passwordByTalkMenu-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + " "
- + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.isPasswordByTalkSet : depth0),{"name":"unless","hash":{},"fn":container.program(22, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\">\n <span class=\"passwordByTalkContainer-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + " icon-passwordtalk menuitem\">\n <label for=\"passwordByTalkField-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" class=\"hidden-visually\" value=\""
- + alias5(((helper = (helper = helpers.password || (depth0 != null ? depth0.password : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"password","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.passwordByTalkLabel || (depth0 != null ? depth0.passwordByTalkLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"passwordByTalkLabel","hash":{},"data":data}) : helper)))
- + "</label>\n <input id=\"passwordByTalkField-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" class=\"passwordField\" type=\"password\" placeholder=\""
- + alias5(((helper = (helper = helpers.passwordByTalkPlaceholder || (depth0 != null ? depth0.passwordByTalkPlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"passwordByTalkPlaceholder","hash":{},"data":data}) : helper)))
- + "\" value=\""
- + alias5(((helper = (helper = helpers.passwordValue || (depth0 != null ? depth0.passwordValue : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"passwordValue","hash":{},"data":data}) : helper)))
- + "\" autocomplete=\"new-password\" />\n <span class=\"icon-loading-small hidden\"></span>\n </span>\n </li>\n";
-},"26":function(container,depth0,helpers,partials,data) {
- var helper, alias1=container.propertyIsEnumerable;
-
- return container.escapeExpression(((helper = (helper = helpers.expireDate || (depth0 != null ? depth0.expireDate : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"expireDate","hash":{},"data":data}) : helper)));
-},"28":function(container,depth0,helpers,partials,data) {
- var helper, alias1=container.propertyIsEnumerable;
-
- return container.escapeExpression(((helper = (helper = helpers.defaultExpireDate || (depth0 != null ? depth0.defaultExpireDate : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"defaultExpireDate","hash":{},"data":data}) : helper)));
-},"30":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return " <li>\n <a href=\"#\" class=\"share-add\">\n <span class=\"icon-loading-small hidden\"></span>\n <span class=\"icon icon-edit\"></span>\n <span>"
- + alias5(((helper = (helper = helpers.addNoteLabel || (depth0 != null ? depth0.addNoteLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"addNoteLabel","hash":{},"data":data}) : helper)))
- + "</span>\n <input type=\"button\" class=\"share-note-delete icon-delete "
- + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.hasNote : depth0),{"name":"unless","hash":{},"fn":container.program(22, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\">\n </a>\n </li>\n <li class=\"share-note-form "
- + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.hasNote : depth0),{"name":"unless","hash":{},"fn":container.program(22, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\">\n <span class=\"menuitem icon-note\">\n <textarea class=\"share-note\">"
- + alias5(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareNote","hash":{},"data":data}) : helper)))
- + "</textarea>\n <input type=\"submit\" class=\"icon-confirm share-note-submit\" value=\"\" id=\"add-note-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" />\n </span>\n </li>\n";
-},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
- var stack1, helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return "<div class=\"popovermenu bubble hidden menu\">\n <ul>\n "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.isResharingAllowed : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\n"
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.isFolder : depth0),{"name":"if","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.isMailShare : depth0),{"name":"if","hash":{},"fn":container.program(16, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " <li>\n <span class=\"menuitem\">\n <input id=\"expireDate-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" type=\"checkbox\" name=\"expirationDate\" class=\"expireDate checkbox\" "
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.hasExpireDate : depth0),{"name":"if","hash":{},"fn":container.program(4, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\" />\n <label for=\"expireDate-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.expireDateLabel || (depth0 != null ? depth0.expireDateLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"expireDateLabel","hash":{},"data":data}) : helper)))
- + "</label>\n </span>\n </li>\n <li class=\"expirationDateMenu-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + " "
- + ((stack1 = helpers.unless.call(alias2,(depth0 != null ? depth0.hasExpireDate : depth0),{"name":"unless","hash":{},"fn":container.program(22, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "\">\n <span class=\"expirationDateContainer-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + " icon-expiredate menuitem\">\n <label for=\"expirationDatePicker-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" class=\"hidden-visually\" value=\""
- + alias5(((helper = (helper = helpers.expirationDate || (depth0 != null ? depth0.expirationDate : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"expirationDate","hash":{},"data":data}) : helper)))
- + "\">"
- + alias5(((helper = (helper = helpers.expirationLabel || (depth0 != null ? depth0.expirationLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"expirationLabel","hash":{},"data":data}) : helper)))
- + "</label>\n <input id=\"expirationDatePicker-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "-"
- + alias5(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareId","hash":{},"data":data}) : helper)))
- + "\" class=\"datepicker\" type=\"text\" placeholder=\""
- + alias5(((helper = (helper = helpers.expirationDatePlaceholder || (depth0 != null ? depth0.expirationDatePlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"expirationDatePlaceholder","hash":{},"data":data}) : helper)))
- + "\" value=\""
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.hasExpireDate : depth0),{"name":"if","hash":{},"fn":container.program(26, data, 0),"inverse":container.program(28, data, 0),"data":data})) != null ? stack1 : "")
- + "\" />\n </span>\n </li>\n"
- + ((stack1 = helpers["if"].call(alias2,(depth0 != null ? depth0.isNoteAvailable : depth0),{"name":"if","hash":{},"fn":container.program(30, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + " <li>\n <a href=\"#\" class=\"unshare\"><span class=\"icon-loading-small hidden\"></span><span class=\"icon icon-delete\"></span><span>"
- + alias5(((helper = (helper = helpers.unshareLabel || (depth0 != null ? depth0.unshareLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"unshareLabel","hash":{},"data":data}) : helper)))
- + "</span></a>\n </li>\n </ul>\n</div>\n";
-},"useData":true});
-templates['sharedialogview'] = template({"1":function(container,depth0,helpers,partials,data) {
- var helper, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {}), alias3=container.hooks.helperMissing, alias4="function", alias5=container.escapeExpression;
-
- return " <label for=\"shareWith-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\" class=\"hidden-visually\">"
- + alias5(((helper = (helper = helpers.shareLabel || (depth0 != null ? depth0.shareLabel : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"shareLabel","hash":{},"data":data}) : helper)))
- + "</label>\n <div class=\"oneline\">\n <input id=\"shareWith-"
- + alias5(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"cid","hash":{},"data":data}) : helper)))
- + "\" class=\"shareWithField\" type=\"text\" placeholder=\""
- + alias5(((helper = (helper = helpers.sharePlaceholder || (depth0 != null ? depth0.sharePlaceholder : depth0)) != null ? helper : alias3),(typeof helper === alias4 ? helper.call(alias2,{"name":"sharePlaceholder","hash":{},"data":data}) : helper)))
- + "\" />\n <span class=\"shareWithLoading icon-loading-small hidden\"></span>\n <span class=\"shareWithConfirm icon icon-confirm\"></span>\n </div>\n";
-},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
- var stack1, alias1=container.propertyIsEnumerable;
-
- return "<div class=\"resharerInfoView subView\"></div>\n"
- + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isSharingAllowed : depth0),{"name":"if","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "")
- + "<div class=\"linkShareView subView\"></div>\n<div class=\"shareeListView subView\"></div>\n<div class=\"loading hidden\" style=\"height: 50px\"></div>\n";
-},"useData":true});
-})(); \ No newline at end of file
diff --git a/core/webpack.js b/core/webpack.js
index b421e12a567..9404c354ebb 100644
--- a/core/webpack.js
+++ b/core/webpack.js
@@ -31,7 +31,6 @@ module.exports = [
},
{
entry: {
- share_backend: path.resolve(__dirname, 'js/merged-share-backend.js'),
systemtags: path.resolve(__dirname, 'js/systemtags/merged-systemtags.js')
},
output: {