commit
b4e89871dd
@ -1,5 +1,12 @@ |
||||
form {display:inline} |
||||
td.remove>img,td.select>input{display:none;cursor:pointer} |
||||
td.select,td.remove{width:1em} |
||||
tr:hover>td.remove>img{display:inline} |
||||
li.selected{background-color:#ddd} |
||||
form { display:inline; } |
||||
td.password>img, td.remove>img{ display:none;cursor:pointer; } |
||||
td.password>span { margin-right:1.2em; } |
||||
td.password { width:12em; } |
||||
td.password>img { float:right; } |
||||
|
||||
td.remove { width:1em } |
||||
tr:hover>td.password>span{ margin:0; } |
||||
tr:hover>td.remove>img, tr:hover>td.password>img { display:inline; } |
||||
li.selected { background-color:#ddd; } |
||||
#content>table { margin-top:6.5em; } |
||||
table { width:100%; } |
||||
|
||||
@ -1,18 +1,20 @@ |
||||
<input type="hidden" id="baseUrl" value="<?php echo $_['baseUrl'];?>"/>
|
||||
<table id="linklist"> |
||||
<tbody> |
||||
<thead id="controls"> |
||||
<tr id="newlink_row"> |
||||
<form action="#" id="newlink"> |
||||
<td class="path"><input placeholder="Path" id="path"/></td> |
||||
<td><input type="submit" value="Share" /></td> |
||||
</form> |
||||
</tr> |
||||
</thead> |
||||
<tbody> |
||||
<?php foreach($_['links'] as $link):?> |
||||
<tr class="link" id="<?php echo $link['token'];?>">
|
||||
<td class="path"><?php echo $link['path'];?></td>
|
||||
<td class="link"><a href="get.php?token=<?php echo $link['token'];?>"><?php echo $_['baseUrl'];?>?token=<?php echo $link['token'];?></a></td>
|
||||
<td><input type="submit" class="delete" data-token="<?php echo $link['token'];?>" value="<?php echo $l->t( 'Delete' ); ?>" /></td>
|
||||
</tr> |
||||
<tr class="link" id="<?php echo $link['token'];?>">
|
||||
<td class="path"><?php echo $link['path'];?></td>
|
||||
<td class="link"><input type="text" value="<?php echo $_['baseUrl'];?>?token=<?php echo $link['token'];?>" /></td>
|
||||
<td><input type="submit" class="delete" data-token="<?php echo $link['token'];?>" value="<?php echo $l->t( 'Delete' ); ?>" /></td>
|
||||
</tr> |
||||
<?php endforeach;?> |
||||
</tbody> |
||||
</table> |
||||
|
||||
@ -1,4 +0,0 @@ |
||||
<a href="<?php echo link_to("files_publiclink", "get.php?token=".$_['token']); ?>"><img src="<?php echo image_path("", "actions/go-home.png"); ?>" alt="Root" /></a>
|
||||
<?php foreach($_["breadcrumb"] as $crumb): ?> |
||||
<a href="<?php echo link_to("files_publiclink", "get.php?token=".$_['token']."&path=".$crumb["dir"]); ?>"><?php echo htmlspecialchars($crumb["name"]); ?></a>
|
||||
<?php endforeach; ?> |
||||
@ -1,9 +0,0 @@ |
||||
<?php foreach($_["files"] as $file): ?> |
||||
<tr> |
||||
<td class="selection"><input type="checkbox" /></td> |
||||
<td class="filename"><a style="background-image:url(<?php if($file["type"] == "dir") echo mimetype_icon("dir"); else echo mimetype_icon($file["mime"]); ?>)" href="<?php if($file["type"] == "dir") echo link_to("files_publiclink", "get.php?token=".$_['token']."&path=".$file["directory"]."/".$file["name"]); else echo link_to("files_publiclink", "get.php?token=".$_['token']."&path=".$file["directory"]."/".$file["name"]); ?>" title=""><?php echo htmlspecialchars($file["name"]); ?></a></td>
|
||||
<td class="filesize"><?php echo human_file_size($file["size"]); ?></td>
|
||||
<td class="date"><?php if($file["type"] != "dir") echo $file["date"]; ?></td>
|
||||
<td class="fileaction"><a href="" title="">▾</a></td> |
||||
</tr> |
||||
<?php endforeach; ?> |
||||
@ -1,17 +0,0 @@ |
||||
<p class="nav"> |
||||
<?php echo($_['breadcrumb']); ?> |
||||
</p> |
||||
<table cellspacing="0"> |
||||
<thead> |
||||
<tr> |
||||
<th><input type="checkbox" id="select_all" /></th> |
||||
<th><?php echo $l->t( 'Name' ); ?></th>
|
||||
<th><?php echo $l->t( 'Size' ); ?></th>
|
||||
<th><?php echo $l->t( 'Modified' ); ?></th>
|
||||
<th></th> |
||||
</tr> |
||||
</thead> |
||||
<tbody id="fileList"> |
||||
<?php echo($_['fileList']); ?> |
||||
</tbody> |
||||
</table> |
||||
@ -0,0 +1,6 @@ |
||||
ul.multiselectoptions { z-index:49; position:absolute; background-color:#fff; padding-top:.5em; border-bottom-left-radius:.5em; border-bottom-right-radius:.5em; border:1px solid #ddd; border-top:none; } |
||||
div.multiselect { padding-right:.6em; display:inline; position:relative; display:inline-block } |
||||
div.multiselect.active { background-color:#fff; border-bottom:none; border-bottom-left-radius:0; border-bottom-right-radius:0; z-index:50; position:relative } |
||||
div.multiselect>span:first-child { margin-right:2em; } |
||||
div.multiselect>span:last-child { float:right; position:relative } |
||||
ul.multiselectoptions input.new{ margin:0; padding-bottom:0.2em; padding-top:0.2em; border-top-left-radius:0; border-top-right-radius:0; } |
||||
|
Before Width: | Height: | Size: 495 B |
|
Before Width: | Height: | Size: 1012 B |
|
After Width: | Height: | Size: 452 B |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 452 B |
|
After Width: | Height: | Size: 2.4 KiB |
@ -0,0 +1,160 @@ |
||||
(function( $ ){ |
||||
var multiSelectId=-1; |
||||
$.fn.multiSelect=function(options){ |
||||
multiSelectId++; |
||||
var settings = { |
||||
'createCallback':false, |
||||
'createText':false, |
||||
'title':this.attr('title'), |
||||
'checked':[], |
||||
'oncheck':false, |
||||
'onuncheck':false, |
||||
}; |
||||
$.extend(settings,options);
|
||||
var button=$('<div class="multiselect button"><span>'+settings.title+'</span><span>▾</span></div>'); |
||||
if(settings.checked.length>0){ |
||||
button.children('span').first().text(settings.checked.join(', ')); |
||||
} |
||||
var span=$('<span/>'); |
||||
span.append(button); |
||||
button.data('id',multiSelectId); |
||||
button.selectedItems=[]; |
||||
this.hide(); |
||||
this.before(span); |
||||
settings.minWidth=button.width(); |
||||
button.css('min-width',settings.minWidth); |
||||
settings.minOuterWidth=button.outerWidth()-2; |
||||
button.data('settings',settings); |
||||
|
||||
button.click(function(event){ |
||||
var button=$(this); |
||||
if(button.parent().children('ul').length>0){ |
||||
button.parent().children('ul').slideUp(400,function(){ |
||||
button.parent().children('ul').remove(); |
||||
button.removeClass('active'); |
||||
}); |
||||
return; |
||||
} |
||||
var lists=$('ul.multiselectoptions'); |
||||
lists.slideUp(400,function(){ |
||||
lists.remove(); |
||||
$('div.multiselect').removeClass('active'); |
||||
button.addClass('active'); |
||||
}); |
||||
button.addClass('active'); |
||||
event.stopPropagation(); |
||||
var options=$(this).parent().next().children().map(function(){return $(this).val()}); |
||||
var list=$('<ul class="multiselectoptions"/>').hide().appendTo($(this).parent()); |
||||
function createItem(item,checked){ |
||||
var id='ms'+multiSelectId+'-option-'+item; |
||||
var input=$('<input id="'+id+'" type="checkbox"/>'); |
||||
var label=$('<label for="'+id+'">'+item+'</label>'); |
||||
if(settings.checked.indexOf(item)!=-1 || checked){ |
||||
input.attr('checked','checked'); |
||||
} |
||||
if(checked){ |
||||
settings.checked.push(item); |
||||
} |
||||
input.change(function(){ |
||||
var groupname=$(this).next().text(); |
||||
if($(this).attr('checked')){ |
||||
settings.checked.push(groupname); |
||||
if(settings.oncheck){ |
||||
if(settings.oncheck(groupname)===false){ |
||||
$(this).removeAttr('checked'); |
||||
return; |
||||
} |
||||
} |
||||
}else{ |
||||
var index=settings.checked.indexOf(groupname); |
||||
settings.checked.splice(index,1); |
||||
if(settings.onuncheck){ |
||||
if(settings.onuncheck(groupname)===false){ |
||||
$(this).attr('checked','checked'); |
||||
return; |
||||
} |
||||
} |
||||
} |
||||
var oldWidth=button.width(); |
||||
if(settings.checked.length>0){ |
||||
button.children('span').first().text(settings.checked.join(', ')); |
||||
}else{ |
||||
button.children('span').first().text(settings.title); |
||||
} |
||||
var newOuterWidth=Math.max((button.outerWidth()-2),settings.minOuterWidth)+'px' |
||||
var newWidth=Math.max(button.width(),settings.minWidth); |
||||
button.css('height',button.height()); |
||||
button.css('white-space','nowrap'); |
||||
button.css('width',oldWidth); |
||||
button.animate({'width':newWidth},undefined,undefined,function(){ |
||||
button.css('width',''); |
||||
}); |
||||
list.animate({'width':newOuterWidth}); |
||||
}); |
||||
var li=$('<li></li>'); |
||||
li.append(input).append(label); |
||||
return li; |
||||
} |
||||
$.each(options,function(index,item){ |
||||
list.append(createItem(item)); |
||||
}); |
||||
button.parent().data('preventHide',false); |
||||
if(settings.createText){ |
||||
var li=$('<li>+ <em>'+settings.createText+'<em></li>'); |
||||
li.click(function(event){ |
||||
li.empty(); |
||||
var input=$('<input class="new">'); |
||||
li.append(input); |
||||
input.focus(); |
||||
input.css('width',button.width()); |
||||
button.parent().data('preventHide',true); |
||||
input.keypress(function(event) { |
||||
if(event.keyCode == 13) { |
||||
event.preventDefault(); |
||||
event.stopPropagation(); |
||||
var li=$(this).parent(); |
||||
$(this).remove(); |
||||
li.text('+ '+settings.createText); |
||||
li.before(createItem($(this).val())); |
||||
li.prev().children('input').trigger('click'); |
||||
button.parent().data('preventHide',false); |
||||
var select=button.parent().next(); |
||||
select.append($('<option value="'+$(this).val()+'">'+$(this).val()+'</option>')); |
||||
if(settings.createCallback){ |
||||
settings.createCallback(); |
||||
} |
||||
} |
||||
}); |
||||
input.blur(function(){ |
||||
event.preventDefault(); |
||||
event.stopPropagation(); |
||||
$(this).remove(); |
||||
li.text('+ '+settings.createText); |
||||
setTimeout(function(){ |
||||
button.parent().data('preventHide',false); |
||||
},100); |
||||
}); |
||||
}); |
||||
list.append(li); |
||||
} |
||||
var pos=button.position(); |
||||
list.css('top',pos.top+button.outerHeight()-5); |
||||
list.css('left',pos.left+3); |
||||
list.css('width',(button.outerWidth()-2)+'px'); |
||||
list.slideDown(); |
||||
list.click(function(event){ |
||||
event.stopPropagation(); |
||||
}); |
||||
}); |
||||
$(window).click(function(){ |
||||
if(!button.parent().data('preventHide')){ |
||||
button.parent().children('ul').slideUp(400,function(){ |
||||
button.parent().children('ul').remove(); |
||||
button.removeClass('active'); |
||||
}); |
||||
} |
||||
}); |
||||
|
||||
return span; |
||||
}; |
||||
})( jQuery ); |
||||
@ -1,3 +0,0 @@ |
||||
<form class="searchbox" action="#" method="post"> |
||||
<input id='searchbox' type="search" name="query" value="<?php if(isset($_POST['query'])){echo $_POST['query'];};?>" class="prettybutton" autocomplete="off" />
|
||||
</form> |
||||
@ -1,5 +1,5 @@ |
||||
<?php foreach($_["breadcrumb"] as $crumb): ?> |
||||
<div class='crumb' data-dir='<?php echo $crumb["dir"];?>' style='background-image:url("<?php echo image_path('core','breadcrumb-divider.png');?>")'>
|
||||
<div class="crumb svg" data-dir='<?php echo $crumb["dir"];?>' style='background-image:url("<?php echo image_path('core','breadcrumb.png');?>")'>
|
||||
<a href="<?php echo link_to("files", "index.php?dir=".$crumb["dir"]); ?>"><?php echo htmlspecialchars($crumb["name"]); ?></a>
|
||||
</div> |
||||
<?php endforeach; ?> |
||||
<?php endforeach; ?> |
||||
|
||||
Loading…
Reference in new issue