diff --git a/templates/client/includes/catalog_search_main.html b/templates/client/includes/catalog_search_main.html
index 9989404d..4b56424c 100644
--- a/templates/client/includes/catalog_search_main.html
+++ b/templates/client/includes/catalog_search_main.html
@@ -35,7 +35,7 @@
-
+
diff --git a/templates/client/popups/place.html b/templates/client/popups/place.html
index baf50fba..2b3ab4d4 100644
--- a/templates/client/popups/place.html
+++ b/templates/client/popups/place.html
@@ -65,7 +65,6 @@
diff --git a/templates/client/popups/theme.html b/templates/client/popups/theme.html
index 2a4a7a4d..452707cc 100644
--- a/templates/client/popups/theme.html
+++ b/templates/client/popups/theme.html
@@ -68,15 +68,14 @@
-
diff --git a/templates/client/static_client/css/main.css b/templates/client/static_client/css/main.css
index d4367402..772e79da 100644
--- a/templates/client/static_client/css/main.css
+++ b/templates/client/static_client/css/main.css
@@ -1902,298 +1902,305 @@ button.icon-save:before {
# форма поиска
\**************************/
-.in-search-form {
- position: relative;
- /*display: none;*/
- font-family: 'dindisplay_pro', Arial, sans-serif;
- font-weight: normal;
- font-size: 14px;
- line-height: 18px;
- color: #fff;
- background: #ff6600 url(../img/search-bg.jpg) 100% 100% no-repeat;
- height: 150px;
- margin: 0 0 15px -40px;
- padding: 30px 0 5px 40px;
- z-index: 3;
- border-radius: 4px;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-
-.modals .popup-window{
- display: none;
-}
-
-.search-form aside .s-title {
- font-size: 25px;
- line-height: 25px;
- text-transform: uppercase;
- white-space: nowrap;
- margin-right: -20px;
-}
-
-.in-search-form .s-title {
- font-size: 25px;
- line-height: 25px;
- text-transform: uppercase;
- margin-bottom: 15px;
-}
+ .in-search-form {
+ position: relative;
+ /*display: none;*/
+ font-family: 'dindisplay_pro', Arial, sans-serif;
+ font-weight: normal;
+ font-size: 14px;
+ line-height: 18px;
+ color: #fff;
+ background: #ff6600 url(../img/search-bg.jpg) 100% 100% no-repeat;
+ height: 150px;
+ margin: 0 0 15px -40px;
+ padding: 30px 0 5px 40px;
+ z-index: 3;
+ border-radius: 4px;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ }
-.search-form .mcl {
- padding-right: 50px;
-}
+ .modals .popup-window{
+ display: none;
+ }
-.search-form-wrap {
- display: table;
- width: 100%;
- border-collapse: collapse;
-}
+ .search-form aside .s-title {
+ font-size: 25px;
+ line-height: 25px;
+ text-transform: uppercase;
+ white-space: nowrap;
+ margin-right: -20px;
+ }
-.search-form-wrap .search-line {
- display: table-row;
-}
+ .in-search-form .s-title {
+ font-size: 25px;
+ line-height: 25px;
+ text-transform: uppercase;
+ margin-bottom: 15px;
+ }
-.search-form-wrap .search-line .sf-field-wrap {
- display: table-cell;
- vertical-align: middle;
- padding: 0 10px 8px 0;
- color: #ffd9bf;
- line-height: 15px;
-}
+ .search-form .mcl {
+ padding-right: 50px;
+ }
-.search-form-wrap .search-line .sf-field-wrap:first-child {
- width: 48%;
-}
+ .search-form-wrap {
+ display: table;
+ width: 100%;
+ border-collapse: collapse;
+ }
-.search-form-wrap .search-line .sf-field-wrap + .sf-field-wrap {
- width: 32%;
-}
+ .search-form-wrap .search-line {
+ display: table-row;
+ }
-.search-form-wrap .search-line .sf-field-wrap + .sf-field-wrap + .sf-field-wrap {
- width: 20%;
-}
+ .search-form-wrap .search-line .sf-field-wrap {
+ display: table-cell;
+ vertical-align: middle;
+ padding: 0 10px 8px 0;
+ color: #ffd9bf;
+ line-height: 15px;
+ }
-.search-line.sl-options a {
- display: inline-block;
- color: #fff;
- text-decoration: none;
- border-bottom: 1px dashed;
- line-height: 13px;
-}
+ .search-form-wrap .search-line .sf-field-wrap:first-child {
+ width: 48%;
+ }
-.search-line.sl-options a:hover {
- border-bottom: none;
-}
+ .search-form-wrap .search-line .sf-field-wrap + .sf-field-wrap {
+ width: 32%;
+ }
-.search-line.sl-options a.sf-clear {
- position: relative;
- display: inline-block;
- vertical-align: middle;
- border-bottom: none;
- width: 16px;
- height: 0;
- padding-top: 24px;
- margin: -5px 0 -5px 2px;
- overflow: hidden;
-}
+ .search-form-wrap .search-line .sf-field-wrap + .sf-field-wrap + .sf-field-wrap {
+ width: 20%;
+ }
-.search-line.sl-options a.sf-clear:before {
- content: '';
- display: block;
- width: 6px;
- height: 7px;
- background: url(../img/sprites.png) -135px -25px no-repeat;
- position: absolute;
- left: 50%;
- top: 50%;
- margin: -3px 0 0 -3px;
-}
+ .search-line.sl-options a {
+ display: inline-block;
+ color: #fff;
+ text-decoration: none;
+ border-bottom: 1px dashed;
+ line-height: 13px;
+ }
-.sf-field {
- position: relative;
- display: table;
- width: 100%;
- height: 40px;
- border-collapse: collapse;
- background: #fff;
- color: #aaa;
- box-shadow: inset 0 1px 0 #d9d9d9, 0 -1px 0 rgba(0, 0, 0, .2);
- z-index: 1;
-}
+ .search-line.sl-options a:hover {
+ border-bottom: none;
+ }
-.sf-field-wrap:first-child .sf-field {
- border-radius: 4px 0 0 4px;
-}
+ .search-line.sl-options a.sf-clear {
+ position: relative;
+ display: inline-block;
+ vertical-align: middle;
+ border-bottom: none;
+ width: 16px;
+ height: 0;
+ padding-top: 24px;
+ margin: -5px 0 -5px 2px;
+ overflow: hidden;
+ }
-.sf-field > * {
- display: table-cell;
- vertical-align: middle;
-}
+ .search-line.sl-options a.sf-clear:before {
+ content: '';
+ display: block;
+ width: 6px;
+ height: 7px;
+ background: url(../img/sprites.png) -135px -25px no-repeat;
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ margin: -3px 0 0 -3px;
+ }
-.sf-field label {
- font-size: 16px;
- line-height: 20px;
- font-weight: normal;
- padding: 10px 5px 10px 20px;
- white-space: nowrap;
-}
+ .sf-field {
+ position: relative;
+ display: table;
+ width: 100%;
+ height: 40px;
+ border-collapse: collapse;
+ background: #fff;
+ color: #aaa;
+ box-shadow: inset 0 1px 0 #d9d9d9, 0 -1px 0 rgba(0, 0, 0, .2);
+ z-index: 1;
+ }
-.sf-field .input-text {
- width: 100%;
- height: 100%;
-}
+ .sf-field-wrap:first-child .sf-field {
+ border-radius: 4px 0 0 4px;
+ }
-.sf-field .input-text input[type="text"] {
- display: block;
- width: 100%;
- height: 100%;
- background: none;
- border: none;
- outline: none;
- padding: 10px 10px 10px 0;
- font-family: 'dindisplay_pro', Arial, sans-serif;
- font-weight: normal;
- font-size: 16px;
- line-height: 20px;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
+ .sf-field > * {
+ display: table-cell;
+ vertical-align: middle;
+ }
-.search-form button,
-.in-search-form button{
- display: inline-block;
- vertical-align: top;
- height: 40px;
- border: 1px solid #fff;
- /*background: none;*/
- outline: none;
- color: #fff;
- font-family: 'dindisplay_pro', Arial, sans-serif;
- font-weight: bold;
- font-size: 15px;
- line-height: 41px;
- text-transform: uppercase;
- padding: 0 25px;
- border-radius: 0 4px 4px 0;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- box-shadow: 0 1px 0 rgba(0, 0, 0, .2), inset 0 1px 0 rgba(0, 0, 0, .2);
- -webkit-filter: none;
- filter: none;
-}
-.pwf-buttons-line button{
- border-radius: 4px;
-}
+ .sf-field label {
+ font-size: 16px;
+ line-height: 20px;
+ font-weight: normal;
+ padding: 10px 5px 10px 20px;
+ white-space: nowrap;
+ }
-.search-form button:before,
-.in-search-form button:before {
- content: ' ';
- display: inline-block;
- vertical-align: middle;
- width: 15px;
- height: 14px;
- background: url(../img/sprites.png) -98px 0 no-repeat;
- margin: -2px 5px 0 -1px;
-}
+ .sf-field .input-text {
+ width: 100%;
+ height: 100%;
+ }
-.search-form button:hover,
-.in-search-form button:hover {
- position: relative;
- top: -1px;
- /*background: none;*/
-}
+ .sf-field .input-text input[type="text"] {
+ display: block;
+ width: 100%;
+ height: 100%;
+ background: none;
+ border: none;
+ outline: none;
+ padding: 10px 10px 10px 0;
+ font-family: 'dindisplay_pro', Arial, sans-serif;
+ font-weight: normal;
+ font-size: 16px;
+ line-height: 20px;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ }
-.sf-autocomplete {
- position: relative;
- z-index: 3048;
- height: 40px;
- display: none;
-}
-.sf-autocomplete.show {
- display: block;
-}
+ .search-form button.search_submit,
+ .search-form button.modal-approve,
+ .in-search-form button.search_submit,
+ .in-search-form button.modal-approve{
+ display: inline-block;
+ vertical-align: top;
+ height: 40px;
+ border: 1px solid #fff;
+ /*background: none;*/
+ outline: none;
+ color: #fff;
+ font-family: 'dindisplay_pro', Arial, sans-serif;
+ font-weight: bold;
+ font-size: 15px;
+ line-height: 41px;
+ text-transform: uppercase;
+ padding: 0 25px;
+ border-radius: 0 4px 4px 0;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ box-shadow: 0 1px 0 rgba(0, 0, 0, .2), inset 0 1px 0 rgba(0, 0, 0, .2);
+ -webkit-filter: none;
+ filter: none;
+ }
+ button.modal-approve{
+ border-radius: 4px !important;
+ }
-.sf-autocomplete .sfa-wrap {
- position: absolute;
- left: 0;
- width: 100%;
- top: 0;
- background: #fff;
- padding: 20px 20px 20px 20px;
- overflow: hidden;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- border-radius: 4px;
- box-shadow: 0 0 0 3px rgba(0, 0, 0, .2);
- visibility: hidden;
- background: #ffffff; /* Old browsers */ /* FF3.6+ */
- background: -webkit-gradient(linear, left top, left bottom, color-stop(10%,#ffffff), color-stop(100%,#efefef)); /* Chrome,Safari4+ */
- background: -webkit-linear-gradient(top, #ffffff 10%,#efefef 100%); /* Chrome10+,Safari5.1+ */
- background: -o-linear-gradient(top, #ffffff 10%,#efefef 100%); /* Opera 11.10+ */ /* IE10+ */
- background: -webkit-linear-gradient(top, #ffffff 10%, #efefef 100%);
- background: -o-linear-gradient(top, #ffffff 10%, #efefef 100%);
- background: linear-gradient(to bottom, #ffffff 10%,#efefef 100%); /* W3C */
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#efefef',GradientType=0 ); /* IE6-9 */
+ .search-form button.search_submit:before,
+ .search-form button.modal-approve:before,
+ .in-search-form button.search_submit:before ,
+ .in-search-form button.modal-approve:before {
+ content: ' ';
+ display: inline-block;
+ vertical-align: middle;
+ width: 15px;
+ height: 14px;
+ background: url(../img/sprites.png) -98px 0 no-repeat;
+ margin: -2px 5px 0 -1px;
+ }
-}
+ .search-form button:hover,
+ .in-search-form button:hover {
+ position: relative;
+ top: -1px;
+ /*background: none;*/
+ }
-.sf-autocomplete .sfa-wrap {
- border-radius: 4px 0 4px 4px;
-}
+ .sf-autocomplete {
+ position: relative;
+ z-index: 3048;
+ height: 40px;
+ display: none;
+ }
+ .sf-autocomplete.show {
+ display: block;
+ }
-.sf-autocomplete .sfa-wrap.show {
- visibility: visible;
-}
+ .sf-autocomplete .sfa-wrap {
+ position: absolute;
+ left: 0;
+ width: 100%;
+ top: 0;
+ background: #fff;
+ padding: 20px 20px 20px 20px;
+ overflow: hidden;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ border-radius: 4px;
+ box-shadow: 0 0 0 3px rgba(0, 0, 0, .2);
+ visibility: hidden;
+ background: #ffffff; /* Old browsers */ /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(10%,#ffffff), color-stop(100%,#efefef)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #ffffff 10%,#efefef 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #ffffff 10%,#efefef 100%); /* Opera 11.10+ */ /* IE10+ */
+ background: -webkit-linear-gradient(top, #ffffff 10%, #efefef 100%);
+ background: -o-linear-gradient(top, #ffffff 10%, #efefef 100%);
+ background: linear-gradient(to bottom, #ffffff 10%,#efefef 100%); /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#efefef',GradientType=0 ); /* IE6-9 */
-.ui-autocomplete {
- position: relative;
- width: 100%;
- max-height: 265px;
- overflow-y: auto;
- overflow-x: hidden;
- left: 0 !important;
- top: 0 !important;
- padding: 5px 10px 0 0;
- border-top: 1px dotted #ccc;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-.ui-autocomplete-category {
- font-size: 15px;
- line-height: 17px;
- color: #ff6600;
- padding: 8px 10px 0 0;
-}
+ }
-.ui-menu .ui-menu-item {
- padding: 0 10px 0 5px;
- margin-top: 2px;
-}
+ .sf-autocomplete .sfa-wrap {
+ border-radius: 4px 0 4px 4px;
+ }
-.ui-menu .ui-menu-item a {
- color: #464646;
- font-size: 15px;
- line-height: 15px;
- border: none;
- padding: 2px 5px;
- cursor: pointer;
-}
+ .sf-autocomplete .sfa-wrap.show {
+ visibility: visible;
+ }
-.ui-menu .ui-menu-item a.ui-state-focus,
-.ui-menu .ui-menu-item a.ui-state-active {
- color: #ff6600;
- margin: 0;
-}
+ .ui-autocomplete {
+ position: relative;
+ width: 100%;
+ max-height: 265px;
+ overflow-y: auto;
+ overflow-x: hidden;
+ left: 0 !important;
+ top: 0 !important;
+ padding: 5px 10px 0 0;
+ border-top: 1px dotted #ccc;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ }
+ .ui-autocomplete-category {
+ font-size: 15px;
+ line-height: 17px;
+ color: #ff6600;
+ padding: 8px 10px 0 0;
+ }
-.ui-menu .ui-menu-item a i {
- font-style: normal;
- color: #a2a2a2;
-}
+ .ui-menu .ui-menu-item {
+ padding: 0 10px 0 5px;
+ margin-top: 2px;
+ }
+ .ui-menu .ui-menu-item a {
+ color: #464646;
+ font-size: 15px;
+ line-height: 15px;
+ border: none;
+ padding: 2px 5px;
+ cursor: pointer;
+ }
-.mp-catalog {
+ .ui-menu .ui-menu-item a.ui-state-focus,
+ .ui-menu .ui-menu-item a.ui-state-active {
+ color: #ff6600;
+ margin: 0;
+ }
-}
+ .ui-menu .ui-menu-item a i {
+ font-style: normal;
+ color: #a2a2a2;
+ }
+ /* # clear all button*/
+ .in-search-form .modal-clear,
+ .search-form .modal-clear{
+ height: 40px;
+ border: 1px solid #fff;
+ padding: 0 25px;
+ box-shadow: 0 1px 0 rgba(0, 0, 0, .2), inset 0 1px 0 rgba(0, 0, 0, .2);
+ }
/* end of search block*/
@@ -4032,7 +4039,6 @@ form.s-message {
.c-select-box .csb-menu .q-sel {
width: 190px;
float: right;
- margin-top: 1em;
}
@@ -12013,6 +12019,21 @@ hr + .rq-note {
.mt-0{
margin-top: 0;
}
+ button.gray{
+ background: #dbdbdb; /* Old browsers */
+ background: -moz-linear-gradient(top, #dbdbdb 0%, #bdbdbd 100%); /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dbdbdb), color-stop(100%,#bdbdbd)); /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #dbdbdb 0%,#bdbdbd 100%); /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #dbdbdb 0%,#bdbdbd 100%); /* Opera 11.10+ */
+ background: -ms-linear-gradient(top, #dbdbdb 0%,#bdbdbd 100%); /* IE10+ */
+ background: linear-gradient(to bottom, #dbdbdb 0%,#bdbdbd 100%); /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dbdbdb', endColorstr='#bdbdbd',GradientType=0 ); /* IE6-9 */
+
+ }
+ button.gray:hover{
+ background: #dbdbdb; /* Old browsers */
+
+ }
@@ -12020,16 +12041,16 @@ hr + .rq-note {
# Модальное окно выбора тематики
\******************************/
-.pw-subj .q-sel{
- top: 0;
- position: absolute;
- right: 0;
- margin-top: 1em;
+ .pw-subj .q-sel{
+ top: 0;
+ position: absolute;
+ right: 0;
+ margin-top: 1em;
-}
-.search_form .scroll-container{
- overflow: hidden;
-}
+ }
+ .search_form .scroll-container{
+ overflow: hidden;
+ }
/******************************\
# Модальное окно общий вид
\******************************/
diff --git a/templates/client/static_client/js/_modules/block.search.js b/templates/client/static_client/js/_modules/block.search.js
index 629fd4ed..e149ec34 100644
--- a/templates/client/static_client/js/_modules/block.search.js
+++ b/templates/client/static_client/js/_modules/block.search.js
@@ -359,7 +359,7 @@ if (EXPO.searchBlock){
}
return false;
});
- $('.clear', $modal).on('click', function () {
+ $('.modal-clear', $modal).on('click', function () {
self.resetList();
return false;
});
@@ -1118,7 +1118,7 @@ if (EXPO.searchBlock){
/**
* clear all button behavior
*/
- $('.clear',$modal).on('click', function () {
+ $('.modal-clear',$modal).on('click', function () {
self.resetList();
return false;
});
diff --git a/templates/client/static_client/js_min/_modules/block.search.min.js b/templates/client/static_client/js_min/_modules/block.search.min.js
index a5103e38..59919a5e 100644
--- a/templates/client/static_client/js_min/_modules/block.search.min.js
+++ b/templates/client/static_client/js_min/_modules/block.search.min.js
@@ -1 +1 @@
-var EXPO=EXPO||{};EXPO.searchBlock?console.warn("WARNING: EXPO.searchBlock is already defined!"):EXPO.searchBlock=function(){var e={};e.settings={place:{id:"pw-place",selectedItemTemplate:"csb-selected",ajaxUrl:"http://hit.expomap.ru/search-form/"},subject:{id:"pw-subj",ajaxUrl:"http://hit.expomap.ru/search-form/"}},e.lang={};var t=EXPO.common,i=function(e){var t=Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&");return"?"+t},n=function(e,t,i){e||(e=""),$.ajax({type:"GET",url:t,data:e,success:function(e){return"function"!=typeof i?e:void i(e)}})},a=function(e,t,i){return e.hasOwnProperty(t)&&(e[i]=e[t]),this},s=function(e){var t,i=0;for(t in e)e.hasOwnProperty(t)&&i++;return i},l=function(e,t){var i=$("#"+e),n="",a=EXPO.searchBlock.settings.closerText,s=EXPO.searchBlock.settings.closerTextSingle,l="";return $element=i.find(".csbs-text"),$element.length>2?$element.eq(0).text().length2&&d?(n({term:t,form:o},l.opt.autoCompleteUrl,u),d=!1):0!=t.length||d||l.$inputFilter.hasClass("ui-autocomplete-input")&&(l.$inputFilter.placeComplete("destroy"),d=!0),!1}).click(function(){return!1})},_renderSublist:function(e,t,i){var n=this,a=0,s=t+"-sub",l=function(e){if(e.length){for(n.sublist[s]={},a;aT;T++)for(o=_[T],w=0;x>w;w++)o==C[w]&&M(a[w]);for(T=0;y>T;T++)o=_[T],o==S&&M(i)}else for(T=0;y>T;T++)o=_[T],o==S&&M(S)},M=function(e){var t=e.getAttribute("id");i._destroyTag(t),O()},A=function(e){var a=t.closest(e,n),s=a.querySelector("."+u),l=s.innerHTML,r=e.getAttribute("id"),o={id:r,text:l};i._addTag(r,o),O()},O=function(){o.find("."+h).length&&"~~id~~"!=o.find("."+h)[0].getAttribute(m)?o.addClass("visible"):o.removeClass("visible")},P=function(){var t=$(k).children("li").children("."+e).find("."+l+":checked");t.each(function(){A(this)})},q=function(){var t=$(k).children("li").children("."+e).find("."+l+":checked");t.each(function(){M(this)})};i.strictMode?this.checked?(w(this),D(this),A(this)):(I(this),D(this),M(this)):this.checked?(F()?(S(this),w(this),D(v),A(v),q(k),v.getAttribute("id")!=_.getAttribute("id")||_.checked||(w(_),D(_),A(_))):(w(this),D(this),A(this)),b&&y(this),b&&"~~id~~"!=$(b).find("."+l)[0].value&&D(this)):(B()?(T(this),I(this),D(v),M(v),P(k),_.checked&&(I(_),D(_),M(_))):(I(this),D(this),M(this)),b&&(x(this),D(this))),p()}),$(".csbs-del",o).on("click",function(){var e=$(this).attr("data-checkbox-id"),t=$("#"+e);return t.prop("checked",!1),t.trigger("change"),dna.destroy(i.itemsSelected[e]),o.children(".dna-clone").length||o.removeClass("visible"),!1}),$(".clear",a).on("click",function(){return i.resetList(),!1}),$(".q-sel a",a).on("click",function(){var e=$(this),t=e.attr("data-name"),a=e.attr("data-id"),s={name:t,id:a},l=function(e){i._loadParentTree(e,function(){i._checkCheckBox(a)})};return n(s,i.opt.getParentUrl,l),!1}),$("."+h,a).on("click",function(){return i.applyHandler(this),!1}),d.siblings("."+i.opt.clearAllButtonClass).on("click",function(){i.resetList(),EXPO.searchBlock.placesField.clearValue()})})};c.prototype={_getAjax:function(e,t){var i=this;e||(e=""),$.ajax({type:"GET",url:i.opt.ajaxUrl,data:e,success:function(e){return"function"!=typeof t?(i.rawData=e,e):(i.rawData=e,void t(e))}})},_renderSublist:function(e,t,i){var n=this,a=0,s=t+"-sub",l=function(e){if(e.length){for(n.curDNA[s]={},a;a2&&o?(n({term:t,form:l},s.opt.autoCompleteUrl,d),o=!1):0!=t.length||o||s.$inputFilter.hasClass("ui-autocomplete-input")&&(s.$inputFilter.autocomplete("destroy"),o=!0),!1}).click(function(){return!1})},_loadParentTree:function(e,t,i){var n,a,l,o,c=this,d=e,h=$("#id_"+d.id),u=function(e){var n=$("#id_"+d.id),h=function(){r.hide(),i||0===i?t(i):t()};r.hide(),n.length&&s(c.curDNA[a+"-sub"])==e&&(l={name:d.name,id:d.id},r.show(),o=$("#id_"+d.id).closest(".level").children(".trigger").attr("data-template-id"),c._renderNested(l,h,o,d.id))},p=function(){r.hide(),i||0===i?t(i):t()};r.show(),d.hasOwnProperty("parent")?h.length?(l={name:d.name,id:d.id},o=h.closest(".level").children(".trigger").attr("data-template-id"),c._renderNested(l,function(){r.hide(),t()},o,d.id)):(n={name:d.parent.name,id:d.parent.id},a=$("#id_"+d.parent.id).closest(".level").children(".trigger").attr("data-template-id"),c._renderSublist(n,a,u)):(n={name:d.name,id:d.id},a=$("#id_"+d.id).closest(".level").children(".trigger").attr("data-template-id"),c._renderSublist(n,a,p))},applyHandler:function(){}};var d=function(e){this.opt=e;var t,i=this,n=$("#"+i.opt.dateFrom),a=$("#"+i.opt.dateTo),s=$("#"+i.opt.id),l=$("#"+i.opt.modalTrigger),r=i.opt.applyBtnClass,o=function(){var e="",t=l.data("lng-to"),i=l.data("lng-from"),s=$.trim(a.val()),r=$.trim(n.val());return""!=s&&""!=r?e=i+": "+r+" "+t+": "+s+".":""!=s&&""==r?e=t+": "+s+".":""==s&&""!=r&&(e=i+": "+r+"."),e},c=function(e){""!=e?(l.text(e).siblings(".trigger-label").addClass("hidden"),l.siblings("."+i.opt.clearAllButtonClass).addClass("active")):(l.text(l.data("default")).siblings(".trigger-label").removeClass("hidden"),l.siblings("."+i.opt.clearAllButtonClass).removeClass("active"))},d=function(e){var t,s,l,r,o=e.getAttribute("id"),c=e.value,d=Date.parse(c);i.validate()&&($(e).parent(".pwf-field").removeClass("err"),o==i.opt.dateFrom?(t=a[0].getAttribute("id"),s=a[0].value):(t=n[0].getAttribute("id"),s=n[0].value),l=Date.parse(s),d>l&&o==i.opt.dateFrom?(r=document.getElementById(o).value,document.getElementById(o).value=document.getElementById(t).value,document.getElementById(t).value=r):l>d&&o==i.opt.dateTo&&(r=document.getElementById(t).value,document.getElementById(t).value=document.getElementById(o).value,document.getElementById(o).value=r))};this.$dateFrom=n,this.$dateTo=a,this.$modalTrigger=l,$(function(){$.datepicker.setDefaults($.datepicker.regional.ru),n.datepicker({dateFormat:"dd.mm.yy",showOn:"button",showOtherMonths:!0,constrainInput:!0,onClose:function(e){a.datepicker("option","minDate",e)}}).inputmask("99.99.9999",{showMaskOnHover:!1,insertMode:!1,oncomplete:function(){t=this}}),a.datepicker({dateFormat:"dd.mm.yy",showOn:"button",showOtherMonths:!0,constrainInput:!0,onClose:function(e){n.datepicker("option","maxDate",e)}}).inputmask("99.99.9999",{showMaskOnHover:!1,insertMode:!1,oncomplete:function(){t=this}}),$('input[type="text"]',s).on("change",function(){var e=o();i.validate()&&c(e)}),$("."+r,s).on("click",function(){return t&&d(t),i.applyHandler(this),!1}),l.siblings("."+i.opt.clearAllButtonClass).on("click",function(){$(this).removeClass("active"),i.resetList()})})};d.prototype={resetList:function(){this.$dateFrom.val(""),this.$dateTo.val(""),this.$modalTrigger.text(this.$modalTrigger.attr("data-default"))},validate:function(){var e=this.$dateTo.val(),t=this.$dateFrom.val(),i=e.split("."),n=t.split("."),a=[],s=!0;return a[0]=Date.parse(i[1]+"."+i[0]+"."+i[2]),a[1]=Date.parse(n[1]+"."+n[0]+"."+n[2]),a[0]||""==$.trim(e)?this.$dateTo.parent(".pwf-field").removeClass("err"):(this.$dateTo.parent(".pwf-field").addClass("err"),s=!1),a[1]||""==$.trim(t)?this.$dateFrom.parent(".pwf-field").removeClass("err"):(this.$dateFrom.parent(".pwf-field").addClass("err"),s=!1),s},applyHandler:function(){}};var h=function(e){this.opt=e,this.opt.anyChar=!1;var i=this,s=!0;this.$field=$("#"+i.opt.id),this.DOMcompleteWrap=document.getElementById(i.opt.autoCompleteWrapId),this.afterClear,this.rawData={items:[],set:function(e){this.items=e,this._rawDataChange()},get:function(){return this.items},_rawDataChange:function(){var e,t=this;for(e=0;e2?n(a,i.opt.autoCompleteUrl,function(e){i.$field.hasClass("ui-autocomplete-input")&&i.$field[i.completeName]("destroy"),i.rawData.set(e),i._initAutoComplete(),i.showList("")}):0===text.length&&i.$field.hasClass("ui-autocomplete-input")&&(i.$field[i.completeName]("destroy"),t.removeClass(i.DOMcompleteWrap,"full-visible"),i._resetmodals(i.afterClear)):text.length>2&&s?(n(a,i.opt.autoCompleteUrl,function(e){i.rawData.set(e),i._initAutoComplete(),i.showList("")}),s=!1):0!=text.length||s?i.$field.hasClass("ui-autocomplete-input")&&i.showList(text):i.$field.hasClass("ui-autocomplete-input")&&(i.$field[i.completeName]("destroy"),t.removeClass(i.DOMcompleteWrap,"full-visible"),i._resetmodals(i.afterClear),s=!0),!1}).click(function(){return!1})};return h.prototype={_initAutoComplete:function(){var e=this;e.$field[e.completeName]({source:e.rawData.get(),minLength:0,appendTo:e.DOMcompleteWrap,select:function(t,i){e._afterSelect(t,i)},close:function(){t.removeClass(e.DOMcompleteWrap,"full-visible")},open:function(){t.addClass(e.DOMcompleteWrap,"full-visible")}})},_afterSelect:function(e,t){var i=this;e.preventDefault(),t.item.url?window.location=t.item.url:t.item.label.length&&(i.$field[0].value=t.item.label,i.selectCheckBoxes(t.item.id,t.item.name))},_resetmodals:function(e){return e?void e():0},selectHandler:function(){},selectCheckBoxes:function(){},showList:function(e){self=this,this.$field[self.completeName]("search",e)},pullData:function(){},clearValue:function(){this.$field.val("")}},e.init=function(e){$.extend(this.lang,e.lang),e.lang=null,$.extend(this.settings,e);var i=this,a=function(){$(i.DOMform).find('input[name="~~name~~"]').remove()};"None"!=this.settings.searchData&&this.settings.searchData&&(this.previousSearch=JSON.parse(this.settings.searchData)),this.DOMform=document.getElementById(this.settings.formId),$(this.DOMform).on("submit",function(){a()}),$.widget("custom.exibitionComplete",$.ui.autocomplete,{_renderMenu:function(e,t){var i=this,n="";$.each(t,function(t,a){a.cat!=n&&a.cat&&(e.append(""+a.cat+""),n=a.cat),i._renderItemData(e,a)})}}),$.widget("custom.exibitionComplete",$.ui.autocomplete,{_renderMenu:function(e,t){var i=this,n="";$.each(t,function(t,a){a.cat!=n&&a.cat&&(e.append(""+a.cat+""),n=a.cat),i._renderItemData(e,a)})}}),$.widget("custom.placeComplete",$.ui.autocomplete,{_renderItem:function(e,t){return $("").append($("").text(t.label)).append(' ('+t.cat+")").appendTo(e)}}),this.exhibitionField=new h(i.settings.firstField),this.exhibitionField.completeName="exibitionComplete",this.exhibitionField.opt.anyChar=!0,this.placesModal=new c(i.settings.place),this.subjModal=new o(i.settings.subject),this.periodModal=new d(i.settings.period),this.exhibitionField.selectCheckBoxes=function(e,t){var i,a,s=this,l=t;"th"==t?i=document.getElementById(s.opt.prefix+e):"tg"==t&&(i=document.getElementById(s.opt.prefixInner+e),l="th"),r.show(),i?(r.hide(),$(i).prop("checked",!0),$(i).trigger("change")):(a={name:t,id:e},n(a,EXPO.searchBlock.subjModal.opt.getParentUrl,function(i){EXPO.searchBlock.subjModal._loadParentTree(i,function(){EXPO.searchBlock.subjModal._checkCheckBox(e,t)})}))},this.placesField=new h(i.settings.placeField),this.placesField.dataForm=EXPO.searchBlock.placesModal.$inputFilter.attr("data-form"),this.placesField.selectCheckBoxes=function(e,t){var i,a,s=this;i=document.getElementById(s.opt.prefix+e),i?(r.hide(),$(i).prop("checked",!0),$(i).trigger("change")):(a={name:t,id:e},n(a,EXPO.searchBlock.placesModal.opt.getParentUrl,function(t){EXPO.searchBlock.placesModal._loadParentTree(t,function(){EXPO.searchBlock.placesModal._checkCheckBox(e,!0)})}))},this.exhibitionField.afterClear=function(){i.subjModal.resetList()},this.placesField.afterClear=function(){i.placesModal.resetList()},this.modalWindow=new t.Modal(i.settings.modal),this.periodModal.applyHandler=function(){this.validate()&&(r.show(),$(i.DOMform).submit())},this.placesModal.applyHandler=function(){r.show(),$(i.DOMform).submit()},this.subjModal.applyHandler=function(){r.show(),$(i.DOMform).submit()},$("."+i.settings.modalTriggerClass).on("click",function(e){return e.preventDefault(),i.modalWindow.pullData(this.getAttribute("href")),i.modalWindow.open(),!1}),$(function(){if(i.previousSearch)for(var e=0;e2?$element.eq(0).text().length2&&d?(n({term:t,form:o},l.opt.autoCompleteUrl,u),d=!1):0!=t.length||d||l.$inputFilter.hasClass("ui-autocomplete-input")&&(l.$inputFilter.placeComplete("destroy"),d=!0),!1}).click(function(){return!1})},_renderSublist:function(e,t,i){var n=this,a=0,s=t+"-sub",l=function(e){if(e.length){for(n.sublist[s]={},a;aT;T++)for(o=_[T],w=0;x>w;w++)o==C[w]&&M(a[w]);for(T=0;y>T;T++)o=_[T],o==S&&M(i)}else for(T=0;y>T;T++)o=_[T],o==S&&M(S)},M=function(e){var t=e.getAttribute("id");i._destroyTag(t),O()},A=function(e){var a=t.closest(e,n),s=a.querySelector("."+u),l=s.innerHTML,r=e.getAttribute("id"),o={id:r,text:l};i._addTag(r,o),O()},O=function(){o.find("."+h).length&&"~~id~~"!=o.find("."+h)[0].getAttribute(m)?o.addClass("visible"):o.removeClass("visible")},P=function(){var t=$(k).children("li").children("."+e).find("."+l+":checked");t.each(function(){A(this)})},q=function(){var t=$(k).children("li").children("."+e).find("."+l+":checked");t.each(function(){M(this)})};i.strictMode?this.checked?(w(this),D(this),A(this)):(I(this),D(this),M(this)):this.checked?(F()?(S(this),w(this),D(v),A(v),q(k),v.getAttribute("id")!=_.getAttribute("id")||_.checked||(w(_),D(_),A(_))):(w(this),D(this),A(this)),b&&y(this),b&&"~~id~~"!=$(b).find("."+l)[0].value&&D(this)):(B()?(T(this),I(this),D(v),M(v),P(k),_.checked&&(I(_),D(_),M(_))):(I(this),D(this),M(this)),b&&(x(this),D(this))),p()}),$(".csbs-del",o).on("click",function(){var e=$(this).attr("data-checkbox-id"),t=$("#"+e);return t.prop("checked",!1),t.trigger("change"),dna.destroy(i.itemsSelected[e]),o.children(".dna-clone").length||o.removeClass("visible"),!1}),$(".modal-clear",a).on("click",function(){return i.resetList(),!1}),$(".q-sel a",a).on("click",function(){var e=$(this),t=e.attr("data-name"),a=e.attr("data-id"),s={name:t,id:a},l=function(e){i._loadParentTree(e,function(){i._checkCheckBox(a)})};return n(s,i.opt.getParentUrl,l),!1}),$("."+h,a).on("click",function(){return i.applyHandler(this),!1}),d.siblings("."+i.opt.clearAllButtonClass).on("click",function(){i.resetList(),EXPO.searchBlock.placesField.clearValue()})})};c.prototype={_getAjax:function(e,t){var i=this;e||(e=""),$.ajax({type:"GET",url:i.opt.ajaxUrl,data:e,success:function(e){return"function"!=typeof t?(i.rawData=e,e):(i.rawData=e,void t(e))}})},_renderSublist:function(e,t,i){var n=this,a=0,s=t+"-sub",l=function(e){if(e.length){for(n.curDNA[s]={},a;a2&&o?(n({term:t,form:l},s.opt.autoCompleteUrl,d),o=!1):0!=t.length||o||s.$inputFilter.hasClass("ui-autocomplete-input")&&(s.$inputFilter.autocomplete("destroy"),o=!0),!1}).click(function(){return!1})},_loadParentTree:function(e,t,i){var n,a,l,o,c=this,d=e,h=$("#id_"+d.id),u=function(e){var n=$("#id_"+d.id),h=function(){r.hide(),i||0===i?t(i):t()};r.hide(),n.length&&s(c.curDNA[a+"-sub"])==e&&(l={name:d.name,id:d.id},r.show(),o=$("#id_"+d.id).closest(".level").children(".trigger").attr("data-template-id"),c._renderNested(l,h,o,d.id))},p=function(){r.hide(),i||0===i?t(i):t()};r.show(),d.hasOwnProperty("parent")?h.length?(l={name:d.name,id:d.id},o=h.closest(".level").children(".trigger").attr("data-template-id"),c._renderNested(l,function(){r.hide(),t()},o,d.id)):(n={name:d.parent.name,id:d.parent.id},a=$("#id_"+d.parent.id).closest(".level").children(".trigger").attr("data-template-id"),c._renderSublist(n,a,u)):(n={name:d.name,id:d.id},a=$("#id_"+d.id).closest(".level").children(".trigger").attr("data-template-id"),c._renderSublist(n,a,p))},applyHandler:function(){}};var d=function(e){this.opt=e;var t,i=this,n=$("#"+i.opt.dateFrom),a=$("#"+i.opt.dateTo),s=$("#"+i.opt.id),l=$("#"+i.opt.modalTrigger),r=i.opt.applyBtnClass,o=function(){var e="",t=l.data("lng-to"),i=l.data("lng-from"),s=$.trim(a.val()),r=$.trim(n.val());return""!=s&&""!=r?e=i+": "+r+" "+t+": "+s+".":""!=s&&""==r?e=t+": "+s+".":""==s&&""!=r&&(e=i+": "+r+"."),e},c=function(e){""!=e?(l.text(e).siblings(".trigger-label").addClass("hidden"),l.siblings("."+i.opt.clearAllButtonClass).addClass("active")):(l.text(l.data("default")).siblings(".trigger-label").removeClass("hidden"),l.siblings("."+i.opt.clearAllButtonClass).removeClass("active"))},d=function(e){var t,s,l,r,o=e.getAttribute("id"),c=e.value,d=Date.parse(c);i.validate()&&($(e).parent(".pwf-field").removeClass("err"),o==i.opt.dateFrom?(t=a[0].getAttribute("id"),s=a[0].value):(t=n[0].getAttribute("id"),s=n[0].value),l=Date.parse(s),d>l&&o==i.opt.dateFrom?(r=document.getElementById(o).value,document.getElementById(o).value=document.getElementById(t).value,document.getElementById(t).value=r):l>d&&o==i.opt.dateTo&&(r=document.getElementById(t).value,document.getElementById(t).value=document.getElementById(o).value,document.getElementById(o).value=r))};this.$dateFrom=n,this.$dateTo=a,this.$modalTrigger=l,$(function(){$.datepicker.setDefaults($.datepicker.regional.ru),n.datepicker({dateFormat:"dd.mm.yy",showOn:"button",showOtherMonths:!0,constrainInput:!0,onClose:function(e){a.datepicker("option","minDate",e)}}).inputmask("99.99.9999",{showMaskOnHover:!1,insertMode:!1,oncomplete:function(){t=this}}),a.datepicker({dateFormat:"dd.mm.yy",showOn:"button",showOtherMonths:!0,constrainInput:!0,onClose:function(e){n.datepicker("option","maxDate",e)}}).inputmask("99.99.9999",{showMaskOnHover:!1,insertMode:!1,oncomplete:function(){t=this}}),$('input[type="text"]',s).on("change",function(){var e=o();i.validate()&&c(e)}),$("."+r,s).on("click",function(){return t&&d(t),i.applyHandler(this),!1}),l.siblings("."+i.opt.clearAllButtonClass).on("click",function(){$(this).removeClass("active"),i.resetList()})})};d.prototype={resetList:function(){this.$dateFrom.val(""),this.$dateTo.val(""),this.$modalTrigger.text(this.$modalTrigger.attr("data-default"))},validate:function(){var e=this.$dateTo.val(),t=this.$dateFrom.val(),i=e.split("."),n=t.split("."),a=[],s=!0;return a[0]=Date.parse(i[1]+"."+i[0]+"."+i[2]),a[1]=Date.parse(n[1]+"."+n[0]+"."+n[2]),a[0]||""==$.trim(e)?this.$dateTo.parent(".pwf-field").removeClass("err"):(this.$dateTo.parent(".pwf-field").addClass("err"),s=!1),a[1]||""==$.trim(t)?this.$dateFrom.parent(".pwf-field").removeClass("err"):(this.$dateFrom.parent(".pwf-field").addClass("err"),s=!1),s},applyHandler:function(){}};var h=function(e){this.opt=e,this.opt.anyChar=!1;var i=this,s=!0;this.$field=$("#"+i.opt.id),this.DOMcompleteWrap=document.getElementById(i.opt.autoCompleteWrapId),this.afterClear,this.rawData={items:[],set:function(e){this.items=e,this._rawDataChange()},get:function(){return this.items},_rawDataChange:function(){var e,t=this;for(e=0;e2?n(a,i.opt.autoCompleteUrl,function(e){i.$field.hasClass("ui-autocomplete-input")&&i.$field[i.completeName]("destroy"),i.rawData.set(e),i._initAutoComplete(),i.showList("")}):0===text.length&&i.$field.hasClass("ui-autocomplete-input")&&(i.$field[i.completeName]("destroy"),t.removeClass(i.DOMcompleteWrap,"full-visible"),i._resetmodals(i.afterClear)):text.length>2&&s?(n(a,i.opt.autoCompleteUrl,function(e){i.rawData.set(e),i._initAutoComplete(),i.showList("")}),s=!1):0!=text.length||s?i.$field.hasClass("ui-autocomplete-input")&&i.showList(text):i.$field.hasClass("ui-autocomplete-input")&&(i.$field[i.completeName]("destroy"),t.removeClass(i.DOMcompleteWrap,"full-visible"),i._resetmodals(i.afterClear),s=!0),!1}).click(function(){return!1})};return h.prototype={_initAutoComplete:function(){var e=this;e.$field[e.completeName]({source:e.rawData.get(),minLength:0,appendTo:e.DOMcompleteWrap,select:function(t,i){e._afterSelect(t,i)},close:function(){t.removeClass(e.DOMcompleteWrap,"full-visible")},open:function(){t.addClass(e.DOMcompleteWrap,"full-visible")}})},_afterSelect:function(e,t){var i=this;e.preventDefault(),t.item.url?window.location=t.item.url:t.item.label.length&&(i.$field[0].value=t.item.label,i.selectCheckBoxes(t.item.id,t.item.name))},_resetmodals:function(e){return e?void e():0},selectHandler:function(){},selectCheckBoxes:function(){},showList:function(e){self=this,this.$field[self.completeName]("search",e)},pullData:function(){},clearValue:function(){this.$field.val("")}},e.init=function(e){$.extend(this.lang,e.lang),e.lang=null,$.extend(this.settings,e);var i=this,a=function(){$(i.DOMform).find('input[name="~~name~~"]').remove()};"None"!=this.settings.searchData&&this.settings.searchData&&(this.previousSearch=JSON.parse(this.settings.searchData)),this.DOMform=document.getElementById(this.settings.formId),$(this.DOMform).on("submit",function(){a()}),$.widget("custom.exibitionComplete",$.ui.autocomplete,{_renderMenu:function(e,t){var i=this,n="";$.each(t,function(t,a){a.cat!=n&&a.cat&&(e.append(""+a.cat+""),n=a.cat),i._renderItemData(e,a)})}}),$.widget("custom.exibitionComplete",$.ui.autocomplete,{_renderMenu:function(e,t){var i=this,n="";$.each(t,function(t,a){a.cat!=n&&a.cat&&(e.append(""+a.cat+""),n=a.cat),i._renderItemData(e,a)})}}),$.widget("custom.placeComplete",$.ui.autocomplete,{_renderItem:function(e,t){return $("").append($("").text(t.label)).append(' ('+t.cat+")").appendTo(e)}}),this.exhibitionField=new h(i.settings.firstField),this.exhibitionField.completeName="exibitionComplete",this.exhibitionField.opt.anyChar=!0,this.placesModal=new c(i.settings.place),this.subjModal=new o(i.settings.subject),this.periodModal=new d(i.settings.period),this.exhibitionField.selectCheckBoxes=function(e,t){var i,a,s=this,l=t;"th"==t?i=document.getElementById(s.opt.prefix+e):"tg"==t&&(i=document.getElementById(s.opt.prefixInner+e),l="th"),r.show(),i?(r.hide(),$(i).prop("checked",!0),$(i).trigger("change")):(a={name:t,id:e},n(a,EXPO.searchBlock.subjModal.opt.getParentUrl,function(i){EXPO.searchBlock.subjModal._loadParentTree(i,function(){EXPO.searchBlock.subjModal._checkCheckBox(e,t)})}))},this.placesField=new h(i.settings.placeField),this.placesField.dataForm=EXPO.searchBlock.placesModal.$inputFilter.attr("data-form"),this.placesField.selectCheckBoxes=function(e,t){var i,a,s=this;i=document.getElementById(s.opt.prefix+e),i?(r.hide(),$(i).prop("checked",!0),$(i).trigger("change")):(a={name:t,id:e},n(a,EXPO.searchBlock.placesModal.opt.getParentUrl,function(t){EXPO.searchBlock.placesModal._loadParentTree(t,function(){EXPO.searchBlock.placesModal._checkCheckBox(e,!0)})}))},this.exhibitionField.afterClear=function(){i.subjModal.resetList()},this.placesField.afterClear=function(){i.placesModal.resetList()},this.modalWindow=new t.Modal(i.settings.modal),this.periodModal.applyHandler=function(){this.validate()&&(r.show(),$(i.DOMform).submit())},this.placesModal.applyHandler=function(){r.show(),$(i.DOMform).submit()},this.subjModal.applyHandler=function(){r.show(),$(i.DOMform).submit()},$("."+i.settings.modalTriggerClass).on("click",function(e){return e.preventDefault(),i.modalWindow.pullData(this.getAttribute("href")),i.modalWindow.open(),!1}),$(function(){if(i.previousSearch)for(var e=0;e