Merge pull request #286 from loro2/redesing
Redesing - inspired by Lt-Mayonesa's material design
|
After Width: | Height: | Size: 353 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 239 B |
|
After Width: | Height: | Size: 247 B |
|
After Width: | Height: | Size: 115 B |
|
After Width: | Height: | Size: 118 B |
@@ -8,8 +8,9 @@
|
||||
<head>
|
||||
<title>WWW SQL Designer</title>
|
||||
<meta name="viewport" content="initial-scale=1,maximum-scale=1" />
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" href="styles/style.css" media="all" />
|
||||
<meta charset="utf-8" />
|
||||
<link rel="stylesheet" title="material-inspired" href="styles/material-inspired.css" media="all" />
|
||||
<link rel="alternate stylesheet" title="original" href="styles/original.css" media="all" />
|
||||
<!--[if IE 6]><link rel="stylesheet" type="text/css" href="styles/ie6.css" /><![endif]-->
|
||||
<!--[if IE 7]><link rel="stylesheet" type="text/css" href="styles/ie7.css" /><![endif]-->
|
||||
<link rel="stylesheet" href="styles/print.css" type="text/css" media="print" />
|
||||
@@ -119,6 +120,14 @@
|
||||
<span class="small" id="optionpatternnotice"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
* <label id="style" for="optionstyle"></label>
|
||||
</td>
|
||||
<td>
|
||||
<select id="optionstyle"><option></option></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label id="hide" for="optionhide"></label>
|
||||
|
||||
@@ -12,6 +12,9 @@ var CONFIG = {
|
||||
RELATION_SPACING: 15,
|
||||
RELATION_COLORS: ["#000", "#800", "#080", "#008", "#088", "#808", "#088"],
|
||||
|
||||
STYLES: ["material-inspired", "original"],
|
||||
MATERIAL_RELATION_COLORS: ["#323232", "#F44336", "#E91E63", "#9C27B0", "#3F51B5", "#673AB7", "#2196F3", "#03A9F4", "#00BCD4", "#009688", "#4CAF50", "#8BC34A", "#CDDC39", "#FFC107", "#FF5722", "#795548", "#607D8B"],
|
||||
|
||||
STATIC_PATH: "",
|
||||
XHR_PATH: "",
|
||||
|
||||
|
||||
@@ -16,18 +16,19 @@ SQL.Options.prototype.build = function() {
|
||||
this.dom.optiondb = OZ.$("optiondb");
|
||||
this.dom.optionsnap = OZ.$("optionsnap");
|
||||
this.dom.optionpattern = OZ.$("optionpattern");
|
||||
this.dom.optionstyle = OZ.$("optionstyle");
|
||||
this.dom.optionhide = OZ.$("optionhide");
|
||||
this.dom.optionvector = OZ.$("optionvector");
|
||||
this.dom.optionshowsize = OZ.$("optionshowsize");
|
||||
this.dom.optionshowtype = OZ.$("optionshowtype");
|
||||
|
||||
var ids = ["language","db","snap","pattern","hide","vector","showsize","showtype","optionsnapnotice","optionpatternnotice","optionsnotice"];
|
||||
var ids = ["language","db","snap","pattern","style","hide","vector","showsize","showtype","optionsnapnotice","optionpatternnotice","optionsnotice"];
|
||||
for (var i=0;i<ids.length;i++) {
|
||||
var id = ids[i];
|
||||
var elm = OZ.$(id);
|
||||
elm.innerHTML = _(id);
|
||||
}
|
||||
|
||||
|
||||
var ls = CONFIG.AVAILABLE_LOCALES;
|
||||
OZ.DOM.clear(this.dom.optionlocale);
|
||||
for (var i=0;i<ls.length;i++) {
|
||||
@@ -48,9 +49,19 @@ SQL.Options.prototype.build = function() {
|
||||
if (this.owner.getOption("db") == dbs[i]) { this.dom.optiondb.selectedIndex = i; }
|
||||
}
|
||||
|
||||
|
||||
var styles = CONFIG.STYLES;
|
||||
OZ.DOM.clear(this.dom.optionstyle);
|
||||
for (var i=0;i<styles.length;i++) {
|
||||
var o = OZ.DOM.elm("option");
|
||||
o.value = styles[i];
|
||||
o.innerHTML= styles[i];
|
||||
this.dom.optionstyle.appendChild(o);
|
||||
if (this.owner.getOption("style") == styles[i]) { this.dom.optionstyle.selectedIndex = i; }
|
||||
}
|
||||
|
||||
|
||||
OZ.Event.add(this.dom.btn, "click", this.click.bind(this));
|
||||
|
||||
|
||||
this.dom.container.parentNode.removeChild(this.dom.container);
|
||||
}
|
||||
|
||||
@@ -59,6 +70,7 @@ SQL.Options.prototype.save = function() {
|
||||
this.owner.setOption("db",this.dom.optiondb.value);
|
||||
this.owner.setOption("snap",this.dom.optionsnap.value);
|
||||
this.owner.setOption("pattern",this.dom.optionpattern.value);
|
||||
this.owner.setOption("style",this.dom.optionstyle.value);
|
||||
this.owner.setOption("hide",this.dom.optionhide.checked ? "1" : "");
|
||||
this.owner.setOption("vector",this.dom.optionvector.checked ? "1" : "");
|
||||
this.owner.setOption("showsize",this.dom.optionshowsize.checked ? "1" : "");
|
||||
|
||||
@@ -6,16 +6,27 @@ SQL.Relation = function(owner, row1, row2) {
|
||||
this.row2 = row2;
|
||||
this.color = "#000";
|
||||
this.hidden = false;
|
||||
this.relationColors = CONFIG.RELATION_COLORS;
|
||||
SQL.Visual.apply(this);
|
||||
|
||||
this.style = SQL.Designer.getOption("style");
|
||||
switch (this.style) {
|
||||
case "material-inspired":
|
||||
this.relationColors = CONFIG.MATERIAL_RELATION_COLORS;
|
||||
break;
|
||||
case "original":
|
||||
default:
|
||||
this.relationColors = CONFIG.RELATION_COLORS;
|
||||
}
|
||||
|
||||
/* if one of the rows already has relations, inherit color */
|
||||
var all = row1.relations.concat(row2.relations);
|
||||
if (all.length) { /* inherit */
|
||||
this.color = all[0].getColor();
|
||||
} else if (CONFIG.RELATION_COLORS) { /* pick next */
|
||||
} else if (this.relationColors) { /* pick next */
|
||||
SQL.Relation._counter++;
|
||||
var colorIndex = SQL.Relation._counter - 1;
|
||||
this.color = CONFIG.RELATION_COLORS[colorIndex % CONFIG.RELATION_COLORS.length];
|
||||
var colorIndex = (SQL.Relation._counter - 1) % this.relationColors.length;
|
||||
this.color = this.relationColors[colorIndex];
|
||||
}
|
||||
|
||||
this.row1.addRelation(this);
|
||||
|
||||
@@ -5,16 +5,16 @@ SQL.Row = function(owner, title, data) {
|
||||
this.keys = [];
|
||||
this.selected = false;
|
||||
this.expanded = false;
|
||||
|
||||
|
||||
SQL.Visual.apply(this);
|
||||
|
||||
|
||||
this.data.type = 0;
|
||||
this.data.size = "";
|
||||
this.data.def = null;
|
||||
this.data.nll = true;
|
||||
this.data.ai = false;
|
||||
this.data.comment = "";
|
||||
|
||||
|
||||
if (data) { this.update(data); }
|
||||
this.setTitle(title);
|
||||
}
|
||||
@@ -22,7 +22,7 @@ SQL.Row.prototype = Object.create(SQL.Visual.prototype);
|
||||
|
||||
SQL.Row.prototype._build = function() {
|
||||
this.dom.container = OZ.DOM.elm("tbody");
|
||||
|
||||
|
||||
this.dom.content = OZ.DOM.elm("tr");
|
||||
this.dom.selected = OZ.DOM.elm("div", {className:"selected",innerHTML:"» "});
|
||||
this.dom.title = OZ.DOM.elm("div", {className:"title"});
|
||||
@@ -64,7 +64,7 @@ SQL.Row.prototype.setTitle = function(t) {
|
||||
var tt = r.row2.getTitle().replace(new RegExp(old,"g"),t);
|
||||
if (tt != r.row2.getTitle()) { r.row2.setTitle(tt); }
|
||||
}
|
||||
|
||||
|
||||
SQL.Visual.prototype.setTitle.apply(this, [t]);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ SQL.Row.prototype.dblclick = function(e) { /* dblclicked on row */
|
||||
SQL.Row.prototype.update = function(data) { /* update subset of row data */
|
||||
var des = SQL.Designer;
|
||||
if (data.nll && data.def && data.def.match(/^null$/i)) { data.def = null; }
|
||||
|
||||
|
||||
for (var p in data) { this.data[p] = data[p]; }
|
||||
if (!this.data.nll && this.data.def === null) { this.data.def = ""; }
|
||||
|
||||
@@ -116,7 +116,7 @@ SQL.Row.prototype.down = function() { /* shift down */
|
||||
|
||||
SQL.Row.prototype.buildEdit = function() {
|
||||
OZ.DOM.clear(this.dom.container);
|
||||
|
||||
|
||||
var elms = [];
|
||||
this.dom.name = OZ.DOM.elm("input");
|
||||
this.dom.name.type = "text";
|
||||
@@ -141,15 +141,16 @@ SQL.Row.prototype.buildEdit = function() {
|
||||
this.dom.nll = OZ.DOM.elm("input");
|
||||
this.dom.nll.type = "checkbox";
|
||||
elms.push(["null",this.dom.nll]);
|
||||
|
||||
|
||||
this.dom.comment = OZ.DOM.elm("span",{className:"comment"});
|
||||
this.dom.comment.innerHTML = "";
|
||||
this.dom.comment.appendChild(document.createTextNode(this.data.comment));
|
||||
|
||||
this.dom.commentbtn = OZ.DOM.elm("input");
|
||||
this.dom.commentbtn.type = "button";
|
||||
this.dom.commentbtn.id = "commentbtn"
|
||||
this.dom.commentbtn.value = _("comment");
|
||||
|
||||
|
||||
OZ.Event.add(this.dom.commentbtn, "click", this.changeComment);
|
||||
|
||||
for (var i=0;i<elms.length;i++) {
|
||||
@@ -165,7 +166,7 @@ SQL.Row.prototype.buildEdit = function() {
|
||||
);
|
||||
this.dom.container.appendChild(tr);
|
||||
}
|
||||
|
||||
|
||||
var tr = OZ.DOM.elm("tr");
|
||||
var td1 = OZ.DOM.elm("td");
|
||||
var td2 = OZ.DOM.elm("td");
|
||||
@@ -208,7 +209,7 @@ SQL.Row.prototype.collapse = function() {
|
||||
nll: this.dom.nll.checked,
|
||||
ai: this.dom.ai.checked
|
||||
}
|
||||
|
||||
|
||||
OZ.DOM.clear(this.dom.container);
|
||||
this.dom.container.appendChild(this.dom.content);
|
||||
|
||||
@@ -220,7 +221,7 @@ SQL.Row.prototype.load = function() { /* put data to expanded form */
|
||||
this.dom.name.value = this.getTitle();
|
||||
var def = this.data.def;
|
||||
if (def === null) { def = "NULL"; }
|
||||
|
||||
|
||||
this.dom.def.value = def;
|
||||
this.dom.size.value = this.data.size;
|
||||
this.dom.nll.checked = this.data.nll;
|
||||
@@ -230,23 +231,24 @@ SQL.Row.prototype.load = function() { /* put data to expanded form */
|
||||
SQL.Row.prototype.redraw = function() {
|
||||
var color = this.getColor();
|
||||
this.dom.container.style.backgroundColor = color;
|
||||
this.dom.container.style.borderColor = color;
|
||||
OZ.DOM.removeClass(this.dom.title, "primary");
|
||||
OZ.DOM.removeClass(this.dom.title, "key");
|
||||
if (this.isPrimary()) { OZ.DOM.addClass(this.dom.title, "primary"); }
|
||||
if (this.isKey()) { OZ.DOM.addClass(this.dom.title, "key"); }
|
||||
this.dom.selected.style.display = (this.selected ? "" : "none");
|
||||
this.dom.container.title = this.data.comment;
|
||||
|
||||
|
||||
var typehint = [];
|
||||
if (this.owner.owner.getOption("showtype")) {
|
||||
var elm = this.getDataType();
|
||||
typehint.push(elm.getAttribute("sql"));
|
||||
}
|
||||
|
||||
|
||||
if (this.owner.owner.getOption("showsize") && this.data.size) {
|
||||
typehint.push("(" + this.data.size + ")");
|
||||
}
|
||||
|
||||
|
||||
this.dom.typehint.innerHTML = typehint.join(" ");
|
||||
this.owner.redraw();
|
||||
this.owner.owner.rowManager.redraw();
|
||||
@@ -321,7 +323,7 @@ SQL.Row.prototype.destroy = function() {
|
||||
|
||||
SQL.Row.prototype.toXML = function() {
|
||||
var xml = "";
|
||||
|
||||
|
||||
var t = this.getTitle().replace(/"/g,""");
|
||||
var nn = (this.data.nll ? "1" : "0");
|
||||
var ai = (this.data.ai ? "1" : "0");
|
||||
@@ -331,7 +333,7 @@ SQL.Row.prototype.toXML = function() {
|
||||
var t = elm.getAttribute("sql");
|
||||
if (this.data.size.length) { t += "("+this.data.size+")"; }
|
||||
xml += "<datatype>"+t+"</datatype>\n";
|
||||
|
||||
|
||||
if (this.data.def || this.data.def === null) {
|
||||
var q = elm.getAttribute("quote");
|
||||
var d = this.data.def;
|
||||
@@ -348,27 +350,27 @@ SQL.Row.prototype.toXML = function() {
|
||||
if (r.row2 != this) { continue; }
|
||||
xml += '<relation table="'+r.row1.owner.getTitle()+'" row="'+r.row1.getTitle()+'" />\n';
|
||||
}
|
||||
|
||||
|
||||
if (this.data.comment) {
|
||||
xml += "<comment>"+SQL.escape(this.data.comment)+"</comment>\n";
|
||||
}
|
||||
|
||||
|
||||
xml += "</row>\n";
|
||||
return xml;
|
||||
}
|
||||
|
||||
SQL.Row.prototype.fromXML = function(node) {
|
||||
var name = node.getAttribute("name");
|
||||
|
||||
|
||||
var obj = { type:0, size:"" };
|
||||
obj.nll = (node.getAttribute("null") == "1");
|
||||
obj.ai = (node.getAttribute("autoincrement") == "1");
|
||||
|
||||
|
||||
var cs = node.getElementsByTagName("comment");
|
||||
if (cs.length && cs[0].firstChild) { obj.comment = cs[0].firstChild.nodeValue; }
|
||||
|
||||
|
||||
var d = node.getElementsByTagName("datatype");
|
||||
if (d.length && d[0].firstChild) {
|
||||
if (d.length && d[0].firstChild) {
|
||||
var s = d[0].firstChild.nodeValue;
|
||||
var r = s.match(/^([^\(]+)(\((.*)\))?.*$/);
|
||||
var type = r[1];
|
||||
@@ -380,7 +382,7 @@ SQL.Row.prototype.fromXML = function(node) {
|
||||
if (sql == type || (re && new RegExp(re).exec(type)) ) { obj.type = i; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var elm = DATATYPES.getElementsByTagName("type")[obj.type];
|
||||
var d = node.getElementsByTagName("default");
|
||||
if (d.length && d[0].firstChild) {
|
||||
|
||||
@@ -17,10 +17,10 @@ SQL.Toggle.prototype._click = function(e) {
|
||||
SQL.Toggle.prototype._switch = function(state) {
|
||||
this._state = state;
|
||||
if (this._state) {
|
||||
OZ.$("bar").style.height = "";
|
||||
OZ.$("bar").style.maxHeight = "";
|
||||
} else {
|
||||
OZ.$("bar").style.overflow = "hidden";
|
||||
OZ.$("bar").style.height = this._elm.offsetHeight + "px";
|
||||
OZ.$("bar").style.maxHeight = this._elm.offsetHeight + "px";
|
||||
}
|
||||
this._elm.className = (this._state ? "on" : "off");
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ SQL.Designer = function() {
|
||||
this.flag = 2;
|
||||
this.requestLanguage();
|
||||
this.requestDB();
|
||||
this.applyStyle();
|
||||
}
|
||||
SQL.Designer.prototype = Object.create(SQL.Visual.prototype);
|
||||
|
||||
@@ -87,6 +88,17 @@ SQL.Designer.prototype.dbResponse = function(xmlDoc) {
|
||||
if (!this.flag) { this.init2(); }
|
||||
}
|
||||
|
||||
SQL.Designer.prototype.applyStyle = function() { /* apply style */
|
||||
var style = this.getOption("style");
|
||||
var i, link_elms;
|
||||
for (i=0; link_elms = document.getElementsByTagName("link"); i++) {
|
||||
if (link_elms[i].getAttribute("rel").indexOf("style") != -1 && link_elms[i].getAttribute("title")) {
|
||||
link_elms[i].disabled = true;
|
||||
if (link_elms[i].getAttribute("title") == style) link_elms[i].disabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SQL.Designer.prototype.init2 = function() { /* secondary init, after locale & datatypes were retrieved */
|
||||
this.map = new SQL.Map(this);
|
||||
this.rubberband = new SQL.Rubberband(this);
|
||||
@@ -187,6 +199,7 @@ SQL.Designer.prototype.getOption = function(name) {
|
||||
case "pattern": return "%R_%T";
|
||||
case "hide": return false;
|
||||
case "vector": return true;
|
||||
case "style": return "material-inspired";
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
<string name="optionpatternnotice">%T = الجدول الرئيسي, %R = المفتاح الرئيسي, %t = الجدول الخارجي</string>
|
||||
<string name="hide">إخفاء الخطوط عند تحريك الجدول؟</string>
|
||||
<string name="vector">رسم خطوط ناعمة (إذا كان المتصفح يدعم ذلك) ؟</string>
|
||||
<string name="style">قلم المدقة</string>
|
||||
|
||||
|
||||
<!-- keys -->
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<string name="vector">Vykreslovat oblé spojovníky (pakliže to prohlížeč podporuje)?</string>
|
||||
<string name="showsize">Zobrazovat velikost polí v tabulce?</string>
|
||||
<string name="showtype">Zobrazovat datový typ polí v tabulce?</string>
|
||||
<string name="style">Styl</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Klíče</string>
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<string name="vector">Zeichne gekrümmte Verbindungslinien (Browser-abhängig)?</string>
|
||||
<string name="showsize">Zeige Feldgröße im Tabellendesign?</string>
|
||||
<string name="showtype">Zeige Felddatentyp im Tabellendesign?</string>
|
||||
<string name="style">Stil</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Schlüssel</string>
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
<string name="optionpatternnotice">%T = πρωτεύων πίνακας, %R = προτεύον κλειδί, %t = ξένος πίνακας</string>
|
||||
<string name="hide">Απόκρυψη συνδέσμων όταν σύρονται οι πίνακες;</string>
|
||||
<string name="vector">Διάγραμμα με ομαλούς συνδέσμους(αν παρέχεται από τον περιηγητή);</string>
|
||||
<string name="style">Στυλ</string>
|
||||
|
||||
|
||||
<!-- keys -->
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<string name="vector">Draw smooth connectors (if supported by browser)?</string>
|
||||
<string name="showsize">Show field size in table design?</string>
|
||||
<string name="showtype">Show field datatype in table design?</string>
|
||||
<string name="style">Style</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Keys</string>
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<string name="vector">Desegni glatajn konektilojn (se subtenata de retumilo)?</string>
|
||||
<string name="showsize">Show field size in table design?</string>
|
||||
<string name="showtype">Show field datatype in table design?</string>
|
||||
<string name="style">Stilo</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Klavoj</string>
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<string name="vector">¿Dibujar conectores suaves (si son soportados por el navegador)?</string>
|
||||
<string name="showsize">¿Mostrar tamaño del campo en el diseño de tabla?</string>
|
||||
<string name="showtype">¿Mostrar tipo de dato del campo en el diseño de tabla?</string>
|
||||
<string name="style">Estilo</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Claves</string>
|
||||
|
||||
@@ -55,7 +55,8 @@
|
||||
<string name="vector">Dessiner des connecteurs « adoucis » (si le navigateur le supporte) ?</string>
|
||||
<string name="showsize">Afficher la taille du champ dans le schéma de table ?</string>
|
||||
<string name="showtype">Afficher le type du champ dans le schéma de table ?</string>
|
||||
|
||||
<string name="style">Style</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Clés</string>
|
||||
<string name="keyslistlabel">Clés dans la table « %s »</string>
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
<string name="optionpatternnotice">%T = elsődleges tábla, %R = elsődleges kulcs, %t = idegen tábla</string>
|
||||
<string name="hide">Elrejtsem a kapcsolókat a rajztáblán?</string>
|
||||
<string name="vector">Kapcsolók finom kirajzolása (ha a böngésző lehetővé teszi)?</string>
|
||||
<string name="style">Stílus</string>
|
||||
|
||||
|
||||
<!-- keys -->
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<string name="vector">Disegna connettori arrotondati (se supportato dal browser)?</string>
|
||||
<string name="showsize">Show field size in table design?</string>
|
||||
<string name="showtype">Show field datatype in table design?</string>
|
||||
<string name="style">Stile</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Chiavi</string>
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
<string name="vector">滑らかな線を使う(要ブラウザのサポート)</string>
|
||||
<string name="showsize">フィールドサイズを表示</string>
|
||||
<string name="showtype">フィールドタイプを表示</string>
|
||||
<string name="style">スタイル</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">キーの設定</string>
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<string name="vector">부드러운 연결선 사용 (브라우저 지원 필요)?</string>
|
||||
<string name="showsize">디자인에서 필드 사이즈를 표시</string>
|
||||
<string name="showtype">디자인에서 필드 타입을 표시</string>
|
||||
<string name="style">스타일</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">키 설정</string>
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<string name="vector">Teken gekromde relaties (als de browser dit ondersteund)?</string>
|
||||
<string name="showsize">Toon veld omvang in tabelontwerp?</string>
|
||||
<string name="showtype">Toon veld type in tabelontwerp?</string>
|
||||
<string name="style">Stijl</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Sleutels</string>
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<string name="vector">Rysuj pływające złącza (jesli wsperane jest przez przeglądarkę)?</string>
|
||||
<string name="showsize">Show field size in table design?</string>
|
||||
<string name="showtype">Show field datatype in table design?</string>
|
||||
<string name="style">Styl</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Klucze</string>
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
<string name="optionpatternnotice">%T = tabela primária, %R = chave primária, %t = tabela estrangeira</string>
|
||||
<string name="hide">Esconder connectores na tela?</string>
|
||||
<string name="vector">Desenhar conectores suaves (se suportado pelo navegador)?</string>
|
||||
<string name="style">Estilo</string>
|
||||
|
||||
|
||||
<!-- keys -->
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
<string name="optionpatternnotice">%T = Tabela primara, %R = Primary key, %t = Tabela cu Foreign key</string>
|
||||
<string name="hide">Ascunde conexiunile la mutarea tabelei?</string>
|
||||
<string name="vector">Deseneaza folosind "smooth connectors" (daca browserul suporta)?</string>
|
||||
<string name="style">Stil</string>
|
||||
|
||||
|
||||
<!-- keys -->
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<string name="vector">Рисовать сглаженные связи (если поддерживается браузером)?</string>
|
||||
<string name="showsize">Показывать размеры полей таблиц?</string>
|
||||
<string name="showtype">Показывать типы данных полей таблиц?</string>
|
||||
<string name="style">Стиль</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Ключи</string>
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
<string name="optionpatternnotice">%T = primär tabell, %R = primär nycke, %t = främmande tabell</string>
|
||||
<string name="hide">Dölj anslutningar när du drar i tabellen?</string>
|
||||
<string name="vector">Rita mjuka anslutningar (om din webbläsare stöder det)?</string>
|
||||
|
||||
<string name="style">Stil</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Nycklar</string>
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
<string name="vector">Draw smooth connectors (if supported by browser)?</string>
|
||||
<string name="showsize">Tablo tasarımında alan boyutunu gösterme?</string>
|
||||
<string name="showtype">Alan veri tipini tablo tasarımında göster?</string>
|
||||
<string name="style">Stil</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">Anahtarlar</string>
|
||||
|
||||
@@ -52,9 +52,9 @@
|
||||
<string name="optionpatternnotice">%T = 主表, %R = 主键, %t = 外连表</string>
|
||||
<string name="hide">在表格移动时不显示连接?</string>
|
||||
<string name="vector">绘制平滑的连接 (如果浏览器支持)?</string>
|
||||
<string name="showsize">设计表格时显示字段大小?</string>
|
||||
<string name="showsize">设计表格时显示字段大小?</string>
|
||||
<string name="showtype">设计表格时显示字段数据类型?</string>
|
||||
|
||||
<string name="style">样式</string>
|
||||
|
||||
<!-- keys -->
|
||||
<string name="tablekeys">设置表键</string>
|
||||
|
||||
@@ -0,0 +1,595 @@
|
||||
/* Generic styles */
|
||||
|
||||
body {
|
||||
font-family: verdana, sans-serif;
|
||||
font-size: 12px;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
background: #FFF;
|
||||
font-weight: 400;
|
||||
line-height: 1.429;
|
||||
color: rgba(0, 0, 0, .87);
|
||||
visibility: hidden;
|
||||
-moz-user-select: -moz-none;
|
||||
-khtml-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
input[type=button] {
|
||||
font-family: verdana, sans-serif;
|
||||
-webkit-appearance: button;
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
text-transform: uppercase;
|
||||
color: rgba(0, 0, 0, .87);
|
||||
background-color: #FFF;
|
||||
display: inline-block;
|
||||
height: 36px;
|
||||
padding: 0 26px;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
cursor: pointer;
|
||||
-ms-touch-action: manipulation;
|
||||
touch-action: manipulation;
|
||||
background-image: none;
|
||||
text-align: center;
|
||||
line-height: 36px;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
font-size: 14px;
|
||||
letter-spacing: .03em;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
input[type=text] {
|
||||
font-family: verdana, sans-serif;
|
||||
height: 32px;
|
||||
display: block;
|
||||
background-color: transparent;
|
||||
color: rgba(0, 0, 0, .87);
|
||||
border: none;
|
||||
border-bottom-color: currentcolor;
|
||||
border-bottom-style: none;
|
||||
border-bottom-width: medium;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, .26);
|
||||
outline: 0;
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
border-radius: 0;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
textarea {
|
||||
min-width: 500px;
|
||||
font-family: verdana, sans-serif;
|
||||
min-height: 64px;
|
||||
display: block;
|
||||
background-color: transparent;
|
||||
color: rgba(0, 0, 0, .87);
|
||||
border: none;
|
||||
border-bottom-color: currentcolor;
|
||||
border-bottom-style: none;
|
||||
border-bottom-width: medium;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, .26);
|
||||
outline: 0;
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
border-radius: 0;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
select {
|
||||
font-family: verdana, sans-serif;
|
||||
display: block;
|
||||
height: 32px;
|
||||
width: 100%;
|
||||
appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
outline: 0;
|
||||
border: none;
|
||||
border-bottom-color: currentcolor;
|
||||
border-bottom-style: none;
|
||||
border-bottom-width: medium;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, .26);
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
background-color: transparent;
|
||||
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iNiIgd2lkdGg9IjEwIj48cG9seWdvbiBwb2ludHM9IjAsMCAxMCwwIDUsNiIgc3R5bGU9ImZpbGw6cmdiYSgwLDAsMCwuMjQpOyIvPjwvc3ZnPg==);
|
||||
background-repeat: no-repeat;
|
||||
background-position: right center;
|
||||
cursor: pointer;
|
||||
color: rgba(0, 0, 0, .87);
|
||||
font-size: 16px;
|
||||
padding: 0 25px 0 0;
|
||||
}
|
||||
|
||||
textarea:focus, select:focus, input[type=text]:focus {
|
||||
border-color: #2196F3;
|
||||
border-width: 2px;
|
||||
}
|
||||
|
||||
select optgroup {
|
||||
color: rgba(0, 0, 0, .54);
|
||||
font-size: .9em;
|
||||
background: white !important;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
legend {
|
||||
text-align: left;
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
margin-bottom: 10px;
|
||||
font-size: 21px;
|
||||
color: rgba(0, 0, 0, .87);
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
fieldset {
|
||||
border: none;
|
||||
padding: 0px;
|
||||
margin: 0px 0px 10px 0px;
|
||||
}
|
||||
|
||||
label {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
label, input, select {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/* Area */
|
||||
|
||||
#area {
|
||||
position: relative;
|
||||
background: transparent url(../images/back_dim.png);
|
||||
width: 3000px;
|
||||
height: 3000px;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
#rubberband {
|
||||
position: absolute;
|
||||
border: .2px solid #FF4081;
|
||||
background: rgba(255, 64, 129, 0.5);
|
||||
opacity: 0.5;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#background {
|
||||
position: absolute;
|
||||
background-color: #000;
|
||||
opacity: 0.5;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
/* Main menu */
|
||||
|
||||
#controls {
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
#bar {
|
||||
position: fixed;
|
||||
transition: all .2s ease-in-out;
|
||||
right: 4px;
|
||||
top: 0px;
|
||||
width: 190px;
|
||||
margin: 0px 0px 20px 0px;
|
||||
padding: 0px;
|
||||
background-color: rgb(255, 255, 255);
|
||||
text-align: center;
|
||||
border-radius: 0px;
|
||||
box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px 0px, rgba(0, 0, 0, 0.23) 0px 3px 6px 0px;
|
||||
box-sizing: border-box;
|
||||
max-height: 600px;
|
||||
}
|
||||
|
||||
#bar input {
|
||||
transition: all .2s ease-in-out;
|
||||
border-radius: 2px;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
margin: auto auto 3px auto;
|
||||
padding: 2px;
|
||||
line-height: 1.3;
|
||||
opacity: .7;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
#bar input:hover {
|
||||
background-color: #de2665;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#bar input:disabled {
|
||||
cursor: not-allowed;
|
||||
pointer-events: none;
|
||||
opacity: .4;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
#bar input.small {
|
||||
width: 45%;
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#bar hr {
|
||||
margin: 8px;
|
||||
background-color: #ddd;
|
||||
height: 1px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#toggle {
|
||||
margin-bottom: 5px;
|
||||
cursor: pointer;
|
||||
transition: all .2s ease-in-out;
|
||||
border-radius: 2px;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
height: 22px;
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
#toggle:hover {
|
||||
background-color: #de2665;
|
||||
}
|
||||
|
||||
#toggle.on {
|
||||
background-image: url(../images/up_2_black.png);
|
||||
}
|
||||
|
||||
#toggle.on:hover {
|
||||
background-image: url(../images/up_2_white.png);
|
||||
}
|
||||
|
||||
#toggle.off {
|
||||
background-image: url(../images/down_2_black.png);
|
||||
}
|
||||
|
||||
#toggle.off:hover {
|
||||
background-image: url(../images/down_2_white.png);
|
||||
}
|
||||
|
||||
/* Minimap */
|
||||
|
||||
#minimap {
|
||||
position: fixed;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
right: 5px;
|
||||
bottom: 5px;
|
||||
background-color: #fff;
|
||||
opacity: 0.9;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .24);
|
||||
}
|
||||
|
||||
.mini {
|
||||
position: absolute;
|
||||
background-color: #ff8fb5;
|
||||
font-size: 1px;
|
||||
line-height: 1px;
|
||||
}
|
||||
|
||||
.mini_selected {
|
||||
background-color: #de2665;
|
||||
}
|
||||
|
||||
.port {
|
||||
position: absolute;
|
||||
transition: border 0.2s ease-in-out;
|
||||
border: 2px solid rgba(0, 0, 0, .3);
|
||||
}
|
||||
|
||||
#minimap:hover .port {
|
||||
border: 2px solid rgba(0, 0, 0, .8);
|
||||
}
|
||||
|
||||
/* Tables */
|
||||
|
||||
.table {
|
||||
position: absolute;
|
||||
padding: 0 6px 6px 6px;
|
||||
cursor: pointer;
|
||||
margin-bottom: 20px;
|
||||
border-radius: 0;
|
||||
background-color: #FFF;
|
||||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .16), 0 0 2px 0 rgba(0, 0, 0, .12);
|
||||
}
|
||||
|
||||
.table table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.table.selected {
|
||||
border: 1px solid #FF4081;
|
||||
}
|
||||
|
||||
.table thead .title {
|
||||
text-align: center;
|
||||
padding: 6px 30px;
|
||||
}
|
||||
|
||||
.table tbody {
|
||||
border-right: 4px solid transparent;
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.table tbody td {
|
||||
padding: 3px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.table tbody.expanded {
|
||||
border-right: 6px solid rgba(0, 0, 0, .12);
|
||||
background-color: whitesmoke !important;
|
||||
}
|
||||
|
||||
.table tbody .selected {
|
||||
font-weight: bold;
|
||||
color: #f00;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.table tbody .title {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.table thead td[title]:not([title=""]):after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
border-color: rgb(125, 178, 221);
|
||||
border-style: solid;
|
||||
border-width: 5px;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent;
|
||||
}
|
||||
|
||||
.table tbody[title]:not(.expanded):not([title=""]) td:last-child:after {
|
||||
content: '';
|
||||
position: relative;
|
||||
border-color: rgb(125, 178, 221);
|
||||
border-style: solid;
|
||||
border-width: 6px;
|
||||
border-bottom-color: transparent;
|
||||
border-left-color: transparent;
|
||||
border-top-color: transparent;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.primary {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.key {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.primary.key {
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.typehint {
|
||||
font-size: 80%;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.comment {
|
||||
font-size: 80%;
|
||||
font-weight: normal;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
#commentbtn {
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
.adding {
|
||||
cursor: crosshair;
|
||||
}
|
||||
|
||||
.relation {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#tablename, #tablecomment {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* Window */
|
||||
|
||||
#window {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 10px 20px rgba(0, 0, 0, .19), 0 6px 6px rgba(0, 0, 0, .23);
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
#windowtitle {
|
||||
font-size: x-large;
|
||||
margin: 15px 15px 24px 15px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#windowcontent {
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
#windowok {
|
||||
color: #FF4081;
|
||||
}
|
||||
|
||||
#windowok, #windowcancel {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#windowok:hover, #windowcancel:hover {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
|
||||
#throbber {
|
||||
position: absolute;
|
||||
top: 2px;
|
||||
right: 3px;
|
||||
}
|
||||
|
||||
/* Save / Load */
|
||||
|
||||
#io {
|
||||
min-width: 860px;
|
||||
}
|
||||
|
||||
#io hr {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#io table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#io input[type=button] {
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
#io input[type=button]:active {
|
||||
background-color: #f2f2f2;
|
||||
transition: all .2s ease-out;
|
||||
}
|
||||
|
||||
#io #clientsql {
|
||||
color: #FFF;
|
||||
background-color: #FF4081;
|
||||
}
|
||||
|
||||
#io #clientsql:hover {
|
||||
transition: all .2s ease-in-out;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2);
|
||||
background-color: #ff5a92;
|
||||
}
|
||||
|
||||
#textarea {
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
font-size: small;
|
||||
font-family: "Lucida Console", Monaco, monospace;
|
||||
}
|
||||
|
||||
/* Options */
|
||||
|
||||
#opts {
|
||||
width: 700px;
|
||||
}
|
||||
|
||||
#opts td {
|
||||
padding-top: 15px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#opts #optionsnotice {
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
#opts hr {
|
||||
background-color: #ddd;
|
||||
height: 1px;
|
||||
border: none;
|
||||
margin: 25px 0px 25px 0px;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
/* Keys */
|
||||
|
||||
#keys {
|
||||
white-space: nowrap;
|
||||
padding: 0px 10px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#keys hr {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
#keys table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#keys table td {
|
||||
width: 42%;
|
||||
}
|
||||
|
||||
#keys table td+td {
|
||||
width: 16%;
|
||||
}
|
||||
|
||||
#keys table td+td+td {
|
||||
width: 42%;
|
||||
}
|
||||
|
||||
#keyadd {
|
||||
margin: 15px;
|
||||
color: #FFF;
|
||||
background-color: #2196F3;
|
||||
}
|
||||
|
||||
#keyadd:hover {
|
||||
transition: all .2s ease-in-out;
|
||||
background-color: #39a1f4;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
#keyremove {
|
||||
margin: 15px;
|
||||
color: #FFF;
|
||||
background-color: #F44336;
|
||||
}
|
||||
|
||||
#keyremove:hover {
|
||||
transition: all .2s ease-in-out;
|
||||
background-color: #f55a4e;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
#keyleft, #keyright {
|
||||
height: auto;
|
||||
line-height: normal;
|
||||
box-shadow: none;
|
||||
padding: 3px;
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2);
|
||||
}
|
||||
|
||||
#keyfields, #keyavail {
|
||||
height: auto;
|
||||
background-image: none;
|
||||
font-size: small;
|
||||
border: 1px solid rgba(0, 0, 0, .26);
|
||||
padding: 0px;
|
||||
}
|
||||