diff --git a/db/mssql/datatypes.xml b/db/mssql/datatypes.xml
index 6dddbe5..0bf5c23 100644
--- a/db/mssql/datatypes.xml
+++ b/db/mssql/datatypes.xml
@@ -28,6 +28,7 @@
+
diff --git a/index.html b/index.html
index 1fc3bd4..eafb96c 100644
--- a/index.html
+++ b/index.html
@@ -145,6 +145,7 @@
+
diff --git a/js/wwwsqldesigner.js b/js/wwwsqldesigner.js
index a70bd20..44c8484 100644
--- a/js/wwwsqldesigner.js
+++ b/js/wwwsqldesigner.js
@@ -348,14 +348,14 @@ SQL.Row.prototype.destroy = function() {
SQL.Row.prototype.toXML = function() {
var xml = "";
- var t = this.getTitle().replace(/"/g,"""); // "
+ var t = this.getTitle().replace(/"/g,""");
var nn = (this.data.nll ? "1" : "0");
var ai = (this.data.ai ? "1" : "0");
xml += '\n';
var elm = this.getDataType();
var t = elm.getAttribute("sql");
- if (elm.getAttribute("length") == "1" && this.data.size) { t += "("+this.data.size+")"; }
+ if (this.data.size.length) { t += "("+this.data.size+")"; }
xml += ""+t+"\n";
if (this.data.def || this.data.def === null) {
@@ -634,6 +634,7 @@ SQL.Table.prototype.init = function(owner, name, x, y, z) {
this.rows = [];
this.keys = [];
this.zIndex = 0;
+ this._ec = [];
this.flag = false;
this.selected = false;
@@ -656,9 +657,11 @@ SQL.Table.prototype._build = function() {
OZ.DOM.append([this.dom.container,this.dom.title,this.dom.content]);
this.owner.map.dom.content.appendChild(this.dom.mini);
- OZ.Event.add(this.dom.container,"click",this.bind(this.click));
- OZ.Event.add(this.dom.container,"dblclick",this.bind(this.dblclick));
- OZ.Event.add(this.dom.container,"mousedown",this.bind(this.down));
+ this._ec.push(OZ.Event.add(this.dom.container, "click", this.bind(this.click)));
+ this._ec.push(OZ.Event.add(this.dom.container, "dblclick", this.bind(this.dblclick)));
+ this._ec.push(OZ.Event.add(this.dom.container, "mousedown", this.bind(this.down)));
+ this._ec.push(OZ.Event.add(this.dom.container, "touchstart", this.bind(this.down)));
+ this._ec.push(OZ.Event.add(this.dom.container, "touchmove", OZ.Event.prevent));
}
SQL.Table.prototype.setTitle = function(t) {
@@ -806,6 +809,18 @@ SQL.Table.prototype.snap = function() {
SQL.Table.prototype.down = function(e) { /* mousedown - start drag */
OZ.Event.stop(e);
OZ.Event.prevent(e);
+
+ /* touch? */
+ if (e.type == "touchstart") {
+ var event = e.touches[0];
+ var moveEvent = "touchmove";
+ var upEvent = "touchend";
+ } else {
+ var event = e;
+ var moveEvent = "mousemove";
+ var upEvent = "mouseup";
+ }
+
/* a non-shift click within a selection preserves the selection */
if (e.shiftKey || ! this.selected) {
this.owner.tableManager.select(this, e.shiftKey);
@@ -818,18 +833,18 @@ SQL.Table.prototype.down = function(e) { /* mousedown - start drag */
t.y = new Array(n);
for (var i=0;i\n';
for (var i=0;i 1) { return; }
+ var event = e.touches[0];
+ } else {
+ var event = e;
+ }
+
for (var i=0;i 1) { return; }
+ var event = e.touches[0];
+ } else {
+ var event = e;
+ }
+
+ var dx = event.clientX - this.x;
+ var dy = event.clientY - this.y;
if (this.l + dx < 0) { dx = -this.l; }
if (this.t + dy < 0) { dy = -this.t; }
if (this.l + this.w + 4 + dx > this.width) { dx = this.width - 4 - this.l - this.w; }
@@ -1177,13 +1217,17 @@ SQL.IO.prototype.init = function(owner) {
container:OZ.$("io")
};
- var ids = ["saveload","clientsave","clientload","clientsql","serversave","serverload","serverlist","serverimport"];
+ var ids = ["saveload", "clientsave", "clientload", "clientsql",
+ "quicksave", "serversave", "serverload",
+ "serverlist", "serverimport"];
for (var i=0;i\n';
+ xml += '\n';
xml += '\n';
/* serialize datatypes */
diff --git a/locale/cs.xml b/locale/cs.xml
index 138ced2..4af7dca 100644
--- a/locale/cs.xml
+++ b/locale/cs.xml
@@ -77,6 +77,7 @@
Generovat SQL
Server backend:
Uložit
+ Rychle uložit
Načíst
Vypsat položky
Importovat z databáze
diff --git a/locale/en.xml b/locale/en.xml
index e8aed8a..4eb1af4 100644
--- a/locale/en.xml
+++ b/locale/en.xml
@@ -77,6 +77,7 @@
Generate SQL
Server backend:
Save
+ Quicksave
Load
List items
Import from DB