summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-02-20 15:16:45 +0100
committerVincent Petry <pvince81@owncloud.com>2014-02-20 15:16:45 +0100
commit44441b56d63783a0be5c9b24f5b1ee9264509bef (patch)
tree4ab3b9a27301f76b2326a867b9d8c9d1de3d136d /apps/files/js
parent476444ab1a6f925b87ca6f6382953633fd060283 (diff)
downloadnextcloud-server-44441b56d63783a0be5c9b24f5b1ee9264509bef.tar.gz
nextcloud-server-44441b56d63783a0be5c9b24f5b1ee9264509bef.zip
Fixed trashbin title
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/filelist.js36
1 files changed, 15 insertions, 21 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index 3fd3c406b2f..edcc5519b20 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -11,6 +11,7 @@
/* global OC, t, n, FileList, FileActions, Files */
/* global procesSelection, dragOptions, SVGSupport, replaceSVG */
window.FileList={
+ appName: t('files', 'Files'),
useUndo:true,
postProcessList: function() {
$('#fileList tr').each(function() {
@@ -28,7 +29,7 @@ window.FileList={
else {
title = '';
}
- title += t('files', 'Files');
+ title += FileList.appName;
// Sets the page title with the " - ownCloud" suffix as in templates
window.document.title = title + ' - ' + oc_defaults.title;
@@ -202,22 +203,12 @@ window.FileList={
changeDirectory: function(targetDir, changeUrl, force) {
var $dir = $('#dir'),
url,
- currentDir = $dir.val() || '/',
- baseDir = OC.basename(targetDir),
+ currentDir = $dir.val() || '/';
targetDir = targetDir || '/';
if (!force && currentDir === targetDir) {
return;
}
-
- if (baseDir !== '') {
- FileList.setPageTitle(baseDir);
- }
- else {
- FileList.setPageTitle();
- }
-
FileList.setCurrentDir(targetDir, changeUrl);
-
$('#fileList').trigger(
jQuery.Event('changeDirectory', {
dir: targetDir,
@@ -230,7 +221,16 @@ window.FileList={
return OC.linkTo('files', 'index.php')+"?dir="+ encodeURIComponent(dir).replace(/%2F/g, '/');
},
setCurrentDir: function(targetDir, changeUrl) {
- var url;
+ var url,
+ baseDir = OC.basename(targetDir);
+
+ if (baseDir !== '') {
+ FileList.setPageTitle(baseDir);
+ }
+ else {
+ FileList.setPageTitle();
+ }
+
$('#dir').val(targetDir);
if (changeUrl !== false) {
if (window.history.pushState && changeUrl !== false) {
@@ -1158,14 +1158,8 @@ $(document).ready(function() {
FileList.changeDirectory(parseCurrentDirFromUrl(), false, true);
}
}
-
-
- baseDir = OC.basename(parseCurrentDirFromUrl());
-
- if (baseDir !== '') {
- FileList.setPageTitle(baseDir);
- }
-
+
+ FileList.setCurrentDir(parseCurrentDirFromUrl(), false);
FileList.createFileSummary();
});