summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-01-11 15:02:34 +0100
committerThomas Mueller <thomas.mueller@tmit.eu>2013-01-11 15:02:34 +0100
commit3d33e8f8453f49c15d539cce3448465f330cf9c0 (patch)
tree7c5d9b3c5b9ee9a8f4045f216658eb03f013e2b5
parent9afdc14d4050917bf4e0f8cbe7e97d922213a487 (diff)
downloadnextcloud-server-3d33e8f8453f49c15d539cce3448465f330cf9c0.tar.gz
nextcloud-server-3d33e8f8453f49c15d539cce3448465f330cf9c0.zip
fixing indent - sorryy wrong setting on the IDE :-(
replace missing calls to OC.Notification.show
-rw-r--r--apps/files/js/files.js32
1 files changed, 15 insertions, 17 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index c1c88d1c72b..426f91c7928 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -28,13 +28,11 @@ Files={
},
isFileNameValid:function (name) {
if (name === '.') {
- $('#notification').text(t('files', '\'.\' is an invalid file name.'));
- $('#notification').fadeIn();
+ OC.Notification.show(t('files', '\'.\' is an invalid file name.'));
return false;
}
if (name.length == 0) {
- $('#notification').text(t('files', 'File name cannot be empty.'));
- $('#notification').fadeIn();
+ OC.Notification.show(t('files', 'File name cannot be empty.'));
return false;
}
@@ -46,17 +44,17 @@ Files={
return false;
}
}
- OC.Notification.hide();
+ OC.Notification.hide();
return true;
},
displayStorageWarnings: function() {
var usedSpacePercent = $('#usedSpacePercent').val();
if (usedSpacePercent > 98) {
- OC.Notification.show(t('files', 'Your storage is full, files can not be updated or synced anymore!'));
- return;
+ OC.Notification.show(t('files', 'Your storage is full, files can not be updated or synced anymore!'));
+ return;
}
if (usedSpacePercent > 90) {
- OC.Notification.show(t('files', 'Your storage is almost full ({usedSpacePercent}%)', {usedSpacePercent: usedSpacePercent}));
+ OC.Notification.show(t('files', 'Your storage is almost full ({usedSpacePercent}%)', {usedSpacePercent: usedSpacePercent}));
}
}
};
@@ -192,7 +190,7 @@ $(document).ready(function() {
$('.download').click('click',function(event) {
var files=getSelectedFiles('name').join(';');
var dir=$('#dir').val()||'/';
- OC.Notification.show(t('files','generating ZIP-file, it may take some time.'));
+ OC.Notification.show(t('files','generating ZIP-file, it may take some time.'));
// use special download URL if provided, e.g. for public shared files
if ( (downloadURL = document.getElementById("downloadURL")) ) {
window.location=downloadURL.value+"&download&files="+files;
@@ -360,7 +358,7 @@ $(document).ready(function() {
uploadtext.text(t('files', '{count} files uploading', {count: currentUploads}));
}
delete uploadingFiles[dirName][fileName];
- OC.Notification.show(t('files', 'Upload cancelled.'));
+ OC.Notification.show(t('files', 'Upload cancelled.'));
}
});
//TODO test with filenames containing slashes
@@ -385,7 +383,7 @@ $(document).ready(function() {
FileList.loadingDone(file.name, file.id);
} else {
Files.cancelUpload(this.files[0].name);
- OC.Notification.show(t('files', response.data.message));
+ OC.Notification.show(t('files', response.data.message));
$('#fileList > tr').not('[data-mime]').fadeOut();
$('#fileList > tr').not('[data-mime]').remove();
}
@@ -393,7 +391,7 @@ $(document).ready(function() {
.error(function(jqXHR, textStatus, errorThrown) {
if(errorThrown === 'abort') {
Files.cancelUpload(this.files[0].name);
- OC.Notification.show(t('files', 'Upload cancelled.'));
+ OC.Notification.show(t('files', 'Upload cancelled.'));
}
});
uploadingFiles[uniqueName] = jqXHR;
@@ -415,7 +413,7 @@ $(document).ready(function() {
FileList.loadingDone(file.name, file.id);
} else {
//TODO Files.cancelUpload(/*where do we get the filename*/);
- OC.Notification.show(t('files', response.data.message));
+ OC.Notification.show(t('files', response.data.message));
$('#fileList > tr').not('[data-mime]').fadeOut();
$('#fileList > tr').not('[data-mime]').remove();
}
@@ -541,7 +539,7 @@ $(document).ready(function() {
} else if (type != 'web' && !Files.isFileNameValid(newname)) {
return false;
} else if( type == 'folder' && $('#dir').val() == '/' && newname == 'Shared') {
- OC.Notification.show(t('files','Invalid folder name. Usage of \'Shared\' is reserved by Owncloud'));
+ OC.Notification.show(t('files','Invalid folder name. Usage of \'Shared\' is reserved by Owncloud'));
return false;
}
if (FileList.lastAction) {
@@ -712,9 +710,9 @@ $(document).ready(function() {
resizeBreadcrumbs(true);
- // display storage warnings
- setTimeout ( "Files.displayStorageWarnings()", 100 );
- OC.Notification.setDefault(Files.displayStorageWarnings);
+ // display storage warnings
+ setTimeout ( "Files.displayStorageWarnings()", 100 );
+ OC.Notification.setDefault(Files.displayStorageWarnings);
});
function scanFiles(force,dir){