Changeset 2107
- Timestamp:
- 05/29/2009 12:19:01 AM (17 years ago)
- Location:
- trunk/bb-admin
- Files:
-
- 3 edited
-
includes/class.bb-install.php (modified) (12 diffs)
-
install.css (modified) (15 diffs)
-
install.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-admin/includes/class.bb-install.php
r2078 r2107 329 329 //$r .= '<form id="lang" action="install.php">' . "\n"; 330 330 $r .= "\t" . '<fieldset>' . "\n"; 331 $r .= "\t\t" . '<label >' . "\n";332 $r .= "\t\t\t" . __( 'Installation language' ). "\n";333 $r .= "\t\t\t" . '<select onchange="changeLanguage(this);" name="language">' . "\n";331 $r .= "\t\t" . '<label class="has-note has-label for-select">' . "\n"; 332 $r .= "\t\t\t" . '<span>' . __( 'Installation language' ) . '</span>' . "\n"; 333 $r .= "\t\t\t" . '<select class="has-note" onchange="changeLanguage(this);" name="language">' . "\n"; 334 334 foreach ( $this->languages as $language ) { 335 335 $selected = ''; … … 340 340 } 341 341 $r .= "\t\t\t" . '</select>' . "\n"; 342 $r .= "\t\t\t" . '<p class="note">' . __( 'Sets the language to be used during the installation process only.' ) . '</p>' . "\n"; 342 $r .= "\t\t\t" . '<a class="note-toggle" href="javascript:void(0);" onclick="toggleNote(\'note-language\');">?</a>' . "\n"; 343 $r .= "\t\t\t" . '<p id="note-language" class="note" style="display:none">' . __( 'Sets the language to be used during the installation process only.' ) . '</p>' . "\n"; 344 $r .= "\t\t\t" . '<div class="clear"></div>' . "\n"; 343 345 $r .= "\t\t" . '</label>' . "\n"; 344 346 $r .= "\t" . '</fieldset>' . "\n"; … … 2182 2184 $data = $this->data[$this->step]['form'][$key]; 2183 2185 2186 $class = ''; 2187 $classes = array(); 2188 if ( isset( $data['note'] ) ) { 2189 $classes[] = 'has-note'; 2190 } 2191 if ( isset( $data['label'] ) ) { 2192 $classes[] = 'has-label'; 2193 } 2194 2184 2195 if ( isset( $this->data[$this->step]['form'][$key]['type'] ) ) { 2185 2196 $type = $this->data[$this->step]['form'][$key]['type']; … … 2187 2198 $type = 'text'; 2188 2199 } 2200 $classes[] = 'for-input-' . $type; 2189 2201 2190 2202 if ( isset( $this->strings[$this->step]['form_errors'][$key] ) ) { 2191 $class = ' class="error"'; 2203 $classes[] = 'error'; 2204 } 2205 if ( count( $classes ) ) { 2206 $class = ' class="' . join( ' ', $classes ) . '"'; 2192 2207 } 2193 2208 … … 2195 2210 2196 2211 if ( isset( $data['label'] ) ) { 2197 $r .= '<span>' . $data['label'] . '</span>' . "\n";2212 $r .= "\t\t" . '<span>' . $data['label'] . '</span>' . "\n"; 2198 2213 } 2199 2214 … … 2220 2235 } 2221 2236 2222 $r .= "\t\t" . '<input' . $direction . ' type="' . attribute_escape( $type ) . '" id="' . attribute_escape( $key ) . '" name="' . attribute_escape( $key ) . '" class="text " value="' . attribute_escape( $data['value'] ) . '"' . $maxlength . $autocomplete . ' />' . "\n";2237 $r .= "\t\t" . '<input' . $direction . ' type="' . attribute_escape( $type ) . '" id="' . attribute_escape( $key ) . '" name="' . attribute_escape( $key ) . '" class="text' . $has_note_class . '" value="' . attribute_escape( $data['value'] ) . '"' . $maxlength . $autocomplete . ' />' . "\n"; 2223 2238 2224 2239 if ( isset( $data['note'] ) ) { 2225 $r .= "\t" . '<p class="note">' . $data['note'] . '</p>' . "\n"; 2226 } 2227 2240 $r .= "\t\t" . '<a class="note-toggle" href="javascript:void(0);" onclick="toggleNote(\'note-' . attribute_escape( $key ) . '\');">?</a>' . "\n"; 2241 $r .= "\t\t" . '<p id="note-' . attribute_escape( $key ) . '" class="note" style="display:none">' . $data['note'] . '</p>' . "\n"; 2242 } 2243 2244 $r .= "\t\t" . '<div class="clear"></div>' . "\n"; 2228 2245 $r .= "\t" . '</label>' . "\n"; 2229 2246 … … 2255 2272 $data = $this->data[$this->step]['form'][$key]; 2256 2273 2257 $r = "\t" . '<label id="label-' . attribute_escape( $key ) . '" for="' . attribute_escape( $key ) . '">' . "\n"; 2258 2274 $class = ''; 2275 $classes = array( 'for-textarea' ); 2276 if ( isset( $data['note'] ) ) { 2277 $classes[] = 'has-note'; 2278 } 2259 2279 if ( isset( $data['label'] ) ) { 2260 $r .= $data['label'] . "\n"; 2280 $classes[] = 'has-label'; 2281 } 2282 if ( count( $classes ) ) { 2283 $class = ' class="' . join( ' ', $classes ) . '"'; 2284 } 2285 2286 $r = "\t" . '<label id="label-' . attribute_escape( $key ) . '"' . $class . ' for="' . attribute_escape( $key ) . '">' . "\n"; 2287 2288 if ( isset( $data['label'] ) ) { 2289 $r .= "\t\t" . '<span>' . $data['label'] . '</span>' . "\n"; 2290 } 2291 2292 if ( isset( $data['note'] ) ) { 2293 $r .= "\t\t" . '<a class="note-toggle" href="javascript:void(0);" onclick="toggleNote(\'note-' . attribute_escape( $key ) . '\');">?</a>' . "\n"; 2294 $r .= "\t\t" . '<p id="note-' . attribute_escape( $key ) . '" class="note" style="display:none">' . $data['note'] . '</p>' . "\n"; 2261 2295 } 2262 2296 … … 2265 2299 } 2266 2300 2267 $r .= "\t\t" . '<textarea' . $direction . ' id="' . attribute_escape( $key ) . '" rows="5" cols="30">' . wp_specialchars( $data['value'] ) . '</textarea>' . "\n"; 2268 2269 if ( isset( $data['note'] ) ) { 2270 $r .= "\t" . '<p class="note">' . $data['note'] . '</p>' . "\n"; 2271 } 2301 $r .= "\t\t" . '<textarea id="' . attribute_escape( $key ) . '" rows="5" cols="30"' . $direction . '>' . wp_specialchars( $data['value'] ) . '</textarea>' . "\n"; 2272 2302 2273 2303 $r .= "\t" . '</label>' . "\n"; … … 2286 2316 $data = $this->data[$this->step]['form'][$key]; 2287 2317 2288 $r = "\t" . '<label id="label-' . attribute_escape( $key ) . '" for="' . attribute_escape( $key ) . '">' . "\n"; 2289 2318 $class = ''; 2319 $classes = array( 'for-select' ); 2320 if ( isset( $data['note'] ) ) { 2321 $classes[] = 'has-note'; 2322 } 2290 2323 if ( isset( $data['label'] ) ) { 2291 $r .= $data['label'] . "\n"; 2324 $classes[] = 'has-label'; 2325 } 2326 if ( count( $classes ) ) { 2327 $class = ' class="' . join( ' ', $classes ) . '"'; 2328 } 2329 2330 $r = "\t" . '<label id="label-' . attribute_escape( $key ) . '"' . $class . ' for="' . attribute_escape( $key ) . '">' . "\n"; 2331 2332 if ( isset( $data['label'] ) ) { 2333 $r .= "\t\t" . '<span>' . $data['label'] . '</span>' . "\n"; 2292 2334 } 2293 2335 2294 2336 if ( isset( $data['options'] ) ) { 2295 2337 $r .= "\t\t" . '<select id="' . attribute_escape( $key ) . '" name="' . attribute_escape( $key ) . '"'; 2296 2297 2338 if ( isset( $data['onchange'] ) ) { 2298 2339 $r .= ' onchange="' . attribute_escape( $data['onchange'] ) . '"'; 2299 2340 } 2300 2301 2341 $r .= '>' . "\n"; 2302 2342 … … 2311 2351 } 2312 2352 2313 $r .= "\t\t" . '</select>' . "\n";2353 $r .= "\t\t" . '</select>'; 2314 2354 } 2315 2355 2316 2356 if ( isset( $data['note'] ) ) { 2317 $r .= "\t" . '<p class="note">' . $data['note'] . '</p>' . "\n"; 2318 } 2319 2357 $r .= "\t\t" . '<a class="note-toggle" href="javascript:void(0);" onclick="toggleNote(\'note-' . attribute_escape( $key ) . '\');">?</a>' . "\n"; 2358 $r .= "\t\t" . '<p id="note-' . attribute_escape( $key ) . '" class="note" style="display:none">' . $data['note'] . '</p>' . "\n"; 2359 } 2360 2361 $r .= "\t\t" . '<div class="clear"></div>' . "\n"; 2320 2362 $r .= "\t" . '</label>' . "\n"; 2321 2363 … … 2350 2392 $data = $this->data[$this->step]['form'][$key]; 2351 2393 2394 $class = ''; 2395 $classes = array( 'for-toggle' ); 2396 if ( isset( $data['note'] ) ) { 2397 $classes[] = 'has-note'; 2398 } 2399 if ( isset( $data['label'] ) ) { 2400 $classes[] = 'has-label'; 2401 } 2402 2352 2403 $onclick = 'toggleBlock(this, \'' . js_escape( $key . '_target' ) . '\' );'; 2353 2404 if ( isset( $data['toggle_value'] ) ) { … … 2358 2409 2359 2410 if ( isset( $this->strings[$this->step]['form_errors'][$key] ) ) { 2360 $class = ' class="error"'; 2361 } 2362 2363 $r = "\t" . '<label id="label-' . attribute_escape( $key ) . '" for="' . attribute_escape( $key ) . '"' . $class . '>' . "\n"; 2364 2411 $classes[] = 'error'; 2412 } 2413 if ( count( $classes ) ) { 2414 $class = ' class="' . join( ' ', $classes ) . '"'; 2415 } 2416 2417 $r = "\t" . '<label id="label-' . attribute_escape( $key ) . '"' . $class . ' for="' . attribute_escape( $key ) . '">' . "\n"; 2418 2419 $r .= "\t\t" . '<span>' . "\n"; 2365 2420 if ( isset( $data['label'] ) ) { 2366 $r .= $data['label'] . "\n"; 2367 } 2368 2369 $r .= "\t\t" . '<input type="checkbox" id="' . attribute_escape( $key ) . '" name="' . attribute_escape( $key ) . '" class="checkbox" onclick="' . attribute_escape( $onclick ) . '"' . $checked . ' value="1" />' . "\n"; 2421 $r .= "\t\t\t" . $data['label'] . "\n"; 2422 } 2423 2424 $r .= "\t\t\t" . '<input type="checkbox" id="' . attribute_escape( $key ) . '" name="' . attribute_escape( $key ) . '" class="checkbox" onclick="' . attribute_escape( $onclick ) . '"' . $checked . ' value="1" />' . "\n"; 2425 $r .= "\t\t" . '</span>' . "\n"; 2370 2426 2371 2427 if ( isset( $data['note'] ) ) { 2372 $r .= "\t" . '<p class="note">' . $data['note'] . '</p>' . "\n"; 2373 } 2374 2428 $r .= "\t\t" . '<a class="note-toggle" href="javascript:void(0);" onclick="toggleNote(\'note-' . attribute_escape( $key ) . '\');">?</a>' . "\n"; 2429 $r .= "\t\t" . '<p id="note-' . attribute_escape( $key ) . '" class="note" style="display:none">' . $data['note'] . '</p>' . "\n"; 2430 } 2431 2432 $r .= "\t\t" . '<div class="clear"></div>' . "\n"; 2375 2433 $r .= "\t" . '</label>' . "\n"; 2376 2434 -
trunk/bb-admin/install.css
r2049 r2107 51 51 background-color: rgb(255, 255, 255); 52 52 text-align: left; 53 -moz-border-radius: 11px; 53 54 -khtml-border-radius: 11px; 54 55 -webkit-border-radius: 11px; … … 147 148 div.closed { 148 149 border: 1px solid rgb(223, 223, 223); 150 -moz-border-radius: 6px; 149 151 -khtml-border-radius: 6px; 150 152 -webkit-border-radius: 6px; … … 156 158 div.open div { 157 159 padding: 1em; 160 margin: 1px 0; 158 161 } 159 162 160 163 div.closed div { 161 164 position: relative; 162 }163 164 div.open div {165 margin: 1px 0;166 165 } 167 166 … … 170 169 background-color: rgb(255, 235, 232); 171 170 padding: 0.6em; 172 -khtml-border-radius: 3px; 173 -webkit-border-radius: 3px; 174 border-radius: 3px; 171 -moz-border-radius: 4px; 172 -khtml-border-radius: 4px; 173 -webkit-border-radius: 4px; 174 border-radius: 4px; 175 175 } 176 176 … … 187 187 background-color: rgb(255, 251, 204); 188 188 padding: 0.6em; 189 -khtml-border-radius: 3px; 190 -webkit-border-radius: 3px; 191 border-radius: 3px; 189 -moz-border-radius: 4px; 190 -khtml-border-radius: 4px; 191 -webkit-border-radius: 4px; 192 border-radius: 4px; 192 193 } 193 194 … … 205 206 border: 1px solid rgb(223, 223, 223); 206 207 background-color: rgb(255, 255, 255); 207 -webkit-border-radius: 3px; 208 -moz-border-radius: 4px; 209 -khtml-border-radius: 4px; 210 -webkit-border-radius: 4px; 211 border-radius: 4px; 208 212 padding: 1em 1em 1em 1em; 209 213 } 210 214 211 215 legend { 212 font-size: 0. 75em;216 font-size: 0.9em; 213 217 font-weight: bold; 214 218 padding-bottom: 0.5em; 215 font-style: italic;216 219 } 217 220 … … 222 225 color: rgb(34, 34, 34); 223 226 cursor: pointer; 227 clear: both; 228 } 229 230 label span { 231 display: block; 232 margin-bottom: 5px; 224 233 } 225 234 … … 228 237 background-color: rgb(255, 235, 232); 229 238 padding: 0.6em; 230 -khtml-border-radius: 3px; 231 -webkit-border-radius: 3px; 232 border-radius: 3px; 239 -moz-border-radius: 4px; 240 -khtml-border-radius: 4px; 241 -webkit-border-radius: 4px; 242 border-radius: 4px; 243 } 244 245 label.forward { 246 clear: none; 247 } 248 249 label a.note-toggle { 250 background-color: rgb(223, 223, 223); 251 color: rgb(255, 255, 255); 252 display: block; 253 text-align: center; 254 float: left; 255 font-weight: bold; 256 font-size: 1.2em; 257 padding-top: 1px; 258 padding-left: 1px; 259 width: 18px; 260 height: 18px; 261 line-height: 18px; 262 margin-left: 6px; 263 margin-top: 4px; 264 -moz-border-radius: 9px; 265 -khtml-border-radius: 9px; 266 -webkit-border-radius: 9px; 267 border-radius: 9px; 268 } 269 270 label a.note-toggle:hover { 271 text-decoration: none; 272 background-color: rgb(50, 140, 0); 273 } 274 275 label.has-note.for-textarea a.note-toggle { 276 margin-top: -2px; 277 margin-left: 6px; 278 } 279 280 label.has-note.for-select a.note-toggle { 281 margin-top: 3px; 282 margin-left: 4px; 283 } 284 285 label.has-note.for-toggle a.note-toggle { 286 margin-top: -2px; 287 margin-left: 8px; 288 } 289 290 label.for-textarea span, 291 label.for-toggle span { 292 float: left; 233 293 } 234 294 235 295 label span.error { 296 color: rgb(204, 0, 0); 236 297 display: block; 237 298 margin: 0.4em 0.4em 0.4em 3em; … … 255 316 margin: 0 0 0 2.5em; 256 317 color: rgb(102, 102, 102); 257 border-left: 1px solid rgb( 223, 223, 223);318 border-left: 1px solid rgb(50, 140, 0); 258 319 padding: 0.6em; 259 320 font-size: 0.9em; 260 321 font-style: italic; 322 clear: both; 261 323 } 262 324 … … 268 330 width: 400px; 269 331 display: block; 270 margin-top: 0.4em; 332 float: left; 333 xmargin-top: 0.4em; 334 -moz-border-radius: 4px; 335 -khtml-border-radius: 4px; 336 -webkit-border-radius: 4px; 337 border-radius: 4px; 338 clear: both; 271 339 } 272 340 … … 277 345 border: 1px solid rgb(187, 187, 187); 278 346 display: block; 279 margin-top: 0.4em;347 float: left; 280 348 } 281 349 … … 289 357 height: 38em; 290 358 display: block; 291 margin-top: 0.4em; 359 -moz-border-radius: 4px; 360 -khtml-border-radius: 4px; 361 -webkit-border-radius: 4px; 362 border-radius: 4px; 363 clear: both; 292 364 } 293 365 … … 312 384 input.button { 313 385 background: url('images/white-grad.png') repeat-x scroll 0% 0% rgb(242, 242, 242); 386 -moz-border-radius: 15px; 387 -khtml-border-radius: 15px; 314 388 -webkit-border-radius: 15px; 389 border-radius: 15px; 315 390 border: 1px solid rgb(187, 187, 187); 316 391 color: rgb(70, 70, 70); … … 336 411 } 337 412 413 label#label-toggle_4 span { 414 margin-bottom: 0.4em; 415 } 416 338 417 label#label-error_log, 339 418 label#label-installation_log { … … 341 420 margin-bottom: 0; 342 421 } 422 423 div.clear { 424 clear: both; 425 height: 1px; 426 line-height: 1px; 427 font-size: 1px; 428 margin: 0; 429 padding: 0; 430 } -
trunk/bb-admin/install.php
r2090 r2107 16 16 ?> 17 17 <script type="text/javascript" charset="utf-8"> 18 function toggleNote(target) { 19 var targetObj = document.getElementById(target); 20 if (targetObj.style.display == 'none') { 21 targetObj.style.display = 'block'; 22 } else { 23 targetObj.style.display = 'none'; 24 } 25 } 18 26 function toggleBlock(toggleObj, target) { 19 27 var targetObj = document.getElementById(target);
Note: See TracChangeset
for help on using the changeset viewer.