From bd8ed917137f7423e35177364a7db33ae0c094bd Mon Sep 17 00:00:00 2001 From: kohsah Date: Fri, 20 Oct 2017 22:52:51 +0530 Subject: [PATCH 1/5] auto-complete search --- .../easy-autocomplete.css | 320 ++++ .../easy-autocomplete.min.css | 11 + .../easy-autocomplete.themes.css | 208 +++ .../easy-autocomplete.themes.min.css | 11 + .../jquery.easy-autocomplete.js | 1623 +++++++++++++++++ .../jquery.easy-autocomplete.min.js | 10 + themes/design1/resources/js/scripts.js | 3 +- themes/design1/resources/js/searchac.js | 17 + themes/design1/tmpl-default.xhtml | 4 +- 9 files changed, 2204 insertions(+), 3 deletions(-) create mode 100644 themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.css create mode 100644 themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.min.css create mode 100644 themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.themes.css create mode 100644 themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.themes.min.css create mode 100644 themes/design1/resources/js-imports/easyautocomplete-1.3.5/jquery.easy-autocomplete.js create mode 100644 themes/design1/resources/js-imports/easyautocomplete-1.3.5/jquery.easy-autocomplete.min.js create mode 100644 themes/design1/resources/js/searchac.js diff --git a/themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.css b/themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.css new file mode 100644 index 0000000..58b3a3b --- /dev/null +++ b/themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.css @@ -0,0 +1,320 @@ +/* + * easy-autocomplete + * jQuery plugin for autocompletion + * + * @author Łukasz Pawełczak (http://github.com/pawelczak) + * @version 1.3.5 + * Copyright License: + */ + +.easy-autocomplete { + position: relative; +} +.easy-autocomplete input { + border-color: #ccc; + border-radius: 4px; + border-style: solid; + border-width: 1px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset; + color: #555; + float: none; + padding: 6px 12px; +} +.easy-autocomplete input:hover, .easy-autocomplete input:focus { + box-shadow: none; +} +.easy-autocomplete a { + display: block; +} +.easy-autocomplete.eac-blue-light input:hover, .easy-autocomplete.eac-blue-light input:focus { + border-color: #66afe9; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(102, 175, 233, 0.6); +} +.easy-autocomplete.eac-blue-light ul { + border-color: #66afe9; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(102, 175, 233, 0.6); +} +.easy-autocomplete.eac-blue-light ul li, .easy-autocomplete.eac-blue-light ul .eac-category { + border-color: #66afe9; +} +.easy-autocomplete.eac-blue-light ul li.selected, .easy-autocomplete.eac-blue-light ul .eac-category.selected { + background-color: #ecf5fc; +} +.easy-autocomplete.eac-green-light input:hover, .easy-autocomplete.eac-green-light input:focus { + border-color: #41DB00; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(146, 237, 107, 0.6); +} +.easy-autocomplete.eac-green-light ul { + border-color: #41DB00; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(146, 237, 107, 0.6); +} +.easy-autocomplete.eac-green-light ul li, .easy-autocomplete.eac-green-light ul .eac-category { + border-color: #41DB00; +} +.easy-autocomplete.eac-green-light ul li.selected, .easy-autocomplete.eac-green-light ul .eac-category.selected { + background-color: #9eff75; +} +.easy-autocomplete.eac-red-light input:hover, .easy-autocomplete.eac-red-light input:focus { + border-color: #ff5b5b; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(255, 90, 90, 0.6); +} +.easy-autocomplete.eac-red-light ul { + border-color: #ff5b5b; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(255, 90, 90, 0.6); +} +.easy-autocomplete.eac-red-light ul li, .easy-autocomplete.eac-red-light ul .eac-category { + border-color: #ff5b5b; +} +.easy-autocomplete.eac-red-light ul li.selected, .easy-autocomplete.eac-red-light ul .eac-category.selected { + background-color: #ff8e8e; +} +.easy-autocomplete.eac-yellow-light input:hover, .easy-autocomplete.eac-yellow-light input:focus { + border-color: #ffdb00; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(255, 231, 84, 0.6); +} +.easy-autocomplete.eac-yellow-light ul { + border-color: #ffdb00; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(255, 231, 84, 0.6); +} +.easy-autocomplete.eac-yellow-light ul li, .easy-autocomplete.eac-yellow-light ul .eac-category { + border-color: #ffdb00; +} +.easy-autocomplete.eac-yellow-light ul li.selected, .easy-autocomplete.eac-yellow-light ul .eac-category.selected { + background-color: #ffe233; +} +.easy-autocomplete.eac-dark-light input:hover, .easy-autocomplete.eac-dark-light input:focus { + border-color: #333; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(55, 55, 55, 0.6); +} +.easy-autocomplete.eac-dark-light ul { + border-color: #333; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset, 0 0 8px rgba(55, 55, 55, 0.6); +} +.easy-autocomplete.eac-dark-light ul li, .easy-autocomplete.eac-dark-light ul .eac-category { + border-color: #333; +} +.easy-autocomplete.eac-dark-light ul li.selected, .easy-autocomplete.eac-dark-light ul .eac-category.selected { + background-color: #4d4d4d; + color: #fff; +} +.easy-autocomplete.eac-dark { + color: #fff; +} +.easy-autocomplete.eac-dark input { + background-color: #404040; + border-radius: 4px; + box-shadow: 0; + color: #f6f6f6; +} +.easy-autocomplete.eac-dark input:hover, .easy-autocomplete.eac-dark input:focus { + border-color: #333; + box-shadow: 0; +} +.easy-autocomplete.eac-dark ul { + border-color: #333; +} +.easy-autocomplete.eac-dark ul li, .easy-autocomplete.eac-dark ul .eac-category { + background-color: #404040; + border-color: #333; +} +.easy-autocomplete.eac-dark ul li.selected, .easy-autocomplete.eac-dark ul .eac-category.selected { + background-color: #737373; + color: #f6f6f6; +} +.easy-autocomplete.eac-dark-glass { + color: #fff; +} +.easy-autocomplete.eac-dark-glass input { + background-color: rgba(0, 0, 0, 0.8); + border-radius: 4px; + box-shadow: 0; + color: #f6f6f6; +} +.easy-autocomplete.eac-dark-glass input:hover, .easy-autocomplete.eac-dark-glass input:focus { + border-color: rgba(0, 0, 0, 0.8); + box-shadow: 0; +} +.easy-autocomplete.eac-dark-glass ul { + border-color: rgba(0, 0, 0, 0.8); +} +.easy-autocomplete.eac-dark-glass ul li, .easy-autocomplete.eac-dark-glass ul .eac-category { + background-color: rgba(0, 0, 0, 0.8); + border-color: rgba(0, 0, 0, 0.8); +} +.easy-autocomplete.eac-dark-glass ul li.selected, .easy-autocomplete.eac-dark-glass ul .eac-category.selected { + background-color: rgba(64, 64, 64, 0.8); + color: #f6f6f6; +} +.easy-autocomplete.eac-dark-glass ul li:last-child, .easy-autocomplete.eac-dark-glass ul .eac-category:last-child { + border-radius: 0 0 4px 4px; +} +.easy-autocomplete.eac-blue { + color: #fff; +} +.easy-autocomplete.eac-blue input { + background-color: #6d9ed1; + border-radius: 4px; + box-shadow: 0; + color: #f6f6f6; +} +.easy-autocomplete.eac-blue input::-webkit-input-placeholder { + color: #f6f6f6; +} +.easy-autocomplete.eac-blue input:-moz-placeholder { + color: #f6f6f6; +} +.easy-autocomplete.eac-blue input::-moz-placeholder { + color: #f6f6f6; +} +.easy-autocomplete.eac-blue input:-ms-input-placeholder { + color: #f6f6f6; +} +.easy-autocomplete.eac-blue input:hover, .easy-autocomplete.eac-blue input:focus { + border-color: #5A91CB; + box-shadow: 0; +} +.easy-autocomplete.eac-blue ul { + border-color: #5A91CB; +} +.easy-autocomplete.eac-blue ul li, .easy-autocomplete.eac-blue ul .eac-category { + background-color: #6d9ed1; + border-color: #5A91CB; +} +.easy-autocomplete.eac-blue ul li.selected, .easy-autocomplete.eac-blue ul .eac-category.selected { + background-color: #94b8dd; + color: #f6f6f6; +} +.easy-autocomplete.eac-yellow { + color: #333; +} +.easy-autocomplete.eac-yellow input { + background-color: #ffdb7e; + border-color: #333; + border-radius: 4px; + box-shadow: 0; + color: #333; +} +.easy-autocomplete.eac-yellow input:hover, .easy-autocomplete.eac-yellow input:focus { + border-color: #333; + box-shadow: 0; +} +.easy-autocomplete.eac-yellow ul { + border-color: #333; +} +.easy-autocomplete.eac-yellow ul li, .easy-autocomplete.eac-yellow ul .eac-category { + background-color: #ffdb7e; + border-color: #333; +} +.easy-autocomplete.eac-yellow ul li.selected, .easy-autocomplete.eac-yellow ul .eac-category.selected { + background-color: #ffe9b1; + color: #333; +} +.easy-autocomplete.eac-purple { + color: #333; +} +.easy-autocomplete.eac-purple input { + background-color: #d6d1e7; + border-color: #b8afd5; + box-shadow: 0; + color: #333; +} +.easy-autocomplete.eac-purple input:hover, .easy-autocomplete.eac-purple input:focus { + border-color: #333; + box-shadow: 0; +} +.easy-autocomplete.eac-purple ul { + border-color: #333; +} +.easy-autocomplete.eac-purple ul li, .easy-autocomplete.eac-purple ul .eac-category { + background-color: #d6d1e7; + border-color: #333; +} +.easy-autocomplete.eac-purple ul li.selected, .easy-autocomplete.eac-purple ul .eac-category.selected { + background-color: #ebe8f3; + color: #333; +} +.easy-autocomplete.eac-bootstrap input { + border-color: #ccc; + border-radius: 4px; + border-style: solid; + border-width: 1px; + color: #555; + padding: 6px 12px; +} + +.easy-autocomplete-container { + left: 0; + position: absolute; + width: 100%; + z-index: 2; +} +.easy-autocomplete-container ul { + background: none repeat scroll 0 0 #ffffff; + border-top: 1px dotted #ccc; + display: none; + margin-top: 0; + padding-bottom: 0; + padding-left: 0; + position: relative; + top: -1px; +} +.easy-autocomplete-container ul li, .easy-autocomplete-container ul .eac-category { + background: inherit; + border-color: #ccc; + border-image: none; + border-style: solid; + border-width: 0 1px; + display: block; + font-size: 14px; + font-weight: normal; + padding: 4px 12px; +} +.easy-autocomplete-container ul li:last-child { + border-radius: 0 0 2px 2px; + border-width: 0 1px 1px; +} +.easy-autocomplete-container ul li.selected { + background: none repeat scroll 0 0 #ebebeb; + cursor: pointer; +} +.easy-autocomplete-container ul li.selected div { + font-weight: normal; +} +.easy-autocomplete-container ul li div { + display: block; + font-weight: normal; + word-break: break-all; +} +.easy-autocomplete-container ul li b { + font-weight: bold; +} +.easy-autocomplete-container ul .eac-category { + font-color: #aaa; + font-style: italic; +} + +.eac-description .eac-item span { + color: #aaa; + font-style: italic; + font-size: 0.9em; +} + +.eac-icon-left .eac-item img { + margin-right: 4px; + max-height: 30px; +} + +.eac-icon-right .eac-item { + margin-top: 8px; + min-height: 24px; + position: relative; +} +.eac-icon-right .eac-item img { + margin-left: 4px; + max-height: 30px; + position: absolute; + right: -4px; + top: -8px; +} + +/*# sourceMappingURL=easy-autocomplete.css.map */ diff --git a/themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.min.css b/themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.min.css new file mode 100644 index 0000000..3b49ea1 --- /dev/null +++ b/themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.min.css @@ -0,0 +1,11 @@ +/* + * easy-autocomplete + * jQuery plugin for autocompletion + * + * @author Łukasz Pawełczak (http://github.com/pawelczak) + * @version 1.3.5 + * Copyright License: + */ + +.easy-autocomplete{position:relative}.easy-autocomplete input{border-color:#ccc;border-radius:4px;border-style:solid;border-width:1px;box-shadow:0 1px 2px rgba(0,0,0,0.1) inset;color:#555;float:none;padding:6px 12px}.easy-autocomplete input:hover,.easy-autocomplete input:focus{box-shadow:none}.easy-autocomplete a{display:block}.easy-autocomplete.eac-blue-light input:hover,.easy-autocomplete.eac-blue-light input:focus{border-color:#66afe9;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}.easy-autocomplete.eac-blue-light ul{border-color:#66afe9;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}.easy-autocomplete.eac-blue-light ul li,.easy-autocomplete.eac-blue-light ul .eac-category{border-color:#66afe9}.easy-autocomplete.eac-blue-light ul li.selected,.easy-autocomplete.eac-blue-light ul .eac-category.selected{background-color:#ecf5fc}.easy-autocomplete.eac-green-light input:hover,.easy-autocomplete.eac-green-light input:focus{border-color:#41DB00;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(146,237,107,0.6)}.easy-autocomplete.eac-green-light ul{border-color:#41DB00;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(146,237,107,0.6)}.easy-autocomplete.eac-green-light ul li,.easy-autocomplete.eac-green-light ul .eac-category{border-color:#41DB00}.easy-autocomplete.eac-green-light ul li.selected,.easy-autocomplete.eac-green-light ul .eac-category.selected{background-color:#9eff75}.easy-autocomplete.eac-red-light input:hover,.easy-autocomplete.eac-red-light input:focus{border-color:#ff5b5b;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(255,90,90,0.6)}.easy-autocomplete.eac-red-light ul{border-color:#ff5b5b;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(255,90,90,0.6)}.easy-autocomplete.eac-red-light ul li,.easy-autocomplete.eac-red-light ul .eac-category{border-color:#ff5b5b}.easy-autocomplete.eac-red-light ul li.selected,.easy-autocomplete.eac-red-light ul .eac-category.selected{background-color:#ff8e8e}.easy-autocomplete.eac-yellow-light input:hover,.easy-autocomplete.eac-yellow-light input:focus{border-color:#ffdb00;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(255,231,84,0.6)}.easy-autocomplete.eac-yellow-light ul{border-color:#ffdb00;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(255,231,84,0.6)}.easy-autocomplete.eac-yellow-light ul li,.easy-autocomplete.eac-yellow-light ul .eac-category{border-color:#ffdb00}.easy-autocomplete.eac-yellow-light ul li.selected,.easy-autocomplete.eac-yellow-light ul .eac-category.selected{background-color:#ffe233}.easy-autocomplete.eac-dark-light input:hover,.easy-autocomplete.eac-dark-light input:focus{border-color:#333;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(55,55,55,0.6)}.easy-autocomplete.eac-dark-light ul{border-color:#333;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(55,55,55,0.6)}.easy-autocomplete.eac-dark-light ul li,.easy-autocomplete.eac-dark-light ul .eac-category{border-color:#333}.easy-autocomplete.eac-dark-light ul li.selected,.easy-autocomplete.eac-dark-light ul .eac-category.selected{background-color:#4d4d4d;color:#fff}.easy-autocomplete.eac-dark{color:#fff}.easy-autocomplete.eac-dark input{background-color:#404040;border-radius:4px;box-shadow:0;color:#f6f6f6}.easy-autocomplete.eac-dark input:hover,.easy-autocomplete.eac-dark input:focus{border-color:#333;box-shadow:0}.easy-autocomplete.eac-dark ul{border-color:#333}.easy-autocomplete.eac-dark ul li,.easy-autocomplete.eac-dark ul .eac-category{background-color:#404040;border-color:#333}.easy-autocomplete.eac-dark ul li.selected,.easy-autocomplete.eac-dark ul .eac-category.selected{background-color:#737373;color:#f6f6f6}.easy-autocomplete.eac-dark-glass{color:#fff}.easy-autocomplete.eac-dark-glass input{background-color:rgba(0,0,0,0.8);border-radius:4px;box-shadow:0;color:#f6f6f6}.easy-autocomplete.eac-dark-glass input:hover,.easy-autocomplete.eac-dark-glass input:focus{border-color:rgba(0,0,0,0.8);box-shadow:0}.easy-autocomplete.eac-dark-glass ul{border-color:rgba(0,0,0,0.8)}.easy-autocomplete.eac-dark-glass ul li,.easy-autocomplete.eac-dark-glass ul .eac-category{background-color:rgba(0,0,0,0.8);border-color:rgba(0,0,0,0.8)}.easy-autocomplete.eac-dark-glass ul li.selected,.easy-autocomplete.eac-dark-glass ul .eac-category.selected{background-color:rgba(64,64,64,0.8);color:#f6f6f6}.easy-autocomplete.eac-dark-glass ul li:last-child,.easy-autocomplete.eac-dark-glass ul .eac-category:last-child{border-radius:0 0 4px 4px}.easy-autocomplete.eac-blue{color:#fff}.easy-autocomplete.eac-blue input{background-color:#6d9ed1;border-radius:4px;box-shadow:0;color:#f6f6f6}.easy-autocomplete.eac-blue input::-webkit-input-placeholder{color:#f6f6f6}.easy-autocomplete.eac-blue input:-moz-placeholder{color:#f6f6f6}.easy-autocomplete.eac-blue input::-moz-placeholder{color:#f6f6f6}.easy-autocomplete.eac-blue input:-ms-input-placeholder{color:#f6f6f6}.easy-autocomplete.eac-blue input:hover,.easy-autocomplete.eac-blue input:focus{border-color:#5A91CB;box-shadow:0}.easy-autocomplete.eac-blue ul{border-color:#5A91CB}.easy-autocomplete.eac-blue ul li,.easy-autocomplete.eac-blue ul .eac-category{background-color:#6d9ed1;border-color:#5A91CB}.easy-autocomplete.eac-blue ul li.selected,.easy-autocomplete.eac-blue ul .eac-category.selected{background-color:#94b8dd;color:#f6f6f6}.easy-autocomplete.eac-yellow{color:#333}.easy-autocomplete.eac-yellow input{background-color:#ffdb7e;border-color:#333;border-radius:4px;box-shadow:0;color:#333}.easy-autocomplete.eac-yellow input:hover,.easy-autocomplete.eac-yellow input:focus{border-color:#333;box-shadow:0}.easy-autocomplete.eac-yellow ul{border-color:#333}.easy-autocomplete.eac-yellow ul li,.easy-autocomplete.eac-yellow ul .eac-category{background-color:#ffdb7e;border-color:#333}.easy-autocomplete.eac-yellow ul li.selected,.easy-autocomplete.eac-yellow ul .eac-category.selected{background-color:#ffe9b1;color:#333}.easy-autocomplete.eac-purple{color:#333}.easy-autocomplete.eac-purple input{background-color:#d6d1e7;border-color:#b8afd5;box-shadow:0;color:#333}.easy-autocomplete.eac-purple input:hover,.easy-autocomplete.eac-purple input:focus{border-color:#333;box-shadow:0}.easy-autocomplete.eac-purple ul{border-color:#333}.easy-autocomplete.eac-purple ul li,.easy-autocomplete.eac-purple ul .eac-category{background-color:#d6d1e7;border-color:#333}.easy-autocomplete.eac-purple ul li.selected,.easy-autocomplete.eac-purple ul .eac-category.selected{background-color:#ebe8f3;color:#333}.easy-autocomplete.eac-bootstrap input{border-color:#ccc;border-radius:4px;border-style:solid;border-width:1px;color:#555;padding:6px 12px}.easy-autocomplete-container{left:0;position:absolute;width:100%;z-index:2}.easy-autocomplete-container ul{background:none repeat scroll 0 0 #ffffff;border-top:1px dotted #ccc;display:none;margin-top:0;padding-bottom:0;padding-left:0;position:relative;top:-1px}.easy-autocomplete-container ul li,.easy-autocomplete-container ul .eac-category{background:inherit;border-color:#ccc;border-image:none;border-style:solid;border-width:0 1px;display:block;font-size:14px;font-weight:normal;padding:4px 12px}.easy-autocomplete-container ul li:last-child{border-radius:0 0 2px 2px;border-width:0 1px 1px}.easy-autocomplete-container ul li.selected{background:none repeat scroll 0 0 #ebebeb;cursor:pointer}.easy-autocomplete-container ul li.selected div{font-weight:normal}.easy-autocomplete-container ul li div{display:block;font-weight:normal;word-break:break-all}.easy-autocomplete-container ul li b{font-weight:bold}.easy-autocomplete-container ul .eac-category{font-color:#aaa;font-style:italic}.eac-description .eac-item span{color:#aaa;font-style:italic;font-size:0.9em}.eac-icon-left .eac-item img{margin-right:4px;max-height:30px}.eac-icon-right .eac-item{margin-top:8px;min-height:24px;position:relative}.eac-icon-right .eac-item img{margin-left:4px;max-height:30px;position:absolute;right:-4px;top:-8px} +/*# sourceMappingURL=easy-autocomplete.min.css.map */ diff --git a/themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.themes.css b/themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.themes.css new file mode 100644 index 0000000..1e544b1 --- /dev/null +++ b/themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.themes.css @@ -0,0 +1,208 @@ +/* + * easy-autocomplete + * jQuery plugin for autocompletion + * + * @author Łukasz Pawełczak (http://github.com/pawelczak) + * @version 1.3.5 + * Copyright License: + */ + +.easy-autocomplete { + /* Theme Square */ + /* Round */ + /* Funky */ + /* Solid */ + /* Plate */ +} +.easy-autocomplete.eac-square { + font-family: "Roboto", "Helvetica Neue",Helvetica,Arial,sans-serif; +} +.easy-autocomplete.eac-square input { + border: 1px solid #7f8c8d; + border-radius: 0; + color: #7f8c8d; + font-family: inherit; + font-size: 18px; + font-style: italic; + font-weight: 300; + margin: 0; + min-width: 350px; + padding: 12px 43px 12px 15px; +} +.easy-autocomplete.eac-square ul { + border-color: #7f8c8d; + border-top: 0; + box-shadow: none; + top: 0; +} +.easy-autocomplete.eac-square ul li, .easy-autocomplete.eac-square ul .eac-category { + border-color: #7f8c8d; + font-family: inherit; + font-size: 16px; + font-weight: 300; + padding: 6px 12px; + transition: all 0.4s ease 0s; +} +.easy-autocomplete.eac-square ul li *, .easy-autocomplete.eac-square ul .eac-category * { + font-weight: 300; +} +.easy-autocomplete.eac-square ul li.selected, .easy-autocomplete.eac-square ul .eac-category.selected { + background-color: #f1f1f1; + font-weight: 300; +} +.easy-autocomplete.eac-square ul li b, .easy-autocomplete.eac-square ul .eac-category b { + font-weight: 600; +} +.easy-autocomplete.eac-round { + font-family: "Open Sans", "Helvetica Neue",Helvetica,Arial,sans-serif; +} +.easy-autocomplete.eac-round input { + border: 2px solid #888; + border-radius: 10px; + color: #888; + font-family: inherit; + font-size: 16px; + font-weight: 400; + margin: 0; + min-width: 300px; + padding: 10px; +} +.easy-autocomplete.eac-round input:hover, .easy-autocomplete.eac-round input:focus { + border-color: #3079ed; +} +.easy-autocomplete.eac-round ul { + background: none; + border-color: #888; + border-width: 0; + box-shadow: none; + min-width: 300px; + top: 20px; +} +.easy-autocomplete.eac-round ul li, .easy-autocomplete.eac-round ul .eac-category { + background: #fff; + border-color: #3079ed; + border-width: 0 2px; + font-size: 14px; + padding: 8px 12px; + transition: all 0.4s ease 0s; +} +.easy-autocomplete.eac-round ul li.selected, .easy-autocomplete.eac-round ul .eac-category.selected { + background-color: #d4e3fb; +} +.easy-autocomplete.eac-round ul li:first-child, .easy-autocomplete.eac-round ul .eac-category:first-child { + border-radius: 10px 10px 0 0; + border-width: 2px 2px 0; +} +.easy-autocomplete.eac-round ul li:last-child, .easy-autocomplete.eac-round ul .eac-category:last-child { + border-radius: 0 0 10px 10px; + border-width: 0 2px 2px; +} +.easy-autocomplete.eac-round ul li b, .easy-autocomplete.eac-round ul .eac-category b { + font-weight: 700; +} +.easy-autocomplete.eac-funky { + font-family: "Inconsolata", "Helvetica Neue",Helvetica,Arial,sans-serif; +} +.easy-autocomplete.eac-funky input { + background: #07ED89; + border: 0; + border-radius: 0; + color: #ED076B; + font-family: inherit; + font-size: 18px; + min-width: 240px; + padding: 12px; +} +.easy-autocomplete.eac-funky ul { + background: transparent; + border: 0; +} +.easy-autocomplete.eac-funky ul li, .easy-autocomplete.eac-funky ul .eac-category { + background: transparent; + border: 0; + color: #ED076B; + font-size: 18px; + padding: 4px 12px; + transition: all 0.4s ease 0s; +} +.easy-autocomplete.eac-funky ul li.selected, .easy-autocomplete.eac-funky ul .eac-category.selected { + color: #8907ED; +} +.easy-autocomplete.eac-solid input { + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15) inset; + border-color: #ddd; + color: #666; + font-size: 13px; + min-height: 0; + padding: 6px 12px; +} +.easy-autocomplete.eac-solid ul li, .easy-autocomplete.eac-solid ul .eac-category { + transition: all 0.4s ease 0s; +} +.easy-autocomplete.eac-solid ul li.selected, .easy-autocomplete.eac-solid ul .eac-category.selected { + background-color: #f2f2f2; +} +.easy-autocomplete.eac-plate { + font-family: "Open Sans", "Helvetica Neue",Helvetica,Arial,sans-serif; +} +.easy-autocomplete.eac-plate input { + font-size: 13px; + padding: 6px 12px; +} +.easy-autocomplete.eac-plate ul { + background: #b5b5b5; + border-radius: 6px; + border-width: 0; + top: 10px; +} +.easy-autocomplete.eac-plate ul li, .easy-autocomplete.eac-plate ul .eac-category { + background: #b5b5b5; + color: #FAFAFA; + font-size: 12px; + transition: all 0.4s ease 0s; +} +.easy-autocomplete.eac-plate ul li b, .easy-autocomplete.eac-plate ul .eac-category b { + color: #ffd464; +} +.easy-autocomplete.eac-plate ul li.selected, .easy-autocomplete.eac-plate ul .eac-category.selected { + background: #656565; +} +.easy-autocomplete.eac-plate ul li:first-child, .easy-autocomplete.eac-plate ul .eac-category:first-child { + border-radius: 6px 6px 0 0; +} +.easy-autocomplete.eac-plate ul li:last-child, .easy-autocomplete.eac-plate ul .eac-category:last-child { + border-radius: 0 0 6px 6px; +} +.easy-autocomplete.eac-plate-dark { + font-family: "Open Sans", "Helvetica Neue",Helvetica,Arial,sans-serif; +} +.easy-autocomplete.eac-plate-dark input { + font-size: 13px; + padding: 6px 12px; +} +.easy-autocomplete.eac-plate-dark ul { + background: #212121; + border-radius: 6px; + border-width: 0; + top: 10px; +} +.easy-autocomplete.eac-plate-dark ul li, .easy-autocomplete.eac-plate-dark ul .eac-category { + background: #212121; + color: #FAFAFA; + font-size: 12px; + transition: all 0.4s ease 0s; +} +.easy-autocomplete.eac-plate-dark ul li b, .easy-autocomplete.eac-plate-dark ul .eac-category b { + color: #ffd464; +} +.easy-autocomplete.eac-plate-dark ul li.selected, .easy-autocomplete.eac-plate-dark ul .eac-category.selected { + background: #656565; +} +.easy-autocomplete.eac-plate-dark ul li:first-child, .easy-autocomplete.eac-plate-dark ul .eac-category:first-child { + border-radius: 6px 6px 0 0; +} +.easy-autocomplete.eac-plate-dark ul li:last-child, .easy-autocomplete.eac-plate-dark ul .eac-category:last-child { + border-radius: 0 0 6px 6px; +} + +/*# sourceMappingURL=easy-autocomplete.themes.css.map */ diff --git a/themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.themes.min.css b/themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.themes.min.css new file mode 100644 index 0000000..bcc690f --- /dev/null +++ b/themes/design1/resources/js-imports/easyautocomplete-1.3.5/easy-autocomplete.themes.min.css @@ -0,0 +1,11 @@ +/* + * easy-autocomplete + * jQuery plugin for autocompletion + * + * @author Łukasz Pawełczak (http://github.com/pawelczak) + * @version 1.3.5 + * Copyright License: + */ + +.easy-autocomplete.eac-square{font-family:"Roboto", "Helvetica Neue",Helvetica,Arial,sans-serif}.easy-autocomplete.eac-square input{border:1px solid #7f8c8d;border-radius:0;color:#7f8c8d;font-family:inherit;font-size:18px;font-style:italic;font-weight:300;margin:0;min-width:350px;padding:12px 43px 12px 15px}.easy-autocomplete.eac-square ul{border-color:#7f8c8d;border-top:0;box-shadow:none;top:0}.easy-autocomplete.eac-square ul li,.easy-autocomplete.eac-square ul .eac-category{border-color:#7f8c8d;font-family:inherit;font-size:16px;font-weight:300;padding:6px 12px;transition:all 0.4s ease 0s}.easy-autocomplete.eac-square ul li *,.easy-autocomplete.eac-square ul .eac-category *{font-weight:300}.easy-autocomplete.eac-square ul li.selected,.easy-autocomplete.eac-square ul .eac-category.selected{background-color:#f1f1f1;font-weight:300}.easy-autocomplete.eac-square ul li b,.easy-autocomplete.eac-square ul .eac-category b{font-weight:600}.easy-autocomplete.eac-round{font-family:"Open Sans", "Helvetica Neue",Helvetica,Arial,sans-serif}.easy-autocomplete.eac-round input{border:2px solid #888;border-radius:10px;color:#888;font-family:inherit;font-size:16px;font-weight:400;margin:0;min-width:300px;padding:10px}.easy-autocomplete.eac-round input:hover,.easy-autocomplete.eac-round input:focus{border-color:#3079ed}.easy-autocomplete.eac-round ul{background:none;border-color:#888;border-width:0;box-shadow:none;min-width:300px;top:20px}.easy-autocomplete.eac-round ul li,.easy-autocomplete.eac-round ul .eac-category{background:#fff;border-color:#3079ed;border-width:0 2px;font-size:14px;padding:8px 12px;transition:all 0.4s ease 0s}.easy-autocomplete.eac-round ul li.selected,.easy-autocomplete.eac-round ul .eac-category.selected{background-color:#d4e3fb}.easy-autocomplete.eac-round ul li:first-child,.easy-autocomplete.eac-round ul .eac-category:first-child{border-radius:10px 10px 0 0;border-width:2px 2px 0}.easy-autocomplete.eac-round ul li:last-child,.easy-autocomplete.eac-round ul .eac-category:last-child{border-radius:0 0 10px 10px;border-width:0 2px 2px}.easy-autocomplete.eac-round ul li b,.easy-autocomplete.eac-round ul .eac-category b{font-weight:700}.easy-autocomplete.eac-funky{font-family:"Inconsolata", "Helvetica Neue",Helvetica,Arial,sans-serif}.easy-autocomplete.eac-funky input{background:#07ED89;border:0;border-radius:0;color:#ED076B;font-family:inherit;font-size:18px;min-width:240px;padding:12px}.easy-autocomplete.eac-funky ul{background:transparent;border:0}.easy-autocomplete.eac-funky ul li,.easy-autocomplete.eac-funky ul .eac-category{background:transparent;border:0;color:#ED076B;font-size:18px;padding:4px 12px;transition:all 0.4s ease 0s}.easy-autocomplete.eac-funky ul li.selected,.easy-autocomplete.eac-funky ul .eac-category.selected{color:#8907ED}.easy-autocomplete.eac-solid input{box-shadow:0 1px 2px rgba(0,0,0,0.15) inset;border-color:#ddd;color:#666;font-size:13px;min-height:0;padding:6px 12px}.easy-autocomplete.eac-solid ul li,.easy-autocomplete.eac-solid ul .eac-category{transition:all 0.4s ease 0s}.easy-autocomplete.eac-solid ul li.selected,.easy-autocomplete.eac-solid ul .eac-category.selected{background-color:#f2f2f2}.easy-autocomplete.eac-plate{font-family:"Open Sans", "Helvetica Neue",Helvetica,Arial,sans-serif}.easy-autocomplete.eac-plate input{font-size:13px;padding:6px 12px}.easy-autocomplete.eac-plate ul{background:#b5b5b5;border-radius:6px;border-width:0;top:10px}.easy-autocomplete.eac-plate ul li,.easy-autocomplete.eac-plate ul .eac-category{background:#b5b5b5;color:#FAFAFA;font-size:12px;transition:all 0.4s ease 0s}.easy-autocomplete.eac-plate ul li b,.easy-autocomplete.eac-plate ul .eac-category b{color:#ffd464}.easy-autocomplete.eac-plate ul li.selected,.easy-autocomplete.eac-plate ul .eac-category.selected{background:#656565}.easy-autocomplete.eac-plate ul li:first-child,.easy-autocomplete.eac-plate ul .eac-category:first-child{border-radius:6px 6px 0 0}.easy-autocomplete.eac-plate ul li:last-child,.easy-autocomplete.eac-plate ul .eac-category:last-child{border-radius:0 0 6px 6px}.easy-autocomplete.eac-plate-dark{font-family:"Open Sans", "Helvetica Neue",Helvetica,Arial,sans-serif}.easy-autocomplete.eac-plate-dark input{font-size:13px;padding:6px 12px}.easy-autocomplete.eac-plate-dark ul{background:#212121;border-radius:6px;border-width:0;top:10px}.easy-autocomplete.eac-plate-dark ul li,.easy-autocomplete.eac-plate-dark ul .eac-category{background:#212121;color:#FAFAFA;font-size:12px;transition:all 0.4s ease 0s}.easy-autocomplete.eac-plate-dark ul li b,.easy-autocomplete.eac-plate-dark ul .eac-category b{color:#ffd464}.easy-autocomplete.eac-plate-dark ul li.selected,.easy-autocomplete.eac-plate-dark ul .eac-category.selected{background:#656565}.easy-autocomplete.eac-plate-dark ul li:first-child,.easy-autocomplete.eac-plate-dark ul .eac-category:first-child{border-radius:6px 6px 0 0}.easy-autocomplete.eac-plate-dark ul li:last-child,.easy-autocomplete.eac-plate-dark ul .eac-category:last-child{border-radius:0 0 6px 6px} +/*# sourceMappingURL=easy-autocomplete.themes.min.css.map */ diff --git a/themes/design1/resources/js-imports/easyautocomplete-1.3.5/jquery.easy-autocomplete.js b/themes/design1/resources/js-imports/easyautocomplete-1.3.5/jquery.easy-autocomplete.js new file mode 100644 index 0000000..88f2951 --- /dev/null +++ b/themes/design1/resources/js-imports/easyautocomplete-1.3.5/jquery.easy-autocomplete.js @@ -0,0 +1,1623 @@ +/* + * easy-autocomplete + * jQuery plugin for autocompletion + * + * @author Łukasz Pawełczak (http://github.com/pawelczak) + * @version 1.3.5 + * Copyright License: + */ + +/* + * EasyAutocomplete - Configuration + */ +var EasyAutocomplete = (function(scope){ + + scope.Configuration = function Configuration(options) { + var defaults = { + data: "list-required", + url: "list-required", + dataType: "json", + + listLocation: function(data) { + return data; + }, + + xmlElementName: "", + + getValue: function(element) { + return element; + }, + + autocompleteOff: true, + + placeholder: false, + + ajaxCallback: function() {}, + + matchResponseProperty: false, + + list: { + sort: { + enabled: false, + method: function(a, b) { + a = defaults.getValue(a); + b = defaults.getValue(b); + if (a < b) { + return -1; + } + if (a > b) { + return 1; + } + return 0; + } + }, + + maxNumberOfElements: 6, + + hideOnEmptyPhrase: true, + + match: { + enabled: false, + caseSensitive: false, + method: function(element, phrase) { + + if (element.search(phrase) > -1) { + return true; + } else { + return false; + } + } + }, + + showAnimation: { + type: "normal", //normal|slide|fade + time: 400, + callback: function() {} + }, + + hideAnimation: { + type: "normal", + time: 400, + callback: function() {} + }, + + /* Events */ + onClickEvent: function() {}, + onSelectItemEvent: function() {}, + onLoadEvent: function() {}, + onChooseEvent: function() {}, + onKeyEnterEvent: function() {}, + onMouseOverEvent: function() {}, + onMouseOutEvent: function() {}, + onShowListEvent: function() {}, + onHideListEvent: function() {} + }, + + highlightPhrase: true, + + theme: "", + + cssClasses: "", + + minCharNumber: 0, + + requestDelay: 0, + + adjustWidth: true, + + ajaxSettings: {}, + + preparePostData: function(data, inputPhrase) {return data;}, + + loggerEnabled: true, + + template: "", + + categoriesAssigned: false, + + categories: [{ + maxNumberOfElements: 4 + }] + + }; + + var externalObjects = ["ajaxSettings", "template"]; + + this.get = function(propertyName) { + return defaults[propertyName]; + }; + + this.equals = function(name, value) { + if (isAssigned(name)) { + if (defaults[name] === value) { + return true; + } + } + + return false; + }; + + this.checkDataUrlProperties = function() { + if (defaults.url === "list-required" && defaults.data === "list-required") { + return false; + } + return true; + }; + this.checkRequiredProperties = function() { + for (var propertyName in defaults) { + if (defaults[propertyName] === "required") { + logger.error("Option " + propertyName + " must be defined"); + return false; + } + } + return true; + }; + + this.printPropertiesThatDoesntExist = function(consol, optionsToCheck) { + printPropertiesThatDoesntExist(consol, optionsToCheck); + }; + + + prepareDefaults(); + + mergeOptions(); + + if (defaults.loggerEnabled === true) { + printPropertiesThatDoesntExist(console, options); + } + + addAjaxSettings(); + + processAfterMerge(); + function prepareDefaults() { + + if (options.dataType === "xml") { + + if (!options.getValue) { + + options.getValue = function(element) { + return $(element).text(); + }; + } + + + if (!options.list) { + + options.list = {}; + } + + if (!options.list.sort) { + options.list.sort = {}; + } + + + options.list.sort.method = function(a, b) { + a = options.getValue(a); + b = options.getValue(b); + if (a < b) { + return -1; + } + if (a > b) { + return 1; + } + return 0; + }; + + if (!options.list.match) { + options.list.match = {}; + } + + options.list.match.method = function(element, phrase) { + + if (element.search(phrase) > -1) { + return true; + } else { + return false; + } + }; + + } + if (options.categories !== undefined && options.categories instanceof Array) { + + var categories = []; + + for (var i = 0, length = options.categories.length; i < length; i += 1) { + + var category = options.categories[i]; + + for (var property in defaults.categories[0]) { + + if (category[property] === undefined) { + category[property] = defaults.categories[0][property]; + } + } + + categories.push(category); + } + + options.categories = categories; + } + } + + function mergeOptions() { + + defaults = mergeObjects(defaults, options); + + function mergeObjects(source, target) { + var mergedObject = source || {}; + + for (var propertyName in source) { + if (target[propertyName] !== undefined && target[propertyName] !== null) { + + if (typeof target[propertyName] !== "object" || + target[propertyName] instanceof Array) { + mergedObject[propertyName] = target[propertyName]; + } else { + mergeObjects(source[propertyName], target[propertyName]); + } + } + } + + /* If data is an object */ + if (target.data !== undefined && target.data !== null && typeof target.data === "object") { + mergedObject.data = target.data; + } + + return mergedObject; + } + } + + + function processAfterMerge() { + + if (defaults.url !== "list-required" && typeof defaults.url !== "function") { + var defaultUrl = defaults.url; + defaults.url = function() { + return defaultUrl; + }; + } + + if (defaults.ajaxSettings.url !== undefined && typeof defaults.ajaxSettings.url !== "function") { + var defaultUrl = defaults.ajaxSettings.url; + defaults.ajaxSettings.url = function() { + return defaultUrl; + }; + } + + if (typeof defaults.listLocation === "string") { + var defaultlistLocation = defaults.listLocation; + + if (defaults.dataType.toUpperCase() === "XML") { + defaults.listLocation = function(data) { + return $(data).find(defaultlistLocation); + }; + } else { + defaults.listLocation = function(data) { + return data[defaultlistLocation]; + }; + } + } + + if (typeof defaults.getValue === "string") { + var defaultsGetValue = defaults.getValue; + defaults.getValue = function(element) { + return element[defaultsGetValue]; + }; + } + + if (options.categories !== undefined) { + defaults.categoriesAssigned = true; + } + + } + + function addAjaxSettings() { + + if (options.ajaxSettings !== undefined && typeof options.ajaxSettings === "object") { + defaults.ajaxSettings = options.ajaxSettings; + } else { + defaults.ajaxSettings = {}; + } + + } + + function isAssigned(name) { + if (defaults[name] !== undefined && defaults[name] !== null) { + return true; + } else { + return false; + } + } + function printPropertiesThatDoesntExist(consol, optionsToCheck) { + + checkPropertiesIfExist(defaults, optionsToCheck); + + function checkPropertiesIfExist(source, target) { + for(var property in target) { + if (source[property] === undefined) { + consol.log("Property '" + property + "' does not exist in EasyAutocomplete options API."); + } + + if (typeof source[property] === "object" && $.inArray(property, externalObjects) === -1) { + checkPropertiesIfExist(source[property], target[property]); + } + } + } + } + }; + + return scope; + +})(EasyAutocomplete || {}); + + +/* + * EasyAutocomplete - Logger + */ +var EasyAutocomplete = (function(scope){ + + scope.Logger = function Logger() { + + this.error = function(message) { + console.log("ERROR: " + message); + }; + + this.warning = function(message) { + console.log("WARNING: " + message); + }; + }; + + return scope; + +})(EasyAutocomplete || {}); + + +/* + * EasyAutocomplete - Constans + */ +var EasyAutocomplete = (function(scope){ + + scope.Constans = function Constans() { + var constants = { + CONTAINER_CLASS: "easy-autocomplete-container", + CONTAINER_ID: "eac-container-", + + WRAPPER_CSS_CLASS: "easy-autocomplete" + }; + + this.getValue = function(propertyName) { + return constants[propertyName]; + }; + + }; + + return scope; + +})(EasyAutocomplete || {}); + +/* + * EasyAutocomplete - ListBuilderService + * + * @author Łukasz Pawełczak + * + */ +var EasyAutocomplete = (function(scope) { + + scope.ListBuilderService = function ListBuilderService(configuration, proccessResponseData) { + + + this.init = function(data) { + var listBuilder = [], + builder = {}; + + builder.data = configuration.get("listLocation")(data); + builder.getValue = configuration.get("getValue"); + builder.maxListSize = configuration.get("list").maxNumberOfElements; + + + listBuilder.push(builder); + + return listBuilder; + }; + + this.updateCategories = function(listBuilder, data) { + + if (configuration.get("categoriesAssigned")) { + + listBuilder = []; + + for(var i = 0; i < configuration.get("categories").length; i += 1) { + + var builder = convertToListBuilder(configuration.get("categories")[i], data); + + listBuilder.push(builder); + } + + } + + return listBuilder; + }; + + this.convertXml = function(listBuilder) { + if(configuration.get("dataType").toUpperCase() === "XML") { + + for(var i = 0; i < listBuilder.length; i += 1) { + listBuilder[i].data = convertXmlToList(listBuilder[i]); + } + } + + return listBuilder; + }; + + this.processData = function(listBuilder, inputPhrase) { + + for(var i = 0, length = listBuilder.length; i < length; i+=1) { + listBuilder[i].data = proccessResponseData(configuration, listBuilder[i], inputPhrase); + } + + return listBuilder; + }; + + this.checkIfDataExists = function(listBuilders) { + + for(var i = 0, length = listBuilders.length; i < length; i += 1) { + + if (listBuilders[i].data !== undefined && listBuilders[i].data instanceof Array) { + if (listBuilders[i].data.length > 0) { + return true; + } + } + } + + return false; + }; + + + function convertToListBuilder(category, data) { + + var builder = {}; + + if(configuration.get("dataType").toUpperCase() === "XML") { + + builder = convertXmlToListBuilder(); + } else { + + builder = convertDataToListBuilder(); + } + + + if (category.header !== undefined) { + builder.header = category.header; + } + + if (category.maxNumberOfElements !== undefined) { + builder.maxNumberOfElements = category.maxNumberOfElements; + } + + if (configuration.get("list").maxNumberOfElements !== undefined) { + + builder.maxListSize = configuration.get("list").maxNumberOfElements; + } + + if (category.getValue !== undefined) { + + if (typeof category.getValue === "string") { + var defaultsGetValue = category.getValue; + builder.getValue = function(element) { + return element[defaultsGetValue]; + }; + } else if (typeof category.getValue === "function") { + builder.getValue = category.getValue; + } + + } else { + builder.getValue = configuration.get("getValue"); + } + + + return builder; + + + function convertXmlToListBuilder() { + + var builder = {}, + listLocation; + + if (category.xmlElementName !== undefined) { + builder.xmlElementName = category.xmlElementName; + } + + if (category.listLocation !== undefined) { + + listLocation = category.listLocation; + } else if (configuration.get("listLocation") !== undefined) { + + listLocation = configuration.get("listLocation"); + } + + if (listLocation !== undefined) { + if (typeof listLocation === "string") { + builder.data = $(data).find(listLocation); + } else if (typeof listLocation === "function") { + + builder.data = listLocation(data); + } + } else { + + builder.data = data; + } + + return builder; + } + + + function convertDataToListBuilder() { + + var builder = {}; + + if (category.listLocation !== undefined) { + + if (typeof category.listLocation === "string") { + builder.data = data[category.listLocation]; + } else if (typeof category.listLocation === "function") { + builder.data = category.listLocation(data); + } + } else { + builder.data = data; + } + + return builder; + } + } + + function convertXmlToList(builder) { + var simpleList = []; + + if (builder.xmlElementName === undefined) { + builder.xmlElementName = configuration.get("xmlElementName"); + } + + + $(builder.data).find(builder.xmlElementName).each(function() { + simpleList.push(this); + }); + + return simpleList; + } + + }; + + return scope; + +})(EasyAutocomplete || {}); + + +/* + * EasyAutocomplete - Data proccess module + * + * Process list to display: + * - sort + * - decrease number to specific number + * - show only matching list + * + */ +var EasyAutocomplete = (function(scope) { + + scope.proccess = function proccessData(config, listBuilder, phrase) { + + scope.proccess.match = match; + + var list = listBuilder.data, + inputPhrase = phrase;//TODO REFACTOR + + list = findMatch(list, inputPhrase); + list = reduceElementsInList(list); + list = sort(list); + + return list; + + + function findMatch(list, phrase) { + var preparedList = [], + value = ""; + + if (config.get("list").match.enabled) { + + for(var i = 0, length = list.length; i < length; i += 1) { + + value = config.get("getValue")(list[i]); + + if (match(value, phrase)) { + preparedList.push(list[i]); + } + + } + + } else { + preparedList = list; + } + + return preparedList; + } + + function match(value, phrase) { + + if (!config.get("list").match.caseSensitive) { + + if (typeof value === "string") { + value = value.toLowerCase(); + } + + phrase = phrase.toLowerCase(); + } + if (config.get("list").match.method(value, phrase)) { + return true; + } else { + return false; + } + } + + function reduceElementsInList(list) { + if (listBuilder.maxNumberOfElements !== undefined && list.length > listBuilder.maxNumberOfElements) { + list = list.slice(0, listBuilder.maxNumberOfElements); + } + + return list; + } + + function sort(list) { + if (config.get("list").sort.enabled) { + list.sort(config.get("list").sort.method); + } + + return list; + } + + }; + + + return scope; + + +})(EasyAutocomplete || {}); + + +/* + * EasyAutocomplete - Template + * + * + * + */ +var EasyAutocomplete = (function(scope){ + + scope.Template = function Template(options) { + + + var genericTemplates = { + basic: { + type: "basic", + method: function(element) { return element; }, + cssClass: "" + }, + description: { + type: "description", + fields: { + description: "description" + }, + method: function(element) { return element + " - description"; }, + cssClass: "eac-description" + }, + iconLeft: { + type: "iconLeft", + fields: { + icon: "" + }, + method: function(element) { + return element; + }, + cssClass: "eac-icon-left" + }, + iconRight: { + type: "iconRight", + fields: { + iconSrc: "" + }, + method: function(element) { + return element; + }, + cssClass: "eac-icon-right" + }, + links: { + type: "links", + fields: { + link: "" + }, + method: function(element) { + return element; + }, + cssClass: "" + }, + custom: { + type: "custom", + method: function() {}, + cssClass: "" + } + }, + + + + /* + * Converts method with {{text}} to function + */ + convertTemplateToMethod = function(template) { + + + var _fields = template.fields, + buildMethod; + + if (template.type === "description") { + + buildMethod = genericTemplates.description.method; + + if (typeof _fields.description === "string") { + buildMethod = function(elementValue, element) { + return elementValue + " - " + element[_fields.description] + ""; + }; + } else if (typeof _fields.description === "function") { + buildMethod = function(elementValue, element) { + return elementValue + " - " + _fields.description(element) + ""; + }; + } + + return buildMethod; + } + + if (template.type === "iconRight") { + + if (typeof _fields.iconSrc === "string") { + buildMethod = function(elementValue, element) { + return elementValue + "" ; + }; + } else if (typeof _fields.iconSrc === "function") { + buildMethod = function(elementValue, element) { + return elementValue + "" ; + }; + } + + return buildMethod; + } + + + if (template.type === "iconLeft") { + + if (typeof _fields.iconSrc === "string") { + buildMethod = function(elementValue, element) { + return "" + elementValue; + }; + } else if (typeof _fields.iconSrc === "function") { + buildMethod = function(elementValue, element) { + return "" + elementValue; + }; + } + + return buildMethod; + } + + if(template.type === "links") { + + if (typeof _fields.link === "string") { + buildMethod = function(elementValue, element) { + return "" + elementValue + ""; + }; + } else if (typeof _fields.link === "function") { + buildMethod = function(elementValue, element) { + return "" + elementValue + ""; + }; + } + + return buildMethod; + } + + + if (template.type === "custom") { + + return template.method; + } + + return genericTemplates.basic.method; + + }, + + + prepareBuildMethod = function(options) { + if (!options || !options.type) { + + return genericTemplates.basic.method; + } + + if (options.type && genericTemplates[options.type]) { + + return convertTemplateToMethod(options); + } else { + + return genericTemplates.basic.method; + } + + }, + + templateClass = function(options) { + var emptyStringFunction = function() {return "";}; + + if (!options || !options.type) { + + return emptyStringFunction; + } + + if (options.type && genericTemplates[options.type]) { + return (function () { + var _cssClass = genericTemplates[options.type].cssClass; + return function() { return _cssClass;}; + })(); + } else { + return emptyStringFunction; + } + }; + + + this.getTemplateClass = templateClass(options); + + this.build = prepareBuildMethod(options); + + + }; + + return scope; + +})(EasyAutocomplete || {}); + + +/* + * EasyAutocomplete - jQuery plugin for autocompletion + * + */ +var EasyAutocomplete = (function(scope) { + + + scope.main = function Core($input, options) { + + var module = { + name: "EasyAutocomplete", + shortcut: "eac" + }; + + var consts = new scope.Constans(), + config = new scope.Configuration(options), + logger = new scope.Logger(), + template = new scope.Template(options.template), + listBuilderService = new scope.ListBuilderService(config, scope.proccess), + checkParam = config.equals, + + $field = $input, + $container = "", + elementsList = [], + selectedElement = -1, + requestDelayTimeoutId; + + scope.consts = consts; + + this.getConstants = function() { + return consts; + }; + + this.getConfiguration = function() { + return config; + }; + + this.getContainer = function() { + return $container; + }; + + this.getSelectedItemIndex = function() { + return selectedElement; + }; + + this.getItems = function () { + return elementsList; + }; + + this.getItemData = function(index) { + + if (elementsList.length < index || elementsList[index] === undefined) { + return -1; + } else { + return elementsList[index]; + } + }; + + this.getSelectedItemData = function() { + return this.getItemData(selectedElement); + }; + + this.build = function() { + prepareField(); + }; + + this.init = function() { + init(); + }; + function init() { + + if ($field.length === 0) { + logger.error("Input field doesn't exist."); + return; + } + + if (!config.checkDataUrlProperties()) { + logger.error("One of options variables 'data' or 'url' must be defined."); + return; + } + + if (!config.checkRequiredProperties()) { + logger.error("Will not work without mentioned properties."); + return; + } + + + prepareField(); + bindEvents(); + + } + function prepareField() { + + + if ($field.parent().hasClass(consts.getValue("WRAPPER_CSS_CLASS"))) { + removeContainer(); + removeWrapper(); + } + + createWrapper(); + createContainer(); + + $container = $("#" + getContainerId()); + if (config.get("placeholder")) { + $field.attr("placeholder", config.get("placeholder")); + } + + + function createWrapper() { + var $wrapper = $("
"), + classes = consts.getValue("WRAPPER_CSS_CLASS"); + + + if (config.get("theme") && config.get("theme") !== "") { + classes += " eac-" + config.get("theme"); + } + + if (config.get("cssClasses") && config.get("cssClasses") !== "") { + classes += " " + config.get("cssClasses"); + } + + if (template.getTemplateClass() !== "") { + classes += " " + template.getTemplateClass(); + } + + + $wrapper + .addClass(classes); + $field.wrap($wrapper); + + + if (config.get("adjustWidth") === true) { + adjustWrapperWidth(); + } + + + } + + function adjustWrapperWidth() { + var fieldWidth = $field.outerWidth(); + + $field.parent().css("width", fieldWidth); + } + + function removeWrapper() { + $field.unwrap(); + } + + function createContainer() { + var $elements_container = $("
").addClass(consts.getValue("CONTAINER_CLASS")); + + $elements_container + .attr("id", getContainerId()) + .prepend($("
    ")); + + + (function() { + + $elements_container + /* List show animation */ + .on("show.eac", function() { + + switch(config.get("list").showAnimation.type) { + + case "slide": + var animationTime = config.get("list").showAnimation.time, + callback = config.get("list").showAnimation.callback; + + $elements_container.find("ul").slideDown(animationTime, callback); + break; + + case "fade": + var animationTime = config.get("list").showAnimation.time, + callback = config.get("list").showAnimation.callback; + + $elements_container.find("ul").fadeIn(animationTime), callback; + break; + + default: + $elements_container.find("ul").show(); + break; + } + + config.get("list").onShowListEvent(); + + }) + /* List hide animation */ + .on("hide.eac", function() { + + switch(config.get("list").hideAnimation.type) { + + case "slide": + var animationTime = config.get("list").hideAnimation.time, + callback = config.get("list").hideAnimation.callback; + + $elements_container.find("ul").slideUp(animationTime, callback); + break; + + case "fade": + var animationTime = config.get("list").hideAnimation.time, + callback = config.get("list").hideAnimation.callback; + + $elements_container.find("ul").fadeOut(animationTime, callback); + break; + + default: + $elements_container.find("ul").hide(); + break; + } + + config.get("list").onHideListEvent(); + + }) + .on("selectElement.eac", function() { + $elements_container.find("ul li").removeClass("selected"); + $elements_container.find("ul li").eq(selectedElement).addClass("selected"); + + config.get("list").onSelectItemEvent(); + }) + .on("loadElements.eac", function(event, listBuilders, phrase) { + + + var $item = "", + $listContainer = $elements_container.find("ul"); + + $listContainer + .empty() + .detach(); + + elementsList = []; + var counter = 0; + for(var builderIndex = 0, listBuildersLength = listBuilders.length; builderIndex < listBuildersLength; builderIndex += 1) { + + var listData = listBuilders[builderIndex].data; + + if (listData.length === 0) { + continue; + } + + if (listBuilders[builderIndex].header !== undefined && listBuilders[builderIndex].header.length > 0) { + $listContainer.append("
    " + listBuilders[builderIndex].header + "
    "); + } + + for(var i = 0, listDataLength = listData.length; i < listDataLength && counter < listBuilders[builderIndex].maxListSize; i += 1) { + $item = $("
  • "); + + + (function() { + var j = i, + itemCounter = counter, + elementsValue = listBuilders[builderIndex].getValue(listData[j]); + + $item.find(" > div") + .on("click", function() { + + $field.val(elementsValue).trigger("change"); + + selectedElement = itemCounter; + selectElement(itemCounter); + + config.get("list").onClickEvent(); + config.get("list").onChooseEvent(); + }) + .mouseover(function() { + + selectedElement = itemCounter; + selectElement(itemCounter); + + config.get("list").onMouseOverEvent(); + }) + .mouseout(function() { + config.get("list").onMouseOutEvent(); + }) + .html(template.build(highlight(elementsValue, phrase), listData[j])); + })(); + + $listContainer.append($item); + elementsList.push(listData[i]); + counter += 1; + } + } + + $elements_container.append($listContainer); + + config.get("list").onLoadEvent(); + }); + + })(); + + $field.after($elements_container); + } + + function removeContainer() { + $field.next("." + consts.getValue("CONTAINER_CLASS")).remove(); + } + + function highlight(string, phrase) { + + if(config.get("highlightPhrase") && phrase !== "") { + return highlightPhrase(string, phrase); + } else { + return string; + } + + } + + function escapeRegExp(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); + } + + function highlightPhrase(string, phrase) { + var escapedPhrase = escapeRegExp(phrase); + return (string + "").replace(new RegExp("(" + escapedPhrase + ")", "gi") , "$1"); + } + + + + } + function getContainerId() { + + var elementId = $field.attr("id"); + + elementId = consts.getValue("CONTAINER_ID") + elementId; + + return elementId; + } + function bindEvents() { + + bindAllEvents(); + + + function bindAllEvents() { + if (checkParam("autocompleteOff", true)) { + removeAutocomplete(); + } + + bindFocusOut(); + bindKeyup(); + bindKeydown(); + bindKeypress(); + bindFocus(); + bindBlur(); + } + + function bindFocusOut() { + $field.focusout(function () { + + var fieldValue = $field.val(), + phrase; + + if (!config.get("list").match.caseSensitive) { + fieldValue = fieldValue.toLowerCase(); + } + + for (var i = 0, length = elementsList.length; i < length; i += 1) { + + phrase = config.get("getValue")(elementsList[i]); + if (!config.get("list").match.caseSensitive) { + phrase = phrase.toLowerCase(); + } + + if (phrase === fieldValue) { + selectedElement = i; + selectElement(selectedElement); + return; + } + } + }); + } + + function bindKeyup() { + $field + .off("keyup") + .keyup(function(event) { + + switch(event.keyCode) { + + case 27: + + hideContainer(); + loseFieldFocus(); + break; + + case 38: + + event.preventDefault(); + + if(elementsList.length > 0 && selectedElement > 0) { + + selectedElement -= 1; + + $field.val(config.get("getValue")(elementsList[selectedElement])); + + selectElement(selectedElement); + + } + break; + + case 40: + + event.preventDefault(); + + if(elementsList.length > 0 && selectedElement < elementsList.length - 1) { + + selectedElement += 1; + + $field.val(config.get("getValue")(elementsList[selectedElement])); + + selectElement(selectedElement); + + } + + break; + + default: + + if (event.keyCode > 40 || event.keyCode === 8) { + + var inputPhrase = $field.val(); + + if (!(config.get("list").hideOnEmptyPhrase === true && event.keyCode === 8 && inputPhrase === "")) { + + if (config.get("requestDelay") > 0) { + if (requestDelayTimeoutId !== undefined) { + clearTimeout(requestDelayTimeoutId); + } + + requestDelayTimeoutId = setTimeout(function () { loadData(inputPhrase);}, config.get("requestDelay")); + } else { + loadData(inputPhrase); + } + + } else { + hideContainer(); + } + + } + + + break; + } + + + function loadData(inputPhrase) { + + + if (inputPhrase.length < config.get("minCharNumber")) { + return; + } + + + if (config.get("data") !== "list-required") { + + var data = config.get("data"); + + var listBuilders = listBuilderService.init(data); + + listBuilders = listBuilderService.updateCategories(listBuilders, data); + + listBuilders = listBuilderService.processData(listBuilders, inputPhrase); + + loadElements(listBuilders, inputPhrase); + + if ($field.parent().find("li").length > 0) { + showContainer(); + } else { + hideContainer(); + } + + } + + var settings = createAjaxSettings(); + + if (settings.url === undefined || settings.url === "") { + settings.url = config.get("url"); + } + + if (settings.dataType === undefined || settings.dataType === "") { + settings.dataType = config.get("dataType"); + } + + + if (settings.url !== undefined && settings.url !== "list-required") { + + settings.url = settings.url(inputPhrase); + + settings.data = config.get("preparePostData")(settings.data, inputPhrase); + + $.ajax(settings) + .done(function(data) { + + var listBuilders = listBuilderService.init(data); + + listBuilders = listBuilderService.updateCategories(listBuilders, data); + + listBuilders = listBuilderService.convertXml(listBuilders); + if (checkInputPhraseMatchResponse(inputPhrase, data)) { + + listBuilders = listBuilderService.processData(listBuilders, inputPhrase); + + loadElements(listBuilders, inputPhrase); + + } + + if (listBuilderService.checkIfDataExists(listBuilders) && $field.parent().find("li").length > 0) { + showContainer(); + } else { + hideContainer(); + } + + config.get("ajaxCallback")(); + + }) + .fail(function() { + logger.warning("Fail to load response data"); + }) + .always(function() { + + }); + } + + + + function createAjaxSettings() { + + var settings = {}, + ajaxSettings = config.get("ajaxSettings") || {}; + + for (var set in ajaxSettings) { + settings[set] = ajaxSettings[set]; + } + + return settings; + } + + function checkInputPhraseMatchResponse(inputPhrase, data) { + + if (config.get("matchResponseProperty") !== false) { + if (typeof config.get("matchResponseProperty") === "string") { + return (data[config.get("matchResponseProperty")] === inputPhrase); + } + + if (typeof config.get("matchResponseProperty") === "function") { + return (config.get("matchResponseProperty")(data) === inputPhrase); + } + + return true; + } else { + return true; + } + + } + + } + + + }); + } + + function bindKeydown() { + $field + .on("keydown", function(evt) { + evt = evt || window.event; + var keyCode = evt.keyCode; + if (keyCode === 38) { + suppressKeypress = true; + return false; + } + }) + .keydown(function(event) { + + if (event.keyCode === 13 && selectedElement > -1) { + + $field.val(config.get("getValue")(elementsList[selectedElement])); + + config.get("list").onKeyEnterEvent(); + config.get("list").onChooseEvent(); + + selectedElement = -1; + hideContainer(); + + event.preventDefault(); + } + }); + } + + function bindKeypress() { + $field + .off("keypress"); + } + + function bindFocus() { + $field.focus(function() { + + if ($field.val() !== "" && elementsList.length > 0) { + + selectedElement = -1; + showContainer(); + } + + }); + } + + function bindBlur() { + $field.blur(function() { + setTimeout(function() { + + selectedElement = -1; + hideContainer(); + }, 250); + }); + } + + function removeAutocomplete() { + $field.attr("autocomplete","off"); + } + + } + + function showContainer() { + $container.trigger("show.eac"); + } + + function hideContainer() { + $container.trigger("hide.eac"); + } + + function selectElement(index) { + + $container.trigger("selectElement.eac", index); + } + + function loadElements(list, phrase) { + $container.trigger("loadElements.eac", [list, phrase]); + } + + function loseFieldFocus() { + $field.trigger("blur"); + } + + + }; + scope.eacHandles = []; + + scope.getHandle = function(id) { + return scope.eacHandles[id]; + }; + + scope.inputHasId = function(input) { + + if($(input).attr("id") !== undefined && $(input).attr("id").length > 0) { + return true; + } else { + return false; + } + + }; + + scope.assignRandomId = function(input) { + + var fieldId = ""; + + do { + fieldId = "eac-" + Math.floor(Math.random() * 10000); + } while ($("#" + fieldId).length !== 0); + + elementId = scope.consts.getValue("CONTAINER_ID") + fieldId; + + $(input).attr("id", fieldId); + + }; + + scope.setHandle = function(handle, id) { + scope.eacHandles[id] = handle; + }; + + + return scope; + +})(EasyAutocomplete || {}); + +(function($) { + + $.fn.easyAutocomplete = function(options) { + + return this.each(function() { + var $this = $(this), + eacHandle = new EasyAutocomplete.main($this, options); + + if (!EasyAutocomplete.inputHasId($this)) { + EasyAutocomplete.assignRandomId($this); + } + + eacHandle.init(); + + EasyAutocomplete.setHandle(eacHandle, $this.attr("id")); + + }); + }; + + $.fn.getSelectedItemIndex = function() { + + var inputId = $(this).attr("id"); + + if (inputId !== undefined) { + return EasyAutocomplete.getHandle(inputId).getSelectedItemIndex(); + } + + return -1; + }; + + $.fn.getItems = function () { + + var inputId = $(this).attr("id"); + + if (inputId !== undefined) { + return EasyAutocomplete.getHandle(inputId).getItems(); + } + + return -1; + }; + + $.fn.getItemData = function(index) { + + var inputId = $(this).attr("id"); + + if (inputId !== undefined && index > -1) { + return EasyAutocomplete.getHandle(inputId).getItemData(index); + } + + return -1; + }; + + $.fn.getSelectedItemData = function() { + + var inputId = $(this).attr("id"); + + if (inputId !== undefined) { + return EasyAutocomplete.getHandle(inputId).getSelectedItemData(); + } + + return -1; + }; + +})(jQuery); diff --git a/themes/design1/resources/js-imports/easyautocomplete-1.3.5/jquery.easy-autocomplete.min.js b/themes/design1/resources/js-imports/easyautocomplete-1.3.5/jquery.easy-autocomplete.min.js new file mode 100644 index 0000000..70630c5 --- /dev/null +++ b/themes/design1/resources/js-imports/easyautocomplete-1.3.5/jquery.easy-autocomplete.min.js @@ -0,0 +1,10 @@ +/* + * easy-autocomplete + * jQuery plugin for autocompletion + * + * @author Łukasz Pawełczak (http://github.com/pawelczak) + * @version 1.3.5 + * Copyright License: + */ + +var EasyAutocomplete=function(a){return a.Configuration=function(a){function b(){if("xml"===a.dataType&&(a.getValue||(a.getValue=function(a){return $(a).text()}),a.list||(a.list={}),a.list.sort||(a.list.sort={}),a.list.sort.method=function(b,c){return b=a.getValue(b),c=a.getValue(c),c>b?-1:b>c?1:0},a.list.match||(a.list.match={}),a.list.match.method=function(a,b){return a.search(b)>-1}),void 0!==a.categories&&a.categories instanceof Array){for(var b=[],c=0,d=a.categories.length;d>c;c+=1){var e=a.categories[c];for(var f in h.categories[0])void 0===e[f]&&(e[f]=h.categories[0][f]);b.push(e)}a.categories=b}}function c(){function b(a,c){var d=a||{};for(var e in a)void 0!==c[e]&&null!==c[e]&&("object"!=typeof c[e]||c[e]instanceof Array?d[e]=c[e]:b(a[e],c[e]));return void 0!==c.data&&null!==c.data&&"object"==typeof c.data&&(d.data=c.data),d}h=b(h,a)}function d(){if("list-required"!==h.url&&"function"!=typeof h.url){var b=h.url;h.url=function(){return b}}if(void 0!==h.ajaxSettings.url&&"function"!=typeof h.ajaxSettings.url){var b=h.ajaxSettings.url;h.ajaxSettings.url=function(){return b}}if("string"==typeof h.listLocation){var c=h.listLocation;"XML"===h.dataType.toUpperCase()?h.listLocation=function(a){return $(a).find(c)}:h.listLocation=function(a){return a[c]}}if("string"==typeof h.getValue){var d=h.getValue;h.getValue=function(a){return a[d]}}void 0!==a.categories&&(h.categoriesAssigned=!0)}function e(){void 0!==a.ajaxSettings&&"object"==typeof a.ajaxSettings?h.ajaxSettings=a.ajaxSettings:h.ajaxSettings={}}function f(a){return void 0!==h[a]&&null!==h[a]}function g(a,b){function c(b,d){for(var e in d)void 0===b[e]&&a.log("Property '"+e+"' does not exist in EasyAutocomplete options API."),"object"==typeof b[e]&&-1===$.inArray(e,i)&&c(b[e],d[e])}c(h,b)}var h={data:"list-required",url:"list-required",dataType:"json",listLocation:function(a){return a},xmlElementName:"",getValue:function(a){return a},autocompleteOff:!0,placeholder:!1,ajaxCallback:function(){},matchResponseProperty:!1,list:{sort:{enabled:!1,method:function(a,b){return a=h.getValue(a),b=h.getValue(b),b>a?-1:a>b?1:0}},maxNumberOfElements:6,hideOnEmptyPhrase:!0,match:{enabled:!1,caseSensitive:!1,method:function(a,b){return a.search(b)>-1}},showAnimation:{type:"normal",time:400,callback:function(){}},hideAnimation:{type:"normal",time:400,callback:function(){}},onClickEvent:function(){},onSelectItemEvent:function(){},onLoadEvent:function(){},onChooseEvent:function(){},onKeyEnterEvent:function(){},onMouseOverEvent:function(){},onMouseOutEvent:function(){},onShowListEvent:function(){},onHideListEvent:function(){}},highlightPhrase:!0,theme:"",cssClasses:"",minCharNumber:0,requestDelay:0,adjustWidth:!0,ajaxSettings:{},preparePostData:function(a,b){return a},loggerEnabled:!0,template:"",categoriesAssigned:!1,categories:[{maxNumberOfElements:4}]},i=["ajaxSettings","template"];this.get=function(a){return h[a]},this.equals=function(a,b){return!(!f(a)||h[a]!==b)},this.checkDataUrlProperties=function(){return"list-required"!==h.url||"list-required"!==h.data},this.checkRequiredProperties=function(){for(var a in h)if("required"===h[a])return logger.error("Option "+a+" must be defined"),!1;return!0},this.printPropertiesThatDoesntExist=function(a,b){g(a,b)},b(),c(),h.loggerEnabled===!0&&g(console,a),e(),d()},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.Logger=function(){this.error=function(a){console.log("ERROR: "+a)},this.warning=function(a){console.log("WARNING: "+a)}},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.Constans=function(){var a={CONTAINER_CLASS:"easy-autocomplete-container",CONTAINER_ID:"eac-container-",WRAPPER_CSS_CLASS:"easy-autocomplete"};this.getValue=function(b){return a[b]}},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.ListBuilderService=function(a,b){function c(b,c){function d(){var d,e={};return void 0!==b.xmlElementName&&(e.xmlElementName=b.xmlElementName),void 0!==b.listLocation?d=b.listLocation:void 0!==a.get("listLocation")&&(d=a.get("listLocation")),void 0!==d?"string"==typeof d?e.data=$(c).find(d):"function"==typeof d&&(e.data=d(c)):e.data=c,e}function e(){var a={};return void 0!==b.listLocation?"string"==typeof b.listLocation?a.data=c[b.listLocation]:"function"==typeof b.listLocation&&(a.data=b.listLocation(c)):a.data=c,a}var f={};if(f="XML"===a.get("dataType").toUpperCase()?d():e(),void 0!==b.header&&(f.header=b.header),void 0!==b.maxNumberOfElements&&(f.maxNumberOfElements=b.maxNumberOfElements),void 0!==a.get("list").maxNumberOfElements&&(f.maxListSize=a.get("list").maxNumberOfElements),void 0!==b.getValue)if("string"==typeof b.getValue){var g=b.getValue;f.getValue=function(a){return a[g]}}else"function"==typeof b.getValue&&(f.getValue=b.getValue);else f.getValue=a.get("getValue");return f}function d(b){var c=[];return void 0===b.xmlElementName&&(b.xmlElementName=a.get("xmlElementName")),$(b.data).find(b.xmlElementName).each(function(){c.push(this)}),c}this.init=function(b){var c=[],d={};return d.data=a.get("listLocation")(b),d.getValue=a.get("getValue"),d.maxListSize=a.get("list").maxNumberOfElements,c.push(d),c},this.updateCategories=function(b,d){if(a.get("categoriesAssigned")){b=[];for(var e=0;ee;e+=1)c[e].data=b(a,c[e],d);return c},this.checkIfDataExists=function(a){for(var b=0,c=a.length;c>b;b+=1)if(void 0!==a[b].data&&a[b].data instanceof Array&&a[b].data.length>0)return!0;return!1}},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.proccess=function(b,c,d){function e(a,c){var d=[],e="";if(b.get("list").match.enabled)for(var g=0,h=a.length;h>g;g+=1)e=b.get("getValue")(a[g]),f(e,c)&&d.push(a[g]);else d=a;return d}function f(a,c){return b.get("list").match.caseSensitive||("string"==typeof a&&(a=a.toLowerCase()),c=c.toLowerCase()),!!b.get("list").match.method(a,c)}function g(a){return void 0!==c.maxNumberOfElements&&a.length>c.maxNumberOfElements&&(a=a.slice(0,c.maxNumberOfElements)),a}function h(a){return b.get("list").sort.enabled&&a.sort(b.get("list").sort.method),a}a.proccess.match=f;var i=c.data,j=d;return i=e(i,j),i=g(i),i=h(i)},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.Template=function(a){var b={basic:{type:"basic",method:function(a){return a},cssClass:""},description:{type:"description",fields:{description:"description"},method:function(a){return a+" - description"},cssClass:"eac-description"},iconLeft:{type:"iconLeft",fields:{icon:""},method:function(a){return a},cssClass:"eac-icon-left"},iconRight:{type:"iconRight",fields:{iconSrc:""},method:function(a){return a},cssClass:"eac-icon-right"},links:{type:"links",fields:{link:""},method:function(a){return a},cssClass:""},custom:{type:"custom",method:function(){},cssClass:""}},c=function(a){var c,d=a.fields;return"description"===a.type?(c=b.description.method,"string"==typeof d.description?c=function(a,b){return a+" - "+b[d.description]+""}:"function"==typeof d.description&&(c=function(a,b){return a+" - "+d.description(b)+""}),c):"iconRight"===a.type?("string"==typeof d.iconSrc?c=function(a,b){return a+""}:"function"==typeof d.iconSrc&&(c=function(a,b){return a+""}),c):"iconLeft"===a.type?("string"==typeof d.iconSrc?c=function(a,b){return""+a}:"function"==typeof d.iconSrc&&(c=function(a,b){return""+a}),c):"links"===a.type?("string"==typeof d.link?c=function(a,b){return""+a+""}:"function"==typeof d.link&&(c=function(a,b){return""+a+""}),c):"custom"===a.type?a.method:b.basic.method},d=function(a){return a&&a.type&&a.type&&b[a.type]?c(a):b.basic.method},e=function(a){var c=function(){return""};return a&&a.type&&a.type&&b[a.type]?function(){var c=b[a.type].cssClass;return function(){return c}}():c};this.getTemplateClass=e(a),this.build=d(a)},a}(EasyAutocomplete||{}),EasyAutocomplete=function(a){return a.main=function(b,c){function d(){return 0===t.length?void p.error("Input field doesn't exist."):o.checkDataUrlProperties()?o.checkRequiredProperties()?(e(),void g()):void p.error("Will not work without mentioned properties."):void p.error("One of options variables 'data' or 'url' must be defined.")}function e(){function a(){var a=$("
    "),c=n.getValue("WRAPPER_CSS_CLASS");o.get("theme")&&""!==o.get("theme")&&(c+=" eac-"+o.get("theme")),o.get("cssClasses")&&""!==o.get("cssClasses")&&(c+=" "+o.get("cssClasses")),""!==q.getTemplateClass()&&(c+=" "+q.getTemplateClass()),a.addClass(c),t.wrap(a),o.get("adjustWidth")===!0&&b()}function b(){var a=t.outerWidth();t.parent().css("width",a)}function c(){t.unwrap()}function d(){var a=$("
    ").addClass(n.getValue("CONTAINER_CLASS"));a.attr("id",f()).prepend($("
      ")),function(){a.on("show.eac",function(){switch(o.get("list").showAnimation.type){case"slide":var b=o.get("list").showAnimation.time,c=o.get("list").showAnimation.callback;a.find("ul").slideDown(b,c);break;case"fade":var b=o.get("list").showAnimation.time,c=o.get("list").showAnimation.callback;a.find("ul").fadeIn(b),c;break;default:a.find("ul").show()}o.get("list").onShowListEvent()}).on("hide.eac",function(){switch(o.get("list").hideAnimation.type){case"slide":var b=o.get("list").hideAnimation.time,c=o.get("list").hideAnimation.callback;a.find("ul").slideUp(b,c);break;case"fade":var b=o.get("list").hideAnimation.time,c=o.get("list").hideAnimation.callback;a.find("ul").fadeOut(b,c);break;default:a.find("ul").hide()}o.get("list").onHideListEvent()}).on("selectElement.eac",function(){a.find("ul li").removeClass("selected"),a.find("ul li").eq(w).addClass("selected"),o.get("list").onSelectItemEvent()}).on("loadElements.eac",function(b,c,d){var e="",f=a.find("ul");f.empty().detach(),v=[];for(var h=0,i=0,k=c.length;k>i;i+=1){var l=c[i].data;if(0!==l.length){void 0!==c[i].header&&c[i].header.length>0&&f.append("
      "+c[i].header+"
      ");for(var m=0,n=l.length;n>m&&h
      "),function(){var a=m,b=h,f=c[i].getValue(l[a]);e.find(" > div").on("click",function(){t.val(f).trigger("change"),w=b,j(b),o.get("list").onClickEvent(),o.get("list").onChooseEvent()}).mouseover(function(){w=b,j(b),o.get("list").onMouseOverEvent()}).mouseout(function(){o.get("list").onMouseOutEvent()}).html(q.build(g(f,d),l[a]))}(),f.append(e),v.push(l[m]),h+=1}}a.append(f),o.get("list").onLoadEvent()})}(),t.after(a)}function e(){t.next("."+n.getValue("CONTAINER_CLASS")).remove()}function g(a,b){return o.get("highlightPhrase")&&""!==b?i(a,b):a}function h(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function i(a,b){var c=h(b);return(a+"").replace(new RegExp("("+c+")","gi"),"$1")}t.parent().hasClass(n.getValue("WRAPPER_CSS_CLASS"))&&(e(),c()),a(),d(),u=$("#"+f()),o.get("placeholder")&&t.attr("placeholder",o.get("placeholder"))}function f(){var a=t.attr("id");return a=n.getValue("CONTAINER_ID")+a}function g(){function a(){s("autocompleteOff",!0)&&n(),b(),c(),d(),e(),f(),g()}function b(){t.focusout(function(){var a,b=t.val();o.get("list").match.caseSensitive||(b=b.toLowerCase());for(var c=0,d=v.length;d>c;c+=1)if(a=o.get("getValue")(v[c]),o.get("list").match.caseSensitive||(a=a.toLowerCase()),a===b)return w=c,void j(w)})}function c(){t.off("keyup").keyup(function(a){function b(a){function b(){var a={},b=o.get("ajaxSettings")||{};for(var c in b)a[c]=b[c];return a}function c(a,b){return o.get("matchResponseProperty")!==!1?"string"==typeof o.get("matchResponseProperty")?b[o.get("matchResponseProperty")]===a:"function"==typeof o.get("matchResponseProperty")?o.get("matchResponseProperty")(b)===a:!0:!0}if(!(a.length0?h():i()}var f=b();void 0!==f.url&&""!==f.url||(f.url=o.get("url")),void 0!==f.dataType&&""!==f.dataType||(f.dataType=o.get("dataType")),void 0!==f.url&&"list-required"!==f.url&&(f.url=f.url(a),f.data=o.get("preparePostData")(f.data,a),$.ajax(f).done(function(b){var d=r.init(b);d=r.updateCategories(d,b),d=r.convertXml(d),c(a,b)&&(d=r.processData(d,a),k(d,a)),r.checkIfDataExists(d)&&t.parent().find("li").length>0?h():i(),o.get("ajaxCallback")()}).fail(function(){p.warning("Fail to load response data")}).always(function(){}))}}switch(a.keyCode){case 27:i(),l();break;case 38:a.preventDefault(),v.length>0&&w>0&&(w-=1,t.val(o.get("getValue")(v[w])),j(w));break;case 40:a.preventDefault(),v.length>0&&w40||8===a.keyCode){var c=t.val();o.get("list").hideOnEmptyPhrase!==!0||8!==a.keyCode||""!==c?o.get("requestDelay")>0?(void 0!==m&&clearTimeout(m),m=setTimeout(function(){b(c)},o.get("requestDelay"))):b(c):i()}}})}function d(){t.on("keydown",function(a){a=a||window.event;var b=a.keyCode;return 38===b?(suppressKeypress=!0,!1):void 0}).keydown(function(a){13===a.keyCode&&w>-1&&(t.val(o.get("getValue")(v[w])),o.get("list").onKeyEnterEvent(),o.get("list").onChooseEvent(),w=-1,i(),a.preventDefault())})}function e(){t.off("keypress")}function f(){t.focus(function(){""!==t.val()&&v.length>0&&(w=-1,h())})}function g(){t.blur(function(){setTimeout(function(){w=-1,i()},250)})}function n(){t.attr("autocomplete","off")}a()}function h(){u.trigger("show.eac")}function i(){u.trigger("hide.eac")}function j(a){u.trigger("selectElement.eac",a)}function k(a,b){u.trigger("loadElements.eac",[a,b])}function l(){t.trigger("blur")}var m,n=new a.Constans,o=new a.Configuration(c),p=new a.Logger,q=new a.Template(c.template),r=new a.ListBuilderService(o,a.proccess),s=o.equals,t=b,u="",v=[],w=-1;a.consts=n,this.getConstants=function(){return n},this.getConfiguration=function(){return o},this.getContainer=function(){return u},this.getSelectedItemIndex=function(){return w},this.getItems=function(){return v},this.getItemData=function(a){return v.length0},a.assignRandomId=function(b){var c="";do c="eac-"+Math.floor(1e4*Math.random());while(0!==$("#"+c).length);elementId=a.consts.getValue("CONTAINER_ID")+c,$(b).attr("id",c)},a.setHandle=function(b,c){a.eacHandles[c]=b},a}(EasyAutocomplete||{});!function(a){a.fn.easyAutocomplete=function(b){return this.each(function(){var c=a(this),d=new EasyAutocomplete.main(c,b);EasyAutocomplete.inputHasId(c)||EasyAutocomplete.assignRandomId(c),d.init(),EasyAutocomplete.setHandle(d,c.attr("id"))})},a.fn.getSelectedItemIndex=function(){var b=a(this).attr("id");return void 0!==b?EasyAutocomplete.getHandle(b).getSelectedItemIndex():-1},a.fn.getItems=function(){var b=a(this).attr("id");return void 0!==b?EasyAutocomplete.getHandle(b).getItems():-1},a.fn.getItemData=function(b){var c=a(this).attr("id");return void 0!==c&&b>-1?EasyAutocomplete.getHandle(c).getItemData(b):-1},a.fn.getSelectedItemData=function(){var b=a(this).attr("id");return void 0!==b?EasyAutocomplete.getHandle(b).getSelectedItemData():-1}}(jQuery); \ No newline at end of file diff --git a/themes/design1/resources/js/scripts.js b/themes/design1/resources/js/scripts.js index 89275e8..f76c746 100644 --- a/themes/design1/resources/js/scripts.js +++ b/themes/design1/resources/js/scripts.js @@ -58,7 +58,7 @@ $(document).ready(function(){ $('.this-date').show() $('.between-date').hide() }) - + /*** $('#search').keyup(function() { if($(this).val() == 'econ' ){ $('.the-result').show(); @@ -67,6 +67,7 @@ $(document).ready(function(){ $('.the-result').hide(); } }); + ***/ $('section').click(function(){ $('.the-result').hide(); }) diff --git a/themes/design1/resources/js/searchac.js b/themes/design1/resources/js/searchac.js new file mode 100644 index 0000000..5cfd359 --- /dev/null +++ b/themes/design1/resources/js/searchac.js @@ -0,0 +1,17 @@ +$(function () { + 'use strict'; + var options = { + url: '/gw/service/searchac/', + categories: [{ + listLocation: "keyword", + maxNumberOfElements: 5, + header: "Keyword" + }, { + listLocation: "country", + maxNumberOfElements: 5, + header: "Country" + }, { + + }], + }; +}); \ No newline at end of file diff --git a/themes/design1/tmpl-default.xhtml b/themes/design1/tmpl-default.xhtml index d217341..9d1ea26 100644 --- a/themes/design1/tmpl-default.xhtml +++ b/themes/design1/tmpl-default.xhtml @@ -23,7 +23,7 @@ - + + + + diff --git a/themes/common/components/jquery-ui-1.12.1.custom/jquery-ui.css b/themes/common/components/jquery-ui-1.12.1.custom/jquery-ui.css new file mode 100644 index 0000000..06176d1 --- /dev/null +++ b/themes/common/components/jquery-ui-1.12.1.custom/jquery-ui.css @@ -0,0 +1,582 @@ +/*! jQuery UI - v1.12.1 - 2017-10-22 +* http://jqueryui.com +* Includes: core.css, autocomplete.css, menu.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?scope=&folderName=base&cornerRadiusShadow=8px&offsetLeftShadow=0px&offsetTopShadow=0px&thicknessShadow=5px&opacityShadow=30&bgImgOpacityShadow=0&bgTextureShadow=flat&bgColorShadow=666666&opacityOverlay=30&bgImgOpacityOverlay=0&bgTextureOverlay=flat&bgColorOverlay=aaaaaa&iconColorError=cc0000&fcError=5f3f3f&borderColorError=f1a899&bgTextureError=flat&bgColorError=fddfdf&iconColorHighlight=777620&fcHighlight=777620&borderColorHighlight=dad55e&bgTextureHighlight=flat&bgColorHighlight=fffa90&iconColorActive=ffffff&fcActive=ffffff&borderColorActive=003eff&bgTextureActive=flat&bgColorActive=007fff&iconColorHover=555555&fcHover=2b2b2b&borderColorHover=cccccc&bgTextureHover=flat&bgColorHover=ededed&iconColorDefault=777777&fcDefault=454545&borderColorDefault=c5c5c5&bgTextureDefault=flat&bgColorDefault=f6f6f6&iconColorContent=444444&fcContent=333333&borderColorContent=dddddd&bgTextureContent=flat&bgColorContent=ffffff&iconColorHeader=444444&fcHeader=333333&borderColorHeader=dddddd&bgTextureHeader=flat&bgColorHeader=e9e9e9&cornerRadius=3px&fwDefault=normal&fsDefault=1em&ffDefault=Arial%2CHelvetica%2Csans-serif +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; + pointer-events: none; +} + + +/* Icons +----------------------------------*/ +.ui-icon { + display: inline-block; + vertical-align: middle; + margin-top: -.25em; + position: relative; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + +.ui-widget-icon-block { + left: 50%; + margin-left: -8px; + display: block; +} + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: 0; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + margin: 0; + cursor: pointer; + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-item-wrapper { + position: relative; + padding: 3px 1em 3px .4em; +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item-wrapper { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Arial,Helvetica,sans-serif; + font-size: 1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Arial,Helvetica,sans-serif; + font-size: 1em; +} +.ui-widget.ui-widget-content { + border: 1px solid #c5c5c5; +} +.ui-widget-content { + border: 1px solid #dddddd; + background: #ffffff; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #dddddd; + background: #e9e9e9; + color: #333333; + font-weight: bold; +} +.ui-widget-header a { + color: #333333; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default, +.ui-button, + +/* We use html here because we need a greater specificity to make sure disabled +works properly when clicked or hovered */ +html .ui-button.ui-state-disabled:hover, +html .ui-button.ui-state-disabled:active { + border: 1px solid #c5c5c5; + background: #f6f6f6; + font-weight: normal; + color: #454545; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited, +a.ui-button, +a:link.ui-button, +a:visited.ui-button, +.ui-button { + color: #454545; + text-decoration: none; +} +.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, +.ui-button:hover, +.ui-button:focus { + border: 1px solid #cccccc; + background: #ededed; + font-weight: normal; + color: #2b2b2b; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited, +a.ui-button:hover, +a.ui-button:focus { + color: #2b2b2b; + text-decoration: none; +} + +.ui-visual-focus { + box-shadow: 0 0 3px 1px rgb(94, 158, 214); +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + border: 1px solid #003eff; + background: #007fff; + font-weight: normal; + color: #ffffff; +} +.ui-icon-background, +.ui-state-active .ui-icon-background { + border: #003eff; + background-color: #ffffff; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #ffffff; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #dad55e; + background: #fffa90; + color: #777620; +} +.ui-state-checked { + border: 1px solid #dad55e; + background: #fffa90; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #777620; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #f1a899; + background: #fddfdf; + color: #5f3f3f; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #5f3f3f; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #5f3f3f; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("images/ui-icons_444444_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("images/ui-icons_444444_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon, +.ui-button:hover .ui-icon, +.ui-button:focus .ui-icon { + background-image: url("images/ui-icons_555555_256x240.png"); +} +.ui-state-active .ui-icon, +.ui-button:active .ui-icon { + background-image: url("images/ui-icons_ffffff_256x240.png"); +} +.ui-state-highlight .ui-icon, +.ui-button .ui-state-highlight.ui-icon { + background-image: url("images/ui-icons_777620_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("images/ui-icons_cc0000_256x240.png"); +} +.ui-button .ui-icon { + background-image: url("images/ui-icons_777777_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-caret-1-n { background-position: 0 0; } +.ui-icon-caret-1-ne { background-position: -16px 0; } +.ui-icon-caret-1-e { background-position: -32px 0; } +.ui-icon-caret-1-se { background-position: -48px 0; } +.ui-icon-caret-1-s { background-position: -65px 0; } +.ui-icon-caret-1-sw { background-position: -80px 0; } +.ui-icon-caret-1-w { background-position: -96px 0; } +.ui-icon-caret-1-nw { background-position: -112px 0; } +.ui-icon-caret-2-n-s { background-position: -128px 0; } +.ui-icon-caret-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -65px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -65px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 1px -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 3px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 3px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 3px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 3px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #aaaaaa; + opacity: .3; + filter: Alpha(Opacity=30); /* support: IE8 */ +} +.ui-widget-shadow { + -webkit-box-shadow: 0px 0px 5px #666666; + box-shadow: 0px 0px 5px #666666; +} diff --git a/themes/common/components/jquery-ui-1.12.1.custom/jquery-ui.js b/themes/common/components/jquery-ui-1.12.1.custom/jquery-ui.js new file mode 100644 index 0000000..be60956 --- /dev/null +++ b/themes/common/components/jquery-ui-1.12.1.custom/jquery-ui.js @@ -0,0 +1,4760 @@ +/*! jQuery UI - v1.12.1 - 2017-10-22 +* http://jqueryui.com +* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/autocomplete.js, widgets/menu.js, effect.js, effects/effect-slide.js +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define([ "jquery" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { + +$.ui = $.ui || {}; + +var version = $.ui.version = "1.12.1"; + + +/*! + * jQuery UI Widget 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Widget +//>>group: Core +//>>description: Provides a factory for creating stateful widgets with a common API. +//>>docs: http://api.jqueryui.com/jQuery.widget/ +//>>demos: http://jqueryui.com/widget/ + + + +var widgetUuid = 0; +var widgetSlice = Array.prototype.slice; + +$.cleanData = ( function( orig ) { + return function( elems ) { + var events, elem, i; + for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) { + try { + + // Only trigger remove when necessary to save time + events = $._data( elem, "events" ); + if ( events && events.remove ) { + $( elem ).triggerHandler( "remove" ); + } + + // Http://bugs.jquery.com/ticket/8235 + } catch ( e ) {} + } + orig( elems ); + }; +} )( $.cleanData ); + +$.widget = function( name, base, prototype ) { + var existingConstructor, constructor, basePrototype; + + // ProxiedPrototype allows the provided prototype to remain unmodified + // so that it can be used as a mixin for multiple widgets (#8876) + var proxiedPrototype = {}; + + var namespace = name.split( "." )[ 0 ]; + name = name.split( "." )[ 1 ]; + var fullName = namespace + "-" + name; + + if ( !prototype ) { + prototype = base; + base = $.Widget; + } + + if ( $.isArray( prototype ) ) { + prototype = $.extend.apply( null, [ {} ].concat( prototype ) ); + } + + // Create selector for plugin + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { + return !!$.data( elem, fullName ); + }; + + $[ namespace ] = $[ namespace ] || {}; + existingConstructor = $[ namespace ][ name ]; + constructor = $[ namespace ][ name ] = function( options, element ) { + + // Allow instantiation without "new" keyword + if ( !this._createWidget ) { + return new constructor( options, element ); + } + + // Allow instantiation without initializing for simple inheritance + // must use "new" keyword (the code above always passes args) + if ( arguments.length ) { + this._createWidget( options, element ); + } + }; + + // Extend with the existing constructor to carry over any static properties + $.extend( constructor, existingConstructor, { + version: prototype.version, + + // Copy the object used to create the prototype in case we need to + // redefine the widget later + _proto: $.extend( {}, prototype ), + + // Track widgets that inherit from this widget in case this widget is + // redefined after a widget inherits from it + _childConstructors: [] + } ); + + basePrototype = new base(); + + // We need to make the options hash a property directly on the new instance + // otherwise we'll modify the options hash on the prototype that we're + // inheriting from + basePrototype.options = $.widget.extend( {}, basePrototype.options ); + $.each( prototype, function( prop, value ) { + if ( !$.isFunction( value ) ) { + proxiedPrototype[ prop ] = value; + return; + } + proxiedPrototype[ prop ] = ( function() { + function _super() { + return base.prototype[ prop ].apply( this, arguments ); + } + + function _superApply( args ) { + return base.prototype[ prop ].apply( this, args ); + } + + return function() { + var __super = this._super; + var __superApply = this._superApply; + var returnValue; + + this._super = _super; + this._superApply = _superApply; + + returnValue = value.apply( this, arguments ); + + this._super = __super; + this._superApply = __superApply; + + return returnValue; + }; + } )(); + } ); + constructor.prototype = $.widget.extend( basePrototype, { + + // TODO: remove support for widgetEventPrefix + // always use the name + a colon as the prefix, e.g., draggable:start + // don't prefix for widgets that aren't DOM-based + widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name + }, proxiedPrototype, { + constructor: constructor, + namespace: namespace, + widgetName: name, + widgetFullName: fullName + } ); + + // If this widget is being redefined then we need to find all widgets that + // are inheriting from it and redefine all of them so that they inherit from + // the new version of this widget. We're essentially trying to replace one + // level in the prototype chain. + if ( existingConstructor ) { + $.each( existingConstructor._childConstructors, function( i, child ) { + var childPrototype = child.prototype; + + // Redefine the child widget using the same prototype that was + // originally used, but inherit from the new version of the base + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, + child._proto ); + } ); + + // Remove the list of existing child constructors from the old constructor + // so the old child constructors can be garbage collected + delete existingConstructor._childConstructors; + } else { + base._childConstructors.push( constructor ); + } + + $.widget.bridge( name, constructor ); + + return constructor; +}; + +$.widget.extend = function( target ) { + var input = widgetSlice.call( arguments, 1 ); + var inputIndex = 0; + var inputLength = input.length; + var key; + var value; + + for ( ; inputIndex < inputLength; inputIndex++ ) { + for ( key in input[ inputIndex ] ) { + value = input[ inputIndex ][ key ]; + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { + + // Clone objects + if ( $.isPlainObject( value ) ) { + target[ key ] = $.isPlainObject( target[ key ] ) ? + $.widget.extend( {}, target[ key ], value ) : + + // Don't extend strings, arrays, etc. with objects + $.widget.extend( {}, value ); + + // Copy everything else by reference + } else { + target[ key ] = value; + } + } + } + } + return target; +}; + +$.widget.bridge = function( name, object ) { + var fullName = object.prototype.widgetFullName || name; + $.fn[ name ] = function( options ) { + var isMethodCall = typeof options === "string"; + var args = widgetSlice.call( arguments, 1 ); + var returnValue = this; + + if ( isMethodCall ) { + + // If this is an empty collection, we need to have the instance method + // return undefined instead of the jQuery instance + if ( !this.length && options === "instance" ) { + returnValue = undefined; + } else { + this.each( function() { + var methodValue; + var instance = $.data( this, fullName ); + + if ( options === "instance" ) { + returnValue = instance; + return false; + } + + if ( !instance ) { + return $.error( "cannot call methods on " + name + + " prior to initialization; " + + "attempted to call method '" + options + "'" ); + } + + if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) { + return $.error( "no such method '" + options + "' for " + name + + " widget instance" ); + } + + methodValue = instance[ options ].apply( instance, args ); + + if ( methodValue !== instance && methodValue !== undefined ) { + returnValue = methodValue && methodValue.jquery ? + returnValue.pushStack( methodValue.get() ) : + methodValue; + return false; + } + } ); + } + } else { + + // Allow multiple hashes to be passed on init + if ( args.length ) { + options = $.widget.extend.apply( null, [ options ].concat( args ) ); + } + + this.each( function() { + var instance = $.data( this, fullName ); + if ( instance ) { + instance.option( options || {} ); + if ( instance._init ) { + instance._init(); + } + } else { + $.data( this, fullName, new object( options, this ) ); + } + } ); + } + + return returnValue; + }; +}; + +$.Widget = function( /* options, element */ ) {}; +$.Widget._childConstructors = []; + +$.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + defaultElement: "
      ", + + options: { + classes: {}, + disabled: false, + + // Callbacks + create: null + }, + + _createWidget: function( options, element ) { + element = $( element || this.defaultElement || this )[ 0 ]; + this.element = $( element ); + this.uuid = widgetUuid++; + this.eventNamespace = "." + this.widgetName + this.uuid; + + this.bindings = $(); + this.hoverable = $(); + this.focusable = $(); + this.classesElementLookup = {}; + + if ( element !== this ) { + $.data( element, this.widgetFullName, this ); + this._on( true, this.element, { + remove: function( event ) { + if ( event.target === element ) { + this.destroy(); + } + } + } ); + this.document = $( element.style ? + + // Element within the document + element.ownerDocument : + + // Element is window or document + element.document || element ); + this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow ); + } + + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + + this._create(); + + if ( this.options.disabled ) { + this._setOptionDisabled( this.options.disabled ); + } + + this._trigger( "create", null, this._getCreateEventData() ); + this._init(); + }, + + _getCreateOptions: function() { + return {}; + }, + + _getCreateEventData: $.noop, + + _create: $.noop, + + _init: $.noop, + + destroy: function() { + var that = this; + + this._destroy(); + $.each( this.classesElementLookup, function( key, value ) { + that._removeClass( value, key ); + } ); + + // We can probably remove the unbind calls in 2.0 + // all event bindings should go through this._on() + this.element + .off( this.eventNamespace ) + .removeData( this.widgetFullName ); + this.widget() + .off( this.eventNamespace ) + .removeAttr( "aria-disabled" ); + + // Clean up events and states + this.bindings.off( this.eventNamespace ); + }, + + _destroy: $.noop, + + widget: function() { + return this.element; + }, + + option: function( key, value ) { + var options = key; + var parts; + var curOption; + var i; + + if ( arguments.length === 0 ) { + + // Don't return a reference to the internal hash + return $.widget.extend( {}, this.options ); + } + + if ( typeof key === "string" ) { + + // Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + options = {}; + parts = key.split( "." ); + key = parts.shift(); + if ( parts.length ) { + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); + for ( i = 0; i < parts.length - 1; i++ ) { + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; + curOption = curOption[ parts[ i ] ]; + } + key = parts.pop(); + if ( arguments.length === 1 ) { + return curOption[ key ] === undefined ? null : curOption[ key ]; + } + curOption[ key ] = value; + } else { + if ( arguments.length === 1 ) { + return this.options[ key ] === undefined ? null : this.options[ key ]; + } + options[ key ] = value; + } + } + + this._setOptions( options ); + + return this; + }, + + _setOptions: function( options ) { + var key; + + for ( key in options ) { + this._setOption( key, options[ key ] ); + } + + return this; + }, + + _setOption: function( key, value ) { + if ( key === "classes" ) { + this._setOptionClasses( value ); + } + + this.options[ key ] = value; + + if ( key === "disabled" ) { + this._setOptionDisabled( value ); + } + + return this; + }, + + _setOptionClasses: function( value ) { + var classKey, elements, currentElements; + + for ( classKey in value ) { + currentElements = this.classesElementLookup[ classKey ]; + if ( value[ classKey ] === this.options.classes[ classKey ] || + !currentElements || + !currentElements.length ) { + continue; + } + + // We are doing this to create a new jQuery object because the _removeClass() call + // on the next line is going to destroy the reference to the current elements being + // tracked. We need to save a copy of this collection so that we can add the new classes + // below. + elements = $( currentElements.get() ); + this._removeClass( currentElements, classKey ); + + // We don't use _addClass() here, because that uses this.options.classes + // for generating the string of classes. We want to use the value passed in from + // _setOption(), this is the new value of the classes option which was passed to + // _setOption(). We pass this value directly to _classes(). + elements.addClass( this._classes( { + element: elements, + keys: classKey, + classes: value, + add: true + } ) ); + } + }, + + _setOptionDisabled: function( value ) { + this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value ); + + // If the widget is becoming disabled, then nothing is interactive + if ( value ) { + this._removeClass( this.hoverable, null, "ui-state-hover" ); + this._removeClass( this.focusable, null, "ui-state-focus" ); + } + }, + + enable: function() { + return this._setOptions( { disabled: false } ); + }, + + disable: function() { + return this._setOptions( { disabled: true } ); + }, + + _classes: function( options ) { + var full = []; + var that = this; + + options = $.extend( { + element: this.element, + classes: this.options.classes || {} + }, options ); + + function processClassString( classes, checkOption ) { + var current, i; + for ( i = 0; i < classes.length; i++ ) { + current = that.classesElementLookup[ classes[ i ] ] || $(); + if ( options.add ) { + current = $( $.unique( current.get().concat( options.element.get() ) ) ); + } else { + current = $( current.not( options.element ).get() ); + } + that.classesElementLookup[ classes[ i ] ] = current; + full.push( classes[ i ] ); + if ( checkOption && options.classes[ classes[ i ] ] ) { + full.push( options.classes[ classes[ i ] ] ); + } + } + } + + this._on( options.element, { + "remove": "_untrackClassesElement" + } ); + + if ( options.keys ) { + processClassString( options.keys.match( /\S+/g ) || [], true ); + } + if ( options.extra ) { + processClassString( options.extra.match( /\S+/g ) || [] ); + } + + return full.join( " " ); + }, + + _untrackClassesElement: function( event ) { + var that = this; + $.each( that.classesElementLookup, function( key, value ) { + if ( $.inArray( event.target, value ) !== -1 ) { + that.classesElementLookup[ key ] = $( value.not( event.target ).get() ); + } + } ); + }, + + _removeClass: function( element, keys, extra ) { + return this._toggleClass( element, keys, extra, false ); + }, + + _addClass: function( element, keys, extra ) { + return this._toggleClass( element, keys, extra, true ); + }, + + _toggleClass: function( element, keys, extra, add ) { + add = ( typeof add === "boolean" ) ? add : extra; + var shift = ( typeof element === "string" || element === null ), + options = { + extra: shift ? keys : extra, + keys: shift ? element : keys, + element: shift ? this.element : element, + add: add + }; + options.element.toggleClass( this._classes( options ), add ); + return this; + }, + + _on: function( suppressDisabledCheck, element, handlers ) { + var delegateElement; + var instance = this; + + // No suppressDisabledCheck flag, shuffle arguments + if ( typeof suppressDisabledCheck !== "boolean" ) { + handlers = element; + element = suppressDisabledCheck; + suppressDisabledCheck = false; + } + + // No element argument, shuffle and use this.element + if ( !handlers ) { + handlers = element; + element = this.element; + delegateElement = this.widget(); + } else { + element = delegateElement = $( element ); + this.bindings = this.bindings.add( element ); + } + + $.each( handlers, function( event, handler ) { + function handlerProxy() { + + // Allow widgets to customize the disabled handling + // - disabled as an array instead of boolean + // - disabled class as method for disabling individual parts + if ( !suppressDisabledCheck && + ( instance.options.disabled === true || + $( this ).hasClass( "ui-state-disabled" ) ) ) { + return; + } + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + + // Copy the guid so direct unbinding works + if ( typeof handler !== "string" ) { + handlerProxy.guid = handler.guid = + handler.guid || handlerProxy.guid || $.guid++; + } + + var match = event.match( /^([\w:-]*)\s*(.*)$/ ); + var eventName = match[ 1 ] + instance.eventNamespace; + var selector = match[ 2 ]; + + if ( selector ) { + delegateElement.on( eventName, selector, handlerProxy ); + } else { + element.on( eventName, handlerProxy ); + } + } ); + }, + + _off: function( element, eventName ) { + eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) + + this.eventNamespace; + element.off( eventName ).off( eventName ); + + // Clear the stack to avoid memory leaks (#10056) + this.bindings = $( this.bindings.not( element ).get() ); + this.focusable = $( this.focusable.not( element ).get() ); + this.hoverable = $( this.hoverable.not( element ).get() ); + }, + + _delay: function( handler, delay ) { + function handlerProxy() { + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + var instance = this; + return setTimeout( handlerProxy, delay || 0 ); + }, + + _hoverable: function( element ) { + this.hoverable = this.hoverable.add( element ); + this._on( element, { + mouseenter: function( event ) { + this._addClass( $( event.currentTarget ), null, "ui-state-hover" ); + }, + mouseleave: function( event ) { + this._removeClass( $( event.currentTarget ), null, "ui-state-hover" ); + } + } ); + }, + + _focusable: function( element ) { + this.focusable = this.focusable.add( element ); + this._on( element, { + focusin: function( event ) { + this._addClass( $( event.currentTarget ), null, "ui-state-focus" ); + }, + focusout: function( event ) { + this._removeClass( $( event.currentTarget ), null, "ui-state-focus" ); + } + } ); + }, + + _trigger: function( type, event, data ) { + var prop, orig; + var callback = this.options[ type ]; + + data = data || {}; + event = $.Event( event ); + event.type = ( type === this.widgetEventPrefix ? + type : + this.widgetEventPrefix + type ).toLowerCase(); + + // The original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[ 0 ]; + + // Copy original event properties over to the new event + orig = event.originalEvent; + if ( orig ) { + for ( prop in orig ) { + if ( !( prop in event ) ) { + event[ prop ] = orig[ prop ]; + } + } + } + + this.element.trigger( event, data ); + return !( $.isFunction( callback ) && + callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false || + event.isDefaultPrevented() ); + } +}; + +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { + if ( typeof options === "string" ) { + options = { effect: options }; + } + + var hasOptions; + var effectName = !options ? + method : + options === true || typeof options === "number" ? + defaultEffect : + options.effect || defaultEffect; + + options = options || {}; + if ( typeof options === "number" ) { + options = { duration: options }; + } + + hasOptions = !$.isEmptyObject( options ); + options.complete = callback; + + if ( options.delay ) { + element.delay( options.delay ); + } + + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { + element[ method ]( options ); + } else if ( effectName !== method && element[ effectName ] ) { + element[ effectName ]( options.duration, options.easing, callback ); + } else { + element.queue( function( next ) { + $( this )[ method ](); + if ( callback ) { + callback.call( element[ 0 ] ); + } + next(); + } ); + } + }; +} ); + +var widget = $.widget; + + +/*! + * jQuery UI Position 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/position/ + */ + +//>>label: Position +//>>group: Core +//>>description: Positions elements relative to other elements. +//>>docs: http://api.jqueryui.com/position/ +//>>demos: http://jqueryui.com/position/ + + +( function() { +var cachedScrollbarWidth, + max = Math.max, + abs = Math.abs, + rhorizontal = /left|center|right/, + rvertical = /top|center|bottom/, + roffset = /[\+\-]\d+(\.[\d]+)?%?/, + rposition = /^\w+/, + rpercent = /%$/, + _position = $.fn.position; + +function getOffsets( offsets, width, height ) { + return [ + parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), + parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) + ]; +} + +function parseCss( element, property ) { + return parseInt( $.css( element, property ), 10 ) || 0; +} + +function getDimensions( elem ) { + var raw = elem[ 0 ]; + if ( raw.nodeType === 9 ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: 0, left: 0 } + }; + } + if ( $.isWindow( raw ) ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: elem.scrollTop(), left: elem.scrollLeft() } + }; + } + if ( raw.preventDefault ) { + return { + width: 0, + height: 0, + offset: { top: raw.pageY, left: raw.pageX } + }; + } + return { + width: elem.outerWidth(), + height: elem.outerHeight(), + offset: elem.offset() + }; +} + +$.position = { + scrollbarWidth: function() { + if ( cachedScrollbarWidth !== undefined ) { + return cachedScrollbarWidth; + } + var w1, w2, + div = $( "
      " + + "
      " ), + innerDiv = div.children()[ 0 ]; + + $( "body" ).append( div ); + w1 = innerDiv.offsetWidth; + div.css( "overflow", "scroll" ); + + w2 = innerDiv.offsetWidth; + + if ( w1 === w2 ) { + w2 = div[ 0 ].clientWidth; + } + + div.remove(); + + return ( cachedScrollbarWidth = w1 - w2 ); + }, + getScrollInfo: function( within ) { + var overflowX = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-x" ), + overflowY = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-y" ), + hasOverflowX = overflowX === "scroll" || + ( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ), + hasOverflowY = overflowY === "scroll" || + ( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight ); + return { + width: hasOverflowY ? $.position.scrollbarWidth() : 0, + height: hasOverflowX ? $.position.scrollbarWidth() : 0 + }; + }, + getWithinInfo: function( element ) { + var withinElement = $( element || window ), + isWindow = $.isWindow( withinElement[ 0 ] ), + isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9, + hasOffset = !isWindow && !isDocument; + return { + element: withinElement, + isWindow: isWindow, + isDocument: isDocument, + offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 }, + scrollLeft: withinElement.scrollLeft(), + scrollTop: withinElement.scrollTop(), + width: withinElement.outerWidth(), + height: withinElement.outerHeight() + }; + } +}; + +$.fn.position = function( options ) { + if ( !options || !options.of ) { + return _position.apply( this, arguments ); + } + + // Make a copy, we don't want to modify arguments + options = $.extend( {}, options ); + + var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, + target = $( options.of ), + within = $.position.getWithinInfo( options.within ), + scrollInfo = $.position.getScrollInfo( within ), + collision = ( options.collision || "flip" ).split( " " ), + offsets = {}; + + dimensions = getDimensions( target ); + if ( target[ 0 ].preventDefault ) { + + // Force left top to allow flipping + options.at = "left top"; + } + targetWidth = dimensions.width; + targetHeight = dimensions.height; + targetOffset = dimensions.offset; + + // Clone to reuse original targetOffset later + basePosition = $.extend( {}, targetOffset ); + + // Force my and at to have valid horizontal and vertical positions + // if a value is missing or invalid, it will be converted to center + $.each( [ "my", "at" ], function() { + var pos = ( options[ this ] || "" ).split( " " ), + horizontalOffset, + verticalOffset; + + if ( pos.length === 1 ) { + pos = rhorizontal.test( pos[ 0 ] ) ? + pos.concat( [ "center" ] ) : + rvertical.test( pos[ 0 ] ) ? + [ "center" ].concat( pos ) : + [ "center", "center" ]; + } + pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; + pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; + + // Calculate offsets + horizontalOffset = roffset.exec( pos[ 0 ] ); + verticalOffset = roffset.exec( pos[ 1 ] ); + offsets[ this ] = [ + horizontalOffset ? horizontalOffset[ 0 ] : 0, + verticalOffset ? verticalOffset[ 0 ] : 0 + ]; + + // Reduce to just the positions without the offsets + options[ this ] = [ + rposition.exec( pos[ 0 ] )[ 0 ], + rposition.exec( pos[ 1 ] )[ 0 ] + ]; + } ); + + // Normalize collision option + if ( collision.length === 1 ) { + collision[ 1 ] = collision[ 0 ]; + } + + if ( options.at[ 0 ] === "right" ) { + basePosition.left += targetWidth; + } else if ( options.at[ 0 ] === "center" ) { + basePosition.left += targetWidth / 2; + } + + if ( options.at[ 1 ] === "bottom" ) { + basePosition.top += targetHeight; + } else if ( options.at[ 1 ] === "center" ) { + basePosition.top += targetHeight / 2; + } + + atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); + basePosition.left += atOffset[ 0 ]; + basePosition.top += atOffset[ 1 ]; + + return this.each( function() { + var collisionPosition, using, + elem = $( this ), + elemWidth = elem.outerWidth(), + elemHeight = elem.outerHeight(), + marginLeft = parseCss( this, "marginLeft" ), + marginTop = parseCss( this, "marginTop" ), + collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + + scrollInfo.width, + collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + + scrollInfo.height, + position = $.extend( {}, basePosition ), + myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); + + if ( options.my[ 0 ] === "right" ) { + position.left -= elemWidth; + } else if ( options.my[ 0 ] === "center" ) { + position.left -= elemWidth / 2; + } + + if ( options.my[ 1 ] === "bottom" ) { + position.top -= elemHeight; + } else if ( options.my[ 1 ] === "center" ) { + position.top -= elemHeight / 2; + } + + position.left += myOffset[ 0 ]; + position.top += myOffset[ 1 ]; + + collisionPosition = { + marginLeft: marginLeft, + marginTop: marginTop + }; + + $.each( [ "left", "top" ], function( i, dir ) { + if ( $.ui.position[ collision[ i ] ] ) { + $.ui.position[ collision[ i ] ][ dir ]( position, { + targetWidth: targetWidth, + targetHeight: targetHeight, + elemWidth: elemWidth, + elemHeight: elemHeight, + collisionPosition: collisionPosition, + collisionWidth: collisionWidth, + collisionHeight: collisionHeight, + offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], + my: options.my, + at: options.at, + within: within, + elem: elem + } ); + } + } ); + + if ( options.using ) { + + // Adds feedback as second argument to using callback, if present + using = function( props ) { + var left = targetOffset.left - position.left, + right = left + targetWidth - elemWidth, + top = targetOffset.top - position.top, + bottom = top + targetHeight - elemHeight, + feedback = { + target: { + element: target, + left: targetOffset.left, + top: targetOffset.top, + width: targetWidth, + height: targetHeight + }, + element: { + element: elem, + left: position.left, + top: position.top, + width: elemWidth, + height: elemHeight + }, + horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", + vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" + }; + if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { + feedback.horizontal = "center"; + } + if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { + feedback.vertical = "middle"; + } + if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { + feedback.important = "horizontal"; + } else { + feedback.important = "vertical"; + } + options.using.call( this, props, feedback ); + }; + } + + elem.offset( $.extend( position, { using: using } ) ); + } ); +}; + +$.ui.position = { + fit: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, + outerWidth = within.width, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = withinOffset - collisionPosLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, + newOverRight; + + // Element is wider than within + if ( data.collisionWidth > outerWidth ) { + + // Element is initially over the left side of within + if ( overLeft > 0 && overRight <= 0 ) { + newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - + withinOffset; + position.left += overLeft - newOverRight; + + // Element is initially over right side of within + } else if ( overRight > 0 && overLeft <= 0 ) { + position.left = withinOffset; + + // Element is initially over both left and right sides of within + } else { + if ( overLeft > overRight ) { + position.left = withinOffset + outerWidth - data.collisionWidth; + } else { + position.left = withinOffset; + } + } + + // Too far left -> align with left edge + } else if ( overLeft > 0 ) { + position.left += overLeft; + + // Too far right -> align with right edge + } else if ( overRight > 0 ) { + position.left -= overRight; + + // Adjust based on position and margin + } else { + position.left = max( position.left - collisionPosLeft, position.left ); + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollTop : within.offset.top, + outerHeight = data.within.height, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = withinOffset - collisionPosTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, + newOverBottom; + + // Element is taller than within + if ( data.collisionHeight > outerHeight ) { + + // Element is initially over the top of within + if ( overTop > 0 && overBottom <= 0 ) { + newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - + withinOffset; + position.top += overTop - newOverBottom; + + // Element is initially over bottom of within + } else if ( overBottom > 0 && overTop <= 0 ) { + position.top = withinOffset; + + // Element is initially over both top and bottom of within + } else { + if ( overTop > overBottom ) { + position.top = withinOffset + outerHeight - data.collisionHeight; + } else { + position.top = withinOffset; + } + } + + // Too far up -> align with top + } else if ( overTop > 0 ) { + position.top += overTop; + + // Too far down -> align with bottom edge + } else if ( overBottom > 0 ) { + position.top -= overBottom; + + // Adjust based on position and margin + } else { + position.top = max( position.top - collisionPosTop, position.top ); + } + } + }, + flip: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.offset.left + within.scrollLeft, + outerWidth = within.width, + offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = collisionPosLeft - offsetLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, + myOffset = data.my[ 0 ] === "left" ? + -data.elemWidth : + data.my[ 0 ] === "right" ? + data.elemWidth : + 0, + atOffset = data.at[ 0 ] === "left" ? + data.targetWidth : + data.at[ 0 ] === "right" ? + -data.targetWidth : + 0, + offset = -2 * data.offset[ 0 ], + newOverRight, + newOverLeft; + + if ( overLeft < 0 ) { + newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - + outerWidth - withinOffset; + if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { + position.left += myOffset + atOffset + offset; + } + } else if ( overRight > 0 ) { + newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + + atOffset + offset - offsetLeft; + if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { + position.left += myOffset + atOffset + offset; + } + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.offset.top + within.scrollTop, + outerHeight = within.height, + offsetTop = within.isWindow ? within.scrollTop : within.offset.top, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = collisionPosTop - offsetTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, + top = data.my[ 1 ] === "top", + myOffset = top ? + -data.elemHeight : + data.my[ 1 ] === "bottom" ? + data.elemHeight : + 0, + atOffset = data.at[ 1 ] === "top" ? + data.targetHeight : + data.at[ 1 ] === "bottom" ? + -data.targetHeight : + 0, + offset = -2 * data.offset[ 1 ], + newOverTop, + newOverBottom; + if ( overTop < 0 ) { + newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - + outerHeight - withinOffset; + if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) { + position.top += myOffset + atOffset + offset; + } + } else if ( overBottom > 0 ) { + newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + + offset - offsetTop; + if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { + position.top += myOffset + atOffset + offset; + } + } + } + }, + flipfit: { + left: function() { + $.ui.position.flip.left.apply( this, arguments ); + $.ui.position.fit.left.apply( this, arguments ); + }, + top: function() { + $.ui.position.flip.top.apply( this, arguments ); + $.ui.position.fit.top.apply( this, arguments ); + } + } +}; + +} )(); + +var position = $.ui.position; + + +/*! + * jQuery UI :data 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: :data Selector +//>>group: Core +//>>description: Selects elements which have data stored under the specified key. +//>>docs: http://api.jqueryui.com/data-selector/ + + +var data = $.extend( $.expr[ ":" ], { + data: $.expr.createPseudo ? + $.expr.createPseudo( function( dataName ) { + return function( elem ) { + return !!$.data( elem, dataName ); + }; + } ) : + + // Support: jQuery <1.8 + function( elem, i, match ) { + return !!$.data( elem, match[ 3 ] ); + } +} ); + +/*! + * jQuery UI Disable Selection 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: disableSelection +//>>group: Core +//>>description: Disable selection of text content within the set of matched elements. +//>>docs: http://api.jqueryui.com/disableSelection/ + +// This file is deprecated + + +var disableSelection = $.fn.extend( { + disableSelection: ( function() { + var eventType = "onselectstart" in document.createElement( "div" ) ? + "selectstart" : + "mousedown"; + + return function() { + return this.on( eventType + ".ui-disableSelection", function( event ) { + event.preventDefault(); + } ); + }; + } )(), + + enableSelection: function() { + return this.off( ".ui-disableSelection" ); + } +} ); + + +/*! + * jQuery UI Focusable 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: :focusable Selector +//>>group: Core +//>>description: Selects elements which can be focused. +//>>docs: http://api.jqueryui.com/focusable-selector/ + + + +// Selectors +$.ui.focusable = function( element, hasTabindex ) { + var map, mapName, img, focusableIfVisible, fieldset, + nodeName = element.nodeName.toLowerCase(); + + if ( "area" === nodeName ) { + map = element.parentNode; + mapName = map.name; + if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { + return false; + } + img = $( "img[usemap='#" + mapName + "']" ); + return img.length > 0 && img.is( ":visible" ); + } + + if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) { + focusableIfVisible = !element.disabled; + + if ( focusableIfVisible ) { + + // Form controls within a disabled fieldset are disabled. + // However, controls within the fieldset's legend do not get disabled. + // Since controls generally aren't placed inside legends, we skip + // this portion of the check. + fieldset = $( element ).closest( "fieldset" )[ 0 ]; + if ( fieldset ) { + focusableIfVisible = !fieldset.disabled; + } + } + } else if ( "a" === nodeName ) { + focusableIfVisible = element.href || hasTabindex; + } else { + focusableIfVisible = hasTabindex; + } + + return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) ); +}; + +// Support: IE 8 only +// IE 8 doesn't resolve inherit to visible/hidden for computed values +function visible( element ) { + var visibility = element.css( "visibility" ); + while ( visibility === "inherit" ) { + element = element.parent(); + visibility = element.css( "visibility" ); + } + return visibility !== "hidden"; +} + +$.extend( $.expr[ ":" ], { + focusable: function( element ) { + return $.ui.focusable( element, $.attr( element, "tabindex" ) != null ); + } +} ); + +var focusable = $.ui.focusable; + + + + +// Support: IE8 Only +// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop +// with a string, so we need to find the proper form. +var form = $.fn.form = function() { + return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form ); +}; + + +/*! + * jQuery UI Form Reset Mixin 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Form Reset Mixin +//>>group: Core +//>>description: Refresh input widgets when their form is reset +//>>docs: http://api.jqueryui.com/form-reset-mixin/ + + + +var formResetMixin = $.ui.formResetMixin = { + _formResetHandler: function() { + var form = $( this ); + + // Wait for the form reset to actually happen before refreshing + setTimeout( function() { + var instances = form.data( "ui-form-reset-instances" ); + $.each( instances, function() { + this.refresh(); + } ); + } ); + }, + + _bindFormResetHandler: function() { + this.form = this.element.form(); + if ( !this.form.length ) { + return; + } + + var instances = this.form.data( "ui-form-reset-instances" ) || []; + if ( !instances.length ) { + + // We don't use _on() here because we use a single event handler per form + this.form.on( "reset.ui-form-reset", this._formResetHandler ); + } + instances.push( this ); + this.form.data( "ui-form-reset-instances", instances ); + }, + + _unbindFormResetHandler: function() { + if ( !this.form.length ) { + return; + } + + var instances = this.form.data( "ui-form-reset-instances" ); + instances.splice( $.inArray( this, instances ), 1 ); + if ( instances.length ) { + this.form.data( "ui-form-reset-instances", instances ); + } else { + this.form + .removeData( "ui-form-reset-instances" ) + .off( "reset.ui-form-reset" ); + } + } +}; + + +/*! + * jQuery UI Support for jQuery core 1.7.x 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + */ + +//>>label: jQuery 1.7 Support +//>>group: Core +//>>description: Support version 1.7.x of jQuery core + + + +// Support: jQuery 1.7 only +// Not a great way to check versions, but since we only support 1.7+ and only +// need to detect <1.8, this is a simple check that should suffice. Checking +// for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0 +// and we'll never reach 1.70.0 (if we do, we certainly won't be supporting +// 1.7 anymore). See #11197 for why we're not using feature detection. +if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) { + + // Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight() + // Unlike jQuery Core 1.8+, these only support numeric values to set the + // dimensions in pixels + $.each( [ "Width", "Height" ], function( i, name ) { + var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], + type = name.toLowerCase(), + orig = { + innerWidth: $.fn.innerWidth, + innerHeight: $.fn.innerHeight, + outerWidth: $.fn.outerWidth, + outerHeight: $.fn.outerHeight + }; + + function reduce( elem, size, border, margin ) { + $.each( side, function() { + size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; + if ( border ) { + size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; + } + if ( margin ) { + size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; + } + } ); + return size; + } + + $.fn[ "inner" + name ] = function( size ) { + if ( size === undefined ) { + return orig[ "inner" + name ].call( this ); + } + + return this.each( function() { + $( this ).css( type, reduce( this, size ) + "px" ); + } ); + }; + + $.fn[ "outer" + name ] = function( size, margin ) { + if ( typeof size !== "number" ) { + return orig[ "outer" + name ].call( this, size ); + } + + return this.each( function() { + $( this ).css( type, reduce( this, size, true, margin ) + "px" ); + } ); + }; + } ); + + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +; +/*! + * jQuery UI Keycode 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: Keycode +//>>group: Core +//>>description: Provide keycodes as keynames +//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/ + + +var keycode = $.ui.keyCode = { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 +}; + + + + +// Internal use only +var escapeSelector = $.ui.escapeSelector = ( function() { + var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; + return function( selector ) { + return selector.replace( selectorEscape, "\\$1" ); + }; +} )(); + + +/*! + * jQuery UI Labels 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: labels +//>>group: Core +//>>description: Find all the labels associated with a given input +//>>docs: http://api.jqueryui.com/labels/ + + + +var labels = $.fn.labels = function() { + var ancestor, selector, id, labels, ancestors; + + // Check control.labels first + if ( this[ 0 ].labels && this[ 0 ].labels.length ) { + return this.pushStack( this[ 0 ].labels ); + } + + // Support: IE <= 11, FF <= 37, Android <= 2.3 only + // Above browsers do not support control.labels. Everything below is to support them + // as well as document fragments. control.labels does not work on document fragments + labels = this.eq( 0 ).parents( "label" ); + + // Look for the label based on the id + id = this.attr( "id" ); + if ( id ) { + + // We don't search against the document in case the element + // is disconnected from the DOM + ancestor = this.eq( 0 ).parents().last(); + + // Get a full set of top level ancestors + ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() ); + + // Create a selector for the label based on the id + selector = "label[for='" + $.ui.escapeSelector( id ) + "']"; + + labels = labels.add( ancestors.find( selector ).addBack( selector ) ); + + } + + // Return whatever we have found for labels + return this.pushStack( labels ); +}; + + +/*! + * jQuery UI Scroll Parent 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: scrollParent +//>>group: Core +//>>description: Get the closest ancestor element that is scrollable. +//>>docs: http://api.jqueryui.com/scrollParent/ + + + +var scrollParent = $.fn.scrollParent = function( includeHidden ) { + var position = this.css( "position" ), + excludeStaticParent = position === "absolute", + overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, + scrollParent = this.parents().filter( function() { + var parent = $( this ); + if ( excludeStaticParent && parent.css( "position" ) === "static" ) { + return false; + } + return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + + parent.css( "overflow-x" ) ); + } ).eq( 0 ); + + return position === "fixed" || !scrollParent.length ? + $( this[ 0 ].ownerDocument || document ) : + scrollParent; +}; + + +/*! + * jQuery UI Tabbable 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: :tabbable Selector +//>>group: Core +//>>description: Selects elements which can be tabbed to. +//>>docs: http://api.jqueryui.com/tabbable-selector/ + + + +var tabbable = $.extend( $.expr[ ":" ], { + tabbable: function( element ) { + var tabIndex = $.attr( element, "tabindex" ), + hasTabindex = tabIndex != null; + return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex ); + } +} ); + + +/*! + * jQuery UI Unique ID 1.12.1 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + */ + +//>>label: uniqueId +//>>group: Core +//>>description: Functions to generate and remove uniqueId's +//>>docs: http://api.jqueryui.com/uniqueId/ + + + +var uniqueId = $.fn.extend( { + uniqueId: ( function() { + var uuid = 0; + + return function() { + return this.each( function() { + if ( !this.id ) { + this.id = "ui-id-" + ( ++uuid ); + } + } ); + }; + } )(), + + removeUniqueId: function() { + return this.each( function() { + if ( /^ui-id-\d+$/.test( this.id ) ) { + $( this ).removeAttr( "id" ); + } + } ); + } +} ); + + + +var safeActiveElement = $.ui.safeActiveElement = function( document ) { + var activeElement; + + // Support: IE 9 only + // IE9 throws an "Unspecified error" accessing document.activeElement from an