aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-09-25 18:19:42 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2019-10-01 17:16:09 +0200
commitb9bc2417e7a8dc81feb0abe20359bedaf864f790 (patch)
tree61b47fbf37c1d168da8625224debde9e6a985348 /apps/files_trashbin
parent7fb651235128dcbca8a6683b5cdafdf835f46300 (diff)
downloadnextcloud-server-b9bc2417e7a8dc81feb0abe20359bedaf864f790.tar.gz
nextcloud-server-b9bc2417e7a8dc81feb0abe20359bedaf864f790.zip
Comply to eslint
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_trashbin')
-rw-r--r--apps/files_trashbin/js/files_trashbin.js2
-rw-r--r--apps/files_trashbin/js/files_trashbin.js.map2
-rw-r--r--apps/files_trashbin/src/app.js107
-rw-r--r--apps/files_trashbin/src/filelist.js462
4 files changed, 286 insertions, 287 deletions
diff --git a/apps/files_trashbin/js/files_trashbin.js b/apps/files_trashbin/js/files_trashbin.js
index ceab18813b2..d381919b0aa 100644
--- a/apps/files_trashbin/js/files_trashbin.js
+++ b/apps/files_trashbin/js/files_trashbin.js
@@ -1,2 +1,2 @@
-!function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/js/",i(i.s=0)}([function(e,t,i){"use strict";i.r(t);i(1),i(2),i(3);window.OCA.Trashbin=OCA.Trashbin},function(e,i){OCA.Trashbin={},OCA.Trashbin.App={_initialized:!1,client:null,initialize:function(e){if(!this._initialized){this._initialized=!0,this.client=new OC.Files.Client({host:OC.getHost(),port:OC.getPort(),root:OC.linkToRemoteBase("dav")+"/trashbin/"+OC.getCurrentUser().uid,useHTTPS:"https"===OC.getProtocol()});var i=OC.Util.History.parseUrlQuery();this.fileList=new OCA.Trashbin.FileList($("#app-content-trashbin"),{fileActions:this._createFileActions(),detailsViewEnabled:!1,scrollTo:i.scrollto,config:OCA.Files.App.getFilesConfig(),multiSelectMenu:[{name:"restore",displayName:t("files_trashbin","Restore"),iconClass:"icon-history"},{name:"delete",displayName:t("files_trashbin","Delete permanently"),iconClass:"icon-delete"}],client:this.client,shown:!0})}},_createFileActions:function(){var e=this.client,i=new OCA.Files.FileActions;return i.register("dir","Open",OC.PERMISSION_READ,"",(function(e,t){var i=t.fileList.getCurrentDirectory();t.fileList.changeDirectory(OC.joinPaths(i,e))})),i.setDefault("dir","Open"),i.registerAction({name:"Restore",displayName:t("files_trashbin","Restore"),type:OCA.Files.FileActions.TYPE_INLINE,mime:"all",permissions:OC.PERMISSION_READ,iconClass:"icon-history",actionHandler:function(i,n){var r=n.fileList,a=r.findFileEl(i);r.showFileBusyState(a,!0);var o=n.fileList.getCurrentDirectory();e.move(OC.joinPaths("trash",o,i),OC.joinPaths("restore",i),!0).then(r._removeCallback.bind(r,[i]),(function(){r.showFileBusyState(a,!1),OC.Notification.show(t("files_trashbin","Error while restoring file from trashbin"))}))}}),i.registerAction({name:"Delete",displayName:t("files_trashbin","Delete permanently"),mime:"all",permissions:OC.PERMISSION_READ,iconClass:"icon-delete",render:function(e,n,r){var a=i._makeActionLink(e,r);return a.attr("original-title",t("files_trashbin","Delete permanently")),a.children("img").attr("alt",t("files_trashbin","Delete permanently")),r.$file.find("td:last").append(a),a},actionHandler:function(i,n){var r=n.fileList;$(".tipsy").remove();var a=r.findFileEl(i);r.showFileBusyState(a,!0);var o=n.fileList.getCurrentDirectory();e.remove(OC.joinPaths("trash",o,i)).then(r._removeCallback.bind(r,[i]),(function(){r.showFileBusyState(a,!1),OC.Notification.show(t("files_trashbin","Error while removing file from trashbin"))}))}}),i}},$(document).ready((function(){$("#app-content-trashbin").one("show",(function(){OCA.Trashbin.App.initialize($("#app-content-trashbin"))}))}))},function(e,i){!function(){var e=new RegExp(/^(.+)\.d[0-9]+$/),i="{http://nextcloud.org/ns}trashbin-filename",n="{http://nextcloud.org/ns}trashbin-deletion-time",r="{http://nextcloud.org/ns}trashbin-original-location";function a(t){t=OC.basename(t);var i=e.exec(t);return i&&i.length>1&&(t=i[1]),t}var o=function(e,t){this.client=t.client,this.initialize(e,t)};o.prototype=_.extend({},OCA.Files.FileList.prototype,{id:"trashbin",appName:t("files_trashbin","Deleted files"),client:null,initialize:function(){this.client.addFileInfoParser((function(e,t){var a=e.propStat[0].properties,o=a[r];return{displayName:a[i],mtime:1e3*parseInt(a[n],10),hasPreview:!0,path:o,extraData:o}}));var e=OCA.Files.FileList.prototype.initialize.apply(this,arguments);return this.$el.find(".undelete").click("click",_.bind(this._onClickRestoreSelected,this)),this.setSort("mtime","desc"),this.breadcrumb._makeCrumbs=function(){for(var e=OCA.Files.BreadCrumb.prototype._makeCrumbs.apply(this,arguments),t=1;t<e.length;t++)e[t].name=a(e[t].name);return e},OC.Plugins.attach("OCA.Trashbin.FileList",this),e},getDirectoryPermissions:function(){return OC.PERMISSION_READ|OC.PERMISSION_DELETE},_setCurrentDir:function(e){OCA.Files.FileList.prototype._setCurrentDir.apply(this,arguments);var t=OC.basename(e);""!==t&&this.setPageTitle(a(t))},_createRow:function(){var e=OCA.Files.FileList.prototype._createRow.apply(this,arguments);return e.find("td.filesize").remove(),e},getAjaxUrl:function(e,t){var i="";return t&&(i="?"+OC.buildQueryString(t)),OC.filePath("files_trashbin","ajax",e+".php")+i},setupUploadEvents:function(){},linkTo:function(e){return OC.linkTo("files","index.php")+"?view=trashbin&dir="+encodeURIComponent(e).replace(/%2F/g,"/")},elementToFile:function(e){var t=OCA.Files.FileList.prototype.elementToFile(e);return"/"===this.getCurrentDirectory()&&(t.displayName=a(t.name)),delete t.size,t},updateEmptyContent:function(){var e=this.$fileList.find("tr:first").exists();this.$el.find("#emptycontent").toggleClass("hidden",e),this.$el.find("#filestable th").toggleClass("hidden",!e)},_removeCallback:function(e){for(var t,i=0;i<e.length;i++)t=this.remove(OC.basename(e[i]),{updateSummary:!1}),this.fileSummary.remove({type:t.attr("data-type"),size:t.attr("data-size")});this.fileSummary.update(),this.updateEmptyContent()},_onClickRestoreSelected:function(e){e.preventDefault();for(var i=this,n=_.pluck(this.getSelectedFiles(),"name"),r=0;r<n.length;r++){var a=this.findFileEl(n[r]);this.showFileBusyState(a,!0)}this.fileMultiSelectMenu.toggleLoading("restore",!0);var o=n.map((function(e){return i.client.move(OC.joinPaths("trash",i.getCurrentDirectory(),e),OC.joinPaths("restore",e),!0).then((function(){i._removeCallback([e])}))}));return Promise.all(o).then((function(){i.fileMultiSelectMenu.toggleLoading("restore",!1)}),(function(){OC.Notification.show(t("files_trashbin","Error while restoring files from trashbin"))}))},_onClickDeleteSelected:function(e){e.preventDefault();for(var i=this,n=this.$el.find(".select-all").is(":checked"),r=_.pluck(this.getSelectedFiles(),"name"),a=0;a<r.length;a++){var o=this.findFileEl(r[a]);this.showFileBusyState(o,!0)}if(n)return this.client.remove(OC.joinPaths("trash",this.getCurrentDirectory())).then((function(){i.hideMask(),i.setFiles([])}),(function(){OC.Notification.show(t("files_trashbin","Error while emptying trashbin"))}));this.fileMultiSelectMenu.toggleLoading("delete",!0);var s=r.map((function(e){return i.client.remove(OC.joinPaths("trash",i.getCurrentDirectory(),e)).then((function(){i._removeCallback([e])}))}));return Promise.all(s).then((function(){i.fileMultiSelectMenu.toggleLoading("delete",!1)}),(function(){OC.Notification.show(t("files_trashbin","Error while removing files from trashbin"))}))},_onClickFile:function(e){var t=$(this).parent().parent().data("mime");return"httpd/unix-directory"!==t&&e.preventDefault(),OCA.Files.FileList.prototype._onClickFile.apply(this,arguments)},generatePreviewUrl:function(e){return OC.generateUrl("/apps/files_trashbin/preview?")+$.param(e)},getDownloadUrl:function(){return"#"},updateStorageStatistics:function(){},isSelectedDeletable:function(){return!0},_getWebdavProperties:function(){return[i,n,r].concat(this.filesClient.getPropfindProperties())},reload:function(){this._selectedFiles={},this._selectionSummary.clear(),this.$el.find(".select-all").prop("checked",!1),this.showMask(),this._reloadCall&&this._reloadCall.abort(),this._reloadCall=this.client.getFolderContents("trash/"+this.getCurrentDirectory(),{includeParent:!1,properties:this._getWebdavProperties()});var e=this.reloadCallback.bind(this);return this._reloadCall.then(e,e)},reloadCallback:function(e,i){return delete this._reloadCall,this.hideMask(),401!==e&&(403===e?(this.changeDirectory("/"),OC.Notification.show(t("files","This operation is forbidden")),!1):500===e?(this.changeDirectory("/"),OC.Notification.show(t("files","This directory is unavailable, please check the logs or contact the administrator")),!1):404===e?(this.changeDirectory("/"),!1):0===e||(this.setFiles(i),!0))}}),OCA.Trashbin.FileList=o}()},function(e,t,i){var n=i(4);"string"==typeof n&&(n=[[e.i,n,""]]);var r={insert:"head",singleton:!1};i(6)(n,r);n.locals&&(e.exports=n.locals)},function(e,t,i){(e.exports=i(5)(!1)).push([e.i,'#app-content-trashbin tbody tr[data-type="file"] td a.name,#app-content-trashbin tbody tr[data-type="file"] td a.name span.nametext,#app-content-trashbin tbody tr[data-type="file"] td a.name span.nametext span{cursor:default}#app-content-trashbin .summary :last-child{padding:0}#app-content-trashbin #filestable .summary .filesize{display:none}\n',""])},function(e,t,i){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=function(e,t){var i=e[1]||"",n=e[3];if(!n)return i;if(t&&"function"==typeof btoa){var r=(o=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),a=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot).concat(e," */")}));return[i].concat(a).concat([r]).join("\n")}var o,s,l;return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(i,"}"):i})).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;r<this.length;r++){var a=this[r][0];null!=a&&(n[a]=!0)}for(var o=0;o<e.length;o++){var s=e[o];null!=s[0]&&n[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="(".concat(s[2],") and (").concat(i,")")),t.push(s))}},t}},function(e,t,i){"use strict";var n,r={},a=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},o=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}();function s(e,t){for(var i=[],n={},r=0;r<e.length;r++){var a=e[r],o=t.base?a[0]+t.base:a[0],s={css:a[1],media:a[2],sourceMap:a[3]};n[o]?n[o].parts.push(s):i.push(n[o]={id:o,parts:[s]})}return i}function l(e,t){for(var i=0;i<e.length;i++){var n=e[i],a=r[n.id],o=0;if(a){for(a.refs++;o<a.parts.length;o++)a.parts[o](n.parts[o]);for(;o<n.parts.length;o++)a.parts.push(b(n.parts[o],t))}else{for(var s=[];o<n.parts.length;o++)s.push(b(n.parts[o],t));r[n.id]={id:n.id,refs:1,parts:s}}}}function c(e){var t=document.createElement("style");if(void 0===e.attributes.nonce){var n=i.nc;n&&(e.attributes.nonce=n)}if(Object.keys(e.attributes).forEach((function(i){t.setAttribute(i,e.attributes[i])})),"function"==typeof e.insert)e.insert(t);else{var r=o(e.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(t)}return t}var u,f=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function h(e,t,i,n){var r=i?"":n.css;if(e.styleSheet)e.styleSheet.cssText=f(t,r);else{var a=document.createTextNode(r),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function p(e,t,i){var n=i.css,r=i.media,a=i.sourceMap;if(r&&e.setAttribute("media",r),a&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var d=null,m=0;function b(e,t){var i,n,r;if(t.singleton){var a=m++;i=d||(d=c(t)),n=h.bind(null,i,a,!1),r=h.bind(null,i,a,!0)}else i=c(t),n=p.bind(null,i,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(i)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).attributes="object"==typeof t.attributes?t.attributes:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a());var i=s(e,t);return l(i,t),function(e){for(var n=[],a=0;a<i.length;a++){var o=i[a],c=r[o.id];c&&(c.refs--,n.push(c))}e&&l(s(e,t),t);for(var u=0;u<n.length;u++){var f=n[u];if(0===f.refs){for(var h=0;h<f.parts.length;h++)f.parts[h]();delete r[f.id]}}}}}]);
+!function(e){var t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/js/",i(i.s=0)}([function(e,t,i){"use strict";i.r(t);i(1),i(2),i(3);window.OCA.Trashbin=OCA.Trashbin},function(e,i){OCA.Trashbin={},OCA.Trashbin.App={_initialized:!1,client:null,initialize:function(e){if(!this._initialized){this._initialized=!0,this.client=new OC.Files.Client({host:OC.getHost(),port:OC.getPort(),root:OC.linkToRemoteBase("dav")+"/trashbin/"+OC.getCurrentUser().uid,useHTTPS:"https"===OC.getProtocol()});var i=OC.Util.History.parseUrlQuery();this.fileList=new OCA.Trashbin.FileList($("#app-content-trashbin"),{fileActions:this._createFileActions(),detailsViewEnabled:!1,scrollTo:i.scrollto,config:OCA.Files.App.getFilesConfig(),multiSelectMenu:[{name:"restore",displayName:t("files_trashbin","Restore"),iconClass:"icon-history"},{name:"delete",displayName:t("files_trashbin","Delete permanently"),iconClass:"icon-delete"}],client:this.client,shown:!0})}},_createFileActions:function(){var e=this.client,i=new OCA.Files.FileActions;return i.register("dir","Open",OC.PERMISSION_READ,"",(function(e,t){var i=t.fileList.getCurrentDirectory();t.fileList.changeDirectory(OC.joinPaths(i,e))})),i.setDefault("dir","Open"),i.registerAction({name:"Restore",displayName:t("files_trashbin","Restore"),type:OCA.Files.FileActions.TYPE_INLINE,mime:"all",permissions:OC.PERMISSION_READ,iconClass:"icon-history",actionHandler:function(i,n){var r=n.fileList,a=r.findFileEl(i);r.showFileBusyState(a,!0);var o=n.fileList.getCurrentDirectory();e.move(OC.joinPaths("trash",o,i),OC.joinPaths("restore",i),!0).then(r._removeCallback.bind(r,[i]),(function(){r.showFileBusyState(a,!1),OC.Notification.show(t("files_trashbin","Error while restoring file from trashbin"))}))}}),i.registerAction({name:"Delete",displayName:t("files_trashbin","Delete permanently"),mime:"all",permissions:OC.PERMISSION_READ,iconClass:"icon-delete",render:function(e,n,r){var a=i._makeActionLink(e,r);return a.attr("original-title",t("files_trashbin","Delete permanently")),a.children("img").attr("alt",t("files_trashbin","Delete permanently")),r.$file.find("td:last").append(a),a},actionHandler:function(i,n){var r=n.fileList;$(".tipsy").remove();var a=r.findFileEl(i);r.showFileBusyState(a,!0);var o=n.fileList.getCurrentDirectory();e.remove(OC.joinPaths("trash",o,i)).then(r._removeCallback.bind(r,[i]),(function(){r.showFileBusyState(a,!1),OC.Notification.show(t("files_trashbin","Error while removing file from trashbin"))}))}}),i}},$(document).ready((function(){$("#app-content-trashbin").one("show",(function(){OCA.Trashbin.App.initialize($("#app-content-trashbin"))}))}))},function(e,i){!function(){var e=new RegExp(/^(.+)\.d[0-9]+$/),i="{http://nextcloud.org/ns}trashbin-filename",n="{http://nextcloud.org/ns}trashbin-deletion-time",r="{http://nextcloud.org/ns}trashbin-original-location";function a(t){t=OC.basename(t);var i=e.exec(t);return i&&i.length>1&&(t=i[1]),t}var o=function(e,t){this.client=t.client,this.initialize(e,t)};o.prototype=_.extend({},OCA.Files.FileList.prototype,{id:"trashbin",appName:t("files_trashbin","Deleted files"),client:null,initialize:function(){this.client.addFileInfoParser((function(e,t){var a=e.propStat[0].properties,o=a[r];return{displayName:a[i],mtime:1e3*parseInt(a[n],10),hasPreview:!0,path:o,extraData:o}}));var e=OCA.Files.FileList.prototype.initialize.apply(this,arguments);return this.$el.find(".undelete").click("click",_.bind(this._onClickRestoreSelected,this)),this.setSort("mtime","desc"),this.breadcrumb._makeCrumbs=function(){for(var e=OCA.Files.BreadCrumb.prototype._makeCrumbs.apply(this,arguments),t=1;t<e.length;t++)e[t].name=a(e[t].name);return e},OC.Plugins.attach("OCA.Trashbin.FileList",this),e},getDirectoryPermissions:function(){return OC.PERMISSION_READ|OC.PERMISSION_DELETE},_setCurrentDir:function(e){OCA.Files.FileList.prototype._setCurrentDir.apply(this,arguments);var t=OC.basename(e);""!==t&&this.setPageTitle(a(t))},_createRow:function(){var e=OCA.Files.FileList.prototype._createRow.apply(this,arguments);return e.find("td.filesize").remove(),e},getAjaxUrl:function(e,t){var i="";return t&&(i="?"+OC.buildQueryString(t)),OC.filePath("files_trashbin","ajax",e+".php")+i},setupUploadEvents:function(){},linkTo:function(e){return OC.linkTo("files","index.php")+"?view=trashbin&dir="+encodeURIComponent(e).replace(/%2F/g,"/")},elementToFile:function(e){var t=OCA.Files.FileList.prototype.elementToFile(e);return"/"===this.getCurrentDirectory()&&(t.displayName=a(t.name)),delete t.size,t},updateEmptyContent:function(){var e=this.$fileList.find("tr:first").exists();this.$el.find("#emptycontent").toggleClass("hidden",e),this.$el.find("#filestable th").toggleClass("hidden",!e)},_removeCallback:function(e){for(var t,i=0;i<e.length;i++)t=this.remove(OC.basename(e[i]),{updateSummary:!1}),this.fileSummary.remove({type:t.attr("data-type"),size:t.attr("data-size")});this.fileSummary.update(),this.updateEmptyContent()},_onClickRestoreSelected:function(e){e.preventDefault();for(var i=this,n=_.pluck(this.getSelectedFiles(),"name"),r=0;r<n.length;r++){var a=this.findFileEl(n[r]);this.showFileBusyState(a,!0)}this.fileMultiSelectMenu.toggleLoading("restore",!0);var o=n.map((function(e){return i.client.move(OC.joinPaths("trash",i.getCurrentDirectory(),e),OC.joinPaths("restore",e),!0).then((function(){i._removeCallback([e])}))}));return Promise.all(o).then((function(){i.fileMultiSelectMenu.toggleLoading("restore",!1)}),(function(){OC.Notification.show(t("files_trashbin","Error while restoring files from trashbin"))}))},_onClickDeleteSelected:function(e){e.preventDefault();for(var i=this,n=this.$el.find(".select-all").is(":checked"),r=_.pluck(this.getSelectedFiles(),"name"),a=0;a<r.length;a++){var o=this.findFileEl(r[a]);this.showFileBusyState(o,!0)}if(n)return this.client.remove(OC.joinPaths("trash",this.getCurrentDirectory())).then((function(){i.hideMask(),i.setFiles([])}),(function(){OC.Notification.show(t("files_trashbin","Error while emptying trashbin"))}));this.fileMultiSelectMenu.toggleLoading("delete",!0);var s=r.map((function(e){return i.client.remove(OC.joinPaths("trash",i.getCurrentDirectory(),e)).then((function(){i._removeCallback([e])}))}));return Promise.all(s).then((function(){i.fileMultiSelectMenu.toggleLoading("delete",!1)}),(function(){OC.Notification.show(t("files_trashbin","Error while removing files from trashbin"))}))},_onClickFile:function(e){var t=$(this).parent().parent().data("mime");return"httpd/unix-directory"!==t&&e.preventDefault(),OCA.Files.FileList.prototype._onClickFile.apply(this,arguments)},generatePreviewUrl:function(e){return OC.generateUrl("/apps/files_trashbin/preview?")+$.param(e)},getDownloadUrl:function(){return"#"},updateStorageStatistics:function(){},isSelectedDeletable:function(){return!0},_getWebdavProperties:function(){return[i,n,r].concat(this.filesClient.getPropfindProperties())},reload:function(){this._selectedFiles={},this._selectionSummary.clear(),this.$el.find(".select-all").prop("checked",!1),this.showMask(),this._reloadCall&&this._reloadCall.abort(),this._reloadCall=this.client.getFolderContents("trash/"+this.getCurrentDirectory(),{includeParent:!1,properties:this._getWebdavProperties()});var e=this.reloadCallback.bind(this);return this._reloadCall.then(e,e)},reloadCallback:function(e,i){return delete this._reloadCall,this.hideMask(),401!==e&&(403===e?(this.changeDirectory("/"),OC.Notification.show(t("files","This operation is forbidden")),!1):500===e?(this.changeDirectory("/"),OC.Notification.show(t("files","This directory is unavailable, please check the logs or contact the administrator")),!1):404===e?(this.changeDirectory("/"),!1):0===e||(this.setFiles(i),!0))}}),OCA.Trashbin.FileList=o}()},function(e,t,i){var n=i(4);"string"==typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);(0,i(6).default)("e1044e6c",n,!0,{})},function(e,t,i){(e.exports=i(5)(!1)).push([e.i,'#app-content-trashbin tbody tr[data-type="file"] td a.name,#app-content-trashbin tbody tr[data-type="file"] td a.name span.nametext,#app-content-trashbin tbody tr[data-type="file"] td a.name span.nametext span{cursor:default}#app-content-trashbin .summary :last-child{padding:0}#app-content-trashbin #filestable .summary .filesize{display:none}\n',""])},function(e,t,i){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=function(e,t){var i=e[1]||"",n=e[3];if(!n)return i;if(t&&"function"==typeof btoa){var r=(o=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),a=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot).concat(e," */")}));return[i].concat(a).concat([r]).join("\n")}var o,s,l;return[i].join("\n")}(t,e);return t[2]?"@media ".concat(t[2],"{").concat(i,"}"):i})).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;r<this.length;r++){var a=this[r][0];null!=a&&(n[a]=!0)}for(var o=0;o<e.length;o++){var s=e[o];null!=s[0]&&n[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="(".concat(s[2],") and (").concat(i,")")),t.push(s))}},t}},function(e,t,i){"use strict";function n(e,t){for(var i=[],n={},r=0;r<t.length;r++){var a=t[r],o=a[0],s={id:e+":"+r,css:a[1],media:a[2],sourceMap:a[3]};n[o]?n[o].parts.push(s):i.push(n[o]={id:o,parts:[s]})}return i}i.r(t),i.d(t,"default",(function(){return p}));var r="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!r)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var a={},o=r&&(document.head||document.getElementsByTagName("head")[0]),s=null,l=0,c=!1,u=function(){},f=null,h="data-vue-ssr-id",d="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(e,t,i,r){c=i,f=r||{};var o=n(e,t);return m(o),function(t){for(var i=[],r=0;r<o.length;r++){var s=o[r];(l=a[s.id]).refs--,i.push(l)}t?m(o=n(e,t)):o=[];for(r=0;r<i.length;r++){var l;if(0===(l=i[r]).refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete a[l.id]}}}}function m(e){for(var t=0;t<e.length;t++){var i=e[t],n=a[i.id];if(n){n.refs++;for(var r=0;r<n.parts.length;r++)n.parts[r](i.parts[r]);for(;r<i.parts.length;r++)n.parts.push(C(i.parts[r]));n.parts.length>i.parts.length&&(n.parts.length=i.parts.length)}else{var o=[];for(r=0;r<i.parts.length;r++)o.push(C(i.parts[r]));a[i.id]={id:i.id,refs:1,parts:o}}}}function g(){var e=document.createElement("style");return e.type="text/css",o.appendChild(e),e}function C(e){var t,i,n=document.querySelector("style["+h+'~="'+e.id+'"]');if(n){if(c)return u;n.parentNode.removeChild(n)}if(d){var r=l++;n=s||(s=g()),t=b.bind(null,n,r,!1),i=b.bind(null,n,r,!0)}else n=g(),t=O.bind(null,n),i=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else i()}}var v,y=(v=[],function(e,t){return v[e]=t,v.filter(Boolean).join("\n")});function b(e,t,i,n){var r=i?"":n.css;if(e.styleSheet)e.styleSheet.cssText=y(t,r);else{var a=document.createTextNode(r),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function O(e,t){var i=t.css,n=t.media,r=t.sourceMap;if(n&&e.setAttribute("media",n),f.ssrId&&e.setAttribute(h,t.id),r&&(i+="\n/*# sourceURL="+r.sources[0]+" */",i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}}]);
//# sourceMappingURL=files_trashbin.js.map \ No newline at end of file
diff --git a/apps/files_trashbin/js/files_trashbin.js.map b/apps/files_trashbin/js/files_trashbin.js.map
index 8ab7cb7680b..1def7411fb0 100644
--- a/apps/files_trashbin/js/files_trashbin.js.map
+++ b/apps/files_trashbin/js/files_trashbin.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./apps/files_trashbin/src/files_trashbin.js","webpack:///./apps/files_trashbin/src/app.js","webpack:///./apps/files_trashbin/src/filelist.js","webpack:///./apps/files_trashbin/src/trash.scss?cd14","webpack:///./apps/files_trashbin/src/trash.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","window","OCA","Trashbin","App","_initialized","client","initialize","$el","this","OC","Files","Client","host","getHost","port","getPort","root","linkToRemoteBase","getCurrentUser","uid","useHTTPS","getProtocol","urlParams","Util","History","parseUrlQuery","fileList","FileList","$","fileActions","_createFileActions","detailsViewEnabled","scrollTo","scrollto","config","getFilesConfig","multiSelectMenu","displayName","iconClass","shown","FileActions","register","PERMISSION_READ","filename","context","dir","getCurrentDirectory","changeDirectory","joinPaths","setDefault","registerAction","type","TYPE_INLINE","mime","permissions","actionHandler","tr","findFileEl","showFileBusyState","move","then","_removeCallback","Notification","show","render","actionSpec","isDefault","$actionLink","_makeActionLink","attr","children","$file","find","append","remove","document","ready","one","DELETED_REGEXP","RegExp","FILENAME_PROP","DELETION_TIME_PROP","TRASHBIN_ORIGINAL_LOCATION","getDeletedFileName","basename","match","exec","length","options","_","extend","id","appName","addFileInfoParser","response","data","props","propStat","properties","path","mtime","parseInt","hasPreview","extraData","result","apply","arguments","click","_onClickRestoreSelected","setSort","breadcrumb","_makeCrumbs","parts","BreadCrumb","Plugins","attach","getDirectoryPermissions","PERMISSION_DELETE","_setCurrentDir","targetDir","baseDir","setPageTitle","_createRow","getAjaxUrl","action","params","q","buildQueryString","filePath","setupUploadEvents","linkTo","encodeURIComponent","replace","elementToFile","fileInfo","size","updateEmptyContent","exists","$fileList","toggleClass","files","updateSummary","fileSummary","update","event","preventDefault","self","pluck","getSelectedFiles","fileMultiSelectMenu","toggleLoading","restorePromises","map","file","Promise","all","_onClickDeleteSelected","allFiles","is","hideMask","setFiles","deletePromises","_onClickFile","parent","generatePreviewUrl","urlSpec","generateUrl","param","getDownloadUrl","updateStorageStatistics","isSelectedDeletable","_getWebdavProperties","concat","filesClient","getPropfindProperties","reload","_selectedFiles","_selectionSummary","clear","prop","showMask","_reloadCall","abort","getFolderContents","includeParent","callBack","reloadCallback","status","content","locals","push","useSourceMap","list","toString","item","cssMapping","btoa","sourceMapping","sourceMap","base64","unescape","JSON","stringify","sourceURLs","sources","source","sourceRoot","join","cssWithMappingToString","mediaQuery","alreadyImportedModules","_i","memo","stylesInDom","isOldIE","Boolean","atob","getTarget","target","styleTarget","querySelector","HTMLIFrameElement","contentDocument","head","e","listToStyles","styles","newStyles","base","part","css","media","addStylesToDom","domStyle","j","refs","addStyle","insertStyleElement","style","createElement","attributes","nonce","keys","forEach","setAttribute","insert","Error","appendChild","textStore","replaceText","index","replacement","filter","applyToSingletonTag","obj","styleSheet","cssText","cssNode","createTextNode","childNodes","removeChild","insertBefore","applyToTag","firstChild","singleton","singletonCounter","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,E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GA,EAAIsC,EAAUhK,MAAMzB,OAAQmJ,IAC1CsC,EAAUhK,MAAM0H,YAGXrB,EAAY2D,EAAUrL","file":"files_trashbin.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 = \"/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import './app'\nimport './filelist'\nimport './trash.scss'\n\nwindow.OCA.Trashbin = OCA.Trashbin\n","/*\n * Copyright (c) 2014\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/**\n * @namespace OCA.Trashbin\n */\nOCA.Trashbin = {};\n/**\n * @namespace OCA.Trashbin.App\n */\nOCA.Trashbin.App = {\n\t_initialized: false,\n\t/** @type {OC.Files.Client} */\n\tclient: null,\n\n\tinitialize: function ($el) {\n\t\tif (this._initialized) {\n\t\t\treturn;\n\t\t}\n\t\tthis._initialized = true;\n\n\t\tthis.client = new OC.Files.Client({\n\t\t\thost: OC.getHost(),\n\t\t\tport: OC.getPort(),\n\t\t\troot: OC.linkToRemoteBase('dav') + '/trashbin/' + OC.getCurrentUser().uid,\n\t\t\tuseHTTPS: OC.getProtocol() === 'https'\n\t\t});\n\t\tvar urlParams = OC.Util.History.parseUrlQuery();\n\t\tthis.fileList = new OCA.Trashbin.FileList(\n\t\t\t$('#app-content-trashbin'), {\n\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\tdetailsViewEnabled: false,\n\t\t\t\tscrollTo: urlParams.scrollto,\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\tmultiSelectMenu: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'restore',\n\t\t\t\t\t\tdisplayName: t('files_trashbin', 'Restore'),\n\t\t\t\t\t\ticonClass: 'icon-history',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'delete',\n\t\t\t\t\t\tdisplayName: t('files_trashbin', 'Delete permanently'),\n\t\t\t\t\t\ticonClass: 'icon-delete',\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\tclient: this.client,\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true\n\t\t\t}\n\t\t);\n\t},\n\n\t_createFileActions: function () {\n\t\tvar client = this.client;\n\t\tvar fileActions = new OCA.Files.FileActions();\n\t\tfileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename, context) {\n\t\t\tvar dir = context.fileList.getCurrentDirectory();\n\t\t\tcontext.fileList.changeDirectory(OC.joinPaths(dir, filename));\n\t\t});\n\n\t\tfileActions.setDefault('dir', 'Open');\n\n\t\tfileActions.registerAction({\n\t\t\tname: 'Restore',\n\t\t\tdisplayName: t('files_trashbin', 'Restore'),\n\t\t\ttype: OCA.Files.FileActions.TYPE_INLINE,\n\t\t\tmime: 'all',\n\t\t\tpermissions: OC.PERMISSION_READ,\n\t\t\ticonClass: 'icon-history',\n\t\t\tactionHandler: function (filename, context) {\n\t\t\t\tvar fileList = context.fileList;\n\t\t\t\tvar tr = fileList.findFileEl(filename);\n\t\t\t\tfileList.showFileBusyState(tr, true);\n\t\t\t\tvar dir = context.fileList.getCurrentDirectory();\n\t\t\t\tclient.move(OC.joinPaths('trash', dir, filename), OC.joinPaths('restore', filename), true)\n\t\t\t\t\t.then(\n\t\t\t\t\t\tfileList._removeCallback.bind(fileList, [filename]),\n\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\tfileList.showFileBusyState(tr, false);\n\t\t\t\t\t\t\tOC.Notification.show(t('files_trashbin', 'Error while restoring file from trashbin'));\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t}\n\t\t});\n\n\t\tfileActions.registerAction({\n\t\t\tname: 'Delete',\n\t\t\tdisplayName: t('files_trashbin', 'Delete permanently'),\n\t\t\tmime: 'all',\n\t\t\tpermissions: OC.PERMISSION_READ,\n\t\t\ticonClass: 'icon-delete',\n\t\t\trender: function (actionSpec, isDefault, context) {\n\t\t\t\tvar $actionLink = fileActions._makeActionLink(actionSpec, context);\n\t\t\t\t$actionLink.attr('original-title', t('files_trashbin', 'Delete permanently'));\n\t\t\t\t$actionLink.children('img').attr('alt', t('files_trashbin', 'Delete permanently'));\n\t\t\t\tcontext.$file.find('td:last').append($actionLink);\n\t\t\t\treturn $actionLink;\n\t\t\t},\n\t\t\tactionHandler: function (filename, context) {\n\t\t\t\tvar fileList = context.fileList;\n\t\t\t\t$('.tipsy').remove();\n\t\t\t\tvar tr = fileList.findFileEl(filename);\n\t\t\t\tfileList.showFileBusyState(tr, true);\n\t\t\t\tvar dir = context.fileList.getCurrentDirectory();\n\t\t\t\tclient.remove(OC.joinPaths('trash', dir, filename))\n\t\t\t\t\t.then(\n\t\t\t\t\t\tfileList._removeCallback.bind(fileList, [filename]),\n\t\t\t\t\t\tfunction () {\n\t\t\t\t\t\t\tfileList.showFileBusyState(tr, false);\n\t\t\t\t\t\t\tOC.Notification.show(t('files_trashbin', 'Error while removing file from trashbin'));\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t}\n\t\t});\n\t\treturn fileActions;\n\t}\n};\n\n$(document).ready(function () {\n\t$('#app-content-trashbin').one('show', function () {\n\t\tvar App = OCA.Trashbin.App;\n\t\tApp.initialize($('#app-content-trashbin'));\n\t\t// force breadcrumb init\n\t\t// App.fileList.changeDirectory(App.fileList.getCurrentDirectory(), false, true);\n\t});\n});\n\n","/*\n * Copyright (c) 2014\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(function() {\n\tvar DELETED_REGEXP = new RegExp(/^(.+)\\.d[0-9]+$/);\n\tvar FILENAME_PROP = '{http://nextcloud.org/ns}trashbin-filename';\n\tvar DELETION_TIME_PROP = '{http://nextcloud.org/ns}trashbin-deletion-time';\n\tvar TRASHBIN_ORIGINAL_LOCATION = '{http://nextcloud.org/ns}trashbin-original-location';\n\n\t/**\n\t * Convert a file name in the format filename.d12345 to the real file name.\n\t * This will use basename.\n\t * The name will not be changed if it has no \".d12345\" suffix.\n\t * @param {String} name file name\n\t * @return {String} converted file name\n\t */\n\tfunction getDeletedFileName(name) {\n\t\tname = OC.basename(name);\n\t\tvar match = DELETED_REGEXP.exec(name);\n\t\tif (match && match.length > 1) {\n\t\t\tname = match[1];\n\t\t}\n\t\treturn name;\n\t}\n\n\t/**\n\t * @class OCA.Trashbin.FileList\n\t * @augments OCA.Files.FileList\n\t * @classdesc List of deleted files\n\t *\n\t * @param $el container element with existing markup for the #controls\n\t * and a table\n\t * @param [options] map of options\n\t */\n\tvar FileList = function($el, options) {\n\t\tthis.client = options.client;\n\t\tthis.initialize($el, options);\n\t};\n\tFileList.prototype = _.extend({}, OCA.Files.FileList.prototype,\n\t\t/** @lends OCA.Trashbin.FileList.prototype */ {\n\t\tid: 'trashbin',\n\t\tappName: t('files_trashbin', 'Deleted files'),\n\t\t/** @type {OC.Files.Client} */\n\t\tclient: null,\n\n\t\t/**\n\t\t * @private\n\t\t */\n\t\tinitialize: function() {\n\t\t\tthis.client.addFileInfoParser(function(response, data) {\n\t\t\t\tvar props = response.propStat[0].properties;\n\t\t\t\tvar path = props[TRASHBIN_ORIGINAL_LOCATION];\n\t\t\t\treturn {\n\t\t\t\t\tdisplayName: props[FILENAME_PROP],\n\t\t\t\t\tmtime: parseInt(props[DELETION_TIME_PROP], 10) * 1000,\n\t\t\t\t\thasPreview: true,\n\t\t\t\t\tpath: path,\n\t\t\t\t\textraData: path\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tvar result = OCA.Files.FileList.prototype.initialize.apply(this, arguments);\n\t\t\tthis.$el.find('.undelete').click('click', _.bind(this._onClickRestoreSelected, this));\n\n\t\t\tthis.setSort('mtime', 'desc');\n\t\t\t/**\n\t\t\t * Override crumb making to add \"Deleted Files\" entry\n\t\t\t * and convert files with \".d\" extensions to a more\n\t\t\t * user friendly name.\n\t\t\t */\n\t\t\tthis.breadcrumb._makeCrumbs = function() {\n\t\t\t\tvar parts = OCA.Files.BreadCrumb.prototype._makeCrumbs.apply(this, arguments);\n\t\t\t\tfor (var i = 1; i < parts.length; i++) {\n\t\t\t\t\tparts[i].name = getDeletedFileName(parts[i].name);\n\t\t\t\t}\n\t\t\t\treturn parts;\n\t\t\t};\n\n\t\t\tOC.Plugins.attach('OCA.Trashbin.FileList', this);\n\t\t\treturn result;\n\t\t},\n\n\t\t/**\n\t\t * Override to only return read permissions\n\t\t */\n\t\tgetDirectoryPermissions: function() {\n\t\t\treturn OC.PERMISSION_READ | OC.PERMISSION_DELETE;\n\t\t},\n\n\t\t_setCurrentDir: function(targetDir) {\n\t\t\tOCA.Files.FileList.prototype._setCurrentDir.apply(this, arguments);\n\n\t\t\tvar baseDir = OC.basename(targetDir);\n\t\t\tif (baseDir !== '') {\n\t\t\t\tthis.setPageTitle(getDeletedFileName(baseDir));\n\t\t\t}\n\t\t},\n\n\t\t_createRow: function() {\n\t\t\t// FIXME: MEGAHACK until we find a better solution\n\t\t\tvar tr = OCA.Files.FileList.prototype._createRow.apply(this, arguments);\n\t\t\ttr.find('td.filesize').remove();\n\t\t\treturn tr;\n\t\t},\n\n\t\tgetAjaxUrl: function(action, params) {\n\t\t\tvar q = '';\n\t\t\tif (params) {\n\t\t\t\tq = '?' + OC.buildQueryString(params);\n\t\t\t}\n\t\t\treturn OC.filePath('files_trashbin', 'ajax', action + '.php') + q;\n\t\t},\n\n\t\tsetupUploadEvents: function() {\n\t\t\t// override and do nothing\n\t\t},\n\n\t\tlinkTo: function(dir){\n\t\t\treturn OC.linkTo('files', 'index.php')+\"?view=trashbin&dir=\"+ encodeURIComponent(dir).replace(/%2F/g, '/');\n\t\t},\n\n\t\telementToFile: function($el) {\n\t\t\tvar fileInfo = OCA.Files.FileList.prototype.elementToFile($el);\n\t\t\tif (this.getCurrentDirectory() === '/') {\n\t\t\t\tfileInfo.displayName = getDeletedFileName(fileInfo.name);\n\t\t\t}\n\t\t\t// no size available\n\t\t\tdelete fileInfo.size;\n\t\t\treturn fileInfo;\n\t\t},\n\n\t\tupdateEmptyContent: function(){\n\t\t\tvar exists = this.$fileList.find('tr:first').exists();\n\t\t\tthis.$el.find('#emptycontent').toggleClass('hidden', exists);\n\t\t\tthis.$el.find('#filestable th').toggleClass('hidden', !exists);\n\t\t},\n\n\t\t_removeCallback: function(files) {\n\t\t\tvar $el;\n\t\t\tfor (var i = 0; i < files.length; i++) {\n\t\t\t\t$el = this.remove(OC.basename(files[i]), {updateSummary: false});\n\t\t\t\tthis.fileSummary.remove({type: $el.attr('data-type'), size: $el.attr('data-size')});\n\t\t\t}\n\t\t\tthis.fileSummary.update();\n\t\t\tthis.updateEmptyContent();\n\t\t},\n\n\t\t_onClickRestoreSelected: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tvar self = this;\n\t\t\tvar files = _.pluck(this.getSelectedFiles(), 'name');\n\t\t\tfor (var i = 0; i < files.length; i++) {\n\t\t\t\tvar tr = this.findFileEl(files[i]);\n\t\t\t\tthis.showFileBusyState(tr, true);\n\t\t\t}\n\n\t\t\tthis.fileMultiSelectMenu.toggleLoading('restore', true);\n\t\t\tvar restorePromises = files.map(function(file) {\n\t\t\t\treturn self.client.move(OC.joinPaths('trash', self.getCurrentDirectory(), file), OC.joinPaths('restore', file), true)\n\t\t\t\t\t.then(\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\tself._removeCallback([file]);\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t});\n\t\t\treturn Promise.all(restorePromises).then(\n\t\t\t\tfunction() {\n\t\t\t\t\tself.fileMultiSelectMenu.toggleLoading('restore', false);\n\t\t\t\t},\n\t\t\t\tfunction() {\n\t\t\t\t\tOC.Notification.show(t('files_trashbin', 'Error while restoring files from trashbin'));\n\t\t\t\t}\n\t\t\t);\n\t\t},\n\n\t\t_onClickDeleteSelected: function(event) {\n\t\t\tevent.preventDefault();\n\t\t\tvar self = this;\n\t\t\tvar allFiles = this.$el.find('.select-all').is(':checked');\n\t\t\tvar files = _.pluck(this.getSelectedFiles(), 'name');\n\t\t\tfor (var i = 0; i < files.length; i++) {\n\t\t\t\tvar tr = this.findFileEl(files[i]);\n\t\t\t\tthis.showFileBusyState(tr, true);\n\t\t\t}\n\n\t\t\tif (allFiles) {\n\t\t\t\treturn this.client.remove(OC.joinPaths('trash', this.getCurrentDirectory()))\n\t\t\t\t\t.then(\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\tself.hideMask();\n\t\t\t\t\t\t\tself.setFiles([]);\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\tOC.Notification.show(t('files_trashbin', 'Error while emptying trashbin'));\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tthis.fileMultiSelectMenu.toggleLoading('delete', true);\n\t\t\t\tvar deletePromises = files.map(function(file) {\n\t\t\t\t\treturn self.client.remove(OC.joinPaths('trash', self.getCurrentDirectory(), file))\n\t\t\t\t\t\t.then(\n\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\tself._removeCallback([file]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t});\n\t\t\t\treturn Promise.all(deletePromises).then(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tself.fileMultiSelectMenu.toggleLoading('delete', false);\n\t\t\t\t\t},\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tOC.Notification.show(t('files_trashbin', 'Error while removing files from trashbin'));\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t}\n\t\t},\n\n\t\t_onClickFile: function(event) {\n\t\t\tvar mime = $(this).parent().parent().data('mime');\n\t\t\tif (mime !== 'httpd/unix-directory') {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t\treturn OCA.Files.FileList.prototype._onClickFile.apply(this, arguments);\n\t\t},\n\n\t\tgeneratePreviewUrl: function(urlSpec) {\n\t\t\treturn OC.generateUrl('/apps/files_trashbin/preview?') + $.param(urlSpec);\n\t\t},\n\n\t\tgetDownloadUrl: function() {\n\t\t\t// no downloads\n\t\t\treturn '#';\n\t\t},\n\n\t\tupdateStorageStatistics: function() {\n\t\t\t// no op because the trashbin doesn't have\n\t\t\t// storage info like free space / used space\n\t\t},\n\n\t\tisSelectedDeletable: function() {\n\t\t\treturn true;\n\t\t},\n\n\t\t/**\n\t\t * Returns list of webdav properties to request\n\t\t */\n\t\t_getWebdavProperties: function() {\n\t\t\treturn [FILENAME_PROP, DELETION_TIME_PROP, TRASHBIN_ORIGINAL_LOCATION].concat(this.filesClient.getPropfindProperties());\n\t\t},\n\n\t\t/**\n\t\t * Reloads the file list using ajax call\n\t\t *\n\t\t * @return ajax call object\n\t\t */\n\t\treload: function() {\n\t\t\tthis._selectedFiles = {};\n\t\t\tthis._selectionSummary.clear();\n\t\t\tthis.$el.find('.select-all').prop('checked', false);\n\t\t\tthis.showMask();\n\t\t\tif (this._reloadCall) {\n\t\t\t\tthis._reloadCall.abort();\n\t\t\t}\n\t\t\tthis._reloadCall = this.client.getFolderContents(\n\t\t\t\t'trash/' + this.getCurrentDirectory(), {\n\t\t\t\t\tincludeParent: false,\n\t\t\t\t\tproperties: this._getWebdavProperties()\n\t\t\t\t}\n\t\t\t);\n\t\t\tvar callBack = this.reloadCallback.bind(this);\n\t\t\treturn this._reloadCall.then(callBack, callBack);\n\t\t},\n\t\treloadCallback: function(status, result) {\n\t\t\tdelete this._reloadCall;\n\t\t\tthis.hideMask();\n\n\t\t\tif (status === 401) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Firewall Blocked request?\n\t\t\tif (status === 403) {\n\t\t\t\t// Go home\n\t\t\t\tthis.changeDirectory('/');\n\t\t\t\tOC.Notification.show(t('files', 'This operation is forbidden'));\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Did share service die or something else fail?\n\t\t\tif (status === 500) {\n\t\t\t\t// Go home\n\t\t\t\tthis.changeDirectory('/');\n\t\t\t\tOC.Notification.show(t('files', 'This directory is unavailable, please check the logs or contact the administrator'));\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (status === 404) {\n\t\t\t\t// go back home\n\t\t\t\tthis.changeDirectory('/');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// aborted ?\n\t\t\tif (status === 0){\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tthis.setFiles(result);\n\t\t\treturn true;\n\t\t},\n\n\t});\n\n\tOCA.Trashbin.FileList = FileList;\n})();\n\n","var content = require(\"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./trash.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, \"#app-content-trashbin tbody tr[data-type=\\\"file\\\"] td a.name,#app-content-trashbin tbody tr[data-type=\\\"file\\\"] td a.name span.nametext,#app-content-trashbin tbody tr[data-type=\\\"file\\\"] td a.name span.nametext span{cursor:default}#app-content-trashbin .summary :last-child{padding:0}#app-content-trashbin #filestable .summary .filesize{display:none}\\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:///./apps/files_trashbin/src/files_trashbin.js","webpack:///./apps/files_trashbin/src/app.js","webpack:///./apps/files_trashbin/src/filelist.js","webpack:///./apps/files_trashbin/src/trash.scss?7371","webpack:///./apps/files_trashbin/src/trash.scss","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/vue-style-loader/lib/listToStyles.js","webpack:///./node_modules/vue-style-loader/lib/addStylesClient.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","window","OCA","Trashbin","App","_initialized","client","initialize","$el","this","OC","Files","Client","host","getHost","port","getPort","root","linkToRemoteBase","getCurrentUser","uid","useHTTPS","getProtocol","urlParams","Util","History","parseUrlQuery","fileList","FileList","$","fileActions","_createFileActions","detailsViewEnabled","scrollTo","scrollto","config","getFilesConfig","multiSelectMenu","displayName","iconClass","shown","FileActions","register","PERMISSION_READ","filename","context","dir","getCurrentDirectory","changeDirectory","joinPaths","setDefault","registerAction","type","TYPE_INLINE","mime","permissions","actionHandler","tr","findFileEl","showFileBusyState","move","then","_removeCallback","Notification","show","render","actionSpec","isDefault","$actionLink","_makeActionLink","attr","children","$file","find","append","remove","document","ready","one","DELETED_REGEXP","RegExp","FILENAME_PROP","DELETION_TIME_PROP","TRASHBIN_ORIGINAL_LOCATION","getDeletedFileName","basename","match","exec","length","options","_","extend","id","appName","addFileInfoParser","response","data","props","propStat","properties","path","mtime","parseInt","hasPreview","extraData","result","apply","arguments","click","_onClickRestoreSelected","setSort","breadcrumb","_makeCrumbs","parts","BreadCrumb","Plugins","attach","getDirectoryPermissions","PERMISSION_DELETE","_setCurrentDir","targetDir","baseDir","setPageTitle","_createRow","getAjaxUrl","action","params","q","buildQueryString","filePath","setupUploadEvents","linkTo","encodeURIComponent","replace","elementToFile","fileInfo","size","updateEmptyContent","exists","$fileList","toggleClass","files","updateSummary","fileSummary","update","event","preventDefault","self","pluck","getSelectedFiles","fileMultiSelectMenu","toggleLoading","restorePromises","map","file","Promise","all","_onClickDeleteSelected","allFiles","is","hideMask","setFiles","deletePromises","_onClickFile","parent","generatePreviewUrl","urlSpec","generateUrl","param","getDownloadUrl","updateStorageStatistics","isSelectedDeletable","_getWebdavProperties","concat","filesClient","getPropfindProperties","reload","_selectedFiles","_selectionSummary","clear","prop","showMask","_reloadCall","abort","getFolderContents","includeParent","callBack","reloadCallback","status","content","locals","add","default","push","useSourceMap","list","toString","item","cssMapping","btoa","sourceMapping","sourceMap","base64","unescape","JSON","stringify","sourceURLs","sources","source","sourceRoot","join","cssWithMappingToString","mediaQuery","alreadyImportedModules","_i","listToStyles","parentId","styles","newStyles","part","css","media","hasDocument","DEBUG","Error","stylesInDom","head","getElementsByTagName","singletonElement","singletonCounter","isProduction","noop","ssrIdKey","isOldIE","navigator","test","userAgent","toLowerCase","addStylesClient","_isProduction","_options","addStylesToDom","newList","mayRemove","domStyle","refs","j","addStyle","createStyleElement","styleElement","createElement","appendChild","obj","querySelector","parentNode","removeChild","styleIndex","applyToSingletonTag","applyToTag","newObj","textStore","replaceText","index","replacement","filter","Boolean","styleSheet","cssText","cssNode","createTextNode","childNodes","insertBefore","setAttribute","ssrId","firstChild"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB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tL,OACbiK,EAAasB,aAAaH,EAASE,EAAWR,IAE9Cb,EAAaE,YAAYiB,IAK/B,SAASV,EAAYT,EAAcG,GACjC,IAAIhC,EAAMgC,EAAIhC,IACVC,EAAQ+B,EAAI/B,MACZpB,EAAYmD,EAAInD,UAiBpB,GAfIoB,GACF4B,EAAauB,aAAa,QAASnD,GAEjCpI,EAAQwL,OACVxB,EAAauB,aAAaxC,EAAUoB,EAAIhK,IAGtC6G,IAGFmB,GAAO,mBAAqBnB,EAAUM,QAAQ,GAAK,MAEnDa,GAAO,uDAAyDrB,KAAKI,SAASvE,mBAAmBwE,KAAKC,UAAUJ,MAAgB,OAG9HgD,EAAaiB,WACfjB,EAAaiB,WAAWC,QAAU/C,MAC7B,CACL,KAAO6B,EAAayB,YAClBzB,EAAaM,YAAYN,EAAayB,YAExCzB,EAAaE,YAAY/K,SAASiM,eAAejD","file":"files_trashbin.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 = \"/js/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import './app'\nimport './filelist'\nimport './trash.scss'\n\nwindow.OCA.Trashbin = OCA.Trashbin\n","/**\n * Copyright (c) 2014\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/**\n * @namespace OCA.Trashbin\n */\nOCA.Trashbin = {}\n/**\n * @namespace OCA.Trashbin.App\n */\nOCA.Trashbin.App = {\n\t_initialized: false,\n\t/** @type {OC.Files.Client} */\n\tclient: null,\n\n\tinitialize: function($el) {\n\t\tif (this._initialized) {\n\t\t\treturn\n\t\t}\n\t\tthis._initialized = true\n\n\t\tthis.client = new OC.Files.Client({\n\t\t\thost: OC.getHost(),\n\t\t\tport: OC.getPort(),\n\t\t\troot: OC.linkToRemoteBase('dav') + '/trashbin/' + OC.getCurrentUser().uid,\n\t\t\tuseHTTPS: OC.getProtocol() === 'https'\n\t\t})\n\t\tvar urlParams = OC.Util.History.parseUrlQuery()\n\t\tthis.fileList = new OCA.Trashbin.FileList(\n\t\t\t$('#app-content-trashbin'), {\n\t\t\t\tfileActions: this._createFileActions(),\n\t\t\t\tdetailsViewEnabled: false,\n\t\t\t\tscrollTo: urlParams.scrollto,\n\t\t\t\tconfig: OCA.Files.App.getFilesConfig(),\n\t\t\t\tmultiSelectMenu: [\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'restore',\n\t\t\t\t\t\tdisplayName: t('files_trashbin', 'Restore'),\n\t\t\t\t\t\ticonClass: 'icon-history'\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname: 'delete',\n\t\t\t\t\t\tdisplayName: t('files_trashbin', 'Delete permanently'),\n\t\t\t\t\t\ticonClass: 'icon-delete'\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\tclient: this.client,\n\t\t\t\t// The file list is created when a \"show\" event is handled, so\n\t\t\t\t// it should be marked as \"shown\" like it would have been done\n\t\t\t\t// if handling the event with the file list already created.\n\t\t\t\tshown: true\n\t\t\t}\n\t\t)\n\t},\n\n\t_createFileActions: function() {\n\t\tvar client = this.client\n\t\tvar fileActions = new OCA.Files.FileActions()\n\t\tfileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function(filename, context) {\n\t\t\tvar dir = context.fileList.getCurrentDirectory()\n\t\t\tcontext.fileList.changeDirectory(OC.joinPaths(dir, filename))\n\t\t})\n\n\t\tfileActions.setDefault('dir', 'Open')\n\n\t\tfileActions.registerAction({\n\t\t\tname: 'Restore',\n\t\t\tdisplayName: t('files_trashbin', 'Restore'),\n\t\t\ttype: OCA.Files.FileActions.TYPE_INLINE,\n\t\t\tmime: 'all',\n\t\t\tpermissions: OC.PERMISSION_READ,\n\t\t\ticonClass: 'icon-history',\n\t\t\tactionHandler: function(filename, context) {\n\t\t\t\tvar fileList = context.fileList\n\t\t\t\tvar tr = fileList.findFileEl(filename)\n\t\t\t\tfileList.showFileBusyState(tr, true)\n\t\t\t\tvar dir = context.fileList.getCurrentDirectory()\n\t\t\t\tclient.move(OC.joinPaths('trash', dir, filename), OC.joinPaths('restore', filename), true)\n\t\t\t\t\t.then(\n\t\t\t\t\t\tfileList._removeCallback.bind(fileList, [filename]),\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\tfileList.showFileBusyState(tr, false)\n\t\t\t\t\t\t\tOC.Notification.show(t('files_trashbin', 'Error while restoring file from trashbin'))\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t}\n\t\t})\n\n\t\tfileActions.registerAction({\n\t\t\tname: 'Delete',\n\t\t\tdisplayName: t('files_trashbin', 'Delete permanently'),\n\t\t\tmime: 'all',\n\t\t\tpermissions: OC.PERMISSION_READ,\n\t\t\ticonClass: 'icon-delete',\n\t\t\trender: function(actionSpec, isDefault, context) {\n\t\t\t\tvar $actionLink = fileActions._makeActionLink(actionSpec, context)\n\t\t\t\t$actionLink.attr('original-title', t('files_trashbin', 'Delete permanently'))\n\t\t\t\t$actionLink.children('img').attr('alt', t('files_trashbin', 'Delete permanently'))\n\t\t\t\tcontext.$file.find('td:last').append($actionLink)\n\t\t\t\treturn $actionLink\n\t\t\t},\n\t\t\tactionHandler: function(filename, context) {\n\t\t\t\tvar fileList = context.fileList\n\t\t\t\t$('.tipsy').remove()\n\t\t\t\tvar tr = fileList.findFileEl(filename)\n\t\t\t\tfileList.showFileBusyState(tr, true)\n\t\t\t\tvar dir = context.fileList.getCurrentDirectory()\n\t\t\t\tclient.remove(OC.joinPaths('trash', dir, filename))\n\t\t\t\t\t.then(\n\t\t\t\t\t\tfileList._removeCallback.bind(fileList, [filename]),\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\tfileList.showFileBusyState(tr, false)\n\t\t\t\t\t\t\tOC.Notification.show(t('files_trashbin', 'Error while removing file from trashbin'))\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t}\n\t\t})\n\t\treturn fileActions\n\t}\n}\n\n$(document).ready(function() {\n\t$('#app-content-trashbin').one('show', function() {\n\t\tvar App = OCA.Trashbin.App\n\t\tApp.initialize($('#app-content-trashbin'))\n\t\t// force breadcrumb init\n\t\t// App.fileList.changeDirectory(App.fileList.getCurrentDirectory(), false, true);\n\t})\n})\n","/* eslint-disable */\n/*\n * Copyright (c) 2014\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(function() {\n\tvar DELETED_REGEXP = new RegExp(/^(.+)\\.d[0-9]+$/)\n\tvar FILENAME_PROP = '{http://nextcloud.org/ns}trashbin-filename'\n\tvar DELETION_TIME_PROP = '{http://nextcloud.org/ns}trashbin-deletion-time'\n\tvar TRASHBIN_ORIGINAL_LOCATION = '{http://nextcloud.org/ns}trashbin-original-location'\n\n\t/**\n\t * Convert a file name in the format filename.d12345 to the real file name.\n\t * This will use basename.\n\t * The name will not be changed if it has no \".d12345\" suffix.\n\t * @param {String} name file name\n\t * @returns {String} converted file name\n\t */\n\tfunction getDeletedFileName(name) {\n\t\tname = OC.basename(name)\n\t\tvar match = DELETED_REGEXP.exec(name)\n\t\tif (match && match.length > 1) {\n\t\t\tname = match[1]\n\t\t}\n\t\treturn name\n\t}\n\n\t/**\n\t * @class OCA.Trashbin.FileList\n\t * @augments OCA.Files.FileList\n\t * @classdesc List of deleted files\n\t *\n\t * @param $el container element with existing markup for the #controls\n\t * and a table\n\t * @param [options] map of options\n\t */\n\tvar FileList = function($el, options) {\n\t\tthis.client = options.client\n\t\tthis.initialize($el, options)\n\t}\n\tFileList.prototype = _.extend({}, OCA.Files.FileList.prototype,\n\t\t/** @lends OCA.Trashbin.FileList.prototype */ {\n\t\t\tid: 'trashbin',\n\t\t\tappName: t('files_trashbin', 'Deleted files'),\n\t\t\t/** @type {OC.Files.Client} */\n\t\t\tclient: null,\n\n\t\t\t/**\n\t\t * @private\n\t\t */\n\t\t\tinitialize: function() {\n\t\t\t\tthis.client.addFileInfoParser(function(response, data) {\n\t\t\t\t\tvar props = response.propStat[0].properties\n\t\t\t\t\tvar path = props[TRASHBIN_ORIGINAL_LOCATION]\n\t\t\t\t\treturn {\n\t\t\t\t\t\tdisplayName: props[FILENAME_PROP],\n\t\t\t\t\t\tmtime: parseInt(props[DELETION_TIME_PROP], 10) * 1000,\n\t\t\t\t\t\thasPreview: true,\n\t\t\t\t\t\tpath: path,\n\t\t\t\t\t\textraData: path\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t\t\tvar result = OCA.Files.FileList.prototype.initialize.apply(this, arguments)\n\t\t\t\tthis.$el.find('.undelete').click('click', _.bind(this._onClickRestoreSelected, this))\n\n\t\t\t\tthis.setSort('mtime', 'desc')\n\t\t\t\t/**\n\t\t\t * Override crumb making to add \"Deleted Files\" entry\n\t\t\t * and convert files with \".d\" extensions to a more\n\t\t\t * user friendly name.\n\t\t\t */\n\t\t\t\tthis.breadcrumb._makeCrumbs = function() {\n\t\t\t\t\tvar parts = OCA.Files.BreadCrumb.prototype._makeCrumbs.apply(this, arguments)\n\t\t\t\t\tfor (var i = 1; i < parts.length; i++) {\n\t\t\t\t\t\tparts[i].name = getDeletedFileName(parts[i].name)\n\t\t\t\t\t}\n\t\t\t\t\treturn parts\n\t\t\t\t}\n\n\t\t\t\tOC.Plugins.attach('OCA.Trashbin.FileList', this)\n\t\t\t\treturn result\n\t\t\t},\n\n\t\t\t/**\n\t\t * Override to only return read permissions\n\t\t */\n\t\t\tgetDirectoryPermissions: function() {\n\t\t\t\treturn OC.PERMISSION_READ | OC.PERMISSION_DELETE\n\t\t\t},\n\n\t\t\t_setCurrentDir: function(targetDir) {\n\t\t\t\tOCA.Files.FileList.prototype._setCurrentDir.apply(this, arguments)\n\n\t\t\t\tvar baseDir = OC.basename(targetDir)\n\t\t\t\tif (baseDir !== '') {\n\t\t\t\t\tthis.setPageTitle(getDeletedFileName(baseDir))\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_createRow: function() {\n\t\t\t// FIXME: MEGAHACK until we find a better solution\n\t\t\t\tvar tr = OCA.Files.FileList.prototype._createRow.apply(this, arguments)\n\t\t\t\ttr.find('td.filesize').remove()\n\t\t\t\treturn tr\n\t\t\t},\n\n\t\t\tgetAjaxUrl: function(action, params) {\n\t\t\t\tvar q = ''\n\t\t\t\tif (params) {\n\t\t\t\t\tq = '?' + OC.buildQueryString(params)\n\t\t\t\t}\n\t\t\t\treturn OC.filePath('files_trashbin', 'ajax', action + '.php') + q\n\t\t\t},\n\n\t\t\tsetupUploadEvents: function() {\n\t\t\t// override and do nothing\n\t\t\t},\n\n\t\t\tlinkTo: function(dir) {\n\t\t\t\treturn OC.linkTo('files', 'index.php') + '?view=trashbin&dir=' + encodeURIComponent(dir).replace(/%2F/g, '/')\n\t\t\t},\n\n\t\t\telementToFile: function($el) {\n\t\t\t\tvar fileInfo = OCA.Files.FileList.prototype.elementToFile($el)\n\t\t\t\tif (this.getCurrentDirectory() === '/') {\n\t\t\t\t\tfileInfo.displayName = getDeletedFileName(fileInfo.name)\n\t\t\t\t}\n\t\t\t\t// no size available\n\t\t\t\tdelete fileInfo.size\n\t\t\t\treturn fileInfo\n\t\t\t},\n\n\t\t\tupdateEmptyContent: function() {\n\t\t\t\tvar exists = this.$fileList.find('tr:first').exists()\n\t\t\t\tthis.$el.find('#emptycontent').toggleClass('hidden', exists)\n\t\t\t\tthis.$el.find('#filestable th').toggleClass('hidden', !exists)\n\t\t\t},\n\n\t\t\t_removeCallback: function(files) {\n\t\t\t\tvar $el\n\t\t\t\tfor (var i = 0; i < files.length; i++) {\n\t\t\t\t\t$el = this.remove(OC.basename(files[i]), { updateSummary: false })\n\t\t\t\t\tthis.fileSummary.remove({ type: $el.attr('data-type'), size: $el.attr('data-size') })\n\t\t\t\t}\n\t\t\t\tthis.fileSummary.update()\n\t\t\t\tthis.updateEmptyContent()\n\t\t\t},\n\n\t\t\t_onClickRestoreSelected: function(event) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tvar self = this\n\t\t\t\tvar files = _.pluck(this.getSelectedFiles(), 'name')\n\t\t\t\tfor (var i = 0; i < files.length; i++) {\n\t\t\t\t\tvar tr = this.findFileEl(files[i])\n\t\t\t\t\tthis.showFileBusyState(tr, true)\n\t\t\t\t}\n\n\t\t\t\tthis.fileMultiSelectMenu.toggleLoading('restore', true)\n\t\t\t\tvar restorePromises = files.map(function(file) {\n\t\t\t\t\treturn self.client.move(OC.joinPaths('trash', self.getCurrentDirectory(), file), OC.joinPaths('restore', file), true)\n\t\t\t\t\t\t.then(\n\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\tself._removeCallback([file])\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t)\n\t\t\t\t})\n\t\t\t\treturn Promise.all(restorePromises).then(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tself.fileMultiSelectMenu.toggleLoading('restore', false)\n\t\t\t\t\t},\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tOC.Notification.show(t('files_trashbin', 'Error while restoring files from trashbin'))\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t},\n\n\t\t\t_onClickDeleteSelected: function(event) {\n\t\t\t\tevent.preventDefault()\n\t\t\t\tvar self = this\n\t\t\t\tvar allFiles = this.$el.find('.select-all').is(':checked')\n\t\t\t\tvar files = _.pluck(this.getSelectedFiles(), 'name')\n\t\t\t\tfor (var i = 0; i < files.length; i++) {\n\t\t\t\t\tvar tr = this.findFileEl(files[i])\n\t\t\t\t\tthis.showFileBusyState(tr, true)\n\t\t\t\t}\n\n\t\t\t\tif (allFiles) {\n\t\t\t\t\treturn this.client.remove(OC.joinPaths('trash', this.getCurrentDirectory()))\n\t\t\t\t\t\t.then(\n\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\tself.hideMask()\n\t\t\t\t\t\t\t\tself.setFiles([])\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\tOC.Notification.show(t('files_trashbin', 'Error while emptying trashbin'))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t)\n\t\t\t\t} else {\n\t\t\t\t\tthis.fileMultiSelectMenu.toggleLoading('delete', true)\n\t\t\t\t\tvar deletePromises = files.map(function(file) {\n\t\t\t\t\t\treturn self.client.remove(OC.joinPaths('trash', self.getCurrentDirectory(), file))\n\t\t\t\t\t\t\t.then(\n\t\t\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\t\t\tself._removeCallback([file])\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t)\n\t\t\t\t\t})\n\t\t\t\t\treturn Promise.all(deletePromises).then(\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\tself.fileMultiSelectMenu.toggleLoading('delete', false)\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction() {\n\t\t\t\t\t\t\tOC.Notification.show(t('files_trashbin', 'Error while removing files from trashbin'))\n\t\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t_onClickFile: function(event) {\n\t\t\t\tvar mime = $(this).parent().parent().data('mime')\n\t\t\t\tif (mime !== 'httpd/unix-directory') {\n\t\t\t\t\tevent.preventDefault()\n\t\t\t\t}\n\t\t\t\treturn OCA.Files.FileList.prototype._onClickFile.apply(this, arguments)\n\t\t\t},\n\n\t\t\tgeneratePreviewUrl: function(urlSpec) {\n\t\t\t\treturn OC.generateUrl('/apps/files_trashbin/preview?') + $.param(urlSpec)\n\t\t\t},\n\n\t\t\tgetDownloadUrl: function() {\n\t\t\t// no downloads\n\t\t\t\treturn '#'\n\t\t\t},\n\n\t\t\tupdateStorageStatistics: function() {\n\t\t\t// no op because the trashbin doesn't have\n\t\t\t// storage info like free space / used space\n\t\t\t},\n\n\t\t\tisSelectedDeletable: function() {\n\t\t\t\treturn true\n\t\t\t},\n\n\t\t\t/**\n\t\t * Returns list of webdav properties to request\n\t\t */\n\t\t\t_getWebdavProperties: function() {\n\t\t\t\treturn [FILENAME_PROP, DELETION_TIME_PROP, TRASHBIN_ORIGINAL_LOCATION].concat(this.filesClient.getPropfindProperties())\n\t\t\t},\n\n\t\t\t/**\n\t\t * Reloads the file list using ajax call\n\t\t *\n\t\t * @returns ajax call object\n\t\t */\n\t\t\treload: function() {\n\t\t\t\tthis._selectedFiles = {}\n\t\t\t\tthis._selectionSummary.clear()\n\t\t\t\tthis.$el.find('.select-all').prop('checked', false)\n\t\t\t\tthis.showMask()\n\t\t\t\tif (this._reloadCall) {\n\t\t\t\t\tthis._reloadCall.abort()\n\t\t\t\t}\n\t\t\t\tthis._reloadCall = this.client.getFolderContents(\n\t\t\t\t\t'trash/' + this.getCurrentDirectory(), {\n\t\t\t\t\t\tincludeParent: false,\n\t\t\t\t\t\tproperties: this._getWebdavProperties()\n\t\t\t\t\t}\n\t\t\t\t)\n\t\t\t\tvar callBack = this.reloadCallback.bind(this)\n\t\t\t\treturn this._reloadCall.then(callBack, callBack)\n\t\t\t},\n\t\t\treloadCallback: function(status, result) {\n\t\t\t\tdelete this._reloadCall\n\t\t\t\tthis.hideMask()\n\n\t\t\t\tif (status === 401) {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\t// Firewall Blocked request?\n\t\t\t\tif (status === 403) {\n\t\t\t\t// Go home\n\t\t\t\t\tthis.changeDirectory('/')\n\t\t\t\t\tOC.Notification.show(t('files', 'This operation is forbidden'))\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\t// Did share service die or something else fail?\n\t\t\t\tif (status === 500) {\n\t\t\t\t// Go home\n\t\t\t\t\tthis.changeDirectory('/')\n\t\t\t\t\tOC.Notification.show(t('files', 'This directory is unavailable, please check the logs or contact the administrator'))\n\t\t\t\t\treturn false\n\t\t\t\t}\n\n\t\t\t\tif (status === 404) {\n\t\t\t\t// go back home\n\t\t\t\t\tthis.changeDirectory('/')\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t\t// aborted ?\n\t\t\t\tif (status === 0) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\n\t\t\t\tthis.setFiles(result)\n\t\t\t\treturn true\n\t\t\t}\n\n\t\t})\n\n\tOCA.Trashbin.FileList = FileList\n})()\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js!./trash.scss\");\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"e1044e6c\", content, true, {});","exports = module.exports = require(\"../../../node_modules/css-loader/dist/runtime/api.js\")(false);\n// Module\nexports.push([module.id, \"#app-content-trashbin tbody tr[data-type=\\\"file\\\"] td a.name,#app-content-trashbin tbody tr[data-type=\\\"file\\\"] td a.name span.nametext,#app-content-trashbin tbody tr[data-type=\\\"file\\\"] td a.name span.nametext span{cursor:default}#app-content-trashbin .summary :last-child{padding:0}#app-content-trashbin #filestable .summary .filesize{display:none}\\n\", \"\"]);\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\n// eslint-disable-next-line func-names\nmodule.exports = function (useSourceMap) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = cssWithMappingToString(item, useSourceMap);\n\n if (item[2]) {\n return \"@media \".concat(item[2], \"{\").concat(content, \"}\");\n }\n\n return content;\n }).join('');\n }; // import a list of modules into the list\n // eslint-disable-next-line func-names\n\n\n list.i = function (modules, mediaQuery) {\n if (typeof modules === 'string') {\n // eslint-disable-next-line no-param-reassign\n modules = [[null, modules, '']];\n }\n\n var alreadyImportedModules = {};\n\n for (var i = 0; i < this.length; i++) {\n // eslint-disable-next-line prefer-destructuring\n var id = this[i][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n\n for (var _i = 0; _i < modules.length; _i++) {\n var item = modules[_i]; // skip already imported module\n // this implementation is not 100% perfect for weird media query combinations\n // when a module is imported multiple times with different media queries.\n // I hope this will never occur (Hey this way we have smaller bundles)\n\n if (item[0] == null || !alreadyImportedModules[item[0]]) {\n if (mediaQuery && !item[2]) {\n item[2] = mediaQuery;\n } else if (mediaQuery) {\n item[2] = \"(\".concat(item[2], \") and (\").concat(mediaQuery, \")\");\n }\n\n list.push(item);\n }\n }\n };\n\n return list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring\n\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (useSourceMap && typeof btoa === 'function') {\n var sourceMapping = toComment(cssMapping);\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot).concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n }\n\n return [content].join('\\n');\n} // Adapted from convert-source-map (MIT)\n\n\nfunction toComment(sourceMap) {\n // eslint-disable-next-line no-undef\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n return \"/*# \".concat(data, \" */\");\n}","/**\n * Translates the list format produced by css-loader into something\n * easier to manipulate.\n */\nexport default function listToStyles (parentId, list) {\n var styles = []\n var newStyles = {}\n for (var i = 0; i < list.length; i++) {\n var item = list[i]\n var id = item[0]\n var css = item[1]\n var media = item[2]\n var sourceMap = item[3]\n var part = {\n id: parentId + ':' + i,\n css: css,\n media: media,\n sourceMap: sourceMap\n }\n if (!newStyles[id]) {\n styles.push(newStyles[id] = { id: id, parts: [part] })\n } else {\n newStyles[id].parts.push(part)\n }\n }\n return styles\n}\n","/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n Modified by Evan You @yyx990803\n*/\n\nimport listToStyles from './listToStyles'\n\nvar hasDocument = typeof document !== 'undefined'\n\nif (typeof DEBUG !== 'undefined' && DEBUG) {\n if (!hasDocument) {\n throw new Error(\n 'vue-style-loader cannot be used in a non-browser environment. ' +\n \"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\"\n ) }\n}\n\n/*\ntype StyleObject = {\n id: number;\n parts: Array<StyleObjectPart>\n}\n\ntype StyleObjectPart = {\n css: string;\n media: string;\n sourceMap: ?string\n}\n*/\n\nvar stylesInDom = {/*\n [id: number]: {\n id: number,\n refs: number,\n parts: Array<(obj?: StyleObjectPart) => void>\n }\n*/}\n\nvar head = hasDocument && (document.head || document.getElementsByTagName('head')[0])\nvar singletonElement = null\nvar singletonCounter = 0\nvar isProduction = false\nvar noop = function () {}\nvar options = null\nvar ssrIdKey = 'data-vue-ssr-id'\n\n// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\n// tags it will allow on a page\nvar isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase())\n\nexport default function addStylesClient (parentId, list, _isProduction, _options) {\n isProduction = _isProduction\n\n options = _options || {}\n\n var styles = listToStyles(parentId, list)\n addStylesToDom(styles)\n\n return function update (newList) {\n var mayRemove = []\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n domStyle.refs--\n mayRemove.push(domStyle)\n }\n if (newList) {\n styles = listToStyles(parentId, newList)\n addStylesToDom(styles)\n } else {\n styles = []\n }\n for (var i = 0; i < mayRemove.length; i++) {\n var domStyle = mayRemove[i]\n if (domStyle.refs === 0) {\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j]()\n }\n delete stylesInDom[domStyle.id]\n }\n }\n }\n}\n\nfunction addStylesToDom (styles /* Array<StyleObject> */) {\n for (var i = 0; i < styles.length; i++) {\n var item = styles[i]\n var domStyle = stylesInDom[item.id]\n if (domStyle) {\n domStyle.refs++\n for (var j = 0; j < domStyle.parts.length; j++) {\n domStyle.parts[j](item.parts[j])\n }\n for (; j < item.parts.length; j++) {\n domStyle.parts.push(addStyle(item.parts[j]))\n }\n if (domStyle.parts.length > item.parts.length) {\n domStyle.parts.length = item.parts.length\n }\n } else {\n var parts = []\n for (var j = 0; j < item.parts.length; j++) {\n parts.push(addStyle(item.parts[j]))\n }\n stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts }\n }\n }\n}\n\nfunction createStyleElement () {\n var styleElement = document.createElement('style')\n styleElement.type = 'text/css'\n head.appendChild(styleElement)\n return styleElement\n}\n\nfunction addStyle (obj /* StyleObjectPart */) {\n var update, remove\n var styleElement = document.querySelector('style[' + ssrIdKey + '~=\"' + obj.id + '\"]')\n\n if (styleElement) {\n if (isProduction) {\n // has SSR styles and in production mode.\n // simply do nothing.\n return noop\n } else {\n // has SSR styles but in dev mode.\n // for some reason Chrome can't handle source map in server-rendered\n // style tags - source maps in <style> only works if the style tag is\n // created and inserted dynamically. So we remove the server rendered\n // styles and inject new ones.\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n if (isOldIE) {\n // use singleton mode for IE9.\n var styleIndex = singletonCounter++\n styleElement = singletonElement || (singletonElement = createStyleElement())\n update = applyToSingletonTag.bind(null, styleElement, styleIndex, false)\n remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true)\n } else {\n // use multi-style-tag mode in all other cases\n styleElement = createStyleElement()\n update = applyToTag.bind(null, styleElement)\n remove = function () {\n styleElement.parentNode.removeChild(styleElement)\n }\n }\n\n update(obj)\n\n return function updateStyle (newObj /* StyleObjectPart */) {\n if (newObj) {\n if (newObj.css === obj.css &&\n newObj.media === obj.media &&\n newObj.sourceMap === obj.sourceMap) {\n return\n }\n update(obj = newObj)\n } else {\n remove()\n }\n }\n}\n\nvar replaceText = (function () {\n var textStore = []\n\n return function (index, replacement) {\n textStore[index] = replacement\n return textStore.filter(Boolean).join('\\n')\n }\n})()\n\nfunction applyToSingletonTag (styleElement, index, remove, obj) {\n var css = remove ? '' : obj.css\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = replaceText(index, css)\n } else {\n var cssNode = document.createTextNode(css)\n var childNodes = styleElement.childNodes\n if (childNodes[index]) styleElement.removeChild(childNodes[index])\n if (childNodes.length) {\n styleElement.insertBefore(cssNode, childNodes[index])\n } else {\n styleElement.appendChild(cssNode)\n }\n }\n}\n\nfunction applyToTag (styleElement, obj) {\n var css = obj.css\n var media = obj.media\n var sourceMap = obj.sourceMap\n\n if (media) {\n styleElement.setAttribute('media', media)\n }\n if (options.ssrId) {\n styleElement.setAttribute(ssrIdKey, obj.id)\n }\n\n if (sourceMap) {\n // https://developer.chrome.com/devtools/docs/javascript-debugging\n // this makes source maps inside style tags work properly in Chrome\n css += '\\n/*# sourceURL=' + sourceMap.sources[0] + ' */'\n // http://stackoverflow.com/a/26603875\n css += '\\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */'\n }\n\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild)\n }\n styleElement.appendChild(document.createTextNode(css))\n }\n}\n"],"sourceRoot":""} \ No newline at end of file
diff --git a/apps/files_trashbin/src/app.js b/apps/files_trashbin/src/app.js
index 2bc8e08b812..3405f79b15f 100644
--- a/apps/files_trashbin/src/app.js
+++ b/apps/files_trashbin/src/app.js
@@ -1,4 +1,4 @@
-/*
+/**
* Copyright (c) 2014
*
* This file is licensed under the Affero General Public License version 3
@@ -11,7 +11,7 @@
/**
* @namespace OCA.Trashbin
*/
-OCA.Trashbin = {};
+OCA.Trashbin = {}
/**
* @namespace OCA.Trashbin.App
*/
@@ -20,19 +20,19 @@ OCA.Trashbin.App = {
/** @type {OC.Files.Client} */
client: null,
- initialize: function ($el) {
+ initialize: function($el) {
if (this._initialized) {
- return;
+ return
}
- this._initialized = true;
+ this._initialized = true
this.client = new OC.Files.Client({
host: OC.getHost(),
port: OC.getPort(),
root: OC.linkToRemoteBase('dav') + '/trashbin/' + OC.getCurrentUser().uid,
useHTTPS: OC.getProtocol() === 'https'
- });
- var urlParams = OC.Util.History.parseUrlQuery();
+ })
+ var urlParams = OC.Util.History.parseUrlQuery()
this.fileList = new OCA.Trashbin.FileList(
$('#app-content-trashbin'), {
fileActions: this._createFileActions(),
@@ -43,12 +43,12 @@ OCA.Trashbin.App = {
{
name: 'restore',
displayName: t('files_trashbin', 'Restore'),
- iconClass: 'icon-history',
+ iconClass: 'icon-history'
},
{
name: 'delete',
displayName: t('files_trashbin', 'Delete permanently'),
- iconClass: 'icon-delete',
+ iconClass: 'icon-delete'
}
],
client: this.client,
@@ -57,18 +57,18 @@ OCA.Trashbin.App = {
// if handling the event with the file list already created.
shown: true
}
- );
+ )
},
- _createFileActions: function () {
- var client = this.client;
- var fileActions = new OCA.Files.FileActions();
- fileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename, context) {
- var dir = context.fileList.getCurrentDirectory();
- context.fileList.changeDirectory(OC.joinPaths(dir, filename));
- });
+ _createFileActions: function() {
+ var client = this.client
+ var fileActions = new OCA.Files.FileActions()
+ fileActions.register('dir', 'Open', OC.PERMISSION_READ, '', function(filename, context) {
+ var dir = context.fileList.getCurrentDirectory()
+ context.fileList.changeDirectory(OC.joinPaths(dir, filename))
+ })
- fileActions.setDefault('dir', 'Open');
+ fileActions.setDefault('dir', 'Open')
fileActions.registerAction({
name: 'Restore',
@@ -77,21 +77,21 @@ OCA.Trashbin.App = {
mime: 'all',
permissions: OC.PERMISSION_READ,
iconClass: 'icon-history',
- actionHandler: function (filename, context) {
- var fileList = context.fileList;
- var tr = fileList.findFileEl(filename);
- fileList.showFileBusyState(tr, true);
- var dir = context.fileList.getCurrentDirectory();
+ actionHandler: function(filename, context) {
+ var fileList = context.fileList
+ var tr = fileList.findFileEl(filename)
+ fileList.showFileBusyState(tr, true)
+ var dir = context.fileList.getCurrentDirectory()
client.move(OC.joinPaths('trash', dir, filename), OC.joinPaths('restore', filename), true)
.then(
fileList._removeCallback.bind(fileList, [filename]),
- function () {
- fileList.showFileBusyState(tr, false);
- OC.Notification.show(t('files_trashbin', 'Error while restoring file from trashbin'));
+ function() {
+ fileList.showFileBusyState(tr, false)
+ OC.Notification.show(t('files_trashbin', 'Error while restoring file from trashbin'))
}
- );
+ )
}
- });
+ })
fileActions.registerAction({
name: 'Delete',
@@ -99,39 +99,38 @@ OCA.Trashbin.App = {
mime: 'all',
permissions: OC.PERMISSION_READ,
iconClass: 'icon-delete',
- render: function (actionSpec, isDefault, context) {
- var $actionLink = fileActions._makeActionLink(actionSpec, context);
- $actionLink.attr('original-title', t('files_trashbin', 'Delete permanently'));
- $actionLink.children('img').attr('alt', t('files_trashbin', 'Delete permanently'));
- context.$file.find('td:last').append($actionLink);
- return $actionLink;
+ render: function(actionSpec, isDefault, context) {
+ var $actionLink = fileActions._makeActionLink(actionSpec, context)
+ $actionLink.attr('original-title', t('files_trashbin', 'Delete permanently'))
+ $actionLink.children('img').attr('alt', t('files_trashbin', 'Delete permanently'))
+ context.$file.find('td:last').append($actionLink)
+ return $actionLink
},
- actionHandler: function (filename, context) {
- var fileList = context.fileList;
- $('.tipsy').remove();
- var tr = fileList.findFileEl(filename);
- fileList.showFileBusyState(tr, true);
- var dir = context.fileList.getCurrentDirectory();
+ actionHandler: function(filename, context) {
+ var fileList = context.fileList
+ $('.tipsy').remove()
+ var tr = fileList.findFileEl(filename)
+ fileList.showFileBusyState(tr, true)
+ var dir = context.fileList.getCurrentDirectory()
client.remove(OC.joinPaths('trash', dir, filename))
.then(
fileList._removeCallback.bind(fileList, [filename]),
- function () {
- fileList.showFileBusyState(tr, false);
- OC.Notification.show(t('files_trashbin', 'Error while removing file from trashbin'));
+ function() {
+ fileList.showFileBusyState(tr, false)
+ OC.Notification.show(t('files_trashbin', 'Error while removing file from trashbin'))
}
- );
+ )
}
- });
- return fileActions;
+ })
+ return fileActions
}
-};
+}
-$(document).ready(function () {
- $('#app-content-trashbin').one('show', function () {
- var App = OCA.Trashbin.App;
- App.initialize($('#app-content-trashbin'));
+$(document).ready(function() {
+ $('#app-content-trashbin').one('show', function() {
+ var App = OCA.Trashbin.App
+ App.initialize($('#app-content-trashbin'))
// force breadcrumb init
// App.fileList.changeDirectory(App.fileList.getCurrentDirectory(), false, true);
- });
-});
-
+ })
+})
diff --git a/apps/files_trashbin/src/filelist.js b/apps/files_trashbin/src/filelist.js
index 07e041faefd..661b2f012f4 100644
--- a/apps/files_trashbin/src/filelist.js
+++ b/apps/files_trashbin/src/filelist.js
@@ -1,3 +1,4 @@
+/* eslint-disable */
/*
* Copyright (c) 2014
*
@@ -8,25 +9,25 @@
*
*/
(function() {
- var DELETED_REGEXP = new RegExp(/^(.+)\.d[0-9]+$/);
- var FILENAME_PROP = '{http://nextcloud.org/ns}trashbin-filename';
- var DELETION_TIME_PROP = '{http://nextcloud.org/ns}trashbin-deletion-time';
- var TRASHBIN_ORIGINAL_LOCATION = '{http://nextcloud.org/ns}trashbin-original-location';
+ var DELETED_REGEXP = new RegExp(/^(.+)\.d[0-9]+$/)
+ var FILENAME_PROP = '{http://nextcloud.org/ns}trashbin-filename'
+ var DELETION_TIME_PROP = '{http://nextcloud.org/ns}trashbin-deletion-time'
+ var TRASHBIN_ORIGINAL_LOCATION = '{http://nextcloud.org/ns}trashbin-original-location'
/**
* Convert a file name in the format filename.d12345 to the real file name.
* This will use basename.
* The name will not be changed if it has no ".d12345" suffix.
* @param {String} name file name
- * @return {String} converted file name
+ * @returns {String} converted file name
*/
function getDeletedFileName(name) {
- name = OC.basename(name);
- var match = DELETED_REGEXP.exec(name);
+ name = OC.basename(name)
+ var match = DELETED_REGEXP.exec(name)
if (match && match.length > 1) {
- name = match[1];
+ name = match[1]
}
- return name;
+ return name
}
/**
@@ -39,283 +40,282 @@
* @param [options] map of options
*/
var FileList = function($el, options) {
- this.client = options.client;
- this.initialize($el, options);
- };
+ this.client = options.client
+ this.initialize($el, options)
+ }
FileList.prototype = _.extend({}, OCA.Files.FileList.prototype,
/** @lends OCA.Trashbin.FileList.prototype */ {
- id: 'trashbin',
- appName: t('files_trashbin', 'Deleted files'),
- /** @type {OC.Files.Client} */
- client: null,
+ id: 'trashbin',
+ appName: t('files_trashbin', 'Deleted files'),
+ /** @type {OC.Files.Client} */
+ client: null,
- /**
+ /**
* @private
*/
- initialize: function() {
- this.client.addFileInfoParser(function(response, data) {
- var props = response.propStat[0].properties;
- var path = props[TRASHBIN_ORIGINAL_LOCATION];
- return {
- displayName: props[FILENAME_PROP],
- mtime: parseInt(props[DELETION_TIME_PROP], 10) * 1000,
- hasPreview: true,
- path: path,
- extraData: path
- }
- });
+ initialize: function() {
+ this.client.addFileInfoParser(function(response, data) {
+ var props = response.propStat[0].properties
+ var path = props[TRASHBIN_ORIGINAL_LOCATION]
+ return {
+ displayName: props[FILENAME_PROP],
+ mtime: parseInt(props[DELETION_TIME_PROP], 10) * 1000,
+ hasPreview: true,
+ path: path,
+ extraData: path
+ }
+ })
- var result = OCA.Files.FileList.prototype.initialize.apply(this, arguments);
- this.$el.find('.undelete').click('click', _.bind(this._onClickRestoreSelected, this));
+ var result = OCA.Files.FileList.prototype.initialize.apply(this, arguments)
+ this.$el.find('.undelete').click('click', _.bind(this._onClickRestoreSelected, this))
- this.setSort('mtime', 'desc');
- /**
+ this.setSort('mtime', 'desc')
+ /**
* Override crumb making to add "Deleted Files" entry
* and convert files with ".d" extensions to a more
* user friendly name.
*/
- this.breadcrumb._makeCrumbs = function() {
- var parts = OCA.Files.BreadCrumb.prototype._makeCrumbs.apply(this, arguments);
- for (var i = 1; i < parts.length; i++) {
- parts[i].name = getDeletedFileName(parts[i].name);
+ this.breadcrumb._makeCrumbs = function() {
+ var parts = OCA.Files.BreadCrumb.prototype._makeCrumbs.apply(this, arguments)
+ for (var i = 1; i < parts.length; i++) {
+ parts[i].name = getDeletedFileName(parts[i].name)
+ }
+ return parts
}
- return parts;
- };
- OC.Plugins.attach('OCA.Trashbin.FileList', this);
- return result;
- },
+ OC.Plugins.attach('OCA.Trashbin.FileList', this)
+ return result
+ },
- /**
+ /**
* Override to only return read permissions
*/
- getDirectoryPermissions: function() {
- return OC.PERMISSION_READ | OC.PERMISSION_DELETE;
- },
+ getDirectoryPermissions: function() {
+ return OC.PERMISSION_READ | OC.PERMISSION_DELETE
+ },
- _setCurrentDir: function(targetDir) {
- OCA.Files.FileList.prototype._setCurrentDir.apply(this, arguments);
+ _setCurrentDir: function(targetDir) {
+ OCA.Files.FileList.prototype._setCurrentDir.apply(this, arguments)
- var baseDir = OC.basename(targetDir);
- if (baseDir !== '') {
- this.setPageTitle(getDeletedFileName(baseDir));
- }
- },
+ var baseDir = OC.basename(targetDir)
+ if (baseDir !== '') {
+ this.setPageTitle(getDeletedFileName(baseDir))
+ }
+ },
- _createRow: function() {
+ _createRow: function() {
// FIXME: MEGAHACK until we find a better solution
- var tr = OCA.Files.FileList.prototype._createRow.apply(this, arguments);
- tr.find('td.filesize').remove();
- return tr;
- },
-
- getAjaxUrl: function(action, params) {
- var q = '';
- if (params) {
- q = '?' + OC.buildQueryString(params);
- }
- return OC.filePath('files_trashbin', 'ajax', action + '.php') + q;
- },
+ var tr = OCA.Files.FileList.prototype._createRow.apply(this, arguments)
+ tr.find('td.filesize').remove()
+ return tr
+ },
+
+ getAjaxUrl: function(action, params) {
+ var q = ''
+ if (params) {
+ q = '?' + OC.buildQueryString(params)
+ }
+ return OC.filePath('files_trashbin', 'ajax', action + '.php') + q
+ },
- setupUploadEvents: function() {
+ setupUploadEvents: function() {
// override and do nothing
- },
+ },
- linkTo: function(dir){
- return OC.linkTo('files', 'index.php')+"?view=trashbin&dir="+ encodeURIComponent(dir).replace(/%2F/g, '/');
- },
+ linkTo: function(dir) {
+ return OC.linkTo('files', 'index.php') + '?view=trashbin&dir=' + encodeURIComponent(dir).replace(/%2F/g, '/')
+ },
- elementToFile: function($el) {
- var fileInfo = OCA.Files.FileList.prototype.elementToFile($el);
- if (this.getCurrentDirectory() === '/') {
- fileInfo.displayName = getDeletedFileName(fileInfo.name);
- }
- // no size available
- delete fileInfo.size;
- return fileInfo;
- },
-
- updateEmptyContent: function(){
- var exists = this.$fileList.find('tr:first').exists();
- this.$el.find('#emptycontent').toggleClass('hidden', exists);
- this.$el.find('#filestable th').toggleClass('hidden', !exists);
- },
-
- _removeCallback: function(files) {
- var $el;
- for (var i = 0; i < files.length; i++) {
- $el = this.remove(OC.basename(files[i]), {updateSummary: false});
- this.fileSummary.remove({type: $el.attr('data-type'), size: $el.attr('data-size')});
- }
- this.fileSummary.update();
- this.updateEmptyContent();
- },
-
- _onClickRestoreSelected: function(event) {
- event.preventDefault();
- var self = this;
- var files = _.pluck(this.getSelectedFiles(), 'name');
- for (var i = 0; i < files.length; i++) {
- var tr = this.findFileEl(files[i]);
- this.showFileBusyState(tr, true);
- }
-
- this.fileMultiSelectMenu.toggleLoading('restore', true);
- var restorePromises = files.map(function(file) {
- return self.client.move(OC.joinPaths('trash', self.getCurrentDirectory(), file), OC.joinPaths('restore', file), true)
- .then(
- function() {
- self._removeCallback([file]);
- }
- );
- });
- return Promise.all(restorePromises).then(
- function() {
- self.fileMultiSelectMenu.toggleLoading('restore', false);
- },
- function() {
- OC.Notification.show(t('files_trashbin', 'Error while restoring files from trashbin'));
+ elementToFile: function($el) {
+ var fileInfo = OCA.Files.FileList.prototype.elementToFile($el)
+ if (this.getCurrentDirectory() === '/') {
+ fileInfo.displayName = getDeletedFileName(fileInfo.name)
+ }
+ // no size available
+ delete fileInfo.size
+ return fileInfo
+ },
+
+ updateEmptyContent: function() {
+ var exists = this.$fileList.find('tr:first').exists()
+ this.$el.find('#emptycontent').toggleClass('hidden', exists)
+ this.$el.find('#filestable th').toggleClass('hidden', !exists)
+ },
+
+ _removeCallback: function(files) {
+ var $el
+ for (var i = 0; i < files.length; i++) {
+ $el = this.remove(OC.basename(files[i]), { updateSummary: false })
+ this.fileSummary.remove({ type: $el.attr('data-type'), size: $el.attr('data-size') })
+ }
+ this.fileSummary.update()
+ this.updateEmptyContent()
+ },
+
+ _onClickRestoreSelected: function(event) {
+ event.preventDefault()
+ var self = this
+ var files = _.pluck(this.getSelectedFiles(), 'name')
+ for (var i = 0; i < files.length; i++) {
+ var tr = this.findFileEl(files[i])
+ this.showFileBusyState(tr, true)
}
- );
- },
-
- _onClickDeleteSelected: function(event) {
- event.preventDefault();
- var self = this;
- var allFiles = this.$el.find('.select-all').is(':checked');
- var files = _.pluck(this.getSelectedFiles(), 'name');
- for (var i = 0; i < files.length; i++) {
- var tr = this.findFileEl(files[i]);
- this.showFileBusyState(tr, true);
- }
- if (allFiles) {
- return this.client.remove(OC.joinPaths('trash', this.getCurrentDirectory()))
- .then(
- function() {
- self.hideMask();
- self.setFiles([]);
- },
- function() {
- OC.Notification.show(t('files_trashbin', 'Error while emptying trashbin'));
- }
- );
- } else {
- this.fileMultiSelectMenu.toggleLoading('delete', true);
- var deletePromises = files.map(function(file) {
- return self.client.remove(OC.joinPaths('trash', self.getCurrentDirectory(), file))
+ this.fileMultiSelectMenu.toggleLoading('restore', true)
+ var restorePromises = files.map(function(file) {
+ return self.client.move(OC.joinPaths('trash', self.getCurrentDirectory(), file), OC.joinPaths('restore', file), true)
.then(
function() {
- self._removeCallback([file]);
+ self._removeCallback([file])
}
- );
- });
- return Promise.all(deletePromises).then(
+ )
+ })
+ return Promise.all(restorePromises).then(
function() {
- self.fileMultiSelectMenu.toggleLoading('delete', false);
+ self.fileMultiSelectMenu.toggleLoading('restore', false)
},
function() {
- OC.Notification.show(t('files_trashbin', 'Error while removing files from trashbin'));
+ OC.Notification.show(t('files_trashbin', 'Error while restoring files from trashbin'))
}
- );
- }
- },
+ )
+ },
+
+ _onClickDeleteSelected: function(event) {
+ event.preventDefault()
+ var self = this
+ var allFiles = this.$el.find('.select-all').is(':checked')
+ var files = _.pluck(this.getSelectedFiles(), 'name')
+ for (var i = 0; i < files.length; i++) {
+ var tr = this.findFileEl(files[i])
+ this.showFileBusyState(tr, true)
+ }
- _onClickFile: function(event) {
- var mime = $(this).parent().parent().data('mime');
- if (mime !== 'httpd/unix-directory') {
- event.preventDefault();
- }
- return OCA.Files.FileList.prototype._onClickFile.apply(this, arguments);
- },
+ if (allFiles) {
+ return this.client.remove(OC.joinPaths('trash', this.getCurrentDirectory()))
+ .then(
+ function() {
+ self.hideMask()
+ self.setFiles([])
+ },
+ function() {
+ OC.Notification.show(t('files_trashbin', 'Error while emptying trashbin'))
+ }
+ )
+ } else {
+ this.fileMultiSelectMenu.toggleLoading('delete', true)
+ var deletePromises = files.map(function(file) {
+ return self.client.remove(OC.joinPaths('trash', self.getCurrentDirectory(), file))
+ .then(
+ function() {
+ self._removeCallback([file])
+ }
+ )
+ })
+ return Promise.all(deletePromises).then(
+ function() {
+ self.fileMultiSelectMenu.toggleLoading('delete', false)
+ },
+ function() {
+ OC.Notification.show(t('files_trashbin', 'Error while removing files from trashbin'))
+ }
+ )
+ }
+ },
+
+ _onClickFile: function(event) {
+ var mime = $(this).parent().parent().data('mime')
+ if (mime !== 'httpd/unix-directory') {
+ event.preventDefault()
+ }
+ return OCA.Files.FileList.prototype._onClickFile.apply(this, arguments)
+ },
- generatePreviewUrl: function(urlSpec) {
- return OC.generateUrl('/apps/files_trashbin/preview?') + $.param(urlSpec);
- },
+ generatePreviewUrl: function(urlSpec) {
+ return OC.generateUrl('/apps/files_trashbin/preview?') + $.param(urlSpec)
+ },
- getDownloadUrl: function() {
+ getDownloadUrl: function() {
// no downloads
- return '#';
- },
+ return '#'
+ },
- updateStorageStatistics: function() {
+ updateStorageStatistics: function() {
// no op because the trashbin doesn't have
// storage info like free space / used space
- },
+ },
- isSelectedDeletable: function() {
- return true;
- },
+ isSelectedDeletable: function() {
+ return true
+ },
- /**
+ /**
* Returns list of webdav properties to request
*/
- _getWebdavProperties: function() {
- return [FILENAME_PROP, DELETION_TIME_PROP, TRASHBIN_ORIGINAL_LOCATION].concat(this.filesClient.getPropfindProperties());
- },
+ _getWebdavProperties: function() {
+ return [FILENAME_PROP, DELETION_TIME_PROP, TRASHBIN_ORIGINAL_LOCATION].concat(this.filesClient.getPropfindProperties())
+ },
- /**
+ /**
* Reloads the file list using ajax call
*
- * @return ajax call object
+ * @returns ajax call object
*/
- reload: function() {
- this._selectedFiles = {};
- this._selectionSummary.clear();
- this.$el.find('.select-all').prop('checked', false);
- this.showMask();
- if (this._reloadCall) {
- this._reloadCall.abort();
- }
- this._reloadCall = this.client.getFolderContents(
- 'trash/' + this.getCurrentDirectory(), {
- includeParent: false,
- properties: this._getWebdavProperties()
+ reload: function() {
+ this._selectedFiles = {}
+ this._selectionSummary.clear()
+ this.$el.find('.select-all').prop('checked', false)
+ this.showMask()
+ if (this._reloadCall) {
+ this._reloadCall.abort()
+ }
+ this._reloadCall = this.client.getFolderContents(
+ 'trash/' + this.getCurrentDirectory(), {
+ includeParent: false,
+ properties: this._getWebdavProperties()
+ }
+ )
+ var callBack = this.reloadCallback.bind(this)
+ return this._reloadCall.then(callBack, callBack)
+ },
+ reloadCallback: function(status, result) {
+ delete this._reloadCall
+ this.hideMask()
+
+ if (status === 401) {
+ return false
}
- );
- var callBack = this.reloadCallback.bind(this);
- return this._reloadCall.then(callBack, callBack);
- },
- reloadCallback: function(status, result) {
- delete this._reloadCall;
- this.hideMask();
-
- if (status === 401) {
- return false;
- }
- // Firewall Blocked request?
- if (status === 403) {
+ // Firewall Blocked request?
+ if (status === 403) {
// Go home
- this.changeDirectory('/');
- OC.Notification.show(t('files', 'This operation is forbidden'));
- return false;
- }
+ this.changeDirectory('/')
+ OC.Notification.show(t('files', 'This operation is forbidden'))
+ return false
+ }
- // Did share service die or something else fail?
- if (status === 500) {
+ // Did share service die or something else fail?
+ if (status === 500) {
// Go home
- this.changeDirectory('/');
- OC.Notification.show(t('files', 'This directory is unavailable, please check the logs or contact the administrator'));
- return false;
- }
+ this.changeDirectory('/')
+ OC.Notification.show(t('files', 'This directory is unavailable, please check the logs or contact the administrator'))
+ return false
+ }
- if (status === 404) {
+ if (status === 404) {
// go back home
- this.changeDirectory('/');
- return false;
- }
- // aborted ?
- if (status === 0){
- return true;
- }
-
- this.setFiles(result);
- return true;
- },
+ this.changeDirectory('/')
+ return false
+ }
+ // aborted ?
+ if (status === 0) {
+ return true
+ }
- });
+ this.setFiles(result)
+ return true
+ }
- OCA.Trashbin.FileList = FileList;
-})();
+ })
+ OCA.Trashbin.FileList = FileList
+})()