diff options
Diffstat (limited to 'core/js/dist/systemtags.js.map')
-rw-r--r-- | core/js/dist/systemtags.js.map | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/js/dist/systemtags.js.map b/core/js/dist/systemtags.js.map index 6170da5a193..00e37145353 100644 --- a/core/js/dist/systemtags.js.map +++ b/core/js/dist/systemtags.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./core/js/systemtags/merged-systemtags.js","webpack:///./core/js/systemtags/systemtags.js","webpack:///./core/js/systemtags/templates.js","webpack:///./core/js/systemtags/systemtagmodel.js","webpack:///./core/js/systemtags/systemtagsmappingcollection.js","webpack:///./core/js/systemtags/systemtagscollection.js","webpack:///./core/js/systemtags/systemtagsinputfield.js","webpack:///./core/css/systemtags.scss?1220","webpack:///./core/css/systemtags.scss","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","OC","SystemTags","getDescriptiveTag","tag","_","isUndefined","toJSON","$","addClass","text","scope","$span","append","escapeHTML","userAssignable","userVisible","$tag","template","templates","Handlebars","Templates","container","depth0","helpers","partials","data","stack1","helper","tagMarkup","helperMissing","nullContext","escapeExpression","renameTooltip","options","alias1","alias2","buffer","isNew","program","noop","id","isAdmin","allowActions","blockHelperMissing","deleteTooltip","alias4","cid","renameLabel","extend","Files","Client","PROPERTY_FILEID","NS_OWNCLOUD","PROPERTY_CAN_ASSIGN","PROPERTY_DISPLAYNAME","PROPERTY_USERVISIBLE","PROPERTY_USERASSIGNABLE","SystemTagModel","Backbone","Model","sync","davSync","defaults","canAssign","davProperties","parse","SystemTagsMappingCollection","Collection","usePUT","_objectId","_objectType","model","url","linkToRemote","this","setObjectId","objectId","setObjectType","objectType","initialize","models","getTagIds","map","SystemTagsCollection","filterByName","filter","term","substr","length","toLowerCase","filterFunction","reset","fetched","apply","arguments","fetch","self","force","success","trigger","Promise","resolve","collection","SystemTagsInputField","View","_rendered","_newTag","_lastUsedTags","className","_multiple","multiple","_allowActions","_allowCreate","allowCreate","_isAdmin","isFunction","initSelection","_initSelection","on","defer","_refreshSelection","_getLastUsedTags","bindAll","ajax","type","generateUrl","response","$tagsField","select2","val","_onClickRenameTag","ev","$item","target","closest","tagId","attr","oldName","$renameForm","find","after","tooltip","placement","focus","selectRange","_onSubmitRenameTag","preventDefault","$form","tagModel","newName","trim","save","removeClass","remove","_onClickDeleteTag","destroy","_addToSelect2Selection","selection","push","_onSelectTag","e","unshift","error","xhr","status","where","_onDeselectTag","choice","_queryTagsAutocomplete","query","tagModels","callback","results","invoke","_preventDefault","stopPropagation","_formatDropDownResult","innerHTML","_formatSelection","_createSearchChoice","entry","element","ids","split","modelToSelection","locked","selectedModels","indexOf","findSelectedObjects","render","$el","html","placeholder","containerCssClass","dropdownCssClass","closeOnSelect","allowClear","toggleSelect","formatResult","formatSelection","createSearchChoice","undefined","sortResults","selectedItems","pluck","sort","a","b","aSelected","bSelected","aLastUsed","bLastUsed","Util","naturalSortCompare","formatNoMatches","$dropDown","delegateEvents","getValues","setValues","values","setData","content","locals","useSourceMap","list","toString","item","cssMapping","btoa","sourceMapping","sourceMap","base64","unescape","encodeURIComponent","JSON","stringify","concat","sourceURLs","sources","source","sourceRoot","join","cssWithMappingToString","mediaQuery","alreadyImportedModules","_i","memo","stylesInDom","isOldIE","Boolean","window","document","all","atob","getTarget","styleTarget","querySelector","HTMLIFrameElement","contentDocument","head","listToStyles","styles","newStyles","base","part","css","media","parts","addStylesToDom","domStyle","j","refs","addStyle","insertStyleElement","style","createElement","attributes","nonce","keys","forEach","setAttribute","insert","Error","appendChild","textStore","replaceText","index","replacement","applyToSingletonTag","obj","styleSheet","cssText","cssNode","createTextNode","childNodes","removeChild","insertBefore","applyToTag","firstChild","singleton","singletonCounter","update","styleIndex","parentNode","removeStyleElement","newObj","newList","mayRemove","_domStyle"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,EAAoB6B,EAAI,SAAS1B,GAChC,IAAIS,EAAST,GAAUA,EAAOq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eP,EAAQpO,GAChB,SAAgBiR,GAGrB,IAFA,IAAIC,EAAY,GAEPnV,EAAI,EAAGA,EAAIqS,EAAO7K,OAAQxH,IAAK,CACtC,IAAIkQ,EAAOmC,EAAOrS,GACd6S,EAAWtB,EAAYrB,EAAK1L,IAE5BqO,IACFA,EAASE,OACToC,EAAUrJ,KAAK+G,IAIfqC,GAEFtC,EADgBR,EAAa8C,EAASjR,GACZA,GAG5B,IAAK,IAAIoN,EAAK,EAAGA,EAAK8D,EAAU3N,OAAQ6J,IAAM,CAC5C,IAAI+D,EAAYD,EAAU9D,GAE1B,GAAuB,IAAnB+D,EAAUrC,KAAY,CACxB,IAAK,IAAID,EAAI,EAAGA,EAAIsC,EAAUzC,MAAMnL,OAAQsL,IAC1CsC,EAAUzC,MAAMG,YAGXvB,EAAY6D,EAAU5Q","file":"systemtags.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n","import './systemtags.js'\nimport './templates.js'\nimport './systemtagmodel.js'\nimport './systemtagsmappingcollection.js'\nimport './systemtagscollection.js'\nimport './systemtagsinputfield.js'\n\nimport '../../css/systemtags.scss'\n","/*\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\t/**\n\t * @namespace\n\t */\n\tOC.SystemTags = {\n\t\t/**\n\t\t *\n\t\t * @param {OC.SystemTags.SystemTagModel|Object|String} tag\n\t\t * @return {jQuery}\n\t\t */\n\t\tgetDescriptiveTag: function(tag) {\n\t\t\tif (_.isUndefined(tag.name) && !_.isUndefined(tag.toJSON)) {\n\t\t\t\ttag = tag.toJSON();\n\t\t\t}\n\n\t\t\tif (_.isUndefined(tag.name)) {\n\t\t\t\treturn $('<span>').addClass('non-existing-tag').text(\n\t\t\t\t\tt('core', 'Non-existing tag #{tag}', {\n\t\t\t\t\t\ttag: tag\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tvar $span = $('<span>');\n\t\t\t$span.append(escapeHTML(tag.name));\n\n\t\t\tvar scope;\n\t\t\tif (!tag.userAssignable) {\n\t\t\t\tscope = t('core', 'restricted');\n\t\t\t}\n\t\t\tif (!tag.userVisible) {\n\t\t\t\t// invisible also implicitly means not assignable\n\t\t\t\tscope = t('core', 'invisible');\n\t\t\t}\n\t\t\tif (scope) {\n\t\t\t\tvar $tag = $('<em>').text(' ' +\n\t\t\t\t\tt('core', '({scope})', {\n\t\t\t\t\t\tscope: scope\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t\t$span.append($tag);\n\t\t\t}\n\t\t\treturn $span;\n\t\t}\n\t};\n})(OC);\n\n","(function() {\n var template = Handlebars.template, templates = OC.SystemTags.Templates = OC.SystemTags.Templates || {};\ntemplates['result'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n return \" new-item\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, helper;\n\n return \"\t\t<span class=\\\"label\\\">\"\n + ((stack1 = ((helper = (helper = helpers.tagMarkup || (depth0 != null ? depth0.tagMarkup : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"</span>\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"\t\t<span class=\\\"label\\\">\"\n + container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"\t\t<span class=\\\"systemtags-actions\\\">\\n\t\t\t<a href=\\\"#\\\" class=\\\"rename icon icon-rename\\\" title=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.renameTooltip || (depth0 != null ? depth0.renameTooltip : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"renameTooltip\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></a>\\n\t\t</span>\\n\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, options, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", buffer = \n \"<span class=\\\"systemtags-item\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isNew : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" data-id=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"id\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n<span class=\\\"checkmark icon icon-checkmark\\\"></span>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isAdmin : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.program(5, data, 0),\"data\":data})) != null ? stack1 : \"\");\n stack1 = ((helper = (helper = helpers.allowActions || (depth0 != null ? depth0.allowActions : depth0)) != null ? helper : alias2),(options={\"name\":\"allowActions\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data}),(typeof helper === alias3 ? helper.call(alias1,options) : helper));\n if (!helpers.allowActions) { stack1 = helpers.blockHelperMissing.call(depth0,stack1,options)}\n if (stack1 != null) { buffer += stack1; }\n return buffer + \"</span>\\n\";\n},\"useData\":true});\ntemplates['result_form'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"\t\t<a href=\\\"#\\\" class=\\\"delete icon icon-delete\\\" title=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.deleteTooltip || (depth0 != null ? depth0.deleteTooltip : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"deleteTooltip\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></a>\\n\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=helpers.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"<form class=\\\"systemtags-rename-form\\\">\\n\t <label class=\\\"hidden-visually\\\" for=\\\"\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-rename-input\\\">\"\n + alias4(((helper = (helper = helpers.renameLabel || (depth0 != null ? depth0.renameLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"renameLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t<input id=\\\"\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-rename-input\\\" type=\\\"text\\\" value=\\\"\"\n + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isAdmin : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</form>\\n\";\n},\"useData\":true});\ntemplates['selection'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, helper;\n\n return \"\t<span class=\\\"label\\\">\"\n + ((stack1 = ((helper = (helper = helpers.tagMarkup || (depth0 != null ? depth0.tagMarkup : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"</span>\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"\t<span class=\\\"label\\\">\"\n + container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\";\n},\"compiler\":[7,\">= 4.0.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isAdmin : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(3, data, 0),\"data\":data})) != null ? stack1 : \"\");\n},\"useData\":true});\n})();","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_FILEID:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}id',\n\t\tPROPERTY_CAN_ASSIGN:'{' + OC.Files.Client.NS_OWNCLOUD + '}can-assign',\n\t\tPROPERTY_DISPLAYNAME:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}display-name',\n\t\tPROPERTY_USERVISIBLE:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}user-visible',\n\t\tPROPERTY_USERASSIGNABLE:'{' + OC.Files.Client.NS_OWNCLOUD + '}user-assignable',\n\t});\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * System tag\n\t *\n\t */\n\tvar SystemTagModel = OC.Backbone.Model.extend(\n\t\t/** @lends OCA.SystemTags.SystemTagModel.prototype */ {\n\t\tsync: OC.Backbone.davSync,\n\n\t\tdefaults: {\n\t\t\tuserVisible: true,\n\t\t\tuserAssignable: true,\n\t\t\tcanAssign: true\n\t\t},\n\n\t\tdavProperties: {\n\t\t\t'id':\tOC.Files.Client.PROPERTY_FILEID,\n\t\t\t'name': OC.Files.Client.PROPERTY_DISPLAYNAME,\n\t\t\t'userVisible': \tOC.Files.Client.PROPERTY_USERVISIBLE,\n\t\t\t'userAssignable': \tOC.Files.Client.PROPERTY_USERASSIGNABLE,\n\t\t\t// read-only, effective permissions computed by the server,\n\t\t\t'canAssign': OC.Files.Client.PROPERTY_CAN_ASSIGN\n\t\t},\n\n\t\tparse: function(data) {\n\t\t\treturn {\n\t\t\t\tid: data.id,\n\t\t\t\tname: data.name,\n\t\t\t\tuserVisible: data.userVisible === true || data.userVisible === 'true',\n\t\t\t\tuserAssignable: data.userAssignable === true || data.userAssignable === 'true',\n\t\t\t\tcanAssign: data.canAssign === true || data.canAssign === 'true'\n\t\t\t};\n\t\t}\n\t});\n\n\tOC.SystemTags = OC.SystemTags || {};\n\tOC.SystemTags.SystemTagModel = SystemTagModel;\n})(OC);\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\t/**\n\t * @class OC.SystemTags.SystemTagsMappingCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a an object\n\t *\n\t */\n\tvar SystemTagsMappingCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsMappingCollection.prototype */ {\n\n\t\tsync: OC.Backbone.davSync,\n\n\t\t/**\n\t\t * Use PUT instead of PROPPATCH\n\t\t */\n\t\tusePUT: true,\n\n\t\t/**\n\t\t * Id of the file for which to filter activities by\n\t\t *\n\t\t * @var int\n\t\t */\n\t\t_objectId: null,\n\n\t\t/**\n\t\t * Type of the object to filter by\n\t\t *\n\t\t * @var string\n\t\t */\n\t\t_objectType: 'files',\n\n\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\turl: function() {\n\t\t\treturn OC.linkToRemote('dav') + '/systemtags-relations/' + this._objectType + '/' + this._objectId;\n\t\t},\n\n\t\t/**\n\t\t * Sets the object id to filter by or null for all.\n\t\t *\n\t\t * @param {int} objectId file id or null\n\t\t */\n\t\tsetObjectId: function(objectId) {\n\t\t\tthis._objectId = objectId;\n\t\t},\n\n\t\t/**\n\t\t * Sets the object type to filter by or null for all.\n\t\t *\n\t\t * @param {int} objectType file id or null\n\t\t */\n\t\tsetObjectType: function(objectType) {\n\t\t\tthis._objectType = objectType;\n\t\t},\n\n\t\tinitialize: function(models, options) {\n\t\t\toptions = options || {};\n\t\t\tif (!_.isUndefined(options.objectId)) {\n\t\t\t\tthis._objectId = options.objectId;\n\t\t\t}\n\t\t\tif (!_.isUndefined(options.objectType)) {\n\t\t\t\tthis._objectType = options.objectType;\n\t\t\t}\n\t\t},\n\n\t\tgetTagIds: function() {\n\t\t\treturn this.map(function(model) {\n\t\t\t\treturn model.id;\n\t\t\t});\n\t\t}\n\t});\n\n\tOC.SystemTags = OC.SystemTags || {};\n\tOC.SystemTags.SystemTagsMappingCollection = SystemTagsMappingCollection;\n})(OC);\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(function(OC) {\n\n\tfunction filterFunction(model, term) {\n\t\treturn model.get('name').substr(0, term.length).toLowerCase() === term.toLowerCase();\n\t}\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a file\n\t *\n\t */\n\tvar SystemTagsCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsCollection.prototype */ {\n\n\t\tsync: OC.Backbone.davSync,\n\n\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\turl: function() {\n\t\t\treturn OC.linkToRemote('dav') + '/systemtags/';\n\t\t},\n\n\t\tfilterByName: function(name) {\n\t\t\treturn this.filter(function(model) {\n\t\t\t\treturn filterFunction(model, name);\n\t\t\t});\n\t\t},\n\n\t\treset: function() {\n\t\t\tthis.fetched = false;\n\t\t\treturn OC.Backbone.Collection.prototype.reset.apply(this, arguments);\n\t\t},\n\n\t\t/**\n\t\t * Lazy fetch.\n\t\t * Only fetches once, subsequent calls will directly call the success handler.\n\t\t *\n\t\t * @param options\n\t\t * @param [options.force] true to force fetch even if cached entries exist\n\t\t *\n\t\t * @see Backbone.Collection#fetch\n\t\t */\n\t\tfetch: function(options) {\n\t\t\tvar self = this;\n\t\t\toptions = options || {};\n\t\t\tif (this.fetched || options.force) {\n\t\t\t\t// directly call handler\n\t\t\t\tif (options.success) {\n\t\t\t\t\toptions.success(this, null, options);\n\t\t\t\t}\n\t\t\t\t// trigger sync event\n\t\t\t\tthis.trigger('sync', this, null, options);\n\t\t\t\treturn Promise.resolve();\n\t\t\t}\n\n\t\t\tvar success = options.success;\n\t\t\toptions = _.extend({}, options);\n\t\t\toptions.success = function() {\n\t\t\t\tself.fetched = true;\n\t\t\t\tif (success) {\n\t\t\t\t\treturn success.apply(this, arguments);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\treturn OC.Backbone.Collection.prototype.fetch.call(this, options);\n\t\t}\n\t});\n\n\tOC.SystemTags = OC.SystemTags || {};\n\tOC.SystemTags.SystemTagsCollection = SystemTagsCollection;\n\n\t/**\n\t * @type OC.SystemTags.SystemTagsCollection\n\t */\n\tOC.SystemTags.collection = new OC.SystemTags.SystemTagsCollection();\n})(OC);\n\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* global Handlebars */\n\n(function(OC) {\n\n\t/**\n\t * @class OC.SystemTags.SystemTagsInputField\n\t * @classdesc\n\t *\n\t * Displays a file's system tags\n\t *\n\t */\n\tvar SystemTagsInputField = OC.Backbone.View.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsInputField.prototype */ {\n\n\t\t_rendered: false,\n\n\t\t_newTag: null,\n\n\t\t_lastUsedTags: [],\n\n\t\tclassName: 'systemTagsInputFieldContainer',\n\n\t\ttemplate: function(data) {\n\t\t\treturn '<input class=\"systemTagsInputField\" type=\"hidden\" name=\"tags\" value=\"\"/>';\n\t\t},\n\n\t\t/**\n\t\t * Creates a new SystemTagsInputField\n\t\t *\n\t\t * @param {Object} [options]\n\t\t * @param {string} [options.objectType=files] object type for which tags are assigned to\n\t\t * @param {bool} [options.multiple=false] whether to allow selecting multiple tags\n\t\t * @param {bool} [options.allowActions=true] whether tags can be renamed/delete within the dropdown\n\t\t * @param {bool} [options.allowCreate=true] whether new tags can be created\n\t\t * @param {bool} [options.isAdmin=true] whether the user is an administrator\n\t\t * @param {Function} options.initSelection function to convert selection to data\n\t\t */\n\t\tinitialize: function(options) {\n\t\t\toptions = options || {};\n\n\t\t\tthis._multiple = !!options.multiple;\n\t\t\tthis._allowActions = _.isUndefined(options.allowActions) || !!options.allowActions;\n\t\t\tthis._allowCreate = _.isUndefined(options.allowCreate) || !!options.allowCreate;\n\t\t\tthis._isAdmin = !!options.isAdmin;\n\n\t\t\tif (_.isFunction(options.initSelection)) {\n\t\t\t\tthis._initSelection = options.initSelection;\n\t\t\t}\n\n\t\t\tthis.collection = options.collection || OC.SystemTags.collection;\n\n\t\t\tvar self = this;\n\t\t\tthis.collection.on('change:name remove', function() {\n\t\t\t\t// refresh selection\n\t\t\t\t_.defer(self._refreshSelection);\n\t\t\t});\n\n\t\t\t_.defer(_.bind(this._getLastUsedTags, this));\n\n\t\t\t_.bindAll(\n\t\t\t\tthis,\n\t\t\t\t'_refreshSelection',\n\t\t\t\t'_onClickRenameTag',\n\t\t\t\t'_onClickDeleteTag',\n\t\t\t\t'_onSelectTag',\n\t\t\t\t'_onDeselectTag',\n\t\t\t\t'_onSubmitRenameTag'\n\t\t\t);\n\t\t},\n\n\t\t_getLastUsedTags: function() {\n\t\t\tvar self = this;\n\t\t\t$.ajax({\n\t\t\t\ttype: 'GET',\n\t\t\t\turl: OC.generateUrl('/apps/systemtags/lastused'),\n\t\t\t\tsuccess: function (response) {\n\t\t\t\t\tself._lastUsedTags = response;\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Refreshes the selection, triggering a call to\n\t\t * select2's initSelection\n\t\t */\n\t\t_refreshSelection: function() {\n\t\t\tthis.$tagsField.select2('val', this.$tagsField.val());\n\t\t},\n\n\t\t/**\n\t\t * Event handler whenever the user clicked the \"rename\" action.\n\t\t * This will display the rename field.\n\t\t */\n\t\t_onClickRenameTag: function(ev) {\n\t\t\tvar $item = $(ev.target).closest('.systemtags-item');\n\t\t\tvar tagId = $item.attr('data-id');\n\t\t\tvar tagModel = this.collection.get(tagId);\n\n\t\t\tvar oldName = tagModel.get('name');\n\t\t\tvar $renameForm = $(OC.SystemTags.Templates['result_form']({\n\t\t\t\tcid: this.cid,\n\t\t\t\tname: oldName,\n\t\t\t\tdeleteTooltip: t('core', 'Delete'),\n\t\t\t\trenameLabel: t('core', 'Rename'),\n\t\t\t\tisAdmin: this._isAdmin\n\t\t\t}));\n\t\t\t$item.find('.label').after($renameForm);\n\t\t\t$item.find('.label, .systemtags-actions').addClass('hidden');\n\t\t\t$item.closest('.select2-result').addClass('has-form');\n\n\t\t\t$renameForm.find('[title]').tooltip({\n\t\t\t\tplacement: 'bottom',\n\t\t\t\tcontainer: 'body'\n\t\t\t});\n\t\t\t$renameForm.find('input').focus().selectRange(0, oldName.length);\n\t\t\treturn false;\n\t\t},\n\n\t\t/**\n\t\t * Event handler whenever the rename form has been submitted after\n\t\t * the user entered a new tag name.\n\t\t * This will submit the change to the server. \n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t_onSubmitRenameTag: function(ev) {\n\t\t\tev.preventDefault();\n\t\t\tvar $form = $(ev.target);\n\t\t\tvar $item = $form.closest('.systemtags-item');\n\t\t\tvar tagId = $item.attr('data-id');\n\t\t\tvar tagModel = this.collection.get(tagId);\n\t\t\tvar newName = $(ev.target).find('input').val().trim();\n\t\t\tif (newName && newName !== tagModel.get('name')) {\n\t\t\t\ttagModel.save({'name': newName});\n\t\t\t\t// TODO: spinner, and only change text after finished saving\n\t\t\t\t$item.find('.label').text(newName);\n\t\t\t}\n\t\t\t$item.find('.label, .systemtags-actions').removeClass('hidden');\n\t\t\t$form.remove();\n\t\t\t$item.closest('.select2-result').removeClass('has-form');\n\t\t},\n\n\t\t/**\n\t\t * Event handler whenever a tag must be deleted\n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t_onClickDeleteTag: function(ev) {\n\t\t\tvar $item = $(ev.target).closest('.systemtags-item');\n\t\t\tvar tagId = $item.attr('data-id');\n\t\t\tthis.collection.get(tagId).destroy();\n\t\t\t$(ev.target).tooltip('hide');\n\t\t\t$item.closest('.select2-result').remove();\n\t\t\t// TODO: spinner\n\t\t\treturn false;\n\t\t},\n\n\t\t_addToSelect2Selection: function(selection) {\n\t\t\tvar data = this.$tagsField.select2('data');\n\t\t\tdata.push(selection);\n\t\t\tthis.$tagsField.select2('data', data);\n\t\t},\n\n\t\t/**\n\t\t * Event handler whenever a tag is selected.\n\t\t * Also called whenever tag creation is requested through the dummy tag object.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t_onSelectTag: function(e) {\n\t\t\tvar self = this;\n\t\t\tvar tag;\n\t\t\tif (e.object && e.object.isNew) {\n\t\t\t\t// newly created tag, check if existing\n\t\t\t\t// create a new tag\n\t\t\t\ttag = this.collection.create({\n\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\tuserVisible: true,\n\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\tcanAssign: true\n\t\t\t\t}, {\n\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON());\n\t\t\t\t\t\tself._lastUsedTags.unshift(model.id);\n\t\t\t\t\t\tself.trigger('select', model);\n\t\t\t\t\t},\n\t\t\t\t\terror: function(model, xhr) {\n\t\t\t\t\t\tif (xhr.status === 409) {\n\t\t\t\t\t\t\t// re-fetch collection to get the missing tag\n\t\t\t\t\t\t\tself.collection.reset();\n\t\t\t\t\t\t\tself.collection.fetch({\n\t\t\t\t\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\t\t\t\t\t// find the tag in the collection\n\t\t\t\t\t\t\t\t\tvar model = collection.where({\n\t\t\t\t\t\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\t\t\t\t\tuserAssignable: true\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tif (model.length) {\n\t\t\t\t\t\t\t\t\t\tmodel = model[0];\n\t\t\t\t\t\t\t\t\t\t// the tag already exists or was already assigned,\n\t\t\t\t\t\t\t\t\t\t// add it to the list anyway\n\t\t\t\t\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON());\n\t\t\t\t\t\t\t\t\t\tself.trigger('select', model);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthis.$tagsField.select2('close');\n\t\t\t\te.preventDefault();\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\ttag = this.collection.get(e.object.id);\n\t\t\t\tthis._lastUsedTags.unshift(tag.id);\n\t\t\t}\n\t\t\tthis._newTag = null;\n\t\t\tthis.trigger('select', tag);\n\t\t},\n\n\t\t/**\n\t\t * Event handler whenever a tag gets deselected.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t_onDeselectTag: function(e) {\n\t\t\tthis.trigger('deselect', e.choice.id);\n\t\t},\n\n\t\t/**\n\t\t * Autocomplete function for dropdown results\n\t\t *\n\t\t * @param {Object} query select2 query object\n\t\t */\n\t\t_queryTagsAutocomplete: function(query) {\n\t\t\tvar self = this;\n\t\t\tthis.collection.fetch({\n\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\tvar tagModels = collection.filterByName(query.term.trim());\n\t\t\t\t\tif (!self._isAdmin) {\n\t\t\t\t\t\ttagModels = _.filter(tagModels, function(tagModel) {\n\t\t\t\t\t\t\treturn tagModel.get('canAssign');\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tquery.callback({\n\t\t\t\t\t\tresults: _.invoke(tagModels, 'toJSON')\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t_preventDefault: function(e) {\n\t\t\te.stopPropagation();\n\t\t},\n\n\t\t/**\n\t\t * Formats a single dropdown result\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @return {string} HTML markup\n\t\t */\n\t\t_formatDropDownResult: function(data) {\n\t\t\treturn OC.SystemTags.Templates['result'](_.extend({\n\t\t\t\trenameTooltip: t('core', 'Rename'),\n\t\t\t\tallowActions: this._allowActions,\n\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data)[0].innerHTML : null,\n\t\t\t\tisAdmin: this._isAdmin\n\t\t\t}, data));\n\t\t},\n\n\t\t/**\n\t\t * Formats a single selection item\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @return {string} HTML markup\n\t\t */\n\t\t_formatSelection: function(data) {\n\t\t\treturn OC.SystemTags.Templates['selection'](_.extend({\n\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data)[0].innerHTML : null,\n\t\t\t\tisAdmin: this._isAdmin\n\t\t\t}, data));\n\t\t},\n\n\t\t/**\n\t\t * Create new dummy choice for select2 when the user\n\t\t * types an arbitrary string\n\t\t *\n\t\t * @param {string} term entered term\n\t\t * @return {Object} dummy tag\n\t\t */\n\t\t_createSearchChoice: function(term) {\n\t\t\tterm = term.trim();\n\t\t\tif (this.collection.filter(function(entry) {\n\t\t\t\t\treturn entry.get('name') === term;\n\t\t\t\t}).length) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this._newTag) {\n\t\t\t\tthis._newTag = {\n\t\t\t\t\tid: -1,\n\t\t\t\t\tname: term,\n\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\tuserVisible: true,\n\t\t\t\t\tcanAssign: true,\n\t\t\t\t\tisNew: true\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tthis._newTag.name = term;\n\t\t\t}\n\n\t\t\treturn this._newTag;\n\t\t},\n\n\t\t_initSelection: function(element, callback) {\n\t\t\tvar self = this;\n\t\t\tvar ids = $(element).val().split(',');\n\n\t\t\tfunction modelToSelection(model) {\n\t\t\t\tvar data = model.toJSON();\n\t\t\t\tif (!self._isAdmin && !data.canAssign) {\n\t\t\t\t\t// lock static tags for non-admins\n\t\t\t\t\tdata.locked = true;\n\t\t\t\t}\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tfunction findSelectedObjects(ids) {\n\t\t\t\tvar selectedModels = self.collection.filter(function(model) {\n\t\t\t\t\treturn ids.indexOf(model.id) >= 0 && (self._isAdmin || model.get('userVisible'));\n\t\t\t\t});\n\t\t\t\treturn _.map(selectedModels, modelToSelection);\n\t\t\t}\n\n\t\t\tthis.collection.fetch({\n\t\t\t\tsuccess: function() {\n\t\t\t\t\tcallback(findSelectedObjects(ids));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Renders this details view\n\t\t */\n\t\trender: function() {\n\t\t\tvar self = this;\n\t\t\tthis.$el.html(this.template());\n\n\t\t\tthis.$el.find('[title]').tooltip({placement: 'bottom'});\n\t\t\tthis.$tagsField = this.$el.find('[name=tags]');\n\t\t\tthis.$tagsField.select2({\n\t\t\t\tplaceholder: t('core', 'Collaborative tags'),\n\t\t\t\tcontainerCssClass: 'systemtags-select2-container',\n\t\t\t\tdropdownCssClass: 'systemtags-select2-dropdown',\n\t\t\t\tcloseOnSelect: false,\n\t\t\t\tallowClear: false,\n\t\t\t\tmultiple: this._multiple,\n\t\t\t\ttoggleSelect: this._multiple,\n\t\t\t\tquery: _.bind(this._queryTagsAutocomplete, this),\n\t\t\t\tid: function(tag) {\n\t\t\t\t\treturn tag.id;\n\t\t\t\t},\n\t\t\t\tinitSelection: _.bind(this._initSelection, this),\n\t\t\t\tformatResult: _.bind(this._formatDropDownResult, this),\n\t\t\t\tformatSelection: _.bind(this._formatSelection, this),\n\t\t\t\tcreateSearchChoice: this._allowCreate ? _.bind(this._createSearchChoice, this) : undefined,\n\t\t\t\tsortResults: function(results) {\n\t\t\t\t\tvar selectedItems = _.pluck(self.$tagsField.select2('data'), 'id');\n\t\t\t\t\tresults.sort(function(a, b) {\n\t\t\t\t\t\tvar aSelected = selectedItems.indexOf(a.id) >= 0;\n\t\t\t\t\t\tvar bSelected = selectedItems.indexOf(b.id) >= 0;\n\t\t\t\t\t\tif (aSelected === bSelected) {\n\t\t\t\t\t\t\tvar aLastUsed = self._lastUsedTags.indexOf(a.id);\n\t\t\t\t\t\t\tvar bLastUsed = self._lastUsedTags.indexOf(b.id);\n\n\t\t\t\t\t\t\tif (aLastUsed !== bLastUsed) {\n\t\t\t\t\t\t\t\tif (bLastUsed === -1) {\n\t\t\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (aLastUsed === -1) {\n\t\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn aLastUsed < bLastUsed ? -1 : 1;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Both not found\n\t\t\t\t\t\t\treturn OC.Util.naturalSortCompare(a.name, b.name);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (aSelected && !bSelected) {\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t});\n\t\t\t\t\treturn results;\n\t\t\t\t},\n\t\t\t\tformatNoMatches: function() {\n\t\t\t\t\treturn t('core', 'No tags found');\n\t\t\t\t}\n\t\t\t})\n\t\t\t\t.on('select2-selecting', this._onSelectTag)\n\t\t\t\t.on('select2-removing', this._onDeselectTag);\n\n\t\t\tvar $dropDown = this.$tagsField.select2('dropdown');\n\t\t\t// register events for inside the dropdown\n\t\t\t$dropDown.on('mouseup', '.rename', this._onClickRenameTag);\n\t\t\t$dropDown.on('mouseup', '.delete', this._onClickDeleteTag);\n\t\t\t$dropDown.on('mouseup', '.select2-result-selectable.has-form', this._preventDefault);\n\t\t\t$dropDown.on('submit', '.systemtags-rename-form', this._onSubmitRenameTag);\n\n\t\t\tthis.delegateEvents();\n\t\t},\n\n\t\tremove: function() {\n\t\t\tif (this.$tagsField) {\n\t\t\t\tthis.$tagsField.select2('destroy');\n\t\t\t}\n\t\t},\n\n\t\tgetValues: function() {\n\t\t\tthis.$tagsField.select2('val');\n\t\t},\n\n\t\tsetValues: function(values) {\n\t\t\tthis.$tagsField.select2('val', values);\n\t\t},\n\n\t\tsetData: function(data) {\n\t\t\tthis.$tagsField.select2('data', data);\n\t\t}\n\t});\n\n\tOC.SystemTags = OC.SystemTags || {};\n\tOC.SystemTags.SystemTagsInputField = SystemTagsInputField;\n\n})(OC);\n\n","var content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./systemtags.scss\");\n\nif (typeof content === 'string') {\n content = [[module.id, content, '']];\n}\n\nvar options = {}\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = require(\"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\")(content, options);\n\nif (content.locals) {\n module.exports = content.locals;\n}\n","exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemtags-select2-container{width:100%}.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:0.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}\\n\", \"\"]);\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \"{\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = modules[_i]; // skip already imported module\n // this implementation is not 100% perfect for weird media query combinations\n // when a module is imported multiple times with different media queries.\n // I hope this will never occur (Hey this way we have smaller bundles)\n\n if (item[0] == null || !alreadyImportedModules[item[0]]) {\n if (mediaQuery && !item[2]) {\n item[2] = mediaQuery;\n } else if (mediaQuery) {\n item[2] = \"(\".concat(item[2], \") and (\").concat(mediaQuery, \")\");\n }\n\n list.push(item);\n }\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot).concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","\"use strict\";\n\nvar stylesInDom = {};\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nfunction listToStyles(list, options) {\n var styles = [];\n var newStyles = {};\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var css = item[1];\n var media = item[2];\n var sourceMap = item[3];\n var part = {\n css: css,\n media: media,\n sourceMap: sourceMap\n };\n\n if (!newStyles[id]) {\n styles.push(newStyles[id] = {\n id: id,\n parts: [part]\n });\n } else {\n newStyles[id].parts.push(part);\n }\n }\n\n return styles;\n}\n\nfunction addStylesToDom(styles, options) {\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i];\n var domStyle = stylesInDom[item.id];\n var j = 0;\n\n if (domStyle) {\n domStyle.refs++;\n\n for (; j < domStyle.parts.length; j++) {\n domStyle.parts[j](item.parts[j]);\n }\n\n for (; j < item.parts.length; j++) {\n domStyle.parts.push(addStyle(item.parts[j], options));\n }\n } else {\n var parts = [];\n\n for (; j < item.parts.length; j++) {\n parts.push(addStyle(item.parts[j], options));\n }\n\n stylesInDom[item.id] = {\n id: item.id,\n refs: 1,\n parts: parts\n };\n }\n }\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n\n if (typeof options.attributes.nonce === 'undefined') {\n var nonce = typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;\n\n if (nonce) {\n options.attributes.nonce = nonce;\n }\n }\n\n Object.keys(options.attributes).forEach(function (key) {\n style.setAttribute(key, options.attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n }\n\n if (sourceMap && btoa) {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {};\n options.attributes = typeof options.attributes === 'object' ? options.attributes : {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n // tags it will allow on a page\n\n if (!options.singleton && typeof options.singleton !== 'boolean') {\n options.singleton = isOldIE();\n }\n\n var styles = listToStyles(list, options);\n addStylesToDom(styles, options);\n return function update(newList) {\n var mayRemove = [];\n\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i];\n var domStyle = stylesInDom[item.id];\n\n if (domStyle) {\n domStyle.refs--;\n mayRemove.push(domStyle);\n }\n }\n\n if (newList) {\n var newStyles = listToStyles(newList, options);\n addStylesToDom(newStyles, options);\n }\n\n for (var _i = 0; _i < mayRemove.length; _i++) {\n var _domStyle = mayRemove[_i];\n\n if (_domStyle.refs === 0) {\n for (var j = 0; j < _domStyle.parts.length; j++) {\n _domStyle.parts[j]();\n }\n\n delete stylesInDom[_domStyle.id];\n }\n }\n };\n};"],"sourceRoot":""}
\ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./core/js/systemtags/merged-systemtags.js","webpack:///./core/js/systemtags/systemtags.js","webpack:///./core/js/systemtags/templates.js","webpack:///./core/js/systemtags/systemtagmodel.js","webpack:///./core/js/systemtags/systemtagsmappingcollection.js","webpack:///./core/js/systemtags/systemtagscollection.js","webpack:///./core/js/systemtags/systemtagsinputfield.js","webpack:///./core/css/systemtags.scss?1220","webpack:///./core/css/systemtags.scss","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","OC","SystemTags","getDescriptiveTag","tag","_","isUndefined","toJSON","$","addClass","text","scope","$span","append","escapeHTML","userAssignable","userVisible","$tag","template","templates","Handlebars","Templates","container","depth0","helpers","partials","data","stack1","helper","tagMarkup","hooks","helperMissing","nullContext","escapeExpression","renameTooltip","options","alias1","alias2","buffer","isNew","program","noop","id","isAdmin","allowActions","blockHelperMissing","deleteTooltip","alias4","cid","renameLabel","extend","Files","Client","PROPERTY_FILEID","NS_OWNCLOUD","PROPERTY_CAN_ASSIGN","PROPERTY_DISPLAYNAME","PROPERTY_USERVISIBLE","PROPERTY_USERASSIGNABLE","SystemTagModel","Backbone","Model","sync","davSync","defaults","canAssign","davProperties","parse","SystemTagsMappingCollection","Collection","usePUT","_objectId","_objectType","model","url","linkToRemote","this","setObjectId","objectId","setObjectType","objectType","initialize","models","getTagIds","map","SystemTagsCollection","filterByName","filter","term","substr","length","toLowerCase","filterFunction","reset","fetched","apply","arguments","fetch","self","force","success","trigger","Promise","resolve","collection","SystemTagsInputField","View","_rendered","_newTag","_lastUsedTags","className","_multiple","multiple","_allowActions","_allowCreate","allowCreate","_isAdmin","isFunction","initSelection","_initSelection","on","defer","_refreshSelection","_getLastUsedTags","bindAll","ajax","type","generateUrl","response","$tagsField","select2","val","_onClickRenameTag","ev","$item","target","closest","tagId","attr","oldName","$renameForm","find","after","tooltip","placement","focus","selectRange","_onSubmitRenameTag","preventDefault","$form","tagModel","newName","trim","save","removeClass","remove","_onClickDeleteTag","destroy","_addToSelect2Selection","selection","push","_onSelectTag","e","unshift","error","xhr","status","where","_onDeselectTag","choice","_queryTagsAutocomplete","query","tagModels","callback","results","invoke","_preventDefault","stopPropagation","_formatDropDownResult","innerHTML","_formatSelection","_createSearchChoice","entry","element","ids","split","modelToSelection","locked","selectedModels","indexOf","findSelectedObjects","render","$el","html","placeholder","containerCssClass","dropdownCssClass","closeOnSelect","allowClear","toggleSelect","formatResult","formatSelection","createSearchChoice","undefined","sortResults","selectedItems","pluck","sort","a","b","aSelected","bSelected","aLastUsed","bLastUsed","Util","naturalSortCompare","formatNoMatches","$dropDown","delegateEvents","getValues","setValues","values","setData","content","locals","useSourceMap","list","toString","item","cssMapping","btoa","sourceMapping","sourceMap","base64","unescape","encodeURIComponent","JSON","stringify","concat","sourceURLs","sources","source","sourceRoot","join","cssWithMappingToString","mediaQuery","alreadyImportedModules","_i","memo","stylesInDom","isOldIE","Boolean","window","document","all","atob","getTarget","styleTarget","querySelector","HTMLIFrameElement","contentDocument","head","listToStyles","styles","newStyles","base","part","css","media","parts","addStylesToDom","domStyle","j","refs","addStyle","insertStyleElement","style","createElement","attributes","nonce","keys","forEach","setAttribute","insert","Error","appendChild","textStore","replaceText","index","replacement","applyToSingletonTag","obj","styleSheet","cssText","cssNode","createTextNode","childNodes","removeChild","insertBefore","applyToTag","firstChild","singleton","singletonCounter","update","styleIndex","parentNode","removeStyleElement","newObj","newList","mayRemove","_domStyle"],"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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AAM,CAC5C,IAAI+D,EAAYD,EAAU9D,GAE1B,GAAuB,IAAnB+D,EAAUrC,KAAY,CACxB,IAAK,IAAID,EAAI,EAAGA,EAAIsC,EAAUzC,MAAMnL,OAAQsL,IAC1CsC,EAAUzC,MAAMG,YAGXvB,EAAY6D,EAAU5Q","file":"systemtags.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 10);\n","import './systemtags.js'\nimport './templates.js'\nimport './systemtagmodel.js'\nimport './systemtagsmappingcollection.js'\nimport './systemtagscollection.js'\nimport './systemtagsinputfield.js'\n\nimport '../../css/systemtags.scss'\n","/*\n * Copyright (c) 2016\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\t/**\n\t * @namespace\n\t */\n\tOC.SystemTags = {\n\t\t/**\n\t\t *\n\t\t * @param {OC.SystemTags.SystemTagModel|Object|String} tag\n\t\t * @return {jQuery}\n\t\t */\n\t\tgetDescriptiveTag: function(tag) {\n\t\t\tif (_.isUndefined(tag.name) && !_.isUndefined(tag.toJSON)) {\n\t\t\t\ttag = tag.toJSON();\n\t\t\t}\n\n\t\t\tif (_.isUndefined(tag.name)) {\n\t\t\t\treturn $('<span>').addClass('non-existing-tag').text(\n\t\t\t\t\tt('core', 'Non-existing tag #{tag}', {\n\t\t\t\t\t\ttag: tag\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tvar $span = $('<span>');\n\t\t\t$span.append(escapeHTML(tag.name));\n\n\t\t\tvar scope;\n\t\t\tif (!tag.userAssignable) {\n\t\t\t\tscope = t('core', 'restricted');\n\t\t\t}\n\t\t\tif (!tag.userVisible) {\n\t\t\t\t// invisible also implicitly means not assignable\n\t\t\t\tscope = t('core', 'invisible');\n\t\t\t}\n\t\t\tif (scope) {\n\t\t\t\tvar $tag = $('<em>').text(' ' +\n\t\t\t\t\tt('core', '({scope})', {\n\t\t\t\t\t\tscope: scope\n\t\t\t\t\t})\n\t\t\t\t);\n\t\t\t\t$span.append($tag);\n\t\t\t}\n\t\t\treturn $span;\n\t\t}\n\t};\n})(OC);\n\n","(function() {\n var template = Handlebars.template, templates = OC.SystemTags.Templates = OC.SystemTags.Templates || {};\ntemplates['result'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n return \" new-item\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, helper;\n\n return \"\t\t<span class=\\\"label\\\">\"\n + ((stack1 = ((helper = (helper = helpers.tagMarkup || (depth0 != null ? depth0.tagMarkup : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"</span>\\n\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"\t\t<span class=\\\"label\\\">\"\n + container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\";\n},\"7\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"\t\t<span class=\\\"systemtags-actions\\\">\\n\t\t\t<a href=\\\"#\\\" class=\\\"rename icon icon-rename\\\" title=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.renameTooltip || (depth0 != null ? depth0.renameTooltip : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"renameTooltip\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></a>\\n\t\t</span>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, options, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", buffer = \n \"<span class=\\\"systemtags-item\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isNew : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" data-id=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"id\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n<span class=\\\"checkmark icon icon-checkmark\\\"></span>\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isAdmin : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.program(5, data, 0),\"data\":data})) != null ? stack1 : \"\");\n stack1 = ((helper = (helper = helpers.allowActions || (depth0 != null ? depth0.allowActions : depth0)) != null ? helper : alias2),(options={\"name\":\"allowActions\",\"hash\":{},\"fn\":container.program(7, data, 0),\"inverse\":container.noop,\"data\":data}),(typeof helper === alias3 ? helper.call(alias1,options) : helper));\n if (!helpers.allowActions) { stack1 = container.hooks.blockHelperMissing.call(depth0,stack1,options)}\n if (stack1 != null) { buffer += stack1; }\n return buffer + \"</span>\\n\";\n},\"useData\":true});\ntemplates['result_form'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"\t\t<a href=\\\"#\\\" class=\\\"delete icon icon-delete\\\" title=\\\"\"\n + container.escapeExpression(((helper = (helper = helpers.deleteTooltip || (depth0 != null ? depth0.deleteTooltip : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"deleteTooltip\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\"></a>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=\"function\", alias4=container.escapeExpression;\n\n return \"<form class=\\\"systemtags-rename-form\\\">\\n\t <label class=\\\"hidden-visually\\\" for=\\\"\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-rename-input\\\">\"\n + alias4(((helper = (helper = helpers.renameLabel || (depth0 != null ? depth0.renameLabel : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"renameLabel\",\"hash\":{},\"data\":data}) : helper)))\n + \"</label>\\n\t<input id=\\\"\"\n + alias4(((helper = (helper = helpers.cid || (depth0 != null ? depth0.cid : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"cid\",\"hash\":{},\"data\":data}) : helper)))\n + \"-rename-input\\\" type=\\\"text\\\" value=\\\"\"\n + alias4(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"\\\">\\n\"\n + ((stack1 = helpers[\"if\"].call(alias1,(depth0 != null ? depth0.isAdmin : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"</form>\\n\";\n},\"useData\":true});\ntemplates['selection'] = template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, helper;\n\n return \"\t<span class=\\\"label\\\">\"\n + ((stack1 = ((helper = (helper = helpers.tagMarkup || (depth0 != null ? depth0.tagMarkup : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"tagMarkup\",\"hash\":{},\"data\":data}) : helper))) != null ? stack1 : \"\")\n + \"</span>\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var helper;\n\n return \"\t<span class=\\\"label\\\">\"\n + container.escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"name\",\"hash\":{},\"data\":data}) : helper)))\n + \"</span>\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? depth0.isAdmin : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(3, data, 0),\"data\":data})) != null ? stack1 : \"\");\n},\"useData\":true});\n})();","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\n\t_.extend(OC.Files.Client, {\n\t\tPROPERTY_FILEID:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}id',\n\t\tPROPERTY_CAN_ASSIGN:'{' + OC.Files.Client.NS_OWNCLOUD + '}can-assign',\n\t\tPROPERTY_DISPLAYNAME:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}display-name',\n\t\tPROPERTY_USERVISIBLE:\t'{' + OC.Files.Client.NS_OWNCLOUD + '}user-visible',\n\t\tPROPERTY_USERASSIGNABLE:'{' + OC.Files.Client.NS_OWNCLOUD + '}user-assignable',\n\t});\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * System tag\n\t *\n\t */\n\tvar SystemTagModel = OC.Backbone.Model.extend(\n\t\t/** @lends OCA.SystemTags.SystemTagModel.prototype */ {\n\t\tsync: OC.Backbone.davSync,\n\n\t\tdefaults: {\n\t\t\tuserVisible: true,\n\t\t\tuserAssignable: true,\n\t\t\tcanAssign: true\n\t\t},\n\n\t\tdavProperties: {\n\t\t\t'id':\tOC.Files.Client.PROPERTY_FILEID,\n\t\t\t'name': OC.Files.Client.PROPERTY_DISPLAYNAME,\n\t\t\t'userVisible': \tOC.Files.Client.PROPERTY_USERVISIBLE,\n\t\t\t'userAssignable': \tOC.Files.Client.PROPERTY_USERASSIGNABLE,\n\t\t\t// read-only, effective permissions computed by the server,\n\t\t\t'canAssign': OC.Files.Client.PROPERTY_CAN_ASSIGN\n\t\t},\n\n\t\tparse: function(data) {\n\t\t\treturn {\n\t\t\t\tid: data.id,\n\t\t\t\tname: data.name,\n\t\t\t\tuserVisible: data.userVisible === true || data.userVisible === 'true',\n\t\t\t\tuserAssignable: data.userAssignable === true || data.userAssignable === 'true',\n\t\t\t\tcanAssign: data.canAssign === true || data.canAssign === 'true'\n\t\t\t};\n\t\t}\n\t});\n\n\tOC.SystemTags = OC.SystemTags || {};\n\tOC.SystemTags.SystemTagModel = SystemTagModel;\n})(OC);\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n(function(OC) {\n\t/**\n\t * @class OC.SystemTags.SystemTagsMappingCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a an object\n\t *\n\t */\n\tvar SystemTagsMappingCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsMappingCollection.prototype */ {\n\n\t\tsync: OC.Backbone.davSync,\n\n\t\t/**\n\t\t * Use PUT instead of PROPPATCH\n\t\t */\n\t\tusePUT: true,\n\n\t\t/**\n\t\t * Id of the file for which to filter activities by\n\t\t *\n\t\t * @var int\n\t\t */\n\t\t_objectId: null,\n\n\t\t/**\n\t\t * Type of the object to filter by\n\t\t *\n\t\t * @var string\n\t\t */\n\t\t_objectType: 'files',\n\n\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\turl: function() {\n\t\t\treturn OC.linkToRemote('dav') + '/systemtags-relations/' + this._objectType + '/' + this._objectId;\n\t\t},\n\n\t\t/**\n\t\t * Sets the object id to filter by or null for all.\n\t\t *\n\t\t * @param {int} objectId file id or null\n\t\t */\n\t\tsetObjectId: function(objectId) {\n\t\t\tthis._objectId = objectId;\n\t\t},\n\n\t\t/**\n\t\t * Sets the object type to filter by or null for all.\n\t\t *\n\t\t * @param {int} objectType file id or null\n\t\t */\n\t\tsetObjectType: function(objectType) {\n\t\t\tthis._objectType = objectType;\n\t\t},\n\n\t\tinitialize: function(models, options) {\n\t\t\toptions = options || {};\n\t\t\tif (!_.isUndefined(options.objectId)) {\n\t\t\t\tthis._objectId = options.objectId;\n\t\t\t}\n\t\t\tif (!_.isUndefined(options.objectType)) {\n\t\t\t\tthis._objectType = options.objectType;\n\t\t\t}\n\t\t},\n\n\t\tgetTagIds: function() {\n\t\t\treturn this.map(function(model) {\n\t\t\t\treturn model.id;\n\t\t\t});\n\t\t}\n\t});\n\n\tOC.SystemTags = OC.SystemTags || {};\n\tOC.SystemTags.SystemTagsMappingCollection = SystemTagsMappingCollection;\n})(OC);\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(function(OC) {\n\n\tfunction filterFunction(model, term) {\n\t\treturn model.get('name').substr(0, term.length).toLowerCase() === term.toLowerCase();\n\t}\n\n\t/**\n\t * @class OCA.SystemTags.SystemTagsCollection\n\t * @classdesc\n\t *\n\t * Collection of tags assigned to a file\n\t *\n\t */\n\tvar SystemTagsCollection = OC.Backbone.Collection.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsCollection.prototype */ {\n\n\t\tsync: OC.Backbone.davSync,\n\n\t\tmodel: OC.SystemTags.SystemTagModel,\n\n\t\turl: function() {\n\t\t\treturn OC.linkToRemote('dav') + '/systemtags/';\n\t\t},\n\n\t\tfilterByName: function(name) {\n\t\t\treturn this.filter(function(model) {\n\t\t\t\treturn filterFunction(model, name);\n\t\t\t});\n\t\t},\n\n\t\treset: function() {\n\t\t\tthis.fetched = false;\n\t\t\treturn OC.Backbone.Collection.prototype.reset.apply(this, arguments);\n\t\t},\n\n\t\t/**\n\t\t * Lazy fetch.\n\t\t * Only fetches once, subsequent calls will directly call the success handler.\n\t\t *\n\t\t * @param options\n\t\t * @param [options.force] true to force fetch even if cached entries exist\n\t\t *\n\t\t * @see Backbone.Collection#fetch\n\t\t */\n\t\tfetch: function(options) {\n\t\t\tvar self = this;\n\t\t\toptions = options || {};\n\t\t\tif (this.fetched || options.force) {\n\t\t\t\t// directly call handler\n\t\t\t\tif (options.success) {\n\t\t\t\t\toptions.success(this, null, options);\n\t\t\t\t}\n\t\t\t\t// trigger sync event\n\t\t\t\tthis.trigger('sync', this, null, options);\n\t\t\t\treturn Promise.resolve();\n\t\t\t}\n\n\t\t\tvar success = options.success;\n\t\t\toptions = _.extend({}, options);\n\t\t\toptions.success = function() {\n\t\t\t\tself.fetched = true;\n\t\t\t\tif (success) {\n\t\t\t\t\treturn success.apply(this, arguments);\n\t\t\t\t}\n\t\t\t};\n\n\t\t\treturn OC.Backbone.Collection.prototype.fetch.call(this, options);\n\t\t}\n\t});\n\n\tOC.SystemTags = OC.SystemTags || {};\n\tOC.SystemTags.SystemTagsCollection = SystemTagsCollection;\n\n\t/**\n\t * @type OC.SystemTags.SystemTagsCollection\n\t */\n\tOC.SystemTags.collection = new OC.SystemTags.SystemTagsCollection();\n})(OC);\n\n","/*\n * Copyright (c) 2015\n *\n * This file is licensed under the Affero General Public License version 3\n * or later.\n *\n * See the COPYING-README file.\n *\n */\n\n/* global Handlebars */\n\n(function(OC) {\n\n\t/**\n\t * @class OC.SystemTags.SystemTagsInputField\n\t * @classdesc\n\t *\n\t * Displays a file's system tags\n\t *\n\t */\n\tvar SystemTagsInputField = OC.Backbone.View.extend(\n\t\t/** @lends OC.SystemTags.SystemTagsInputField.prototype */ {\n\n\t\t_rendered: false,\n\n\t\t_newTag: null,\n\n\t\t_lastUsedTags: [],\n\n\t\tclassName: 'systemTagsInputFieldContainer',\n\n\t\ttemplate: function(data) {\n\t\t\treturn '<input class=\"systemTagsInputField\" type=\"hidden\" name=\"tags\" value=\"\"/>';\n\t\t},\n\n\t\t/**\n\t\t * Creates a new SystemTagsInputField\n\t\t *\n\t\t * @param {Object} [options]\n\t\t * @param {string} [options.objectType=files] object type for which tags are assigned to\n\t\t * @param {bool} [options.multiple=false] whether to allow selecting multiple tags\n\t\t * @param {bool} [options.allowActions=true] whether tags can be renamed/delete within the dropdown\n\t\t * @param {bool} [options.allowCreate=true] whether new tags can be created\n\t\t * @param {bool} [options.isAdmin=true] whether the user is an administrator\n\t\t * @param {Function} options.initSelection function to convert selection to data\n\t\t */\n\t\tinitialize: function(options) {\n\t\t\toptions = options || {};\n\n\t\t\tthis._multiple = !!options.multiple;\n\t\t\tthis._allowActions = _.isUndefined(options.allowActions) || !!options.allowActions;\n\t\t\tthis._allowCreate = _.isUndefined(options.allowCreate) || !!options.allowCreate;\n\t\t\tthis._isAdmin = !!options.isAdmin;\n\n\t\t\tif (_.isFunction(options.initSelection)) {\n\t\t\t\tthis._initSelection = options.initSelection;\n\t\t\t}\n\n\t\t\tthis.collection = options.collection || OC.SystemTags.collection;\n\n\t\t\tvar self = this;\n\t\t\tthis.collection.on('change:name remove', function() {\n\t\t\t\t// refresh selection\n\t\t\t\t_.defer(self._refreshSelection);\n\t\t\t});\n\n\t\t\t_.defer(_.bind(this._getLastUsedTags, this));\n\n\t\t\t_.bindAll(\n\t\t\t\tthis,\n\t\t\t\t'_refreshSelection',\n\t\t\t\t'_onClickRenameTag',\n\t\t\t\t'_onClickDeleteTag',\n\t\t\t\t'_onSelectTag',\n\t\t\t\t'_onDeselectTag',\n\t\t\t\t'_onSubmitRenameTag'\n\t\t\t);\n\t\t},\n\n\t\t_getLastUsedTags: function() {\n\t\t\tvar self = this;\n\t\t\t$.ajax({\n\t\t\t\ttype: 'GET',\n\t\t\t\turl: OC.generateUrl('/apps/systemtags/lastused'),\n\t\t\t\tsuccess: function (response) {\n\t\t\t\t\tself._lastUsedTags = response;\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Refreshes the selection, triggering a call to\n\t\t * select2's initSelection\n\t\t */\n\t\t_refreshSelection: function() {\n\t\t\tthis.$tagsField.select2('val', this.$tagsField.val());\n\t\t},\n\n\t\t/**\n\t\t * Event handler whenever the user clicked the \"rename\" action.\n\t\t * This will display the rename field.\n\t\t */\n\t\t_onClickRenameTag: function(ev) {\n\t\t\tvar $item = $(ev.target).closest('.systemtags-item');\n\t\t\tvar tagId = $item.attr('data-id');\n\t\t\tvar tagModel = this.collection.get(tagId);\n\n\t\t\tvar oldName = tagModel.get('name');\n\t\t\tvar $renameForm = $(OC.SystemTags.Templates['result_form']({\n\t\t\t\tcid: this.cid,\n\t\t\t\tname: oldName,\n\t\t\t\tdeleteTooltip: t('core', 'Delete'),\n\t\t\t\trenameLabel: t('core', 'Rename'),\n\t\t\t\tisAdmin: this._isAdmin\n\t\t\t}));\n\t\t\t$item.find('.label').after($renameForm);\n\t\t\t$item.find('.label, .systemtags-actions').addClass('hidden');\n\t\t\t$item.closest('.select2-result').addClass('has-form');\n\n\t\t\t$renameForm.find('[title]').tooltip({\n\t\t\t\tplacement: 'bottom',\n\t\t\t\tcontainer: 'body'\n\t\t\t});\n\t\t\t$renameForm.find('input').focus().selectRange(0, oldName.length);\n\t\t\treturn false;\n\t\t},\n\n\t\t/**\n\t\t * Event handler whenever the rename form has been submitted after\n\t\t * the user entered a new tag name.\n\t\t * This will submit the change to the server. \n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t_onSubmitRenameTag: function(ev) {\n\t\t\tev.preventDefault();\n\t\t\tvar $form = $(ev.target);\n\t\t\tvar $item = $form.closest('.systemtags-item');\n\t\t\tvar tagId = $item.attr('data-id');\n\t\t\tvar tagModel = this.collection.get(tagId);\n\t\t\tvar newName = $(ev.target).find('input').val().trim();\n\t\t\tif (newName && newName !== tagModel.get('name')) {\n\t\t\t\ttagModel.save({'name': newName});\n\t\t\t\t// TODO: spinner, and only change text after finished saving\n\t\t\t\t$item.find('.label').text(newName);\n\t\t\t}\n\t\t\t$item.find('.label, .systemtags-actions').removeClass('hidden');\n\t\t\t$form.remove();\n\t\t\t$item.closest('.select2-result').removeClass('has-form');\n\t\t},\n\n\t\t/**\n\t\t * Event handler whenever a tag must be deleted\n\t\t *\n\t\t * @param {Object} ev event\n\t\t */\n\t\t_onClickDeleteTag: function(ev) {\n\t\t\tvar $item = $(ev.target).closest('.systemtags-item');\n\t\t\tvar tagId = $item.attr('data-id');\n\t\t\tthis.collection.get(tagId).destroy();\n\t\t\t$(ev.target).tooltip('hide');\n\t\t\t$item.closest('.select2-result').remove();\n\t\t\t// TODO: spinner\n\t\t\treturn false;\n\t\t},\n\n\t\t_addToSelect2Selection: function(selection) {\n\t\t\tvar data = this.$tagsField.select2('data');\n\t\t\tdata.push(selection);\n\t\t\tthis.$tagsField.select2('data', data);\n\t\t},\n\n\t\t/**\n\t\t * Event handler whenever a tag is selected.\n\t\t * Also called whenever tag creation is requested through the dummy tag object.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t_onSelectTag: function(e) {\n\t\t\tvar self = this;\n\t\t\tvar tag;\n\t\t\tif (e.object && e.object.isNew) {\n\t\t\t\t// newly created tag, check if existing\n\t\t\t\t// create a new tag\n\t\t\t\ttag = this.collection.create({\n\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\tuserVisible: true,\n\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\tcanAssign: true\n\t\t\t\t}, {\n\t\t\t\t\tsuccess: function(model) {\n\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON());\n\t\t\t\t\t\tself._lastUsedTags.unshift(model.id);\n\t\t\t\t\t\tself.trigger('select', model);\n\t\t\t\t\t},\n\t\t\t\t\terror: function(model, xhr) {\n\t\t\t\t\t\tif (xhr.status === 409) {\n\t\t\t\t\t\t\t// re-fetch collection to get the missing tag\n\t\t\t\t\t\t\tself.collection.reset();\n\t\t\t\t\t\t\tself.collection.fetch({\n\t\t\t\t\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\t\t\t\t\t// find the tag in the collection\n\t\t\t\t\t\t\t\t\tvar model = collection.where({\n\t\t\t\t\t\t\t\t\t\tname: e.object.name.trim(),\n\t\t\t\t\t\t\t\t\t\tuserVisible: true,\n\t\t\t\t\t\t\t\t\t\tuserAssignable: true\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\tif (model.length) {\n\t\t\t\t\t\t\t\t\t\tmodel = model[0];\n\t\t\t\t\t\t\t\t\t\t// the tag already exists or was already assigned,\n\t\t\t\t\t\t\t\t\t\t// add it to the list anyway\n\t\t\t\t\t\t\t\t\t\tself._addToSelect2Selection(model.toJSON());\n\t\t\t\t\t\t\t\t\t\tself.trigger('select', model);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthis.$tagsField.select2('close');\n\t\t\t\te.preventDefault();\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\ttag = this.collection.get(e.object.id);\n\t\t\t\tthis._lastUsedTags.unshift(tag.id);\n\t\t\t}\n\t\t\tthis._newTag = null;\n\t\t\tthis.trigger('select', tag);\n\t\t},\n\n\t\t/**\n\t\t * Event handler whenever a tag gets deselected.\n\t\t *\n\t\t * @param {Object} e event\n\t\t */\n\t\t_onDeselectTag: function(e) {\n\t\t\tthis.trigger('deselect', e.choice.id);\n\t\t},\n\n\t\t/**\n\t\t * Autocomplete function for dropdown results\n\t\t *\n\t\t * @param {Object} query select2 query object\n\t\t */\n\t\t_queryTagsAutocomplete: function(query) {\n\t\t\tvar self = this;\n\t\t\tthis.collection.fetch({\n\t\t\t\tsuccess: function(collection) {\n\t\t\t\t\tvar tagModels = collection.filterByName(query.term.trim());\n\t\t\t\t\tif (!self._isAdmin) {\n\t\t\t\t\t\ttagModels = _.filter(tagModels, function(tagModel) {\n\t\t\t\t\t\t\treturn tagModel.get('canAssign');\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\tquery.callback({\n\t\t\t\t\t\tresults: _.invoke(tagModels, 'toJSON')\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t_preventDefault: function(e) {\n\t\t\te.stopPropagation();\n\t\t},\n\n\t\t/**\n\t\t * Formats a single dropdown result\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @return {string} HTML markup\n\t\t */\n\t\t_formatDropDownResult: function(data) {\n\t\t\treturn OC.SystemTags.Templates['result'](_.extend({\n\t\t\t\trenameTooltip: t('core', 'Rename'),\n\t\t\t\tallowActions: this._allowActions,\n\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data)[0].innerHTML : null,\n\t\t\t\tisAdmin: this._isAdmin\n\t\t\t}, data));\n\t\t},\n\n\t\t/**\n\t\t * Formats a single selection item\n\t\t *\n\t\t * @param {Object} data data to format\n\t\t * @return {string} HTML markup\n\t\t */\n\t\t_formatSelection: function(data) {\n\t\t\treturn OC.SystemTags.Templates['selection'](_.extend({\n\t\t\t\ttagMarkup: this._isAdmin ? OC.SystemTags.getDescriptiveTag(data)[0].innerHTML : null,\n\t\t\t\tisAdmin: this._isAdmin\n\t\t\t}, data));\n\t\t},\n\n\t\t/**\n\t\t * Create new dummy choice for select2 when the user\n\t\t * types an arbitrary string\n\t\t *\n\t\t * @param {string} term entered term\n\t\t * @return {Object} dummy tag\n\t\t */\n\t\t_createSearchChoice: function(term) {\n\t\t\tterm = term.trim();\n\t\t\tif (this.collection.filter(function(entry) {\n\t\t\t\t\treturn entry.get('name') === term;\n\t\t\t\t}).length) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this._newTag) {\n\t\t\t\tthis._newTag = {\n\t\t\t\t\tid: -1,\n\t\t\t\t\tname: term,\n\t\t\t\t\tuserAssignable: true,\n\t\t\t\t\tuserVisible: true,\n\t\t\t\t\tcanAssign: true,\n\t\t\t\t\tisNew: true\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tthis._newTag.name = term;\n\t\t\t}\n\n\t\t\treturn this._newTag;\n\t\t},\n\n\t\t_initSelection: function(element, callback) {\n\t\t\tvar self = this;\n\t\t\tvar ids = $(element).val().split(',');\n\n\t\t\tfunction modelToSelection(model) {\n\t\t\t\tvar data = model.toJSON();\n\t\t\t\tif (!self._isAdmin && !data.canAssign) {\n\t\t\t\t\t// lock static tags for non-admins\n\t\t\t\t\tdata.locked = true;\n\t\t\t\t}\n\t\t\t\treturn data;\n\t\t\t}\n\n\t\t\tfunction findSelectedObjects(ids) {\n\t\t\t\tvar selectedModels = self.collection.filter(function(model) {\n\t\t\t\t\treturn ids.indexOf(model.id) >= 0 && (self._isAdmin || model.get('userVisible'));\n\t\t\t\t});\n\t\t\t\treturn _.map(selectedModels, modelToSelection);\n\t\t\t}\n\n\t\t\tthis.collection.fetch({\n\t\t\t\tsuccess: function() {\n\t\t\t\t\tcallback(findSelectedObjects(ids));\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Renders this details view\n\t\t */\n\t\trender: function() {\n\t\t\tvar self = this;\n\t\t\tthis.$el.html(this.template());\n\n\t\t\tthis.$el.find('[title]').tooltip({placement: 'bottom'});\n\t\t\tthis.$tagsField = this.$el.find('[name=tags]');\n\t\t\tthis.$tagsField.select2({\n\t\t\t\tplaceholder: t('core', 'Collaborative tags'),\n\t\t\t\tcontainerCssClass: 'systemtags-select2-container',\n\t\t\t\tdropdownCssClass: 'systemtags-select2-dropdown',\n\t\t\t\tcloseOnSelect: false,\n\t\t\t\tallowClear: false,\n\t\t\t\tmultiple: this._multiple,\n\t\t\t\ttoggleSelect: this._multiple,\n\t\t\t\tquery: _.bind(this._queryTagsAutocomplete, this),\n\t\t\t\tid: function(tag) {\n\t\t\t\t\treturn tag.id;\n\t\t\t\t},\n\t\t\t\tinitSelection: _.bind(this._initSelection, this),\n\t\t\t\tformatResult: _.bind(this._formatDropDownResult, this),\n\t\t\t\tformatSelection: _.bind(this._formatSelection, this),\n\t\t\t\tcreateSearchChoice: this._allowCreate ? _.bind(this._createSearchChoice, this) : undefined,\n\t\t\t\tsortResults: function(results) {\n\t\t\t\t\tvar selectedItems = _.pluck(self.$tagsField.select2('data'), 'id');\n\t\t\t\t\tresults.sort(function(a, b) {\n\t\t\t\t\t\tvar aSelected = selectedItems.indexOf(a.id) >= 0;\n\t\t\t\t\t\tvar bSelected = selectedItems.indexOf(b.id) >= 0;\n\t\t\t\t\t\tif (aSelected === bSelected) {\n\t\t\t\t\t\t\tvar aLastUsed = self._lastUsedTags.indexOf(a.id);\n\t\t\t\t\t\t\tvar bLastUsed = self._lastUsedTags.indexOf(b.id);\n\n\t\t\t\t\t\t\tif (aLastUsed !== bLastUsed) {\n\t\t\t\t\t\t\t\tif (bLastUsed === -1) {\n\t\t\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (aLastUsed === -1) {\n\t\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn aLastUsed < bLastUsed ? -1 : 1;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Both not found\n\t\t\t\t\t\t\treturn OC.Util.naturalSortCompare(a.name, b.name);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (aSelected && !bSelected) {\n\t\t\t\t\t\t\treturn -1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t});\n\t\t\t\t\treturn results;\n\t\t\t\t},\n\t\t\t\tformatNoMatches: function() {\n\t\t\t\t\treturn t('core', 'No tags found');\n\t\t\t\t}\n\t\t\t})\n\t\t\t\t.on('select2-selecting', this._onSelectTag)\n\t\t\t\t.on('select2-removing', this._onDeselectTag);\n\n\t\t\tvar $dropDown = this.$tagsField.select2('dropdown');\n\t\t\t// register events for inside the dropdown\n\t\t\t$dropDown.on('mouseup', '.rename', this._onClickRenameTag);\n\t\t\t$dropDown.on('mouseup', '.delete', this._onClickDeleteTag);\n\t\t\t$dropDown.on('mouseup', '.select2-result-selectable.has-form', this._preventDefault);\n\t\t\t$dropDown.on('submit', '.systemtags-rename-form', this._onSubmitRenameTag);\n\n\t\t\tthis.delegateEvents();\n\t\t},\n\n\t\tremove: function() {\n\t\t\tif (this.$tagsField) {\n\t\t\t\tthis.$tagsField.select2('destroy');\n\t\t\t}\n\t\t},\n\n\t\tgetValues: function() {\n\t\t\tthis.$tagsField.select2('val');\n\t\t},\n\n\t\tsetValues: function(values) {\n\t\t\tthis.$tagsField.select2('val', values);\n\t\t},\n\n\t\tsetData: function(data) {\n\t\t\tthis.$tagsField.select2('data', data);\n\t\t}\n\t});\n\n\tOC.SystemTags = OC.SystemTags || {};\n\tOC.SystemTags.SystemTagsInputField = SystemTagsInputField;\n\n})(OC);\n\n","var content = require(\"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js!./systemtags.scss\");\n\nif (typeof content === 'string') {\n content = [[module.id, content, '']];\n}\n\nvar options = {}\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = require(\"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\")(content, options);\n\nif (content.locals) {\n module.exports = content.locals;\n}\n","exports = module.exports = require(\"../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \".systemtags-select2-dropdown .select2-result-label .checkmark{visibility:hidden;margin-left:-5px;margin-right:5px;padding:4px}.systemtags-select2-dropdown .select2-result-label .new-item .systemtags-actions{display:none}.systemtags-select2-dropdown .select2-selected .select2-result-label .checkmark{visibility:visible}.systemtags-select2-dropdown .select2-result-label .icon{display:inline-block;opacity:.5}.systemtags-select2-dropdown .select2-result-label .icon.rename{padding:4px}.systemtags-select2-dropdown .systemtags-actions{position:absolute;right:5px}.systemtags-select2-dropdown .systemtags-rename-form{display:inline-block;width:calc(100% - 20px);top:-6px;position:relative}.systemtags-select2-dropdown .systemtags-rename-form input{display:inline-block;height:30px;width:calc(100% - 40px)}.systemtags-select2-dropdown .label{width:85%;display:inline-block;overflow:hidden;text-overflow:ellipsis}.systemtags-select2-dropdown .label.hidden{display:none}.systemtags-select2-dropdown span{line-height:25px}.systemtags-select2-dropdown .systemtags-item{display:inline-block;height:25px;width:100%}.systemtags-select2-dropdown .select2-result-label{height:25px}.systemtags-select2-container{width:100%}.systemtags-select2-container .select2-choices .select2-search-choice.select2-locked .label{opacity:0.5}#select2-drop.systemtags-select2-dropdown .select2-results li.select2-result{padding:5px}\\n\", \"\"]);\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \"{\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = modules[_i]; // skip already imported module\n // this implementation is not 100% perfect for weird media query combinations\n // when a module is imported multiple times with different media queries.\n // I hope this will never occur (Hey this way we have smaller bundles)\n\n if (item[0] == null || !alreadyImportedModules[item[0]]) {\n if (mediaQuery && !item[2]) {\n item[2] = mediaQuery;\n } else if (mediaQuery) {\n item[2] = \"(\".concat(item[2], \") and (\").concat(mediaQuery, \")\");\n }\n\n list.push(item);\n }\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot).concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","\"use strict\";\n\nvar stylesInDom = {};\n\nvar isOldIE = function isOldIE() {\n var memo;\n return function memorize() {\n if (typeof memo === 'undefined') {\n // Test for IE <= 9 as proposed by Browserhacks\n // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n // Tests for existence of standard globals is to allow style-loader\n // to operate correctly into non-standard environments\n // @see https://github.com/webpack-contrib/style-loader/issues/177\n memo = Boolean(window && document && document.all && !window.atob);\n }\n\n return memo;\n };\n}();\n\nvar getTarget = function getTarget() {\n var memo = {};\n return function memorize(target) {\n if (typeof memo[target] === 'undefined') {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n };\n}();\n\nfunction listToStyles(list, options) {\n var styles = [];\n var newStyles = {};\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var css = item[1];\n var media = item[2];\n var sourceMap = item[3];\n var part = {\n css: css,\n media: media,\n sourceMap: sourceMap\n };\n\n if (!newStyles[id]) {\n styles.push(newStyles[id] = {\n id: id,\n parts: [part]\n });\n } else {\n newStyles[id].parts.push(part);\n }\n }\n\n return styles;\n}\n\nfunction addStylesToDom(styles, options) {\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i];\n var domStyle = stylesInDom[item.id];\n var j = 0;\n\n if (domStyle) {\n domStyle.refs++;\n\n for (; j < domStyle.parts.length; j++) {\n domStyle.parts[j](item.parts[j]);\n }\n\n for (; j < item.parts.length; j++) {\n domStyle.parts.push(addStyle(item.parts[j], options));\n }\n } else {\n var parts = [];\n\n for (; j < item.parts.length; j++) {\n parts.push(addStyle(item.parts[j], options));\n }\n\n stylesInDom[item.id] = {\n id: item.id,\n refs: 1,\n parts: parts\n };\n }\n }\n}\n\nfunction insertStyleElement(options) {\n var style = document.createElement('style');\n\n if (typeof options.attributes.nonce === 'undefined') {\n var nonce = typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;\n\n if (nonce) {\n options.attributes.nonce = nonce;\n }\n }\n\n Object.keys(options.attributes).forEach(function (key) {\n style.setAttribute(key, options.attributes[key]);\n });\n\n if (typeof options.insert === 'function') {\n options.insert(style);\n } else {\n var target = getTarget(options.insert || 'head');\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n }\n\n return style;\n}\n\nfunction removeStyleElement(style) {\n // istanbul ignore if\n if (style.parentNode === null) {\n return false;\n }\n\n style.parentNode.removeChild(style);\n}\n/* istanbul ignore next */\n\n\nvar replaceText = function replaceText() {\n var textStore = [];\n return function replace(index, replacement) {\n textStore[index] = replacement;\n return textStore.filter(Boolean).join('\\n');\n };\n}();\n\nfunction applyToSingletonTag(style, index, remove, obj) {\n var css = remove ? '' : obj.css; // For old IE\n\n /* istanbul ignore if */\n\n if (style.styleSheet) {\n style.styleSheet.cssText = replaceText(index, css);\n } else {\n var cssNode = document.createTextNode(css);\n var childNodes = style.childNodes;\n\n if (childNodes[index]) {\n style.removeChild(childNodes[index]);\n }\n\n if (childNodes.length) {\n style.insertBefore(cssNode, childNodes[index]);\n } else {\n style.appendChild(cssNode);\n }\n }\n}\n\nfunction applyToTag(style, options, obj) {\n var css = obj.css;\n var media = obj.media;\n var sourceMap = obj.sourceMap;\n\n if (media) {\n style.setAttribute('media', media);\n }\n\n if (sourceMap && btoa) {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n while (style.firstChild) {\n style.removeChild(style.firstChild);\n }\n\n style.appendChild(document.createTextNode(css));\n }\n}\n\nvar singleton = null;\nvar singletonCounter = 0;\n\nfunction addStyle(obj, options) {\n var style;\n var update;\n var remove;\n\n if (options.singleton) {\n var styleIndex = singletonCounter++;\n style = singleton || (singleton = insertStyleElement(options));\n update = applyToSingletonTag.bind(null, style, styleIndex, false);\n remove = applyToSingletonTag.bind(null, style, styleIndex, true);\n } else {\n style = insertStyleElement(options);\n update = applyToTag.bind(null, style, options);\n\n remove = function remove() {\n removeStyleElement(style);\n };\n }\n\n update(obj);\n return function updateStyle(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) {\n return;\n }\n\n update(obj = newObj);\n } else {\n remove();\n }\n };\n}\n\nmodule.exports = function (list, options) {\n options = options || {};\n options.attributes = typeof options.attributes === 'object' ? options.attributes : {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n // tags it will allow on a page\n\n if (!options.singleton && typeof options.singleton !== 'boolean') {\n options.singleton = isOldIE();\n }\n\n var styles = listToStyles(list, options);\n addStylesToDom(styles, options);\n return function update(newList) {\n var mayRemove = [];\n\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i];\n var domStyle = stylesInDom[item.id];\n\n if (domStyle) {\n domStyle.refs--;\n mayRemove.push(domStyle);\n }\n }\n\n if (newList) {\n var newStyles = listToStyles(newList, options);\n addStylesToDom(newStyles, options);\n }\n\n for (var _i = 0; _i < mayRemove.length; _i++) {\n var _domStyle = mayRemove[_i];\n\n if (_domStyle.refs === 0) {\n for (var j = 0; j < _domStyle.parts.length; j++) {\n _domStyle.parts[j]();\n }\n\n delete stylesInDom[_domStyle.id];\n }\n }\n };\n};"],"sourceRoot":""}
\ No newline at end of file |