]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fallback to directory icon based on the mount type 17155/head
authorJulius Härtl <jus@bitgrid.net>
Tue, 3 Sep 2019 08:07:27 +0000 (10:07 +0200)
committernpmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Tue, 17 Sep 2019 14:39:25 +0000 (14:39 +0000)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
apps/files/js/mainfileinfodetailview.js
core/js/dist/share_backend.js
core/js/dist/share_backend.js.map
core/js/share.js

index 4a2067e09e5ea83ea2bb8c48cf7c1af570d0efcf..f73b6a5556813b60ec2754c7ae21059fe1617818 100644 (file)
                                        this._previewManager.loadPreview(this.model, $iconDiv, $container);
                                } else {
                                        var iconUrl = this.model.get('icon') || OC.MimeType.getIconUrl('dir');
+                                       if (typeof this.model.get('mountType') !== 'undefined') {
+                                               iconUrl = OC.MimeType.getIconUrl('dir-' + this.model.get('mountType'))
+                                       }
                                        $iconDiv.css('background-image', 'url("' + iconUrl + '")');
                                }
                                this.$el.find('[title]').tooltip({placement: 'bottom'});
index 284d853a85b1e2687ff921475ba19db46f102a0c..6daa88be0f0a99869b24d3eba19c233f79f92c86 100644 (file)
@@ -20,5 +20,5 @@
  * 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){var e=a.$el.find("li[data-share-id]"),t=a.$el.find('li[data-share-id="'+h+'"]');if(t&&1===e.length){var s=t.find(".popovermenu");OC.showMenu(null,s)}}},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_capabilities.password_policy&&oc_capabilities.password_policy.minLength&&(p=oc_capabilities.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 w=this.getPopoverObject(v[S]);v[S].popoverMenu=this.popoverMenuTemplate(_.extend({},m,w,{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_current_user){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_current_user,canUpdateShareSettings:o===oc_current_user||h===oc_current_user,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,w=s.ocs.data.lookup,b=s.ocs.data.lookupEnabled,P=[];void 0!==s.ocs.data.emails&&(P=s.ocs.data.emails);var _=[];void 0!==s.ocs.data.circles&&(_=s.ocs.data.circles);var E=[];void 0!==s.ocs.data.rooms&&(E=s.ocs.data.rooms);for(var k=f.concat(g).concat(v).concat(S).concat(C).concat(P).concat(_).concat(E).concat(w).sort((R="uuid",function(e,a){var t="",n="";return void 0!==e[R]&&(t=e[R]),void 0!==a[R]&&(n=a[R]),t<n?-1:t>n?1:0})),O=null,x=k.length,y=(s=[],0);y<x;y++)void 0!==k[y].uuid&&k[y].uuid===O&&(k[y].merged=!0),e!==k[y].name&&void 0!==k[y].merged||s.push(k[y]),O=k[y].uuid;var T=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,P.length+u.length,_.length+p.length,E.length+m.length,w.length);!l._lookup&&b&&s.push({label:t("core","Search globally"),value:{},lookup:!0}),i.resolve(s,f,T,b)}else i.reject(s.ocs.meta.message);var R}).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 w=c.concat(u).concat(p).concat(m).concat(f).concat(v).concat(S).concat(C).concat(g).sort((E="uuid",function(e,a){var t="",n="";return void 0!==e[E]&&(t=e[E]),void 0!==a[E]&&(n=a[E]),t<n?-1:t>n?1:0})),b=null,P=w.length,_=(t=[],0);_<P;_++)void 0!==w[_].uuid&&w[_].uuid===b&&(w[_].merged=!0),void 0===w[_].merged&&t.push(w[_]),b=w[_].uuid;a.resolve(t,c,!1)}else a.reject(t.ocs.meta.message);var E}).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){if(OC.Share.itemShares[e])if(e==OC.Share.SHARE_TYPE_LINK){if(1==OC.Share.itemShares[e])return t=!0,s="icon-public",void(n=!0)}else 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="icon-shared";if(o.removeClass("shared-style"),"dir"===d&&(a||n||c))r=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){var m=e.attr("data-e2eencrypted"),f=e.attr("data-mounttype");"true"===m?(r=OC.MimeType.getIconUrl("dir-encrypted"),e.attr("data-icon",r)):f&&0===f.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&&(p="icon-public"),h.removeClass("icon-shared icon-public").addClass(p)},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()})})}]);
