summaryrefslogtreecommitdiffstats
path: root/apps/files/js/file-upload.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-05-08 22:06:30 +0200
committerVincent Petry <pvince81@owncloud.com>2014-05-15 17:51:04 +0200
commit9d38e3602b2faf37d861729c52690ce51b8fee97 (patch)
tree5da63d26db4a4e8ec356dee45fc8f7804c6fe38a /apps/files/js/file-upload.js
parentfb10bf4048aaf5b2a9665fc9dff217c790efe005 (diff)
downloadnextcloud-server-9d38e3602b2faf37d861729c52690ce51b8fee97.tar.gz
nextcloud-server-9d38e3602b2faf37d861729c52690ce51b8fee97.zip
Namespacing for FileList, FileActions and trashbin app
- FileList is now an instantiable class - FileActions is now in namespace - added App class for trashbin app - moved trashbin overrides into classes extending FileList - replaced many static calls with "this." or "self." to make the classes reusable/extendable - new URL parameter "view" to specify which view is shown, for example "files" or "trashbin" - added OC.Util.History utility class in core for handling history - moved URL handling/routing to OCA.Files.App - popstate will correctly update the current view and notify the view of the URL change so it can update the current dir - added JS unitt tests for the trashbin app - fixed public app to work with the new namespaces
Diffstat (limited to 'apps/files/js/file-upload.js')
-rw-r--r--apps/files/js/file-upload.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 67775b22c54..0ca2852f9f6 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -346,7 +346,7 @@ OC.Upload = {
// noone set update parameters, we set the minimum
data.formData = {
requesttoken: oc_requesttoken,
- dir: $('#dir').val(),
+ dir: FileList.getCurrentDirectory(),
file_directory: fileDirectory
};
}
@@ -595,7 +595,7 @@ OC.Upload = {
if (FileList.lastAction) {
FileList.lastAction();
}
- var name = getUniqueName(newname);
+ var name = FileList.getUniqueName(newname);
if (newname !== name) {
FileList.checkName(name, newname, true);
var hidden = true;
@@ -607,7 +607,7 @@ OC.Upload = {
$.post(
OC.filePath('files', 'ajax', 'newfile.php'),
{
- dir: $('#dir').val(),
+ dir: FileList.getCurrentDirectory(),
filename: name
},
function(result) {
@@ -623,7 +623,7 @@ OC.Upload = {
$.post(
OC.filePath('files','ajax','newfolder.php'),
{
- dir: $('#dir').val(),
+ dir: FileList.getCurrentDirectory(),
foldername: name
},
function(result) {
@@ -648,7 +648,7 @@ OC.Upload = {
} else { //or the domain
localName = (localName.match(/:\/\/(.[^\/]+)/)[1]).replace('www.', '');
}
- localName = getUniqueName(localName);
+ localName = FileList.getUniqueName(localName);
//IE < 10 does not fire the necessary events for the progress bar.
if ($('html.lte9').length === 0) {
$('#uploadprogressbar').progressbar({value: 0});
@@ -658,7 +658,7 @@ OC.Upload = {
var eventSource = new OC.EventSource(
OC.filePath('files', 'ajax', 'newfile.php'),
{
- dir: $('#dir').val(),
+ dir: FileList.getCurrentDirectory(),
source: name,
filename: localName
}