Merge "New Navigation UI."

This commit is contained in:
Aaron Boodman 2013-12-17 03:30:07 +00:00 committed by Gerrit Code Review
commit 054b67bc04
24 changed files with 1228 additions and 546 deletions

View File

@ -62,8 +62,9 @@
}
.cam-blobitem .checkmark {
background-image: url('checkmark-black-25.png');
background-image: url('checkmark2.svg');
background-repeat: no-repeat;
background-size: 100% 100%;
cursor: pointer;
height: 25px;
left: 5px;
@ -91,5 +92,5 @@
}
.cam-blobitem.goog-control-checked .checkmark {
background-image: url('checkmark-blue-25.png');
background-image: url('checkmark2_blue.svg');
}

View File

@ -3,7 +3,12 @@
border: 1px solid rgba(0,0,0,0);
position: relative;
white-space: nowrap;
transition: -webkit-transform 75ms ease-out;
transition: -moz-transform 75ms ease-out;
transition: -ms-transform 75ms ease-out;
margin-left: 36px;
}
.cam-blobitemcontainer.cam-dropactive {
border-color: #acf;
background: #e5efff;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 876 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 894 B

View File

@ -1,7 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg"
version="1.1" width="100px" height="100px"
viewBox="0 0 100 100" enable-background="new 0 0 100 100"
xml:space="preserve">
<circle cx="50" cy="50" r="45" fill="black" stroke="white" stroke-width="10"></circle>
<path fill="white" d="M39.055,75.477c-1.417,0-2.775-0.562-3.777-1.565L21.889,60.523c-2.086-2.086-2.086-5.467,0-7.554 c2.086-2.085,5.468-2.085,7.554,0.001l9.612,9.612l31.503-31.503c2.086-2.086,5.467-2.086,7.554,0c2.086,2.086,2.086,5.467,0,7.553 l-35.279,35.28C41.83,74.914,40.471,75.477,39.055,75.477z"/>
</svg>

Before

Width:  |  Height:  |  Size: 578 B

View File

@ -0,0 +1,72 @@
<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="100"
height="100"
id="svg2"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="New document 1">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.8284271"
inkscape:cx="9.9489919"
inkscape:cy="63.281245"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1366"
inkscape:window-height="734"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-952.36218)">
<path
sodipodi:type="arc"
style="fill:#000000;stroke:#ffffff;stroke-width:8.43881129999999935;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path2987"
sodipodi:cx="53.287392"
sodipodi:cy="62.052917"
sodipodi:rx="35.794056"
sodipodi:ry="35.794056"
d="m 89.081448,62.052917 a 35.794056,35.794056 0 1 1 -71.588112,0 35.794056,35.794056 0 1 1 71.588112,0 z"
transform="matrix(1.2495795,0,0,1.2495795,-16.586832,924.82213)" />
<path
style="fill:none;stroke:#ffffff;stroke-width:10.26566601000000034;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 24.395183,1007.0904 12.685247,14.7625 39.937459,-34.19099"
id="path3757"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,71 @@
<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="100"
height="100"
id="svg2"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="checkmark2_blue.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.8284271"
inkscape:cx="12.423866"
inkscape:cy="60.452818"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1366"
inkscape:window-height="734"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-952.36218)">
<path
sodipodi:type="arc"
style="fill:#6666ff;stroke:#ffffff;stroke-width:8.43881129999999935;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;fill-opacity:1"
id="path2987"
sodipodi:cx="53.287392"
sodipodi:cy="62.052917"
sodipodi:rx="35.794056"
sodipodi:ry="35.794056"
d="m 89.081448,62.052917 a 35.794056,35.794056 0 1 1 -71.588112,0 35.794056,35.794056 0 1 1 71.588112,0 z"
transform="matrix(1.2495795,0,0,1.2495795,-16.586832,924.82213)" />
<path
style="fill:none;stroke:#ffffff;stroke-width:10.26566601000000034;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 24.395183,1007.0904 12.685247,14.7625 39.937459,-34.19099"
id="path3757"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg2"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="icon_10052.svg"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="0 0 100 100"
enable-background="new 0 0 100 100"
xml:space="preserve"><metadata
id="metadata8"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs6" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1195"
inkscape:window-height="1011"
id="namedview4"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="50"
inkscape:cy="50"
inkscape:window-x="363"
inkscape:window-y="297"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<path
d="M 48.78125,2.03125 C 24.072207,1.966874 1.9684025,24.0753 2.03125,48.78125 0.70476985,73.467078 21.670904,96.622749 46.3125,97.84375 70.928921,100.44314 95.106879,80.663863 97.59375,56.125 101.36417,32.055802 83.521506,7.2547194 59.65625,3 56.096141,2.2295883 52.422071,1.9297286 48.78125,2.03125 z m 0.25,10.125 C 70.389518,11.059762 89.456619,30.636689 87.8125,51.96875 87.245381,73.273391 66.298279,90.854926 45.15625,87.53125 23.988404,85.3939 8.0848045,63.206471 12.90625,42.375 16.19938,25.477878 31.727829,12.377457 49.03125,12.15625 z M 49.125,32.875 C 36.247598,32.872442 28.059323,49.381662 35.8125,59.65625 42.613811,70.777637 61.243906,68.968196 65.78125,56.75 71.005512,45.604409 61.411863,31.785867 49.125,32.875 z"
id="path2985"
inkscape:connector-curvature="0"
style="fill:#ffffff" />
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="0 0 100 100"
enable-background="new 0 0 100 100"
xml:space="preserve"
id="svg2"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="icon_13864.svg"><metadata
id="metadata120"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs118">
</defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1124"
inkscape:window-height="950"
id="namedview116"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="50"
inkscape:cy="50"
inkscape:window-x="685"
inkscape:window-y="264"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<path
sodipodi:type="inkscape:offset"
inkscape:radius="-1.58902"
inkscape:original="M 49.84375 0 C 22.31275 -4.7369516e-15 0 22.31275 0 49.84375 C -4.7369516e-15 77.37375 22.31275 99.6875 49.84375 99.6875 C 77.37075 99.6875 99.6865 77.37375 99.6875 49.84375 C 99.6875 22.31275 77.37075 0 49.84375 0 z M 49.84375 13.46875 C 69.93975 13.46875 86.21875 29.74675 86.21875 49.84375 C 86.21875 69.94075 69.94075 86.21875 49.84375 86.21875 C 29.74675 86.21875 13.46875 69.93975 13.46875 49.84375 C 13.46875 29.74775 29.74675 13.46875 49.84375 13.46875 z M 43.3125 26.375 L 43.3125 43.25 L 26.4375 43.25 L 26.4375 56.46875 L 43.3125 56.46875 L 43.3125 73.34375 L 56.5625 73.34375 L 56.5625 56.46875 L 73.40625 56.46875 L 73.40625 43.25 L 56.5625 43.25 L 56.5625 26.375 L 43.3125 26.375 z "
style="fill-rule:evenodd;fill:#ffffff"
id="path3098"
d="m 49.84375,1.59375 c -26.672443,0 -48.25,21.577557 -48.25,48.25 0,26.671412 21.577596,48.25 48.25,48.25 26.66828,0 48.249031,-21.578673 48.25,-48.25 0,-26.672289 -21.581682,-48.25 -48.25,-48.25 z m 0,10.28125 c 20.954083,0 37.96875,17.013657 37.96875,37.96875 0,20.955041 -17.013709,37.96875 -37.96875,37.96875 C 28.888657,87.8125 11.875,70.797833 11.875,49.84375 11.875,28.889667 28.888657,11.875 49.84375,11.875 z m -4.9375,16.09375 0,15.28125 a 1.5891789,1.5891789 0 0 1 -1.59375,1.59375 l -15.28125,0 0,10.03125 15.28125,0 a 1.5891789,1.5891789 0 0 1 1.59375,1.59375 l 0,15.28125 10.0625,0 0,-15.28125 A 1.5891789,1.5891789 0 0 1 56.5625,54.875 l 15.25,0 0,-10.03125 -15.25,0 A 1.5891789,1.5891789 0 0 1 54.96875,43.25 l 0,-15.28125 -10.0625,0 z" />
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:i="http://ns.adobe.com/AdobeIllustrator/10.0/"
xmlns:ns="http://ns.adobe.com/SaveForWeb/1.0/"
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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Your_Icon"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="0 0 100 100"
enable-background="new 0 0 100 100"
xml:space="preserve"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="icon_14727.svg"><defs
id="defs15" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="640"
inkscape:window-height="480"
id="namedview13"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="50"
inkscape:cy="50"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="Your_Icon" />
<metadata
id="metadata3">
<ns:sfw>
<ns:slices />
<ns:sliceSourceBounds
height="16383"
width="16383"
bottomLeftOrigin="true"
x="-8141"
y="-8242" />
</ns:sfw>
<rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata>
<switch
id="switch5"
style="fill:#ffffff">
<foreignObject
requiredExtensions="http://ns.adobe.com/AdobeIllustrator/10.0/"
x="0"
y="0"
width="1"
height="1"
id="foreignObject7">
</foreignObject>
<g
i:extraneous="self"
id="g9"
style="fill:#ffffff">
<path
d="M74.6,66.4c-3.842,0-7.366,1.329-10.161,3.542L41.103,54.724C41.552,53.227,41.8,51.644,41.8,50 c0-1.703-0.26-3.346-0.742-4.89l23.014-15.342C66.921,32.157,70.591,33.6,74.6,33.6C83.657,33.6,91,26.256,91,17.2 c0-9.057-7.343-16.4-16.4-16.4c-9.057,0-16.4,7.343-16.4,16.4c0,1.479,0.214,2.905,0.582,4.268L35.424,37.04 C32.65,34.892,29.18,33.6,25.4,33.6C16.342,33.6,9,40.943,9,50c0,9.057,7.342,16.4,16.4,16.4c3.841,0,7.366-1.331,10.16-3.543 l23.338,15.22c-0.451,1.496-0.699,3.079-0.699,4.724c0,9.056,7.344,16.398,16.4,16.398c9.058,0,16.4-7.343,16.4-16.398 C91,73.742,83.657,66.4,74.6,66.4z M19.933,50c0-2.448,1.621-4.496,3.839-5.192c0.517-0.162,1.057-0.274,1.628-0.274 c2.198,0,4.082,1.306,4.949,3.178c0.324,0.698,0.518,1.469,0.518,2.289c0,0.795-0.178,1.545-0.483,2.227 c-0.854,1.907-2.759,3.24-4.983,3.24c-0.546,0-1.063-0.104-1.56-0.253C21.586,54.539,19.933,52.473,19.933,50z"
id="path11"
style="fill:#ffffff" />
</g>
</switch>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="0 0 100 100"
enable-background="new 0 0 100 100"
xml:space="preserve"
id="svg2"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="icon_16716.svg"><metadata
id="metadata12"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs10" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1308"
inkscape:window-height="969"
id="namedview8"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="-36.864407"
inkscape:cy="50"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<g
id="Captions"
transform="matrix(1.0908435,0,0,1.0908435,-0.47520231,-8.6031676)">
</g>
<g
id="Your_Icon"
transform="matrix(1.0908435,0,0,1.0908435,-2.4864427,-3.306347)"
style="fill:#ffffff">
<path
d="m 37.867,58.713 c -0.169,0.408 -0.328,0.82 -0.468,1.238 -0.739,2.203 -0.999,4.332 -0.829,6.299 0.172,1.996 0.788,3.832 1.797,5.408 1.026,1.603 2.459,2.939 4.246,3.904 1.814,0.981 3.989,1.578 6.46,1.679 2.502,0.103 5.059,-0.312 7.53,-1.155 2.488,-0.848 4.873,-2.123 7.016,-3.728 2.143,-1.605 4.029,-3.525 5.527,-5.659 1.49,-2.119 2.584,-4.436 3.162,-6.84 0.57,-2.373 0.58,-4.598 0.119,-6.586 -0.453,-1.957 -1.361,-3.68 -2.637,-5.089 -1.256,-1.387 -2.869,-2.472 -4.762,-3.181 -1.861,-0.698 -3.998,-1.034 -6.34,-0.937 -1.072,0.044 -2.141,0.181 -3.199,0.395 l -0.387,12.15 -0.188,5.928 -5.786,-1.299 -11.261,-2.527 z m -3.715,-5.859 6.237,1.4 9.814,2.203 0.53,-16.708 0.205,-6.413 0.51,-16.063 -10.123,7.843 -9.414,-10.552 -18.178,14.07 7.979,11.674 -9.761,7.561 15.817,3.55 6.384,1.435 z m 55.781,-5.915 c -1.143,-3.703 -3.152,-6.896 -5.834,-9.445 -2.6,-2.473 -5.83,-4.342 -9.527,-5.499 -3.596,-1.125 -7.646,-1.58 -12.02,-1.258 -2.244,0.165 -4.471,0.532 -6.66,1.067 l -0.203,6.4 c 1.615,-0.365 3.256,-0.604 4.9,-0.698 3.334,-0.191 6.4,0.222 9.096,1.15 2.754,0.948 5.131,2.435 7.014,4.367 1.924,1.978 3.332,4.422 4.082,7.227 0.768,2.87 0.848,6.109 0.094,9.587 -0.77,3.545 -2.328,6.977 -4.492,10.126 -2.186,3.181 -4.971,6.046 -8.15,8.428 -3.182,2.384 -6.727,4.262 -10.422,5.484 -3.66,1.212 -7.434,1.768 -11.106,1.54 -3.604,-0.223 -6.748,-1.181 -9.341,-2.695 -2.537,-1.48 -4.541,-3.492 -5.944,-5.871 -1.372,-2.325 -2.17,-5.002 -2.336,-7.891 -0.164,-2.826 0.278,-5.863 1.385,-8.99 0.321,-0.906 0.695,-1.796 1.108,-2.668 l -6.438,-1.445 c -0.689,1.344 -1.306,2.721 -1.833,4.133 -1.526,4.084 -2.203,8.077 -2.097,11.82 0.109,3.851 1.045,7.453 2.749,10.615 1.756,3.262 4.328,6.057 7.64,8.156 3.413,2.164 7.601,3.582 12.452,3.998 4.974,0.428 10.121,-0.244 15.134,-1.846 5.078,-1.621 9.953,-4.174 14.32,-7.449 4.361,-3.272 8.156,-7.223 11.098,-11.61 2.9,-4.328 4.934,-9.029 5.857,-13.86 0.897,-4.707 0.649,-9.056 -0.526,-12.873 z M 29.958,12.29 26.66,8.662 9.285,22.106 12.09,26.128 29.958,12.29 z M 21.843,3.031 5.231,15.902 8.036,19.924 25.142,6.659 21.843,3.031 z"
id="path6"
inkscape:connector-curvature="0"
style="fill:#ffffff" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="0 0 100 100"
enable-background="new 0 0 100 100"
xml:space="preserve"
id="svg2"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="icon_16981.svg"><metadata
id="metadata120"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs118" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1110"
inkscape:window-height="877"
id="namedview116"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="-10.805085"
inkscape:cy="50"
inkscape:window-x="781"
inkscape:window-y="381"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<g
id="Your_Icon"
transform="matrix(0.87839442,0,0,1.4307441,6.0799823,-15.045029)"
style="fill:#ffffff">
<path
d="M 85.814,61.176 52.109,33.077 C 51.498,32.567 50.748,32.312 50,32.312 c -0.75,0 -1.5,0.255 -2.111,0.765 L 14.186,61.176 c -1.398,1.164 -1.586,3.242 -0.42,4.638 0.631,0.758 1.527,1.147 2.439,1.172 L 16.189,67 h 67.672 l -0.018,-0.017 c 0.895,-0.038 1.773,-0.429 2.393,-1.17 1.164,-1.395 0.977,-3.473 -0.422,-4.637 z"
id="path114"
inkscape:connector-curvature="0"
style="fill:#ffffff" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="0 0 100 100"
enable-background="new 0 0 100 100"
xml:space="preserve"
id="svg2"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="icon_16981_down.svg"><metadata
id="metadata120"><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><defs
id="defs118" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1110"
inkscape:window-height="877"
id="namedview116"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="-10.805085"
inkscape:cy="50"
inkscape:window-x="781"
inkscape:window-y="381"
inkscape:window-maximized="0"
inkscape:current-layer="svg2" />
<g
id="Your_Icon"
transform="matrix(-0.87839442,0,0,-1.4307441,93.920018,119.04503)"
style="fill:#ffffff">
<path
d="M 85.814,61.176 52.109,33.077 C 51.498,32.567 50.748,32.312 50,32.312 c -0.75,0 -1.5,0.255 -2.111,0.765 L 14.186,61.176 c -1.398,1.164 -1.586,3.242 -0.42,4.638 0.631,0.758 1.527,1.147 2.439,1.172 L 16.189,67 h 67.672 l -0.018,-0.017 c 0.895,-0.038 1.773,-0.429 2.393,-1.17 1.164,-1.395 0.977,-3.473 -0.422,-4.637 z"
id="path114"
inkscape:connector-curvature="0"
style="fill:#ffffff" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Guide"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="0 0 100 100"
enable-background="new 0 0 100 100"
xml:space="preserve"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="icon_25337.svg"><metadata
id="metadata9"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs7" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1406"
id="namedview5"
showgrid="false"
inkscape:zoom="2.36"
inkscape:cx="50"
inkscape:cy="50"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="Guide" />
<path
style="fill:#ffffff"
d="M 48.78125,3.03125 C 24.571894,3.0108966 3.0084099,24.581479 3.03125,48.78125 1.7451724,73.014812 22.228539,95.587474 46.375,96.84375 70.156336,99.293799 93.366316,80.677304 96.5,57.09375 100.37314,34.429801 85.082121,10.60963 62.875,4.78125 58.276649,3.4809259 53.56602,2.8977262 48.78125,3.03125 z m 0.34375,11.4375 c 8.43079,-0.267795 16.63251,2.708191 23.28125,7.8125 C 54.47845,37.186636 36.548486,52.089429 18.625,67 9.5411108,50.566433 15.894584,27.852622 32.5625,19 37.605929,16.158625 43.326072,14.624804 49.125,14.46875 z m 32.0625,18.5 C 90.924744,49.685295 83.621138,73.51278 65.96875,81.75 52.976758,88.474977 36.291162,86.00829 25.71875,76 43.823902,60.949104 61.930414,45.899834 80.03125,30.84375 c 0.385417,0.708333 0.770833,1.416667 1.15625,2.125 z"
id="path3"
inkscape:connector-curvature="0" />
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Capa_1"
x="0px"
y="0px"
width="100px"
height="100px"
viewBox="0 0 100 100"
enable-background="new 0 0 100 100"
xml:space="preserve"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="icon_27307.svg"><metadata
id="metadata34"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs32">
</defs><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1347"
inkscape:window-height="1010"
id="namedview30"
showgrid="false"
inkscape:zoom="5.04"
inkscape:cx="36.265271"
inkscape:cy="50"
inkscape:window-x="915"
inkscape:window-y="144"
inkscape:window-maximized="0"
inkscape:current-layer="Capa_1"
showguides="true"
inkscape:guide-bbox="true" />
<path
sodipodi:type="inkscape:offset"
inkscape:radius="1.3888888"
inkscape:original="M 48.375 52.5625 L 48.375 60.875 L 12.28125 60.875 C 5.7031983 60.875 0.34375 66.262085 0.34375 72.875 L 0.34375 86 L 3.625 86 L 3.625 72.875 C 3.625 68.075265 7.5069353 64.15625 12.28125 64.15625 L 48.375 64.15625 L 48.375 88.15625 L 51.65625 88.15625 L 51.65625 64.15625 L 87.71875 64.15625 C 92.493065 64.15625 96.375 68.075265 96.375 72.875 L 96.375 86 L 99.65625 86 L 99.65625 72.875 C 99.65625 66.260878 94.296802 60.875 87.71875 60.875 L 51.65625 60.875 L 51.65625 52.5625 L 48.375 52.5625 z "
style="stroke-width:0.10000000000000001;stroke-miterlimit:4;stroke-dasharray:none;fill:#ffffff"
id="path3818"
d="M 48.09375,51.1875 A 1.3890277,1.3890277 0 0 0 47,52.5625 l 0,6.9375 -34.71875,0 c -7.3363372,0 -13.3125,6.011667 -13.3125,13.375 l 0,13.125 a 1.3890277,1.3890277 0 0 0 1.375,1.375 l 3.28125,0 A 1.3890277,1.3890277 0 0 0 5,86 L 5,72.875 c 0,-4.050864 3.2669852,-7.34375 7.28125,-7.34375 l 34.71875,0 0,22.625 a 1.3890277,1.3890277 0 0 0 1.375,1.375 l 3.28125,0 a 1.3890277,1.3890277 0 0 0 1.375,-1.375 l 0,-22.625 34.6875,0 C 91.733015,65.53125 95,68.824136 95,72.875 L 95,86 a 1.3890277,1.3890277 0 0 0 1.375,1.375 l 3.28125,0 a 1.3890277,1.3890277 0 0 0 1.375,-1.375 l 0,-13.125 c 0,-7.364403 -5.976332,-13.375 -13.3125,-13.375 l -34.6875,0 0,-6.9375 a 1.3890277,1.3890277 0 0 0 -1.375,-1.375 l -3.28125,0 a 1.3890277,1.3890277 0 0 0 -0.28125,0 z"
transform="matrix(0.95334325,0,0,1,2.3328376,6)" /><polygon
id="polygon10"
points="70.939,34.638 29.94,34.638 29.94,3.16 45.927,3.16 48.595,8.371 70.939,8.371 "
transform="matrix(1.5646491,0,0,1.6478917,-28.920118,-5.3272108)"
style="fill:#ffffff" />
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -22,9 +22,9 @@
<link rel="stylesheet" href="blob_item.css" type="text/css">
<link rel="stylesheet" href="blob_item_container.css" type="text/css">
<link rel="stylesheet" href="index.css" type="text/css">
<link rel="stylesheet" href="toolbar.css" type="text/css">
<link rel="stylesheet" href="nav.css" type="text/css">
<link rel="stylesheet" href="closure/goog/css/common.css" type="text/css">
<link rel="stylesheet" href="closure/goog/css/toolbar.css" type="text/css">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
</head>
<body>
<script>

