Pārlūkot izejas kodu

调整弹出框样式

zhengbingbing 6 gadi atpakaļ
vecāks
revīzija
18a20c744c
1 mainītis faili ar 41 papildinājumiem un 4 dzēšanām
  1. 41 4
      Web/SysSettings/workcalendarset.aspx

+ 41 - 4
Web/SysSettings/workcalendarset.aspx

@@ -6,7 +6,7 @@
6 6
 <head id="Head1" runat="server">
7 7
     <title></title>
8 8
     <link href="../scripts/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
9
-
9
+    <link href="../_css/messagebox.css" rel="stylesheet" type="text/css" />
10 10
     <script src="../Scripts/ui/js/jquery-1.3.2.min.js" type="text/javascript"></script>
11 11
 
12 12
     <script src="../scripts/ui/js/core/base.js" type="text/javascript"></script>
@@ -21,6 +21,7 @@
21 21
     <link href="../scripts/ui/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
22 22
     <link href="../images/style.css" rel="stylesheet" type="text/css" />
23 23
     <script src="../Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
24
+    <script src="../_javascripts/globalctrl.js" type="text/javascript"></script>
24 25
 
25 26
     <script type="text/javascript">
26 27
         $(function() {
@@ -107,7 +108,13 @@
107 108
         }
108 109
     </script>
109 110
     <script  type="text/javascript">
110
-        function OpenMessage(strid, strtitle, strmessage, strwidth, btnstyle, _height) {
111
+        var divmark = "";
112
+        divmark += "<div id=\"divLock\" style=\"z-index:1;background-color:#AAA;filter:alpha(opacity=50);position: absolute;width:expression(this.parentNode.scrollWidth);top:expression(this.parentNode.scrollTop); left:0; height:100%;right:0; bottom:0; display:none;\"></div>";
113
+        divmark += "<div id=\"divMessageBox\"  onmousedown=\"MM_dragLayer('divMessageBox','',0,0,0,0,true,false,-1,-1,-1,-1,false,false,0,'',false,'')\" style=\"display:none;position: absolute;top:expression(this.parentNode.scrollHeight/2-100);left:expression(this.parentNode.scrollWidth/2-100);z-index:2;\">";
114
+        divmark += "<div class=\"wbox\"><div class=\"lbox\"><h1 class=\"tbox\"><span id=\"spanTitle\"></span><img src=\"../_images/dialogclose.gif\" style=\"cursor:hand;\" onclick=\"MessageBoxClose();\" /></h1>";
115
+        divmark += "<div id=\"divContent\" class=\"nrbox\"></div></div></div></div>";
116
+        document.write(divmark);
117
+        function OpenMessage(strid, strtitle, strmessage, strwidth, btnstyle, _height, _top) {
111 118
             var btnstr = "";
112 119
             switch (btnstyle) {
113 120
                 case 0:
@@ -126,7 +133,13 @@
126 133
                     btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();DeleteOpt();'>确 定</button>&nbsp;&nbsp;&nbsp;&nbsp;<button style='width: 65px;' onclick='MessageBoxClose();'>取 消</button></div>";
127 134
                     break;
128 135
                 case 5:
129
-                    btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();SetCallRecordZX();'>确 定</button>&nbsp;&nbsp;&nbsp;&nbsp;<button style='width: 65px;' onclick='MessageBoxClose();'>取 消</button></div>";
136
+                    btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();ReloadData();'>确 定</button></div>";
137
+                    break;
138
+                case 6:
139
+                    btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();DeleteDictOpt();'>确 定</button>&nbsp;&nbsp;&nbsp;&nbsp;<button style='width: 65px;' onclick='MessageBoxClose();'>取 消</button></div>";
140
+                    break;
141
+                case 7:
142
+                    btnstr = "<div style='padding-bottom:10px; text-align:center;'><button style='width: 65px;' onclick='MessageBoxClose();SaveClose();'>确 定</button></div>";
130 143
                     break;
131 144
                 default:
132 145
                     break;
@@ -145,13 +158,37 @@
145 158
             document.getElementById("divMessageBox").style.width = strwidth;
146 159
 
147 160
             try {
148
-                document.getElementById("divMessageBox").style.top = (document.body.clientHeight - _height) / 2;
161
+                if (_top != null) {
162
+                    document.getElementById("divMessageBox").style.top = (document.body.clientHeight - _height) / 2 + _top;
163
+                }
164
+                else {
165
+                    document.getElementById("divMessageBox").style.top = (document.body.clientHeight - _height) / 2;
166
+                    if (_height > 350) {
167
+                        document.getElementById("divMessageBox").style.top = 5;
168
+                    }
169
+                }
149 170
                 document.getElementById("divMessageBox").style.left = (document.body.clientWidth - strwidth) / 2;
150 171
             }
151 172
             catch (e)
152 173
             { }
153 174
             document.getElementById("divLock").style.display = "block";
154 175
             document.getElementById("divMessageBox").style.display = "block";
176
+        }
177
+        function OpenWindowPage(_title, _id, _width, _height, _url) {
178
+            var html = "<iframe id='" + _id + "' src='" + _url + "' style='width:100%; height:" + _height + ";'></iframe>";
179
+            OpenMessage(_id, _title, html, _width, -1, _height);
180
+        }
181
+        function OpenWindowPage(_title, _id, _width, _height, _url, _top) {
182
+            var html = "<iframe id='" + _id + "' src='" + _url + "' style='width:100%; height:" + _height + ";'></iframe>";
183
+            OpenMessage(_id, _title, html, _width, -1, _height, _top);
184
+        }
185
+        function MessageBoxClose() {
186
+            document.getElementById("divLock").style.display = "none";
187
+            document.getElementById("divMessageBox").style.display = "none";
188
+            document.getElementById("divContent").innerHTML = "";
189
+        }
190
+        function CloseWindowPage(type) {
191
+            MessageBoxClose();
155 192
         }
156 193
     </script>
157 194
 </head>