From e8897c2b7e3a392f193e3e53dbbeb8178f5c2078 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Wed, 12 Dec 2012 12:55:29 +0100 Subject: prevent keyboardshortcuts from catching events outside the main doc - e.g. the share popup --- apps/files/js/keyboardshortcuts.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/files/js') diff --git a/apps/files/js/keyboardshortcuts.js b/apps/files/js/keyboardshortcuts.js index 562755f55b7..cc2b5d42139 100644 --- a/apps/files/js/keyboardshortcuts.js +++ b/apps/files/js/keyboardshortcuts.js @@ -127,6 +127,9 @@ var Files = Files || {}; } Files.bindKeyboardShortcuts = function(document, $) { $(document).keydown(function(event) { //check for modifier keys + if(!$(event.target).is('body')) { + return; + } var preventDefault = false; if ($.inArray(event.keyCode, keys) === -1) keys.push(event.keyCode); if ( -- cgit v1.2.3 From e0ada2c24f3db0e93239f45bcbb7a8bb6d831018 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 13 Dec 2012 19:44:55 +0100 Subject: bring back fixed multiselect bar so it’s visible when scrolled down, fix #746 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/files/css/files.css | 9 ++++++--- apps/files/js/files.js | 5 ++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'apps/files/js') diff --git a/apps/files/css/files.css b/apps/files/css/files.css index 59aa4dbf0fb..ccf33c8493b 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -64,11 +64,16 @@ tr:hover span.extension { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Op table tr.mouseOver td { background-color:#eee; } table th { height:2em; padding:0 .5em; color:#999; } table th .name { float:left; margin-left:.5em; } -table th.multiselect { background:#ddd; color:#000; font-weight:bold; } table th, table td { border-bottom:1px solid #ddd; text-align:left; font-weight:normal; } table td { border-bottom:1px solid #eee; font-style:normal; background-position:1em .5em; background-repeat:no-repeat; } table th#headerSize, table td.filesize { width:3em; padding:0 1em; text-align:right; } table th#headerDate, table td.date { width:11em; padding:0 .1em 0 1em; text-align:left; } + +/* Multiselect bar */ +table.multiselect { top:63px; } +table.multiselect thead { position:fixed; top:82px; z-index:1; } +table.multiselect thead th { background:rgba(230,230,230,.8); color:#000; font-weight:bold; border-bottom:0; } + table td.selection, table th.selection, table td.fileaction { width:2em; text-align:center; } table td.filename a.name { display:block; height:1.5em; vertical-align:middle; margin-left:3em; } table tr[data-type="dir"] td.filename a.name span.nametext {font-weight:bold; } @@ -79,8 +84,6 @@ table td.filename .nametext, .uploadtext, .modified { float:left; padding:.3em 0 table td.filename .nametext { overflow:hidden; text-overflow:ellipsis; } table td.filename .uploadtext { font-weight:normal; margin-left:.5em; } table td.filename form { font-size:.85em; margin-left:3em; margin-right:3em; } -table thead.fixed tr{ position:fixed; top:6.5em; z-index:49; -moz-box-shadow:0 -3px 7px #ddd; -webkit-box-shadow:0 -3px 7px #ddd; box-shadow:0 -3px 7px #ddd; } -table thead.fixed { height:2em; } #fileList tr td.filename>input[type="checkbox"]:first-child { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; float:left; margin:.7em 0 0 1em; /* bigger clickable area doesn’t work in FF width:2.8em; height:2.4em;*/ -webkit-transition:opacity 200ms; -moz-transition:opacity 200ms; -o-transition:opacity 200ms; transition:opacity 200ms; } #fileList tr td.filename>input[type="checkbox"]:hover:first-child { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; filter:alpha(opacity=80); opacity:.8; } #fileList tr td.filename>input[type="checkbox"]:checked:first-child { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); opacity:1; } diff --git a/apps/files/js/files.js b/apps/files/js/files.js index ece0b29ae16..feffa10c9f6 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -774,9 +774,8 @@ function procesSelection(){ $('#headerName>span.name').text(t('files','Name')); $('#headerSize').text(t('files','Size')); $('#modified').text(t('files','Modified')); - $('th').removeClass('multiselect'); + $('table').removeClass('multiselect'); $('.selectedActions').hide(); - $('thead').removeClass('fixed'); $('#headerName').css('width','auto'); $('#headerSize').css('width','auto'); $('#headerDate').css('width','auto'); @@ -817,7 +816,7 @@ function procesSelection(){ } $('#headerName>span.name').text(selection); $('#modified').text(''); - $('th').addClass('multiselect'); + $('table').addClass('multiselect'); } } -- cgit v1.2.3 From 2607c565b01e83c9dcd68f4f905f94687841ae77 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Sun, 16 Dec 2012 16:19:51 -0500 Subject: Trigger the last action before continuing with a file upload, fixes issue #918 --- apps/files/js/files.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/files/js') diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 33c775fc8ec..2719e9ade5c 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -203,6 +203,9 @@ $(document).ready(function() { var files = data.files; var totalSize=0; if(files){ + if (FileList.lastAction) { + FileList.lastAction(); + } for(var i=0;i Date: Sun, 16 Dec 2012 16:25:08 -0500 Subject: Trigger last action before continuing with creating a new file/folder/from link --- apps/files/js/files.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/files/js') diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 2719e9ade5c..d924dab3d60 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -516,6 +516,9 @@ $(document).ready(function() { $('#notification').fadeIn(); return; } + if (FileList.lastAction) { + FileList.lastAction(); + } var name = getUniqueName($(this).val()); if (name != $(this).val()) { FileList.checkName(name, $(this).val(), true); -- cgit v1.2.3 From 5107ccbedaaaec0d00bfd7b650589ee4a0565895 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Thu, 20 Dec 2012 10:53:50 +0100 Subject: move CSS from JS to CSS --- apps/files/css/files.css | 10 +++++++--- apps/files/js/files.js | 13 +++---------- 2 files changed, 10 insertions(+), 13 deletions(-) (limited to 'apps/files/js') diff --git a/apps/files/css/files.css b/apps/files/css/files.css index ccf33c8493b..dbddaf695fb 100644 --- a/apps/files/css/files.css +++ b/apps/files/css/files.css @@ -66,8 +66,9 @@ table th { height:2em; padding:0 .5em; color:#999; } table th .name { float:left; margin-left:.5em; } table th, table td { border-bottom:1px solid #ddd; text-align:left; font-weight:normal; } table td { border-bottom:1px solid #eee; font-style:normal; background-position:1em .5em; background-repeat:no-repeat; } -table th#headerSize, table td.filesize { width:3em; padding:0 1em; text-align:right; } -table th#headerDate, table td.date { width:11em; padding:0 .1em 0 1em; text-align:left; } +table th#headerName { width:100%; } +table th#headerSize, table td.filesize { min-width:3em; padding:0 1em; text-align:right; } +table th#headerDate, table td.date { min-width:11em; padding:0 .1em 0 1em; text-align:left; } /* Multiselect bar */ table.multiselect { top:63px; } @@ -87,7 +88,10 @@ table td.filename form { font-size:.85em; margin-left:3em; margin-right:3em; } #fileList tr td.filename>input[type="checkbox"]:first-child { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; float:left; margin:.7em 0 0 1em; /* bigger clickable area doesn’t work in FF width:2.8em; height:2.4em;*/ -webkit-transition:opacity 200ms; -moz-transition:opacity 200ms; -o-transition:opacity 200ms; transition:opacity 200ms; } #fileList tr td.filename>input[type="checkbox"]:hover:first-child { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; filter:alpha(opacity=80); opacity:.8; } #fileList tr td.filename>input[type="checkbox"]:checked:first-child { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); opacity:1; } -#fileList tr td.filename { -webkit-transition:background-image 500ms; -moz-transition:background-image 500ms; -o-transition:background-image 500ms; transition:background-image 500ms; position:relative; } +#fileList tr td.filename { + position:relative; width:100%; + -webkit-transition:background-image 500ms; -moz-transition:background-image 500ms; -o-transition:background-image 500ms; transition:background-image 500ms; +} #select_all { float:left; margin:.3em 0.6em 0 .5em; } #uploadsize-message,#delete-confirm { display:none; } .fileactions { position:relative; top:.3em; font-size:.8em; float:right; } diff --git a/apps/files/js/files.js b/apps/files/js/files.js index feffa10c9f6..5083a0dca73 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -770,21 +770,14 @@ function procesSelection(){ var selected=getSelectedFiles(); var selectedFiles=selected.filter(function(el){return el.type=='file'}); var selectedFolders=selected.filter(function(el){return el.type=='dir'}); - if(selectedFiles.length==0 && selectedFolders.length==0){ + if(selectedFiles.length==0 && selectedFolders.length==0) { $('#headerName>span.name').text(t('files','Name')); $('#headerSize').text(t('files','Size')); $('#modified').text(t('files','Modified')); $('table').removeClass('multiselect'); $('.selectedActions').hide(); - $('#headerName').css('width','auto'); - $('#headerSize').css('width','auto'); - $('#headerDate').css('width','auto'); - $('table').css('padding-top','0'); - }else{ - var width={name:$('#headerName').css('width'),size:$('#headerSize').css('width'),date:$('#headerDate').css('width')}; - $('#headerName').css('width',width.name); - $('#headerSize').css('width',width.size); - $('#headerDate').css('width',width.date); + } + else { $('.selectedActions').show(); var totalSize=0; for(var i=0;i Date: Thu, 20 Dec 2012 11:14:21 +0100 Subject: remove timezone.js --- apps/files/js/timezone.js | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 apps/files/js/timezone.js (limited to 'apps/files/js') diff --git a/apps/files/js/timezone.js b/apps/files/js/timezone.js deleted file mode 100644 index 4749417199d..00000000000 --- a/apps/files/js/timezone.js +++ /dev/null @@ -1,12 +0,0 @@ -//send the clients time zone to the server -$(document).ready(function() { - var visitortimezone = (-new Date().getTimezoneOffset()/60); - $.ajax({ - type: "GET", - url: OC.filePath('files', 'ajax', 'timezone.php'), - data: 'time='+ visitortimezone, - success: function(){ - location.reload(); - } - }); -}); \ No newline at end of file -- cgit v1.2.3