0
1
Fork 0

Codigo reorganizado, uso de librerias compartidas y adaptación a movil

This commit is contained in:
Juan Ferrer Toribio 2015-01-23 14:09:30 +01:00
parent e191e4afd4
commit c4f8995478
385 changed files with 19154 additions and 0 deletions

17
configure.php Normal file
View File

@ -0,0 +1,17 @@
<?php
namespace Vn\Hedera;
require_once (__DIR__.'/../php-vn-web/configure.php');
set_include_path
(
get_include_path ()
.PATH_SEPARATOR.__DIR__.'/package/usr/share/php'
);
const _DEVELOPER_MODE = TRUE;
const _CONFIG_DIR = '/home/juan/.config/hedera-web';
const _LOG_DIR = '/tmp';
?>

1
package/DEBIAN/conffiles Normal file
View File

@ -0,0 +1 @@
/etc/hedera-web/config.php

9
package/DEBIAN/control Normal file
View File

@ -0,0 +1,9 @@
Package: hedera-web
Version: 1.0-19
Architecture: all
Maintainer: Juan Ferrer Toribio <juan@verdnatura.es>
Depends: apache2, php5-mysql
Section: misc
Priority: optional
Description: Verdnatura's web page
Verdnatura's web page.

5
package/DEBIAN/postinst Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
service apache2 reload
service cron restart

5
package/DEBIAN/prerm Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
service apache2 reload
service cron restart

View File

@ -0,0 +1,17 @@
Alias /hedera-web /usr/share/hedera-web/
<Directory /usr/share/hedera-web/>
Options Indexes
Options +FollowSymLinks
AllowOverride None
Order Allow,Deny
Allow From All
<FilesMatch "\.(css|js|json|php)$">
SetOutputFilter DEFLATE
</FilesMatch>
<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
</Directory>

View File

@ -0,0 +1,2 @@
MAILTO=webmaster
*/4 * * * * root cd /usr/share/hedera-web/tpv && php5 imap.php

View File

@ -0,0 +1,24 @@
<?php
/**
* Configuration file. Be careful to respect the PHP syntax.
**/
$conf = [
/**
* Database parameters.
**/
'db' => [
'host' => 'db.verdnatura.es'
,'schema' => 'hedera'
,'user' => 'root'
,'pass' => 'base64pass'
]
/**
* The default language.
**/
,'defaultLang' => 'es'
];
?>

Binary file not shown.

View File

@ -0,0 +1,16 @@
Copyright (C) 2013 - Juan Ferrer Toribio
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this program; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA.

View File

@ -0,0 +1,9 @@
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-49049601-1', 'verdnatura.es');
ga('send', 'pageview');
</script>

View File

@ -0,0 +1,15 @@
<?php
use Vn\Hedera\Web;
if ($result = Web::$sysConn->query ('SELECT name, content FROM metatag'))
{
echo '<meta name="content-language" content="'.$_SESSION['lang'].'"/>'."\n\t";
while ($row = $result->fetch_assoc ())
echo '<meta name="'.$row['name'].'" content="'.$row['content'].'"/>'."\n\t";
$result->free ();
}
?>

Binary file not shown.

View File

@ -0,0 +1,12 @@
/* Global */
@font-face {
font-family: 'Open Sans';
src: url(opensans.ttf) format('truetype');
}
*
{
font-size: 13px;
font-family: 'Open Sans', 'Verdana', 'Sans';
}

View File

@ -0,0 +1,331 @@
/* Global */
@font-face {
font-family: 'Open Sans';
src: url(opensans.ttf) format('truetype');
}
body
{
margin: 0px;
}
body,
label,
button,
input,
textarea
{
font-size: 13px;
font-family: 'Open Sans', 'Verdana', 'Sans';
}
iframe
{
border: 0px;
}
fieldset,
div
{
margin: 0px;
}
form
{
padding: 0px;
margin: 0px;
}
table
{
width: 100%;
}
a:link,
a:visited,
a:active
{
color: #000;
text-decoration: none;
}
a:hover
{
text-decoration: none;
}
a img
{
padding: 1px;
border: 1px solid #EEE;
border-color: transparent;
}
a img:hover
{
border-color: #999;
}
h1, h2, h3, h4, h5, h6
{
margin: 0px;
padding: 2px;
}
h1
{
font-size: 22px;
}
h2
{
font-size: 20px;
}
p
{
margin: 0px;
margin-top: 16px;
margin-bottom: 16px;
}
div.clear
{
clear: both;
}
/* Inputs */
input,
textarea,
button
{
border: 1px solid #CCD;
margin: 2px;
padding: 4px;
border-radius: 2px;
/* box-shadow: 0px 2px 2px #AAA; */
}
textarea
{
height: 40px;
width: 200px;
}
input[type=submit],
input[type=button],
button
{
background-color: #EEF;
padding: 4px;
}
input[type=text]:focus,
input[type=password]:focus,
textarea:focus
{
background-color: #EEF;
border-color: #BBC;
}
input[type=submit]:hover,
input[type=button]:hover,
button:hover
{
cursor: pointer;
background-color: #DDE;
}
/* Grid */
table.grid
{
width: 95%;
margin: auto;
border-collapse: collapse;
text-align: center;
margin-bottom: 15px;
}
table.grid thead tr,
table.grid tfoot tr
{
/* background-color: #C0CCB3;
background: url(image/gradient.png) repeat-x scroll 0;
*/
background-color: #EEF;
border: 1px solid #CCD;
color: black;
font-weight: bold;
vertical-align: middle;
text-align: center;
height: 30px;
}
table.grid thead th
{
cursor: pointer;
}
table.grid thead th:hover
{
background-color: #DDE;
}
table.grid tr
{
height: 35px;
}
table.grid tfoot a,
table.grid thead a
{
color: black;
}
table.grid tr.pair-row
{
background-color: transparent;
}
td.grid-message
{
height: 80px;
}
td.grid-message img
{
vertical-align: middle;
padding: 10px;
}
table.grid tbody td
{
padding-right: 8px;
padding-left: 8px;
}
input.cell-spin
{
width: 25px;
text-align: right;
}
button.cell-button
{
margin: 6px;
border: none;
background-color: transparent;
}
/* Calendar */
.calendar
{
width: 220px;
background-color: white;
border: 1px solid #CCD;
border-radius: 2px;
box-shadow: 0px 2px 2px #AAA;
}
.calendar table
{
border-collapse: collapse;
}
.calendar thead tr,
.calendar tfoot tr
{
background-color: #EEF;
color: black;
font-weight: normal;
vertical-align: middle;
text-align: center;
height: 30px;
}
.calendar thead tr
{
border-bottom: 1px solid #CCD;
}
.calendar tfoot tr
{
border-top: 1px solid #CCD;
}
.calendar col
{
width: 14.2%;
}
.calendar tr
{
height: 22px;
}
.calendar tbody td
{
text-align: right;
padding-right: 6px;
}
.calendar td.highlight,
.calendar td:hover,
.button:hover
{
cursor: pointer;
background-color: #DDE;
}
/* Date chooser */
.date-chooser button
{
margin: 0px;
margin-right: 8px;
}
/* Full image */
div.full-image
{
position: fixed;
background-color: #FFF;
text-align: center;
border: 1px solid #999;
border-radius: 2px;
z-index: 2;
}
div.image-loader
{
position: fixed;
background-color: #FFF;
border: 1px solid #999;
border-radius: 2px;
z-index: 3;
}
div.image-loader img
{
padding: 10px;
}
/* Image editor */
img.editable
{
cursor: pointer;
}
div.image-editor
{
background-color: white;
border: 1px solid #999;
border-radius: 2px;
padding: 12px;
width: 400px;
}
div.image-editor h3
{
text-align: center;
padding-bottom: 10px;
}
div.image-editor iframe
{
display: none;
}
div.image-editor button
{
margin-left: 5px;
margin-right: 5px;
}
div.image-editor img
{
visibility: hidden;
vertical-align: middle;
padding-right: 10px;
}
/* Form */
table.form
{
border-collapse: separate;
border-spacing: 4px;
}
table.form td.label
{
text-align: right;
}
table.form tr
{
height: 35px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 409 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 578 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 817 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 935 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 397 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 622 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 805 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

View File

@ -0,0 +1,152 @@
<?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"
sodipodi:docname="access-log.svg"
inkscape:export-filename="/home/sam/dev/RESOURCES/gnome-icon-theme-symbolic/src/gnome-stencils.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
height="16"
id="svg7384"
version="1.1"
inkscape:version="0.48.5 r10040"
width="16">
<metadata
id="metadata90">
<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>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:bbox-nodes="false"
inkscape:bbox-paths="true"
bordercolor="#666666"
borderopacity="1"
inkscape:current-layer="layer9"
inkscape:cx="24.108916"
inkscape:cy="8.8376873"
gridtolerance="10"
inkscape:guide-bbox="true"
guidetolerance="10"
id="namedview88"
inkscape:object-nodes="false"
inkscape:object-paths="false"
objecttolerance="10"
pagecolor="#3a3b39"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
showborder="false"
showgrid="false"
showguides="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="false"
inkscape:snap-global="true"
inkscape:snap-grids="true"
inkscape:snap-nodes="true"
inkscape:snap-others="false"
inkscape:snap-to-guides="true"
inkscape:window-height="702"
inkscape:window-maximized="1"
inkscape:window-width="1366"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:zoom="8.5267824">
<inkscape:grid
empspacing="2"
enabled="true"
id="grid4866"
originx="200px"
originy="120px"
snapvisiblegridlinesonly="true"
spacingx="1px"
spacingy="1px"
type="xygrid"
visible="true" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
inkscape:groupmode="layer"
id="layer9"
inkscape:label="status"
style="display:inline"
transform="translate(-41.0002,-337)">
<path
inkscape:connector-curvature="0"
d="m 51.55489,345.09373 c -0.70541,0.62353 -1.53918,0.90625 -2.55469,0.90625 -1.01551,0 -1.85318,-0.29053 -2.55859,-0.91406 -1.10938,0.36328 -2.43603,1.28775 -2.4375,2.90234 l -0.0039,3.01172 c -7.2e-4,0.554 0.446,1.00002 1,1.00002 l 8,0 c 0.554,0 1,-0.44602 1,-1.00002 l 0,-3 c 0,-1.38672 -1.10231,-2.5558 -2.44531,-2.90625 z"
id="path3940-5"
sodipodi:nodetypes="csccsssscc"
style="fill:#333333;fill-opacity:1;stroke:none" />
<path
sodipodi:cx="49.5"
sodipodi:cy="342.5"
d="m 52,342.5 c 0,1.38071 -1.119288,2.5 -2.5,2.5 -1.380712,0 -2.5,-1.11929 -2.5,-2.5 0,-1.38071 1.119288,-2.5 2.5,-2.5 1.380712,0 2.5,1.11929 2.5,2.5 z"
id="path3942-6"
sodipodi:rx="2.5"
sodipodi:ry="2.5"
style="color:#bebebe;fill:#333333;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
transform="matrix(1.2,0,0,1.2,-10.3998,-69.00003)"
sodipodi:type="arc" />
</g>
<g
inkscape:groupmode="layer"
id="layer10"
inkscape:label="devices"
style="display:inline"
transform="translate(-41.0002,-337)" />
<g
inkscape:groupmode="layer"
id="layer11"
inkscape:label="apps"
transform="translate(-41.0002,-337)" />
<g
inkscape:groupmode="layer"
id="layer13"
inkscape:label="places"
style="display:inline"
transform="translate(-41.0002,-337)" />
<g
inkscape:groupmode="layer"
id="layer14"
inkscape:label="mimetypes"
transform="translate(-41.0002,-337)" />
<g
inkscape:groupmode="layer"
id="layer15"
inkscape:label="emblems"
style="display:inline"
transform="translate(-41.0002,-337)" />
<g
inkscape:groupmode="layer"
id="g71291"
inkscape:label="emotes"
style="display:inline"
transform="translate(-41.0002,-337)" />
<g
inkscape:groupmode="layer"
id="g4953"
inkscape:label="categories"
style="display:inline"
transform="translate(-41.0002,-337)" />
<g
inkscape:groupmode="layer"
id="layer12"
inkscape:label="actions"
style="display:inline"
transform="translate(-41.0002,-337)" />
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -0,0 +1,161 @@
<?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"
sodipodi:docname="catalog.svg"
inkscape:export-filename="/home/sam/dev/RESOURCES/gnome-icon-theme-symbolic/src/gnome-stencils.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
height="16"
id="svg7384"
version="1.1"
inkscape:version="0.48.5 r10040"
width="16">
<metadata
id="metadata90">
<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>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:bbox-nodes="false"
inkscape:bbox-paths="true"
bordercolor="#666666"
borderopacity="1"
inkscape:current-layer="layer12"
inkscape:cx="492.64489"
inkscape:cy="457.29496"
gridtolerance="10"
inkscape:guide-bbox="true"
guidetolerance="10"
id="namedview88"
inkscape:object-nodes="false"
inkscape:object-paths="false"
objecttolerance="10"
pagecolor="#3a3b39"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
showborder="false"
showgrid="false"
showguides="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="false"
inkscape:snap-global="true"
inkscape:snap-grids="true"
inkscape:snap-nodes="true"
inkscape:snap-others="false"
inkscape:snap-to-guides="true"
inkscape:window-height="702"
inkscape:window-maximized="1"
inkscape:window-width="1366"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:zoom="2.0429687">
<inkscape:grid
dotted="false"
empspacing="2"
enabled="true"
id="grid4866"
originx="180px"
originy="732.00001px"
snapvisiblegridlinesonly="true"
spacingx="1px"
spacingy="1px"
type="xygrid"
visible="true" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
inkscape:groupmode="layer"
id="layer9"
inkscape:label="status"
style="display:inline"
transform="translate(-61.0002,-949.00001)" />
<g
inkscape:groupmode="layer"
id="layer10"
inkscape:label="devices"
style="display:inline"
transform="translate(-61.0002,-949.00001)" />
<g
inkscape:groupmode="layer"
id="layer11"
inkscape:label="apps"
transform="translate(-61.0002,-949.00001)" />
<g
inkscape:groupmode="layer"
id="layer13"
inkscape:label="places"
style="display:inline"
transform="translate(-61.0002,-949.00001)" />
<g
inkscape:groupmode="layer"
id="layer14"
inkscape:label="mimetypes"
transform="translate(-61.0002,-949.00001)" />
<g
inkscape:groupmode="layer"
id="layer15"
inkscape:label="emblems"
style="display:inline"
transform="translate(-61.0002,-949.00001)" />
<g
inkscape:groupmode="layer"
id="g71291"
inkscape:label="emotes"
style="display:inline"
transform="translate(-61.0002,-949.00001)" />
<g
inkscape:groupmode="layer"
id="g4953"
inkscape:label="categories"
style="display:inline"
transform="translate(-61.0002,-949.00001)" />
<g
inkscape:groupmode="layer"
id="layer12"
inkscape:label="actions"
style="display:inline"
transform="translate(-61.0002,-949.00001)">
<rect
height="2.0002136"
id="rect7356"
inkscape:label="a"
style="color:#bebebe;fill:#333333;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
width="9.9996014"
x="64.000397"
y="951.99982" />
<rect
height="2.0002136"
id="rect7358"
inkscape:label="a"
style="color:#bebebe;fill:#333333;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
width="9.9996014"
x="64.000397"
y="955.99982" />
<rect
height="2.0002136"
id="rect7360"
inkscape:label="a"
style="color:#bebebe;fill:#333333;fill-opacity:1;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible"
width="9.9996014"
x="64.000397"
y="959.99982" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -0,0 +1,143 @@
<?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"
sodipodi:docname="clean"
inkscape:export-filename="/home/sam/dev/RESOURCES/gnome-icon-theme-symbolic/src/gnome-stencils.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
height="16"
id="svg7384"
version="1.1"
inkscape:version="0.48.5 r10040"
width="16">
<metadata
id="metadata90">
<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>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:bbox-nodes="false"
inkscape:bbox-paths="true"
bordercolor="#666666"
borderopacity="1"
inkscape:current-layer="layer12"
inkscape:cx="-151.80971"
inkscape:cy="80.67304"
gridtolerance="10"
inkscape:guide-bbox="true"
guidetolerance="10"
id="namedview88"
inkscape:object-nodes="false"
inkscape:object-paths="false"
objecttolerance="10"
pagecolor="#3a3b39"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
showborder="false"
showgrid="false"
showguides="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="false"
inkscape:snap-global="true"
inkscape:snap-grids="true"
inkscape:snap-nodes="true"
inkscape:snap-others="false"
inkscape:snap-to-guides="true"
inkscape:window-height="702"
inkscape:window-maximized="1"
inkscape:window-width="1366"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:zoom="2.0429688">
<inkscape:grid
dotted="false"
empspacing="2"
enabled="true"
id="grid4866"
originx="60px"
originy="550px"
snapvisiblegridlinesonly="true"
spacingx="1px"
spacingy="1px"
type="xygrid"
visible="true" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
inkscape:groupmode="layer"
id="layer9"
inkscape:label="status"
style="display:inline"
transform="translate(-181.0002,-767)" />
<g
inkscape:groupmode="layer"
id="layer10"
inkscape:label="devices"
style="display:inline"
transform="translate(-181.0002,-767)" />
<g
inkscape:groupmode="layer"
id="layer11"
inkscape:label="apps"
transform="translate(-181.0002,-767)" />
<g
inkscape:groupmode="layer"
id="layer13"
inkscape:label="places"
style="display:inline"
transform="translate(-181.0002,-767)" />
<g
inkscape:groupmode="layer"
id="layer14"
inkscape:label="mimetypes"
transform="translate(-181.0002,-767)" />
<g
inkscape:groupmode="layer"
id="layer15"
inkscape:label="emblems"
style="display:inline"
transform="translate(-181.0002,-767)" />
<g
inkscape:groupmode="layer"
id="g71291"
inkscape:label="emotes"
style="display:inline"
transform="translate(-181.0002,-767)" />
<g
inkscape:groupmode="layer"
id="g4953"
inkscape:label="categories"
style="display:inline"
transform="translate(-181.0002,-767)" />
<g
inkscape:groupmode="layer"
id="layer12"
inkscape:label="actions"
style="display:inline"
transform="translate(-181.0002,-767)">
<path
inkscape:connector-curvature="0"
d="m 191.0002,769 6,6 -6,6 -9.0353,0 c -0.53033,-0.0221 -0.9647,-0.49177 -0.9647,-1 l 0,-10 c 0,-0.53079 0.34561,-1 1.0089,-1 l 8.9911,0 z m -1,3 -1,0 c -0.0104,-1.2e-4 -0.0208,-4.6e-4 -0.0313,0 -0.25495,0.0112 -0.50987,0.12858 -0.6875,0.3125 l -1.2812,1.28125 -1.3125,-1.28125 C 185.42208,772.082 185.24103,772.007 185.0002,772 l -1,0 0,1 c 0,0.28647 0.0343,0.55065 0.25,0.75 l 1.28125,1.28125 -1.25,1.25 c -0.18819,0.18817 -0.28124,0.45345 -0.28125,0.71875 l 0,1 1,0 c 0.2653,-10e-6 0.53059,-0.0931 0.71875,-0.28125 l 1.28125,-1.28125 1.28125,1.28125 C 188.46961,777.90694 188.73491,778 189.0002,778 l 1,0 0,-1 c 0,-0.26529 -0.0931,-0.53058 -0.28125,-0.71875 l -1.28125,-1.25 1.28125,-1.28125 c 0.21074,-0.19463 0.30316,-0.46925 0.28125,-0.75 l 0,-1 z"
id="path43079"
sodipodi:nodetypes="ccccccccccsccccccccccccccccccccccc"
style="color:#000000;fill:#333333;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: 4.9 KiB

View File

@ -0,0 +1,136 @@
<?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"
sodipodi:docname="delete.svg"
height="16"
id="svg7384"
inkscape:version="0.48.5 r10040"
version="1.1"
width="16.000002">
<metadata
id="metadata90">
<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>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:bbox-nodes="false"
inkscape:bbox-paths="true"
bordercolor="#666666"
borderopacity="1"
inkscape:current-layer="layer13"
inkscape:cx="39.718376"
inkscape:cy="-0.872946"
gridtolerance="10"
inkscape:guide-bbox="true"
guidetolerance="10"
id="namedview88"
inkscape:object-nodes="false"
inkscape:object-paths="false"
objecttolerance="10"
pagecolor="#3a3b39"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
showborder="false"
showgrid="true"
showguides="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="false"
inkscape:snap-global="true"
inkscape:snap-grids="true"
inkscape:snap-nodes="true"
inkscape:snap-others="false"
inkscape:snap-to-guides="true"
inkscape:window-height="702"
inkscape:window-maximized="1"
inkscape:window-width="1366"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:zoom="32.6875">
<inkscape:grid
empspacing="2"
enabled="true"
id="grid4866"
originx="-240px"
originy="-42px"
snapvisiblegridlinesonly="true"
spacingx="1px"
spacingy="1px"
type="xygrid"
visible="true" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
inkscape:groupmode="layer"
id="layer9"
inkscape:label="status"
style="display:inline"
transform="translate(-481.0002,-175)" />
<g
inkscape:groupmode="layer"
id="layer10"
inkscape:label="devices"
transform="translate(-481.0002,-175)" />
<g
inkscape:groupmode="layer"
id="layer11"
inkscape:label="apps"
transform="translate(-481.0002,-175)" />
<g
inkscape:groupmode="layer"
id="layer13"
inkscape:label="places"
transform="translate(-481.0002,-175)">
<path
inkscape:connector-curvature="0"
d="m 484.0002,180 0,9 9,0 0,-9 2,0 0,9 c 0,2 -2,2 -2,2 l -9,0 c -2,0 -2,-2 -2,-2 l 0,-9 z m 4.00001,1 1.00002,0 0,6 -1.00002,0 z m 2,0 1.00002,0 0,6 -1.00002,0 z m -4,0 0.99999,0 0,6 -0.99999,0 z m -1.00001,-6 c -2,0 -2,2 -2,2 l -2,0 0,2 15,0 0,-2 -2,0 c 0,-2 -2,-2 -2,-2 l -7,0 z m 0,1 7,0 0,1 -7,0 0,-1 z"
id="path3799"
style="fill:#333333;fill-opacity:1;stroke:none" />
</g>
<g
inkscape:groupmode="layer"
id="layer14"
inkscape:label="mimetypes"
transform="translate(-481.0002,-175)" />
<g
inkscape:groupmode="layer"
id="layer15"
inkscape:label="emblems"
style="display:inline"
transform="translate(-481.0002,-175)" />
<g
inkscape:groupmode="layer"
id="g71291"
inkscape:label="emotes"
style="display:inline"
transform="translate(-481.0002,-175)" />
<g
inkscape:groupmode="layer"
id="g4953"
inkscape:label="categories"
style="display:inline"
transform="translate(-481.0002,-175)" />
<g
inkscape:groupmode="layer"
id="layer12"
inkscape:label="actions"
style="display:inline"
transform="translate(-481.0002,-175)" />
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,146 @@
<?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"
sodipodi:docname="text-editor-symbolic.svg"
height="16"
id="svg7384"
inkscape:version="0.48.5 r10040"
version="1.1"
width="16">
<metadata
id="metadata90">
<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>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:bbox-paths="false"
bordercolor="#666666"
borderopacity="1"
inkscape:current-layer="layer11"
inkscape:cx="124.32121"
inkscape:cy="78.24136"
gridtolerance="10"
inkscape:guide-bbox="true"
guidetolerance="10"
id="namedview88"
inkscape:object-nodes="false"
inkscape:object-paths="false"
objecttolerance="10"
pagecolor="#3a3b39"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
showborder="false"
showgrid="false"
showguides="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="false"
inkscape:snap-global="true"
inkscape:snap-grids="true"
inkscape:snap-nodes="false"
inkscape:snap-others="false"
inkscape:snap-to-guides="true"
inkscape:window-height="702"
inkscape:window-maximized="1"
inkscape:window-width="1366"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:zoom="2.0429688">
<inkscape:grid
empspacing="2"
enabled="true"
id="grid4866"
snapvisiblegridlinesonly="true"
spacingx="1px"
spacingy="1px"
type="xygrid"
visible="true" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
inkscape:groupmode="layer"
id="layer9"
inkscape:label="status"
style="display:inline"
transform="translate(-283.02908,-629.02581)" />
<g
inkscape:groupmode="layer"
id="layer10"
inkscape:label="devices"
transform="translate(-283.02908,-629.02581)" />
<g
inkscape:groupmode="layer"
id="layer11"
inkscape:label="apps"
transform="translate(-283.02908,-629.02581)">
<path
inkscape:connector-curvature="0"
d="m 288.03089,639.02581 6.99819,-7 c 1,0 2,1 2,2 l -7,7 -2,0 z"
id="path2273-6-2"
sodipodi:nodetypes="cccccc"
style="fill:#333333;fill-opacity:1;fill-rule:evenodd;stroke:none" />
<path
inkscape:connector-curvature="0"
d="m 296.02908,631.02581 c 1,0 2,1 2,2 l 1,-1 c 0,-1 -0.75185,-2 -2,-2 z"
id="path4113-1-6-3"
sodipodi:nodetypes="ccccc"
style="fill:#333333;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
<path
inkscape:connector-curvature="0"
d="m 284.12283,629.02581 c -0.56869,5e-5 -1.0937,0.50285 -1.09375,1.0625 l 0,12.84375 0,0.25 0,0.78125 c 5e-5,0.55965 0.52506,1.06245 1.09375,1.0625 l 4.34375,0 1.125,0 5.34375,0 c 0.55754,-5e-5 1.07398,-0.48468 1.09375,-1.03125 3.9e-4,-0.0109 0,-0.0204 0,-0.0312 l 0,-6.93755 -2,2 0,4 -9,0 0,-12 5,0 2,2 1.53125,-1.53125 -2.1875,-2.125 c -0.20046,-0.20837 -0.48969,-0.3416 -0.78125,-0.34375 z"
id="path6682-6"
sodipodi:nodetypes="ccccccccccsccccccccccc"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#333333;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" />
</g>
<g
inkscape:groupmode="layer"
id="layer13"
inkscape:label="places"
transform="translate(-283.02908,-629.02581)" />
<g
inkscape:groupmode="layer"
id="layer14"
inkscape:label="mimetypes"
transform="translate(-283.02908,-629.02581)" />
<g
inkscape:groupmode="layer"
id="layer15"
inkscape:label="emblems"
style="display:inline"
transform="translate(-283.02908,-629.02581)" />
<g
inkscape:groupmode="layer"
id="g71291"
inkscape:label="emotes"
style="display:inline"
transform="translate(-283.02908,-629.02581)" />
<g
inkscape:groupmode="layer"
id="g4953"
inkscape:label="categories"
style="display:inline"
transform="translate(-283.02908,-629.02581)" />
<g
inkscape:groupmode="layer"
id="layer12"
inkscape:label="actions"
style="display:inline"
transform="translate(-283.02908,-629.02581)" />
</svg>

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -0,0 +1,154 @@
<?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"
sodipodi:docname="error.svg"
height="16"
id="svg7384"
inkscape:version="0.48.5 r10040"
version="1.1"
width="16">
<metadata
id="metadata90">
<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>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:bbox-nodes="false"
inkscape:bbox-paths="true"
bordercolor="#666666"
borderopacity="1"
inkscape:current-layer="layer9"
inkscape:cx="0.18115639"
inkscape:cy="11.79579"
gridtolerance="10"
inkscape:guide-bbox="true"
guidetolerance="10"
id="namedview88"
inkscape:object-nodes="false"
inkscape:object-paths="false"
objecttolerance="10"
pagecolor="#3a3b39"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
showborder="false"
showgrid="false"
showguides="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="false"
inkscape:snap-global="true"
inkscape:snap-grids="true"
inkscape:snap-nodes="true"
inkscape:snap-others="false"
inkscape:snap-to-guides="true"
inkscape:window-height="702"
inkscape:window-maximized="1"
inkscape:window-width="1366"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:zoom="23.610134">
<inkscape:grid
empspacing="2"
enabled="true"
id="grid4866"
originx="-99.9998px"
originy="40px"
snapvisiblegridlinesonly="true"
spacingx="1px"
spacingy="1px"
type="xygrid"
visible="true" />
<inkscape:grid
color="#000000"
empcolor="#000000"
empopacity="0"
empspacing="4"
enabled="true"
id="grid5968"
opacity="0.1254902"
originx="-99.9998px"
originy="40px"
snapvisiblegridlinesonly="true"
spacingx="0.5px"
spacingy="0.5px"
type="xygrid"
visible="true" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
inkscape:groupmode="layer"
id="layer9"
inkscape:label="status"
style="display:inline"
transform="translate(-341,-257)">
<path
inkscape:connector-curvature="0"
d="m 349.0002,258 c -3.87055,0 -7,3.12944 -7,7 0,3.87055 3.12945,7 7,7 3.87055,0 7,-3.12945 7,-7 0,-3.87056 -3.12945,-7 -7,-7 z m -4,6 8,0 0,2 -8,0 z"
id="path10839-3"
sodipodi:nodetypes="sssssccccc"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#ee3333;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988000000006;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Andale Mono;-inkscape-font-specification:Andale Mono" />
</g>
<g
inkscape:groupmode="layer"
id="layer10"
inkscape:label="devices"
style="display:inline"
transform="translate(-341,-257)" />
<g
inkscape:groupmode="layer"
id="layer11"
inkscape:label="apps"
transform="translate(-341,-257)" />
<g
inkscape:groupmode="layer"
id="layer13"
inkscape:label="places"
style="display:inline"
transform="translate(-341,-257)" />
<g
inkscape:groupmode="layer"
id="layer14"
inkscape:label="mimetypes"
transform="translate(-341,-257)" />
<g
inkscape:groupmode="layer"
id="layer15"
inkscape:label="emblems"
style="display:inline"
transform="translate(-341,-257)" />
<g
inkscape:groupmode="layer"
id="g71291"
inkscape:label="emotes"
style="display:inline"
transform="translate(-341,-257)" />
<g
inkscape:groupmode="layer"
id="g4953"
inkscape:label="categories"
style="display:inline"
transform="translate(-341,-257)" />
<g
inkscape:groupmode="layer"
id="layer12"
inkscape:label="actions"
style="display:inline"
transform="translate(-341,-257)" />
</svg>

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -0,0 +1,169 @@
<?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"
sodipodi:docname="go-previous-symbolic.svg"
height="16"
id="svg7384"
inkscape:version="0.48.5 r10040"
version="1.1"
width="16">
<metadata
id="metadata90">
<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>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:bbox-nodes="false"
inkscape:bbox-paths="true"
bordercolor="#666666"
borderopacity="1"
inkscape:current-layer="layer12"
inkscape:cx="-10.422846"
inkscape:cy="-25.208568"
gridtolerance="10"
inkscape:guide-bbox="true"
guidetolerance="10"
id="namedview88"
inkscape:object-nodes="false"
inkscape:object-paths="false"
objecttolerance="10"
pagecolor="#3a3b39"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
showborder="false"
showgrid="false"
showguides="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="false"
inkscape:snap-global="true"
inkscape:snap-grids="true"
inkscape:snap-nodes="true"
inkscape:snap-others="false"
inkscape:snap-to-guides="true"
inkscape:window-height="702"
inkscape:window-maximized="1"
inkscape:window-width="1366"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:zoom="2.0429688">
<inkscape:grid
empspacing="2"
enabled="true"
id="grid4866"
originx="141px"
originy="530px"
snapvisiblegridlinesonly="true"
spacingx="1px"
spacingy="1px"
type="xygrid"
visible="true" />
<inkscape:grid
color="#000000"
empcolor="#000000"
empopacity="0"
empspacing="4"
enabled="true"
id="grid5968"
opacity="0.1254902"
originx="141px"
originy="530px"
snapvisiblegridlinesonly="true"
spacingx="0.5px"
spacingy="0.5px"
type="xygrid"
visible="true" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
inkscape:groupmode="layer"
id="layer9"
inkscape:label="status"
style="display:inline"
transform="translate(-100.0002,-747)" />
<g
inkscape:groupmode="layer"
id="layer10"
inkscape:label="devices"
transform="translate(-100.0002,-747)" />
<g
inkscape:groupmode="layer"
id="layer11"
inkscape:label="apps"
transform="translate(-100.0002,-747)" />
<g
inkscape:groupmode="layer"
id="layer13"
inkscape:label="places"
transform="translate(-100.0002,-747)" />
<g
inkscape:groupmode="layer"
id="layer14"
inkscape:label="mimetypes"
transform="translate(-100.0002,-747)" />
<g
inkscape:groupmode="layer"
id="layer15"
inkscape:label="emblems"
style="display:inline"
transform="translate(-100.0002,-747)" />
<g
inkscape:groupmode="layer"
id="g71291"
inkscape:label="emotes"
style="display:inline"
transform="translate(-100.0002,-747)" />
<g
inkscape:groupmode="layer"
id="g4953"
inkscape:label="categories"
style="display:inline"
transform="translate(-100.0002,-747)" />
<g
inkscape:groupmode="layer"
id="layer12"
inkscape:label="actions"
style="display:inline"
transform="translate(-100.0002,-747)">
<path
inkscape:connector-curvature="0"
d="m 110.875,749 a 1.0001,1.0001 0 0 0 -0.59375,0.28125 l -5,5 -0.6875,0.71875 0.6875,0.71875 5,5 a 1.016466,1.016466 0 1 0 1.4375,-1.4375 L 107.4375,755 l 4.28125,-4.28125 A 1.0001,1.0001 0 0 0 110.875,749 z"
id="path6040"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#333333;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" />
<rect
height="1"
id="rect6046"
rx="0"
ry="1"
style="fill:#333333;fill-opacity:1;stroke:none"
width="1"
x="111.0002"
y="749" />
<rect
height="1"
id="rect6050"
rx="0"
ry="1"
style="fill:#333333;fill-opacity:1;stroke:none"
width="1"
x="111.0002"
y="760" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -0,0 +1,122 @@
<?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"
id="svg7384"
version="1.1"
inkscape:version="0.48.5 r10040"
height="16"
sodipodi:docname="info.svg"
width="16">
<metadata
id="metadata90">
<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>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:cy="15.633268"
inkscape:current-layer="layer9"
inkscape:window-width="1310"
pagecolor="#555753"
showborder="false"
showguides="true"
inkscape:snap-nodes="true"
objecttolerance="10"
showgrid="false"
inkscape:object-nodes="true"
inkscape:pageshadow="2"
inkscape:guide-bbox="true"
inkscape:window-x="54"
inkscape:snap-bbox="true"
bordercolor="#666666"
id="namedview88"
inkscape:window-maximized="0"
inkscape:snap-global="true"
inkscape:window-y="38"
gridtolerance="10"
inkscape:zoom="3.9843904"
inkscape:window-height="690"
borderopacity="1"
guidetolerance="10"
inkscape:cx="-46.807539"
inkscape:bbox-paths="false"
inkscape:snap-grids="true"
inkscape:pageopacity="1"
inkscape:snap-to-guides="true">
<inkscape:grid
visible="true"
spacingx="1px"
type="xygrid"
spacingy="1px"
id="grid4866"
empspacing="2"
enabled="true"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
transform="translate(-281.0002,-257)"
inkscape:groupmode="layer"
id="layer9"
inkscape:label="status"
style="display:inline">
<path
d="m 289,257.03125 c -0.40018,0 -0.81534,0.15911 -1.125,0.46875 l -6.375,6.375 c -0.61932,0.61929 -0.61932,1.63071 0,2.25 l 6.375,6.375 c 0.61931,0.61929 1.63068,0.61929 2.25,0 l 6.375,-6.375 c 0.61932,-0.61929 0.61931,-1.63071 0,-2.25 l -6.375,-6.375 c -0.30966,-0.30964 -0.72482,-0.46875 -1.125,-0.46875 z M 288.8125,260 c 1.64243,-0.092 3.0955,1.17008 3.1875,2.8125 -10e-5,1.40136 -0.37771,1.92177 -1.59375,2.84375 -0.19093,0.14364 -0.3256,0.2506 -0.375,0.3125 C 289.98185,266.03085 290,266.002 290,266 c 0.007,0.52831 -0.47163,1 -1,1 -0.52837,0 -1.007,-0.47169 -1,-1 0,-0.50239 0.22424,-0.94342 0.46875,-1.25 0.24451,-0.30663 0.4913,-0.51638 0.71875,-0.6875 0.20405,-0.16056 0.46083,-0.38454 0.6875,-0.65625 0.0935,-0.1121 0.129,-0.30766 0.125,-0.4375 l 0,-0.0313 c -0.0316,-0.56324 -0.49926,-0.9691 -1.0625,-0.9375 -0.56324,0.0316 -0.9691,0.43676 -0.9375,1 l -2,0 c -0.092,-1.64243 1.17007,-2.9079 2.8125,-3 z M 289,268 c 0.55228,0 1,0.44772 1,1 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 z"
id="path19592"
style="color:#bebebe;fill:#748cc9;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible" />
</g>
<g
transform="translate(-281.0002,-257)"
inkscape:groupmode="layer"
id="layer10"
inkscape:label="devices" />
<g
transform="translate(-281.0002,-257)"
inkscape:groupmode="layer"
id="layer11"
inkscape:label="apps" />
<g
transform="translate(-281.0002,-257)"
inkscape:groupmode="layer"
id="layer12"
inkscape:label="actions" />
<g
transform="translate(-281.0002,-257)"
inkscape:groupmode="layer"
id="layer13"
inkscape:label="places" />
<g
transform="translate(-281.0002,-257)"
inkscape:groupmode="layer"
id="layer14"
inkscape:label="mimetypes" />
<g
transform="translate(-281.0002,-257)"
inkscape:groupmode="layer"
id="layer15"
inkscape:label="emblems"
style="display:inline" />
<g
transform="translate(-281.0002,-257)"
inkscape:groupmode="layer"
id="g4953"
inkscape:label="categories"
style="display:inline" />
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -0,0 +1,133 @@
<?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"
sodipodi:docname="ok.svg"
height="16"
id="svg7384"
inkscape:version="0.48.5 r10040"
version="1.1"
width="16">
<metadata
id="metadata90">
<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>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:bbox-paths="false"
bordercolor="#666666"
borderopacity="1"
inkscape:current-layer="layer15"
inkscape:cx="-49.941262"
inkscape:cy="-14.75838"
gridtolerance="10"
inkscape:guide-bbox="true"
guidetolerance="10"
id="namedview88"
inkscape:object-nodes="false"
inkscape:object-paths="false"
objecttolerance="10"
pagecolor="#555753"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
showborder="false"
showgrid="false"
showguides="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="false"
inkscape:snap-global="true"
inkscape:snap-grids="true"
inkscape:snap-nodes="false"
inkscape:snap-others="false"
inkscape:snap-to-guides="true"
inkscape:window-height="702"
inkscape:window-maximized="1"
inkscape:window-width="1366"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:zoom="4.1737214">
<inkscape:grid
empspacing="2"
enabled="true"
id="grid4866"
snapvisiblegridlinesonly="true"
spacingx="1px"
spacingy="1px"
type="xygrid"
visible="true" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
inkscape:groupmode="layer"
id="layer9"
inkscape:label="status"
style="display:inline"
transform="translate(-461.0002,-401)" />
<g
inkscape:groupmode="layer"
id="layer10"
inkscape:label="devices"
transform="translate(-461.0002,-401)" />
<g
inkscape:groupmode="layer"
id="layer11"
inkscape:label="apps"
transform="translate(-461.0002,-401)" />
<g
inkscape:groupmode="layer"
id="layer13"
inkscape:label="places"
transform="translate(-461.0002,-401)" />
<g
inkscape:groupmode="layer"
id="layer14"
inkscape:label="mimetypes"
transform="translate(-461.0002,-401)" />
<g
inkscape:groupmode="layer"
id="layer15"
inkscape:label="emblems"
style="display:inline"
transform="translate(-461.0002,-401)">
<path
inkscape:connector-curvature="0"
d="M 472.9375,404.9375 468,409.875 l -1.9375,-1.9375 -2.125,2.125 3,3 1.0625,1.0625 1.0625,-1.0625 6,-6 -2.125,-2.125 z"
id="path5037"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#78d478;fill-opacity:1;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans" />
</g>
<g
inkscape:groupmode="layer"
id="g71291"
inkscape:label="emotes"
style="display:inline"
transform="translate(-461.0002,-401)" />
<g
inkscape:groupmode="layer"
id="g4953"
inkscape:label="categories"
style="display:inline"
transform="translate(-461.0002,-401)" />
<g
inkscape:groupmode="layer"
id="layer12"
inkscape:label="actions"
style="display:inline"
transform="translate(-461.0002,-401)" />
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,137 @@
<?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"
sodipodi:docname="order.svg"
height="16"
id="svg7384"
inkscape:version="0.48.5 r10040"
version="1.1"
width="16">
<metadata
id="metadata90">
<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>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:bbox-nodes="false"
inkscape:bbox-paths="true"
bordercolor="#666666"
borderopacity="1"
inkscape:current-layer="layer12"
inkscape:cx="15.101722"
inkscape:cy="11.321276"
gridtolerance="10"
inkscape:guide-bbox="true"
guidetolerance="10"
id="namedview88"
inkscape:object-nodes="false"
inkscape:object-paths="false"
objecttolerance="10"
pagecolor="#3a3b39"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
showborder="false"
showgrid="false"
showguides="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="false"
inkscape:snap-global="true"
inkscape:snap-grids="true"
inkscape:snap-nodes="false"
inkscape:snap-others="false"
inkscape:snap-to-guides="true"
inkscape:window-height="702"
inkscape:window-maximized="1"
inkscape:window-width="1366"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:zoom="32.6875">
<inkscape:grid
empspacing="2"
enabled="true"
id="grid4866"
originx="80.00005px"
originy="590px"
snapvisiblegridlinesonly="true"
spacingx="1px"
spacingy="1px"
type="xygrid"
visible="true" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
inkscape:groupmode="layer"
id="layer9"
inkscape:label="status"
style="display:inline"
transform="translate(-161.00015,-807)" />
<g
inkscape:groupmode="layer"
id="layer10"
inkscape:label="devices"
transform="translate(-161.00015,-807)" />
<g
inkscape:groupmode="layer"
id="layer11"
inkscape:label="apps"
transform="translate(-161.00015,-807)" />
<g
inkscape:groupmode="layer"
id="layer13"
inkscape:label="places"
transform="translate(-161.00015,-807)" />
<g
inkscape:groupmode="layer"
id="layer14"
inkscape:label="mimetypes"
transform="translate(-161.00015,-807)" />
<g
inkscape:groupmode="layer"
id="layer15"
inkscape:label="emblems"
style="display:inline"
transform="translate(-161.00015,-807)" />
<g
inkscape:groupmode="layer"
id="g71291"
inkscape:label="emotes"
style="display:inline"
transform="translate(-161.00015,-807)" />
<g
inkscape:groupmode="layer"
id="g4953"
inkscape:label="categories"
style="display:inline"
transform="translate(-161.00015,-807)" />
<g
inkscape:groupmode="layer"
id="layer12"
inkscape:label="actions"
style="display:inline"
transform="translate(-161.00015,-807)">
<path
inkscape:connector-curvature="0"
d="m 169.0002,807 c -2.76142,0 -5,2.23858 -5,5 0,0.34518 0.0272,0.67451 0.0937,1 0.37506,2.83961 3.93256,4.92586 4.9375,8.96875 0.98541,-3.98539 4.99777,-6.918 5,-9.96875 l -0.0312,0 c 0,-2.76142 -2.23858,-5 -5,-5 z m 0,2 c 1.65686,0 3,1.34314 3,3 0,1.65686 -1.34314,3 -3,3 -1.65686,0 -3,-1.34314 -3,-3 0,-1.65686 1.34314,-3 3,-3 z"
id="path45579"
sodipodi:nodetypes="ssccccssssss"
style="color:#000000;fill:#333333;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,136 @@
<?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"
id="svg7384"
sodipodi:docname="print.svg"
version="1.1"
inkscape:version="0.48.5 r10040"
height="16"
width="16">
<metadata
id="metadata90">
<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>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:cy="72.4546"
pagecolor="#555753"
borderopacity="1"
showborder="false"
inkscape:bbox-paths="false"
guidetolerance="10"
inkscape:window-width="1310"
showguides="true"
inkscape:snap-bbox="true"
inkscape:pageshadow="2"
inkscape:guide-bbox="true"
inkscape:snap-nodes="true"
bordercolor="#666666"
objecttolerance="10"
id="namedview88"
showgrid="false"
inkscape:window-maximized="0"
inkscape:window-x="54"
inkscape:window-y="27"
gridtolerance="10"
inkscape:window-height="701"
inkscape:current-layer="layer10"
inkscape:zoom="2.0390625"
inkscape:cx="-25.548654"
inkscape:pageopacity="1">
<inkscape:grid
spacingx="1px"
spacingy="1px"
id="grid4866"
empspacing="2"
enabled="true"
type="xygrid"
snapvisiblegridlinesonly="true"
visible="true" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
inkscape:label="status"
transform="translate(-142,-338)"
inkscape:groupmode="layer"
id="layer9"
style="display:inline" />
<g
inkscape:label="devices"
transform="translate(-142,-338)"
inkscape:groupmode="layer"
id="layer10">
<g
inkscape:label="accessories-calculator"
transform="translate(94,-60)"
id="g10819"
style="fill:#333333;fill-opacity:1" />
<g
inkscape:label="Layer 1"
transform="translate(142,338)"
id="layer1-6"
style="fill:#333333;fill-opacity:1">
<path
inkscape:connector-curvature="0"
d="M 2,4 C 1.5,4 1,4.5 1,5 l 0,4 c 0,0.5 0.5,1 1,1 l 1,0 0,-2 10,0 0,2 1,0 c 0.5,0 1,-0.5 1,-1 L 15,5 C 15,4.5 14.5,4 14,4 L 2,4 z"
id="path3520"
sodipodi:nodetypes="ccccccccccccc"
style="fill:#333333;fill-opacity:1;stroke:none" />
<path
inkscape:connector-curvature="0"
d="M 4,1 4,3 12,3 12,1 4,1 z"
id="path4804"
sodipodi:nodetypes="ccccc"
style="fill:#333333;fill-opacity:1;stroke:none" />
<path
inkscape:connector-curvature="0"
d="M 4,9.0000001 4,14 l 8,0 0,-5 -8,10e-8 z M 5,10 l 6,0 0,1 -6,0 0,-1 z m 0,2 5,0 0,1 -5,0 0,-1 z"
id="path4806"
sodipodi:nodetypes="ccccccccccccccc"
style="fill:#333333;fill-opacity:1;stroke:none" />
</g>
</g>
<g
inkscape:label="apps"
transform="translate(-142,-338)"
inkscape:groupmode="layer"
id="layer11" />
<g
inkscape:label="actions"
transform="translate(-142,-338)"
inkscape:groupmode="layer"
id="layer12" />
<g
inkscape:label="places"
transform="translate(-142,-338)"
inkscape:groupmode="layer"
id="layer13" />
<g
inkscape:label="mimetypes"
transform="translate(-142,-338)"
inkscape:groupmode="layer"
id="layer14" />
<g
inkscape:label="emblems"
transform="translate(-142,-338)"
inkscape:groupmode="layer"
id="layer15" />
</svg>

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@ -0,0 +1,133 @@
<?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"
id="svg7384"
sodipodi:docname="refresh.svg"
inkscape:version="0.48.5 r10040"
version="1.1"
width="16"
height="16">
<metadata
id="metadata90">
<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>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:zoom="2.0390625"
inkscape:bbox-paths="false"
inkscape:pageopacity="1"
guidetolerance="10"
inkscape:snap-bbox="true"
inkscape:window-height="701"
objecttolerance="10"
id="namedview88"
showborder="false"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:cx="-82.864112"
inkscape:cy="10.6119"
gridtolerance="10"
inkscape:snap-bbox-midpoints="false"
showguides="true"
inkscape:pageshadow="2"
pagecolor="#555753"
bordercolor="#666666"
inkscape:snap-global="true"
inkscape:window-maximized="0"
inkscape:object-nodes="false"
inkscape:snap-nodes="false"
inkscape:guide-bbox="true"
inkscape:window-width="1364"
inkscape:snap-others="false"
borderopacity="1"
showgrid="false"
inkscape:snap-to-guides="true"
inkscape:object-paths="false"
inkscape:snap-grids="true"
inkscape:current-layer="layer12">
<inkscape:grid
enabled="true"
spacingx="1px"
spacingy="1px"
id="grid4866"
visible="true"
snapvisiblegridlinesonly="true"
empspacing="2"
type="xygrid" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
id="layer9"
transform="translate(-241.0002,-627)"
inkscape:label="status"
style="display:inline"
inkscape:groupmode="layer" />
<g
id="layer10"
transform="translate(-241.0002,-627)"
inkscape:label="devices"
inkscape:groupmode="layer" />
<g
id="layer11"
transform="translate(-241.0002,-627)"
inkscape:label="apps"
inkscape:groupmode="layer" />
<g
id="layer13"
transform="translate(-241.0002,-627)"
inkscape:label="places"
inkscape:groupmode="layer" />
<g
id="layer14"
transform="translate(-241.0002,-627)"
inkscape:label="mimetypes"
inkscape:groupmode="layer" />
<g
id="layer15"
transform="translate(-241.0002,-627)"
inkscape:label="emblems"
style="display:inline"
inkscape:groupmode="layer" />
<g
id="g71291"
transform="translate(-241.0002,-627)"
inkscape:label="emotes"
style="display:inline"
inkscape:groupmode="layer" />
<g
id="g4953"
transform="translate(-241.0002,-627)"
inkscape:label="categories"
style="display:inline"
inkscape:groupmode="layer" />
<g
id="layer12"
transform="translate(-241.0002,-627)"
inkscape:label="actions"
style="display:inline"
inkscape:groupmode="layer">
<path
id="path4597"
d="m 253.90645,628.96875 a 1.0001,1.0001 0 0 0 -0.125,0.0312 1.0001,1.0001 0 0 0 -0.78125,1 l 0,1.6875 c -0.38225,-0.57796 -0.84927,-1.08223 -1.40625,-1.5 -1.15563,-0.86677 -2.53199,-1.25227 -3.875,-1.1875 -0.19186,0.009 -0.37223,0.0353 -0.5625,0.0625 -1.52218,0.21741 -2.97815,1.02304 -3.96875,2.34375 -1.98119,2.64144 -1.42267,6.42505 1.21875,8.40625 2.64147,1.98122 6.42504,1.42267 8.40625,-1.21875 A 1.0063276,1.0063276 0 0 0 253.0002,638 a 1.0063276,1.0063276 0 0 0 0,-0.15625 l 0,-0.84375 -0.8125,0 -0.0937,0 a 1.0063276,1.0063276 0 0 0 -0.0937,0 1.0063276,1.0063276 0 0 0 -0.8125,0.40625 c -1.33265,1.77674 -3.81702,2.11387 -5.59375,0.78125 -1.77674,-1.33264 -2.1139,-3.81699 -0.78125,-5.59375 1.33265,-1.77674 3.817,-2.11389 5.59375,-0.78125 0.42946,0.32212 0.76954,0.73295 1.03125,1.1875 l -1.4375,0 a 1.0001,1.0001 0 0 0 -1,1 1.0001,1.0001 0 0 0 0,0.21875 l 0,0.78125 0.84375,0 0.15625,0 4,0 1,0 0,-1 0,-4 a 1.0001,1.0001 0 0 0 0,-0.1875 l 0,-0.8125 -0.8125,0 a 1.0001,1.0001 0 0 0 -0.28125,-0.0312 z"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#bebebe;fill:#333333;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
inkscape:connector-curvature="0" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -0,0 +1,93 @@
<?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"
id="svg7384"
version="1.1"
height="16"
width="16"
inkscape:version="0.48.5 r10040"
sodipodi:docname="remove.svg">
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="702"
id="namedview15"
showgrid="false"
inkscape:zoom="30.133789"
inkscape:cx="1.7611563"
inkscape:cy="8"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="svg7384" />
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<metadata
id="metadata90">
<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>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs7386" />
<g
transform="translate(-60,-518)"
id="layer9"
style="display:inline;fill:#333333;fill-opacity:1" />
<g
transform="translate(-60,-518)"
id="layer10"
style="fill:#333333;fill-opacity:1" />
<g
transform="translate(-60,-518)"
id="layer11"
style="fill:#333333;fill-opacity:1" />
<g
transform="translate(-60,-518)"
id="layer12"
style="fill:#333333;fill-opacity:1">
<g
transform="translate(19,-242)"
id="layer4-4-1"
style="display:inline;fill:#333333;fill-opacity:1">
<path
inkscape:connector-curvature="0"
d="m 45,764 1,0 c 0.01037,-1.2e-4 0.02079,-4.6e-4 0.03125,0 0.254951,0.0112 0.50987,0.12858 0.6875,0.3125 L 49,766.59375 51.3125,764.3125 C 51.578125,764.082 51.759172,764.007 52,764 l 1,0 0,1 c 0,0.28647 -0.03434,0.55065 -0.25,0.75 l -2.28125,2.28125 2.25,2.25 C 52.906938,770.46942 52.999992,770.7347 53,771 l 0,1 -1,0 c -0.265301,-10e-6 -0.530586,-0.0931 -0.71875,-0.28125 L 49,769.4375 46.71875,771.71875 C 46.530586,771.90694 46.26529,772 46,772 l -1,0 0,-1 c -3e-6,-0.26529 0.09306,-0.53058 0.28125,-0.71875 l 2.28125,-2.25 L 45.28125,765.75 C 45.070508,765.55537 44.97809,765.28075 45,765 l 0,-1 z"
id="path10839-9"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;color:#bebebe;fill:#333333;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988000000006;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Andale Mono;-inkscape-font-specification:Andale Mono" />
</g>
</g>
<g
transform="translate(-60,-518)"
id="layer13"
style="fill:#333333;fill-opacity:1" />
<g
transform="translate(-60,-518)"
id="layer14"
style="fill:#333333;fill-opacity:1" />
<g
transform="translate(-60,-518)"
id="layer15"
style="fill:#333333;fill-opacity:1" />
</svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -0,0 +1,130 @@
<?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"
id="svg7384"
sodipodi:docname="show.svg"
version="1.1"
inkscape:version="0.48.5 r10040"
height="16"
width="16">
<metadata
id="metadata90">
<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>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:cy="6.1661"
pagecolor="#555753"
borderopacity="1"
showborder="false"
inkscape:bbox-paths="false"
guidetolerance="10"
inkscape:object-paths="true"
inkscape:window-width="1296"
showguides="true"
inkscape:object-nodes="true"
inkscape:snap-bbox="true"
inkscape:pageshadow="2"
inkscape:guide-bbox="true"
inkscape:snap-nodes="false"
bordercolor="#666666"
objecttolerance="10"
id="namedview88"
showgrid="true"
inkscape:window-maximized="0"
inkscape:window-x="68"
inkscape:snap-global="true"
inkscape:window-y="27"
gridtolerance="10"
inkscape:window-height="701"
inkscape:snap-to-guides="true"
inkscape:current-layer="layer12"
inkscape:snap-bbox-midpoints="false"
inkscape:zoom="65.25"
inkscape:cx="6.9833509"
inkscape:snap-grids="true"
inkscape:pageopacity="1">
<inkscape:grid
spacingx="1px"
spacingy="1px"
id="grid4866"
empspacing="2"
enabled="true"
type="xygrid"
snapvisiblegridlinesonly="true"
visible="true" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
inkscape:label="status"
transform="translate(-140.0002,-645.96875)"
inkscape:groupmode="layer"
id="layer9"
style="display:inline" />
<g
inkscape:label="devices"
transform="translate(-140.0002,-645.96875)"
inkscape:groupmode="layer"
id="layer10" />
<g
inkscape:label="apps"
transform="translate(-140.0002,-645.96875)"
inkscape:groupmode="layer"
id="layer11" />
<g
inkscape:label="actions"
transform="translate(-140.0002,-645.96875)"
inkscape:groupmode="layer"
id="layer12">
<path
inkscape:connector-curvature="0"
d="m 146.50761,646.99554 c -3.02886,0 -5.51073,2.47905 -5.51073,5.50447 0,3.02541 2.48187,5.50446 5.51073,5.50446 3.02885,0 5.51072,-2.47905 5.51072,-5.50446 0,-3.02542 -2.48187,-5.50447 -5.51072,-5.50447 z m 0,2.00893 c 1.94735,0 3.49951,1.55039 3.49951,3.49554 0,1.94514 -1.55216,3.49553 -3.49951,3.49553 -1.94736,0 -3.49952,-1.55039 -3.49952,-3.49553 0,-1.94515 1.55216,-3.49554 3.49952,-3.49554 z"
id="path27918"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#333333;fill-opacity:1;stroke:none;stroke-width:1.55467153000000002;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Sans;-inkscape-font-specification:Sans" />
<path
inkscape:connector-curvature="0"
d="m 149.8125,655 a 1.0001,1.0001 0 0 0 -0.5,1.71875 l 4,4 a 1.0054782,1.0054782 0 1 0 1.40625,-1.4375 l -4,-4 A 1.0001,1.0001 0 0 0 149.8125,655 z"
id="path27941"
style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:#333333;fill-opacity:1;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new;font-family:Sans;-inkscape-font-specification:Sans" />
</g>
<g
inkscape:label="places"
transform="translate(-140.0002,-645.96875)"
inkscape:groupmode="layer"
id="layer13" />
<g
inkscape:label="mimetypes"
transform="translate(-140.0002,-645.96875)"
inkscape:groupmode="layer"
id="layer14" />
<g
inkscape:label="emblems"
transform="translate(-140.0002,-645.96875)"
inkscape:groupmode="layer"
id="layer15"
style="display:inline" />
<g
inkscape:label="categories"
transform="translate(-140.0002,-645.96875)"
inkscape:groupmode="layer"
id="g4953"
style="display:inline" />
</svg>

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@ -0,0 +1,153 @@
<?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"
sodipodi:docname="unavailable.svg"
height="16"
id="svg7384"
inkscape:version="0.48.5 r10040"
version="1.1"
width="16">
<metadata
id="metadata90">
<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>Gnome Symbolic Icon Theme</dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:bbox-nodes="false"
inkscape:bbox-paths="true"
bordercolor="#666666"
borderopacity="1"
inkscape:current-layer="layer9"
inkscape:cx="7.0453912"
inkscape:cy="10.43808"
gridtolerance="10"
inkscape:guide-bbox="true"
guidetolerance="10"
id="namedview88"
inkscape:object-nodes="false"
inkscape:object-paths="false"
objecttolerance="10"
pagecolor="#3a3b39"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
showborder="false"
showgrid="false"
showguides="true"
inkscape:snap-bbox="true"
inkscape:snap-bbox-midpoints="false"
inkscape:snap-global="true"
inkscape:snap-grids="true"
inkscape:snap-nodes="true"
inkscape:snap-others="false"
inkscape:snap-to-guides="true"
inkscape:window-height="702"
inkscape:window-maximized="1"
inkscape:window-width="1366"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:zoom="23.610133">
<inkscape:grid
empspacing="2"
enabled="true"
id="grid4866"
originx="-79.9998px"
originy="40px"
snapvisiblegridlinesonly="true"
spacingx="1px"
spacingy="1px"
type="xygrid"
visible="true" />
<inkscape:grid
color="#000000"
empcolor="#000000"
empopacity="0"
empspacing="4"
enabled="true"
id="grid5968"
opacity="0.1254902"
originx="-79.9998px"
originy="40px"
snapvisiblegridlinesonly="true"
spacingx="0.5px"
spacingy="0.5px"
type="xygrid"
visible="true" />
</sodipodi:namedview>
<title
id="title9167">Gnome Symbolic Icon Theme</title>
<defs
id="defs7386" />
<g
inkscape:groupmode="layer"
id="layer9"
inkscape:label="status"
style="display:inline"
transform="translate(-321,-257)">
<path
inkscape:connector-curvature="0"
d="m 328.90645,257.09375 c -0.5255,-0.0286 -1.03823,0.28305 -1.4375,0.96875 l -6.25,11.59375 C 320.68548,270.61964 321.26717,272 322.3127,272 l 13.15625,0 c 0.98172,0 1.90311,-1.15939 1.21875,-2.34375 L 330.3752,258.125 c -0.39872,-0.64617 -0.94325,-1.00262 -1.46875,-1.03125 z m 0.0625,3.9375 c 0.54448,-0.0172 1.04849,0.48677 1.03125,1.03125 l 0,3.9375 c 0.007,0.52831 -0.47163,1 -1,1 -0.52836,0 -1.00747,-0.47169 -1,-1 l 0,-3.9375 c -0.008,-0.4666 0.3541,-0.91253 0.8125,-1 0.0511,-0.0145 0.10345,-0.0249 0.15625,-0.0312 z M 329.0002,268 c 0.55228,0 1,0.44772 1,1 0,0.55228 -0.44772,1 -1,1 -0.55228,0 -1,-0.44772 -1,-1 0,-0.55228 0.44772,-1 1,-1 z"
id="path18112"
style="color:#bebebe;fill:#ee3333;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.78124988000000006;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new" />
</g>
<g
inkscape:groupmode="layer"
id="layer10"
inkscape:label="devices"
style="display:inline"
transform="translate(-321,-257)" />
<g
inkscape:groupmode="layer"
id="layer11"
inkscape:label="apps"
transform="translate(-321,-257)" />
<g
inkscape:groupmode="layer"
id="layer13"
inkscape:label="places"
style="display:inline"
transform="translate(-321,-257)" />
<g
inkscape:groupmode="layer"
id="layer14"
inkscape:label="mimetypes"
transform="translate(-321,-257)" />
<g
inkscape:groupmode="layer"
id="layer15"
inkscape:label="emblems"
style="display:inline"
transform="translate(-321,-257)" />
<g
inkscape:groupmode="layer"
id="g71291"
inkscape:label="emotes"
style="display:inline"
transform="translate(-321,-257)" />
<g
inkscape:groupmode="layer"
id="g4953"
inkscape:label="categories"
style="display:inline"
transform="translate(-321,-257)" />
<g
inkscape:groupmode="layer"
id="layer12"
inkscape:label="actions"
style="display:inline"
transform="translate(-321,-257)" />
</svg>

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

View File

@ -0,0 +1,80 @@
<?php
require_once ('vn/hedera/web.php');
require_once ('vn/hedera/js.php');
require_once ('vn/hedera/util.php');
use Vn\Hedera\Web;
use Vn\Lib\Locale;
Web::init ();
if ($conf['https'] && (!isset ($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on'))
{
header ('Location: https://'.$_SERVER['SERVER_NAME']);
exit (0);
}
if (!Web::$sysConn->isOpen ())
{
header ('Location: unavailable.html');
exit (0);
}
// Getting the page
if (isset ($_GET['page']) && Vn\Hedera\checkToken ($_GET['page']))
$page = $_GET['page'];
else
$page = 'login';
// Checking the browser version
if (!isset ($_SESSION['skipBrowser']) && $page != 'update-browser')
{
$updateBrowser = FALSE;
if (!isset ($_GET['skipBrowser'])
&& ($browser = get_browser ($_SERVER['HTTP_USER_AGENT'])))
{
$browserVersion = $browser->version;
set_type ($browserVersion, TYPE_DOUBLE);
$minVersion = Web::$sysConn->getValue (
'SELECT version FROM browser WHERE name = #', [$browser->browser]);
$updateBrowser = $browserVersion > 0
&& isset ($minVersion) && $browserVersion < $minVersion;
}
if ($updateBrowser)
{
header ('Location: ?page=update-browser');
exit (0);
}
else
$_SESSION['skipBrowser'] = TRUE;
}
// Loading the page
$basePath = 'pages/'. $page;
setcookie ('hedera_version', $_SESSION['version']);
header ('Content-Type: text/html; charset=utf-8');
if (file_exists ($basePath))
{
Locale::addPath ($basePath);
$phpFile = $basePath .'/'. $page .'.php';
if (file_exists ($phpFile))
require ($phpFile);
require ($basePath .'/html.php');
}
Web::deinit ();
?>

View File

@ -0,0 +1,59 @@
/**
* Computes a sum of data in the model.
**/
Db.CalcSum = new Class
({
Extends: Db.Calc
,Tag: 'db-calc-sum'
,getRowValue: function (row)
{
var value;
if (this._func)
{
this.form.row = row;
value = this._func (this.form);
}
else
value = this._model.getByIndex (row, this.columnIndex);
return value;
}
,before: function (row)
{
var value = this.getRowValue (row)
if (value !== null)
{
this.sum -= value;
this.numbersCount--;
}
}
,after: function (row)
{
var value = this.getRowValue (row);
if (value !== null)
{
this.sum += value;
this.numbersCount++;
}
}
,init: function ()
{
this.sum = 0;
this.numbersCount = 0;
}
,done: function ()
{
if (this.numbersCount > 0)
this.value = this.sum;
else
this.value = null;
}
});

View File

@ -0,0 +1,149 @@
/**
* Interface for handle foreach operations on the model.
**/
Db.Calc = new Class
({
Extends: Vn.Param
,Tag: 'db-calc'
,Properties:
{
model:
{
type: Db.Model
,set: function (x)
{
this.link ({_model: x},
{
'status-changed': this.onModelChange
,'row-deleted-before': this.onRowDeleteBefore
,'row-updated': this.onRowUpdate
,'row-updated-before': this.onRowUpdateBefore
,'row-inserted': this.onRowInsert
});
this.form = new Db.Form ({model: x});
}
,get: function ()
{
return this._model;
}
},
columnIndex:
{
type: Number
,set: function (x)
{
this.reset ();
this._columnIndex = x;
this.onModelChange ();
}
,get: function ()
{
return this._columnIndex;
}
},
columnName:
{
type: String
,set: function (x)
{
this.reset ();
this._columnName = x;
this.onModelChange ();
}
,get: function ()
{
return this._columnName;
}
},
func:
{
type: Function
,set: function (x)
{
this.reset ();
this._func = x;
this.onModelChange ();
}
,get: function ()
{
return this._func;
}
}
}
,_model: null
,reset: function ()
{
delete this._columnIndex;
delete this._columnName;
delete this._func;
}
,onModelChange: function ()
{
this.init ();
if (this._model)
{
if (this._model.ready && this._columnName)
this._columnIndex = this._model.getColumnIndex (this._columnName);
var rows = this._model.numRows;
for (var i = 0; i < rows; i++)
this.after (i);
}
this.done ();
}
,onRowInsert: function (model, row)
{
this.after (row);
this.done ();
}
,onRowUpdateBefore: function (model, row)
{
this.before (row);
}
,onRowUpdate: function (model, row)
{
this.after (row);
this.done ();
}
,onRowDeleteBefore: function (model, row)
{
this.before (row);
this.done ();
}
/**
* Called before each update or delete row operation.
* You don't need to define it if model isn't updatable.
*
* @param {integer} row The row number
**/
,before: function (row) {}
/**
* Called after each update or insert row operation.
*
* @param {integer} row The row number
**/
,after: function (row) {}
/**
* Called before each model refresh.
**/
,init: function () {}
/**
* Called when an operation in the model is complete.
**/
,done: function () {}
});

View File

@ -0,0 +1,241 @@
/**
* Simulates a connection to a database by making asynchronous http requests to
* a remote PHP script that returns the results in JSON format.
* Using this class can perform any operation that can be done with a database,
* like open/close a connection or selecion/updating queries.
**/
Db.Conn = new Class ().extend
({
Flag:
{
NOT_NULL : 1
,PRI_KEY : 2
,AI : 512 | 2 | 1
}
,Type:
{
TIMESTAMP : 7
,DATE : 10
,DATE_TIME : 12
}
});
Db.Conn.implement
({
Extends: Vn.Object
,connected: false
,requestsCount: 0
/**
* Initilizes the connection object.
**/
,initialize: function ()
{
this.parent ();
}
/**
* Opens the connection to the database.
*
* @param {string} user The user name
* @param {String} password The user password
* @param {Boolean} remember Specifies if the user should be remembered
* @param {Function} openCallback The function to call when operation is done
**/
,open: function (user, pass, remember, openCallback)
{
this.signalEmit ('loading-changed', true);
var request = new Db.HttpRequest ();
request.add ({'action': 'login'});
if (user != null)
{
request.add
({
'user': user
,'password': pass
,'remember': remember
});
}
request.send ('rest.php',
this.opened.bind (this, request, openCallback));
}
/*
* Called when open operation is done.
*/
,opened: function (request, openCallback, success)
{
var openSuccess = false;
if (success)
try {
var json = request.getJson ();
openSuccess = true /* json.data */;
}
catch (e) {}
if (openSuccess)
this.connected = true;
this.signalEmit ('loading-changed', false);
if (openCallback)
openCallback (this, openSuccess);
}
/**
* Closes the connection to the database.
*
* @param {Function} closeCallback The function to call when operation is done
**/
,close: function (closeCallback)
{
this.signalEmit ('loading-changed', true);
var request = new Db.HttpRequest ();
request.addValue ({'action': 'close'});
request.send ('rest.php',
this.closed.bind (this, closeCallback));
}
/*
* Called when close operation is done.
*/
,closed: function (closeCallback)
{
this.connected = false;
this.signalEmit ('closed');
this.signalEmit ('loading-changed', false);
if (closeCallback)
closeCallback (this);
}
/**
* Runs a SQL query on the database.
*
* @param {String} sql The SQL statement
* @param {Function} callback The function to call when operation is done
**/
,execSql: function (sql, callback)
{
this.requestsCount++;
if (this.requestsCount == 1)
this.signalEmit ('loading-changed', true);
var httpRequest = new Db.HttpRequest ()
httpRequest.add
({
'action': 'query'
,'sql': sql
});
httpRequest.send ('rest.php',
this.execDone.bind (this, httpRequest, callback));
}
/**
* Runs a stmt on the database.
*
* @param {Sql.Stmt} stmt The statement
* @param {Function} callback The function to call when operation is done
* @param {Sql.Batch} batch The batch used to set the parameters
**/
,execStmt: function (stmt, callback, batch)
{
this.execSql (stmt.render (batch), callback);
}
/**
* Runs a query on the database.
*
* @param {String} query The SQL statement
* @param {Function} callback The function to call when operation is done
* @param {Sql.Batch} batch The batch used to set the parameters
**/
,execQuery: function (query, callback, batch)
{
this.execStmt (new Sql.String ({query: query}), callback, batch);
}
/*
* Parses a value to date.
*/
,valueToDate: function (value)
{
return new Date (value * 1000);
}
/*
* Called when a query is executed.
*/
,execDone: function (httpRequest, callback, success)
{
var error = null;
var results = null;
this.requestsCount--;
if (this.requestsCount == 0)
this.signalEmit ('loading-changed', false);
if (!success)
error = new Vn.Error ('Conn', 'connError', _('ConnError'));
else
try {
var json = httpRequest.getJson ();
results = json.data;
if (json.error !== null)
error = new Vn.Error (json.error.domain,
json.error.code, json.error.message);
if (results instanceof Array)
for (var i = 0; i < results.length; i++)
if (results[i] !== true)
{
var data = results[i].data;
var columns = results[i].field;
for (var j = 0; j < columns.length; j++)
{
var castFunc = null;
switch (columns[j].type)
{
case Db.Conn.Type.DATE:
case Db.Conn.Type.DATE_TIME:
case Db.Conn.Type.TIMESTAMP:
castFunc = this.valueToDate;
break;
}
if (castFunc !== null)
{
if (columns[j].def != null)
columns[j].def = castFunc (columns[j].def);
for (var k = 0; k < data.length; k++)
if (data[k][j] != null)
data[k][j] = castFunc (data[k][j]);
}
}
}
}
catch (e) {
error = new Vn.Error ('Conn', 'badReply', e.message /*_('BadServerReply')*/);
}
if (callback)
callback (new Db.ResultSet (results, error));
if (error)
this.signalEmit ('error', error);
}
});

View File

@ -0,0 +1,212 @@
Db.Form = new Class
({
Extends: Vn.Object
,Tag: 'db-form'
,Child: 'model'
,Properties:
{
/**
* The model associated to this form.
**/
model:
{
type: Db.Model
,set: function (x)
{
this.link ({_model: x},
{
'status-changed': this.onModelChange
,'row-updated': this.onRowUpdate
});
}
,get: function ()
{
return this._model;
}
},
/**
* The row where the form positioned, has -1 if the row is unselected.
**/
row:
{
type: Number
,set: function (x)
{
if (!this._model || this._model.numRows <= x || x < -1)
x = -1;
if (x == this._row)
return;
this._row = x;
this.iterChanged ();
}
,get: function ()
{
return this._row;
}
},
/**
* The number of rows in the form.
**/
numRows:
{
type: Number
,get: function ()
{
if (this._model)
return this._model.numRows;
return 0;
}
},
/**
* Checks if the form data is ready.
**/
ready:
{
type: Boolean
,get: function ()
{
return this._ready;
}
}
}
,lastRow: 0
,_model: null
,_row: -1
,_ready: false
,onModelChange: function ()
{
var ready = this._model && this._model.ready;
if (ready != this._ready)
{
if (this._row != -1)
this.lastRow = this._row;
this._ready = ready;
this.signalEmit ('status-changed');
if (this._row == -1)
this.row = this.lastRow;
}
}
,onRowUpdate: function (model, row, column)
{
if (row == this._row)
this.iterChanged ();
}
,refresh: function ()
{
if (this._model)
this._model.refresh ();
}
/**
* Emits the 'iter-changed' signal on the form.
**/
,iterChanged: function ()
{
this.signalEmit ('iter-changed');
}
/**
* Get the index of the column from its name.
*
* @param {String} columnName The column name
* @return {integer} The column index or -1 if column not exists
**/
,getColumnIndex: function (columnName)
{
if (this._model)
return this._model.getColumnIndex (columnName);
return -1;
}
,insertRow: function ()
{
if (this._model)
this.row = this._model.insertRow ();
}
,performOperations: function ()
{
if (this._model)
this._model.performOperations ();
}
/**
* Removes the current row.
**/
,deleteRow: function ()
{
if (this._row >= 0)
this._model.deleteRow (this._row);
}
/**
* Gets a value from the form.
*
* @param {String} columnName The column name
* @return {Object} The value
**/
,get: function (columnName)
{
return this._model.get (this._row, columnName);
}
/**
* Sets a value on the form.
*
* @param {String} columnName The column name
* @param {Object} value The new value
**/
,set: function (columnName, value)
{
return this._model.set (this._row, columnName, value);
}
/**
* Gets a value from the form using the column index.
*
* @param {String} columnName The column index
* @return {Object} The value
**/
,getByIndex: function (column)
{
return this._model.getByIndex (this._row, column);
}
/**
* Sets a value on the form using the column index.
*
* @param {String} columnName The column index
* @param {Object} value The new value
**/
,setByIndex: function (column, value)
{
return this._model.setByIndex (this._row, column, value);
}
/**
* Gets a param from the form.
*
* @param {String} columnName The column name
* @return {Db.Param} The new parameter
**/
,getParam: function (columnName)
{
return new Db.Param
({
form: this
,column: columnName
});
}
});

View File

@ -0,0 +1,30 @@
Db.HttpRequest = new Class
({
kvPairs: {}
,add: function (map)
{
for (var key in map)
this.kvPairs[key] = map[key];
}
,send: function (file, callback)
{
this.request = new XMLHttpRequest ();
this.request.open ('post', file, true);
this.request.setRequestHeader ('Content-Type', 'application/x-www-form-urlencoded');
this.request.onreadystatechange = this.requestStateChanged.bind (this, callback);
this.request.send (Vn.Url.makeUri (this.kvPairs));
}
,requestStateChanged: function (callback)
{
if (this.request.readyState == 4)
callback (this, this.request.status == 200);
}
,getJson: function ()
{
return eval ('('+ this.request.responseText +')');
}
});

View File

@ -0,0 +1,5 @@
/**
* The namespace.
**/
var Db = {};

View File

@ -0,0 +1,18 @@
<?php
require_once ('js/sql/main.php');
Vn\Hedera\Js::includeLib ('db'
,'main'
,'conn'
,'result'
,'result-set'
,'model'
,'form'
,'param'
,'calc'
,'calc-sum'
,'http-request'
);
?>

View File

@ -0,0 +1,809 @@
Db.Model = new Class ().extend
({
Status:
{
CLEAN : 1
,LOADING : 2
,READY : 3
,ERROR : 4
}
});
Db.Model.implement
({
Extends: Vn.Object
,Tag: 'db-model'
,Child: 'query'
,Properties:
{
/**
* The connection used to execute the statement.
**/
conn:
{
type: Db.Conn
,set: function (x)
{
this._conn = x;
this.refresh ();
}
,get: function ()
{
return this._conn;
}
},
/**
* The result index.
**/
resultIndex:
{
type: Number
,set: function (x)
{
this._resultIndex = x;
}
,get: function ()
{
return this._resultIndex;
}
},
/**
* The batch used to execute the statement.
**/
batch:
{
type: Sql.Batch
,set: function (x)
{
this.link ({_batch: x}, {'changed': this.refresh});
this.refresh ();
}
,get: function ()
{
return this._batch;
}
},
/**
* The model select statement.
**/
stmt:
{
type: Sql.Stmt
,set: function (x)
{
this._stmt = x;
this.refresh ();
}
,get: function ()
{
return this._stmt;
}
},
/**
* The model query.
**/
query:
{
type: String
,set: function (x)
{
this._stmt = new Sql.String ({query: x});
}
,get: function ()
{
return this._stmt.render (null);
}
},
/**
* The main table.
**/
mainTable:
{
type: String
,set: function (x)
{
this._mainTable = null;
this.requestedMainTable = x;
this.refreshMainTable ();
}
,get: function ()
{
return this._mainTable;
}
},
/**
* Determines if the model is updatable.
**/
updatable:
{
type: Boolean
,set: function (x)
{
this._updatable = false;
this.requestedUpdatable = x;
this.refreshUpdatable ();
}
,get: function ()
{
return this._updatable;
}
},
/**
* The number of rows in the model.
**/
numRows:
{
type: Number
,get: function ()
{
if (this.data)
return this.data.length;
return 0;
}
},
/**
* The current status of the model.
**/
status:
{
type: Number
,get: function ()
{
return this._status;
}
},
/**
* Checks if the model data is ready.
**/
ready:
{
type: Boolean
,get: function ()
{
return this._status == Db.Model.Status.READY;
}
}
}
,_resultIndex: 0
,_batch: null
,_stmt: null
,_status: Db.Model.Status.CLEAN
,requestedMainTable: null
,requestedUpdatable: true
,data: null
,columns: null
,columnMap: null
,insertedRow: -1
,defaults: []
,columnDefaults: []
,sortColumn: -1
,initialize: function (props)
{
this.parent (props);
this.cleanData (false);
}
,loadXml: function (builder, node)
{
this.parent (builder, node);
var query = node.firstChild.nodeValue;
if (query)
this.query = query;
}
,refresh: function ()
{
if (this._stmt && this._batch)
this._stmt.findHolders (this._batch);
if (this._conn && this._stmt
&& (!this._batch || this._batch.isReady ()))
{
this.setStatus (Db.Model.Status.LOADING);
this._conn.execStmt (this._stmt, this.selectDone.bind (this), this._batch);
}
else
this.cleanData (false);
}
,cleanData: function (error)
{
this.data = null;
this.columns = null;
this.columnMap = null;
if (error)
this.setStatus (Db.Model.Status.ERROR);
else
this.setStatus (Db.Model.Status.CLEAN);
}
,refreshUpdatable: function ()
{
var oldValue = this._updatable;
this._updatable = this._mainTable != null && this.requestedUpdatable;
if (oldValue != this._updatable)
this.signalEmit ('updatable-changed');
}
,refreshMainTable: function ()
{
var newMainTable = null;
var newMainSchema = null;
var x = this.columns;
if (x)
for (var i = 0; i < x.length; i++)
if (x[i].flags & Db.Conn.Flag.PRI_KEY)
if (!this.requestedMainTable
|| x[i].table === this.requestedMainTable)
{
newMainTable = x[i].table;
break;
}
this._mainTable = newMainTable;
this.refreshUpdatable ();
}
/**
* Sets the default value for inserted fields.
*
* @param {String} field The destination field name
* @param {String} table The destination table name
* @param {Object} value The default value
**/
,setDefaultFromValue: function (field, table, value)
{
this.defaults.push
({
field: field
,table: table
,value: value
});
}
/**
* Sets the default value for inserted fields from another column in the
* model.
*
* @param {String} field The destination field name
* @param {String} table The destination table name
* @param {String} srcColumn The source column
**/
,setDefaultFromColumn: function (field, table, srcColumn)
{
this.columnDefaults.push
({
field: field
,table: table
,srcColumn: srcColumn
});
}
/**
* Checks if the column exists.
*
* @param {integer} column The column index
* @return {Boolean} %true if column exists, %false otherwise
**/
,checkColExists: function (column)
{
return this.columns && column >= 0 && column < this.columns.length;
}
/**
* Checks if the row exists.
*
* @param {integer} row The row index
* @return {Boolean} %true if row exists, %false otherwise
**/
,checkRowExists: function (row)
{
return this.data && row >= 0 && row < this.data.length;
}
,checkRowUpdatable: function (row)
{
return this.checkRowExists (row);
}
/**
* Get the index of the column from its name.
*
* @param {string} columnName The column name
* @return {number} The column index or -1 if column not exists
**/
,getColumnIndex: function (columnName)
{
var index;
if (this.columnMap
&& (index = this.columnMap[columnName]) !== undefined)
return index;
return -1;
}
/**
* Gets a value from the model.
*
* @param {number} row The row index
* @param {string} columnName The column name
* @return {mixed} The value
**/
,get: function (row, columnName)
{
var index = this.getColumnIndex (columnName);
if (index != -1)
return this.getByIndex (row, index);
return undefined;
}
/**
* Updates a value on the model.
*
* @param {number} row The row index
* @param {string} columnName The column name
* @param {mixed} value The new value
**/
,set: function (row, columnName, value)
{
var index = this.getColumnIndex (columnName);
if (index != -1)
this.setByIndex (row, index, value);
}
/**
* Gets a value from the model using the column index.
*
* @param {number} row The row index
* @param {number} column The column index
* @return {mixed} The value
**/
,getByIndex: function (row, column)
{
if (this.checkRowExists (row) && this.checkColExists (column))
return this.data[row][column];
return undefined;
}
/**
* Updates a value on the model using the column index.
*
* @param {number} row The row index
* @param {number} col The column index
* @param {mixed} value The new value
**/
,setByIndex: function (row, col, value)
{
if (!(this.checkRowUpdatable (row) && this.checkColExists (col)))
return;
if (row == this.insertedRow)
{
this.performUpdate (row, [col], [value]);
return;
}
var column = this.columns[col];
var where = this.getWhere (column.table, row, false);
if (where)
{
var multiStmt = new Sql.MultiStmt ();
var table = new Sql.Table
({
name: column.orgtable
,schema: column.db
});
var update = new Sql.Update ({where: where});
update.addTarget (table);
update.addSet (column.orgname, value);
multiStmt.addStmt (update);
var select = new Sql.Select ({where: where});
select.addTarget (table);
select.addField (column.orgname);
multiStmt.addStmt (select);
var updateData = {
row: row
,columns: [col]
};
this._conn.execStmt (multiStmt,
this.updateDone.bind (this, updateData));
}
else
this.sendInsert (column.table, row, col, value);
}
/**
* Deletes a row from the model.
*
* @param {number} row The row index
**/
,deleteRow: function (row)
{
if (!this.checkRowUpdatable (row))
return;
if (row != this.insertedRow)
{
var where = this.getWhere (this._mainTable, row, false);
if (where)
{
var deleteQuery = new Sql.Delete ({where: where});
var table = this.getTarget (this._mainTable);
deleteQuery.addTarget (table);
this._conn.execStmt (deleteQuery,
this.deleteDone.bind (this, row));
}
}
else
{
this.performDelete (row);
this.insertedRow = -1;
}
}
/**
* Inserts a new row on the model.
*
* @return The index of the inserted row
**/
,insertRow: function ()
{
if (!this._updatable || this.insertedRow != -1)
return -1;
var x = this.columns;
var newRow = new Array (x.length);
for (var i = 0; i < x.length; i++)
if (x[i].table === this._mainTable)
newRow[i] = x[i].def;
else
newRow[i] = null;
this.insertedRow = this.data.push (newRow) - 1;
this.signalEmit ('row-inserted', this.insertedRow);
return this.insertedRow;
}
,performOperations: function ()
{
if (this.insertedRow == -1)
return;
this.sendInsert (this._mainTable, this.insertedRow, -1, null);
}
/*
* Function used to sort the model.
*/
,sortFunction: function (column, a, b)
{
if (a[column] < b[column])
return -1;
else if (a[column] > b[column])
return 1;
return 0;
}
/**
* Orders the model by the specified column.
*
* @param {integer} column the column index
**/
,sort: function (column)
{
if (!this.checkColExists (column))
return;
this.setStatus (Db.Model.Status.LOADING);
if (column != this.sortColumn)
{
this.data.sort (this.sortFunction.bind (this, column));
this.sortColumn = column;
}
else
this.data.reverse ();
this.setStatus (Db.Model.Status.READY);
}
/**
* Searchs a value on the model and returns the row index of the first
* ocurrence.
*
* @param {String} column The column name
* @param {Object} value The value to search
* @return {integer} The column index
**/
,search: function (column, value)
{
var index = this.getColumnIndex (column);
return this.searchByIndex (index, value);
}
/**
* Searchs a value on the model and returns the row index of the first
* ocurrence.
*
* @param {integer} col The column index
* @param {Object} value The value to search
* @return {integer} The column index
**/
,searchByIndex: function (col, value)
{
if (!this.checkColExists (col))
return -1;
var data = this.data;
switch (this.columns[col].type)
{
case Db.Conn.Type.TIMESTAMP:
case Db.Conn.Type.DATE_TIME:
case Db.Conn.Type.DATE:
{
value = value.toString ();
for (var i = 0; i < data.length; i++)
if (value === data[i][col].toString ());
return i;
break;
}
default:
for (var i = 0; i < data.length; i++)
if (value === data[i][col])
return i;
}
return -1;
}
// private:
,setStatus: function (status)
{
this._status = status;
this.signalEmit ('status-changed', status);
}
,getTarget: function (table)
{
var x = this.columns;
for (var i = 0; i < x.length; i++)
if (x[i].table == table)
return new Sql.Table
({
name: x[i].orgtable
,schema: x[i].db
});
return null;
}
,getWhere: function (table, rowIndex, forInsert)
{
var keyFound = false;
var row = this.data[rowIndex];
var andOp = new Sql.Operation ({type: Sql.Operation.Type.AND});
var x = this.columns;
for (var i = 0; i < x.length; i++)
if (x[i].flags & Db.Conn.Flag.PRI_KEY
&& x[i].table === table)
{
var equalOp = new Sql.Operation ({type: Sql.Operation.Type.EQUAL});
equalOp.exprs.add (new Sql.Field ({name: x[i].orgname}));
andOp.exprs.add (equalOp);
if (row[i])
equalOp.exprs.add (new Sql.Value ({value: row[i]}));
else if (x[i].flags & Db.Conn.Flag.AI && forInsert)
equalOp.exprs.add (new Sql.Func ({name: 'LAST_INSERT_ID'}));
else
break;
keyFound = true;
}
return (keyFound) ? andOp : null;
}
,sendInsert: function (table, rowIndex, singleColumn, newValue)
{
var where = this.getWhere (table, rowIndex, true);
if (!where)
return;
var multiStmt = new Sql.MultiStmt ();
var target = this.getTarget (table);
var insert = new Sql.Insert ();
insert.addTarget (target);
multiStmt.addStmt (insert);
var x = this.defaults;
for (var i = 0; i < x.length; i++)
if (x[i].table === table)
insert.addSet (x[i].field, x[i].value);
var x = this.columnDefaults;
for (var i = 0; i < x.length; i++)
if (x[i].table === table)
insert.addSet (x[i].field, this.get (rowIndex, x[i].srcColumn));
var select = new Sql.Select ({where: where});
select.addTarget (target);
multiStmt.addStmt (select);
var columns = [];
var row = this.data[rowIndex];
var x = this.columns;
for (var i = 0; i < x.length; i++)
if (x[i].table === table)
{
var setValue = singleColumn != i ? row[i] : newValue;
if (setValue)
insert.addSet (x[i].orgname, setValue);
select.addField (x[i].orgname);
columns.push (i);
}
var updateData = {
row: rowIndex
,columns: columns
};
this._conn.execStmt (multiStmt,
this.updateDone.bind (this, updateData));
}
,selectDone: function (resultSet)
{
var result;
var dataResult;
for (var i = 0; result = resultSet.fetchResult (); i++)
if (i == this._resultIndex)
dataResult = result;
if (dataResult && typeof dataResult === 'object')
{
this.sortColumn = -1;
this.data = dataResult.data;
this.columns = dataResult.columns;
this.columnMap = dataResult.columnMap;
this.repairColumns (this.columns);
this.refreshMainTable ();
this.setStatus (Db.Model.Status.READY);
}
else
this.cleanData (true);
}
,updateDone: function (updateData, resultSet)
{
var newValues;
if (resultSet.fetchResult () && (newValues = resultSet.fetchRow ()))
this.performUpdate (updateData.row, updateData.columns, newValues);
}
,performUpdate: function (rowIndex, columns, newValues)
{
this.signalEmit ('row-updated-before', rowIndex);
var row = this.data[rowIndex];
for (var i = 0; i < columns.length; i++)
row[columns[i]] = newValues[i];
this.signalEmit ('row-updated', rowIndex, columns);
}
,deleteDone: function (rowIndex, resultSet)
{
if (resultSet.fetchResult())
this.performDelete (rowIndex);
}
,performDelete: function (rowIndex)
{
var row = this.data[rowIndex];
if (!this.requestedMainTable)
{
this.signalEmit ('row-deleted-before', rowIndex);
this.data.splice (rowIndex, 1);
this.signalEmit ('row-deleted', rowIndex);
}
else
{
this.signalEmit ('row-updated-before', rowIndex);
var columns = [];
for (var i = 0; i < this.columns.length; i++)
if (this.columns[i].table == this._mainTable)
{
row[i] = null;
columns.push (i);
}
this.signalEmit ('row-updated', rowIndex, columns);
}
}
// Delete when MySQL FLAG and view orgname "bugs" are repaired:
,tableInfo: {}
,fieldFlags: {}
,setTableInfo: function (table, orgtable, db)
{
this.tableInfo[table] =
({
orgtable: orgtable
,db: db
});
}
,setFieldFlags: function (field, flags)
{
this.fieldFlags[field] = flags;
}
,repairColumns: function (columns)
{
for (var i = 0; i < columns.length; i++)
{
var newFlags = this.fieldFlags[columns[i].name];
if (newFlags)
columns[i].flags |= newFlags;
var tableInfo = this.tableInfo[columns[i].table];
if (tableInfo)
{
columns[i].orgtable = tableInfo.orgtable;
columns[i].db = tableInfo.db;
}
}
}
});

View File

@ -0,0 +1,91 @@
Db.Param = new Class
({
Extends: Vn.Param
,Tag: 'db-param'
,Parent: 'form'
,Properties:
{
/**
* The form field referenced by this param.
**/
column:
{
type: String
,set: function (x)
{
this._columnName = x;
this.refresh ();
}
,get: function ()
{
this._columnName;
}
},
/**
* The form referenced by this param.
**/
form:
{
type: Db.Form
,set: function (x)
{
this.link ({_form: x},
{
'status-changed': this.onFormChange
,'iter-changed': this.onIterChange
});
this.refresh ();
}
,get: function ()
{
return this._form;
}
}
}
,_columnName: null
,_form: null
,formLock: false
,columnIndex: -1
,initialize: function (props)
{
this.parent (props);
this.on ('changed', this.onChange, this);
}
,refresh: function ()
{
if (this._form)
{
this.onFormChange ();
this.onIterChange ();
}
}
,onFormChange: function ()
{
if (this._columnName != null)
this.columnIndex = this._form.getColumnIndex (this._columnName);
}
,onIterChange: function ()
{
this.formLock = true;
if (this.columnIndex != -1)
this.value = this._form.getByIndex (this.columnIndex);
else
this.value = undefined;
this.formLock = false;
}
,onChange: function ()
{
if (!this.formLock && this.columnIndex != -1)
this._form.setByIndex (this.columnIndex, this._value);
}
});

View File

@ -0,0 +1,89 @@
/**
* This class stores the database results.
**/
Db.ResultSet = new Class
({
results: null
,error: null
/**
* Initilizes the resultset object.
**/
,initialize: function (results, error)
{
this.results = results;
this.error = error;
}
/**
* Gets the query error.
*
* @return {Db.Err} the error or null if no errors hapened
**/
,getError: function ()
{
return this.error;
}
,fetch: function ()
{
if (this.results !== null
&& this.results.length > 0)
return this.results.shift ();
return null;
}
/**
* Fetchs the next result from the resultset.
*
* @return {Db.Result} the result or %null if error or there are no more results
**/
,fetchResult: function ()
{
var result = this.fetch ();
if (result !== null)
{
if (result.data instanceof Array)
return new Db.Result (result.data, result.field);
else
return true;
}
return null;
}
/**
* Fetchs the first row from the next resultset.
*
* @return {Array} the row if success, %null otherwise
**/
,fetchRow: function ()
{
var result = this.fetch ();
if (result !== null
&& result.data instanceof Array
&& result.data.length > 0)
return result.data[0];
return null;
}
/**
* Fetchs the first row and column value from the next resultset.
*
* @return {Object} the value if success, %null otherwise
**/
,fetchValue: function ()
{
var row = this.fetchRow ();
if (row instanceof Array && row.length > 0)
return row[0];
return null;
}
});

View File

@ -0,0 +1,58 @@
/**
* This class stores a database result.
**/
Db.Result = new Class
({
/**
* Initilizes the result object.
**/
initialize: function (data, columns)
{
this.data = data;
this.columns = columns;
this.columnMap = null;
this.row = -1;
if (columns)
{
this.columnMap = {};
for (var i = 0; i < columns.length; i++)
this.columnMap[columns[i].name] = i;
}
}
/**
* Gets a value from de result.
*
* @param {String} columnName The column name
* @return {Object} The cell value
**/
,get: function (columnName)
{
var columnIndex = this.columnMap[columnName];
return this.data[this.row][columnIndex];
}
/**
* Resets the result iterator.
**/
,reset: function ()
{
this.row = -1;
}
/**
* Moves the internal iterator to the next row.
**/
,next: function ()
{
this.row++;
if (this.row >= this.data.length)
return false;
return true;
}
});

View File

@ -0,0 +1,84 @@
/**
* Represents a grid column. This is an abstract class and should not be
* instantiated directly.
**/
Htk.Column = new Class
({
Extends: Vn.Object
,Tag: 'htk-column'
,Parent: 'grid'
,Properties:
{
value:
{
type: Object
,value: null
},
column:
{
type: String
,value: null
},
columnIndex:
{
type: Number
,value: -1
},
title:
{
type: String
,value: null
},
editable:
{
type: Boolean
,value: false
},
renderer:
{
type: Function
,value: false
},
grid:
{
type: Htk.Grid
,set: function (x)
{
if (x)
x.appendColumn (this);
}
}
}
/**
* Initializes the column.
**/
,initialize: function (props)
{
this.parent (props);
this.td = document.createElement ('td');
}
/**
* Draws the cell and returns its associated td.
*
* @param {HTMLTableRow} tr the table row
* @return {HTMLTableData} the rendered cell
**/
,render: function (tr)
{
return this.td.cloneNode (true);
}
,updateColumnIndex: function (model)
{
if (this.column)
this.columnIndex = model.getColumnIndex (this.column);
}
,changed: function (tr, newValue)
{
this.signalEmit ('changed', tr.rowIndex - 1, newValue);
}
});

View File

@ -0,0 +1,46 @@
Htk.ColumnButton = new Class
({
Extends: Htk.Column
,Tag: 'htk-column-button'
,Properties:
{
image:
{
type: String
,value: null
},
tip:
{
type: String
,value: null
}
}
,render: function (tr)
{
var td = this.parent (tr);
var button = document.createElement ('button');
button.className = 'cell-button';
button.addEventListener ('click',
this.buttonClicked.bind (this, this.value, tr));
td.appendChild (button);
var img = document.createElement ('img');
img.src = this.image;
button.appendChild (img);
if (this.tip)
{
button.title = _(this.tip);
img.title = _(this.tip);
}
return td;
}
,buttonClicked: function (value, tr)
{
this.signalEmit ('clicked', value, tr.rowIndex - 1);
}
});

View File

@ -0,0 +1,28 @@
Htk.ColumnCheck = new Class
({
Extends: Htk.Column
,Tag: 'htk-column-check'
,render: function (tr)
{
var checkButton = document.createElement ('input');
checkButton.type = 'checkbox';
checkButton.checked = this.value;
if (this.editable)
checkButton.addEventListener ('changed',
this.inputChanged.bind (this, tr, node));
else
checkButton.disabled = true;
var td = this.parent (tr);
td.style.textAlign = 'center';
td.appendChild (checkButton);
return td;
}
,inputChanged: function (tr, node)
{
this.changed (tr, node.value);
}
});

View File

@ -0,0 +1,36 @@
Htk.ColumnDate = new Class
({
Extends: Htk.Column
,Tag: 'htk-column-date'
,Properties:
{
/**
* Format that applies to the value.
**/
format:
{
type: String
,set: function (x)
{
this._format = _(x);
}
,get: function ()
{
return this._format;
}
}
}
,_format: _('%a, %e %b %Y')
,render: function (tr)
{
var text = Vn.Date.strftime (this.value, this._format);
var td = this.parent (tr);
td.style.textAlign = 'left';
td.appendChild (document.createTextNode (text));
return td;
}
});

View File

@ -0,0 +1,159 @@
Htk.ColumnImage = new Class
({
Extends: Htk.Column
,Tag: 'htk-column-image'
,Properties:
{
/**
* The directory where the images are allocated.
**/
directory:
{
type: String
,set: function (x)
{
this._directory = x;
this.basedir = Vn.Config['image_dir'] +'/'+ x;
}
,get: function ()
{
return this._directory;
}
},
/**
* The directory where the images are allocated.
**/
subdir:
{
type: String
,value: null
},
/**
* Whether to show the full image when mouse hover.
**/
showFull:
{
type: Boolean
,value: false
}
}
,_directory: null
,basedir: null
,initialize: function (props)
{
this.parent (props);
this.fullImage = new Htk.FullImage ();
}
,render: function (tr)
{
var td = this.parent (tr);
var img = document.createElement ('img');
img.alt = ''
td.appendChild (img);
var cell =
{
img: img
,value: this.value
,tr: tr
,error: false
};
this.setSrc (cell, true);
if (this.showFull)
{
img.addEventListener ('mouseover', this.onMouseOver.bind (this, cell));
img.addEventListener ('mouseout', this.onMouseOut.bind (this));
}
if (this.editable)
{
img.className = 'editable';
img.addEventListener ('dblclick', this.onDoubleClick.bind (this, cell));
img.addEventListener ('error', this.onImageError.bind (this, cell));
}
return td;
}
,setSrc: function (cell, useCache)
{
if (cell.value)
{
var url = this.basedir +'/';
if (this.subdir)
url += this.subdir +'/';
url += cell.value;
if (!useCache)
query = '?'+ new Date ().getTime ();
cell.img.src = url;
}
else
this.onImageError (cell);
}
,onImageError: function (cell)
{
if (!cell.error)
{
cell.error = true;
cell.img.src = 'image/empty.png';
}
}
,onMouseOver: function (cell)
{
if (!cell.error)
this.fullImage.show (this.basedir, cell.value);
}
,onMouseOut: function ()
{
this.fullImage.hide ();
}
,onDoubleClick: function (cell)
{
var editor = new Htk.ImageEditor ();
editor.setData (cell.value, this._directory);
this.nameChangedHandler = this.onNameChange.bind (this, cell);
editor.on ('name-changed', this.nameChangedHandler);
this.fileUploadedHandler = this.onFileUpload.bind (this, cell);
editor.on ('file-uploaded', this.fileUploadedHandler);
this.editorClosedHandler = this.onEditorClose.bind (this);
editor.on ('closed', this.editorClosedHandler);
editor.showPopup (cell.img);
}
,onNameChange: function (cell, editor, value)
{
cell.value = value;
this.setSrc (cell, true);
this.changed (cell.tr, value);
}
,onFileUpload: function (cell, editor)
{
this.setSrc (cell, false);
editor.hidePopup ();
}
,onEditorClose: function (editor)
{
editor.disconnect ('name-changed', this.nameChangedHandler);
editor.disconnect ('file-uploaded', this.fileUploadedHandler);
editor.disconnect ('closed', this.editorClosedHandler);
}
});

View File

@ -0,0 +1,41 @@
Htk.ColumnLink = new Class
({
Extends: Htk.Column
,Tag: 'htk-column-link'
,Properties:
{
/**
* The link url.
**/
href:
{
type: String
,value: null
},
/**
* the target where the link is opened.
**/
target:
{
type: String
,value: null
}
}
,render: function (tr)
{
var link = document.createElement ('a');
link.href = this.href;
link.appendChild (document.createTextNode (this.value));
if (this.target)
link.target = this.target;
var td = this.parent (tr);
td.style.textAlign = 'left';
td.appendChild (link);
return td;
}
});

View File

@ -0,0 +1,37 @@
Htk.ColumnRadio = new Class
({
Extends: Htk.Column
,Tag: 'htk-column-radio'
,Properties:
{
param:
{
type: Vn.Param
,set: function (x)
{
this.radioGroup.master = x;
}
}
}
,initialize: function (props)
{
this.parent (props);
this.radioGroup = new Htk.RadioGroup ();
}
,render: function (tr)
{
var td = this.parent (tr);
var radio = this.radioGroup.createButton (this.value);
td.appendChild (radio);
return td;
}
,clear: function ()
{
this.radioGroup.clear ();
}
});

View File

@ -0,0 +1,61 @@
Htk.ColumnSpin = new Class
({
Extends: Htk.Column
,Tag: 'htk-column-spin'
,Properties:
{
/**
* The text to append to the number.
**/
unit:
{
type: String
,value: null
},
/**
* The number of decimal places to display.
**/
digits: {
type: Number
,value: 0
}
}
,render: function (tr)
{
var td = this.parent (tr);
td.style.textAlign = 'right';
var valueString = null;
if (this.value !== null && this.value !== undefined)
valueString = new Number (this.value).toFixed (this.digits);
if (this.editable)
{
var entry = document.createElement ('input');
entry.type = 'text';
entry.className = 'cell-spin';
entry.addEventListener ('change', this.inputChanged.bind (this, tr, entry));
td.appendChild (entry);
if (valueString)
entry.value = valueString;
}
else if (valueString)
{
if (this.unit)
valueString = valueString +' '+ this.unit;
var text = document.createTextNode (valueString);
td.appendChild (text);
}
return td;
}
,inputChanged: function (tr, entry)
{
this.changed (tr, parseInt (entry.value));
}
});

View File

@ -0,0 +1,55 @@
Htk.ColumnText = new Class
({
Extends: Htk.Column
,Tag: 'htk-column-text'
,Properties:
{
/**
* Format that applies to the value.
**/
format:
{
type: String
,set: function (x)
{
this._format = _(x);
}
,get: function ()
{
return this._format;
}
}
}
,_format: null
,render: function (tr)
{
var node;
if (this.editable)
{
var value = this.value ? this.value : '';
node = document.createElement ('input');
node.type = 'text';
node.className = 'cell-text';
node.value = value;
node.addEventListener ('changed',
this.inputChanged.bind (this, tr, node));
}
else
node = document.createTextNode (
Vn.Value.format (this.value, this._format));
var td = this.parent (tr);
td.style.textAlign = 'left';
td.appendChild (node);
return td;
}
,inputChanged: function (tr, node)
{
this.changed (tr, node.value);
}
});

View File

@ -0,0 +1,139 @@
Htk.Field = new Class
({
Extends: Htk.Widget
,Tag: 'htk-field'
,Child: 'param'
,Properties:
{
value:
{
type: Object
,set: function (x)
{
if (Vn.Value.compare (x, this._value))
return;
if (x instanceof Date)
x = x.clone ();
this.valueChanged (x);
this.putValue (x);
}
,get: function (x)
{
return this._value;
}
},
param:
{
type: Vn.Param
,set: function (x)
{
this.link ({_param: x}, {'changed': this.onParamChange});
this.onParamChange ();
}
,get: function ()
{
return this._param;
}
},
editable:
{
type: Boolean
,set: function (x)
{
if (x != this._editable)
{
this._editable = x;
this.setEditable (x);
}
}
,get: function ()
{
return this._editable;
}
},
form:
{
type: Db.Form
,set: function (x)
{
this._form = x;
this.bindToForm ();
}
},
column:
{
type: String
,set: function (x)
{
this._paramName = x;
this.bindToForm ();
}
},
conditionalFunc:
{
type: Function
,value: null
}
}
,_value: undefined
,_param: null
,_editable: true
,ignoreParamChange: false
,onParamChange: function ()
{
this.ignoreParamChange = true;
this.value = this._param.value;
this.ignoreParamChange = false;
}
,bindToForm: function ()
{
if (this._form && this._paramName)
this.param = this._form.getParam (this._paramName);
}
/**
* Virtual method that must be implemented by class childs to set the entry
* editable.
*
* @param {Boolean} editable Whether the user is allowed to edit the entry
**/
,setEditable: function (editable) {}
/**
* Virtual method that must be implemented by class childs to put the value
* on the associated entry.
*
* @param {Object} value The new value for the entry
**/
,putValue: function (value) {}
/**
* Protected method that should be called from class childs when the value
* on the associated entry changes.
*
* @param {Object} value The new entry value
**/
,valueChanged: function (value)
{
this._value = value;
if (this.conditionalFunc)
this.conditionalFunc (this, value);
if (this._param && !this.ignoreParamChange)
{
this._param.blockSignal ('changed', this.onParamChange, true);
this._param.value = value;
this._param.blockSignal ('changed', this.onParamChange, false);
}
this.signalEmit ('changed');
}
});

View File

@ -0,0 +1,265 @@
Htk.Calendar = new Class
({
Extends: Htk.Field
,Implements: Htk.Popup
,Tag: 'htk-calendar'
,tds: []
,selectedTd: null
,todayTd: null
,year: null
,month: null
,initialize: function (props)
{
this.parent (props);
var len = Vn.Date.WDays.length;
this.createElement ('div');
this.node.className = 'calendar';
var table = document.createElement ('table');
this.node.appendChild (table);
var colgroup = document.createElement ('colgroup');
table.appendChild (colgroup);
for (var i = 0; i < len; i++)
colgroup.appendChild (document.createElement ('col'));
var thead = document.createElement ('thead');
table.appendChild (thead);
var tr = document.createElement ('tr');
thead.appendChild (tr);
var th = document.createElement ('th');
th.appendChild (document.createTextNode ('<'));
th.className = 'button';
th.addEventListener ('click', this.prevMonthClicked.bind (this));
tr.appendChild (th);
var monthNode = document.createElement ('th');
monthNode.colSpan = 5;
tr.appendChild (monthNode);
var th = document.createElement ('th');
th.appendChild (document.createTextNode ('>'));
th.className = 'button';
th.addEventListener ('click', this.nextMonthClicked.bind (this));
tr.appendChild (th);
var tr = document.createElement ('tr');
thead.appendChild (tr);
for (i = 1; i <= len; i++)
{
var th = document.createElement ('th');
tr.appendChild (th);
var weekday = Vn.Date.AbrWDays [i%len];
th.appendChild (document.createTextNode (weekday));
}
var tfoot = document.createElement ('tfoot');
table.appendChild (tfoot);
var tr = document.createElement ('tr');
tfoot.appendChild (tr);
var th = document.createElement ('th');
th.appendChild (document.createTextNode ('<'));
th.className = 'button';
th.addEventListener ('click', this.prevYearClicked.bind (this));
tr.appendChild (th);
var yearNode = document.createElement ('th');
yearNode.colSpan = 5;
tr.appendChild (yearNode);
var th = document.createElement ('th');
th.appendChild (document.createTextNode ('>'));
th.className = 'button';
th.addEventListener ('click', this.nextYearClicked.bind (this));
tr.appendChild (th);
var tbody = document.createElement ('tbody');
table.appendChild (tbody);
for (i = 0; i < 6; i++)
{
tr = document.createElement ('tr');
tbody.appendChild (tr);
for (j = 0; j < len; j++)
{
td = document.createElement ('td');
td.addEventListener ('click', this.dayClicked.bind (this, td, i*len+j));
tr.appendChild (td);
this.tds.push (td);
}
}
this.monthNode = monthNode;
this.yearNode = yearNode;
this.goToCurrentMonth ();
}
,getFirstWeekDay: function ()
{
var weekDay = new Date (this.year, this.month, 1).getDay ();
return (weekDay != 0) ? weekDay - 1 : 6;
}
,getMonthDays: function ()
{
if (this.month > 6)
return (this.month % 2 != 0) ? 31 : 30;
else if (this.month != 1)
return (this.month % 2 != 1) ? 31 : 30;
else
return (this.year % 4 != 0) ? 28 : 29;
}
,goToMonth: function (year, month)
{
if (year)
this.year = year;
if (month)
this.month = month;
this.refresh ();
}
,goToSelectedMonth: function ()
{
var date = this._value;
if (date instanceof Date)
this.goToMonth (date.getFullYear (), date.getMonth ());
else
this.goToCurrentMonth ();
}
,goToCurrentMonth: function ()
{
var date = new Date ();
this.goToMonth (date.getFullYear (), date.getMonth ());
}
,refresh: function ()
{
Vn.Node.setText (this.yearNode, this.year);
Vn.Node.setText (this.monthNode, Vn.Date.Months[this.month]);
var firstWeekDay = this.getFirstWeekDay ();
var monthDays = this.getMonthDays ();
var day = 1;
for (i = 0; i < this.tds.length; i++)
{
if (firstWeekDay <= i && day <= monthDays)
Vn.Node.setText (this.tds[i], day++);
else
Vn.Node.removeChilds (this.tds[i]);
}
// Marks the current day
var today = new Date ();
if (this.year == today.getFullYear ()
&& this.month == today.getMonth ())
{
var tdIndex = (firstWeekDay + today.getDate ()) - 1;
this.tds[tdIndex].style.fontWeight = 'bold';
this.todayTd = this.tds[tdIndex];
}
else if (this.todayTd)
{
this.todayTd.style.fontWeight = '';
this.todayTd = null;
}
// Marks the selected day
var date = this._value;
if (date instanceof Date
&& this.year == date.getFullYear ()
&& this.month == date.getMonth ())
{
var tdIndex = (firstWeekDay + date.getDate ()) - 1;
this.selectTd (this.tds[tdIndex]);
}
else
this.selectTd (null);
}
,selectTd: function (td)
{
if (this.selectedTd)
this.selectedTd.className = undefined;
if (td)
td.className = 'highlight';
this.selectedTd = td;
}
,putValue: function (value)
{
this.goToSelectedMonth ();
}
,dayClicked: function (td, tdIndex)
{
var monthDay = (tdIndex - this.getFirstWeekDay ()) + 1;
if (monthDay >= 1 && monthDay <= this.getMonthDays ())
{
this.selectTd (td);
var newDate = new Date (this.year, this.month, monthDay);
this.valueChanged (newDate);
}
}
,prevMonthClicked: function ()
{
if (this.month > 0)
this.month--;
else
{
this.month = 11;
this.year--;
}
this.refresh ();
}
,nextMonthClicked: function ()
{
if (this.month < 11)
this.month++;
else
{
this.month = 0;
this.year++;
}
this.refresh ();
}
,prevYearClicked: function ()
{
this.year--;
this.refresh ();
}
,nextYearClicked: function ()
{
this.year++;
this.refresh ();
}
});

View File

@ -0,0 +1,31 @@
Htk.Check = new Class
({
Extends: Htk.Field
,Tag: 'htk-check'
,initialize: function (props)
{
this.parent (props);
this.createElement ('input');
this.node.type = 'checkbox';
this.node.addEventListener ('change', this.changed.bind (this));
}
,changed: function ()
{
this.valueChanged (this.node.checked);
}
,putValue: function (value)
{
if (value)
this.node.checked = true;
else
this.node.checked = false;
}
,setEditable: function (editable)
{
this.node.disabled = !editable;
}
});

View File

@ -0,0 +1,82 @@
Htk.DateChooser = new Class
({
Extends: Htk.Field
,Tag: 'htk-date-chooser'
,format: _('%a, %e %b %Y')
,calendar: null
,ignoreCalendarChange: false
,initialize: function (props)
{
this.parent (props);
this.createElement ('div');
this.node.className = 'date-chooser';
this.label = document.createElement ('label');
this.node.appendChild (this.label);
this.setEditable (this._editable);
}
,putValue: function (value)
{
var dateString;
if (value instanceof Date)
dateString = Vn.Date.strftime (value, this.format);
else
dateString = '';
Vn.Node.setText (this.label, dateString);
}
,setEditable: function (editable)
{
if (editable && !this.calendar)
{
this.button = document.createElement ('button');
this.button.title = _('ChangeDate');
this.button.addEventListener ('click', this.showCalendar.bind (this));
this.node.insertBefore (this.button, this.label);
var img = document.createElement ('img');
img.alt = _('ChangeDate');
img.src = 'image/calendar.png';
this.button.appendChild (img);
var calendar = new Htk.Calendar ();
calendar.on ('changed', this.calendarChanged.bind (this));
this.calendar = calendar;
}
else if (!editable)
{
this.calendar = null;
this.node.removeChild (this.button);
}
}
,calendarChanged: function (calendar)
{
if (this.ignoreCalendarChange)
return;
this.calendar.hidePopup ();
var newDate = calendar.value;
this.putValue (newDate);
this.valueChanged (newDate);
}
,showCalendar: function (event)
{
this.ignoreCalendarChange = true;
this.calendar.value = this._value;
this.calendar.goToSelectedMonth ();
this.ignoreCalendarChange = false;
this.calendar.showPopup (this.button);
}
});

View File

@ -0,0 +1,38 @@
Htk.Entry = new Class
({
Extends: Htk.Field
,Tag: 'htk-entry'
,initialize: function (props)
{
this.parent (props);
this.createElement ('input');
this.node.type = 'text';
this.node.addEventListener ('change', this.changed.bind (this));
}
,changed: function (event)
{
var newValue;
if (this.node.value == '')
newValue = null;
else
newValue = this.node.value;
this.valueChanged (newValue);
}
,putValue: function (value)
{
if (!value)
this.node.value = '';
else
this.node.value = value;
}
,setEditable: function (editable)
{
this.node.readOnly = !editable;
}
});

View File

@ -0,0 +1,139 @@
Htk.FullImage = new Class
({
Extends: Vn.Object
,img: null
,timeout: 0
,loading: false
,visible: false
,hideCalled: false
,initialize: function (props)
{
this.parent (props);
var div = document.createElement ('div');
div.className = 'full-image';
var loadingBox = document.createElement ('div');
loadingBox.className = 'image-loader';
var loadingImg = document.createElement ('img');
loadingImg.src = 'image/loader-black.gif';
loadingImg.alt = _('Loading');
loadingBox.appendChild (loadingImg);
this.div = div;
this.loadingBox = loadingBox;
this.loadingImg = loadingImg;
}
,getLeft: function (width)
{
return parseInt (getPageXOffset () + (getInnerWidth () - width) / 2) +'px';
}
,getTop: function (height)
{
return parseInt (getPageYOffset () + (getInnerHeight () - height) / 2) +'px';
}
,show: function (basedir, file)
{
if (this.timeout)
{
clearTimeout (this.timeout);
this.timeout = 0;
}
this.hideCalled = false;
this.loadingBox.style.left = this.getLeft (40);
this.loadingBox.style.top = this.getTop (40);
this.img = document.createElement ('img');
this.img.src = basedir +'/full/'+ file;
this.img.addEventListener ('load', this.imageLoaded.bind (this, this.img));
this.img.addEventListener ('error', this.hideLoading.bind (this));
if (!this.img.complete && !this.loading)
{
document.body.appendChild (this.loadingBox);
this.loading = true;
}
}
,imageLoaded: function (img)
{
if (img != this.img || this.hideCalled)
return;
var scale = 1.0;
var width = img.width;
var height = img.height;
var innerWidth = getInnerWidth () - 350;
var innerHeight = getInnerHeight () - 120;
if (width > innerWidth)
{
scale = width / innerWidth;
height = parseInt (height / scale);
width = innerWidth;
}
if (height > innerHeight)
{
scale = height / innerHeight;
width = parseInt (width / scale);
height = innerHeight;
}
this.hideLoading ();
this.div.style.left = this.getLeft (width + 2);
this.div.style.top = this.getTop (height + 2);
this.div.style.width = width +'px';
this.div.style.height = height +'px';
if (scale !== 1.0)
{
img.style.width = width +'px';
img.style.height = height +'px';
}
if (this.div.firstChild != null)
this.div.replaceChild (img, this.div.firstChild);
else
this.div.appendChild (img);
if (!this.visible)
{
document.body.appendChild (this.div);
this.visible = true;
}
}
,hide: function ()
{
this.hideCalled = true;
this.hideLoading ();
if (this.visible)
this.timeout = setTimeout (this.hideTimeout.bind (this), 450);
}
,hideTimeout: function ()
{
document.body.removeChild (this.div);
this.visible = false;
this.timeout = 0;
}
,hideLoading: function ()
{
if (this.loading)
{
document.body.removeChild (this.loadingBox);
this.loading = false;
}
}
});

View File

@ -0,0 +1,141 @@
Htk.ImageEditor = new Class
({
Extends: Htk.Widget
,Implements: Htk.Popup
,maxFileSize: 10 /* MB */ * 1048576
,initialize: function ()
{
this.createElement ('div');
this.node.className = 'image-editor';
var h3 = document.createElement ('h3');
h3.appendChild (document.createTextNode (_('UpdateImage')));
this.node.appendChild (h3);
var iframe = document.createElement ('iframe');
iframe.name = 'image-editor';
iframe.addEventListener ('load', this.imageUploaded.bind (this, iframe));
this.node.appendChild (iframe);
var form = document.createElement ('form');
form.method = 'post';
form.action = 'ajax.php?action=image';
form.target = 'image-editor';
form.enctype = 'multipart/form-data';
form.addEventListener ('submit', this.formSubmit.bind (this));
this.node.appendChild (form);
var schemaInput = document.createElement ('input');
schemaInput.type = 'hidden';
schemaInput.name = 'schema';
form.appendChild (schemaInput);
var input = document.createElement ('input');
input.type = 'hidden';
input.name = 'MAX_FILE_SIZE';
input.value = this.maxFileSize;
form.appendChild (input);
var table = document.createElement ('table');
table.cellSpacing = 5;
form.appendChild (table);
var tbody = document.createElement ('tbody');
table.appendChild (tbody);
var tr = document.createElement ('tr');
tbody.appendChild (tr);
var td = document.createElement ('td');
td.style.textAlign = 'right';
td.appendChild (document.createTextNode (_('FileName') + ':'));
tr.appendChild (td);
var td = document.createElement ('td');
tr.appendChild (td);
var nameInput = document.createElement ('input');
nameInput.type = 'text';
nameInput.name = 'name';
nameInput.addEventListener ('change', this.nameChanged.bind (this));
td.appendChild (nameInput);
var tr = document.createElement ('tr');
tbody.appendChild (tr);
var td = document.createElement ('td');
td.style.textAlign = 'right';
td.appendChild (document.createTextNode (_('File') + ':'));
tr.appendChild (td);
var td = document.createElement ('td');
tr.appendChild (td);
var fileInput = document.createElement ('input');
fileInput.type = 'file';
fileInput.name = 'image';
td.appendChild (fileInput);
var tr = document.createElement ('tr');
tbody.appendChild (tr);
var td = document.createElement ('td');
td.style.textAlign = 'center';
td.colSpan = 2;
tr.appendChild (td);
var loader = document.createElement ('img');
loader.alt = _('Loading');
loader.src = 'image/loader-black.gif';
td.appendChild (loader);
var submitButton = document.createElement ('input');
submitButton.type = 'submit';
submitButton.appendChild (document.createTextNode (_('UploadFile')));
td.appendChild (submitButton);
this.schemaInput = schemaInput;
this.fileInput = fileInput;
this.nameInput = nameInput;
this.submitButton = submitButton;
this.loader = loader;
}
,setData: function (image, directory)
{
this.nameInput.value = image;
this.schemaInput.value = directory;
}
,formSubmit: function ()
{
this.submitButton.disabled = true;
this.loader.style.visibility = 'visible';
}
,imageUploaded: function (iframe)
{
this.submitButton.disabled = false;
this.loader.style.visibility = 'hidden';
var text = iframe.contentDocument.body.textContent;
if (!text)
return;
if (text != 1)
{
alert (text);
return;
}
this.signalEmit ('file-uploaded', this.nameInput.value);
}
,nameChanged: function ()
{
this.signalEmit ('name-changed', this.nameInput.value);
}
});

View File

@ -0,0 +1,93 @@
Htk.Image = new Class
({
Extends: Htk.Entry
,Tag: 'htk-image'
,empty: false
,file: null
,initialize: function (props)
{
this.parent (props);
this.node = document.getElementById (nodeId);
this.node.addEventListener ('error', this.error.bind (this));
}
,error: function ()
{
if (!this.empty)
{
this.empty = true;
this.node.src = 'image/empty.png';
}
}
,render: function (force)
{
if (this.realValue)
{
this.file = this.realValue + '.png';
if (force)
this.file += '?' + (new Date()).getTime ();
this.empty = false;
this.node.src = this.url + '/' + this.file;
}
else
{
this.file = null;
this.error ();
}
}
,setRealValue: function (value)
{
this.render (false);
}
,setShowFull: function (show)
{
if (show)
{
var obj = this;
this.node.addEventListener ('mouseover',
function () { obj.mouseOver () }, false);
this.node.addEventListener ('mouseout',
function () { obj.mouseOut () }, false);
}
}
,setEditable: function (editable)
{
if (editable)
{
var obj = this;
this.style.cursor = 'pointer';
this.node.addEventListener ('dblclick',
function (e) { obj.dblClicked (e) }, false);
}
}
,dblClicked: function (event)
{
var form = htkImageForm.node;
form.style.top = getPageYOffset () + (event.clientY - 80) + 'px';
form.style.left = (event.clientX + 30) + 'px';
document.body.appendChild (form);
htkImageForm.load (this);
}
,mouseOver: function ()
{
if (!this.empty)
htkImageFull.show (this.url + '/../full', this.file);
}
,mouseOut: function ()
{
if (!this.empty)
htkImageFull.hide ();
}
});

View File

@ -0,0 +1,37 @@
Htk.Label = new Class
({
Extends: Htk.Field
,Tag: 'htk-label'
,Properties:
{
/**
* Format that applies to the value.
**/
format:
{
type: String
,set: function (x)
{
this._format = _(x);
}
,get: function ()
{
return this._format;
}
}
}
,_format: null
,initialize: function (props)
{
this.parent (props);
this.createElement ('label');
}
,putValue: function (value)
{
Vn.Node.setText (this.node,
Vn.Value.format (value, this._format));
}
});

View File

@ -0,0 +1,57 @@
Htk.Radio = new Class
({
Extends: Vn.Object,
Implements: Vn.Param
,Tag: 'htk-radio'
,initialize: function (props)
{
this.parent (props);
this.rButton = new Array ();
this.uid = ++htkRadioUid;
}
,newRadio: function (value)
{
var radio;
var obj = this;
radio = createRadio (this.uid);
radio.value = value;
radio.checked = value == this.realValue;
radio.addEventListener ('change',
function () { obj.radioChanged (this._value); }, false);
this.rButton.push (radio);
return radio;
}
,radioChanged: function (value)
{
this.realValue = value;
this.signalEmit ('changed');
}
,setRealValue: function (value)
{
var rButton = this.rButton;
for (var n = 0; n < rButton.length; n++)
{
if (rButton[n].value == value)
{
rButton[n].checked = true;
break;
}
}
}
,setEditable: function (editable)
{
var rButton = this.rButton;
for (var n = 0; n < rButton.length; n++)
rButton[n].disabled = !editable;
}
});

View File

@ -0,0 +1,107 @@
Htk.Select = new Class
({
Extends: Htk.Field
,Tag: 'htk-combo'
,Properties:
{
/**
* The model associated to this form.
**/
model:
{
type: Db.Model
,set: function (x)
{
this.link ({_model: x}, {'status-changed': this.onModelChange});
this.onModelChange ();
}
,get: function ()
{
return this._model;
}
}
}
,_model: null
,valueColumnIndex: 0
,valueColumnName: null
,showColumnIndex: 1
,showColumnName: null
,initialize: function (props)
{
this.parent (props);
this.createElement ('select');
this.node.addEventListener ('change', this.changed.bind (this));
}
,changed: function (event)
{
var value;
var row = this.node.selectedIndex - 1;
if (row >= 0)
value = this._model.getByIndex (row, this.valueColumnIndex);
else
value = null;
this.valueChanged (value);
}
,addOption: function (value, text)
{
var option = document.createElement ('option');
option.value = value;
option.appendChild (document.createTextNode (text));
this.node.appendChild (option);
}
,onModelChange: function ()
{
var model = this._model;
if (model.status == Db.Model.Status.LOADING)
return;
Vn.Node.removeChilds (this.node);
switch (model.status)
{
case Db.Model.Status.READY:
{
var data = model.data;
this.addOption (null, '');
for (var i = 0; i < data.length; i++)
this.addOption (data[i][this.showColumnIndex], data[i][1]);
this.selectOption ();
break;
}
case Db.Model.Status.ERROR:
this.addOption (null, _('Error'));
break;
}
}
,setEditable: function (editable)
{
this.node.disabled = !editable;
}
,selectOption: function ()
{
if (!this._model || this._model.status != Db.Model.Status.READY)
return;
var row = this._model.searchByIndex (this.valueColumnIndex, this._value);
if (row != -1)
this.node.selectedIndex = row + 1;
}
,putValue: function (value)
{
this.selectOption ();
}
});

View File

@ -0,0 +1,63 @@
Htk.Spin = new Class
({
Extends: Htk.Entry
,Tag: 'htk-spin'
,initialize: function (props)
{
this.parent (props);
this.unit = null;
this.digits = 0;
}
,changed: function ()
{
var value = (this.entry.value == '') ? null : parseFloat (this.entry.value);
this.entry.value = value;
this.realValue = value;
this.signalEmit ('changed');
}
,setEditable: function (editable)
{
if (editable)
{
var input;
var obj = this;
input = document.createElement ('input');
input.style.textAlign = 'right';
input.style.width = '100%';
setInputTypeNumber (input);
input.addEventListener ('change',
function () { obj.changed (); }, false);
this.node.appendChild (input);
this.entry = input;
}
else
{
removeChilds (this.node);
this.entry = null;
}
}
,setRealValue: function (value)
{
var text;
if (value != null)
{
text = (new Number (value)).toFixed (this.digits);
if (this.unit != null)
text += ' ' + this.unit;
}
else
text = '';
if (!this.editable)
setText (this.node, text);
else
this.entry.value = text;
}
});

Some files were not shown because too many files have changed in this diff Show More