View File

@ -14,9 +14,8 @@ goog.require('goog.Uri');
goog.require('goog.ui.Component');
goog.require('goog.ui.Textarea');
goog.require('camlistore.BlobItemContainer');
goog.require('camlistore.Nav');
goog.require('camlistore.ServerConnection');
goog.require('camlistore.Toolbar');
goog.require('camlistore.Toolbar.EventType');
goog.require('camlistore.ServerType');
@ -52,11 +51,8 @@ camlistore.IndexPage = function(config, opt_domHelper) {
this.blobItemContainer_.isSelectionEnabled = true;
this.blobItemContainer_.isFileDragEnabled = true;
/**
* @type {camlistore.Toolbar}
* @private
*/
this.toolbar_ = new camlistore.Toolbar(opt_domHelper);
this.nav_ = new camlistore.Nav(opt_domHelper, this);
/**
* @type {goog.events.EventHandler}
@ -72,9 +68,52 @@ camlistore.IndexPage = function(config, opt_domHelper) {
* @private
*/
this.currentUrl_ = '';
this.searchNavItem_ = new camlistore.Nav.SearchItem(this.dom_, 'magnifying_glass.svg', 'Search');
this.newPermanodeNavItem_ = new camlistore.Nav.Item(this.dom_, 'icon_14727.svg', 'New permanode');
this.searchRootsNavItem_ = new camlistore.Nav.Item(this.dom_, 'icon_27307.svg', 'Search roots');
this.selectAsCurrentSetNavItem_ = new camlistore.Nav.Item(this.dom_, 'icon_10052.svg', 'Select as current set');
this.selectAsCurrentSetNavItem_.setVisible(false);
this.addToSetNavItem_ = new camlistore.Nav.Item(this.dom_, 'icon_16716.svg', 'Add to set');
this.addToSetNavItem_.setVisible(false);
this.createSetWithSelectionNavItem_ = new camlistore.Nav.Item(this.dom_, 'icon_13864.svg', 'Create set with 5 items');
this.createSetWithSelectionNavItem_.setVisible(false);
this.clearSelectionNavItem_ = new camlistore.Nav.Item(this.dom_, 'icon_25337.svg', 'Clear selection');
this.clearSelectionNavItem_.setVisible(false);
this.embiggenNavItem_ = new camlistore.Nav.Item(this.dom_, 'icon_16981.svg', 'Moar bigger');
this.ensmallenNavItem_ = new camlistore.Nav.Item(this.dom_, 'icon_16981_down.svg', 'Less bigger');
this.logoNavItem_ = new camlistore.Nav.LinkItem(this.dom_, '/favicon.ico', 'Camlistore', '/ui/');
this.logoNavItem_.addClassName('cam-logo');
};
goog.inherits(camlistore.IndexPage, goog.ui.Component);
camlistore.IndexPage.prototype.onNavOpen = function() {
var currentWidth = this.getElement().offsetWidth - 36;
var desiredWidth = currentWidth - (275 - 36);
var scale = desiredWidth / currentWidth;
var currentHeight = goog.dom.getDocumentHeight();
var currentScroll = goog.dom.getDocumentScroll().y;
var potentialScroll = currentHeight - goog.dom.getViewportSize().height;
var originY = currentHeight * currentScroll / potentialScroll;
console.log('origin y is: %f', originY);
goog.style.setStyle(this.blobItemContainer_.getElement(),
{'transform': goog.string.subs('scale(%s)', scale),
'transform-origin': goog.string.subs('right %spx', originY)});
};
camlistore.IndexPage.prototype.onNavClose = function() {
if (!this.blobItemContainer_.getElement()) {
return;
}
this.searchNavItem_.setText('');
this.searchNavItem_.blur();
goog.style.setStyle(this.blobItemContainer_.getElement(),
{'transform': ''});
};
/**
* @enum {string}
@ -109,11 +148,54 @@ camlistore.IndexPage.prototype.decorateInternal = function(element) {
document.title = this.config_.ownerName + '\'s Vault';
this.addChild(this.toolbar_, true);
this.nav_.addChild(this.searchNavItem_, true);
this.nav_.addChild(this.newPermanodeNavItem_, true);
this.nav_.addChild(this.searchRootsNavItem_, true);
this.nav_.addChild(this.selectAsCurrentSetNavItem_, true);
this.nav_.addChild(this.addToSetNavItem_, true);
this.nav_.addChild(this.createSetWithSelectionNavItem_, true);
this.nav_.addChild(this.clearSelectionNavItem_, true);
this.nav_.addChild(this.embiggenNavItem_, true);
this.nav_.addChild(this.ensmallenNavItem_, true);
this.nav_.addChild(this.logoNavItem_, true);
this.addChild(this.nav_, true);
this.addChild(this.blobItemContainer_, true);
};
camlistore.IndexPage.prototype.updateNavButtonsForSelection_ = function() {
var blobItems = this.blobItemContainer_.getCheckedBlobItems();
var count = blobItems.length;
if (count) {
var txt = 'Create set with ' + count + ' item' + (count > 1 ? 's' : '');
this.createSetWithSelectionNavItem_.setContent(txt);
this.createSetWithSelectionNavItem_.setVisible(true);
this.clearSelectionNavItem_.setVisible(true);
} else {
this.createSetWithSelectionNavItem_.setContent('');
this.createSetWithSelectionNavItem_.setVisible(false);
this.clearSelectionNavItem_.setVisible(false);
}
if (this.blobItemContainer_.currentCollec_ &&
this.blobItemContainer_.currentCollec_ != "" &&
blobItems.length > 0) {
this.addToSetNavItem_.setVisible(true);
} else {
this.addToSetNavItem_.setVisible(false);
}
if (blobItems.length == 1 &&
blobItems[0].isCollection()) {
this.selectAsCurrentSetNavItem_.setVisible(true);
} else {
this.selectAsCurrentSetNavItem_.setVisible(false);
}
};
/** @override */
camlistore.IndexPage.prototype.disposeInternal = function() {
camlistore.IndexPage.superClass_.disposeInternal.call(this);
@ -136,105 +218,67 @@ camlistore.IndexPage.prototype.enterDocument = function() {
this.eh_.listen(
window, goog.events.EventType.POPSTATE, this.handleUrl_);
this.eh_.listen(
this.toolbar_, camlistore.Toolbar.EventType.SEARCH,
this.handleTextSearch_
);
this.searchNavItem_.onSearch = this.setUrlSearch_.bind(this);
this.eh_.listen(
this.toolbar_, camlistore.Toolbar.EventType.BIGGER,
function() {
if (this.blobItemContainer_.bigger()) {
this.blobItemContainer_.showRecent();
}
this.embiggenNavItem_.onClick = function() {
if (this.blobItemContainer_.bigger()) {
this.blobItemContainer_.showRecent();
}
}.bind(this);
this.ensmallenNavItem_.onClick = function() {
if (this.blobItemContainer_.smaller()) {
this.blobItemContainer_.showRecent();
}
}.bind(this);
this.createSetWithSelectionNavItem_.onClick = function() {
var blobItems = this.blobItemContainer_.getCheckedBlobItems();
this.createNewSetWithItems_(blobItems);
}.bind(this);
this.clearSelectionNavItem_.onClick =
this.blobItemContainer_.unselectAll.bind(this.blobItemContainer_);
this.newPermanodeNavItem_.onClick = function() {
this.connection_.createPermanode(
function(p) {
window.location = './?p=' + p;
}, function(failMsg) {
console.error('Failed to create permanode: ' + failMsg);
});
}.bind(this);
this.eh_.listen(
this.toolbar_, camlistore.Toolbar.EventType.SMALLER,
function() {
if (this.blobItemContainer_.smaller()) {
this.blobItemContainer_.showRecent();
}
});
this.addToSetNavItem_.onClick = function() {
var blobItems = this.blobItemContainer_.getCheckedBlobItems();
this.addItemsToSet_(blobItems);
}.bind(this);
this.eh_.listen(
this.toolbar_, camlistore.Toolbar.EventType.CHECKED_ITEMS_CREATE_SET,
function() {
var blobItems = this.blobItemContainer_.getCheckedBlobItems();
this.createNewSetWithItems_(blobItems);
});
this.selectAsCurrentSetNavItem_.onClick = function() {
var blobItems = this.blobItemContainer_.getCheckedBlobItems();
// there should be only one item selected
if (blobItems.length != 1) {
alert("Cannet set multiple items as current collection");
return;
}
this.blobItemContainer_.currentCollec_ = blobItems[0].blobRef_;
this.blobItemContainer_.unselectAll();
this.updateNavButtonsForSelection_();
}.bind(this);
this.eh_.listen(
this.toolbar_, camlistore.Toolbar.EventType.CLEAR_SELECTION,
this.blobItemContainer_.unselectAll.bind(this.blobItemContainer_));
this.eh_.listen(
this.toolbar_, camlistore.Toolbar.EventType.CREATE_PERMANODE,
function() {
this.connection_.createPermanode(
function(p) {
window.location = './?p=' + p;
}, function(failMsg) {
console.error('Failed to create permanode: ' + failMsg);
});
});
this.eh_.listen(
this.toolbar_, camlistore.Toolbar.EventType.CHECKED_ITEMS_ADDTO_SET,
function() {
var blobItems = this.blobItemContainer_.getCheckedBlobItems();
this.addItemsToSet_(blobItems);
});
this.eh_.listen(
this.toolbar_, camlistore.Toolbar.EventType.SELECT_COLLEC,
function() {
var blobItems = this.blobItemContainer_.getCheckedBlobItems();
// there should be only one item selected
if (blobItems.length != 1) {
alert("Cannet set multiple items as current collection");
return;
}
this.blobItemContainer_.currentCollec_ = blobItems[0].blobRef_;
this.blobItemContainer_.unselectAll();
this.toolbar_.setCheckedBlobItemCount(0);
this.toolbar_.toggleCollecButton(false);
this.toolbar_.toggleAddToSetButton(false);
});
this.eh_.listen(
this.toolbar_, camlistore.Toolbar.EventType.ROOTS,
this.setUrlSearch_.bind(this, {
permanode: {
attr: 'camliRoot',
numValue: {
min: 1
}
}
}));
this.searchRootsNavItem_.onClick = this.setUrlSearch_.bind(this, {
permanode: {
attr: 'camliRoot',
numValue: {
min: 1
}
}
});
this.eh_.listen(
this.blobItemContainer_,
camlistore.BlobItemContainer.EventType.SELECTION_CHANGED,
function() {
var blobItems = this.blobItemContainer_.getCheckedBlobItems();
this.toolbar_.setCheckedBlobItemCount(blobItems.length);
// set checkedItemsAddToSetButton_
if (this.blobItemContainer_.currentCollec_ &&
this.blobItemContainer_.currentCollec_ != "" &&
blobItems.length > 0) {
this.toolbar_.toggleAddToSetButton(true);
} else {
this.toolbar_.toggleAddToSetButton(false);
}
// set setAsCollecButton_
if (blobItems.length == 1 &&
blobItems[0].isCollection()) {
this.toolbar_.toggleCollecButton(true);
} else {
this.toolbar_.toggleCollecButton(false);
}
});
this.updateNavButtonsForSelection_.bind(this));
this.handleUrl_();
};
@ -264,11 +308,11 @@ camlistore.IndexPage.prototype.createNewSetWithItems_ = function(blobItems) {
* @private
*/
camlistore.IndexPage.prototype.addItemsToSet_ = function(blobItems) {
if (!this.blobItemContainer_.currentCollec_ ||
this.blobItemContainer_.currentCollec_ == "") {
alert("no destination collection selected");
}
this.addMembers_(false, blobItems, this.blobItemContainer_.currentCollec_);
if (!this.blobItemContainer_.currentCollec_ ||
this.blobItemContainer_.currentCollec_ == "") {
alert("no destination collection selected");
}
this.addMembers_(false, blobItems, this.blobItemContainer_.currentCollec_);
};
/**
@ -307,9 +351,7 @@ camlistore.IndexPage.prototype.addMembers_ =
*/
camlistore.IndexPage.prototype.addItemsToSetDone_ = function(permanode) {
this.blobItemContainer_.unselectAll();
this.toolbar_.setCheckedBlobItemCount(0);
this.toolbar_.toggleCollecButton(false);
this.toolbar_.toggleAddToSetButton(false);
this.updateNavButtonsForSelection_();
this.blobItemContainer_.showRecent();
};
@ -320,19 +362,11 @@ camlistore.IndexPage.prototype.addItemsToSetDone_ = function(permanode) {
*/
camlistore.IndexPage.prototype.handleServerStatus_ = function(resp) {
if (resp && resp.version) {
this.toolbar_.setStatus('v' + resp.version);
// TODO(aa): Argh
//this.toolbar_.setStatus('v' + resp.version);
}
};
/**
* @param {goog.events.Event} e The title form submit event.
* @private
*/
camlistore.IndexPage.prototype.handleTextSearch_ = function(e) {
this.setUrlSearch_(this.toolbar_.getSearchText());
};
/**
* @param {string|Object}
* @private

View File

@ -0,0 +1,73 @@
<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="100"
height="100"
id="svg3870"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="magnifying_glass.svg">
<defs
id="defs3872" />
<sodipodi:namedview
id="base"
pagecolor="#000000"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
inkscape:zoom="3.9880822"
inkscape:cx="50"
inkscape:cy="51.309239"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
showguides="false"
inkscape:window-width="1366"
inkscape:window-height="734"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata3875">
<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></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-952.36218)">
<path
sodipodi:type="arc"
style="fill:none;stroke:#ffffff;stroke-width:11.2946682;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="path3880"
sodipodi:cx="29.427235"
sodipodi:cy="30.54307"
sodipodi:rx="27.047091"
sodipodi:ry="27.047091"
d="m 56.474325,30.54307 a 27.047091,27.047091 0 1 1 -54.0941809,0 27.047091,27.047091 0 1 1 54.0941809,0 z"
transform="matrix(1.2466818,0,0,1.2324052,4.0327178,955.08377)" />
<path
style="fill:none;stroke:#ffffff;stroke-width:14;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 65.407163,1018.9802 27.443727,26.0159"
id="path4392"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,129 @@
/*
Copyright 2013 The Camlistore Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
.cam-nav {
position: fixed;
left: 0;
top: 0;
height: 100%;
background: rgb(51, 51, 51);
font-family: 'Open Sans', sans-serif;
width: 275px;
box-shadow: 0.1em 0 1em 0.3em rgba(0, 0, 0, 0.25);
transition: width 75ms ease-out;
overflow: hidden;
}
.cam-nav.cam-nav-collapsed {
width: 36px;
}
.cam-nav-item {
background-color: transparent;
background-repeat: no-repeat;
background-position: 8px center;
background-size: auto 17px;
border: none;
color: rgba(255, 255, 255, 1);
padding: 8px 11px 8px 36px;
font-family: inherit;
font-size: 19px;
font-weight: 400;
opacity: 0.9;
white-space: nowrap;
width: 100%;
text-align: left;
transition: color 300ms ease-out;
margin: 0;
}
.cam-nav-item:hover {
background-color: rgb(60, 60, 60);
}
.cam-nav-searchitem:hover,
.cam-logo:hover {
background-color:inherit!important;
}
.cam-nav.cam-nav-collapsed .cam-nav-item {
color: rgba(255, 255, 255, 0);
}
.cam-nav-item:first-child {
margin-top: 2px;
}
.cam-nav-searchitem {
padding-left: 34px;
}
.cam-nav-searchitem input {
border: 1px rgba(255, 255, 255, 0);
border-style: solid none;
cursor: default;
background: none;
font: inherit;
color: inherit;
transition: border-color 200ms ease-out;
margin: 0;
padding: 0;
height: 26px;
width: 220px;
}
.cam-nav-searchitem input::-webkit-input-placeholder {
color:inherit;
}
.cam-nav-searchitem input::-moz-placeholder {
color:inherit;
}
.cam-nav-searchitem input:-ms-input-placeholder {
color:inherit;
}
.cam-nav-searchitem input:focus {
outline: none;
border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}
.cam-nav-searchitem input:focus::-webkit-input-placeholder {
transition: color 200ms ease-out;
color:rgba(255, 255, 255, 0.5);
}
.cam-nav-searchitem input:focus::-moz-placeholder {
transition: color 200ms ease-out;
color:rgba(255, 255, 255, 0.5);
}
.cam-nav-searchitem input:focus:-ms-input-placeholder {
transition: color 200ms ease-out;
color:rgba(255, 255, 255, 0.5);
}
.cam-logo {
position: absolute;
left: 0;
bottom: 0;
opacity: 0.8;
padding: 4px 9px 4px 31px;
font-size: 15px;
text-decoration: none;
width: auto;
}
.cam-logo:hover {
text-decoration: underline;
}

View File

@ -0,0 +1,216 @@
/*
Copyright 2013 The Camlistore Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
goog.provide('camlistore.Nav');
goog.provide('camlistore.Nav.Item');
goog.require('camlistore.style');
goog.require('goog.dom');
goog.require('goog.dom.classes');
goog.require('goog.ui.Container');
goog.require('goog.ui.Component');
goog.require('goog.ui.Control');
goog.require('goog.ui.Button');
/**
* A vertical, fixed-position expandy collapsy navigation bar thingy.
*/
camlistore.Nav = function(domHelper, opt_delegate) {
goog.base(this, null, null, domHelper);
this.delegate_ = opt_delegate;
this.expandTimer_ = 0;
this.collapseTimer_ = 0;
};
goog.inherits(camlistore.Nav, goog.ui.Container);
camlistore.Nav.prototype.createDom = function() {
this.setElementInternal(this.dom_.createDom('div'));
goog.dom.classes.add(this.element_, 'cam-nav');
this.close();
};
camlistore.Nav.prototype.enterDocument = function() {
goog.base(this, 'enterDocument');
this.getHandler().listen(this.getElement(), goog.events.EventType.MOUSEOVER,
this.handleMouseOver_);
this.getHandler().listen(this.getElement(), goog.events.EventType.MOUSEOUT,
this.handleMouseOut_);
this.getHandler().listen(this.getElement(), goog.events.EventType.CLICK,
this.toggle.bind(this));
};
camlistore.Nav.prototype.open = function() {
if (this.delegate_) {
this.delegate_.onNavOpen();
}
goog.dom.classes.remove(this.getElement(), 'cam-nav-collapsed');
};
camlistore.Nav.prototype.close = function() {
if (this.delegate_) {
this.delegate_.onNavClose();
}
goog.dom.classes.add(this.getElement(), 'cam-nav-collapsed');
};
camlistore.Nav.prototype.isOpen = function() {
return !goog.dom.classes.has(this.getElement(), 'cam-nav-collapsed');
};
camlistore.Nav.prototype.toggle = function() {
if (this.isOpen()) {
this.close();
return false;
} else {
this.open();
return true;
}
};
camlistore.Nav.prototype.handleMouseOver_ = function() {
if (this.collapseTimer_) {
window.clearTimeout(this.collapseTimer_);
this.collapseTimer_ = 0;
} else {
this.expandTimer_ = window.setTimeout(function() {
this.expandTimer_ = 0;
this.open();
}.bind(this), 250);
}
};
camlistore.Nav.prototype.handleMouseOut_ = function() {
if (this.expandTimer_) {
window.clearTimeout(this.expandTimer_);
this.expandTimer_ = 0;
} else {
if (this.isOpen()) {
this.collapseTimer_ = window.setTimeout(function() {
this.collapseTimer_ = 0;
this.close();
}.bind(this), 500);
}
}
};
camlistore.Nav.Item = function(domHelper, iconSrc, content) {
goog.base(this, content, null, domHelper);
this.iconSrc_ = iconSrc;
this.addClassName('cam-nav-item');
};
goog.inherits(camlistore.Nav.Item, goog.ui.Button);
camlistore.Nav.Item.prototype.onClick = function() {};
camlistore.Nav.Item.prototype.createDom = function() {
goog.base(this, 'createDom');
this.setIcon(this.iconSrc_);
};
camlistore.Nav.Item.prototype.enterDocument = function() {
this.getHandler().listen(this.getElement(), 'click', function(e) {
this.onClick();
e.stopPropagation();
});
};
camlistore.Nav.Item.prototype.setIcon = function(src) {
this.iconSrc_ = src;
if (this.element_) {
this.element_.style.backgroundImage = camlistore.style.getURLValue(src);
}
};
camlistore.Nav.SearchItem = function(domHelper, iconSrc, label) {
goog.base(this, domHelper, iconSrc, label);
this.setAllowTextSelection(true);
this.addClassName('cam-nav-searchitem');
};
goog.inherits(camlistore.Nav.SearchItem, camlistore.Nav.Item);
camlistore.Nav.SearchItem.prototype.onSearch = function(value) {};
camlistore.Nav.SearchItem.prototype.setText = function(text) {
if (this.input_) {
this.input_.value = text;
}
};
camlistore.Nav.SearchItem.prototype.blur = function() {
this.input_.blur();
};
camlistore.Nav.SearchItem.prototype.createDom = function() {
this.setElementInternal(
this.dom_.createDom('div', this.getExtraClassNames()));
this.form_ = this.dom_.createDom('form');
this.input_ = this.dom_.createDom(
'input', {'placeholder': this.getContent()});
this.form_.appendChild(this.input_);
this.getElement().appendChild(this.form_);
this.setIcon(this.iconSrc_);
};
camlistore.Nav.SearchItem.prototype.enterDocument = function() {
goog.base(this, 'enterDocument');
this.getHandler().listen(this.getElement(), 'mouseover',
this.input_.focus.bind(this.input_));
this.getHandler().listen(this.getElement(), 'click', function(e) {
this.input_.focus();
e.stopPropagation();
}.bind(this));
this.getHandler().listen(this.form_, 'submit', function(e) {
this.onSearch(this.input_.value);
e.preventDefault();
});
};
camlistore.Nav.SearchItem.prototype.handleKeyEvent = function(e) {
return false;
};
camlistore.Nav.LinkItem = function(domHelper, iconSrc, label, linkUrl) {
goog.base(this, domHelper, iconSrc, label);
this.linkUrl_ = linkUrl;
this.addClassName('cam-nav-linkitem');
};
goog.inherits(camlistore.Nav.LinkItem, camlistore.Nav.Item);
camlistore.Nav.LinkItem.prototype.createDom = function() {
this.setElementInternal(
this.dom_.createDom('a', this.getExtraClassNames(), this.getContent()));
this.getElement().href = this.linkUrl_;
this.setIcon(this.iconSrc_);
};
camlistore.Nav.LinkItem.prototype.enterDocument = function() {
this.getHandler().listen(this.getElement(), 'click', function(e) {
if (history.pushState) {
history.pushState(null, '', this.getElement().href);
e.preventDefault();
e.stopPropagation();
}
});
};

View File

@ -0,0 +1,39 @@
<!--
Copyright 2013 The Camlistore Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="nav.css">
<script src="closure/goog/base.js"></script>
<script src="deps.js"></script>
<script>
goog.require('camlistore.Nav');
goog.require('goog.dom.classes');
</script>
</head>
<body>
<script>
var nav = new camlistore.Nav(goog.dom.getDomHelper());
nav.addChild(new camlistore.Nav.SearchItem(goog.dom.getDomHelper(), 'search-white-16.png', 'Search'), true);
nav.addChild(new camlistore.Nav.Item(goog.dom.getDomHelper(), 'new-white-16.png', 'New Permanode'), true);
nav.render(document.body);
</script>
<body>
</html>

View File

@ -1,86 +0,0 @@
.cam-toolbar {
align-items: stretch;
display: flex;
margin: 7px 7px 11px 7px;
outline: none!important;
position: relative;
}
.cam-searchform {
display: inline;
display: flex;
flex-grow: 1;
}
.cam-searchbox {
background: #f9f9f9;
border:1px solid #d3d3d3;
flex-grow: 1;
font-size: 1em;
margin: 0 0.5em 0 0;
padding: 6px;
transition-duration: 0.1s;
transition-property: background,border-color;
vertical-align: middle;
width: 250px;
}
.cam-searchbox:hover {
background: #fafafa;
border:1px solid #b3b3b3;
}
.cam-searchbox:focus {
background: white;
border:1px solid #999;
outline: none;
}
.cam-toolbar>.goog-button {
background: #f9f9f9;
border-color: #e3e3e3 #b3b3b3 #b3b3b3 #e3e3e3!important;
border: 1px solid;
color: #666;
font-size: 0.8em;
margin: 0 0 0 0.5em;
padding: 0.5em 1em!important;
transition-duration: 0.1s;
transition-property: background,border-color;
}
.cam-toolbar>.goog-button:hover,
.cam-toolbar>.goog-button:focus {
background: #fcfcfc;
border-color: #eee #939393 #939393 #eee!important;
outline: none;
}
.cam-toolbar>.goog-button:active {
background: #f8f8f8;
border-color: #939393 #eee #eee #939393!important;
outline: none;
}
.cam-toolbar>.goog-button.goog-button-disabled {
background: #f9f9f9;
border-color: #eee #ddd #ddd #eee!important;
color: #aaa;
}
.cam-toolbar>.cam-smaller {
margin-right: 0!important;
}
.cam-toolbar>.cam-bigger {
margin-left: 0!important;
border-left: none;
}
.cam-toolbar-status {
position: absolute;
top: 100%;
margin-top: 2px;
right: 0;
color: #666;
font-size: 11px;
}

View File

@ -1,302 +0,0 @@
/**
* @fileoverview Toolbar for manipulating the display of the blob index page.
*
*/
goog.provide('camlistore.Toolbar');
goog.provide('camlistore.Toolbar.EventType');
goog.require('goog.dom');
goog.require('goog.dom.classes');
goog.require('goog.events.EventHandler');
goog.require('goog.events.EventType');
goog.require('goog.ui.MenuItem');
goog.require('goog.ui.PopupMenu');
goog.require('goog.ui.Toolbar');
goog.require('goog.ui.ToolbarButton');
goog.require('goog.ui.ToolbarMenuButton');
/**
* @param {goog.dom.DomHelper=} opt_domHelper DOM helper to use.
*
* @extends {goog.ui.Toolbar}
* @constructor
*/
camlistore.Toolbar = function(opt_domHelper) {
goog.base(this, opt_domHelper);
/**
* @type {HTMLFormElement}
* @private
*/
this.searchform_ = this.dom_.createDom('form', 'cam-searchform');
/**
* @type {goog.ui.Button}
* @private
*/
this.biggerButton_ = new goog.ui.Button('+');
this.biggerButton_.addClassName('cam-bigger');
/**
* @type {goog.ui.Button}
* @private
*/
this.smallerButton_ = new goog.ui.Button('\u2212');
this.smallerButton_.addClassName('cam-smaller');
/**
* @type {goog.ui.Button}
* @private
*/
this.checkedItemsCreateSetButton_ = new goog.ui.Button('');
this.checkedItemsCreateSetButton_.addClassName('cam-checked-items');
this.checkedItemsCreateSetButton_.setVisible(false);
/**
* @type {goog.ui.Button}
* @private
*/
this.clearSelectionButton_ = new goog.ui.Button('Clear Selection');
this.clearSelectionButton_.setVisible(false);
/**
* @type {goog.ui.Button}
* @private
*/
this.createPermanodeButton_ = new goog.ui.Button('New Permanode');
this.createPermanodeButton_.addClassName('cam-toolbar-createpermanode');
/**
* @type {goog.ui.Button}
* @private
*/
this.checkedItemsAddToSetButton_ = new goog.ui.Button('Add to Set');
this.checkedItemsAddToSetButton_.addClassName('cam-checked-items');
this.checkedItemsAddToSetButton_.setEnabled(false);
/**
* @type {goog.ui.Button}
* @private
*/
this.setAsCollecButton_ = new goog.ui.Button('Select as current Set');
this.setAsCollecButton_.addClassName('cam-checked-items');
this.setAsCollecButton_.setEnabled(false);
/**
* Used only on the search page
* @type {goog.ui.Button}
* @private
*/
this.rootsButton_ = new goog.ui.Button('Search Roots');
this.rootsButton_.addClassName('cam-checked-items');
/**
* Used to display random statusy stuff.
*/
this.status_ = null;
/**
* @type {goog.events.EventHandler}
* @private
*/
this.eh_ = new goog.events.EventHandler(this);
};
goog.inherits(camlistore.Toolbar, goog.ui.Toolbar);
/**
* @enum {string}
*/
camlistore.Toolbar.EventType = {
SEARCH: 'Camlistore_Toolbar_Search',
BIGGER: 'Camlistore_Toolbar_Bigger',
SMALLER: 'Camlistore_Toolbar_Smaller',
ROOTS: 'Camlistore_Toolbar_SearchRoots',
CHECKED_ITEMS_ADDTO_SET: 'Camlistore_Toolbar_Checked_Items_Addto_set',
CLEAR_SELECTION: 'Clear_Selection',
SELECT_COLLEC: 'Camlistore_Toolbar_Select_collec',
CHECKED_ITEMS_CREATE_SET: 'Camlistore_Toolbar_Checked_Items_Create_set',
CREATE_PERMANODE: 'Camlistore_Toolbar_Create_Permanode',
};
/**
* @return {goog.ui.Control}
*/
camlistore.Toolbar.prototype.setStatus = function(text) {
goog.dom.setTextContent(this.status_, text);
};
camlistore.Toolbar.prototype.getSearchText = function() {
return this.searchbox_.value;
};
/**
* Creates an initial DOM representation for the component.
*/
camlistore.Toolbar.prototype.createDom = function() {
this.decorateInternal(this.dom_.createElement('div'));
};
/**
* Decorates an existing HTML DIV element.
* @param {Element} el The DIV element to decorate.
*/
camlistore.Toolbar.prototype.decorateInternal = function(el) {
camlistore.Toolbar.superClass_.decorateInternal.call(this, el);
this.getElement().className = 'cam-toolbar';
this.searchbox_ = this.dom_.createDom('input', 'cam-searchbox');
this.searchbox_.setAttribute('placeholder', 'Search...');
this.searchbox_.title = '"title:monkey", "tag:cheese", etc...';
this.searchform_.appendChild(this.searchbox_);
this.getElement().appendChild(this.searchform_);
this.addChild(this.smallerButton_, true);
this.addChild(this.biggerButton_, true);
this.addChild(this.checkedItemsCreateSetButton_, true);
this.addChild(this.clearSelectionButton_, true);
this.addChild(this.createPermanodeButton_, true);
this.addChild(this.setAsCollecButton_, true);
this.addChild(this.checkedItemsAddToSetButton_, true);
this.addChild(this.rootsButton_, true);
this.status_ = this.dom_.createDom('div', 'cam-toolbar-status');
this.getElement().appendChild(this.status_);
};
/** @override */
camlistore.Toolbar.prototype.disposeInternal = function() {
camlistore.Toolbar.superClass_.disposeInternal.call(this);
this.eh_.dispose();
};
/**
* Called when component's element is known to be in the document.
*/
camlistore.Toolbar.prototype.enterDocument = function() {
camlistore.Toolbar.superClass_.enterDocument.call(this);
goog.style.setUnselectable(this.searchbox_, false);
this.eh_.listen(
this.searchform_,
goog.events.EventType.SUBMIT,
function(e) {
e.stopPropagation();
e.preventDefault();
this.dispatch_(camlistore.Toolbar.EventType.SEARCH);
}.bind(this));
this.eh_.listen(
this.biggerButton_.getElement(),
goog.events.EventType.CLICK,
goog.bind(this.dispatch_, this, camlistore.Toolbar.EventType.BIGGER));
this.eh_.listen(
this.smallerButton_.getElement(),
goog.events.EventType.CLICK,
goog.bind(this.dispatch_, this, camlistore.Toolbar.EventType.SMALLER));
this.eh_.listen(
this.rootsButton_.getElement(),
goog.events.EventType.CLICK,
goog.bind(this.dispatch_, this, camlistore.Toolbar.EventType.ROOTS));
this.eh_.listen(
this.checkedItemsCreateSetButton_.getElement(),
goog.events.EventType.CLICK,
goog.bind(this.dispatch_, this,
camlistore.Toolbar.EventType.CHECKED_ITEMS_CREATE_SET));
this.eh_.listen(
this.clearSelectionButton_.getElement(),
goog.events.EventType.CLICK,
goog.bind(this.dispatch_, this,
camlistore.Toolbar.EventType.CLEAR_SELECTION));
this.eh_.listen(
this.createPermanodeButton_.getElement(),
goog.events.EventType.CLICK,
goog.bind(this.dispatch_, this,
camlistore.Toolbar.EventType.CREATE_PERMANODE));
this.eh_.listen(
this.setAsCollecButton_.getElement(),
goog.events.EventType.CLICK,
goog.bind(this.dispatch_, this,
camlistore.Toolbar.EventType.SELECT_COLLEC));
this.eh_.listen(
this.checkedItemsAddToSetButton_.getElement(),
goog.events.EventType.CLICK,
goog.bind(this.dispatch_, this,
camlistore.Toolbar.EventType.CHECKED_ITEMS_ADDTO_SET));
};
/**
* @param {camlistore.Toolbar.EventType} eventType Type of event to dispatch.
*/
camlistore.Toolbar.prototype.dispatch_ = function(eventType) {
this.dispatchEvent(eventType);
};
/**
* Called when component's element is known to have been removed from the
* document.
*/
camlistore.Toolbar.prototype.exitDocument = function() {
camlistore.Toolbar.superClass_.exitDocument.call(this);
// Clear event handlers here
};
/**
* TODO: i18n.
* @param {number} count Number of items.
*/
camlistore.Toolbar.prototype.setCheckedBlobItemCount = function(count) {
if (count) {
var txt = 'Create set w/ ' + count + ' item' + (count > 1 ? 's' : '');
this.checkedItemsCreateSetButton_.setContent(txt);
this.checkedItemsCreateSetButton_.setVisible(true);
this.clearSelectionButton_.setVisible(true);
} else {
this.checkedItemsCreateSetButton_.setContent('');
this.checkedItemsCreateSetButton_.setVisible(false);
this.clearSelectionButton_.setVisible(false);
}
};
/**
* TODO: i18n.
* @param {boolean} enable
*/
camlistore.Toolbar.prototype.toggleCollecButton = function(enable) {
if (enable) {
this.setAsCollecButton_.setEnabled(true);
} else {
this.setAsCollecButton_.setEnabled(false);
}
};
/**
* TODO: i18n.
* @param {boolean} enable
*/
camlistore.Toolbar.prototype.toggleAddToSetButton = function(enable) {
if (enable) {
this.checkedItemsAddToSetButton_.setEnabled(true);
} else {
this.checkedItemsAddToSetButton_.setEnabled(false);
}
};

View File

@ -1,31 +0,0 @@
<!doctype html>
<html>
<head>
<script src="closure/goog/base.js"></script>
<script src="./deps.js"></script>
<script>
goog.require('goog.events');
goog.require('camlistore.Toolbar');
goog.require('camlistore.Toolbar.EventType');
</script>
<link rel="stylesheet" href="toolbar.css" type="text/css">
<link rel="stylesheet" href="closure/goog/css/common.css" type="text/css">
<link rel="stylesheet" href="closure/goog/css/toolbar.css" type="text/css">
</head>
<body>
<script>
var x = new camlistore.Toolbar();
x.render(document.body);
goog.events.listen(
x, camlistore.Toolbar.EventType.BIGGER, function() {
console.log('Bigger');
});
goog.events.listen(
x, camlistore.Toolbar.EventType.SMALLER, function() {
console.log('Smaller');
});
</script>
</body>
</html>