Permalink
Browse files

Quick fixes for inlineEdition - Probably to be rewritten properly.

(cherry picked from commit 53f1018)
  • Loading branch information...
1 parent e084b4d commit 6c78656a8d74f868485526a54cfdfeb1b9343273 @cdujeu cdujeu committed Jul 6, 2016
@@ -1580,6 +1580,7 @@ Class.create("FilesList", SelectableElements, {
var scrollTop = 0;
var addStyle = {fontSize: '12px'};
var span, posSpan;
+ var smallThumb = false;
if(this._displayMode == "list"){
span = item.select('span.text_label')[0];
posSpan = item.select('span.list_selectable_span')[0];
@@ -1588,10 +1589,20 @@ Class.create("FilesList", SelectableElements, {
scrollTop = this.htmlElement.down('div.table_rows_container').scrollTop;
}else if(this._displayMode == "thumb"){
span = item.select('div.thumbLabel')[0];
- posSpan = span;
+ if(item.hasClassName('fl-displayMode-thumbsize-small')){
+ posSpan = item;
+ smallThumb = true;
+ }else{
+ posSpan = span;
+ }
offset.top=-2;
offset.left=3;
scrollTop = this.htmlElement.down('.selectable_div').scrollTop;
+ addStyle = {
+ marginTop: item.hasClassName('fl-displayMode-thumbsize-large') ? '10px' : '6px',
+ padding: item.hasClassName('fl-displayMode-thumbsize-large') ? '2px': 0,
+ border: 0
+ };
}else if(this._displayMode == "detail"){
span = item.select('div.thumbLabel')[0];
posSpan = span;
@@ -1682,7 +1693,7 @@ Class.create("FilesList", SelectableElements, {
width:'46px',
zIndex:2500,
left:(pos.left+offset.left+origWidth)+'px',
- top:((pos.top+offset.top-scrollTop)+1)+'px'
+ top:smallThumb ? '182px' : ((pos.top+offset.top-scrollTop)+1)+'px'
});
var closeFunc = function(){
span.setStyle({color:''});
@@ -316,10 +316,11 @@ Class.create("FoldersTree", AjxpPane, {
var edit = new Element('input', {value:item.ajxpNode.getLabel('text'), id:'editbox'}).setStyle({
zIndex:5000,
position:'absolute',
- marginLeft:'0px',
- marginTop:'0px',
+ marginLeft:'13px',
+ marginTop:'5px',
height:'24px',
- padding: 0
+ padding: '2px',
+ border: 0
});
$(document.getElementsByTagName('body')[0]).insert({bottom:edit});
modal.showContent('editbox', (item.getWidth()-offset.left)+'', '20', true, false, {opacity:0.25, backgroundColor:'#fff'});
@@ -362,7 +363,7 @@ Class.create("FoldersTree", AjxpPane, {
buttons.addClassName("inlineEdition");
var ok = buttons.select('input[name="ok"]')[0];
ok.observe("click", onOkAction);
- var origWidth = edit.getWidth()-44;
+ var origWidth = edit.getWidth()-74;
var newWidth = origWidth;
if(origWidth < 70){
// Offset edit box to be sure it's always big enough.
@@ -381,7 +382,7 @@ Class.create("FoldersTree", AjxpPane, {
position:'absolute',
width:'46px',
zIndex:2500,
- left:(pos.left+offset.left+origWidth)+'px',
+ left:(pos.left+offset.left+origWidth + 15)+'px',
top:((pos.top+offset.top-scrollTop)-1)+'px'
});
var closeFunc = function(){

0 comments on commit 6c78656

Please sign in to comment.