Commit 4e3b6b8bf811cc22f98232daea8efdb5189d1c5c
1 parent
073fd6e6
Merged in from DEV trunk...
KTS-2002 "UI has multiple issues related to it. " Fixed. Reviewed By: Conrad git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/STABLE/trunk@6653 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
137 changed files
with
3299 additions
and
1602 deletions
lib/templating/kt3template.inc.php
| @@ -111,6 +111,8 @@ class KTPage { | @@ -111,6 +111,8 @@ class KTPage { | ||
| 111 | /* default js files initialisation */ | 111 | /* default js files initialisation */ |
| 112 | $aJS = Array(); | 112 | $aJS = Array(); |
| 113 | 113 | ||
| 114 | + $aJS[] = 'thirdpartyjs/yui/yahoo/yahoo.js'; | ||
| 115 | + $aJS[] = 'thirdpartyjs/yui/utilities/utilities.js'; | ||
| 114 | /* | 116 | /* |
| 115 | $aJS[] = 'thirdpartyjs/MochiKit/MochiKit.js'; | 117 | $aJS[] = 'thirdpartyjs/MochiKit/MochiKit.js'; |
| 116 | $aJS[] = 'thirdpartyjs/MochiKit/New.js'; | 118 | $aJS[] = 'thirdpartyjs/MochiKit/New.js'; |
| @@ -119,9 +121,13 @@ class KTPage { | @@ -119,9 +121,13 @@ class KTPage { | ||
| 119 | $aJS[] = 'thirdpartyjs/MochiKit/Style.js'; | 121 | $aJS[] = 'thirdpartyjs/MochiKit/Style.js'; |
| 120 | $aJS[] = 'thirdpartyjs/MochiKit/Signal.js'; | 122 | $aJS[] = 'thirdpartyjs/MochiKit/Signal.js'; |
| 121 | */ | 123 | */ |
| 122 | - $aJS[] = 'thirdpartyjs/MochiKit/MochiKitPacked.js'; | 124 | + $aJS[] = 'thirdpartyjs/MochiKit/MochiKitPacked.js'; |
| 123 | $aJS[] = 'resources/js/kt-utility.js'; | 125 | $aJS[] = 'resources/js/kt-utility.js'; |
| 124 | $aJS[] = 'presentation/i18nJavascript.php'; | 126 | $aJS[] = 'presentation/i18nJavascript.php'; |
| 127 | + $aJS[] = 'thirdpartyjs/curvycorners/rounded_corners.inc.js'; | ||
| 128 | + $aJS[] = 'resources/js/loader.js'; | ||
| 129 | + $aJS[] = 'thirdpartyjs/yui/tools/tools.js'; | ||
| 130 | + | ||
| 125 | 131 | ||
| 126 | 132 | ||
| 127 | //$aJS[] = 'thirdpartyjs/MochiKit/Iter.js'; | 133 | //$aJS[] = 'thirdpartyjs/MochiKit/Iter.js'; |
plugins/rssplugin/templates/RSSPlugin/managerssfeeds.smarty
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | </fieldset> | 6 | </fieldset> |
| 7 | 7 | ||
| 8 | {if empty($feedlist)} | 8 | {if empty($feedlist)} |
| 9 | -<div class="ktInfo"><p>{i18n}Your RSS feed list is empty.{/i18n}</p></div> | 9 | +<div class="ktInfoMessage"><span>{i18n}Your RSS feed list is empty.{/i18n}</span></div> |
| 10 | {else} | 10 | {else} |
| 11 | <table class="listing"> | 11 | <table class="listing"> |
| 12 | <thead> | 12 | <thead> |
resources/css/kt-framing.css
| @@ -43,154 +43,16 @@ body | @@ -43,154 +43,16 @@ body | ||
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | #pageBody { | 45 | #pageBody { |
| 46 | - position: relative; | ||
| 47 | - border: 1px solid white; | 46 | + margin-top: 20px; |
| 47 | + margin-bottom: 30px; | ||
| 48 | + margin-left: auto; | ||
| 49 | + margin-right: auto; | ||
| 50 | + border: 1px solid #BBBBBB; | ||
| 51 | + padding: 20px; | ||
| 48 | min-height: 800px; | 52 | min-height: 800px; |
| 49 | height: auto; | 53 | height: auto; |
| 50 | -} | ||
| 51 | - | ||
| 52 | -#pageBodyBg { | ||
| 53 | - position: absolute; | ||
| 54 | - background: url(../../resources/graphics/page_bg.png) bottom left repeat-x; | ||
| 55 | - width: 99.2%; | ||
| 56 | - height: 611px; | ||
| 57 | - bottom: 0px; | ||
| 58 | - left: 3px; | ||
| 59 | -} | ||
| 60 | - | ||
| 61 | -#bodyTopLeft { | ||
| 62 | - position: absolute; | ||
| 63 | - background: url(../../resources/graphics/page_border_topleft.gif) top left no-repeat; | ||
| 64 | - top: 0; | ||
| 65 | - left: 0; | ||
| 66 | - width: 50px; | ||
| 67 | - height: 50px; | ||
| 68 | -} | ||
| 69 | - | ||
| 70 | -#bodyTopRepeat { | ||
| 71 | - position: absolute; | ||
| 72 | - background: url(../../resources/graphics/page_border_toprepeat.gif) top left repeat-x; | ||
| 73 | - width:95%; | ||
| 74 | - height: 20px; | ||
| 75 | - top: 0px; | ||
| 76 | - left: 40px; | ||
| 77 | -} | ||
| 78 | - | ||
| 79 | -#bodyLeftRepeatTop { | ||
| 80 | - position: absolute; | ||
| 81 | - background: url(../../resources/graphics/page_border_leftrepeat.gif) top left repeat-y; | ||
| 82 | - width: 3px; | ||
| 83 | - height: 560px; | ||
| 84 | - top: 40px; | ||
| 85 | - left: 0px; | ||
| 86 | -} | ||
| 87 | - | ||
| 88 | -#bodyLeftRepeatQuartTop { | ||
| 89 | - position: absolute; | ||
| 90 | - background: url(../../resources/graphics/page_border_leftrepeat.gif) top left repeat-y; | ||
| 91 | - top: 15%; | ||
| 92 | - left: 0px; | ||
| 93 | - width: 3px; | ||
| 94 | - height: 300px; | ||
| 95 | -} | ||
| 96 | - | ||
| 97 | -#bodyLeftRepeatMiddleTop { | ||
| 98 | - position: absolute; | ||
| 99 | - background: url(../../resources/graphics/page_border_leftrepeat.gif) top left repeat-y; | ||
| 100 | - top: 50%; | ||
| 101 | - left: 0px; | ||
| 102 | - width: 3px; | ||
| 103 | - height: 300px; | ||
| 104 | -} | ||
| 105 | - | ||
| 106 | -#bodyLeftRepeatMiddleBottom { | ||
| 107 | - position: absolute; | ||
| 108 | - background: url(../../resources/graphics/page_border_leftrepeat.gif) top left repeat-y; | ||
| 109 | - bottom: 50%; | ||
| 110 | - left: 0px; | ||
| 111 | - width: 3px; | ||
| 112 | - height: 300px; | ||
| 113 | -} | ||
| 114 | - | ||
| 115 | -#bodyLeftRepeatQuartBottom { | ||
| 116 | - position: absolute; | ||
| 117 | - background: url(../../resources/graphics/page_border_leftrepeat.gif) top left repeat-y; | ||
| 118 | - bottom: 25%; | ||
| 119 | - left: 0px; | ||
| 120 | - width: 3px; | ||
| 121 | - height: 300px; | ||
| 122 | -} | ||
| 123 | - | ||
| 124 | -#bodyLeftRepeatBottom { | ||
| 125 | - position: absolute; | ||
| 126 | - background: url(../../resources/graphics/page_border_leftrepeat.gif) top left repeat-y; | ||
| 127 | - width: 3px; | ||
| 128 | - height: 600px; | ||
| 129 | - bottom: 0px; | ||
| 130 | - left: 0px; | ||
| 131 | -} | ||
| 132 | - | ||
| 133 | -#bodyRightRepeatTop { | ||
| 134 | - position: absolute; | ||
| 135 | - background: url(../../resources/graphics/page_border_rightrepeat.gif) top right repeat-y; | ||
| 136 | - width: 8px; | ||
| 137 | - height:585px; | ||
| 138 | - top: 15px; | ||
| 139 | - right: 0px; | ||
| 140 | -} | ||
| 141 | - | ||
| 142 | -#bodyRightRepeatQuartTop { | ||
| 143 | - position: absolute; | ||
| 144 | - background: url(../../resources/graphics/page_border_rightrepeat.gif) top right repeat-y; | ||
| 145 | - top: 15%; | ||
| 146 | - right: 0px; | ||
| 147 | - width: 8px; | ||
| 148 | - height: 300px; | ||
| 149 | -} | ||
| 150 | - | ||
| 151 | -#bodyRightRepeatMiddleTop { | ||
| 152 | - position: absolute; | ||
| 153 | - background: url(../../resources/graphics/page_border_rightrepeat.gif) top right repeat-y; | ||
| 154 | - top: 50%; | ||
| 155 | - right: 0px; | ||
| 156 | - width: 8px; | ||
| 157 | - height: 300px; | ||
| 158 | -} | ||
| 159 | - | ||
| 160 | -#bodyRightRepeatMiddleBottom { | ||
| 161 | - position: absolute; | ||
| 162 | - background: url(../../resources/graphics/page_border_rightrepeat.gif) top right repeat-y; | ||
| 163 | - bottom: 50%; | ||
| 164 | - right: 0px; | ||
| 165 | - width: 8px; | ||
| 166 | - height: 300px; | ||
| 167 | -} | ||
| 168 | - | ||
| 169 | -#bodyRightRepeatQuartBottom { | ||
| 170 | - position: absolute; | ||
| 171 | - background: url(../../resources/graphics/page_border_rightrepeat.gif) top right repeat-y; | ||
| 172 | - bottom: 25%; | ||
| 173 | - right: 0px; | ||
| 174 | - width: 8px; | ||
| 175 | - height: 300px; | ||
| 176 | -} | ||
| 177 | - | ||
| 178 | -#bodyRightRepeatBottom { | ||
| 179 | - position: absolute; | ||
| 180 | - background: url(../../resources/graphics/page_border_rightrepeat.gif) top right repeat-y; | ||
| 181 | - width: 8px; | ||
| 182 | - height:600px; | ||
| 183 | - bottom: 0px; | ||
| 184 | - right: 0px; | ||
| 185 | -} | ||
| 186 | - | ||
| 187 | -#bodyTopRight { | ||
| 188 | - position: absolute; | ||
| 189 | - background: url(../../resources/graphics/page_border_topright.gif) top right no-repeat; | ||
| 190 | - top:0px; | ||
| 191 | - right:0px; | ||
| 192 | - width: 50px; | ||
| 193 | - height:100%; | 54 | + background-image: url(../../resources/graphics/page_bg.png); |
| 55 | + background-repeat: repeat-x; | ||
| 194 | } | 56 | } |
| 195 | 57 | ||
| 196 | #bodyPad { | 58 | #bodyPad { |
| @@ -199,33 +61,6 @@ body | @@ -199,33 +61,6 @@ body | ||
| 199 | margin-right:15px; | 61 | margin-right:15px; |
| 200 | } | 62 | } |
| 201 | 63 | ||
| 202 | -#bodyBottomRepeat { | ||
| 203 | - position: absolute; | ||
| 204 | - background: url(../../resources/graphics/page_border_bottomrepeat.gif) bottom left repeat-x; | ||
| 205 | - width:99%; | ||
| 206 | - height: 20px; | ||
| 207 | - bottom: 0px; | ||
| 208 | - left: 10px; | ||
| 209 | -} | ||
| 210 | - | ||
| 211 | -#bodyBottomLeft { | ||
| 212 | - position: absolute; | ||
| 213 | - background: url(../../resources/graphics/page_border_bottomleft.gif) bottom left no-repeat; | ||
| 214 | - width:100px; | ||
| 215 | - height:100px; | ||
| 216 | - bottom:0; | ||
| 217 | - left:0; | ||
| 218 | -} | ||
| 219 | - | ||
| 220 | -#bodyBottomRight { | ||
| 221 | - position: absolute; | ||
| 222 | - background: url(../../resources/graphics/page_border_bottomright.gif) bottom right no-repeat; | ||
| 223 | - width:100px; | ||
| 224 | - height:100px; | ||
| 225 | - bottom:0; | ||
| 226 | - right:0; | ||
| 227 | -} | ||
| 228 | - | ||
| 229 | /* ------------------ logobar ------------------ */ | 64 | /* ------------------ logobar ------------------ */ |
| 230 | 65 | ||
| 231 | #logobar | 66 | #logobar |
| @@ -400,193 +235,30 @@ a.main_nav_item { | @@ -400,193 +235,30 @@ a.main_nav_item { | ||
| 400 | .noportlets #portletbar { display: none; } | 235 | .noportlets #portletbar { display: none; } |
| 401 | 236 | ||
| 402 | #portletbar .portlet { | 237 | #portletbar .portlet { |
| 403 | - position: relative; | ||
| 404 | margin: 0 0 1.5em 0; | 238 | margin: 0 0 1.5em 0; |
| 405 | - background: url(../../resources/graphics/portlet_corner_topleft_collapsed.png) top left no-repeat; | 239 | + /*background: url(../../resources/graphics/portlet_corner_topleft_collapsed.png) top left no-repeat;*/ |
| 240 | + background: #ffffff url(../../resources/graphics/portlet_bg_collapsed.png) top left repeat-x; | ||
| 241 | + border: 1px solid #B7B7B7; | ||
| 406 | padding: 0 0 0 0; | 242 | padding: 0 0 0 0; |
| 407 | - border: 0; | ||
| 408 | z-index: 2; | 243 | z-index: 2; |
| 409 | } | 244 | } |
| 410 | 245 | ||
| 411 | -#portletbar .portlet .portletTopRepeat { | ||
| 412 | - position: absolute; | ||
| 413 | - background: url(../../resources/graphics/portlet_bg_collapsed.png) top left repeat-x; | ||
| 414 | - top: 0; | ||
| 415 | - left: 30px; | ||
| 416 | - height: 30px; | ||
| 417 | - width: 80%; | ||
| 418 | - z-index: -1; | ||
| 419 | - border:0; | ||
| 420 | -} | ||
| 421 | - | ||
| 422 | -#portletbar .portlet .portletTopRight { | ||
| 423 | - position: absolute; | ||
| 424 | - background: url(../../resources/graphics/portlet_corner_topright_collapsed.png) top right no-repeat; | ||
| 425 | - top: 0; | ||
| 426 | - right: 0px; | ||
| 427 | - height: 30px; | ||
| 428 | - width: 60%; | ||
| 429 | - z-index: -1; | ||
| 430 | - border: 0; | ||
| 431 | -} | ||
| 432 | - | ||
| 433 | #portletbar .portlet.expanded { | 246 | #portletbar .portlet.expanded { |
| 434 | - position: relative; | ||
| 435 | margin: 0 0 1.5em 0; | 247 | margin: 0 0 1.5em 0; |
| 436 | padding: 0 0 0 0; | 248 | padding: 0 0 0 0; |
| 437 | - background: url(../../resources/graphics/portlet_corner_topleft.png) top left no-repeat; | ||
| 438 | - border: 0; | 249 | + border: 1px solid #B7B7B7; |
| 250 | + background: #ffffff url(../../resources/graphics/portlet_bg.png) top left repeat-x; | ||
| 439 | z-index: 2; | 251 | z-index: 2; |
| 440 | } | 252 | } |
| 441 | 253 | ||
| 442 | -#portletbar .portlet.expanded .portletTopRepeat { | ||
| 443 | - position: absolute; | ||
| 444 | - background: url(../../resources/graphics/portlet_bg.png) top left repeat-x; | ||
| 445 | - top: 0px; | ||
| 446 | - left: 30px; | ||
| 447 | - height: 28px; | ||
| 448 | - width: 80%; | ||
| 449 | - z-index: -1; | ||
| 450 | - border: 0; | ||
| 451 | -} | ||
| 452 | - | ||
| 453 | -#portletbar .portlet.expanded .portletTopRight { | ||
| 454 | - position: absolute; | ||
| 455 | - background: url(../../resources/graphics/portlet_corner_topright.png) top right no-repeat; | ||
| 456 | - top: 0; | ||
| 457 | - right: 0px; | ||
| 458 | - height: 28px; | ||
| 459 | - width: 60%; | ||
| 460 | - z-index: -1; | ||
| 461 | - border: 0; | ||
| 462 | -} | ||
| 463 | - | ||
| 464 | #portletbar .portlet .portletbody { | 254 | #portletbar .portlet .portletbody { |
| 465 | - background: url(../../resources/graphics/portlet_borderright.png) top right repeat-y; | ||
| 466 | padding: 0 0 1em 0; | 255 | padding: 0 0 1em 0; |
| 467 | margin-right: 1px; | 256 | margin-right: 1px; |
| 468 | background-color: white; | 257 | background-color: white; |
| 469 | - border-bottom: 1px solid #ccc; | ||
| 470 | - border-left: 1px solid #ccc; | ||
| 471 | width: 99%; | 258 | width: 99%; |
| 472 | height: 100%; | 259 | height: 100%; |
| 473 | } | 260 | } |
| 474 | 261 | ||
| 475 | -/* Attempt to contain side portlet containers in MORE containers*/ | ||
| 476 | -/* | ||
| 477 | -#portletbar .portlet.expanded .portletBodyDoubleTop { | ||
| 478 | - position: relative; | ||
| 479 | - width: 100%; | ||
| 480 | - height: 1px; | ||
| 481 | - top:0px; | ||
| 482 | - right:0px; | ||
| 483 | - border: 1px solid red; | ||
| 484 | -} | ||
| 485 | - | ||
| 486 | -#portletbar .portlet.expanded .portletBodyDoubleMiddle { | ||
| 487 | - position: relative; | ||
| 488 | - width: 100%; | ||
| 489 | - height: 1px; | ||
| 490 | - top:0px; | ||
| 491 | - right:0px; | ||
| 492 | - border: 1px solid blue; | ||
| 493 | -} | ||
| 494 | - | ||
| 495 | -#portletbar .portlet.expanded .portletBodyDoubleBottom { | ||
| 496 | - position: relative; | ||
| 497 | - width: 100%; | ||
| 498 | - height: 1px; | ||
| 499 | - bottom:0px; | ||
| 500 | - right:0px; | ||
| 501 | - border: 1px solid red; | ||
| 502 | -}*/ | ||
| 503 | - | ||
| 504 | -/* Bottom Portlet borders */ | ||
| 505 | -/* | ||
| 506 | -#portletbar .portlet .portletbodyBottomLeft { | ||
| 507 | - position: absolute; | ||
| 508 | - bottom: 0px; | ||
| 509 | - left: 0px; | ||
| 510 | - width: 10px; | ||
| 511 | - height: 10px; | ||
| 512 | - background: url(../../resources/graphics/portlet_corner_bottomleft.png) bottom left no-repeat; | ||
| 513 | -} | ||
| 514 | - | ||
| 515 | -#portletbar .portlet .portletbodyBottomRight { | ||
| 516 | - position: absolute; | ||
| 517 | - bottom: 0px; | ||
| 518 | - right: 0px; | ||
| 519 | - width: 10px; | ||
| 520 | - height: 10px; | ||
| 521 | - background: url(../../resources/graphics/portlet_corner_bottomright.png) bottom right no-repeat; | ||
| 522 | -} | ||
| 523 | - | ||
| 524 | -#portletbar .portlet .portletbodyBottom { | ||
| 525 | - position: absolute; | ||
| 526 | - bottom: 0px; | ||
| 527 | - left: 5px; | ||
| 528 | - height: 3px; | ||
| 529 | - width: 95%; | ||
| 530 | - background: url(../../resources/graphics/portlet_borderbottom.png) bottom left repeat-x; | ||
| 531 | -}*/ | ||
| 532 | - | ||
| 533 | -/* Right-hand side portlet borders */ | ||
| 534 | -/* | ||
| 535 | -#portletbar .portlet .portletbodyRightTop { | ||
| 536 | - position: absolute; | ||
| 537 | - background: url(../../resources/graphics/portlet_borderright.png) top right repeat-y; | ||
| 538 | - top: 0px; | ||
| 539 | - right: 0px; | ||
| 540 | - width: 5px; | ||
| 541 | - height: 76px; | ||
| 542 | -} | ||
| 543 | - | ||
| 544 | -#portletbar .portlet .portletbodyRightBottom { | ||
| 545 | - position: absolute; | ||
| 546 | - background: url(../../resources/graphics/portlet_borderright.png) top right repeat-y; | ||
| 547 | - bottom: 0px; | ||
| 548 | - right: 0px; | ||
| 549 | - width: 5px; | ||
| 550 | - height: 80px; | ||
| 551 | -} | ||
| 552 | - | ||
| 553 | - | ||
| 554 | -#portletbar .portlet .portletbodyRightMiddleTop { | ||
| 555 | - position: absolute; | ||
| 556 | - background: url(../../resources/graphics/portlet_borderright.png) top right repeat-y; | ||
| 557 | - top: 50%; | ||
| 558 | - right: 0px; | ||
| 559 | - width: 5px; | ||
| 560 | - height: 36px; | ||
| 561 | -} | ||
| 562 | - | ||
| 563 | -#portletbar .portlet .portletbodyRightMiddleBottom { | ||
| 564 | - position: absolute; | ||
| 565 | - background: url(../../resources/graphics/portlet_borderright.png) top right repeat-y; | ||
| 566 | - bottom: 50%; | ||
| 567 | - right: 0px; | ||
| 568 | - width: 5px; | ||
| 569 | - height: 63px; | ||
| 570 | -} | ||
| 571 | - | ||
| 572 | -#portletbar .portlet .portletbodyRightQuartTop { | ||
| 573 | - position: absolute; | ||
| 574 | - background: url(../../resources/graphics/portlet_borderright.png) top right repeat-y; | ||
| 575 | - top: 15%; | ||
| 576 | - right: 0px; | ||
| 577 | - width: 5px; | ||
| 578 | - height: 60px; | ||
| 579 | -} | ||
| 580 | - | ||
| 581 | -#portletbar .portlet .portletbodyRightQuartBottom { | ||
| 582 | - position: absolute; | ||
| 583 | - background: url(../../resources/graphics/portlet_borderright.png) top right repeat-y; | ||
| 584 | - bottom: 25%; | ||
| 585 | - right: 0px; | ||
| 586 | - width: 5px; | ||
| 587 | - height: 68px; | ||
| 588 | -}*/ | ||
| 589 | - | ||
| 590 | #portletbar .portlet a { | 262 | #portletbar .portlet a { |
| 591 | color: #344a6a; | 263 | color: #344a6a; |
| 592 | text-decoration: none; | 264 | text-decoration: none; |
| @@ -603,6 +275,7 @@ a.main_nav_item { | @@ -603,6 +275,7 @@ a.main_nav_item { | ||
| 603 | 275 | ||
| 604 | #portletbar .portlet h4 | 276 | #portletbar .portlet h4 |
| 605 | { | 277 | { |
| 278 | + margin: 0; | ||
| 606 | padding-top: 0.35em; | 279 | padding-top: 0.35em; |
| 607 | padding-bottom: 0.7em; | 280 | padding-bottom: 0.7em; |
| 608 | padding-left: 30px; | 281 | padding-left: 30px; |
| @@ -635,57 +308,6 @@ a.main_nav_item { | @@ -635,57 +308,6 @@ a.main_nav_item { | ||
| 635 | display: block; | 308 | display: block; |
| 636 | } | 309 | } |
| 637 | 310 | ||
| 638 | -#portletbar .portlet .portletbodyRightTop { | ||
| 639 | - display: none; | ||
| 640 | -} | ||
| 641 | - | ||
| 642 | -#portletbar .portlet .portletbodyRightBottom { | ||
| 643 | - display: none; | ||
| 644 | -} | ||
| 645 | - | ||
| 646 | -#portletbar .portlet .portletbodyRightMiddleTop { | ||
| 647 | - display: none; | ||
| 648 | -} | ||
| 649 | - | ||
| 650 | -#portletbar .portlet .portletbodyRightMiddleBottom { | ||
| 651 | - display: none; | ||
| 652 | -} | ||
| 653 | - | ||
| 654 | -#portletbar .portlet .portletbodyRightQuartTop { | ||
| 655 | - display: none; | ||
| 656 | -} | ||
| 657 | - | ||
| 658 | -#portletbar .portlet .portletbodyRightQuartBottom { | ||
| 659 | - display: none; | ||
| 660 | -} | ||
| 661 | - | ||
| 662 | - | ||
| 663 | -#portletbar .portlet.expanded .portletbodyRightTop { | ||
| 664 | - display: block; | ||
| 665 | -} | ||
| 666 | - | ||
| 667 | -#portletbar .portlet.expanded .portletbodyRightBottom { | ||
| 668 | - display: block; | ||
| 669 | -} | ||
| 670 | - | ||
| 671 | - | ||
| 672 | -#portletbar .portlet.expanded .portletbodyRightMiddleTop { | ||
| 673 | - display: block; | ||
| 674 | -} | ||
| 675 | - | ||
| 676 | -#portletbar .portlet.expanded .portletbodyRightMiddleBottom { | ||
| 677 | - display: block; | ||
| 678 | -} | ||
| 679 | - | ||
| 680 | -#portletbar .portlet.expanded .portletbodyRightQuartTop { | ||
| 681 | - display: block; | ||
| 682 | -} | ||
| 683 | - | ||
| 684 | -#portletbar .portlet.expanded .portletbodyRightQuartBottom { | ||
| 685 | - display: block; | ||
| 686 | -} | ||
| 687 | - | ||
| 688 | - | ||
| 689 | #portletbar .portlet .actionlist | 311 | #portletbar .portlet .actionlist |
| 690 | { | 312 | { |
| 691 | list-style: none; | 313 | list-style: none; |
| @@ -709,12 +331,11 @@ a.main_nav_item { | @@ -709,12 +331,11 @@ a.main_nav_item { | ||
| 709 | 331 | ||
| 710 | #content | 332 | #content |
| 711 | { | 333 | { |
| 712 | - position: relative; | ||
| 713 | display: block; | 334 | display: block; |
| 714 | top: 0; | 335 | top: 0; |
| 715 | z-index: 1; | 336 | z-index: 1; |
| 716 | width:auto; | 337 | width:auto; |
| 717 | - padding: 0 2em 1em 17em; | 338 | + padding: 0 2em 1em 0; |
| 718 | } | 339 | } |
| 719 | 340 | ||
| 720 | #content.view.withviewlets { | 341 | #content.view.withviewlets { |
| @@ -778,11 +399,6 @@ a.main_nav_item { | @@ -778,11 +399,6 @@ a.main_nav_item { | ||
| 778 | margin-bottom: 1em; | 399 | margin-bottom: 1em; |
| 779 | } | 400 | } |
| 780 | 401 | ||
| 781 | - | ||
| 782 | - | ||
| 783 | - | ||
| 784 | - | ||
| 785 | - | ||
| 786 | /* ----------------------- forms ---------------------------- */ | 402 | /* ----------------------- forms ---------------------------- */ |
| 787 | 403 | ||
| 788 | #content fieldset | 404 | #content fieldset |
| @@ -917,6 +533,7 @@ a.main_nav_item { | @@ -917,6 +533,7 @@ a.main_nav_item { | ||
| 917 | { | 533 | { |
| 918 | font-family: "Lucida Grande", "Bitstream Vera Sans", Tahoma, sans-serif; | 534 | font-family: "Lucida Grande", "Bitstream Vera Sans", Tahoma, sans-serif; |
| 919 | padding-bottom: 0.25em; | 535 | padding-bottom: 0.25em; |
| 536 | + margin-top: 0; | ||
| 920 | border-width: 0 0 0 0; | 537 | border-width: 0 0 0 0; |
| 921 | border-style: solid; | 538 | border-style: solid; |
| 922 | border-color: #eee; | 539 | border-color: #eee; |
| @@ -1127,7 +744,6 @@ a.main_nav_item { | @@ -1127,7 +744,6 @@ a.main_nav_item { | ||
| 1127 | white-space: normal !important; | 744 | white-space: normal !important; |
| 1128 | } | 745 | } |
| 1129 | 746 | ||
| 1130 | - | ||
| 1131 | .centered, .kt_collection thead th.centered { text-align: center; } | 747 | .centered, .kt_collection thead th.centered { text-align: center; } |
| 1132 | .centered .ktAction { margin-left: auto; margin-right: auto; width: 100%; background-position: top center;} | 748 | .centered .ktAction { margin-left: auto; margin-right: auto; width: 100%; background-position: top center;} |
| 1133 | 749 | ||
| @@ -1185,37 +801,85 @@ a.main_nav_item { | @@ -1185,37 +801,85 @@ a.main_nav_item { | ||
| 1185 | 801 | ||
| 1186 | /* block level. */ | 802 | /* block level. */ |
| 1187 | .ktError { | 803 | .ktError { |
| 1188 | - padding: 0.1em 1em; | ||
| 1189 | - margin: 1em 0 0 0.5em; | 804 | + background: #ffdd80 url(../../resources/graphics/error_toprepeat.png) top left repeat-x; |
| 805 | + border: 1px solid #FFC21E; | ||
| 806 | + margin: 20px auto; | ||
| 807 | +} | ||
| 808 | + | ||
| 809 | +.ktErrorMessage { | ||
| 810 | + background-color: #ffdd80; | ||
| 811 | + border: 1px solid #FFC21E; | ||
| 812 | + margin: 20px auto; | ||
| 813 | +} | ||
| 814 | + | ||
| 815 | +.ktErrorMessage p { | ||
| 816 | + margin-left: 20px; | ||
| 817 | + padding-left: 25px; | ||
| 818 | + background: #ffdd80 url(../../thirdparty/icon-theme/16x16/status/dialog-warning.png) center left no-repeat; | ||
| 819 | +} | ||
| 820 | + | ||
| 821 | +.ktErrorMessage span { | ||
| 822 | + margin-left: 20px; | ||
| 823 | + padding-left: 25px; | ||
| 824 | + background: #ffdd80 url(../../thirdparty/icon-theme/16x16/status/dialog-warning.png) center left no-repeat; | ||
| 1190 | } | 825 | } |
| 1191 | 826 | ||
| 1192 | .ktError p { | 827 | .ktError p { |
| 828 | + margin-left: 20px; | ||
| 829 | + padding-left: 25px; | ||
| 830 | + background: #ffdd80 url(../../thirdparty/icon-theme/16x16/status/dialog-warning.png) center left no-repeat; | ||
| 831 | +} | ||
| 832 | + | ||
| 833 | +.ktError span { | ||
| 834 | + margin-left: 20px; | ||
| 1193 | padding-left: 25px; | 835 | padding-left: 25px; |
| 1194 | background: #ffdd80 url(../../thirdparty/icon-theme/16x16/status/dialog-warning.png) center left no-repeat; | 836 | background: #ffdd80 url(../../thirdparty/icon-theme/16x16/status/dialog-warning.png) center left no-repeat; |
| 1195 | - margin-top: 20px; | ||
| 1196 | } | 837 | } |
| 1197 | 838 | ||
| 1198 | /* block level. */ | 839 | /* block level. */ |
| 1199 | .ktInfo { | 840 | .ktInfo { |
| 1200 | - padding: 0.1em 1em; | ||
| 1201 | - margin: 1em 0 0 0.5em; | 841 | + background: #DEDEDE url(../../resources/graphics/info_toprepeat.png) top left repeat-x; |
| 842 | + border: 1px solid #C5C5C5; | ||
| 843 | + margin: 20px auto; | ||
| 844 | +} | ||
| 845 | + | ||
| 846 | +.ktInfoMessage{ | ||
| 847 | + background-color: #DEDEDE; | ||
| 848 | + border: 1px solid #C5C5C5; | ||
| 849 | + margin: 20px auto; | ||
| 1202 | } | 850 | } |
| 1203 | 851 | ||
| 1204 | .ktInfo p { | 852 | .ktInfo p { |
| 853 | + margin-left: 20px; | ||
| 1205 | padding-left: 25px; | 854 | padding-left: 25px; |
| 1206 | background: #DEDEDE url(../../thirdparty/icon-theme/16x16/status/dialog-information.png) center left no-repeat; | 855 | background: #DEDEDE url(../../thirdparty/icon-theme/16x16/status/dialog-information.png) center left no-repeat; |
| 1207 | - margin-top: 20px; | ||
| 1208 | } | 856 | } |
| 1209 | 857 | ||
| 858 | +.ktInfoMessage p { | ||
| 859 | + margin-left: 20px; | ||
| 860 | + padding-left: 25px; | ||
| 861 | + background: #DEDEDE url(../../thirdparty/icon-theme/16x16/status/dialog-information.png) center left no-repeat; | ||
| 862 | +} | ||
| 1210 | 863 | ||
| 1211 | -.ktBlock { | ||
| 1212 | - position: relative; | ||
| 1213 | - padding: 0.1em 1em; | ||
| 1214 | - margin: 1em 0 0 0.5em; | 864 | +.ktInfo span { |
| 865 | + margin-left: 20px; | ||
| 866 | + padding-left: 25px; | ||
| 867 | + background: #DEDEDE url(../../thirdparty/icon-theme/16x16/status/dialog-information.png) center left no-repeat; | ||
| 1215 | } | 868 | } |
| 1216 | 869 | ||
| 870 | +.ktInfoMessage span { | ||
| 871 | + margin-left: 20px; | ||
| 872 | + padding-left: 25px; | ||
| 873 | + background: #DEDEDE url(../../thirdparty/icon-theme/16x16/status/dialog-information.png) center left no-repeat; | ||
| 874 | +} | ||
| 1217 | 875 | ||
| 1218 | -.ktInfo, .ktError { | 876 | +.ktBlock { |
| 877 | + background: #ffffff url(../../resources/graphics/dashlet_toprepeat.png) top left repeat-x; | ||
| 878 | + border: 1px solid #C5C5C5; | ||
| 879 | + margin: 20px auto; | ||
| 880 | +} | ||
| 881 | + | ||
| 882 | +.ktBlock, .ktInfo, .ktError, .ktInfoMessage, .ktErrorMessage{ | ||
| 1219 | position: relative; | 883 | position: relative; |
| 1220 | } | 884 | } |
| 1221 | 885 | ||
| @@ -1262,7 +926,7 @@ Use them as follows: | @@ -1262,7 +926,7 @@ Use them as follows: | ||
| 1262 | 926 | ||
| 1263 | The text will be hidden for screen view. The generic fahrner-ish approach comes from Plone | 927 | The text will be hidden for screen view. The generic fahrner-ish approach comes from Plone |
| 1264 | 928 | ||
| 1265 | - */ | 929 | +*/ |
| 1266 | 930 | ||
| 1267 | 931 | ||
| 1268 | .ktAction { | 932 | .ktAction { |
| @@ -1327,7 +991,6 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes | @@ -1327,7 +991,6 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes | ||
| 1327 | .ktActionLink.ktDenied, .ktAction.ktDenied { background-image: url(../../resources/graphics/denied.png); } | 991 | .ktActionLink.ktDenied, .ktAction.ktDenied { background-image: url(../../resources/graphics/denied.png); } |
| 1328 | .ktActionLink.ktMoveUp, .ktAction.ktMoveUp { background-image: url(../../thirdparty/icon-theme/16x16/actions/move-up.png); } | 992 | .ktActionLink.ktMoveUp, .ktAction.ktMoveUp { background-image: url(../../thirdparty/icon-theme/16x16/actions/move-up.png); } |
| 1329 | .ktActionLink.ktMoveDown, .ktAction.ktMoveDown { background-image: url(../../thirdparty/icon-theme/16x16/actions/move-down.png); } | 993 | .ktActionLink.ktMoveDown, .ktAction.ktMoveDown { background-image: url(../../thirdparty/icon-theme/16x16/actions/move-down.png); } |
| 1330 | -/*.ktActionLink.ktInfo, .ktAction.ktInfo { background-image: url(../graphics/info.png); }*/ | ||
| 1331 | 994 | ||
| 1332 | /* this is sometimes used separately to get the auto-delete help. */ | 995 | /* this is sometimes used separately to get the auto-delete help. */ |
| 1333 | .ktDelete { } | 996 | .ktDelete { } |
| @@ -1362,6 +1025,8 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes | @@ -1362,6 +1025,8 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes | ||
| 1362 | padding-bottom: 2em; | 1025 | padding-bottom: 2em; |
| 1363 | height: 100%; | 1026 | height: 100%; |
| 1364 | min-height: 5em; | 1027 | min-height: 5em; |
| 1028 | + padding-left: 20px; | ||
| 1029 | + padding-top: 25px; | ||
| 1365 | /* background-color: #dfd; */ | 1030 | /* background-color: #dfd; */ |
| 1366 | } | 1031 | } |
| 1367 | 1032 | ||
| @@ -1373,135 +1038,10 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes | @@ -1373,135 +1038,10 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes | ||
| 1373 | padding-bottom: 2em; | 1038 | padding-bottom: 2em; |
| 1374 | height: 100%; | 1039 | height: 100%; |
| 1375 | min-height: 5em; | 1040 | min-height: 5em; |
| 1041 | + padding-top: 25px; | ||
| 1376 | /* background-color: #ddf; */ | 1042 | /* background-color: #ddf; */ |
| 1377 | } | 1043 | } |
| 1378 | 1044 | ||
| 1379 | -.dashboard_block_topleft { | ||
| 1380 | - position: absolute; | ||
| 1381 | - width: 35px; | ||
| 1382 | - height: 36px; | ||
| 1383 | - top: 0px; | ||
| 1384 | - left: 0px; | ||
| 1385 | - background: url(../graphics/dashlet_topleft.png) top left no-repeat; | ||
| 1386 | - z-index:-1; | ||
| 1387 | -} | ||
| 1388 | - | ||
| 1389 | -.dashboard_block_toprepeat { | ||
| 1390 | - position: absolute; | ||
| 1391 | - width: 90%; | ||
| 1392 | - height: 36px; | ||
| 1393 | - top: 0px; | ||
| 1394 | - left: 30px; | ||
| 1395 | - background: white url(../graphics/dashlet_toprepeat.png) top left repeat-x; | ||
| 1396 | - z-index:-1; | ||
| 1397 | -} | ||
| 1398 | - | ||
| 1399 | -.dashboard_block_topright { | ||
| 1400 | - position: absolute; | ||
| 1401 | - width: 35px; | ||
| 1402 | - height: 36px; | ||
| 1403 | - top: 0px; | ||
| 1404 | - right: 0px; | ||
| 1405 | - background: url(../graphics/dashlet_topright.png) top right no-repeat; | ||
| 1406 | - z-index:-1; | ||
| 1407 | -} | ||
| 1408 | - | ||
| 1409 | -.dashboard_block_leftrepeat_top { | ||
| 1410 | - position: absolute; | ||
| 1411 | - width: 13px; | ||
| 1412 | - height: 50%; | ||
| 1413 | - top: 5px; | ||
| 1414 | - left: 0px; | ||
| 1415 | - background: white url(../graphics/dashlet_leftrepeat.png) top left repeat-y; | ||
| 1416 | - z-index:-1; | ||
| 1417 | -} | ||
| 1418 | - | ||
| 1419 | -.dashboard_block_leftrepeat_bottom { | ||
| 1420 | - position: absolute; | ||
| 1421 | - width: 13px; | ||
| 1422 | - height: 50%; | ||
| 1423 | - bottom: 10px; | ||
| 1424 | - left: 0px; | ||
| 1425 | - background: white url(../graphics/dashlet_leftrepeat.png) top left repeat-y; | ||
| 1426 | - z-index:-1; | ||
| 1427 | -} | ||
| 1428 | - | ||
| 1429 | -.dashboard_block_bottomleft { | ||
| 1430 | - position: absolute; | ||
| 1431 | - width: 40px; | ||
| 1432 | - height: 40px; | ||
| 1433 | - bottom: 0px; | ||
| 1434 | - left: 0px; | ||
| 1435 | - background: url(../graphics/dashlet_bottomleft.png) bottom left no-repeat; | ||
| 1436 | - z-index:-1; | ||
| 1437 | -} | ||
| 1438 | - | ||
| 1439 | -.dashboard_block_bottomrepeat { | ||
| 1440 | - position: absolute; | ||
| 1441 | - width: 92%; | ||
| 1442 | - height: 13px; | ||
| 1443 | - bottom: 0px; | ||
| 1444 | - left: 30px; | ||
| 1445 | - background: white url(../graphics/dashlet_bottomrepeat.png) bottom left repeat-x; | ||
| 1446 | - z-index:-1; | ||
| 1447 | -} | ||
| 1448 | - | ||
| 1449 | -.dashboard_block_bottomright { | ||
| 1450 | - position: absolute; | ||
| 1451 | - width: 40px; | ||
| 1452 | - height: 40px; | ||
| 1453 | - bottom: 0px; | ||
| 1454 | - right: 0px; | ||
| 1455 | - background: url(../graphics/dashlet_bottomright.png) bottom right no-repeat; | ||
| 1456 | - z-index:-1; | ||
| 1457 | -} | ||
| 1458 | - | ||
| 1459 | -.dashboard_block_rightrepeat_top { | ||
| 1460 | - position: absolute; | ||
| 1461 | - width: 13px; | ||
| 1462 | - height: 50%; | ||
| 1463 | - top: 5px; | ||
| 1464 | - right: 0px; | ||
| 1465 | - background: white url(../graphics/dashlet_rightrepeat.png) top right repeat-y; | ||
| 1466 | - z-index:-1; | ||
| 1467 | - overflow:hidden; | ||
| 1468 | -} | ||
| 1469 | - | ||
| 1470 | -.dashboard_block_rightrepeat_bottom { | ||
| 1471 | - position: absolute; | ||
| 1472 | - width: 13px; | ||
| 1473 | - height: 50%; | ||
| 1474 | - bottom: 10px; | ||
| 1475 | - right: 0px; | ||
| 1476 | - background: white url(../graphics/dashlet_rightrepeat.png) bottom right repeat-y; | ||
| 1477 | - z-index:-1; | ||
| 1478 | - overflow:hidden; | ||
| 1479 | -} | ||
| 1480 | - | ||
| 1481 | -.dashboard_block_rightrepeat_top { | ||
| 1482 | - min-height: 70px; | ||
| 1483 | -} | ||
| 1484 | - | ||
| 1485 | -.dashboard_block.rolled-up .dashboard_block_rightrepeat_top | ||
| 1486 | -{ | ||
| 1487 | - display: none; | ||
| 1488 | -} | ||
| 1489 | - | ||
| 1490 | -.dashboard_block.rolled-up .dashboard_block_rightrepeat_bottom | ||
| 1491 | -{ | ||
| 1492 | - display: none; | ||
| 1493 | -} | ||
| 1494 | - | ||
| 1495 | -.dashboard_block.rolled-up .dashboard_block_leftrepeat_top | ||
| 1496 | -{ | ||
| 1497 | - display: none; | ||
| 1498 | -} | ||
| 1499 | - | ||
| 1500 | -.dashboard_block.rolled-up .dashboard_block_leftrepeat_bottom | ||
| 1501 | -{ | ||
| 1502 | - display: none; | ||
| 1503 | -} | ||
| 1504 | - | ||
| 1505 | .dashboard_block { | 1045 | .dashboard_block { |
| 1506 | width: 100%; | 1046 | width: 100%; |
| 1507 | } | 1047 | } |
| @@ -1510,460 +1050,11 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes | @@ -1510,460 +1050,11 @@ The text will be hidden for screen view. The generic fahrner-ish approach comes | ||
| 1510 | border:none; | 1050 | border:none; |
| 1511 | } | 1051 | } |
| 1512 | 1052 | ||
| 1513 | -.error_dashlet_topleft { | ||
| 1514 | - position: absolute; | ||
| 1515 | - width: 35px; | ||
| 1516 | - height: 36px; | ||
| 1517 | - top: 0px; | ||
| 1518 | - left: 0px; | ||
| 1519 | - background: url(../graphics/error_topleft.png) top left no-repeat; | ||
| 1520 | - z-index:-1; | ||
| 1521 | -} | ||
| 1522 | - | ||
| 1523 | -.error_dashlet_topleft_small { | ||
| 1524 | - position: absolute; | ||
| 1525 | - width: 35px; | ||
| 1526 | - height: 22px; | ||
| 1527 | - top: 0px; | ||
| 1528 | - left: 0px; | ||
| 1529 | - background: url(../graphics/error_topleft_small.png) top left no-repeat; | ||
| 1530 | - z-index:-1; | ||
| 1531 | -} | ||
| 1532 | - | ||
| 1533 | -.error_dashlet_toprepeat { | ||
| 1534 | - position: absolute; | ||
| 1535 | - width: 95%; | ||
| 1536 | - height: 55px; | ||
| 1537 | - top: 0px; | ||
| 1538 | - left: 13px; | ||
| 1539 | - background: #ffdd80 url(../graphics/error_toprepeat.png) top left repeat-x; | ||
| 1540 | - z-index:-1; | ||
| 1541 | -} | ||
| 1542 | - | ||
| 1543 | -.error_dashlet_toprepeat_small { | ||
| 1544 | - position: absolute; | ||
| 1545 | - width: 97%; | ||
| 1546 | - height: 21px; | ||
| 1547 | - top: 0px; | ||
| 1548 | - left: 13px; | ||
| 1549 | - background: #ffdd80 url(../graphics/error_toprepeat.png) bottom left repeat-x; | ||
| 1550 | - z-index:-1; | ||
| 1551 | - border-top: 1px solid #FFC21E; | ||
| 1552 | -} | ||
| 1553 | - | ||
| 1554 | -.error_dashlet_topright { | ||
| 1555 | - position: absolute; | ||
| 1556 | - width: 35px; | ||
| 1557 | - height: 36px; | ||
| 1558 | - top: 0px; | ||
| 1559 | - right: 0px; | ||
| 1560 | - background: url(../graphics/error_topright.png) top right no-repeat; | ||
| 1561 | - z-index:-1; | ||
| 1562 | -} | ||
| 1563 | - | ||
| 1564 | -.error_dashlet_topright_small { | ||
| 1565 | - position: absolute; | ||
| 1566 | - width: 35px; | ||
| 1567 | - height: 22px; | ||
| 1568 | - top: 0px; | ||
| 1569 | - right: 0px; | ||
| 1570 | - background: url(../graphics/error_topright_small.png) top right no-repeat; | ||
| 1571 | - z-index:-1; | ||
| 1572 | -} | ||
| 1573 | - | ||
| 1574 | -.error_dashlet_leftrepeat_top { | ||
| 1575 | - position: absolute; | ||
| 1576 | - width: 13px; | ||
| 1577 | - height: 50%; | ||
| 1578 | - top: 5px; | ||
| 1579 | - left: 0px; | ||
| 1580 | - background: #ffdd80 url(../graphics/error_leftrepeat.png) top left repeat-y; | ||
| 1581 | - z-index:-1; | ||
| 1582 | -} | ||
| 1583 | - | ||
| 1584 | -.error_dashlet_leftrepeat_bottom { | ||
| 1585 | - position: absolute; | ||
| 1586 | - width: 13px; | ||
| 1587 | - height: 50%; | ||
| 1588 | - bottom: 10px; | ||
| 1589 | - left: 0px; | ||
| 1590 | - background: #ffdd80 url(../graphics/error_leftrepeat.png) top left repeat-y; | ||
| 1591 | - z-index:-1; | ||
| 1592 | -} | ||
| 1593 | - | ||
| 1594 | -.error_dashlet_bottomleft { | ||
| 1595 | - position: absolute; | ||
| 1596 | - width: 40px; | ||
| 1597 | - height: 45px; | ||
| 1598 | - bottom: 0px; | ||
| 1599 | - left: 0px; | ||
| 1600 | - background: url(../graphics/error_bottomleft.png) bottom left no-repeat; | ||
| 1601 | - z-index:-1; | ||
| 1602 | -} | ||
| 1603 | - | ||
| 1604 | -.error_dashlet_bottomrepeat { | ||
| 1605 | - position: absolute; | ||
| 1606 | - width: 95%; | ||
| 1607 | - height: 30px; | ||
| 1608 | - bottom: 0px; | ||
| 1609 | - left: 10x; | ||
| 1610 | - background: #ffdd80 url(../graphics/error_bottomrepeat.png) bottom left repeat-x; | ||
| 1611 | - z-index:-1; | ||
| 1612 | -} | ||
| 1613 | - | ||
| 1614 | -.error_dashlet_bottomrepeat_small { | ||
| 1615 | - position: absolute; | ||
| 1616 | - width: 97%; | ||
| 1617 | - height: 21px; | ||
| 1618 | - bottom: 0px; | ||
| 1619 | - left: 10x; | ||
| 1620 | - background: #ffdd80 url(../graphics/error_bottomrepeat.png) bottom left repeat-x; | ||
| 1621 | - z-index:-1; | ||
| 1622 | -} | ||
| 1623 | - | ||
| 1624 | -.error_dashlet_bottomright { | ||
| 1625 | - position: absolute; | ||
| 1626 | - width: 40px; | ||
| 1627 | - height: 40px; | ||
| 1628 | - bottom: 0px; | ||
| 1629 | - right: 0px; | ||
| 1630 | - background: url(../graphics/error_bottomright.png) bottom right no-repeat; | ||
| 1631 | - z-index:-1; | ||
| 1632 | -} | ||
| 1633 | - | ||
| 1634 | -.error_dashlet_rightrepeat_top { | ||
| 1635 | - position: absolute; | ||
| 1636 | - width: 30px; | ||
| 1637 | - height: 50%; | ||
| 1638 | - top: 5px; | ||
| 1639 | - right: 0px; | ||
| 1640 | - background: #ffdd80 url(../graphics/error_rightrepeat.png) top right repeat-y; | ||
| 1641 | - z-index:-1; | ||
| 1642 | - overflow:hidden; | ||
| 1643 | -} | ||
| 1644 | - | ||
| 1645 | -.error_dashlet_rightrepeat_bottom { | ||
| 1646 | - position: absolute; | ||
| 1647 | - width: 30px; | ||
| 1648 | - height: 50%; | ||
| 1649 | - bottom: 10px; | ||
| 1650 | - right: 0px; | ||
| 1651 | - background: #ffdd80 url(../graphics/error_rightrepeat.png) bottom right repeat-y; | ||
| 1652 | - z-index:-1; | ||
| 1653 | - overflow:hidden; | ||
| 1654 | -} | ||
| 1655 | - | ||
| 1656 | -.error_dashlet_rightrepeat_top { | ||
| 1657 | - min-height: 70px; | ||
| 1658 | -} | ||
| 1659 | - | ||
| 1660 | -.dashboard_block.rolled-up .error_dashlet_toprepeat | ||
| 1661 | -{ | ||
| 1662 | - height: 38px; | ||
| 1663 | -} | ||
| 1664 | - | ||
| 1665 | -.dashboard_block.rolled-up .error_dashlet_bottomrepeat | ||
| 1666 | -{ | ||
| 1667 | - height: 20px; | ||
| 1668 | -} | ||
| 1669 | - | ||
| 1670 | -.dashboard_block.rolled-up .error_dashlet_rightrepeat_top | ||
| 1671 | -{ | ||
| 1672 | - display: none; | ||
| 1673 | -} | ||
| 1674 | - | ||
| 1675 | -.dashboard_block.rolled-up .error_dashlet_rightrepeat_bottom | ||
| 1676 | -{ | ||
| 1677 | - display: none; | ||
| 1678 | -} | ||
| 1679 | - | ||
| 1680 | -.dashboard_block.rolled-up .error_dashlet_leftrepeat_top | ||
| 1681 | -{ | ||
| 1682 | - display: none; | ||
| 1683 | -} | ||
| 1684 | - | ||
| 1685 | -.dashboard_block.rolled-up .error_dashlet_leftrepeat_bottom | ||
| 1686 | -{ | ||
| 1687 | - display: none; | ||
| 1688 | -} | ||
| 1689 | - | ||
| 1690 | -.info_dashlet_topleft { | ||
| 1691 | - position: absolute; | ||
| 1692 | - width: 35px; | ||
| 1693 | - height: 36px; | ||
| 1694 | - top: 0px; | ||
| 1695 | - left: 0px; | ||
| 1696 | - background: url(../graphics/info_topleft.png) top left no-repeat; | ||
| 1697 | - z-index:-1; | ||
| 1698 | -} | ||
| 1699 | - | ||
| 1700 | -.info_dashlet_topleft_small { | ||
| 1701 | - position: absolute; | ||
| 1702 | - width: 35px; | ||
| 1703 | - height: 22px; | ||
| 1704 | - top: 0px; | ||
| 1705 | - left: 0px; | ||
| 1706 | - background: url(../graphics/info_topleft_small.png) top left no-repeat; | ||
| 1707 | - z-index:-1; | ||
| 1708 | -} | ||
| 1709 | - | ||
| 1710 | -.info_dashlet_toprepeat { | ||
| 1711 | - position: absolute; | ||
| 1712 | - width: 95%; | ||
| 1713 | - height: 55px; | ||
| 1714 | - top: 0px; | ||
| 1715 | - left: 13px; | ||
| 1716 | - background: #DEDEDE url(../graphics/info_toprepeat.png) top left repeat-x; | ||
| 1717 | - z-index:-1; | ||
| 1718 | -} | ||
| 1719 | - | ||
| 1720 | -.info_dashlet_toprepeat_small { | ||
| 1721 | - position: absolute; | ||
| 1722 | - width: 97%; | ||
| 1723 | - height: 21px; | ||
| 1724 | - top: 0px; | ||
| 1725 | - left: 13px; | ||
| 1726 | - background: #DEDEDE url(../graphics/info_toprepeat.png) bottom left repeat-x; | ||
| 1727 | - z-index:-1; | ||
| 1728 | - border-top: 1px solid #C5C5C5; | ||
| 1729 | -} | ||
| 1730 | - | ||
| 1731 | -.info_dashlet_topright { | ||
| 1732 | - position: absolute; | ||
| 1733 | - width: 35px; | ||
| 1734 | - height: 36px; | ||
| 1735 | - top: 0px; | ||
| 1736 | - right: 0px; | ||
| 1737 | - background: url(../graphics/info_topright.png) top right no-repeat; | ||
| 1738 | - z-index:-1; | ||
| 1739 | -} | ||
| 1740 | - | ||
| 1741 | -.info_dashlet_topright_small { | ||
| 1742 | - position: absolute; | ||
| 1743 | - width: 35px; | ||
| 1744 | - height: 22px; | ||
| 1745 | - top: 0px; | ||
| 1746 | - right: 0px; | ||
| 1747 | - background: url(../graphics/info_topright_small.png) top right no-repeat; | ||
| 1748 | - z-index:-1; | ||
| 1749 | -} | ||
| 1750 | - | ||
| 1751 | -.info_dashlet_leftrepeat_top { | ||
| 1752 | - position: absolute; | ||
| 1753 | - width: 13px; | ||
| 1754 | - height: 50%; | ||
| 1755 | - top: 5px; | ||
| 1756 | - left: 0px; | ||
| 1757 | - background: #DEDEDE url(../graphics/info_leftrepeat.png) top left repeat-y; | ||
| 1758 | - z-index:-1; | ||
| 1759 | -} | ||
| 1760 | - | ||
| 1761 | -.info_dashlet_leftrepeat_bottom { | ||
| 1762 | - position: absolute; | ||
| 1763 | - width: 13px; | ||
| 1764 | - height: 50%; | ||
| 1765 | - bottom: 10px; | ||
| 1766 | - left: 0px; | ||
| 1767 | - background: #DEDEDE url(../graphics/info_leftrepeat.png) top left repeat-y; | ||
| 1768 | - z-index:-1; | ||
| 1769 | -} | ||
| 1770 | - | ||
| 1771 | -.info_dashlet_bottomleft { | ||
| 1772 | - position: absolute; | ||
| 1773 | - width: 40px; | ||
| 1774 | - height: 45px; | ||
| 1775 | - bottom: 0px; | ||
| 1776 | - left: 0px; | ||
| 1777 | - background: url(../graphics/info_bottomleft.png) bottom left no-repeat; | ||
| 1778 | - z-index:-1; | ||
| 1779 | -} | ||
| 1780 | - | ||
| 1781 | -.info_dashlet_bottomrepeat { | ||
| 1782 | - position: absolute; | ||
| 1783 | - width: 95%; | ||
| 1784 | - height: 30px; | ||
| 1785 | - bottom: 0px; | ||
| 1786 | - left: 10x; | ||
| 1787 | - background: #DEDEDE url(../graphics/info_bottomrepeat.png) bottom left repeat-x; | ||
| 1788 | - z-index:-1; | ||
| 1789 | -} | ||
| 1790 | - | ||
| 1791 | -.info_dashlet_bottomrepeat_small { | ||
| 1792 | - position: absolute; | ||
| 1793 | - width: 97%; | ||
| 1794 | - height: 21px; | ||
| 1795 | - bottom: 0px; | ||
| 1796 | - left: 10x; | ||
| 1797 | - background: #DEDEDE url(../graphics/info_bottomrepeat.png) bottom left repeat-x; | ||
| 1798 | - z-index:-1; | ||
| 1799 | -} | ||
| 1800 | - | ||
| 1801 | -.info_dashlet_bottomright { | ||
| 1802 | - position: absolute; | ||
| 1803 | - width: 40px; | ||
| 1804 | - height: 40px; | ||
| 1805 | - bottom: 0px; | ||
| 1806 | - right: 0px; | ||
| 1807 | - background: url(../graphics/info_bottomright.png) bottom right no-repeat; | ||
| 1808 | - z-index:-1; | ||
| 1809 | -} | ||
| 1810 | - | ||
| 1811 | -.info_dashlet_rightrepeat_top { | ||
| 1812 | - position: absolute; | ||
| 1813 | - width: 30px; | ||
| 1814 | - height: 50%; | ||
| 1815 | - top: 5px; | ||
| 1816 | - right: 0px; | ||
| 1817 | - background: #DEDEDE url(../graphics/info_rightrepeat.png) top right repeat-y; | ||
| 1818 | - z-index:-1; | ||
| 1819 | - overflow:hidden; | ||
| 1820 | -} | ||
| 1821 | - | ||
| 1822 | -.info_dashlet_rightrepeat_bottom { | ||
| 1823 | - position: absolute; | ||
| 1824 | - width: 30px; | ||
| 1825 | - height: 50%; | ||
| 1826 | - bottom: 10px; | ||
| 1827 | - right: 0px; | ||
| 1828 | - background: #DEDEDE url(../graphics/info_rightrepeat.png) bottom right repeat-y; | ||
| 1829 | - z-index:-1; | ||
| 1830 | - overflow:hidden; | ||
| 1831 | -} | ||
| 1832 | - | ||
| 1833 | -.info_dashlet_rightrepeat_top { | ||
| 1834 | - min-height: 70px; | ||
| 1835 | -} | ||
| 1836 | - | ||
| 1837 | -.dashboard_block.rolled-up .info_dashlet_toprepeat | ||
| 1838 | -{ | ||
| 1839 | - height: 38px; | ||
| 1840 | -} | ||
| 1841 | - | ||
| 1842 | -.dashboard_block.rolled-up .info_dashlet_bottomrepeat | ||
| 1843 | -{ | ||
| 1844 | - height: 20px; | ||
| 1845 | -} | ||
| 1846 | - | ||
| 1847 | -.dashboard_block.rolled-up .info_dashlet_rightrepeat_top | ||
| 1848 | -{ | ||
| 1849 | - display: none; | ||
| 1850 | -} | ||
| 1851 | - | ||
| 1852 | -.dashboard_block.rolled-up .info_dashlet_rightrepeat_bottom | ||
| 1853 | -{ | ||
| 1854 | - display: none; | ||
| 1855 | -} | ||
| 1856 | - | ||
| 1857 | -.dashboard_block.rolled-up .info_dashlet_leftrepeat_top | ||
| 1858 | -{ | ||
| 1859 | - display: none; | ||
| 1860 | -} | ||
| 1861 | - | ||
| 1862 | -.dashboard_block.rolled-up .info_dashlet_leftrepeat_bottom | ||
| 1863 | -{ | ||
| 1864 | - display: none; | ||
| 1865 | -} | ||
| 1866 | - | ||
| 1867 | - | ||
| 1868 | #copyrightbarBorder { | 1053 | #copyrightbarBorder { |
| 1869 | - position: relative; | ||
| 1870 | - height: 62px; | ||
| 1871 | - width: 97.65%; | ||
| 1872 | - padding: 0em 1em; | ||
| 1873 | - margin-top: 10px; | ||
| 1874 | - margin: 0.5em 0 0.5em 0; | ||
| 1875 | -} | ||
| 1876 | - | ||
| 1877 | -#copyrightbarBg { | ||
| 1878 | - position: absolute; | ||
| 1879 | - background: url(../../resources/graphics/footer_bg.png) top left repeat-x; | ||
| 1880 | - height: 62px; | ||
| 1881 | - width: 99%; | ||
| 1882 | - right: 5px; | ||
| 1883 | - top: 0px; | ||
| 1884 | -} | ||
| 1885 | - | ||
| 1886 | -#copyrightbarLeft{ | ||
| 1887 | - position: absolute; | ||
| 1888 | - background: url(../../resources/graphics/footer_left.png) top left no-repeat; | ||
| 1889 | - width:8px; | ||
| 1890 | - height:62px; | ||
| 1891 | - top:0px; | ||
| 1892 | - left:3px; | ||
| 1893 | -} | ||
| 1894 | - | ||
| 1895 | -#copyrightbarRight{ | ||
| 1896 | - position: absolute; | ||
| 1897 | - background: url(../../resources/graphics/footer_right.png) top right no-repeat; | ||
| 1898 | - height:62px; | ||
| 1899 | - width:8px; | ||
| 1900 | - top:0px; | ||
| 1901 | - right:0px; | ||
| 1902 | -} | ||
| 1903 | - | ||
| 1904 | -#copyrightbar { | ||
| 1905 | - position: absolute; | ||
| 1906 | - top:10px; | ||
| 1907 | - left:20px; | ||
| 1908 | - color: #000000; | ||
| 1909 | - font-size: small; | ||
| 1910 | - height:62px; | ||
| 1911 | - width: 98%; | ||
| 1912 | - overflow: hidden; | ||
| 1913 | -} | ||
| 1914 | - | ||
| 1915 | -#copyrightbarBorderDisclaimer { | ||
| 1916 | - position: relative; | ||
| 1917 | - height: 82px; | ||
| 1918 | - width: 97.65%; | ||
| 1919 | - padding: 0em 1em; | ||
| 1920 | - margin-top: 10px; | ||
| 1921 | - margin: 0.5em 0 0.5em 0; | ||
| 1922 | -} | ||
| 1923 | - | ||
| 1924 | -#copyrightbarBgDisclaimer{ | ||
| 1925 | - position: absolute; | ||
| 1926 | - background: url(../../resources/graphics/footer_bg_disclaimer.png) top left repeat-x; | ||
| 1927 | - height: 100px; | ||
| 1928 | - width: 99%; | ||
| 1929 | - right: 5px; | ||
| 1930 | - top: 0px; | ||
| 1931 | -} | ||
| 1932 | - | ||
| 1933 | -#copyrightbarLeftDisclaimer{ | ||
| 1934 | - position: absolute; | ||
| 1935 | - background: url(../../resources/graphics/footer_left_disclaimer.png) top left no-repeat; | ||
| 1936 | - width:8px; | ||
| 1937 | - height:100px; | ||
| 1938 | - top:0px; | ||
| 1939 | - left:3px; | ||
| 1940 | -} | ||
| 1941 | - | ||
| 1942 | -#copyrightbarRightDisclaimer{ | ||
| 1943 | - position: absolute; | ||
| 1944 | - background: url(../../resources/graphics/footer_right_disclaimer.png) top right no-repeat; | ||
| 1945 | - height:100px; | ||
| 1946 | - width:8px; | ||
| 1947 | - top:0px; | ||
| 1948 | - right:0px; | ||
| 1949 | -} | ||
| 1950 | - | ||
| 1951 | -#copyrightbarDisclaimer { | ||
| 1952 | - position: absolute; | ||
| 1953 | - top:6px; | ||
| 1954 | - left:20px; | ||
| 1955 | - color: #000000; | ||
| 1956 | - font-size: small; | ||
| 1957 | - height:82px; | ||
| 1958 | - width: 98%; | ||
| 1959 | - overflow: hidden; | ||
| 1960 | -} | ||
| 1961 | - | ||
| 1962 | -.copyrightbarBorderLogo{ | ||
| 1963 | - position: absolute; | ||
| 1964 | - top:25px; | ||
| 1965 | - right:20px; | ||
| 1966 | - border: 0; | 1054 | + margin-top: 40px; |
| 1055 | + margin-bottom: 50px; | ||
| 1056 | + border: 1px solid #BBBBBB; | ||
| 1057 | + background-color: #D1D1D1; | ||
| 1967 | } | 1058 | } |
| 1968 | 1059 | ||
| 1969 | hr { | 1060 | hr { |
| @@ -1972,7 +1063,6 @@ hr { | @@ -1972,7 +1063,6 @@ hr { | ||
| 1972 | border-color: #888; | 1063 | border-color: #888; |
| 1973 | } | 1064 | } |
| 1974 | 1065 | ||
| 1975 | - | ||
| 1976 | #support-block { | 1066 | #support-block { |
| 1977 | width: 100%; | 1067 | width: 100%; |
| 1978 | height: 500px; | 1068 | height: 500px; |
| @@ -2162,23 +1252,21 @@ hr { | @@ -2162,23 +1252,21 @@ hr { | ||
| 2162 | padding: 0; | 1252 | padding: 0; |
| 2163 | } | 1253 | } |
| 2164 | 1254 | ||
| 2165 | - | ||
| 2166 | - | ||
| 2167 | /* -------------------------- dashboard ------------------------ */ | 1255 | /* -------------------------- dashboard ------------------------ */ |
| 2168 | 1256 | ||
| 2169 | .dashboard_block_icons | 1257 | .dashboard_block_icons |
| 2170 | { | 1258 | { |
| 2171 | position: absolute; | 1259 | position: absolute; |
| 2172 | top: 0px; | 1260 | top: 0px; |
| 2173 | - right: 10px; | 1261 | + right: 8px; |
| 2174 | text-align: right; | 1262 | text-align: right; |
| 2175 | - margin: 0.2em 0em 0 0; | 1263 | + margin: -2px 0 0 0; |
| 2176 | } | 1264 | } |
| 2177 | 1265 | ||
| 2178 | .dashboard_block_handle | 1266 | .dashboard_block_handle |
| 2179 | { | 1267 | { |
| 2180 | cursor: pointer; | 1268 | cursor: pointer; |
| 2181 | - margin: 0.2em -0.5em 0.5em 0; | 1269 | + margin: -2px -0.5em 0.5em 0.5em; |
| 2182 | font-size:small; | 1270 | font-size:small; |
| 2183 | } | 1271 | } |
| 2184 | 1272 | ||
| @@ -2192,19 +1280,22 @@ hr { | @@ -2192,19 +1280,22 @@ hr { | ||
| 2192 | z-index:99; | 1280 | z-index:99; |
| 2193 | margin: 8px 0 10px 0; | 1281 | margin: 8px 0 10px 0; |
| 2194 | background-color:#FFFFFF; | 1282 | background-color:#FFFFFF; |
| 1283 | + padding-left: 15px; | ||
| 1284 | + padding-right: 15px; | ||
| 1285 | + padding-bottom: 5px; | ||
| 2195 | } | 1286 | } |
| 2196 | 1287 | ||
| 2197 | .ktError .dashboard_block_body | 1288 | .ktError .dashboard_block_body |
| 2198 | { | 1289 | { |
| 2199 | z-index:99; | 1290 | z-index:99; |
| 2200 | - margin: 0; | 1291 | + margin-top: -8px; |
| 2201 | background-color: #ffdd80; | 1292 | background-color: #ffdd80; |
| 2202 | } | 1293 | } |
| 2203 | 1294 | ||
| 2204 | .ktInfo .dashboard_block_body | 1295 | .ktInfo .dashboard_block_body |
| 2205 | { | 1296 | { |
| 2206 | z-index:99; | 1297 | z-index:99; |
| 2207 | - margin: 0; | 1298 | + margin-top: -8px; |
| 2208 | background-color: #DEDEDE; | 1299 | background-color: #DEDEDE; |
| 2209 | } | 1300 | } |
| 2210 | 1301 | ||
| @@ -2251,8 +1342,6 @@ hr { | @@ -2251,8 +1342,6 @@ hr { | ||
| 2251 | padding-bottom: 10px; | 1342 | padding-bottom: 10px; |
| 2252 | } | 1343 | } |
| 2253 | 1344 | ||
| 2254 | - | ||
| 2255 | - | ||
| 2256 | #content .ktBlock h2 | 1345 | #content .ktBlock h2 |
| 2257 | { | 1346 | { |
| 2258 | border-bottom-width: 0px; | 1347 | border-bottom-width: 0px; |
| @@ -2315,4 +1404,4 @@ body #content #add_dashlet | @@ -2315,4 +1404,4 @@ body #content #add_dashlet | ||
| 2315 | font-weight: normal; | 1404 | font-weight: normal; |
| 2316 | float: right; | 1405 | float: right; |
| 2317 | margin-right: 3em; | 1406 | margin-right: 3em; |
| 2318 | -} | 1407 | -} |
| 1408 | +} | ||
| 2319 | \ No newline at end of file | 1409 | \ No newline at end of file |
resources/css/kt-ie-icons.css
| 1 | -.ktInfo p { background: transparent url(../../thirdparty/icon-theme/16x16/status/dialog-information.gif) center left no-repeat; } | ||
| 2 | -.ktError p { background: transparent url(../../thirdparty/icon-theme/16x16/status/dialog-warning.gif) center left no-repeat; } | ||
| 3 | .ktHelp { background: transparent url(../../thirdparty/icon-theme/16x16/apps/help-browser.gif) top left no-repeat; } | 1 | .ktHelp { background: transparent url(../../thirdparty/icon-theme/16x16/apps/help-browser.gif) top left no-repeat; } |
| 4 | .ktBlock { | 2 | .ktBlock { |
| 5 | - background-color: white; | ||
| 6 | - border: 1px solid #ccc; | ||
| 7 | - padding-left: 0em; | ||
| 8 | -} | ||
| 9 | - | ||
| 10 | -.ktInfo, .ktError { | ||
| 11 | - padding: 0.1em 1em; | ||
| 12 | - margin: 0.5em 0 0.5em 0em; | 3 | + background: #ffffff url(../../resources/graphics/dashlet_toprepeat.gif) top left repeat-x; |
| 4 | + border: 1px solid #C5C5C5; | ||
| 5 | + margin: 20px auto; | ||
| 13 | } | 6 | } |
| 14 | 7 | ||
| 15 | .ktActionLink.ktDelete, .ktAction.ktDelete { background-image: url(../../resources/graphics/delete.gif); } | 8 | .ktActionLink.ktDelete, .ktAction.ktDelete { background-image: url(../../resources/graphics/delete.gif); } |
| @@ -23,7 +16,6 @@ | @@ -23,7 +16,6 @@ | ||
| 23 | .ktActionLink.ktDenied, .ktAction.ktDenied { background-image: url(../../resources/graphics/denied.gif); } | 16 | .ktActionLink.ktDenied, .ktAction.ktDenied { background-image: url(../../resources/graphics/denied.gif); } |
| 24 | .ktActionLink.ktMoveUp, .ktAction.ktMoveUp { background-image: url(../../thirdparty/icon-theme/16x16/actions/move-up.gif); } | 17 | .ktActionLink.ktMoveUp, .ktAction.ktMoveUp { background-image: url(../../thirdparty/icon-theme/16x16/actions/move-up.gif); } |
| 25 | .ktActionLink.ktMoveDown, .ktAction.ktMoveDown { background-image: url(../../thirdparty/icon-theme/16x16/actions/move-down.gif); } | 18 | .ktActionLink.ktMoveDown, .ktAction.ktMoveDown { background-image: url(../../thirdparty/icon-theme/16x16/actions/move-down.gif); } |
| 26 | -.ktBlock {margin: 0.5em 0;} | ||
| 27 | .contenttype.office { background-image: url(../../resources/mimetypes/office.gif); } | 19 | .contenttype.office { background-image: url(../../resources/mimetypes/office.gif); } |
| 28 | .contenttype.word { background-image: url(../../resources/mimetypes/word.gif); } | 20 | .contenttype.word { background-image: url(../../resources/mimetypes/word.gif); } |
| 29 | .contenttype.database { background-image: url(../../resources/mimetypes/database.gif); } | 21 | .contenttype.database { background-image: url(../../resources/mimetypes/database.gif); } |
| @@ -53,11 +45,6 @@ | @@ -53,11 +45,6 @@ | ||
| 53 | height: 800px; | 45 | height: 800px; |
| 54 | } | 46 | } |
| 55 | 47 | ||
| 56 | -/* IE does not know what 100% is!! */ | ||
| 57 | -#copyrightbarBg { | ||
| 58 | - width: 101%; | ||
| 59 | -} | ||
| 60 | - | ||
| 61 | .floatClear | 48 | .floatClear |
| 62 | { | 49 | { |
| 63 | height: 1px !important; | 50 | height: 1px !important; |
| @@ -186,10 +173,6 @@ | @@ -186,10 +173,6 @@ | ||
| 186 | display: none; | 173 | display: none; |
| 187 | } | 174 | } |
| 188 | 175 | ||
| 189 | -.dashboard_block_handle { | ||
| 190 | - margin: 0.2em -0.5em 0.5em 1em; | ||
| 191 | -} | ||
| 192 | - | ||
| 193 | .ktBlock .dashboard_block_body | 176 | .ktBlock .dashboard_block_body |
| 194 | { | 177 | { |
| 195 | margin: 8px 0 10px 1em; | 178 | margin: 8px 0 10px 1em; |
resources/css/kt-login.css
| @@ -11,199 +11,45 @@ | @@ -11,199 +11,45 @@ | ||
| 11 | display: block; | 11 | display: block; |
| 12 | margin: 0.5em 0; | 12 | margin: 0.5em 0; |
| 13 | } | 13 | } |
| 14 | - | ||
| 15 | - #loginbox { | ||
| 16 | - position: relative; | 14 | + |
| 15 | + #loginbox_outer { | ||
| 16 | + position: relative; | ||
| 17 | padding: 1em; | 17 | padding: 1em; |
| 18 | - /*border: 1px solid #888;*/ | ||
| 19 | - width: 252px; | 18 | + border: 1px solid #B7B7B7; |
| 19 | + width: 280px; | ||
| 20 | margin-left: auto; | 20 | margin-left: auto; |
| 21 | margin-right: auto; | 21 | margin-right: auto; |
| 22 | + background-color: #FFFFFF; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + #loginbox_outer.hasDisclaimer { | ||
| 26 | + width: 580px; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + #loginbox { | ||
| 22 | text-align: left; | 30 | text-align: left; |
| 31 | + margin: 0 10px; | ||
| 23 | background: white url(../graphics/ktbg.png) bottom left no-repeat; | 32 | background: white url(../graphics/ktbg.png) bottom left no-repeat; |
| 24 | } | 33 | } |
| 25 | 34 | ||
| 26 | #loginbox_skin { | 35 | #loginbox_skin { |
| 27 | - position: relative; | ||
| 28 | - padding: 1em; | ||
| 29 | - /*border: 1px solid #888;*/ | ||
| 30 | - width: 252px; | ||
| 31 | - margin-left: auto; | ||
| 32 | - margin-right: auto; | ||
| 33 | text-align: left; | 36 | text-align: left; |
| 37 | + margin: 0 10px; | ||
| 34 | background: white url(../powered-by-kt.gif) bottom right no-repeat; | 38 | background: white url(../powered-by-kt.gif) bottom right no-repeat; |
| 35 | } | 39 | } |
| 36 | 40 | ||
| 37 | - #loginboxTopLeft { | ||
| 38 | - position: absolute; | ||
| 39 | - background: url(../graphics/login_corner_topleft.gif) top left no-repeat; | ||
| 40 | - top: 0; | ||
| 41 | - left: 0; | ||
| 42 | - width: 40px; | ||
| 43 | - height: 40px; | ||
| 44 | - } | ||
| 45 | - | ||
| 46 | - #loginboxTopMiddle { | ||
| 47 | - position: absolute; | ||
| 48 | - background: url(../graphics/login_border_repeat.png) top left repeat-x; | ||
| 49 | - top:0; | ||
| 50 | - left:35px; | ||
| 51 | - width: 230px; | ||
| 52 | - height: 3px; | ||
| 53 | - } | ||
| 54 | - | ||
| 55 | - #loginbox.hasDisclaimer #loginboxTopMiddle { | ||
| 56 | - position: absolute; | ||
| 57 | - background: url(../graphics/login_border_repeat.png) top left repeat-x; | ||
| 58 | - top:0; | ||
| 59 | - left:35px; | ||
| 60 | - width: 520px; | ||
| 61 | - height: 3px; | ||
| 62 | - } | ||
| 63 | - | ||
| 64 | - #loginbox_skin.hasDisclaimer #loginboxTopMiddle { | ||
| 65 | - position: absolute; | ||
| 66 | - background: url(../graphics/login_border_repeat.png) top left repeat-x; | ||
| 67 | - top:0; | ||
| 68 | - left:35px; | ||
| 69 | - width: 520px; | ||
| 70 | - height: 3px; | ||
| 71 | - } | ||
| 72 | - | ||
| 73 | - #loginboxTopRight { | ||
| 74 | - position: absolute; | ||
| 75 | - background: url(../graphics/login_corner_topright.gif) top right no-repeat; | ||
| 76 | - top:0; | ||
| 77 | - right:0; | ||
| 78 | - width: 40px; | ||
| 79 | - height: 40px; | ||
| 80 | - } | ||
| 81 | - | ||
| 82 | - #loginboxBottomLeft { | ||
| 83 | - position: absolute; | ||
| 84 | - background: url(../graphics/login_corner_bottomleft.gif) bottom left no-repeat; | ||
| 85 | - bottom:0; | ||
| 86 | - left:0; | ||
| 87 | - width: 40px; | ||
| 88 | - height: 40px; | ||
| 89 | - } | ||
| 90 | - | ||
| 91 | - #loginboxBottomMiddle { | ||
| 92 | - position: absolute; | ||
| 93 | - background: url(../graphics/login_border_bottom.png) bottom left repeat-x; | ||
| 94 | - bottom: 0; | ||
| 95 | - left: 35px; | ||
| 96 | - width: 230px; | ||
| 97 | - height: 3px; | ||
| 98 | - } | ||
| 99 | - | ||
| 100 | - #loginbox.hasDisclaimer #loginboxBottomMiddle { | ||
| 101 | - position: absolute; | ||
| 102 | - background: url(../graphics/login_border_bottom.png) bottom left repeat-x; | ||
| 103 | - bottom: 0; | ||
| 104 | - left: 35px; | ||
| 105 | - width: 520px; | ||
| 106 | - height: 3px; | ||
| 107 | - } | ||
| 108 | - | ||
| 109 | - #loginbox_skin.hasDisclaimer #loginboxBottomMiddle { | ||
| 110 | - position: absolute; | ||
| 111 | - background: url(../graphics/login_border_bottom.png) bottom left repeat-x; | ||
| 112 | - bottom: 0; | ||
| 113 | - left: 35px; | ||
| 114 | - width: 520px; | ||
| 115 | - height: 3px; | ||
| 116 | - } | ||
| 117 | - | ||
| 118 | - #loginboxBottomRight { | ||
| 119 | - position: absolute; | ||
| 120 | - background: url(../graphics/login_corner_bottomright.gif) bottom left no-repeat; | ||
| 121 | - bottom: 0; | ||
| 122 | - right: 0; | ||
| 123 | - width: 40px; | ||
| 124 | - height: 40px; | ||
| 125 | - } | ||
| 126 | - | ||
| 127 | - #loginboxLeftTop { | ||
| 128 | - position: absolute; | ||
| 129 | - background: url(../graphics/login_border_repeat.png) top left repeat-y; | ||
| 130 | - top: 35px; | ||
| 131 | - left: 0; | ||
| 132 | - width: 3px; | ||
| 133 | - height: 405px; | ||
| 134 | - } | ||
| 135 | - | ||
| 136 | - #loginbox.hasDisclaimer #loginboxLeftTop { | ||
| 137 | - height: 200px; | ||
| 138 | - } | ||
| 139 | - | ||
| 140 | - #loginbox_skin.hasDisclaimer #loginboxLeftTop { | ||
| 141 | - height: 200px; | ||
| 142 | - } | ||
| 143 | - | ||
| 144 | - #loginboxLeftBottom { | ||
| 145 | - position: absolute; | ||
| 146 | - background: url(../graphics/login_border_repeat.png) top left repeat-y; | ||
| 147 | - bottom: 35px; | ||
| 148 | - left: 0; | ||
| 149 | - width: 3px; | ||
| 150 | - height: 405px; | ||
| 151 | - } | ||
| 152 | - | ||
| 153 | - #loginbox.hasDisclaimer #loginboxLeftBottom { | ||
| 154 | - height: 250px; | ||
| 155 | - } | ||
| 156 | - | ||
| 157 | - #loginbox_skin.hasDisclaimer #loginboxLeftBottom { | ||
| 158 | - height: 250px; | ||
| 159 | - } | ||
| 160 | - | ||
| 161 | - #loginboxRightTop { | ||
| 162 | - position: absolute; | ||
| 163 | - background: url(../graphics/login_border_right.png) top right repeat-y; | ||
| 164 | - top: 35px; | ||
| 165 | - right: 0; | ||
| 166 | - width: 3px; | ||
| 167 | - height: 405px; | ||
| 168 | - } | ||
| 169 | - | ||
| 170 | - #loginbox.hasDisclaimer #loginboxRightTop { | ||
| 171 | - height: 250px; | ||
| 172 | - } | ||
| 173 | - | ||
| 174 | - #loginbox_skin.hasDisclaimer #loginboxRightTop { | ||
| 175 | - height: 250px; | ||
| 176 | - } | ||
| 177 | - | ||
| 178 | - #loginboxRightBottom { | ||
| 179 | - position: absolute; | ||
| 180 | - background: url(../graphics/login_border_right.png) top right repeat-y; | ||
| 181 | - bottom: 35px; | ||
| 182 | - right: 0; | ||
| 183 | - width: 3px; | ||
| 184 | - height: 405px; | ||
| 185 | - } | ||
| 186 | - | ||
| 187 | - #loginbox.hasDisclaimer #loginboxRightBottom { | ||
| 188 | - height: 200px; | ||
| 189 | - } | ||
| 190 | - | ||
| 191 | - #loginbox_skin.hasDisclaimer #loginboxRightBottom { | ||
| 192 | - height: 200px; | ||
| 193 | - } | ||
| 194 | - | ||
| 195 | #loginbox.hasDisclaimer { | 41 | #loginbox.hasDisclaimer { |
| 196 | background: white url(../graphics/ktbg.png) bottom left repeat-x; | 42 | background: white url(../graphics/ktbg.png) bottom left repeat-x; |
| 197 | - width: 564px; | ||
| 198 | } | 43 | } |
| 199 | 44 | ||
| 200 | #loginbox_skin.hasDisclaimer { | 45 | #loginbox_skin.hasDisclaimer { |
| 201 | background: white url(../graphics/ktbg.png) bottom left repeat-x; | 46 | background: white url(../graphics/ktbg.png) bottom left repeat-x; |
| 202 | - width: 564px; | ||
| 203 | } | 47 | } |
| 204 | 48 | ||
| 205 | #formbox { | 49 | #formbox { |
| 206 | - border: 0; padding: 0; margin: 0; | 50 | + border: 0; |
| 51 | + padding: 0; | ||
| 52 | + margin: 0; | ||
| 207 | width: 252px; | 53 | width: 252px; |
| 208 | float: left; | 54 | float: left; |
| 209 | } | 55 | } |
| @@ -228,6 +74,7 @@ | @@ -228,6 +74,7 @@ | ||
| 228 | 74 | ||
| 229 | #disclaimerbox p { | 75 | #disclaimerbox p { |
| 230 | margin-top: 0; | 76 | margin-top: 0; |
| 77 | + margin-left: 5px; | ||
| 231 | margin-bottom: 1em; | 78 | margin-bottom: 1em; |
| 232 | } | 79 | } |
| 233 | 80 | ||
| @@ -265,6 +112,7 @@ | @@ -265,6 +112,7 @@ | ||
| 265 | 112 | ||
| 266 | .descriptiveText | 113 | .descriptiveText |
| 267 | { | 114 | { |
| 115 | + margin-top: 5px; | ||
| 268 | color: #666; | 116 | color: #666; |
| 269 | clear: both; | 117 | clear: both; |
| 270 | } | 118 | } |
| @@ -280,17 +128,22 @@ | @@ -280,17 +128,22 @@ | ||
| 280 | } | 128 | } |
| 281 | 129 | ||
| 282 | /* block level. */ | 130 | /* block level. */ |
| 283 | -.ktError | ||
| 284 | -{ | ||
| 285 | - padding: 0 1em; | ||
| 286 | - border: 1px solid #ffc21e; | ||
| 287 | - margin: 0.5em 0; | ||
| 288 | - background: #ffdd80; | 131 | +.ktError { |
| 132 | + background: #ffdd80 url(../../resources/graphics/error_toprepeat.png) top left repeat-x; | ||
| 133 | + border: 1px solid #FFC21E; | ||
| 134 | + margin: 20px auto; | ||
| 289 | } | 135 | } |
| 290 | 136 | ||
| 291 | .ktError p { | 137 | .ktError p { |
| 138 | + margin-left: 20px; | ||
| 139 | + padding-left: 25px; | ||
| 140 | + background: #ffdd80 url(../../thirdparty/icon-theme/16x16/status/dialog-warning.png) center left no-repeat; | ||
| 141 | +} | ||
| 142 | + | ||
| 143 | +.ktError span { | ||
| 144 | + margin-left: 20px; | ||
| 292 | padding-left: 25px; | 145 | padding-left: 25px; |
| 293 | - background: transparent url(../../thirdparty/icon-theme/16x16/status/dialog-warning.png) center left no-repeat; | 146 | + background: #ffdd80 url(../../thirdparty/icon-theme/16x16/status/dialog-warning.png) center left no-repeat; |
| 294 | } | 147 | } |
| 295 | 148 | ||
| 296 | .floatClear | 149 | .floatClear |
resources/graphics/dashlet_toprepeat.png
resources/graphics/error_bottomleft.gif deleted
945 Bytes
resources/graphics/error_bottomleft.png deleted
277 Bytes
resources/graphics/error_bottomrepeat.gif deleted
809 Bytes
resources/graphics/error_bottomrepeat.png deleted
154 Bytes
resources/graphics/error_bottomright.gif deleted
980 Bytes
resources/graphics/error_bottomright.png deleted
365 Bytes
resources/graphics/error_leftrepeat.gif deleted
807 Bytes
resources/graphics/error_leftrepeat.png deleted
143 Bytes
resources/graphics/error_rightrepeat.gif deleted
809 Bytes
resources/graphics/error_rightrepeat.png deleted
131 Bytes
resources/graphics/error_topleft.gif deleted
1.16 KB
resources/graphics/error_topleft.png deleted
356 Bytes
resources/graphics/error_topleft_small.gif deleted
1.01 KB
resources/graphics/error_topleft_small.png deleted
279 Bytes
resources/graphics/error_toprepeat.gif deleted
846 Bytes
resources/graphics/error_toprepeat.png
resources/graphics/error_topright.gif deleted
1.18 KB
resources/graphics/error_topright.png deleted
432 Bytes
resources/graphics/error_topright_small.gif deleted
1.02 KB
resources/graphics/error_topright_small.png deleted
331 Bytes
resources/graphics/footer_bg.png deleted
200 Bytes
resources/graphics/footer_bg_disclaimer.png deleted
201 Bytes
resources/graphics/footer_left.png deleted
371 Bytes
resources/graphics/footer_left_disclaimer.png deleted
387 Bytes
resources/graphics/footer_right.png deleted
449 Bytes
resources/graphics/footer_right_disclaimer.png deleted
466 Bytes
resources/graphics/info_bottomleft.gif deleted
945 Bytes
resources/graphics/info_bottomleft.png deleted
272 Bytes
resources/graphics/info_bottomrepeat.gif deleted
809 Bytes
resources/graphics/info_bottomrepeat.png deleted
154 Bytes
resources/graphics/info_bottomright.gif deleted
980 Bytes
resources/graphics/info_bottomright.png deleted
358 Bytes
resources/graphics/info_leftrepeat.gif deleted
807 Bytes
resources/graphics/info_leftrepeat.png deleted
143 Bytes
resources/graphics/info_rightrepeat.gif deleted
809 Bytes
resources/graphics/info_rightrepeat.png deleted
130 Bytes
resources/graphics/info_topleft.gif deleted
1.13 KB
resources/graphics/info_topleft.png deleted
315 Bytes
resources/graphics/info_topleft_small.gif deleted
1017 Bytes
resources/graphics/info_topleft_small.png deleted
248 Bytes
resources/graphics/info_toprepeat.gif deleted
846 Bytes
resources/graphics/info_toprepeat.png
resources/graphics/info_topright.gif deleted
1.16 KB
resources/graphics/info_topright.png deleted
400 Bytes
resources/graphics/info_topright_small.gif deleted
1.01 KB
resources/graphics/info_topright_small.png deleted
306 Bytes
resources/graphics/page_border_bottomleft.gif deleted
183 Bytes
resources/graphics/page_border_bottomrepeat.gif deleted
57 Bytes
resources/graphics/page_border_bottomright.gif deleted
192 Bytes
resources/graphics/page_border_leftrepeat.gif deleted
45 Bytes
resources/graphics/page_border_rightborder.gif deleted
811 Bytes
resources/graphics/page_border_rightrepeat.gif deleted
44 Bytes
resources/graphics/page_border_topleft.gif deleted
225 Bytes
resources/graphics/page_border_toprepeat.gif deleted
38 Bytes
resources/graphics/page_border_topright.gif deleted
606 Bytes
resources/graphics/portlet_bg.gif
resources/graphics/portlet_bg.png
resources/graphics/portlet_bg_collapsed.gif
resources/graphics/portlet_bg_collapsed.png
resources/graphics/portlet_borderbottom.png deleted
190 Bytes
resources/graphics/portlet_borderrepeat.png deleted
179 Bytes
resources/graphics/portlet_borderright.png deleted
112 Bytes
resources/graphics/portlet_borderright_future.png deleted
188 Bytes
resources/graphics/portlet_corner_bottomleft.gif deleted
896 Bytes
resources/graphics/portlet_corner_bottomleft.png deleted
265 Bytes
resources/graphics/portlet_corner_bottomright.gif deleted
923 Bytes
resources/graphics/portlet_corner_bottomright.png deleted
301 Bytes
resources/graphics/portlet_corner_topleft.gif deleted
1.63 KB
resources/graphics/portlet_corner_topleft.png deleted
1.13 KB
resources/graphics/portlet_corner_topleft_collapsed.gif deleted
1.14 KB
resources/graphics/portlet_corner_topleft_collapsed.png deleted
518 Bytes
resources/graphics/portlet_corner_topright.gif deleted
1.27 KB
resources/graphics/portlet_corner_topright.png deleted
785 Bytes
resources/graphics/portlet_corner_topright_collapsed.gif deleted
958 Bytes
resources/graphics/portlet_corner_topright_collapsed.png deleted
299 Bytes
templates/kt3/dashboard.smarty
| 1 | <div id="dashboard-container-left"> | 1 | <div id="dashboard-container-left"> |
| 2 | {foreach item=oDashlet from=$dashlets_left} | 2 | {foreach item=oDashlet from=$dashlets_left} |
| 3 | <div class="dashboard_block" id="{$context->_getDashletId($oDashlet)}"> | 3 | <div class="dashboard_block" id="{$context->_getDashletId($oDashlet)}"> |
| 4 | - <div class="{$oDashlet->sClass}"> | ||
| 5 | - {if $oDashlet->sClass === "ktBlock"} | ||
| 6 | - <div class="dashboard_block_rightrepeat_top"></div> | ||
| 7 | - <div class="dashboard_block_rightrepeat_bottom"></div> | ||
| 8 | - <div class="dashboard_block_leftrepeat_top"></div> | ||
| 9 | - <div class="dashboard_block_leftrepeat_bottom"></div> | ||
| 10 | - {/if} | ||
| 11 | - | ||
| 12 | - {if $oDashlet->sClass === "ktError"} | ||
| 13 | - <div class="error_dashlet_rightrepeat_top"></div> | ||
| 14 | - <div class="error_dashlet_rightrepeat_bottom"></div> | ||
| 15 | - <div class="error_dashlet_leftrepeat_top"></div> | ||
| 16 | - <div class="error_dashlet_leftrepeat_bottom"></div> | ||
| 17 | - {/if} | ||
| 18 | - | ||
| 19 | - {if $oDashlet->sClass === "ktInfo"} | ||
| 20 | - <div class="info_dashlet_rightrepeat_top"></div> | ||
| 21 | - <div class="info_dashlet_rightrepeat_bottom"></div> | ||
| 22 | - <div class="info_dashlet_leftrepeat_top"></div> | ||
| 23 | - <div class="info_dashlet_leftrepeat_bottom"></div> | ||
| 24 | - {/if} | 4 | + <div class="{$oDashlet->sClass}" id="{$oDashlet->sClass}"> |
| 5 | + | ||
| 25 | <div class="dashboard_block_icons"> | 6 | <div class="dashboard_block_icons"> |
| 26 | <a href="#" class="action action_rollup"> </a> | 7 | <a href="#" class="action action_rollup"> </a> |
| 27 | <a href="#" class="action action_close"> </a> | 8 | <a href="#" class="action action_close"> </a> |
| @@ -32,33 +13,7 @@ | @@ -32,33 +13,7 @@ | ||
| 32 | <div class="dashboard_block_body"> | 13 | <div class="dashboard_block_body"> |
| 33 | {$oDashlet->render()} | 14 | {$oDashlet->render()} |
| 34 | </div> | 15 | </div> |
| 35 | - {if $oDashlet->sClass === "ktBlock"} | ||
| 36 | - <div class="dashboard_block_topleft"></div> | ||
| 37 | - <div class="dashboard_block_toprepeat"></div> | ||
| 38 | - <div class="dashboard_block_topright"></div> | ||
| 39 | - | ||
| 40 | - <div class="dashboard_block_bottomleft"></div> | ||
| 41 | - <div class="dashboard_block_bottomrepeat"></div> | ||
| 42 | - <div class="dashboard_block_bottomright"></div> | ||
| 43 | - {/if} | ||
| 44 | - {if $oDashlet->sClass === "ktError"} | ||
| 45 | - <div class="error_dashlet_topleft"></div> | ||
| 46 | - <div class="error_dashlet_toprepeat"></div> | ||
| 47 | - <div class="error_dashlet_topright"></div> | ||
| 48 | - | ||
| 49 | - <div class="error_dashlet_bottomleft"></div> | ||
| 50 | - <div class="error_dashlet_bottomrepeat"></div> | ||
| 51 | - <div class="error_dashlet_bottomright"></div> | ||
| 52 | - {/if} | ||
| 53 | - {if $oDashlet->sClass === "ktInfo"} | ||
| 54 | - <div class="info_dashlet_topleft"></div> | ||
| 55 | - <div class="info_dashlet_toprepeat"></div> | ||
| 56 | - <div class="info_dashlet_topright"></div> | ||
| 57 | - | ||
| 58 | - <div class="info_dashlet_bottomleft"></div> | ||
| 59 | - <div class="info_dashlet_bottomrepeat"></div> | ||
| 60 | - <div class="info_dashlet_bottomright"></div> | ||
| 61 | - {/if} | 16 | + |
| 62 | </div> | 17 | </div> |
| 63 | </div> | 18 | </div> |
| 64 | {/foreach} | 19 | {/foreach} |
| @@ -68,25 +23,8 @@ | @@ -68,25 +23,8 @@ | ||
| 68 | <div id="dashboard-container-right"> | 23 | <div id="dashboard-container-right"> |
| 69 | {foreach item=oDashlet from=$dashlets_right} | 24 | {foreach item=oDashlet from=$dashlets_right} |
| 70 | <div class="dashboard_block" id="{$context->_getDashletId($oDashlet)}"> | 25 | <div class="dashboard_block" id="{$context->_getDashletId($oDashlet)}"> |
| 71 | - <div class="{$oDashlet->sClass}"> | ||
| 72 | - {if $oDashlet->sClass === "ktBlock"} | ||
| 73 | - <div class="dashboard_block_rightrepeat_top"></div> | ||
| 74 | - <div class="dashboard_block_rightrepeat_bottom"></div> | ||
| 75 | - <div class="dashboard_block_leftrepeat_top"></div> | ||
| 76 | - <div class="dashboard_block_leftrepeat_bottom"></div> | ||
| 77 | - {/if} | ||
| 78 | - {if $oDashlet->sClass === "ktError"} | ||
| 79 | - <div class="error_dashlet_rightrepeat_top"></div> | ||
| 80 | - <div class="error_dashlet_rightrepeat_bottom"></div> | ||
| 81 | - <div class="error_dashlet_leftrepeat_top"></div> | ||
| 82 | - <div class="error_dashlet_leftrepeat_bottom"></div> | ||
| 83 | - {/if} | ||
| 84 | - {if $oDashlet->sClass === "ktInfo"} | ||
| 85 | - <div class="info_dashlet_rightrepeat_top"></div> | ||
| 86 | - <div class="info_dashlet_rightrepeat_bottom"></div> | ||
| 87 | - <div class="info_dashlet_leftrepeat_top"></div> | ||
| 88 | - <div class="info_dashlet_leftrepeat_bottom"></div> | ||
| 89 | - {/if} | 26 | + <div class="{$oDashlet->sClass}" id="{$oDashlet->sClass}"> |
| 27 | + | ||
| 90 | <div class="dashboard_block_icons"> | 28 | <div class="dashboard_block_icons"> |
| 91 | <a href="#" class="action action_rollup"> </a> | 29 | <a href="#" class="action action_rollup"> </a> |
| 92 | <a href="#" class="action action_close"> </a> | 30 | <a href="#" class="action action_close"> </a> |
| @@ -97,33 +35,7 @@ | @@ -97,33 +35,7 @@ | ||
| 97 | {$oDashlet->render()} | 35 | {$oDashlet->render()} |
| 98 | </div> | 36 | </div> |
| 99 | 37 | ||
| 100 | - {if $oDashlet->sClass === "ktBlock"} | ||
| 101 | - <div class="dashboard_block_topleft"></div> | ||
| 102 | - <div class="dashboard_block_toprepeat"></div> | ||
| 103 | - <div class="dashboard_block_topright"></div> | ||
| 104 | - | ||
| 105 | - <div class="dashboard_block_bottomleft"></div> | ||
| 106 | - <div class="dashboard_block_bottomrepeat"></div> | ||
| 107 | - <div class="dashboard_block_bottomright"></div> | ||
| 108 | - {/if} | ||
| 109 | - {if $oDashlet->sClass === "ktError"} | ||
| 110 | - <div class="error_dashlet_topleft"></div> | ||
| 111 | - <div class="error_dashlet_toprepeat"></div> | ||
| 112 | - <div class="error_dashlet_topright"></div> | ||
| 113 | - | ||
| 114 | - <div class="error_dashlet_bottomleft"></div> | ||
| 115 | - <div class="error_dashlet_bottomrepeat"></div> | ||
| 116 | - <div class="error_dashlet_bottomright"></div> | ||
| 117 | - {/if} | ||
| 118 | - {if $oDashlet->sClass === "ktInfo"} | ||
| 119 | - <div class="info_dashlet_topleft"></div> | ||
| 120 | - <div class="info_dashlet_toprepeat"></div> | ||
| 121 | - <div class="info_dashlet_topright"></div> | ||
| 122 | - | ||
| 123 | - <div class="info_dashlet_bottomleft"></div> | ||
| 124 | - <div class="info_dashlet_bottomrepeat"></div> | ||
| 125 | - <div class="info_dashlet_bottomright"></div> | ||
| 126 | - {/if} | 38 | + |
| 127 | </div> | 39 | </div> |
| 128 | </div> | 40 | </div> |
| 129 | {/foreach} | 41 | {/foreach} |
templates/kt3/standard_page.smarty
| @@ -63,9 +63,6 @@ | @@ -63,9 +63,6 @@ | ||
| 63 | <body {if (!$page->show_portlets)}class="noportlets"{/if}> | 63 | <body {if (!$page->show_portlets)}class="noportlets"{/if}> |
| 64 | <input type="hidden" name="kt-core-baseurl" id="kt-core-baseurl" value="{$rootUrl}" /> | 64 | <input type="hidden" name="kt-core-baseurl" id="kt-core-baseurl" value="{$rootUrl}" /> |
| 65 | <div id="pageBody"> | 65 | <div id="pageBody"> |
| 66 | - <div id="bodyTopLeft"></div> | ||
| 67 | - <div id="bodyTopRepeat"></div> | ||
| 68 | - <div id="bodyTopRight"></div> | ||
| 69 | <div id="bodyPad"> | 66 | <div id="bodyPad"> |
| 70 | <div id="logobar"> | 67 | <div id="logobar"> |
| 71 | {if $config->get("ui/mainLogo") != ''} | 68 | {if $config->get("ui/mainLogo") != ''} |
| @@ -79,44 +76,44 @@ | @@ -79,44 +76,44 @@ | ||
| 79 | <div class="floatClear"></div> | 76 | <div class="floatClear"></div> |
| 80 | </div> | 77 | </div> |
| 81 | {if (!$page->hide_navbar)} | 78 | {if (!$page->hide_navbar)} |
| 82 | - <div id="navbarBorder"> | ||
| 83 | - <div id="navbar"> | ||
| 84 | - <ul> | ||
| 85 | - <!-- area menu --> | ||
| 86 | - {foreach item=aMenuItem from=$page->menu} | ||
| 87 | - {if ($aMenuItem.active == 1)} | ||
| 88 | - <li class="active"><a href="{$aMenuItem.url}">{$aMenuItem.label}</a></li> | ||
| 89 | - {else} | ||
| 90 | - <li><a href="{$aMenuItem.url}">{$aMenuItem.label}</a></li> | ||
| 91 | - {/if} | ||
| 92 | - <li><div id="menu_divider"></div></li> | ||
| 93 | - {/foreach} | ||
| 94 | - | ||
| 95 | - <!-- user menu --> | ||
| 96 | - <li class="pref"> | ||
| 97 | - {if ($page->user)} | ||
| 98 | - <span class="ktLoggedInUser">{$page->user->getName()}</span> | ||
| 99 | - {/if} | ||
| 100 | - {if !empty($page->userMenu)} | ||
| 101 | - · | ||
| 102 | - {/if} | ||
| 103 | - {foreach item=aMenuItem from=$page->userMenu name=prefmenu} | ||
| 104 | - {if ($aMenuItem.active == 1)} | ||
| 105 | - <a style='border: 4px solid red;' href="{$aMenuItem.url}">{$aMenuItem.label}</a> | ||
| 106 | - {else} | ||
| 107 | - <a href="{$aMenuItem.url}">{$aMenuItem.label}</a> | ||
| 108 | - {/if} | ||
| 109 | - {if !$smarty.foreach.prefmenu.last} | ||
| 110 | - · | ||
| 111 | - {/if} | ||
| 112 | - {/foreach} | ||
| 113 | - {if ($page->getHelpURL() != null)} <span class="fahrner"><a href="{$page->getHelpURL()}"><img src="thirdparty/icon-theme/16x16/apps/help-browser.gif" border="0" align="top" /></a>{/if} | ||
| 114 | - </li> | ||
| 115 | - </ul> | ||
| 116 | - </div> | ||
| 117 | - <div id="navbarLeft"></div> | ||
| 118 | - <div id="navbarRight"></div> | ||
| 119 | - </div> | 79 | + <div id="navbarBorder"> |
| 80 | + <div id="navbar"> | ||
| 81 | + <ul> | ||
| 82 | + <!-- area menu --> | ||
| 83 | + {foreach item=aMenuItem from=$page->menu} | ||
| 84 | + {if ($aMenuItem.active == 1)} | ||
| 85 | + <li class="active"><a href="{$aMenuItem.url}">{$aMenuItem.label}</a></li> | ||
| 86 | + {else} | ||
| 87 | + <li><a href="{$aMenuItem.url}">{$aMenuItem.label}</a></li> | ||
| 88 | + {/if} | ||
| 89 | + <li><div id="menu_divider"></div></li> | ||
| 90 | + {/foreach} | ||
| 91 | + | ||
| 92 | + <!-- user menu --> | ||
| 93 | + <li class="pref"> | ||
| 94 | + {if ($page->user)} | ||
| 95 | + <span class="ktLoggedInUser">{$page->user->getName()}</span> | ||
| 96 | + {/if} | ||
| 97 | + {if !empty($page->userMenu)} | ||
| 98 | + · | ||
| 99 | + {/if} | ||
| 100 | + {foreach item=aMenuItem from=$page->userMenu name=prefmenu} | ||
| 101 | + {if ($aMenuItem.active == 1)} | ||
| 102 | + <a style='border: 4px solid red;' href="{$aMenuItem.url}">{$aMenuItem.label}</a> | ||
| 103 | + {else} | ||
| 104 | + <a href="{$aMenuItem.url}">{$aMenuItem.label}</a> | ||
| 105 | + {/if} | ||
| 106 | + {if !$smarty.foreach.prefmenu.last} | ||
| 107 | + · | ||
| 108 | + {/if} | ||
| 109 | + {/foreach} | ||
| 110 | + {if ($page->getHelpURL() != null)} <span class="fahrner"><a href="{$page->getHelpURL()}"><img src="thirdparty/icon-theme/16x16/apps/help-browser.gif" border="0" align="top" /></a>{/if} | ||
| 111 | + </li> | ||
| 112 | + </ul> | ||
| 113 | + </div> | ||
| 114 | + <div id="navbarLeft"></div> | ||
| 115 | + <div id="navbarRight"></div> | ||
| 116 | + </div> | ||
| 120 | {/if} | 117 | {/if} |
| 121 | {if (!$page->hide_section)} | 118 | {if (!$page->hide_section)} |
| 122 | <div id="breadcrumbs"> | 119 | <div id="breadcrumbs"> |
| @@ -150,101 +147,73 @@ | @@ -150,101 +147,73 @@ | ||
| 150 | {/if} | 147 | {/if} |
| 151 | </div> | 148 | </div> |
| 152 | <div id="kt-wrapper"> | 149 | <div id="kt-wrapper"> |
| 153 | - <div id="portletbar"> | ||
| 154 | - {foreach item=oPortlet from=$page->portlets} | ||
| 155 | - {assign var=portlet_output value=$oPortlet->render() } | ||
| 156 | - {if $portlet_output} | ||
| 157 | - <div class="portlet {if $oPortlet->getActive()}expanded{/if}"> | ||
| 158 | - <h4 onclick="toggleElementClass('expanded',this.parentNode)">{$oPortlet->getTitle()}</h4> | ||
| 159 | - <div class="portletTopRepeat"></div> | ||
| 160 | - <div class="portletTopRight"></div> | ||
| 161 | - <div class="portletbody"> | ||
| 162 | - {$portlet_output} | ||
| 163 | - </div> | ||
| 164 | - </div> | ||
| 165 | - {/if} | ||
| 166 | - {/foreach} | ||
| 167 | - <div class="floatClear"></div> | ||
| 168 | - </div> | ||
| 169 | - <div id="content" {if $page->content_class}class="{$page->content_class}"{/if}> | ||
| 170 | - | ||
| 171 | - {if (!$page->hide_section)} | ||
| 172 | - <h1 class="{$page->componentClass}"><span class="fahrner">{$page->componentLabel}</span> | ||
| 173 | - {if ($page->getHelpURL() != null)}<a class="ktHelp" href="{$page->getHelpURL()}">Help</a> {/if} | ||
| 174 | - </h1> | ||
| 175 | - {/if} | ||
| 176 | - | ||
| 177 | - <!-- any status / error messages get added here. --> | ||
| 178 | - {if (!empty($page->errStack))} | ||
| 179 | - <div class="ktError"> | ||
| 180 | - <div class="error_dashlet_rightrepeat_bottom"></div> | ||
| 181 | - <div class="error_dashlet_leftrepeat_bottom"></div> | ||
| 182 | - {foreach item=sError from=$page->errStack} | ||
| 183 | - <p>{$sError}</p> | ||
| 184 | - {/foreach} | ||
| 185 | - <div class="error_dashlet_topleft_small"></div> | ||
| 186 | - <div class="error_dashlet_toprepeat_small"></div> | ||
| 187 | - <div class="error_dashlet_topright_small"></div> | ||
| 188 | - | ||
| 189 | - <div class="error_dashlet_bottomleft"></div> | ||
| 190 | - <div class="error_dashlet_bottomrepeat_small"></div> | ||
| 191 | - <div class="error_dashlet_bottomright"></div> | ||
| 192 | - </div> | ||
| 193 | - {/if} | ||
| 194 | - | ||
| 195 | - {if (!empty($page->infoStack))} | ||
| 196 | - <div class="ktInfo"> | ||
| 197 | - <div class="info_dashlet_rightrepeat_bottom"></div> | ||
| 198 | - <div class="info_dashlet_leftrepeat_bottom"></div> | ||
| 199 | - {foreach item=sInfo from=$page->infoStack} | ||
| 200 | - <p>{$sInfo}</p> | ||
| 201 | - {/foreach} | ||
| 202 | - <div class="info_dashlet_topleft_small"></div> | ||
| 203 | - <div class="info_dashlet_toprepeat_small"></div> | ||
| 204 | - <div class="info_dashlet_topright_small"></div> | ||
| 205 | - | ||
| 206 | - <div class="info_dashlet_bottomleft"></div> | ||
| 207 | - <div class="info_dashlet_bottomrepeat_small"></div> | ||
| 208 | - <div class="info_dashlet_bottomright"></div> | ||
| 209 | - </div> | ||
| 210 | - {/if} | ||
| 211 | - <!-- and finally, the content. --> | ||
| 212 | - {$page->contents} | ||
| 213 | - <div class="floatClear"></div> | ||
| 214 | - </div> | 150 | + <table width="100%"> |
| 151 | + <tr align="left" align="left"> | ||
| 152 | + <td valign="top"> | ||
| 153 | + <div id="portletbar"> | ||
| 154 | + {foreach item=oPortlet from=$page->portlets} | ||
| 155 | + {assign var=portlet_output value=$oPortlet->render() } | ||
| 156 | + {if $portlet_output} | ||
| 157 | + <div class="portlet{if $oPortlet->getActive()} expanded{/if}" id="portlet{if $oPortlet->getActive()} expanded{/if}"> | ||
| 158 | + <h4 onclick="toggleElementClass('expanded', this.parentNode)">{$oPortlet->getTitle()}</h4> | ||
| 159 | + <div class="portletbody"> | ||
| 160 | + {$portlet_output} | ||
| 161 | + </div> | ||
| 162 | + </div> | ||
| 163 | + {/if} | ||
| 164 | + {/foreach} | ||
| 165 | + <div class="floatClear"></div> | ||
| 166 | + </div> | ||
| 167 | + </td> | ||
| 168 | + <td valign="top" width="100%"> | ||
| 169 | + <div id="content" {if $page->content_class}class="{$page->content_class}"{/if}> | ||
| 170 | + {if (!$page->hide_section)} | ||
| 171 | + <h1 class="{$page->componentClass}"><span class="fahrner">{$page->componentLabel}</span> | ||
| 172 | + {if ($page->getHelpURL() != null)}<a class="ktHelp" href="{$page->getHelpURL()}">Help</a> {/if} | ||
| 173 | + </h1> | ||
| 174 | + {/if} | ||
| 175 | + | ||
| 176 | + <!-- any status / error messages get added here. --> | ||
| 177 | + {if (!empty($page->errStack))} | ||
| 178 | + <div class="ktErrorMessage"> | ||
| 179 | + {foreach item=sError from=$page->errStack} | ||
| 180 | + <span>{$sError}</span> | ||
| 181 | + {/foreach} | ||
| 182 | + </div> | ||
| 183 | + {/if} | ||
| 184 | + | ||
| 185 | + {if (!empty($page->infoStack))} | ||
| 186 | + <div class="ktInfoMessage"> | ||
| 187 | + {foreach item=sInfo from=$page->infoStack} | ||
| 188 | + <span>{$sInfo}</span> | ||
| 189 | + {/foreach} | ||
| 190 | + </div> | ||
| 191 | + {/if} | ||
| 192 | + <!-- and finally, the content. --> | ||
| 193 | + {$page->contents} | ||
| 194 | + <div class="floatClear"></div> | ||
| 195 | + </div> | ||
| 196 | + </td> | ||
| 197 | + </tr> | ||
| 198 | + </table> | ||
| 215 | </div> | 199 | </div> |
| 216 | - <div id="pageBodyBg"></div> | ||
| 217 | - <div id="bodyLeftRepeatTop"></div> | ||
| 218 | - <div id="bodyLeftRepeatQuartTop"></div> | ||
| 219 | - <div id="bodyLeftRepeatMiddleTop"></div> | ||
| 220 | - <div id="bodyLeftRepeatMiddleBottom"></div> | ||
| 221 | - <div id="bodyLeftRepeatQuartBottom"></div> | ||
| 222 | - <div id="bodyLeftRepeatBottom"></div> | ||
| 223 | - <div id="bodyRightRepeatTop"></div> | ||
| 224 | - <div id="bodyRightRepeatQuartTop"></div> | ||
| 225 | - <div id="bodyRightRepeatMiddleTop"></div> | ||
| 226 | - <div id="bodyRightRepeatMiddleBottom"></div> | ||
| 227 | - <div id="bodyRightRepeatQuartBottom"></div> | ||
| 228 | - <div id="bodyRightRepeatBottom"></div> | ||
| 229 | - <div id="bodyBottomRepeat"></div> | ||
| 230 | - <div id="bodyBottomRight"></div> | ||
| 231 | - <div id="bodyBottomLeft"></div> | ||
| 232 | </div> | 200 | </div> |
| 233 | - <script src="../../resources/js/loader.js"></script> | ||
| 234 | - <div id="{if $page->getDisclaimer() != ''}copyrightbarBorderDisclaimer{else}copyrightbarBorder{/if}"> | ||
| 235 | - <div id="{if $page->getDisclaimer() != ''}copyrightbarLeftDisclaimer{else}copyrightbarLeft{/if}"></div> | ||
| 236 | - <div id="{if $page->getDisclaimer() != ''}copyrightbarRightDisclaimer{else}copyrightbarRight{/if}"></div> | ||
| 237 | - <div id="{if $page->getDisclaimer() != ''}copyrightbarBgDisclaimer{else}copyrightbarBg{/if}"></div> | ||
| 238 | - <div id="{if $page->getDisclaimer() != ''}copyrightbarDisclaimer{else}copyrightbar{/if}"> | ||
| 239 | - <span style="float:left;">{i18n}© 2007 <a href="http://www.knowledgetree.com/">The Jam Warehouse Software (Pty) Ltd.</a> All Rights Reserved{/i18n}</span> | ||
| 240 | - <span style="float:right; margin-right:5px;">{i18n arg_timing=$page->getReqTime()}Request created in #timing#s{/i18n}</span><br /> | ||
| 241 | - {i18n arg_version="$versionname" arg_appname="$appname"}#appname# Version: #version#{/i18n} | ||
| 242 | - <p>{$page->getDisclaimer()}</p> | ||
| 243 | - </div> | ||
| 244 | - {if $config->get("ui/poweredByDisabled") == '0'} | ||
| 245 | - <a href="{$rootUrl}"><img src="{$config->get("ui/powerLogo")}" class="copyrightbarBorderLogo" alt="{$config->get("ui/powerLogoTitle")}" title="{$config->get("ui/powerLogoTitle")}"/></a> | ||
| 246 | - | ||
| 247 | - {/if} | 201 | + <div id="copyrightbarBorder"> |
| 202 | + <table width="98%" align="center"> | ||
| 203 | + <tr> | ||
| 204 | + <td align="left"> | ||
| 205 | + <span>{i18n}© 2007 <a href="http://www.knowledgetree.com/">The Jam Warehouse Software (Pty) Ltd.</a> All Rights Reserved{/i18n}</span> | ||
| 206 | + <p>{$page->getDisclaimer()}</p> | ||
| 207 | + </td> | ||
| 208 | + <td align="right"> | ||
| 209 | + <span>{i18n arg_timing=$page->getReqTime()}Request created in #timing#s{/i18n}</span><br /> | ||
| 210 | + <span>{i18n arg_version="$versionname" arg_appname="$appname"}#appname# Version: #version#{/i18n}</span><br/> | ||
| 211 | + {if $config->get("ui/poweredByDisabled") == '0'} | ||
| 212 | + <a href="{$rootUrl}"><img src="{$config->get("ui/powerLogo")}" border="0" alt="{$config->get("ui/powerLogoTitle")}" title="{$config->get("ui/powerLogoTitle")}"/></a> | ||
| 213 | + {/if} | ||
| 214 | + </td> | ||
| 215 | + </tr> | ||
| 216 | + </table> | ||
| 248 | <div class="floatClear"></div> | 217 | <div class="floatClear"></div> |
| 249 | </div> | 218 | </div> |
| 250 | </body> | 219 | </body> |
templates/ktcore/action/view_roles.smarty
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | </tr> | 28 | </tr> |
| 29 | {/foreach} | 29 | {/foreach} |
| 30 | {else} | 30 | {else} |
| 31 | -<tr><td colspan="4" class="ktInfo"><p>{i18n}No roles defined in the Role Administration area.{/i18n}</p></td></tr> | 31 | +<tr><td colspan="4" class="ktInfoMessage"><span>{i18n}No roles defined in the Role Administration area.{/i18n}</span></td></tr> |
| 32 | {/if} | 32 | {/if} |
| 33 | </tbody> | 33 | </tbody> |
| 34 | </table> | 34 | </table> |
templates/ktcore/authentication/manage.smarty
| @@ -12,13 +12,13 @@ specify additional sources of authentication data.{/i18n}</p> | @@ -12,13 +12,13 @@ specify additional sources of authentication data.{/i18n}</p> | ||
| 12 | ktInline">{i18n}Add authentication source{/i18n}</a><a href="{addQS}action=addSource{/addQS}">{i18n}Add a new | 12 | ktInline">{i18n}Add authentication source{/i18n}</a><a href="{addQS}action=addSource{/addQS}">{i18n}Add a new |
| 13 | authentication source{/i18n}</a>.</p> | 13 | authentication source{/i18n}</a>.</p> |
| 14 | {else} | 14 | {else} |
| 15 | -<div class="ktInfo"><p>{i18n}Only the standard database authentication is currently available. | 15 | +<div class="ktInfoMessage"><span>{i18n}Only the standard database authentication is currently available. |
| 16 | If you need to use a different authentication type (e.g. LDAP) you will need to | 16 | If you need to use a different authentication type (e.g. LDAP) you will need to |
| 17 | -ensure that the Plugin is enabled.{/i18n}<p></div> | 17 | +ensure that the Plugin is enabled.{/i18n}<span></div> |
| 18 | {/if} | 18 | {/if} |
| 19 | 19 | ||
| 20 | {if empty($sources)} | 20 | {if empty($sources)} |
| 21 | -<div class="ktInfo"><p>{i18n}No additional authentication sources have been defined.{/i18n}</p></div> | 21 | +<div class="ktInfoMessage"><span>{i18n}No additional authentication sources have been defined.{/i18n}</span></div> |
| 22 | {else} | 22 | {else} |
| 23 | <table class="listing"> | 23 | <table class="listing"> |
| 24 | <thead> | 24 | <thead> |
templates/ktcore/dashlets/checkedout.smarty
| @@ -6,5 +6,5 @@ | @@ -6,5 +6,5 @@ | ||
| 6 | {/foreach} | 6 | {/foreach} |
| 7 | </ul> | 7 | </ul> |
| 8 | {else} | 8 | {else} |
| 9 | -<div class="ktInfo"><p>{i18n}You have no documents which are currently checked out.{/i18n}</p></div> | 9 | +<div class="ktInfoMessage"><span>{i18n}You have no documents which are currently checked out.{/i18n}</span></div> |
| 10 | {/if} | 10 | {/if} |
templates/ktcore/dashlets/indexer_status.smarty
| @@ -13,8 +13,8 @@ | @@ -13,8 +13,8 @@ | ||
| 13 | </div> | 13 | </div> |
| 14 | {else} | 14 | {else} |
| 15 | {if empty($transforms)} | 15 | {if empty($transforms)} |
| 16 | -<div class="ktInfo"> | ||
| 17 | - <p>{i18n}All indexers claim to be working correctly.{/i18n}</p> | 16 | +<div class="ktInfoMessage"> |
| 17 | + <span>{i18n}All indexers claim to be working correctly.{/i18n}</span> | ||
| 18 | </div> | 18 | </div> |
| 19 | {else} | 19 | {else} |
| 20 | <table class="kt_collection"> | 20 | <table class="kt_collection"> |
templates/ktcore/dashlets/notifications.smarty
| @@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
| 18 | kt:deleteMessage="{i18n}Are you sure you wish to clear all notifications?{/i18n}" | 18 | kt:deleteMessage="{i18n}Are you sure you wish to clear all notifications?{/i18n}" |
| 19 | class="ktLinkDelete">{i18n}Clear all notifications{/i18n}</a> | 19 | class="ktLinkDelete">{i18n}Clear all notifications{/i18n}</a> |
| 20 | {else} | 20 | {else} |
| 21 | -<div class="ktInfo"><p>{i18n}No items require your attention.{/i18n}</p></div> | 21 | +<div class="ktInfoMessage"><span>{i18n}No items require your attention.{/i18n}</span></div> |
| 22 | {/if} | 22 | {/if} |
| 23 | </div> | 23 | </div> |
| 24 | </div> | 24 | </div> |
| 25 | \ No newline at end of file | 25 | \ No newline at end of file |
templates/ktcore/document/admin/checkoutlisting.smarty
| @@ -34,7 +34,7 @@ $oUser->getName(); } else { print _kt("N/A"); }{/php}</td> | @@ -34,7 +34,7 @@ $oUser->getName(); } else { print _kt("N/A"); }{/php}</td> | ||
| 34 | <!-- FIXME do we want batching? --> | 34 | <!-- FIXME do we want batching? --> |
| 35 | </table> | 35 | </table> |
| 36 | {else} | 36 | {else} |
| 37 | - <div class="ktInfo"> | ||
| 38 | - <p>{i18n}No documents are currently checked out.{/i18n}</p> | 37 | + <div class="ktInfoMessage"> |
| 38 | + <span>{i18n}No documents are currently checked out.{/i18n}</span> | ||
| 39 | </div> | 39 | </div> |
| 40 | {/if} | 40 | {/if} |
templates/ktcore/document/admin/dearchiveconfirmlist.smarty
| 1 | <h2>{i18n}Confirm De-archival{/i18n}</h2> | 1 | <h2>{i18n}Confirm De-archival{/i18n}</h2> |
| 2 | 2 | ||
| 3 | -<div class="ktInfo"><p><strong>{i18n}Note{/i18n}:</strong> {i18n}please | 3 | +<div class="ktInfoMessage"><span><strong>{i18n}Note{/i18n}:</strong> {i18n}please |
| 4 | confirm that you want to restore these documents from an archived | 4 | confirm that you want to restore these documents from an archived |
| 5 | -state.{/i18n}</p></div> | 5 | +state.{/i18n}</span></div> |
| 6 | 6 | ||
| 7 | {if (!empty($documents))} | 7 | {if (!empty($documents))} |
| 8 | 8 | ||
| @@ -32,5 +32,5 @@ state.{/i18n}</p></div> | @@ -32,5 +32,5 @@ state.{/i18n}</p></div> | ||
| 32 | </form> | 32 | </form> |
| 33 | 33 | ||
| 34 | {else} | 34 | {else} |
| 35 | -<div class="ktInfo"><p>{i18n}No documents were selected.{/i18n}</p></div> | 35 | +<div class="ktInfoMessage"><span>{i18n}No documents were selected.{/i18n}</span></div> |
| 36 | {/if} | 36 | {/if} |
templates/ktcore/document/admin/deletedlist.smarty
| @@ -67,5 +67,5 @@ can <strong>restore</strong> them as necessary.{/i18n}</p> | @@ -67,5 +67,5 @@ can <strong>restore</strong> them as necessary.{/i18n}</p> | ||
| 67 | </form> | 67 | </form> |
| 68 | 68 | ||
| 69 | {else} | 69 | {else} |
| 70 | -<div class="ktInfo"><p>{i18n}No documents are marked as deleted.{/i18n}</p></div> | 70 | +<div class="ktInfoMessage"><span>{i18n}No documents are marked as deleted.{/i18n}</span></div> |
| 71 | {/if} | 71 | {/if} |
templates/ktcore/document/admin/expungeconfirmlist.smarty
| 1 | <h2>{i18n}Confirm Expunge{/i18n}</h2> | 1 | <h2>{i18n}Confirm Expunge{/i18n}</h2> |
| 2 | 2 | ||
| 3 | -<div class="ktInfo"><p><strong>{i18n}Note{/i18n}:</strong> {i18n}please | ||
| 4 | -confirm that you want to delete these documents.{/i18n}</p></div> | 3 | +<div class="ktInfoMessage"><span><strong>{i18n}Note{/i18n}:</strong> {i18n}please |
| 4 | +confirm that you want to delete these documents.{/i18n}</span></div> | ||
| 5 | 5 | ||
| 6 | {if (!empty($documents))} | 6 | {if (!empty($documents))} |
| 7 | 7 | ||
| @@ -32,5 +32,5 @@ confirm that you want to delete these documents.{/i18n}</p></div> | @@ -32,5 +32,5 @@ confirm that you want to delete these documents.{/i18n}</p></div> | ||
| 32 | </form> | 32 | </form> |
| 33 | 33 | ||
| 34 | {else} | 34 | {else} |
| 35 | -<div class="ktInfo"><p>{i18n}No documents were selected.{/i18n}</p></div> | 35 | +<div class="ktInfoMessage"><span>{i18n}No documents were selected.{/i18n}</span></div> |
| 36 | {/if} | 36 | {/if} |
templates/ktcore/document/admin/restoreconfirmlist.smarty
| 1 | <h2>{i18n}Confirm Restore{/i18n}</h2> | 1 | <h2>{i18n}Confirm Restore{/i18n}</h2> |
| 2 | 2 | ||
| 3 | -<div class="ktInfo"><p><strong>{i18n}Note{/i18n}:</strong> {i18n}please | ||
| 4 | -confirm that you want to restore these documents.{/i18n}</p></div> | 3 | +<div class="ktInfoMessage"><span><strong>{i18n}Note{/i18n}:</strong> {i18n}please |
| 4 | +confirm that you want to restore these documents.{/i18n}</span></div> | ||
| 5 | 5 | ||
| 6 | {if (!empty($documents))} | 6 | {if (!empty($documents))} |
| 7 | 7 | ||
| @@ -33,5 +33,5 @@ confirm that you want to restore these documents.{/i18n}</p></div> | @@ -33,5 +33,5 @@ confirm that you want to restore these documents.{/i18n}</p></div> | ||
| 33 | </form> | 33 | </form> |
| 34 | 34 | ||
| 35 | {else} | 35 | {else} |
| 36 | -<div class="ktInfo"><p>{i18n}No documents were selected.{/i18n}</p></div> | 36 | +<div class="ktInfoMessage"><span>{i18n}No documents were selected.{/i18n}</span></div> |
| 37 | {/if} | 37 | {/if} |
templates/ktcore/document/cleanup.smarty
| @@ -34,5 +34,5 @@ which you should investigate.{/i18n}</p> | @@ -34,5 +34,5 @@ which you should investigate.{/i18n}</p> | ||
| 34 | {/if} | 34 | {/if} |
| 35 | 35 | ||
| 36 | {else} | 36 | {else} |
| 37 | -<div class="ktInfo"><p>{i18n}No problems found - database is consistent with the contents of the repository.{/i18n}</p></div> | 37 | +<div class="ktInfoMessage"><span>{i18n}No problems found - database is consistent with the contents of the repository.{/i18n}</span></div> |
| 38 | {/if} | 38 | {/if} |
templates/ktcore/document/compare.smarty
| @@ -7,10 +7,10 @@ | @@ -7,10 +7,10 @@ | ||
| 7 | {capture assign=to} | 7 | {capture assign=to} |
| 8 | <strong>{$comparison_document->getMajorVersionNumber()}.{$comparison_document->getMinorVersionNumber()}</strong> ({$comparison_document->getMetadataVersion()}) | 8 | <strong>{$comparison_document->getMajorVersionNumber()}.{$comparison_document->getMinorVersionNumber()}</strong> ({$comparison_document->getMetadataVersion()}) |
| 9 | {/capture} | 9 | {/capture} |
| 10 | -<div class="ktInfo"><p> | 10 | +<div class="ktInfoMessage"><span> |
| 11 | {i18n arg_from=$from arg_to=$to}showing comparison between versions #from# and #to#. {/i18n} | 11 | {i18n arg_from=$from arg_to=$to}showing comparison between versions #from# and #to#. {/i18n} |
| 12 | <a href="{addQS context=$context}action=main{/addQS}">{i18n}View current version{/i18n}</a>. | 12 | <a href="{addQS context=$context}action=main{/addQS}">{i18n}View current version{/i18n}</a>. |
| 13 | -</p></div> | 13 | +</span></div> |
| 14 | 14 | ||
| 15 | {if ($document_data.is_manufactured)} | 15 | {if ($document_data.is_manufactured)} |
| 16 | <p class="descriptiveText"><strong class="ktInlineError">{i18n}Please | 16 | <p class="descriptiveText"><strong class="ktInlineError">{i18n}Please |
templates/ktcore/document/document_permissions.smarty
| @@ -11,7 +11,7 @@ permissions are not shown.{/i18n}</p> | @@ -11,7 +11,7 @@ permissions are not shown.{/i18n}</p> | ||
| 11 | {/if} | 11 | {/if} |
| 12 | 12 | ||
| 13 | {if ((empty($roles) && empty($groups) && empty($users)))} | 13 | {if ((empty($roles) && empty($groups) && empty($users)))} |
| 14 | -<div class="ktInfo"><p>{i18n}No roles or groups have been defined or have permissions.{/i18n}</p></div> | 14 | +<div class="ktInfoMessage"><span>{i18n}No roles or groups have been defined or have permissions.{/i18n}</span></div> |
| 15 | {else} | 15 | {else} |
| 16 | 16 | ||
| 17 | <table class="kt_collection"cellspacing="0" cellpadding="0" border="0"> | 17 | <table class="kt_collection"cellspacing="0" cellpadding="0" border="0"> |
templates/ktcore/document/resolved_permissions_user.smarty
| @@ -9,7 +9,7 @@ document due to membership of a group, or fulfilling a specific role on | @@ -9,7 +9,7 @@ document due to membership of a group, or fulfilling a specific role on | ||
| 9 | this document.{/i18n}</p> | 9 | this document.{/i18n}</p> |
| 10 | 10 | ||
| 11 | {if (empty($users)) } | 11 | {if (empty($users)) } |
| 12 | -<div class="ktInfo"><p>{i18n}No users have permissions on this item.{/i18n}</p></div> | 12 | +<div class="ktInfoMessage"><span>{i18n}No users have permissions on this item.{/i18n}</span></div> |
| 13 | {else} | 13 | {else} |
| 14 | 14 | ||
| 15 | <table class="kt_collection"cellspacing="0" cellpadding="0" border="0"> | 15 | <table class="kt_collection"cellspacing="0" cellpadding="0" border="0"> |
templates/ktcore/document/view.smarty
| @@ -3,44 +3,35 @@ | @@ -3,44 +3,35 @@ | ||
| 3 | {if ($document->getIsCheckedOut() == 1)} | 3 | {if ($document->getIsCheckedOut() == 1)} |
| 4 | {capture assign=checkout_user}<strong>{$sCheckoutUser}</strong>{/capture} | 4 | {capture assign=checkout_user}<strong>{$sCheckoutUser}</strong>{/capture} |
| 5 | {if ($isCheckoutUser)} | 5 | {if ($isCheckoutUser)} |
| 6 | -<div class="ktInfo"> | ||
| 7 | - <div class="info_dashlet_rightrepeat_bottom"></div> | ||
| 8 | - <div class="info_dashlet_leftrepeat_bottom"></div> | ||
| 9 | - <p>{i18n}This document is currently checked out by <strong>you</strong>. If this is incorrect, or you no longer need to make changes to it, please cancel the checkout.{/i18n}</p> | ||
| 10 | - <div class="info_dashlet_topleft_small"></div> | ||
| 11 | - <div class="info_dashlet_toprepeat_small"></div> | ||
| 12 | - <div class="info_dashlet_topright_small"></div> | ||
| 13 | - | ||
| 14 | - <div class="info_dashlet_bottomleft"></div> | ||
| 15 | - <div class="info_dashlet_bottomrepeat_small"></div> | ||
| 16 | - <div class="info_dashlet_bottomright"></div> | 6 | +<div class="ktInfoMessage"> |
| 7 | + <span>{i18n}This document is currently checked out by <strong>you</strong>. If this is incorrect, or you no longer need to make changes to it, please cancel the checkout.{/i18n}</span> | ||
| 17 | </div> | 8 | </div> |
| 18 | {else} | 9 | {else} |
| 19 | {if ($canCheckin)} | 10 | {if ($canCheckin)} |
| 20 | -<div class="ktInfo"> | ||
| 21 | -<p>{i18n arg_checkoutuser=$checkout_user}This document is currently checked out by #checkoutuser#, but you | ||
| 22 | -have sufficient priviledges to cancel their checkout.{/i18n}</p> | 11 | +<div class="ktInfoMessage"> |
| 12 | +<span>{i18n arg_checkoutuser=$checkout_user}This document is currently checked out by #checkoutuser#, but you | ||
| 13 | +have sufficient priviledges to cancel their checkout.{/i18n}</span> | ||
| 23 | </div> | 14 | </div> |
| 24 | {else} | 15 | {else} |
| 25 | -<div class="ktInfo"> | ||
| 26 | -<p>{i18n arg_checkoutuser=$checkout_user arg_appname="$appname"}This document is currently checked out by #checkoutuser#. You cannot make | 16 | +<div class="ktInfoMessage"> |
| 17 | + <span>{i18n arg_checkoutuser=$checkout_user arg_appname="$appname"}This document is currently checked out by #checkoutuser#. You cannot make | ||
| 27 | changes until that user checks it in. If you have urgent modifications to make, please | 18 | changes until that user checks it in. If you have urgent modifications to make, please |
| 28 | -contact your #appname# Administrator.{/i18n}</p> | 19 | +contact your #appname# Administrator.{/i18n}</span> |
| 29 | </div> | 20 | </div> |
| 30 | {/if} | 21 | {/if} |
| 31 | {/if} | 22 | {/if} |
| 32 | {/if} | 23 | {/if} |
| 33 | 24 | ||
| 34 | {if ($document->getImmutable() == true)} | 25 | {if ($document->getImmutable() == true)} |
| 35 | -<div class="ktInfo"> | ||
| 36 | -<p>{i18n}This document is immutable. No further content changes can be | 26 | +<div class="ktInfoMessage"> |
| 27 | + <span>{i18n}This document is immutable. No further content changes can be | ||
| 37 | made to this document, and only administrators (in administration mode) | 28 | made to this document, and only administrators (in administration mode) |
| 38 | can make changes to the metadata or can move or delete it.{/i18n} | 29 | can make changes to the metadata or can move or delete it.{/i18n} |
| 39 | {if 1} | 30 | {if 1} |
| 40 | {i18n}If you require assistance from an administrator to perform one of | 31 | {i18n}If you require assistance from an administrator to perform one of |
| 41 | these tasks, use the Request Assistance action.{/i18n} | 32 | these tasks, use the Request Assistance action.{/i18n} |
| 42 | {/if} | 33 | {/if} |
| 43 | -</p> | 34 | +</span> |
| 44 | </div> | 35 | </div> |
| 45 | {/if} | 36 | {/if} |
| 46 | 37 |
templates/ktcore/documenttypes/edit.smarty
| @@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
| 39 | </fieldset> | 39 | </fieldset> |
| 40 | </form> | 40 | </form> |
| 41 | {else} | 41 | {else} |
| 42 | -<div class="ktInfo"><p>{i18n}No fieldsets are currently associated with this type.{/i18n}</p></div> | 42 | +<div class="ktInfoMessage"><span>{i18n}No fieldsets are currently associated with this type.{/i18n}</span></div> |
| 43 | { /if } | 43 | { /if } |
| 44 | 44 | ||
| 45 | { if $bAvailableFieldsets } | 45 | { if $bAvailableFieldsets } |
| @@ -58,6 +58,6 @@ | @@ -58,6 +58,6 @@ | ||
| 58 | </fieldset> | 58 | </fieldset> |
| 59 | </form> | 59 | </form> |
| 60 | {elseif !$bAnyFieldsets} | 60 | {elseif !$bAnyFieldsets} |
| 61 | -<div class="ktInfo"><p>{i18n}No fieldsets are available to be added. To add a fieldset, please go to | ||
| 62 | -DMS Administration{/i18n} » {i18n}Document Metadata and Workflow Configuration{/i18n} » {i18n}Document Field Management{/i18n} </p></div> | 61 | +<div class="ktInfoMessage"><span>{i18n}No fieldsets are available to be added. To add a fieldset, please go to |
| 62 | +DMS Administration{/i18n} » {i18n}Document Metadata and Workflow Configuration{/i18n} » {i18n}Document Field Management{/i18n} </span></div> | ||
| 63 | { /if } | 63 | { /if } |
templates/ktcore/folder/permissions.smarty
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | {* check if there are roles etc *} | 6 | {* check if there are roles etc *} |
| 7 | 7 | ||
| 8 | {if ((empty($roles) && empty($groups)))} | 8 | {if ((empty($roles) && empty($groups)))} |
| 9 | - <div class="ktInfo"><p>{i18n}No roles or groups have been defined. Permissions can only be allocated to roles and groups.{/i18n}</p></div> | 9 | + <div class="ktInfoMessage"><span>{i18n}No roles or groups have been defined. Permissions can only be allocated to roles and groups.{/i18n}</span></div> |
| 10 | {else} | 10 | {else} |
| 11 | 11 | ||
| 12 | {* otherwise continue *} | 12 | {* otherwise continue *} |
| @@ -15,11 +15,11 @@ | @@ -15,11 +15,11 @@ | ||
| 15 | </p> | 15 | </p> |
| 16 | 16 | ||
| 17 | {if ($can_inherit)} | 17 | {if ($can_inherit)} |
| 18 | -<div class="ktInfo"> | ||
| 19 | -<p>{i18n}This folder defines its own permissions.{/i18n} | 18 | +<div class="ktInfoMessage"> |
| 19 | +<span>{i18n}This folder defines its own permissions.{/i18n} | ||
| 20 | <a class="ktActionLink ktDelete" | 20 | <a class="ktActionLink ktDelete" |
| 21 | kt:deleteMessage="{i18n}Are you sure you wish to reinstate inherited permissions?{/i18n}" | 21 | kt:deleteMessage="{i18n}Are you sure you wish to reinstate inherited permissions?{/i18n}" |
| 22 | - href="{addQS context=$context}action=inheritPermissions{/addQS}">{i18n}Inherit permissions{/i18n}</a> | 22 | + href="{addQS context=$context}action=inheritPermissions{/addQS}">{i18n}Inherit permissions{/i18n}</a></span> |
| 23 | </div> | 23 | </div> |
| 24 | {/if} | 24 | {/if} |
| 25 | 25 |
templates/ktcore/folder/resolved_permissions.smarty
| @@ -5,7 +5,7 @@ this specific folder. Only the roles or groups which have permissions | @@ -5,7 +5,7 @@ this specific folder. Only the roles or groups which have permissions | ||
| 5 | assigned are shown.{/i18n}</p> | 5 | assigned are shown.{/i18n}</p> |
| 6 | 6 | ||
| 7 | {if (empty($roles) && empty($groups) && empty($users)) } | 7 | {if (empty($roles) && empty($groups) && empty($users)) } |
| 8 | -<div class="ktInfo"><p>{i18n}No roles, groups, or users have been defined or have permissions.{/i18n}</p></div> | 8 | +<div class="ktInfoMessage"><span>{i18n}No roles, groups, or users have been defined or have permissions.{/i18n}</span></div> |
| 9 | {else} | 9 | {else} |
| 10 | 10 | ||
| 11 | <form action="{$smarty.server.PHP_SELF}" method="POST"> | 11 | <form action="{$smarty.server.PHP_SELF}" method="POST"> |
templates/ktcore/folder/resolved_permissions_user.smarty
| @@ -9,7 +9,7 @@ folder due to membership of a group, or fulfilling a specific role on | @@ -9,7 +9,7 @@ folder due to membership of a group, or fulfilling a specific role on | ||
| 9 | this folder.{/i18n}</p> | 9 | this folder.{/i18n}</p> |
| 10 | 10 | ||
| 11 | {if (empty($users)) } | 11 | {if (empty($users)) } |
| 12 | -<div class="ktInfo"><p>{i18n}No users have permissions on this item.{/i18n}</p></div> | 12 | +<div class="ktInfoMessage"><span>{i18n}No users have permissions on this item.{/i18n}</span></div> |
| 13 | {else} | 13 | {else} |
| 14 | 14 | ||
| 15 | {if $edit} | 15 | {if $edit} |
templates/ktcore/folder/roles.smarty
| @@ -6,8 +6,8 @@ | @@ -6,8 +6,8 @@ | ||
| 6 | to specific groups in particular areas of the document management system. | 6 | to specific groups in particular areas of the document management system. |
| 7 | {/i18n}</p> | 7 | {/i18n}</p> |
| 8 | 8 | ||
| 9 | -<div class='ktInfo'><p><strong>{i18n}Warning:{/i18n}</strong> {i18n}Please note that changing | ||
| 10 | -role allocations may take a some time, depending on the number of folders below this one.{/i18n}</p></div> | 9 | +<div class='ktInfoMessage'><span><strong>{i18n}Warning:{/i18n}</strong> {i18n}Please note that changing |
| 10 | +role allocations may take a some time, depending on the number of folders below this one.{/i18n}</span></div> | ||
| 11 | 11 | ||
| 12 | <table class="kt_collection narrow" cellspacing="0"> | 12 | <table class="kt_collection narrow" cellspacing="0"> |
| 13 | <thead> | 13 | <thead> |
| @@ -49,7 +49,7 @@ role allocations may take a some time, depending on the number of folders below | @@ -49,7 +49,7 @@ role allocations may take a some time, depending on the number of folders below | ||
| 49 | </tr> | 49 | </tr> |
| 50 | {/foreach} | 50 | {/foreach} |
| 51 | {else} | 51 | {else} |
| 52 | -<tr><td colspan="5" class="ktInfo"><p>{i18n}No roles defined in the Role Administration area.{/i18n}</p></td></tr> | 52 | +<tr><td colspan="5" class="ktInfoMessage"><span>{i18n}No roles defined in the Role Administration area.{/i18n}</span></td></tr> |
| 53 | {/if} | 53 | {/if} |
| 54 | </tbody> | 54 | </tbody> |
| 55 | </table> | 55 | </table> |
templates/ktcore/folder/view_permissions.smarty
| @@ -13,15 +13,15 @@ assigned are shown.{/i18n}</p> | @@ -13,15 +13,15 @@ assigned are shown.{/i18n}</p> | ||
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | {if $iFolderId != 1} | 15 | {if $iFolderId != 1} |
| 16 | -<div class="ktInfo"> | 16 | +<div class="ktInfoMessage"> |
| 17 | { if $inherited } | 17 | { if $inherited } |
| 18 | -<p>{i18n arg_permission_source=$inherited}This folder <strong>inherits</strong> its permissions from #permission_source#.{/i18n} | 18 | +<span>{i18n arg_permission_source=$inherited}This folder <strong>inherits</strong> its permissions from #permission_source#.{/i18n} |
| 19 | {if $inheritable} | 19 | {if $inheritable} |
| 20 | <a class="ktActionLink ktDelete" | 20 | <a class="ktActionLink ktDelete" |
| 21 | kt:deleteMessage="{i18n}Are you sure you wish to override the permissions?{/i18n}" | 21 | kt:deleteMessage="{i18n}Are you sure you wish to override the permissions?{/i18n}" |
| 22 | href="{addQS}action=edit&fFolderId={$oFolder->getId()}&override=1{/addQS}">{i18n}Override permissions{/i18n}</a> | 22 | href="{addQS}action=edit&fFolderId={$oFolder->getId()}&override=1{/addQS}">{i18n}Override permissions{/i18n}</a> |
| 23 | {/if} | 23 | {/if} |
| 24 | -</p> | 24 | +</span> |
| 25 | { else } | 25 | { else } |
| 26 | <p>{i18n}This folder defines its own permissions.{/i18n}</p> | 26 | <p>{i18n}This folder defines its own permissions.{/i18n}</p> |
| 27 | { /if } | 27 | { /if } |
| @@ -29,7 +29,7 @@ assigned are shown.{/i18n}</p> | @@ -29,7 +29,7 @@ assigned are shown.{/i18n}</p> | ||
| 29 | { /if } | 29 | { /if } |
| 30 | 30 | ||
| 31 | {if (empty($roles) && empty($groups) && empty($users)) } | 31 | {if (empty($roles) && empty($groups) && empty($users)) } |
| 32 | -<div class="ktInfo"><p>{i18n}No roles, groups, or users have been defined or have permissions.{/i18n}</p></div> | 32 | +<div class="ktInfoMessage"><span>{i18n}No roles, groups, or users have been defined or have permissions.{/i18n}</span></div> |
| 33 | {else} | 33 | {else} |
| 34 | 34 | ||
| 35 | <table class="kt_collection narrow" cellspacing="0" cellpadding="0" border="0"> | 35 | <table class="kt_collection narrow" cellspacing="0" cellpadding="0" border="0"> |
templates/ktcore/forms/widgets/selection.smarty
| 1 | {if empty($vocab)} | 1 | {if empty($vocab)} |
| 2 | - <div class="ktInfo"><p>{$context->sEmptyMessage}</p></div> | 2 | + <div class="ktInfoMessage"><span>{$context->sEmptyMessage}</span></div> |
| 3 | {else} | 3 | {else} |
| 4 | <select name="{$name}" | 4 | <select name="{$name}" |
| 5 | {if $has_id}id="{$id}"{/if} | 5 | {if $has_id}id="{$id}"{/if} |
templates/ktcore/forms/widgets/simple_selection.smarty
templates/ktcore/login.smarty
| @@ -11,70 +11,56 @@ | @@ -11,70 +11,56 @@ | ||
| 11 | 11 | ||
| 12 | <link rel="stylesheet" href="{$rootUrl}/resources/css/kt-ie-icons.css" type="text/css" /> | 12 | <link rel="stylesheet" href="{$rootUrl}/resources/css/kt-ie-icons.css" type="text/css" /> |
| 13 | 13 | ||
| 14 | + <script type="text/javascript" src="{$rootUrl}/thirdpartyjs/curvycorners/rounded_corners.inc.js"> </script> | ||
| 15 | + <script type="text/javascript" src="{$rootUrl}/resources/js/login_loader.js"> </script> | ||
| 14 | </head> | 16 | </head> |
| 15 | -<body onload="document.getElementById('username').focus()"> | ||
| 16 | - | ||
| 17 | - <div id="{if $config->get("ui/poweredByDisabled") == '0'}loginbox_skin{else}loginbox{/if}" {if ($disclaimer)} class="hasDisclaimer" {/if}> | ||
| 18 | - | ||
| 19 | - <div id="formbox"> | ||
| 20 | - | ||
| 21 | - <form action="{$smarty.server.PHP_SELF}" method="POST" name="login"> | ||
| 22 | - <input type="hidden" name="action" value="login" /> | ||
| 23 | - <input type="hidden" name="cookieverify" value="{$cookietest}" /> | ||
| 24 | - <input type="hidden" name="redirect" value="{$redirect|escape}" /> | ||
| 25 | - {if $config->get("ui/mainLogo") != ''} | ||
| 26 | - <img src="{$config->get("ui/mainLogo")}" alt="{$config->get("ui/mainLogoTitle")}" class="logoimage"/><br /> | ||
| 27 | - {else} | ||
| 28 | - <img src="{$rootUrl}/resources/graphics/ktlogo-topbar-right.png" alt="{$appname}" class="logoimage" height="50" width="252"/><br /> | ||
| 29 | - {/if} | ||
| 30 | - | ||
| 31 | - {if ($errorMessage == null)} | ||
| 32 | - <p class="descriptiveText">{i18n}Please enter your details below to login.{/i18n}</p> | ||
| 33 | - {else} | ||
| 34 | - <div class="ktError"><p>{$errorMessage}</p></div> | ||
| 35 | - {/if} | ||
| 36 | - | ||
| 37 | - <label for="username">{i18n}Username{/i18n}</label> | ||
| 38 | - <input type="text" id="username" name="username"/> | ||
| 39 | - | ||
| 40 | - <label for="password">{i18n}Password{/i18n}</label> | ||
| 41 | - <input type="password" id="password" name="password"/> | ||
| 42 | - | ||
| 43 | - <label for="language">{i18n}Language{/i18n}</label> | ||
| 44 | - <select id="language" name="language"> | ||
| 45 | - {foreach from=$languages key=sLang item=sLanguageName} | ||
| 46 | - <option value="{$sLang}" {if $sLang == $selected_language}SELECTED="yes"{/if}>{$sLanguageName}</option> | ||
| 47 | - {/foreach} | ||
| 48 | - </select> | ||
| 49 | - | ||
| 50 | - <div class="form_actions"> | ||
| 51 | - <input type="submit" value="{i18n}login{/i18n}" /> | ||
| 52 | - </div> | ||
| 53 | - </form> | ||
| 54 | - </div> | ||
| 55 | - {if ($disclaimer)} | ||
| 56 | - <div id="disclaimerbox"> | ||
| 57 | - <p>{$disclaimer}</p> | 17 | +<body> |
| 18 | + <div id="loginbox_outer" {if ($disclaimer)} class="hasDisclaimer" {/if}> | ||
| 19 | + <div id="{if $config->get("ui/poweredByDisabled") == '0'}loginbox_skin{else}loginbox{/if}" {if ($disclaimer)} class="hasDisclaimer" {/if}> | ||
| 20 | + <div id="formbox"> | ||
| 21 | + <form action="{$smarty.server.PHP_SELF}" method="POST" name="login"> | ||
| 22 | + <input type="hidden" name="action" value="login" /> | ||
| 23 | + <input type="hidden" name="cookieverify" value="{$cookietest}" /> | ||
| 24 | + <input type="hidden" name="redirect" value="{$redirect|escape}" /> | ||
| 25 | + {if $config->get("ui/mainLogo") != ''} | ||
| 26 | + <img src="{$config->get("ui/mainLogo")}" alt="{$config->get("ui/mainLogoTitle")}" class="logoimage"/><br /> | ||
| 27 | + {else} | ||
| 28 | + <img src="{$rootUrl}/resources/graphics/ktlogo-topbar-right.png" alt="{$appname}" class="logoimage" height="50" width="252"/><br /> | ||
| 29 | + {/if} | ||
| 30 | + {if ($errorMessage == null)} | ||
| 31 | + <p class="descriptiveText">{i18n}Please enter your details below to login.{/i18n}</p> | ||
| 32 | + {else} | ||
| 33 | + <div class="ktError"><p>{$errorMessage}</p></div> | ||
| 34 | + {/if} | ||
| 35 | + <label for="username">{i18n}Username{/i18n}</label> | ||
| 36 | + <input type="text" id="username" name="username"/> | ||
| 37 | + <label for="password">{i18n}Password{/i18n}</label> | ||
| 38 | + <input type="password" id="password" name="password"/> | ||
| 39 | + | ||
| 40 | + <label for="language">{i18n}Language{/i18n}</label> | ||
| 41 | + <select id="language" name="language"> | ||
| 42 | + {foreach from=$languages key=sLang item=sLanguageName} | ||
| 43 | + <option value="{$sLang}" {if $sLang == $selected_language}SELECTED="yes"{/if}>{$sLanguageName}</option> | ||
| 44 | + {/foreach} | ||
| 45 | + </select> | ||
| 46 | + <div class="form_actions"> | ||
| 47 | + <input type="submit" value="{i18n}login{/i18n}" /> | ||
| 48 | + </div> | ||
| 49 | + </form> | ||
| 50 | + </div> | ||
| 51 | + {if ($disclaimer)} | ||
| 52 | + <div id="disclaimerbox"> | ||
| 53 | + <p>{$disclaimer}</p> | ||
| 54 | + </div> | ||
| 55 | + {/if} | ||
| 56 | + <p class="descriptiveText version"> | ||
| 57 | + {i18n arg_appname="$appname"}#appname# Version{/i18n}<br />{$versionName}<br/> | ||
| 58 | + {i18n}© 2007 <a href="http://www.knowledgetree.com/">The Jam Warehouse Software (Pty) Ltd.</a> All Rights Reserved{/i18n} | ||
| 59 | + </p> | ||
| 60 | + <div id="bottomspacer"></div> | ||
| 61 | + <div class="floatClear"></div> | ||
| 62 | + </div> | ||
| 58 | </div> | 63 | </div> |
| 59 | - {/if} | ||
| 60 | - | ||
| 61 | - <span class="descriptiveText version"> | ||
| 62 | - {i18n arg_appname="$appname"}#appname# Version{/i18n}<br />{$versionName}<br/> | ||
| 63 | - {i18n}© 2007 <a href="http://www.knowledgetree.com/">The Jam Warehouse Software (Pty) Ltd.</a> All Rights Reserved{/i18n} | ||
| 64 | - </span> | ||
| 65 | - <div id="bottomspacer"></div> | ||
| 66 | - <div id="loginboxTopLeft"></div> | ||
| 67 | - <div id="loginboxTopMiddle"></div> | ||
| 68 | - <div id="loginboxTopRight"></div> | ||
| 69 | - <div id="loginboxBottomLeft"></div> | ||
| 70 | - <div id="loginboxBottomMiddle"></div> | ||
| 71 | - <div id="loginboxBottomRight"></div> | ||
| 72 | - <div id="loginboxLeftTop"></div> | ||
| 73 | - <div id="loginboxRightTop"></div> | ||
| 74 | - <div id="loginboxLeftBottom"></div> | ||
| 75 | - <div id="loginboxRightBottom"></div> | ||
| 76 | - <div class="floatClear"></div> | ||
| 77 | - </div> | ||
| 78 | 64 | ||
| 79 | 65 | ||
| 80 | 66 |
templates/ktcore/manage_help.smarty
| @@ -30,7 +30,7 @@ via the help system and click on <strong>customise this help file</strong>.{/i18 | @@ -30,7 +30,7 @@ via the help system and click on <strong>customise this help file</strong>.{/i18 | ||
| 30 | </table> | 30 | </table> |
| 31 | 31 | ||
| 32 | {else} | 32 | {else} |
| 33 | -<div class="ktInfo"><p>{i18n}No help files have been customised.{/i18n}</p></div> | 33 | +<div class="ktInfoMessage"><span>{i18n}No help files have been customised.{/i18n}</span></div> |
| 34 | 34 | ||
| 35 | { /if } | 35 | { /if } |
| 36 | 36 |
templates/ktcore/metadata/admin/edit_lookuptree.smarty
| @@ -52,8 +52,8 @@ are immediately stored, so when you are done simply navigate back to the field m | @@ -52,8 +52,8 @@ are immediately stored, so when you are done simply navigate back to the field m | ||
| 52 | those in subcategories of the subcategory). | 52 | those in subcategories of the subcategory). |
| 53 | {/i18n}</p> | 53 | {/i18n}</p> |
| 54 | 54 | ||
| 55 | -<div class="ktInfo"><p>{i18n}No free keywords. Use the "unlink" action on a keyword to | ||
| 56 | -make it available.{/i18n}</p></div> | 55 | +<div class="ktInfoMessage"><span>{i18n}No free keywords. Use the "unlink" action on a keyword to |
| 56 | +make it available.{/i18n}</span></div> | ||
| 57 | {else} | 57 | {else} |
| 58 | <form action="{$smarty.server.PHP_SELF}" method="POST"> | 58 | <form action="{$smarty.server.PHP_SELF}" method="POST"> |
| 59 | <fieldset> | 59 | <fieldset> |
templates/ktcore/metadata/conditional/conditional_admin_overview.smarty
| @@ -8,7 +8,7 @@ values in the other fields. Only <strong>lookup</strong> fields can be added to | @@ -8,7 +8,7 @@ values in the other fields. Only <strong>lookup</strong> fields can be added to | ||
| 8 | 8 | ||
| 9 | 9 | ||
| 10 | <p> | 10 | <p> |
| 11 | - <a class="ktAction ktInfo ktActionDescribed" href="{addQS context=$context}fieldset_action=viewOverview{/addQS}">{i18n}View Overview{/i18n}</a> | 11 | + <a class="ktAction ktInfoMessage ktActionDescribed" href="{addQS context=$context}fieldset_action=viewOverview{/addQS}">{i18n}View Overview{/i18n}</a> |
| 12 | <a href="{addQS context=$context}fieldset_action=viewOverview{/addQS}">{i18n}View Overview{/i18n}</a> | 12 | <a href="{addQS context=$context}fieldset_action=viewOverview{/addQS}">{i18n}View Overview{/i18n}</a> |
| 13 | </p> | 13 | </p> |
| 14 | 14 |
templates/ktcore/metadata/conditional/manageConditional.smarty
| @@ -16,11 +16,11 @@ how the user was allowed to select the specific street (given another field).{/i | @@ -16,11 +16,11 @@ how the user was allowed to select the specific street (given another field).{/i | ||
| 16 | 16 | ||
| 17 | {if ($oMasterField && empty($free_fields))} | 17 | {if ($oMasterField && empty($free_fields))} |
| 18 | {if $sIncomplete} | 18 | {if $sIncomplete} |
| 19 | -<div class="ktInfo"> | ||
| 20 | -<p>{i18n}This conditional fieldset is marked such that it | 19 | +<div class="ktInfoMessage"> |
| 20 | +<span>{i18n}This conditional fieldset is marked such that it | ||
| 21 | cannot be used. The system automatically checks whether the fieldset is useable, | 21 | cannot be used. The system automatically checks whether the fieldset is useable, |
| 22 | and if not it will prevent it being used in a "conditional" fashion. Please correct | 22 | and if not it will prevent it being used in a "conditional" fashion. Please correct |
| 23 | -the issues identified below.{/i18n}</p> | 23 | +the issues identified below.{/i18n}</span> |
| 24 | </div> | 24 | </div> |
| 25 | {/if} | 25 | {/if} |
| 26 | 26 |
templates/ktcore/metadata/editFieldset.smarty
| @@ -109,7 +109,7 @@ to complete{/i18n}: {$sIncomplete|escape}</p> | @@ -109,7 +109,7 @@ to complete{/i18n}: {$sIncomplete|escape}</p> | ||
| 109 | {else} | 109 | {else} |
| 110 | 110 | ||
| 111 | {if $context->haveConditional()} | 111 | {if $context->haveConditional()} |
| 112 | -<div class="ktInfo"><p>{i18n}This fieldset cannot be made conditional, since it contains fields which are not lookup types.{/i18n}</p></div> | 112 | +<div class="ktInfoMessage"><span>{i18n}This fieldset cannot be made conditional, since it contains fields which are not lookup types.{/i18n}</span></div> |
| 113 | {/if} | 113 | {/if} |
| 114 | 114 | ||
| 115 | {/if} | 115 | {/if} |
templates/ktcore/misc/columns/edit_view.smarty
| @@ -28,7 +28,7 @@ have multiple copies of a given column in a specific view this is not recommende | @@ -28,7 +28,7 @@ have multiple copies of a given column in a specific view this is not recommende | ||
| 28 | </tbody> | 28 | </tbody> |
| 29 | </table> | 29 | </table> |
| 30 | {else} | 30 | {else} |
| 31 | -<div class="ktInfo"><p>{i18n}No columns have been added to this view{/i18n}</p></div> | 31 | +<div class="ktInfoMessage"><span>{i18n}No columns have been added to this view{/i18n}</span></div> |
| 32 | {/if} | 32 | {/if} |
| 33 | 33 | ||
| 34 | <form method="POST" action="{$smarty.server.PHP_SELF}"> | 34 | <form method="POST" action="{$smarty.server.PHP_SELF}"> |
templates/ktcore/misc/notification_overflow.smarty
| @@ -13,5 +13,5 @@ | @@ -13,5 +13,5 @@ | ||
| 13 | <p>{i18n arg_batch=$batch_html}Page: #batch#{/i18n}</p> | 13 | <p>{i18n arg_batch=$batch_html}Page: #batch#{/i18n}</p> |
| 14 | 14 | ||
| 15 | {else} | 15 | {else} |
| 16 | -<div class="ktInfo"><p>{i18n}No items require your attention{/i18n}</p></div> | 16 | +<div class="ktInfoMessage"><span>{i18n}No items require your attention{/i18n}</span></div> |
| 17 | {/if} | 17 | {/if} |
templates/ktcore/principals/roleadmin.smarty
| @@ -61,7 +61,7 @@ | @@ -61,7 +61,7 @@ | ||
| 61 | {/foreach} | 61 | {/foreach} |
| 62 | {else} | 62 | {else} |
| 63 | <tr> | 63 | <tr> |
| 64 | - <td class="ktInfo" colspan="3"><p>{i18n}There are currently no roles created within the system.{/i18n}</td> | 64 | + <td class="ktInfoMessage" colspan="3"><span>{i18n}There are currently no roles created within the system.{/i18n}</td> |
| 65 | </tr> | 65 | </tr> |
| 66 | {/if} | 66 | {/if} |
| 67 | </tbody> | 67 | </tbody> |
templates/ktcore/principals/useradmin.smarty
| @@ -38,7 +38,7 @@ system.{/i18n}</p> | @@ -38,7 +38,7 @@ system.{/i18n}</p> | ||
| 38 | 38 | ||
| 39 | {else} | 39 | {else} |
| 40 | 40 | ||
| 41 | -<div class="ktInfo"><p>{i18n}You do not have enough available licenses to add more active users. Please disable some existing ones if you wish to add new active users.{/i18n}</p></div> | 41 | +<div class="ktInfoMessage"><span>{i18n}You do not have enough available licenses to add more active users. Please disable some existing ones if you wish to add new active users.{/i18n}</span></div> |
| 42 | 42 | ||
| 43 | {/if} | 43 | {/if} |
| 44 | 44 |
templates/ktcore/search/administration/conditions.smarty
| @@ -37,5 +37,5 @@ | @@ -37,5 +37,5 @@ | ||
| 37 | </tbody> | 37 | </tbody> |
| 38 | </table> | 38 | </table> |
| 39 | {else} | 39 | {else} |
| 40 | -<div class="ktInfo"><p>{i18n}No Conditions have been defined.{/i18n}</p></div> | 40 | +<div class="ktInfoMessage"><span>{i18n}No Conditions have been defined.{/i18n}</span></div> |
| 41 | {/if} | 41 | {/if} |
templates/ktcore/search/administration/savedsearches.smarty
| @@ -42,5 +42,5 @@ newsletters, etc.) based on a category or fieldset value.{/i18n}</p> | @@ -42,5 +42,5 @@ newsletters, etc.) based on a category or fieldset value.{/i18n}</p> | ||
| 42 | </tbody> | 42 | </tbody> |
| 43 | </table> | 43 | </table> |
| 44 | {else} | 44 | {else} |
| 45 | -<div class="ktInfo"><p>{i18n}No Saved Searches have been defined.{/i18n}</p></div> | 45 | +<div class="ktInfoMessage"><span>{i18n}No Saved Searches have been defined.{/i18n}</span></div> |
| 46 | {/if} | 46 | {/if} |
templates/ktcore/workflow/admin/managepermissions.smarty
| 1 | <h2>{i18n arg_statename=$context->oState->getName()}Manage Permissions: #statename#{/i18n}</h2> | 1 | <h2>{i18n arg_statename=$context->oState->getName()}Manage Permissions: #statename#{/i18n}</h2> |
| 2 | 2 | ||
| 3 | {if empty($perm_grid)} | 3 | {if empty($perm_grid)} |
| 4 | -<div class="ktInfo"><p>{i18n}No permissions are controlled by this state. | ||
| 5 | -Indicate below which permissions are controlled to allocate them.{/i18n}</p></div> | 4 | +<div class="ktInfoMessage"><span>{i18n}No permissions are controlled by this state. |
| 5 | +Indicate below which permissions are controlled to allocate them.{/i18n}</span></div> | ||
| 6 | {else} | 6 | {else} |
| 7 | 7 | ||
| 8 | <p class="descriptiveText">{i18n}Once you've selected the permissions you want to control | 8 | <p class="descriptiveText">{i18n}Once you've selected the permissions you want to control |
templates/ktcore/workflow/admin/restrictions_edit.smarty
| @@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
| 7 | <br /> | 7 | <br /> |
| 8 | 8 | ||
| 9 | {if empty($aGuardTriggers)} | 9 | {if empty($aGuardTriggers)} |
| 10 | - <div class="ktInfo"><p>{i18n}Anybody (with the ability to see the document) can perform this transition.{/i18n}</p></div> | 10 | + <div class="ktInfoMessage"><span>{i18n}Anybody (with the ability to see the document) can perform this transition.{/i18n}</span></div> |
| 11 | {else} | 11 | {else} |
| 12 | 12 | ||
| 13 | <table class="kt_collection narrow" cellspacing="0"> | 13 | <table class="kt_collection narrow" cellspacing="0"> |
templates/ktcore/workflow/admin/transition_actions_edit.smarty
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | <br /> | 5 | <br /> |
| 6 | 6 | ||
| 7 | {if empty($aActionTriggers)} | 7 | {if empty($aActionTriggers)} |
| 8 | - <div class="ktInfo"><p>{i18n}This transition has no actions associated with it..{/i18n}</p></div> | 8 | + <div class="ktInfoMessage"><span>{i18n}This transition has no actions associated with it..{/i18n}</span></div> |
| 9 | {else} | 9 | {else} |
| 10 | 10 | ||
| 11 | <table class="kt_collection narrow" cellspacing="0"> | 11 | <table class="kt_collection narrow" cellspacing="0"> |
templates/ktcore/workflow/admin/view.smarty
| @@ -13,5 +13,5 @@ about states, transitions, security and notifications as they apply to this work | @@ -13,5 +13,5 @@ about states, transitions, security and notifications as they apply to this work | ||
| 13 | <iframe src="{addQS context=$context}action=graphrepresentation{/addQS}" style="width: 100%; height: 400px; border: 1px solid black;" /> | 13 | <iframe src="{addQS context=$context}action=graphrepresentation{/addQS}" style="width: 100%; height: 400px; border: 1px solid black;" /> |
| 14 | {* <img src="{addQS context=$context}action=graphrepresentation{/addQS}" /> *} | 14 | {* <img src="{addQS context=$context}action=graphrepresentation{/addQS}" /> *} |
| 15 | {else} | 15 | {else} |
| 16 | -<div class="ktInfo"><p>{i18n}Install the GraphViz module to get a useful visualisation of your graph here.{/i18n}</p></div> | 16 | +<div class="ktInfoMessage"><span>{i18n}Install the GraphViz module to get a useful visualisation of your graph here.{/i18n}</span></div> |
| 17 | {/if} | 17 | {/if} |
templates/ktcore/workflow/createState.smarty
| @@ -63,7 +63,7 @@ this state.{/i18n}</p> | @@ -63,7 +63,7 @@ this state.{/i18n}</p> | ||
| 63 | 63 | ||
| 64 | 64 | ||
| 65 | {else} | 65 | {else} |
| 66 | -<div class="ktInfo"<p>{i18n}No actions are controlled by this workflow.{/i18n}</p></div> | 66 | +<div class="ktInfoMessage"<span>{i18n}No actions are controlled by this workflow.{/i18n}</span></div> |
| 67 | {/if} | 67 | {/if} |
| 68 | </div> | 68 | </div> |
| 69 | 69 |
templates/ktcore/workflow/documentWorkflow.smarty
| @@ -64,17 +64,17 @@ at the beginning of the new workflow. <strong>This is true even if the new work | @@ -64,17 +64,17 @@ at the beginning of the new workflow. <strong>This is true even if the new work | ||
| 64 | </div> | 64 | </div> |
| 65 | </form> | 65 | </form> |
| 66 | {else} | 66 | {else} |
| 67 | -<div class="ktInfo"> | ||
| 68 | -<p>{i18n}You do not have permission to change the workflow that is assigned to this document.{/i18n}</p> | 67 | +<div class="ktInfoMessage"> |
| 68 | +<span>{i18n}You do not have permission to change the workflow that is assigned to this document.{/i18n}</span> | ||
| 69 | </div> | 69 | </div> |
| 70 | {/if} | 70 | {/if} |
| 71 | {else} | 71 | {else} |
| 72 | <h3>{i18n}No defined workflows{/i18n}</h3> | 72 | <h3>{i18n}No defined workflows{/i18n}</h3> |
| 73 | -<div class="ktInfo"> | ||
| 74 | -<p>{i18n}There are no defined workflows which can be started on this | 73 | +<div class="ktInfoMessage"> |
| 74 | +<span>{i18n}There are no defined workflows which can be started on this | ||
| 75 | document. An administrator can create workflows to map the lifecycle of | 75 | document. An administrator can create workflows to map the lifecycle of |
| 76 | a document. Contact your administrator to discuss | 76 | a document. Contact your administrator to discuss |
| 77 | -workflows.{/i18n}</p> | 77 | +workflows.{/i18n}</span> |
| 78 | </div> | 78 | </div> |
| 79 | {/if} | 79 | {/if} |
| 80 | </fieldset> | 80 | </fieldset> |
templates/ktcore/workflow/editState.smarty
| @@ -71,7 +71,7 @@ informed when this state is reached.{/i18n}</p> | @@ -71,7 +71,7 @@ informed when this state is reached.{/i18n}</p> | ||
| 71 | {/if} | 71 | {/if} |
| 72 | 72 | ||
| 73 | {if (empty($aGroups) && empty($aRoles))} | 73 | {if (empty($aGroups) && empty($aRoles))} |
| 74 | -<div class="ktInfo"><p>{i18n}No groups or roles are defined in the DMS.{/i18n}</p></div> | 74 | +<div class="ktInfoMessage"><span>{i18n}No groups or roles are defined in the DMS.{/i18n}</span></div> |
| 75 | {else} | 75 | {else} |
| 76 | <div class="form_actions"> | 76 | <div class="form_actions"> |
| 77 | <input type="submit" value="{i18n}Update users to inform{/i18n}" /> | 77 | <input type="submit" value="{i18n}Update users to inform{/i18n}" /> |
| @@ -112,7 +112,7 @@ title="Transition | @@ -112,7 +112,7 @@ title="Transition | ||
| 112 | 112 | ||
| 113 | {/if} | 113 | {/if} |
| 114 | {else} | 114 | {else} |
| 115 | -<div class="ktInfo"><p>{i18n}No transitions lead to this state.{/i18n}</p></div> | 115 | +<div class="ktInfoMessage"><span>{i18n}No transitions lead to this state.{/i18n}</span></div> |
| 116 | {/if} | 116 | {/if} |
| 117 | 117 | ||
| 118 | <h3>{i18n}Transitions from this state{/i18n}</h3> | 118 | <h3>{i18n}Transitions from this state{/i18n}</h3> |
| @@ -127,7 +127,7 @@ title="Transition | @@ -127,7 +127,7 @@ title="Transition | ||
| 127 | <input type="submit" name="submit" value="{i18n}Save{/i18n}" /> | 127 | <input type="submit" name="submit" value="{i18n}Save{/i18n}" /> |
| 128 | </div> | 128 | </div> |
| 129 | {else} | 129 | {else} |
| 130 | -<div class="ktInfo"><p>{i18n}No transitions have been defined for this workflow.{/i18n}</p></div> | 130 | +<div class="ktInfoMessage"><span>{i18n}No transitions have been defined for this workflow.{/i18n}</span></div> |
| 131 | {/if} | 131 | {/if} |
| 132 | </form> | 132 | </form> |
| 133 | </fieldset> | 133 | </fieldset> |
| @@ -153,8 +153,8 @@ title="Transition | @@ -153,8 +153,8 @@ title="Transition | ||
| 153 | </fieldset> | 153 | </fieldset> |
| 154 | </form> | 154 | </form> |
| 155 | {else} | 155 | {else} |
| 156 | -<div class="ktInfo"><p>{i18n}No actions are controlled by this workflow, so all actions are available when | ||
| 157 | -documents are in this state.{/i18n}</p></div> | 156 | +<div class="ktInfoMessage"><span>{i18n}No actions are controlled by this workflow, so all actions are available when |
| 157 | +documents are in this state.{/i18n}</span></div> | ||
| 158 | {/if} | 158 | {/if} |
| 159 | 159 | ||
| 160 | 160 | ||
| @@ -223,7 +223,7 @@ documents are in this state.{/i18n}</p></div> | @@ -223,7 +223,7 @@ documents are in this state.{/i18n}</p></div> | ||
| 223 | {/if} | 223 | {/if} |
| 224 | 224 | ||
| 225 | {else} | 225 | {else} |
| 226 | -<div class="ktInfo"><p>{i18n arg_appname="$appname"}No permissions have been created within #appname#.{/i18n}</p></div> | 226 | +<div class="ktInfoMessage"><span>{i18n arg_appname="$appname"}No permissions have been created within #appname#.{/i18n}</span></div> |
| 227 | {/if} | 227 | {/if} |
| 228 | 228 | ||
| 229 | 229 |
templates/ktcore/workflow/editTransition.smarty
| @@ -54,7 +54,7 @@ requirement.{/i18n}</p> | @@ -54,7 +54,7 @@ requirement.{/i18n}</p> | ||
| 54 | <p class="descriptiveText">{i18n}Items which control whether a given user can perform this transition | 54 | <p class="descriptiveText">{i18n}Items which control whether a given user can perform this transition |
| 55 | on a specific document. <strong>All of these must allow the user to perform the transition.</strong>{/i18n}</p> | 55 | on a specific document. <strong>All of these must allow the user to perform the transition.</strong>{/i18n}</p> |
| 56 | {if empty($aGuardTriggers)} | 56 | {if empty($aGuardTriggers)} |
| 57 | - <div class="ktInfo"><p>{i18n}Anybody (with the ability to see the document) can perform this transition.{/i18n}</p></div> | 57 | + <div class="ktInfoMessage"><span>{i18n}Anybody (with the ability to see the document) can perform this transition.{/i18n}</span></div> |
| 58 | {else} | 58 | {else} |
| 59 | 59 | ||
| 60 | <table class="kt_collection narrow" cellspacing="0"> | 60 | <table class="kt_collection narrow" cellspacing="0"> |
| @@ -83,7 +83,7 @@ requirement.{/i18n}</p> | @@ -83,7 +83,7 @@ requirement.{/i18n}</p> | ||
| 83 | 83 | ||
| 84 | <p class="descriptiveText">{i18n}Actions which are performed when the document follows the transition.{/i18n}</p> | 84 | <p class="descriptiveText">{i18n}Actions which are performed when the document follows the transition.{/i18n}</p> |
| 85 | {if empty($aActionTriggers)} | 85 | {if empty($aActionTriggers)} |
| 86 | - <div class="ktInfo"><p>{i18n}No actions are performed when this transition occurs.{/i18n}</p></div> | 86 | + <div class="ktInfoMessage"><span>{i18n}No actions are performed when this transition occurs.{/i18n}</span></div> |
| 87 | {else} | 87 | {else} |
| 88 | 88 | ||
| 89 | <table class="kt_collection narrow" cellspacing="0"> | 89 | <table class="kt_collection narrow" cellspacing="0"> |
templates/ktcore/workflow/editWorkflow.smarty
| @@ -23,7 +23,7 @@ workflow. To modify items, either select them from the overview below, | @@ -23,7 +23,7 @@ workflow. To modify items, either select them from the overview below, | ||
| 23 | or use the "Workflow" menu on the left to create new ones.{/i18n}</p> | 23 | or use the "Workflow" menu on the left to create new ones.{/i18n}</p> |
| 24 | 24 | ||
| 25 | {if (empty($workflow_info.states))} | 25 | {if (empty($workflow_info.states))} |
| 26 | -<div class="ktInfo"><p>{i18n}This workflow does not define any states.{/i18n}</p></div> | 26 | +<div class="ktInfoMessage"><span>{i18n}This workflow does not define any states.{/i18n}</span></div> |
| 27 | {else} | 27 | {else} |
| 28 | <ul id="workflow-states-list"> | 28 | <ul id="workflow-states-list"> |
| 29 | {foreach item=oState from=$workflow_info.states} | 29 | {foreach item=oState from=$workflow_info.states} |
templates/ktcore/workflow/manageActions.smarty
| @@ -40,8 +40,8 @@ are available to users whose permissions would normally allow them when the docu | @@ -40,8 +40,8 @@ are available to users whose permissions would normally allow them when the docu | ||
| 40 | in that state. Unchecked items are not available to any users.{/i18n}</p> | 40 | in that state. Unchecked items are not available to any users.{/i18n}</p> |
| 41 | 41 | ||
| 42 | {if (empty($aActionsSelected))} | 42 | {if (empty($aActionsSelected))} |
| 43 | -<div class="ktInfo"><p>{i18n}No actions are controlled by this workflow. All actions | ||
| 44 | -will be available at all states.{/i18n}</p></div> | 43 | +<div class="ktInfoMessage"><span>{i18n}No actions are controlled by this workflow. All actions |
| 44 | +will be available at all states.{/i18n}</span></div> | ||
| 45 | {else} | 45 | {else} |
| 46 | <form action="{$smarty.server.PHP_SELF}" method="POST"> | 46 | <form action="{$smarty.server.PHP_SELF}" method="POST"> |
| 47 | <input type="hidden" name="action" value="updateActionAvailability" /> | 47 | <input type="hidden" name="action" value="updateActionAvailability" /> |
templates/ktcore/workflow/manageStates.smarty
| @@ -20,7 +20,7 @@ various different states for documents.{/i18n}</p> | @@ -20,7 +20,7 @@ various different states for documents.{/i18n}</p> | ||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | {if (empty($workflow_info.states))} | 22 | {if (empty($workflow_info.states))} |
| 23 | -<div class="ktInfo"><p>{i18n}This workflow does not define any states.{/i18n}</p></div> | 23 | +<div class="ktInfoMessage"><span>{i18n}This workflow does not define any states.{/i18n}</span></div> |
| 24 | {else} | 24 | {else} |
| 25 | <ul id="workflow-states-list"> | 25 | <ul id="workflow-states-list"> |
| 26 | {foreach item=oState from=$workflow_info.states} | 26 | {foreach item=oState from=$workflow_info.states} |
templates/ktcore/workflow/manageTransitions.smarty
| @@ -21,8 +21,8 @@ while the workflow has no documents or document-versions assigned to the workflo | @@ -21,8 +21,8 @@ while the workflow has no documents or document-versions assigned to the workflo | ||
| 21 | </fieldset> | 21 | </fieldset> |
| 22 | 22 | ||
| 23 | {if (empty($workflow_info.transitions))} | 23 | {if (empty($workflow_info.transitions))} |
| 24 | -<div class="ktInfo"><p>{i18n}This workflow does not define any transitions. Use the "Create a new transition" link above | ||
| 25 | -to add new transitions.{/i18n}</p></div> | 24 | +<div class="ktInfoMessage"><span>{i18n}This workflow does not define any transitions. Use the "Create a new transition" link above |
| 25 | +to add new transitions.{/i18n}</span></div> | ||
| 26 | {else} | 26 | {else} |
| 27 | <h3>{i18n}Transition Availability{/i18n}</h3> | 27 | <h3>{i18n}Transition Availability{/i18n}</h3> |
| 28 | 28 |
templates/ktstandard/action/link.smarty
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | </div> | 14 | </div> |
| 15 | </form> | 15 | </form> |
| 16 | {else} | 16 | {else} |
| 17 | -<div class="ktInfo"><p> | ||
| 18 | -{i18n}No link types are defined. Please ask the administrator to add them.{/i18n}</p></div> | 17 | +<div class="ktInfoMessage"><span> |
| 18 | +{i18n}No link types are defined. Please ask the administrator to add them.{/i18n}</span></div> | ||
| 19 | 19 | ||
| 20 | {/if} | 20 | {/if} |
| 21 | \ No newline at end of file | 21 | \ No newline at end of file |
templates/ktstandard/authentication/ldapsearchgroup.smarty
| @@ -16,9 +16,9 @@ begin.{/i18n}</p> | @@ -16,9 +16,9 @@ begin.{/i18n}</p> | ||
| 16 | </form> | 16 | </form> |
| 17 | 17 | ||
| 18 | {if !$search_results} | 18 | {if !$search_results} |
| 19 | - <div class="ktInfo"> | 19 | + <div class="ktInfoMessage"> |
| 20 | <!-- never show a very large set, if you can help it. --> | 20 | <!-- never show a very large set, if you can help it. --> |
| 21 | - <p>{i18n}No search specified, or no results for your search. Please choose some criteria from the list above to find groups.{/i18n}</p> | 21 | + <span>{i18n}No search specified, or no results for your search. Please choose some criteria from the list above to find groups.{/i18n}</span> |
| 22 | </div> | 22 | </div> |
| 23 | {else} | 23 | {else} |
| 24 | <form method="POST" action="{$smarty.server.PHP_SELF}"> | 24 | <form method="POST" action="{$smarty.server.PHP_SELF}"> |
templates/ktstandard/authentication/ldapsearchuser.smarty
| @@ -22,9 +22,9 @@ begin.{/i18n}</p> | @@ -22,9 +22,9 @@ begin.{/i18n}</p> | ||
| 22 | </form> | 22 | </form> |
| 23 | 23 | ||
| 24 | {if !$search_results} | 24 | {if !$search_results} |
| 25 | - <div class="ktInfo"> | 25 | + <div class="ktInfoMessage"> |
| 26 | <!-- never show a very large set, if you can help it. --> | 26 | <!-- never show a very large set, if you can help it. --> |
| 27 | - <p>{i18n}No search specified, or no results for your search. Please choose some criteria from the list above to find users.{/i18n}</p> | 27 | + <span>{i18n}No search specified, or no results for your search. Please choose some criteria from the list above to find users.{/i18n}</span> |
| 28 | </div> | 28 | </div> |
| 29 | {else} | 29 | {else} |
| 30 | <form method="POST" action="{$smarty.server.PHP_SELF}"> | 30 | <form method="POST" action="{$smarty.server.PHP_SELF}"> |
thirdpartyjs/curvycorners/lgpl.txt
0 โ 100644
| 1 | + GNU LESSER GENERAL PUBLIC LICENSE | ||
| 2 | + Version 2.1, February 1999 | ||
| 3 | + | ||
| 4 | + Copyright (C) 1991, 1999 Free Software Foundation, Inc. | ||
| 5 | + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA | ||
| 6 | + Everyone is permitted to copy and distribute verbatim copies | ||
| 7 | + of this license document, but changing it is not allowed. | ||
| 8 | + | ||
| 9 | +[This is the first released version of the Lesser GPL. It also counts | ||
| 10 | + as the successor of the GNU Library Public License, version 2, hence | ||
| 11 | + the version number 2.1.] | ||
| 12 | + | ||
| 13 | + Preamble | ||
| 14 | + | ||
| 15 | + The licenses for most software are designed to take away your | ||
| 16 | +freedom to share and change it. By contrast, the GNU General Public | ||
| 17 | +Licenses are intended to guarantee your freedom to share and change | ||
| 18 | +free software--to make sure the software is free for all its users. | ||
| 19 | + | ||
| 20 | + This license, the Lesser General Public License, applies to some | ||
| 21 | +specially designated software packages--typically libraries--of the | ||
| 22 | +Free Software Foundation and other authors who decide to use it. You | ||
| 23 | +can use it too, but we suggest you first think carefully about whether | ||
| 24 | +this license or the ordinary General Public License is the better | ||
| 25 | +strategy to use in any particular case, based on the explanations below. | ||
| 26 | + | ||
| 27 | + When we speak of free software, we are referring to freedom of use, | ||
| 28 | +not price. Our General Public Licenses are designed to make sure that | ||
| 29 | +you have the freedom to distribute copies of free software (and charge | ||
| 30 | +for this service if you wish); that you receive source code or can get | ||
| 31 | +it if you want it; that you can change the software and use pieces of | ||
| 32 | +it in new free programs; and that you are informed that you can do | ||
| 33 | +these things. | ||
| 34 | + | ||
| 35 | + To protect your rights, we need to make restrictions that forbid | ||
| 36 | +distributors to deny you these rights or to ask you to surrender these | ||
| 37 | +rights. These restrictions translate to certain responsibilities for | ||
| 38 | +you if you distribute copies of the library or if you modify it. | ||
| 39 | + | ||
| 40 | + For example, if you distribute copies of the library, whether gratis | ||
| 41 | +or for a fee, you must give the recipients all the rights that we gave | ||
| 42 | +you. You must make sure that they, too, receive or can get the source | ||
| 43 | +code. If you link other code with the library, you must provide | ||
| 44 | +complete object files to the recipients, so that they can relink them | ||
| 45 | +with the library after making changes to the library and recompiling | ||
| 46 | +it. And you must show them these terms so they know their rights. | ||
| 47 | + | ||
| 48 | + We protect your rights with a two-step method: (1) we copyright the | ||
| 49 | +library, and (2) we offer you this license, which gives you legal | ||
| 50 | +permission to copy, distribute and/or modify the library. | ||
| 51 | + | ||
| 52 | + To protect each distributor, we want to make it very clear that | ||
| 53 | +there is no warranty for the free library. Also, if the library is | ||
| 54 | +modified by someone else and passed on, the recipients should know | ||
| 55 | +that what they have is not the original version, so that the original | ||
| 56 | +author's reputation will not be affected by problems that might be | ||
| 57 | +introduced by others. | ||
| 58 | + | ||
| 59 | + Finally, software patents pose a constant threat to the existence of | ||
| 60 | +any free program. We wish to make sure that a company cannot | ||
| 61 | +effectively restrict the users of a free program by obtaining a | ||
| 62 | +restrictive license from a patent holder. Therefore, we insist that | ||
| 63 | +any patent license obtained for a version of the library must be | ||
| 64 | +consistent with the full freedom of use specified in this license. | ||
| 65 | + | ||
| 66 | + Most GNU software, including some libraries, is covered by the | ||
| 67 | +ordinary GNU General Public License. This license, the GNU Lesser | ||
| 68 | +General Public License, applies to certain designated libraries, and | ||
| 69 | +is quite different from the ordinary General Public License. We use | ||
| 70 | +this license for certain libraries in order to permit linking those | ||
| 71 | +libraries into non-free programs. | ||
| 72 | + | ||
| 73 | + When a program is linked with a library, whether statically or using | ||
| 74 | +a shared library, the combination of the two is legally speaking a | ||
| 75 | +combined work, a derivative of the original library. The ordinary | ||
| 76 | +General Public License therefore permits such linking only if the | ||
| 77 | +entire combination fits its criteria of freedom. The Lesser General | ||
| 78 | +Public License permits more lax criteria for linking other code with | ||
| 79 | +the library. | ||
| 80 | + | ||
| 81 | + We call this license the "Lesser" General Public License because it | ||
| 82 | +does Less to protect the user's freedom than the ordinary General | ||
| 83 | +Public License. It also provides other free software developers Less | ||
| 84 | +of an advantage over competing non-free programs. These disadvantages | ||
| 85 | +are the reason we use the ordinary General Public License for many | ||
| 86 | +libraries. However, the Lesser license provides advantages in certain | ||
| 87 | +special circumstances. | ||
| 88 | + | ||
| 89 | + For example, on rare occasions, there may be a special need to | ||
| 90 | +encourage the widest possible use of a certain library, so that it becomes | ||
| 91 | +a de-facto standard. To achieve this, non-free programs must be | ||
| 92 | +allowed to use the library. A more frequent case is that a free | ||
| 93 | +library does the same job as widely used non-free libraries. In this | ||
| 94 | +case, there is little to gain by limiting the free library to free | ||
| 95 | +software only, so we use the Lesser General Public License. | ||
| 96 | + | ||
| 97 | + In other cases, permission to use a particular library in non-free | ||
| 98 | +programs enables a greater number of people to use a large body of | ||
| 99 | +free software. For example, permission to use the GNU C Library in | ||
| 100 | +non-free programs enables many more people to use the whole GNU | ||
| 101 | +operating system, as well as its variant, the GNU/Linux operating | ||
| 102 | +system. | ||
| 103 | + | ||
| 104 | + Although the Lesser General Public License is Less protective of the | ||
| 105 | +users' freedom, it does ensure that the user of a program that is | ||
| 106 | +linked with the Library has the freedom and the wherewithal to run | ||
| 107 | +that program using a modified version of the Library. | ||
| 108 | + | ||
| 109 | + The precise terms and conditions for copying, distribution and | ||
| 110 | +modification follow. Pay close attention to the difference between a | ||
| 111 | +"work based on the library" and a "work that uses the library". The | ||
| 112 | +former contains code derived from the library, whereas the latter must | ||
| 113 | +be combined with the library in order to run. | ||
| 114 | + | ||
| 115 | + GNU LESSER GENERAL PUBLIC LICENSE | ||
| 116 | + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION | ||
| 117 | + | ||
| 118 | + 0. This License Agreement applies to any software library or other | ||
| 119 | +program which contains a notice placed by the copyright holder or | ||
| 120 | +other authorized party saying it may be distributed under the terms of | ||
| 121 | +this Lesser General Public License (also called "this License"). | ||
| 122 | +Each licensee is addressed as "you". | ||
| 123 | + | ||
| 124 | + A "library" means a collection of software functions and/or data | ||
| 125 | +prepared so as to be conveniently linked with application programs | ||
| 126 | +(which use some of those functions and data) to form executables. | ||
| 127 | + | ||
| 128 | + The "Library", below, refers to any such software library or work | ||
| 129 | +which has been distributed under these terms. A "work based on the | ||
| 130 | +Library" means either the Library or any derivative work under | ||
| 131 | +copyright law: that is to say, a work containing the Library or a | ||
| 132 | +portion of it, either verbatim or with modifications and/or translated | ||
| 133 | +straightforwardly into another language. (Hereinafter, translation is | ||
| 134 | +included without limitation in the term "modification".) | ||
| 135 | + | ||
| 136 | + "Source code" for a work means the preferred form of the work for | ||
| 137 | +making modifications to it. For a library, complete source code means | ||
| 138 | +all the source code for all modules it contains, plus any associated | ||
| 139 | +interface definition files, plus the scripts used to control compilation | ||
| 140 | +and installation of the library. | ||
| 141 | + | ||
| 142 | + Activities other than copying, distribution and modification are not | ||
| 143 | +covered by this License; they are outside its scope. The act of | ||
| 144 | +running a program using the Library is not restricted, and output from | ||
| 145 | +such a program is covered only if its contents constitute a work based | ||
| 146 | +on the Library (independent of the use of the Library in a tool for | ||
| 147 | +writing it). Whether that is true depends on what the Library does | ||
| 148 | +and what the program that uses the Library does. | ||
| 149 | + | ||
| 150 | + 1. You may copy and distribute verbatim copies of the Library's | ||
| 151 | +complete source code as you receive it, in any medium, provided that | ||
| 152 | +you conspicuously and appropriately publish on each copy an | ||
| 153 | +appropriate copyright notice and disclaimer of warranty; keep intact | ||
| 154 | +all the notices that refer to this License and to the absence of any | ||
| 155 | +warranty; and distribute a copy of this License along with the | ||
| 156 | +Library. | ||
| 157 | + | ||
| 158 | + You may charge a fee for the physical act of transferring a copy, | ||
| 159 | +and you may at your option offer warranty protection in exchange for a | ||
| 160 | +fee. | ||
| 161 | + | ||
| 162 | + 2. You may modify your copy or copies of the Library or any portion | ||
| 163 | +of it, thus forming a work based on the Library, and copy and | ||
| 164 | +distribute such modifications or work under the terms of Section 1 | ||
| 165 | +above, provided that you also meet all of these conditions: | ||
| 166 | + | ||
| 167 | + a) The modified work must itself be a software library. | ||
| 168 | + | ||
| 169 | + b) You must cause the files modified to carry prominent notices | ||
| 170 | + stating that you changed the files and the date of any change. | ||
| 171 | + | ||
| 172 | + c) You must cause the whole of the work to be licensed at no | ||
| 173 | + charge to all third parties under the terms of this License. | ||
| 174 | + | ||
| 175 | + d) If a facility in the modified Library refers to a function or a | ||
| 176 | + table of data to be supplied by an application program that uses | ||
| 177 | + the facility, other than as an argument passed when the facility | ||
| 178 | + is invoked, then you must make a good faith effort to ensure that, | ||
| 179 | + in the event an application does not supply such function or | ||
| 180 | + table, the facility still operates, and performs whatever part of | ||
| 181 | + its purpose remains meaningful. | ||
| 182 | + | ||
| 183 | + (For example, a function in a library to compute square roots has | ||
| 184 | + a purpose that is entirely well-defined independent of the | ||
| 185 | + application. Therefore, Subsection 2d requires that any | ||
| 186 | + application-supplied function or table used by this function must | ||
| 187 | + be optional: if the application does not supply it, the square | ||
| 188 | + root function must still compute square roots.) | ||
| 189 | + | ||
| 190 | +These requirements apply to the modified work as a whole. If | ||
| 191 | +identifiable sections of that work are not derived from the Library, | ||
| 192 | +and can be reasonably considered independent and separate works in | ||
| 193 | +themselves, then this License, and its terms, do not apply to those | ||
| 194 | +sections when you distribute them as separate works. But when you | ||
| 195 | +distribute the same sections as part of a whole which is a work based | ||
| 196 | +on the Library, the distribution of the whole must be on the terms of | ||
| 197 | +this License, whose permissions for other licensees extend to the | ||
| 198 | +entire whole, and thus to each and every part regardless of who wrote | ||
| 199 | +it. | ||
| 200 | + | ||
| 201 | +Thus, it is not the intent of this section to claim rights or contest | ||
| 202 | +your rights to work written entirely by you; rather, the intent is to | ||
| 203 | +exercise the right to control the distribution of derivative or | ||
| 204 | +collective works based on the Library. | ||
| 205 | + | ||
| 206 | +In addition, mere aggregation of another work not based on the Library | ||
| 207 | +with the Library (or with a work based on the Library) on a volume of | ||
| 208 | +a storage or distribution medium does not bring the other work under | ||
| 209 | +the scope of this License. | ||
| 210 | + | ||
| 211 | + 3. You may opt to apply the terms of the ordinary GNU General Public | ||
| 212 | +License instead of this License to a given copy of the Library. To do | ||
| 213 | +this, you must alter all the notices that refer to this License, so | ||
| 214 | +that they refer to the ordinary GNU General Public License, version 2, | ||
| 215 | +instead of to this License. (If a newer version than version 2 of the | ||
| 216 | +ordinary GNU General Public License has appeared, then you can specify | ||
| 217 | +that version instead if you wish.) Do not make any other change in | ||
| 218 | +these notices. | ||
| 219 | + | ||
| 220 | + Once this change is made in a given copy, it is irreversible for | ||
| 221 | +that copy, so the ordinary GNU General Public License applies to all | ||
| 222 | +subsequent copies and derivative works made from that copy. | ||
| 223 | + | ||
| 224 | + This option is useful when you wish to copy part of the code of | ||
| 225 | +the Library into a program that is not a library. | ||
| 226 | + | ||
| 227 | + 4. You may copy and distribute the Library (or a portion or | ||
| 228 | +derivative of it, under Section 2) in object code or executable form | ||
| 229 | +under the terms of Sections 1 and 2 above provided that you accompany | ||
| 230 | +it with the complete corresponding machine-readable source code, which | ||
| 231 | +must be distributed under the terms of Sections 1 and 2 above on a | ||
| 232 | +medium customarily used for software interchange. | ||
| 233 | + | ||
| 234 | + If distribution of object code is made by offering access to copy | ||
| 235 | +from a designated place, then offering equivalent access to copy the | ||
| 236 | +source code from the same place satisfies the requirement to | ||
| 237 | +distribute the source code, even though third parties are not | ||
| 238 | +compelled to copy the source along with the object code. | ||
| 239 | + | ||
| 240 | + 5. A program that contains no derivative of any portion of the | ||
| 241 | +Library, but is designed to work with the Library by being compiled or | ||
| 242 | +linked with it, is called a "work that uses the Library". Such a | ||
| 243 | +work, in isolation, is not a derivative work of the Library, and | ||
| 244 | +therefore falls outside the scope of this License. | ||
| 245 | + | ||
| 246 | + However, linking a "work that uses the Library" with the Library | ||
| 247 | +creates an executable that is a derivative of the Library (because it | ||
| 248 | +contains portions of the Library), rather than a "work that uses the | ||
| 249 | +library". The executable is therefore covered by this License. | ||
| 250 | +Section 6 states terms for distribution of such executables. | ||
| 251 | + | ||
| 252 | + When a "work that uses the Library" uses material from a header file | ||
| 253 | +that is part of the Library, the object code for the work may be a | ||
| 254 | +derivative work of the Library even though the source code is not. | ||
| 255 | +Whether this is true is especially significant if the work can be | ||
| 256 | +linked without the Library, or if the work is itself a library. The | ||
| 257 | +threshold for this to be true is not precisely defined by law. | ||
| 258 | + | ||
| 259 | + If such an object file uses only numerical parameters, data | ||
| 260 | +structure layouts and accessors, and small macros and small inline | ||
| 261 | +functions (ten lines or less in length), then the use of the object | ||
| 262 | +file is unrestricted, regardless of whether it is legally a derivative | ||
| 263 | +work. (Executables containing this object code plus portions of the | ||
| 264 | +Library will still fall under Section 6.) | ||
| 265 | + | ||
| 266 | + Otherwise, if the work is a derivative of the Library, you may | ||
| 267 | +distribute the object code for the work under the terms of Section 6. | ||
| 268 | +Any executables containing that work also fall under Section 6, | ||
| 269 | +whether or not they are linked directly with the Library itself. | ||
| 270 | + | ||
| 271 | + 6. As an exception to the Sections above, you may also combine or | ||
| 272 | +link a "work that uses the Library" with the Library to produce a | ||
| 273 | +work containing portions of the Library, and distribute that work | ||
| 274 | +under terms of your choice, provided that the terms permit | ||
| 275 | +modification of the work for the customer's own use and reverse | ||
| 276 | +engineering for debugging such modifications. | ||
| 277 | + | ||
| 278 | + You must give prominent notice with each copy of the work that the | ||
| 279 | +Library is used in it and that the Library and its use are covered by | ||
| 280 | +this License. You must supply a copy of this License. If the work | ||
| 281 | +during execution displays copyright notices, you must include the | ||
| 282 | +copyright notice for the Library among them, as well as a reference | ||
| 283 | +directing the user to the copy of this License. Also, you must do one | ||
| 284 | +of these things: | ||
| 285 | + | ||
| 286 | + a) Accompany the work with the complete corresponding | ||
| 287 | + machine-readable source code for the Library including whatever | ||
| 288 | + changes were used in the work (which must be distributed under | ||
| 289 | + Sections 1 and 2 above); and, if the work is an executable linked | ||
| 290 | + with the Library, with the complete machine-readable "work that | ||
| 291 | + uses the Library", as object code and/or source code, so that the | ||
| 292 | + user can modify the Library and then relink to produce a modified | ||
| 293 | + executable containing the modified Library. (It is understood | ||
| 294 | + that the user who changes the contents of definitions files in the | ||
| 295 | + Library will not necessarily be able to recompile the application | ||
| 296 | + to use the modified definitions.) | ||
| 297 | + | ||
| 298 | + b) Use a suitable shared library mechanism for linking with the | ||
| 299 | + Library. A suitable mechanism is one that (1) uses at run time a | ||
| 300 | + copy of the library already present on the user's computer system, | ||
| 301 | + rather than copying library functions into the executable, and (2) | ||
| 302 | + will operate properly with a modified version of the library, if | ||
| 303 | + the user installs one, as long as the modified version is | ||
| 304 | + interface-compatible with the version that the work was made with. | ||
| 305 | + | ||
| 306 | + c) Accompany the work with a written offer, valid for at | ||
| 307 | + least three years, to give the same user the materials | ||
| 308 | + specified in Subsection 6a, above, for a charge no more | ||
| 309 | + than the cost of performing this distribution. | ||
| 310 | + | ||
| 311 | + d) If distribution of the work is made by offering access to copy | ||
| 312 | + from a designated place, offer equivalent access to copy the above | ||
| 313 | + specified materials from the same place. | ||
| 314 | + | ||
| 315 | + e) Verify that the user has already received a copy of these | ||
| 316 | + materials or that you have already sent this user a copy. | ||
| 317 | + | ||
| 318 | + For an executable, the required form of the "work that uses the | ||
| 319 | +Library" must include any data and utility programs needed for | ||
| 320 | +reproducing the executable from it. However, as a special exception, | ||
| 321 | +the materials to be distributed need not include anything that is | ||
| 322 | +normally distributed (in either source or binary form) with the major | ||
| 323 | +components (compiler, kernel, and so on) of the operating system on | ||
| 324 | +which the executable runs, unless that component itself accompanies | ||
| 325 | +the executable. | ||
| 326 | + | ||
| 327 | + It may happen that this requirement contradicts the license | ||
| 328 | +restrictions of other proprietary libraries that do not normally | ||
| 329 | +accompany the operating system. Such a contradiction means you cannot | ||
| 330 | +use both them and the Library together in an executable that you | ||
| 331 | +distribute. | ||
| 332 | + | ||
| 333 | + 7. You may place library facilities that are a work based on the | ||
| 334 | +Library side-by-side in a single library together with other library | ||
| 335 | +facilities not covered by this License, and distribute such a combined | ||
| 336 | +library, provided that the separate distribution of the work based on | ||
| 337 | +the Library and of the other library facilities is otherwise | ||
| 338 | +permitted, and provided that you do these two things: | ||
| 339 | + | ||
| 340 | + a) Accompany the combined library with a copy of the same work | ||
| 341 | + based on the Library, uncombined with any other library | ||
| 342 | + facilities. This must be distributed under the terms of the | ||
| 343 | + Sections above. | ||
| 344 | + | ||
| 345 | + b) Give prominent notice with the combined library of the fact | ||
| 346 | + that part of it is a work based on the Library, and explaining | ||
| 347 | + where to find the accompanying uncombined form of the same work. | ||
| 348 | + | ||
| 349 | + 8. You may not copy, modify, sublicense, link with, or distribute | ||
| 350 | +the Library except as expressly provided under this License. Any | ||
| 351 | +attempt otherwise to copy, modify, sublicense, link with, or | ||
| 352 | +distribute the Library is void, and will automatically terminate your | ||
| 353 | +rights under this License. However, parties who have received copies, | ||
| 354 | +or rights, from you under this License will not have their licenses | ||
| 355 | +terminated so long as such parties remain in full compliance. | ||
| 356 | + | ||
| 357 | + 9. You are not required to accept this License, since you have not | ||
| 358 | +signed it. However, nothing else grants you permission to modify or | ||
| 359 | +distribute the Library or its derivative works. These actions are | ||
| 360 | +prohibited by law if you do not accept this License. Therefore, by | ||
| 361 | +modifying or distributing the Library (or any work based on the | ||
| 362 | +Library), you indicate your acceptance of this License to do so, and | ||
| 363 | +all its terms and conditions for copying, distributing or modifying | ||
| 364 | +the Library or works based on it. | ||
| 365 | + | ||
| 366 | + 10. Each time you redistribute the Library (or any work based on the | ||
| 367 | +Library), the recipient automatically receives a license from the | ||
| 368 | +original licensor to copy, distribute, link with or modify the Library | ||
| 369 | +subject to these terms and conditions. You may not impose any further | ||
| 370 | +restrictions on the recipients' exercise of the rights granted herein. | ||
| 371 | +You are not responsible for enforcing compliance by third parties with | ||
| 372 | +this License. | ||
| 373 | + | ||
| 374 | + 11. If, as a consequence of a court judgment or allegation of patent | ||
| 375 | +infringement or for any other reason (not limited to patent issues), | ||
| 376 | +conditions are imposed on you (whether by court order, agreement or | ||
| 377 | +otherwise) that contradict the conditions of this License, they do not | ||
| 378 | +excuse you from the conditions of this License. If you cannot | ||
| 379 | +distribute so as to satisfy simultaneously your obligations under this | ||
| 380 | +License and any other pertinent obligations, then as a consequence you | ||
| 381 | +may not distribute the Library at all. For example, if a patent | ||
| 382 | +license would not permit royalty-free redistribution of the Library by | ||
| 383 | +all those who receive copies directly or indirectly through you, then | ||
| 384 | +the only way you could satisfy both it and this License would be to | ||
| 385 | +refrain entirely from distribution of the Library. | ||
| 386 | + | ||
| 387 | +If any portion of this section is held invalid or unenforceable under any | ||
| 388 | +particular circumstance, the balance of the section is intended to apply, | ||
| 389 | +and the section as a whole is intended to apply in other circumstances. | ||
| 390 | + | ||
| 391 | +It is not the purpose of this section to induce you to infringe any | ||
| 392 | +patents or other property right claims or to contest validity of any | ||
| 393 | +such claims; this section has the sole purpose of protecting the | ||
| 394 | +integrity of the free software distribution system which is | ||
| 395 | +implemented by public license practices. Many people have made | ||
| 396 | +generous contributions to the wide range of software distributed | ||
| 397 | +through that system in reliance on consistent application of that | ||
| 398 | +system; it is up to the author/donor to decide if he or she is willing | ||
| 399 | +to distribute software through any other system and a licensee cannot | ||
| 400 | +impose that choice. | ||
| 401 | + | ||
| 402 | +This section is intended to make thoroughly clear what is believed to | ||
| 403 | +be a consequence of the rest of this License. | ||
| 404 | + | ||
| 405 | + 12. If the distribution and/or use of the Library is restricted in | ||
| 406 | +certain countries either by patents or by copyrighted interfaces, the | ||
| 407 | +original copyright holder who places the Library under this License may add | ||
| 408 | +an explicit geographical distribution limitation excluding those countries, | ||
| 409 | +so that distribution is permitted only in or among countries not thus | ||
| 410 | +excluded. In such case, this License incorporates the limitation as if | ||
| 411 | +written in the body of this License. | ||
| 412 | + | ||
| 413 | + 13. The Free Software Foundation may publish revised and/or new | ||
| 414 | +versions of the Lesser General Public License from time to time. | ||
| 415 | +Such new versions will be similar in spirit to the present version, | ||
| 416 | +but may differ in detail to address new problems or concerns. | ||
| 417 | + | ||
| 418 | +Each version is given a distinguishing version number. If the Library | ||
| 419 | +specifies a version number of this License which applies to it and | ||
| 420 | +"any later version", you have the option of following the terms and | ||
| 421 | +conditions either of that version or of any later version published by | ||
| 422 | +the Free Software Foundation. If the Library does not specify a | ||
| 423 | +license version number, you may choose any version ever published by | ||
| 424 | +the Free Software Foundation. | ||
| 425 | + | ||
| 426 | + 14. If you wish to incorporate parts of the Library into other free | ||
| 427 | +programs whose distribution conditions are incompatible with these, | ||
| 428 | +write to the author to ask for permission. For software which is | ||
| 429 | +copyrighted by the Free Software Foundation, write to the Free | ||
| 430 | +Software Foundation; we sometimes make exceptions for this. Our | ||
| 431 | +decision will be guided by the two goals of preserving the free status | ||
| 432 | +of all derivatives of our free software and of promoting the sharing | ||
| 433 | +and reuse of software generally. | ||
| 434 | + | ||
| 435 | + NO WARRANTY | ||
| 436 | + | ||
| 437 | + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO | ||
| 438 | +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. | ||
| 439 | +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR | ||
| 440 | +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY | ||
| 441 | +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 442 | +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 443 | +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE | ||
| 444 | +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME | ||
| 445 | +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. | ||
| 446 | + | ||
| 447 | + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN | ||
| 448 | +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY | ||
| 449 | +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU | ||
| 450 | +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR | ||
| 451 | +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE | ||
| 452 | +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING | ||
| 453 | +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A | ||
| 454 | +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF | ||
| 455 | +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH | ||
| 456 | +DAMAGES. | ||
| 457 | + | ||
| 458 | + END OF TERMS AND CONDITIONS | ||
| 459 | + | ||
| 460 | + How to Apply These Terms to Your New Libraries | ||
| 461 | + | ||
| 462 | + If you develop a new library, and you want it to be of the greatest | ||
| 463 | +possible use to the public, we recommend making it free software that | ||
| 464 | +everyone can redistribute and change. You can do so by permitting | ||
| 465 | +redistribution under these terms (or, alternatively, under the terms of the | ||
| 466 | +ordinary General Public License). | ||
| 467 | + | ||
| 468 | + To apply these terms, attach the following notices to the library. It is | ||
| 469 | +safest to attach them to the start of each source file to most effectively | ||
| 470 | +convey the exclusion of warranty; and each file should have at least the | ||
| 471 | +"copyright" line and a pointer to where the full notice is found. | ||
| 472 | + | ||
| 473 | + <one line to give the library's name and a brief idea of what it does.> | ||
| 474 | + Copyright (C) <year> <name of author> | ||
| 475 | + | ||
| 476 | + This library is free software; you can redistribute it and/or | ||
| 477 | + modify it under the terms of the GNU Lesser General Public | ||
| 478 | + License as published by the Free Software Foundation; either | ||
| 479 | + version 2.1 of the License, or (at your option) any later version. | ||
| 480 | + | ||
| 481 | + This library is distributed in the hope that it will be useful, | ||
| 482 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 483 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 484 | + Lesser General Public License for more details. | ||
| 485 | + | ||
| 486 | + You should have received a copy of the GNU Lesser General Public | ||
| 487 | + License along with this library; if not, write to the Free Software | ||
| 488 | + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA | ||
| 489 | + | ||
| 490 | +Also add information on how to contact you by electronic and paper mail. | ||
| 491 | + | ||
| 492 | +You should also get your employer (if you work as a programmer) or your | ||
| 493 | +school, if any, to sign a "copyright disclaimer" for the library, if | ||
| 494 | +necessary. Here is a sample; alter the names: | ||
| 495 | + | ||
| 496 | + Yoyodyne, Inc., hereby disclaims all copyright interest in the | ||
| 497 | + library `Frob' (a library for tweaking knobs) written by James Random Hacker. | ||
| 498 | + | ||
| 499 | + <signature of Ty Coon>, 1 April 1990 | ||
| 500 | + Ty Coon, President of Vice | ||
| 501 | + | ||
| 502 | +That's all there is to it! | ||
| 0 | \ No newline at end of file | 503 | \ No newline at end of file |
thirdpartyjs/curvycorners/rounded_corners.inc.js
0 โ 100644
| 1 | + | ||
| 2 | + /**************************************************************** | ||
| 3 | + * * | ||
| 4 | + * curvyCorners * | ||
| 5 | + * ------------ * | ||
| 6 | + * * | ||
| 7 | + * This script generates rounded corners for your divs. * | ||
| 8 | + * * | ||
| 9 | + * Version 1.2.9 * | ||
| 10 | + * Copyright (c) 2006 Cameron Cooke * | ||
| 11 | + * By: Cameron Cooke and Tim Hutchison. * | ||
| 12 | + * * | ||
| 13 | + * * | ||
| 14 | + * Website: http://www.curvycorners.net * | ||
| 15 | + * Email: info@totalinfinity.com * | ||
| 16 | + * Forum: http://www.curvycorners.net/forum/ * | ||
| 17 | + * * | ||
| 18 | + * * | ||
| 19 | + * This library is free software; you can redistribute * | ||
| 20 | + * it and/or modify it under the terms of the GNU * | ||
| 21 | + * Lesser General Public License as published by the * | ||
| 22 | + * Free Software Foundation; either version 2.1 of the * | ||
| 23 | + * License, or (at your option) any later version. * | ||
| 24 | + * * | ||
| 25 | + * This library is distributed in the hope that it will * | ||
| 26 | + * be useful, but WITHOUT ANY WARRANTY; without even the * | ||
| 27 | + * implied warranty of MERCHANTABILITY or FITNESS FOR A * | ||
| 28 | + * PARTICULAR PURPOSE. See the GNU Lesser General Public * | ||
| 29 | + * License for more details. * | ||
| 30 | + * * | ||
| 31 | + * You should have received a copy of the GNU Lesser * | ||
| 32 | + * General Public License along with this library; * | ||
| 33 | + * Inc., 59 Temple Place, Suite 330, Boston, * | ||
| 34 | + * MA 02111-1307 USA * | ||
| 35 | + * * | ||
| 36 | + ****************************************************************/ | ||
| 37 | +var mycount=0; | ||
| 38 | +var myobj=''; | ||
| 39 | + // Browser detection | ||
| 40 | + var isIE = navigator.userAgent.toLowerCase().indexOf("msie") > -1; | ||
| 41 | + var isMoz = document.implementation && document.implementation.createDocument; | ||
| 42 | + var isSafari = ((navigator.userAgent.toLowerCase().indexOf('safari')!=-1)&&(navigator.userAgent.toLowerCase().indexOf('mac')!=-1))?true:false; | ||
| 43 | + | ||
| 44 | + /* | ||
| 45 | + Usage: | ||
| 46 | + | ||
| 47 | + newCornersObj = new curvyCorners(settingsObj, "classNameStr"); | ||
| 48 | + newCornersObj = new curvyCorners(settingsObj, divObj1[, divObj2[, divObj3[, . . . [, divObjN]]]]); | ||
| 49 | + */ | ||
| 50 | + function curvyCorners() | ||
| 51 | + { | ||
| 52 | + // Check parameters | ||
| 53 | + if(typeof(arguments[0]) != "object") throw newCurvyError("First parameter of curvyCorners() must be an object."); | ||
| 54 | + if(typeof(arguments[1]) != "object" && typeof(arguments[1]) != "string") throw newCurvyError("Second parameter of curvyCorners() must be an object or a class name."); | ||
| 55 | + | ||
| 56 | + // Get object(s) | ||
| 57 | + if(typeof(arguments[1]) == "string") | ||
| 58 | + { | ||
| 59 | + // Get elements by class name | ||
| 60 | + var startIndex = 0; | ||
| 61 | + var boxCol = getElementsByClass(arguments[1]); | ||
| 62 | + } | ||
| 63 | + else | ||
| 64 | + { | ||
| 65 | + // Get objects | ||
| 66 | + var startIndex = 1; | ||
| 67 | + var boxCol = arguments; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + // Create return collection/object | ||
| 71 | + var curvyCornersCol = new Array(); | ||
| 72 | + | ||
| 73 | + // Create array of html elements that can have rounded corners | ||
| 74 | + if(arguments[0].validTags) | ||
| 75 | + var validElements = arguments[0].validTags; | ||
| 76 | + else | ||
| 77 | + var validElements = ["div"]; // Default | ||
| 78 | + | ||
| 79 | + // Loop through each argument | ||
| 80 | + for(var i = startIndex, j = boxCol.length; i < j; i++) | ||
| 81 | + { | ||
| 82 | + // Current element tag name | ||
| 83 | + var currentTag = boxCol[i].tagName.toLowerCase(); | ||
| 84 | + | ||
| 85 | + if(inArray(validElements, currentTag) !== false) | ||
| 86 | + { | ||
| 87 | + curvyCornersCol[curvyCornersCol.length] = new curvyObject(arguments[0], boxCol[i]); | ||
| 88 | + } | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + this.objects = curvyCornersCol; | ||
| 92 | + | ||
| 93 | + // Applys the curvyCorners to all objects | ||
| 94 | + this.applyCornersToAll = function() | ||
| 95 | + { | ||
| 96 | + for(var x = 0, k = this.objects.length; x < k; x++) | ||
| 97 | + { | ||
| 98 | + this.objects[x].applyCorners(); | ||
| 99 | + } | ||
| 100 | + } | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + // curvyCorners object (can be called directly) | ||
| 104 | + function curvyObject() | ||
| 105 | + { | ||
| 106 | + // Setup Globals | ||
| 107 | + this.box = arguments[1]; | ||
| 108 | + this.settings = arguments[0]; | ||
| 109 | + this.topContainer = null; | ||
| 110 | + this.bottomContainer = null; | ||
| 111 | + this.masterCorners = new Array(); | ||
| 112 | + this.contentDIV = null; | ||
| 113 | + | ||
| 114 | + // Get box formatting details | ||
| 115 | + var boxHeight = get_style(this.box, "height", "height"); | ||
| 116 | + var boxWidth = get_style(this.box, "width", "width"); | ||
| 117 | + var borderWidth = get_style(this.box, "borderTopWidth", "border-top-width"); | ||
| 118 | + var borderColour = get_style(this.box, "borderTopColor", "border-top-color"); | ||
| 119 | + var boxColour = get_style(this.box, "backgroundColor", "background-color"); | ||
| 120 | + var backgroundImage = get_style(this.box, "backgroundImage", "background-image"); | ||
| 121 | + var boxPosition = get_style(this.box, "position", "position"); | ||
| 122 | + var boxPadding = get_style(this.box, "paddingTop", "padding-top"); | ||
| 123 | + | ||
| 124 | + // Set formatting propertes | ||
| 125 | + this.boxHeight = parseInt(((boxHeight != "" && boxHeight != "auto" && boxHeight.indexOf("%") == -1)? boxHeight.substring(0, boxHeight.indexOf("px")) : this.box.scrollHeight)); | ||
| 126 | + this.boxWidth = parseInt(((boxWidth != "" && boxWidth != "auto" && boxWidth.indexOf("%") == -1)? boxWidth.substring(0, boxWidth.indexOf("px")) : this.box.scrollWidth)); | ||
| 127 | + this.borderWidth = parseInt(((borderWidth != "" && borderWidth.indexOf("px") !== -1)? borderWidth.slice(0, borderWidth.indexOf("px")) : 0)); | ||
| 128 | + this.boxColour = format_colour(boxColour); | ||
| 129 | + this.boxPadding = parseInt(((boxPadding != "" && boxPadding.indexOf("px") !== -1)? boxPadding.slice(0, boxPadding.indexOf("px")) : 0)); | ||
| 130 | + this.borderColour = format_colour(borderColour); | ||
| 131 | + this.borderString = this.borderWidth + "px" + " solid " + this.borderColour; | ||
| 132 | + this.backgroundImage = ((backgroundImage != "none")? backgroundImage : ""); | ||
| 133 | + this.boxContent = this.box.innerHTML; | ||
| 134 | + | ||
| 135 | + // Make box relative if not already absolute and remove any padding | ||
| 136 | + if(boxPosition != "absolute") this.box.style.position = "relative"; | ||
| 137 | + this.box.style.padding = "0px"; | ||
| 138 | + | ||
| 139 | + // If IE and height and width are not set, we need to set width so that we get positioning | ||
| 140 | + if(isIE && boxWidth == "auto" && boxHeight == "auto") this.box.style.width = "100%"; | ||
| 141 | + | ||
| 142 | + // Resize box so that it stays to the orignal height | ||
| 143 | + | ||
| 144 | + | ||
| 145 | + // Remove content if box is using autoPad | ||
| 146 | + if(this.settings.autoPad == true && this.boxPadding > 0) | ||
| 147 | + this.box.innerHTML = ""; | ||
| 148 | + | ||
| 149 | + /* | ||
| 150 | + This method creates the corners and | ||
| 151 | + applies them to the div element. | ||
| 152 | + */ | ||
| 153 | + this.applyCorners = function() | ||
| 154 | + { | ||
| 155 | + /* | ||
| 156 | + Create top and bottom containers. | ||
| 157 | + These will be used as a parent for the corners and bars. | ||
| 158 | + */ | ||
| 159 | + for(var t = 0; t < 2; t++) | ||
| 160 | + { | ||
| 161 | + switch(t) | ||
| 162 | + { | ||
| 163 | + // Top | ||
| 164 | + case 0: | ||
| 165 | + | ||
| 166 | + // Only build top bar if a top corner is to be draw | ||
| 167 | + if(this.settings.tl || this.settings.tr) | ||
| 168 | + { | ||
| 169 | + var newMainContainer = document.createElement("DIV"); | ||
| 170 | + newMainContainer.style.width = "100%"; | ||
| 171 | + newMainContainer.style.fontSize = "1px"; | ||
| 172 | + newMainContainer.style.overflow = "hidden"; | ||
| 173 | + newMainContainer.style.position = "absolute"; | ||
| 174 | + newMainContainer.style.paddingLeft = this.borderWidth + "px"; | ||
| 175 | + newMainContainer.style.paddingRight = this.borderWidth + "px"; | ||
| 176 | + var topMaxRadius = Math.max(this.settings.tl ? this.settings.tl.radius : 0, this.settings.tr ? this.settings.tr.radius : 0); | ||
| 177 | + newMainContainer.style.height = topMaxRadius + "px"; | ||
| 178 | + newMainContainer.style.top = 0 - topMaxRadius + "px"; | ||
| 179 | + newMainContainer.style.left = 0 - this.borderWidth + "px"; | ||
| 180 | + this.topContainer = this.box.appendChild(newMainContainer); | ||
| 181 | + } | ||
| 182 | + break; | ||
| 183 | + | ||
| 184 | + // Bottom | ||
| 185 | + case 1: | ||
| 186 | + | ||
| 187 | + // Only build bottom bar if a top corner is to be draw | ||
| 188 | + if(this.settings.bl || this.settings.br) | ||
| 189 | + { | ||
| 190 | + var newMainContainer = document.createElement("DIV"); | ||
| 191 | + newMainContainer.style.width = "100%"; | ||
| 192 | + newMainContainer.style.fontSize = "1px"; | ||
| 193 | + newMainContainer.style.overflow = "hidden"; | ||
| 194 | + newMainContainer.style.position = "absolute"; | ||
| 195 | + newMainContainer.style.paddingLeft = this.borderWidth + "px"; | ||
| 196 | + newMainContainer.style.paddingRight = this.borderWidth + "px"; | ||
| 197 | + var botMaxRadius = Math.max(this.settings.bl ? this.settings.bl.radius : 0, this.settings.br ? this.settings.br.radius : 0); | ||
| 198 | + newMainContainer.style.height = botMaxRadius + "px"; | ||
| 199 | + newMainContainer.style.bottom = 0 - botMaxRadius + "px"; | ||
| 200 | + newMainContainer.style.left = 0 - this.borderWidth + "px"; | ||
| 201 | + this.bottomContainer = this.box.appendChild(newMainContainer); | ||
| 202 | + } | ||
| 203 | + break; | ||
| 204 | + } | ||
| 205 | + } | ||
| 206 | + | ||
| 207 | + // Turn off current borders | ||
| 208 | + if(this.topContainer) this.box.style.borderTopWidth = "0px"; | ||
| 209 | + if(this.bottomContainer) this.box.style.borderBottomWidth = "0px"; | ||
| 210 | + | ||
| 211 | + // Create array of available corners | ||
| 212 | + var corners = ["tr", "tl", "br", "bl"]; | ||
| 213 | + | ||
| 214 | + /* | ||
| 215 | + Loop for each corner | ||
| 216 | + */ | ||
| 217 | + for(var i in corners) | ||
| 218 | + { | ||
| 219 | + | ||
| 220 | + // FIX for prototype lib | ||
| 221 | + if(i > -1 < 4) | ||
| 222 | + { | ||
| 223 | + | ||
| 224 | + // Get current corner type from array | ||
| 225 | + var cc = corners[i]; | ||
| 226 | + myobj = cc; | ||
| 227 | + // alert(myobj + ' ' + cc + ' ' + i); | ||
| 228 | + | ||
| 229 | + // Has the user requested the currentCorner be round? | ||
| 230 | + if(!this.settings[cc]) | ||
| 231 | + { | ||
| 232 | + // No | ||
| 233 | + if(((cc == "tr" || cc == "tl") && this.topContainer != null) || ((cc == "br" || cc == "bl") && this.bottomContainer != null)) | ||
| 234 | + { | ||
| 235 | + // We need to create a filler div to fill the space upto the next horzontal corner. | ||
| 236 | + var newCorner = document.createElement("DIV"); | ||
| 237 | + | ||
| 238 | + // Setup corners properties | ||
| 239 | + newCorner.style.position = "relative"; | ||
| 240 | + newCorner.style.fontSize = "1px"; | ||
| 241 | + newCorner.style.overflow = "hidden"; | ||
| 242 | + | ||
| 243 | + // Add background image? | ||
| 244 | + if(this.backgroundImage == "") | ||
| 245 | + newCorner.style.backgroundColor = this.boxColour; | ||
| 246 | + else | ||
| 247 | + newCorner.style.backgroundImage = this.backgroundImage; | ||
| 248 | + | ||
| 249 | + switch(cc) | ||
| 250 | + { | ||
| 251 | + case "tl": | ||
| 252 | + newCorner.style.height = topMaxRadius - this.borderWidth + "px"; | ||
| 253 | + newCorner.style.marginRight = this.settings.tr.radius - (this.borderWidth*2) + "px"; | ||
| 254 | + newCorner.style.borderLeft = this.borderString; | ||
| 255 | + newCorner.style.borderTop = this.borderString; | ||
| 256 | + newCorner.style.left = -this.borderWidth + "px"; | ||
| 257 | + break; | ||
| 258 | + | ||
| 259 | + case "tr": | ||
| 260 | + newCorner.style.height = topMaxRadius - this.borderWidth + "px"; | ||
| 261 | + newCorner.style.marginLeft = this.settings.tl.radius - (this.borderWidth*2) + "px"; | ||
| 262 | + newCorner.style.borderRight = this.borderString; | ||
| 263 | + newCorner.style.borderTop = this.borderString; | ||
| 264 | + newCorner.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; | ||
| 265 | + newCorner.style.left = this.borderWidth + "px"; | ||
| 266 | + break; | ||
| 267 | + | ||
| 268 | + case "bl": | ||
| 269 | + newCorner.style.height = botMaxRadius - this.borderWidth + "px"; | ||
| 270 | + newCorner.style.marginRight = this.settings.br.radius - (this.borderWidth*2) + "px"; | ||
| 271 | + newCorner.style.borderLeft = this.borderString; | ||
| 272 | + newCorner.style.borderBottom = this.borderString; | ||
| 273 | + newCorner.style.left = -this.borderWidth + "px"; | ||
| 274 | + newCorner.style.backgroundPosition = "-" + (this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; | ||
| 275 | + break; | ||
| 276 | + | ||
| 277 | + case "br": | ||
| 278 | + newCorner.style.height = botMaxRadius - this.borderWidth + "px"; | ||
| 279 | + newCorner.style.marginLeft = this.settings.bl.radius - (this.borderWidth*2) + "px"; | ||
| 280 | + newCorner.style.borderRight = this.borderString; | ||
| 281 | + newCorner.style.borderBottom = this.borderString; | ||
| 282 | + newCorner.style.left = this.borderWidth + "px" | ||
| 283 | + newCorner.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; | ||
| 284 | + break; | ||
| 285 | + } | ||
| 286 | + } | ||
| 287 | + } | ||
| 288 | + else | ||
| 289 | + { | ||
| 290 | + /* | ||
| 291 | + PERFORMANCE NOTE: | ||
| 292 | + | ||
| 293 | + If more than one corner is requested and a corner has been already | ||
| 294 | + created for the same radius then that corner will be used as a master and cloned. | ||
| 295 | + The pixel bars will then be repositioned to form the new corner type. | ||
| 296 | + All new corners start as a bottom right corner. | ||
| 297 | + */ | ||
| 298 | + //if(this.masterCorners[this.settings[cc].radius]) | ||
| 299 | + //{ | ||
| 300 | + // Create clone of the master corner | ||
| 301 | + //if(){ | ||
| 302 | + //var newCorner = this.masterCorners[this.settings[cc].radius].cloneNode(true); | ||
| 303 | + //} | ||
| 304 | + //} | ||
| 305 | + //else | ||
| 306 | + { | ||
| 307 | + // Yes, we need to create a new corner | ||
| 308 | + var newCorner = document.createElement("DIV"); | ||
| 309 | + newCorner.style.height = this.settings[cc].radius + "px"; | ||
| 310 | + newCorner.style.width = this.settings[cc].radius + "px"; | ||
| 311 | + newCorner.style.position = "absolute"; | ||
| 312 | + newCorner.style.fontSize = "1px"; | ||
| 313 | + newCorner.style.overflow = "hidden"; | ||
| 314 | + | ||
| 315 | + // THE FOLLOWING BLOCK OF CODE CREATES A ROUNDED CORNER | ||
| 316 | + // ---------------------------------------------------- TOP | ||
| 317 | + | ||
| 318 | + // Get border radius | ||
| 319 | + var borderRadius = parseInt(this.settings[cc].radius - this.borderWidth); | ||
| 320 | + | ||
| 321 | + // Cycle the x-axis | ||
| 322 | + for(var intx = 0, j = this.settings[cc].radius; intx < j; intx++) | ||
| 323 | + { | ||
| 324 | + // Calculate the value of y1 which identifies the pixels inside the border | ||
| 325 | + if((intx +1) >= borderRadius) | ||
| 326 | + var y1 = -1; | ||
| 327 | + else | ||
| 328 | + var y1 = (Math.floor(Math.sqrt(Math.pow(borderRadius, 2) - Math.pow((intx+1), 2))) - 1); | ||
| 329 | + | ||
| 330 | + // Only calculate y2 and y3 if there is a border defined | ||
| 331 | + if(borderRadius != j) | ||
| 332 | + { | ||
| 333 | + if((intx) >= borderRadius) | ||
| 334 | + var y2 = -1; | ||
| 335 | + else | ||
| 336 | + var y2 = Math.ceil(Math.sqrt(Math.pow(borderRadius,2) - Math.pow(intx, 2))); | ||
| 337 | + | ||
| 338 | + if((intx+1) >= j) | ||
| 339 | + var y3 = -1; | ||
| 340 | + else | ||
| 341 | + var y3 = (Math.floor(Math.sqrt(Math.pow(j ,2) - Math.pow((intx+1), 2))) - 1); | ||
| 342 | + } | ||
| 343 | + | ||
| 344 | + // Calculate y4 | ||
| 345 | + if((intx) >= j) | ||
| 346 | + var y4 = -1; | ||
| 347 | + else | ||
| 348 | + var y4 = Math.ceil(Math.sqrt(Math.pow(j ,2) - Math.pow(intx, 2))); | ||
| 349 | + | ||
| 350 | + // Draw bar on inside of the border with foreground colour | ||
| 351 | + if(y1 > -1) this.drawPixel(intx, 0, this.boxColour, 100, (y1+1), newCorner, -1, this.settings[cc].radius,cc); | ||
| 352 | + | ||
| 353 | + // Only draw border/foreground antialiased pixels and border if there is a border defined | ||
| 354 | + if(borderRadius != j) | ||
| 355 | + { | ||
| 356 | + // Cycle the y-axis | ||
| 357 | + for(var inty = (y1 + 1); inty < y2; inty++) | ||
| 358 | + { | ||
| 359 | + // Draw anti-alias pixels | ||
| 360 | + if(this.settings.antiAlias) | ||
| 361 | + { | ||
| 362 | + // For each of the pixels that need anti aliasing between the foreground and border colour draw single pixel divs | ||
| 363 | + if(this.backgroundImage != "") | ||
| 364 | + { | ||
| 365 | + var borderFract = (pixelFraction(intx, inty, borderRadius) * 100); | ||
| 366 | + | ||
| 367 | + if(borderFract < 30) | ||
| 368 | + { | ||
| 369 | + this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, 0, this.settings[cc].radius,myobj); | ||
| 370 | + }else{ | ||
| 371 | + this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, -1, this.settings[cc].radius,myobj); | ||
| 372 | + } | ||
| 373 | + } | ||
| 374 | + else | ||
| 375 | + { | ||
| 376 | + var pixelcolour = BlendColour(this.boxColour, this.borderColour, pixelFraction(intx, inty, borderRadius)); | ||
| 377 | + this.drawPixel(intx, inty, pixelcolour, 100, 1, newCorner, 0, this.settings[cc].radius, myobj); | ||
| 378 | + } | ||
| 379 | + } | ||
| 380 | + } | ||
| 381 | + | ||
| 382 | + // Draw bar for the border | ||
| 383 | + if(this.settings.antiAlias) | ||
| 384 | + { | ||
| 385 | + if(y3 >= y2) | ||
| 386 | + { | ||
| 387 | + if (y2 == -1) y2 = 0; | ||
| 388 | + this.drawPixel(intx, y2, this.borderColour, 100, (y3 - y2 + 1), newCorner, 0, 0,myobj); | ||
| 389 | + } | ||
| 390 | + } | ||
| 391 | + else | ||
| 392 | + { | ||
| 393 | + if(y3 >= y1) | ||
| 394 | + { | ||
| 395 | + this.drawPixel(intx, (y1 + 1), this.borderColour, 100, (y3 - y1), newCorner, 0, 0,myobj); | ||
| 396 | + } | ||
| 397 | + } | ||
| 398 | + | ||
| 399 | + // Set the colour for the outside curve | ||
| 400 | + var outsideColour = this.borderColour; | ||
| 401 | + } | ||
| 402 | + else | ||
| 403 | + { | ||
| 404 | + // Set the coour for the outside curve | ||
| 405 | + var outsideColour = this.boxColour; | ||
| 406 | + var y3 = y1; | ||
| 407 | + } | ||
| 408 | + | ||
| 409 | + // Draw aa pixels? | ||
| 410 | + if(this.settings.antiAlias) | ||
| 411 | + { | ||
| 412 | + // Cycle the y-axis and draw the anti aliased pixels on the outside of the curve | ||
| 413 | + for(var inty = (y3 + 1); inty < y4; inty++) | ||
| 414 | + { | ||
| 415 | + // For each of the pixels that need anti aliasing between the foreground/border colour & background draw single pixel divs | ||
| 416 | + this.drawPixel(intx, inty, outsideColour, (pixelFraction(intx, inty , j) * 100), 1, newCorner, ((this.borderWidth > 0)? 0 : -1), this.settings[cc].radius,myobj); | ||
| 417 | + } | ||
| 418 | + } | ||
| 419 | + } | ||
| 420 | + | ||
| 421 | + // END OF CORNER CREATION | ||
| 422 | + // ---------------------------------------------------- END | ||
| 423 | + | ||
| 424 | + // We now need to store the current corner in the masterConers array | ||
| 425 | + this.masterCorners[this.settings[cc].radius] = newCorner.cloneNode(true); | ||
| 426 | + } | ||
| 427 | + | ||
| 428 | + /* | ||
| 429 | + Now we have a new corner we need to reposition all the pixels unless | ||
| 430 | + the current corner is the bottom right. | ||
| 431 | + */ | ||
| 432 | + if(cc != "br") | ||
| 433 | + { | ||
| 434 | + // Loop through all children (pixel bars) | ||
| 435 | + for(var t = 0, k = newCorner.childNodes.length; t < k; t++) | ||
| 436 | + { | ||
| 437 | + // Get current pixel bar | ||
| 438 | + var pixelBar = newCorner.childNodes[t]; | ||
| 439 | + | ||
| 440 | + // Get current top and left properties | ||
| 441 | + var pixelBarTop = parseInt(pixelBar.style.top.substring(0, pixelBar.style.top.indexOf("px"))); | ||
| 442 | + var pixelBarLeft = parseInt(pixelBar.style.left.substring(0, pixelBar.style.left.indexOf("px"))); | ||
| 443 | + var pixelBarHeight = parseInt(pixelBar.style.height.substring(0, pixelBar.style.height.indexOf("px"))); | ||
| 444 | + | ||
| 445 | + // Reposition pixels | ||
| 446 | + if(cc == "tl" || cc == "bl"){ | ||
| 447 | + pixelBar.style.left = this.settings[cc].radius -pixelBarLeft -1 + "px"; // Left | ||
| 448 | + } | ||
| 449 | + if(cc == "tr" || cc == "tl"){ | ||
| 450 | + pixelBar.style.top = this.settings[cc].radius -pixelBarHeight -pixelBarTop + "px"; // Top | ||
| 451 | + } | ||
| 452 | + | ||
| 453 | + switch(cc) | ||
| 454 | + { | ||
| 455 | + case "tr": | ||
| 456 | + pixelBar.style.backgroundPosition = "-" + Math.abs((this.boxWidth - this.settings[cc].radius + this.borderWidth) + pixelBarLeft) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; | ||
| 457 | + break; | ||
| 458 | + | ||
| 459 | + case "tl": | ||
| 460 | + pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; | ||
| 461 | + break; | ||
| 462 | + | ||
| 463 | + case "bl": | ||
| 464 | + pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs((this.boxHeight + this.settings[cc].radius + pixelBarTop) -this.borderWidth) + "px"; | ||
| 465 | + break; | ||
| 466 | + } | ||
| 467 | + } | ||
| 468 | + } | ||
| 469 | + } | ||
| 470 | + | ||
| 471 | + if(newCorner) | ||
| 472 | + { | ||
| 473 | + // Position the container | ||
| 474 | + switch(cc) | ||
| 475 | + { | ||
| 476 | + case "tl": | ||
| 477 | + if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; | ||
| 478 | + if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; | ||
| 479 | + if(this.topContainer) this.topContainer.appendChild(newCorner); | ||
| 480 | + break; | ||
| 481 | + | ||
| 482 | + case "tr": | ||
| 483 | + if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; | ||
| 484 | + if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; | ||
| 485 | + if(this.topContainer) this.topContainer.appendChild(newCorner); | ||
| 486 | + break; | ||
| 487 | + | ||
| 488 | + case "bl": | ||
| 489 | + if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; | ||
| 490 | + if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; | ||
| 491 | + if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); | ||
| 492 | + break; | ||
| 493 | + | ||
| 494 | + case "br": | ||
| 495 | + if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; | ||
| 496 | + if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; | ||
| 497 | + if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); | ||
| 498 | + break; | ||
| 499 | + } | ||
| 500 | + } | ||
| 501 | + } | ||
| 502 | + } | ||
| 503 | + | ||
| 504 | + /* | ||
| 505 | + The last thing to do is draw the rest of the filler DIVs. | ||
| 506 | + We only need to create a filler DIVs when two corners have | ||
| 507 | + diffrent radiuses in either the top or bottom container. | ||
| 508 | + */ | ||
| 509 | + | ||
| 510 | + // Find out which corner has the biiger radius and get the difference amount | ||
| 511 | + var radiusDiff = new Array(); | ||
| 512 | + radiusDiff["t"] = Math.abs(this.settings.tl.radius - this.settings.tr.radius) | ||
| 513 | + radiusDiff["b"] = Math.abs(this.settings.bl.radius - this.settings.br.radius); | ||
| 514 | + | ||
| 515 | + for(z in radiusDiff) | ||
| 516 | + { | ||
| 517 | + // FIX for prototype lib | ||
| 518 | + if(z == "t" || z == "b") | ||
| 519 | + { | ||
| 520 | + if(radiusDiff[z]) | ||
| 521 | + { | ||
| 522 | + // Get the type of corner that is the smaller one | ||
| 523 | + var smallerCornerType = ((this.settings[z + "l"].radius < this.settings[z + "r"].radius)? z +"l" : z +"r"); | ||
| 524 | + | ||
| 525 | + // First we need to create a DIV for the space under the smaller corner | ||
| 526 | + var newFiller = document.createElement("DIV"); | ||
| 527 | + newFiller.style.height = radiusDiff[z] + "px"; | ||
| 528 | + newFiller.style.width = this.settings[smallerCornerType].radius+ "px" | ||
| 529 | + newFiller.style.position = "absolute"; | ||
| 530 | + newFiller.style.fontSize = "1px"; | ||
| 531 | + newFiller.style.overflow = "hidden"; | ||
| 532 | + newFiller.style.backgroundColor = this.boxColour; | ||
| 533 | + //newFiller.style.backgroundColor = get_random_color(); | ||
| 534 | + | ||
| 535 | + // Position filler | ||
| 536 | + switch(smallerCornerType) | ||
| 537 | + { | ||
| 538 | + case "tl": | ||
| 539 | + newFiller.style.bottom = "0px"; | ||
| 540 | + newFiller.style.left = "0px"; | ||
| 541 | + newFiller.style.borderLeft = this.borderString; | ||
| 542 | + this.topContainer.appendChild(newFiller); | ||
| 543 | + break; | ||
| 544 | + | ||
| 545 | + case "tr": | ||
| 546 | + newFiller.style.bottom = "0px"; | ||
| 547 | + newFiller.style.right = "0px"; | ||
| 548 | + newFiller.style.borderRight = this.borderString; | ||
| 549 | + this.topContainer.appendChild(newFiller); | ||
| 550 | + break; | ||
| 551 | + | ||
| 552 | + case "bl": | ||
| 553 | + newFiller.style.top = "0px"; | ||
| 554 | + newFiller.style.left = "0px"; | ||
| 555 | + newFiller.style.borderLeft = this.borderString; | ||
| 556 | + this.bottomContainer.appendChild(newFiller); | ||
| 557 | + break; | ||
| 558 | + | ||
| 559 | + case "br": | ||
| 560 | + newFiller.style.top = "0px"; | ||
| 561 | + newFiller.style.right = "0px"; | ||
| 562 | + newFiller.style.borderRight = this.borderString; | ||
| 563 | + this.bottomContainer.appendChild(newFiller); | ||
| 564 | + break; | ||
| 565 | + } | ||
| 566 | + } | ||
| 567 | + | ||
| 568 | + // Create the bar to fill the gap between each corner horizontally | ||
| 569 | + var newFillerBar = document.createElement("DIV"); | ||
| 570 | + newFillerBar.style.position = "relative"; | ||
| 571 | + newFillerBar.style.fontSize = "1px"; | ||
| 572 | + newFillerBar.style.overflow = "hidden"; | ||
| 573 | + newFillerBar.style.backgroundColor = this.boxColour; | ||
| 574 | + newFillerBar.style.backgroundImage = this.backgroundImage; | ||
| 575 | + | ||
| 576 | + switch(z) | ||
| 577 | + { | ||
| 578 | + case "t": | ||
| 579 | + // Top Bar | ||
| 580 | + if(this.topContainer) | ||
| 581 | + { | ||
| 582 | + // Edit by Asger Hallas: Check if settings.xx.radius is not false | ||
| 583 | + if(this.settings.tl.radius && this.settings.tr.radius) | ||
| 584 | + { | ||
| 585 | + newFillerBar.style.height = topMaxRadius - this.borderWidth + "px"; | ||
| 586 | + newFillerBar.style.marginLeft = this.settings.tl.radius - this.borderWidth + "px"; | ||
| 587 | + newFillerBar.style.marginRight = this.settings.tr.radius - this.borderWidth + "px"; | ||
| 588 | + newFillerBar.style.borderTop = this.borderString; | ||
| 589 | + | ||
| 590 | + if(this.backgroundImage != "") | ||
| 591 | + newFillerBar.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; | ||
| 592 | + | ||
| 593 | + this.topContainer.appendChild(newFillerBar); | ||
| 594 | + } | ||
| 595 | + if(this.box.id == "loginbox" || this.box.id == "loginbox_skin") | ||
| 596 | + newFillerBar.style.backgroundImage = ""; | ||
| 597 | + // Repos the boxes background image | ||
| 598 | + this.box.style.backgroundPosition = "0px -" + (topMaxRadius - this.borderWidth) + "px"; | ||
| 599 | + } | ||
| 600 | + break; | ||
| 601 | + | ||
| 602 | + case "b": | ||
| 603 | + if(this.bottomContainer) | ||
| 604 | + { | ||
| 605 | + // Edit by Asger Hallas: Check if settings.xx.radius is not false | ||
| 606 | + if(this.settings.bl.radius && this.settings.br.radius) | ||
| 607 | + { | ||
| 608 | + // Bottom Bar | ||
| 609 | + newFillerBar.style.height = botMaxRadius - this.borderWidth + "px"; | ||
| 610 | + newFillerBar.style.marginLeft = this.settings.bl.radius - this.borderWidth + "px"; | ||
| 611 | + newFillerBar.style.marginRight = this.settings.br.radius - this.borderWidth + "px"; | ||
| 612 | + newFillerBar.style.borderBottom = this.borderString; | ||
| 613 | + | ||
| 614 | + if(this.box.id == "ktBlock" || this.box.id == "pageBody" || this.box.id == "ktInfo" || this.box.id == "ktError" || this.box.id == "loginbox" || this.box.id == "loginbox_skin" || this.box.id == "portlet" || this.box.id == "portlet expanded") | ||
| 615 | + newFillerBar.style.backgroundImage = ""; | ||
| 616 | + if(this.box.id == "pageBody") | ||
| 617 | + newFillerBar.style.backgroundColor = "#D1D1D1"; | ||
| 618 | + if(this.backgroundImage != "") | ||
| 619 | + newFillerBar.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (topMaxRadius + this.borderWidth)) + "px"; | ||
| 620 | + this.bottomContainer.appendChild(newFillerBar); | ||
| 621 | + } | ||
| 622 | + } | ||
| 623 | + break; | ||
| 624 | + } | ||
| 625 | + } | ||
| 626 | + } | ||
| 627 | + | ||
| 628 | + /* | ||
| 629 | + AutoPad! apply padding if set. | ||
| 630 | + */ | ||
| 631 | + if(this.settings.autoPad == true && this.boxPadding > 0) | ||
| 632 | + { | ||
| 633 | + // Create content container | ||
| 634 | + var contentContainer = document.createElement("DIV"); | ||
| 635 | + | ||
| 636 | + // Set contentContainer's properties | ||
| 637 | + contentContainer.style.position = "relative"; | ||
| 638 | + contentContainer.innerHTML = this.boxContent; | ||
| 639 | + contentContainer.className = "autoPadDiv"; | ||
| 640 | + | ||
| 641 | + // Get padding amounts | ||
| 642 | + var topPadding = Math.abs(topMaxRadius - this.boxPadding); | ||
| 643 | + var botPadding = Math.abs(botMaxRadius - this.boxPadding); | ||
| 644 | + | ||
| 645 | + // Apply top padding | ||
| 646 | + if(topMaxRadius < this.boxPadding) | ||
| 647 | + contentContainer.style.paddingTop = topPadding + "px"; | ||
| 648 | + | ||
| 649 | + // Apply Bottom padding | ||
| 650 | + if(botMaxRadius < this.boxPadding) | ||
| 651 | + contentContainer.style.paddingBottom = botMaxRadius + "px"; | ||
| 652 | + | ||
| 653 | + // Apply left and right padding | ||
| 654 | + contentContainer.style.paddingLeft = this.boxPadding + "px"; | ||
| 655 | + contentContainer.style.paddingRight = this.boxPadding + "px"; | ||
| 656 | + | ||
| 657 | + // Append contentContainer | ||
| 658 | + this.contentDIV = this.box.appendChild(contentContainer); | ||
| 659 | + } | ||
| 660 | + } | ||
| 661 | + | ||
| 662 | + /* | ||
| 663 | + This function draws the pixles | ||
| 664 | + */ | ||
| 665 | + | ||
| 666 | + | ||
| 667 | + this.drawPixel = function(intx, inty, colour, transAmount, height, newCorner, image, cornerRadius, corner) | ||
| 668 | + { | ||
| 669 | + // Create pixel | ||
| 670 | + var pixel = document.createElement("DIV"); | ||
| 671 | + pixel.style.height = height + "px"; | ||
| 672 | + pixel.style.width = "1px"; | ||
| 673 | + pixel.style.position = "absolute"; | ||
| 674 | + pixel.style.fontSize = "1px"; | ||
| 675 | + pixel.style.overflow = "hidden"; | ||
| 676 | + | ||
| 677 | + // Max Top Radius | ||
| 678 | + var topMaxRadius = Math.max(this.settings["tr"].radius, this.settings["tl"].radius); | ||
| 679 | + | ||
| 680 | + // Dont apply background image to border pixels | ||
| 681 | + if(image == -1 && this.backgroundImage != "") | ||
| 682 | + { | ||
| 683 | + if (corner != 'bl' && corner != 'br') | ||
| 684 | + pixel.style.backgroundImage = this.backgroundImage; | ||
| 685 | + else | ||
| 686 | + if(this.box.id == "pageBody") | ||
| 687 | + pixel.style.backgroundColor = "#D1D1D1"; | ||
| 688 | + else | ||
| 689 | + pixel.style.backgroundColor = colour; | ||
| 690 | + | ||
| 691 | + pixel.style.backgroundPosition = "-" + (this.boxWidth - (cornerRadius - intx) + this.borderWidth) + "px -" + ((this.boxHeight + topMaxRadius + inty) -this.borderWidth) + "px"; | ||
| 692 | + } | ||
| 693 | + else | ||
| 694 | + { | ||
| 695 | + pixel.style.backgroundColor = colour; | ||
| 696 | + } | ||
| 697 | + | ||
| 698 | + // Set opacity if the transparency is anything other than 100 | ||
| 699 | + if (transAmount != 100) | ||
| 700 | + setOpacity(pixel, transAmount); | ||
| 701 | + | ||
| 702 | + // Set the pixels position | ||
| 703 | + pixel.style.top = inty + "px"; | ||
| 704 | + pixel.style.left = intx + "px"; | ||
| 705 | + | ||
| 706 | + newCorner.appendChild(pixel); | ||
| 707 | + } | ||
| 708 | + } | ||
| 709 | + | ||
| 710 | + // ------------- UTILITY FUNCTIONS | ||
| 711 | + | ||
| 712 | + // Inserts a element after another | ||
| 713 | + function insertAfter(parent, node, referenceNode) | ||
| 714 | + { | ||
| 715 | + parent.insertBefore(node, referenceNode.nextSibling); | ||
| 716 | + } | ||
| 717 | + | ||
| 718 | + /* | ||
| 719 | + Blends the two colours by the fraction | ||
| 720 | + returns the resulting colour as a string in the format "#FFFFFF" | ||
| 721 | + */ | ||
| 722 | + function BlendColour(Col1, Col2, Col1Fraction) | ||
| 723 | + { | ||
| 724 | + var red1 = parseInt(Col1.substr(1,2),16); | ||
| 725 | + var green1 = parseInt(Col1.substr(3,2),16); | ||
| 726 | + var blue1 = parseInt(Col1.substr(5,2),16); | ||
| 727 | + var red2 = parseInt(Col2.substr(1,2),16); | ||
| 728 | + var green2 = parseInt(Col2.substr(3,2),16); | ||
| 729 | + var blue2 = parseInt(Col2.substr(5,2),16); | ||
| 730 | + | ||
| 731 | + if(Col1Fraction > 1 || Col1Fraction < 0) Col1Fraction = 1; | ||
| 732 | + | ||
| 733 | + var endRed = Math.round((red1 * Col1Fraction) + (red2 * (1 - Col1Fraction))); | ||
| 734 | + if(endRed > 255) endRed = 255; | ||
| 735 | + if(endRed < 0) endRed = 0; | ||
| 736 | + | ||
| 737 | + var endGreen = Math.round((green1 * Col1Fraction) + (green2 * (1 - Col1Fraction))); | ||
| 738 | + if(endGreen > 255) endGreen = 255; | ||
| 739 | + if(endGreen < 0) endGreen = 0; | ||
| 740 | + | ||
| 741 | + var endBlue = Math.round((blue1 * Col1Fraction) + (blue2 * (1 - Col1Fraction))); | ||
| 742 | + if(endBlue > 255) endBlue = 255; | ||
| 743 | + if(endBlue < 0) endBlue = 0; | ||
| 744 | + | ||
| 745 | + return "#" + IntToHex(endRed)+ IntToHex(endGreen)+ IntToHex(endBlue); | ||
| 746 | + } | ||
| 747 | + | ||
| 748 | + /* | ||
| 749 | + Converts a number to hexadecimal format | ||
| 750 | + */ | ||
| 751 | + function IntToHex(strNum) | ||
| 752 | + { | ||
| 753 | + base = strNum / 16; | ||
| 754 | + rem = strNum % 16; | ||
| 755 | + base = base - (rem / 16); | ||
| 756 | + baseS = MakeHex(base); | ||
| 757 | + remS = MakeHex(rem); | ||
| 758 | + | ||
| 759 | + return baseS + '' + remS; | ||
| 760 | + } | ||
| 761 | + | ||
| 762 | + | ||
| 763 | + /* | ||
| 764 | + gets the hex bits of a number | ||
| 765 | + */ | ||
| 766 | + function MakeHex(x) | ||
| 767 | + { | ||
| 768 | + if((x >= 0) && (x <= 9)) | ||
| 769 | + { | ||
| 770 | + return x; | ||
| 771 | + } | ||
| 772 | + else | ||
| 773 | + { | ||
| 774 | + switch(x) | ||
| 775 | + { | ||
| 776 | + case 10: return "A"; | ||
| 777 | + case 11: return "B"; | ||
| 778 | + case 12: return "C"; | ||
| 779 | + case 13: return "D"; | ||
| 780 | + case 14: return "E"; | ||
| 781 | + case 15: return "F"; | ||
| 782 | + } | ||
| 783 | + } | ||
| 784 | + } | ||
| 785 | + | ||
| 786 | + | ||
| 787 | + /* | ||
| 788 | + For a pixel cut by the line determines the fraction of the pixel on the 'inside' of the | ||
| 789 | + line. Returns a number between 0 and 1 | ||
| 790 | + */ | ||
| 791 | + function pixelFraction(x, y, r) | ||
| 792 | + { | ||
| 793 | + var pixelfraction = 0; | ||
| 794 | + | ||
| 795 | + /* | ||
| 796 | + determine the co-ordinates of the two points on the perimeter of the pixel that the | ||
| 797 | + circle crosses | ||
| 798 | + */ | ||
| 799 | + var xvalues = new Array(1); | ||
| 800 | + var yvalues = new Array(1); | ||
| 801 | + var point = 0; | ||
| 802 | + var whatsides = ""; | ||
| 803 | + | ||
| 804 | + // x + 0 = Left | ||
| 805 | + var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x,2))); | ||
| 806 | + | ||
| 807 | + if ((intersect >= y) && (intersect < (y+1))) | ||
| 808 | + { | ||
| 809 | + whatsides = "Left"; | ||
| 810 | + xvalues[point] = 0; | ||
| 811 | + yvalues[point] = intersect - y; | ||
| 812 | + point = point + 1; | ||
| 813 | + } | ||
| 814 | + // y + 1 = Top | ||
| 815 | + var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y+1,2))); | ||
| 816 | + | ||
| 817 | + if ((intersect >= x) && (intersect < (x+1))) | ||
| 818 | + { | ||
| 819 | + whatsides = whatsides + "Top"; | ||
| 820 | + xvalues[point] = intersect - x; | ||
| 821 | + yvalues[point] = 1; | ||
| 822 | + point = point + 1; | ||
| 823 | + } | ||
| 824 | + // x + 1 = Right | ||
| 825 | + var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x+1,2))); | ||
| 826 | + | ||
| 827 | + if ((intersect >= y) && (intersect < (y+1))) | ||
| 828 | + { | ||
| 829 | + whatsides = whatsides + "Right"; | ||
| 830 | + xvalues[point] = 1; | ||
| 831 | + yvalues[point] = intersect - y; | ||
| 832 | + point = point + 1; | ||
| 833 | + } | ||
| 834 | + // y + 0 = Bottom | ||
| 835 | + var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y,2))); | ||
| 836 | + | ||
| 837 | + if ((intersect >= x) && (intersect < (x+1))) | ||
| 838 | + { | ||
| 839 | + whatsides = whatsides + "Bottom"; | ||
| 840 | + xvalues[point] = intersect - x; | ||
| 841 | + yvalues[point] = 0; | ||
| 842 | + } | ||
| 843 | + | ||
| 844 | + /* | ||
| 845 | + depending on which sides of the perimeter of the pixel the circle crosses calculate the | ||
| 846 | + fraction of the pixel inside the circle | ||
| 847 | + */ | ||
| 848 | + switch (whatsides) | ||
| 849 | + { | ||
| 850 | + case "LeftRight": | ||
| 851 | + pixelfraction = Math.min(yvalues[0],yvalues[1]) + ((Math.max(yvalues[0],yvalues[1]) - Math.min(yvalues[0],yvalues[1]))/2); | ||
| 852 | + break; | ||
| 853 | + | ||
| 854 | + case "TopRight": | ||
| 855 | + pixelfraction = 1-(((1-xvalues[0])*(1-yvalues[1]))/2); | ||
| 856 | + break; | ||
| 857 | + | ||
| 858 | + case "TopBottom": | ||
| 859 | + pixelfraction = Math.min(xvalues[0],xvalues[1]) + ((Math.max(xvalues[0],xvalues[1]) - Math.min(xvalues[0],xvalues[1]))/2); | ||
| 860 | + break; | ||
| 861 | + | ||
| 862 | + case "LeftBottom": | ||
| 863 | + pixelfraction = (yvalues[0]*xvalues[1])/2; | ||
| 864 | + break; | ||
| 865 | + | ||
| 866 | + default: | ||
| 867 | + pixelfraction = 1; | ||
| 868 | + } | ||
| 869 | + | ||
| 870 | + return pixelfraction; | ||
| 871 | + } | ||
| 872 | + | ||
| 873 | + | ||
| 874 | + // This function converts CSS rgb(x, x, x) to hexadecimal | ||
| 875 | + function rgb2Hex(rgbColour) | ||
| 876 | + { | ||
| 877 | + try{ | ||
| 878 | + | ||
| 879 | + // Get array of RGB values | ||
| 880 | + var rgbArray = rgb2Array(rgbColour); | ||
| 881 | + | ||
| 882 | + // Get RGB values | ||
| 883 | + var red = parseInt(rgbArray[0]); | ||
| 884 | + var green = parseInt(rgbArray[1]); | ||
| 885 | + var blue = parseInt(rgbArray[2]); | ||
| 886 | + | ||
| 887 | + // Build hex colour code | ||
| 888 | + var hexColour = "#" + IntToHex(red) + IntToHex(green) + IntToHex(blue); | ||
| 889 | + } | ||
| 890 | + catch(e){ | ||
| 891 | + | ||
| 892 | + alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex"); | ||
| 893 | + } | ||
| 894 | + | ||
| 895 | + return hexColour; | ||
| 896 | + } | ||
| 897 | + | ||
| 898 | + // Returns an array of rbg values | ||
| 899 | + function rgb2Array(rgbColour) | ||
| 900 | + { | ||
| 901 | + // Remove rgb() | ||
| 902 | + var rgbValues = rgbColour.substring(4, rgbColour.indexOf(")")); | ||
| 903 | + | ||
| 904 | + // Split RGB into array | ||
| 905 | + var rgbArray = rgbValues.split(", "); | ||
| 906 | + | ||
| 907 | + return rgbArray; | ||
| 908 | + } | ||
| 909 | + | ||
| 910 | + /* | ||
| 911 | + Function by Simon Willison from sitepoint.com | ||
| 912 | + Modified by Cameron Cooke adding Safari's rgba support | ||
| 913 | + */ | ||
| 914 | + function setOpacity(obj, opacity) | ||
| 915 | + { | ||
| 916 | + opacity = (opacity == 100)?99.999:opacity; | ||
| 917 | + | ||
| 918 | + if(isSafari && obj.tagName != "IFRAME") | ||
| 919 | + { | ||
| 920 | + // Get array of RGB values | ||
| 921 | + var rgbArray = rgb2Array(obj.style.backgroundColor); | ||
| 922 | + | ||
| 923 | + // Get RGB values | ||
| 924 | + var red = parseInt(rgbArray[0]); | ||
| 925 | + var green = parseInt(rgbArray[1]); | ||
| 926 | + var blue = parseInt(rgbArray[2]); | ||
| 927 | + | ||
| 928 | + // Safari using RGBA support | ||
| 929 | + obj.style.backgroundColor = "rgba(" + red + ", " + green + ", " + blue + ", " + opacity/100 + ")"; | ||
| 930 | + } | ||
| 931 | + else if(typeof(obj.style.opacity) != "undefined") | ||
| 932 | + { | ||
| 933 | + // W3C | ||
| 934 | + obj.style.opacity = opacity/100; | ||
| 935 | + } | ||
| 936 | + else if(typeof(obj.style.MozOpacity) != "undefined") | ||
| 937 | + { | ||
| 938 | + // Older Mozilla | ||
| 939 | + obj.style.MozOpacity = opacity/100; | ||
| 940 | + } | ||
| 941 | + else if(typeof(obj.style.filter) != "undefined") | ||
| 942 | + { | ||
| 943 | + // IE | ||
| 944 | + obj.style.filter = "alpha(opacity:" + opacity + ")"; | ||
| 945 | + } | ||
| 946 | + else if(typeof(obj.style.KHTMLOpacity) != "undefined") | ||
| 947 | + { | ||
| 948 | + // Older KHTML Based Browsers | ||
| 949 | + obj.style.KHTMLOpacity = opacity/100; | ||
| 950 | + } | ||
| 951 | + } | ||
| 952 | + | ||
| 953 | + /* | ||
| 954 | + Returns index if the passed value is found in the | ||
| 955 | + array otherwise returns false. | ||
| 956 | + */ | ||
| 957 | + function inArray(array, value) | ||
| 958 | + { | ||
| 959 | + for(var i = 0; i < array.length; i++){ | ||
| 960 | + | ||
| 961 | + // Matches identical (===), not just similar (==). | ||
| 962 | + if (array[i] === value) return i; | ||
| 963 | + } | ||
| 964 | + | ||
| 965 | + return false; | ||
| 966 | + } | ||
| 967 | + | ||
| 968 | + /* | ||
| 969 | + Returns true if the passed value is found as a key | ||
| 970 | + in the array otherwise returns false. | ||
| 971 | + */ | ||
| 972 | + function inArrayKey(array, value) | ||
| 973 | + { | ||
| 974 | + for(key in array){ | ||
| 975 | + | ||
| 976 | + // Matches identical (===), not just similar (==). | ||
| 977 | + if(key === value) return true; | ||
| 978 | + } | ||
| 979 | + | ||
| 980 | + return false; | ||
| 981 | + } | ||
| 982 | + | ||
| 983 | + // Cross browser add event wrapper | ||
| 984 | + function addEvent(elm, evType, fn, useCapture) { | ||
| 985 | + if (elm.addEventListener) { | ||
| 986 | + elm.addEventListener(evType, fn, useCapture); | ||
| 987 | + return true; | ||
| 988 | + } | ||
| 989 | + else if (elm.attachEvent) { | ||
| 990 | + var r = elm.attachEvent('on' + evType, fn); | ||
| 991 | + return r; | ||
| 992 | + } | ||
| 993 | + else { | ||
| 994 | + elm['on' + evType] = fn; | ||
| 995 | + } | ||
| 996 | + } | ||
| 997 | + | ||
| 998 | + // Cross browser remove event wrapper | ||
| 999 | + function removeEvent(obj, evType, fn, useCapture){ | ||
| 1000 | + if (obj.removeEventListener){ | ||
| 1001 | + obj.removeEventListener(evType, fn, useCapture); | ||
| 1002 | + return true; | ||
| 1003 | + } else if (obj.detachEvent){ | ||
| 1004 | + var r = obj.detachEvent("on"+evType, fn); | ||
| 1005 | + return r; | ||
| 1006 | + } else { | ||
| 1007 | + alert("Handler could not be removed"); | ||
| 1008 | + } | ||
| 1009 | + } | ||
| 1010 | + | ||
| 1011 | + // Formats colours | ||
| 1012 | + function format_colour(colour) | ||
| 1013 | + { | ||
| 1014 | + var returnColour = "#ffffff"; | ||
| 1015 | + | ||
| 1016 | + // Make sure colour is set and not transparent | ||
| 1017 | + if(colour != "" && colour != "transparent") | ||
| 1018 | + { | ||
| 1019 | + // RGB Value? | ||
| 1020 | + if(colour.substr(0, 3) == "rgb") | ||
| 1021 | + { | ||
| 1022 | + // Get HEX aquiv. | ||
| 1023 | + returnColour = rgb2Hex(colour); | ||
| 1024 | + } | ||
| 1025 | + else if(colour.length == 4) | ||
| 1026 | + { | ||
| 1027 | + // 3 chr colour code add remainder | ||
| 1028 | + returnColour = "#" + colour.substring(1, 2) + colour.substring(1, 2) + colour.substring(2, 3) + colour.substring(2, 3) + colour.substring(3, 4) + colour.substring(3, 4); | ||
| 1029 | + } | ||
| 1030 | + else | ||
| 1031 | + { | ||
| 1032 | + // Normal valid hex colour | ||
| 1033 | + returnColour = colour; | ||
| 1034 | + } | ||
| 1035 | + } | ||
| 1036 | + | ||
| 1037 | + return returnColour; | ||
| 1038 | + } | ||
| 1039 | + | ||
| 1040 | + // Returns the style value for the property specfied | ||
| 1041 | + function get_style(obj, property, propertyNS) | ||
| 1042 | + { | ||
| 1043 | + try | ||
| 1044 | + { | ||
| 1045 | + if(obj.currentStyle) | ||
| 1046 | + { | ||
| 1047 | + var returnVal = eval("obj.currentStyle." + property); | ||
| 1048 | + } | ||
| 1049 | + else | ||
| 1050 | + { | ||
| 1051 | + /* | ||
| 1052 | + Safari does not expose any information for the object if display is | ||
| 1053 | + set to none is set so we temporally enable it. | ||
| 1054 | + */ | ||
| 1055 | + if(isSafari && obj.style.display == "none") | ||
| 1056 | + { | ||
| 1057 | + obj.style.display = ""; | ||
| 1058 | + var wasHidden = true; | ||
| 1059 | + } | ||
| 1060 | + | ||
| 1061 | + var returnVal = document.defaultView.getComputedStyle(obj, '').getPropertyValue(propertyNS); | ||
| 1062 | + | ||
| 1063 | + // Rehide the object | ||
| 1064 | + if(isSafari && wasHidden) | ||
| 1065 | + { | ||
| 1066 | + obj.style.display = "none"; | ||
| 1067 | + } | ||
| 1068 | + } | ||
| 1069 | + } | ||
| 1070 | + catch(e) | ||
| 1071 | + { | ||
| 1072 | + // Do nothing | ||
| 1073 | + } | ||
| 1074 | + | ||
| 1075 | + return returnVal; | ||
| 1076 | + } | ||
| 1077 | + | ||
| 1078 | + // Get elements by class by Dustin Diaz. | ||
| 1079 | + function getElementsByClass(searchClass, node, tag) | ||
| 1080 | + { | ||
| 1081 | + var classElements = new Array(); | ||
| 1082 | + | ||
| 1083 | + if(node == null) | ||
| 1084 | + node = document; | ||
| 1085 | + if(tag == null) | ||
| 1086 | + tag = '*'; | ||
| 1087 | + | ||
| 1088 | + var els = node.getElementsByTagName(tag); | ||
| 1089 | + var elsLen = els.length; | ||
| 1090 | + var pattern = new RegExp("(^|\s)"+searchClass+"(\s|$)"); | ||
| 1091 | + | ||
| 1092 | + for (i = 0, j = 0; i < elsLen; i++) | ||
| 1093 | + { | ||
| 1094 | + if(pattern.test(els[i].className)) | ||
| 1095 | + { | ||
| 1096 | + classElements[j] = els[i]; | ||
| 1097 | + j++; | ||
| 1098 | + } | ||
| 1099 | + } | ||
| 1100 | + | ||
| 1101 | + return classElements; | ||
| 1102 | + } | ||
| 1103 | + | ||
| 1104 | + // Displays error message | ||
| 1105 | + function newCurvyError(errorMessage) | ||
| 1106 | + { | ||
| 1107 | + return new Error("curvyCorners Error:\n" + errorMessage) | ||
| 1108 | + } | ||
| 0 | \ No newline at end of file | 1109 | \ No newline at end of file |
thirdpartyjs/curvycorners/rounded_corners_lite.inc.js
0 โ 100644
| 1 | + | ||
| 2 | + /**************************************************************** | ||
| 3 | + * * | ||
| 4 | + * curvyCorners * | ||
| 5 | + * ------------ * | ||
| 6 | + * * | ||
| 7 | + * This script generates rounded corners for your divs. * | ||
| 8 | + * * | ||
| 9 | + * Version 1.2.9 * | ||
| 10 | + * Copyright (c) 2006 Cameron Cooke * | ||
| 11 | + * By: Cameron Cooke and Tim Hutchison. * | ||
| 12 | + * * | ||
| 13 | + * * | ||
| 14 | + * Website: http://www.curvycorners.net * | ||
| 15 | + * Email: info@totalinfinity.com * | ||
| 16 | + * Forum: http://www.curvycorners.net/forum/ * | ||
| 17 | + * * | ||
| 18 | + * * | ||
| 19 | + * This library is free software; you can redistribute * | ||
| 20 | + * it and/or modify it under the terms of the GNU * | ||
| 21 | + * Lesser General Public License as published by the * | ||
| 22 | + * Free Software Foundation; either version 2.1 of the * | ||
| 23 | + * License, or (at your option) any later version. * | ||
| 24 | + * * | ||
| 25 | + * This library is distributed in the hope that it will * | ||
| 26 | + * be useful, but WITHOUT ANY WARRANTY; without even the * | ||
| 27 | + * implied warranty of MERCHANTABILITY or FITNESS FOR A * | ||
| 28 | + * PARTICULAR PURPOSE. See the GNU Lesser General Public * | ||
| 29 | + * License for more details. * | ||
| 30 | + * * | ||
| 31 | + * You should have received a copy of the GNU Lesser * | ||
| 32 | + * General Public License along with this library; * | ||
| 33 | + * Inc., 59 Temple Place, Suite 330, Boston, * | ||
| 34 | + * MA 02111-1307 USA * | ||
| 35 | + * * | ||
| 36 | + ****************************************************************/ | ||
| 37 | + | ||
| 38 | +var isIE = navigator.userAgent.toLowerCase().indexOf("msie") > -1; var isMoz = document.implementation && document.implementation.createDocument; var isSafari = ((navigator.userAgent.toLowerCase().indexOf('safari')!=-1)&&(navigator.userAgent.toLowerCase().indexOf('mac')!=-1))?true:false; function curvyCorners() | ||
| 39 | +{ if(typeof(arguments[0]) != "object") throw newCurvyError("First parameter of curvyCorners() must be an object."); if(typeof(arguments[1]) != "object" && typeof(arguments[1]) != "string") throw newCurvyError("Second parameter of curvyCorners() must be an object or a class name."); if(typeof(arguments[1]) == "string") | ||
| 40 | +{ var startIndex = 0; var boxCol = getElementsByClass(arguments[1]);} | ||
| 41 | +else | ||
| 42 | +{ var startIndex = 1; var boxCol = arguments;} | ||
| 43 | +var curvyCornersCol = new Array(); if(arguments[0].validTags) | ||
| 44 | +var validElements = arguments[0].validTags; else | ||
| 45 | +var validElements = ["div"]; for(var i = startIndex, j = boxCol.length; i < j; i++) | ||
| 46 | +{ var currentTag = boxCol[i].tagName.toLowerCase(); if(inArray(validElements, currentTag) !== false) | ||
| 47 | +{ curvyCornersCol[curvyCornersCol.length] = new curvyObject(arguments[0], boxCol[i]);} | ||
| 48 | +} | ||
| 49 | +this.objects = curvyCornersCol; this.applyCornersToAll = function() | ||
| 50 | +{ for(var x = 0, k = this.objects.length; x < k; x++) | ||
| 51 | +{ this.objects[x].applyCorners();} | ||
| 52 | +} | ||
| 53 | +} | ||
| 54 | +function curvyObject() | ||
| 55 | +{ this.box = arguments[1]; this.settings = arguments[0]; this.topContainer = null; this.bottomContainer = null; this.masterCorners = new Array(); this.contentDIV = null; var boxHeight = get_style(this.box, "height", "height"); var boxWidth = get_style(this.box, "width", "width"); var borderWidth = get_style(this.box, "borderTopWidth", "border-top-width"); var borderColour = get_style(this.box, "borderTopColor", "border-top-color"); var boxColour = get_style(this.box, "backgroundColor", "background-color"); var backgroundImage = get_style(this.box, "backgroundImage", "background-image"); var boxPosition = get_style(this.box, "position", "position"); var boxPadding = get_style(this.box, "paddingTop", "padding-top"); this.boxHeight = parseInt(((boxHeight != "" && boxHeight != "auto" && boxHeight.indexOf("%") == -1)? boxHeight.substring(0, boxHeight.indexOf("px")) : this.box.scrollHeight)); this.boxWidth = parseInt(((boxWidth != "" && boxWidth != "auto" && boxWidth.indexOf("%") == -1)? boxWidth.substring(0, boxWidth.indexOf("px")) : this.box.scrollWidth)); this.borderWidth = parseInt(((borderWidth != "" && borderWidth.indexOf("px") !== -1)? borderWidth.slice(0, borderWidth.indexOf("px")) : 0)); this.boxColour = format_colour(boxColour); this.boxPadding = parseInt(((boxPadding != "" && boxPadding.indexOf("px") !== -1)? boxPadding.slice(0, boxPadding.indexOf("px")) : 0)); this.borderColour = format_colour(borderColour); this.borderString = this.borderWidth + "px" + " solid " + this.borderColour; this.backgroundImage = ((backgroundImage != "none")? backgroundImage : ""); this.boxContent = this.box.innerHTML; if(boxPosition != "absolute") this.box.style.position = "relative"; this.box.style.padding = "0px"; if(isIE && boxWidth == "auto" && boxHeight == "auto") this.box.style.width = "100%"; if(this.settings.autoPad == true && this.boxPadding > 0) | ||
| 56 | +this.box.innerHTML = ""; this.applyCorners = function() | ||
| 57 | +{ for(var t = 0; t < 2; t++) | ||
| 58 | +{ switch(t) | ||
| 59 | +{ case 0: | ||
| 60 | +if(this.settings.tl || this.settings.tr) | ||
| 61 | +{ var newMainContainer = document.createElement("DIV"); newMainContainer.style.width = "100%"; newMainContainer.style.fontSize = "1px"; newMainContainer.style.overflow = "hidden"; newMainContainer.style.position = "absolute"; newMainContainer.style.paddingLeft = this.borderWidth + "px"; newMainContainer.style.paddingRight = this.borderWidth + "px"; var topMaxRadius = Math.max(this.settings.tl ? this.settings.tl.radius : 0, this.settings.tr ? this.settings.tr.radius : 0); newMainContainer.style.height = topMaxRadius + "px"; newMainContainer.style.top = 0 - topMaxRadius + "px"; newMainContainer.style.left = 0 - this.borderWidth + "px"; this.topContainer = this.box.appendChild(newMainContainer);} | ||
| 62 | +break; case 1: | ||
| 63 | +if(this.settings.bl || this.settings.br) | ||
| 64 | +{ var newMainContainer = document.createElement("DIV"); newMainContainer.style.width = "100%"; newMainContainer.style.fontSize = "1px"; newMainContainer.style.overflow = "hidden"; newMainContainer.style.position = "absolute"; newMainContainer.style.paddingLeft = this.borderWidth + "px"; newMainContainer.style.paddingRight = this.borderWidth + "px"; var botMaxRadius = Math.max(this.settings.bl ? this.settings.bl.radius : 0, this.settings.br ? this.settings.br.radius : 0); newMainContainer.style.height = botMaxRadius + "px"; newMainContainer.style.bottom = 0 - botMaxRadius + "px"; newMainContainer.style.left = 0 - this.borderWidth + "px"; this.bottomContainer = this.box.appendChild(newMainContainer);} | ||
| 65 | +break;} | ||
| 66 | +} | ||
| 67 | +if(this.topContainer) this.box.style.borderTopWidth = "0px"; if(this.bottomContainer) this.box.style.borderBottomWidth = "0px"; var corners = ["tr", "tl", "br", "bl"]; for(var i in corners) | ||
| 68 | +{ if(i > -1 < 4) | ||
| 69 | +{ var cc = corners[i]; if(!this.settings[cc]) | ||
| 70 | +{ if(((cc == "tr" || cc == "tl") && this.topContainer != null) || ((cc == "br" || cc == "bl") && this.bottomContainer != null)) | ||
| 71 | +{ var newCorner = document.createElement("DIV"); newCorner.style.position = "relative"; newCorner.style.fontSize = "1px"; newCorner.style.overflow = "hidden"; if(this.backgroundImage == "") | ||
| 72 | +newCorner.style.backgroundColor = this.boxColour; else | ||
| 73 | +newCorner.style.backgroundImage = this.backgroundImage; switch(cc) | ||
| 74 | +{ case "tl": | ||
| 75 | +newCorner.style.height = topMaxRadius - this.borderWidth + "px"; newCorner.style.marginRight = this.settings.tr.radius - (this.borderWidth*2) + "px"; newCorner.style.borderLeft = this.borderString; newCorner.style.borderTop = this.borderString; newCorner.style.left = -this.borderWidth + "px"; break; case "tr": | ||
| 76 | +newCorner.style.height = topMaxRadius - this.borderWidth + "px"; newCorner.style.marginLeft = this.settings.tl.radius - (this.borderWidth*2) + "px"; newCorner.style.borderRight = this.borderString; newCorner.style.borderTop = this.borderString; newCorner.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; newCorner.style.left = this.borderWidth + "px"; break; case "bl": | ||
| 77 | +newCorner.style.height = botMaxRadius - this.borderWidth + "px"; newCorner.style.marginRight = this.settings.br.radius - (this.borderWidth*2) + "px"; newCorner.style.borderLeft = this.borderString; newCorner.style.borderBottom = this.borderString; newCorner.style.left = -this.borderWidth + "px"; newCorner.style.backgroundPosition = "-" + (this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; break; case "br": | ||
| 78 | +newCorner.style.height = botMaxRadius - this.borderWidth + "px"; newCorner.style.marginLeft = this.settings.bl.radius - (this.borderWidth*2) + "px"; newCorner.style.borderRight = this.borderString; newCorner.style.borderBottom = this.borderString; newCorner.style.left = this.borderWidth + "px" | ||
| 79 | +newCorner.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; break;} | ||
| 80 | +} | ||
| 81 | +} | ||
| 82 | +else | ||
| 83 | +{ if(this.masterCorners[this.settings[cc].radius]) | ||
| 84 | +{ var newCorner = this.masterCorners[this.settings[cc].radius].cloneNode(true);} | ||
| 85 | +else | ||
| 86 | +{ var newCorner = document.createElement("DIV"); newCorner.style.height = this.settings[cc].radius + "px"; newCorner.style.width = this.settings[cc].radius + "px"; newCorner.style.position = "absolute"; newCorner.style.fontSize = "1px"; newCorner.style.overflow = "hidden"; var borderRadius = parseInt(this.settings[cc].radius - this.borderWidth); for(var intx = 0, j = this.settings[cc].radius; intx < j; intx++) | ||
| 87 | +{ if((intx +1) >= borderRadius) | ||
| 88 | +var y1 = -1; else | ||
| 89 | +var y1 = (Math.floor(Math.sqrt(Math.pow(borderRadius, 2) - Math.pow((intx+1), 2))) - 1); if(borderRadius != j) | ||
| 90 | +{ if((intx) >= borderRadius) | ||
| 91 | +var y2 = -1; else | ||
| 92 | +var y2 = Math.ceil(Math.sqrt(Math.pow(borderRadius,2) - Math.pow(intx, 2))); if((intx+1) >= j) | ||
| 93 | +var y3 = -1; else | ||
| 94 | +var y3 = (Math.floor(Math.sqrt(Math.pow(j ,2) - Math.pow((intx+1), 2))) - 1);} | ||
| 95 | +if((intx) >= j) | ||
| 96 | +var y4 = -1; else | ||
| 97 | +var y4 = Math.ceil(Math.sqrt(Math.pow(j ,2) - Math.pow(intx, 2))); if(y1 > -1) this.drawPixel(intx, 0, this.boxColour, 100, (y1+1), newCorner, -1, this.settings[cc].radius); if(borderRadius != j) | ||
| 98 | +{ for(var inty = (y1 + 1); inty < y2; inty++) | ||
| 99 | +{ if(this.settings.antiAlias) | ||
| 100 | +{ if(this.backgroundImage != "") | ||
| 101 | +{ var borderFract = (pixelFraction(intx, inty, borderRadius) * 100); if(borderFract < 30) | ||
| 102 | +{ this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, 0, this.settings[cc].radius);} | ||
| 103 | +else | ||
| 104 | +{ this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, -1, this.settings[cc].radius);} | ||
| 105 | +} | ||
| 106 | +else | ||
| 107 | +{ var pixelcolour = BlendColour(this.boxColour, this.borderColour, pixelFraction(intx, inty, borderRadius)); this.drawPixel(intx, inty, pixelcolour, 100, 1, newCorner, 0, this.settings[cc].radius, cc);} | ||
| 108 | +} | ||
| 109 | +} | ||
| 110 | +if(this.settings.antiAlias) | ||
| 111 | +{ if(y3 >= y2) | ||
| 112 | +{ if (y2 == -1) y2 = 0; this.drawPixel(intx, y2, this.borderColour, 100, (y3 - y2 + 1), newCorner, 0, 0);} | ||
| 113 | +} | ||
| 114 | +else | ||
| 115 | +{ if(y3 >= y1) | ||
| 116 | +{ this.drawPixel(intx, (y1 + 1), this.borderColour, 100, (y3 - y1), newCorner, 0, 0);} | ||
| 117 | +} | ||
| 118 | +var outsideColour = this.borderColour;} | ||
| 119 | +else | ||
| 120 | +{ var outsideColour = this.boxColour; var y3 = y1;} | ||
| 121 | +if(this.settings.antiAlias) | ||
| 122 | +{ for(var inty = (y3 + 1); inty < y4; inty++) | ||
| 123 | +{ this.drawPixel(intx, inty, outsideColour, (pixelFraction(intx, inty , j) * 100), 1, newCorner, ((this.borderWidth > 0)? 0 : -1), this.settings[cc].radius);} | ||
| 124 | +} | ||
| 125 | +} | ||
| 126 | +this.masterCorners[this.settings[cc].radius] = newCorner.cloneNode(true);} | ||
| 127 | +if(cc != "br") | ||
| 128 | +{ for(var t = 0, k = newCorner.childNodes.length; t < k; t++) | ||
| 129 | +{ var pixelBar = newCorner.childNodes[t]; var pixelBarTop = parseInt(pixelBar.style.top.substring(0, pixelBar.style.top.indexOf("px"))); var pixelBarLeft = parseInt(pixelBar.style.left.substring(0, pixelBar.style.left.indexOf("px"))); var pixelBarHeight = parseInt(pixelBar.style.height.substring(0, pixelBar.style.height.indexOf("px"))); if(cc == "tl" || cc == "bl"){ pixelBar.style.left = this.settings[cc].radius -pixelBarLeft -1 + "px";} | ||
| 130 | +if(cc == "tr" || cc == "tl"){ pixelBar.style.top = this.settings[cc].radius -pixelBarHeight -pixelBarTop + "px";} | ||
| 131 | +switch(cc) | ||
| 132 | +{ case "tr": | ||
| 133 | +pixelBar.style.backgroundPosition = "-" + Math.abs((this.boxWidth - this.settings[cc].radius + this.borderWidth) + pixelBarLeft) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; break; case "tl": | ||
| 134 | +pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; break; case "bl": | ||
| 135 | +pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs((this.boxHeight + this.settings[cc].radius + pixelBarTop) -this.borderWidth) + "px"; break;} | ||
| 136 | +} | ||
| 137 | +} | ||
| 138 | +} | ||
| 139 | +if(newCorner) | ||
| 140 | +{ switch(cc) | ||
| 141 | +{ case "tl": | ||
| 142 | +if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; if(this.topContainer) this.topContainer.appendChild(newCorner); break; case "tr": | ||
| 143 | +if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; if(this.topContainer) this.topContainer.appendChild(newCorner); break; case "bl": | ||
| 144 | +if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); break; case "br": | ||
| 145 | +if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); break;} | ||
| 146 | +} | ||
| 147 | +} | ||
| 148 | +} | ||
| 149 | +var radiusDiff = new Array(); radiusDiff["t"] = Math.abs(this.settings.tl.radius - this.settings.tr.radius) | ||
| 150 | +radiusDiff["b"] = Math.abs(this.settings.bl.radius - this.settings.br.radius); for(z in radiusDiff) | ||
| 151 | +{ if(z == "t" || z == "b") | ||
| 152 | +{ if(radiusDiff[z]) | ||
| 153 | +{ var smallerCornerType = ((this.settings[z + "l"].radius < this.settings[z + "r"].radius)? z +"l" : z +"r"); var newFiller = document.createElement("DIV"); newFiller.style.height = radiusDiff[z] + "px"; newFiller.style.width = this.settings[smallerCornerType].radius+ "px" | ||
| 154 | +newFiller.style.position = "absolute"; newFiller.style.fontSize = "1px"; newFiller.style.overflow = "hidden"; newFiller.style.backgroundColor = this.boxColour; switch(smallerCornerType) | ||
| 155 | +{ case "tl": | ||
| 156 | +newFiller.style.bottom = "0px"; newFiller.style.left = "0px"; newFiller.style.borderLeft = this.borderString; this.topContainer.appendChild(newFiller); break; case "tr": | ||
| 157 | +newFiller.style.bottom = "0px"; newFiller.style.right = "0px"; newFiller.style.borderRight = this.borderString; this.topContainer.appendChild(newFiller); break; case "bl": | ||
| 158 | +newFiller.style.top = "0px"; newFiller.style.left = "0px"; newFiller.style.borderLeft = this.borderString; this.bottomContainer.appendChild(newFiller); break; case "br": | ||
| 159 | +newFiller.style.top = "0px"; newFiller.style.right = "0px"; newFiller.style.borderRight = this.borderString; this.bottomContainer.appendChild(newFiller); break;} | ||
| 160 | +} | ||
| 161 | +var newFillerBar = document.createElement("DIV"); newFillerBar.style.position = "relative"; newFillerBar.style.fontSize = "1px"; newFillerBar.style.overflow = "hidden"; newFillerBar.style.backgroundColor = this.boxColour; newFillerBar.style.backgroundImage = this.backgroundImage; switch(z) | ||
| 162 | +{ case "t": | ||
| 163 | +if(this.topContainer) | ||
| 164 | +{ if(this.settings.tl.radius && this.settings.tr.radius) | ||
| 165 | +{ newFillerBar.style.height = topMaxRadius - this.borderWidth + "px"; newFillerBar.style.marginLeft = this.settings.tl.radius - this.borderWidth + "px"; newFillerBar.style.marginRight = this.settings.tr.radius - this.borderWidth + "px"; newFillerBar.style.borderTop = this.borderString; if(this.backgroundImage != "") | ||
| 166 | +newFillerBar.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; this.topContainer.appendChild(newFillerBar);} | ||
| 167 | +this.box.style.backgroundPosition = "0px -" + (topMaxRadius - this.borderWidth) + "px";} | ||
| 168 | +break; case "b": | ||
| 169 | +if(this.bottomContainer) | ||
| 170 | +{ if(this.settings.bl.radius && this.settings.br.radius) | ||
| 171 | +{ newFillerBar.style.height = botMaxRadius - this.borderWidth + "px"; newFillerBar.style.marginLeft = this.settings.bl.radius - this.borderWidth + "px"; newFillerBar.style.marginRight = this.settings.br.radius - this.borderWidth + "px"; newFillerBar.style.borderBottom = this.borderString; if(this.backgroundImage != "") | ||
| 172 | +newFillerBar.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (topMaxRadius + this.borderWidth)) + "px"; this.bottomContainer.appendChild(newFillerBar);} | ||
| 173 | +} | ||
| 174 | +break;} | ||
| 175 | +} | ||
| 176 | +} | ||
| 177 | +if(this.settings.autoPad == true && this.boxPadding > 0) | ||
| 178 | +{ var contentContainer = document.createElement("DIV"); contentContainer.style.position = "relative"; contentContainer.innerHTML = this.boxContent; contentContainer.className = "autoPadDiv"; var topPadding = Math.abs(topMaxRadius - this.boxPadding); var botPadding = Math.abs(botMaxRadius - this.boxPadding); if(topMaxRadius < this.boxPadding) | ||
| 179 | +contentContainer.style.paddingTop = topPadding + "px"; if(botMaxRadius < this.boxPadding) | ||
| 180 | +contentContainer.style.paddingBottom = botMaxRadius + "px"; contentContainer.style.paddingLeft = this.boxPadding + "px"; contentContainer.style.paddingRight = this.boxPadding + "px"; this.contentDIV = this.box.appendChild(contentContainer);} | ||
| 181 | +} | ||
| 182 | +this.drawPixel = function(intx, inty, colour, transAmount, height, newCorner, image, cornerRadius) | ||
| 183 | +{ var pixel = document.createElement("DIV"); pixel.style.height = height + "px"; pixel.style.width = "1px"; pixel.style.position = "absolute"; pixel.style.fontSize = "1px"; pixel.style.overflow = "hidden"; var topMaxRadius = Math.max(this.settings["tr"].radius, this.settings["tl"].radius); if(image == -1 && this.backgroundImage != "") | ||
| 184 | +{ pixel.style.backgroundImage = this.backgroundImage; pixel.style.backgroundPosition = "-" + (this.boxWidth - (cornerRadius - intx) + this.borderWidth) + "px -" + ((this.boxHeight + topMaxRadius + inty) -this.borderWidth) + "px";} | ||
| 185 | +else | ||
| 186 | +{ pixel.style.backgroundColor = colour;} | ||
| 187 | +if (transAmount != 100) | ||
| 188 | +setOpacity(pixel, transAmount); pixel.style.top = inty + "px"; pixel.style.left = intx + "px"; newCorner.appendChild(pixel);} | ||
| 189 | +} | ||
| 190 | +function insertAfter(parent, node, referenceNode) | ||
| 191 | +{ parent.insertBefore(node, referenceNode.nextSibling);} | ||
| 192 | +function BlendColour(Col1, Col2, Col1Fraction) | ||
| 193 | +{ var red1 = parseInt(Col1.substr(1,2),16); var green1 = parseInt(Col1.substr(3,2),16); var blue1 = parseInt(Col1.substr(5,2),16); var red2 = parseInt(Col2.substr(1,2),16); var green2 = parseInt(Col2.substr(3,2),16); var blue2 = parseInt(Col2.substr(5,2),16); if(Col1Fraction > 1 || Col1Fraction < 0) Col1Fraction = 1; var endRed = Math.round((red1 * Col1Fraction) + (red2 * (1 - Col1Fraction))); if(endRed > 255) endRed = 255; if(endRed < 0) endRed = 0; var endGreen = Math.round((green1 * Col1Fraction) + (green2 * (1 - Col1Fraction))); if(endGreen > 255) endGreen = 255; if(endGreen < 0) endGreen = 0; var endBlue = Math.round((blue1 * Col1Fraction) + (blue2 * (1 - Col1Fraction))); if(endBlue > 255) endBlue = 255; if(endBlue < 0) endBlue = 0; return "#" + IntToHex(endRed)+ IntToHex(endGreen)+ IntToHex(endBlue);} | ||
| 194 | +function IntToHex(strNum) | ||
| 195 | +{ base = strNum / 16; rem = strNum % 16; base = base - (rem / 16); baseS = MakeHex(base); remS = MakeHex(rem); return baseS + '' + remS;} | ||
| 196 | +function MakeHex(x) | ||
| 197 | +{ if((x >= 0) && (x <= 9)) | ||
| 198 | +{ return x;} | ||
| 199 | +else | ||
| 200 | +{ switch(x) | ||
| 201 | +{ case 10: return "A"; case 11: return "B"; case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F";} | ||
| 202 | +} | ||
| 203 | +} | ||
| 204 | +function pixelFraction(x, y, r) | ||
| 205 | +{ var pixelfraction = 0; var xvalues = new Array(1); var yvalues = new Array(1); var point = 0; var whatsides = ""; var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x,2))); if ((intersect >= y) && (intersect < (y+1))) | ||
| 206 | +{ whatsides = "Left"; xvalues[point] = 0; yvalues[point] = intersect - y; point = point + 1;} | ||
| 207 | +var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y+1,2))); if ((intersect >= x) && (intersect < (x+1))) | ||
| 208 | +{ whatsides = whatsides + "Top"; xvalues[point] = intersect - x; yvalues[point] = 1; point = point + 1;} | ||
| 209 | +var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x+1,2))); if ((intersect >= y) && (intersect < (y+1))) | ||
| 210 | +{ whatsides = whatsides + "Right"; xvalues[point] = 1; yvalues[point] = intersect - y; point = point + 1;} | ||
| 211 | +var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y,2))); if ((intersect >= x) && (intersect < (x+1))) | ||
| 212 | +{ whatsides = whatsides + "Bottom"; xvalues[point] = intersect - x; yvalues[point] = 0;} | ||
| 213 | +switch (whatsides) | ||
| 214 | +{ case "LeftRight": | ||
| 215 | +pixelfraction = Math.min(yvalues[0],yvalues[1]) + ((Math.max(yvalues[0],yvalues[1]) - Math.min(yvalues[0],yvalues[1]))/2); break; case "TopRight": | ||
| 216 | +pixelfraction = 1-(((1-xvalues[0])*(1-yvalues[1]))/2); break; case "TopBottom": | ||
| 217 | +pixelfraction = Math.min(xvalues[0],xvalues[1]) + ((Math.max(xvalues[0],xvalues[1]) - Math.min(xvalues[0],xvalues[1]))/2); break; case "LeftBottom": | ||
| 218 | +pixelfraction = (yvalues[0]*xvalues[1])/2; break; default: | ||
| 219 | +pixelfraction = 1;} | ||
| 220 | +return pixelfraction;} | ||
| 221 | +function rgb2Hex(rgbColour) | ||
| 222 | +{ try{ var rgbArray = rgb2Array(rgbColour); var red = parseInt(rgbArray[0]); var green = parseInt(rgbArray[1]); var blue = parseInt(rgbArray[2]); var hexColour = "#" + IntToHex(red) + IntToHex(green) + IntToHex(blue);} | ||
| 223 | +catch(e){ alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex");} | ||
| 224 | +return hexColour;} | ||
| 225 | +function rgb2Array(rgbColour) | ||
| 226 | +{ var rgbValues = rgbColour.substring(4, rgbColour.indexOf(")")); var rgbArray = rgbValues.split(", "); return rgbArray;} | ||
| 227 | +function setOpacity(obj, opacity) | ||
| 228 | +{ opacity = (opacity == 100)?99.999:opacity; if(isSafari && obj.tagName != "IFRAME") | ||
| 229 | +{ var rgbArray = rgb2Array(obj.style.backgroundColor); var red = parseInt(rgbArray[0]); var green = parseInt(rgbArray[1]); var blue = parseInt(rgbArray[2]); obj.style.backgroundColor = "rgba(" + red + ", " + green + ", " + blue + ", " + opacity/100 + ")";} | ||
| 230 | +else if(typeof(obj.style.opacity) != "undefined") | ||
| 231 | +{ obj.style.opacity = opacity/100;} | ||
| 232 | +else if(typeof(obj.style.MozOpacity) != "undefined") | ||
| 233 | +{ obj.style.MozOpacity = opacity/100;} | ||
| 234 | +else if(typeof(obj.style.filter) != "undefined") | ||
| 235 | +{ obj.style.filter = "alpha(opacity:" + opacity + ")";} | ||
| 236 | +else if(typeof(obj.style.KHTMLOpacity) != "undefined") | ||
| 237 | +{ obj.style.KHTMLOpacity = opacity/100;} | ||
| 238 | +} | ||
| 239 | +function inArray(array, value) | ||
| 240 | +{ for(var i = 0; i < array.length; i++){ if (array[i] === value) return i;} | ||
| 241 | +return false;} | ||
| 242 | +function inArrayKey(array, value) | ||
| 243 | +{ for(key in array){ if(key === value) return true;} | ||
| 244 | +return false;} | ||
| 245 | +function addEvent(elm, evType, fn, useCapture) { if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true;} | ||
| 246 | +else if (elm.attachEvent) { var r = elm.attachEvent('on' + evType, fn); return r;} | ||
| 247 | +else { elm['on' + evType] = fn;} | ||
| 248 | +} | ||
| 249 | +function removeEvent(obj, evType, fn, useCapture){ if (obj.removeEventListener){ obj.removeEventListener(evType, fn, useCapture); return true;} else if (obj.detachEvent){ var r = obj.detachEvent("on"+evType, fn); return r;} else { alert("Handler could not be removed");} | ||
| 250 | +} | ||
| 251 | +function format_colour(colour) | ||
| 252 | +{ var returnColour = "#ffffff"; if(colour != "" && colour != "transparent") | ||
| 253 | +{ if(colour.substr(0, 3) == "rgb") | ||
| 254 | +{ returnColour = rgb2Hex(colour);} | ||
| 255 | +else if(colour.length == 4) | ||
| 256 | +{ returnColour = "#" + colour.substring(1, 2) + colour.substring(1, 2) + colour.substring(2, 3) + colour.substring(2, 3) + colour.substring(3, 4) + colour.substring(3, 4);} | ||
| 257 | +else | ||
| 258 | +{ returnColour = colour;} | ||
| 259 | +} | ||
| 260 | +return returnColour;} | ||
| 261 | +function get_style(obj, property, propertyNS) | ||
| 262 | +{ try | ||
| 263 | +{ if(obj.currentStyle) | ||
| 264 | +{ var returnVal = eval("obj.currentStyle." + property);} | ||
| 265 | +else | ||
| 266 | +{ if(isSafari && obj.style.display == "none") | ||
| 267 | +{ obj.style.display = ""; var wasHidden = true;} | ||
| 268 | +var returnVal = document.defaultView.getComputedStyle(obj, '').getPropertyValue(propertyNS); if(isSafari && wasHidden) | ||
| 269 | +{ obj.style.display = "none";} | ||
| 270 | +} | ||
| 271 | +} | ||
| 272 | +catch(e) | ||
| 273 | +{ } | ||
| 274 | +return returnVal;} | ||
| 275 | +function getElementsByClass(searchClass, node, tag) | ||
| 276 | +{ var classElements = new Array(); if(node == null) | ||
| 277 | +node = document; if(tag == null) | ||
| 278 | +tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp("(^|\s)"+searchClass+"(\s|$)"); for (i = 0, j = 0; i < elsLen; i++) | ||
| 279 | +{ if(pattern.test(els[i].className)) | ||
| 280 | +{ classElements[j] = els[i]; j++;} | ||
| 281 | +} | ||
| 282 | +return classElements;} | ||
| 283 | +function newCurvyError(errorMessage) | ||
| 284 | +{ return new Error("curvyCorners Error:\n" + errorMessage) | ||
| 285 | +} |
thirdpartyjs/yui/tools/tools.js
0 โ 100644
| 1 | +/** | ||
| 2 | +* @fileoverview | ||
| 3 | +* <p>General Tools.</p> | ||
| 4 | +* <p>Now contains a modified version of Douglas Crockford's json.js that doesn't | ||
| 5 | +* mess with the DOM's prototype methods | ||
| 6 | +* http://www.json.org/js.html</p> | ||
| 7 | +* @author Dav Glass <dav.glass@yahoo.com> | ||
| 8 | +* @version 1.0 | ||
| 9 | +* @requires YAHOO | ||
| 10 | +* @requires YAHOO.util.Dom | ||
| 11 | +* @requires YAHOO.util.Event | ||
| 12 | +* | ||
| 13 | +* @constructor | ||
| 14 | +* @class General Tools. | ||
| 15 | +*/ | ||
| 16 | +YAHOO.Tools = function() { | ||
| 17 | + keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; | ||
| 18 | + /** | ||
| 19 | + * Moved all regexes to the top level object to cache them. | ||
| 20 | + * @type Object | ||
| 21 | + */ | ||
| 22 | + regExs = { | ||
| 23 | + quotes: /\x22/g, | ||
| 24 | + startspace: /^\s+/g, | ||
| 25 | + endspace: /\s+$/g, | ||
| 26 | + striptags: /<\/?[^>]+>/gi, | ||
| 27 | + hasbr: /<br/i, | ||
| 28 | + hasp: /<p>/i, | ||
| 29 | + rbr: /<br>/gi, | ||
| 30 | + rbr2: /<br\/>/gi, | ||
| 31 | + rendp: /<\/p>/gi, | ||
| 32 | + rp: /<p>/gi, | ||
| 33 | + base64: /[^A-Za-z0-9\+\/\=]/g, | ||
| 34 | + syntaxCheck: /^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/ | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + jsonCodes = { | ||
| 38 | + '\b': '\\b', | ||
| 39 | + '\t': '\\t', | ||
| 40 | + '\n': '\\n', | ||
| 41 | + '\f': '\\f', | ||
| 42 | + '\r': '\\r', | ||
| 43 | + '"' : '\\"', | ||
| 44 | + '\\': '\\\\' | ||
| 45 | + } | ||
| 46 | + return { | ||
| 47 | + version: '1.0' | ||
| 48 | + } | ||
| 49 | +}(); | ||
| 50 | +/** | ||
| 51 | +* This normalizes getting the height of an element in IE | ||
| 52 | +* @param {String/HTMLElement} elm The element to get the height of | ||
| 53 | +* @returns The Height in pixels | ||
| 54 | +* @type String | ||
| 55 | +*/ | ||
| 56 | +YAHOO.Tools.getHeight = function(elm) { | ||
| 57 | + var elm = $(elm); | ||
| 58 | + var h = $D.getStyle(elm, 'height'); | ||
| 59 | + if (h == 'auto') { | ||
| 60 | + elm.style.zoom = 1; | ||
| 61 | + h = elm.clientHeight + 'px'; | ||
| 62 | + } | ||
| 63 | + return h; | ||
| 64 | +} | ||
| 65 | +/** | ||
| 66 | +* Get the XY coords required to place the element at the center of the screen | ||
| 67 | +* @param {String/HTMLElement} elm The element to place at the center of the screen | ||
| 68 | +* @returns The XY coords required to place the element at the center of the screen | ||
| 69 | +* @type Array | ||
| 70 | +*/ | ||
| 71 | +YAHOO.Tools.getCenter = function(elm) { | ||
| 72 | + var elm = $(elm); | ||
| 73 | + var cX = Math.round(($D.getViewportWidth() - parseInt($D.getStyle(elm, 'width'))) / 2); | ||
| 74 | + var cY = Math.round(($D.getViewportHeight() - parseInt(this.getHeight(elm))) / 2); | ||
| 75 | + return [cX, cY]; | ||
| 76 | +} | ||
| 77 | + | ||
| 78 | +/** | ||
| 79 | +* Converts a text string into a DOM object | ||
| 80 | +* @param {String} txt String to convert | ||
| 81 | +* @returns A string to a textNode | ||
| 82 | +*/ | ||
| 83 | +YAHOO.Tools.makeTextObject = function(txt) { | ||
| 84 | + return document.createTextNode(txt); | ||
| 85 | +} | ||
| 86 | +/** | ||
| 87 | +* Takes an Array of DOM objects and appends them as a child to the main Element | ||
| 88 | +* @param {Array} arr Array of elements to append to elm. | ||
| 89 | +* @param {HTMLElement/String} elm A reference or ID to the main Element that the children will be appended to | ||
| 90 | +*/ | ||
| 91 | +YAHOO.Tools.makeChildren = function(arr, elm) { | ||
| 92 | + var elm = $(elm); | ||
| 93 | + for (var i in arr) { | ||
| 94 | + _val = arr[i]; | ||
| 95 | + if (typeof _val == 'string') { | ||
| 96 | + _val = this.makeTxtObject(_val); | ||
| 97 | + } | ||
| 98 | + elm.appendChild(_val); | ||
| 99 | + } | ||
| 100 | +} | ||
| 101 | +/** | ||
| 102 | +* Converts a standard CSS string to a Javascriptable Camel Case variable name | ||
| 103 | +* @param {String} str The CSS string to convert to camel case Javascript String | ||
| 104 | +* Example:<br> | ||
| 105 | +* background-color<br> | ||
| 106 | +* backgroundColor<br><br> | ||
| 107 | +* list-style-type<br> | ||
| 108 | +* listStyleType | ||
| 109 | +*/ | ||
| 110 | +YAHOO.Tools.styleToCamel = function(str) { | ||
| 111 | + var _tmp = str.split('-'); | ||
| 112 | + var _new_style = _tmp[0]; | ||
| 113 | + for (var i = 1; i < _tmp.length; i++) { | ||
| 114 | + _new_style += _tmp[i].substring(0, 1).toUpperCase() + _tmp[i].substring(1, _tmp[i].length); | ||
| 115 | + } | ||
| 116 | + return _new_style; | ||
| 117 | +} | ||
| 118 | +/** | ||
| 119 | +* Removes " from a given string | ||
| 120 | +* @param {String} str The string to remove quotes from | ||
| 121 | +*/ | ||
| 122 | +YAHOO.Tools.removeQuotes = function(str) { | ||
| 123 | + var checkText = new String(str); | ||
| 124 | + return String(checkText.replace(regExs.quotes, '')); | ||
| 125 | +} | ||
| 126 | +/** | ||
| 127 | +* Trims starting and trailing white space from a string. | ||
| 128 | +* @param {String} str The string to trim | ||
| 129 | +*/ | ||
| 130 | +YAHOO.Tools.trim = function(str) { | ||
| 131 | + return str.replace(regExs.startspace, '').replace(regExs.endspace, ''); | ||
| 132 | +} | ||
| 133 | +/** | ||
| 134 | +* Removes all HTML tags from a string. | ||
| 135 | +* @param {String} str The string to remove HTML from | ||
| 136 | +*/ | ||
| 137 | +YAHOO.Tools.stripTags = function(str) { | ||
| 138 | + return str.replace(regExs.striptags, ''); | ||
| 139 | +} | ||
| 140 | +/** | ||
| 141 | +* Returns True/False if it finds BR' or P's | ||
| 142 | +* @param {String} str The string to search | ||
| 143 | +*/ | ||
| 144 | +YAHOO.Tools.hasBRs = function(str) { | ||
| 145 | + return str.match(regExs.hasbr) || str.match(regExs.hasp); | ||
| 146 | +} | ||
| 147 | +/** | ||
| 148 | +* Converts BR's and P's to Plain Text Line Feeds | ||
| 149 | +* @param {String} str The string to search | ||
| 150 | +*/ | ||
| 151 | +YAHOO.Tools.convertBRs2NLs = function(str) { | ||
| 152 | + return str.replace(regExs.rbr, "\n").replace(regExs.rbr2, "\n").replace(regExs.rendp, "\n").replace(regExs.rp, ""); | ||
| 153 | +} | ||
| 154 | +/** | ||
| 155 | +* Repeats a string n number of times | ||
| 156 | +* @param {String} str The string to repeat | ||
| 157 | +* @param {Integer} repeat Number of times to repeat it | ||
| 158 | +* @returns Repeated string | ||
| 159 | +* @type String | ||
| 160 | +*/ | ||
| 161 | +YAHOO.Tools.stringRepeat = function(str, repeat) { | ||
| 162 | + return new Array(repeat + 1).join(str); | ||
| 163 | +} | ||
| 164 | +/** | ||
| 165 | +* Reverses a string | ||
| 166 | +* @param {String} str The string to reverse | ||
| 167 | +* @returns Reversed string | ||
| 168 | +* @type String | ||
| 169 | +*/ | ||
| 170 | +YAHOO.Tools.stringReverse = function(str) { | ||
| 171 | + var new_str = ''; | ||
| 172 | + for (i = 0; i < str.length; i++) { | ||
| 173 | + new_str = new_str + str.charAt((str.length -1) -i); | ||
| 174 | + } | ||
| 175 | + return new_str; | ||
| 176 | +} | ||
| 177 | +/** | ||
| 178 | +* printf function written in Javascript<br> | ||
| 179 | +* <pre>var test = "You are viewing messages {0} - {1} out of {2}"; | ||
| 180 | +* YAHOO.Tools.printf(test, '5', '25', '500');</pre><br> | ||
| 181 | +* This will return a string like:<br> | ||
| 182 | +* "You are view messages 5 - 25 out of 500"<br> | ||
| 183 | +* Patched provided by: Peter Foti <foti-1@comcast.net><br> | ||
| 184 | +* @param {String} string | ||
| 185 | +* @returns Parsed String | ||
| 186 | +* @type String | ||
| 187 | +*/ | ||
| 188 | +YAHOO.Tools.printf = function() { | ||
| 189 | + var num = arguments.length; | ||
| 190 | + var oStr = arguments[0]; | ||
| 191 | + | ||
| 192 | + for (var i = 1; i < num; i++) { | ||
| 193 | + var pattern = "\\{" + (i-1) + "\\}"; | ||
| 194 | + var re = new RegExp(pattern, "g"); | ||
| 195 | + oStr = oStr.replace(re, arguments[i]); | ||
| 196 | + } | ||
| 197 | + return oStr; | ||
| 198 | +} | ||
| 199 | +/** | ||
| 200 | +* Trims starting and trailing white space from a string. | ||
| 201 | +* @param {HTMLElement/Array/String} el Single element, array of elements or id string to apply the style string to | ||
| 202 | +* @param {String} str The CSS string to apply to the elements | ||
| 203 | +* Example: | ||
| 204 | +* color: black; text-decoration: none; background-color: yellow; | ||
| 205 | +*/ | ||
| 206 | +YAHOO.Tools.setStyleString = function(el, str) { | ||
| 207 | + var _tmp = str.split(';'); | ||
| 208 | + for (x in _tmp) { | ||
| 209 | + if (x) { | ||
| 210 | + __tmp = YAHOO.Tools.trim(_tmp[x]); | ||
| 211 | + __tmp = _tmp[x].split(':'); | ||
| 212 | + if (__tmp[0] && __tmp[1]) { | ||
| 213 | + var _attr = YAHOO.Tools.trim(__tmp[0]); | ||
| 214 | + var _val = YAHOO.Tools.trim(__tmp[1]); | ||
| 215 | + if (_attr && _val) { | ||
| 216 | + if (_attr.indexOf('-') != -1) { | ||
| 217 | + _attr = YAHOO.Tools.styleToCamel(_attr); | ||
| 218 | + } | ||
| 219 | + $D.setStyle(el, _attr, _val); | ||
| 220 | + } | ||
| 221 | + } | ||
| 222 | + } | ||
| 223 | + } | ||
| 224 | +} | ||
| 225 | +/** | ||
| 226 | +* Gets the currently selected text | ||
| 227 | +* @param {Object} _document Optional. Reference to the document object | ||
| 228 | +* @param {Object} _window Optional. Reference to the window object | ||
| 229 | +* Both parameters are optional, but if you give one you need to give both.<br> | ||
| 230 | +* The reason for the parameters is if you are dealing with an iFrame or FrameSet, | ||
| 231 | +* you need to specify the document and the window of the frame you want to get the selection for | ||
| 232 | +*/ | ||
| 233 | +YAHOO.Tools.getSelection = function(_document, _window) { | ||
| 234 | + if (!_document) { _document = document; } | ||
| 235 | + if (!_window) { _window = window; } | ||
| 236 | + if (_document.selection) { | ||
| 237 | + return _document.selection; | ||
| 238 | + } | ||
| 239 | + return _window.getSelection(); | ||
| 240 | +} | ||
| 241 | +/** | ||
| 242 | +* Remove the element from the document. | ||
| 243 | +* @param {HTMLElement/Array/String} el Single element, array of elements or id string to remove from the document | ||
| 244 | +* This function needs to be extended to remove all of the child elements & their listeners. | ||
| 245 | +*/ | ||
| 246 | +YAHOO.Tools.removeElement = function(el) { | ||
| 247 | + if (!(el instanceof Array)) { | ||
| 248 | + el = new Array($(el)); | ||
| 249 | + } | ||
| 250 | + for (var i = 0; i < el.length; i++) { | ||
| 251 | + if (el[i].parentNode) { | ||
| 252 | + el[i].parentNode.removeChild(el); | ||
| 253 | + } | ||
| 254 | + } | ||
| 255 | +} | ||
| 256 | +/** | ||
| 257 | +* Set a cookie. | ||
| 258 | +* @param {String} name The name of the cookie to be set | ||
| 259 | +* @param {String} value The value of the cookie | ||
| 260 | +* @param {String} expires A valid Javascript Date object | ||
| 261 | +* @param {String} path The path of the cookie (Deaults to /) | ||
| 262 | +* @param {String} domain The domain to attach the cookie to | ||
| 263 | +* @param {Booleen} secure Booleen True or False | ||
| 264 | +*/ | ||
| 265 | +YAHOO.Tools.setCookie = function(name, value, expires, path, domain, secure) { | ||
| 266 | + var argv = arguments; | ||
| 267 | + var argc = arguments.length; | ||
| 268 | + var expires = (argc > 2) ? argv[2] : null; | ||
| 269 | + var path = (argc > 3) ? argv[3] : '/'; | ||
| 270 | + var domain = (argc > 4) ? argv[4] : null; | ||
| 271 | + var secure = (argc > 5) ? argv[5] : false; | ||
| 272 | + document.cookie = name + "=" + escape (value) + | ||
| 273 | + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + | ||
| 274 | + ((path == null) ? "" : ("; path=" + path)) + | ||
| 275 | + ((domain == null) ? "" : ("; domain=" + domain)) + | ||
| 276 | + ((secure == true) ? "; secure" : ""); | ||
| 277 | +} | ||
| 278 | + | ||
| 279 | +/** | ||
| 280 | +* Get the value of a cookie. | ||
| 281 | +* @param {String} name The name of the cookie to get | ||
| 282 | +*/ | ||
| 283 | +YAHOO.Tools.getCookie = function(name) { | ||
| 284 | + var dc = document.cookie; | ||
| 285 | + var prefix = name + '='; | ||
| 286 | + var begin = dc.indexOf('; ' + prefix); | ||
| 287 | + if (begin == -1) { | ||
| 288 | + begin = dc.indexOf(prefix); | ||
| 289 | + if (begin != 0) return null; | ||
| 290 | + } else { | ||
| 291 | + begin += 2; | ||
| 292 | + } | ||
| 293 | + var end = document.cookie.indexOf(';', begin); | ||
| 294 | + if (end == -1) { | ||
| 295 | + end = dc.length; | ||
| 296 | + } | ||
| 297 | + return unescape(dc.substring(begin + prefix.length, end)); | ||
| 298 | +} | ||
| 299 | +/** | ||
| 300 | +* Delete a cookie | ||
| 301 | +* @param {String} name The name of the cookie to delete. | ||
| 302 | +*/ | ||
| 303 | +YAHOO.Tools.deleteCookie = function(name, path, domain) { | ||
| 304 | + if (getCookie(name)) { | ||
| 305 | + document.cookie = name + '=' + ((path) ? '; path=' + path : '') + ((domain) ? '; domain=' + domain : '') + '; expires=Thu, 01-Jan-70 00:00:01 GMT'; | ||
| 306 | + } | ||
| 307 | +} | ||
| 308 | +/** | ||
| 309 | +* Object based Browser Engine Detection<br> | ||
| 310 | +* The returned object will look like:<br> | ||
| 311 | +* <pre> | ||
| 312 | +* obj { | ||
| 313 | +* ua: 'Full UserAgent String' | ||
| 314 | +* opera: boolean | ||
| 315 | +* safari: boolean | ||
| 316 | +* gecko: boolean | ||
| 317 | +* msie: boolean | ||
| 318 | +* version: string | ||
| 319 | +* } | ||
| 320 | +* </pre> | ||
| 321 | +* @return Browser Information Object | ||
| 322 | +* @type Object | ||
| 323 | +*/ | ||
| 324 | +YAHOO.Tools.getBrowserEngine = function() { | ||
| 325 | + var opera = ((window.opera && window.opera.version) ? true : false); | ||
| 326 | + var safari = ((navigator.vendor && navigator.vendor.indexOf('Apple') != -1) ? true : false); | ||
| 327 | + var gecko = ((document.getElementById && !document.all && !opera && !safari) ? true : false); | ||
| 328 | + var msie = ((window.ActiveXObject) ? true : false); | ||
| 329 | + var version = false; | ||
| 330 | + if (msie) { | ||
| 331 | + /** | ||
| 332 | + * This checks for the maxHeight style property. | ||
| 333 | + * I.E. 7 has this | ||
| 334 | + */ | ||
| 335 | + if (typeof document.body.style.maxHeight != "undefined") { | ||
| 336 | + version = '7'; | ||
| 337 | + } else { | ||
| 338 | + /** | ||
| 339 | + * Fall back to 6 (might need to find a 5.5 object too...). | ||
| 340 | + */ | ||
| 341 | + version = '6'; | ||
| 342 | + } | ||
| 343 | + } | ||
| 344 | + if (opera) { | ||
| 345 | + /** | ||
| 346 | + * The window.opera object has a method called version(); | ||
| 347 | + * Here we only grab the first 2 parts of the dotted string to get 9.01, 9.02, etc.. | ||
| 348 | + */ | ||
| 349 | + var tmp_version = window.opera.version().split('.'); | ||
| 350 | + version = tmp_version[0] + '.' + tmp_version[1]; | ||
| 351 | + } | ||
| 352 | + if (gecko) { | ||
| 353 | + /** | ||
| 354 | + * FireFox 2 has a function called registerContentHandler(); | ||
| 355 | + */ | ||
| 356 | + if (navigator.registerContentHandler) { | ||
| 357 | + version = '2'; | ||
| 358 | + } else { | ||
| 359 | + version = '1.5'; | ||
| 360 | + } | ||
| 361 | + /** | ||
| 362 | + * This should catch all pre Firefox 1.5 browsers | ||
| 363 | + */ | ||
| 364 | + if ((navigator.vendorSub) && !version) { | ||
| 365 | + version = navigator.vendorSub; | ||
| 366 | + } | ||
| 367 | + } | ||
| 368 | + if (safari) { | ||
| 369 | + try { | ||
| 370 | + /** | ||
| 371 | + * Safari 1.3+ supports the console method | ||
| 372 | + */ | ||
| 373 | + if (console) { | ||
| 374 | + /** | ||
| 375 | + * Safari 2+ supports the onmousewheel event | ||
| 376 | + */ | ||
| 377 | + if ((window.onmousewheel !== 'undefined') && (window.onmousewheel === null)) { | ||
| 378 | + version = '2'; | ||
| 379 | + } else { | ||
| 380 | + version = '1.3'; | ||
| 381 | + } | ||
| 382 | + } | ||
| 383 | + } catch (e) { | ||
| 384 | + /** | ||
| 385 | + * Safari 1.2 does not support the console method | ||
| 386 | + */ | ||
| 387 | + version = '1.2'; | ||
| 388 | + } | ||
| 389 | + } | ||
| 390 | + /** | ||
| 391 | + * Return the Browser Object | ||
| 392 | + * @type Object | ||
| 393 | + */ | ||
| 394 | + var browsers = { | ||
| 395 | + ua: navigator.userAgent, | ||
| 396 | + opera: opera, | ||
| 397 | + safari: safari, | ||
| 398 | + gecko: gecko, | ||
| 399 | + msie: msie, | ||
| 400 | + version: version | ||
| 401 | + } | ||
| 402 | + return browsers; | ||
| 403 | +} | ||
| 404 | +/** | ||
| 405 | +* User Agent Based Browser Detection<br> | ||
| 406 | +* This function uses the userAgent string to get the browsers information.<br> | ||
| 407 | +* The returned object will look like:<br> | ||
| 408 | +* <pre> | ||
| 409 | +* obj { | ||
| 410 | +* ua: 'Full UserAgent String' | ||
| 411 | +* opera: boolean | ||
| 412 | +* safari: boolean | ||
| 413 | +* firefox: boolean | ||
| 414 | +* mozilla: boolean | ||
| 415 | +* msie: boolean | ||
| 416 | +* mac: boolean | ||
| 417 | +* win: boolean | ||
| 418 | +* unix: boolean | ||
| 419 | +* version: string | ||
| 420 | +* flash: version string | ||
| 421 | +* } | ||
| 422 | +* </pre><br> | ||
| 423 | +* @return Browser Information Object | ||
| 424 | +* @type Object | ||
| 425 | +*/ | ||
| 426 | +YAHOO.Tools.getBrowserAgent = function() { | ||
| 427 | + var ua = navigator.userAgent.toLowerCase(); | ||
| 428 | + var opera = ((ua.indexOf('opera') != -1) ? true : false); | ||
| 429 | + var safari = ((ua.indexOf('safari') != -1) ? true : false); | ||
| 430 | + var firefox = ((ua.indexOf('firefox') != -1) ? true : false); | ||
| 431 | + var msie = ((ua.indexOf('msie') != -1) ? true : false); | ||
| 432 | + var mac = ((ua.indexOf('mac') != -1) ? true : false); | ||
| 433 | + var unix = ((ua.indexOf('x11') != -1) ? true : false); | ||
| 434 | + var win = ((mac || unix) ? false : true); | ||
| 435 | + var version = false; | ||
| 436 | + var mozilla = false; | ||
| 437 | + //var flash = this.checkFlash(); | ||
| 438 | + if (!firefox && !safari && (ua.indexOf('gecko') != -1)) { | ||
| 439 | + mozilla = true; | ||
| 440 | + var _tmp = ua.split('/'); | ||
| 441 | + version = _tmp[_tmp.length - 1].split(' ')[0]; | ||
| 442 | + } | ||
| 443 | + if (firefox) { | ||
| 444 | + var _tmp = ua.split('/'); | ||
| 445 | + version = _tmp[_tmp.length - 1].split(' ')[0]; | ||
| 446 | + } | ||
| 447 | + if (msie) { | ||
| 448 | + version = ua.substring((ua.indexOf('msie ') + 5)).split(';')[0]; | ||
| 449 | + } | ||
| 450 | + if (safari) { | ||
| 451 | + /** | ||
| 452 | + * Safari doesn't report a string, have to use getBrowserEngine to get it | ||
| 453 | + */ | ||
| 454 | + version = this.getBrowserEngine().version; | ||
| 455 | + } | ||
| 456 | + if (opera) { | ||
| 457 | + version = ua.substring((ua.indexOf('opera/') + 6)).split(' ')[0]; | ||
| 458 | + } | ||
| 459 | + | ||
| 460 | + /** | ||
| 461 | + * Return the Browser Object | ||
| 462 | + * @type Object | ||
| 463 | + */ | ||
| 464 | + var browsers = { | ||
| 465 | + ua: navigator.userAgent, | ||
| 466 | + opera: opera, | ||
| 467 | + safari: safari, | ||
| 468 | + firefox: firefox, | ||
| 469 | + mozilla: mozilla, | ||
| 470 | + msie: msie, | ||
| 471 | + mac: mac, | ||
| 472 | + win: win, | ||
| 473 | + unix: unix, | ||
| 474 | + version: version//, | ||
| 475 | + //flash: flash | ||
| 476 | + } | ||
| 477 | + return browsers; | ||
| 478 | +} | ||
| 479 | +/** | ||
| 480 | +* Check if Flash is enabled and return the version number | ||
| 481 | +* @return Version number or false on error | ||
| 482 | +* @type String | ||
| 483 | +*/ | ||
| 484 | +YAHOO.Tools.checkFlash = function() { | ||
| 485 | + var br = this.getBrowserEngine(); | ||
| 486 | + if (br.msie) { | ||
| 487 | + try { | ||
| 488 | + // version will be set for 7.X or greater players | ||
| 489 | + var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); | ||
| 490 | + var versionStr = axo.GetVariable("$version"); | ||
| 491 | + var tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"] | ||
| 492 | + var tempString = tempArray[1]; // "2,0,0,11" | ||
| 493 | + var versionArray = tempString.split(","); // ['2', '0', '0', '11'] | ||
| 494 | + var flash = versionArray[0]; | ||
| 495 | + } catch (e) { | ||
| 496 | + } | ||
| 497 | + } else { | ||
| 498 | + var flashObj = null; | ||
| 499 | + var tokens, len, curr_tok; | ||
| 500 | + if (navigator.mimeTypes && navigator.mimeTypes['application/x-shockwave-flash']) { | ||
| 501 | + flashObj = navigator.mimeTypes['application/x-shockwave-flash'].enabledPlugin; | ||
| 502 | + } | ||
| 503 | + if (flashObj == null) { | ||
| 504 | + flash = false; | ||
| 505 | + } else { | ||
| 506 | + tokens = navigator.plugins['Shockwave Flash'].description.split(' '); | ||
| 507 | + len = tokens.length; | ||
| 508 | + while(len--) { | ||
| 509 | + curr_tok = tokens[len]; | ||
| 510 | + if(!isNaN(parseInt(curr_tok))) { | ||
| 511 | + hasVersion = curr_tok; | ||
| 512 | + flash = hasVersion; | ||
| 513 | + break; | ||
| 514 | + } | ||
| 515 | + } | ||
| 516 | + } | ||
| 517 | + } | ||
| 518 | + return flash; | ||
| 519 | +} | ||
| 520 | +/** | ||
| 521 | +* Set Mass Attributes on an Element | ||
| 522 | +* @param {Object} attrObj Object containing the attributes to set. | ||
| 523 | +* @param {HTMLElement/String} elm The element you want to apply the attribute to | ||
| 524 | +* Supports adding listeners and setting style from a CSS style string.<br> | ||
| 525 | +*/ | ||
| 526 | +YAHOO.Tools.setAttr = function(attrsObj, elm) { | ||
| 527 | + if (typeof elm == 'string') { | ||
| 528 | + elm = $(elm); | ||
| 529 | + } | ||
| 530 | + for (var i in attrsObj) { | ||
| 531 | + switch (i.toLowerCase()) { | ||
| 532 | + case 'listener': | ||
| 533 | + if (attrsObj[i] instanceof Array) { | ||
| 534 | + var ev = attrsObj[i][0]; | ||
| 535 | + var func = attrsObj[i][1]; | ||
| 536 | + var base = attrsObj[i][2]; | ||
| 537 | + var scope = attrsObj[i][3]; | ||
| 538 | + $E.addListener(elm, ev, func, base, scope); | ||
| 539 | + } | ||
| 540 | + break; | ||
| 541 | + case 'classname': | ||
| 542 | + case 'class': | ||
| 543 | + elm.className = attrsObj[i]; | ||
| 544 | + break; | ||
| 545 | + case 'style': | ||
| 546 | + YAHOO.Tools.setStyleString(elm, attrsObj[i]); | ||
| 547 | + break; | ||
| 548 | + default: | ||
| 549 | + elm.setAttribute(i, attrsObj[i]); | ||
| 550 | + break; | ||
| 551 | + } | ||
| 552 | + } | ||
| 553 | +} | ||
| 554 | +/** | ||
| 555 | +* Usage:<br> | ||
| 556 | +* <pre><code> | ||
| 557 | +* div = YAHOO.util.Dom.create('div', 'Single DIV. This is some test text.', { | ||
| 558 | +* className:'test1', | ||
| 559 | +* style:'font-size: 20px' | ||
| 560 | +* } | ||
| 561 | +* ); | ||
| 562 | +* test1.appendChild(div); | ||
| 563 | +* <br><br>- or -<br><br> | ||
| 564 | +* div = YAHOO.util.Dom.create('div', {className:'test2',style:'font-size:11px'}, | ||
| 565 | +* [YAHOO.util.Dom.create('p', { | ||
| 566 | +* style:'border: 1px solid red; color: blue', | ||
| 567 | +* listener: ['click', test] | ||
| 568 | +* }, | ||
| 569 | +* 'This is a P inside of a DIV both styled.') | ||
| 570 | +* ] | ||
| 571 | +*); | ||
| 572 | +* test2.appendChild(div); | ||
| 573 | +* | ||
| 574 | +* </code></pre> | ||
| 575 | +* @param {String} tagName Tag name to create | ||
| 576 | +* @param {Object} attrs Element attributes in object notation | ||
| 577 | +* @param {Array} children Array of children to append to the created element | ||
| 578 | +* @param {String} txt Text string to insert into the created element | ||
| 579 | +* @returns A reference to the newly created element | ||
| 580 | +* @type HTMLReference | ||
| 581 | +*/ | ||
| 582 | +YAHOO.Tools.create = function(tagName) { | ||
| 583 | + tagName = tagName.toLowerCase(); | ||
| 584 | + elm = document.createElement(tagName); | ||
| 585 | + var txt = false; | ||
| 586 | + var attrsObj = false; | ||
| 587 | + | ||
| 588 | + if (!elm) { return false; } | ||
| 589 | + | ||
| 590 | + for (var i = 1; i < arguments.length; i++) { | ||
| 591 | + txt = arguments[i]; | ||
| 592 | + if (typeof txt == 'string') { | ||
| 593 | + _txt = YAHOO.Tools.makeTextObject(txt); | ||
| 594 | + elm.appendChild(_txt); | ||
| 595 | + } else if (txt instanceof Array) { | ||
| 596 | + YAHOO.Tools.makeChildren(txt, elm); | ||
| 597 | + } else if (typeof txt == 'object') { | ||
| 598 | + //_makeStyleObject(txt, elm); | ||
| 599 | + YAHOO.Tools.setAttr(txt, elm); | ||
| 600 | + } | ||
| 601 | + } | ||
| 602 | + return elm; | ||
| 603 | +} | ||
| 604 | +/** | ||
| 605 | +* Inserts an HTML Element after another in the DOM Tree. | ||
| 606 | +* @param {HTMLElement} elm The element to insert | ||
| 607 | +* @param {HTMLElement} curNode The element to insert it before | ||
| 608 | +*/ | ||
| 609 | +YAHOO.Tools.insertAfter = function(elm, curNode) { | ||
| 610 | + if (curNode.nextSibling) { | ||
| 611 | + curNode.parentNode.insertBefore(elm, curNode.nextSibling); | ||
| 612 | + } else { | ||
| 613 | + curNode.parentNode.appendChild(elm); | ||
| 614 | + } | ||
| 615 | +} | ||
| 616 | +/** | ||
| 617 | +* Validates that the value passed is in the Array passed. | ||
| 618 | +* @param {Array} arr The Array to search (haystack) | ||
| 619 | +* @param {String} val The value to search for (needle) | ||
| 620 | +* @returns True if the value is found | ||
| 621 | +* @type Boolean | ||
| 622 | +*/ | ||
| 623 | +YAHOO.Tools.inArray = function(arr, val) { | ||
| 624 | + if (arr instanceof Array) { | ||
| 625 | + for (var i = (arr.length -1); i >= 0; i--) { | ||
| 626 | + if (arr[i] === val) { | ||
| 627 | + return true; | ||
| 628 | + } | ||
| 629 | + } | ||
| 630 | + } | ||
| 631 | + return false; | ||
| 632 | +} | ||
| 633 | + | ||
| 634 | + | ||
| 635 | +/** | ||
| 636 | +* Validates that the value passed in is a boolean. | ||
| 637 | +* @param {Object} str The value to validate | ||
| 638 | +* @return true, if the value is valid | ||
| 639 | +* @type Boolean | ||
| 640 | +*/ | ||
| 641 | +YAHOO.Tools.checkBoolean = function(str) { | ||
| 642 | + return ((typeof str == 'boolean') ? true : false); | ||
| 643 | +} | ||
| 644 | + | ||
| 645 | +/** | ||
| 646 | +* Validates that the value passed in is a number. | ||
| 647 | +* @param {Object} str The value to validate | ||
| 648 | +* @return true, if the value is valid | ||
| 649 | +* @type Boolean | ||
| 650 | +*/ | ||
| 651 | +YAHOO.Tools.checkNumber = function(str) { | ||
| 652 | + return ((isNaN(str)) ? false : true); | ||
| 653 | +} | ||
| 654 | + | ||
| 655 | +/** | ||
| 656 | +* Divide your desired pixel width by 13 to find em width. Multiply that value by 0.9759 for IE via *width. | ||
| 657 | +* @param {Integer} size The pixel size to convert to em. | ||
| 658 | +* @return Object of sizes (2) {msie: size, other: size } | ||
| 659 | +* @type Object | ||
| 660 | +*/ | ||
| 661 | +YAHOO.Tools.PixelToEm = function(size) { | ||
| 662 | + var data = {}; | ||
| 663 | + var sSize = (size / 13); | ||
| 664 | + data.other = (Math.round(sSize * 100) / 100); | ||
| 665 | + data.msie = (Math.round((sSize * 0.9759) * 100) / 100); | ||
| 666 | + return data; | ||
| 667 | +} | ||
| 668 | + | ||
| 669 | +/** | ||
| 670 | +* Return a string of CSS statements for this pixel size in ems | ||
| 671 | +* @param {Integer} size The pixel size to convert to em. | ||
| 672 | +* @param {String} prop The property to apply the style to. | ||
| 673 | +* @return String of CSS style statements (width:46.15em;*width:45.04em;min-width:600px;) | ||
| 674 | +* @type String | ||
| 675 | +*/ | ||
| 676 | +YAHOO.Tools.PixelToEmStyle = function(size, prop) { | ||
| 677 | + var data = ''; | ||
| 678 | + var prop = ((prop) ? prop.toLowerCase() : 'width'); | ||
| 679 | + var sSize = (size / 13); | ||
| 680 | + data += prop + ':' + (Math.round(sSize * 100) / 100) + 'em;'; | ||
| 681 | + data += '*' + prop + ':' + (Math.round((sSize * 0.9759) * 100) / 100) + 'em;'; | ||
| 682 | + if ((prop == 'width') || (prop == 'height')) { | ||
| 683 | + data += 'min-' + prop + ':' + size + 'px;'; | ||
| 684 | + } | ||
| 685 | + return data; | ||
| 686 | +} | ||
| 687 | + | ||
| 688 | +/** | ||
| 689 | +* Base64 Encodes a string | ||
| 690 | +* @param {String} str The string to base64 encode. | ||
| 691 | +* @return Base64 Encoded String | ||
| 692 | +* @type String | ||
| 693 | +*/ | ||
| 694 | +YAHOO.Tools.base64Encode = function(str) { | ||
| 695 | + var data = ""; | ||
| 696 | + var chr1, chr2, chr3, enc1, enc2, enc3, enc4; | ||
| 697 | + var i = 0; | ||
| 698 | + | ||
| 699 | + do { | ||
| 700 | + chr1 = str.charCodeAt(i++); | ||
| 701 | + chr2 = str.charCodeAt(i++); | ||
| 702 | + chr3 = str.charCodeAt(i++); | ||
| 703 | + | ||
| 704 | + enc1 = chr1 >> 2; | ||
| 705 | + enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); | ||
| 706 | + enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); | ||
| 707 | + enc4 = chr3 & 63; | ||
| 708 | + | ||
| 709 | + if (isNaN(chr2)) { | ||
| 710 | + enc3 = enc4 = 64; | ||
| 711 | + } else if (isNaN(chr3)) { | ||
| 712 | + enc4 = 64; | ||
| 713 | + } | ||
| 714 | + | ||
| 715 | + data = data + keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4); | ||
| 716 | + } while (i < str.length); | ||
| 717 | + | ||
| 718 | + return data; | ||
| 719 | +} | ||
| 720 | +/** | ||
| 721 | +* Base64 Dncodes a string | ||
| 722 | +* @param {String} str The base64 encoded string to decode. | ||
| 723 | +* @return The decoded String | ||
| 724 | +* @type String | ||
| 725 | +*/ | ||
| 726 | +YAHOO.Tools.base64Decode = function(str) { | ||
| 727 | + var data = ""; | ||
| 728 | + var chr1, chr2, chr3, enc1, enc2, enc3, enc4; | ||
| 729 | + var i = 0; | ||
| 730 | + | ||
| 731 | + // remove all characters that are not A-Z, a-z, 0-9, +, /, or = | ||
| 732 | + str = str.replace(regExs.base64, ""); | ||
| 733 | + | ||
| 734 | + do { | ||
| 735 | + enc1 = keyStr.indexOf(str.charAt(i++)); | ||
| 736 | + enc2 = keyStr.indexOf(str.charAt(i++)); | ||
| 737 | + enc3 = keyStr.indexOf(str.charAt(i++)); | ||
| 738 | + enc4 = keyStr.indexOf(str.charAt(i++)); | ||
| 739 | + | ||
| 740 | + chr1 = (enc1 << 2) | (enc2 >> 4); | ||
| 741 | + chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); | ||
| 742 | + chr3 = ((enc3 & 3) << 6) | enc4; | ||
| 743 | + | ||
| 744 | + data = data + String.fromCharCode(chr1); | ||
| 745 | + | ||
| 746 | + if (enc3 != 64) { | ||
| 747 | + data = data + String.fromCharCode(chr2); | ||
| 748 | + } | ||
| 749 | + if (enc4 != 64) { | ||
| 750 | + data = data + String.fromCharCode(chr3); | ||
| 751 | + } | ||
| 752 | + } while (i < str.length); | ||
| 753 | + | ||
| 754 | + return data; | ||
| 755 | +} | ||
| 756 | + | ||
| 757 | +/** | ||
| 758 | +* Parses a Query String, if one is not provided, it will look in location.href<br> | ||
| 759 | +* NOTE: This function will also handle test[] vars and convert them to an array inside of the return object.<br> | ||
| 760 | +* This now supports #hash vars, it will return it in the object as Obj.hash | ||
| 761 | +* @param {String} str The string to parse as a query string | ||
| 762 | +* @return An object of the parts of the parsed query string | ||
| 763 | +* @type Object | ||
| 764 | +*/ | ||
| 765 | +YAHOO.Tools.getQueryString = function(str) { | ||
| 766 | + var qstr = {}; | ||
| 767 | + if (!str) { | ||
| 768 | + var str = location.href.split('?'); | ||
| 769 | + if (str.length != 2) { | ||
| 770 | + str = ['', location.href]; | ||
| 771 | + } | ||
| 772 | + } else { | ||
| 773 | + var str = ['', str]; | ||
| 774 | + } | ||
| 775 | + if (str[1].match('#')) { | ||
| 776 | + var _tmp = str[1].split('#'); | ||
| 777 | + qstr.hash = _tmp[1]; | ||
| 778 | + str[1] = _tmp[0]; | ||
| 779 | + } | ||
| 780 | + if (str[1]) { | ||
| 781 | + str = str[1].split('&'); | ||
| 782 | + if (str.length) { | ||
| 783 | + for (var i = 0; i < str.length; i++) { | ||
| 784 | + var part = str[i].split('='); | ||
| 785 | + if (part[0].indexOf('[') != -1) { | ||
| 786 | + if (part[0].indexOf('[]') != -1) { | ||
| 787 | + //Array | ||
| 788 | + var arr = part[0].substring(0, part[0].length - 2); | ||
| 789 | + if (!qstr[arr]) { | ||
| 790 | + qstr[arr] = []; | ||
| 791 | + } | ||
| 792 | + qstr[arr][qstr[arr].length] = part[1]; | ||
| 793 | + } else { | ||
| 794 | + //Object | ||
| 795 | + var arr = part[0].substring(0, part[0].indexOf('[')); | ||
| 796 | + var data = part[0].substring((part[0].indexOf('[') + 1), part[0].indexOf(']')); | ||
| 797 | + if (!qstr[arr]) { | ||
| 798 | + qstr[arr] = {}; | ||
| 799 | + } | ||
| 800 | + //Object | ||
| 801 | + qstr[arr][data] = part[1]; | ||
| 802 | + } | ||
| 803 | + } else { | ||
| 804 | + qstr[part[0]] = part[1]; | ||
| 805 | + } | ||
| 806 | + } | ||
| 807 | + } | ||
| 808 | + } | ||
| 809 | + return qstr; | ||
| 810 | +} | ||
| 811 | +/** | ||
| 812 | +* Parses a Query String Var<br> | ||
| 813 | +* NOTE: This function will also handle test[] vars and convert them to an array inside of the return object. | ||
| 814 | +* @param {String} str The var to get from the query string | ||
| 815 | +* @return The value of the var in the querystring. | ||
| 816 | +* @type String/Array | ||
| 817 | +*/ | ||
| 818 | +YAHOO.Tools.getQueryStringVar = function(str) { | ||
| 819 | + var qs = this.getQueryString(); | ||
| 820 | + if (qs[str]) { | ||
| 821 | + return qs[str]; | ||
| 822 | + } else { | ||
| 823 | + return false; | ||
| 824 | + } | ||
| 825 | +} | ||
| 826 | + | ||
| 827 | + | ||
| 828 | +/** | ||
| 829 | +* Function to pad a date with a beginning 0 so 1 becomes 01, 2 becomes 02, etc.. | ||
| 830 | +* @param {String} n The string to pad | ||
| 831 | +* @returns Zero padded string | ||
| 832 | +* @type String | ||
| 833 | +*/ | ||
| 834 | +YAHOO.Tools.padDate = function(n) { | ||
| 835 | + return n < 10 ? '0' + n : n; | ||
| 836 | +} | ||
| 837 | + | ||
| 838 | +/** | ||
| 839 | +* Converts a string to a JSON string | ||
| 840 | +* @param {String} str Converts a string to a JSON string | ||
| 841 | +* @returns JSON Encoded string | ||
| 842 | +* @type String | ||
| 843 | +*/ | ||
| 844 | +YAHOO.Tools.encodeStr = function(str) { | ||
| 845 | + if (/["\\\x00-\x1f]/.test(str)) { | ||
| 846 | + return '"' + str.replace(/([\x00-\x1f\\"])/g, function(a, b) { | ||
| 847 | + var c = jsonCodes[b]; | ||
| 848 | + if(c) { | ||
| 849 | + return c; | ||
| 850 | + } | ||
| 851 | + c = b.charCodeAt(); | ||
| 852 | + return '\\u00' + | ||
| 853 | + Math.floor(c / 16).toString(16) + | ||
| 854 | + (c % 16).toString(16); | ||
| 855 | + }) + '"'; | ||
| 856 | + } | ||
| 857 | + return '"' + str + '"'; | ||
| 858 | +} | ||
| 859 | +/** | ||
| 860 | +* Converts an Array to a JSON string | ||
| 861 | +* @param {Array} arr Converts an Array to a JSON string | ||
| 862 | +* @returns JSON encoded string | ||
| 863 | +* @type String | ||
| 864 | +*/ | ||
| 865 | +YAHOO.Tools.encodeArr = function(arr) { | ||
| 866 | + var a = ['['], b, i, l = arr.length, v; | ||
| 867 | + for (i = 0; i < l; i += 1) { | ||
| 868 | + v = arr[i]; | ||
| 869 | + switch (typeof v) { | ||
| 870 | + case 'undefined': | ||
| 871 | + case 'function': | ||
| 872 | + case 'unknown': | ||
| 873 | + break; | ||
| 874 | + default: | ||
| 875 | + if (b) { | ||
| 876 | + a.push(','); | ||
| 877 | + } | ||
| 878 | + a.push(v === null ? "null" : YAHOO.Tools.JSONEncode(v)); | ||
| 879 | + b = true; | ||
| 880 | + } | ||
| 881 | + } | ||
| 882 | + a.push(']'); | ||
| 883 | + return a.join(''); | ||
| 884 | +} | ||
| 885 | +/** | ||
| 886 | +* Converts a Date object to a JSON string | ||
| 887 | +* @param {Object} d Converts a Date object to a JSON string | ||
| 888 | +* @returns JSON encoded Date string | ||
| 889 | +* @type String | ||
| 890 | +*/ | ||
| 891 | +YAHOO.Tools.encodeDate = function(d) { | ||
| 892 | + return '"' + d.getFullYear() + '-' + YAHOO.Tools.padDate(d.getMonth() + 1) + '-' + YAHOO.Tools.padDate(d.getDate()) + 'T' + YAHOO.Tools.padDate(d.getHours()) + ':' + YAHOO.Tools.padDate(d.getMinutes()) + ':' + YAHOO.Tools.padDate(d.getSeconds()) + '"'; | ||
| 893 | +} | ||
| 894 | + | ||
| 895 | +/** | ||
| 896 | +* Fixes the JSON date format | ||
| 897 | +* @param {String} dateStr JSON encoded date string (YYYY-MM-DDTHH:MM:SS) | ||
| 898 | +* @returns Date Object | ||
| 899 | +* @type Object | ||
| 900 | +*/ | ||
| 901 | +YAHOO.Tools.fixJSONDate = function(dateStr) { | ||
| 902 | + var tmp = dateStr.split('T'); | ||
| 903 | + var fixedDate = dateStr; | ||
| 904 | + if (tmp.length == 2) { | ||
| 905 | + var tmpDate = tmp[0].split('-'); | ||
| 906 | + if (tmpDate.length == 3) { | ||
| 907 | + fixedDate = new Date(tmpDate[0], (tmpDate[1] - 1), tmpDate[2]); | ||
| 908 | + var tmpTime = tmp[1].split(':'); | ||
| 909 | + if (tmpTime.length == 3) { | ||
| 910 | + fixedDate.setHours(tmpTime[0], tmpTime[1], tmpTime[2]); | ||
| 911 | + } | ||
| 912 | + } | ||
| 913 | + } | ||
| 914 | + return fixedDate; | ||
| 915 | +} | ||
| 916 | + | ||
| 917 | +/** | ||
| 918 | +* Encode a Javascript Object/Array into a JSON string | ||
| 919 | +* @param {String/Object/Array} o Converts the object to a JSON string | ||
| 920 | +* @returns JSON String | ||
| 921 | +* @type String | ||
| 922 | +*/ | ||
| 923 | +YAHOO.Tools.JSONEncode = function(o) { | ||
| 924 | + if ((typeof o == 'undefined') || (o === null)) { | ||
| 925 | + return 'null'; | ||
| 926 | + } else if (o instanceof Array) { | ||
| 927 | + return YAHOO.Tools.encodeArr(o); | ||
| 928 | + } else if (o instanceof Date) { | ||
| 929 | + return YAHOO.Tools.encodeDate(o); | ||
| 930 | + } else if (typeof o == 'string') { | ||
| 931 | + return YAHOO.Tools.encodeStr(o); | ||
| 932 | + } else if (typeof o == 'number') { | ||
| 933 | + return isFinite(o) ? String(o) : "null"; | ||
| 934 | + } else if (typeof o == 'boolean') { | ||
| 935 | + return String(o); | ||
| 936 | + } else { | ||
| 937 | + var a = ['{'], b, i, v; | ||
| 938 | + for (var i in o) { | ||
| 939 | + //if (o.hasOwnProperty(i)) { | ||
| 940 | + v = o[i]; | ||
| 941 | + switch (typeof v) { | ||
| 942 | + case 'undefined': | ||
| 943 | + case 'function': | ||
| 944 | + case 'unknown': | ||
| 945 | + break; | ||
| 946 | + default: | ||
| 947 | + if (b) { | ||
| 948 | + a.push(','); | ||
| 949 | + } | ||
| 950 | + a.push(YAHOO.Tools.JSONEncode(i), ':', ((v === null) ? "null" : YAHOO.Tools.JSONEncode(v))); | ||
| 951 | + b = true; | ||
| 952 | + } | ||
| 953 | + //} | ||
| 954 | + } | ||
| 955 | + a.push('}'); | ||
| 956 | + return a.join(''); | ||
| 957 | + } | ||
| 958 | +} | ||
| 959 | +/** | ||
| 960 | +* Converts/evals a JSON string into a native Javascript object | ||
| 961 | +* @param {String} json Converts the JSON string back into the native object | ||
| 962 | +* @param {Booleen} autoDate Try to autofix date objects | ||
| 963 | +* @returns eval'd object | ||
| 964 | +* @type Object/Array/String | ||
| 965 | +*/ | ||
| 966 | +YAHOO.Tools.JSONParse = function(json, autoDate) { | ||
| 967 | + var autoDate = ((autoDate) ? true : false); | ||
| 968 | + try { | ||
| 969 | + if (regExs.syntaxCheck.test(json)) { | ||
| 970 | + var j = eval('(' + json + ')'); | ||
| 971 | + if (autoDate) { | ||
| 972 | + function walk(k, v) { | ||
| 973 | + if (v && typeof v === 'object') { | ||
| 974 | + for (var i in v) { | ||
| 975 | + if (v.hasOwnProperty(i)) { | ||
| 976 | + v[i] = walk(i, v[i]); | ||
| 977 | + } | ||
| 978 | + } | ||
| 979 | + } | ||
| 980 | + if (k.toLowerCase().indexOf('date') >= 0) { | ||
| 981 | + return YAHOO.Tools.fixJSONDate(v); | ||
| 982 | + } else { | ||
| 983 | + return v; | ||
| 984 | + } | ||
| 985 | + } | ||
| 986 | + return walk('', j); | ||
| 987 | + } else { | ||
| 988 | + return j; | ||
| 989 | + } | ||
| 990 | + } | ||
| 991 | + } catch(e) { | ||
| 992 | + console.log(e); | ||
| 993 | + } | ||
| 994 | + throw new SyntaxError("parseJSON"); | ||
| 995 | +} | ||
| 996 | + | ||
| 997 | + | ||
| 998 | +/* | ||
| 999 | +* Try to catch the developers that use the wrong case 8-) | ||
| 1000 | +*/ | ||
| 1001 | +YAHOO.tools = YAHOO.Tools; | ||
| 1002 | +YAHOO.TOOLS = YAHOO.Tools; | ||
| 1003 | +YAHOO.util.Dom.create = YAHOO.Tools.create; | ||
| 1004 | +/* | ||
| 1005 | +* Smaller Code | ||
| 1006 | +*/ | ||
| 1007 | + | ||
| 1008 | +$A = YAHOO.util.Anim; | ||
| 1009 | +$E = YAHOO.util.Event; | ||
| 1010 | +$D = YAHOO.util.Dom; | ||
| 1011 | +$T = YAHOO.Tools; | ||
| 1012 | +$ = YAHOO.util.Dom.get; | ||
| 1013 | +$$ = YAHOO.util.Dom.getElementsByClassName; |