code style fix

This commit is contained in:
loro2
2019-07-29 18:46:15 +02:00
parent 45a439d645
commit 3644c947f4
2 changed files with 195 additions and 187 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ SQL.Designer = function() {
this.flag = 2; this.flag = 2;
this.requestLanguage(); this.requestLanguage();
this.requestDB(); this.requestDB();
this.setStyle(); this.applyStyle();
} }
SQL.Designer.prototype = Object.create(SQL.Visual.prototype); SQL.Designer.prototype = Object.create(SQL.Visual.prototype);
@@ -88,7 +88,7 @@ SQL.Designer.prototype.dbResponse = function(xmlDoc) {
if (!this.flag) { this.init2(); } if (!this.flag) { this.init2(); }
} }
SQL.Designer.prototype.setStyle = function() { /* set style */ SQL.Designer.prototype.applyStyle = function() { /* apply style */
var style = this.getOption("style"); var style = this.getOption("style");
var i, link_elms; var i, link_elms;
for (i=0; link_elms = document.getElementsByTagName("link"); i++) { for (i=0; link_elms = document.getElementsByTagName("link"); i++) {
+194 -186
View File
@@ -1,3 +1,5 @@
/* Generic styles */
body { body {
font-family: verdana, sans-serif; font-family: verdana, sans-serif;
font-size: 12px; font-size: 12px;
@@ -15,57 +17,6 @@ body {
user-select: none; user-select: none;
} }
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;
}
input[type=text]:focus {
border-color: #2196F3;
border-width: 2px;
}
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;
}
textarea:focus {
border-color: #2196F3;
border-width: 2px;
}
input[type=button] { input[type=button] {
font-family: verdana, sans-serif; font-family: verdana, sans-serif;
-webkit-appearance: button; -webkit-appearance: button;
@@ -101,105 +52,45 @@ input[type=button] {
overflow: hidden; overflow: hidden;
} }
legend { input[type=text] {
text-align: left; font-family: verdana, sans-serif;
height: 32px;
display: block; display: block;
width: 100%; background-color: transparent;
padding: 0;
margin-bottom: 10px;
font-size: 21px;
color: rgba(0, 0, 0, .87); color: rgba(0, 0, 0, .87);
line-height: inherit;
}
fieldset {
border: none; border: none;
padding: 0px; border-bottom-color: currentcolor;
margin: 0px 0px 10px 0px; border-bottom-style: none;
} border-bottom-width: medium;
border-bottom: 1px solid rgba(0, 0, 0, .26);
label, input, select { outline: 0;
vertical-align: middle;
}
label {
opacity: 0.7;
}
#keys hr {
visibility: hidden;
}
#keyadd {
margin: 15px;
color: #FFF;
background-color: #2196F3;
}
#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);
}
#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);
}
#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;
}
#keys table {
width: 100%; width: 100%;
font-size: 16px;
padding: 0;
box-shadow: none;
border-radius: 0;
background-image: none;
} }
#keys table td { textarea {
width: 42%; min-width: 500px;
} font-family: verdana, sans-serif;
min-height: 64px;
#keys table td+td { display: block;
width: 16%; background-color: transparent;
} color: rgba(0, 0, 0, .87);
border: none;
#keys table td+td+td { border-bottom-color: currentcolor;
width: 42%; border-bottom-style: none;
} border-bottom-width: medium;
border-bottom: 1px solid rgba(0, 0, 0, .26);
#commentbtn { outline: 0;
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2); width: 100%;
} font-size: 16px;
padding: 0;
#windowok { box-shadow: none;
color: #FF4081; border-radius: 0;
} background-image: none;
#windowok, #windowcancel {
float: right;
}
#windowok:hover, #windowcancel:hover {
background-color: #f2f2f2;
} }
select { select {
@@ -228,7 +119,7 @@ select {
padding: 0 25px 0 0; padding: 0 25px 0 0;
} }
select:focus { textarea:focus, select:focus, input[type=text]:focus {
border-color: #2196F3; border-color: #2196F3;
border-width: 2px; border-width: 2px;
} }
@@ -240,6 +131,33 @@ select optgroup {
font-style: normal; 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 { #area {
position: relative; position: relative;
background: transparent url(../images/back_dim.png); background: transparent url(../images/back_dim.png);
@@ -248,6 +166,23 @@ select optgroup {
opacity: 0.7; 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 { #controls {
position: absolute; position: absolute;
left: 0px; left: 0px;
@@ -294,6 +229,11 @@ select optgroup {
box-shadow: none; box-shadow: none;
} }
#bar input.small {
width: 45%;
display: inline;
}
#bar hr { #bar hr {
margin: 8px; margin: 8px;
background-color: #ddd; background-color: #ddd;
@@ -301,11 +241,6 @@ select optgroup {
border: none; border: none;
} }
#bar input.small {
width: 45%;
display: inline;
}
#toggle { #toggle {
margin-bottom: 5px; margin-bottom: 5px;
cursor: pointer; cursor: pointer;
@@ -321,21 +256,23 @@ select optgroup {
background-color: #de2665; background-color: #de2665;
} }
#toggle.on {
background-image: url(../images/up_2_black.png);
}
#toggle.on:hover { #toggle.on:hover {
background-image: url(../images/up_2_white.png); background-image: url(../images/up_2_white.png);
} }
#toggle.off {
background-image: url(../images/down_2_black.png);
}
#toggle.off:hover { #toggle.off:hover {
background-image: url(../images/down_2_white.png); background-image: url(../images/down_2_white.png);
} }
#toggle.on { /* Minimap */
background-image: url(../images/up_2_black.png);
}
#toggle.off {
background-image: url(../images/down_2_black.png);
}
#minimap { #minimap {
position: fixed; position: fixed;
@@ -370,6 +307,8 @@ select optgroup {
border: 2px solid rgba(0, 0, 0, .8); border: 2px solid rgba(0, 0, 0, .8);
} }
/* Tables */
.table { .table {
position: absolute; position: absolute;
padding: 0 6px 6px 6px; padding: 0 6px 6px 6px;
@@ -465,6 +404,10 @@ select optgroup {
margin-right: 0.5em; margin-right: 0.5em;
} }
#commentbtn {
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2);
}
.adding { .adding {
cursor: crosshair; cursor: crosshair;
} }
@@ -473,13 +416,12 @@ select optgroup {
overflow: hidden; overflow: hidden;
} }
#background { #tablename, #tablecomment {
position: absolute; margin-bottom: 10px;
background-color: #000;
opacity: 0.5;
visibility: hidden;
} }
/* Window */
#window { #window {
position: absolute; position: absolute;
visibility: hidden; visibility: hidden;
@@ -499,29 +441,38 @@ select optgroup {
padding: 1em; padding: 1em;
} }
#tablename, #tablecomment { #windowok {
margin-bottom: 10px; color: #FF4081;
} }
.small { #windowok, #windowcancel {
font-size: 85%; float: right;
} }
#textarea { #windowok:hover, #windowcancel:hover {
width: 100%; background-color: #f2f2f2;
height: 200px;
font-size: small;
font-family: "Lucida Console", Monaco, monospace;
} }
#io table { #throbber {
width: 100%; position: absolute;
top: 2px;
right: 3px;
}
/* Save / Load */
#io {
min-width: 860px;
} }
#io hr { #io hr {
visibility: hidden; visibility: hidden;
} }
#io table {
width: 100%;
}
#io input[type=button] { #io input[type=button] {
box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2); box-shadow: 0 0 2px rgba(0, 0, 0, .12), 0 2px 2px rgba(0, 0, 0, .2);
} }
@@ -542,10 +493,15 @@ select optgroup {
background-color: #ff5a92; background-color: #ff5a92;
} }
#io { #textarea {
min-width: 860px; width: 100%;
height: 200px;
font-size: small;
font-family: "Lucida Console", Monaco, monospace;
} }
/* Options */
#opts { #opts {
width: 700px; width: 700px;
} }
@@ -566,22 +522,74 @@ select optgroup {
margin: 25px 0px 25px 0px; margin: 25px 0px 25px 0px;
} }
.small {
font-size: 85%;
}
/* Keys */
#keys { #keys {
white-space: nowrap; white-space: nowrap;
padding: 0px 10px; padding: 0px 10px;
text-align: center; text-align: center;
} }
#throbber { #keys hr {
position: absolute;
top: 2px;
right: 3px;
}
#rubberband {
position: absolute;
border: .2px solid #FF4081;
background: rgba(255, 64, 129, 0.5);
opacity: 0.5;
visibility: hidden; 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;
}