diff options
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/fileactions.js | 19 | ||||
-rw-r--r-- | apps/files/js/filelist.js | 3 | ||||
-rw-r--r-- | apps/files/js/search.js | 4 |
3 files changed, 20 insertions, 6 deletions
diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 015635c2e1d..3e0cf998254 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -363,7 +363,7 @@ /** * Renders the menu trigger on the given file list row - * + * * @param {Object} $tr file list row element * @param {OCA.Files.FileActionContext} context rendering context */ @@ -617,6 +617,20 @@ } }); + this.registerAction({ + name: 'Move', + displayName: t('files', 'Move'), + mime: 'all', + order: -25, + permissions: OC.PERMISSION_UPDATE, + iconClass: 'icon-external', + actionHandler: function (filename, context) { + OC.dialogs.filepicker(t('files', 'Target folder'), function(targetPath) { + context.fileList.move(filename, targetPath); + }, false, "httpd/unix-directory", true); + } + }); + this.register('dir', 'Open', OC.PERMISSION_READ, '', function (filename, context) { var dir = context.$file.attr('data-path') || context.fileList.getCurrentDirectory(); context.fileList.changeDirectory(OC.joinPaths(dir, filename), true, false, parseInt(context.$file.attr('data-id'), 10)); @@ -744,7 +758,7 @@ OCA.Files.legacyFileActions = new OCA.Files.FileActions(); // for backward compatibility - // + // // legacy apps are expecting a stateful global FileActions object to register // their actions on. Since legacy apps are very likely to break with other // FileList views than the main one ("All files"), actions registered @@ -763,4 +777,3 @@ OCA.Files.FileActions.prototype.display.call(window.FileActions, parent, triggerEvent, fileList); }; })(); - diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 98d0f132ad6..896af1dd6e5 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -2426,8 +2426,9 @@ $('#searchresults').addClass('filter-empty'); $('#searchresults .emptycontent').addClass('emptycontent-search'); if ( $('#searchresults').length === 0 || $('#searchresults').hasClass('hidden') ) { + var error = t('files', "No search results in other folders for '{tag}{filter}{endtag}'", {filter:this._filter}, null, {'escape': false}); this.$el.find('.nofilterresults').removeClass('hidden'). - find('p').text(t('files', "No entries in this folder match '{filter}'", {filter:this._filter}, null, {'escape': false})); + find('p').html(error.replace('{tag}', '<strong>').replace('{endtag}', '</strong>')); } } else { $('#searchresults').removeClass('filter-empty'); diff --git a/apps/files/js/search.js b/apps/files/js/search.js index 625e4b13f4b..fa79d695165 100644 --- a/apps/files/js/search.js +++ b/apps/files/js/search.js @@ -63,7 +63,7 @@ show size and last modified date on the right */ this.updateLegacyMimetype(result); - var $pathDiv = $('<div class="path"></div>').text(result.path); + var $pathDiv = $('<div class="path"></div>').text(result.path.substr(1)); $row.find('td.info div.name').after($pathDiv).text(result.name); $row.find('td.result a').attr('href', result.link); @@ -80,7 +80,7 @@ show size and last modified date on the right */ this.updateLegacyMimetype(result); - var $pathDiv = $('<div class="path"></div>').text(result.path); + var $pathDiv = $('<div class="path"></div>').text(result.path.substr(1)); $row.find('td.info div.name').after($pathDiv).text(result.name); $row.find('td.result a').attr('href', result.link); |