1 line
352 KiB
Plaintext
1 line
352 KiB
Plaintext
{"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","require","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","isPasswordSet","isPasswordEnforced","enablePasswordLabel","passwordPlaceholder","12","isPasswordByTalkSet","passwordByTalkLabel","14","16","expireDate","18","20","22","url","newWindow","iconClass","label","publicUpload","publicEditing","hideDownload","hideDownloadLabel","showPasswordCheckBox","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","13","hasDeletePermission","deletePermission","deletePermissionLabel","passwordLabel","password","passwordValue","isTalkEnabled","17","secureDropMode","readPermission","secureDropLabel","19","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","$container","parent","onPasswordByTalkChange","onAllowPublicEditingChange","onPublicUploadChange","currentTarget","showNoteForm","stopPropagation","$element","$form","deleteNote","sendNote","updateNote","prev","trim","$submit","$error","hide","method","show","setTimeout","linkShareTemplate","templateData","passwordPlaceholderInitial","publicEditable","replace","minDate","Date","setDate","getDate","datepicker","setDefaults","dateFormat","oc_capabilities","password_policy","minLength","popoverBase","urlLabel","mailPrivatePlaceholder","mailButtonText","pendingPopover","pendingPopoverMenuTemplate","getShareeList","popover","getPopoverObject","popoverMenuTemplate","delegateEvents","autosize","onToggleMenu","isPasswordEnabledByDefault","onPopUpClick","left","screen","width","top","height","open","href","onExpireDateChange","datePicker","state","showDatePicker","setExpirationDate","expirationDatePicker","onSelect","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","resharerInfoView","linkShareView","shareeListView","_lastSuggestions","_pendingOperationsCount","focus .shareWithField","input .shareWithField","click .shareWithConfirm","_onRequest","_onEndRequest","subViewOptions","subViews","Plugins","attach","onShareWithFieldChanged","onShareWithFieldFocus","autocomplete","_getSuggestions","searchTerm","perPage","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","lookup","grouped","sort","a","b","aProperty","bProperty","previousUuid","groupedLength","uuid","merged","moreResultsAvailable","oc_config","Math","min","max","autocompleteHandler","$shareWithField","$confirm","count","term","title","suggestions","append","autocompleteRenderItem","ul","item","icon","text","escapeHTML","description","getTranslatedType","circleInfo","circleOwner","insert","appendTo","RegExp","_onSelectRecipient","stopImmediatePropagation","_confirmShare","restoreUI","_toggleLoading","_loading","_loadingOnce","defer","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,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAA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AAa9W,EAAOmB,GAAG,+DACtBnB,EAAOX,QAAQ,sBAAsB/N,SAAW0O,EAAOX,QAAQ,oBAAoB/N,OACpF7N,GAAGC,OAASD,GAAGC,MAAMyuB,aAAe2E,GAAyD,IAA5CvxB,EAAE,aAAawxB,IAAIjX,EAAME,QAAQ1O,QACrF7N,GAAGC,MAAMwyB","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","require('./shareconfigmodel.js')\nrequire('./sharetemplates.js')\nrequire('./shareitemmodel.js')\nrequire('./sharesocialmanager.js')\nrequire('./sharedialogresharerinfoview.js')\nrequire('./sharedialoglinkshareview.js')\nrequire('./sharedialogshareelistview.js')\nrequire('./sharedialogview.js')\nrequire('./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 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<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(8, 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(10, 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},\"8\":function(container,depth0,helpers,partials,data) {\n return \"disabled=\\\"disabled\\\"\";\n},\"10\":function(container,depth0,helpers,partials,data) {\n return \"hidden\";\n},\"12\":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},\"14\":function(container,depth0,helpers,partials,data) {\n return \"datepicker\";\n},\"16\":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},\"18\":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},\"20\":function(container,depth0,helpers,partials,data) {\n return \"readonly\";\n},\"22\":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\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.showPasswordCheckBox : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.showPasswordByTalkCheckBox : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(12, 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(8, 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(10, 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(14, 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(16, data, 0),\"inverse\":container.program(18, 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(20, 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(10, 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(10, 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(22, 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\t$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\t$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\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// 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 social = [];\n\t\t\tOC.Share.Social.Collection.each(function(model) {\n\t\t\t\tvar url = model.get('url');\n\t\t\t\turl = url.replace('{{reference}}', link);\n\n\t\t\t\tsocial.push({\n\t\t\t\t\turl: url,\n\t\t\t\t\tlabel: t('core', 'Share to {name}', {name: model.get('name')}),\n\t\t\t\t\tname: model.get('name'),\n\t\t\t\t\ticonClass: model.get('iconClass'),\n\t\t\t\t\tnewWindow: model.get('newWindow')\n\t\t\t\t});\n\t\t\t});\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\tsocial: social,\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 popover = this.getPopoverObject(linkShares[i])\n\t\t\t\t\tlinkShares[i].popoverMenu = this.popoverMenuTemplate(_.extend({}, popoverBase, popover));\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('');\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\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 showPasswordCheckBox = !isPasswordEnforced || !share.password;\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\tshowPasswordCheckBox: showPasswordCheckBox,\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/** @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 {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\tthis.$el.find('.shareWithField').autocomplete(\"search\");\n\t\t},\n\n\t\t_getSuggestions: function(searchTerm, perPage, model) {\n\t\t\tif (this._lastSuggestions &&\n\t\t\t\tthis._lastSuggestions.searchTerm === searchTerm &&\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\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\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 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 (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\n\t\t\t\t\t\tdeferred.resolve(result, exactMatches, moreResultsAvailable);\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\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\tautocompleteHandler: function (search, response) {\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).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: 'bottom',\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 {\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\tinsert.append('<span class=\"icon '+icon+'\" title=\"' + text + '\"></span>');\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\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\tvar onlyExactMatches = true;\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\tonlyExactMatches\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\t// the first time, focus on the share field after the spinner disappeared\n\t\t\t\tif (!OC.Util.isIE()) {\n\t\t\t\t\t_.defer(function () {\n\t\t\t\t\t\tself.$('.shareWithField').focus();\n\t\t\t\t\t});\n\t\t\t\t}\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: 1,\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":""} |