From a19d59cc6f6655bd1a0158d802c8f7dbbec94700 Mon Sep 17 00:00:00 2001 From: Luke Hudson Date: Mon, 12 Nov 2012 17:56:40 +0000 Subject: [PATCH 1/4] BUGFIX: Ambiguous ID in MultipleFileAttachment --- code/MultipleFileAttachmentField.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/MultipleFileAttachmentField.php b/code/MultipleFileAttachmentField.php index 0b55f36..89dfe70 100644 --- a/code/MultipleFileAttachmentField.php +++ b/code/MultipleFileAttachmentField.php @@ -70,7 +70,7 @@ public function refresh(SS_HTTPRequest $r) { $files = new DataObjectSet(); $implodestring = implode(',',$ids); $implodestring = preg_replace("/^[,]/", "", $implodestring); - if($set = DataObject::get("File", "`ID` IN ($implodestring)")) { + if($set = DataObject::get("File", "`File`.`ID` IN ($implodestring)")) { foreach($set as $file) { $this->processFile($file); $files->push($file); From 0ec2aba5e3b15c8bd5a434b499242728ec73faf3 Mon Sep 17 00:00:00 2001 From: Luke Hudson Date: Wed, 14 Nov 2012 17:37:58 +0000 Subject: [PATCH 2/4] Cleanup indenting and add missing semicolons etc --- javascript/file_attachment_field.js | 116 ++++---- javascript/kickassets.js | 400 ++++++++++++++-------------- 2 files changed, 258 insertions(+), 258 deletions(-) diff --git a/javascript/file_attachment_field.js b/javascript/file_attachment_field.js index bbd1196..5d071c9 100644 --- a/javascript/file_attachment_field.js +++ b/javascript/file_attachment_field.js @@ -6,9 +6,9 @@ $(function() { $(this).fancybox({ 'width' : '90%', 'height' : '98%', - 'autoScale' : false, + 'autoScale' : false, 'padding' : 0, - 'transitionIn' : 'none', + 'transitionIn' : 'none', 'transitionOut' : 'none', 'titleShow' : false, 'type' : 'iframe', @@ -31,9 +31,9 @@ $(function() { $parentField.attr('data-refreshlink'), { 'ids' : ids.split(',') } ); - $parentField = null; + $parentField = null; } - }) + }); }); $('.detach_btn').live("click",function() { @@ -47,7 +47,7 @@ $(function() { $div.find('.file_drop').addClass('empty').css('background-image','none'); $div.find('.file_name').empty(); $(this).remove(); - $div.find('input[value='+id+']').val(0); + $div.find('input[value='+id+']').val(0); } showNoFile(false); return false; @@ -55,8 +55,8 @@ $(function() { $('.file_attach_upload').live("change", function(e) { doUpload($(this), e.target.files, $(this).attr('data-uploadurl')); - e.preventDefault(); - e.stopPropagation(); + e.preventDefault(); + e.stopPropagation(); }).live("mouseenter", function() { $(this).siblings('.file_upload_btn').addClass('over'); }).live("mouseleave", function() { @@ -70,7 +70,7 @@ $(function() { $('.file_cancel_btn').show(); } $('.controls_no_file').fadeIn(); - }) + }); }; @@ -78,10 +78,10 @@ $(function() { $('.controls_no_file').fadeOut(function() { $('.file_cancel_btn').hide(); $('.controls_has_file').fadeIn(); - }) - } + }); + }; - $('.replace_btn').live("click", function() {showNoFile(true)}); + $('.replace_btn').live("click", function() {showNoFile(true);}); $('.file_cancel_btn').live("click", showHasFile); @@ -91,23 +91,23 @@ $(function() { var $t = $(this); $.get($t.attr('href'), function() { $t.siblings('.detach_btn').click(); - }) + }); } return false; }); var doUpload = function($t, files, url) { - var http = new XMLHttpRequest(); - if($t.closest('.FileAttachmentField').is('.single') && files.length > 1) { + var http = new XMLHttpRequest(); + if($t.closest('.FileAttachmentField').is('.single') && files.length > 1) { return false; - } + } var $progressBar = $t.closest('.FileAttachmentField').find('.progress'); var uploadTimeout = window.setTimeout(function() { $progressBar.parent().css('visibility', 'visible'); // Update progress bar - http.upload.addEventListener("progress", function (evt) { + http.upload.addEventListener("progress", function (evt) { if (evt.lengthComputable) { $progressBar.css('width', (evt.loaded / evt.total) * 100 + "%"); } @@ -115,7 +115,7 @@ $(function() { } }, false); },1000); - var url = $t.attr('data-uploadurl'); + url = $t.attr('data-uploadurl'); http.addEventListener("load", function () { window.clearTimeout(uploadTimeout); @@ -133,52 +133,52 @@ $(function() { }, false); - if (typeof(FormData) != 'undefined') { - var form = new FormData(); + if (typeof(FormData) != 'undefined') { + var form = new FormData(); - for (var i = 0; i < files.length; i++) { - form.append('file[]', files[i]); - } + for (var i = 0; i < files.length; i++) { + form.append('file[]', files[i]); + } - http.open('POST', url); - http.send(form); - } + http.open('POST', url); + http.send(form); + } else { - alert('Your browser does not support standard HTML5 Drag and Drop'); - } - - } - - var dnd = { - ready : function() { - $('.file_drop').live('dragenter', function(e) { - e.preventDefault(); - e.stopPropagation(); - $(this).addClass('over'); - }).live('dragover', function(e) { - e.preventDefault(); - e.stopPropagation(); - }).live('drop', function(e) { - if(e.handled == true) return; - e.handled = true; - if(e.originalEvent.dataTransfer) { - if (e.originalEvent.dataTransfer.files.length) { - - var files = e.originalEvent.dataTransfer.files; - var $t = $(this); - doUpload($t, files, $t.attr('data-uploadurl')); - e.preventDefault(); - e.stopPropagation(); - $(this).removeClass('over'); - - } - } - }).live('dragleave', function(e) { + alert('Your browser does not support standard HTML5 Drag and Drop'); + } + + }; + + var dnd = { + ready : function() { + $('.file_drop').live('dragenter', function(e) { + e.preventDefault(); + e.stopPropagation(); + $(this).addClass('over'); + }).live('dragover', function(e) { + e.preventDefault(); + e.stopPropagation(); + }).live('drop', function(e) { + if(e.handled == true) return; + e.handled = true; + if(e.originalEvent.dataTransfer) { + if (e.originalEvent.dataTransfer.files.length) { + + var files = e.originalEvent.dataTransfer.files; + var $t = $(this); + doUpload($t, files, $t.attr('data-uploadurl')); + e.preventDefault(); + e.stopPropagation(); + $(this).removeClass('over'); + + } + } + }).live('dragleave', function(e) { e.preventDefault(); e.stopPropagation(); $(this).removeClass('over'); - }); - } + }); + } @@ -186,5 +186,5 @@ $(function() { $('.file_drop').livequery(dnd.ready); -}) +}); })(jQuery); \ No newline at end of file diff --git a/javascript/kickassets.js b/javascript/kickassets.js index c3fb823..5435bad 100644 --- a/javascript/kickassets.js +++ b/javascript/kickassets.js @@ -2,138 +2,138 @@ var refreshFiles = function() { $('#drop').load(window.location.href); }; - - - var dnd = { - ready : function() - { - $('#drop, #replace-file') - .live( - 'dragenter', - function(e) { - e.preventDefault(); - e.stopPropagation(); - $(this).addClass('over'); - } - ) - .live( + + + var dnd = { + ready : function() + { + $('#drop, #replace-file') + .live( + 'dragenter', + function(e) { + e.preventDefault(); + e.stopPropagation(); + $(this).addClass('over'); + } + ) + .live( 'dragover', function(e) { e.preventDefault(); e.stopPropagation(); } - - ) - .live( - 'drop', - function(e) { - if(e.originalEvent.dataTransfer) { - if (e.originalEvent.dataTransfer.files.length) { - dnd.upload(e.originalEvent.dataTransfer.files, $(this).data('uploadurl')); - e.preventDefault(); - e.stopPropagation(); + + ) + .live( + 'drop', + function(e) { + if(e.originalEvent.dataTransfer) { + if (e.originalEvent.dataTransfer.files.length) { + dnd.upload(e.originalEvent.dataTransfer.files, $(this).data('uploadurl')); + e.preventDefault(); + e.stopPropagation(); + $(this).removeClass('over'); + } + } + } + ) + .live( + 'dragleave', + function(e) { + e.preventDefault(); + e.stopPropagation(); $(this).removeClass('over'); - } - } - } - ) - .live( - 'dragleave', - function(e) { - e.preventDefault(); - e.stopPropagation(); - $(this).removeClass('over'); - } - ); - - - }, - - upload : function(files,url) - { - // This is a work-around for Safari occaisonally hanging when doing a - // file upload. For some reason, an additional HTTP request for a blank - // page prior to sending the form will force Safari to work correctly. - -// $.get('file/blank.html'); - - var http = new XMLHttpRequest(); - // var progressBar = document.getElementById('progress'); - // - // // Update progress bar - // http.upload.addEventListener("progress", function (evt) { - // if (evt.lengthComputable) { - // progressBar.style.width = (evt.loaded / evt.total) * 100 + "%"; - // } - // else { - // } - // }, false); - - http.addEventListener("load", function () { - if(http.responseText != "OK") { - apprise(http.responseText, {appendTo:'#drop'}); - } - refreshFiles(); - if($('#drop').is('.open')) { - var id = $('#Form_FileEditForm').find('[name=ID]').val(); - $('li[data-id='+id+'] img').dblclick(); + } + ); + + + }, + + upload : function(files,url) + { + // This is a work-around for Safari occaisonally hanging when doing a + // file upload. For some reason, an additional HTTP request for a blank + // page prior to sending the form will force Safari to work correctly. + + // $.get('file/blank.html'); + + var http = new XMLHttpRequest(); + // var progressBar = document.getElementById('progress'); + // + // // Update progress bar + // http.upload.addEventListener("progress", function (evt) { + // if (evt.lengthComputable) { + // progressBar.style.width = (evt.loaded / evt.total) * 100 + "%"; + // } + // else { + // } + // }, false); + +http.addEventListener("load", function () { + if(http.responseText != "OK") { + apprise(http.responseText, {appendTo:'#drop'}); + } + refreshFiles(); + if($('#drop').is('.open')) { + var id = $('#Form_FileEditForm').find('[name=ID]').val(); + $('li[data-id='+id+'] img').dblclick(); + } + }, false); + + + if (typeof(FormData) != 'undefined') { + var form = new FormData(); + + + for (var i = 0; i < files.length; i++) { + form.append('file[]', files[i]); + } + + http.open('POST', url); + http.send(form); + } else { + alert('Your browser does not support standard HTML5 Drag and Drop'); } - }, false); + }, + getFileSize : function(bytes) + { + switch (true) { + case (bytes < Math.pow(2,10)): { + return bytes + ' Bytes'; + } + case (bytes >= Math.pow(2,10) && bytes < Math.pow(2,20)): { + return Math.round(bytes / Math.pow(2,10)) +' KB'; + } + case (bytes >= Math.pow(2,20) && bytes < Math.pow(2,30)): { + return Math.round((bytes / Math.pow(2,20)) * 10) / 10 + ' MB'; + } + case (bytes > Math.pow(2,30)): { + return Math.round((bytes / Math.pow(2,30)) * 100) / 100 + ' GB'; + } + } + } + }; - if (typeof(FormData) != 'undefined') { - var form = new FormData(); - - - for (var i = 0; i < files.length; i++) { - form.append('file[]', files[i]); - } - - http.open('POST', url); - http.send(form); - } else { - alert('Your browser does not support standard HTML5 Drag and Drop'); - } - }, - - getFileSize : function(bytes) - { - switch (true) { - case (bytes < Math.pow(2,10)): { - return bytes + ' Bytes'; - }; - case (bytes >= Math.pow(2,10) && bytes < Math.pow(2,20)): { - return Math.round(bytes / Math.pow(2,10)) +' KB'; - }; - case (bytes >= Math.pow(2,20) && bytes < Math.pow(2,30)): { - return Math.round((bytes / Math.pow(2,20)) * 10) / 10 + ' MB'; - }; - case (bytes > Math.pow(2,30)): { - return Math.round((bytes / Math.pow(2,30)) * 100) / 100 + ' GB'; - }; - } - } - }; - $(document).ready(dnd.ready); $(document).ready(function() { // $('#drop, #replace-file').livequery(dnd.ready); // $('#drop').css('height',$('body').height()-20+'px'); var toRename; - + $('#filesystemsync').click(function() { $.get($(this).attr('href'), function(data) { apprise(data, {appendTo:'#drop'}); }); return false; }); - + $('#newfolder').click(function() { var $t = $(this); $('#drop').load($t.attr('href')); return false; }); - + $('.editable').live("dblclick", function(e) { if(e.target.tagName == "INPUT") {e.target.select();return} var $t = $(this); @@ -146,7 +146,7 @@ $(document).ready(function() { }); - + $('.editable input').live("blur", function(e) { if(!e.currentTarget.tagName == "INPUT") return; var newName = $(this).val(); @@ -155,8 +155,8 @@ $(document).ready(function() { $li.removeClass('ui-selected'); $li.load( $('base').attr('href')+"admin/files/updatefilename", - { - 'new' : newName, + { + 'new' : newName, 'fileid' : $li.data('id') } ); @@ -165,15 +165,15 @@ $(document).ready(function() { $(this).focusout(); } }); - - + + $('#drop').livequery(function() {$(this).selectable({ cancel : '.editable,input', filter : 'li', selected : function() { if($('.ui-selected').length > 1) { - $('a.togglestate.single').addClass('disabled'); + $('a.togglestate.single').addClass('disabled'); $('a.togglestate:not(.single)').removeClass('disabled'); } else { @@ -185,32 +185,32 @@ $(document).ready(function() { $('a.togglestate').addClass('disabled'); } });}); - + $('#directory_list li').livequery(function() {$(this).draggable({ - delay: 500, - distance: 30, - helper: function(){ - var selected = $('#directory_list .ui-selected'); - if (selected.length === 0) { - selected = $(this); - } - var container = $('
').attr('id', 'draggingContainer'); - container.append(selected.clone()); - return container; - } + delay: 500, + distance: 30, + helper: function(){ + var selected = $('#directory_list .ui-selected'); + if (selected.length === 0) { + selected = $(this); + } + var container = $('
').attr('id', 'draggingContainer'); + container.append(selected.clone()); + return container; + } });}); - + $('#directory_list.gallery li img, #directory_list.grid li').live("click", function(event) { if(!event.metaKey) { $('.ui-selected').removeClass('ui-selected'); - $(this).closest('li').addClass('ui-selected'); + $(this).closest('li').addClass('ui-selected'); } else { $(this).closest('li').toggleClass('ui-selected'); } if($('.ui-selected').length) { if($('.ui-selected').length > 1) { - $('a.togglestate.single').addClass('disabled'); + $('a.togglestate.single').addClass('disabled'); $('a.togglestate:not(.single)').removeClass('disabled'); } else { @@ -222,7 +222,7 @@ $(document).ready(function() { } event.stopPropagation(); }); - + // #('#drop').live("click",function(event) { // $('.ui-selected').removeClass('ui-selected'); // }) @@ -233,7 +233,7 @@ $(document).ready(function() { $(this).css('background','#ddd'); }, out: function() { - $(this).css('background','transparent'); + $(this).css('background','transparent'); }, drop: function(event, ui) { var $li = $(this); @@ -248,23 +248,23 @@ $(document).ready(function() { 'source': files, 'dest': $li.data('id') } - ) + ); }, tolerance: 'pointer' });}); - - + + $('li:not(.head)').each(function(i,e) { if(i % 2 == 1) { $(e).addClass('even'); } }); - - + + var timeout; $('#search input').keyup(function() { if(timeout) window.clearTimeout(timeout); - s = $(this).val(); + s = $(this).val(); timeout = window.setTimeout(function() { $('#directory_list li:not(.head)').hide(); $('#directory_list li:not(.head)').each(function() { @@ -272,11 +272,11 @@ $(document).ready(function() { if($(this).find('.filename').text().match(reg)) { $(this).show(); } - }); - },150); + }); + },150); }); - - + + $('img[data-tooltipurl]').livequery(function() { var $t = $(this); var tooltipType = $t.data('tooltipurl'); @@ -294,15 +294,15 @@ $(document).ready(function() { }); }); - + var openEditWindow = function (callback) { if(!$('#drop').hasClass('open')) { doResize(); $('#drop').animate({'width': $(window).width()-360+'px'}); $('#edit').animate({'width':'350px'},function() { - $('select[name=ParentID]').find('option').each(function() { + $('select[name=ParentID]').find('option').each(function() { $(this).html($(this).html().replace(/__/g,'  ')); - }) + }); $('select[name=ParentID]').chosen(); if(callback && typeof(callback) == "function") { callback(); @@ -312,20 +312,20 @@ $(document).ready(function() { } }; - + var closeEditWindow = function (callback) { if($('#drop').hasClass('open')) { $('#drop').animate({'width':$(window).width()-10+'px'}); $('#edit').animate({'width':'0'}, function() { if(callback && typeof(callback) == "function") { callback(); - } + } }); $('#drop').removeClass('open'); } - } - + }; + var doResize = function () { $('#drop, #edit').css('height', ($(window).height()-98)+'px'); if($('#drop').hasClass('open')) { @@ -341,14 +341,14 @@ $(document).ready(function() { $('body').removeClass('small'); } }; - - + + var doUpload = function(files, url) { - var http = new XMLHttpRequest(); + var http = new XMLHttpRequest(); var $progressBar = $('#progress'); var uploadTimeout = window.setTimeout(function() { // Update progress bar - http.upload.addEventListener("progress", function (evt) { + http.upload.addEventListener("progress", function (evt) { if (evt.lengthComputable) { $progressBar.css('width', (evt.loaded / evt.total) * 100 + "%"); } @@ -368,23 +368,23 @@ $(document).ready(function() { }, false); - if (typeof(FormData) != 'undefined') { - var form = new FormData(); + if (typeof(FormData) != 'undefined') { + var form = new FormData(); - for (var i = 0; i < files.length; i++) { - form.append('file[]', files[i]); - } + for (var i = 0; i < files.length; i++) { + form.append('file[]', files[i]); + } - http.open('POST', url); - http.send(form); - } + http.open('POST', url); + http.send(form); + } else { - alert('Your browser does not support standard HTML5 Drag and Drop'); - } + alert('Your browser does not support standard HTML5 Drag and Drop'); + } + + }; + - } - - $('.file img, .grid .file').live("dblclick", function(e) { if($(e.target).is('.editable')) return; var $t = $(this).closest('li'); @@ -394,17 +394,17 @@ $(document).ready(function() { ); }); - + $('.folder img, .grid .folder').live('dblclick', function(e) { if($(e.target).is('.editable')) return; var $t = $(this).closest('li'); window.location.href = $t.data('link'); return false; }); - + $('#delete').live("click", function() { if($(this).is('.disabled')) return false; - + var $t = $(this); var files = []; $('.ui-selected:visible').each(function() { @@ -412,92 +412,92 @@ $(document).ready(function() { }); apprise($t.data('confirmtext'),{'confirm':true,appendTo:'#drop'},function(r) { if(r) { - $('#drop').load($t.attr('href'), {list : files}); + $('#drop').load($t.attr('href'), {list : files}); } }); return false; }); - + $('#edit_button').click(function() { if(!$(this).is('.disabled')) { if($('#directory_list').is('.grid')) { - $('.ui-selected:first').dblclick(); + $('.ui-selected:first').dblclick(); } else { $('.ui-selected:first img').dblclick(); } - + } return false; }); - - - + + + $('#Form_FileEditForm_action_doFileCancel').live("click", function() { closeEditWindow(); return false; }); - + $('#Form_FileEditForm').livequery(function() { $(this).ajaxForm(function(response) { closeEditWindow(function() { refreshFiles(); }); }); - + }); - + $('.file_attach_upload').live("change", function(e) { doUpload(e.target.files, $('#drop').data('uploadurl')); - e.preventDefault(); - e.stopPropagation(); + e.preventDefault(); + e.stopPropagation(); }).live("mouseenter", function() { $(this).siblings('.file_upload_btn').addClass('over'); }).live("mouseleave", function() { $(this).siblings('.file_upload_btn').removeClass('over'); }); - - - $(window).resize(doResize); - $('#drop').css('width', $(window).width()-10+'px'); + + + $(window).resize(doResize); + $('#drop').css('width', $(window).width()-10+'px'); doResize(); $('#footer').css('visibility','visible'); var vars = [], hash; - var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); - for(var i = 0; i < hashes.length; i++) { - hash = hashes[i].split('='); - vars.push(hash[0]); - vars[hash[0]] = hash[1]; - } + var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); + for(var i = 0; i < hashes.length; i++) { + hash = hashes[i].split('='); + vars.push(hash[0]); + vars[hash[0]] = hash[1]; + } if(vars["edit"]) { $('li[data-id='+vars["edit"]+'] img').dblclick(); } - + var ajaxTimeout; - + $('body').ajaxStart(function() { ajaxTimeout = window.setTimeout(function() { window.parent.jQuery.fancybox.showActivity(); - },1500) + },1500); }).ajaxStop(function() { window.clearTimeout(ajaxTimeout); window.parent.jQuery.fancybox.hideActivity(); }); - + // FileAttachmentField function getParent() { return window.parent.$parentField; } - + if(getParent() && !getParent().is('.multi')) { $('#attach').addClass('single'); } - + $('#attach').click(function() { if(!$(this).is('.disabled')) { var ids = []; @@ -505,11 +505,11 @@ $(document).ready(function() { ids.push($(this).data('id')); }); $('#selected_files').append(ids.join(',')); - window.parent.jQuery.fancybox.close(); + window.parent.jQuery.fancybox.close(); } }); - - + + $('#view a').click(function() { var $t = $(this); $.post( @@ -520,11 +520,11 @@ $(document).ready(function() { $('#directory_list').attr('class', response); } ); - return false; + return false; }); }); - + })(jQuery); \ No newline at end of file From cdc6b1b89678c1fc2d5c5008c7af79b8fa03d193 Mon Sep 17 00:00:00 2001 From: Luke Hudson Date: Wed, 14 Nov 2012 17:38:49 +0000 Subject: [PATCH 3/4] BUGFIX: Uploading now preserves previously uploaded files --- javascript/file_attachment_field.js | 32 ++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/javascript/file_attachment_field.js b/javascript/file_attachment_field.js index 5d071c9..86ffd17 100644 --- a/javascript/file_attachment_field.js +++ b/javascript/file_attachment_field.js @@ -2,6 +2,19 @@ var $parentField; (function($) { $(function() { + + function fetchIDs($parentField) { + var ids = []; + var $wrap = $parentField.closest('.FileAttachmentField'); + // make sure we don't lose any unsaved files. + if($wrap.is('.multi')) { + $wrap.find('.file_block').each(function() { + ids.push( $(this).find(':hidden').val() ); + }); + } + return ids; + } + $('.file_attach_btn').livequery(function() { $(this).fancybox({ 'width' : '90%', @@ -18,18 +31,14 @@ $(function() { 'onCleanup' : function() { var ids = $('#fancybox-frame').contents().find('#selected_files').text(); if(!ids.length) return; + ids = ids.split(','); + ids = ids.concat(fetchIDs($parentField)); var $wrap = $parentField.closest('.FileAttachmentField'); - // make sure we don't lose any unsaved files. - if($wrap.is('.multi')) { - $wrap.find('.file_block').each(function() { - ids += ','; - ids += $(this).find(':hidden').val(); - }) - } + $wrap.find('.attached_files').load( $parentField.attr('data-refreshlink'), - { 'ids' : ids.split(',') } + { 'ids' : ids } ); $parentField = null; } @@ -124,10 +133,13 @@ $(function() { alert(http.responseText); } else { - var $div = $t.closest('.FileAttachmentField') + var ids = http.responseText.split(','); + ids = ids.concat(fetchIDs($t)); + + var $div = $t.closest('.FileAttachmentField'); $div.find('.attached_files').load( $div.attr('data-refreshlink'), - { 'ids' : http.responseText.split(',')} + { 'ids' : ids } ); } }, false); From 26c99b37fd3afe3dea77fbad6bd968d6a52f4db6 Mon Sep 17 00:00:00 2001 From: Luke Hudson Date: Wed, 14 Nov 2012 17:45:16 +0000 Subject: [PATCH 4/4] BUGFIX: Fix scrolling bug in KickAssets window. This bug could be reproduced by opening the kickassets admin window and making a rectangular selection which extended outside the window. This would cause scrollbars to appear on the kickassets window, which would obscure the file list scrollbar. Also the button bar at bottom would disappear out of view. --- css/kickassets.css | 3 +++ templates/KickAssetAdmin.ss | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/css/kickassets.css b/css/kickassets.css index c2c0a65..6580130 100644 --- a/css/kickassets.css +++ b/css/kickassets.css @@ -1,3 +1,6 @@ +body#KickAssets { + overflow: hidden; +} #directory_list {padding:10px;} #directory_list li {list-style:none;} diff --git a/templates/KickAssetAdmin.ss b/templates/KickAssetAdmin.ss index a3977c3..719ea73 100644 --- a/templates/KickAssetAdmin.ss +++ b/templates/KickAssetAdmin.ss @@ -5,7 +5,7 @@ <% _t('AssetAdmin.MENUTITLE','Files & Images') %> - +