├── README.md ├── ajax_suggest.php ├── ajax_suggest_excerpts.php ├── common.php ├── css ├── bootstrap-responsive.css ├── bootstrap-responsive.min.css ├── bootstrap.css ├── bootstrap.min.css ├── images │ ├── ui-bg_diagonals-thick_18_b81900_40x40.png │ ├── ui-bg_diagonals-thick_20_666666_40x40.png │ ├── ui-bg_flat_10_000000_40x100.png │ ├── ui-bg_glass_100_f6f6f6_1x400.png │ ├── ui-bg_glass_100_fdf5ce_1x400.png │ ├── ui-bg_glass_65_ffffff_1x400.png │ ├── ui-bg_gloss-wave_35_f6a828_500x100.png │ ├── ui-bg_highlight-soft_100_eeeeee_1x100.png │ ├── ui-bg_highlight-soft_75_ffe45c_1x100.png │ ├── ui-icons_222222_256x240.png │ ├── ui-icons_228ef1_256x240.png │ ├── ui-icons_ef8c08_256x240.png │ ├── ui-icons_ffd27a_256x240.png │ └── ui-icons_ffffff_256x240.png ├── jquery-ui-1.8.21.custom.css ├── my.less └── style.css ├── functions.php ├── img ├── glyphicons-halflings-white.png └── glyphicons-halflings.png ├── index.php ├── js ├── bootstrap-typeahead.js ├── bootstrap.js ├── bootstrap.min.js ├── less-1.3.0.min.js └── less.min.js ├── qsuggest.php ├── scripts ├── docs.tar.gz ├── sphinx.conf ├── suggest.tar.gz └── suggest │ ├── README │ └── suggest.php ├── suggestcomplete.php ├── suggestcompleteexcerpts.php └── template ├── footer.php ├── footer_excerpts.php ├── header.php └── paginator.php /README.md: -------------------------------------------------------------------------------- 1 | SphinxAutocompleteExample 2 | ========================= 3 | 4 | These samples illustrate autocomplete and type suggestion using Manticore/Sphinx search. 5 | Querying is made via SphinxQL using PDO driver. 6 | The sample data included contains a version of Sphinx documentation. 7 | The samples are featured on [this Sphinx blog post] (http://sphinxsearch.com/blog/2013/05/21/simple-autocomplete-and-correction-suggestion/). 8 | 9 | Requirements : 10 | ------------------------------------------- 11 | LAMP 12 | Manticore or Sphinx search 13 | PHP with PDO mysql 14 | 15 | Installation : 16 | ------------------------------------------- 17 | Edit `scripts/sphinx.conf` for setting proper paths and db credentials 18 | Import the sample tables in your database. 19 | Untar first the two archieves in `scripts` folder: 20 | 21 | $ tar -xzvf suggest.tar.gz 22 | $ tar -xzvf docs.tar.gz 23 | $ mysql < suggest.sql 24 | $ mysql < docs.sql 25 | Alternative you can build the suggest table by following instructions in `scripts/suggest/README` 26 | 27 | The samples use 3 indexes : `simplecompletefull` for doing the actual search, `simplecomplete` for autocomplete and `suggest` for suggestions. 28 | `simpletecompletefull` can be used for autocomplete as well, if the search for completion is made only on title ( `@title $query` ). 29 | Index the 3 indexes: 30 | 31 | $ indexer -c /path/to/sphinx.conf --all 32 | 33 | Start a new Manticore/Sphinx server using sphinx.conf from `scripts` folder or import the indexes if you already have a running Sphinx server. 34 | 35 | $ searchd -c /path/to/sphinx.conf 36 | In case you start a new Manticore/Sphinx server, be sure to change the ports in **sphinx.conf** and **common.php**. 37 | In **common.php** edit the database credentials. For Sphinx 2.1.1 or greater/Manticore or trunk version, set constant `SPHINX_20` to **false**. 38 | Autocomplete starts after typing 3 characters. To change this you need to edit in **sphinx.conf** `min_prefix_len` and `min_word_len` and in **footer.php** and **footer_excerpts.php** the `minLength` ( which trigger firing the ajax call). 39 | 40 | Live demo with Sphinx : 41 | ------------------------------------------- 42 | http://demos.sphinxsearch.com/SphinxAutocompleteExample/ 43 | License: 44 | ------------------------------------------- 45 | Sphinx Samples is free software, and is released under the terms of the GPL version 2 or (at your option) any later version. 46 | Manticore website : https://manticoresearch.com/ 47 | Manticore repository : https://github.com/manticoresoftware/manticore 48 | Sphinx website : http://sphinxsearch.com/ 49 | Sphinx read-only repository :https://github.com/sphinxsearch/sphinx 50 | -------------------------------------------------------------------------------- /ajax_suggest.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM $indexes WHERE MATCH(:match) LIMIT 0,10 OPTION ranker=sph04"); 9 | 10 | 11 | $aq = explode(' ',$q); 12 | if(strlen($aq[count($aq)-1])<3){ 13 | $query = $q; 14 | }else{ 15 | $query = $q.'*'; 16 | } 17 | $stmt->bindValue(':match', $query,PDO::PARAM_STR); 18 | $stmt->execute(); 19 | 20 | foreach($stmt->fetchAll() as $r){ 21 | $arr[] = array('id' => utf8_encode($r['title']),'label' =>utf8_encode( $r['title'])); 22 | } 23 | 24 | echo json_encode($arr); 25 | exit(); 26 | -------------------------------------------------------------------------------- /ajax_suggest_excerpts.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM $indexes WHERE MATCH(:match) LIMIT 0,10 OPTION ranker=sph04"); 9 | 10 | 11 | $aq = explode(' ',$q); 12 | if(strlen($aq[count($aq)-1])<3){ 13 | $query = $q; 14 | }else{ 15 | $query = $q.'*'; 16 | } 17 | $stmt->bindValue(':match', $query,PDO::PARAM_STR); 18 | $stmt->execute(); 19 | 20 | $docs = array(); 21 | $title = ""; 22 | $stmsnp = $ln_sph->prepare("CALL SNIPPETS(:doc,'simplecomplete',:query)"); 23 | $stmsnp->bindValue(':query',$query,PDO::PARAM_STR); 24 | $stmsnp->bindParam(':doc',$title,PDO::PARAM_STR); 25 | 26 | foreach($stmt->fetchAll() as $r){ 27 | $title = $r['title']; 28 | $stmsnp->execute(); 29 | $r = $stmsnp->fetch(); 30 | $arr[] = array('id' => utf8_encode($r['snippet']),'label' =>utf8_encode( $r['snippet'])); 31 | } 32 | 33 | 34 | echo json_encode($arr); 35 | exit(); 36 | -------------------------------------------------------------------------------- /common.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /css/bootstrap-responsive.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Responsive v2.0.4 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */ 10 | 11 | .clearfix { 12 | *zoom: 1; 13 | } 14 | 15 | .clearfix:before, 16 | .clearfix:after { 17 | display: table; 18 | content: ""; 19 | } 20 | 21 | .clearfix:after { 22 | clear: both; 23 | } 24 | 25 | .hide-text { 26 | font: 0/0 a; 27 | color: transparent; 28 | text-shadow: none; 29 | background-color: transparent; 30 | border: 0; 31 | } 32 | 33 | .input-block-level { 34 | display: block; 35 | width: 100%; 36 | min-height: 28px; 37 | -webkit-box-sizing: border-box; 38 | -moz-box-sizing: border-box; 39 | -ms-box-sizing: border-box; 40 | box-sizing: border-box; 41 | } 42 | 43 | .hidden { 44 | display: none; 45 | visibility: hidden; 46 | } 47 | 48 | .visible-phone { 49 | display: none !important; 50 | } 51 | 52 | .visible-tablet { 53 | display: none !important; 54 | } 55 | 56 | .hidden-desktop { 57 | display: none !important; 58 | } 59 | 60 | @media (max-width: 767px) { 61 | .visible-phone { 62 | display: inherit !important; 63 | } 64 | .hidden-phone { 65 | display: none !important; 66 | } 67 | .hidden-desktop { 68 | display: inherit !important; 69 | } 70 | .visible-desktop { 71 | display: none !important; 72 | } 73 | } 74 | 75 | @media (min-width: 768px) and (max-width: 979px) { 76 | .visible-tablet { 77 | display: inherit !important; 78 | } 79 | .hidden-tablet { 80 | display: none !important; 81 | } 82 | .hidden-desktop { 83 | display: inherit !important; 84 | } 85 | .visible-desktop { 86 | display: none !important ; 87 | } 88 | } 89 | 90 | @media (max-width: 480px) { 91 | .nav-collapse { 92 | -webkit-transform: translate3d(0, 0, 0); 93 | } 94 | .page-header h1 small { 95 | display: block; 96 | line-height: 18px; 97 | } 98 | input[type="checkbox"], 99 | input[type="radio"] { 100 | border: 1px solid #ccc; 101 | } 102 | .form-horizontal .control-group > label { 103 | float: none; 104 | width: auto; 105 | padding-top: 0; 106 | text-align: left; 107 | } 108 | .form-horizontal .controls { 109 | margin-left: 0; 110 | } 111 | .form-horizontal .control-list { 112 | padding-top: 0; 113 | } 114 | .form-horizontal .form-actions { 115 | padding-right: 10px; 116 | padding-left: 10px; 117 | } 118 | .modal { 119 | position: absolute; 120 | top: 10px; 121 | right: 10px; 122 | left: 10px; 123 | width: auto; 124 | margin: 0; 125 | } 126 | .modal.fade.in { 127 | top: auto; 128 | } 129 | .modal-header .close { 130 | padding: 10px; 131 | margin: -10px; 132 | } 133 | .carousel-caption { 134 | position: static; 135 | } 136 | } 137 | 138 | @media (max-width: 767px) { 139 | body { 140 | padding-right: 20px; 141 | padding-left: 20px; 142 | } 143 | .navbar-fixed-top, 144 | .navbar-fixed-bottom { 145 | margin-right: -20px; 146 | margin-left: -20px; 147 | } 148 | .container-fluid { 149 | padding: 0; 150 | } 151 | .dl-horizontal dt { 152 | float: none; 153 | width: auto; 154 | clear: none; 155 | text-align: left; 156 | } 157 | .dl-horizontal dd { 158 | margin-left: 0; 159 | } 160 | .container { 161 | width: auto; 162 | } 163 | .row-fluid { 164 | width: 100%; 165 | } 166 | .row, 167 | .thumbnails { 168 | margin-left: 0; 169 | } 170 | [class*="span"], 171 | .row-fluid [class*="span"] { 172 | display: block; 173 | float: none; 174 | width: auto; 175 | margin-left: 0; 176 | } 177 | .input-large, 178 | .input-xlarge, 179 | .input-xxlarge, 180 | input[class*="span"], 181 | select[class*="span"], 182 | textarea[class*="span"], 183 | .uneditable-input { 184 | display: block; 185 | width: 100%; 186 | min-height: 28px; 187 | -webkit-box-sizing: border-box; 188 | -moz-box-sizing: border-box; 189 | -ms-box-sizing: border-box; 190 | box-sizing: border-box; 191 | } 192 | .input-prepend input, 193 | .input-append input, 194 | .input-prepend input[class*="span"], 195 | .input-append input[class*="span"] { 196 | display: inline-block; 197 | width: auto; 198 | } 199 | } 200 | 201 | @media (min-width: 768px) and (max-width: 979px) { 202 | .row { 203 | margin-left: -20px; 204 | *zoom: 1; 205 | } 206 | .row:before, 207 | .row:after { 208 | display: table; 209 | content: ""; 210 | } 211 | .row:after { 212 | clear: both; 213 | } 214 | [class*="span"] { 215 | float: left; 216 | margin-left: 20px; 217 | } 218 | .container, 219 | .navbar-fixed-top .container, 220 | .navbar-fixed-bottom .container { 221 | width: 724px; 222 | } 223 | .span12 { 224 | width: 724px; 225 | } 226 | .span11 { 227 | width: 662px; 228 | } 229 | .span10 { 230 | width: 600px; 231 | } 232 | .span9 { 233 | width: 538px; 234 | } 235 | .span8 { 236 | width: 476px; 237 | } 238 | .span7 { 239 | width: 414px; 240 | } 241 | .span6 { 242 | width: 352px; 243 | } 244 | .span5 { 245 | width: 290px; 246 | } 247 | .span4 { 248 | width: 228px; 249 | } 250 | .span3 { 251 | width: 166px; 252 | } 253 | .span2 { 254 | width: 104px; 255 | } 256 | .span1 { 257 | width: 42px; 258 | } 259 | .offset12 { 260 | margin-left: 764px; 261 | } 262 | .offset11 { 263 | margin-left: 702px; 264 | } 265 | .offset10 { 266 | margin-left: 640px; 267 | } 268 | .offset9 { 269 | margin-left: 578px; 270 | } 271 | .offset8 { 272 | margin-left: 516px; 273 | } 274 | .offset7 { 275 | margin-left: 454px; 276 | } 277 | .offset6 { 278 | margin-left: 392px; 279 | } 280 | .offset5 { 281 | margin-left: 330px; 282 | } 283 | .offset4 { 284 | margin-left: 268px; 285 | } 286 | .offset3 { 287 | margin-left: 206px; 288 | } 289 | .offset2 { 290 | margin-left: 144px; 291 | } 292 | .offset1 { 293 | margin-left: 82px; 294 | } 295 | .row-fluid { 296 | width: 100%; 297 | *zoom: 1; 298 | } 299 | .row-fluid:before, 300 | .row-fluid:after { 301 | display: table; 302 | content: ""; 303 | } 304 | .row-fluid:after { 305 | clear: both; 306 | } 307 | .row-fluid [class*="span"] { 308 | display: block; 309 | float: left; 310 | width: 100%; 311 | min-height: 28px; 312 | margin-left: 2.762430939%; 313 | *margin-left: 2.709239449638298%; 314 | -webkit-box-sizing: border-box; 315 | -moz-box-sizing: border-box; 316 | -ms-box-sizing: border-box; 317 | box-sizing: border-box; 318 | } 319 | .row-fluid [class*="span"]:first-child { 320 | margin-left: 0; 321 | } 322 | .row-fluid .span12 { 323 | width: 99.999999993%; 324 | *width: 99.9468085036383%; 325 | } 326 | .row-fluid .span11 { 327 | width: 91.436464082%; 328 | *width: 91.38327259263829%; 329 | } 330 | .row-fluid .span10 { 331 | width: 82.87292817100001%; 332 | *width: 82.8197366816383%; 333 | } 334 | .row-fluid .span9 { 335 | width: 74.30939226%; 336 | *width: 74.25620077063829%; 337 | } 338 | .row-fluid .span8 { 339 | width: 65.74585634900001%; 340 | *width: 65.6926648596383%; 341 | } 342 | .row-fluid .span7 { 343 | width: 57.182320438000005%; 344 | *width: 57.129128948638304%; 345 | } 346 | .row-fluid .span6 { 347 | width: 48.618784527%; 348 | *width: 48.5655930376383%; 349 | } 350 | .row-fluid .span5 { 351 | width: 40.055248616%; 352 | *width: 40.0020571266383%; 353 | } 354 | .row-fluid .span4 { 355 | width: 31.491712705%; 356 | *width: 31.4385212156383%; 357 | } 358 | .row-fluid .span3 { 359 | width: 22.928176794%; 360 | *width: 22.874985304638297%; 361 | } 362 | .row-fluid .span2 { 363 | width: 14.364640883%; 364 | *width: 14.311449393638298%; 365 | } 366 | .row-fluid .span1 { 367 | width: 5.801104972%; 368 | *width: 5.747913482638298%; 369 | } 370 | input, 371 | textarea, 372 | .uneditable-input { 373 | margin-left: 0; 374 | } 375 | input.span12, 376 | textarea.span12, 377 | .uneditable-input.span12 { 378 | width: 714px; 379 | } 380 | input.span11, 381 | textarea.span11, 382 | .uneditable-input.span11 { 383 | width: 652px; 384 | } 385 | input.span10, 386 | textarea.span10, 387 | .uneditable-input.span10 { 388 | width: 590px; 389 | } 390 | input.span9, 391 | textarea.span9, 392 | .uneditable-input.span9 { 393 | width: 528px; 394 | } 395 | input.span8, 396 | textarea.span8, 397 | .uneditable-input.span8 { 398 | width: 466px; 399 | } 400 | input.span7, 401 | textarea.span7, 402 | .uneditable-input.span7 { 403 | width: 404px; 404 | } 405 | input.span6, 406 | textarea.span6, 407 | .uneditable-input.span6 { 408 | width: 342px; 409 | } 410 | input.span5, 411 | textarea.span5, 412 | .uneditable-input.span5 { 413 | width: 280px; 414 | } 415 | input.span4, 416 | textarea.span4, 417 | .uneditable-input.span4 { 418 | width: 218px; 419 | } 420 | input.span3, 421 | textarea.span3, 422 | .uneditable-input.span3 { 423 | width: 156px; 424 | } 425 | input.span2, 426 | textarea.span2, 427 | .uneditable-input.span2 { 428 | width: 94px; 429 | } 430 | input.span1, 431 | textarea.span1, 432 | .uneditable-input.span1 { 433 | width: 32px; 434 | } 435 | } 436 | 437 | @media (min-width: 1200px) { 438 | .row { 439 | margin-left: -30px; 440 | *zoom: 1; 441 | } 442 | .row:before, 443 | .row:after { 444 | display: table; 445 | content: ""; 446 | } 447 | .row:after { 448 | clear: both; 449 | } 450 | [class*="span"] { 451 | float: left; 452 | margin-left: 30px; 453 | } 454 | .container, 455 | .navbar-fixed-top .container, 456 | .navbar-fixed-bottom .container { 457 | width: 1170px; 458 | } 459 | .span12 { 460 | width: 1170px; 461 | } 462 | .span11 { 463 | width: 1070px; 464 | } 465 | .span10 { 466 | width: 970px; 467 | } 468 | .span9 { 469 | width: 870px; 470 | } 471 | .span8 { 472 | width: 770px; 473 | } 474 | .span7 { 475 | width: 670px; 476 | } 477 | .span6 { 478 | width: 570px; 479 | } 480 | .span5 { 481 | width: 470px; 482 | } 483 | .span4 { 484 | width: 370px; 485 | } 486 | .span3 { 487 | width: 270px; 488 | } 489 | .span2 { 490 | width: 170px; 491 | } 492 | .span1 { 493 | width: 70px; 494 | } 495 | .offset12 { 496 | margin-left: 1230px; 497 | } 498 | .offset11 { 499 | margin-left: 1130px; 500 | } 501 | .offset10 { 502 | margin-left: 1030px; 503 | } 504 | .offset9 { 505 | margin-left: 930px; 506 | } 507 | .offset8 { 508 | margin-left: 830px; 509 | } 510 | .offset7 { 511 | margin-left: 730px; 512 | } 513 | .offset6 { 514 | margin-left: 630px; 515 | } 516 | .offset5 { 517 | margin-left: 530px; 518 | } 519 | .offset4 { 520 | margin-left: 430px; 521 | } 522 | .offset3 { 523 | margin-left: 330px; 524 | } 525 | .offset2 { 526 | margin-left: 230px; 527 | } 528 | .offset1 { 529 | margin-left: 130px; 530 | } 531 | .row-fluid { 532 | width: 100%; 533 | *zoom: 1; 534 | } 535 | .row-fluid:before, 536 | .row-fluid:after { 537 | display: table; 538 | content: ""; 539 | } 540 | .row-fluid:after { 541 | clear: both; 542 | } 543 | .row-fluid [class*="span"] { 544 | display: block; 545 | float: left; 546 | width: 100%; 547 | min-height: 28px; 548 | margin-left: 2.564102564%; 549 | *margin-left: 2.510911074638298%; 550 | -webkit-box-sizing: border-box; 551 | -moz-box-sizing: border-box; 552 | -ms-box-sizing: border-box; 553 | box-sizing: border-box; 554 | } 555 | .row-fluid [class*="span"]:first-child { 556 | margin-left: 0; 557 | } 558 | .row-fluid .span12 { 559 | width: 100%; 560 | *width: 99.94680851063829%; 561 | } 562 | .row-fluid .span11 { 563 | width: 91.45299145300001%; 564 | *width: 91.3997999636383%; 565 | } 566 | .row-fluid .span10 { 567 | width: 82.905982906%; 568 | *width: 82.8527914166383%; 569 | } 570 | .row-fluid .span9 { 571 | width: 74.358974359%; 572 | *width: 74.30578286963829%; 573 | } 574 | .row-fluid .span8 { 575 | width: 65.81196581200001%; 576 | *width: 65.7587743226383%; 577 | } 578 | .row-fluid .span7 { 579 | width: 57.264957265%; 580 | *width: 57.2117657756383%; 581 | } 582 | .row-fluid .span6 { 583 | width: 48.717948718%; 584 | *width: 48.6647572286383%; 585 | } 586 | .row-fluid .span5 { 587 | width: 40.170940171000005%; 588 | *width: 40.117748681638304%; 589 | } 590 | .row-fluid .span4 { 591 | width: 31.623931624%; 592 | *width: 31.5707401346383%; 593 | } 594 | .row-fluid .span3 { 595 | width: 23.076923077%; 596 | *width: 23.0237315876383%; 597 | } 598 | .row-fluid .span2 { 599 | width: 14.529914530000001%; 600 | *width: 14.4767230406383%; 601 | } 602 | .row-fluid .span1 { 603 | width: 5.982905983%; 604 | *width: 5.929714493638298%; 605 | } 606 | input, 607 | textarea, 608 | .uneditable-input { 609 | margin-left: 0; 610 | } 611 | input.span12, 612 | textarea.span12, 613 | .uneditable-input.span12 { 614 | width: 1160px; 615 | } 616 | input.span11, 617 | textarea.span11, 618 | .uneditable-input.span11 { 619 | width: 1060px; 620 | } 621 | input.span10, 622 | textarea.span10, 623 | .uneditable-input.span10 { 624 | width: 960px; 625 | } 626 | input.span9, 627 | textarea.span9, 628 | .uneditable-input.span9 { 629 | width: 860px; 630 | } 631 | input.span8, 632 | textarea.span8, 633 | .uneditable-input.span8 { 634 | width: 760px; 635 | } 636 | input.span7, 637 | textarea.span7, 638 | .uneditable-input.span7 { 639 | width: 660px; 640 | } 641 | input.span6, 642 | textarea.span6, 643 | .uneditable-input.span6 { 644 | width: 560px; 645 | } 646 | input.span5, 647 | textarea.span5, 648 | .uneditable-input.span5 { 649 | width: 460px; 650 | } 651 | input.span4, 652 | textarea.span4, 653 | .uneditable-input.span4 { 654 | width: 360px; 655 | } 656 | input.span3, 657 | textarea.span3, 658 | .uneditable-input.span3 { 659 | width: 260px; 660 | } 661 | input.span2, 662 | textarea.span2, 663 | .uneditable-input.span2 { 664 | width: 160px; 665 | } 666 | input.span1, 667 | textarea.span1, 668 | .uneditable-input.span1 { 669 | width: 60px; 670 | } 671 | .thumbnails { 672 | margin-left: -30px; 673 | } 674 | .thumbnails > li { 675 | margin-left: 30px; 676 | } 677 | .row-fluid .thumbnails { 678 | margin-left: 0; 679 | } 680 | } 681 | 682 | @media (max-width: 979px) { 683 | body { 684 | padding-top: 0; 685 | } 686 | .navbar-fixed-top, 687 | .navbar-fixed-bottom { 688 | position: static; 689 | } 690 | .navbar-fixed-top { 691 | margin-bottom: 18px; 692 | } 693 | .navbar-fixed-bottom { 694 | margin-top: 18px; 695 | } 696 | .navbar-fixed-top .navbar-inner, 697 | .navbar-fixed-bottom .navbar-inner { 698 | padding: 5px; 699 | } 700 | .navbar .container { 701 | width: auto; 702 | padding: 0; 703 | } 704 | .navbar .brand { 705 | padding-right: 10px; 706 | padding-left: 10px; 707 | margin: 0 0 0 -5px; 708 | } 709 | .nav-collapse { 710 | clear: both; 711 | } 712 | .nav-collapse .nav { 713 | float: none; 714 | margin: 0 0 9px; 715 | } 716 | .nav-collapse .nav > li { 717 | float: none; 718 | } 719 | .nav-collapse .nav > li > a { 720 | margin-bottom: 2px; 721 | } 722 | .nav-collapse .nav > .divider-vertical { 723 | display: none; 724 | } 725 | .nav-collapse .nav .nav-header { 726 | color: #999999; 727 | text-shadow: none; 728 | } 729 | .nav-collapse .nav > li > a, 730 | .nav-collapse .dropdown-menu a { 731 | padding: 6px 15px; 732 | font-weight: bold; 733 | color: #999999; 734 | -webkit-border-radius: 3px; 735 | -moz-border-radius: 3px; 736 | border-radius: 3px; 737 | } 738 | .nav-collapse .btn { 739 | padding: 4px 10px 4px; 740 | font-weight: normal; 741 | -webkit-border-radius: 4px; 742 | -moz-border-radius: 4px; 743 | border-radius: 4px; 744 | } 745 | .nav-collapse .dropdown-menu li + li a { 746 | margin-bottom: 2px; 747 | } 748 | .nav-collapse .nav > li > a:hover, 749 | .nav-collapse .dropdown-menu a:hover { 750 | background-color: #222222; 751 | } 752 | .nav-collapse.in .btn-group { 753 | padding: 0; 754 | margin-top: 5px; 755 | } 756 | .nav-collapse .dropdown-menu { 757 | position: static; 758 | top: auto; 759 | left: auto; 760 | display: block; 761 | float: none; 762 | max-width: none; 763 | padding: 0; 764 | margin: 0 15px; 765 | background-color: transparent; 766 | border: none; 767 | -webkit-border-radius: 0; 768 | -moz-border-radius: 0; 769 | border-radius: 0; 770 | -webkit-box-shadow: none; 771 | -moz-box-shadow: none; 772 | box-shadow: none; 773 | } 774 | .nav-collapse .dropdown-menu:before, 775 | .nav-collapse .dropdown-menu:after { 776 | display: none; 777 | } 778 | .nav-collapse .dropdown-menu .divider { 779 | display: none; 780 | } 781 | .nav-collapse .navbar-form, 782 | .nav-collapse .navbar-search { 783 | float: none; 784 | padding: 9px 15px; 785 | margin: 9px 0; 786 | border-top: 1px solid #222222; 787 | border-bottom: 1px solid #222222; 788 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 789 | -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 790 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 791 | } 792 | .navbar .nav-collapse .nav.pull-right { 793 | float: none; 794 | margin-left: 0; 795 | } 796 | .nav-collapse, 797 | .nav-collapse.collapse { 798 | height: 0; 799 | overflow: hidden; 800 | } 801 | .navbar .btn-navbar { 802 | display: block; 803 | } 804 | .navbar-static .navbar-inner { 805 | padding-right: 10px; 806 | padding-left: 10px; 807 | } 808 | } 809 | 810 | @media (min-width: 980px) { 811 | .nav-collapse.collapse { 812 | height: auto !important; 813 | overflow: visible !important; 814 | } 815 | } 816 | -------------------------------------------------------------------------------- /css/bootstrap-responsive.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Responsive v2.0.4 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}@media(max-width:767px){.visible-phone{display:inherit!important}.hidden-phone{display:none!important}.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}}@media(min-width:768px) and (max-width:979px){.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:18px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-group>label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.modal{position:absolute;top:10px;right:10px;left:10px;width:auto;margin:0}.modal.fade.in{top:auto}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:auto;margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:20px}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:28px;margin-left:2.762430939%;*margin-left:2.709239449638298%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:99.999999993%;*width:99.9468085036383%}.row-fluid .span11{width:91.436464082%;*width:91.38327259263829%}.row-fluid .span10{width:82.87292817100001%;*width:82.8197366816383%}.row-fluid .span9{width:74.30939226%;*width:74.25620077063829%}.row-fluid .span8{width:65.74585634900001%;*width:65.6926648596383%}.row-fluid .span7{width:57.182320438000005%;*width:57.129128948638304%}.row-fluid .span6{width:48.618784527%;*width:48.5655930376383%}.row-fluid .span5{width:40.055248616%;*width:40.0020571266383%}.row-fluid .span4{width:31.491712705%;*width:31.4385212156383%}.row-fluid .span3{width:22.928176794%;*width:22.874985304638297%}.row-fluid .span2{width:14.364640883%;*width:14.311449393638298%}.row-fluid .span1{width:5.801104972%;*width:5.747913482638298%}input,textarea,.uneditable-input{margin-left:0}input.span12,textarea.span12,.uneditable-input.span12{width:714px}input.span11,textarea.span11,.uneditable-input.span11{width:652px}input.span10,textarea.span10,.uneditable-input.span10{width:590px}input.span9,textarea.span9,.uneditable-input.span9{width:528px}input.span8,textarea.span8,.uneditable-input.span8{width:466px}input.span7,textarea.span7,.uneditable-input.span7{width:404px}input.span6,textarea.span6,.uneditable-input.span6{width:342px}input.span5,textarea.span5,.uneditable-input.span5{width:280px}input.span4,textarea.span4,.uneditable-input.span4{width:218px}input.span3,textarea.span3,.uneditable-input.span3{width:156px}input.span2,textarea.span2,.uneditable-input.span2{width:94px}input.span1,textarea.span1,.uneditable-input.span1{width:32px}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:30px}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:28px;margin-left:2.564102564%;*margin-left:2.510911074638298%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145300001%;*width:91.3997999636383%}.row-fluid .span10{width:82.905982906%;*width:82.8527914166383%}.row-fluid .span9{width:74.358974359%;*width:74.30578286963829%}.row-fluid .span8{width:65.81196581200001%;*width:65.7587743226383%}.row-fluid .span7{width:57.264957265%;*width:57.2117657756383%}.row-fluid .span6{width:48.717948718%;*width:48.6647572286383%}.row-fluid .span5{width:40.170940171000005%;*width:40.117748681638304%}.row-fluid .span4{width:31.623931624%;*width:31.5707401346383%}.row-fluid .span3{width:23.076923077%;*width:23.0237315876383%}.row-fluid .span2{width:14.529914530000001%;*width:14.4767230406383%}.row-fluid .span1{width:5.982905983%;*width:5.929714493638298%}input,textarea,.uneditable-input{margin-left:0}input.span12,textarea.span12,.uneditable-input.span12{width:1160px}input.span11,textarea.span11,.uneditable-input.span11{width:1060px}input.span10,textarea.span10,.uneditable-input.span10{width:960px}input.span9,textarea.span9,.uneditable-input.span9{width:860px}input.span8,textarea.span8,.uneditable-input.span8{width:760px}input.span7,textarea.span7,.uneditable-input.span7{width:660px}input.span6,textarea.span6,.uneditable-input.span6{width:560px}input.span5,textarea.span5,.uneditable-input.span5{width:460px}input.span4,textarea.span4,.uneditable-input.span4{width:360px}input.span3,textarea.span3,.uneditable-input.span3{width:260px}input.span2,textarea.span2,.uneditable-input.span2{width:160px}input.span1,textarea.span1,.uneditable-input.span1{width:60px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:18px}.navbar-fixed-bottom{margin-top:18px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 9px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#999;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:6px 15px;font-weight:bold;color:#999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#222}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:block;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:9px 15px;margin:9px 0;border-top:1px solid #222;border-bottom:1px solid #222;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} 10 | -------------------------------------------------------------------------------- /css/images/ui-bg_diagonals-thick_18_b81900_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png -------------------------------------------------------------------------------- /css/images/ui-bg_diagonals-thick_20_666666_40x40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/css/images/ui-bg_diagonals-thick_20_666666_40x40.png -------------------------------------------------------------------------------- /css/images/ui-bg_flat_10_000000_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/css/images/ui-bg_flat_10_000000_40x100.png -------------------------------------------------------------------------------- /css/images/ui-bg_glass_100_f6f6f6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/css/images/ui-bg_glass_100_f6f6f6_1x400.png -------------------------------------------------------------------------------- /css/images/ui-bg_glass_100_fdf5ce_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/css/images/ui-bg_glass_100_fdf5ce_1x400.png -------------------------------------------------------------------------------- /css/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/css/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /css/images/ui-bg_gloss-wave_35_f6a828_500x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png -------------------------------------------------------------------------------- /css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png -------------------------------------------------------------------------------- /css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png -------------------------------------------------------------------------------- /css/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/css/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /css/images/ui-icons_228ef1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/css/images/ui-icons_228ef1_256x240.png -------------------------------------------------------------------------------- /css/images/ui-icons_ef8c08_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/css/images/ui-icons_ef8c08_256x240.png -------------------------------------------------------------------------------- /css/images/ui-icons_ffd27a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/css/images/ui-icons_ffd27a_256x240.png -------------------------------------------------------------------------------- /css/images/ui-icons_ffffff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/css/images/ui-icons_ffffff_256x240.png -------------------------------------------------------------------------------- /css/jquery-ui-1.8.21.custom.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI CSS Framework 1.8.21 3 | * 4 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * http://jquery.org/license 7 | * 8 | * http://docs.jquery.com/UI/Theming/API 9 | */ 10 | 11 | /* Layout helpers 12 | ----------------------------------*/ 13 | .ui-helper-hidden { display: none; } 14 | .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } 15 | .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } 16 | .ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; } 17 | .ui-helper-clearfix:after { clear: both; } 18 | .ui-helper-clearfix { zoom: 1; } 19 | .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } 20 | 21 | 22 | /* Interaction Cues 23 | ----------------------------------*/ 24 | .ui-state-disabled { cursor: default !important; } 25 | 26 | 27 | /* Icons 28 | ----------------------------------*/ 29 | 30 | /* states and images */ 31 | .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } 32 | 33 | 34 | /* Misc visuals 35 | ----------------------------------*/ 36 | 37 | /* Overlays */ 38 | .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } 39 | 40 | 41 | /*! 42 | * jQuery UI CSS Framework 1.8.21 43 | * 44 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 45 | * Dual licensed under the MIT or GPL Version 2 licenses. 46 | * http://jquery.org/license 47 | * 48 | * http://docs.jquery.com/UI/Theming/API 49 | * 50 | * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px 51 | */ 52 | 53 | 54 | /* Component containers 55 | ----------------------------------*/ 56 | .ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } 57 | .ui-widget .ui-widget { font-size: 1em; } 58 | .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } 59 | .ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } 60 | .ui-widget-content a { color: #333333; } 61 | .ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } 62 | .ui-widget-header a { color: #ffffff; } 63 | 64 | /* Interaction states 65 | ----------------------------------*/ 66 | .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } 67 | .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } 68 | .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } 69 | .ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } 70 | .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } 71 | .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } 72 | .ui-widget :active { outline: none; } 73 | 74 | /* Interaction Cues 75 | ----------------------------------*/ 76 | .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } 77 | .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } 78 | .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } 79 | .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } 80 | .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } 81 | .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } 82 | .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } 83 | .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } 84 | 85 | /* Icons 86 | ----------------------------------*/ 87 | 88 | /* states and images */ 89 | .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } 90 | .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } 91 | .ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } 92 | .ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } 93 | .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } 94 | .ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } 95 | .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } 96 | .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } 97 | 98 | /* positioning */ 99 | .ui-icon-carat-1-n { background-position: 0 0; } 100 | .ui-icon-carat-1-ne { background-position: -16px 0; } 101 | .ui-icon-carat-1-e { background-position: -32px 0; } 102 | .ui-icon-carat-1-se { background-position: -48px 0; } 103 | .ui-icon-carat-1-s { background-position: -64px 0; } 104 | .ui-icon-carat-1-sw { background-position: -80px 0; } 105 | .ui-icon-carat-1-w { background-position: -96px 0; } 106 | .ui-icon-carat-1-nw { background-position: -112px 0; } 107 | .ui-icon-carat-2-n-s { background-position: -128px 0; } 108 | .ui-icon-carat-2-e-w { background-position: -144px 0; } 109 | .ui-icon-triangle-1-n { background-position: 0 -16px; } 110 | .ui-icon-triangle-1-ne { background-position: -16px -16px; } 111 | .ui-icon-triangle-1-e { background-position: -32px -16px; } 112 | .ui-icon-triangle-1-se { background-position: -48px -16px; } 113 | .ui-icon-triangle-1-s { background-position: -64px -16px; } 114 | .ui-icon-triangle-1-sw { background-position: -80px -16px; } 115 | .ui-icon-triangle-1-w { background-position: -96px -16px; } 116 | .ui-icon-triangle-1-nw { background-position: -112px -16px; } 117 | .ui-icon-triangle-2-n-s { background-position: -128px -16px; } 118 | .ui-icon-triangle-2-e-w { background-position: -144px -16px; } 119 | .ui-icon-arrow-1-n { background-position: 0 -32px; } 120 | .ui-icon-arrow-1-ne { background-position: -16px -32px; } 121 | .ui-icon-arrow-1-e { background-position: -32px -32px; } 122 | .ui-icon-arrow-1-se { background-position: -48px -32px; } 123 | .ui-icon-arrow-1-s { background-position: -64px -32px; } 124 | .ui-icon-arrow-1-sw { background-position: -80px -32px; } 125 | .ui-icon-arrow-1-w { background-position: -96px -32px; } 126 | .ui-icon-arrow-1-nw { background-position: -112px -32px; } 127 | .ui-icon-arrow-2-n-s { background-position: -128px -32px; } 128 | .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } 129 | .ui-icon-arrow-2-e-w { background-position: -160px -32px; } 130 | .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } 131 | .ui-icon-arrowstop-1-n { background-position: -192px -32px; } 132 | .ui-icon-arrowstop-1-e { background-position: -208px -32px; } 133 | .ui-icon-arrowstop-1-s { background-position: -224px -32px; } 134 | .ui-icon-arrowstop-1-w { background-position: -240px -32px; } 135 | .ui-icon-arrowthick-1-n { background-position: 0 -48px; } 136 | .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } 137 | .ui-icon-arrowthick-1-e { background-position: -32px -48px; } 138 | .ui-icon-arrowthick-1-se { background-position: -48px -48px; } 139 | .ui-icon-arrowthick-1-s { background-position: -64px -48px; } 140 | .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } 141 | .ui-icon-arrowthick-1-w { background-position: -96px -48px; } 142 | .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } 143 | .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } 144 | .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } 145 | .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } 146 | .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } 147 | .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } 148 | .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } 149 | .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } 150 | .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } 151 | .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } 152 | .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } 153 | .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } 154 | .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } 155 | .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } 156 | .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } 157 | .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } 158 | .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } 159 | .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } 160 | .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } 161 | .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } 162 | .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } 163 | .ui-icon-arrow-4 { background-position: 0 -80px; } 164 | .ui-icon-arrow-4-diag { background-position: -16px -80px; } 165 | .ui-icon-extlink { background-position: -32px -80px; } 166 | .ui-icon-newwin { background-position: -48px -80px; } 167 | .ui-icon-refresh { background-position: -64px -80px; } 168 | .ui-icon-shuffle { background-position: -80px -80px; } 169 | .ui-icon-transfer-e-w { background-position: -96px -80px; } 170 | .ui-icon-transferthick-e-w { background-position: -112px -80px; } 171 | .ui-icon-folder-collapsed { background-position: 0 -96px; } 172 | .ui-icon-folder-open { background-position: -16px -96px; } 173 | .ui-icon-document { background-position: -32px -96px; } 174 | .ui-icon-document-b { background-position: -48px -96px; } 175 | .ui-icon-note { background-position: -64px -96px; } 176 | .ui-icon-mail-closed { background-position: -80px -96px; } 177 | .ui-icon-mail-open { background-position: -96px -96px; } 178 | .ui-icon-suitcase { background-position: -112px -96px; } 179 | .ui-icon-comment { background-position: -128px -96px; } 180 | .ui-icon-person { background-position: -144px -96px; } 181 | .ui-icon-print { background-position: -160px -96px; } 182 | .ui-icon-trash { background-position: -176px -96px; } 183 | .ui-icon-locked { background-position: -192px -96px; } 184 | .ui-icon-unlocked { background-position: -208px -96px; } 185 | .ui-icon-bookmark { background-position: -224px -96px; } 186 | .ui-icon-tag { background-position: -240px -96px; } 187 | .ui-icon-home { background-position: 0 -112px; } 188 | .ui-icon-flag { background-position: -16px -112px; } 189 | .ui-icon-calendar { background-position: -32px -112px; } 190 | .ui-icon-cart { background-position: -48px -112px; } 191 | .ui-icon-pencil { background-position: -64px -112px; } 192 | .ui-icon-clock { background-position: -80px -112px; } 193 | .ui-icon-disk { background-position: -96px -112px; } 194 | .ui-icon-calculator { background-position: -112px -112px; } 195 | .ui-icon-zoomin { background-position: -128px -112px; } 196 | .ui-icon-zoomout { background-position: -144px -112px; } 197 | .ui-icon-search { background-position: -160px -112px; } 198 | .ui-icon-wrench { background-position: -176px -112px; } 199 | .ui-icon-gear { background-position: -192px -112px; } 200 | .ui-icon-heart { background-position: -208px -112px; } 201 | .ui-icon-star { background-position: -224px -112px; } 202 | .ui-icon-link { background-position: -240px -112px; } 203 | .ui-icon-cancel { background-position: 0 -128px; } 204 | .ui-icon-plus { background-position: -16px -128px; } 205 | .ui-icon-plusthick { background-position: -32px -128px; } 206 | .ui-icon-minus { background-position: -48px -128px; } 207 | .ui-icon-minusthick { background-position: -64px -128px; } 208 | .ui-icon-close { background-position: -80px -128px; } 209 | .ui-icon-closethick { background-position: -96px -128px; } 210 | .ui-icon-key { background-position: -112px -128px; } 211 | .ui-icon-lightbulb { background-position: -128px -128px; } 212 | .ui-icon-scissors { background-position: -144px -128px; } 213 | .ui-icon-clipboard { background-position: -160px -128px; } 214 | .ui-icon-copy { background-position: -176px -128px; } 215 | .ui-icon-contact { background-position: -192px -128px; } 216 | .ui-icon-image { background-position: -208px -128px; } 217 | .ui-icon-video { background-position: -224px -128px; } 218 | .ui-icon-script { background-position: -240px -128px; } 219 | .ui-icon-alert { background-position: 0 -144px; } 220 | .ui-icon-info { background-position: -16px -144px; } 221 | .ui-icon-notice { background-position: -32px -144px; } 222 | .ui-icon-help { background-position: -48px -144px; } 223 | .ui-icon-check { background-position: -64px -144px; } 224 | .ui-icon-bullet { background-position: -80px -144px; } 225 | .ui-icon-radio-off { background-position: -96px -144px; } 226 | .ui-icon-radio-on { background-position: -112px -144px; } 227 | .ui-icon-pin-w { background-position: -128px -144px; } 228 | .ui-icon-pin-s { background-position: -144px -144px; } 229 | .ui-icon-play { background-position: 0 -160px; } 230 | .ui-icon-pause { background-position: -16px -160px; } 231 | .ui-icon-seek-next { background-position: -32px -160px; } 232 | .ui-icon-seek-prev { background-position: -48px -160px; } 233 | .ui-icon-seek-end { background-position: -64px -160px; } 234 | .ui-icon-seek-start { background-position: -80px -160px; } 235 | /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ 236 | .ui-icon-seek-first { background-position: -80px -160px; } 237 | .ui-icon-stop { background-position: -96px -160px; } 238 | .ui-icon-eject { background-position: -112px -160px; } 239 | .ui-icon-volume-off { background-position: -128px -160px; } 240 | .ui-icon-volume-on { background-position: -144px -160px; } 241 | .ui-icon-power { background-position: 0 -176px; } 242 | .ui-icon-signal-diag { background-position: -16px -176px; } 243 | .ui-icon-signal { background-position: -32px -176px; } 244 | .ui-icon-battery-0 { background-position: -48px -176px; } 245 | .ui-icon-battery-1 { background-position: -64px -176px; } 246 | .ui-icon-battery-2 { background-position: -80px -176px; } 247 | .ui-icon-battery-3 { background-position: -96px -176px; } 248 | .ui-icon-circle-plus { background-position: 0 -192px; } 249 | .ui-icon-circle-minus { background-position: -16px -192px; } 250 | .ui-icon-circle-close { background-position: -32px -192px; } 251 | .ui-icon-circle-triangle-e { background-position: -48px -192px; } 252 | .ui-icon-circle-triangle-s { background-position: -64px -192px; } 253 | .ui-icon-circle-triangle-w { background-position: -80px -192px; } 254 | .ui-icon-circle-triangle-n { background-position: -96px -192px; } 255 | .ui-icon-circle-arrow-e { background-position: -112px -192px; } 256 | .ui-icon-circle-arrow-s { background-position: -128px -192px; } 257 | .ui-icon-circle-arrow-w { background-position: -144px -192px; } 258 | .ui-icon-circle-arrow-n { background-position: -160px -192px; } 259 | .ui-icon-circle-zoomin { background-position: -176px -192px; } 260 | .ui-icon-circle-zoomout { background-position: -192px -192px; } 261 | .ui-icon-circle-check { background-position: -208px -192px; } 262 | .ui-icon-circlesmall-plus { background-position: 0 -208px; } 263 | .ui-icon-circlesmall-minus { background-position: -16px -208px; } 264 | .ui-icon-circlesmall-close { background-position: -32px -208px; } 265 | .ui-icon-squaresmall-plus { background-position: -48px -208px; } 266 | .ui-icon-squaresmall-minus { background-position: -64px -208px; } 267 | .ui-icon-squaresmall-close { background-position: -80px -208px; } 268 | .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } 269 | .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } 270 | .ui-icon-grip-solid-vertical { background-position: -32px -224px; } 271 | .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } 272 | .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } 273 | .ui-icon-grip-diagonal-se { background-position: -80px -224px; } 274 | 275 | 276 | /* Misc visuals 277 | ----------------------------------*/ 278 | 279 | /* Corner radius */ 280 | .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; } 281 | .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; } 282 | .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } 283 | .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } 284 | 285 | /* Overlays */ 286 | .ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } 287 | .ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/*! 288 | * jQuery UI Resizable 1.8.21 289 | * 290 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 291 | * Dual licensed under the MIT or GPL Version 2 licenses. 292 | * http://jquery.org/license 293 | * 294 | * http://docs.jquery.com/UI/Resizable#theming 295 | */ 296 | .ui-resizable { position: relative;} 297 | .ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; } 298 | .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } 299 | .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } 300 | .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } 301 | .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } 302 | .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } 303 | .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } 304 | .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } 305 | .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } 306 | .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*! 307 | * jQuery UI Selectable 1.8.21 308 | * 309 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 310 | * Dual licensed under the MIT or GPL Version 2 licenses. 311 | * http://jquery.org/license 312 | * 313 | * http://docs.jquery.com/UI/Selectable#theming 314 | */ 315 | .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } 316 | /*! 317 | * jQuery UI Accordion 1.8.21 318 | * 319 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 320 | * Dual licensed under the MIT or GPL Version 2 licenses. 321 | * http://jquery.org/license 322 | * 323 | * http://docs.jquery.com/UI/Accordion#theming 324 | */ 325 | /* IE/Win - Fix animation bug - #4615 */ 326 | .ui-accordion { width: 100%; } 327 | .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } 328 | .ui-accordion .ui-accordion-li-fix { display: inline; } 329 | .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } 330 | .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } 331 | .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } 332 | .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } 333 | .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } 334 | .ui-accordion .ui-accordion-content-active { display: block; } 335 | /*! 336 | * jQuery UI Autocomplete 1.8.21 337 | * 338 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 339 | * Dual licensed under the MIT or GPL Version 2 licenses. 340 | * http://jquery.org/license 341 | * 342 | * http://docs.jquery.com/UI/Autocomplete#theming 343 | */ 344 | .ui-autocomplete { position: absolute; cursor: default; } 345 | 346 | /* workarounds */ 347 | * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ 348 | 349 | /* 350 | * jQuery UI Menu 1.8.21 351 | * 352 | * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) 353 | * Dual licensed under the MIT or GPL Version 2 licenses. 354 | * http://jquery.org/license 355 | * 356 | * http://docs.jquery.com/UI/Menu#theming 357 | */ 358 | .ui-menu { 359 | list-style:none; 360 | padding: 2px; 361 | margin: 0; 362 | display:block; 363 | float: left; 364 | } 365 | .ui-menu .ui-menu { 366 | margin-top: -3px; 367 | } 368 | .ui-menu .ui-menu-item { 369 | margin:0; 370 | padding: 0; 371 | zoom: 1; 372 | float: left; 373 | clear: left; 374 | width: 100%; 375 | } 376 | .ui-menu .ui-menu-item a { 377 | text-decoration:none; 378 | display:block; 379 | padding:.2em .4em; 380 | line-height:1.5; 381 | zoom:1; 382 | } 383 | .ui-menu .ui-menu-item a.ui-state-hover, 384 | .ui-menu .ui-menu-item a.ui-state-active { 385 | font-weight: normal; 386 | margin: -1px; 387 | } 388 | /*! 389 | * jQuery UI Button 1.8.21 390 | * 391 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 392 | * Dual licensed under the MIT or GPL Version 2 licenses. 393 | * http://jquery.org/license 394 | * 395 | * http://docs.jquery.com/UI/Button#theming 396 | */ 397 | .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ 398 | .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ 399 | button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ 400 | .ui-button-icons-only { width: 3.4em; } 401 | button.ui-button-icons-only { width: 3.7em; } 402 | 403 | /*button text element */ 404 | .ui-button .ui-button-text { display: block; line-height: 1.4; } 405 | .ui-button-text-only .ui-button-text { padding: .4em 1em; } 406 | .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } 407 | .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } 408 | .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } 409 | .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } 410 | /* no icon support for input elements, provide padding by default */ 411 | input.ui-button { padding: .4em 1em; } 412 | 413 | /*button icon element(s) */ 414 | .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } 415 | .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } 416 | .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } 417 | .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } 418 | .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } 419 | 420 | /*button sets*/ 421 | .ui-buttonset { margin-right: 7px; } 422 | .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } 423 | 424 | /* workarounds */ 425 | button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ 426 | /*! 427 | * jQuery UI Dialog 1.8.21 428 | * 429 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 430 | * Dual licensed under the MIT or GPL Version 2 licenses. 431 | * http://jquery.org/license 432 | * 433 | * http://docs.jquery.com/UI/Dialog#theming 434 | */ 435 | .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } 436 | .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } 437 | .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } 438 | .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } 439 | .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } 440 | .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } 441 | .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } 442 | .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } 443 | .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } 444 | .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } 445 | .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } 446 | .ui-draggable .ui-dialog-titlebar { cursor: move; } 447 | /*! 448 | * jQuery UI Slider 1.8.21 449 | * 450 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 451 | * Dual licensed under the MIT or GPL Version 2 licenses. 452 | * http://jquery.org/license 453 | * 454 | * http://docs.jquery.com/UI/Slider#theming 455 | */ 456 | .ui-slider { position: relative; text-align: left; } 457 | .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } 458 | .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } 459 | 460 | .ui-slider-horizontal { height: .8em; } 461 | .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } 462 | .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } 463 | .ui-slider-horizontal .ui-slider-range-min { left: 0; } 464 | .ui-slider-horizontal .ui-slider-range-max { right: 0; } 465 | 466 | .ui-slider-vertical { width: .8em; height: 100px; } 467 | .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } 468 | .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } 469 | .ui-slider-vertical .ui-slider-range-min { bottom: 0; } 470 | .ui-slider-vertical .ui-slider-range-max { top: 0; }/*! 471 | * jQuery UI Tabs 1.8.21 472 | * 473 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 474 | * Dual licensed under the MIT or GPL Version 2 licenses. 475 | * http://jquery.org/license 476 | * 477 | * http://docs.jquery.com/UI/Tabs#theming 478 | */ 479 | .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ 480 | .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } 481 | .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } 482 | .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } 483 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } 484 | .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } 485 | .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ 486 | .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } 487 | .ui-tabs .ui-tabs-hide { display: none !important; } 488 | /*! 489 | * jQuery UI Datepicker 1.8.21 490 | * 491 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 492 | * Dual licensed under the MIT or GPL Version 2 licenses. 493 | * http://jquery.org/license 494 | * 495 | * http://docs.jquery.com/UI/Datepicker#theming 496 | */ 497 | .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } 498 | .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } 499 | .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } 500 | .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } 501 | .ui-datepicker .ui-datepicker-prev { left:2px; } 502 | .ui-datepicker .ui-datepicker-next { right:2px; } 503 | .ui-datepicker .ui-datepicker-prev-hover { left:1px; } 504 | .ui-datepicker .ui-datepicker-next-hover { right:1px; } 505 | .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } 506 | .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } 507 | .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } 508 | .ui-datepicker select.ui-datepicker-month-year {width: 100%;} 509 | .ui-datepicker select.ui-datepicker-month, 510 | .ui-datepicker select.ui-datepicker-year { width: 49%;} 511 | .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } 512 | .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } 513 | .ui-datepicker td { border: 0; padding: 1px; } 514 | .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } 515 | .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } 516 | .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } 517 | .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } 518 | 519 | /* with multiple calendars */ 520 | .ui-datepicker.ui-datepicker-multi { width:auto; } 521 | .ui-datepicker-multi .ui-datepicker-group { float:left; } 522 | .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } 523 | .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } 524 | .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } 525 | .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } 526 | .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } 527 | .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } 528 | .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } 529 | .ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } 530 | 531 | /* RTL support */ 532 | .ui-datepicker-rtl { direction: rtl; } 533 | .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } 534 | .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } 535 | .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } 536 | .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } 537 | .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } 538 | .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } 539 | .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } 540 | .ui-datepicker-rtl .ui-datepicker-group { float:right; } 541 | .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 542 | .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } 543 | 544 | /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ 545 | .ui-datepicker-cover { 546 | display: none; /*sorry for IE5*/ 547 | display/**/: block; /*sorry for IE5*/ 548 | position: absolute; /*must have*/ 549 | z-index: -1; /*must have*/ 550 | filter: mask(); /*must have*/ 551 | top: -4px; /*must have*/ 552 | left: -4px; /*must have*/ 553 | width: 200px; /*must have*/ 554 | height: 200px; /*must have*/ 555 | }/*! 556 | * jQuery UI Progressbar 1.8.21 557 | * 558 | * Copyright 2012, AUTHORS.txt (http://jqueryui.com/about) 559 | * Dual licensed under the MIT or GPL Version 2 licenses. 560 | * http://jquery.org/license 561 | * 562 | * http://docs.jquery.com/UI/Progressbar#theming 563 | */ 564 | .ui-progressbar { height:2em; text-align: left; overflow: hidden; } 565 | .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } -------------------------------------------------------------------------------- /css/my.less: -------------------------------------------------------------------------------- 1 | @navbarBackground : @blue 2 | -------------------------------------------------------------------------------- /css/style.css: -------------------------------------------------------------------------------- 1 | .navbar-inner { 2 | background-color: #428ddf; 3 | background-image: -moz-linear-gradient(center top , #428ddf, #428ddf); 4 | } 5 | 6 | .navbar .brand { 7 | color: #ffffff 8 | } 9 | 10 | .navbar .nav .active > a, .navbar .nav .active > a:hover { 11 | background-color: #155BA9; 12 | } 13 | .ui-widget-content 14 | { 15 | background:#FFFFFF; 16 | } -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | prepare("CALL SUGGEST(:keyword,'$index')"); 14 | $stmt->bindValue(':keyword', $keyword,PDO::PARAM_STR); 15 | $stmt->execute(); 16 | $row = $stmt->fetch(PDO::FETCH_ASSOC); 17 | return $row['suggest']; 18 | } 19 | 20 | function MakeMultiQSuggest($words,$query,$index,$ln_sph) 21 | { 22 | $suggested = array(); 23 | $llimf = 0; 24 | $i = 0; 25 | foreach ($words as $key => $word) { 26 | if ($word['docs'] != 0) 27 | $llimf +=$word['docs'];$i++; 28 | } 29 | $llimf = $llimf / ($i * $i); 30 | foreach ($words as $key => $word) { 31 | if ($word['docs'] == 0 | $word['docs'] < $llimf) { 32 | $mis[] = $word['keyword']; 33 | } 34 | } 35 | if (count($mis) > 0) { 36 | foreach ($mis as $m) { 37 | $re = MakeQSuggest($m,$index, $ln_sph); 38 | if ($re) { 39 | if($m!=$re) 40 | $suggested[$m] = $re; 41 | } 42 | } 43 | if(count($words) ==1 && empty($suggested)) { 44 | return false; 45 | } 46 | $phrase = explode(' ', $query); 47 | foreach ($phrase as $k => $word) { 48 | if (isset($suggested[strtolower($word)])) 49 | $phrase[$k] = $suggested[strtolower($word)]; 50 | } 51 | $phrase = implode(' ', $phrase); 52 | return $phrase; 53 | }else{ 54 | return false; 55 | } 56 | } 57 | function MakeSuggestion($keyword,$ln) 58 | { 59 | $trigrams = BuildTrigrams($keyword); 60 | $query = "\"$trigrams\"/1"; 61 | $len = strlen($keyword); 62 | 63 | $delta = LENGTH_THRESHOLD; 64 | $weight = 'weight()'; 65 | if(SPHINX_20 == true) { 66 | $weight ='@weight'; 67 | } 68 | $stmt = $ln->prepare("SELECT *, $weight as w, w+:delta-ABS(len-:len) as myrank FROM suggest WHERE MATCH(:match) AND len BETWEEN :lowlen AND :highlen 69 | ORDER BY myrank DESC, freq DESC 70 | LIMIT 0,:topcount OPTION ranker=wordcount"); 71 | 72 | $stmt->bindValue(':match', $query, PDO::PARAM_STR); 73 | $stmt->bindValue(':len', $len, PDO::PARAM_INT); 74 | $stmt->bindValue(':delta', $delta, PDO::PARAM_INT); 75 | $stmt->bindValue(':lowlen', $len - $delta, PDO::PARAM_INT); 76 | $stmt->bindValue(':highlen', $len + $delta, PDO::PARAM_INT); 77 | $stmt->bindValue(':topcount',TOP_COUNT, PDO::PARAM_INT); 78 | $stmt->execute(); 79 | 80 | 81 | if (!$rows = $stmt->fetchAll()) 82 | return false; 83 | // further restrict trigram matches with a sane Levenshtein distance limit 84 | foreach ($rows as $match) { 85 | $suggested = $match["keyword"]; 86 | if (levenshtein($keyword, $suggested) <= LEVENSHTEIN_THRESHOLD) 87 | return $suggested; 88 | } 89 | 90 | return $keyword; 91 | } 92 | 93 | function MakePhaseSuggestion($words,$query,$ln_sph) 94 | { 95 | $suggested = array(); 96 | $llimf = 0; 97 | $i = 0; 98 | foreach ($words as $key => $word) { 99 | if ($word['docs'] != 0) 100 | $llimf +=$word['docs'];$i++; 101 | } 102 | $llimf = $llimf / ($i * $i); 103 | foreach ($words as $key => $word) { 104 | if ($word['docs'] == 0 | $word['docs'] < $llimf) { 105 | $mis[] = $word['keyword']; 106 | } 107 | } 108 | if (count($mis) > 0) { 109 | foreach ($mis as $m) { 110 | $re = MakeSuggestion($m, $ln_sph); 111 | if ($re) { 112 | if($m!=$re) 113 | $suggested[$m] = $re; 114 | } 115 | } 116 | if(count($words) ==1 && empty($suggested)) { 117 | return false; 118 | } 119 | $phrase = explode(' ', $query); 120 | foreach ($phrase as $k => $word) { 121 | if (isset($suggested[strtolower($word)])) 122 | $phrase[$k] = $suggested[strtolower($word)]; 123 | } 124 | $phrase = implode(' ', $phrase); 125 | return $phrase; 126 | }else{ 127 | return false; 128 | } 129 | } 130 | 131 | ?> 132 | -------------------------------------------------------------------------------- /img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adriannuta/SphinxAutocompleteExample/58d74c89d30a9d9ea4a8e69fa2e2f1c5aa6bfa07/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | prepare("SELECT * FROM $indexes WHERE MATCH(:match) LIMIT $start,$offset OPTION ranker=sph04,field_weights=(title=100,content=1)"); 19 | $stmt->bindValue(':match', $query,PDO::PARAM_STR); 20 | $stmt->execute(); 21 | $rows = $stmt->fetchAll(); 22 | $meta = $ln_sph->query("SHOW META")->fetchAll(); 23 | foreach($meta as $m) { 24 | $meta_map[$m['Variable_name']] = $m['Value']; 25 | } 26 | $total_found = $meta_map['total_found']; 27 | $total = $meta_map['total']; 28 | $ids = array(); 29 | $tmpdocs = array(); 30 | if (count($rows)> 0) { 31 | foreach ($rows as $v) { 32 | $ids[] = $v['id']; 33 | } 34 | //grab the raw content from database 35 | $q = "SELECT id,title ,content FROM docs WHERE id IN (" . implode(',', $ids) . ")"; 36 | 37 | foreach($ln->query($q) as $row) 38 | $tmpdocs[$row['id']] = array('title' => $row['title'], 'content' => $row[content]); 39 | //it's important to keep the order returned by Sphinx 40 | foreach ($ids as $id) { 41 | $docs[] = $tmpdocs[$id]; 42 | } 43 | } 44 | } 45 | ?> 46 | 50 |
51 | 61 |
62 |

Simple autocomplete on title

63 |
64 |
65 |
66 |

Autocomplete is made using star on a titles index (with infixes).

67 |

Start typing in the field below

68 | 75 |
76 |
77 |

78 | 79 | Total found: 80 | 81 |

82 |
83 | 0): ?> 84 |
85 | 86 |
87 |
88 |

