Changeset 3065415
- Timestamp:
- 04/05/2024 12:02:32 PM (23 months ago)
- Location:
- ultimate-under-construction
- Files:
-
- 31 added
- 14 edited
-
tags/1.9.3/languages (added)
-
tags/1.9.4 (added)
-
tags/1.9.4/includes (added)
-
tags/1.9.4/includes/css (added)
-
tags/1.9.4/includes/css/flipclock.css (added)
-
tags/1.9.4/includes/css/plugin_styles.css (added)
-
tags/1.9.4/includes/display-functions.php (added)
-
tags/1.9.4/includes/images (added)
-
tags/1.9.4/includes/images/darkbind.png (added)
-
tags/1.9.4/includes/images/flatcardboard.png (added)
-
tags/1.9.4/includes/images/greywashwall.png (added)
-
tags/1.9.4/includes/images/lightbind.png (added)
-
tags/1.9.4/includes/images/oldmaths.png (added)
-
tags/1.9.4/includes/images/pooltable.png (added)
-
tags/1.9.4/includes/images/squairylight.png (added)
-
tags/1.9.4/includes/images/wavegrid.png (added)
-
tags/1.9.4/includes/js (added)
-
tags/1.9.4/includes/js/base.js (added)
-
tags/1.9.4/includes/js/countdown.js (added)
-
tags/1.9.4/includes/js/dailycounter.js (added)
-
tags/1.9.4/includes/js/flipclock.js (added)
-
tags/1.9.4/includes/js/uuc-admin.js (added)
-
tags/1.9.4/includes/js/uuc-script-farb.js (added)
-
tags/1.9.4/includes/js/uuc-script.js (added)
-
tags/1.9.4/includes/js/uuc-upload.js (added)
-
tags/1.9.4/includes/scripts.php (added)
-
tags/1.9.4/includes/uucadmin.php (added)
-
tags/1.9.4/languages (added)
-
tags/1.9.4/readme.txt (added)
-
tags/1.9.4/ultimate-under-construction.php (added)
-
trunk/includes/css/flipclock.css (modified) (1 diff)
-
trunk/includes/css/plugin_styles.css (modified) (1 diff)
-
trunk/includes/display-functions.php (modified) (7 diffs)
-
trunk/includes/js/base.js (modified) (11 diffs)
-
trunk/includes/js/countdown.js (modified) (1 diff)
-
trunk/includes/js/dailycounter.js (modified) (7 diffs)
-
trunk/includes/js/flipclock.js (modified) (73 diffs)
-
trunk/includes/js/uuc-admin.js (added)
-
trunk/includes/js/uuc-script-farb.js (modified) (1 diff)
-
trunk/includes/js/uuc-script.js (modified) (1 diff)
-
trunk/includes/js/uuc-upload.js (modified) (1 diff)
-
trunk/includes/scripts.php (modified) (1 diff)
-
trunk/includes/uucadmin.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
-
trunk/ultimate-under-construction.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ultimate-under-construction/trunk/includes/css/flipclock.css
r868862 r3065415 2 2 /* Reset */ 3 3 .cddiv { 4 width: 100%;5 text-align: center;4 width: 100%; 5 text-align: center; 6 6 } 7 7 8 8 .flip-clock-wrapper * { 9 -webkit-box-sizing: border-box;10 -moz-box-sizing: border-box;11 -ms-box-sizing: border-box;12 -o-box-sizing: border-box;13 box-sizing: border-box;14 -webkit-backface-visibility: hidden;15 -moz-backface-visibility: hidden;16 -ms-backface-visibility: hidden;17 -o-backface-visibility: hidden;18 backface-visibility: hidden;9 -webkit-box-sizing: border-box; 10 -moz-box-sizing: border-box; 11 -ms-box-sizing: border-box; 12 -o-box-sizing: border-box; 13 box-sizing: border-box; 14 -webkit-backface-visibility: hidden; 15 -moz-backface-visibility: hidden; 16 -ms-backface-visibility: hidden; 17 -o-backface-visibility: hidden; 18 backface-visibility: hidden; 19 19 } 20 20 21 21 .flip-clock-wrapper a { 22 cursor: pointer; 23 text-decoration: none; 24 color: #ccc; } 22 cursor: pointer; 23 text-decoration: none; 24 color: #ccc; 25 } 25 26 26 27 .flip-clock-wrapper a:hover { 27 color: #fff; } 28 color: #fff; 29 } 28 30 29 31 .flip-clock-wrapper ul { 30 list-style: none; } 32 list-style: none; 33 } 31 34 32 35 .flip-clock-wrapper.clearfix:before, 33 36 .flip-clock-wrapper.clearfix:after { 34 content: " "; 35 display: table; } 37 content: " "; 38 display: table; 39 } 36 40 37 41 .flip-clock-wrapper.clearfix:after { 38 clear: both; } 42 clear: both; 43 } 39 44 40 45 .flip-clock-wrapper.clearfix { 41 *zoom: 1; } 46 *zoom: 1; 47 } 42 48 43 49 /* Main */ 44 50 .flip-clock-wrapper { 45 font: normal 11px "Helvetica Neue", Helvetica, sans-serif; 46 -webkit-user-select: none; } 51 font: normal 11px "Helvetica Neue", Helvetica, sans-serif; 52 -webkit-user-select: none; 53 } 47 54 48 55 .flip-clock-meridium { 49 background: none !important; 50 box-shadow: 0 0 0 !important; 51 font-size: 36px !important; } 52 53 .flip-clock-meridium a { color: #313333; } 56 background: none !important; 57 box-shadow: 0 0 0 !important; 58 font-size: 36px !important; 59 } 60 61 .flip-clock-meridium a { 62 color: #313333; 63 } 54 64 55 65 .flip-clock-wrapper { 56 text-align: center;57 position: relative;58 margin: 1em;59 display: inline-block !important;66 text-align: center; 67 position: relative; 68 margin: 1em; 69 display: inline-block !important; 60 70 } 61 71 62 72 .flip-clock-wrapper:before, 63 73 .flip-clock-wrapper:after { 64 content: " "; /* 1 */ 65 display: table; /* 2 */ 66 } 74 content: " "; 75 /* 1 */ 76 display: table; 77 /* 2 */ 78 } 79 67 80 .flip-clock-wrapper:after { 68 clear: both;81 clear: both; 69 82 } 70 83 71 84 /* Skeleton */ 72 85 .flip-clock-wrapper ul { 73 position: relative;74 float: left;75 margin: 5px;76 width: 60px;77 height: 90px;78 font-size: 80px;79 font-weight: bold;80 line-height: 87px;81 border-radius: 6px;82 background: #000;86 position: relative; 87 float: left; 88 margin: 5px; 89 width: 60px; 90 height: 90px; 91 font-size: 80px; 92 font-weight: bold; 93 line-height: 87px; 94 border-radius: 6px; 95 background: #000; 83 96 } 84 97 85 98 .flip-clock-wrapper ul li { 86 z-index: 1;87 position: absolute;88 left: 0;89 top: 0;90 width: 100%;91 height: 100%;92 text-decoration: none !important;99 z-index: 1; 100 position: absolute; 101 left: 0; 102 top: 0; 103 width: 100%; 104 height: 100%; 105 text-decoration: none !important; 93 106 } 94 107 95 108 .flip-clock-wrapper ul li:first-child { 96 z-index: 2; } 109 z-index: 2; 110 } 97 111 98 112 .flip-clock-wrapper ul li a { 99 display: block; 100 height: 100%; 101 -webkit-perspective: 200px; 102 -moz-perspective: 200px; 103 perspective: 200px; 104 margin: 0 !important; 105 overflow: visible !important; 106 cursor: default !important; } 113 display: block; 114 height: 100%; 115 -webkit-perspective: 200px; 116 -moz-perspective: 200px; 117 perspective: 200px; 118 margin: 0 !important; 119 overflow: visible !important; 120 cursor: default !important; 121 } 107 122 108 123 .flip-clock-wrapper ul li a div { 109 z-index: 1; 110 position: absolute; 111 left: 0; 112 width: 100%; 113 height: 50%; 114 font-size: 80px; 115 overflow: hidden; 116 outline: 1px solid transparent; } 124 z-index: 1; 125 position: absolute; 126 left: 0; 127 width: 100%; 128 height: 50%; 129 font-size: 80px; 130 overflow: hidden; 131 outline: 1px solid transparent; 132 } 117 133 118 134 .flip-clock-wrapper ul li a div .shadow { 119 position: absolute; 120 width: 100%; 121 height: 100%; 122 z-index: 2; } 135 position: absolute; 136 width: 100%; 137 height: 100%; 138 z-index: 2; 139 } 123 140 124 141 .flip-clock-wrapper ul li a div.up { 125 -webkit-transform-origin: 50% 100%; 126 -moz-transform-origin: 50% 100%; 127 -ms-transform-origin: 50% 100%; 128 -o-transform-origin: 50% 100%; 129 transform-origin: 50% 100%; 130 top: 0; } 142 -webkit-transform-origin: 50% 100%; 143 -moz-transform-origin: 50% 100%; 144 -ms-transform-origin: 50% 100%; 145 -o-transform-origin: 50% 100%; 146 transform-origin: 50% 100%; 147 top: 0; 148 } 131 149 132 150 .flip-clock-wrapper ul li a div.up:after { 133 content: ""; 134 position: absolute; 135 top: 44px; 136 left: 0; 137 z-index: 5; 138 width: 100%; 139 height: 3px; 140 background-color: #000; 141 background-color: rgba(0, 0, 0, 0.4); } 151 content: ""; 152 position: absolute; 153 top: 44px; 154 left: 0; 155 z-index: 5; 156 width: 100%; 157 height: 3px; 158 background-color: #000; 159 background-color: rgba(0, 0, 0, 0.4); 160 } 142 161 143 162 .flip-clock-wrapper ul li a div.down { 144 -webkit-transform-origin: 50% 0; 145 -moz-transform-origin: 50% 0; 146 -ms-transform-origin: 50% 0; 147 -o-transform-origin: 50% 0; 148 transform-origin: 50% 0; 149 bottom: 0; } 163 -webkit-transform-origin: 50% 0; 164 -moz-transform-origin: 50% 0; 165 -ms-transform-origin: 50% 0; 166 -o-transform-origin: 50% 0; 167 transform-origin: 50% 0; 168 bottom: 0; 169 } 150 170 151 171 .flip-clock-wrapper ul li a div div.inn { 152 position: absolute; 153 left: 0; 154 z-index: 1; 155 width: 100%; 156 height: 200%; 157 color: #ccc; 158 text-shadow: 0 1px 2px #000; 159 text-align: center; 160 background-color: #333; 161 border-radius: 6px; 162 font-size: 70px; } 172 position: absolute; 173 left: 0; 174 z-index: 1; 175 width: 100%; 176 height: 200%; 177 color: #ccc; 178 text-shadow: 0 1px 2px #000; 179 text-align: center; 180 background-color: #333; 181 border-radius: 6px; 182 font-size: 70px; 183 } 163 184 164 185 .flip-clock-wrapper ul li a div.up div.inn { 165 top: 0; } 186 top: 0; 187 } 166 188 167 189 .flip-clock-wrapper ul li a div.down div.inn { 168 bottom: 0; } 190 bottom: 0; 191 } 169 192 170 193 /* PLAY */ 171 194 .flip-clock-wrapper ul.play li.flip-clock-before { 172 z-index: 3; } 173 174 .flip-clock-wrapper .flip { box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7); } 195 z-index: 3; 196 } 197 198 .flip-clock-wrapper .flip { 199 box-shadow: 0 2px 5px rgba(0, 0, 0, 0.7); 200 } 175 201 176 202 .flip-clock-wrapper ul.play li.flip-clock-active { 177 -webkit-animation: asd 0.5s 0.5s linear both; 178 -moz-animation: asd 0.5s 0.5s linear both; 179 animation: asd 0.5s 0.5s linear both; 180 z-index: 5; } 203 -webkit-animation: asd 0.5s 0.5s linear both; 204 -moz-animation: asd 0.5s 0.5s linear both; 205 animation: asd 0.5s 0.5s linear both; 206 z-index: 5; 207 } 181 208 182 209 .flip-clock-divider { 183 float: left; 184 display: inline-block; 185 position: relative; 186 width: 20px; 187 height: 100px; } 210 float: left; 211 display: inline-block; 212 position: relative; 213 width: 20px; 214 height: 100px; 215 } 188 216 189 217 .flip-clock-divider:first-child { 190 width: 0; } 218 width: 0; 219 } 191 220 192 221 .flip-clock-dot { 193 display: block; 194 background: #323434; 195 width: 10px; 196 height: 10px; 197 position: absolute; 198 border-radius: 50%; 199 box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); 200 left: 5px; } 222 display: block; 223 background: #323434; 224 width: 10px; 225 height: 10px; 226 position: absolute; 227 border-radius: 50%; 228 box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); 229 left: 5px; 230 } 201 231 202 232 .flip-clock-divider .flip-clock-label { 203 position: absolute; 204 top: -1.5em; 205 right: -86px; 206 text-shadow: none; } 233 position: absolute; 234 top: -1.5em; 235 right: -86px; 236 text-shadow: none; 237 } 207 238 208 239 .flip-clock-divider.minutes .flip-clock-label { 209 right: -88px; } 240 right: -88px; 241 } 210 242 211 243 .flip-clock-divider.seconds .flip-clock-label { 212 right: -91px; } 244 right: -91px; 245 } 213 246 214 247 .flip-clock-dot.top { 215 top: 30px; } 248 top: 30px; 249 } 216 250 217 251 .flip-clock-dot.bottom { 218 bottom: 30px; } 252 bottom: 30px; 253 } 219 254 220 255 @-webkit-keyframes asd { 221 0% { 222 z-index: 2; } 223 224 20% { 225 z-index: 4; } 226 227 100% { 228 z-index: 4; } } 256 0% { 257 z-index: 2; 258 } 259 260 20% { 261 z-index: 4; 262 } 263 264 100% { 265 z-index: 4; 266 } 267 } 229 268 230 269 @-moz-keyframes asd { 231 0% { 232 z-index: 2; } 233 234 20% { 235 z-index: 4; } 236 237 100% { 238 z-index: 4; } } 270 0% { 271 z-index: 2; 272 } 273 274 20% { 275 z-index: 4; 276 } 277 278 100% { 279 z-index: 4; 280 } 281 } 239 282 240 283 @-o-keyframes asd { 241 0% { 242 z-index: 2; } 243 244 20% { 245 z-index: 4; } 246 247 100% { 248 z-index: 4; } } 284 0% { 285 z-index: 2; 286 } 287 288 20% { 289 z-index: 4; 290 } 291 292 100% { 293 z-index: 4; 294 } 295 } 249 296 250 297 @keyframes asd { 251 0% { 252 z-index: 2; } 253 254 20% { 255 z-index: 4; } 256 257 100% { 258 z-index: 4; } } 298 0% { 299 z-index: 2; 300 } 301 302 20% { 303 z-index: 4; 304 } 305 306 100% { 307 z-index: 4; 308 } 309 } 259 310 260 311 .flip-clock-wrapper ul.play li.flip-clock-active .down { 261 z-index: 2; 262 -webkit-animation: turn 0.5s 0.5s linear both; 263 -moz-animation: turn 0.5s 0.5s linear both; 264 animation: turn 0.5s 0.5s linear both; } 312 z-index: 2; 313 -webkit-animation: turn 0.5s 0.5s linear both; 314 -moz-animation: turn 0.5s 0.5s linear both; 315 animation: turn 0.5s 0.5s linear both; 316 } 265 317 266 318 @-webkit-keyframes turn { 267 0% { 268 -webkit-transform: rotateX(90deg); } 269 270 100% { 271 -webkit-transform: rotateX(0deg); } } 319 0% { 320 -webkit-transform: rotateX(90deg); 321 } 322 323 100% { 324 -webkit-transform: rotateX(0deg); 325 } 326 } 272 327 273 328 @-moz-keyframes turn { 274 0% { 275 -moz-transform: rotateX(90deg); } 276 277 100% { 278 -moz-transform: rotateX(0deg); } } 329 0% { 330 -moz-transform: rotateX(90deg); 331 } 332 333 100% { 334 -moz-transform: rotateX(0deg); 335 } 336 } 279 337 280 338 @-o-keyframes turn { 281 0% { 282 -o-transform: rotateX(90deg); } 283 284 100% { 285 -o-transform: rotateX(0deg); } } 339 0% { 340 -o-transform: rotateX(90deg); 341 } 342 343 100% { 344 -o-transform: rotateX(0deg); 345 } 346 } 286 347 287 348 @keyframes turn { 288 0% { 289 transform: rotateX(90deg); } 290 291 100% { 292 transform: rotateX(0deg); } } 349 0% { 350 transform: rotateX(90deg); 351 } 352 353 100% { 354 transform: rotateX(0deg); 355 } 356 } 293 357 294 358 .flip-clock-wrapper ul.play li.flip-clock-before .up { 295 z-index: 2; 296 -webkit-animation: turn2 0.5s linear both; 297 -moz-animation: turn2 0.5s linear both; 298 animation: turn2 0.5s linear both; } 359 z-index: 2; 360 -webkit-animation: turn2 0.5s linear both; 361 -moz-animation: turn2 0.5s linear both; 362 animation: turn2 0.5s linear both; 363 } 299 364 300 365 @-webkit-keyframes turn2 { 301 0% { 302 -webkit-transform: rotateX(0deg); } 303 304 100% { 305 -webkit-transform: rotateX(-90deg); } } 366 0% { 367 -webkit-transform: rotateX(0deg); 368 } 369 370 100% { 371 -webkit-transform: rotateX(-90deg); 372 } 373 } 306 374 307 375 @-moz-keyframes turn2 { 308 0% { 309 -moz-transform: rotateX(0deg); } 310 311 100% { 312 -moz-transform: rotateX(-90deg); } } 376 0% { 377 -moz-transform: rotateX(0deg); 378 } 379 380 100% { 381 -moz-transform: rotateX(-90deg); 382 } 383 } 313 384 314 385 @-o-keyframes turn2 { 315 0% { 316 -o-transform: rotateX(0deg); } 317 318 100% { 319 -o-transform: rotateX(-90deg); } } 386 0% { 387 -o-transform: rotateX(0deg); 388 } 389 390 100% { 391 -o-transform: rotateX(-90deg); 392 } 393 } 320 394 321 395 @keyframes turn2 { 322 0% { 323 transform: rotateX(0deg); } 324 325 100% { 326 transform: rotateX(-90deg); } } 396 0% { 397 transform: rotateX(0deg); 398 } 399 400 100% { 401 transform: rotateX(-90deg); 402 } 403 } 327 404 328 405 .flip-clock-wrapper ul li.flip-clock-active { 329 z-index: 3; } 406 z-index: 3; 407 } 330 408 331 409 /* SHADOW */ 332 410 .flip-clock-wrapper ul.play li.flip-clock-before .up .shadow { 333 background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); 334 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0, 0, 0, 0.1)), color-stop(100%, black)); 335 background: linear, top, rgba(0, 0, 0, 0.1) 0%, black 100%; 336 background: -o-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); 337 background: -ms-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); 338 background: linear, to bottom, rgba(0, 0, 0, 0.1) 0%, black 100%; 339 -webkit-animation: show 0.5s linear both; 340 -moz-animation: show 0.5s linear both; 341 animation: show 0.5s linear both; } 411 background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); 412 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0, 0, 0, 0.1)), color-stop(100%, black)); 413 background: linear, top, rgba(0, 0, 0, 0.1) 0%, black 100%; 414 background: -o-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); 415 background: -ms-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); 416 background: linear, to bottom, rgba(0, 0, 0, 0.1) 0%, black 100%; 417 -webkit-animation: show 0.5s linear both; 418 -moz-animation: show 0.5s linear both; 419 animation: show 0.5s linear both; 420 } 342 421 343 422 .flip-clock-wrapper ul.play li.flip-clock-active .up .shadow { 344 background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); 345 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0, 0, 0, 0.1)), color-stop(100%, black)); 346 background: linear, top, rgba(0, 0, 0, 0.1) 0%, black 100%; 347 background: -o-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); 348 background: -ms-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); 349 background: linear, to bottom, rgba(0, 0, 0, 0.1) 0%, black 100%; 350 -webkit-animation: hide 0.5s 0.3s linear both; 351 -moz-animation: hide 0.5s 0.3s linear both; 352 animation: hide 0.5s 0.3s linear both; } 423 background: -moz-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); 424 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(0, 0, 0, 0.1)), color-stop(100%, black)); 425 background: linear, top, rgba(0, 0, 0, 0.1) 0%, black 100%; 426 background: -o-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); 427 background: -ms-linear-gradient(top, rgba(0, 0, 0, 0.1) 0%, black 100%); 428 background: linear, to bottom, rgba(0, 0, 0, 0.1) 0%, black 100%; 429 -webkit-animation: hide 0.5s 0.3s linear both; 430 -moz-animation: hide 0.5s 0.3s linear both; 431 animation: hide 0.5s 0.3s linear both; 432 } 353 433 354 434 /*DOWN*/ 355 435 .flip-clock-wrapper ul.play li.flip-clock-before .down .shadow { 356 background: -moz-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); 357 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, black), color-stop(100%, rgba(0, 0, 0, 0.1))); 358 background: linear, top, black 0%, rgba(0, 0, 0, 0.1) 100%; 359 background: -o-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); 360 background: -ms-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); 361 background: linear, to bottom, black 0%, rgba(0, 0, 0, 0.1) 100%; 362 -webkit-animation: show 0.5s linear both; 363 -moz-animation: show 0.5s linear both; 364 animation: show 0.5s linear both; } 436 background: -moz-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); 437 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, black), color-stop(100%, rgba(0, 0, 0, 0.1))); 438 background: linear, top, black 0%, rgba(0, 0, 0, 0.1) 100%; 439 background: -o-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); 440 background: -ms-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); 441 background: linear, to bottom, black 0%, rgba(0, 0, 0, 0.1) 100%; 442 -webkit-animation: show 0.5s linear both; 443 -moz-animation: show 0.5s linear both; 444 animation: show 0.5s linear both; 445 } 365 446 366 447 .flip-clock-wrapper ul.play li.flip-clock-active .down .shadow { 367 background: -moz-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); 368 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, black), color-stop(100%, rgba(0, 0, 0, 0.1))); 369 background: linear, top, black 0%, rgba(0, 0, 0, 0.1) 100%; 370 background: -o-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); 371 background: -ms-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); 372 background: linear, to bottom, black 0%, rgba(0, 0, 0, 0.1) 100%; 373 -webkit-animation: hide 0.5s 0.3s linear both; 374 -moz-animation: hide 0.5s 0.3s linear both; 375 animation: hide 0.5s 0.2s linear both; } 448 background: -moz-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); 449 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, black), color-stop(100%, rgba(0, 0, 0, 0.1))); 450 background: linear, top, black 0%, rgba(0, 0, 0, 0.1) 100%; 451 background: -o-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); 452 background: -ms-linear-gradient(top, black 0%, rgba(0, 0, 0, 0.1) 100%); 453 background: linear, to bottom, black 0%, rgba(0, 0, 0, 0.1) 100%; 454 -webkit-animation: hide 0.5s 0.3s linear both; 455 -moz-animation: hide 0.5s 0.3s linear both; 456 animation: hide 0.5s 0.2s linear both; 457 } 376 458 377 459 @-webkit-keyframes show { 378 0% { 379 opacity: 0; } 380 381 100% { 382 opacity: 1; } } 460 0% { 461 opacity: 0; 462 } 463 464 100% { 465 opacity: 1; 466 } 467 } 383 468 384 469 @-moz-keyframes show { 385 0% { 386 opacity: 0; } 387 388 100% { 389 opacity: 1; } } 470 0% { 471 opacity: 0; 472 } 473 474 100% { 475 opacity: 1; 476 } 477 } 390 478 391 479 @-o-keyframes show { 392 0% { 393 opacity: 0; } 394 395 100% { 396 opacity: 1; } } 480 0% { 481 opacity: 0; 482 } 483 484 100% { 485 opacity: 1; 486 } 487 } 397 488 398 489 @keyframes show { 399 0% { 400 opacity: 0; } 401 402 100% { 403 opacity: 1; } } 490 0% { 491 opacity: 0; 492 } 493 494 100% { 495 opacity: 1; 496 } 497 } 404 498 405 499 @-webkit-keyframes hide { 406 0% { 407 opacity: 1; } 408 409 100% { 410 opacity: 0; } } 500 0% { 501 opacity: 1; 502 } 503 504 100% { 505 opacity: 0; 506 } 507 } 411 508 412 509 @-moz-keyframes hide { 413 0% { 414 opacity: 1; } 415 416 100% { 417 opacity: 0; } } 510 0% { 511 opacity: 1; 512 } 513 514 100% { 515 opacity: 0; 516 } 517 } 418 518 419 519 @-o-keyframes hide { 420 0% { 421 opacity: 1; } 422 423 100% { 424 opacity: 0; } } 520 0% { 521 opacity: 1; 522 } 523 524 100% { 525 opacity: 0; 526 } 527 } 425 528 426 529 @keyframes hide { 427 0% { 428 opacity: 1; } 429 430 100% { 431 opacity: 0; } } 530 0% { 531 opacity: 1; 532 } 533 534 100% { 535 opacity: 0; 536 } 537 } -
ultimate-under-construction/trunk/includes/css/plugin_styles.css
r2750860 r3065415 1 .uuc-title { border-bottom: 1px solid #ccc; background: #F5F5F5; padding: 8px; margin: 20px 0; background: -moz-linear-gradient(top, #f1f1f1 0%, #e5e5e5 100%); /* FF3.6+ */ 2 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f1f1f1), color-stop(100%,#e5e5e5)); /* Chrome,Safari4+ */ 3 background: -webkit-linear-gradient(top, #f1f1f1 0%,#e5e5e5 100%); /* Chrome10+,Safari5.1+ */ 4 background: -o-linear-gradient(top, #f1f1f1 0%,#e5e5e5 100%); /* Opera 11.10+ */ 5 background: -ms-linear-gradient(top, #f1f1f1 0%,#e5e5e5 100%); /* IE10+ */ 6 background: linear-gradient(to bottom, #f1f1f1 0%,#e5e5e5 100%); /* W3C */ 7 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f1f1f1', endColorstr='#e5e5e5',GradientType=0 ); /* IE6-9 */ } 1 .uuc-title { 2 border-bottom: 1px solid #ccc; 3 background: #F5F5F5; 4 padding: 8px; 5 margin: 20px 0; 6 background: -moz-linear-gradient(top, #f1f1f1 0%, #e5e5e5 100%); 7 /* FF3.6+ */ 8 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f1f1f1), color-stop(100%, #e5e5e5)); 9 /* Chrome,Safari4+ */ 10 background: -webkit-linear-gradient(top, #f1f1f1 0%, #e5e5e5 100%); 11 /* Chrome10+,Safari5.1+ */ 12 background: -o-linear-gradient(top, #f1f1f1 0%, #e5e5e5 100%); 13 /* Opera 11.10+ */ 14 background: -ms-linear-gradient(top, #f1f1f1 0%, #e5e5e5 100%); 15 /* IE10+ */ 16 background: linear-gradient(to bottom, #f1f1f1 0%, #e5e5e5 100%); 17 /* W3C */ 18 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f1f1f1', endColorstr='#e5e5e5', GradientType=0); 19 /* IE6-9 */ 20 } 8 21 9 #wpfooter { display:none !important; visibility: hidden !important; } 22 #wpfooter { 23 display: none !important; 24 visibility: hidden !important; 25 } 10 26 11 .uuc-holdingpage h1 { text-align: center; padding-top: 250px; } 27 .uuc-holdingpage h1 { 28 text-align: center; 29 padding-top: 250px; 30 } -
ultimate-under-construction/trunk/includes/display-functions.php
r2750860 r3065415 1 1 <?php 2 3 /* display functions for outputting data */ 4 5 add_filter('get_header', 'uuc_add_content'); 6 2 /** 3 * Display Functions 4 * 5 * Loads the functionality for the front end holding page. 6 * 7 * @package Ultimate Under Construction 8 */ 9 10 add_action( 'wp_enqueue_scripts', 'uuc_enqueue_scripts' ); 11 /** 12 * Enqueue Scripts 13 */ 14 function uuc_enqueue_scripts() { 15 wp_enqueue_script( 'uuc_base', UUC_PLUGIN_URL . 'js/base.js', array(), filemtime( UUC_PLUGIN_DIR . 'js/base.js' ), array( 'in_footer' => false ) ); 16 wp_enqueue_script( 'uuc_flipclock', UUC_PLUGIN_URL . 'js/flipclock.js', array(), filemtime( UUC_PLUGIN_DIR . 'js/flipclock.js' ), array( 'in_footer' => false ) ); 17 wp_enqueue_script( 'uuc_counter', UUC_PLUGIN_URL . 'js/dailycounter.js', array(), filemtime( UUC_PLUGIN_DIR . 'js/dailycounter.js' ), array( 'in_footer' => false ) ); 18 19 wp_enqueue_style( 'uuc_flipclock_styles', UUC_PLUGIN_URL . 'css/base.css', array(), filemtime( UUC_PLUGIN_DIR . 'css/base.css' ), array( 'in_footer' => false ) ); 20 } 21 22 // Display functions for outputting data. 23 add_filter( 'get_header', 'uuc_add_content' ); 24 25 /** 26 * Add UUC Content. 27 */ 7 28 function uuc_add_content() { 8 29 global $uuc_options; 9 10 //Current version of WP seems to fall over on unticked Checkboxes... This is to tidy it up and stop unwanted 'Notices' 11 //Enable Checkbox Sanitization 12 if ( ! isset( $uuc_options['enable'] ) || $uuc_options['enable'] != '1' ) 13 $uuc_options['enable'] = 0; 14 else 15 $uuc_options['enable'] = 1; 16 17 //Countdown Checkbox Sanitization 18 if ( ! isset( $uuc_options['cdenable'] ) || $uuc_options['cdenable'] != '1' ) 19 $uuc_options['cdenable'] = 0; 20 else 21 $uuc_options['cdenable'] = 1; 22 23 if ($uuc_options['enable'] == 1) { 30 31 // Current version of WP seems to fall over on unticked Checkboxes... This is to tidy it up and stop unwanted 'Notices'. 32 // Enable Checkbox Sanitization. 33 if ( ! isset( $uuc_options['enable'] ) || '1' != $uuc_options['enable'] ) { 34 $uuc_options['enable'] = 0; 35 } else { 36 $uuc_options['enable'] = 1; 37 } 38 39 // Countdown Checkbox Sanitization. 40 if ( ! isset( $uuc_options['cdenable'] ) || '1' != $uuc_options['cdenable'] ) { 41 $uuc_options['cdenable'] = 0; 42 } else { 43 $uuc_options['cdenable'] = 1; 44 } 45 46 if ( 1 == $uuc_options['enable'] ) { 24 47 25 48 ?> 26 49 <!DOCTYPE html> 27 50 <script language="JavaScript"> 28 TargetDate = "<?php echo $uuc_options['cdmonth'], '/', $uuc_options['cdday'], '/', $uuc_options['cdyear']; ?>";29 CountActive = true;30 CountStepper = -1;31 LeadingZero = true;32 DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds ";33 FinishMessage = "It is finally here!";51 TargetDate = "<?php echo esc_html( $uuc_options['cdmonth'] ), '/', esc_html( $uuc_options['cdday'] ), '/', esc_html( $uuc_options['cdyear'] ); ?>"; 52 CountActive = true; 53 CountStepper = -1; 54 LeadingZero = true; 55 DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds "; 56 FinishMessage = "It is finally here!"; 34 57 </script> 35 58 … … 37 60 38 61 <?php 39 echo '<script src="' . plugin_dir_url(__FILE__) . 'js/base.js"></script>'; 40 echo '<script src="' . plugin_dir_url(__FILE__) . 'js/flipclock.js"></script>'; 41 echo '<script src="' . plugin_dir_url(__FILE__) . 'js/dailycounter.js"></script>'; 42 echo '<link rel="stylesheet" href="' . plugin_dir_url(__FILE__) . 'css/flipclock.css">'; 62 echo wp_kses( 63 '<script src="' . plugin_dir_url( __FILE__ ) . 'js/base.js"></script>', 64 array( 65 'script' => array( 66 'src' => array(), 67 ), 68 ) 69 ); 70 echo wp_kses( 71 '<script src="' . plugin_dir_url( __FILE__ ) . 'js/flipclock.js"></script>', 72 array( 73 'script' => array( 74 'src' => array(), 75 ), 76 ) 77 ); 78 echo wp_kses( 79 '<script src="' . plugin_dir_url( __FILE__ ) . 'js/dailycounter.js"></script>', 80 array( 81 'script' => array( 82 'src' => array(), 83 ), 84 ) 85 ); 86 echo wp_kses( 87 '<link rel="stylesheet" href="' . plugin_dir_url( __FILE__ ) . 'css/flipclock.css">', 88 array( 89 'link' => array( 90 'rel' => array(), 91 'href' => array(), 92 ), 93 ) 94 ); 43 95 $html = ''; 44 ?> 96 ?> 45 97 46 98 <script type="text/javascript"> 47 99 var clock; 48 100 49 $(document).ready(function () {101 $(document).ready(function () { 50 102 51 103 // Grab the current date … … 53 105 54 106 // Set some date in the future. 55 var selecteddate = new Date("<?php echo $uuc_options['cdyear'], '/', $uuc_options['cdmonth'], '/', $uuc_options['cdday']; ?>");107 var selecteddate = new Date("<?php echo esc_html( $uuc_options['cdyear'] ), '/', esc_html( $uuc_options['cdmonth'] ), '/', esc_html( $uuc_options['cdday'] ); ?>"); 56 108 57 109 // Calculate the difference in seconds between the future and current date 58 110 var diff1 = selecteddate.getTime() / 1000 - currentDate.getTime() / 1000; 59 111 60 var diff = (diff1 <= 0) ? "0" : diff1;112 var diff = (diff1 <= 0) ? "0" : diff1; 61 113 62 114 // Instantiate a coutdown FlipClock … … 66 118 countdown: true 67 119 }); 68 }); 69 </script> 120 }); 121 </script> 70 122 <?php 71 123 72 if (isset($uuc_options['cdday'])){73 $entereddate = ( $uuc_options['cdyear'] . "-" . $uuc_options['cdmonth'] . "-" . $uuc_options['cdday'] . " " . "00:00:00");74 $cddates = strtotime($entereddate);124 if ( isset( $uuc_options['cdday'] ) ) { 125 $entereddate = ( $uuc_options['cdyear'] . '-' . esc_html( $uuc_options['cdmonth'] ) . '-' . esc_html( $uuc_options['cdday'] ) . ' ' . '00:00:00' ); 126 $cddates = strtotime( $entereddate ); 75 127 } 76 128 77 if (!is_admin() && !is_user_logged_in() && $uuc_options['enable'] == true && $uuc_options['holdingpage_type'] == "htmlblock"){78 129 if ( ! is_admin() && ! is_user_logged_in() && true == $uuc_options['enable'] && 'htmlblock' == $uuc_options['holdingpage_type'] ) { 130 79 131 $html .= '<div class="uuc-holdingpage">'; 80 if (isset($uuc_options['html_block'])) {132 if ( isset( $uuc_options['html_block'] ) ) { 81 133 $html .= $uuc_options['html_block']; 82 134 } 83 135 $html .= '</div>'; 84 echo $html; exit; 85 } 86 elseif(!is_admin() && !is_user_logged_in() && $uuc_options['enable'] == true){ 87 88 if (isset($uuc_options['background_style']) && $uuc_options['background_style'] == "solidcolor") { 89 if (isset($uuc_options['background_color'])) {?> 136 echo esc_html( $html ); 137 exit; 138 } elseif ( ! is_admin() && ! is_user_logged_in() && true == $uuc_options['enable'] ) { 139 140 if ( isset( $uuc_options['background_style'] ) && 'solidcolor' == $uuc_options['background_style'] ) { 141 if ( isset( $uuc_options['background_color'] ) ) { 142 ?> 90 143 <style type="text/css"> 91 body { background-color: <?php echo $uuc_options['background_color']; ?> } 92 .uuc-holdingpage { text-align: center; padding-top: 250px; } 144 body { 145 background-color: <?php echo esc_html( $uuc_options['background_color'] ); ?> 146 } 147 148 .uuc-holdingpage { 149 text-align: center; 150 padding-top: 250px; 151 } 93 152 </style> 94 <?php } 95 } else if (isset($uuc_options['background_style']) && $uuc_options['background_style'] == "patterned") { 96 if (!isset($uuc_options['background_styling'])) {?> 153 <?php 154 } 155 } elseif ( isset( $uuc_options['background_style'] ) && 'patterned' == $uuc_options['background_style'] ) { 156 if ( ! isset( $uuc_options['background_styling'] ) ) { 157 ?> 97 158 <style type="text/css"> 98 body { background: url(<?php echo plugin_dir_url(__FILE__) . '/images/oldmaths.png' ?>); } 99 .uuc-holdingpage { text-align: center; padding-top: 250px; } 159 body { 160 background: url(<?php echo esc_html( plugin_dir_url( __FILE__ ) . '/images/oldmaths.png' ); ?>); 161 } 162 163 .uuc-holdingpage { 164 text-align: center; 165 padding-top: 250px; 166 } 100 167 </style> 101 <?php } elseif (isset($uuc_options['background_styling'])) { 102 if ($uuc_options['background_styling'] == "darkbind") {?> 103 <style type="text/css"> 104 body { background: url(<?php echo plugin_dir_url(__FILE__) . 'images/' . $uuc_options['background_styling'].'.png' ?>); } 105 .uuc-holdingpage { text-align: center; color: #909090; padding-top: 250px; } 106 </style> 107 <?php } else { ?> 108 <style type="text/css"> 109 body { background: url(<?php echo plugin_dir_url(__FILE__) . 'images/' . $uuc_options['background_styling'].'.png' ?>); } 110 .uuc-holdingpage { text-align: center; padding-top: 250px; } 111 </style> 112 <?php } 168 <?php 169 } elseif ( isset( $uuc_options['background_styling'] ) ) { 170 if ( 'darkbind' == $uuc_options['background_styling'] ) { 171 ?> 172 <style type="text/css"> 173 body { 174 background: url(<?php echo esc_html( plugin_dir_url( __FILE__ ) . 'images/' . $uuc_options['background_styling'] . '.png' ); ?>); 175 } 176 177 .uuc-holdingpage { 178 text-align: center; 179 color: #909090; 180 padding-top: 250px; 181 } 182 </style> 183 <?php } else { ?> 184 <style type="text/css"> 185 body { 186 background: url(<?php echo esc_html( plugin_dir_url( __FILE__ ) . 'images/' . $uuc_options['background_styling'] . '.png' ); ?>); 187 } 188 189 .uuc-holdingpage { 190 text-align: center; 191 padding-top: 250px; 192 } 193 </style> 194 <?php 195 } 113 196 } 114 197 } … … 116 199 $html .= '<div class="uuc-holdingpage">'; 117 200 $html .= '<h1>' . $uuc_options['website_name'] . '</h1>'; 118 if (isset($uuc_options['holding_message'])) {201 if ( isset( $uuc_options['holding_message'] ) ) { 119 202 $html .= '<h2>' . $uuc_options['holding_message'] . '</h2>'; 120 203 } … … 122 205 $htmlpart = ''; 123 206 124 if ($uuc_options['cdenable'] == true){125 126 if ($uuc_options['cd_style'] == "flipclock"){207 if ( true == $uuc_options['cdenable'] ) { 208 209 if ( 'flipclock' == $uuc_options['cd_style'] ) { 127 210 $html .= '<div class="cddiv"><div class="clock" style="margin:2em;"></div></div>'; 128 } 129 elseif($uuc_options['cd_style'] == "textclock"){ 130 if($cddates > time()){ 131 $htmlpart = '<h3>' . '<script src="' . plugin_dir_url(__FILE__) . 'js/countdown.js" language="JavaScript" type="text/JavaScript"></script>'; 211 } elseif ( 'textclock' == $uuc_options['cd_style'] ) { 212 if ( $cddates > time() ) { 213 $htmlpart = '<h3>' . '<script src="' . plugin_dir_url( __FILE__ ) . 'js/countdown.js" language="JavaScript" type="text/JavaScript"></script>'; 132 214 $htmlpart .= ' ' . $uuc_options['cdtext'] . '</h3>'; 133 } 134 else{ 135 $htmlpart = '<h3>' . '<script src="' . plugin_dir_url(__FILE__) . 'js/countdown.js" language="JavaScript" type="text/JavaScript"></script>'; 215 } else { 216 $htmlpart = '<h3>' . '<script src="' . plugin_dir_url( __FILE__ ) . 'js/countdown.js" language="JavaScript" type="text/JavaScript"></script>'; 136 217 $htmlpart .= '</h3>'; 137 218 } … … 140 221 } 141 222 $html .= '</div>'; 142 echo $html; 223 echo wp_kses( 224 $html, 225 'post' 226 ); 143 227 ?> 144 <?php exit; 228 <?php 229 exit; 145 230 } 146 231 } -
ultimate-under-construction/trunk/includes/js/base.js
r868862 r3065415 5 5 */ 6 6 7 var Base = function () {7 var Base = function () { 8 8 // dummy 9 9 }; 10 10 11 Base.extend = function (_instance, _static) { // subclass12 11 Base.extend = function (_instance, _static) { // subclass 12 13 13 "use strict"; 14 14 15 15 var extend = Base.prototype.extend; 16 16 17 17 // build the prototype 18 18 Base._prototyping = true; 19 19 var proto = new this(); 20 20 extend.call(proto, _instance); 21 proto.base = function() {22 // call this method from any other method to invoke that method's ancestor23 };21 proto.base = function () { 22 // call this method from any other method to invoke that method's ancestor 23 }; 24 24 delete Base._prototyping; 25 25 26 26 // create the wrapper for the constructor function 27 27 //var constructor = proto.constructor.valueOf(); //-dean 28 28 var constructor = proto.constructor; 29 var klass = proto.constructor = function () {29 var klass = proto.constructor = function () { 30 30 if (!Base._prototyping) { 31 31 if (this._constructing || this.constructor == klass) { // instantiation … … 38 38 } 39 39 }; 40 40 41 41 // build the class interface 42 42 klass.ancestor = this; … … 46 46 klass.prototype = proto; 47 47 klass.toString = this.toString; 48 klass.valueOf = function (type) {48 klass.valueOf = function (type) { 49 49 //return (type == "object") ? klass : constructor; //-dean 50 50 return (type == "object") ? klass : constructor.valueOf(); … … 56 56 }; 57 57 58 Base.prototype = { 59 extend: function (source, value) {58 Base.prototype = { 59 extend: function (source, value) { 60 60 if (arguments.length > 1) { // extending with a name/value pair 61 61 var ancestor = this[source]; … … 67 67 var method = value.valueOf(); 68 68 // override 69 value = function () {69 value = function () { 70 70 var previous = this.base || Base.prototype.base; 71 71 this.base = ancestor; … … 75 75 }; 76 76 // point to the underlying method 77 value.valueOf = function (type) {77 value.valueOf = function (type) { 78 78 return (type == "object") ? value : method; 79 79 }; … … 87 87 extend = this.extend || extend; 88 88 } 89 var proto = { toSource: null};89 var proto = { toSource: null }; 90 90 // do the "toString" and other methods manually 91 91 var hidden = ["constructor", "toString", "valueOf"]; … … 109 109 // initialise 110 110 Base = Base.extend({ 111 constructor: function () {111 constructor: function () { 112 112 this.extend(arguments[0]); 113 113 } … … 115 115 ancestor: Object, 116 116 version: "1.1", 117 118 forEach: function (object, block, context) {117 118 forEach: function (object, block, context) { 119 119 for (var key in object) { 120 120 if (this.prototype[key] === undefined) { … … 123 123 } 124 124 }, 125 126 implement: function () {125 126 implement: function () { 127 127 for (var i = 0; i < arguments.length; i++) { 128 128 if (typeof arguments[i] == "function") { … … 136 136 return this; 137 137 }, 138 139 toString: function () {138 139 toString: function () { 140 140 return String(this.valueOf()); 141 141 } -
ultimate-under-construction/trunk/includes/js/countdown.js
r2750860 r3065415 20 20 21 21 function calcage(secs, num1, num2) { 22 s = ((Math.floor(secs/num1))%num2).toString();23 if (LeadingZero && s.length < 2)24 s = "0" + s;25 return "<b>" + s + "</b>";22 s = ((Math.floor(secs / num1)) % num2).toString(); 23 if (LeadingZero && s.length < 2) 24 s = "0" + s; 25 return "<b>" + s + "</b>"; 26 26 } 27 27 28 28 function CountBack(secs) { 29 if (secs < 0) {30 document.getElementById("cntdwn").innerHTML = FinishMessage;31 return;32 }33 DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage(secs,86400,100000));34 DisplayStr = DisplayStr.replace(/%%H%%/g, calcage(secs,3600,24));35 DisplayStr = DisplayStr.replace(/%%M%%/g, calcage(secs,60,60));36 DisplayStr = DisplayStr.replace(/%%S%%/g, calcage(secs,1,60));29 if (secs < 0) { 30 document.getElementById("cntdwn").innerHTML = FinishMessage; 31 return; 32 } 33 DisplayStr = DisplayFormat.replace(/%%D%%/g, calcage(secs, 86400, 100000)); 34 DisplayStr = DisplayStr.replace(/%%H%%/g, calcage(secs, 3600, 24)); 35 DisplayStr = DisplayStr.replace(/%%M%%/g, calcage(secs, 60, 60)); 36 DisplayStr = DisplayStr.replace(/%%S%%/g, calcage(secs, 1, 60)); 37 37 38 document.getElementById("cntdwn").innerHTML = DisplayStr;39 if (CountActive)40 setTimeout("CountBack(" + (secs+CountStepper) + ")", SetTimeOutPeriod);38 document.getElementById("cntdwn").innerHTML = DisplayStr; 39 if (CountActive) 40 setTimeout("CountBack(" + (secs + CountStepper) + ")", SetTimeOutPeriod); 41 41 } 42 42 43 43 function putspan() { 44 document.write("<span id='cntdwn'></span>");44 document.write("<span id='cntdwn'></span>"); 45 45 } 46 46 47 if (typeof (DisplayFormat)=="undefined")48 DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds ";49 if (typeof (CountActive)=="undefined")50 CountActive = true;51 if (typeof (FinishMessage)=="undefined")52 FinishMessage = "";53 if (typeof (CountStepper)!="number")54 CountStepper = -1;55 if (typeof (LeadingZero)=="undefined")56 LeadingZero = true;47 if (typeof (DisplayFormat) == "undefined") 48 DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds "; 49 if (typeof (CountActive) == "undefined") 50 CountActive = true; 51 if (typeof (FinishMessage) == "undefined") 52 FinishMessage = ""; 53 if (typeof (CountStepper) != "number") 54 CountStepper = -1; 55 if (typeof (LeadingZero) == "undefined") 56 LeadingZero = true; 57 57 58 58 59 59 CountStepper = Math.ceil(CountStepper); 60 60 if (CountStepper == 0) 61 CountActive = false;62 var SetTimeOutPeriod = (Math.abs(CountStepper) -1)*1000 + 990;61 CountActive = false; 62 var SetTimeOutPeriod = (Math.abs(CountStepper) - 1) * 1000 + 990; 63 63 putspan(); 64 64 var dthen = new Date(TargetDate); 65 65 var dnow = new Date(); 66 66 var utcdnow = new Date(dnow.getTime() + dnow.getTimezoneOffset() * 60000); 67 if (CountStepper>0)68 ddiff = new Date(utcdnow-dthen);67 if (CountStepper > 0) 68 ddiff = new Date(utcdnow - dthen); 69 69 else 70 ddiff = new Date(dthen-utcdnow);71 gsecs = Math.floor(ddiff.valueOf() /1000);70 ddiff = new Date(dthen - utcdnow); 71 gsecs = Math.floor(ddiff.valueOf() / 1000); 72 72 CountBack(gsecs); -
ultimate-under-construction/trunk/includes/js/dailycounter.js
r868862 r3065415 1 (function ($) {1 (function ($) { 2 2 3 3 /** … … 24 24 */ 25 25 26 constructor: function (factory, options) {26 constructor: function (factory, options) { 27 27 this.base(factory, options); 28 28 }, … … 32 32 */ 33 33 34 build: function (excludeHours, time) {35 var t = this;34 build: function (excludeHours, time) { 35 var t = this; 36 36 var children = this.factory.$wrapper.find('ul'); 37 var lists = [];38 var offset = 0;37 var lists = []; 38 var offset = 0; 39 39 40 time = time ? time : this.factory.time.getDayCounter(this.showSeconds);40 time = time ? time : this.factory.time.getDayCounter(this.showSeconds); 41 41 42 if (time.length > children.length) {43 $.each(time, function (i, digit) {42 if (time.length > children.length) { 43 $.each(time, function (i, digit) { 44 44 lists.push(t.createList(digit)); 45 45 }); … … 48 48 this.factory.lists = lists; 49 49 50 if (this.showSeconds) {50 if (this.showSeconds) { 51 51 $(this.createDivider('Seconds')).insertBefore(this.factory.lists[this.factory.lists.length - 2].$obj); 52 52 } 53 else 54 { 53 else { 55 54 offset = 2; 56 55 } … … 62 61 this._clearExcessDigits(); 63 62 64 if (this.autoStart) {63 if (this.autoStart) { 65 64 this.start(); 66 65 } … … 71 70 */ 72 71 73 flip: function (doNotAddPlayClass, time) {74 if (!time) {72 flip: function (doNotAddPlayClass, time) { 73 if (!time) { 75 74 time = this.factory.time.getDayCounter(this.showSeconds); 76 75 } … … 82 81 */ 83 82 84 _clearExcessDigits: function () {83 _clearExcessDigits: function () { 85 84 var tenSeconds = this.factory.lists[this.factory.lists.length - 2]; 86 85 var tenMinutes = this.factory.lists[this.factory.lists.length - 4]; 87 86 88 for (var x = 6; x < 10; x++) {87 for (var x = 6; x < 10; x++) { 89 88 tenSeconds.$obj.find('li:last-child').remove(); 90 89 tenMinutes.$obj.find('li:last-child').remove(); -
ultimate-under-construction/trunk/includes/js/flipclock.js
r868862 r3065415 2 2 3 3 var FlipClock; 4 4 5 5 /** 6 6 * FlipClock.js … … 10 10 * @licesnse http://www.opensource.org/licenses/mit-license.php 11 11 */ 12 13 (function ($) {14 12 13 (function ($) { 14 15 15 "use strict"; 16 16 17 17 /** 18 18 * FlipFlock Helper … … 22 22 * @param object An object of properties to override the default 23 23 */ 24 25 FlipClock = function (obj, digit, options) {24 25 FlipClock = function (obj, digit, options) { 26 26 return new FlipClock.Factory(obj, digit, options); 27 27 }; … … 32 32 33 33 FlipClock.Lang = {}; 34 34 35 35 /** 36 36 * The Base FlipClock class is used to extend all other FlipFlock … … 42 42 43 43 FlipClock.Base = Base.extend({ 44 44 45 45 /** 46 46 * Build Date 47 47 */ 48 48 49 49 buildDate: '2013-11-07', 50 50 51 51 /** 52 52 * Version 53 53 */ 54 54 55 55 version: '0.3.1', 56 56 57 57 /** 58 58 * Sets the default options … … 61 61 * @param object The override options 62 62 */ 63 64 constructor: function (_default, options) {65 if (typeof _default !== "object") {63 64 constructor: function (_default, options) { 65 if (typeof _default !== "object") { 66 66 _default = {}; 67 67 } 68 if (typeof options !== "object") {68 if (typeof options !== "object") { 69 69 options = {}; 70 70 } 71 71 this.setOptions($.extend(true, {}, _default, options)); 72 72 }, 73 73 74 74 /** 75 75 * Delegates the callback to the defined method … … 78 78 * @param object The override options 79 79 */ 80 81 callback: function (method) {82 if(typeof method === "function") {80 81 callback: function (method) { 82 if (typeof method === "function") { 83 83 var args = []; 84 85 for (var x = 1; x <= arguments.length; x++) {86 if (arguments[x]) {84 85 for (var x = 1; x <= arguments.length; x++) { 86 if (arguments[x]) { 87 87 args.push(arguments[x]); 88 88 } 89 89 } 90 90 91 91 method.apply(this, args); 92 92 } 93 93 }, 94 94 95 95 /** 96 96 * Log a string into the console if it exists … … 98 98 * @param string The name of the option 99 99 * @return mixed 100 */ 101 102 log: function (str) {103 if (window.console && console.log) {100 */ 101 102 log: function (str) { 103 if (window.console && console.log) { 104 104 console.log(str); 105 105 } 106 106 }, 107 107 108 108 /** 109 109 * Get an single option value. Returns false if option does not exist … … 111 111 * @param string The name of the option 112 112 * @return mixed 113 */ 114 115 getOption: function (index) {116 if (this[index]) {113 */ 114 115 getOption: function (index) { 116 if (this[index]) { 117 117 return this[index]; 118 118 } 119 119 return false; 120 120 }, 121 121 122 122 /** 123 123 * Get all options 124 124 * 125 125 * @return bool 126 */ 127 128 getOptions: function () {126 */ 127 128 getOptions: function () { 129 129 return this; 130 130 }, 131 131 132 132 /** 133 133 * Set a single option value … … 135 135 * @param string The name of the option 136 136 * @param mixed The value of the option 137 */ 138 139 setOption: function (index, value) {137 */ 138 139 setOption: function (index, value) { 140 140 this[index] = value; 141 141 }, 142 142 143 143 /** 144 144 * Set a multiple options by passing a JSON object … … 146 146 * @param object The object with the options 147 147 * @param mixed The value of the option 148 */ 149 150 setOptions: function (options) {151 for (var key in options) {152 if(typeof options[key] !== "undefined") {153 this.setOption(key, options[key]);154 }155 }148 */ 149 150 setOptions: function (options) { 151 for (var key in options) { 152 if (typeof options[key] !== "undefined") { 153 this.setOption(key, options[key]); 154 } 155 } 156 156 } 157 157 158 158 }); 159 159 160 160 /** 161 161 * The FlipClock Factory class is used to build the clock and manage … … 163 163 * 164 164 * @param object A jQuery object or CSS selector used to fetch 165 the wrapping DOM nodes165 the wrapping DOM nodes 166 166 * @param mixed This is the digit used to set the clock. If an 167 object is passed, 0 will be used.167 object is passed, 0 will be used. 168 168 * @param object An object of properties to override the default 169 169 */ 170 170 171 171 FlipClock.Factory = FlipClock.Base.extend({ 172 172 173 173 /** 174 174 * Auto start the clock on page load (True|False) 175 */ 176 175 */ 176 177 177 autoStart: true, 178 178 179 179 /** 180 180 * The callback methods 181 */ 182 181 */ 182 183 183 callbacks: { 184 184 destroy: false, … … 190 190 reset: false 191 191 }, 192 192 193 193 /** 194 194 * The CSS classes 195 */ 196 195 */ 196 197 197 classes: { 198 198 active: 'flip-clock-active', … … 205 205 wrapper: 'flip-clock-wrapper' 206 206 }, 207 207 208 208 /** 209 209 * The name of the clock face class in use 210 */ 211 210 */ 211 212 212 clockFace: 'HourlyCounter', 213 213 214 214 /** 215 215 * The name of the default clock face class to use if the defined 216 216 * clockFace variable is not a valid FlipClock.Face object 217 */ 218 217 */ 218 219 219 defaultClockFace: 'HourlyCounter', 220 220 221 221 /** 222 222 * The default language 223 */ 224 223 */ 224 225 225 defaultLanguage: 'english', 226 226 227 227 /** 228 228 * The language being used to display labels (string) 229 */ 230 229 */ 230 231 231 language: 'english', 232 232 233 233 /** 234 234 * The language object after it has been loaded 235 */ 236 235 */ 236 237 237 lang: false, 238 238 239 239 /** 240 240 * The FlipClock.Face object 241 */ 242 241 */ 242 243 243 face: true, 244 244 245 245 /** 246 246 * Is the clock running? (True|False) 247 */ 248 247 */ 248 249 249 running: false, 250 250 251 251 /** 252 252 * The FlipClock.Time object 253 */ 254 253 */ 254 255 255 time: false, 256 256 257 257 /** 258 258 * The FlipClock.Timer object 259 */ 260 259 */ 260 261 261 timer: false, 262 262 263 263 /** 264 264 * An array of FlipClock.List objects 265 */ 266 265 */ 266 267 267 lists: [], 268 268 269 269 /** 270 270 * The wrapping jQuery object 271 */ 272 271 */ 272 273 273 $wrapper: false, 274 274 275 275 /** 276 276 * Constructor … … 280 280 * @param object An object override options 281 281 */ 282 283 constructor: function (obj, digit, options) {284 285 this.lists = [];286 this.running = false;287 this.base(options); 282 283 constructor: function (obj, digit, options) { 284 285 this.lists = []; 286 this.running = false; 287 this.base(options); 288 288 this.$wrapper = $(obj).addClass(this.classes.wrapper); 289 this.time = new FlipClock.Time(this, digit ? Math.round(digit) : 0);290 this.timer = new FlipClock.Timer(this, options);291 292 this.lang = this.loadLanguage(this.language);293 this.face = this.loadClockFace(this.clockFace, options);294 295 if (this.autoStart) {289 this.time = new FlipClock.Time(this, digit ? Math.round(digit) : 0); 290 this.timer = new FlipClock.Timer(this, options); 291 292 this.lang = this.loadLanguage(this.language); 293 this.face = this.loadClockFace(this.clockFace, options); 294 295 if (this.autoStart) { 296 296 this.start(); 297 297 } 298 298 }, 299 299 300 300 /** 301 301 * Load the FlipClock.Face object … … 304 304 * @param object An object override options 305 305 */ 306 307 loadClockFace: function (name, options) {306 307 loadClockFace: function (name, options) { 308 308 var face, suffix = 'Face'; 309 310 name = name.ucfirst() +suffix;311 312 if (FlipClock[name]) {309 310 name = name.ucfirst() + suffix; 311 312 if (FlipClock[name]) { 313 313 face = new FlipClock[name](this, options); 314 314 } 315 315 else { 316 face = new FlipClock[this.defaultClockFace +suffix](this, options);317 } 318 316 face = new FlipClock[this.defaultClockFace + suffix](this, options); 317 } 318 319 319 face.build(); 320 320 321 321 return face; 322 322 }, 323 324 323 324 325 325 /** 326 326 * Load the FlipClock.Lang object … … 328 328 * @param object The name of the language to load 329 329 */ 330 331 loadLanguage: function (name) {330 331 loadLanguage: function (name) { 332 332 var lang; 333 334 if (FlipClock.Lang[name.ucfirst()]) {333 334 if (FlipClock.Lang[name.ucfirst()]) { 335 335 lang = FlipClock.Lang[name.ucfirst()]; 336 336 } 337 else if (FlipClock.Lang[name]) {337 else if (FlipClock.Lang[name]) { 338 338 lang = FlipClock.Lang[name]; 339 339 } … … 341 341 lang = FlipClock.Lang[this.defaultLanguage]; 342 342 } 343 343 344 344 return lang; 345 345 }, 346 346 347 347 /** 348 348 * Localize strings into various languages … … 352 352 */ 353 353 354 localize: function (index, obj) {354 localize: function (index, obj) { 355 355 var lang = this.lang; 356 356 357 if (!index) {357 if (!index) { 358 358 return null; 359 359 } … … 361 361 var lindex = index.toLowerCase(); 362 362 363 if (typeof obj == "object") {363 if (typeof obj == "object") { 364 364 lang = obj; 365 365 } 366 366 367 if (lang && lang[lindex]) {367 if (lang && lang[lindex]) { 368 368 return lang[lindex]; 369 369 } … … 371 371 return index; 372 372 }, 373 373 374 374 375 375 /** 376 376 * Starts the clock 377 377 */ 378 379 start: function (callback) {378 379 start: function (callback) { 380 380 var t = this; 381 381 382 if (!t.running && (!t.countdown || t.countdown && t.time.time > 0)) {382 if (!t.running && (!t.countdown || t.countdown && t.time.time > 0)) { 383 383 t.face.start(t.time); 384 t.timer.start(function () {384 t.timer.start(function () { 385 385 t.flip(); 386 387 if (typeof callback === "function") {386 387 if (typeof callback === "function") { 388 388 callback(); 389 } 389 } 390 390 }); 391 391 } … … 394 394 } 395 395 }, 396 396 397 397 /** 398 398 * Stops the clock 399 399 */ 400 401 stop: function (callback) {400 401 stop: function (callback) { 402 402 this.face.stop(); 403 403 this.timer.stop(callback); 404 405 for (var x in this.lists) {404 405 for (var x in this.lists) { 406 406 this.lists[x].stop(); 407 } 408 }, 409 407 } 408 }, 409 410 410 /** 411 411 * Reset the clock 412 412 */ 413 414 reset: function (callback) {413 414 reset: function (callback) { 415 415 this.timer.reset(callback); 416 416 this.face.reset(); 417 417 }, 418 418 419 419 /** 420 420 * Sets the clock time 421 421 */ 422 423 setTime: function (time) {422 423 setTime: function (time) { 424 424 this.time.time = time; 425 this.face.setTime(time); 426 }, 427 425 this.face.setTime(time); 426 }, 427 428 428 /** 429 429 * Get the clock time … … 431 431 * @return object Returns a FlipClock.Time object 432 432 */ 433 434 getTime: function (time) {435 return this.time; 436 }, 437 433 434 getTime: function (time) { 435 return this.time; 436 }, 437 438 438 /** 439 439 * Changes the increment of time to up or down (add/sub) 440 440 */ 441 442 setCountdown: function (value) {441 442 setCountdown: function (value) { 443 443 var running = this.running; 444 444 445 445 this.countdown = value ? true : false; 446 447 if (running) {446 447 if (running) { 448 448 this.stop(); 449 449 this.start(); 450 450 } 451 451 }, 452 452 453 453 /** 454 454 * Flip the digits on the clock … … 456 456 * @param array An array of digits 457 457 */ 458 flip: function () {458 flip: function () { 459 459 this.face.flip(); 460 460 } 461 461 462 462 }); 463 463 464 464 /** 465 465 * The FlipClock Face class is the base class in which to extend … … 469 469 * @param object An object of properties to override the default 470 470 */ 471 471 472 472 FlipClock.Face = FlipClock.Base.extend({ 473 473 474 474 /** 475 475 * An array of jQuery objects used for the dividers (the colons) 476 476 */ 477 477 478 478 dividers: [], 479 479 480 480 /** 481 481 * An array of FlipClock.List objects 482 */ 483 482 */ 483 484 484 factory: false, 485 485 486 486 /** 487 487 * An array of FlipClock.List objects 488 */ 489 488 */ 489 490 490 lists: [], 491 491 492 492 /** 493 493 * Constructor … … 496 496 * @param object An object of properties to override the default 497 497 */ 498 499 constructor: function (factory, options) {498 499 constructor: function (factory, options) { 500 500 this.base(options); 501 this.factory = factory;501 this.factory = factory; 502 502 this.dividers = []; 503 503 }, 504 504 505 505 /** 506 506 * Build the clock face 507 507 */ 508 509 build: function () {},510 508 509 build: function () { }, 510 511 511 /** 512 512 * Creates a jQuery object used for the digit divider … … 516 516 * If not set, is false. 517 517 */ 518 519 createDivider: function (label, css, excludeDots) {520 521 if (typeof css == "boolean" || !css) {518 519 createDivider: function (label, css, excludeDots) { 520 521 if (typeof css == "boolean" || !css) { 522 522 excludeDots = css; 523 523 css = label; … … 525 525 526 526 var dots = [ 527 '<span class="' +this.factory.classes.dot+' top"></span>',528 '<span class="' +this.factory.classes.dot+' bottom"></span>'527 '<span class="' + this.factory.classes.dot + ' top"></span>', 528 '<span class="' + this.factory.classes.dot + ' bottom"></span>' 529 529 ].join(''); 530 530 531 if (excludeDots) {532 dots = ''; 531 if (excludeDots) { 532 dots = ''; 533 533 } 534 534 … … 536 536 537 537 var html = [ 538 '<span class="' +this.factory.classes.divider+' '+(css ? css : '').toLowerCase()+'">',539 '<span class="'+this.factory.classes.label+'">'+(label ? label : '')+'</span>',540 dots,538 '<span class="' + this.factory.classes.divider + ' ' + (css ? css : '').toLowerCase() + '">', 539 '<span class="' + this.factory.classes.label + '">' + (label ? label : '') + '</span>', 540 dots, 541 541 '</span>' 542 ]; 543 542 ]; 543 544 544 return $(html.join('')); 545 545 }, 546 546 547 547 /** 548 548 * Creates a FlipClock.List object and appends it to the DOM … … 551 551 * @param object An object to override the default properties 552 552 */ 553 554 createList: function (digit, options) {555 if (typeof digit === "object") {553 554 createList: function (digit, options) { 555 if (typeof digit === "object") { 556 556 options = digit; 557 557 digit = 0; 558 558 } 559 559 560 560 var obj = new FlipClock.List(this.factory, digit, options); 561 561 562 562 //this.factory.$wrapper.append(obj.$obj); 563 563 564 564 return obj; 565 565 }, 566 566 567 567 /** 568 568 * Triggers when the clock is reset 569 569 */ 570 571 reset: function () {},572 570 571 reset: function () { }, 572 573 573 /** 574 574 * Sets the clock time 575 575 */ 576 577 setTime: function (time) {578 this.flip(time); 579 }, 580 576 577 setTime: function (time) { 578 this.flip(time); 579 }, 580 581 581 /** 582 582 * Sets the clock time 583 583 */ 584 585 addDigit: function (digit) {584 585 addDigit: function (digit) { 586 586 var obj = this.createList(digit, { 587 587 classes: { … … 591 591 } 592 592 }); 593 593 594 594 obj.$obj.insertBefore(this.factory.lists[0].$obj); 595 595 596 596 this.factory.lists.unshift(obj); 597 597 }, 598 598 599 599 /** 600 600 * Triggers when the clock is started 601 601 */ 602 603 start: function () {},604 602 603 start: function () { }, 604 605 605 /** 606 606 * Triggers when the time on the clock stops 607 607 */ 608 609 stop: function () {},610 608 609 stop: function () { }, 610 611 611 /** 612 612 * Triggers when the numbers on the clock flip 613 613 */ 614 615 flip: function (time, doNotAddPlayClass) {614 615 flip: function (time, doNotAddPlayClass) { 616 616 var t = this; 617 618 if (!doNotAddPlayClass) {619 if (!t.factory.countdown) {617 618 if (!doNotAddPlayClass) { 619 if (!t.factory.countdown) { 620 620 t.factory.time.time++; 621 621 } 622 622 else { 623 if (t.factory.time.time <= 0) {623 if (t.factory.time.time <= 0) { 624 624 t.factory.stop(); 625 625 } 626 627 t.factory.time.time--; 628 } 629 } 630 626 627 t.factory.time.time--; 628 } 629 } 630 631 631 var offset = t.factory.lists.length - time.length; 632 633 if (offset < 0) {632 633 if (offset < 0) { 634 634 offset = 0; 635 } 636 635 } 636 637 637 var totalNew = 0; 638 638 var reFlip = false; 639 639 640 $.each(time, function (i, digit) {640 $.each(time, function (i, digit) { 641 641 i += offset; 642 642 643 643 var list = t.factory.lists[i]; 644 645 if (list) {644 645 if (list) { 646 646 var currentDigit = list.digit; 647 647 648 648 list.select(digit); 649 650 if (digit != currentDigit && !doNotAddPlayClass) {651 list.play(); 649 650 if (digit != currentDigit && !doNotAddPlayClass) { 651 list.play(); 652 652 } 653 } 653 } 654 654 else { 655 655 t.addDigit(digit); … … 658 658 }); 659 659 660 for (var x = 0; x < time.length; x++) {661 if (x >= offset && t.factory.lists[x].digit != time[x]) {660 for (var x = 0; x < time.length; x++) { 661 if (x >= offset && t.factory.lists[x].digit != time[x]) { 662 662 t.factory.lists[x].select(time[x]); 663 663 } 664 664 } 665 665 } 666 666 667 667 }); 668 668 669 669 /** 670 670 * The FlipClock List class is used to build the list used to create … … 677 677 * @param object An object of properties to override the default 678 678 */ 679 679 680 680 FlipClock.List = FlipClock.Base.extend({ 681 681 682 682 /** 683 683 * The digit (0-9) 684 */ 685 684 */ 685 686 686 digit: 0, 687 687 688 688 /** 689 689 * The CSS classes 690 */ 691 690 */ 691 692 692 classes: { 693 693 active: 'flip-clock-active', 694 694 before: 'flip-clock-before', 695 flip: 'flip' 696 }, 697 695 flip: 'flip' 696 }, 697 698 698 /** 699 699 * The parent FlipClock.Factory object 700 */ 701 700 */ 701 702 702 factory: false, 703 703 704 704 /** 705 705 * The wrapping jQuery object 706 */ 707 706 */ 707 708 708 $obj: false, 709 709 710 710 /** 711 711 * The items in the list 712 */ 713 712 */ 713 714 714 items: [], 715 715 716 716 /** 717 717 * Constructor … … 721 721 * @param object An object to override the default properties 722 722 */ 723 724 constructor: function (factory, digit, options) {723 724 constructor: function (factory, digit, options) { 725 725 this.factory = factory; 726 this.digit = digit;727 this.$obj = this.createList();728 729 if (digit > 0) {726 this.digit = digit; 727 this.$obj = this.createList(); 728 729 if (digit > 0) { 730 730 this.select(digit); 731 731 } 732 732 733 733 this.factory.$wrapper.append(this.$obj); 734 734 }, 735 735 736 736 /** 737 737 * Select the digit in the list … … 739 739 * @param int A digit 0-9 740 740 */ 741 742 select: function (digit) {743 if (typeof digit === "undefined") {741 742 select: function (digit) { 743 if (typeof digit === "undefined") { 744 744 digit = this.digit; 745 745 } … … 748 748 } 749 749 750 var target = this.$obj.find('[data-digit="' +digit+'"]');751 var active = this.$obj.find('.' +this.classes.active).removeClass(this.classes.active);752 var before = this.$obj.find('.' +this.classes.before).removeClass(this.classes.before);753 754 if (!this.factory.countdown) {755 if (target.is(':first-child')) {750 var target = this.$obj.find('[data-digit="' + digit + '"]'); 751 var active = this.$obj.find('.' + this.classes.active).removeClass(this.classes.active); 752 var before = this.$obj.find('.' + this.classes.before).removeClass(this.classes.before); 753 754 if (!this.factory.countdown) { 755 if (target.is(':first-child')) { 756 756 this.$obj.find(':last-child').addClass(this.classes.before); 757 757 } … … 761 761 } 762 762 else { 763 if (target.is(':last-child')) {763 if (target.is(':last-child')) { 764 764 this.$obj.find(':first-child').addClass(this.classes.before); 765 765 } … … 768 768 } 769 769 } 770 771 target.addClass(this.classes.active); 772 }, 773 770 771 target.addClass(this.classes.active); 772 }, 773 774 774 /** 775 775 * Adds the play class to the DOM object 776 776 */ 777 778 play: function () {777 778 play: function () { 779 779 this.$obj.addClass(this.factory.classes.play); 780 780 }, 781 781 782 782 /** 783 783 * Removes the play class to the DOM object 784 784 */ 785 786 stop: function () {785 786 stop: function () { 787 787 var t = this; 788 789 setTimeout(function () {788 789 setTimeout(function () { 790 790 t.$obj.removeClass(t.factory.classes.play); 791 791 }, this.factory.timer.interval); 792 792 }, 793 793 794 794 /** 795 795 * Create the list of digits and appends it to the DOM object 796 796 */ 797 798 createList: function () {799 800 var html = $('<ul class="' +this.classes.flip+' '+(this.factory.running ? this.factory.classes.play : '')+'" />');801 802 for (var x = 0; x < 10; x++) {797 798 createList: function () { 799 800 var html = $('<ul class="' + this.classes.flip + ' ' + (this.factory.running ? this.factory.classes.play : '') + '" />'); 801 802 for (var x = 0; x < 10; x++) { 803 803 var item = $([ 804 '<li data-digit="'+x+'">',804 '<li data-digit="' + x + '">', 805 805 '<a href="#">', 806 '<div class="up">',807 '<div class="shadow"></div>',808 '<div class="inn">'+x+'</div>',809 '</div>',810 '<div class="down">',811 '<div class="shadow"></div>',812 '<div class="inn">'+x+'</div>',813 '</div>',806 '<div class="up">', 807 '<div class="shadow"></div>', 808 '<div class="inn">' + x + '</div>', 809 '</div>', 810 '<div class="down">', 811 '<div class="shadow"></div>', 812 '<div class="inn">' + x + '</div>', 813 '</div>', 814 814 '</a>', 815 '</li>'].join(''));816 815 '</li>'].join('')); 816 817 817 this.items.push(item); 818 818 819 819 html.append(item); 820 820 } 821 821 822 822 return html; 823 823 } 824 824 }); 825 825 826 826 /** 827 827 * The FlipClock Time class is used to manage all the time … … 833 833 * @param object An object of properties to override the default 834 834 */ 835 835 836 836 FlipClock.Time = FlipClock.Base.extend({ 837 837 838 838 /** 839 839 * The time (in seconds) 840 */ 841 840 */ 841 842 842 minimumDigits: 0, 843 843 844 844 /** 845 845 * The time (in seconds) 846 */ 847 846 */ 847 848 848 time: 0, 849 849 850 850 /** 851 851 * The parent FlipClock.Factory object 852 */ 853 852 */ 853 854 854 factory: false, 855 855 856 856 /** 857 857 * Constructor … … 861 861 * @param object An object to override the default properties 862 862 */ 863 864 constructor: function (factory, time, options) {863 864 constructor: function (factory, time, options) { 865 865 this.base(options); 866 866 this.factory = factory; 867 867 868 if (time) {868 if (time) { 869 869 this.time = time; 870 870 } 871 871 }, 872 872 873 873 /** 874 874 * Convert a string or integer to an array of digits … … 877 877 * @return array An array of digits 878 878 */ 879 880 convertDigitsToArray: function (str) {879 880 convertDigitsToArray: function (str) { 881 881 var data = []; 882 882 883 883 str = str.toString(); 884 885 for (var x = 0;x < str.length; x++) {886 if (str[x].match(/^\d*$/g)) {887 data.push(str[x]); 888 } 889 } 890 884 885 for (var x = 0; x < str.length; x++) { 886 if (str[x].match(/^\d*$/g)) { 887 data.push(str[x]); 888 } 889 } 890 891 891 return data; 892 892 }, 893 893 894 894 /** 895 895 * Get a specific digit from the time integer … … 899 899 * the method returns the defined digit 900 900 */ 901 902 digit: function (i) {901 902 digit: function (i) { 903 903 var timeStr = this.toString(); 904 var length = timeStr.length;905 906 if (timeStr[length - i]){904 var length = timeStr.length; 905 906 if (timeStr[length - i]) { 907 907 return timeStr[length - i]; 908 908 } 909 909 910 910 return false; 911 911 }, … … 917 917 * @return array An array of digits 918 918 */ 919 920 digitize: function (obj) {919 920 digitize: function (obj) { 921 921 var data = []; 922 923 $.each(obj, function (i, value) {922 923 $.each(obj, function (i, value) { 924 924 value = value.toString(); 925 926 if (value.length == 1) {927 value = '0' +value;928 } 929 930 for (var x = 0; x < value.length; x++) {925 926 if (value.length == 1) { 927 value = '0' + value; 928 } 929 930 for (var x = 0; x < value.length; x++) { 931 931 data.push(value.charAt(x)); 932 } 932 } 933 933 }); 934 935 if (data.length > this.minimumDigits) {934 935 if (data.length > this.minimumDigits) { 936 936 this.minimumDigits = data.length; 937 937 } 938 939 if (this.minimumDigits > data.length) {938 939 if (this.minimumDigits > data.length) { 940 940 data.unshift('0'); 941 941 } 942 942 943 943 return data; 944 944 }, 945 945 946 946 /** 947 947 * Gets a daily breakdown … … 950 950 */ 951 951 952 getDayCounter: function (includeSeconds) {952 getDayCounter: function (includeSeconds) { 953 953 var digits = [ 954 954 this.getDays(), … … 957 957 ]; 958 958 959 if (includeSeconds) {959 if (includeSeconds) { 960 960 digits.push(this.getSeconds(true)); 961 961 } … … 970 970 * @return int Retuns a floored integer 971 971 */ 972 973 getDays: function (mod) {972 973 getDays: function (mod) { 974 974 var days = this.time / 60 / 60 / 24; 975 976 if (mod) {975 976 if (mod) { 977 977 days = days % 7; 978 978 } 979 979 980 980 return Math.floor(days); 981 981 }, 982 982 983 983 /** 984 984 * Gets an hourly breakdown … … 986 986 * @return object Returns a digitized object 987 987 */ 988 989 getHourCounter: function () {988 989 getHourCounter: function () { 990 990 var obj = this.digitize([ 991 991 this.getHours(), … … 993 993 this.getSeconds(true) 994 994 ]); 995 995 996 996 return obj; 997 997 }, 998 998 999 999 /** 1000 1000 * Gets an hourly breakdown … … 1002 1002 * @return object Returns a digitized object 1003 1003 */ 1004 1005 getHourly: function () {1004 1005 getHourly: function () { 1006 1006 return this.getHourCounter(); 1007 1007 }, 1008 1008 1009 1009 /** 1010 1010 * Gets number of hours … … 1013 1013 * @return int Retuns a floored integer 1014 1014 */ 1015 1016 getHours: function (mod) {1015 1016 getHours: function (mod) { 1017 1017 var hours = this.time / 60 / 60; 1018 1019 if (mod) {1020 hours = hours % 24; 1021 } 1022 1018 1019 if (mod) { 1020 hours = hours % 24; 1021 } 1022 1023 1023 return Math.floor(hours); 1024 1024 }, 1025 1025 1026 1026 /** 1027 1027 * Gets the twenty-four hour time … … 1029 1029 * @return object returns a digitized object 1030 1030 */ 1031 1032 getMilitaryTime: function () {1033 var date = new Date(); 1034 var obj = this.digitize([1031 1032 getMilitaryTime: function () { 1033 var date = new Date(); 1034 var obj = this.digitize([ 1035 1035 date.getHours(), 1036 1036 date.getMinutes(), 1037 date.getSeconds() 1037 date.getSeconds() 1038 1038 ]); 1039 1039 1040 1040 return obj; 1041 1041 }, 1042 1042 1043 1043 /** 1044 1044 * Gets number of minutes … … 1047 1047 * @return int Retuns a floored integer 1048 1048 */ 1049 1050 getMinutes: function (mod) {1049 1050 getMinutes: function (mod) { 1051 1051 var minutes = this.time / 60; 1052 1053 if (mod) {1052 1053 if (mod) { 1054 1054 minutes = minutes % 60; 1055 1055 } 1056 1056 1057 1057 return Math.floor(minutes); 1058 1058 }, 1059 1059 1060 1060 /** 1061 1061 * Gets a minute breakdown 1062 1062 */ 1063 1064 getMinuteCounter: function () {1063 1064 getMinuteCounter: function () { 1065 1065 var obj = this.digitize([ 1066 1066 this.getMinutes(), … … 1070 1070 return obj; 1071 1071 }, 1072 1072 1073 1073 /** 1074 1074 * Gets number of seconds … … 1077 1077 * @return int Retuns a ceiled integer 1078 1078 */ 1079 1080 getSeconds: function (mod) {1079 1080 getSeconds: function (mod) { 1081 1081 var seconds = this.time; 1082 1083 if (mod) {1084 if (seconds == 60) {1082 1083 if (mod) { 1084 if (seconds == 60) { 1085 1085 seconds = 0; 1086 1086 } … … 1089 1089 } 1090 1090 } 1091 1091 1092 1092 return Math.ceil(seconds); 1093 1093 }, 1094 1094 1095 1095 /** 1096 1096 * Gets the current twelve hour time … … 1098 1098 * @return object Returns a digitized object 1099 1099 */ 1100 1101 getTime: function () {1102 var date = new Date();1100 1101 getTime: function () { 1102 var date = new Date(); 1103 1103 var hours = date.getHours(); 1104 1104 var merid = hours > 12 ? 'PM' : 'AM'; 1105 var obj = this.digitize([1105 var obj = this.digitize([ 1106 1106 hours > 12 ? hours - 12 : (hours === 0 ? 12 : hours), 1107 1107 date.getMinutes(), 1108 date.getSeconds() 1108 date.getSeconds() 1109 1109 ]); 1110 1110 1111 1111 return obj; 1112 1112 }, 1113 1113 1114 1114 /** 1115 1115 * Gets number of weeks … … 1118 1118 * @return int Retuns a floored integer 1119 1119 */ 1120 1121 getWeeks: function () {1120 1121 getWeeks: function () { 1122 1122 var weeks = this.time / 60 / 60 / 24 / 7; 1123 1124 if (mod) {1123 1124 if (mod) { 1125 1125 weeks = weeks % 52; 1126 1126 } 1127 1127 1128 1128 return Math.floor(weeks); 1129 1129 }, 1130 1130 1131 1131 /** 1132 1132 * Removes a specific number of leading zeros from the array. … … 1137 1137 * @return array An array of digits 1138 1138 */ 1139 1140 removeLeadingZeros: function (totalDigits, digits) {1141 var total = 0;1139 1140 removeLeadingZeros: function (totalDigits, digits) { 1141 var total = 0; 1142 1142 var newArray = []; 1143 1144 $.each(digits, function (i, digit) {1145 if (i < totalDigits) {1143 1144 $.each(digits, function (i, digit) { 1145 if (i < totalDigits) { 1146 1146 total += parseInt(digits[i], 10); 1147 1147 } … … 1150 1150 } 1151 1151 }); 1152 1153 if (total === 0) {1152 1153 if (total === 0) { 1154 1154 return newArray; 1155 1155 } 1156 1156 1157 1157 return digits; 1158 1158 }, 1159 1159 1160 1160 /** 1161 1161 * Converts the object to a human readable string 1162 1162 */ 1163 1164 toString: function () {1163 1164 toString: function () { 1165 1165 return this.time.toString(); 1166 1166 } 1167 1167 1168 1168 /* 1169 1169 getYears: function() { … … 1175 1175 }*/ 1176 1176 }); 1177 1177 1178 1178 /** 1179 1179 * The FlipClock.Timer object managers the JS timers … … 1182 1182 * @param object Override the default options 1183 1183 */ 1184 1184 1185 1185 FlipClock.Timer = FlipClock.Base.extend({ 1186 1186 1187 1187 /** 1188 1188 * Callbacks 1189 */ 1190 1189 */ 1190 1191 1191 callbacks: { 1192 1192 destroy: false, … … 1198 1198 reset: false 1199 1199 }, 1200 1200 1201 1201 /** 1202 1202 * FlipClock timer count (how many intervals have passed) 1203 */ 1204 1203 */ 1204 1205 1205 count: 0, 1206 1206 1207 1207 /** 1208 1208 * The parent FlipClock.Factory object 1209 */ 1210 1209 */ 1210 1211 1211 factory: false, 1212 1212 1213 1213 /** 1214 1214 * Timer interval (1 second by default) 1215 */ 1216 1215 */ 1216 1217 1217 interval: 1000, 1218 1218 1219 1219 /** 1220 1220 * Constructor 1221 1221 * 1222 1222 * @return void 1223 */ 1224 1225 constructor: function (factory, options) {1223 */ 1224 1225 constructor: function (factory, options) { 1226 1226 this.base(options); 1227 1227 this.factory = factory; 1228 this.callback(this.callbacks.init); 1228 this.callback(this.callbacks.init); 1229 1229 this.callback(this.callbacks.create); 1230 1230 }, 1231 1231 1232 1232 /** 1233 1233 * This method gets the elapsed the time as an interger 1234 1234 * 1235 1235 * @return void 1236 */ 1237 1238 getElapsed: function () {1236 */ 1237 1238 getElapsed: function () { 1239 1239 return this.count * this.interval; 1240 1240 }, 1241 1241 1242 1242 /** 1243 1243 * This method gets the elapsed the time as a Date object 1244 1244 * 1245 1245 * @return void 1246 */ 1247 1248 getElapsedTime: function () {1246 */ 1247 1248 getElapsedTime: function () { 1249 1249 return new Date(this.time + this.getElapsed()); 1250 1250 }, 1251 1251 1252 1252 /** 1253 1253 * This method is resets the timer … … 1255 1255 * @param callback This method resets the timer back to 0 1256 1256 * @return void 1257 */ 1258 1259 reset: function (callback) {1257 */ 1258 1259 reset: function (callback) { 1260 1260 clearInterval(this.timer); 1261 1261 this.count = 0; 1262 this._setInterval(callback); 1262 this._setInterval(callback); 1263 1263 this.callback(this.callbacks.reset); 1264 1264 }, 1265 1265 1266 1266 /** 1267 1267 * This method is starts the timer … … 1269 1269 * @param callback A function that is called once the timer is destroyed 1270 1270 * @return void 1271 */ 1272 1273 start: function (callback) {1271 */ 1272 1273 start: function (callback) { 1274 1274 this.factory.running = true; 1275 1275 this._createTimer(callback); 1276 1276 this.callback(this.callbacks.start); 1277 1277 }, 1278 1278 1279 1279 /** 1280 1280 * This method is stops the timer … … 1282 1282 * @param callback A function that is called once the timer is destroyed 1283 1283 * @return void 1284 */ 1285 1286 stop: function (callback) {1284 */ 1285 1286 stop: function (callback) { 1287 1287 this.factory.running = false; 1288 1288 this._clearInterval(callback); … … 1290 1290 this.callback(callback); 1291 1291 }, 1292 1292 1293 1293 /** 1294 1294 * Clear the timer interval 1295 1295 * 1296 1296 * @return void 1297 */ 1298 1299 _clearInterval: function () {1297 */ 1298 1299 _clearInterval: function () { 1300 1300 clearInterval(this.timer); 1301 1301 }, 1302 1302 1303 1303 /** 1304 1304 * Create the timer object … … 1306 1306 * @param callback A function that is called once the timer is created 1307 1307 * @return void 1308 */ 1309 1310 _createTimer: function (callback) {1311 this._setInterval(callback); 1312 }, 1313 1308 */ 1309 1310 _createTimer: function (callback) { 1311 this._setInterval(callback); 1312 }, 1313 1314 1314 /** 1315 1315 * Destroy the timer object … … 1317 1317 * @param callback A function that is called once the timer is destroyed 1318 1318 * @return void 1319 */ 1320 1321 _destroyTimer: function (callback) {1322 this._clearInterval(); 1319 */ 1320 1321 _destroyTimer: function (callback) { 1322 this._clearInterval(); 1323 1323 this.timer = false; 1324 1324 this.callback(callback); 1325 1325 this.callback(this.callbacks.destroy); 1326 1326 }, 1327 1327 1328 1328 /** 1329 1329 * This method is called each time the timer interval is ran … … 1331 1331 * @param callback A function that is called once the timer is destroyed 1332 1332 * @return void 1333 */ 1334 1335 _interval: function (callback) {1333 */ 1334 1335 _interval: function (callback) { 1336 1336 this.callback(this.callbacks.interval); 1337 1337 this.callback(callback); 1338 1338 this.count++; 1339 1339 }, 1340 1340 1341 1341 /** 1342 1342 * This sets the timer interval … … 1344 1344 * @param callback A function that is called once the timer is destroyed 1345 1345 * @return void 1346 */ 1347 1348 _setInterval: function (callback) {1346 */ 1347 1348 _setInterval: function (callback) { 1349 1349 var t = this; 1350 1351 t.timer = setInterval(function () {1350 1351 t.timer = setInterval(function () { 1352 1352 t._interval(callback); 1353 1353 }, this.interval); 1354 1354 } 1355 1355 1356 1356 }); 1357 1357 1358 1358 /** 1359 1359 * Capitalize the first letter in a string … … 1361 1361 * @return string 1362 1362 */ 1363 1364 String.prototype.ucfirst = function () {1363 1364 String.prototype.ucfirst = function () { 1365 1365 return this.substr(0, 1).toUpperCase() + this.substr(1); 1366 1366 }; 1367 1367 1368 1368 /** 1369 1369 * jQuery helper method … … 1372 1372 * @param object An object of properties to override the default 1373 1373 */ 1374 1375 $.fn.FlipClock = function (digit, options) {1376 if (typeof digit == "object") {1374 1375 $.fn.FlipClock = function (digit, options) { 1376 if (typeof digit == "object") { 1377 1377 options = digit; 1378 1378 digit = 0; 1379 } 1379 } 1380 1380 return new FlipClock($(this), digit, options); 1381 1381 }; 1382 1382 1383 1383 /** 1384 1384 * jQuery helper method … … 1387 1387 * @param object An object of properties to override the default 1388 1388 */ 1389 1390 $.fn.flipClock = function (digit, options) {1389 1390 $.fn.flipClock = function (digit, options) { 1391 1391 return $.fn.FlipClock(digit, options); 1392 1392 }; 1393 1393 1394 1394 }(jQuery)); -
ultimate-under-construction/trunk/includes/js/uuc-script-farb.js
r2750860 r3065415 1 jQuery(document).ready(function ($) {2 $('#colorpicker').hide();3 $('#colorpicker').farbtastic('#color');1 jQuery(document).ready(function ($) { 2 $('#colorpicker').hide(); 3 $('#colorpicker').farbtastic('#color'); 4 4 5 $('#color').click(function() {6 $('#colorpicker').fadeIn();7 });5 $('#color').click(function () { 6 $('#colorpicker').fadeIn(); 7 }); 8 8 9 $(document).mousedown(function() {10 $('#colorpicker').each(function() {11 var display = $(this).css('display');12 if ( display == 'block')13 $(this).fadeOut();14 });15 });9 $(document).mousedown(function () { 10 $('#colorpicker').each(function () { 11 var display = $(this).css('display'); 12 if (display == 'block') 13 $(this).fadeOut(); 14 }); 15 }); 16 16 }); -
ultimate-under-construction/trunk/includes/js/uuc-script.js
r2750860 r3065415 1 1 (function ($) { 2 "use strict";2 "use strict"; 3 3 4 var default_color = 'bfbfbf';4 var default_color = 'bfbfbf'; 5 5 6 function pickColor(color) {7 $('#background-color').val(color);8 }9 function toggle_text() {10 var background_color = $('#background-color');11 if(background_color.val() == undefined || '' === background_color.val().replace('#', '')) {12 background_color.val(default_color);13 pickColor(default_color);14 } else {15 pickColor(background_color.val());16 }17 }6 function pickColor(color) { 7 $('#background-color').val(color); 8 } 9 function toggle_text() { 10 var background_color = $('#background-color'); 11 if (background_color.val() == undefined || '' === background_color.val().replace('#', '')) { 12 background_color.val(default_color); 13 pickColor(default_color); 14 } else { 15 pickColor(background_color.val()); 16 } 17 } 18 18 19 $(document).ready(function () {20 var background_color = $('#background-color');21 background_color.wpColorPicker({22 change: function (event, ui) {23 pickColor(background_color.wpColorPicker('color'));24 },25 clear: function () {26 pickColor('');27 }28 });29 $('#background-color').click(toggle_text);19 $(document).ready(function () { 20 var background_color = $('#background-color'); 21 background_color.wpColorPicker({ 22 change: function (event, ui) { 23 pickColor(background_color.wpColorPicker('color')); 24 }, 25 clear: function () { 26 pickColor(''); 27 } 28 }); 29 $('#background-color').click(toggle_text); 30 30 31 toggle_text();31 toggle_text(); 32 32 33 });33 }); 34 34 35 35 }(jQuery)); -
ultimate-under-construction/trunk/includes/js/uuc-upload.js
r2750860 r3065415 1 jQuery(document).ready(function ($){2 var _custom_media = true,3 _orig_send_attachment = wp.media.editor.send.attachment;1 jQuery(document).ready(function ($) { 2 var _custom_media = true, 3 _orig_send_attachment = wp.media.editor.send.attachment; 4 4 5 $('.stag-metabox-table .button').click(function(e) {6 var send_attachment_bkp = wp.media.editor.send.attachment;7 var button = $(this);8 var id = button.attr('id').replace('_button', '');9 _custom_media = true;10 wp.media.editor.send.attachment = function(props, attachment){11 if ( _custom_media) {12 $("#"+id).val(attachment.url);13 } else {14 return _orig_send_attachment.apply( this, [props, attachment]);15 };16 }5 $('.stag-metabox-table .button').click(function (e) { 6 var send_attachment_bkp = wp.media.editor.send.attachment; 7 var button = $(this); 8 var id = button.attr('id').replace('_button', ''); 9 _custom_media = true; 10 wp.media.editor.send.attachment = function (props, attachment) { 11 if (_custom_media) { 12 $("#" + id).val(attachment.url); 13 } else { 14 return _orig_send_attachment.apply(this, [props, attachment]); 15 }; 16 } 17 17 18 wp.media.editor.open(button);19 return false;20 });18 wp.media.editor.open(button); 19 return false; 20 }); 21 21 22 $('.add_media').on('click', function(){23 _custom_media = false;24 });22 $('.add_media').on('click', function () { 23 _custom_media = false; 24 }); 25 25 }); -
ultimate-under-construction/trunk/includes/scripts.php
r2750860 r3065415 1 <?php 1 <?php 2 /** 3 * Scripts File 4 * 5 * Loads the scripts required for UUC 6 * 7 * @package Ultimate Under Construction 8 */ 2 9 3 /***************************4 * script control5 ***************************/6 10 global $wp_version; 7 11 8 // All Actions to be added.9 add_action( 'init', 'uuc_load_scripts');12 // All Actions to be added. 13 add_action( 'init', 'uuc_load_scripts' ); 10 14 11 15 if ( is_admin() ) { 12 if ( $wp_version >= 3.5 ) {13 add_action( 'init', 'uuc_admin_enqueue_scripts_cp' );14 } else {15 add_action( 'init', 'uuc_admin_enqueue_scripts_farb' );16 }16 if ( $wp_version >= 3.5 ) { 17 add_action( 'init', 'uuc_admin_enqueue_scripts_cp' ); 18 } else { 19 add_action( 'init', 'uuc_admin_enqueue_scripts_farb' ); 20 } 17 21 } 18 22 19 // All functions mentioned above to be added below here only!23 // All functions mentioned above to be added below here only! 20 24 25 /** 26 * Load Scripts 27 */ 21 28 function uuc_load_scripts() { 22 wp_enqueue_style( 'uuc-styles', plugin_dir_url(__FILE__) . 'css/plugin_styles.css');29 wp_enqueue_style( 'uuc-styles', plugin_dir_url( __FILE__ ) . 'css/plugin_styles.css', array(), UUC_VERSION ); 23 30 } 24 31 32 /** 33 * Enqueue the Colour Picker Scripts 34 */ 25 35 function uuc_admin_enqueue_scripts_cp() { 26 wp_enqueue_script( 'wp-color-picker' ); 27 wp_enqueue_script( 'uuc-custom', plugin_dir_url(__FILE__) . 'js/uuc-script.js', array( 'jquery', 'wp-color-picker' ), '1.1', true ); 28 wp_enqueue_style( 'wp-color-picker' ); 36 wp_enqueue_script( 'wp-color-picker' ); 37 wp_enqueue_script( 38 'uuc-custom', 39 plugin_dir_url( __FILE__ ) . 'js/uuc-script.js', 40 array( 41 'jquery', 42 'wp-color-picker', 43 ), 44 '1.1', 45 true 46 ); 47 wp_enqueue_style( 'wp-color-picker' ); 29 48 } 30 49 50 /** 51 * Enqueue Farbtastic Scripts 52 * 53 * Deprecated 1.9.4 54 */ 31 55 function uuc_admin_enqueue_scripts_farb() { 32 wp_enqueue_script( 'farbtastic' );33 wp_enqueue_script( 'uuc-custom-farb', plugin_dir_url(__FILE__) . '/js/uuc-script-farb.js', array( 'farbtastic', 'jquery' ) ); 34 wp_enqueue_style( 'farbtastic');56 _deprecated_function( __FUNCTION__, esc_html( UUC_VERSION ), 'uuc_admin_enqueue_scripts_cp' ); 57 58 return uuc_admin_enqueue_scripts_cp(); 35 59 } -
ultimate-under-construction/trunk/includes/uucadmin.php
r2985037 r3065415 1 <?php 2 1 <?php 2 /** 3 * Admin Settings page 4 * 5 * Loads the Settings page within the Admin area 6 * 7 * @package Ultimate Under Construction 8 */ 9 10 /** 11 * Loads Options Page 12 */ 3 13 function uuc_options_page() { 4 14 … … 8 18 ob_start(); ?> 9 19 <div class="wrap"> 10 <div id="icon-tools" class="icon32"></div><h2><?php _e( 'Ultimate Under Construction Plugin Options', 'ultimate-under-construction' ); ?></h2> 11 20 <div id="icon-tools" class="icon32"></div> 21 <h2><?php esc_html_e( 'Ultimate Under Construction Plugin Options', 'ultimate-under-construction' ); ?></h2> 22 12 23 <form method="post" action="options.php"> 13 24 14 <?php 15 //Current version of WP seems to fall over on unticked Checkboxes... This is to tidy it up and stop unwanted 'Notices' 16 if ( !empty( $uuc_options ) ) { 17 //Enable Checkbox Sanitization 18 if ( ! isset( $uuc_options['enable'] ) || $uuc_options['enable'] != '1' ) { 19 $uuc_options['enable'] = 0; 20 } else { 21 $uuc_options['enable'] = 1; 22 } 23 24 //Countdown Checkbox Sanitization 25 if ( ! isset( $uuc_options['cdenable'] ) || $uuc_options['cdenable'] != '1' ) { 26 $uuc_options['cdenable'] = 0; 27 } else { 28 $uuc_options['cdenable'] = 1; 29 } 30 } 31 32 settings_fields('uuc_settings_group'); ?> 33 34 <h4 class="uuc-title"><?php _e('Enable', 'ultimate-under-construction'); ?></h4> 35 <p> 36 <input id="uuc_settings[enable]" name="uuc_settings[enable]" type="checkbox" value="1" <?php checked( ( !empty($uuc_options) ) ? $uuc_options['enable'] : '0', '1'); ?>/> 37 <label class="description" for="uuc_settings[enable]"><?php _e('Enable the Under Construction Page','ultimate-under-construction'); ?></label> 38 39 <h4 class="uuc-title"><?php _e('Holding Page Type', 'ultimate-under-construction'); ?></h4> 25 <?php 26 // Current version of WP seems to fall over on unticked Checkboxes... This is to tidy it up and stop unwanted 'Notices'. 27 if ( ! empty( $uuc_options ) ) { 28 // Enable Checkbox Sanitization. 29 if ( ! isset( $uuc_options['enable'] ) || '1' !== $uuc_options['enable'] ) { 30 $uuc_options['enable'] = 0; 31 } else { 32 $uuc_options['enable'] = 1; 33 } 34 35 // Countdown Checkbox Sanitization. 36 if ( ! isset( $uuc_options['cdenable'] ) || '1' !== $uuc_options['cdenable'] ) { 37 $uuc_options['cdenable'] = 0; 38 } else { 39 $uuc_options['cdenable'] = 1; 40 } 41 } 42 43 settings_fields( 'uuc_settings_group' ); 44 ?> 45 46 <h4 class="uuc-title"></h4> 40 47 <p> 41 <label><input onclick="checkPage()" type="radio" name="uuc_settings[holdingpage_type]" id="htmlblock" value="htmlblock"<?php if(!isset($uuc_options['holdingpage_type'])){ ?> checked <?php } else { checked( 'htmlblock' == $uuc_options['holdingpage_type'] ); } ?> /> HTML Block</label><br /> 42 <label><input onclick="checkPage()" type="radio" name="uuc_settings[holdingpage_type]" id="custom" value="custom"<?php checked( ( !empty($uuc_options) ) ? 'custom' == $uuc_options['holdingpage_type'] : '' ); ?> /> Custom Build</label><br /> 48 <input id="uuc_settings[enable]" name="uuc_settings[enable]" type="checkbox" value="1" <?php checked( ( ! empty( $uuc_options ) ) ? $uuc_options['enable'] : '0', '1' ); ?>/> 49 <label class="description" for="uuc_settings[enable]"><?php esc_html_e( 'Enable the Under Construction Page', 'ultimate-under-construction' ); ?></label> 50 51 <h4 class="uuc-title"><?php esc_html_e( 'Holding Page Type', 'ultimate-under-construction' ); ?></h4> 52 <p> 53 <label> 54 <input onclick="checkPage()" class="check-page" type="radio" name="uuc_settings[holdingpage_type]" id="htmlblock" value="htmlblock" 55 <?php 56 if ( ! isset( $uuc_options['holdingpage_type'] ) ) { 57 ?> 58 checked 59 <?php 60 } else { 61 checked( 'htmlblock' == $uuc_options['holdingpage_type'] ); 62 } 63 ?> 64 /> 65 <?php esc_html_e( 'HTML Block', 'ultimate-under-construction' ); ?> 66 </label> 67 <br/> 68 <label> 69 <input onclick="checkPage()" class="check-page" type="radio" name="uuc_settings[holdingpage_type]" id="custom" value="custom"<?php checked( ( ! empty( $uuc_options ) ) ? 'custom' == $uuc_options['holdingpage_type'] : '' ); ?> /> 70 <?php esc_html_e( 'Custom Build', 'ultimate-under-construction' ); ?> 71 </label><br/> 43 72 </p> 44 73 45 <div id="htmlblockbg" <?php if ( !empty($uuc_options) && $uuc_options['holdingpage_type'] == "custom" ){ ?> style="visibiliy: hidden; display: none;"<?php }; ?>> 46 <h4 class="uuc-title"><?php _e('HTML Block', 'ultimate-under-construction'); ?></h4> 74 <div id="htmlblockbg" 75 <?php 76 if ( ! empty( $uuc_options ) && 'custom' === $uuc_options['holdingpage_type'] ) { 77 ?> 78 style="visibiliy: hidden; display: none;"<?php } ?>> 79 <h4 class="uuc-title"><?php esc_html_e( 'HTML Block', 'ultimate-under-construction' ); ?></h4> 47 80 <p> 48 <textarea class="theEditor" name="uuc_settings[html_block]" id="uuc_settings[html_block]" rows="10" cols="75"><?php if (isset($uuc_options['html_block'])) echo $uuc_options['html_block']; ?></textarea> 49 <label class="description" for="uuc_settings[html_block]"><?php _e('<br />Enter the HTML - Advised for advanced users only!<br />Will display exactly as entered.', 'ultimate-under-construction'); ?></label> 81 <textarea class="theEditor" name="uuc_settings[html_block]" id="uuc_settings[html_block]" rows="10" cols="75"> 82 <?php 83 if ( isset( $uuc_options['html_block'] ) ) { 84 echo wp_kses( 85 $uuc_options['html_block'], 86 array( 87 'a' => array( 88 'href' => array(), 89 'title' => array(), 90 ), 91 'br' => array(), 92 'em' => array(), 93 'strong' => array(), 94 'p' => array(), 95 ) 96 ); 97 } 98 ?> 99 </textarea> 100 <label class="description" for="uuc_settings[html_block]"> 101 <br /> 102 <?php esc_html_e( 'Enter the HTML - Advised for advanced users only!', 'ultimate-under-construction' ); ?> 103 <br /> 104 <?php esc_html_e( 'Will display exactly as entered.', 'ultimate-under-construction' ); ?> 105 </label> 50 106 </p> 51 107 </div> 52 108 53 <div id="custombg" <?php if ( ( !empty($uuc_options) ) ? $uuc_options['holdingpage_type'] == "htmlblock" : ''){ ?> style="visibility: hidden; display: none;"<?php }; ?>> 54 <h4 class="uuc-title"><?php _e('Website Title', 'ultimate-under-construction'); ?></h4> 109 <div id="custombg" 110 <?php 111 if ( ( ! empty( $uuc_options ) ) ? 'htmlblock' === $uuc_options['holdingpage_type'] : '' ) { 112 ?> 113 style="visibility: hidden; display: none;"<?php } ?>> 114 <h4 class="uuc-title"><?php esc_html_e( 'Website Title', 'ultimate-under-construction' ); ?></h4> 55 115 <p> 56 <input id="uuc_settings[website_name]" name="uuc_settings[website_name]" type="text" value="<?php echo ( !empty($uuc_options) ) ? $uuc_options['website_name'] : ''; ?>"/> 57 <label class="description" for="uuc_settings[website_name]"><?php _e('Enter the Title of your website', 'ultimate-under-construction'); ?></label> 116 <input id="uuc_settings[website_name]" name="uuc_settings[website_name]" type="text" 117 value="<?php echo esc_attr( ( ! empty( $uuc_options ) ) ? esc_attr( $uuc_options['website_name'] ) : '' ); ?>"/> 118 <label class="description" 119 for="uuc_settings[website_name]"><?php esc_html_e( 'Enter the Title of your website', 'ultimate-under-construction' ); ?></label> 58 120 </p> 59 121 60 <h4 class="uuc-title"><?php _e('Holding Message', 'ultimate-under-construction'); ?></h4>122 <h4 class="uuc-title"><?php esc_html_e( 'Holding Message', 'ultimate-under-construction' ); ?></h4> 61 123 <p> 62 <textarea id="uuc_settings[holding_message]" name="uuc_settings[holding_message]" rows="5" cols="50"><?php echo ( !empty($uuc_options) ) ? $uuc_options['holding_message'] : ''; ?></textarea><br /> 63 <label class="description" for="uuc_settings[holding_message]"><?php _e('Enter a message to appear below the Website Title', 'ultimate-under-construction'); ?></label> 124 <textarea id="uuc_settings[holding_message]" name="uuc_settings[holding_message]" rows="5" 125 cols="50"><?php echo esc_attr( ( ! empty( $uuc_options ) ) ? esc_attr( $uuc_options['holding_message'] ) : '' ); ?></textarea><br/> 126 <label class="description" 127 for="uuc_settings[holding_message]"><?php esc_html_e( 'Enter a message to appear below the Website Title', 'ultimate-under-construction' ); ?></label> 64 128 </p> 65 129 66 <h4 class="uuc-title"><?php _e('Countdown Timer', 'ultimate-under-construction'); ?></h4>130 <h4 class="uuc-title"><?php esc_html_e( 'Countdown Timer', 'ultimate-under-construction' ); ?></h4> 67 131 <p> 68 <input id="uuc_settings[cdenable]" name="uuc_settings[cdenable]" type="checkbox" value="1" <?php checked( ( !empty($uuc_options) ) ? $uuc_options['cdenable'] : '0', '1'); ?>/> 69 <label class="description" for="uuc_settings[cdenable]"><?php _e('Enable the Countdown Timer?','ultimate-under-construction'); ?></label> 70 <br /> 71 <br /> 72 <label><input type="radio" name="uuc_settings[cd_style]" id="flipclock" value="flipclock"<?php if(!isset($uuc_options['cd_style'])){ ?> checked <?php } else { checked( 'flipclock' == $uuc_options['cd_style'] ); } ?> /> Flip Clock / </label> 73 <label><input type="radio" name="uuc_settings[cd_style]" id="textclock" value="textclock"<?php checked( ( !empty($uuc_options) ) ? 'textclock' == $uuc_options['cd_style'] : '' ); ?> /> Text only.</label> 74 <br /> 75 <br /> 76 <input id="uuc_settings[cdday]" name="uuc_settings[cdday]" type="text" value="<?php echo ( !empty($uuc_options) ) ? $uuc_options['cdday'] : ''; ?>"/> 77 <label class="description" for="uuc_settings[cdday]"><?php _e('Enter the Date - e.g. 14', 'ultimate-under-construction'); ?></label> 78 <br /> 79 <input id="uuc_settings[cdmonth]" name="uuc_settings[cdmonth]" type="text" value="<?php echo ( !empty($uuc_options) ) ? $uuc_options['cdmonth'] : ''; ?>"/> 80 <label class="description" for="uuc_settings[cdmonth]"><?php _e('Enter the Month - e.g. 2', 'ultimate-under-construction'); ?></label> 81 <br /> 82 <input id="uuc_settings[cdyear]" name="uuc_settings[cdyear]" type="text" value="<?php echo ( !empty($uuc_options) ) ? $uuc_options['cdyear'] : ''; ?>"/> 83 <label class="description" for="uuc_settings[cdyear]"><?php _e('Enter the Year - e.g. 2014', 'ultimate-under-construction'); ?></label> 84 <br /> 85 <input id="uuc_settings[cdtext]" name="uuc_settings[cdtext]" type="text" value="<?php echo ( !empty($uuc_options) ) ? $uuc_options['cdtext'] : ''; ?>"/> 86 <label class="description" for="uuc_settings[cdtext]"><?php _e('Enter the Countdown text - e.g. Till the site goes live!', 'ultimate-under-construction'); ?></label> 132 <input id="uuc_settings[cdenable]" name="uuc_settings[cdenable]" type="checkbox" value="1" <?php checked( ( ! empty( $uuc_options ) ) ? $uuc_options['cdenable'] : '0', '1' ); ?>/> 133 <label class="description" for="uuc_settings[cdenable]"><?php esc_html_e( 'Enable the Countdown Timer?', 'ultimate-under-construction' ); ?></label> 134 <br/> 135 <br/> 136 <label> 137 <input type="radio" name="uuc_settings[cd_style]" id="flipclock" value="flipclock" 138 <?php 139 if ( ! isset( $uuc_options['cd_style'] ) ) { 140 ?> 141 checked 142 <?php 143 } else { 144 checked( 'flipclock' == $uuc_options['cd_style'] ); 145 } 146 ?> 147 /> 148 <?php esc_html_e( 'Flip Clock', 'ultimate-under-construction' ); ?> 149 </label> 150 <label> 151 <input type="radio" name="uuc_settings[cd_style]" id="textclock" value="textclock"<?php checked( ( ! empty( $uuc_options ) ) ? 'textclock' == $uuc_options['cd_style'] : '' ); ?> /> 152 <?php esc_html_e( 'Text only.', 'ultimate-under-construction' ); ?> 153 </label> 154 <br/> 155 <br/> 156 <input id="uuc_settings[cdday]" name="uuc_settings[cdday]" type="text" value="<?php echo ( ! empty( $uuc_options ) ) ? esc_attr( $uuc_options['cdday'] ) : ''; ?>"/> 157 <label class="description" for="uuc_settings[cdday]"><?php esc_html_e( 'Enter the Date - e.g. 14', 'ultimate-under-construction' ); ?></label> 158 <br/> 159 <input id="uuc_settings[cdmonth]" name="uuc_settings[cdmonth]" type="text" value="<?php echo ( ! empty( $uuc_options ) ) ? esc_attr( $uuc_options['cdmonth'] ) : ''; ?>"/> 160 <label class="description" for="uuc_settings[cdmonth]"><?php esc_html_e( 'Enter the Month - e.g. 2', 'ultimate-under-construction' ); ?></label> 161 <br/> 162 <input id="uuc_settings[cdyear]" name="uuc_settings[cdyear]" type="text" value="<?php echo ( ! empty( $uuc_options ) ) ? esc_attr( $uuc_options['cdyear'] ) : ''; ?>"/> 163 <label class="description" for="uuc_settings[cdyear]"><?php esc_html_e( 'Enter the Year - e.g. 2014', 'ultimate-under-construction' ); ?></label> 164 <br/> 165 <input id="uuc_settings[cdtext]" name="uuc_settings[cdtext]" type="text" value="<?php echo ( ! empty( $uuc_options ) ) ? esc_attr( $uuc_options['cdtext'] ) : ''; ?>"/> 166 <label class="description" for="uuc_settings[cdtext]"><?php esc_html_e( 'Enter the Countdown text - e.g. Till the site goes live!', 'ultimate-under-construction' ); ?></label> 87 167 </p> 88 168 89 <h4 class="uuc-title"><?php _e('Background Style', 'ultimate-under-construction'); ?></h4>169 <h4 class="uuc-title"><?php esc_html_e( 'Background Style', 'ultimate-under-construction' ); ?></h4> 90 170 <p> 91 <label><input onclick="checkEm()" type="radio" name="uuc_settings[background_style]" id="solidcolor" value="solidcolor"<?php if(!isset($uuc_options['background_style'])){ ?> checked <?php } else { checked( 'solidcolor' == $uuc_options['background_style'] ); } ?> /> Solid Colour</label><br /> 92 <label><input onclick="checkEm()" type="radio" name="uuc_settings[background_style]" id="patterned" value="patterned"<?php checked( ( !empty($uuc_options) ) ? 'patterned' == $uuc_options['background_style'] : '' ); ?> /> Patterned Background</label> 171 <label> 172 <input onclick="checkEm()" class="check-em" type="radio" name="uuc_settings[background_style]" id="solidcolor" value="solidcolor" 173 <?php 174 if ( ! isset( $uuc_options['background_style'] ) ) { 175 ?> 176 checked 177 <?php 178 } else { 179 checked( 'solidcolor' === $uuc_options['background_style'] ); 180 } 181 ?> 182 /> 183 <?php esc_html_e( 'Solid Colour', 'ultimate-under-construction' ); ?> 184 </label> 185 <br/> 186 <label> 187 <input onclick="checkEm()" class="check-em" type="radio" name="uuc_settings[background_style]" id="patterned" alue="patterned"<?php checked( ( ! empty( $uuc_options ) ) ? 'patterned' === $uuc_options['background_style'] : '' ); ?> /> 188 <?php esc_html_e( 'Patterned Background', 'ultimate-under-construction' ); ?> 189 </label> 93 190 </p> 94 191 95 <?php if ( $wp_version >= 3.5 ){ ?> 96 <div id="solidcolorbg" <?php if( !empty( $uuc_options ) && $uuc_options['background_style'] == "patterned"){ ?>style="visibility: hidden; display: none;"<?php }; ?>> 97 <h4 class="uuc-title"><?php _e('Background Colour', 'ultimate-under-construction'); ?></h4> 98 <p> 99 <input name="uuc_settings[background_color]" id="background-color" type="text" value="<?php if ( isset( $uuc_options['background_color'] ) ) echo $uuc_options['background_color']; ?>" /> 100 <label class="description" for="uuc_settings[background_color]"><?php _e('Select the Background Colour', 'ultimate-under-construction'); ?></label> 101 </p> 102 </div> 192 <?php if ( $wp_version >= 3.5 ) { ?> 193 <div id="solidcolorbg" 194 <?php 195 if ( ! empty( $uuc_options ) && 'patterned' === $uuc_options['background_style'] ) { 196 ?> 197 style="visibility: hidden; display: none;"<?php } ?>> 198 <h4 class="uuc-title"><?php esc_html_e( 'Background Colour', 'ultimate-under-construction' ); ?></h4> 199 <p> 200 <input name="uuc_settings[background_color]" id="background-color" type="text" value=" 201 <?php 202 if ( isset( $uuc_options['background_color'] ) ) { 203 echo esc_attr( $uuc_options['background_color'] ); 204 } 205 ?> 206 "/> 207 <label class="description" for="uuc_settings[background_color]"><?php esc_html_e( 'Select the Background Colour', 'ultimate-under-construction' ); ?></label> 208 </p> 209 </div> 103 210 <?php } else { ?> 104 <div id="solidcolorbg" <?php if( !empty( $uuc_options ) && $uuc_options['background_style'] == "patterned"){ ?>style="visibility: hidden; display: none;"<?php }; ?>> 105 <h4 class="uuc-title"><?php _e('Background Colour', 'ultimate-under-construction'); ?></h4> 106 <p> 107 <div class="color-picker" style="position: relative;"> 108 <input type="text" name="uuc_settings[background_color]" id="color" value="<?php if ( isset( $uuc_options['background_color'] ) ) echo $uuc_options['background_color']; ?>" /> 109 <div style="position: absolute;" id="colorpicker"></div> 110 </div> 111 </p> 112 </div> 211 <div id="solidcolorbg" 212 <?php 213 if ( ! empty( $uuc_options ) && 'patterned' === $uuc_options['background_style'] ) { 214 ?> 215 style="visibility: hidden; display: none;"<?php } ?>> 216 <h4 class="uuc-title"><?php esc_html_e( 'Background Colour', 'ultimate-under-construction' ); ?></h4> 217 <p> 218 <div class="color-picker" style="position: relative;"> 219 <input type="text" name="uuc_settings[background_color]" id="color" value=" 220 <?php 221 if ( isset( $uuc_options['background_color'] ) ) { 222 echo esc_attr( $uuc_options['background_color'] ); 223 } 224 ?> 225 "/> 226 <div style="position: absolute;" id="colorpicker"></div> 227 </div> 228 </p> 229 </div> 113 230 <?php } ?> 114 231 115 <div id="patternedbg" <?php if(!empty( $uuc_options ) && $uuc_options['background_style'] == "solidcolor"){ ?>style="visibility: hidden; display: none;"<?php }; ?>> 116 <h4 class="uuc-title"><?php _e('Background Choice', 'ultimate-under-construction'); ?></h4> 117 <label><input type="radio" name="uuc_settings[background_styling]" id="background_choice_one" value="squairylight"<?php checked( 'squairylight' == isset($uuc_options['background_styling']) ); ?> /> Squairy</label><br /> 118 <label><input type="radio" id="background_choice_two" name="uuc_settings[background_styling]" value="lightbind" <?php if(!isset($uuc_options['background_styling'])){ ?> checked <?php } else { checked( 'lightbind' == $uuc_options['background_styling'] ); } ?> /> Light Binding</label><br /> 119 <label><input type="radio" id="background_choice_three" name="uuc_settings[background_styling]" value="darkbind" <?php if(!isset($uuc_options['background_styling'])){ ?> checked <?php } else { checked( 'darkbind' == $uuc_options['background_styling'] ); } ?> /> Dark Binding</label> <br /> 120 <label><input type="radio" id="background_choice_four" name="uuc_settings[background_styling]" value="wavegrid" <?php if(!isset($uuc_options['background_styling'])){ ?> checked <?php } else { checked( 'wavegrid' == $uuc_options['background_styling'] ); } ?> /> Wavegrid</label> <br /> 121 <label><input type="radio" id="background_choice_five" name="uuc_settings[background_styling]" value="greywashwall" <?php if(!isset($uuc_options['background_styling'])){ ?> checked <?php } else { checked( 'greywashwall' == $uuc_options['background_styling'] ); } ?> /> Gray Wash Wall</label> <br /> 122 <label><input type="radio" id="background_choice_six" name="uuc_settings[background_styling]" value="flatcardboard" <?php if(!isset($uuc_options['background_styling'])){ ?> checked <?php } else { checked( 'flatcardboard' == $uuc_options['background_styling'] ); } ?> /> Cardboard Flat</label> <br /> 123 <label><input type="radio" id="background_choice_seven" name="uuc_settings[background_styling]" value="pooltable" <?php if(!isset($uuc_options['background_styling'])){ ?> checked <?php } else { checked( 'pooltable' == $uuc_options['background_styling'] ); } ?> /> Pool Table</label> <br /> 124 <label><input type="radio" id="background_choice_eight" name="uuc_settings[background_styling]" value="oldmaths" <?php if(!isset($uuc_options['background_styling'])){ ?> checked <?php } else { checked( 'oldmaths' == $uuc_options['background_styling'] ); } ?> /> Old Mathematics</label> <br /> 232 <div id="patternedbg" 233 <?php 234 if ( ! empty( $uuc_options ) && 'solidcolor' === $uuc_options['background_style'] ) { 235 ?> 236 style="visibility: hidden; display: none;"<?php } ?>> 237 <h4 class="uuc-title"></h4> 238 <label> 239 <input type="radio" name="uuc_settings[background_styling]" id="background_choice_one" value="squairylight"<?php checked( 'squairylight' === isset( $uuc_options['background_styling'] ) ); ?> /> 240 <?php esc_html_e( 'Squairy', 'ultimate-under-construction' ); ?> 241 </label><br/> 242 <label> 243 <input type="radio" id="background_choice_two" name="uuc_settings[background_styling]" 244 value="lightbind" 245 <?php 246 if ( ! isset( $uuc_options['background_styling'] ) ) { 247 ?> 248 checked 249 <?php 250 } else { 251 checked( 'lightbind' === $uuc_options['background_styling'] ); 252 } 253 ?> 254 /> 255 <?php esc_html_e( 'Light Binding', 'ultimate-under-construction' ); ?> 256 </label> 257 <br/> 258 <label> 259 <input type="radio" id="background_choice_three" name="uuc_settings[background_styling]" value="darkbind" 260 <?php 261 if ( ! isset( $uuc_options['background_styling'] ) ) { 262 ?> 263 checked 264 <?php 265 } else { 266 checked( 'darkbind' === $uuc_options['background_styling'] ); 267 } 268 ?> 269 /> 270 <?php esc_html_e( 'Dark Binding', 'ultimate-under-construction' ); ?> 271 </label> 272 <br/> 273 <label> 274 <input type="radio" id="background_choice_four" name="uuc_settings[background_styling]" value="wavegrid" 275 <?php 276 if ( ! isset( $uuc_options['background_styling'] ) ) { 277 ?> 278 checked 279 <?php 280 } else { 281 checked( 'wavegrid' === $uuc_options['background_styling'] ); 282 } 283 ?> 284 /> 285 <?php esc_html_e( 'Wavegrid', 'ultimate-under-construction' ); ?> 286 </label> 287 <br/> 288 <label> 289 <input type="radio" id="background_choice_five" name="uuc_settings[background_styling]" value="greywashwall" 290 <?php 291 if ( ! isset( $uuc_options['background_styling'] ) ) { 292 ?> 293 checked 294 <?php 295 } else { 296 checked( 'greywashwall' === $uuc_options['background_styling'] ); 297 } 298 ?> 299 /> 300 <?php esc_html_e( 'Gray Wash Wall', 'ultimate-under-construction' ); ?> 301 </label> 302 <br/> 303 <label> 304 <input type="radio" id="background_choice_six" name="uuc_settings[background_styling]" value="flatcardboard" 305 <?php 306 if ( ! isset( $uuc_options['background_styling'] ) ) { 307 ?> 308 checked 309 <?php 310 } else { 311 checked( 'flatcardboard' === $uuc_options['background_styling'] ); 312 } 313 ?> 314 /> 315 <?php esc_html_e( 'Cardboard Flat', 'ultimate-under-construction' ); ?> 316 </label> 317 <br/> 318 <label> 319 <input type="radio" id="background_choice_seven" name="uuc_settings[background_styling]" value="pooltable" 320 <?php 321 if ( ! isset( $uuc_options['background_styling'] ) ) { 322 ?> 323 checked 324 <?php 325 } else { 326 checked( 'pooltable' === $uuc_options['background_styling'] ); 327 } 328 ?> 329 /> 330 <?php esc_html_e( 'Pool Table', 'ultimate-under-construction' ); ?> 331 </label> 332 <br/> 333 <label> 334 <input type="radio" id="background_choice_eight" name="uuc_settings[background_styling]" value="oldmaths" 335 <?php 336 if ( ! isset( $uuc_options['background_styling'] ) ) { 337 ?> 338 checked 339 <?php 340 } else { 341 checked( 'oldmaths' === $uuc_options['background_styling'] ); 342 } 343 ?> 344 /> 345 <?php esc_html_e( 'Old Mathematics', 'ultimate-under-construction' ); ?> 346 </label> 347 <br/> 125 348 </div> 126 349 </div> 127 350 128 351 <p class="submit"> 129 <input type="submit" class="button-primary" value="<?php _e('Save Options', 'ultimate-under-construction'); ?>"/>352 <input type="submit" class="button-primary" value="<?php esc_attr_e( 'Save Options', 'ultimate-under-construction' ); ?>"/> 130 353 </p> 131 132 <script type="text/javascript">133 function checkPage() {134 if (document.getElementById("custom").checked) {135 document.getElementById("custombg").style.visibility = "visible";136 document.getElementById("custombg").style.display = "block";137 document.getElementById("htmlblockbg").style.visibility = "hidden";138 document.getElementById("htmlblockbg").style.display = "none";139 };140 141 if (document.getElementById("htmlblock").checked) {142 document.getElementById("htmlblockbg").style.visibility = "visible";143 document.getElementById("htmlblockbg").style.display = "block";144 document.getElementById("custombg").style.visibility = "hidden";145 document.getElementById("custombg").style.display = "none";146 }147 148 };149 150 function checkEm() {151 if (document.getElementById("solidcolor").checked) {152 document.getElementById("solidcolorbg").style.visibility = "visible";153 document.getElementById("solidcolorbg").style.display = "block";154 document.getElementById("patternedbg").style.visibility = "hidden";155 document.getElementById("patternedbg").style.display = "none";156 };157 158 if (document.getElementById("patterned").checked) {159 document.getElementById("patternedbg").style.visibility = "visible";160 document.getElementById("patternedbg").style.display = "block";161 document.getElementById("solidcolorbg").style.visibility = "hidden";162 document.getElementById("solidcolorbg").style.display = "none";163 };164 };165 </script>166 354 167 355 </form> 168 356 </div> 169 </div> 170 <?php echo ob_get_clean(); 357 </div> 358 <?php 359 echo wp_kses( 360 ob_get_clean(), 361 array( 362 'before' => array(), 363 'a' => array( 364 'href' => array(), 365 'title' => array(), 366 ), 367 'br' => array(), 368 'em' => array(), 369 'strong' => array(), 370 'p' => array( 371 'class' => array(), 372 'style' => array(), 373 'id' => array(), 374 ), 375 'h3' => array( 376 'class' => array(), 377 'style' => array(), 378 'id' => array(), 379 ), 380 'h4' => array( 381 'class' => array(), 382 'style' => array(), 383 'id' => array(), 384 ), 385 'h1' => array( 386 'class' => array(), 387 'style' => array(), 388 'id' => array(), 389 ), 390 'h2' => array( 391 'class' => array(), 392 'style' => array(), 393 'id' => array(), 394 ), 395 'div' => array( 396 'class' => array(), 397 'style' => array(), 398 'id' => array(), 399 ), 400 'span' => array(), 401 'img' => array(), 402 'form' => array( 403 'class' => array(), 404 'method' => array(), 405 'action' => array(), 406 'id' => array(), 407 ), 408 'label' => array(), 409 'textarea' => array( 410 'class' => array(), 411 'style' => array(), 412 'id' => array(), 413 'name' => array(), 414 'rows' => array(), 415 'cols' => array(), 416 ), 417 'input' => array( 418 'class' => array(), 419 'type' => array(), 420 'id' => array(), 421 'name' => array(), 422 'value' => array(), 423 'onclick' => array(), 424 'before' => array(), 425 'checked' => array(), 426 ), 427 ':before' => array(), 428 'script' => array(), 429 ) 430 ); 171 431 } 172 432 173 function admin_register_head() { 174 $siteurl = get_option('siteurl'); 175 $url = $siteurl . '/wp-content/plugins/ultimate-under-construction/includes/css/plugin_styles.css'; 176 echo "<link rel='stylesheet' type='text/css' href='$url' />\n"; 433 add_action( 'admin_enqueue_scripts', 'admin_register_style' ); 434 /** 435 * Output admin page styles. 436 */ 437 function admin_register_style() { 438 wp_enqueue_style( 'uuc_admin_style', UUC_PLUGIN_URL . 'includes/css/plugin_styles.css', array(), UUC_VERSION ); 439 wp_enqueue_script( 'uuc_admin_script', UUC_PLUGIN_URL . 'includes/js/uuc-admin.js', array(), UUC_VERSION, array( 'in_footer' => true ) ); 177 440 } 178 add_action('admin_head', 'admin_register_head'); 179 441 442 add_action( 'admin_menu', 'uuc_add_options_link' ); 443 /** 444 * Set up Settings page 445 */ 180 446 function uuc_add_options_link() { 181 add_options_page( 'Ultimate Under Construction Plugin Options', 'Ultimate Under Construction', 'manage_options', 'uuc-options', 'uuc_options_page');447 add_options_page( 'Ultimate Under Construction Plugin Options', 'Ultimate Under Construction', 'manage_options', 'uuc-options', 'uuc_options_page' ); 182 448 } 183 add_action('admin_menu', 'uuc_add_options_link'); 184 449 450 add_action( 'admin_init', 'uuc_register_settings' ); 451 /** 452 * Register Settings group 453 */ 185 454 function uuc_register_settings() { 186 register_setting( 'uuc_settings_group', 'uuc_settings');455 register_setting( 'uuc_settings_group', 'uuc_settings' ); 187 456 } 188 add_action('admin_init', 'uuc_register_settings'); -
ultimate-under-construction/trunk/readme.txt
r2985037 r3065415 3 3 Tags: Under construction, holding page, construction, holding, page, private, preview, coming soon 4 4 Requires at least: 3.0.1 5 Tested up to: 6. 3.26 Stable tag: 1.9. 35 Tested up to: 6.4.3 6 Stable tag: 1.9.4 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 26 26 27 27 == Changelog == 28 = 1.9.4 - 2nd April 2024 = 29 * SECURITY FIX - Fixed XSS Vulnerability - Thanks to Cronus and PatchStack for discovering and reporting. 30 * UPDATE - Tested on WordPress 6.4.3 31 28 32 = 1.9.3 - 27th October 2023 = 29 33 * UPDATE - Tested on WordPress 6.3.2. … … 82 86 83 87 == Upgrade Notice == 88 = 1.9.4 = 89 Security Fix - Version 1.9.4 fixes a known XSS Vulnerability. Please Update immediately. 90 91 = 1.7 = 84 92 Please Upgrade - FlipClock doesn't load reliably on v1.6 - Issue has been fixed on 1.7 85 93 -
ultimate-under-construction/trunk/ultimate-under-construction.php
r2985037 r3065415 6 6 Author: HappyKite 7 7 Author URI: http://www.happykite.co.uk/ 8 Version: 1.9. 38 Version: 1.9.4 9 9 Text Domain: ultimate-under-construction 10 10 Domain Path: /languages … … 12 12 13 13 /* 14 This file is part of ultimateUnderConstruction.15 ultimateUnderConstruction is free software: you can redistribute it and/or modify16 it under the terms of the GNU General Public License as published by17 the Free Software Foundation, either version 3 of the License, or18 (at your option) any later version.19 ultimateUnderConstruction is distributed in the hope that it will be useful,20 but WITHOUT ANY WARRANTY; without even the implied warranty of21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the22 GNU General Public License for more details.23 You should have received a copy of the GNU General Public License24 along with ultimateUnderConstruction. If not, see <http://www.gnu.org/licenses/>.14 This file is part of ultimateUnderConstruction. 15 ultimateUnderConstruction is free software: you can redistribute it and/or modify 16 it under the terms of the GNU General Public License as published by 17 the Free Software Foundation, either version 3 of the License, or 18 (at your option) any later version. 19 ultimateUnderConstruction is distributed in the hope that it will be useful, 20 but WITHOUT ANY WARRANTY; without even the implied warranty of 21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 GNU General Public License for more details. 23 You should have received a copy of the GNU General Public License 24 along with ultimateUnderConstruction. If not, see <http://www.gnu.org/licenses/>. 25 25 */ 26 27 define( 'UUC_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 28 define( 'UUC_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); 29 define( 'UUC_VERSION', '1.9.4' ); 26 30 27 31 28 32 /*************************** 29 * global variables30 ***************************/33 * Global variables 34 */ 31 35 32 $my_prefix = 'uuc_'; 33 $my_plugin_name = 'Ultimate Under Construction page'; 34 35 //Retrieve settings from Admin Options table 36 $uuc_options = get_option('uuc_settings'); 36 // Retrieve settings from Admin Options table. 37 $uuc_options = get_option( 'uuc_settings' ); 37 38 38 39 /*************************** 39 * includes40 ***************************/40 * Includes 41 */ 41 42 42 include('includes/scripts.php'); //includes all JS and CSS 43 include('includes/display-functions.php'); //display content functions 44 include('includes/uucadmin.php'); //plugin admin options 43 require 'includes/scripts.php'; // includes all JS and CSS. 44 require 'includes/display-functions.php'; // display content functions. 45 require 'includes/uucadmin.php'; // plugin admin options. 46 47 add_action( 'in_plugin_update_message-ultimate-under-construction/ultimate-under-construction.php', 'uuc_plugin_update_message', 10, 2 ); 48 49 /** 50 * Update Notice to make it clear it's a security update. 51 */ 52 function uuc_plugin_update_message( $data, $response ) { 53 if ( '1.9.4' === $response->new_version ) { 54 $new_version = $response->new_version; 55 56 /* translators: %s: version number */ 57 echo wp_kses_post( sprintf( __( '<strong>Notice:</strong> If you are below version %s. Please update Immediately. This update contains a fix for a known XSS Vulnerability', 'uuc' ), $new_version ) ); 58 } 59 }
Note: See TracChangeset
for help on using the changeset viewer.