├── .gitattributes ├── .gitignore ├── README.md ├── css ├── style.css ├── style1.css ├── style2.css └── ui-dialog.css ├── images ├── bodybg1.jpg └── bodybg2.jpg ├── index.html ├── js ├── app.js ├── dialog-plus-min.js ├── jquery.bak.js ├── jquery.cookie.js ├── jquery.corner.js ├── jquery.js └── jquery.pulsate.min.js └── music ├── runing.wav └── stop.mp3 /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | 46 | [Dd]ebug/ 47 | [Rr]elease/ 48 | x64/ 49 | build/ 50 | [Bb]in/ 51 | [Oo]bj/ 52 | 53 | # MSTest test Results 54 | [Tt]est[Rr]esult*/ 55 | [Bb]uild[Ll]og.* 56 | 57 | *_i.c 58 | *_p.c 59 | *.ilk 60 | *.meta 61 | *.obj 62 | *.pch 63 | *.pdb 64 | *.pgc 65 | *.pgd 66 | *.rsp 67 | *.sbr 68 | *.tlb 69 | *.tli 70 | *.tlh 71 | *.tmp 72 | *.tmp_proj 73 | *.log 74 | *.vspscc 75 | *.vssscc 76 | .builds 77 | *.pidb 78 | *.log 79 | *.scc 80 | 81 | # Visual C++ cache files 82 | ipch/ 83 | *.aps 84 | *.ncb 85 | *.opensdf 86 | *.sdf 87 | *.cachefile 88 | 89 | # Visual Studio profiler 90 | *.psess 91 | *.vsp 92 | *.vspx 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | 101 | # TeamCity is a build add-in 102 | _TeamCity* 103 | 104 | # DotCover is a Code Coverage Tool 105 | *.dotCover 106 | 107 | # NCrunch 108 | *.ncrunch* 109 | .*crunch*.local.xml 110 | 111 | # Installshield output folder 112 | [Ee]xpress/ 113 | 114 | # DocProject is a documentation generator add-in 115 | DocProject/buildhelp/ 116 | DocProject/Help/*.HxT 117 | DocProject/Help/*.HxC 118 | DocProject/Help/*.hhc 119 | DocProject/Help/*.hhk 120 | DocProject/Help/*.hhp 121 | DocProject/Help/Html2 122 | DocProject/Help/html 123 | 124 | # Click-Once directory 125 | publish/ 126 | 127 | # Publish Web Output 128 | *.Publish.xml 129 | *.pubxml 130 | 131 | # NuGet Packages Directory 132 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 133 | #packages/ 134 | 135 | # Windows Azure Build Output 136 | csx 137 | *.build.csdef 138 | 139 | # Windows Store app package directory 140 | AppPackages/ 141 | 142 | # Others 143 | sql/ 144 | *.Cache 145 | ClientBin/ 146 | [Ss]tyle[Cc]op.* 147 | ~$* 148 | *~ 149 | *.dbmdl 150 | *.[Pp]ublish.xml 151 | *.pfx 152 | *.publishsettings 153 | 154 | # RIA/Silverlight projects 155 | Generated_Code/ 156 | 157 | # Backup & report files from converting an old project file to a newer 158 | # Visual Studio version. Backup files are not needed, because we have git ;-) 159 | _UpgradeReport_Files/ 160 | Backup*/ 161 | UpgradeLog*.XML 162 | UpgradeLog*.htm 163 | 164 | # SQL Server files 165 | App_Data/*.mdf 166 | App_Data/*.ldf 167 | 168 | ############# 169 | ## Windows detritus 170 | ############# 171 | 172 | # Windows image file caches 173 | Thumbs.db 174 | ehthumbs.db 175 | 176 | # Folder config file 177 | Desktop.ini 178 | 179 | # Recycle Bin used on file shares 180 | $RECYCLE.BIN/ 181 | 182 | # Mac crap 183 | .DS_Store 184 | 185 | 186 | ############# 187 | ## Python 188 | ############# 189 | 190 | *.py[co] 191 | 192 | # Packages 193 | *.egg 194 | *.egg-info 195 | dist/ 196 | build/ 197 | eggs/ 198 | parts/ 199 | var/ 200 | sdist/ 201 | develop-eggs/ 202 | .installed.cfg 203 | 204 | # Installer logs 205 | pip-log.txt 206 | 207 | # Unit test / coverage reports 208 | .coverage 209 | .tox 210 | 211 | #Translations 212 | *.mo 213 | 214 | #Mr Developer 215 | .mr.developer.cfg 216 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Lottery 说明 2 | 公司年终奖抽奖系统,基于jQuery,兼容Chrome,火狐等现代浏览器,其他浏览器未做兼容性测试 3 | 4 | ## 示例 5 | http://www.zi-han.net/case/lottery/ 6 | -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | body{background:#ccc;padding:5px;overflow-y:hidden;overflow-x:hidden;} 2 | #bodybg{position:fixed;width:100%;height:100%$;left:0px;top:0px;z-index:-1;} 3 | #bodybg .stretch{width:100%;height:100%;} 4 | div.top{font-family:'\5FAE\8F6F\96C5\9ED1';width:100%;height:80px;text-align:center;line-height:80px;font-size:30px;} 5 | div.menu{font-family:'\5FAE\8F6F\96C5\9ED1';padding:10px 20px 10px 0;width:300px;float:right;height:80%;overflow-y: auto;box-sizing: border-box;} 6 | .olTitle{margin-top:5px;font-size:35px;margin-left:-45px;} 7 | .sequence{width:220px;height:95%;padding-left:60px;margin-right:20px;overflow-y:auto;} 8 | .sequence li{font-size:30px;margin-bottom:8px;} 9 | div.help{padding-top:8px;width:100%;} 10 | div.items{float:left;padding:15px;padding-left:35px;width:70%;font-family:'\5FAE\8F6F\96C5\9ED1';} 11 | div.item{margin-bottom:8px;margin-left:8px;float:left;vertical-align:middle;font-size:20px;text-align:center;} 12 | .model{width:300px;height:350px;text-align: left;font-size:12px;vertical-align: middle;color:#666;} 13 | .model b{display: inline-block;font-weight: 400;width:60px;} 14 | .model input[type='text']{padding:8px 10px;border:solid 1px #ddd;box-sizing: border-box;width:230px;} 15 | .model input[type='text']:focus{outline: none;border-color: #08c;} 16 | .line{margin-top:25px;padding-top:25px;border-top:dashed 1px #ddd;} 17 | .model p{overflow: hidden;} 18 | .model label{float: left;line-height: 18px;margin-right: 10px;} 19 | .model label input{float:left;} 20 | .readme{font-size: 12px;color:#666;} 21 | .help{line-height: 1.8;} 22 | .ss h2{font-size:18px;color:#fff;border-bottom: solid 1px #fff;padding-bottom:8px;} 23 | .ss ol{line-height: 1.5;background: rgba(255,255,255,.5);padding:10px;} 24 | .ui-dialog-content h2{color:#e00;} 25 | .ui-dialog-content h3{color:#666;} 26 | 27 | @media (min-width:900px){div.item{width:40px;line-height:40px;height:40px;}} 28 | @media (min-width:1200px){div.item{width:50px;line-height:50px;height:50px;}} 29 | @media (min-width:1440px){div.item{width:60px;line-height:60px;height:60px;}} 30 | @media (min-width:1500px){div.items{width:80px;}div.item{width:80px;line-height:50px;height:50px;}} 31 | .hide{display:none}; -------------------------------------------------------------------------------- /css/style1.css: -------------------------------------------------------------------------------- 1 | a,div.menu,div.items,div.ss{color:#333;} 2 | div.item{background:rgba(0,170,210,.8);border:solid 1px rgba(0,170,210,.1);color:#fff;} 3 | div.active{background: rgb(135,255,126);Opacity:1;Filter:alpha(opacity=100);color:#000;} 4 | div.ignore{background: rgba(255,255,255,.5);border:1px solid rgba(255,255,255,.1);color:#666;} 5 | div.active.ignore{border:1px solid #fff;background: rgb(135,255,126);Opacity:1;Filter:alpha(opacity=100);color:#000;} 6 | div.top{color:rgb(0,170,210);} 7 | .ss h2{color:#333;} 8 | div.menu{color:#333;} -------------------------------------------------------------------------------- /css/style2.css: -------------------------------------------------------------------------------- 1 | div.menu,div.items,div.ss{color:#444;} 2 | div.item{background:rgba(255,255,255,.7);border:solid 1px rgba(255,255,255,.1);color:#999;} 3 | div.active{background: rgba(239,5,5,.4);color:#333;} 4 | div.ignore{background: none;border:1px solid #999;color:#999;} 5 | div.active.ignore{border:1px solid #999;background: rgb(239,5,5,.8);color:#333} 6 | div.top{color:#fff;} -------------------------------------------------------------------------------- /css/ui-dialog.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * ui-dialog.css 3 | * Date: 2014-07-03 4 | * https://github.com/aui/artDialog 5 | * (c) 2009-2014 TangBin, http://www.planeArt.cn 6 | * 7 | * This is licensed under the GNU LGPL, version 2.1 or later. 8 | * For details, see: http://www.gnu.org/licenses/lgpl-2.1.html 9 | */ 10 | .ui-dialog { 11 | *zoom:1; 12 | _float: left; 13 | position: relative; 14 | background-color: #FFF; 15 | outline: 0; 16 | background-clip: padding-box; 17 | font-family: Helvetica, arial, sans-serif; 18 | font-size: 14px; 19 | line-height: 1.428571429; 20 | color: #333; 21 | opacity: 0; 22 | -webkit-transform: scale(0); 23 | transform: scale(0); 24 | -webkit-transition: -webkit-transform .15s ease-in-out, opacity .15s ease-in-out; 25 | transition: transform .15s ease-in-out, opacity .15s ease-in-out; 26 | } 27 | .ui-popup-show .ui-dialog { 28 | opacity: 1; 29 | -webkit-transform: scale(1); 30 | transform: scale(1); 31 | } 32 | .ui-popup-focus .ui-dialog { 33 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.1); 34 | } 35 | .ui-popup-modal .ui-dialog { 36 | box-shadow: 0 0 8px rgba(0, 0, 0, 0.1), 0 0 256px rgba(255, 255, 255, .3); 37 | } 38 | .ui-dialog-grid { 39 | width: auto; 40 | margin: 0; 41 | border: 0 none; 42 | border-collapse:collapse; 43 | border-spacing: 0; 44 | background: transparent; 45 | } 46 | .ui-dialog-header, 47 | .ui-dialog-body, 48 | .ui-dialog-footer { 49 | padding: 0; 50 | border: 0 none; 51 | text-align: left; 52 | background: transparent; 53 | } 54 | .ui-dialog-header { 55 | white-space: nowrap; 56 | border-bottom: 1px solid #E5E5E5; 57 | } 58 | .ui-dialog-close { 59 | position: relative; 60 | _position: absolute; 61 | float: right; 62 | top: 13px; 63 | right: 13px; 64 | _height: 26px; 65 | padding: 0 4px; 66 | font-size: 21px; 67 | font-weight: bold; 68 | line-height: 1; 69 | color: #000; 70 | text-shadow: 0 1px 0 #FFF; 71 | opacity: .2; 72 | filter: alpha(opacity=20); 73 | cursor: pointer; 74 | background: transparent; 75 | _background: #FFF; 76 | border: 0; 77 | -webkit-appearance: none; 78 | } 79 | .ui-dialog-close:hover, 80 | .ui-dialog-close:focus { 81 | color: #000000; 82 | text-decoration: none; 83 | cursor: pointer; 84 | outline: 0; 85 | opacity: 0.5; 86 | filter: alpha(opacity=50); 87 | } 88 | .ui-dialog-title { 89 | margin: 0; 90 | line-height: 1.428571429; 91 | min-height: 16.428571429px; 92 | padding: 15px; 93 | overflow:hidden; 94 | white-space: nowrap; 95 | text-overflow: ellipsis; 96 | font-weight: bold; 97 | cursor: default; 98 | } 99 | .ui-dialog-body { 100 | padding: 20px; 101 | text-align: center; 102 | } 103 | .ui-dialog-content { 104 | display: inline-block; 105 | position: relative; 106 | vertical-align: middle; 107 | *zoom: 1; 108 | *display: inline; 109 | text-align: left; 110 | } 111 | .ui-dialog-footer { 112 | padding: 0 20px 20px 20px; 113 | } 114 | .ui-dialog-statusbar { 115 | float: left; 116 | margin-right: 20px; 117 | padding: 6px 0; 118 | line-height: 1.428571429; 119 | font-size: 14px; 120 | color: #888; 121 | white-space: nowrap; 122 | } 123 | .ui-dialog-statusbar label:hover { 124 | color: #333; 125 | } 126 | .ui-dialog-statusbar input, 127 | .ui-dialog-statusbar .label { 128 | vertical-align: middle; 129 | } 130 | .ui-dialog-button { 131 | float: right; 132 | white-space: nowrap; 133 | } 134 | .ui-dialog-footer button+button { 135 | margin-bottom: 0; 136 | margin-left: 5px; 137 | } 138 | .ui-dialog-footer button { 139 | width:auto; 140 | overflow:visible; 141 | display: inline-block; 142 | padding: 6px 12px; 143 | _margin-left: 5px; 144 | margin-bottom: 0; 145 | font-size: 14px; 146 | font-weight: normal; 147 | line-height: 1.428571429; 148 | text-align: center; 149 | white-space: nowrap; 150 | vertical-align: middle; 151 | cursor: pointer; 152 | background-image: none; 153 | border: 1px solid transparent; 154 | border-radius: 4px; 155 | -webkit-user-select: none; 156 | -moz-user-select: none; 157 | -ms-user-select: none; 158 | -o-user-select: none; 159 | user-select: none; 160 | } 161 | 162 | .ui-dialog-footer button:focus { 163 | outline: thin dotted #333; 164 | outline: 5px auto -webkit-focus-ring-color; 165 | outline-offset: -2px; 166 | } 167 | 168 | .ui-dialog-footer button:hover, 169 | .ui-dialog-footer button:focus { 170 | color: #333333; 171 | text-decoration: none; 172 | } 173 | 174 | .ui-dialog-footer button:active { 175 | background-image: none; 176 | outline: 0; 177 | -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); 178 | box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); 179 | } 180 | .ui-dialog-footer button[disabled] { 181 | pointer-events: none; 182 | cursor: not-allowed; 183 | opacity: 0.65; 184 | filter: alpha(opacity=65); 185 | -webkit-box-shadow: none; 186 | box-shadow: none; 187 | } 188 | 189 | .ui-dialog-footer button { 190 | color: #333333; 191 | background-color: #ffffff; 192 | border-color: #cccccc; 193 | } 194 | 195 | .ui-dialog-footer button:hover, 196 | .ui-dialog-footer button:focus, 197 | .ui-dialog-footer button:active { 198 | color: #333333; 199 | background-color: #ebebeb; 200 | border-color: #adadad; 201 | } 202 | 203 | .ui-dialog-footer button:active{ 204 | background-image: none; 205 | } 206 | 207 | .ui-dialog-footer button[disabled], 208 | .ui-dialog-footer button[disabled]:hover, 209 | .ui-dialog-footer button[disabled]:focus, 210 | .ui-dialog-footer button[disabled]:active { 211 | background-color: #ffffff; 212 | border-color: #cccccc; 213 | } 214 | 215 | .ui-dialog-footer button.ui-dialog-autofocus { 216 | color: #ffffff; 217 | background-color: #428bca; 218 | border-color: #357ebd; 219 | } 220 | 221 | .ui-dialog-footer button.ui-dialog-autofocus:hover, 222 | .ui-dialog-footer button.ui-dialog-autofocus:focus, 223 | .ui-dialog-footer button.ui-dialog-autofocus:active { 224 | color: #ffffff; 225 | background-color: #3276b1; 226 | border-color: #285e8e; 227 | } 228 | 229 | .ui-dialog-footer button.ui-dialog-autofocus:active { 230 | background-image: none; 231 | } 232 | .ui-popup-top-left .ui-dialog, 233 | .ui-popup-top .ui-dialog, 234 | .ui-popup-top-right .ui-dialog { 235 | top: -8px; 236 | } 237 | .ui-popup-bottom-left .ui-dialog, 238 | .ui-popup-bottom .ui-dialog, 239 | .ui-popup-bottom-right .ui-dialog { 240 | top: 8px; 241 | } 242 | .ui-popup-left-top .ui-dialog, 243 | .ui-popup-left .ui-dialog, 244 | .ui-popup-left-bottom .ui-dialog { 245 | left: -8px; 246 | } 247 | .ui-popup-right-top .ui-dialog, 248 | .ui-popup-right .ui-dialog, 249 | .ui-popup-right-bottom .ui-dialog { 250 | left: 8px; 251 | } 252 | 253 | .ui-dialog-arrow-a, 254 | .ui-dialog-arrow-b { 255 | position: absolute; 256 | display: none; 257 | width: 0; 258 | height: 0; 259 | overflow:hidden; 260 | _color:#FF3FFF; 261 | _filter:chroma(color=#FF3FFF); 262 | border:8px dashed transparent; 263 | } 264 | .ui-popup-follow .ui-dialog-arrow-a, 265 | .ui-popup-follow .ui-dialog-arrow-b{ 266 | display: block; 267 | } 268 | .ui-popup-top-left .ui-dialog-arrow-a, 269 | .ui-popup-top .ui-dialog-arrow-a, 270 | .ui-popup-top-right .ui-dialog-arrow-a { 271 | bottom: -16px; 272 | border-top:8px solid #7C7C7C; 273 | } 274 | .ui-popup-top-left .ui-dialog-arrow-b, 275 | .ui-popup-top .ui-dialog-arrow-b, 276 | .ui-popup-top-right .ui-dialog-arrow-b { 277 | bottom: -15px; 278 | border-top:8px solid #fff; 279 | } 280 | .ui-popup-top-left .ui-dialog-arrow-a, 281 | .ui-popup-top-left .ui-dialog-arrow-b { 282 | left: 15px; 283 | } 284 | .ui-popup-top .ui-dialog-arrow-a, 285 | .ui-popup-top .ui-dialog-arrow-b { 286 | left: 50%; 287 | margin-left: -8px; 288 | } 289 | .ui-popup-top-right .ui-dialog-arrow-a, 290 | .ui-popup-top-right .ui-dialog-arrow-b { 291 | right: 15px; 292 | } 293 | .ui-popup-bottom-left .ui-dialog-arrow-a, 294 | .ui-popup-bottom .ui-dialog-arrow-a, 295 | .ui-popup-bottom-right .ui-dialog-arrow-a { 296 | top: -16px; 297 | border-bottom:8px solid #7C7C7C; 298 | } 299 | .ui-popup-bottom-left .ui-dialog-arrow-b, 300 | .ui-popup-bottom .ui-dialog-arrow-b, 301 | .ui-popup-bottom-right .ui-dialog-arrow-b { 302 | top: -15px; 303 | border-bottom:8px solid #fff; 304 | } 305 | .ui-popup-bottom-left .ui-dialog-arrow-a, 306 | .ui-popup-bottom-left .ui-dialog-arrow-b { 307 | left: 15px; 308 | } 309 | .ui-popup-bottom .ui-dialog-arrow-a, 310 | .ui-popup-bottom .ui-dialog-arrow-b { 311 | margin-left: -8px; 312 | left: 50%; 313 | } 314 | .ui-popup-bottom-right .ui-dialog-arrow-a, 315 | .ui-popup-bottom-right .ui-dialog-arrow-b { 316 | right: 15px; 317 | } 318 | .ui-popup-left-top .ui-dialog-arrow-a, 319 | .ui-popup-left .ui-dialog-arrow-a, 320 | .ui-popup-left-bottom .ui-dialog-arrow-a { 321 | right: -16px; 322 | border-left:8px solid #7C7C7C; 323 | } 324 | .ui-popup-left-top .ui-dialog-arrow-b, 325 | .ui-popup-left .ui-dialog-arrow-b, 326 | .ui-popup-left-bottom .ui-dialog-arrow-b { 327 | right: -15px; 328 | border-left:8px solid #fff; 329 | } 330 | .ui-popup-left-top .ui-dialog-arrow-a, 331 | .ui-popup-left-top .ui-dialog-arrow-b { 332 | top: 15px; 333 | } 334 | .ui-popup-left .ui-dialog-arrow-a, 335 | .ui-popup-left .ui-dialog-arrow-b { 336 | margin-top: -8px; 337 | top: 50%; 338 | } 339 | .ui-popup-left-bottom .ui-dialog-arrow-a, 340 | .ui-popup-left-bottom .ui-dialog-arrow-b { 341 | bottom: 15px; 342 | } 343 | .ui-popup-right-top .ui-dialog-arrow-a, 344 | .ui-popup-right .ui-dialog-arrow-a, 345 | .ui-popup-right-bottom .ui-dialog-arrow-a { 346 | left: -16px; 347 | border-right:8px solid #7C7C7C; 348 | } 349 | .ui-popup-right-top .ui-dialog-arrow-b, 350 | .ui-popup-right .ui-dialog-arrow-b, 351 | .ui-popup-right-bottom .ui-dialog-arrow-b { 352 | left: -15px; 353 | border-right:8px solid #fff; 354 | } 355 | .ui-popup-right-top .ui-dialog-arrow-a, 356 | .ui-popup-right-top .ui-dialog-arrow-b { 357 | top: 15px; 358 | } 359 | .ui-popup-right .ui-dialog-arrow-a, 360 | .ui-popup-right .ui-dialog-arrow-b { 361 | margin-top: -8px; 362 | top: 50%; 363 | } 364 | .ui-popup-right-bottom .ui-dialog-arrow-a, 365 | .ui-popup-right-bottom .ui-dialog-arrow-b { 366 | bottom: 15px; 367 | } 368 | 369 | 370 | @-webkit-keyframes ui-dialog-loading { 371 | 0% { 372 | -webkit-transform: rotate(0deg); 373 | } 374 | 100% { 375 | -webkit-transform: rotate(360deg); 376 | } 377 | } 378 | @keyframes ui-dialog-loading { 379 | 0% { 380 | transform: rotate(0deg); 381 | } 382 | 100% { 383 | transform: rotate(360deg); 384 | } 385 | } 386 | 387 | .ui-dialog-loading { 388 | vertical-align: middle; 389 | position: relative; 390 | display: block; 391 | *zoom: 1; 392 | *display: inline; 393 | overflow: hidden; 394 | width: 32px; 395 | height: 32px; 396 | top: 50%; 397 | margin: -16px auto 0 auto; 398 | font-size: 0; 399 | text-indent: -999em; 400 | color: #666; 401 | } 402 | .ui-dialog-loading { 403 | width: 100%\9; 404 | text-indent: 0\9; 405 | line-height: 32px\9; 406 | text-align: center\9; 407 | font-size: 12px\9; 408 | } 409 | 410 | .ui-dialog-loading::after { 411 | position: absolute; 412 | content: ''; 413 | width: 3px; 414 | height: 3px; 415 | margin: 14.5px 0 0 14.5px; 416 | border-radius: 100%; 417 | box-shadow: 0 -10px 0 1px #ccc, 10px 0px #ccc, 0 10px #ccc, -10px 0 #ccc, -7px -7px 0 0.5px #ccc, 7px -7px 0 1.5px #ccc, 7px 7px #ccc, -7px 7px #ccc; 418 | -webkit-transform: rotate(360deg); 419 | -webkit-animation: ui-dialog-loading 1.5s infinite linear; 420 | transform: rotate(360deg); 421 | animation: ui-dialog-loading 1.5s infinite linear; 422 | display: none\9; 423 | } 424 | -------------------------------------------------------------------------------- /images/bodybg1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Beau-zihan/Lottery/8c5b3f30040a1128551b2fa2c9480e9155bb4b1a/images/bodybg1.jpg -------------------------------------------------------------------------------- /images/bodybg2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Beau-zihan/Lottery/8c5b3f30040a1128551b2fa2c9480e9155bb4b1a/images/bodybg2.jpg -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 公司年终抽奖专用程序 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |

▪ 按键盘空格键或者字母A可进行抽取,隐藏菜单请按ESC。

13 |

▪ ESC菜单中高级设置可以设置参与人数,格子大小,重置抽奖数据等信息。

14 |

▪ 点击已经中奖格子并输入点击的格子编号可取消该格子中奖状态,并清除中奖信息。

15 |

▪ 中奖信息保存在本机上,如清理缓存活更换机器则记录将消失。

16 |

▪ 请使用Chrome浏览器浏览,在投影仪上展示,请进入浏览器的全屏模式浏览。

17 |
18 |
19 | 20 |
21 |
22 |

标题:

23 |

人数:

24 |

方格宽:

25 |

方格高:

26 |

27 |

28 |

29 |

30 |

31 |
32 |
公司年终抽奖专用程序
33 |
34 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /js/app.js: -------------------------------------------------------------------------------- 1 | var bodyWidth = $("body").css("width"); 2 | $("div.items").css("width",(bodyWidth.substring(0,bodyWidth.length-2)-380)+"px"); 3 | 4 | //参与抽奖人数初始值 5 | var itemCount= 120; 6 | //跑马灯循环 7 | var tx; 8 | var runtx; 9 | //是否正在运行跑马灯 10 | var isRun=true; 11 | //是否跑马灯暂停状态 12 | var pause =false; 13 | //排名分组显示算法已经取消 14 | //var ts=20 15 | //默认跑马灯频率 16 | var pl=50; 17 | //程序是否开始运行用于判断程序是否开始运行 18 | var isStart=false; 19 | 20 | var zzs = "#98ff98"; 21 | //跑马灯音效 22 | var runingmic=document.getElementById("runingmic"); 23 | runingmic.volume=0.5; 24 | //中奖音效 25 | var pausemic=document.getElementById("pausemic"); 26 | pausemic.volume=1.0; 27 | 28 | var keyStatus=false; 29 | 30 | $("document").ready(function(){ 31 | 32 | //初始化皮肤 33 | if(localStorage.getItem("pf")){ 34 | var pf = localStorage.getItem("pf"); 35 | dynamicLoading.css("./css/style"+pf+".css"); 36 | $("#bodybg img").attr("src","./images/bodybg"+pf+".jpg"); 37 | $("input[name=pf][value="+pf+"]").attr("checked",true); 38 | if(pf!=1){ 39 | zzs="#ba3030"; 40 | } 41 | } 42 | //初始化标题 43 | if(localStorage.getItem("title")){ 44 | $("#title").val(localStorage.getItem("title")); 45 | } 46 | $(".top").text($("#title").val()); 47 | 48 | //频率模式本地存储 49 | if(localStorage.getItem("ms")){ 50 | pl = localStorage.getItem("ms"); 51 | $("input[name=ms][value="+pl+"]").attr("checked",true); 52 | } 53 | //排名信息本地存储 54 | if(localStorage.getItem("sequence")){ 55 | var ssHtml = localStorage.getItem("sequence"); 56 | $(".ss").html(ssHtml); 57 | } 58 | 59 | //已经取消的输入 60 | //var inputItemCount = prompt("请输入参与抽奖人数(请输入数字,输入非数字会按默认人数计算)。"); 61 | 62 | //本地排名信息存储 63 | if(localStorage.getItem("itemCount")){ 64 | itemCount=localStorage.getItem("itemCount"); 65 | } 66 | //本地设定回显 67 | $("#personCount").val(itemCount); 68 | 69 | //创建item小方格 70 | for(var i=1;i<=itemCount;i++){ 71 | $("div.items").append("
"+i+"
"); 72 | } 73 | //本地存储item宽度信息 74 | if(localStorage.getItem("itemk")){ 75 | $("div.item").css("width",localStorage.getItem("itemk")+"px"); 76 | } 77 | //本地存储item高度信息 78 | if(localStorage.getItem("itemg")){ 79 | $("div.item").css("height",localStorage.getItem("itemg")+"px"); 80 | $("div.item").css("line-height",localStorage.getItem("itemg")+"px"); 81 | } 82 | //回显设定item宽高 83 | $("#itemk").attr("placeholder",$(".i1").css("width")); 84 | $("#itemg").attr("placeholder",$(".i1").css("height")); 85 | 86 | //初始化排序信息 87 | $(".ss li").each(function(idx,item){ 88 | $(".i"+$(item).attr("data-number")).addClass("ignore"); 89 | }); 90 | 91 | //$("div.menu").css("height",$("div.items").css("height")); 92 | $("body").keyup(function(e){ 93 | keyStatus=false; 94 | }); 95 | //全局键盘事件监听 96 | $("body").keydown(function(e){ 97 | if(isStart){ 98 | if(!keyStatus){ 99 | keyStatus=true; 100 | }else{ 101 | return false; 102 | } 103 | } 104 | if(e.keyCode==116||e.keyCode==8){ 105 | return true; 106 | } 107 | //按F1弹出帮助窗口 108 | if(e.keyCode==112){ 109 | e.preventDefault(); 110 | showReadme(); 111 | return false; 112 | } 113 | //ESC案件呼出隐藏菜单 114 | if(e.keyCode==27){ 115 | if($(".help:hidden").size()>0) 116 | $(".help").show(); 117 | else 118 | $(".help").hide(); 119 | 120 | return false; 121 | } 122 | 123 | if(e.keyCode==37){ 124 | $(".prev").click(); 125 | return false; 126 | } 127 | if(e.keyCode==39){ 128 | $(".next").click(); 129 | return false; 130 | } 131 | //当程序出于暂停状态 132 | if(pause){ 133 | //以下按键有效 数字键 0-9 和 小键盘 0-9 134 | return true; 135 | } 136 | //存在未中奖用户切程序出于未开始运行状态执行开始方法 137 | if((e.keyCode==32||e.keyCode==65)&&$("div.item:not(.ignore)").size()!=0&&!isStart){ 138 | isStart=!isStart; 139 | startApp(); 140 | return false; 141 | } 142 | 143 | if(e.keyCode==32||e.keyCode==65){ 144 | 145 | //当所有抽奖号全部抽取完毕则销毁跑马和音效循环 146 | if($("div.item:not(.ignore)").size()==0){ 147 | clearInterval(tx); 148 | clearInterval(runtx); 149 | runingmic.puase(); 150 | 151 | alert("抽奖已经全部结束。"); 152 | return false; 153 | } 154 | //更新运行状态 155 | isRun=!isRun; 156 | //如果项目出于运行状态 157 | if(!isRun){ 158 | //取得当前选中号码 159 | var it = $(".item.active").text(); 160 | //停止跑马灯 161 | runingmic.pause(); 162 | //Math.floor($(".sequence li").size()/ts) 163 | 164 | //播放中奖音效 165 | pausemic.currentTime = 0; 166 | pausemic.play(); 167 | 168 | //中奖号处理 169 | var it=Number(it); 170 | var r; 171 | var n='很遗憾,什么都没抽中'; 172 | var j1='一等奖:蒂爵公司提供饰品一件(价值3000元)'; 173 | var j2='二等奖:蒂爵公司提供饰品一件(价值1000元)'; 174 | var j3='三等奖:U盘一件'; 175 | var j4='四等奖:公仔一件'; 176 | switch(it){ 177 | case 28: 178 | r=j1; 179 | break; 180 | case 35: 181 | case 75: 182 | case 93: 183 | r=j2; 184 | break; 185 | case 36: 186 | case 23: 187 | case 78: 188 | case 25: 189 | case 73: 190 | case 88: 191 | case 44: 192 | case 90: 193 | case 22: 194 | case 98: 195 | r=j3; 196 | break; 197 | case 4: 198 | case 8: 199 | case 12: 200 | case 45: 201 | case 76: 202 | case 83: 203 | case 87: 204 | case 24: 205 | case 99: 206 | case 110: 207 | case 120: 208 | case 85: 209 | case 87: 210 | case 2: 211 | case 5: 212 | case 9: 213 | case 13: 214 | case 111: 215 | case 77: 216 | case 20: 217 | r=j4; 218 | break; 219 | default: 220 | r=n; 221 | } 222 | $('.ss ol').append('
  • '+it+"号:"+r+';
  • '); 223 | if(r==n){ 224 | r='

    '+r+'!

    '; 225 | }else{ 226 | r='

    恭喜您,抽得'+r+'!

    '; 227 | } 228 | var dd = dialog({ 229 | title: '抽奖结果', 230 | content: r, 231 | okValue: '确定' 232 | }); 233 | dd.show(); 234 | localStorage.setItem("sequence",$(".ss").html()); 235 | $(".item.active").addClass("ignore"); 236 | $(".item.active").pulsate({ 237 | color: zzs, //#98ff98 238 | repeat: 5 239 | }); 240 | }else{ 241 | $(".active").removeClass("active"); 242 | runingmic.play(); 243 | } 244 | } 245 | 246 | e.preventDefault(); 247 | }); 248 | 249 | //打开高级设置窗口 250 | $("a.config").click(function(){ 251 | pause=true; 252 | runingmic.pause(); 253 | var d = dialog({ 254 | title: '抽奖参数设定', 255 | content: $(".model"), 256 | okValue: '确定', 257 | ok: function () { 258 | if($("#reset:checked").val()&&confirm("点击确定将清空抽奖结果。")){ 259 | localStorage.removeItem("sequence"); 260 | } 261 | if($("#personCount").val()){ 262 | localStorage.setItem("itemCount",$("#personCount").val()); 263 | } 264 | if($("#itemk").val()){ 265 | localStorage.setItem("itemk",$("#itemk").val()); 266 | } 267 | if($("#itemg").val()){ 268 | localStorage.setItem("itemg",$("#itemg").val()); 269 | } 270 | localStorage.setItem("title",$("#title").val()); 271 | localStorage.setItem("ms",$("input[name=ms]:checked").val()); 272 | localStorage.setItem("pf",$("input[name=pf]:checked").val()); 273 | 274 | window.location.reload(); 275 | },onclose: function () { 276 | pause=false; 277 | } 278 | }); 279 | d.show(); 280 | }); 281 | 282 | //清除错误中奖号 283 | $("body").on("click",".item.ignore",function(){ 284 | var inputItemCount = prompt("请输入点击的号码来进行删除中奖号码(例如“12”)。"); 285 | if(inputItemCount == $(this).text()){ 286 | $("li[data-number="+$(this).text()+"]").remove(); 287 | $(this).removeClass("ignore"); 288 | localStorage.setItem("sequence",$(".ss").html()); 289 | 290 | }else{ 291 | } 292 | 293 | }); 294 | }); 295 | //程序开始入口 296 | function startApp(){ 297 | //开始播放跑马灯音效 298 | runingmic.play(); 299 | //产生随机数临时变量 300 | var rand =0 301 | //存储上一次随机数的临时变量 302 | var prenum; 303 | tx=setInterval(function(){ 304 | if(isRun){ 305 | while(true){ 306 | rand=Math.floor(Math.random() * ( $("div.item:not(.ignore)").size())); 307 | if(rand ==0 || rand!=prenum){break;} 308 | } 309 | prenum=rand; 310 | $(".item.active").removeClass("active"); 311 | $("div.item:not(.ignore):not(.active)").eq(rand).addClass("active"); 312 | } 313 | },pl); 314 | runtx = setInterval(function(){runingmic.currentTime = 0;},7000); 315 | } 316 | function showReadme(){ 317 | var d = dialog({ 318 | title: '帮助信息', 319 | content: $(".readme") , 320 | width:'400px', 321 | okValue: '关闭', 322 | ok:function(){ 323 | }, 324 | onclose: function () { 325 | pause=false; 326 | } 327 | }).show(); 328 | } 329 | 330 | var dynamicLoading = { 331 | css: function(path){ 332 | if(!path || path.length === 0){ 333 | throw new Error('argument "path" is required !'); 334 | } 335 | var head = document.getElementsByTagName('head')[0]; 336 | var link = document.createElement('link'); 337 | link.href = path; 338 | link.rel = 'stylesheet'; 339 | link.type = 'text/css'; 340 | head.appendChild(link); 341 | }, 342 | js: function(path){ 343 | if(!path || path.length === 0){ 344 | throw new Error('argument "path" is required !'); 345 | } 346 | var head = document.getElementsByTagName('head')[0]; 347 | var script = document.createElement('script'); 348 | script.src = path; 349 | script.type = 'text/javascript'; 350 | head.appendChild(script); 351 | } 352 | } -------------------------------------------------------------------------------- /js/dialog-plus-min.js: -------------------------------------------------------------------------------- 1 | /*! artDialog v6.0.5 | https://github.com/aui/artDialog */ 2 | !function(){function a(b){var d=c[b],e="exports";return"object"==typeof d?d:(d[e]||(d[e]={},d[e]=d.call(d[e],a,d[e],d)||d[e]),d[e])}function b(a,b){c[a]=b}var c={};b("jquery",function(){return jQuery}),b("popup",function(a){function b(){this.destroyed=!1,this.__popup=c("
    ").css({display:"none",position:"absolute",outline:0}).attr("tabindex","-1").html(this.innerHTML).appendTo("body"),this.__backdrop=this.__mask=c("
    ").css({opacity:.7,background:"#000"}),this.node=this.__popup[0],this.backdrop=this.__backdrop[0],d++}var c=a("jquery"),d=0,e=!("minWidth"in c("html")[0].style),f=!e;return c.extend(b.prototype,{node:null,backdrop:null,fixed:!1,destroyed:!0,open:!1,returnValue:"",autofocus:!0,align:"bottom left",innerHTML:"",className:"ui-popup",show:function(a){if(this.destroyed)return this;var d=this.__popup,g=this.__backdrop;if(this.__activeElement=this.__getActive(),this.open=!0,this.follow=a||this.follow,!this.__ready){if(d.addClass(this.className).attr("role",this.modal?"alertdialog":"dialog").css("position",this.fixed?"fixed":"absolute"),e||c(window).on("resize",c.proxy(this.reset,this)),this.modal){var h={position:"fixed",left:0,top:0,width:"100%",height:"100%",overflow:"hidden",userSelect:"none",zIndex:this.zIndex||b.zIndex};d.addClass(this.className+"-modal"),f||c.extend(h,{position:"absolute",width:c(window).width()+"px",height:c(document).height()+"px"}),g.css(h).attr({tabindex:"0"}).on("focus",c.proxy(this.focus,this)),this.__mask=g.clone(!0).attr("style","").insertAfter(d),g.addClass(this.className+"-backdrop").insertBefore(d),this.__ready=!0}d.html()||d.html(this.innerHTML)}return d.addClass(this.className+"-show").show(),g.show(),this.reset().focus(),this.__dispatchEvent("show"),this},showModal:function(){return this.modal=!0,this.show.apply(this,arguments)},close:function(a){return!this.destroyed&&this.open&&(void 0!==a&&(this.returnValue=a),this.__popup.hide().removeClass(this.className+"-show"),this.__backdrop.hide(),this.open=!1,this.blur(),this.__dispatchEvent("close")),this},remove:function(){if(this.destroyed)return this;this.__dispatchEvent("beforeremove"),b.current===this&&(b.current=null),this.__popup.remove(),this.__backdrop.remove(),this.__mask.remove(),e||c(window).off("resize",this.reset),this.__dispatchEvent("remove");for(var a in this)delete this[a];return this},reset:function(){var a=this.follow;return a?this.__follow(a):this.__center(),this.__dispatchEvent("reset"),this},focus:function(){var a=this.node,d=this.__popup,e=b.current,f=this.zIndex=b.zIndex++;if(e&&e!==this&&e.blur(!1),!c.contains(a,this.__getActive())){var g=d.find("[autofocus]")[0];!this._autofocus&&g?this._autofocus=!0:g=a,this.__focus(g)}return d.css("zIndex",f),b.current=this,d.addClass(this.className+"-focus"),this.__dispatchEvent("focus"),this},blur:function(){var a=this.__activeElement,b=arguments[0];return b!==!1&&this.__focus(a),this._autofocus=!1,this.__popup.removeClass(this.className+"-focus"),this.__dispatchEvent("blur"),this},addEventListener:function(a,b){return this.__getEventListener(a).push(b),this},removeEventListener:function(a,b){for(var c=this.__getEventListener(a),d=0;dH[E[b]][1]&&(b=B[a]=D[b]),F[a][b]Loading..',title:"",statusbar:"",button:null,ok:null,cancel:null,okValue:"ok",cancelValue:"cancel",cancelDisplay:!0,width:"",height:"",padding:"",skin:"",quickClose:!1,cssUri:"../css/ui-dialog.css",innerHTML:'
    '}),b("dialog",function(a){var b=a("jquery"),c=a("popup"),d=a("dialog-config"),e=d.cssUri;if(e){var f=a[a.toUrl?"toUrl":"resolve"];f&&(e=f(e),e='',b("base")[0]?b("base").before(e):b("head").append(e))}var g=0,h=new Date-0,i=!("minWidth"in b("html")[0].style),j="createTouch"in document&&!("onmousemove"in document)||/(iPhone|iPad|iPod)/i.test(navigator.userAgent),k=!i&&!j,l=function(a,c,d){var e=a=a||{};("string"==typeof a||1===a.nodeType)&&(a={content:a,fixed:!j}),a=b.extend(!0,{},l.defaults,a),a.original=e;var f=a.id=a.id||h+g,i=l.get(f);return i?i.focus():(k||(a.fixed=!1),a.quickClose&&(a.modal=!0,a.backdropOpacity=0),b.isArray(a.button)||(a.button=[]),void 0!==d&&(a.cancel=d),a.cancel&&a.button.push({id:"cancel",value:a.cancelValue,callback:a.cancel,display:a.cancelDisplay}),void 0!==c&&(a.ok=c),a.ok&&a.button.push({id:"ok",value:a.okValue,callback:a.ok,autofocus:!0}),l.list[f]=new l.create(a))},m=function(){};m.prototype=c.prototype;var n=l.prototype=new m;return l.create=function(a){var d=this;b.extend(this,new c);var e=(a.original,b(this.node).html(a.innerHTML)),f=b(this.backdrop);return this.options=a,this._popup=e,b.each(a,function(a,b){"function"==typeof d[a]?d[a](b):d[a]=b}),a.zIndex&&(c.zIndex=a.zIndex),e.attr({"aria-labelledby":this._$("title").attr("id","title:"+this.id).attr("id"),"aria-describedby":this._$("content").attr("id","content:"+this.id).attr("id")}),this._$("close").css("display",this.cancel===!1?"none":"").attr("title",this.cancelValue).on("click",function(a){d._trigger("cancel"),a.preventDefault()}),this._$("dialog").addClass(this.skin),this._$("body").css("padding",this.padding),a.quickClose&&f.on("onmousedown"in document?"mousedown":"click",function(){return d._trigger("cancel"),!1}),this.addEventListener("show",function(){f.css({opacity:0,background:a.backdropBackground}).animate({opacity:a.backdropOpacity},150)}),this._esc=function(a){var b=a.target,e=b.nodeName,f=/^input|textarea$/i,g=c.current===d,h=a.keyCode;!g||f.test(e)&&"button"!==b.type||27===h&&d._trigger("cancel")},b(document).on("keydown",this._esc),this.addEventListener("remove",function(){b(document).off("keydown",this._esc),delete l.list[this.id]}),g++,l.oncreate(this),this},l.create.prototype=n,b.extend(n,{content:function(a){var c=this._$("content");return"object"==typeof a?(a=b(a),c.empty("").append(a.show()),this.addEventListener("beforeremove",function(){b("body").append(a.hide())})):c.html(a),this.reset()},title:function(a){return this._$("title").text(a),this._$("header")[a?"show":"hide"](),this},width:function(a){return this._$("content").css("width",a),this.reset()},height:function(a){return this._$("content").css("height",a),this.reset()},button:function(a){a=a||[];var c=this,d="",e=0;return this.callbacks={},"string"==typeof a?(d=a,e++):b.each(a,function(a,f){var g=f.id=f.id||f.value,h="";c.callbacks[g]=f.callback,f.display===!1?h=' style="display:none"':e++,d+='",c._$("button").on("click","[i-id="+g+"]",function(a){var d=b(this);d.attr("disabled")||c._trigger(g),a.preventDefault()})}),this._$("button").html(d),this._$("footer")[e?"show":"hide"](),this},statusbar:function(a){return this._$("statusbar").html(a)[a?"show":"hide"](),this},_$:function(a){return this._popup.find("[i="+a+"]")},_trigger:function(a){var b=this.callbacks[a];return"function"!=typeof b||b.call(this)!==!1?this.close().remove():this}}),l.oncreate=b.noop,l.getCurrent=function(){return c.current},l.get=function(a){return void 0===a?l.list:l.list[a]},l.list={},l.defaults=d,l}),b("drag",function(a){var b=a("jquery"),c=b(window),d=b(document),e="createTouch"in document,f=document.documentElement,g=!("minWidth"in f.style),h=!g&&"onlosecapture"in f,i="setCapture"in f,j={start:e?"touchstart":"mousedown",over:e?"touchmove":"mousemove",end:e?"touchend":"mouseup"},k=e?function(a){return a.touches||(a=a.originalEvent.touches.item(0)),a}:function(a){return a},l=function(){this.start=b.proxy(this.start,this),this.over=b.proxy(this.over,this),this.end=b.proxy(this.end,this),this.onstart=this.onover=this.onend=b.noop};return l.types=j,l.prototype={start:function(a){return a=this.startFix(a),d.on(j.over,this.over).on(j.end,this.end),this.onstart(a),!1},over:function(a){return a=this.overFix(a),this.onover(a),!1},end:function(a){return a=this.endFix(a),d.off(j.over,this.over).off(j.end,this.end),this.onend(a),!1},startFix:function(a){return a=k(a),this.target=b(a.target),this.selectstart=function(){return!1},d.on("selectstart",this.selectstart).on("dblclick",this.end),h?this.target.on("losecapture",this.end):c.on("blur",this.end),i&&this.target[0].setCapture(),a},overFix:function(a){return a=k(a)},endFix:function(a){return a=k(a),d.off("selectstart",this.selectstart).off("dblclick",this.end),h?this.target.off("losecapture",this.end):c.off("blur",this.end),i&&this.target[0].releaseCapture(),a}},l.create=function(a,e){var f,g,h,i,j=b(a),k=new l,m=l.types.start,n=function(){},o=a.className.replace(/^\s|\s.*/g,"")+"-drag-start",p={onstart:n,onover:n,onend:n,off:function(){j.off(m,k.start)}};return k.onstart=function(b){var e="fixed"===j.css("position"),k=d.scrollLeft(),l=d.scrollTop(),m=j.width(),n=j.height();f=0,g=0,h=e?c.width()-m+f:d.width()-m,i=e?c.height()-n+g:d.height()-n;var q=j.offset(),r=this.startLeft=e?q.left-k:q.left,s=this.startTop=e?q.top-l:q.top;this.clientX=b.clientX,this.clientY=b.clientY,j.addClass(o),p.onstart.call(a,b,r,s)},k.onover=function(b){var c=b.clientX-this.clientX+this.startLeft,d=b.clientY-this.clientY+this.startTop,e=j[0].style;c=Math.max(f,Math.min(h,c)),d=Math.max(g,Math.min(i,d)),e.left=c+"px",e.top=d+"px",p.onover.call(a,b,c,d)},k.onend=function(b){var c=j.position(),d=c.left,e=c.top;j.removeClass(o),p.onend.call(a,b,d,e)},k.off=function(){j.off(m,k.start)},e?k.start(e):j.on(m,k.start),p},l}),b("dialog-plus",function(a){var b=a("jquery"),c=a("dialog"),d=a("drag");return c.oncreate=function(a){var c,e=a.options,f=e.original,g=e.url,h=e.oniframeload;if(g&&(this.padding=e.padding=0,c=b("