+!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){var e=a.$el.find("li[data-share-id]"),t=a.$el.find('li[data-share-id="'+h+'"]');if(t&&1===e.length){var s=t.find(".popovermenu");OC.showMenu(null,s)}}},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_capabilities.password_policy&&oc_capabilities.password_policy.minLength&&(p=oc_capabilities.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 w=this.getPopoverObject(v[S]);v[S].popoverMenu=this.popoverMenuTemplate(_.extend({},m,w,{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_current_user){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_current_user,canUpdateShareSettings:o===oc_current_user||h===oc_current_user,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,w=s.ocs.data.lookup,b=s.ocs.data.lookupEnabled,P=[];void 0!==s.ocs.data.emails&&(P=s.ocs.data.emails);var _=[];void 0!==s.ocs.data.circles&&(_=s.ocs.data.circles);var E=[];void 0!==s.ocs.data.rooms&&(E=s.ocs.data.rooms);for(var k=f.concat(g).concat(v).concat(S).concat(C).concat(P).concat(_).concat(E).concat(w).sort((R="uuid",function(e,a){var t="",n="";return void 0!==e[R]&&(t=e[R]),void 0!==a[R]&&(n=a[R]),t<n?-1:t>n?1:0})),O=null,x=k.length,y=(s=[],0);y<x;y++)void 0!==k[y].uuid&&k[y].uuid===O&&(k[y].merged=!0),e!==k[y].name&&void 0!==k[y].merged||s.push(k[y]),O=k[y].uuid;var T=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,P.length+u.length,_.length+p.length,E.length+m.length,w.length);!l._lookup&&b&&s.push({label:t("core","Search globally"),value:{},lookup:!0}),i.resolve(s,f,T,b)}else i.reject(s.ocs.meta.message);var R}).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 w=c.concat(u).concat(p).concat(m).concat(f).concat(v).concat(S).concat(C).concat(g).sort((E="uuid",function(e,a){var t="",n="";return void 0!==e[E]&&(t=e[E]),void 0!==a[E]&&(n=a[E]),t<n?-1:t>n?1:0})),b=null,P=w.length,_=(t=[],0);_<P;_++)void 0!==w[_].uuid&&w[_].uuid===b&&(w[_].merged=!0),void 0===w[_].merged&&t.push(w[_]),b=w[_].uuid;a.resolve(t,c,!1)}else a.reject(t.ocs.meta.message);var E}).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){if(OC.Share.itemShares[e])if(e==OC.Share.SHARE_TYPE_LINK){if(1==OC.Share.itemShares[e])return t=!0,s="icon-public",void(n=!0)}else 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
index ca1c08f93930e96ae16535b83d3be7b27576151b..262dd91cfca035bf3c40fba2ea98414d513960ec 100644 (file)
@@ -1 +1 @@
-{"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","__webpack_exports__","OC","Share","Types","ShareConfigModel","Backbone","Model","extend","defaults","publicUploadEnabled","enforcePasswordForPublicLink","oc_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","1","container","depth0","helpers","partials","stack1","alias1","nullContext","nolinkShares","hash","fn","program","inverse","noop","each","linkShares","2","helper","alias2","helperMissing","alias4","escapeExpression","_typeof","newShareId","newShareLabel","showPending","newShareTitle","unless","3","5","pendingPopoverMenu","7","alias3","cid","linkShareCreationDate","linkShareLabel","shareLinkURL","copyLabel","8","popoverMenu","10","noSharingPlaceholder","11","compiler","main","shareAllowed","useData","publicUploadRValue","publicUploadRChecked","publicUploadRLabel","publicUploadRWValue","publicUploadRWChecked","publicUploadRWLabel","publicUploadWValue","publicUploadWChecked","publicUploadWLabel","publicEditingChecked","publicEditingLabel","9","isPasswordByTalkSet","passwordByTalkLabel","13","15","expireDate","17","19","21","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","4","6","createPermissionPossible","updatePermissionPossible","deletePermissionPossible","hasCreatePermission","createPermission","createPermissionLabel","hasUpdatePermission","updatePermission","updatePermissionLabel","14","hasDeletePermission","deletePermission","deletePermissionLabel","16","passwordLabel","password","passwordValue","isTalkEnabled","secureDropMode","readPermission","secureDropLabel","20","22","24","passwordByTalkPlaceholder","26","28","30","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","click .share-menu .icon-more","change .hideDownloadCheckbox","click input.share-pass-submit","keyup input.linkPassText","change .showPasswordCheckbox","change .passwordByTalkCheckbox","change .publicEditingCheckbox","click .linkText","click .pop-up","change .publicUploadRadio","click .expireDate","change .datepicker","click .datepicker","click .share-add","click .share-note-delete","click .share-note-submit","click .unshare","click .new-share","submit .enforcedPassForm","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","$newShare","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","oc_capabilities","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","oc_appswebroots","shareTime","isNumber","stripTime","getTime","onUnshare","eq","remove","ShareDialogShareeListView","_menuOpen","_renderPermissionChange","click .permissions","click .password","click .passwordByTalk","click .secureDrop","keyup input.passwordField","focusout input.passwordField","sharedBy","sharedByDisplayName","fileOwnerUid","SHARE_TYPE_REMOTE","SHARE_TYPE_REMOTE_GROUP","SHARE_TYPE_EMAIL","oc_current_user","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","focus .shareWithField","input .shareWithField","click .shareWithConfirm","_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","oc_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","MimeType","getIconUrl","isEncrypted","mountType","indexOf","removeAttr","showDropDown","filename","itemModel","dialogView","data-item-source-name","data-item-type","data-item-source","$dialog","slideDown","hideDropDown","slideUp","FileActions","document","ready","monthNames","monthNamesShort","dayNames","dayNamesMin","dayNamesShort","firstDay","click","isMatched","has"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA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ne,EAAEoe,WAAWC,YAAY,CACxBmT,WAAYA,WACZC,gBAAiBA,gBACjBC,SAAUA,SACVC,YAAaA,YACbC,cAAeA,cACfC,SAAUA,SACV7T,QAAUA,IAIZhe,EAAEQ,MAAMsxB,MAAM,SAASvX,GACtB,IAAIE,EAASza,EAAEua,EAAME,QACjBsX,GAAatX,EAAOmB,GAAG,+DACtBnB,EAAOX,QAAQ,sBAAsB/N,SAAW0O,EAAOX,QAAQ,oBAAoB/N,OACpF7N,GAAGC,OAASD,GAAGC,MAAMivB,aAAe2E,GAAyD,IAA5C/xB,EAAE,aAAagyB,IAAIzX,EAAME,QAAQ1O,QACrF7N,GAAGC,MAAMgzB","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","/*\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_appconfig, oc_config */\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\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=depth0 != null ? depth0 : (container.nullContext || {});\n\n  return \"<ul class=\\\"shareWithList\\\">\\n\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"\t\t<li data-share-id=\\\"\"\n    + alias4(((helper = (helper = helpers.newShareId || (depth0 != null ? depth0.newShareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.newShareLabel || (depth0 != null ? depth0.newShareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(depth0 != null ? depth0.showPending : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n    + \"\\\" title=\\\"\"\n    + alias4(((helper = (helper = helpers.newShareTitle || (depth0 != null ? depth0.newShareTitle : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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(alias1,(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;\n\n  return \"\t\t\t\t\t\t\"\n    + ((stack1 = ((helper = (helper = helpers.pendingPopoverMenu || (depth0 != null ? depth0.pendingPopoverMenu : depth0)) != null ? helper : helpers.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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"\t\t<li data-share-id=\\\"\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.linkShareCreationDate || (depth0 != null ? depth0.linkShareCreationDate : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"linkShareCreationDate\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.linkShareLabel || (depth0 != null ? depth0.linkShareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.shareLinkURL || (depth0 != null ? depth0.shareLinkURL : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareLinkURL\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" title=\\\"\"\n    + alias4(((helper = (helper = helpers.copyLabel || (depth0 != null ? depth0.copyLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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(alias1,(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(alias1,(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;\n\n  return \"\t\t\t\t\t\t\"\n    + ((stack1 = ((helper = (helper = helpers.popoverMenu || (depth0 != null ? depth0.popoverMenu : depth0)) != null ? helper : helpers.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;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"<input id=\\\"shareWith-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"shareWithField\\\" type=\\\"text\\\" placeholder=\\\"\"\n    + alias4(((helper = (helper = helpers.noSharingPlaceholder || (depth0 != null ? depth0.noSharingPlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"noSharingPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" disabled=\\\"disabled\\\" />\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n    var stack1;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.publicUploadRValue || (depth0 != null ? depth0.publicUploadRValue : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadRValue\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" id=\\\"sharingDialogAllowPublicUpload-r-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"radio publicUploadRadio\\\" \"\n    + ((stack1 = ((helper = (helper = helpers.publicUploadRChecked || (depth0 != null ? depth0.publicUploadRChecked : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadRChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n    + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicUpload-r-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.publicUploadRLabel || (depth0 != null ? depth0.publicUploadRLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.publicUploadRWValue || (depth0 != null ? depth0.publicUploadRWValue : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadRWValue\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" id=\\\"sharingDialogAllowPublicUpload-rw-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"radio publicUploadRadio\\\" \"\n    + ((stack1 = ((helper = (helper = helpers.publicUploadRWChecked || (depth0 != null ? depth0.publicUploadRWChecked : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadRWChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n    + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicUpload-rw-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.publicUploadRWLabel || (depth0 != null ? depth0.publicUploadRWLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.publicUploadWValue || (depth0 != null ? depth0.publicUploadWValue : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadWValue\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" id=\\\"sharingDialogAllowPublicUpload-w-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"radio publicUploadRadio\\\" \"\n    + ((stack1 = ((helper = (helper = helpers.publicUploadWChecked || (depth0 != null ? depth0.publicUploadWChecked : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadWChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n    + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicUpload-w-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.publicUploadWLabel || (depth0 != null ? depth0.publicUploadWLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"checkbox publicEditingCheckbox\\\" \"\n    + ((stack1 = ((helper = (helper = helpers.publicEditingChecked || (depth0 != null ? depth0.publicEditingChecked : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicEditingChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n    + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicEditing-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.publicEditingLabel || (depth0 != null ? depth0.publicEditingLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"checkbox passwordByTalkCheckbox\\\"\\n\t\t\t\t\t\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.passwordByTalkLabel || (depth0 != null ? depth0.passwordByTalkLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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;\n\n  return container.escapeExpression(((helper = (helper = helpers.expireDate || (depth0 != null ? depth0.expireDate : depth0)) != null ? helper : helpers.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;\n\n  return container.escapeExpression(((helper = (helper = helpers.defaultExpireDate || (depth0 != null ? depth0.defaultExpireDate : depth0)) != null ? helper : helpers.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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"\t\t\t<li>\\n\t\t\t\t<a href=\\\"#\\\" class=\\\"menuitem pop-up\\\" data-url=\\\"\"\n    + alias4(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"url\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" data-window=\\\"\"\n    + alias4(((helper = (helper = helpers.newWindow || (depth0 != null ? depth0.newWindow : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"newWindow\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\\n\t\t\t\t\t<span class=\\\"icon \"\n    + alias4(((helper = (helper = helpers.iconClass || (depth0 != null ? depth0.iconClass : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"iconClass\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"></span>\\n\t\t\t\t\t<span>\"\n    + alias4(((helper = (helper = helpers.label || (depth0 != null ? depth0.label : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"label\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</span>\\n\t\t\t\t</a>\\n\t\t\t</li>\\n\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"linkText\\\" type=\\\"text\\\" readonly=\\\"readonly\\\" value=\\\"\"\n    + alias4(((helper = (helper = helpers.shareLinkURL || (depth0 != null ? depth0.shareLinkURL : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareLinkURL\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" />\\n\t\t\t</span>\\n\t\t</li>\\n\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"checkbox hideDownloadCheckbox\\\"\\n\t\t\t\t\t\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.hideDownloadLabel || (depth0 != null ? depth0.hideDownloadLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"checkbox showPasswordCheckbox\\\"\\n\t\t\t\t\t\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.enablePasswordLabel || (depth0 != null ? depth0.enablePasswordLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"linkPassText\\\" type=\\\"password\\\" placeholder=\\\"\"\n    + alias4(((helper = (helper = helpers.passwordPlaceholder || (depth0 != null ? depth0.passwordPlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"expirationDate\\\" class=\\\"expireDate checkbox\\\"\\n\t\t\t\t\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.expireDateLabel || (depth0 != null ? depth0.expireDateLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\\n\t\t\t\t<label for=\\\"expirationDatePicker-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n    + alias4(((helper = (helper = helpers.expirationDate || (depth0 != null ? depth0.expirationDate : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationDate\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.expirationLabel || (depth0 != null ? depth0.expirationLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"\"\n    + ((stack1 = helpers.unless.call(alias1,(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    + alias4(((helper = (helper = helpers.expirationDatePlaceholder || (depth0 != null ? depth0.expirationDatePlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationDatePlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" value=\\\"\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.maxDate || (depth0 != null ? depth0.maxDate : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"maxDate\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.addNoteLabel || (depth0 != null ? depth0.addNoteLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" />\\n\t\t\t</span>\\n\t\t</li>\\n\"\n    + ((stack1 = helpers.each.call(alias1,(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    + alias4(((helper = (helper = helpers.unshareLinkLabel || (depth0 != null ? depth0.unshareLinkLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.newShareLabel || (depth0 != null ? depth0.newShareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.enforcedPasswordLabel || (depth0 != null ? depth0.enforcedPasswordLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.passwordPlaceholder || (depth0 != null ? depth0.passwordPlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" autocomplete=\\\"enforcedPassText\\\" minlength=\\\"\"\n    + alias4(((helper = (helper = helpers.minPasswordLength || (depth0 != null ? depth0.minPasswordLength : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n    var stack1;\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;\n\n  return \"<div class=\\\"share-note\\\">\"\n    + container.escapeExpression(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"shareNote\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</div>\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"<span class=\\\"reshare\\\">\\n\t<div class=\\\"avatar\\\" data-userName=\\\"\"\n    + alias4(((helper = (helper = helpers.reshareOwner || (depth0 != null ? depth0.reshareOwner : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"reshareOwner\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"></div>\\n\t\"\n    + alias4(((helper = (helper = helpers.sharedByText || (depth0 != null ? depth0.sharedByText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"sharedByText\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\n</span>\\n\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"\t\t<li data-share-id=\\\"\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" data-share-type=\\\"\"\n    + alias4(((helper = (helper = helpers.shareType || (depth0 != null ? depth0.shareType : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareType\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" data-share-with=\\\"\"\n    + alias4(((helper = (helper = helpers.shareWith || (depth0 != null ? depth0.shareWith : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWith\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\\n\t\t\t<div class=\\\"avatar \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.shareWith || (depth0 != null ? depth0.shareWith : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWith\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" data-avatar=\\\"\"\n    + alias4(((helper = (helper = helpers.shareWithAvatar || (depth0 != null ? depth0.shareWithAvatar : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWithAvatar\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" data-displayname=\\\"\"\n    + alias4(((helper = (helper = helpers.shareWithDisplayName || (depth0 != null ? depth0.shareWithDisplayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWithDisplayName\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.shareWithTitle || (depth0 != null ? depth0.shareWithTitle : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWithTitle\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.shareWithDisplayName || (depth0 != null ? depth0.shareWithDisplayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWithDisplayName\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</span>\\n\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"data-seed=\\\"\"\n    + alias4(((helper = (helper = helpers.shareWith || (depth0 != null ? depth0.shareWith : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWith\",\"hash\":{},\"data\":data}) : helper)))\n    + \" \"\n    + alias4(((helper = (helper = helpers.shareType || (depth0 != null ? depth0.shareType : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareType\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {});\n\n  return \"\t\t\t<span class=\\\"sharingOptionsGroup\\\">\\n\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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 : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"\t\t\t\t\t<span>\\n\t\t\t\t\t\t<input id=\\\"canEdit-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.canEditLabel || (depth0 != null ? depth0.canEditLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"\t\t<li data-share-id=\\\"\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" data-share-type=\\\"\"\n    + alias4(((helper = (helper = helpers.shareType || (depth0 != null ? depth0.shareType : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareType\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\\n\t\t\t<div class=\\\"avatar\\\" data-username=\\\"\"\n    + alias4(((helper = (helper = helpers.shareInitiator || (depth0 != null ? depth0.shareInitiator : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareInitiator\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"></div>\\n\t\t\t<span class=\\\"has-tooltip username\\\" title=\\\"\"\n    + alias4(((helper = (helper = helpers.shareInitiator || (depth0 != null ? depth0.shareInitiator : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareInitiator\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.shareInitiatorText || (depth0 != null ? depth0.shareInitiatorText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.unshareLabel || (depth0 != null ? depth0.unshareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"unshareLabel\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</span></a>\\n\t\t\t</span>\\n\t\t</li>\\n\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n    var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {});\n\n  return \"<ul id=\\\"shareWithList\\\" class=\\\"shareWithList\\\">\\n\"\n    + ((stack1 = helpers.each.call(alias1,(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(alias1,(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;\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;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"share\\\" class=\\\"permissions checkbox\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.sharePermission || (depth0 != null ? depth0.sharePermission : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"sharePermission\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" />\\n\t\t\t\t\t<label for=\\\"canShare-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.canShareLabel || (depth0 != null ? depth0.canShareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {});\n\n  return \"\t\t\t\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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(alias1,(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;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"create\\\" class=\\\"permissions checkbox\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.createPermission || (depth0 != null ? depth0.createPermission : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"createPermission\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"canCreate-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.createPermissionLabel || (depth0 != null ? depth0.createPermissionLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"update\\\" class=\\\"permissions checkbox\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.updatePermission || (depth0 != null ? depth0.updatePermission : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"updatePermission\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"canUpdate-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.updatePermissionLabel || (depth0 != null ? depth0.updatePermissionLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"delete\\\" class=\\\"permissions checkbox\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.deletePermission || (depth0 != null ? depth0.deletePermission : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"deletePermission\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"canDelete-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.deletePermissionLabel || (depth0 != null ? depth0.deletePermissionLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"password\\\" class=\\\"password checkbox\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.passwordLabel || (depth0 != null ? depth0.passwordLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \" \"\n    + ((stack1 = helpers.unless.call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \" icon-passwordmail menuitem\\\">\\n\t\t\t\t\t<label for=\\\"passwordField-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n    + alias4(((helper = (helper = helpers.password || (depth0 != null ? depth0.password : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"password\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.passwordLabel || (depth0 != null ? depth0.passwordLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordLabel\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</label>\\n\t\t\t\t\t<input id=\\\"passwordField-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"passwordField\\\" type=\\\"password\\\" placeholder=\\\"\"\n    + alias4(((helper = (helper = helpers.passwordPlaceholder || (depth0 != null ? depth0.passwordPlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" value=\\\"\"\n    + alias4(((helper = (helper = helpers.passwordValue || (depth0 != null ? depth0.passwordValue : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"secureDrop\\\" class=\\\"checkbox secureDrop\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.readPermission || (depth0 != null ? depth0.readPermission : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"readPermission\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"secureDrop-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.secureDropLabel || (depth0 != null ? depth0.secureDropLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"passwordByTalk\\\" class=\\\"passwordByTalk checkbox\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.passwordByTalkLabel || (depth0 != null ? depth0.passwordByTalkLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \" \"\n    + ((stack1 = helpers.unless.call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \" icon-passwordtalk menuitem\\\">\\n\t\t\t\t\t\t<label for=\\\"passwordByTalkField-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n    + alias4(((helper = (helper = helpers.password || (depth0 != null ? depth0.password : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"password\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.passwordByTalkLabel || (depth0 != null ? depth0.passwordByTalkLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordByTalkLabel\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</label>\\n\t\t\t\t\t\t<input id=\\\"passwordByTalkField-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"passwordField\\\" type=\\\"password\\\" placeholder=\\\"\"\n    + alias4(((helper = (helper = helpers.passwordByTalkPlaceholder || (depth0 != null ? depth0.passwordByTalkPlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordByTalkPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" value=\\\"\"\n    + alias4(((helper = (helper = helpers.passwordValue || (depth0 != null ? depth0.passwordValue : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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;\n\n  return container.escapeExpression(((helper = (helper = helpers.expireDate || (depth0 != null ? depth0.expireDate : depth0)) != null ? helper : helpers.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;\n\n  return container.escapeExpression(((helper = (helper = helpers.defaultExpireDate || (depth0 != null ? depth0.defaultExpireDate : depth0)) != null ? helper : helpers.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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.addNoteLabel || (depth0 != null ? depth0.addNoteLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" />\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"<div class=\\\"popovermenu bubble hidden menu\\\">\\n\t<ul>\\n\t\t\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"expirationDate\\\" class=\\\"expireDate checkbox\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.expireDateLabel || (depth0 != null ? depth0.expireDateLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expireDateLabel\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</label>\\n\t\t\t</span>\\n\t\t</li>\\n\t\t<li class=\\\"expirationDateMenu-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \" \"\n    + ((stack1 = helpers.unless.call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \" icon-expiredate menuitem\\\">\\n\t\t\t\t<label for=\\\"expirationDatePicker-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n    + alias4(((helper = (helper = helpers.expirationDate || (depth0 != null ? depth0.expirationDate : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationDate\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.expirationLabel || (depth0 != null ? depth0.expirationLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationLabel\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</label>\\n\t\t\t\t<input id=\\\"expirationDatePicker-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"datepicker\\\" type=\\\"text\\\" placeholder=\\\"\"\n    + alias4(((helper = (helper = helpers.expirationDatePlaceholder || (depth0 != null ? depth0.expirationDatePlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationDatePlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" value=\\\"\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.unshareLabel || (depth0 != null ? depth0.unshareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"\t<label for=\\\"shareWith-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"hidden-visually\\\">\"\n    + alias4(((helper = (helper = helpers.shareLabel || (depth0 != null ? depth0.shareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareLabel\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</label>\\n\t<div class=\\\"oneline\\\">\\n\t\t<input id=\\\"shareWith-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"shareWithField\\\" type=\\\"text\\\" placeholder=\\\"\"\n    + alias4(((helper = (helper = helpers.sharePlaceholder || (depth0 != null ? depth0.sharePlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n    var stack1;\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})();","/*\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 * @return {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 * @return {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 * @return {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\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\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\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 * @return {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 * @return {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) ? true : false;\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) ? true : false;\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\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) ? false : true;\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\tshare.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\tthis.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\ttype + '=' + 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 * @return {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\n\tOC.Share.Social.Collection = new SocialCollection;\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\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{\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\t\t\t\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\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","/*\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\t\t\t\t\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\t// only open the menu by default if this is the first share\n\t\t\t\t\t\t\tif ($newShare && shares.length === 1) {\n\t\t\t\t\t\t\t\tvar $menu = $newShare.find('.popovermenu');\n\t\t\t\t\t\t\t\tOC.showMenu(null, $menu);\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\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\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{\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\tthis.model.isFolder()\n\t\t\t\t&& this.model.createPermissionPossible()\n\t\t\t\t&& this.configModel.isPublicUploadEnabled();\n\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_capabilities.password_policy && oc_capabilities.password_policy.minLength) {\n\t\t\t\tminPasswordLength = oc_capabilities.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\t\tcase OC.PERMISSION_READ:\n\t\t\t\t\tpublicUploadRChecked = 'checked';\n\t\t\t\t\tbreak;\n\t\t\t\tcase OC.PERMISSION_CREATE:\n\t\t\t\t\tpublicUploadWChecked = 'checked';\n\t\t\t\t\tbreak;\n\t\t\t\tcase OC.PERMISSION_UPDATE | OC.PERMISSION_CREATE | OC.PERMISSION_READ | OC.PERMISSION_DELETE:\n\t\t\t\t\tpublicUploadRWChecked = 'checked';\n\t\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\n\t});\n\n\tOC.Share.ShareDialogLinkShareView = ShareDialogLinkShareView;\n\n})();\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}\n\t\t\telse 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_current_user) {\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_current_user),\n\t\t\t\tcanUpdateShareSettings: (sharedBy === oc_current_user || fileOwnerUid === oc_current_user),\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\t\t\t\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\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\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","/*\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\tthis._lastSuggestions.searchTerm === searchTerm &&\n\t\t\t\tthis._lastSuggestions.lookup === lookup &&\n\t\t\t\tthis._lastSuggestions.perPage === perPage &&\n\t\t\t\tthis._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\tthis._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\t\tview = this,\n\t\t\t\t$loading = this.$el.find('.shareWithLoading'),\n\t\t\t\t$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\t\tcase 'HOME':\n\t\t\t\t\t\treturn t('core', 'Home');\n\t\t\t\t\tcase 'WORK':\n\t\t\t\t\t\treturn t('core', 'Work');\n\t\t\t\t\tcase 'OTHER':\n\t\t\t\t\t\treturn t('core', 'Other');\n\t\t\t\t\tdefault:\n\t\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\tnew RegExp(this.term, \"gi\"),\n\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}, error: 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","/* global escapeHTML */\n\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\t\t\t\t\t\treturn;\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 * @return {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 * @return {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 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 (hasLink) {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-public');\n\t\t\t}\n\t\t\telse {\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\tvar mountType = $tr.attr('data-mounttype');\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\n});\n"],"sourceRoot":""}
\ No newline at end of file
+{"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","__webpack_exports__","OC","Share","Types","ShareConfigModel","Backbone","Model","extend","defaults","publicUploadEnabled","enforcePasswordForPublicLink","oc_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","1","container","depth0","helpers","partials","stack1","alias1","nullContext","nolinkShares","hash","fn","program","inverse","noop","each","linkShares","2","helper","alias2","helperMissing","alias4","escapeExpression","_typeof","newShareId","newShareLabel","showPending","newShareTitle","unless","3","5","pendingPopoverMenu","7","alias3","cid","linkShareCreationDate","linkShareLabel","shareLinkURL","copyLabel","8","popoverMenu","10","noSharingPlaceholder","11","compiler","main","shareAllowed","useData","publicUploadRValue","publicUploadRChecked","publicUploadRLabel","publicUploadRWValue","publicUploadRWChecked","publicUploadRWLabel","publicUploadWValue","publicUploadWChecked","publicUploadWLabel","publicEditingChecked","publicEditingLabel","9","isPasswordByTalkSet","passwordByTalkLabel","13","15","expireDate","17","19","21","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","4","6","createPermissionPossible","updatePermissionPossible","deletePermissionPossible","hasCreatePermission","createPermission","createPermissionLabel","hasUpdatePermission","updatePermission","updatePermissionLabel","14","hasDeletePermission","deletePermission","deletePermissionLabel","16","passwordLabel","password","passwordValue","isTalkEnabled","secureDropMode","readPermission","secureDropLabel","20","22","24","passwordByTalkPlaceholder","26","28","30","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","click .share-menu .icon-more","change .hideDownloadCheckbox","click input.share-pass-submit","keyup input.linkPassText","change .showPasswordCheckbox","change .passwordByTalkCheckbox","change .publicEditingCheckbox","click .linkText","click .pop-up","change .publicUploadRadio","click .expireDate","change .datepicker","click .datepicker","click .share-add","click .share-note-delete","click .share-note-submit","click .unshare","click .new-share","submit .enforcedPassForm","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","$newShare","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","oc_capabilities","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","oc_appswebroots","shareTime","isNumber","stripTime","getTime","onUnshare","eq","remove","ShareDialogShareeListView","_menuOpen","_renderPermissionChange","click .permissions","click .password","click .passwordByTalk","click .secureDrop","keyup input.passwordField","focusout input.passwordField","sharedBy","sharedByDisplayName","fileOwnerUid","SHARE_TYPE_REMOTE","SHARE_TYPE_REMOTE_GROUP","SHARE_TYPE_EMAIL","oc_current_user","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","focus .shareWithField","input .shareWithField","click .shareWithConfirm","_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","oc_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","data-item-source-name","data-item-type","data-item-source","$dialog","slideDown","hideDropDown","slideUp","FileActions","document","ready","monthNames","monthNamesShort","dayNames","dayNamesMin","dayNamesShort","firstDay","click","isMatched","has"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK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AAUA,SACV5T,QAAUA,IAIZhe,EAAEQ,MAAMqxB,MAAM,SAAStX,GACtB,IAAIE,EAASza,EAAEua,EAAME,QACjBqX,GAAarX,EAAOmB,GAAG,+DACtBnB,EAAOX,QAAQ,sBAAsB/N,SAAW0O,EAAOX,QAAQ,oBAAoB/N,OACpF7N,GAAGC,OAASD,GAAGC,MAAMivB,aAAe0E,GAAyD,IAA5C9xB,EAAE,aAAa+xB,IAAIxX,EAAME,QAAQ1O,QACrF7N,GAAGC,MAAM+yB","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","/*\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_appconfig, oc_config */\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\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=depth0 != null ? depth0 : (container.nullContext || {});\n\n  return \"<ul class=\\\"shareWithList\\\">\\n\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"\t\t<li data-share-id=\\\"\"\n    + alias4(((helper = (helper = helpers.newShareId || (depth0 != null ? depth0.newShareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.newShareLabel || (depth0 != null ? depth0.newShareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(depth0 != null ? depth0.showPending : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n    + \"\\\" title=\\\"\"\n    + alias4(((helper = (helper = helpers.newShareTitle || (depth0 != null ? depth0.newShareTitle : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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(alias1,(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;\n\n  return \"\t\t\t\t\t\t\"\n    + ((stack1 = ((helper = (helper = helpers.pendingPopoverMenu || (depth0 != null ? depth0.pendingPopoverMenu : depth0)) != null ? helper : helpers.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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"\t\t<li data-share-id=\\\"\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.linkShareCreationDate || (depth0 != null ? depth0.linkShareCreationDate : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"linkShareCreationDate\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.linkShareLabel || (depth0 != null ? depth0.linkShareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.shareLinkURL || (depth0 != null ? depth0.shareLinkURL : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareLinkURL\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" title=\\\"\"\n    + alias4(((helper = (helper = helpers.copyLabel || (depth0 != null ? depth0.copyLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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(alias1,(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(alias1,(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;\n\n  return \"\t\t\t\t\t\t\"\n    + ((stack1 = ((helper = (helper = helpers.popoverMenu || (depth0 != null ? depth0.popoverMenu : depth0)) != null ? helper : helpers.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;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"<input id=\\\"shareWith-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"shareWithField\\\" type=\\\"text\\\" placeholder=\\\"\"\n    + alias4(((helper = (helper = helpers.noSharingPlaceholder || (depth0 != null ? depth0.noSharingPlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"noSharingPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" disabled=\\\"disabled\\\" />\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n    var stack1;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.publicUploadRValue || (depth0 != null ? depth0.publicUploadRValue : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadRValue\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" id=\\\"sharingDialogAllowPublicUpload-r-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"radio publicUploadRadio\\\" \"\n    + ((stack1 = ((helper = (helper = helpers.publicUploadRChecked || (depth0 != null ? depth0.publicUploadRChecked : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadRChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n    + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicUpload-r-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.publicUploadRLabel || (depth0 != null ? depth0.publicUploadRLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.publicUploadRWValue || (depth0 != null ? depth0.publicUploadRWValue : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadRWValue\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" id=\\\"sharingDialogAllowPublicUpload-rw-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"radio publicUploadRadio\\\" \"\n    + ((stack1 = ((helper = (helper = helpers.publicUploadRWChecked || (depth0 != null ? depth0.publicUploadRWChecked : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadRWChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n    + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicUpload-rw-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.publicUploadRWLabel || (depth0 != null ? depth0.publicUploadRWLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.publicUploadWValue || (depth0 != null ? depth0.publicUploadWValue : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadWValue\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" id=\\\"sharingDialogAllowPublicUpload-w-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"radio publicUploadRadio\\\" \"\n    + ((stack1 = ((helper = (helper = helpers.publicUploadWChecked || (depth0 != null ? depth0.publicUploadWChecked : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicUploadWChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n    + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicUpload-w-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.publicUploadWLabel || (depth0 != null ? depth0.publicUploadWLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"checkbox publicEditingCheckbox\\\" \"\n    + ((stack1 = ((helper = (helper = helpers.publicEditingChecked || (depth0 != null ? depth0.publicEditingChecked : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"publicEditingChecked\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n    + \" />\\n\t\t\t\t\t<label for=\\\"sharingDialogAllowPublicEditing-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.publicEditingLabel || (depth0 != null ? depth0.publicEditingLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"checkbox passwordByTalkCheckbox\\\"\\n\t\t\t\t\t\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.passwordByTalkLabel || (depth0 != null ? depth0.passwordByTalkLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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;\n\n  return container.escapeExpression(((helper = (helper = helpers.expireDate || (depth0 != null ? depth0.expireDate : depth0)) != null ? helper : helpers.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;\n\n  return container.escapeExpression(((helper = (helper = helpers.defaultExpireDate || (depth0 != null ? depth0.defaultExpireDate : depth0)) != null ? helper : helpers.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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"\t\t\t<li>\\n\t\t\t\t<a href=\\\"#\\\" class=\\\"menuitem pop-up\\\" data-url=\\\"\"\n    + alias4(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"url\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" data-window=\\\"\"\n    + alias4(((helper = (helper = helpers.newWindow || (depth0 != null ? depth0.newWindow : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"newWindow\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\\n\t\t\t\t\t<span class=\\\"icon \"\n    + alias4(((helper = (helper = helpers.iconClass || (depth0 != null ? depth0.iconClass : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"iconClass\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"></span>\\n\t\t\t\t\t<span>\"\n    + alias4(((helper = (helper = helpers.label || (depth0 != null ? depth0.label : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"label\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</span>\\n\t\t\t\t</a>\\n\t\t\t</li>\\n\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"linkText\\\" type=\\\"text\\\" readonly=\\\"readonly\\\" value=\\\"\"\n    + alias4(((helper = (helper = helpers.shareLinkURL || (depth0 != null ? depth0.shareLinkURL : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareLinkURL\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" />\\n\t\t\t</span>\\n\t\t</li>\\n\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"checkbox hideDownloadCheckbox\\\"\\n\t\t\t\t\t\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.hideDownloadLabel || (depth0 != null ? depth0.hideDownloadLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"checkbox showPasswordCheckbox\\\"\\n\t\t\t\t\t\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.enablePasswordLabel || (depth0 != null ? depth0.enablePasswordLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"linkPassText\\\" type=\\\"password\\\" placeholder=\\\"\"\n    + alias4(((helper = (helper = helpers.passwordPlaceholder || (depth0 != null ? depth0.passwordPlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"expirationDate\\\" class=\\\"expireDate checkbox\\\"\\n\t\t\t\t\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.expireDateLabel || (depth0 != null ? depth0.expireDateLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\\n\t\t\t\t<label for=\\\"expirationDatePicker-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n    + alias4(((helper = (helper = helpers.expirationDate || (depth0 != null ? depth0.expirationDate : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationDate\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.expirationLabel || (depth0 != null ? depth0.expirationLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"\"\n    + ((stack1 = helpers.unless.call(alias1,(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    + alias4(((helper = (helper = helpers.expirationDatePlaceholder || (depth0 != null ? depth0.expirationDatePlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationDatePlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" value=\\\"\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.maxDate || (depth0 != null ? depth0.maxDate : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"maxDate\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.addNoteLabel || (depth0 != null ? depth0.addNoteLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" />\\n\t\t\t</span>\\n\t\t</li>\\n\"\n    + ((stack1 = helpers.each.call(alias1,(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    + alias4(((helper = (helper = helpers.unshareLinkLabel || (depth0 != null ? depth0.unshareLinkLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.newShareLabel || (depth0 != null ? depth0.newShareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.enforcedPasswordLabel || (depth0 != null ? depth0.enforcedPasswordLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.passwordPlaceholder || (depth0 != null ? depth0.passwordPlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" autocomplete=\\\"enforcedPassText\\\" minlength=\\\"\"\n    + alias4(((helper = (helper = helpers.minPasswordLength || (depth0 != null ? depth0.minPasswordLength : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n    var stack1;\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;\n\n  return \"<div class=\\\"share-note\\\">\"\n    + container.escapeExpression(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"shareNote\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</div>\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"<span class=\\\"reshare\\\">\\n\t<div class=\\\"avatar\\\" data-userName=\\\"\"\n    + alias4(((helper = (helper = helpers.reshareOwner || (depth0 != null ? depth0.reshareOwner : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"reshareOwner\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"></div>\\n\t\"\n    + alias4(((helper = (helper = helpers.sharedByText || (depth0 != null ? depth0.sharedByText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"sharedByText\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\n</span>\\n\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"\t\t<li data-share-id=\\\"\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" data-share-type=\\\"\"\n    + alias4(((helper = (helper = helpers.shareType || (depth0 != null ? depth0.shareType : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareType\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" data-share-with=\\\"\"\n    + alias4(((helper = (helper = helpers.shareWith || (depth0 != null ? depth0.shareWith : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWith\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\\n\t\t\t<div class=\\\"avatar \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.shareWith || (depth0 != null ? depth0.shareWith : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWith\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" data-avatar=\\\"\"\n    + alias4(((helper = (helper = helpers.shareWithAvatar || (depth0 != null ? depth0.shareWithAvatar : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWithAvatar\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" data-displayname=\\\"\"\n    + alias4(((helper = (helper = helpers.shareWithDisplayName || (depth0 != null ? depth0.shareWithDisplayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWithDisplayName\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.shareWithTitle || (depth0 != null ? depth0.shareWithTitle : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWithTitle\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.shareWithDisplayName || (depth0 != null ? depth0.shareWithDisplayName : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWithDisplayName\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</span>\\n\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"data-seed=\\\"\"\n    + alias4(((helper = (helper = helpers.shareWith || (depth0 != null ? depth0.shareWith : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareWith\",\"hash\":{},\"data\":data}) : helper)))\n    + \" \"\n    + alias4(((helper = (helper = helpers.shareType || (depth0 != null ? depth0.shareType : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareType\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {});\n\n  return \"\t\t\t<span class=\\\"sharingOptionsGroup\\\">\\n\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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 : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"\t\t\t\t\t<span>\\n\t\t\t\t\t\t<input id=\\\"canEdit-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.canEditLabel || (depth0 != null ? depth0.canEditLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"\t\t<li data-share-id=\\\"\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" data-share-type=\\\"\"\n    + alias4(((helper = (helper = helpers.shareType || (depth0 != null ? depth0.shareType : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareType\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\\n\t\t\t<div class=\\\"avatar\\\" data-username=\\\"\"\n    + alias4(((helper = (helper = helpers.shareInitiator || (depth0 != null ? depth0.shareInitiator : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareInitiator\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"></div>\\n\t\t\t<span class=\\\"has-tooltip username\\\" title=\\\"\"\n    + alias4(((helper = (helper = helpers.shareInitiator || (depth0 != null ? depth0.shareInitiator : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareInitiator\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.shareInitiatorText || (depth0 != null ? depth0.shareInitiatorText : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.unshareLabel || (depth0 != null ? depth0.unshareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"unshareLabel\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</span></a>\\n\t\t\t</span>\\n\t\t</li>\\n\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n    var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {});\n\n  return \"<ul id=\\\"shareWithList\\\" class=\\\"shareWithList\\\">\\n\"\n    + ((stack1 = helpers.each.call(alias1,(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(alias1,(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;\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;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"share\\\" class=\\\"permissions checkbox\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.sharePermission || (depth0 != null ? depth0.sharePermission : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"sharePermission\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" />\\n\t\t\t\t\t<label for=\\\"canShare-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.canShareLabel || (depth0 != null ? depth0.canShareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {});\n\n  return \"\t\t\t\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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(alias1,(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;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"create\\\" class=\\\"permissions checkbox\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.createPermission || (depth0 != null ? depth0.createPermission : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"createPermission\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"canCreate-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.createPermissionLabel || (depth0 != null ? depth0.createPermissionLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"update\\\" class=\\\"permissions checkbox\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.updatePermission || (depth0 != null ? depth0.updatePermission : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"updatePermission\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"canUpdate-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.updatePermissionLabel || (depth0 != null ? depth0.updatePermissionLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"delete\\\" class=\\\"permissions checkbox\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.deletePermission || (depth0 != null ? depth0.deletePermission : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"deletePermission\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"canDelete-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.deletePermissionLabel || (depth0 != null ? depth0.deletePermissionLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"password\\\" class=\\\"password checkbox\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.passwordLabel || (depth0 != null ? depth0.passwordLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \" \"\n    + ((stack1 = helpers.unless.call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \" icon-passwordmail menuitem\\\">\\n\t\t\t\t\t<label for=\\\"passwordField-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n    + alias4(((helper = (helper = helpers.password || (depth0 != null ? depth0.password : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"password\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.passwordLabel || (depth0 != null ? depth0.passwordLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordLabel\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</label>\\n\t\t\t\t\t<input id=\\\"passwordField-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"passwordField\\\" type=\\\"password\\\" placeholder=\\\"\"\n    + alias4(((helper = (helper = helpers.passwordPlaceholder || (depth0 != null ? depth0.passwordPlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" value=\\\"\"\n    + alias4(((helper = (helper = helpers.passwordValue || (depth0 != null ? depth0.passwordValue : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"secureDrop\\\" class=\\\"checkbox secureDrop\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.readPermission || (depth0 != null ? depth0.readPermission : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"readPermission\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\"/>\\n\t\t\t\t\t\t<label for=\\\"secureDrop-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.secureDropLabel || (depth0 != null ? depth0.secureDropLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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;\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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"passwordByTalk\\\" class=\\\"passwordByTalk checkbox\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.passwordByTalkLabel || (depth0 != null ? depth0.passwordByTalkLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \" \"\n    + ((stack1 = helpers.unless.call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \" icon-passwordtalk menuitem\\\">\\n\t\t\t\t\t\t<label for=\\\"passwordByTalkField-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n    + alias4(((helper = (helper = helpers.password || (depth0 != null ? depth0.password : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"password\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.passwordByTalkLabel || (depth0 != null ? depth0.passwordByTalkLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordByTalkLabel\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</label>\\n\t\t\t\t\t\t<input id=\\\"passwordByTalkField-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"passwordField\\\" type=\\\"password\\\" placeholder=\\\"\"\n    + alias4(((helper = (helper = helpers.passwordByTalkPlaceholder || (depth0 != null ? depth0.passwordByTalkPlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"passwordByTalkPlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" value=\\\"\"\n    + alias4(((helper = (helper = helpers.passwordValue || (depth0 != null ? depth0.passwordValue : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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;\n\n  return container.escapeExpression(((helper = (helper = helpers.expireDate || (depth0 != null ? depth0.expireDate : depth0)) != null ? helper : helpers.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;\n\n  return container.escapeExpression(((helper = (helper = helpers.defaultExpireDate || (depth0 != null ? depth0.defaultExpireDate : depth0)) != null ? helper : helpers.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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=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    + alias4(((helper = (helper = helpers.addNoteLabel || (depth0 != null ? depth0.addNoteLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" />\\n\t\t\t\t</span>\\n\t\t\t</li>\\n\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n    var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"<div class=\\\"popovermenu bubble hidden menu\\\">\\n\t<ul>\\n\t\t\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" type=\\\"checkbox\\\" name=\\\"expirationDate\\\" class=\\\"expireDate checkbox\\\" \"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.expireDateLabel || (depth0 != null ? depth0.expireDateLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expireDateLabel\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</label>\\n\t\t\t</span>\\n\t\t</li>\\n\t\t<li class=\\\"expirationDateMenu-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \" \"\n    + ((stack1 = helpers.unless.call(alias1,(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    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \" icon-expiredate menuitem\\\">\\n\t\t\t\t<label for=\\\"expirationDatePicker-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"hidden-visually\\\" value=\\\"\"\n    + alias4(((helper = (helper = helpers.expirationDate || (depth0 != null ? depth0.expirationDate : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationDate\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\">\"\n    + alias4(((helper = (helper = helpers.expirationLabel || (depth0 != null ? depth0.expirationLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationLabel\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</label>\\n\t\t\t\t<input id=\\\"expirationDatePicker-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"-\"\n    + alias4(((helper = (helper = helpers.shareId || (depth0 != null ? depth0.shareId : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareId\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"datepicker\\\" type=\\\"text\\\" placeholder=\\\"\"\n    + alias4(((helper = (helper = helpers.expirationDatePlaceholder || (depth0 != null ? depth0.expirationDatePlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"expirationDatePlaceholder\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" value=\\\"\"\n    + ((stack1 = helpers[\"if\"].call(alias1,(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(alias1,(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    + alias4(((helper = (helper = helpers.unshareLabel || (depth0 != null ? depth0.unshareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n  return \"\t<label for=\\\"shareWith-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"hidden-visually\\\">\"\n    + alias4(((helper = (helper = helpers.shareLabel || (depth0 != null ? depth0.shareLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"shareLabel\",\"hash\":{},\"data\":data}) : helper)))\n    + \"</label>\\n\t<div class=\\\"oneline\\\">\\n\t\t<input id=\\\"shareWith-\"\n    + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n    + \"\\\" class=\\\"shareWithField\\\" type=\\\"text\\\" placeholder=\\\"\"\n    + alias4(((helper = (helper = helpers.sharePlaceholder || (depth0 != null ? depth0.sharePlaceholder : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"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\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n    var stack1;\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})();","/*\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 * @return {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 * @return {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 * @return {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\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\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\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 * @return {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 * @return {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) ? true : false;\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) ? true : false;\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\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) ? false : true;\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\tshare.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\tthis.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\ttype + '=' + 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 * @return {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\n\tOC.Share.Social.Collection = new SocialCollection;\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\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{\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\t\t\t\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\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","/*\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\t\t\t\t\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\t// only open the menu by default if this is the first share\n\t\t\t\t\t\t\tif ($newShare && shares.length === 1) {\n\t\t\t\t\t\t\t\tvar $menu = $newShare.find('.popovermenu');\n\t\t\t\t\t\t\t\tOC.showMenu(null, $menu);\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\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\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{\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\tthis.model.isFolder()\n\t\t\t\t&& this.model.createPermissionPossible()\n\t\t\t\t&& this.configModel.isPublicUploadEnabled();\n\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_capabilities.password_policy && oc_capabilities.password_policy.minLength) {\n\t\t\t\tminPasswordLength = oc_capabilities.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\t\tcase OC.PERMISSION_READ:\n\t\t\t\t\tpublicUploadRChecked = 'checked';\n\t\t\t\t\tbreak;\n\t\t\t\tcase OC.PERMISSION_CREATE:\n\t\t\t\t\tpublicUploadWChecked = 'checked';\n\t\t\t\t\tbreak;\n\t\t\t\tcase OC.PERMISSION_UPDATE | OC.PERMISSION_CREATE | OC.PERMISSION_READ | OC.PERMISSION_DELETE:\n\t\t\t\t\tpublicUploadRWChecked = 'checked';\n\t\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\n\t});\n\n\tOC.Share.ShareDialogLinkShareView = ShareDialogLinkShareView;\n\n})();\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}\n\t\t\telse 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_current_user) {\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_current_user),\n\t\t\t\tcanUpdateShareSettings: (sharedBy === oc_current_user || fileOwnerUid === oc_current_user),\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\t\t\t\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\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\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","/*\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\tthis._lastSuggestions.searchTerm === searchTerm &&\n\t\t\t\tthis._lastSuggestions.lookup === lookup &&\n\t\t\t\tthis._lastSuggestions.perPage === perPage &&\n\t\t\t\tthis._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\tthis._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\t\tview = this,\n\t\t\t\t$loading = this.$el.find('.shareWithLoading'),\n\t\t\t\t$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\t\tcase 'HOME':\n\t\t\t\t\t\treturn t('core', 'Home');\n\t\t\t\t\tcase 'WORK':\n\t\t\t\t\t\treturn t('core', 'Work');\n\t\t\t\t\tcase 'OTHER':\n\t\t\t\t\t\treturn t('core', 'Other');\n\t\t\t\t\tdefault:\n\t\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\tnew RegExp(this.term, \"gi\"),\n\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}, error: 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","/* global escapeHTML */\n\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\t\t\t\t\t\treturn;\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 * @return {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 * @return {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\n});\n"],"sourceRoot":""}
\ No newline at end of file
index cef05eb6479f1baa185b59af94348abced0f05df..26b420ab477991e0aae25140ee1d988a569e5857 100644 (file)
@@ -269,22 +269,23 @@ OC.Share = _.extend(OC.Share || {}, {
                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 (hasLink) {
+                       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 {
+                       } 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');
-                       var mountType = $tr.attr('data-mounttype');
                        // FIXME: duplicate of FileList._createRow logic for external folder,
                        // need to refactor the icon logic into a single code path eventually
                        if (isEncrypted === 'true') {