89 | 90 |

91 |

92 | 93 |

94 | 95 |
96 |
97 | 98 |
99 | 100 |

Nothing found!

101 | 102 |
103 | 107 | -------------------------------------------------------------------------------- /js/bootstrap-typeahead.js: -------------------------------------------------------------------------------- 1 | /* ============================================================= 2 | * bootstrap-typeahead.js v2.0.3 3 | * http://twitter.github.com/bootstrap/javascript.html#typeahead 4 | * ============================================================= 5 | * Copyright 2012 Twitter, Inc. 6 | * 7 | * Licensed under the Apache License, Version 2.0 (the "License"); 8 | * you may not use this file except in compliance with the License. 9 | * You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, software 14 | * distributed under the License is distributed on an "AS IS" BASIS, 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | * See the License for the specific language governing permissions and 17 | * limitations under the License. 18 | * ============================================================ */ 19 | 20 | /* 21 | * 22 | * Modifications by Paul Warelis 23 | * 24 | */ 25 | 26 | !function($){ 27 | 28 | "use strict"; // jshint ;_; 29 | 30 | /* TYPEAHEAD PUBLIC CLASS DEFINITION 31 | * ================================= */ 32 | 33 | var Typeahead = function (element, options) { 34 | this.$element = $(element) 35 | this.options = $.extend({}, $.fn.typeahead.defaults, options) 36 | this.matcher = this.options.matcher || this.matcher 37 | this.sorter = this.options.sorter || this.sorter 38 | this.highlighter = this.options.highlighter || this.highlighter 39 | this.updater = this.options.updater || this.updater 40 | this.$menu = $(this.options.menu).appendTo('body') 41 | if (this.options.ajax) { 42 | var ajax = this.options.ajax; 43 | if (typeof ajax == "string") { 44 | ajax = { url:ajax }; 45 | } 46 | this.ajax = { 47 | url : ajax.url, 48 | timeout : ajax.timeout || 300, 49 | method: ajax.method || "post", 50 | triggerLength : ajax.triggerLength || 3, 51 | loadingClass : ajax.loadingClass || null, 52 | displayField : ajax.displayField || null, 53 | preDispatch : ajax.preDispatch || null, 54 | preProcess : ajax.preProcess || null 55 | } 56 | this.query = ""; 57 | } else { 58 | this.source = this.options.source 59 | this.ajax = null; 60 | } 61 | this.shown = false 62 | this.listen() 63 | } 64 | 65 | Typeahead.prototype = { 66 | 67 | constructor: Typeahead, 68 | 69 | select: function () { 70 | var val = this.$menu.find('.active').attr('data-value') 71 | this.$element 72 | .val(this.updater(val)) 73 | .change() 74 | return this.hide() 75 | }, 76 | 77 | updater: function (item) { 78 | return item 79 | }, 80 | 81 | show: function () { 82 | var pos = $.extend({}, this.$element.offset(), { 83 | height: this.$element[0].offsetHeight 84 | }) 85 | 86 | this.$menu.css({ 87 | top: pos.top + pos.height, 88 | left: pos.left 89 | }) 90 | 91 | this.$menu.show() 92 | this.shown = true 93 | return this 94 | }, 95 | 96 | hide: function () { 97 | this.$menu.hide() 98 | this.shown = false 99 | return this 100 | }, 101 | 102 | ajaxLookup: function () { 103 | 104 | var query = this.$element.val(); 105 | 106 | if (query == this.query) { 107 | return this; 108 | } 109 | 110 | // Query changed 111 | this.query = query 112 | 113 | // Cancel last timer if set 114 | if (this.ajax.timerId) { 115 | clearTimeout(this.ajax.timerId); 116 | this.ajax.timerId = null; 117 | } 118 | 119 | if (!query || query.length < this.ajax.triggerLength) { 120 | // cancel the ajax callback if in progress 121 | if (this.ajax.xhr) { 122 | this.ajax.xhr.abort(); 123 | this.ajax.xhr = null; 124 | this.ajaxToggleLoadClass(false); 125 | } 126 | return this.shown ? this.hide() : this 127 | } 128 | 129 | function execute() { 130 | this.ajaxToggleLoadClass(true); 131 | 132 | // Cancel last call if already in progress 133 | if (this.ajax.xhr) this.ajax.xhr.abort(); 134 | 135 | var params = this.ajax.preDispatch ? this.ajax.preDispatch(query) : { query : query } 136 | var jAjax = (this.ajax.method == "post") ? $.post : $.get; 137 | this.ajax.xhr = jAjax(this.ajax.url, params, $.proxy(this.ajaxSource, this)); 138 | this.ajax.timerId = null; 139 | } 140 | 141 | // Query is good to send, set a timer 142 | this.ajax.timerId = setTimeout($.proxy(execute, this), this.ajax.timeout); 143 | 144 | return this; 145 | }, 146 | 147 | ajaxSource: function (data) { 148 | this.ajaxToggleLoadClass(false); 149 | 150 | var that = this, items 151 | 152 | if (!this.ajax.xhr) return; 153 | 154 | if (this.ajax.preProcess) { 155 | data = this.ajax.preProcess(data); 156 | } 157 | // Save for selection retreival 158 | this.ajax.data = data; 159 | 160 | items = $.grep(data, function (item) { 161 | if (that.ajax.displayField) { 162 | item = item[that.ajax.displayField] 163 | } 164 | if (that.matcher(item)) return item 165 | }) 166 | 167 | items = this.sorter(items) 168 | 169 | if (!items.length) { 170 | return this.shown ? this.hide() : this 171 | } 172 | 173 | this.ajax.xhr = null; 174 | return this.render(items.slice(0, this.options.items)).show() 175 | }, 176 | 177 | ajaxToggleLoadClass: function (enable) { 178 | if (!this.ajax.loadingClass) return; 179 | this.$element.toggleClass(this.ajax.loadingClass, enable); 180 | }, 181 | 182 | lookup: function (event) { 183 | var that = this, items 184 | 185 | this.query = this.$element.val() 186 | 187 | if (!this.query) { 188 | return this.shown ? this.hide() : this 189 | } 190 | 191 | items = $.grep(this.source, function (item) { 192 | return that.matcher(item) 193 | }) 194 | 195 | items = this.sorter(items) 196 | 197 | if (!items.length) { 198 | return this.shown ? this.hide() : this 199 | } 200 | 201 | return this.render(items.slice(0, this.options.items)).show() 202 | }, 203 | 204 | matcher: function (item) { 205 | return true; 206 | }, 207 | 208 | sorter: function (items) { 209 | var beginswith = [], 210 | caseSensitive = [], 211 | caseInsensitive = [], 212 | item 213 | 214 | while (item = items.shift()) { 215 | if (this.ajax && this.ajax.displayField) { 216 | item = item[this.ajax.displayField] 217 | } 218 | if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item) 219 | else if (~item.indexOf(this.query)) caseSensitive.push(item) 220 | else caseInsensitive.push(item) 221 | } 222 | 223 | return beginswith.concat(caseSensitive, caseInsensitive) 224 | }, 225 | 226 | highlighter: function (item) { 227 | var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&') 228 | return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) { 229 | return '' + match + '' 230 | }) 231 | }, 232 | 233 | render: function (items) { 234 | var that = this 235 | 236 | items = $(items).map(function (i, item) { 237 | i = $(that.options.item).attr('data-value', item) 238 | i.find('a').html(that.highlighter(item)) 239 | return i[0] 240 | }) 241 | 242 | items.first().addClass('active') 243 | this.$menu.html(items) 244 | return this 245 | }, 246 | 247 | next: function (event) { 248 | var active = this.$menu.find('.active').removeClass('active'), 249 | next = active.next() 250 | 251 | if (!next.length) { 252 | next = $(this.$menu.find('li')[0]) 253 | } 254 | 255 | next.addClass('active') 256 | }, 257 | 258 | prev: function (event) { 259 | var active = this.$menu.find('.active').removeClass('active'), 260 | prev = active.prev() 261 | 262 | if (!prev.length) { 263 | prev = this.$menu.find('li').last() 264 | } 265 | 266 | prev.addClass('active') 267 | }, 268 | 269 | listen: function () { 270 | this.$element 271 | .on('blur', $.proxy(this.blur, this)) 272 | .on('keypress', $.proxy(this.keypress, this)) 273 | .on('keyup', $.proxy(this.keyup, this)) 274 | 275 | // Firefox needs this too 276 | this.$element.on('keydown', $.proxy(this.keypress, this)) 277 | 278 | this.$menu 279 | .on('click', $.proxy(this.click, this)) 280 | .on('mouseenter', 'li', $.proxy(this.mouseenter, this)) 281 | }, 282 | 283 | keyup: function (e) { 284 | switch(e.keyCode) { 285 | case 40: // down arrow 286 | case 38: // up arrow 287 | break 288 | 289 | case 9: // tab 290 | case 13: // enter 291 | if (!this.shown) return 292 | this.select() 293 | break 294 | 295 | case 27: // escape 296 | if (!this.shown) return 297 | this.hide() 298 | break 299 | 300 | default: 301 | if (this.ajax) this.ajaxLookup() 302 | else this.lookup() 303 | } 304 | 305 | e.stopPropagation() 306 | e.preventDefault() 307 | }, 308 | 309 | keypress: function (e) { 310 | if (!this.shown) return 311 | 312 | switch(e.keyCode) { 313 | case 9: // tab 314 | case 13: // enter 315 | case 27: // escape 316 | e.preventDefault() 317 | break 318 | 319 | case 38: // up arrow 320 | if (e.type != 'keydown') break 321 | e.preventDefault() 322 | this.prev() 323 | break 324 | 325 | case 40: // down arrow 326 | if (e.type != 'keydown') break 327 | e.preventDefault() 328 | this.next() 329 | break 330 | } 331 | 332 | e.stopPropagation() 333 | }, 334 | 335 | blur: function (e) { 336 | var that = this 337 | setTimeout(function () { that.hide() }, 150) 338 | }, 339 | 340 | click: function (e) { 341 | e.stopPropagation() 342 | e.preventDefault() 343 | this.select() 344 | }, 345 | 346 | mouseenter: function (e) { 347 | this.$menu.find('.active').removeClass('active') 348 | $(e.currentTarget).addClass('active') 349 | } 350 | } 351 | 352 | 353 | /* TYPEAHEAD PLUGIN DEFINITION 354 | * =========================== */ 355 | 356 | $.fn.typeahead = function (option) { 357 | return this.each(function () { 358 | var $this = $(this), 359 | data = $this.data('typeahead'), 360 | options = typeof option == 'object' && option 361 | if (!data) $this.data('typeahead', (data = new Typeahead(this, options))) 362 | if (typeof option == 'string') data[option]() 363 | }) 364 | } 365 | 366 | $.fn.typeahead.defaults = { 367 | source: [], 368 | items: 8, 369 | menu: '', 370 | item: '
  • ' 371 | } 372 | 373 | $.fn.typeahead.Constructor = Typeahead 374 | 375 | /* TYPEAHEAD DATA-API 376 | * ================== */ 377 | 378 | $(function () { 379 | $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) { 380 | var $this = $(this) 381 | if ($this.data('typeahead')) return 382 | e.preventDefault() 383 | $this.typeahead($this.data()) 384 | }) 385 | }) 386 | 387 | }(window.jQuery); -------------------------------------------------------------------------------- /js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap.js by @fat & @mdo 3 | * Copyright 2012 Twitter, Inc. 4 | * http://www.apache.org/licenses/LICENSE-2.0.txt 5 | */ 6 | !function(a){a(function(){"use strict",a.support.transition=function(){var a=function(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd",transition:"transitionend"},c;for(c in b)if(a.style[c]!==undefined)return b[c]}();return a&&{end:a}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function f(){e.trigger("closed").remove()}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger(b=a.Event("close"));if(b.isDefaultPrevented())return;e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=c,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(b){return b||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(a){return a||(this.paused=!0),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this,j=a.Event("slide");this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h]();if(e.hasClass("active"))return;if(a.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(j);if(j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})}else{this.$element.trigger(j);if(j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=a.extend({},a.fn.carousel.defaults,typeof c=="object"&&c);e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():f.interval&&e.cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(this.transitioning)return;b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in");if(d&&d.length){e=d.data("collapse");if(e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),this.$element[b](this.$element[0][c])},hide:function(){var b;if(this.transitioning)return;b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0)},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[a!==null?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){c.type=="show"&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c);if(c.isDefaultPrevented())return;this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e,f,g;if(c.is(".disabled, :disabled"))return;return f=c.attr("data-target"),f||(f=c.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,"")),e=a(f),e.length||(e=c.parent()),g=e.hasClass("open"),d(),g||e.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown",".dropdown form",function(a){a.stopPropagation()}).on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a(' 7 | 8 | 9 | 10 | 11 | 12 | 13 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /template/header.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | <?=$title?> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 36 |
    37 |
    38 |
    39 |
    40 |
    45 |
    46 |
    47 | -------------------------------------------------------------------------------- /template/paginator.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | =2) { 6 | $previous = $current -1; 7 | } 8 | if($current+1<=$pageCount) { 9 | $next = $current+1; 10 | } 11 | $range = 3; 12 | $first = 0; 13 | $last = $pageCount; 14 | ?> 15 |
    16 | 17 | 18 | 19 | | 20 | 21 | | 22 | 23 | 24 | 25 | 26 | | 27 | 28 | | 29 | 30 | 31 | 32 | 33 | 0 && $page <=$pageCount): ?> 34 | 35 | 36 | 37 | | 38 | 39 | | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | | 48 | 49 | | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |
    61 | --------------------------------------------------------------------------------