diff --git a/debian/changelog b/debian/changelog
index 949a7147..2ebdca3c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-hedera-web (1.322-deb8) stable; urgency=low
+hedera-web (1.323-deb8) stable; urgency=low
* Initial Release.
diff --git a/web/forms/account/address-list/style.css b/web/forms/account/address-list/style.css
index e45c6e9e..8bd9a259 100755
--- a/web/forms/account/address-list/style.css
+++ b/web/forms/account/address-list/style.css
@@ -33,6 +33,10 @@
{
float: right;
}
+.address .actions > .htk-button
+{
+ margin: 0;
+}
.address .actions > *
{
display: inline-block;
diff --git a/web/forms/admin/connections/style.css b/web/forms/admin/connections/style.css
index b4ef6949..b27e9449 100755
--- a/web/forms/admin/connections/style.css
+++ b/web/forms/admin/connections/style.css
@@ -28,6 +28,7 @@
.connections .item > button
{
float: right;
+ margin: 0;
}
.connections .item > p
{
diff --git a/web/forms/admin/queries/queries.js b/web/forms/admin/queries/queries.js
new file mode 100755
index 00000000..4e273761
--- /dev/null
+++ b/web/forms/admin/queries/queries.js
@@ -0,0 +1,102 @@
+
+Vn.Queries = new Class
+({
+ Extends: Vn.Form
+
+ ,activate: function ()
+ {
+ this.$('result-index').value = 0;
+ }
+
+ ,clean: function ()
+ {
+ if (this._grid)
+ {
+ this.$('grid-holder').removeChild (this._grid.getNode ());
+ this._grid.unref ();
+ this._grid = null;
+ }
+ }
+
+ ,_onExecuteClick: function ()
+ {
+ this.clean ();
+
+ var model = new Db.Model ({
+ conn: this.conn,
+ query: this.$('sql').value,
+ resultIndex: this.$('result-index').value,
+ updatable: this.$('updatable').value
+ });
+ model.on ('status-changed', this._onModelChange, this);
+ }
+
+ ,_onCleanClick: function ()
+ {
+ this.clean ();
+ }
+
+ ,_onModelChange: function (model, status)
+ {
+ if (status !== Db.Model.Status.LOADING)
+ {
+ model.disconnect ('status-changed', this._onModelChange, this);
+ model.unref ();
+ }
+
+ if (status !== Db.Model.Status.READY)
+ return;
+
+ Htk.Toast.showMessage (_('Query executed!'));
+
+ var gridHolder = this.$('grid-holder');
+
+ if (gridHolder.firstChild)
+ gridHolder.removeChilds (gridHolder.firstChild);
+
+ var grid = new Htk.Grid ();
+
+ var columns = model.columns;
+
+ for (var i = 0; i < columns.length; i++)
+ {
+ var c = columns[i];
+
+ switch (c.type)
+ {
+ case Db.Conn.Type.BOOLEAN:
+ var column = new Htk.ColumnCheck ();
+ break;
+ case Db.Conn.Type.INTEGER:
+ var column = new Htk.ColumnSpin ();
+ break;
+ case Db.Conn.Type.DOUBLE:
+ var column = new Htk.ColumnSpin ({digits: 2});
+ break;
+ case Db.Conn.Type.DATE:
+ var column = new Htk.ColumnDate ({format: '%a, %e %b %Y'});
+ break;
+ case Db.Conn.Type.DATE_TIME:
+ var column = new Htk.ColumnDate ({format: '%a, %e %b %Y, %T'});
+ break;
+ case Db.Conn.Type.STRING:
+ default:
+ var column = new Htk.ColumnText ();
+ }
+
+ column.setProperties ({
+ title: c.name,
+ editable: this.$('updatable').value,
+ columnIndex: i
+ });
+
+ grid.appendColumn (column);
+ }
+
+ grid.model = model;
+ gridHolder.appendChild (grid.getNode ());
+ this._grid = grid;
+
+ }
+});
+
diff --git a/web/forms/admin/queries/style.css b/web/forms/admin/queries/style.css
new file mode 100755
index 00000000..e3c925ca
--- /dev/null
+++ b/web/forms/admin/queries/style.css
@@ -0,0 +1,25 @@
+.queries
+{
+ padding: 1em;
+}
+.queries .box
+{
+ max-width: 40em;
+ margin: 0 auto;
+}
+.queries .form
+{
+ box-sizing: border-box;
+ padding: 2em;
+}
+.queries textarea
+{
+ display: block;
+ width: 100%;
+ height: 8em;
+}
+.queries .result
+{
+ margin-top: 1em;
+ overflow: auto;
+}
diff --git a/web/forms/admin/queries/ui.xml b/web/forms/admin/queries/ui.xml
new file mode 100755
index 00000000..a944946f
--- /dev/null
+++ b/web/forms/admin/queries/ui.xml
@@ -0,0 +1,40 @@
+
+