1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2024-11-28 04:24:09 +01:00

Add slider to colapse tag filter

This commit is contained in:
Brice Maron 2012-07-03 13:47:09 +02:00
parent 715976d73d
commit abf07d70d1
7 changed files with 226 additions and 5 deletions

View File

@ -13,7 +13,21 @@
#rightcontent {
padding-top: 5px;
top: 3.5em !important;
}*/
}
.centercontent {
position:absolute;
left:0;
height:100%;
width: 15px;
background-color: #D5D5D5;
}
.centercontent .left_img , .centercontent .right_img {
margin-top: 20em;
}
.centercontent .right_img {
display:none;
}
#controls {
padding-left:20em;
}
@ -33,6 +47,8 @@
overflow: auto;
position: fixed;
top: 6.5em;
margin-left: 15px;
}
.bookmarks_addBml {
@ -240,9 +256,9 @@ li:hover em { display : none; }
}
#view_type {
position: absolute;
right: 13.5em;
top: 0;
position: absolute;
right: 33.5em;
top: 0;
}
/***** Lis View *****/

BIN
img/triangle-e.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

92
img/triangle-e.svg Normal file
View File

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16px"
height="16px"
id="svg6077"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="triangle-e.svg"
inkscape:export-filename="triangle-e.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs6079">
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3587-6-5-3-4-5-4-0-1"
id="linearGradient7308"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.54681372,0,0,-0.39376081,-9.13456,14.37044)"
x1="34.992828"
y1="0.94087797"
x2="34.992828"
y2="33.955856" />
<linearGradient
id="linearGradient3587-6-5-3-4-5-4-0-1">
<stop
offset="0"
style="stop-color:#000000;stop-opacity:1"
id="stop3589-9-2-2-3-2-53-4-3" />
<stop
offset="1"
style="stop-color:#363636;stop-opacity:1"
id="stop3591-7-4-73-7-9-86-9-3" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="22.197802"
inkscape:cx="-6.9113863"
inkscape:cy="8"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1680"
inkscape:window-height="1002"
inkscape:window-x="-4"
inkscape:window-y="-3"
inkscape:window-maximized="1" />
<metadata
id="metadata6082">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
inkscape:connector-curvature="0"
d="M 2,15.5 2,2.5 14,9 2,15.5 z"
id="path2843-0-1-6-6"
style="opacity:0.6;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
inkscape:connector-curvature="0"
d="m 2,13.99996 0,-13 12,6.49999 -12,6.50001 z"
id="path2843-39-5-5"
style="opacity:0.7;color:#000000;fill:url(#linearGradient7308);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
img/triangle-w.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 520 B

92
img/triangle-w.svg Normal file
View File

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16px"
height="16px"
id="svg6077"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="triangle-w.svg"
inkscape:export-filename="triangle-w.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<defs
id="defs6079">
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3587-6-5-3-4-5-4-0-1"
id="linearGradient7308"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-0.54681372,0,0,-0.39376081,25.13456,14.37044)"
x1="34.992828"
y1="0.94087797"
x2="34.992828"
y2="33.955856" />
<linearGradient
id="linearGradient3587-6-5-3-4-5-4-0-1">
<stop
offset="0"
style="stop-color:#000000;stop-opacity:1"
id="stop3589-9-2-2-3-2-53-4-3" />
<stop
offset="1"
style="stop-color:#363636;stop-opacity:1"
id="stop3591-7-4-73-7-9-86-9-3" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="22.197802"
inkscape:cx="1.0398514"
inkscape:cy="8"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1680"
inkscape:window-height="1002"
inkscape:window-x="-4"
inkscape:window-y="-3"
inkscape:window-maximized="1" />
<metadata
id="metadata6082">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
inkscape:connector-curvature="0"
d="M 14,15.5 14,2.5 2,9 14,15.5 z"
id="path2843-0-1-6-6"
style="opacity:0.6;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
<path
inkscape:connector-curvature="0"
d="m 14,13.99996 0,-13 -12,6.49999 12,6.50001 z"
id="path2843-39-5-5"
style="opacity:0.7;color:#000000;fill:url(#linearGradient7308);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -7,6 +7,7 @@ var bookmark_view = 'image';
$(document).ready(function() {
switchView();
$('.centercontent').click(toggleSideBar);
$('#view_type input').click(switchView);
$('#bookmark_add_submit').click(addBookmark);
$(window).resize(function () {
@ -22,7 +23,23 @@ $(document).ready(function() {
getBookmarks();
});
function toggleSideBar(){
if($('#leftcontent:visible')) {
$('#rightcontent').css('left','32.5em');
$('.right_img').hide();
$('.left_img').show();
}
$('#leftcontent').animate({width: 'toggle' },'normal', function() {
if(! $('#leftcontent').is(':visible')) {
$('#rightcontent').css('left','auto');
$('.left_img').hide();
$('.right_img').show();
}
$(window).trigger('resize');
});
}
function switchView(){
if(bookmark_view == 'list') { //Then switch to img
$('.bookmarks_list').addClass('bm_view_img');

View File

@ -41,10 +41,14 @@
</li>
<?php endforeach;?>
<ul>
</div>
<div id="rightcontent" class="rightcontent">
<div class="centercontent">
<img class="left_img svg" src="<?php echo OCP\image_path('bookmarks','triangle-w.svg'); ?>">
<img class="right_img svg" src="<?php echo OCP\image_path('bookmarks','triangle-e.svg'); ?>"></div>
<div class="bookmarks_list"></div>
<div id="firstrun" style="display: none;">
<?php