[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [owncloud/fileactions-css] files/js: Separate click handlers for
From: Michael Gapczynski <GapczynskiM () gmail ! com>
Date: 2011-08-31 22:17:37
Message-ID: 20110831221737.25D7BA6078 () git ! kde ! org
[Download RAW message or body]
Git commit 88f4bc81eb3daed5442b31d9faeb01364281ec41 by Michael Gapczynski.
Committed on 01/09/2011 at 00:16.
Pushed by gapczynski into branch 'fileactions-css'.
Separate click handlers for single and selected files
M +19 -7 files/js/files.js
http://commits.kde.org/owncloud/88f4bc81eb3daed5442b31d9faeb01364281ec41
diff --git a/files/js/files.js b/files/js/files.js
index 7e9d304..9eb26dd 100644
--- a/files/js/files.js
+++ b/files/js/files.js
@@ -144,20 +144,32 @@ $(document).ready(function() {
$('#width').remove();
});
- $('.download').click('click',function(event) {
- //var files=getSelectedFiles('name').join(';');
+ $('.selectedActions .download').click('click', function(event) {
+ var files = getSelectedFiles('name').join(';');
+ //send the browser to the download location
+ var dir=$('#dir').val()||'/';
+ window.location='ajax/download.php?files='+encodeURIComponent(files)+'&dir='+encodeURIComponent(dir);
+ return false;
+ });
+
+ $('.filename .download').click('click', function(event) {
var file = $(this).parent().parent().data('file');
//send the browser to the download location
var dir=$('#dir').val()||'/';
-// alert(files);
window.location='ajax/download.php?files='+encodeURIComponent(file)+'&dir='+encodeURIComponent(dir);
return false;
});
-
- $('.delete').click(function(event) {
- //var files=getSelectedFiles('name');
- var file = $(this).parent().parent().data('file');
+
+ $('.selectedActions .delete').click(function(event) {
+ event.preventDefault();
+ var files = getSelectedFiles('name').join(';');
+ FileList.do_delete(files);
+ return false;
+ });
+
+ $('.date .delete').click(function(event) {
event.preventDefault();
+ var file = $(this).parent().parent().data('file');
FileList.do_delete(file);
return false;
});
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic