\")\n\t\t\t\t.append(insert);\n\t\t\treturn $(\"\")\n\t\t\t\t.addClass((item.value.shareType === OC.Share.SHARE_TYPE_GROUP) ? 'group' : 'user')\n\t\t\t\t.append(insert)\n\t\t\t\t.appendTo(ul);\n\t\t},\n\n\t\t_onSelectRecipient: function(e, s) {\n\t\t\tvar self = this;\n\n\t\t\tif (e.keyCode == 9) {\n\t\t\t\te.preventDefault();\n\t\t\t\tif (typeof s.item.name !== 'undefined') {\n\t\t\t\t\te.target.value = s.item.name;\n\t\t\t\t} else {\n\t\t\t\t\te.target.value = s.item.label;\n\t\t\t\t}\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t$(e.target).attr('disabled', false)\n\t\t\t\t\t\t.autocomplete('search', $(e.target).val());\n\t\t\t\t}, 0);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (s.item.lookup) {\n\t\t\t\t// Retrigger search but with global lookup this time\n\t\t\t\tthis._lookup = true;\n\t\t\t\tvar $shareWithField = this.$el.find('.shareWithField');\n\t\t\t\tvar val = $shareWithField.val();\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tconsole.debug('searching again, but globally. search term: ' + val);\n\t\t\t\t\t$shareWithField.autocomplete(\"search\", val);\n\t\t\t\t}, 0);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\te.preventDefault();\n\t\t\t// Ensure that the keydown handler for the input field is not\n\t\t\t// called; otherwise it would try to add the recipient again, which\n\t\t\t// would fail.\n\t\t\te.stopImmediatePropagation();\n\t\t\t$(e.target).attr('disabled', true)\n\t\t\t\t.val(s.item.label);\n\n\t\t\tvar $loading = this.$el.find('.shareWithLoading');\n\t\t\tvar $confirm = this.$el.find('.shareWithConfirm');\n\n\t\t\t$loading.removeClass('hidden');\n\t\t\t$loading.addClass('inlineblock');\n\t\t\t$confirm.addClass('hidden');\n\t\t\tthis._pendingOperationsCount++;\n\n\t\t\tthis.model.addShare(s.item.value, {success: function() {\n\t\t\t\t// Adding a share changes the suggestions.\n\t\t\t\tself._lastSuggestions = undefined;\n\n\t\t\t\t$(e.target).val('')\n\t\t\t\t\t.attr('disabled', false);\n\n\t\t\t\tself._pendingOperationsCount--;\n\t\t\t\tif (self._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t$loading.removeClass('inlineblock');\n\t\t\t\t\t$confirm.removeClass('hidden');\n\t\t\t\t}\n\t\t\t}, error: function(obj, msg) {\n\t\t\t\tOC.Notification.showTemporary(msg);\n\t\t\t\t$(e.target).attr('disabled', false)\n\t\t\t\t\t.autocomplete('search', $(e.target).val());\n\n\t\t\t\tself._pendingOperationsCount--;\n\t\t\t\tif (self._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t$loading.removeClass('inlineblock');\n\t\t\t\t\t$confirm.removeClass('hidden');\n\t\t\t\t}\n\t\t\t}});\n\t\t},\n\n\t\t_confirmShare: function() {\n\t\t\tvar self = this;\n\t\t\tvar $shareWithField = $('.shareWithField');\n\t\t\tvar $loading = this.$el.find('.shareWithLoading');\n\t\t\tvar $confirm = this.$el.find('.shareWithConfirm');\n\n\t\t\t$loading.removeClass('hidden');\n\t\t\t$loading.addClass('inlineblock');\n\t\t\t$confirm.addClass('hidden');\n\t\t\tthis._pendingOperationsCount++;\n\n\t\t\t$shareWithField.prop('disabled', true);\n\n\t\t\t// Disabling the autocompletion does not clear its search timeout;\n\t\t\t// removing the focus from the input field does, but only if the\n\t\t\t// autocompletion is not disabled when the field loses the focus.\n\t\t\t// Thus, the field has to be disabled before disabling the\n\t\t\t// autocompletion to prevent an old pending search result from\n\t\t\t// appearing once the field is enabled again.\n\t\t\t$shareWithField.autocomplete('close');\n\t\t\t$shareWithField.autocomplete('disable');\n\n\t\t\tvar restoreUI = function() {\n\t\t\t\tself._pendingOperationsCount--;\n\t\t\t\tif (self._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t$loading.removeClass('inlineblock');\n\t\t\t\t\t$confirm.removeClass('hidden');\n\t\t\t\t}\n\n\t\t\t\t$shareWithField.prop('disabled', false);\n\t\t\t\t$shareWithField.focus();\n\t\t\t};\n\n\t\t\tvar perPage = parseInt(OC.config['sharing.maxAutocompleteResults'], 10) || 200;\n\t\t\tthis._getSuggestions(\n\t\t\t\t$shareWithField.val(),\n\t\t\t\tperPage,\n\t\t\t\tthis.model,\n\t\t\t\tthis._lookup\n\t\t\t).done(function(suggestions, exactMatches) {\n\t\t\t\tif (suggestions.length === 0) {\n\t\t\t\t\trestoreUI();\n\n\t\t\t\t\t$shareWithField.autocomplete('enable');\n\n\t\t\t\t\t// There is no need to show an error message here; it will\n\t\t\t\t\t// be automatically shown when the autocomplete is activated\n\t\t\t\t\t// again (due to the focus on the field) and it finds no\n\t\t\t\t\t// matches.\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (exactMatches.length !== 1) {\n\t\t\t\t\trestoreUI();\n\n\t\t\t\t\t$shareWithField.autocomplete('enable');\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar actionSuccess = function() {\n\t\t\t\t\t// Adding a share changes the suggestions.\n\t\t\t\t\tself._lastSuggestions = undefined;\n\n\t\t\t\t\t$shareWithField.val('');\n\n\t\t\t\t\trestoreUI();\n\n\t\t\t\t\t$shareWithField.autocomplete('enable');\n\t\t\t\t};\n\n\t\t\t\tvar actionError = function(obj, msg) {\n\t\t\t\t\trestoreUI();\n\n\t\t\t\t\t$shareWithField.autocomplete('enable');\n\n\t\t\t\t\tOC.Notification.showTemporary(msg);\n\t\t\t\t};\n\n\t\t\t\tself.model.addShare(exactMatches[0].value, {\n\t\t\t\t\tsuccess: actionSuccess,\n\t\t\t\t\terror: actionError\n\t\t\t\t});\n\t\t\t}).fail(function(message) {\n\t\t\t\trestoreUI();\n\n\t\t\t\t$shareWithField.autocomplete('enable');\n\n\t\t\t\t// There is no need to show an error message here; it will be\n\t\t\t\t// automatically shown when the autocomplete is activated again\n\t\t\t\t// (due to the focus on the field) and getting the suggestions\n\t\t\t\t// fail.\n\t\t\t});\n\t\t},\n\n\t\t_toggleLoading: function(state) {\n\t\t\tthis._loading = state;\n\t\t\tthis.$el.find('.subView').toggleClass('hidden', state);\n\t\t\tthis.$el.find('.loading').toggleClass('hidden', !state);\n\t\t},\n\n\t\t_onRequest: function() {\n\t\t\t// only show the loading spinner for the first request (for now)\n\t\t\tif (!this._loadingOnce) {\n\t\t\t\tthis._toggleLoading(true);\n\t\t\t}\n\t\t},\n\n\t\t_onEndRequest: function() {\n\t\t\tvar self = this;\n\t\t\tthis._toggleLoading(false);\n\t\t\tif (!this._loadingOnce) {\n\t\t\t\tthis._loadingOnce = true;\n\t\t\t}\n\t\t},\n\n\t\trender: function() {\n\t\t\tvar self = this;\n\t\t\tvar baseTemplate = OC.Share.Templates['sharedialogview'];\n\n\t\t\tthis.$el.html(baseTemplate({\n\t\t\t\tcid: this.cid,\n\t\t\t\tshareLabel: t('core', 'Share'),\n\t\t\t\tsharePlaceholder: this._renderSharePlaceholderPart(),\n\t\t\t\tisSharingAllowed: this.model.sharePermissionPossible()\n\t\t\t}));\n\n\t\t\tvar $shareField = this.$el.find('.shareWithField');\n\t\t\tif ($shareField.length) {\n\t\t\t\tvar shareFieldKeydownHandler = function(event) {\n\t\t\t\t\tif (event.keyCode !== 13) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\tself._confirmShare();\n\n\t\t\t\t\treturn false;\n\t\t\t\t};\n\n\t\t\t\t$shareField.autocomplete({\n\t\t\t\t\tminLength: 0,\n\t\t\t\t\tdelay: 750,\n\t\t\t\t\tfocus: function(event) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t},\n\t\t\t\t\tsource: this.autocompleteHandler,\n\t\t\t\t\tselect: this._onSelectRecipient,\n\t\t\t\t\topen: function() {\n\t\t\t\t\t\tvar autocomplete = $(this).autocomplete('widget');\n\t\t\t\t\t\tvar numberOfItems = autocomplete.find('li').size();\n\t\t\t\t\t\tautocomplete.removeClass('item-count-1');\n\t\t\t\t\t\tautocomplete.removeClass('item-count-2');\n\t\t\t\t\t\tif (numberOfItems <= 2) {\n\t\t\t\t\t\t\tautocomplete.addClass('item-count-' + numberOfItems);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}).data('ui-autocomplete')._renderItem = this.autocompleteRenderItem;\n\n\t\t\t\t$shareField.on('keydown', null, shareFieldKeydownHandler);\n\t\t\t}\n\n\t\t\tthis.resharerInfoView.$el = this.$el.find('.resharerInfoView');\n\t\t\tthis.resharerInfoView.render();\n\n\t\t\tthis.linkShareView.$el = this.$el.find('.linkShareView');\n\t\t\tthis.linkShareView.render();\n\n\t\t\tthis.shareeListView.$el = this.$el.find('.shareeListView');\n\t\t\tthis.shareeListView.render();\n\n\t\t\tthis.$el.find('.hasTooltip').tooltip();\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * sets whether share by link should be displayed or not. Default is\n\t\t * true.\n\t\t *\n\t\t * @param {bool} showLink\n\t\t */\n\t\tsetShowLink: function(showLink) {\n\t\t\tthis._showLink = (typeof showLink === 'boolean') ? showLink : true;\n\t\t\tthis.linkShareView.showLink = this._showLink;\n\t\t},\n\n\t\t_renderSharePlaceholderPart: function () {\n\t\t\tvar allowRemoteSharing = this.configModel.get('isRemoteShareAllowed');\n\t\t\tvar allowMailSharing = this.configModel.get('isMailShareAllowed');\n\n\t\t\tif (!allowRemoteSharing && allowMailSharing) {\n\t\t\t\treturn t('core', 'Name or email address...');\n\t\t\t}\n\t\t\tif (allowRemoteSharing && !allowMailSharing) {\n\t\t\t\treturn t('core', 'Name or federated cloud ID...');\n\t\t\t}\n\t\t\tif (allowRemoteSharing && allowMailSharing) {\n\t\t\t\treturn t('core', 'Name, federated cloud ID or email address...');\n\t\t\t}\n\n\t\t\treturn \tt('core', 'Name...');\n\t\t},\n\n\t});\n\n\tOC.Share.ShareDialogView = ShareDialogView;\n\n})();\n","/* global escapeHTML */\n\n/**\n * @namespace\n */\nOC.Share = _.extend(OC.Share || {}, {\n\tSHARE_TYPE_USER:0,\n\tSHARE_TYPE_GROUP:1,\n\tSHARE_TYPE_LINK:3,\n\tSHARE_TYPE_EMAIL:4,\n\tSHARE_TYPE_REMOTE:6,\n\tSHARE_TYPE_CIRCLE:7,\n\tSHARE_TYPE_GUEST:8,\n\tSHARE_TYPE_REMOTE_GROUP:9,\n\tSHARE_TYPE_ROOM:10,\n\n\t/**\n\t * Regular expression for splitting parts of remote share owners:\n\t * \"user@example.com/path/to/owncloud\"\n\t * \"user@anotherexample.com@example.com/path/to/owncloud\n\t */\n\t_REMOTE_OWNER_REGEXP: new RegExp(\"^([^@]*)@(([^@]*)@)?([^/]*)([/](.*)?)?$\"),\n\n\t/**\n\t * @deprecated use OC.Share.currentShares instead\n\t */\n\titemShares:[],\n\t/**\n\t * Full list of all share statuses\n\t */\n\tstatuses:{},\n\t/**\n\t * Shares for the currently selected file.\n\t * (for which the dropdown is open)\n\t *\n\t * Key is item type and value is an array or\n\t * shares of the given item type.\n\t */\n\tcurrentShares: {},\n\t/**\n\t * Whether the share dropdown is opened.\n\t */\n\tdroppedDown:false,\n\t/**\n\t * Loads ALL share statuses from server, stores them in\n\t * OC.Share.statuses then calls OC.Share.updateIcons() to update the\n\t * files \"Share\" icon to \"Shared\" according to their share status and\n\t * share type.\n\t *\n\t * If a callback is specified, the update step is skipped.\n\t *\n\t * @param itemType item type\n\t * @param fileList file list instance, defaults to OCA.Files.App.fileList\n\t * @param callback function to call after the shares were loaded\n\t */\n\tloadIcons:function(itemType, fileList, callback) {\n\t\tvar path = fileList.dirInfo.path;\n\t\tif (path === '/') {\n\t\t\tpath = '';\n\t\t}\n\t\tpath += '/' + fileList.dirInfo.name;\n\n\t\t// Load all share icons\n\t\t$.get(\n\t\t\tOC.linkToOCS('apps/files_sharing/api/v1', 2) + 'shares',\n\t\t\t{\n\t\t\t\tsubfiles: 'true',\n\t\t\t\tpath: path,\n\t\t\t\tformat: 'json'\n\t\t\t}, function(result) {\n\t\t\t\tif (result && result.ocs.meta.statuscode === 200) {\n\t\t\t\t\tOC.Share.statuses = {};\n\t\t\t\t\t$.each(result.ocs.data, function(it, share) {\n\t\t\t\t\t\tif (!(share.item_source in OC.Share.statuses)) {\n\t\t\t\t\t\t\tOC.Share.statuses[share.item_source] = {link: false};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (share.share_type === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\t\tOC.Share.statuses[share.item_source] = {link: true};\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tif (_.isFunction(callback)) {\n\t\t\t\t\t\tcallback(OC.Share.statuses);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tOC.Share.updateIcons(itemType, fileList);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n\t/**\n\t * Updates the files' \"Share\" icons according to the known\n\t * sharing states stored in OC.Share.statuses.\n\t * (not reloaded from server)\n\t *\n\t * @param itemType item type\n\t * @param fileList file list instance\n\t * defaults to OCA.Files.App.fileList\n\t */\n\tupdateIcons:function(itemType, fileList){\n\t\tvar item;\n\t\tvar $fileList;\n\t\tvar currentDir;\n\t\tif (!fileList && OCA.Files) {\n\t\t\tfileList = OCA.Files.App.fileList;\n\t\t}\n\t\t// fileList is usually only defined in the files app\n\t\tif (fileList) {\n\t\t\t$fileList = fileList.$fileList;\n\t\t\tcurrentDir = fileList.getCurrentDirectory();\n\t\t}\n\t\t// TODO: iterating over the files might be more efficient\n\t\tfor (item in OC.Share.statuses){\n\t\t\tvar iconClass = 'icon-shared';\n\t\t\tvar data = OC.Share.statuses[item];\n\t\t\tvar hasLink = data.link;\n\t\t\t// Links override shared in terms of icon display\n\t\t\tif (hasLink) {\n\t\t\t\ticonClass = 'icon-public';\n\t\t\t}\n\t\t\tif (itemType !== 'file' && itemType !== 'folder') {\n\t\t\t\t$('a.share[data-item=\"'+item+'\"] .icon').removeClass('icon-shared icon-public').addClass(iconClass);\n\t\t\t} else {\n\t\t\t\t// TODO: ultimately this part should be moved to files_sharing app\n\t\t\t\tvar file = $fileList.find('tr[data-id=\"'+item+'\"]');\n\t\t\t\tvar shareFolder = OC.imagePath('core', 'filetypes/folder-shared');\n\t\t\t\tvar img;\n\t\t\t\tif (file.length > 0) {\n\t\t\t\t\tthis.markFileAsShared(file, true, hasLink);\n\t\t\t\t} else {\n\t\t\t\t\tvar dir = currentDir;\n\t\t\t\t\tif (dir.length > 1) {\n\t\t\t\t\t\tvar last = '';\n\t\t\t\t\t\tvar path = dir;\n\t\t\t\t\t\t// Search for possible parent folders that are shared\n\t\t\t\t\t\twhile (path != last) {\n\t\t\t\t\t\t\tif (path === data.path && !data.link) {\n\t\t\t\t\t\t\t\tvar actions = $fileList.find('.fileactions .action[data-action=\"Share\"]');\n\t\t\t\t\t\t\t\tvar files = $fileList.find('.filename');\n\t\t\t\t\t\t\t\tvar i;\n\t\t\t\t\t\t\t\tfor (i = 0; i < actions.length; i++) {\n\t\t\t\t\t\t\t\t\t// TODO: use this.markFileAsShared()\n\t\t\t\t\t\t\t\t\timg = $(actions[i]).find('img');\n\t\t\t\t\t\t\t\t\tif (img.attr('src') !== OC.imagePath('core', 'actions/public')) {\n\t\t\t\t\t\t\t\t\t\timg.attr('src', image);\n\t\t\t\t\t\t\t\t\t\t$(actions[i]).addClass('permanent');\n\t\t\t\t\t\t\t\t\t\t$(actions[i]).html(' '+t('core', 'Shared')+' ').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 = ' ';\n\t\t\tvar hidden = '' + message + ' ' + escapeHTML(shareWithDisplayName) + ' ';\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 = '';\n\t\thtml += '' + escapeHTML(userName) + ' ';\n\t\tif (userDomain) {\n\t\t\thtml += '@' + escapeHTML(userDomain) + ' ';\n\t\t}\n\t\thtml += ' ';\n\t\treturn html;\n\t},\n\t/**\n\t * Loop over all recipients in the list and format them using\n\t * all kind of fancy magic.\n\t *\n\t * @param {Object} recipients array of all the recipients\n\t * @return {String[]} modified list of recipients\n\t */\n\t_formatShareList: function(recipients) {\n\t\tvar _parent = this;\n\t\trecipients = _.toArray(recipients);\n\t\trecipients.sort(function(a, b) {\n\t\t\treturn a.shareWithDisplayName.localeCompare(b.shareWithDisplayName);\n\t\t});\n\t\treturn $.map(recipients, function(recipient) {\n\t\t\treturn _parent._formatRemoteShare(recipient.shareWith, recipient.shareWithDisplayName, t('core', 'Shared with'));\n\t\t});\n\t},\n\t/**\n\t * Marks/unmarks a given file as shared by changing its action icon\n\t * and folder icon.\n\t *\n\t * @param $tr file element to mark as shared\n\t * @param hasShares whether shares are available\n\t * @param hasLink whether link share is available\n\t */\n\tmarkFileAsShared: function($tr, hasShares, hasLink) {\n\t\tvar action = $tr.find('.fileactions .action[data-action=\"Share\"]');\n\t\tvar type = $tr.data('type');\n\t\tvar icon = action.find('.icon');\n\t\tvar message, recipients, avatars;\n\t\tvar ownerId = $tr.attr('data-share-owner-id');\n\t\tvar owner = $tr.attr('data-share-owner');\n\t\tvar mountType = $tr.attr('data-mounttype');\n\t\tvar shareFolderIcon;\n\t\tvar iconClass = 'icon-shared';\n\t\taction.removeClass('shared-style');\n\t\t// update folder icon\n\t\tif (type === 'dir' && (hasShares || hasLink || ownerId)) {\n\t\t\tif (typeof mountType !== 'undefined' && mountType !== 'shared-root' && mountType !== 'shared') {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-' + mountType);\n\t\t\t} else if (hasLink) {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-public');\n\t\t\t} else {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-shared');\n\t\t\t}\n\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')');\n\t\t\t$tr.attr('data-icon', shareFolderIcon);\n\t\t} else if (type === 'dir') {\n\t\t\tvar isEncrypted = $tr.attr('data-e2eencrypted');\n\t\t\t// FIXME: duplicate of FileList._createRow logic for external folder,\n\t\t\t// need to refactor the icon logic into a single code path eventually\n\t\t\tif (isEncrypted === 'true') {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-encrypted');\n\t\t\t\t$tr.attr('data-icon', shareFolderIcon);\n\t\t\t} else if (mountType && mountType.indexOf('external') === 0) {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-external');\n\t\t\t\t$tr.attr('data-icon', shareFolderIcon);\n\t\t\t} else {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir');\n\t\t\t\t// back to default\n\t\t\t\t$tr.removeAttr('data-icon');\n\t\t\t}\n\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')');\n\t\t}\n\t\t// update share action text / icon\n\t\tif (hasShares || ownerId) {\n\t\t\trecipients = $tr.data('share-recipient-data');\n\t\t\taction.addClass('shared-style');\n\n\t\t\tavatars = '' + t('core', 'Shared') + ' ';\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('' + t('core', 'Shared') + ' ').prepend(icon);\n\t\t}\n\t\tif (hasLink) {\n\t\t\ticonClass = 'icon-public';\n\t\t}\n\t\ticon.removeClass('icon-shared icon-public').addClass(iconClass);\n\t},\n\tshowDropDown:function(itemType, itemSource, appendTo, link, possiblePermissions, filename) {\n\t\tvar configModel = new OC.Share.ShareConfigModel();\n\t\tvar attributes = {itemType: itemType, itemSource: itemSource, possiblePermissions: possiblePermissions};\n\t\tvar itemModel = new OC.Share.ShareItemModel(attributes, {configModel: configModel});\n\t\tvar dialogView = new OC.Share.ShareDialogView({\n\t\t\tid: 'dropdown',\n\t\t\tmodel: itemModel,\n\t\t\tconfigModel: configModel,\n\t\t\tclassName: 'drop shareDropDown',\n\t\t\tattributes: {\n\t\t\t\t'data-item-source-name': filename,\n\t\t\t\t'data-item-type': itemType,\n\t\t\t\t'data-item-source': itemSource\n\t\t\t}\n\t\t});\n\t\tdialogView.setShowLink(link);\n\t\tvar $dialog = dialogView.render().$el;\n\t\t$dialog.appendTo(appendTo);\n\t\t$dialog.slideDown(OC.menuSpeed, function() {\n\t\t\tOC.Share.droppedDown = true;\n\t\t});\n\t\titemModel.fetch();\n\t},\n\thideDropDown:function(callback) {\n\t\tOC.Share.currentShares = null;\n\t\t$('#dropdown').slideUp(OC.menuSpeed, function() {\n\t\t\tOC.Share.droppedDown = false;\n\t\t\t$('#dropdown').remove();\n\t\t\tif (typeof FileActions !== 'undefined') {\n\t\t\t\t$('tr').removeClass('mouseOver');\n\t\t\t}\n\t\t\tif (callback) {\n\t\t\t\tcallback.call();\n\t\t\t}\n\t\t});\n\t},\n\tdirname:function(path) {\n\t\treturn path.replace(/\\\\/g,'/').replace(/\\/[^\\/]*$/, '');\n\t}\n});\n\n$(document).ready(function() {\n\tif(typeof monthNames != 'undefined'){\n\t\t// min date should always be the next day\n\t\tvar minDate = new Date();\n\t\tminDate.setDate(minDate.getDate()+1);\n\t\t$.datepicker.setDefaults({\n\t\t\tmonthNames: monthNames,\n\t\t\tmonthNamesShort: monthNamesShort,\n\t\t\tdayNames: dayNames,\n\t\t\tdayNamesMin: dayNamesMin,\n\t\t\tdayNamesShort: dayNamesShort,\n\t\t\tfirstDay: firstDay,\n\t\t\tminDate : minDate\n\t\t});\n\t}\n\n\t$(this).click(function(event) {\n\t\tvar target = $(event.target);\n\t\tvar isMatched = !target.is('.drop, .ui-datepicker-next, .ui-datepicker-prev, .ui-icon')\n\t\t\t&& !target.closest('#ui-datepicker-div').length && !target.closest('.ui-autocomplete').length;\n\t\tif (OC.Share && OC.Share.droppedDown && isMatched && $('#dropdown').has(event.target).length === 0) {\n\t\t\tOC.Share.hideDropDown();\n\t\t}\n\t});\n\n\n\n});\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./core/js/merged-share-backend.js","webpack:///./core/js/shareconfigmodel.js","webpack:///./core/js/sharetemplates.js","webpack:///./core/js/shareitemmodel.js","webpack:///./core/js/sharesocialmanager.js","webpack:///./core/js/sharedialogresharerinfoview.js","webpack:///./core/js/sharedialoglinkshareview.js","webpack:///./core/js/sharedialogshareelistview.js","webpack:///./core/js/sharedialogview.js","webpack:///./core/js/share.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","OC","Share","Types","ShareConfigModel","Backbone","Model","extend","defaults","publicUploadEnabled","enforcePasswordForPublicLink","appConfig","core","enableLinkPasswordByDefault","isDefaultExpireDateEnforced","defaultExpireDateEnforced","isDefaultExpireDateEnabled","defaultExpireDateEnabled","isRemoteShareAllowed","remoteShareAllowed","isMailShareAllowed","undefined","shareByMailEnabled","defaultExpireDate","isResharingAllowed","resharingAllowed","isPasswordForMailSharesRequired","shareByMail","enforcePasswordProtection","allowGroupSharing","isPublicUploadEnabled","$","data","isShareWithLinkAllowed","val","getFederatedShareDocLink","federatedCloudShareDoc","getDefaultExpirationDateString","expireDateString","this","date","moment","utc","expireAfterDays","add","format","template","templates","Handlebars","Templates","container","depth0","helpers","partials","stack1","alias1","nullContext","nolinkShares","program","noop","each","linkShares","helper","alias2","hooks","helperMissing","alias4","escapeExpression","newShareId","newShareLabel","showPending","newShareTitle","unless","pendingPopoverMenu","alias3","cid","linkShareCreationDate","linkShareLabel","shareLinkURL","copyLabel","popoverMenu","noSharingPlaceholder","shareAllowed","publicUploadRValue","publicUploadRChecked","publicUploadRLabel","publicUploadRWValue","publicUploadRWChecked","publicUploadRWLabel","publicUploadWValue","publicUploadWChecked","publicUploadWLabel","publicEditingChecked","publicEditingLabel","isPasswordByTalkSet","passwordByTalkLabel","expireDate","url","newWindow","iconClass","label","publicUpload","publicEditing","hideDownload","hideDownloadLabel","isPasswordSet","isPasswordEnforced","enablePasswordLabel","passwordPlaceholder","showPasswordByTalkCheckBox","hasExpireDate","isExpirationEnforced","expireDateLabel","expirationDate","expirationLabel","expirationDatePlaceholder","maxDate","addNoteLabel","hasNote","shareNote","shareId","social","unshareLinkLabel","enforcedPasswordLabel","minPasswordLength","reshareOwner","sharedByText","hasShareNote","isShareWithCurrentUser","shareType","shareWith","modSeed","shareWithAvatar","shareWithDisplayName","shareWithTitle","canUpdateShareSettings","editPermissionPossible","canEditLabel","shareInitiator","shareInitiatorText","unshareLabel","sharees","linkReshares","sharePermissionPossible","isMailShare","hasSharePermission","sharePermission","canShareLabel","createPermissionPossible","updatePermissionPossible","deletePermissionPossible","hasCreatePermission","createPermission","createPermissionLabel","hasUpdatePermission","updatePermission","updatePermissionLabel","hasDeletePermission","deletePermission","deletePermissionLabel","passwordLabel","password","passwordValue","isTalkEnabled","secureDropMode","readPermission","secureDropLabel","passwordByTalkPlaceholder","isFolder","isNoteAvailable","shareLabel","sharePlaceholder","isSharingAllowed","SHARE_RESPONSE_INT_PROPS","ShareItemModel","_linkShareId","initialize","attributes","options","_","isUndefined","configModel","fileInfoModel","bindAll","allowPublicUploadStatus","permissions","saveLinkShare","expiration","shareIndex","findIndex","share","id","length","updateShare","passwordChanged","sendPasswordByTalk","PERMISSION_READ","SHARE_TYPE_LINK","addShare","defaultPermissions","getCapabilities","PERMISSION_ALL","possiblePermissions","PERMISSION_UPDATE","PERMISSION_CREATE","PERMISSION_DELETE","PERMISSION_SHARE","path","getFullPath","_addOrUpdateShare","type","_getUrl","dataType","attrs","encodeURIComponent","ajaxSettings","self","ajax","always","isFunction","complete","done","fetch","success","fail","xhr","msg","result","responseJSON","ocs","meta","message","error","dialogs","alert","removeShare","isPublicUploadAllowed","isPublicEditingAllowed","isHideFileListSet","isFile","hasReshare","reshare","isObject","uid_owner","hasUserShares","getSharesWithCurrentItem","hasLinkShares","getReshareOwner","getReshareOwnerDisplayname","displayname_owner","getReshareNote","note","getReshareWith","share_with","getReshareWithDisplayName","share_with_displayname","getReshareType","share_type","getExpireDate","_shareExpireDate","getNote","_shareNote","shares","fileId","filter","item_source","getShareWith","getShareWithDisplayName","getShareWithAvatar","share_with_avatar","getSharedBy","getSharedByDisplayName","getFileOwnerUid","uid_file_owner","findShareWithIndex","isArray","getShareType","_shareHasPermission","permission","getPermissions","hasReadPermission","editPermissionState","hcp","hup","hdp","linkSharePermissions","base","params","linkToOCS","buildQueryString","_fetchShares","reshares","_fetchReshare","_reshareFetched","Deferred","resolve","shared_with_me","_groupReshares","superShare","shift","combinedPermissions","SHARE_TYPE_USER","SHARE_TYPE_GROUP","model","trigger","deferred","when","data1","data2","sharesMap","shareItem","set","parse","_legacyFillCurrentShares","statuses","currentShares","itemShares","currentShareStatus","link","push","console","warn","currentUser","allowPublicEditingStatus","hideFileListStatus","map","prop","parseInt","reject","file_source","window","location","protocol","host","token","generateUrl","fullPath","isDirectory","linkTo","hide_download","send_password_by_talk","_parseTime","time","isString","isNaN","getShareTypes","pluck","uniq","Social","SocialModel","SocialCollection","Collection","comparator","ShareDialogResharerInfoView","View","tagName","className","_template","view","on","render","$el","empty","reshareTemplate","ownerDisplayName","group","owner","escape","SHARE_TYPE_CIRCLE","circle","SHARE_TYPE_ROOM","conversation","html","find","$this","avatar","contactsMenu","PASSWORD_PLACEHOLDER_MESSAGE","PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL","ShareDialogLinkShareView","showLink","hasPasswordChanged","events","previousLinkShares","previous","clipboard","Clipboard","e","$trigger","tooltip","attr","placement","delay","$menu","next","$linkTextMenu","$input","closest","showMenu","actionMsg","test","navigator","userAgent","removeClass","select","newShare","event","$li","target","$loading","hasClass","addClass","hideMenus","shareData","defaultExpireDays","focus","response","Notification","showTemporary","then","enforcedPasswordSet","preventDefault","onLinkTextClick","onHideDownloadChange","$checkbox","siblings","is","obj","onShowPasswordClick","slideToggle","menuSpeed","toggleClass","Util","isIE","onPasswordKeyUp","keyCode","onPasswordEntered","parent","onToggleMenu","$container","onPasswordByTalkChange","onAllowPublicEditingChange","onPublicUploadChange","currentTarget","showNoteForm","stopPropagation","$element","$form","deleteNote","sendNote","updateNote","prev","trim","$submit","$error","hide","method","show","setTimeout","linkShareTemplate","templateData","passwordPlaceholderInitial","publicEditable","minDate","Date","setDate","getDate","datepicker","setDefaults","dateFormat","password_policy","minLength","popoverBase","urlLabel","mailPrivatePlaceholder","mailButtonText","pendingPopover","pendingPopoverMenuTemplate","getShareeList","replace","popover","getPopoverObject","popoverMenuTemplate","onMenuhide","delegateEvents","autosize","isPasswordEnabledByDefault","debug","onPopUpClick","left","screen","width","top","height","open","href","onExpireDateChange","datePicker","state","showDatePicker","setExpirationDate","expirationDatePicker","onSelect","onChangeExpirationDate","list","index","getShareeObject","stime","appswebroots","shareTime","isNumber","stripTime","getTime","onUnshare","eq","remove","ShareDialogShareeListView","_menuOpen","_renderPermissionChange","sharedBy","sharedByDisplayName","fileOwnerUid","SHARE_TYPE_REMOTE","SHARE_TYPE_REMOTE_GROUP","SHARE_TYPE_EMAIL","getCurrentUser","uid","sharer","hasPassword","isRemoteShare","isRemoteGroupShare","isCircleShare","isFileSharedByMail","getShareProperties","crudsLabel","triangleSImage","imagePath","universal","getLinkReshares","shareInitiatorDisplayName","permissionChangeShareId","shareWithIndex","sharee","replaceWith","css","imageplaceholder","_this","forEach","$edit","datePickerClass","datePickerInput","expireDateCheckbox","liSelector","log","onMailSharePasswordProtectChange","element","passwordContainerClass","passwordContainer","loading","inputClass","passwordField","passwordByTalkElement","passwordByTalkState","passwordByTalkContainerClass","onMailSharePasswordProtectByTalkChange","passwordByTalkContainer","passwordByTalkField","passwordElement","passwordState","onMailSharePasswordKeyUp","onMailSharePasswordEntered","startsWith","blur","onPermissionChange","checked","$checkboxes","not","numberChecked","$editCb","checkbox","enableCb","elem","onSecureDropChange","ShareDialogView","_templates","_showLink","_lookup","_lookupAllowed","resharerInfoView","linkShareView","shareeListView","_lastSuggestions","_lastRecommendations","_pendingOperationsCount","_onRequest","_onEndRequest","subViewOptions","subViews","Plugins","attach","onShareWithFieldChanged","onShareWithFieldFocus","$shareWithField","autocomplete","_getSuggestions","searchTerm","perPage","lookup","promise","capabilities","files_sharing","query_lookup_default","search","itemType","statuscode","users","groups","remotes","remote_groups","emails","circles","rooms","usersLength","groupsLength","remotesLength","remoteGroupsLength","emailsLength","circlesLength","roomsLength","j","splice","sharesLength","exact","exactUsers","exactGroups","exactRemotes","exactRemoteGroups","exactEmails","exactCircles","exactRooms","exactMatches","concat","remoteGroups","lookupEnabled","grouped","sort","a","b","aProperty","bProperty","previousUuid","groupedLength","uuid","merged","moreResultsAvailable","config","Math","min","max","_getRecommendations","recommendationHandler","suggestions","info","autocompleteHandler","term","$confirm","count","title","append","autocompleteRenderItem","ul","item","icon","text","escapeHTML","description","getTranslatedType","circleInfo","circleOwner","insert","appendTo","RegExp","_onSelectRecipient","stopImmediatePropagation","_confirmShare","restoreUI","_toggleLoading","_loading","_loadingOnce","baseTemplate","_renderSharePlaceholderPart","$shareField","source","numberOfItems","size","_renderItem","setShowLink","allowRemoteSharing","allowMailSharing","SHARE_TYPE_GUEST","_REMOTE_OWNER_REGEXP","droppedDown","loadIcons","fileList","callback","dirInfo","subfiles","it","updateIcons","$fileList","currentDir","OCA","Files","App","getCurrentDirectory","hasLink","img","file","shareFolder","markFileAsShared","dir","last","actions","files","image","prepend","dirname","updateIcon","itemSource","$tr","filterAttr","String","_formatRemoteShare","parts","exec","userName","userDomain","server","_formatShareList","recipients","_parent","toArray","localeCompare","recipient","hasShares","avatars","shareFolderIcon","action","ownerId","mountType","MimeType","getIconUrl","indexOf","removeAttr","showDropDown","filename","itemModel","dialogView","$dialog","slideDown","hideDropDown","slideUp","FileActions","document","ready","monthNames","monthNamesShort","dayNames","dayNamesMin","dayNamesShort","firstDay","click","isMatched","has"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAA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tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import './shareconfigmodel.js';\nimport './sharetemplates.js';\nimport './shareitemmodel.js';\nimport './sharesocialmanager.js';\nimport './sharedialogresharerinfoview.js';\nimport './sharedialoglinkshareview.js';\nimport './sharedialogshareelistview.js';\nimport './sharedialogview.js';\nimport './share.js';\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* global moment, OC */\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 \"\\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,\"loc\":{\"start\":{\"line\":3,\"column\":1},\"end\":{\"line\":17,\"column\":8}}})) != 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,\"loc\":{\"start\":{\"line\":18,\"column\":1},\"end\":{\"line\":36,\"column\":10}}})) != null ? stack1 : \"\")\n + \" \\n\";\n},\"2\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t \\n\t\t\t
\\n\t\t\t\"\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,\"loc\":{\"start\":{\"line\":6,\"column\":26},\"end\":{\"line\":6,\"column\":43}}}) : helper)))\n + \" \\n\t\t\t\\n\t\t\t\t\\n\t\t\t \\n\t\t \\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 : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"pendingPopoverMenu\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":12,\"column\":6},\"end\":{\"line\":12,\"column\":30}}}) : helper))) != null ? stack1 : \"\")\n + \"\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\\n\t\t\t
\\n\t\t\t\"\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,\"loc\":{\"start\":{\"line\":21,\"column\":60},\"end\":{\"line\":21,\"column\":78}}}) : helper)))\n + \" \\n\t\t\t\\n\t\t\t\\n\t\t\t\t \\n\t\t\t\t\\n\t\t\t \\n\t\t \\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 : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"popoverMenu\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":31,\"column\":6},\"end\":{\"line\":31,\"column\":23}}}) : 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,\"loc\":{\"start\":{\"line\":39,\"column\":0},\"end\":{\"line\":39,\"column\":161}}})) != null ? stack1 : \"\")\n + \"\\n\";\n},\"11\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \" \";\n},\"compiler\":[8,\">= 4.3.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,\"loc\":{\"start\":{\"line\":1,\"column\":0},\"end\":{\"line\":40,\"column\":7}}})) != 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=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t\\n\t\t\t\t\\n\t\t\t \\n\t\t\t\\n\t\t\t\t\\n\t\t\t \\n\t\t\t\\n\t\t\t\t\\n\t\t\t \\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t\\n\t\t\t\t\\n\t\t\t \\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n return \"checked=\\\"checked\\\"\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n return \"disabled=\\\"disabled\\\"\";\n},\"9\":function(container,depth0,helpers,partials,data) {\n return \"hidden\";\n},\"11\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t\\n\t\t\t\t\\n\t\t\t\t\t \\n\t\t\t\t\t \\n\t\t\t\t\t\"\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,\"loc\":{\"start\":{\"line\":68,\"column\":41},\"end\":{\"line\":68,\"column\":64}}}) : helper)))\n + \" \\n\t\t\t\t \\n\t\t\t \\n\";\n},\"13\":function(container,depth0,helpers,partials,data) {\n return \"datepicker\";\n},\"15\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return container.escapeExpression(((helper = (helper = helpers.expireDate || (depth0 != null ? depth0.expireDate : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"expireDate\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":84,\"column\":77},\"end\":{\"line\":84,\"column\":91}}}) : helper)));\n},\"17\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return container.escapeExpression(((helper = (helper = helpers.defaultExpireDate || (depth0 != null ? depth0.defaultExpireDate : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"defaultExpireDate\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":84,\"column\":99},\"end\":{\"line\":84,\"column\":120}}}) : helper)));\n},\"19\":function(container,depth0,helpers,partials,data) {\n return \"readonly\";\n},\"21\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t\\n\t\t\t\t\\n\t\t\t \\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\\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=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t\\n\t\t\t\t\\n\t\t\t \\n\t\t\t\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return \"\\n\";\n},\"useData\":true});\ntemplates['sharedialogresharerinfoview'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"\"\n + container.escapeExpression(((helper = (helper = helpers.shareNote || (depth0 != null ? depth0.shareNote : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"shareNote\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":5,\"column\":44},\"end\":{\"line\":5,\"column\":57}}}) : helper)))\n + \"
\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\\n\t
\\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,\"loc\":{\"start\":{\"line\":3,\"column\":1},\"end\":{\"line\":3,\"column\":17}}}) : helper)))\n + \"\\n \\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,\"loc\":{\"start\":{\"line\":5,\"column\":0},\"end\":{\"line\":5,\"column\":70}}})) != 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,\"loc\":{\"start\":{\"line\":3,\"column\":8},\"end\":{\"line\":21,\"column\":12}}})) != null ? stack1 : \"\");\n},\"2\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\\n\t\t\t
\\n\t\t\t\"\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,\"loc\":{\"start\":{\"line\":6,\"column\":53},\"end\":{\"line\":6,\"column\":77}}}) : helper)))\n + \" \\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,\"loc\":{\"start\":{\"line\":7,\"column\":3},\"end\":{\"line\":19,\"column\":10}}})) != null ? stack1 : \"\")\n + \"\t\t \\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=container.hooks.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,\"loc\":{\"start\":{\"line\":5,\"column\":200},\"end\":{\"line\":5,\"column\":213}}}) : 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,\"loc\":{\"start\":{\"line\":5,\"column\":214},\"end\":{\"line\":5,\"column\":227}}}) : 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\\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,\"loc\":{\"start\":{\"line\":9,\"column\":4},\"end\":{\"line\":14,\"column\":11}}})) != null ? stack1 : \"\")\n + \"\t\t\t\t\\n\t\t\t \\n\";\n},\"8\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t\t\t\\n\t\t\t\t\t\t \\n\t\t\t\t\t\t\"\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,\"loc\":{\"start\":{\"line\":12,\"column\":47},\"end\":{\"line\":12,\"column\":63}}}) : helper)))\n + \" \\n\t\t\t\t\t \\n\";\n},\"10\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\\n\t\t\t
\\n\t\t\t\"\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,\"loc\":{\"start\":{\"line\":26,\"column\":65},\"end\":{\"line\":26,\"column\":87}}}) : helper)))\n + \" \\n\t\t\t\\n\t\t\t\t\"\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,\"loc\":{\"start\":{\"line\":28,\"column\":147},\"end\":{\"line\":28,\"column\":163}}}) : helper)))\n + \" \\n\t\t\t \\n\t\t \\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \"\\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,\"loc\":{\"start\":{\"line\":2,\"column\":1},\"end\":{\"line\":22,\"column\":10}}})) != 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,\"loc\":{\"start\":{\"line\":23,\"column\":1},\"end\":{\"line\":31,\"column\":10}}})) != null ? stack1 : \"\")\n + \" \\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,\"loc\":{\"start\":{\"line\":3,\"column\":29},\"end\":{\"line\":10,\"column\":22}}})) != 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,\"loc\":{\"start\":{\"line\":3,\"column\":61},\"end\":{\"line\":10,\"column\":14}}})) != null ? stack1 : \"\")\n + \" \";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\\n\t\t\t\\n\t\t\t\t\\n\t\t\t\t \\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,\"loc\":{\"start\":{\"line\":12,\"column\":3},\"end\":{\"line\":19,\"column\":21}}})) != 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,\"loc\":{\"start\":{\"line\":20,\"column\":3},\"end\":{\"line\":27,\"column\":22}}})) != 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,\"loc\":{\"start\":{\"line\":28,\"column\":3},\"end\":{\"line\":35,\"column\":22}}})) != 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,\"loc\":{\"start\":{\"line\":12,\"column\":35},\"end\":{\"line\":19,\"column\":14}}})) != null ? stack1 : \"\");\n},\"8\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\\n\t\t\t\t\\n\t\t\t\t\t\\n\t\t\t\t \\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,\"loc\":{\"start\":{\"line\":20,\"column\":35},\"end\":{\"line\":27,\"column\":15}}})) != null ? stack1 : \"\");\n},\"11\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\\n\t\t\t\t\\n\t\t\t\t\t\\n\t\t\t\t \\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,\"loc\":{\"start\":{\"line\":28,\"column\":35},\"end\":{\"line\":35,\"column\":15}}})) != null ? stack1 : \"\");\n},\"14\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\\n\t\t\t\t\\n\t\t\t\t\t\\n\t\t\t\t \\n\t\t\t\t\";\n},\"16\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.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,\"loc\":{\"start\":{\"line\":38,\"column\":3},\"end\":{\"line\":45,\"column\":10}}})) != null ? stack1 : \"\")\n + \"\t\t\t\\n\t\t\t\t\\n\t\t\t \\n\t\t\t\\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,\"loc\":{\"start\":{\"line\":59,\"column\":3},\"end\":{\"line\":73,\"column\":11}}})) != null ? stack1 : \"\");\n},\"17\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t\t\\n\t\t\t\t\t\\n\t\t\t\t \\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,\"loc\":{\"start\":{\"line\":48,\"column\":170},\"end\":{\"line\":48,\"column\":227}}})) != 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=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t\t\\n\t\t\t\t\t\\n\t\t\t\t \\n\t\t\t\t\\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 : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"expireDate\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":84,\"column\":160},\"end\":{\"line\":84,\"column\":174}}}) : 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 : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"defaultExpireDate\",\"hash\":{},\"data\":data,\"loc\":{\"start\":{\"line\":84,\"column\":182},\"end\":{\"line\":84,\"column\":203}}}) : helper)));\n},\"30\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\t\t\\n\t\t\t\t\\n\t\t\t\t\t \\n\t\t\t\t\t \\n\t\t\t\t\t\"\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,\"loc\":{\"start\":{\"line\":92,\"column\":11},\"end\":{\"line\":92,\"column\":27}}}) : helper)))\n + \" \\n\t\t\t\t\t \\n\t\t\t\t \\n\t\t\t \\n\t\t\t\\n\t\t\t\t\\n\t\t\t \\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\\n\";\n},\"useData\":true});\ntemplates['sharedialogview'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"\t\"\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,\"loc\":{\"start\":{\"line\":3,\"column\":56},\"end\":{\"line\":3,\"column\":70}}}) : helper)))\n + \" \\n\t\\n\t\t \\n\t\t \\n\t\t \\n\t
\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return \"
\\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,\"loc\":{\"start\":{\"line\":2,\"column\":0},\"end\":{\"line\":9,\"column\":7}}})) != null ? stack1 : \"\")\n + \"
\\n
\\n
\\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.}\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.} 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 \n *\n * @author Roeland Jago Douma \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 .\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 {boolean} **/\n\t\thasPasswordChanged: 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}\n\t\t\t\t\t},\n\t\t\t\t\terror: function() {\n\t\t\t\t\t\t// empty function to override the default Dialog warning\n\t\t\t\t\t}\n\t\t\t\t})).fail(function(response) {\n\t\t\t\t\t// password failure? Show error\n\t\t\t\t\tself.password = ''\n\t\t\t\t\tif (isPasswordEnforced && response && response.responseJSON && response.responseJSON.ocs.meta && response.responseJSON.ocs.meta.message) {\n\t\t\t\t\t\tvar $input = self.$el.find('.pending #enforcedPassText')\n\t\t\t\t\t\t$input.tooltip('destroy');\n\t\t\t\t\t\t$input.attr('title', response.responseJSON.ocs.meta.message);\n\t\t\t\t\t\t$input.tooltip({placement: 'bottom', trigger: 'manual'});\n\t\t\t\t\t\t$input.tooltip('show');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Unable to create a link share'));\n\t\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t\t$li.find('.icon').removeClass('hidden');\n\t\t\t\t\t}\n\t\t\t\t}).then(function(response) {\n\t\t\t\t\t// resolve before success\n\t\t\t\t\tnewShareId = response.ocs.data.id\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\n\t\tenforcedPasswordSet: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tvar $form = $(event.target);\n\t\t\tvar $input = $form.find('input.enforcedPassText');\n\t\t\tthis.password = $input.val();\n\t\t\tthis.showPending = false;\n\t\t\tthis.newShare(event);\n\t\t},\n\n\t\tonLinkTextClick: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar $el = $li.find('.linkText');\n\t\t\t$el.focus();\n\t\t\t$el.select();\n\t\t},\n\n\t\tonHideDownloadChange: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $checkbox = $li.find('.hideDownloadCheckbox');\n\t\t\t$checkbox.siblings('.icon-loading-small').removeClass('hidden').addClass('inlineblock');\n\n\t\t\tvar hideDownload = false;\n\t\t\tif($checkbox.is(':checked')) {\n\t\t\t\thideDownload = true;\n\t\t\t}\n\n\t\t\tthis.model.saveLinkShare({\n\t\t\t\thideDownload: hideDownload,\n\t\t\t\tcid: shareId\n\t\t\t}, {\n\t\t\t\tsuccess: function() {\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock');\n\t\t\t\t},\n\t\t\t\terror: function(obj, msg) {\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Unable to toggle this option'));\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tonShowPasswordClick: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\t$li.find('.linkPass').slideToggle(OC.menuSpeed);\n\t\t\t$li.find('.linkPassMenu').toggleClass('hidden');\n\t\t\tif(!$li.find('.showPasswordCheckbox').is(':checked')) {\n\t\t\t\tthis.model.saveLinkShare({\n\t\t\t\t\tpassword: '',\n\t\t\t\t\tcid: shareId\n\t\t\t\t});\n\t\t\t\tthis.hasPasswordChanged = false\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\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\tif (event.keyCode === 13) {\n\t\t\t\tthis.onPasswordEntered(event);\n\t\t\t} else {\n\t\t\t\tthis.hasPasswordChanged = shareId\n\t\t\t}\n\t\t},\n\n\t\tonPasswordEntered: function(event) {\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 $loading = $li.find('.linkPassMenu .icon-loading-small');\n\t\t\tif (!$loading.hasClass('hidden')) {\n\t\t\t\t// still in process\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar $input = $li.find('.linkPassText');\n\t\t\t$input.removeClass('error');\n\t\t\t$input.parent().find('input').removeClass('error');\n\t\t\tvar password = $input.val();\n\n\t\t\tif ($li.find('.linkPassText').attr('placeholder') === PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL) {\n\n\t\t\t\t// in IE9 the password might be the placeholder due to bugs in the placeholders polyfill\n\t\t\t\tif(password === PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL) {\n\t\t\t\t\tpassword = '';\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t// in IE9 the password might be the placeholder due to bugs in the placeholders polyfill\n\t\t\t\tif(password === '' || password === PASSWORD_PLACEHOLDER || password === PASSWORD_PLACEHOLDER_MESSAGE) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$loading\n\t\t\t\t.removeClass('hidden')\n\t\t\t\t.addClass('inlineblock');\n\t\t\t\n\t\t\tthis.hasPasswordChanged = false\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// force open the menu\n\t\t\t\t\tif (event) {\n\t\t\t\t\t\tself.onToggleMenu(event)\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add visual feedback to both the input and the submit button\n\t\t\t\t\t$input.parent().find('input').addClass('error');\n\n\t\t\t\t\t// destroy old tooltips\n\t\t\t\t\tvar $container = $input.parent();\n\t\t\t\t\t$container.tooltip('destroy');\n\t\t\t\t\t$input.addClass('error');\n\t\t\t\t\t$container.attr('title', msg);\n\t\t\t\t\t$container.tooltip({placement: 'bottom', trigger: 'manual'});\n\t\t\t\t\t$container.tooltip('show');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tonPasswordByTalkChange: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $checkbox = $li.find('.passwordByTalkCheckbox');\n\t\t\t$checkbox.siblings('.icon-loading-small').removeClass('hidden').addClass('inlineblock');\n\n\t\t\tvar sendPasswordByTalk = false;\n\t\t\tif($checkbox.is(':checked')) {\n\t\t\t\tsendPasswordByTalk = true;\n\t\t\t}\n\n\t\t\tthis.model.saveLinkShare({\n\t\t\t\tsendPasswordByTalk: sendPasswordByTalk,\n\t\t\t\tcid: shareId\n\t\t\t}, {\n\t\t\t\tsuccess: function() {\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock');\n\t\t\t\t},\n\t\t\t\terror: function(obj, msg) {\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Unable to toggle this option'));\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tonAllowPublicEditingChange: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $checkbox = $li.find('.publicEditingCheckbox');\n\t\t\t$checkbox.siblings('.icon-loading-small').removeClass('hidden').addClass('inlineblock');\n\n\t\t\tvar permissions = OC.PERMISSION_READ;\n\t\t\tif($checkbox.is(':checked')) {\n\t\t\t\tpermissions = OC.PERMISSION_UPDATE | OC.PERMISSION_READ;\n\t\t\t}\n\n\t\t\tthis.model.saveLinkShare({\n\t\t\t\tpermissions: permissions,\n\t\t\t\tcid: shareId\n\t\t\t}, {\n\t\t\t\tsuccess: function() {\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock');\n\t\t\t\t},\n\t\t\t\terror: function(obj, msg) {\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Unable to toggle this option'));\n\t\t\t\t\t$checkbox.siblings('.icon-loading-small').addClass('hidden').removeClass('inlineblock');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\n\t\tonPublicUploadChange: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar permissions = event.currentTarget.value;\n\t\t\tthis.model.saveLinkShare({\n\t\t\t\tpermissions: permissions,\n\t\t\t\tcid: shareId\n\t\t\t});\n\t\t},\n\n\t\tshowNoteForm: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar self = this;\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar $menu = $element.closest('li');\n\t\t\tvar $form = $menu.next('li.share-note-form');\n\n\t\t\t// show elements\n\t\t\t$menu.find('.share-note-delete').toggleClass('hidden');\n\t\t\t$form.toggleClass('hidden');\n\t\t\t$form.find('textarea').focus();\n\t\t},\n\n\t\tdeleteNote: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar self = this;\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $menu = $element.closest('li');\n\t\t\tvar $form = $menu.next('li.share-note-form');\n\n\t\t\t$form.find('.share-note').val('');\n\n\t\t\t$form.addClass('hidden');\n\t\t\t$menu.find('.share-note-delete').addClass('hidden');\n\n\t\t\tself.sendNote('', shareId, $menu);\n\t\t},\n\n\t\tupdateNote: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar self = this;\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $form = $element.closest('li.share-note-form');\n\t\t\tvar $menu = $form.prev('li');\n\t\t\tvar message = $form.find('.share-note').val().trim();\n\n\t\t\tif (message.length < 1) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tself.sendNote(message, shareId, $menu);\n\t\t},\n\n\t\tsendNote: function(note, shareId, $menu) {\n\t\t\tvar $form = $menu.next('li.share-note-form');\n\t\t\tvar $submit = $form.find('input.share-note-submit');\n\t\t\tvar $error = $form.find('input.share-note-error');\n\n\t\t\t$submit.prop('disabled', true);\n\t\t\t$menu.find('.icon-loading-small').removeClass('hidden');\n\t\t\t$menu.find('.icon-edit').hide();\n\n\t\t\tvar complete = function() {\n\t\t\t\t$submit.prop('disabled', false);\n\t\t\t\t$menu.find('.icon-loading-small').addClass('hidden');\n\t\t\t\t$menu.find('.icon-edit').show();\n\t\t\t};\n\t\t\tvar error = function() {\n\t\t\t\t$error.show();\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t$error.hide();\n\t\t\t\t}, 3000);\n\t\t\t};\n\n\t\t\t// send data\n\t\t\t$.ajax({\n\t\t\t\tmethod: 'PUT',\n\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1/shares',2) + shareId + '?' + OC.buildQueryString({format: 'json'}),\n\t\t\t\tdata: { note: note },\n\t\t\t\tcomplete : complete,\n\t\t\t\terror: error\n\t\t\t});\n\t\t},\n\n\t\trender: function() {\n\t\t\tthis.$el.find('.has-tooltip').tooltip();\n\n\t\t\t// reset previously set passwords\n\t\t\tthis.password = '';\n\n\t\t\tvar linkShareTemplate = this.template();\n\t\t\tvar resharingAllowed = this.model.sharePermissionPossible();\n\n\t\t\tif(!resharingAllowed\n\t\t\t\t|| !this.showLink\n\t\t\t\t|| !this.configModel.isShareWithLinkAllowed())\n\t\t\t{\n\t\t\t\tvar templateData = {shareAllowed: false};\n\t\t\t\tif (!resharingAllowed) {\n\t\t\t\t\t// add message\n\t\t\t\t\ttemplateData.noSharingPlaceholder = t('core', 'Resharing is not allowed');\n\t\t\t\t}\n\t\t\t\tthis.$el.html(linkShareTemplate(templateData));\n\t\t\t\treturn this;\n\t\t\t}\n\n\t\t\tvar publicUpload =\n\t\t\t\tthis.model.isFolder()\n\t\t\t\t&& this.model.createPermissionPossible()\n\t\t\t\t&& this.configModel.isPublicUploadEnabled();\n\n\n\t\t\tvar publicEditingChecked = '';\n\t\t\tif(this.model.isPublicEditingAllowed()) {\n\t\t\t\tpublicEditingChecked = 'checked=\"checked\"';\n\t\t\t}\n\n\t\t\tvar isPasswordEnforced = this.configModel.get('enforcePasswordForPublicLink');\n\t\t\tvar isPasswordEnabledByDefault = this.configModel.get('enableLinkPasswordByDefault') === true;\n\t\t\tvar passwordPlaceholderInitial = this.configModel.get('enforcePasswordForPublicLink')\n\t\t\t\t? PASSWORD_PLACEHOLDER_MESSAGE : PASSWORD_PLACEHOLDER_MESSAGE_OPTIONAL;\n\n\t\t\tvar publicEditable =\n\t\t\t\t!this.model.isFolder()\n\t\t\t\t&& this.model.updatePermissionPossible();\n\n\t\t\tvar isExpirationEnforced = this.configModel.get('isDefaultExpireDateEnforced');\n\n\t\t\t// what if there is another date picker on that page?\n\t\t\tvar minDate = new Date();\n\t\t\t// min date should always be the next day\n\t\t\tminDate.setDate(minDate.getDate()+1);\n\n\t\t\t$.datepicker.setDefaults({\n\t\t\t\tminDate: minDate\n\t\t\t});\n\n\t\t\tthis.$el.find('.datepicker').datepicker({dateFormat : 'dd-mm-yy'});\n\n\t\t\tvar minPasswordLength = 4\n\t\t\t// password policy?\n\t\t\tif(OC.getCapabilities().password_policy && OC.getCapabilities().password_policy.minLength) {\n\t\t\t\tminPasswordLength = OC.getCapabilities().password_policy.minLength;\n\t\t\t}\n\n\t\t\tvar popoverBase = {\n\t\t\t\turlLabel: t('core', 'Link'),\n\t\t\t\thideDownloadLabel: t('core', 'Hide download'),\n\t\t\t\tenablePasswordLabel: isPasswordEnforced ? t('core', 'Password protection enforced') : t('core', 'Password protect'),\n\t\t\t\tpasswordLabel: t('core', 'Password'),\n\t\t\t\tpasswordPlaceholderInitial: passwordPlaceholderInitial,\n\t\t\t\tpublicUpload: publicUpload,\n\t\t\t\tpublicEditing: publicEditable,\n\t\t\t\tpublicEditingChecked: publicEditingChecked,\n\t\t\t\tpublicEditingLabel: t('core', 'Allow editing'),\n\t\t\t\tmailPrivatePlaceholder: t('core', 'Email link to person'),\n\t\t\t\tmailButtonText: t('core', 'Send'),\n\t\t\t\tpublicUploadRWLabel: t('core', 'Allow upload and editing'),\n\t\t\t\tpublicUploadRLabel: t('core', 'Read only'),\n\t\t\t\tpublicUploadWLabel: t('core', 'File drop (upload only)'),\n\t\t\t\tpublicUploadRWValue: OC.PERMISSION_UPDATE | OC.PERMISSION_CREATE | OC.PERMISSION_READ | OC.PERMISSION_DELETE,\n\t\t\t\tpublicUploadRValue: OC.PERMISSION_READ,\n\t\t\t\tpublicUploadWValue: OC.PERMISSION_CREATE,\n\t\t\t\texpireDateLabel: isExpirationEnforced ? t('core', 'Expiration date enforced') : t('core', 'Set expiration date'),\n\t\t\t\texpirationLabel: t('core', 'Expiration'),\n\t\t\t\texpirationDatePlaceholder: t('core', 'Expiration date'),\n\t\t\t\tisExpirationEnforced: isExpirationEnforced,\n\t\t\t\tisPasswordEnforced: isPasswordEnforced,\n\t\t\t\tdefaultExpireDate: moment().add(1, 'day').format('DD-MM-YYYY'), // Can't expire today\n\t\t\t\taddNoteLabel: t('core', 'Note to recipient'),\n\t\t\t\tunshareLabel: t('core', 'Unshare'),\n\t\t\t\tunshareLinkLabel: t('core', 'Delete share link'),\n\t\t\t\tnewShareLabel: t('core', 'Add another link'),\n\t\t\t};\n\n\t\t\tvar pendingPopover = {\n\t\t\t\tisPasswordEnforced: isPasswordEnforced,\n\t\t\t\tenforcedPasswordLabel: t('core', 'Password protection for links is mandatory'),\n\t\t\t\tpasswordPlaceholder: passwordPlaceholderInitial,\n\t\t\t\tminPasswordLength: minPasswordLength,\n\t\t\t};\n\t\t\tvar pendingPopoverMenu = this.pendingPopoverMenuTemplate(_.extend({}, pendingPopover))\n\n\t\t\tvar linkShares = this.getShareeList();\n\t\t\tif(_.isArray(linkShares)) {\n\t\t\t\tfor (var i = 0; i < linkShares.length; i++) {\n\t\t\t\t\tvar social = [];\n\t\t\t\t\tOC.Share.Social.Collection.each(function (model) {\n\t\t\t\t\t\tvar url = model.get('url');\n\t\t\t\t\t\turl = url.replace('{{reference}}', linkShares[i].shareLinkURL);\n\t\t\t\t\t\tsocial.push({\n\t\t\t\t\t\t\turl: url,\n\t\t\t\t\t\t\tlabel: t('core', 'Share to {name}', {name: model.get('name')}),\n\t\t\t\t\t\t\tname: model.get('name'),\n\t\t\t\t\t\t\ticonClass: model.get('iconClass'),\n\t\t\t\t\t\t\tnewWindow: model.get('newWindow')\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t\tvar popover = this.getPopoverObject(linkShares[i])\n\t\t\t\t\tlinkShares[i].popoverMenu = this.popoverMenuTemplate(_.extend({}, popoverBase, popover, {social: social}));\n\t\t\t\t\tlinkShares[i].pendingPopoverMenu = pendingPopoverMenu\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.$el.on('beforeHide', function(e) {\n\t\t\t\tthis.onMenuhide(e)\n\t\t\t}.bind(this));\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\tonMenuhide: function(event) {\n\t\t\tif (this.hasPasswordChanged) {\n\t\t\t\tvar shareId = this.hasPasswordChanged\n\t\t\t\tvar target = this.$el.find('li[data-share-id=' + shareId + '] #linkPassText-' + shareId);\n\t\t\t\tconsole.debug('Force saving password for share number ', shareId)\n\t\t\t\t// replace target by last opened menu\n\t\t\t\tthis.onPasswordEntered(_.extend(event, { target: target }))\n\t\t\t}\n\t\t\t// force close all opened tooltips\n\t\t\tthis.$el.find('[data-original-title]').tooltip('hide')\n\t\t},\n\n\t\t/**\n\t\t * @returns {Function} from Handlebars\n\t\t * @private\n\t\t */\n\t\ttemplate: function () {\n\t\t\treturn OC.Share.Templates['sharedialoglinkshareview'];\n\t\t},\n\n\t\t/**\n\t\t * renders the popover template and returns the resulting HTML\n\t\t *\n\t\t * @param {Object} data\n\t\t * @returns {string}\n\t\t */\n\t\tpopoverMenuTemplate: function(data) {\n\t\t\treturn OC.Share.Templates['sharedialoglinkshareview_popover_menu'](data);\n\t\t},\n\n\t\t/**\n\t\t * renders the pending popover template and returns the resulting HTML\n\t\t *\n\t\t * @param {Object} data\n\t\t * @returns {string}\n\t\t */\n\t\tpendingPopoverMenuTemplate: function(data) {\n\t\t\treturn OC.Share.Templates['sharedialoglinkshareview_popover_menu_pending'](data);\n\t\t},\n\n\t\tonPopUpClick: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\n\t\t\tvar url = $(event.currentTarget).data('url');\n\t\t\tvar newWindow = $(event.currentTarget).data('window');\n\t\t\t$(event.currentTarget).tooltip('hide');\n\t\t\tif (url) {\n\t\t\t\tif (newWindow === true) {\n\t\t\t\t\tvar width = 600;\n\t\t\t\t\tvar height = 400;\n\t\t\t\t\tvar left = (screen.width / 2) - (width / 2);\n\t\t\t\t\tvar top = (screen.height / 2) - (height / 2);\n\n\t\t\t\t\twindow.open(url, 'name', 'width=' + width + ', height=' + height + ', top=' + top + ', left=' + left);\n\t\t\t\t} else {\n\t\t\t\t\twindow.location.href = url;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tonExpireDateChange: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar expirationDatePicker = '#expirationDateContainer-' + shareId;\n\t\t\tvar datePicker = $(expirationDatePicker);\n\t\t\tvar state = $element.prop('checked');\n\t\t\tdatePicker.toggleClass('hidden', !state);\n\n\t\t\tif (!state) {\n\t\t\t\t// disabled, let's hide the input and\n\t\t\t\t// set the expireDate to nothing\n\t\t\t\t$element.closest('li').next('li').addClass('hidden');\n\t\t\t\tthis.setExpirationDate('', shareId);\n\t\t\t} else {\n\t\t\t\t// enabled, show the input and the datepicker\n\t\t\t\t$element.closest('li').next('li').removeClass('hidden');\n\t\t\t\tthis.showDatePicker(event);\n\n\t\t\t}\n\t\t},\n\n\t\tshowDatePicker: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar maxDate = $element.data('max-date');\n\t\t\tvar expirationDatePicker = '#expirationDatePicker-' + shareId;\n\t\t\tvar self = this;\n\n\t\t\t$(expirationDatePicker).datepicker({\n\t\t\t\tdateFormat : 'dd-mm-yy',\n\t\t\t\tonSelect: function (expireDate) {\n\t\t\t\t\tself.setExpirationDate(expireDate, shareId);\n\t\t\t\t},\n\t\t\t\tmaxDate: maxDate\n\t\t\t});\n\t\t\t$(expirationDatePicker).datepicker('show');\n\t\t\t$(expirationDatePicker).focus();\n\n\t\t},\n\n\t\tsetExpirationDate: function(expireDate, shareId) {\n\t\t\tthis.model.saveLinkShare({expireDate: expireDate, cid: shareId});\n\t\t},\n\n\t\tonChangeExpirationDate: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar expireDate = $element.val();\n\t\t\tvar li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar expirationDatePicker = '#expirationDatePicker-' + shareId;\n\n\t\t\tthis.setExpirationDate(expireDate, shareId);\n\t\t\t$(expirationDatePicker).datepicker('hide');\n\t\t},\n\n\t\t/**\n\t\t * get an array of sharees' share properties\n\t\t *\n\t\t * @returns {Array}\n\t\t */\n\t\tgetShareeList: function() {\n\t\t\tvar shares = this.model.get('linkShares');\n\n\t\t\tif(!this.model.hasLinkShares()) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tvar list = [];\n\t\t\tfor(var index = 0; index < shares.length; index++) {\n\t\t\t\tvar share = this.getShareeObject(index);\n\t\t\t\t// first empty {} is necessary, otherwise we get in trouble\n\t\t\t\t// with references\n\t\t\t\tlist.push(_.extend({}, share));\n\t\t\t}\n\n\t\t\treturn list;\n\t\t},\n\n\t\t/**\n\t\t *\n\t\t * @param {OC.Share.Types.ShareInfo} shareInfo\n\t\t * @returns {object}\n\t\t */\n\t\tgetShareeObject: function(shareIndex) {\n\t\t\tvar share = this.model.get('linkShares')[shareIndex];\n\n\t\t\treturn _.extend({}, share, {\n\t\t\t\tcid: share.id,\n\t\t\t\tshareAllowed: true,\n\t\t\t\tlinkShareLabel: share.label ? share.label : t('core', 'Share link'),\n\t\t\t\tpopoverMenu: {},\n\t\t\t\tshareLinkURL: share.url,\n\t\t\t\tnewShareTitle: t('core', 'New share link'),\n\t\t\t\tcopyLabel: t('core', 'Copy link'),\n\t\t\t\tshowPending: this.showPending === share.id,\n\t\t\t\tlinkShareCreationDate: t('core', 'Created on {time}', { time: moment(share.stime * 1000).format('LLLL') })\n\t\t\t})\n\t\t},\n\n\t\tgetPopoverObject: function(share) {\n\t\t\tvar publicUploadRWChecked = '';\n\t\t\tvar publicUploadRChecked = '';\n\t\t\tvar publicUploadWChecked = '';\n\n\t\t\tswitch (this.model.linkSharePermissions(share.id)) {\n\t\t\t\tcase OC.PERMISSION_READ:\n\t\t\t\t\tpublicUploadRChecked = 'checked';\n\t\t\t\t\tbreak;\n\t\t\t\tcase OC.PERMISSION_CREATE:\n\t\t\t\t\tpublicUploadWChecked = 'checked';\n\t\t\t\t\tbreak;\n\t\t\t\tcase OC.PERMISSION_UPDATE | OC.PERMISSION_CREATE | OC.PERMISSION_READ | OC.PERMISSION_DELETE:\n\t\t\t\t\tpublicUploadRWChecked = 'checked';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tvar isPasswordSet = !!share.password;\n\t\t\tvar isPasswordEnabledByDefault = this.configModel.get('enableLinkPasswordByDefault') === true;\n\t\t\tvar isPasswordEnforced = this.configModel.get('enforcePasswordForPublicLink');\n\t\t\tvar isExpirationEnforced = this.configModel.get('isDefaultExpireDateEnforced');\n\t\t\tvar defaultExpireDays = this.configModel.get('defaultExpireDate');\n\t\t\tvar hasExpireDate = !!share.expiration || isExpirationEnforced;\n\n\t\t\tvar expireDate;\n\t\t\tif (hasExpireDate) {\n\t\t\t\texpireDate = moment(share.expiration, 'YYYY-MM-DD').format('DD-MM-YYYY');\n\t\t\t}\n\n\t\t\tvar isTalkEnabled = OC.appswebroots['spreed'] !== undefined;\n\t\t\tvar sendPasswordByTalk = share.sendPasswordByTalk;\n\n\t\t\tvar hideDownload = share.hideDownload;\n\n\t\t\tvar maxDate = null;\n\n\t\t\tif(hasExpireDate) {\n\t\t\t\tif(isExpirationEnforced) {\n\t\t\t\t\t// TODO: hack: backend returns string instead of integer\n\t\t\t\t\tvar shareTime = share.stime;\n\t\t\t\t\tif (_.isNumber(shareTime)) {\n\t\t\t\t\t\tshareTime = new Date(shareTime * 1000);\n\t\t\t\t\t}\n\t\t\t\t\tif (!shareTime) {\n\t\t\t\t\t\tshareTime = new Date(); // now\n\t\t\t\t\t}\n\t\t\t\t\tshareTime = OC.Util.stripTime(shareTime).getTime();\n\t\t\t\t\tmaxDate = new Date(shareTime + defaultExpireDays * 24 * 3600 * 1000);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn {\n\t\t\t\tcid: share.id,\n\t\t\t\tshareLinkURL: share.url,\n\t\t\t\tpasswordPlaceholder: isPasswordSet ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,\n\t\t\t\tisPasswordSet: isPasswordSet || isPasswordEnabledByDefault || isPasswordEnforced,\n\t\t\t\tshowPasswordByTalkCheckBox: isTalkEnabled && isPasswordSet,\n\t\t\t\tpasswordByTalkLabel: t('core', 'Password protect by Talk'),\n\t\t\t\tisPasswordByTalkSet: sendPasswordByTalk,\n\t\t\t\tpublicUploadRWChecked: publicUploadRWChecked,\n\t\t\t\tpublicUploadRChecked: publicUploadRChecked,\n\t\t\t\tpublicUploadWChecked: publicUploadWChecked,\n\t\t\t\thasExpireDate: hasExpireDate,\n\t\t\t\texpireDate: expireDate,\n\t\t\t\tshareNote: share.note,\n\t\t\t\thasNote: share.note !== '',\n\t\t\t\tmaxDate: maxDate,\n\t\t\t\thideDownload: hideDownload,\n\t\t\t\tisExpirationEnforced: isExpirationEnforced,\n\t\t\t}\n\t\t},\n\n\t\tonUnshare: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar self = this;\n\t\t\tvar $element = $(event.target);\n\t\t\tif (!$element.is('a')) {\n\t\t\t\t$element = $element.closest('a');\n\t\t\t}\n\n\t\t\tvar $loading = $element.find('.icon-loading-small').eq(0);\n\t\t\tif(!$loading.hasClass('hidden')) {\n\t\t\t\t// in process\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$loading.removeClass('hidden');\n\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\n\t\t\tvar shareId = $li.data('share-id');\n\n\t\t\tself.model.removeShare(shareId, {\n\t\t\t\tsuccess: function() {\n\t\t\t\t\t$li.remove();\n\t\t\t\t\tself.render()\n\t\t\t\t},\n\t\t\t\terror: function() {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Could not unshare'));\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn false;\n\t\t},\n\n\n\t});\n\n\tOC.Share.ShareDialogLinkShareView = ShareDialogLinkShareView;\n\n})();\n","/* global OC, Handlebars */\n\n/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* globals Handlebars */\n\n(function() {\n\n\tvar PASSWORD_PLACEHOLDER = '**********';\n\tvar PASSWORD_PLACEHOLDER_MESSAGE = t('core', 'Choose a password for the mail share');\n\n\tif (!OC.Share) {\n\t\tOC.Share = {};\n\t}\n\n\t/**\n\t * @class OCA.Share.ShareDialogShareeListView\n\t * @member {OC.Share.ShareItemModel} model\n\t * @member {jQuery} $el\n\t * @memberof OCA.Sharing\n\t * @classdesc\n\t *\n\t * Represents the sharee list part in the GUI of the share dialogue\n\t *\n\t */\n\tvar ShareDialogShareeListView = OC.Backbone.View.extend({\n\t\t/** @type {string} **/\n\t\tid: 'shareDialogLinkShare',\n\n\t\t/** @type {OC.Share.ShareConfigModel} **/\n\t\tconfigModel: undefined,\n\n\t\t_menuOpen: false,\n\n\t\t/** @type {boolean|number} **/\n\t\t_renderPermissionChange: false,\n\n\t\tevents: {\n\t\t\t'click .unshare': 'onUnshare',\n\t\t\t'click .share-add': 'showNoteForm',\n\t\t\t'click .share-note-delete': 'deleteNote',\n\t\t\t'click .share-note-submit': 'updateNote',\n\t\t\t'click .share-menu .icon-more': 'onToggleMenu',\n\t\t\t'click .permissions': 'onPermissionChange',\n\t\t\t'click .expireDate' : 'onExpireDateChange',\n\t\t\t'click .password' : 'onMailSharePasswordProtectChange',\n\t\t\t'click .passwordByTalk' : 'onMailSharePasswordProtectByTalkChange',\n\t\t\t'click .secureDrop' : 'onSecureDropChange',\n\t\t\t'keyup input.passwordField': 'onMailSharePasswordKeyUp',\n\t\t\t'focusout input.passwordField': 'onMailSharePasswordEntered',\n\t\t\t'change .datepicker': 'onChangeExpirationDate',\n\t\t\t'click .datepicker' : 'showDatePicker'\n\t\t},\n\n\t\tinitialize: function(options) {\n\t\t\tif(!_.isUndefined(options.configModel)) {\n\t\t\t\tthis.configModel = options.configModel;\n\t\t\t} else {\n\t\t\t\tthrow 'missing OC.Share.ShareConfigModel';\n\t\t\t}\n\n\t\t\tvar view = this;\n\t\t\tthis.model.on('change:shares', function() {\n\t\t\t\tview.render();\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t *\n\t\t * @param {OC.Share.Types.ShareInfo} shareInfo\n\t\t * @returns {object}\n\t\t */\n\t\tgetShareeObject: function(shareIndex) {\n\t\t\tvar shareWith = this.model.getShareWith(shareIndex);\n\t\t\tvar shareWithDisplayName = this.model.getShareWithDisplayName(shareIndex);\n\t\t\tvar shareWithAvatar = this.model.getShareWithAvatar(shareIndex);\n\t\t\tvar shareWithTitle = '';\n\t\t\tvar shareType = this.model.getShareType(shareIndex);\n\t\t\tvar sharedBy = this.model.getSharedBy(shareIndex);\n\t\t\tvar sharedByDisplayName = this.model.getSharedByDisplayName(shareIndex);\n\t\t\tvar fileOwnerUid = this.model.getFileOwnerUid(shareIndex);\n\n\t\t\tvar hasPermissionOverride = {};\n\t\t\tif (shareType === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\tshareWithDisplayName = shareWithDisplayName + \" (\" + t('core', 'group') + ')';\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\tshareWithDisplayName = shareWithDisplayName + \" (\" + t('core', 'remote') + ')';\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP) {\n\t\t\t\tshareWithDisplayName = shareWithDisplayName + \" (\" + t('core', 'remote group') + ')';\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\tshareWithDisplayName = shareWithDisplayName + \" (\" + t('core', 'email') + ')';\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\tshareWithDisplayName = shareWithDisplayName + \" (\" + t('core', 'conversation') + ')';\n\t\t\t}\n\n\t\t\tif (shareType === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\tshareWithTitle = shareWith + \" (\" + t('core', 'group') + ')';\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\tshareWithTitle = shareWith + \" (\" + t('core', 'remote') + ')';\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP) {\n\t\t\t\tshareWithTitle = shareWith + \" (\" + t('core', 'remote group') + ')';\n\t\t\t}\n\t\t\telse if (shareType === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\tshareWithTitle = shareWith + \" (\" + t('core', 'email') + ')';\n\t\t\t} else if (shareType === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\tshareWithTitle = shareWith;\n\t\t\t\t// Force \"shareWith\" in the template to a safe value, as the\n\t\t\t\t// original \"shareWith\" returned by the model may contain\n\t\t\t\t// problematic characters like \"'\".\n\t\t\t\tshareWith = 'circle-' + shareIndex;\n\t\t\t}\n\n\t\t\tif (sharedBy !== OC.getCurrentUser().uid) {\n\t\t\t\tvar empty = shareWithTitle === '';\n\t\t\t\tif (!empty) {\n\t\t\t\t\tshareWithTitle += ' (';\n\t\t\t\t}\n\t\t\t\tshareWithTitle += t('core', 'shared by {sharer}', {sharer: sharedByDisplayName});\n\t\t\t\tif (!empty) {\n\t\t\t\t\tshareWithTitle += ')';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar share = this.model.get('shares')[shareIndex];\n\t\t\tvar password = share.password;\n\t\t\tvar hasPassword = password !== null && password !== '';\n\t\t\tvar sendPasswordByTalk = share.send_password_by_talk;\n\n\t\t\tvar shareNote = this.model.getNote(shareIndex);\n\n\t\t\treturn _.extend(hasPermissionOverride, {\n\t\t\t\tcid: this.cid,\n\t\t\t\thasSharePermission: this.model.hasSharePermission(shareIndex),\n\t\t\t\teditPermissionState: this.model.editPermissionState(shareIndex),\n\t\t\t\thasCreatePermission: this.model.hasCreatePermission(shareIndex),\n\t\t\t\thasUpdatePermission: this.model.hasUpdatePermission(shareIndex),\n\t\t\t\thasDeletePermission: this.model.hasDeletePermission(shareIndex),\n\t\t\t\tsharedBy: sharedBy,\n\t\t\t\tsharedByDisplayName: sharedByDisplayName,\n\t\t\t\tshareWith: shareWith,\n\t\t\t\tshareWithDisplayName: shareWithDisplayName,\n\t\t\t\tshareWithAvatar: shareWithAvatar,\n\t\t\t\tshareWithTitle: shareWithTitle,\n\t\t\t\tshareType: shareType,\n\t\t\t\tshareId: this.model.get('shares')[shareIndex].id,\n\t\t\t\tmodSeed: shareWithAvatar || (shareType !== OC.Share.SHARE_TYPE_USER && shareType !== OC.Share.SHARE_TYPE_CIRCLE && shareType !== OC.Share.SHARE_TYPE_ROOM),\n\t\t\t\towner: fileOwnerUid,\n\t\t\t\tisShareWithCurrentUser: (shareType === OC.Share.SHARE_TYPE_USER && shareWith === OC.getCurrentUser().uid),\n\t\t\t\tcanUpdateShareSettings: (sharedBy === OC.getCurrentUser().uid || fileOwnerUid === OC.getCurrentUser().uid),\n\t\t\t\tisRemoteShare: shareType === OC.Share.SHARE_TYPE_REMOTE,\n\t\t\t\tisRemoteGroupShare: shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP,\n\t\t\t\tisNoteAvailable: shareType !== OC.Share.SHARE_TYPE_REMOTE && shareType !== OC.Share.SHARE_TYPE_REMOTE_GROUP,\n\t\t\t\tisMailShare: shareType === OC.Share.SHARE_TYPE_EMAIL,\n\t\t\t\tisCircleShare: shareType === OC.Share.SHARE_TYPE_CIRCLE,\n\t\t\t\tisFileSharedByMail: shareType === OC.Share.SHARE_TYPE_EMAIL && !this.model.isFolder(),\n\t\t\t\tisPasswordSet: hasPassword && !sendPasswordByTalk,\n\t\t\t\tisPasswordByTalkSet: hasPassword && sendPasswordByTalk,\n\t\t\t\tisTalkEnabled: OC.appswebroots['spreed'] !== undefined,\n\t\t\t\tsecureDropMode: !this.model.hasReadPermission(shareIndex),\n\t\t\t\thasExpireDate: this.model.getExpireDate(shareIndex) !== null,\n\t\t\t\tshareNote: shareNote,\n\t\t\t\thasNote: shareNote !== '',\n\t\t\t\texpireDate: moment(this.model.getExpireDate(shareIndex), 'YYYY-MM-DD').format('DD-MM-YYYY'),\n\t\t\t\t// The password placeholder does not take into account if\n\t\t\t\t// sending the password by Talk is enabled or not; when\n\t\t\t\t// switching from sending the password by Talk to sending the\n\t\t\t\t// password by email the password is reused and the share\n\t\t\t\t// updated, so the placeholder already shows the password in the\n\t\t\t\t// brief time between disabling sending the password by email\n\t\t\t\t// and receiving the updated share.\n\t\t\t\tpasswordPlaceholder: hasPassword ? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,\n\t\t\t\tpasswordByTalkPlaceholder: (hasPassword && sendPasswordByTalk)? PASSWORD_PLACEHOLDER : PASSWORD_PLACEHOLDER_MESSAGE,\n\t\t\t});\n\t\t},\n\n\t\tgetShareProperties: function() {\n\t\t\treturn {\n\t\t\t\tunshareLabel: t('core', 'Unshare'),\n\t\t\t\taddNoteLabel: t('core', 'Note to recipient'),\n\t\t\t\tcanShareLabel: t('core', 'Can reshare'),\n\t\t\t\tcanEditLabel: t('core', 'Can edit'),\n\t\t\t\tcreatePermissionLabel: t('core', 'Can create'),\n\t\t\t\tupdatePermissionLabel: t('core', 'Can change'),\n\t\t\t\tdeletePermissionLabel: t('core', 'Can delete'),\n\t\t\t\tsecureDropLabel: t('core', 'File drop (upload only)'),\n\t\t\t\texpireDateLabel: t('core', 'Set expiration date'),\n\t\t\t\tpasswordLabel: t('core', 'Password protect'),\n\t\t\t\tpasswordByTalkLabel: t('core', 'Password protect by Talk'),\n\t\t\t\tcrudsLabel: t('core', 'Access control'),\n\t\t\t\texpirationDatePlaceholder: t('core', 'Expiration date'),\n\t\t\t\tdefaultExpireDate: moment().add(1, 'day').format('DD-MM-YYYY'), // Can't expire today\n\t\t\t\ttriangleSImage: OC.imagePath('core', 'actions/triangle-s'),\n\t\t\t\tisResharingAllowed: this.configModel.get('isResharingAllowed'),\n\t\t\t\tisPasswordForMailSharesRequired: this.configModel.get('isPasswordForMailSharesRequired'),\n\t\t\t\tsharePermissionPossible: this.model.sharePermissionPossible(),\n\t\t\t\teditPermissionPossible: this.model.editPermissionPossible(),\n\t\t\t\tcreatePermissionPossible: this.model.createPermissionPossible(),\n\t\t\t\tupdatePermissionPossible: this.model.updatePermissionPossible(),\n\t\t\t\tdeletePermissionPossible: this.model.deletePermissionPossible(),\n\t\t\t\tsharePermission: OC.PERMISSION_SHARE,\n\t\t\t\tcreatePermission: OC.PERMISSION_CREATE,\n\t\t\t\tupdatePermission: OC.PERMISSION_UPDATE,\n\t\t\t\tdeletePermission: OC.PERMISSION_DELETE,\n\t\t\t\treadPermission: OC.PERMISSION_READ,\n\t\t\t\tisFolder: this.model.isFolder()\n\t\t\t};\n\t\t},\n\n\t\t/**\n\t\t * get an array of sharees' share properties\n\t\t *\n\t\t * @returns {Array}\n\t\t */\n\t\tgetShareeList: function() {\n\t\t\tvar universal = this.getShareProperties();\n\n\t\t\tif(!this.model.hasUserShares()) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tvar shares = this.model.get('shares');\n\t\t\tvar list = [];\n\t\t\tfor(var index = 0; index < shares.length; index++) {\n\t\t\t\tvar share = this.getShareeObject(index);\n\n\t\t\t\tif (share.shareType === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// first empty {} is necessary, otherwise we get in trouble\n\t\t\t\t// with references\n\t\t\t\tlist.push(_.extend({}, universal, share));\n\t\t\t}\n\n\t\t\treturn list;\n\t\t},\n\n\t\tgetLinkReshares: function() {\n\t\t\tvar universal = {\n\t\t\t\tunshareLabel: t('core', 'Unshare'),\n\t\t\t};\n\n\t\t\tif(!this.model.hasUserShares()) {\n\t\t\t\treturn [];\n\t\t\t}\n\n\t\t\tvar shares = this.model.get('shares');\n\t\t\tvar list = [];\n\t\t\tfor(var index = 0; index < shares.length; index++) {\n\t\t\t\tvar share = this.getShareeObject(index);\n\n\t\t\t\tif (share.shareType !== OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// first empty {} is necessary, otherwise we get in trouble\n\t\t\t\t// with references\n\t\t\t\tlist.push(_.extend({}, universal, share, {\n\t\t\t\t\tshareInitiator: shares[index].uid_owner,\n\t\t\t\t\tshareInitiatorText: t('core', '{shareInitiatorDisplayName} shared via link', {shareInitiatorDisplayName: shares[index].displayname_owner})\n\t\t\t\t}));\n\t\t\t}\n\n\t\t\treturn list;\n\t\t},\n\n\t\trender: function() {\n\t\t\tif(!this._renderPermissionChange) {\n\t\t\t\tthis.$el.html(this.template({\n\t\t\t\t\tcid: this.cid,\n\t\t\t\t\tsharees: this.getShareeList(),\n\t\t\t\t\tlinkReshares: this.getLinkReshares()\n\t\t\t\t}));\n\n\t\t\t\tthis.$('.avatar').each(function () {\n\t\t\t\t\tvar $this = $(this);\n\n\t\t\t\t\tif ($this.hasClass('imageplaceholderseed')) {\n\t\t\t\t\t\t$this.css({width: 32, height: 32});\n\t\t\t\t\t\tif ($this.data('avatar')) {\n\t\t\t\t\t\t\t$this.css('border-radius', '0%');\n\t\t\t\t\t\t\t$this.css('background', 'url(' + $this.data('avatar') + ') no-repeat');\n\t\t\t\t\t\t\t$this.css('background-size', '31px');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this.imageplaceholder($this.data('seed'));\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// user, size, ie8fix, hidedefault, callback, displayname\n\t\t\t\t\t\t$this.avatar($this.data('username'), 32, undefined, undefined, undefined, $this.data('displayname'));\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t\tthis.$('.has-tooltip').tooltip({\n\t\t\t\t\tplacement: 'bottom'\n\t\t\t\t});\n\n\t\t\t\tthis.$('ul.shareWithList > li').each(function() {\n\t\t\t\t\tvar $this = $(this);\n\n\t\t\t\t\tvar shareWith = $this.data('share-with');\n\t\t\t\t\tvar shareType = $this.data('share-type');\n\n\t\t\t\t\t$this.find('div.avatar, span.username').contactsMenu(shareWith, shareType, $this);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tvar permissionChangeShareId = parseInt(this._renderPermissionChange, 10);\n\t\t\t\tvar shareWithIndex = this.model.findShareWithIndex(permissionChangeShareId);\n\t\t\t\tvar sharee = this.getShareeObject(shareWithIndex);\n\t\t\t\t$.extend(sharee, this.getShareProperties());\n\t\t\t\tvar $li = this.$('li[data-share-id=' + permissionChangeShareId + ']');\n\t\t\t\t$li.find('.sharingOptionsGroup .popovermenu').replaceWith(this.popoverMenuTemplate(sharee));\n\t\t\t}\n\n\t\t\tvar _this = this;\n\t\t\tthis.getShareeList().forEach(function(sharee) {\n\t\t\t\tvar $edit = _this.$('#canEdit-' + _this.cid + '-' + sharee.shareId);\n\t\t\t\tif($edit.length === 1) {\n\t\t\t\t\t$edit.prop('checked', sharee.editPermissionState === 'checked');\n\t\t\t\t\tif (sharee.isFolder) {\n\t\t\t\t\t\t$edit.prop('indeterminate', sharee.editPermissionState === 'indeterminate');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.$('.popovermenu').on('afterHide', function() {\n\t\t\t\t_this._menuOpen = false;\n\t\t\t});\n\t\t\tthis.$('.popovermenu').on('beforeHide', function() {\n\t\t\t\tvar shareId = parseInt(_this._menuOpen, 10);\n\t\t\t\tif(!_.isNaN(shareId)) {\n\t\t\t\t\tvar datePickerClass = '.expirationDateContainer-' + _this.cid + '-' + shareId;\n\t\t\t\t\tvar datePickerInput = '#expirationDatePicker-' + _this.cid + '-' + shareId;\n\t\t\t\t\tvar expireDateCheckbox = '#expireDate-' + _this.cid + '-' + shareId;\n\t\t\t\t\tif ($(expireDateCheckbox).prop('checked')) {\n\t\t\t\t\t\t$(datePickerInput).removeClass('hidden-visually');\n\t\t\t\t\t\t$(datePickerClass).removeClass('hasDatepicker');\n\t\t\t\t\t\t$(datePickerClass + ' .ui-datepicker').hide();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tif (this._menuOpen !== false) {\n\t\t\t\t// Open menu again if it was opened before\n\t\t\t\tvar shareId = parseInt(this._menuOpen, 10);\n\t\t\t\tif(!_.isNaN(shareId)) {\n\t\t\t\t\tvar liSelector = 'li[data-share-id=' + shareId + ']';\n\t\t\t\t\tOC.showMenu(null, this.$(liSelector + ' .sharingOptionsGroup .popovermenu'));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._renderPermissionChange = false;\n\n\t\t\t// new note autosize\n\t\t\tautosize(this.$el.find('.share-note-form .share-note'));\n\n\t\t\tthis.delegateEvents();\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * @returns {Function} from Handlebars\n\t\t * @private\n\t\t */\n\t\ttemplate: function (data) {\n\t\t\tvar sharees = data.sharees;\n\t\t\tif(_.isArray(sharees)) {\n\t\t\t\tfor (var i = 0; i < sharees.length; i++) {\n\t\t\t\t\tdata.sharees[i].popoverMenu = this.popoverMenuTemplate(sharees[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn OC.Share.Templates['sharedialogshareelistview'](data);\n\t\t},\n\n\t\t/**\n\t\t * renders the popover template and returns the resulting HTML\n\t\t *\n\t\t * @param {Object} data\n\t\t * @returns {string}\n\t\t */\n\t\tpopoverMenuTemplate: function(data) {\n\t\t\treturn OC.Share.Templates['sharedialogshareelistview_popover_menu'](data);\n\t\t},\n\n\t\tshowNoteForm: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $menu = $element.closest('li');\n\t\t\tvar $form = $menu.next('li.share-note-form');\n\n\t\t\t// show elements\n\t\t\t$menu.find('.share-note-delete').toggleClass('hidden');\n\t\t\t$form.toggleClass('hidden');\n\t\t\t$form.find('textarea').focus();\n\t\t},\n\n\t\tdeleteNote: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar self = this;\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $menu = $element.closest('li');\n\t\t\tvar $form = $menu.next('li.share-note-form');\n\n\t\t\tconsole.log($form.find('.share-note'));\n\t\t\t$form.find('.share-note').val('');\n\t\t\t\n\t\t\t$form.addClass('hidden');\n\t\t\t$menu.find('.share-note-delete').addClass('hidden');\n\n\t\t\tself.sendNote('', shareId, $menu);\n\t\t},\n\n\t\tupdateNote: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar self = this;\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\t\t\tvar $form = $element.closest('li.share-note-form');\n\t\t\tvar $menu = $form.prev('li');\n\t\t\tvar message = $form.find('.share-note').val().trim();\n\n\t\t\tif (message.length < 1) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tself.sendNote(message, shareId, $menu);\n\n\t\t},\n\n\t\tsendNote: function(note, shareId, $menu) {\n\t\t\tvar $form = $menu.next('li.share-note-form');\n\t\t\tvar $submit = $form.find('input.share-note-submit');\n\t\t\tvar $error = $form.find('input.share-note-error');\n\n\t\t\t$submit.prop('disabled', true);\n\t\t\t$menu.find('.icon-loading-small').removeClass('hidden');\n\t\t\t$menu.find('.icon-edit').hide();\n\n\t\t\tvar complete = function() {\n\t\t\t\t$submit.prop('disabled', false);\n\t\t\t\t$menu.find('.icon-loading-small').addClass('hidden');\n\t\t\t\t$menu.find('.icon-edit').show();\n\t\t\t};\n\t\t\tvar error = function() {\n\t\t\t\t$error.show();\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t$error.hide();\n\t\t\t\t}, 3000);\n\t\t\t};\n\n\t\t\t// send data\n\t\t\t$.ajax({\n\t\t\t\tmethod: 'PUT',\n\t\t\t\turl: OC.linkToOCS('apps/files_sharing/api/v1/shares',2) + shareId + '?' + OC.buildQueryString({format: 'json'}),\n\t\t\t\tdata: { note: note },\n\t\t\t\tcomplete : complete,\n\t\t\t\terror: error\n\t\t\t});\n\t\t},\n\n\t\tonUnshare: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar self = this;\n\t\t\tvar $element = $(event.target);\n\t\t\tif (!$element.is('a')) {\n\t\t\t\t$element = $element.closest('a');\n\t\t\t}\n\n\t\t\tvar $loading = $element.find('.icon-loading-small').eq(0);\n\t\t\tif(!$loading.hasClass('hidden')) {\n\t\t\t\t// in process\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$loading.removeClass('hidden');\n\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\n\t\t\tvar shareId = $li.data('share-id');\n\n\t\t\tself.model.removeShare(shareId)\n\t\t\t\t.done(function() {\n\t\t\t\t\t$li.remove();\n\t\t\t\t})\n\t\t\t\t.fail(function() {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'Could not unshare'));\n\t\t\t\t});\n\t\t\treturn false;\n\t\t},\n\n\t\tonToggleMenu: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar $menu = $li.find('.sharingOptionsGroup .popovermenu');\n\n\t\t\tOC.showMenu(null, $menu);\n\t\t\tthis._menuOpen = $li.data('share-id');\n\t\t},\n\n\t\tonExpireDateChange: function(event) {\n\t\t\tvar $element = $(event.target);\n\t\t\tvar li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar datePickerClass = '.expirationDateContainer-' + this.cid + '-' + shareId;\n\t\t\tvar datePicker = $(datePickerClass);\n\t\t\tvar state = $element.prop('checked');\n\t\t\tdatePicker.toggleClass('hidden', !state);\n\t\t\tif (!state) {\n\t\t\t\t// disabled, let's hide the input and\n\t\t\t\t// set the expireDate to nothing\n\t\t\t\t$element.closest('li').next('li').addClass('hidden');\n\t\t\t\tthis.setExpirationDate(shareId, '');\n\t\t\t} else {\n\t\t\t\t// enabled, show the input and the datepicker\n\t\t\t\t$element.closest('li').next('li').removeClass('hidden');\n\t\t\t\tthis.showDatePicker(event);\n\n\t\t\t}\n\t\t},\n\n\t\tshowDatePicker: function(event) {\n\t\t\tvar element = $(event.target);\n\t\t\tvar li = element.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar expirationDatePicker = '#expirationDatePicker-' + this.cid + '-' + shareId;\n\t\t\tvar view = this;\n\t\t\t$(expirationDatePicker).datepicker({\n\t\t\t\tdateFormat : 'dd-mm-yy',\n\t\t\t\tonSelect: function (expireDate) {\n\t\t\t\t\tview.setExpirationDate(shareId, expireDate);\n\t\t\t\t}\n\t\t\t});\n\t\t\t$(expirationDatePicker).focus();\n\n\t\t},\n\n\t\tsetExpirationDate: function(shareId, expireDate) {\n\t\t\tthis.model.updateShare(shareId, {expireDate: expireDate}, {});\n\t\t},\n\n\t\tonMailSharePasswordProtectChange: function(event) {\n\t\t\tvar element = $(event.target);\n\t\t\tvar li = element.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar passwordContainerClass = '.passwordMenu-' + this.cid + '-' + shareId;\n\t\t\tvar passwordContainer = $(passwordContainerClass);\n\t\t\tvar loading = this.$el.find(passwordContainerClass + ' .icon-loading-small');\n\t\t\tvar inputClass = '#passwordField-' + this.cid + '-' + shareId;\n\t\t\tvar passwordField = $(inputClass);\n\t\t\tvar state = element.prop('checked');\n\t\t\tvar passwordByTalkElement = $('#passwordByTalk-' + this.cid + '-' + shareId);\n\t\t\tvar passwordByTalkState = passwordByTalkElement.prop('checked');\n\t\t\tif (!state && !passwordByTalkState) {\n\t\t\t\tthis.model.updateShare(shareId, {password: '', sendPasswordByTalk: false});\n\t\t\t\tpasswordField.attr('value', '');\n\t\t\t\tpasswordField.removeClass('error');\n\t\t\t\tpasswordField.tooltip('hide');\n\t\t\t\tloading.addClass('hidden');\n\t\t\t\tpasswordField.attr('placeholder', PASSWORD_PLACEHOLDER_MESSAGE);\n\t\t\t\t// We first need to reset the password field before we hide it\n\t\t\t\tpasswordContainer.toggleClass('hidden', !state);\n\t\t\t} else if (state) {\n\t\t\t\tif (passwordByTalkState) {\n\t\t\t\t\t// Switching from sending the password by Talk to sending\n\t\t\t\t\t// the password by mail can be done keeping the previous\n\t\t\t\t\t// password sent by Talk.\n\t\t\t\t\tthis.model.updateShare(shareId, {sendPasswordByTalk: false});\n\n\t\t\t\t\tvar passwordByTalkContainerClass = '.passwordByTalkMenu-' + this.cid + '-' + shareId;\n\t\t\t\t\tvar passwordByTalkContainer = $(passwordByTalkContainerClass);\n\t\t\t\t\tpasswordByTalkContainer.addClass('hidden');\n\t\t\t\t\tpasswordByTalkElement.prop('checked', false);\n\t\t\t\t}\n\n\t\t\t\tpasswordContainer.toggleClass('hidden', !state);\n\t\t\t\tpasswordField = '#passwordField-' + this.cid + '-' + shareId;\n\t\t\t\tthis.$(passwordField).focus();\n\t\t\t}\n\t\t},\n\n\t\tonMailSharePasswordProtectByTalkChange: function(event) {\n\t\t\tvar element = $(event.target);\n\t\t\tvar li = element.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar passwordByTalkContainerClass = '.passwordByTalkMenu-' + this.cid + '-' + shareId;\n\t\t\tvar passwordByTalkContainer = $(passwordByTalkContainerClass);\n\t\t\tvar loading = this.$el.find(passwordByTalkContainerClass + ' .icon-loading-small');\n\t\t\tvar inputClass = '#passwordByTalkField-' + this.cid + '-' + shareId;\n\t\t\tvar passwordByTalkField = $(inputClass);\n\t\t\tvar state = element.prop('checked');\n\t\t\tvar passwordElement = $('#password-' + this.cid + '-' + shareId);\n\t\t\tvar passwordState = passwordElement.prop('checked');\n\t\t\tif (!state) {\n\t\t\t\tthis.model.updateShare(shareId, {password: '', sendPasswordByTalk: false});\n\t\t\t\tpasswordByTalkField.attr('value', '');\n\t\t\t\tpasswordByTalkField.removeClass('error');\n\t\t\t\tpasswordByTalkField.tooltip('hide');\n\t\t\t\tloading.addClass('hidden');\n\t\t\t\tpasswordByTalkField.attr('placeholder', PASSWORD_PLACEHOLDER_MESSAGE);\n\t\t\t\t// We first need to reset the password field before we hide it\n\t\t\t\tpasswordByTalkContainer.toggleClass('hidden', !state);\n\t\t\t} else if (state) {\n\t\t\t\tif (passwordState) {\n\t\t\t\t\t// Enabling sending the password by Talk requires a new\n\t\t\t\t\t// password to be given (the one sent by mail is not reused,\n\t\t\t\t\t// as it would defeat the purpose of checking the identity\n\t\t\t\t\t// of the sharee by Talk if it was already sent by mail), so\n\t\t\t\t\t// the share is not updated until the user explicitly gives\n\t\t\t\t\t// the new password.\n\n\t\t\t\t\tvar passwordContainerClass = '.passwordMenu-' + this.cid + '-' + shareId;\n\t\t\t\t\tvar passwordContainer = $(passwordContainerClass);\n\t\t\t\t\tpasswordContainer.addClass('hidden');\n\t\t\t\t\tpasswordElement.prop('checked', false);\n\t\t\t\t}\n\n\t\t\t\tpasswordByTalkContainer.toggleClass('hidden', !state);\n\t\t\t\tpasswordByTalkField = '#passwordByTalkField-' + this.cid + '-' + shareId;\n\t\t\t\tthis.$(passwordByTalkField).focus();\n\t\t\t}\n\t\t},\n\n\t\tonMailSharePasswordKeyUp: function(event) {\n\t\t\tif(event.keyCode === 13) {\n\t\t\t\tthis.onMailSharePasswordEntered(event);\n\t\t\t}\n\t\t},\n\n\t\tonMailSharePasswordEntered: function(event) {\n\t\t\tvar passwordField = $(event.target);\n\t\t\tvar li = passwordField.closest('li[data-share-id]');\n\t\t\tvar shareId = li.data('share-id');\n\t\t\tvar passwordContainerClass = '.passwordMenu-' + this.cid + '-' + shareId;\n\t\t\tvar passwordByTalkContainerClass = '.passwordByTalkMenu-' + this.cid + '-' + shareId;\n\t\t\tvar sendPasswordByTalk = passwordField.attr('id').startsWith('passwordByTalk');\n\t\t\tvar loading;\n\t\t\tif (sendPasswordByTalk) {\n\t\t\t\tloading = this.$el.find(passwordByTalkContainerClass + ' .icon-loading-small');\n\t\t\t} else {\n\t\t\t\tloading = this.$el.find(passwordContainerClass + ' .icon-loading-small');\n\t\t\t}\n\t\t\tif (!loading.hasClass('hidden')) {\n\t\t\t\t// still in process\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tpasswordField.removeClass('error');\n\t\t\tvar password = passwordField.val();\n\t\t\t// in IE9 the password might be the placeholder due to bugs in the placeholders polyfill\n\t\t\tif(password === '' || password === PASSWORD_PLACEHOLDER || password === PASSWORD_PLACEHOLDER_MESSAGE) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tloading\n\t\t\t\t.removeClass('hidden')\n\t\t\t\t.addClass('inlineblock');\n\n\n\t\t\tthis.model.updateShare(shareId, {\n\t\t\t\tpassword: password,\n\t\t\t\tsendPasswordByTalk: sendPasswordByTalk\n\t\t\t}, {\n\t\t\t\terror: function(model, msg) {\n\t\t\t\t\t// destroy old tooltips\n\t\t\t\t\tpasswordField.tooltip('destroy');\n\t\t\t\t\tloading.removeClass('inlineblock').addClass('hidden');\n\t\t\t\t\tpasswordField.addClass('error');\n\t\t\t\t\tpasswordField.attr('title', msg);\n\t\t\t\t\tpasswordField.tooltip({placement: 'bottom', trigger: 'manual'});\n\t\t\t\t\tpasswordField.tooltip('show');\n\t\t\t\t},\n\t\t\t\tsuccess: function(model, msg) {\n\t\t\t\t\tpasswordField.blur();\n\t\t\t\t\tpasswordField.attr('value', '');\n\t\t\t\t\tpasswordField.attr('placeholder', PASSWORD_PLACEHOLDER);\n\t\t\t\t\tloading.removeClass('inlineblock').addClass('hidden');\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tonPermissionChange: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\n\t\t\tvar permissions = OC.PERMISSION_READ;\n\n\t\t\tif (this.model.isFolder()) {\n\t\t\t\t// adjust checkbox states\n\t\t\t\tvar $checkboxes = $('.permissions', $li).not('input[name=\"edit\"]').not('input[name=\"share\"]');\n\t\t\t\tvar checked;\n\t\t\t\tif ($element.attr('name') === 'edit') {\n\t\t\t\t\tchecked = $element.is(':checked');\n\t\t\t\t\t// Check/uncheck Create, Update, and Delete checkboxes if Edit is checked/unck\n\t\t\t\t\t$($checkboxes).prop('checked', checked);\n\t\t\t\t\tif (checked) {\n\t\t\t\t\t\tpermissions |= OC.PERMISSION_CREATE | OC.PERMISSION_UPDATE | OC.PERMISSION_DELETE;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar numberChecked = $checkboxes.filter(':checked').length;\n\t\t\t\t\tchecked = numberChecked === $checkboxes.length;\n\t\t\t\t\tvar $editCb = $('input[name=\"edit\"]', $li);\n\t\t\t\t\t$editCb.prop('checked', checked);\n\t\t\t\t\t$editCb.prop('indeterminate', !checked && numberChecked > 0);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($element.attr('name') === 'edit' && $element.is(':checked')) {\n\t\t\t\t\tpermissions |= OC.PERMISSION_UPDATE;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$('.permissions', $li).not('input[name=\"edit\"]').filter(':checked').each(function(index, checkbox) {\n\t\t\t\tpermissions |= $(checkbox).data('permissions');\n\t\t\t});\n\n\n\t\t\t/** disable checkboxes during save operation to avoid race conditions **/\n\t\t\t$li.find('input[type=checkbox]').prop('disabled', true);\n\t\t\tvar enableCb = function() {\n\t\t\t\t$li.find('input[type=checkbox]').prop('disabled', false);\n\t\t\t};\n\t\t\tvar errorCb = function(elem, msg) {\n\t\t\t\tOC.dialogs.alert(msg, t('core', 'Error while sharing'));\n\t\t\t\tenableCb();\n\t\t\t};\n\n\t\t\tthis.model.updateShare(shareId, {permissions: permissions}, {error: errorCb, success: enableCb});\n\n\t\t\tthis._renderPermissionChange = shareId;\n\t\t},\n\n\t\tonSecureDropChange: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\tvar $element = $(event.target);\n\t\t\tvar $li = $element.closest('li[data-share-id]');\n\t\t\tvar shareId = $li.data('share-id');\n\n\t\t\tvar permissions = OC.PERMISSION_CREATE | OC.PERMISSION_UPDATE | OC.PERMISSION_DELETE | OC.PERMISSION_READ;\n\t\t\tif ($element.is(':checked')) {\n\t\t\t\tpermissions = OC.PERMISSION_CREATE | OC.PERMISSION_UPDATE | OC.PERMISSION_DELETE;\n\t\t\t}\n\n\t\t\t/** disable checkboxes during save operation to avoid race conditions **/\n\t\t\t$li.find('input[type=checkbox]').prop('disabled', true);\n\t\t\tvar enableCb = function() {\n\t\t\t\t$li.find('input[type=checkbox]').prop('disabled', false);\n\t\t\t};\n\t\t\tvar errorCb = function(elem, msg) {\n\t\t\t\tOC.dialogs.alert(msg, t('core', 'Error while sharing'));\n\t\t\t\tenableCb();\n\t\t\t};\n\n\t\t\tthis.model.updateShare(shareId, {permissions: permissions}, {error: errorCb, success: enableCb});\n\n\t\t\tthis._renderPermissionChange = shareId;\n\t\t}\n\n\t});\n\n\tOC.Share.ShareDialogShareeListView = ShareDialogShareeListView;\n\n})();\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* globals Handlebars */\n\n(function() {\n\tif(!OC.Share) {\n\t\tOC.Share = {};\n\t}\n\n\t/**\n\t * @class OCA.Share.ShareDialogView\n\t * @member {OC.Share.ShareItemModel} model\n\t * @member {jQuery} $el\n\t * @memberof OCA.Sharing\n\t * @classdesc\n\t *\n\t * Represents the GUI of the share dialogue\n\t *\n\t */\n\tvar ShareDialogView = OC.Backbone.View.extend({\n\t\t/** @type {Object} **/\n\t\t_templates: {},\n\n\t\t/** @type {boolean} **/\n\t\t_showLink: true,\n\n\t\t_lookup: false,\n\n\t\t_lookupAllowed: false,\n\n\t\t/** @type {string} **/\n\t\ttagName: 'div',\n\n\t\t/** @type {OC.Share.ShareConfigModel} **/\n\t\tconfigModel: undefined,\n\n\t\t/** @type {object} **/\n\t\tresharerInfoView: undefined,\n\n\t\t/** @type {object} **/\n\t\tlinkShareView: undefined,\n\n\t\t/** @type {object} **/\n\t\tshareeListView: undefined,\n\n\t\t/** @type {object} **/\n\t\t_lastSuggestions: undefined,\n\n\t\t/** @type {object} **/\n\t\t_lastRecommendations: undefined,\n\n\t\t/** @type {int} **/\n\t\t_pendingOperationsCount: 0,\n\n\t\tevents: {\n\t\t\t'focus .shareWithField': 'onShareWithFieldFocus',\n\t\t\t'input .shareWithField': 'onShareWithFieldChanged',\n\t\t\t'click .shareWithConfirm': '_confirmShare'\n\t\t},\n\n\t\tinitialize: function(options) {\n\t\t\tvar view = this;\n\n\t\t\tthis.model.on('fetchError', function() {\n\t\t\t\tOC.Notification.showTemporary(t('core', 'Share details could not be loaded for this item.'));\n\t\t\t});\n\n\t\t\tif(!_.isUndefined(options.configModel)) {\n\t\t\t\tthis.configModel = options.configModel;\n\t\t\t} else {\n\t\t\t\tthrow 'missing OC.Share.ShareConfigModel';\n\t\t\t}\n\n\t\t\tthis.configModel.on('change:isRemoteShareAllowed', function() {\n\t\t\t\tview.render();\n\t\t\t});\n\t\t\tthis.configModel.on('change:isRemoteGroupShareAllowed', function() {\n\t\t\t\tview.render();\n\t\t\t});\n\t\t\tthis.model.on('change:permissions', function() {\n\t\t\t\tview.render();\n\t\t\t});\n\n\t\t\tthis.model.on('request', this._onRequest, this);\n\t\t\tthis.model.on('sync', this._onEndRequest, this);\n\n\t\t\tvar subViewOptions = {\n\t\t\t\tmodel: this.model,\n\t\t\t\tconfigModel: this.configModel\n\t\t\t};\n\n\t\t\tvar subViews = {\n\t\t\t\tresharerInfoView: 'ShareDialogResharerInfoView',\n\t\t\t\tlinkShareView: 'ShareDialogLinkShareView',\n\t\t\t\tshareeListView: 'ShareDialogShareeListView'\n\t\t\t};\n\n\t\t\tfor(var name in subViews) {\n\t\t\t\tvar className = subViews[name];\n\t\t\t\tthis[name] = _.isUndefined(options[name])\n\t\t\t\t\t? new OC.Share[className](subViewOptions)\n\t\t\t\t\t: options[name];\n\t\t\t}\n\n\t\t\t_.bindAll(this,\n\t\t\t\t'autocompleteHandler',\n\t\t\t\t'_onSelectRecipient',\n\t\t\t\t'onShareWithFieldChanged',\n\t\t\t\t'onShareWithFieldFocus'\n\t\t\t);\n\n\t\t\tOC.Plugins.attach('OC.Share.ShareDialogView', this);\n\t\t},\n\n\t\tonShareWithFieldChanged: function() {\n\t\t\tvar $el = this.$el.find('.shareWithField');\n\t\t\tif ($el.val().length < 2) {\n\t\t\t\t$el.removeClass('error').tooltip('hide');\n\t\t\t}\n\t\t},\n\n\t\t/* trigger search after the field was re-selected */\n\t\tonShareWithFieldFocus: function() {\n\t\t\tvar $shareWithField = this.$el.find('.shareWithField');\n\t\t\t$shareWithField.autocomplete(\"search\", $shareWithField.val());\n\t\t},\n\n\t\t_getSuggestions: function(searchTerm, perPage, model, lookup) {\n\t\t\tif (this._lastSuggestions &&\n\t\t\t\tthis._lastSuggestions.searchTerm === searchTerm &&\n\t\t\t\tthis._lastSuggestions.lookup === lookup &&\n\t\t\t\tthis._lastSuggestions.perPage === perPage &&\n\t\t\t\tthis._lastSuggestions.model === model) {\n\t\t\t\treturn this._lastSuggestions.promise;\n\t\t\t}\n\n\t\t\tvar deferred = $.Deferred();\n\t\t\tvar view = this;\n\n\t\t\t// query lookup GS by default if enabled\n\t\t\tvar capabilities = OC.getCapabilities()\n\t\t\tif (capabilities.files_sharing\n\t\t\t\t&& capabilities.files_sharing.sharee\n\t\t\t\t&& capabilities.files_sharing.sharee.query_lookup_default) {\n\t\t\t\t\tthis._lookup = true;\n\t\t\t}\n\n\t\t\t$.get(\n\t\t\t\tOC.linkToOCS('apps/files_sharing/api/v1') + 'sharees',\n\t\t\t\t{\n\t\t\t\t\tformat: 'json',\n\t\t\t\t\tsearch: searchTerm,\n\t\t\t\t\tlookup: lookup,\n\t\t\t\t\tperPage: perPage,\n\t\t\t\t\titemType: model.get('itemType')\n\t\t\t\t},\n\t\t\t\tfunction (result) {\n\t\t\t\t\tif (result.ocs.meta.statuscode === 100) {\n\t\t\t\t\t\tvar filter = function(users, groups, remotes, remote_groups, emails, circles, rooms) {\n\t\t\t\t\t\t\tif (typeof(emails) === 'undefined') {\n\t\t\t\t\t\t\t\temails = [];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof(circles) === 'undefined') {\n\t\t\t\t\t\t\t\tcircles = [];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof(rooms) === 'undefined') {\n\t\t\t\t\t\t\t\trooms = [];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar usersLength;\n\t\t\t\t\t\t\tvar groupsLength;\n\t\t\t\t\t\t\tvar remotesLength;\n\t\t\t\t\t\t\tvar remoteGroupsLength;\n\t\t\t\t\t\t\tvar emailsLength;\n\t\t\t\t\t\t\tvar circlesLength;\n\t\t\t\t\t\t\tvar roomsLength;\n\n\t\t\t\t\t\t\tvar i, j;\n\n\t\t\t\t\t\t\t//Filter out the current user\n\t\t\t\t\t\t\tusersLength = users.length;\n\t\t\t\t\t\t\tfor (i = 0; i < usersLength; i++) {\n\t\t\t\t\t\t\t\tif (users[i].value.shareWith === OC.currentUser) {\n\t\t\t\t\t\t\t\t\tusers.splice(i, 1);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Filter out the owner of the share\n\t\t\t\t\t\t\tif (model.hasReshare()) {\n\t\t\t\t\t\t\t\tusersLength = users.length;\n\t\t\t\t\t\t\t\tfor (i = 0 ; i < usersLength; i++) {\n\t\t\t\t\t\t\t\t\tif (users[i].value.shareWith === model.getReshareOwner()) {\n\t\t\t\t\t\t\t\t\t\tusers.splice(i, 1);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar shares = model.get('shares');\n\t\t\t\t\t\t\tvar sharesLength = shares.length;\n\n\t\t\t\t\t\t\t// Now filter out all sharees that are already shared with\n\t\t\t\t\t\t\tfor (i = 0; i < sharesLength; i++) {\n\t\t\t\t\t\t\t\tvar share = shares[i];\n\n\t\t\t\t\t\t\t\tif (share.share_type === OC.Share.SHARE_TYPE_USER) {\n\t\t\t\t\t\t\t\t\tusersLength = users.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < usersLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (users[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tusers.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\t\t\t\t\t\tgroupsLength = groups.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < groupsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (groups[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tgroups.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\t\t\t\t\t\tremotesLength = remotes.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < remotesLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (remotes[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tremotes.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE_GROUP) {\n\t\t\t\t\t\t\t\t\tremoteGroupsLength = remote_groups.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < remoteGroupsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (remote_groups[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tremote_groups.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\t\t\t\t\t\temailsLength = emails.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < emailsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (emails[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\temails.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\t\t\t\t\t\tcirclesLength = circles.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < circlesLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (circles[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tcircles.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\t\t\t\t\t\troomsLength = rooms.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < roomsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (rooms[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\trooms.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tfilter(\n\t\t\t\t\t\t\tresult.ocs.data.exact.users,\n\t\t\t\t\t\t\tresult.ocs.data.exact.groups,\n\t\t\t\t\t\t\tresult.ocs.data.exact.remotes,\n\t\t\t\t\t\t\tresult.ocs.data.exact.remote_groups,\n\t\t\t\t\t\t\tresult.ocs.data.exact.emails,\n\t\t\t\t\t\t\tresult.ocs.data.exact.circles,\n\t\t\t\t\t\t\tresult.ocs.data.exact.rooms\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tvar exactUsers = result.ocs.data.exact.users;\n\t\t\t\t\t\tvar exactGroups = result.ocs.data.exact.groups;\n\t\t\t\t\t\tvar exactRemotes = result.ocs.data.exact.remotes;\n\t\t\t\t\t\tvar exactRemoteGroups = result.ocs.data.exact.remote_groups;\n\t\t\t\t\t\tvar exactEmails = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.emails) !== 'undefined') {\n\t\t\t\t\t\t\texactEmails = result.ocs.data.exact.emails;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar exactCircles = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.circles) !== 'undefined') {\n\t\t\t\t\t\t\texactCircles = result.ocs.data.exact.circles;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar exactRooms = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.rooms) !== 'undefined') {\n\t\t\t\t\t\t\texactRooms = result.ocs.data.exact.rooms;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar exactMatches = exactUsers.concat(exactGroups).concat(exactRemotes).concat(exactRemoteGroups).concat(exactEmails).concat(exactCircles).concat(exactRooms);\n\n\t\t\t\t\t\tfilter(\n\t\t\t\t\t\t\tresult.ocs.data.users,\n\t\t\t\t\t\t\tresult.ocs.data.groups,\n\t\t\t\t\t\t\tresult.ocs.data.remotes,\n\t\t\t\t\t\t\tresult.ocs.data.remote_groups,\n\t\t\t\t\t\t\tresult.ocs.data.emails,\n\t\t\t\t\t\t\tresult.ocs.data.circles,\n\t\t\t\t\t\t\tresult.ocs.data.rooms\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tvar users = result.ocs.data.users;\n\t\t\t\t\t\tvar groups = result.ocs.data.groups;\n\t\t\t\t\t\tvar remotes = result.ocs.data.remotes;\n\t\t\t\t\t\tvar remoteGroups = result.ocs.data.remote_groups;\n\t\t\t\t\t\tvar lookup = result.ocs.data.lookup;\n\t\t\t\t\t\tvar lookupEnabled = result.ocs.data.lookupEnabled;\n\t\t\t\t\t\tvar emails = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.emails) !== 'undefined') {\n\t\t\t\t\t\t\temails = result.ocs.data.emails;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar circles = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.circles) !== 'undefined') {\n\t\t\t\t\t\t\tcircles = result.ocs.data.circles;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar rooms = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.rooms) !== 'undefined') {\n\t\t\t\t\t\t\trooms = result.ocs.data.rooms;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar suggestions = exactMatches.concat(users).concat(groups).concat(remotes).concat(remoteGroups).concat(emails).concat(circles).concat(rooms).concat(lookup);\n\n\t\t\t\t\t\tfunction dynamicSort(property) {\n\t\t\t\t\t\t\treturn function (a,b) {\n\t\t\t\t\t\t\t\tvar aProperty = '';\n\t\t\t\t\t\t\t\tvar bProperty = '';\n\t\t\t\t\t\t\t\tif (typeof a[property] !== 'undefined') {\n\t\t\t\t\t\t\t\t\taProperty = a[property];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (typeof b[property] !== 'undefined') {\n\t\t\t\t\t\t\t\t\tbProperty = b[property];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn (aProperty < bProperty) ? -1 : (aProperty > bProperty) ? 1 : 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Sort share entries by uuid to properly group them\n\t\t\t\t\t\t */\n\t\t\t\t\t\tvar grouped = suggestions.sort(dynamicSort('uuid'));\n\n\t\t\t\t\t\tvar previousUuid = null;\n\t\t\t\t\t\tvar groupedLength = grouped.length;\n\t\t\t\t\t\tvar result = [];\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * build the result array that only contains all contact entries from\n\t\t\t\t\t\t * merged contacts, if the search term matches its contact name\n\t\t\t\t\t\t */\n\t\t\t\t\t\tfor (var i = 0; i < groupedLength; i++) {\n\t\t\t\t\t\t\tif (typeof grouped[i].uuid !== 'undefined' && grouped[i].uuid === previousUuid) {\n\t\t\t\t\t\t\t\tgrouped[i].merged = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (searchTerm === grouped[i].name || typeof grouped[i].merged === 'undefined') {\n\t\t\t\t\t\t\t\tresult.push(grouped[i]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpreviousUuid = grouped[i].uuid;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar moreResultsAvailable =\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tOC.config['sharing.maxAutocompleteResults'] > 0\n\t\t\t\t\t\t\t\t&& Math.min(perPage, OC.config['sharing.maxAutocompleteResults'])\n\t\t\t\t\t\t\t\t\t<= Math.max(\n\t\t\t\t\t\t\t\t\t\tusers.length + exactUsers.length,\n\t\t\t\t\t\t\t\t\t\tgroups.length + exactGroups.length,\n\t\t\t\t\t\t\t\t\t\tremoteGroups.length + exactRemoteGroups.length,\n\t\t\t\t\t\t\t\t\t\tremotes.length + exactRemotes.length,\n\t\t\t\t\t\t\t\t\t\temails.length + exactEmails.length,\n\t\t\t\t\t\t\t\t\t\tcircles.length + exactCircles.length,\n\t\t\t\t\t\t\t\t\t\trooms.length + exactRooms.length,\n\t\t\t\t\t\t\t\t\t\tlookup.length\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\tif (!view._lookup && lookupEnabled) {\n\t\t\t\t\t\t\tresult.push(\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tlabel: t('core', 'Search globally'),\n\t\t\t\t\t\t\t\t\tvalue: {},\n\t\t\t\t\t\t\t\t\tlookup: true\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdeferred.resolve(result, exactMatches, moreResultsAvailable, lookupEnabled);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdeferred.reject(result.ocs.meta.message);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t).fail(function() {\n\t\t\t\tdeferred.reject();\n\t\t\t});\n\n\t\t\tthis._lastSuggestions = {\n\t\t\t\tsearchTerm: searchTerm,\n\t\t\t\tlookup: lookup,\n\t\t\t\tperPage: perPage,\n\t\t\t\tmodel: model,\n\t\t\t\tpromise: deferred.promise()\n\t\t\t};\n\n\t\t\treturn this._lastSuggestions.promise;\n\t\t},\n\n\t\t_getRecommendations: function(model) {\n\t\t\tif (this._lastRecommendations &&\n\t\t\t\tthis._lastRecommendations.model === model) {\n\t\t\t\treturn this._lastRecommendations.promise;\n\t\t\t}\n\n\t\t\tvar deferred = $.Deferred();\n\n\t\t\t$.get(\n\t\t\t\tOC.linkToOCS('apps/files_sharing/api/v1') + 'sharees_recommended',\n\t\t\t\t{\n\t\t\t\t\tformat: 'json',\n\t\t\t\t\titemType: model.get('itemType')\n\t\t\t\t},\n\t\t\t\tfunction (result) {\n\t\t\t\t\tif (result.ocs.meta.statuscode === 100) {\n\t\t\t\t\t\tvar filter = function(users, groups, remotes, remote_groups, emails, circles, rooms) {\n\t\t\t\t\t\t\tif (typeof(emails) === 'undefined') {\n\t\t\t\t\t\t\t\temails = [];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof(circles) === 'undefined') {\n\t\t\t\t\t\t\t\tcircles = [];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof(rooms) === 'undefined') {\n\t\t\t\t\t\t\t\trooms = [];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar usersLength;\n\t\t\t\t\t\t\tvar groupsLength;\n\t\t\t\t\t\t\tvar remotesLength;\n\t\t\t\t\t\t\tvar remoteGroupsLength;\n\t\t\t\t\t\t\tvar emailsLength;\n\t\t\t\t\t\t\tvar circlesLength;\n\t\t\t\t\t\t\tvar roomsLength;\n\n\t\t\t\t\t\t\tvar i, j;\n\n\t\t\t\t\t\t\t//Filter out the current user\n\t\t\t\t\t\t\tusersLength = users.length;\n\t\t\t\t\t\t\tfor (i = 0; i < usersLength; i++) {\n\t\t\t\t\t\t\t\tif (users[i].value.shareWith === OC.currentUser) {\n\t\t\t\t\t\t\t\t\tusers.splice(i, 1);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Filter out the owner of the share\n\t\t\t\t\t\t\tif (model.hasReshare()) {\n\t\t\t\t\t\t\t\tusersLength = users.length;\n\t\t\t\t\t\t\t\tfor (i = 0 ; i < usersLength; i++) {\n\t\t\t\t\t\t\t\t\tif (users[i].value.shareWith === model.getReshareOwner()) {\n\t\t\t\t\t\t\t\t\t\tusers.splice(i, 1);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar shares = model.get('shares');\n\t\t\t\t\t\t\tvar sharesLength = shares.length;\n\n\t\t\t\t\t\t\t// Now filter out all sharees that are already shared with\n\t\t\t\t\t\t\tfor (i = 0; i < sharesLength; i++) {\n\t\t\t\t\t\t\t\tvar share = shares[i];\n\n\t\t\t\t\t\t\t\tif (share.share_type === OC.Share.SHARE_TYPE_USER) {\n\t\t\t\t\t\t\t\t\tusersLength = users.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < usersLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (users[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tusers.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\t\t\t\t\t\tgroupsLength = groups.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < groupsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (groups[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tgroups.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\t\t\t\t\t\tremotesLength = remotes.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < remotesLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (remotes[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tremotes.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_REMOTE_GROUP) {\n\t\t\t\t\t\t\t\t\tremoteGroupsLength = remote_groups.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < remoteGroupsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (remote_groups[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tremote_groups.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\t\t\t\t\t\temailsLength = emails.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < emailsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (emails[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\temails.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\t\t\t\t\t\tcirclesLength = circles.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < circlesLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (circles[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\tcircles.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else if (share.share_type === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\t\t\t\t\t\troomsLength = rooms.length;\n\t\t\t\t\t\t\t\t\tfor (j = 0; j < roomsLength; j++) {\n\t\t\t\t\t\t\t\t\t\tif (rooms[j].value.shareWith === share.share_with) {\n\t\t\t\t\t\t\t\t\t\t\trooms.splice(j, 1);\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tfilter(\n\t\t\t\t\t\t\tresult.ocs.data.exact.users,\n\t\t\t\t\t\t\tresult.ocs.data.exact.groups,\n\t\t\t\t\t\t\tresult.ocs.data.exact.remotes,\n\t\t\t\t\t\t\tresult.ocs.data.exact.remote_groups,\n\t\t\t\t\t\t\tresult.ocs.data.exact.emails,\n\t\t\t\t\t\t\tresult.ocs.data.exact.circles,\n\t\t\t\t\t\t\tresult.ocs.data.exact.rooms\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tvar exactUsers = result.ocs.data.exact.users;\n\t\t\t\t\t\tvar exactGroups = result.ocs.data.exact.groups;\n\t\t\t\t\t\tvar exactRemotes = result.ocs.data.exact.remotes || [];\n\t\t\t\t\t\tvar exactRemoteGroups = result.ocs.data.exact.remote_groups || [];\n\t\t\t\t\t\tvar exactEmails = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.emails) !== 'undefined') {\n\t\t\t\t\t\t\texactEmails = result.ocs.data.exact.emails;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar exactCircles = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.circles) !== 'undefined') {\n\t\t\t\t\t\t\texactCircles = result.ocs.data.exact.circles;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar exactRooms = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.rooms) !== 'undefined') {\n\t\t\t\t\t\t\texactRooms = result.ocs.data.exact.rooms;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar exactMatches = exactUsers.concat(exactGroups).concat(exactRemotes).concat(exactRemoteGroups).concat(exactEmails).concat(exactCircles).concat(exactRooms);\n\n\t\t\t\t\t\tfilter(\n\t\t\t\t\t\t\tresult.ocs.data.users,\n\t\t\t\t\t\t\tresult.ocs.data.groups,\n\t\t\t\t\t\t\tresult.ocs.data.remotes,\n\t\t\t\t\t\t\tresult.ocs.data.remote_groups,\n\t\t\t\t\t\t\tresult.ocs.data.emails,\n\t\t\t\t\t\t\tresult.ocs.data.circles,\n\t\t\t\t\t\t\tresult.ocs.data.rooms\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tvar users = result.ocs.data.users;\n\t\t\t\t\t\tvar groups = result.ocs.data.groups;\n\t\t\t\t\t\tvar remotes = result.ocs.data.remotes || [];\n\t\t\t\t\t\tvar remoteGroups = result.ocs.data.remote_groups || [];\n\t\t\t\t\t\tvar lookup = result.ocs.data.lookup || [];\n\t\t\t\t\t\tvar emails = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.emails) !== 'undefined') {\n\t\t\t\t\t\t\temails = result.ocs.data.emails;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar circles = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.circles) !== 'undefined') {\n\t\t\t\t\t\t\tcircles = result.ocs.data.circles;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvar rooms = [];\n\t\t\t\t\t\tif (typeof(result.ocs.data.rooms) !== 'undefined') {\n\t\t\t\t\t\t\trooms = result.ocs.data.rooms;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvar suggestions = exactMatches.concat(users).concat(groups).concat(remotes).concat(remoteGroups).concat(emails).concat(circles).concat(rooms).concat(lookup);\n\n\t\t\t\t\t\tfunction dynamicSort(property) {\n\t\t\t\t\t\t\treturn function (a,b) {\n\t\t\t\t\t\t\t\tvar aProperty = '';\n\t\t\t\t\t\t\t\tvar bProperty = '';\n\t\t\t\t\t\t\t\tif (typeof a[property] !== 'undefined') {\n\t\t\t\t\t\t\t\t\taProperty = a[property];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (typeof b[property] !== 'undefined') {\n\t\t\t\t\t\t\t\t\tbProperty = b[property];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn (aProperty < bProperty) ? -1 : (aProperty > bProperty) ? 1 : 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Sort share entries by uuid to properly group them\n\t\t\t\t\t\t */\n\t\t\t\t\t\tvar grouped = suggestions.sort(dynamicSort('uuid'));\n\n\t\t\t\t\t\tvar previousUuid = null;\n\t\t\t\t\t\tvar groupedLength = grouped.length;\n\t\t\t\t\t\tvar result = [];\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * build the result array that only contains all contact entries from\n\t\t\t\t\t\t * merged contacts, if the search term matches its contact name\n\t\t\t\t\t\t */\n\t\t\t\t\t\tfor (var i = 0; i < groupedLength; i++) {\n\t\t\t\t\t\t\tif (typeof grouped[i].uuid !== 'undefined' && grouped[i].uuid === previousUuid) {\n\t\t\t\t\t\t\t\tgrouped[i].merged = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (typeof grouped[i].merged === 'undefined') {\n\t\t\t\t\t\t\t\tresult.push(grouped[i]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpreviousUuid = grouped[i].uuid;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tdeferred.resolve(result, exactMatches, false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdeferred.reject(result.ocs.meta.message);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t).fail(function() {\n\t\t\t\tdeferred.reject();\n\t\t\t});\n\n\t\t\tthis._lastRecommendations = {\n\t\t\t\tmodel: model,\n\t\t\t\tpromise: deferred.promise()\n\t\t\t};\n\n\t\t\treturn this._lastRecommendations.promise;\n\t\t},\n\n\t\trecommendationHandler: function (response) {\n\t\t\tvar view = this;\n\t\t\tvar $shareWithField = $('.shareWithField');\n\t\t\tthis._getRecommendations(\n\t\t\t\tview.model\n\t\t\t).done(function(suggestions) {\n\t\t\t\tconsole.info('recommendations', suggestions);\n\t\t\t\tif (suggestions.length > 0) {\n\t\t\t\t\t$shareWithField\n\t\t\t\t\t\t.autocomplete(\"option\", \"autoFocus\", true);\n\n\t\t\t\t\tresponse(suggestions);\n\t\t\t\t} else {\n\t\t\t\t\tconsole.info('no sharing recommendations found');\n\t\t\t\t\tresponse();\n\t\t\t\t}\n\t\t\t}).fail(function(message) {\n\t\t\t\tconsole.error('could not load recommendations', message)\n\t\t\t});\n\t\t},\n\n\t\tautocompleteHandler: function (search, response) {\n\t\t\t// If nothing is entered we show recommendations instead of search\n\t\t\t// results\n\t\t\tif (search.term.length === 0) {\n\t\t\t\tconsole.info(search.term, 'empty search term -> using recommendations');\n\t\t\t\tthis.recommendationHandler(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar $shareWithField = $('.shareWithField'),\n\t\t\t\tview = this,\n\t\t\t\t$loading = this.$el.find('.shareWithLoading'),\n\t\t\t\t$confirm = this.$el.find('.shareWithConfirm');\n\n\t\t\tvar count = OC.config['sharing.minSearchStringLength'];\n\t\t\tif (search.term.trim().length < count) {\n\t\t\t\tvar title = n('core',\n\t\t\t\t\t'At least {count} character is needed for autocompletion',\n\t\t\t\t\t'At least {count} characters are needed for autocompletion',\n\t\t\t\t\tcount,\n\t\t\t\t\t{ count: count }\n\t\t\t\t);\n\t\t\t\t$shareWithField.addClass('error')\n\t\t\t\t\t.attr('data-original-title', title)\n\t\t\t\t\t.tooltip('hide')\n\t\t\t\t\t.tooltip({\n\t\t\t\t\t\tplacement: 'bottom',\n\t\t\t\t\t\ttrigger: 'manual'\n\t\t\t\t\t})\n\t\t\t\t\t.tooltip('fixTitle')\n\t\t\t\t\t.tooltip('show');\n\t\t\t\tresponse();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$loading.removeClass('hidden');\n\t\t\t$loading.addClass('inlineblock');\n\t\t\t$confirm.addClass('hidden');\n\t\t\tthis._pendingOperationsCount++;\n\n\t\t\t$shareWithField.removeClass('error')\n\t\t\t\t.tooltip('hide');\n\n\t\t\tvar perPage = parseInt(OC.config['sharing.maxAutocompleteResults'], 10) || 200;\n\t\t\tthis._getSuggestions(\n\t\t\t\tsearch.term.trim(),\n\t\t\t\tperPage,\n\t\t\t\tview.model,\n\t\t\t\tview._lookup\n\t\t\t).done(function(suggestions, exactMatches, moreResultsAvailable) {\n\t\t\t\tview._pendingOperationsCount--;\n\t\t\t\tif (view._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t$loading.removeClass('inlineblock');\n\t\t\t\t\t$confirm.removeClass('hidden');\n\t\t\t\t}\n\n\t\t\t\tif (suggestions.length > 0) {\n\t\t\t\t\t$shareWithField\n\t\t\t\t\t\t.autocomplete(\"option\", \"autoFocus\", true);\n\n\t\t\t\t\tresponse(suggestions);\n\n\t\t\t\t\t// show a notice that the list is truncated\n\t\t\t\t\t// this is the case if one of the search results is at least as long as the max result config option\n\t\t\t\t\tif(moreResultsAvailable) {\n\t\t\t\t\t\tvar message = t('core', 'This list is maybe truncated - please refine your search term to see more results.');\n\t\t\t\t\t\t$('.ui-autocomplete').append('' + message + ' ');\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tvar title = t('core', 'No users or groups found for {search}', {search: $shareWithField.val()});\n\t\t\t\t\tif (!view.configModel.get('allowGroupSharing')) {\n\t\t\t\t\t\ttitle = t('core', 'No users found for {search}', {search: $('.shareWithField').val()});\n\t\t\t\t\t}\n\t\t\t\t\t$shareWithField.addClass('error')\n\t\t\t\t\t\t.attr('data-original-title', title)\n\t\t\t\t\t\t.tooltip('hide')\n\t\t\t\t\t\t.tooltip({\n\t\t\t\t\t\t\tplacement: 'top',\n\t\t\t\t\t\t\ttrigger: 'manual'\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.tooltip('fixTitle')\n\t\t\t\t\t\t.tooltip('show');\n\t\t\t\t\tresponse();\n\t\t\t\t}\n\t\t\t}).fail(function(message) {\n\t\t\t\tview._pendingOperationsCount--;\n\t\t\t\tif (view._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t$loading.removeClass('inlineblock');\n\t\t\t\t\t$confirm.removeClass('hidden');\n\t\t\t\t}\n\n\t\t\t\tif (message) {\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'An error occurred (\"{message}\"). Please try again', { message: message }));\n\t\t\t\t} else {\n\t\t\t\t\tOC.Notification.showTemporary(t('core', 'An error occurred. Please try again'));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\tautocompleteRenderItem: function(ul, item) {\n\t\t\tvar icon = 'icon-user';\n\t\t\tvar text = escapeHTML(item.label);\n\t\t\tvar description = '';\n\t\t\tvar type = '';\n\t\t\tvar getTranslatedType = function(type) {\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase 'HOME':\n\t\t\t\t\t\treturn t('core', 'Home');\n\t\t\t\t\tcase 'WORK':\n\t\t\t\t\t\treturn t('core', 'Work');\n\t\t\t\t\tcase 'OTHER':\n\t\t\t\t\t\treturn t('core', 'Other');\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn '' + type;\n\t\t\t\t}\n\t\t\t};\n\t\t\tif (typeof item.type !== 'undefined' && item.type !== null) {\n\t\t\t\ttype = getTranslatedType(item.type) + ' ';\n\t\t\t}\n\n\t\t\tif (typeof item.name !== 'undefined') {\n\t\t\t\ttext = escapeHTML(item.name);\n\t\t\t}\n\t\t\tif (item.value.shareType === OC.Share.SHARE_TYPE_GROUP) {\n\t\t\t\ticon = 'icon-contacts-dark';\n\t\t\t} else if (item.value.shareType === OC.Share.SHARE_TYPE_REMOTE) {\n\t\t\t\ticon = 'icon-shared';\n\t\t\t\tdescription += item.value.shareWith;\n\t\t\t} else if (item.value.shareType === OC.Share.SHARE_TYPE_REMOTE_GROUP) {\n\t\t\t\ttext = t('core', '{sharee} (remote group)', { sharee: text }, undefined, { escape: false });\n\t\t\t\ticon = 'icon-shared';\n\t\t\t\tdescription += item.value.shareWith;\n\t\t\t} else if (item.value.shareType === OC.Share.SHARE_TYPE_EMAIL) {\n\t\t\t\ticon = 'icon-mail';\n\t\t\t\tdescription += item.value.shareWith;\n\t\t\t} else if (item.value.shareType === OC.Share.SHARE_TYPE_CIRCLE) {\n\t\t\t\ttext = t('core', '{sharee} ({type}, {owner})', {sharee: text, type: item.value.circleInfo, owner: item.value.circleOwner}, undefined, {escape: false});\n\t\t\t\ticon = 'icon-circle';\n\t\t\t} else if (item.value.shareType === OC.Share.SHARE_TYPE_ROOM) {\n\t\t\t\ticon = 'icon-talk';\n\t\t\t}\n\n\t\t\tvar insert = $(\"
\");\n\t\t\tif (item.merged) {\n\t\t\t\tinsert.addClass('merged');\n\t\t\t\ttext = item.value.shareWith;\n\t\t\t\tdescription = type;\n\t\t\t} else if (item.lookup) {\n\t\t\t\ttext = item.label;\n\t\t\t\ticon = false;\n\t\t\t\tinsert.append(' ');\n\t\t\t} else {\n\t\t\t\tvar avatar = $(\"
\").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$(\"
\")\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\"$& \")\n\t\t\t\t\t+ '' + description + ' '\n\t\t\t\t)\n\t\t\t\t.appendTo(insert);\n\t\t\tinsert.attr('title', item.value.shareWith);\n\t\t\tif (icon) {\n\t\t\t\tinsert.append(' ');\n\t\t\t}\n\t\t\tinsert = $(\"\")\n\t\t\t\t.append(insert);\n\t\t\treturn $(\"\")\n\t\t\t\t.addClass((item.value.shareType === OC.Share.SHARE_TYPE_GROUP) ? 'group' : 'user')\n\t\t\t\t.append(insert)\n\t\t\t\t.appendTo(ul);\n\t\t},\n\n\t\t_onSelectRecipient: function(e, s) {\n\t\t\tvar self = this;\n\n\t\t\tif (e.keyCode == 9) {\n\t\t\t\te.preventDefault();\n\t\t\t\tif (typeof s.item.name !== 'undefined') {\n\t\t\t\t\te.target.value = s.item.name;\n\t\t\t\t} else {\n\t\t\t\t\te.target.value = s.item.label;\n\t\t\t\t}\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t$(e.target).attr('disabled', false)\n\t\t\t\t\t\t.autocomplete('search', $(e.target).val());\n\t\t\t\t}, 0);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (s.item.lookup) {\n\t\t\t\t// Retrigger search but with global lookup this time\n\t\t\t\tthis._lookup = true;\n\t\t\t\tvar $shareWithField = this.$el.find('.shareWithField');\n\t\t\t\tvar val = $shareWithField.val();\n\t\t\t\tsetTimeout(function() {\n\t\t\t\t\tconsole.debug('searching again, but globally. search term: ' + val);\n\t\t\t\t\t$shareWithField.autocomplete(\"search\", val);\n\t\t\t\t}, 0);\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\te.preventDefault();\n\t\t\t// Ensure that the keydown handler for the input field is not\n\t\t\t// called; otherwise it would try to add the recipient again, which\n\t\t\t// would fail.\n\t\t\te.stopImmediatePropagation();\n\t\t\t$(e.target).attr('disabled', true)\n\t\t\t\t.val(s.item.label);\n\n\t\t\tvar $loading = this.$el.find('.shareWithLoading');\n\t\t\tvar $confirm = this.$el.find('.shareWithConfirm');\n\n\t\t\t$loading.removeClass('hidden');\n\t\t\t$loading.addClass('inlineblock');\n\t\t\t$confirm.addClass('hidden');\n\t\t\tthis._pendingOperationsCount++;\n\n\t\t\tthis.model.addShare(s.item.value, {success: function() {\n\t\t\t\t// Adding a share changes the suggestions.\n\t\t\t\tself._lastSuggestions = undefined;\n\n\t\t\t\t$(e.target).val('')\n\t\t\t\t\t.attr('disabled', false);\n\n\t\t\t\tself._pendingOperationsCount--;\n\t\t\t\tif (self._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t$loading.removeClass('inlineblock');\n\t\t\t\t\t$confirm.removeClass('hidden');\n\t\t\t\t}\n\t\t\t}, error: function(obj, msg) {\n\t\t\t\tOC.Notification.showTemporary(msg);\n\t\t\t\t$(e.target).attr('disabled', false)\n\t\t\t\t\t.autocomplete('search', $(e.target).val());\n\n\t\t\t\tself._pendingOperationsCount--;\n\t\t\t\tif (self._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t$loading.removeClass('inlineblock');\n\t\t\t\t\t$confirm.removeClass('hidden');\n\t\t\t\t}\n\t\t\t}});\n\t\t},\n\n\t\t_confirmShare: function() {\n\t\t\tvar self = this;\n\t\t\tvar $shareWithField = $('.shareWithField');\n\t\t\tvar $loading = this.$el.find('.shareWithLoading');\n\t\t\tvar $confirm = this.$el.find('.shareWithConfirm');\n\n\t\t\t$loading.removeClass('hidden');\n\t\t\t$loading.addClass('inlineblock');\n\t\t\t$confirm.addClass('hidden');\n\t\t\tthis._pendingOperationsCount++;\n\n\t\t\t$shareWithField.prop('disabled', true);\n\n\t\t\t// Disabling the autocompletion does not clear its search timeout;\n\t\t\t// removing the focus from the input field does, but only if the\n\t\t\t// autocompletion is not disabled when the field loses the focus.\n\t\t\t// Thus, the field has to be disabled before disabling the\n\t\t\t// autocompletion to prevent an old pending search result from\n\t\t\t// appearing once the field is enabled again.\n\t\t\t$shareWithField.autocomplete('close');\n\t\t\t$shareWithField.autocomplete('disable');\n\n\t\t\tvar restoreUI = function() {\n\t\t\t\tself._pendingOperationsCount--;\n\t\t\t\tif (self._pendingOperationsCount === 0) {\n\t\t\t\t\t$loading.addClass('hidden');\n\t\t\t\t\t$loading.removeClass('inlineblock');\n\t\t\t\t\t$confirm.removeClass('hidden');\n\t\t\t\t}\n\n\t\t\t\t$shareWithField.prop('disabled', false);\n\t\t\t\t$shareWithField.focus();\n\t\t\t};\n\n\t\t\tvar perPage = parseInt(OC.config['sharing.maxAutocompleteResults'], 10) || 200;\n\t\t\tthis._getSuggestions(\n\t\t\t\t$shareWithField.val(),\n\t\t\t\tperPage,\n\t\t\t\tthis.model,\n\t\t\t\tthis._lookup\n\t\t\t).done(function(suggestions, exactMatches) {\n\t\t\t\tif (suggestions.length === 0) {\n\t\t\t\t\trestoreUI();\n\n\t\t\t\t\t$shareWithField.autocomplete('enable');\n\n\t\t\t\t\t// There is no need to show an error message here; it will\n\t\t\t\t\t// be automatically shown when the autocomplete is activated\n\t\t\t\t\t// again (due to the focus on the field) and it finds no\n\t\t\t\t\t// matches.\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (exactMatches.length !== 1) {\n\t\t\t\t\trestoreUI();\n\n\t\t\t\t\t$shareWithField.autocomplete('enable');\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar actionSuccess = function() {\n\t\t\t\t\t// Adding a share changes the suggestions.\n\t\t\t\t\tself._lastSuggestions = undefined;\n\n\t\t\t\t\t$shareWithField.val('');\n\n\t\t\t\t\trestoreUI();\n\n\t\t\t\t\t$shareWithField.autocomplete('enable');\n\t\t\t\t};\n\n\t\t\t\tvar actionError = function(obj, msg) {\n\t\t\t\t\trestoreUI();\n\n\t\t\t\t\t$shareWithField.autocomplete('enable');\n\n\t\t\t\t\tOC.Notification.showTemporary(msg);\n\t\t\t\t};\n\n\t\t\t\tself.model.addShare(exactMatches[0].value, {\n\t\t\t\t\tsuccess: actionSuccess,\n\t\t\t\t\terror: actionError\n\t\t\t\t});\n\t\t\t}).fail(function(message) {\n\t\t\t\trestoreUI();\n\n\t\t\t\t$shareWithField.autocomplete('enable');\n\n\t\t\t\t// There is no need to show an error message here; it will be\n\t\t\t\t// automatically shown when the autocomplete is activated again\n\t\t\t\t// (due to the focus on the field) and getting the suggestions\n\t\t\t\t// fail.\n\t\t\t});\n\t\t},\n\n\t\t_toggleLoading: function(state) {\n\t\t\tthis._loading = state;\n\t\t\tthis.$el.find('.subView').toggleClass('hidden', state);\n\t\t\tthis.$el.find('.loading').toggleClass('hidden', !state);\n\t\t},\n\n\t\t_onRequest: function() {\n\t\t\t// only show the loading spinner for the first request (for now)\n\t\t\tif (!this._loadingOnce) {\n\t\t\t\tthis._toggleLoading(true);\n\t\t\t}\n\t\t},\n\n\t\t_onEndRequest: function() {\n\t\t\tvar self = this;\n\t\t\tthis._toggleLoading(false);\n\t\t\tif (!this._loadingOnce) {\n\t\t\t\tthis._loadingOnce = true;\n\t\t\t}\n\t\t},\n\n\t\trender: function() {\n\t\t\tvar self = this;\n\t\t\tvar baseTemplate = OC.Share.Templates['sharedialogview'];\n\n\t\t\tthis.$el.html(baseTemplate({\n\t\t\t\tcid: this.cid,\n\t\t\t\tshareLabel: t('core', 'Share'),\n\t\t\t\tsharePlaceholder: this._renderSharePlaceholderPart(),\n\t\t\t\tisSharingAllowed: this.model.sharePermissionPossible()\n\t\t\t}));\n\n\t\t\tvar $shareField = this.$el.find('.shareWithField');\n\t\t\tif ($shareField.length) {\n\t\t\t\tvar shareFieldKeydownHandler = function(event) {\n\t\t\t\t\tif (event.keyCode !== 13) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\n\t\t\t\t\tself._confirmShare();\n\n\t\t\t\t\treturn false;\n\t\t\t\t};\n\n\t\t\t\t$shareField.autocomplete({\n\t\t\t\t\tminLength: 0,\n\t\t\t\t\tdelay: 750,\n\t\t\t\t\tfocus: function(event) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t},\n\t\t\t\t\tsource: this.autocompleteHandler,\n\t\t\t\t\tselect: this._onSelectRecipient,\n\t\t\t\t\topen: function() {\n\t\t\t\t\t\tvar autocomplete = $(this).autocomplete('widget');\n\t\t\t\t\t\tvar numberOfItems = autocomplete.find('li').size();\n\t\t\t\t\t\tautocomplete.removeClass('item-count-1');\n\t\t\t\t\t\tautocomplete.removeClass('item-count-2');\n\t\t\t\t\t\tif (numberOfItems <= 2) {\n\t\t\t\t\t\t\tautocomplete.addClass('item-count-' + numberOfItems);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}).data('ui-autocomplete')._renderItem = this.autocompleteRenderItem;\n\n\t\t\t\t$shareField.on('keydown', null, shareFieldKeydownHandler);\n\t\t\t}\n\n\t\t\tthis.resharerInfoView.$el = this.$el.find('.resharerInfoView');\n\t\t\tthis.resharerInfoView.render();\n\n\t\t\tthis.linkShareView.$el = this.$el.find('.linkShareView');\n\t\t\tthis.linkShareView.render();\n\n\t\t\tthis.shareeListView.$el = this.$el.find('.shareeListView');\n\t\t\tthis.shareeListView.render();\n\n\t\t\tthis.$el.find('.hasTooltip').tooltip();\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * sets whether share by link should be displayed or not. Default is\n\t\t * true.\n\t\t *\n\t\t * @param {bool} showLink\n\t\t */\n\t\tsetShowLink: function(showLink) {\n\t\t\tthis._showLink = (typeof showLink === 'boolean') ? showLink : true;\n\t\t\tthis.linkShareView.showLink = this._showLink;\n\t\t},\n\n\t\t_renderSharePlaceholderPart: function () {\n\t\t\tvar allowRemoteSharing = this.configModel.get('isRemoteShareAllowed');\n\t\t\tvar allowMailSharing = this.configModel.get('isMailShareAllowed');\n\n\t\t\tif (!allowRemoteSharing && allowMailSharing) {\n\t\t\t\treturn t('core', 'Name or email address...');\n\t\t\t}\n\t\t\tif (allowRemoteSharing && !allowMailSharing) {\n\t\t\t\treturn t('core', 'Name or federated cloud ID...');\n\t\t\t}\n\t\t\tif (allowRemoteSharing && allowMailSharing) {\n\t\t\t\treturn t('core', 'Name, federated cloud ID or email address...');\n\t\t\t}\n\n\t\t\treturn \tt('core', 'Name...');\n\t\t},\n\n\t});\n\n\tOC.Share.ShareDialogView = ShareDialogView;\n\n})();\n","/* global escapeHTML */\n\n/**\n * @namespace\n */\nOC.Share = _.extend(OC.Share || {}, {\n\tSHARE_TYPE_USER:0,\n\tSHARE_TYPE_GROUP:1,\n\tSHARE_TYPE_LINK:3,\n\tSHARE_TYPE_EMAIL:4,\n\tSHARE_TYPE_REMOTE:6,\n\tSHARE_TYPE_CIRCLE:7,\n\tSHARE_TYPE_GUEST:8,\n\tSHARE_TYPE_REMOTE_GROUP:9,\n\tSHARE_TYPE_ROOM:10,\n\n\t/**\n\t * Regular expression for splitting parts of remote share owners:\n\t * \"user@example.com/path/to/owncloud\"\n\t * \"user@anotherexample.com@example.com/path/to/owncloud\n\t */\n\t_REMOTE_OWNER_REGEXP: new RegExp(\"^([^@]*)@(([^@]*)@)?([^/]*)([/](.*)?)?$\"),\n\n\t/**\n\t * @deprecated use OC.Share.currentShares instead\n\t */\n\titemShares:[],\n\t/**\n\t * Full list of all share statuses\n\t */\n\tstatuses:{},\n\t/**\n\t * Shares for the currently selected file.\n\t * (for which the dropdown is open)\n\t *\n\t * Key is item type and value is an array or\n\t * shares of the given item type.\n\t */\n\tcurrentShares: {},\n\t/**\n\t * Whether the share dropdown is opened.\n\t */\n\tdroppedDown:false,\n\t/**\n\t * Loads ALL share statuses from server, stores them in\n\t * OC.Share.statuses then calls OC.Share.updateIcons() to update the\n\t * files \"Share\" icon to \"Shared\" according to their share status and\n\t * share type.\n\t *\n\t * If a callback is specified, the update step is skipped.\n\t *\n\t * @param itemType item type\n\t * @param fileList file list instance, defaults to OCA.Files.App.fileList\n\t * @param callback function to call after the shares were loaded\n\t */\n\tloadIcons:function(itemType, fileList, callback) {\n\t\tvar path = fileList.dirInfo.path;\n\t\tif (path === '/') {\n\t\t\tpath = '';\n\t\t}\n\t\tpath += '/' + fileList.dirInfo.name;\n\n\t\t// Load all share icons\n\t\t$.get(\n\t\t\tOC.linkToOCS('apps/files_sharing/api/v1', 2) + 'shares',\n\t\t\t{\n\t\t\t\tsubfiles: 'true',\n\t\t\t\tpath: path,\n\t\t\t\tformat: 'json'\n\t\t\t}, function(result) {\n\t\t\t\tif (result && result.ocs.meta.statuscode === 200) {\n\t\t\t\t\tOC.Share.statuses = {};\n\t\t\t\t\t$.each(result.ocs.data, function(it, share) {\n\t\t\t\t\t\tif (!(share.item_source in OC.Share.statuses)) {\n\t\t\t\t\t\t\tOC.Share.statuses[share.item_source] = {link: false};\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (share.share_type === OC.Share.SHARE_TYPE_LINK) {\n\t\t\t\t\t\t\tOC.Share.statuses[share.item_source] = {link: true};\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tif (_.isFunction(callback)) {\n\t\t\t\t\t\tcallback(OC.Share.statuses);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tOC.Share.updateIcons(itemType, fileList);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n\t/**\n\t * Updates the files' \"Share\" icons according to the known\n\t * sharing states stored in OC.Share.statuses.\n\t * (not reloaded from server)\n\t *\n\t * @param itemType item type\n\t * @param fileList file list instance\n\t * defaults to OCA.Files.App.fileList\n\t */\n\tupdateIcons:function(itemType, fileList){\n\t\tvar item;\n\t\tvar $fileList;\n\t\tvar currentDir;\n\t\tif (!fileList && OCA.Files) {\n\t\t\tfileList = OCA.Files.App.fileList;\n\t\t}\n\t\t// fileList is usually only defined in the files app\n\t\tif (fileList) {\n\t\t\t$fileList = fileList.$fileList;\n\t\t\tcurrentDir = fileList.getCurrentDirectory();\n\t\t}\n\t\t// TODO: iterating over the files might be more efficient\n\t\tfor (item in OC.Share.statuses){\n\t\t\tvar iconClass = 'icon-shared';\n\t\t\tvar data = OC.Share.statuses[item];\n\t\t\tvar hasLink = data.link;\n\t\t\t// Links override shared in terms of icon display\n\t\t\tif (hasLink) {\n\t\t\t\ticonClass = 'icon-public';\n\t\t\t}\n\t\t\tif (itemType !== 'file' && itemType !== 'folder') {\n\t\t\t\t$('a.share[data-item=\"'+item+'\"] .icon').removeClass('icon-shared icon-public').addClass(iconClass);\n\t\t\t} else {\n\t\t\t\t// TODO: ultimately this part should be moved to files_sharing app\n\t\t\t\tvar file = $fileList.find('tr[data-id=\"'+item+'\"]');\n\t\t\t\tvar shareFolder = OC.imagePath('core', 'filetypes/folder-shared');\n\t\t\t\tvar img;\n\t\t\t\tif (file.length > 0) {\n\t\t\t\t\tthis.markFileAsShared(file, true, hasLink);\n\t\t\t\t} else {\n\t\t\t\t\tvar dir = currentDir;\n\t\t\t\t\tif (dir.length > 1) {\n\t\t\t\t\t\tvar last = '';\n\t\t\t\t\t\tvar path = dir;\n\t\t\t\t\t\t// Search for possible parent folders that are shared\n\t\t\t\t\t\twhile (path != last) {\n\t\t\t\t\t\t\tif (path === data.path && !data.link) {\n\t\t\t\t\t\t\t\tvar actions = $fileList.find('.fileactions .action[data-action=\"Share\"]');\n\t\t\t\t\t\t\t\tvar files = $fileList.find('.filename');\n\t\t\t\t\t\t\t\tvar i;\n\t\t\t\t\t\t\t\tfor (i = 0; i < actions.length; i++) {\n\t\t\t\t\t\t\t\t\t// TODO: use this.markFileAsShared()\n\t\t\t\t\t\t\t\t\timg = $(actions[i]).find('img');\n\t\t\t\t\t\t\t\t\tif (img.attr('src') !== OC.imagePath('core', 'actions/public')) {\n\t\t\t\t\t\t\t\t\t\timg.attr('src', image);\n\t\t\t\t\t\t\t\t\t\t$(actions[i]).addClass('permanent');\n\t\t\t\t\t\t\t\t\t\t$(actions[i]).html(' '+t('core', 'Shared')+' ').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 = ' ';\n\t\t\tvar hidden = '' + message + ' ' + escapeHTML(shareWithDisplayName) + ' ';\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 = '';\n\t\thtml += '' + escapeHTML(userName) + ' ';\n\t\tif (userDomain) {\n\t\t\thtml += '@' + escapeHTML(userDomain) + ' ';\n\t\t}\n\t\thtml += ' ';\n\t\treturn html;\n\t},\n\t/**\n\t * Loop over all recipients in the list and format them using\n\t * all kind of fancy magic.\n\t *\n\t * @param {Object} recipients array of all the recipients\n\t * @return {String[]} modified list of recipients\n\t */\n\t_formatShareList: function(recipients) {\n\t\tvar _parent = this;\n\t\trecipients = _.toArray(recipients);\n\t\trecipients.sort(function(a, b) {\n\t\t\treturn a.shareWithDisplayName.localeCompare(b.shareWithDisplayName);\n\t\t});\n\t\treturn $.map(recipients, function(recipient) {\n\t\t\treturn _parent._formatRemoteShare(recipient.shareWith, recipient.shareWithDisplayName, t('core', 'Shared with'));\n\t\t});\n\t},\n\t/**\n\t * Marks/unmarks a given file as shared by changing its action icon\n\t * and folder icon.\n\t *\n\t * @param $tr file element to mark as shared\n\t * @param hasShares whether shares are available\n\t * @param hasLink whether link share is available\n\t */\n\tmarkFileAsShared: function($tr, hasShares, hasLink) {\n\t\tvar action = $tr.find('.fileactions .action[data-action=\"Share\"]');\n\t\tvar type = $tr.data('type');\n\t\tvar icon = action.find('.icon');\n\t\tvar message, recipients, avatars;\n\t\tvar ownerId = $tr.attr('data-share-owner-id');\n\t\tvar owner = $tr.attr('data-share-owner');\n\t\tvar mountType = $tr.attr('data-mounttype');\n\t\tvar shareFolderIcon;\n\t\tvar iconClass = 'icon-shared';\n\t\taction.removeClass('shared-style');\n\t\t// update folder icon\n\t\tif (type === 'dir' && (hasShares || hasLink || ownerId)) {\n\t\t\tif (typeof mountType !== 'undefined' && mountType !== 'shared-root' && mountType !== 'shared') {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-' + mountType);\n\t\t\t} else if (hasLink) {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-public');\n\t\t\t} else {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-shared');\n\t\t\t}\n\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')');\n\t\t\t$tr.attr('data-icon', shareFolderIcon);\n\t\t} else if (type === 'dir') {\n\t\t\tvar isEncrypted = $tr.attr('data-e2eencrypted');\n\t\t\t// FIXME: duplicate of FileList._createRow logic for external folder,\n\t\t\t// need to refactor the icon logic into a single code path eventually\n\t\t\tif (isEncrypted === 'true') {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-encrypted');\n\t\t\t\t$tr.attr('data-icon', shareFolderIcon);\n\t\t\t} else if (mountType && mountType.indexOf('external') === 0) {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir-external');\n\t\t\t\t$tr.attr('data-icon', shareFolderIcon);\n\t\t\t} else {\n\t\t\t\tshareFolderIcon = OC.MimeType.getIconUrl('dir');\n\t\t\t\t// back to default\n\t\t\t\t$tr.removeAttr('data-icon');\n\t\t\t}\n\t\t\t$tr.find('.filename .thumbnail').css('background-image', 'url(' + shareFolderIcon + ')');\n\t\t}\n\t\t// update share action text / icon\n\t\tif (hasShares || ownerId) {\n\t\t\trecipients = $tr.data('share-recipient-data');\n\t\t\taction.addClass('shared-style');\n\n\t\t\tavatars = '' + t('core', 'Shared') + ' ';\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('' + t('core', 'Shared') + ' ').prepend(icon);\n\t\t}\n\t\tif (hasLink) {\n\t\t\ticonClass = 'icon-public';\n\t\t}\n\t\ticon.removeClass('icon-shared icon-public').addClass(iconClass);\n\t},\n\tshowDropDown:function(itemType, itemSource, appendTo, link, possiblePermissions, filename) {\n\t\tvar configModel = new OC.Share.ShareConfigModel();\n\t\tvar attributes = {itemType: itemType, itemSource: itemSource, possiblePermissions: possiblePermissions};\n\t\tvar itemModel = new OC.Share.ShareItemModel(attributes, {configModel: configModel});\n\t\tvar dialogView = new OC.Share.ShareDialogView({\n\t\t\tid: 'dropdown',\n\t\t\tmodel: itemModel,\n\t\t\tconfigModel: configModel,\n\t\t\tclassName: 'drop shareDropDown',\n\t\t\tattributes: {\n\t\t\t\t'data-item-source-name': filename,\n\t\t\t\t'data-item-type': itemType,\n\t\t\t\t'data-item-source': itemSource\n\t\t\t}\n\t\t});\n\t\tdialogView.setShowLink(link);\n\t\tvar $dialog = dialogView.render().$el;\n\t\t$dialog.appendTo(appendTo);\n\t\t$dialog.slideDown(OC.menuSpeed, function() {\n\t\t\tOC.Share.droppedDown = true;\n\t\t});\n\t\titemModel.fetch();\n\t},\n\thideDropDown:function(callback) {\n\t\tOC.Share.currentShares = null;\n\t\t$('#dropdown').slideUp(OC.menuSpeed, function() {\n\t\t\tOC.Share.droppedDown = false;\n\t\t\t$('#dropdown').remove();\n\t\t\tif (typeof FileActions !== 'undefined') {\n\t\t\t\t$('tr').removeClass('mouseOver');\n\t\t\t}\n\t\t\tif (callback) {\n\t\t\t\tcallback.call();\n\t\t\t}\n\t\t});\n\t},\n\tdirname:function(path) {\n\t\treturn path.replace(/\\\\/g,'/').replace(/\\/[^\\/]*$/, '');\n\t}\n});\n\n$(document).ready(function() {\n\tif(typeof monthNames != 'undefined'){\n\t\t// min date should always be the next day\n\t\tvar minDate = new Date();\n\t\tminDate.setDate(minDate.getDate()+1);\n\t\t$.datepicker.setDefaults({\n\t\t\tmonthNames: monthNames,\n\t\t\tmonthNamesShort: monthNamesShort,\n\t\t\tdayNames: dayNames,\n\t\t\tdayNamesMin: dayNamesMin,\n\t\t\tdayNamesShort: dayNamesShort,\n\t\t\tfirstDay: firstDay,\n\t\t\tminDate : minDate\n\t\t});\n\t}\n\n\t$(this).click(function(event) {\n\t\tvar target = $(event.target);\n\t\tvar isMatched = !target.is('.drop, .ui-datepicker-next, .ui-datepicker-prev, .ui-icon')\n\t\t\t&& !target.closest('#ui-datepicker-div').length && !target.closest('.ui-autocomplete').length;\n\t\tif (OC.Share && OC.Share.droppedDown && isMatched && $('#dropdown').has(event.target).length === 0) {\n\t\t\tOC.Share.hideDropDown();\n\t\t}\n\t});\n\n\n\n});\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js
index 30c3362d3e36d..51f9e9a7b27f2 100644
--- a/core/js/sharedialoglinkshareview.js
+++ b/core/js/sharedialoglinkshareview.js
@@ -346,6 +346,7 @@
},
onPasswordEntered: function(event) {
+ var self = this;
var $element = $(event.target);
var $li = $element.closest('li[data-share-id]');
var shareId = $li.data('share-id');
@@ -387,6 +388,11 @@
$loading.removeClass('inlineblock').addClass('hidden');
},
error: function(model, msg) {
+ // force open the menu
+ if (event) {
+ self.onToggleMenu(event)
+ }
+
// Add visual feedback to both the input and the submit button
$input.parent().find('input').addClass('error');
@@ -667,8 +673,8 @@
}
}
- this.$el.on('beforeHide', function() {
- this.onMenuhide()
+ this.$el.on('beforeHide', function(e) {
+ this.onMenuhide(e)
}.bind(this));
this.$el.html(linkShareTemplate({
@@ -709,13 +715,16 @@
}
},
- onMenuhide: function() {
+ onMenuhide: function(event) {
if (this.hasPasswordChanged) {
var shareId = this.hasPasswordChanged
var target = this.$el.find('li[data-share-id=' + shareId + '] #linkPassText-' + shareId);
console.debug('Force saving password for share number ', shareId)
- this.onPasswordEntered({ target: target })
+ // replace target by last opened menu
+ this.onPasswordEntered(_.extend(event, { target: target }))
}
+ // force close all opened tooltips
+ this.$el.find('[data-original-title]').tooltip('hide')
},
/**
diff --git a/core/js/tests/specs/sharedialoglinkshareview.js b/core/js/tests/specs/sharedialoglinkshareview.js
index 39bf256d33409..479a239a94993 100644
--- a/core/js/tests/specs/sharedialoglinkshareview.js
+++ b/core/js/tests/specs/sharedialoglinkshareview.js
@@ -202,14 +202,18 @@ describe('OC.Share.ShareDialogLinkShareView', function () {
});
it('shows the working icon when called', function () {
- view.onPasswordEntered({target: view.$el.find('.linkPassText')});
+ view.onPasswordEntered(jQuery.Event('click', {
+ target: view.$el.find('.linkPassText')
+ }));
expect($workingIcon.hasClass('hidden')).toBeFalsy();
expect(shareModel.saveLinkShare.withArgs({ password: 'myPassword', cid: 123 }).calledOnce).toBeTruthy();
});
it('hides the working icon when saving the password succeeds', function () {
- view.onPasswordEntered({target: view.$el.find('.linkPassText')});
+ view.onPasswordEntered(jQuery.Event('click', {
+ target: view.$el.find('.linkPassText')
+ }));
expect($workingIcon.hasClass('hidden')).toBeFalsy();
expect(shareModel.saveLinkShare.withArgs({ password: 'myPassword', cid: 123 }).calledOnce).toBeTruthy();
@@ -220,7 +224,9 @@ describe('OC.Share.ShareDialogLinkShareView', function () {
});
it('hides the working icon when saving the password fails', function () {
- view.onPasswordEntered({target: view.$el.find('.linkPassText')});
+ view.onPasswordEntered(jQuery.Event('click', {
+ target: view.$el.find('.linkPassText')
+ }));
expect($workingIcon.hasClass('hidden')).toBeFalsy();
expect(shareModel.saveLinkShare.withArgs({ password: 'myPassword', cid: 123 }).calledOnce).toBeTruthy();