#83 refactored z-index

--HG--
extra : convert_revision : svn%3Ab267cdba-c1da-11dd-874b-8bacd04a0a74/trunk%4091
This commit is contained in:
ondrej.zara
2010-03-17 11:59:59 +00:00
parent a14842c2b9
commit 592f08cc37
3 changed files with 44 additions and 39 deletions
+33 -30
View File
@@ -20,46 +20,49 @@
<body> <body>
<div id="area"></div> <div id="area"></div>
<div id="bar">
<input type="button" id="saveload" />
<hr/> <div id="controls">
<div id="bar">
<input type="button" id="saveload" />
<input type="button" id="addtable" /> <hr/>
<input type="button" id="edittable" />
<input type="button" id="tablekeys" />
<input type="button" id="removetable" />
<input type="button" id="aligntables" />
<input type="button" id="cleartables" />
<hr/> <input type="button" id="addtable" />
<input type="button" id="edittable" />
<input type="button" id="tablekeys" />
<input type="button" id="removetable" />
<input type="button" id="aligntables" />
<input type="button" id="cleartables" />
<input type="button" id="addrow" /> <hr/>
<input type="button" id="editrow" />
<input type="button" id="uprow" class="small" /><input type="button" id="downrow" class="small"/>
<input type="button" id="foreigncreate" />
<input type="button" id="foreignconnect" />
<input type="button" id="foreigndisconnect" />
<input type="button" id="removerow" />
<hr/> <input type="button" id="addrow" />
<input type="button" id="editrow" />
<input type="button" id="uprow" class="small" /><input type="button" id="downrow" class="small"/>
<input type="button" id="foreigncreate" />
<input type="button" id="foreignconnect" />
<input type="button" id="foreigndisconnect" />
<input type="button" id="removerow" />
<input type="button" id="options" /> <hr/>
<a href="http://code.google.com/p/wwwsqldesigner/w/list" target="_blank"><input type="button" id="docs" value="" /></a>
</div>
<div id="rubberband"></div> <input type="button" id="options" />
<a href="http://code.google.com/p/wwwsqldesigner/w/list" target="_blank"><input type="button" id="docs" value="" /></a>
</div>
<div id="minimap"></div> <div id="rubberband"></div>
<div id="background"></div> <div id="minimap"></div>
<div id="window"> <div id="background"></div>
<div id="windowtitle"><img id="throbber" src="images/throbber.gif" alt="" title=""/></div>
<div id="windowcontent"></div> <div id="window">
<input type="button" id="windowok" /> <div id="windowtitle"><img id="throbber" src="images/throbber.gif" alt="" title=""/></div>
<input type="button" id="windowcancel" /> <div id="windowcontent"></div>
</div> <input type="button" id="windowok" />
<input type="button" id="windowcancel" />
</div>
</div> <!-- #controls -->
<div id="opts"> <div id="opts">
<table> <table>
+3 -1
View File
@@ -1072,7 +1072,7 @@ SQL.Map.prototype.init = function(owner) {
this.width = this.dom.container.offsetWidth - 2; this.width = this.dom.container.offsetWidth - 2;
this.height = this.dom.container.offsetHeight - 2; this.height = this.dom.container.offsetHeight - 2;
this.dom.port = OZ.DOM.elm("div",{className:"port",zIndex:10}); this.dom.port = OZ.DOM.elm("div",{className:"port", zIndex:1});
this.dom.container.appendChild(this.dom.port); this.dom.container.appendChild(this.dom.port);
this.sync = this.bind(this.sync); this.sync = this.bind(this.sync);
@@ -2252,6 +2252,8 @@ SQL.Designer.prototype.getMaxZ = function() { /* find max zIndex */
var z = this.tables[i].getZ(); var z = this.tables[i].getZ();
if (z > max) { max = z; } if (z > max) { max = z; }
} }
OZ.$("controls").style.zIndex = max+5;
return max; return max;
} }
+7 -7
View File
@@ -8,13 +8,18 @@ body {
} }
#area { #area {
z-index: 1; position: relative;
width: 2000px; width: 2000px;
height: 2000px; height: 2000px;
} }
#controls {
position: absolute;
left: 0px;
top: 0px;
}
#bar { #bar {
z-index: 100;
text-align: center; text-align: center;
background-color: #ccc; background-color: #ccc;
position: fixed; position: fixed;
@@ -41,7 +46,6 @@ body {
} }
#minimap { #minimap {
z-index: 100;
position: fixed; position: fixed;
width: 100px; width: 100px;
height: 100px; height: 100px;
@@ -75,7 +79,6 @@ body {
border: 1px solid #000; border: 1px solid #000;
background-color: #ddd; background-color: #ddd;
cursor: pointer; cursor: pointer;
z-index: 10;
-moz-box-shadow: 4px 4px 8px #888; /* FF 3.5+ */ -moz-box-shadow: 4px 4px 8px #888; /* FF 3.5+ */
-webkit-box-shadow: 4px 4px 8px #888; /* Safari 3.0+, Chrome */ -webkit-box-shadow: 4px 4px 8px #888; /* Safari 3.0+, Chrome */
box-shadow: 4px 4px 8px #888; /* Opera 10.5, IE 9.0 */ box-shadow: 4px 4px 8px #888; /* Opera 10.5, IE 9.0 */
@@ -136,13 +139,11 @@ body {
background-color: #000; background-color: #000;
opacity: 0.5; opacity: 0.5;
visibility: hidden; visibility: hidden;
z-index: 102;
} }
#window { #window {
position: absolute; position: absolute;
visibility: hidden; visibility: hidden;
z-index: 103;
background-color: #fff; background-color: #fff;
border: 6px double #333; border: 6px double #333;
} }
@@ -196,6 +197,5 @@ label, input, select {
border: 1px solid #000; border: 1px solid #000;
background: #888; background: #888;
opacity: 0.5; opacity: 0.5;
z-index: 99;
visibility: hidden; visibility: hidden;
} }