clear main field after clear all button clicked

remotes/origin/1203
pavel 11 years ago
parent 7b3d90cf6e
commit 7888bd5acf
  1. 92
      templates/client/static_client/js/_modules/block.search.js
  2. 2
      templates/client/static_client/js_min/_modules/block.search.min.js

@ -371,6 +371,8 @@ if (EXPO.searchBlock){
// кнопка "очистить параметры" // кнопка "очистить параметры"
$modalTrigger.siblings('.'+self.opt.clearAllButtonClass).on('click', function () { $modalTrigger.siblings('.'+self.opt.clearAllButtonClass).on('click', function () {
self.resetList(); self.resetList();
EXPO.searchBlock.exhibitionField.clearValue();
}); });
}); });
}; };
@ -1143,6 +1145,7 @@ if (EXPO.searchBlock){
}); });
$modalTrigger.siblings('.'+self.opt.clearAllButtonClass).on('click', function () { $modalTrigger.siblings('.'+self.opt.clearAllButtonClass).on('click', function () {
self.resetList(); self.resetList();
EXPO.searchBlock.placesField.clearValue()
}); });
}); });
@ -1685,51 +1688,51 @@ if (EXPO.searchBlock){
this.$dateTo = $dateTo; this.$dateTo = $dateTo;
this.$modalTrigger = $modalTrigger; this.$modalTrigger = $modalTrigger;
$(function () { $(function () {
$.datepicker.setDefaults($.datepicker.regional["ru"]); $.datepicker.setDefaults($.datepicker.regional["ru"]);
$dateFrom.datepicker({ $dateFrom.datepicker({
dateFormat: 'dd.mm.yy', dateFormat: 'dd.mm.yy',
showOn: 'button', showOn: 'button',
showOtherMonths: true, showOtherMonths: true,
constrainInput: true, constrainInput: true,
onClose: function( selectedDate ) { onClose: function( selectedDate ) {
$dateTo.datepicker( "option", "minDate", selectedDate ); $dateTo.datepicker( "option", "minDate", selectedDate );
} }
}).inputmask("99.99.9999",{ }).inputmask("99.99.9999",{
showMaskOnHover:false, showMaskOnHover:false,
'oncomplete': function () { 'oncomplete': function () {
checkInterval(this); checkInterval(this);
} }
}); });
$dateTo.datepicker({ $dateTo.datepicker({
dateFormat: 'dd.mm.yy', dateFormat: 'dd.mm.yy',
showOn: 'button', showOn: 'button',
showOtherMonths: true, showOtherMonths: true,
constrainInput: true, constrainInput: true,
onClose: function( selectedDate ) { onClose: function( selectedDate ) {
$dateFrom.datepicker( "option", "maxDate", selectedDate ); $dateFrom.datepicker( "option", "maxDate", selectedDate );
} }
}).inputmask("99.99.9999",{ }).inputmask("99.99.9999",{
showMaskOnHover:false, showMaskOnHover:false,
'oncomplete': function () { 'oncomplete': function () {
checkInterval(this); checkInterval(this);
} }
}); });
$('input[type="text"]',$modal).on('change', function () { $('input[type="text"]',$modal).on('change', function () {
var stringToset = inputsTostring(); var stringToset = inputsTostring();
triggerSetText(stringToset); triggerSetText(stringToset);
});
$('.'+applyBtnClass, $modal).on('click', function () {
self.applyHandler(this);
return false;
});
$modalTrigger.siblings('.'+self.opt.clearAllButtonClass).on('click', function () {
$(this).removeClass('active');
self.resetList();
});
}); });
$('.'+applyBtnClass, $modal).on('click', function () {
self.applyHandler(this);
return false;
});
$modalTrigger.siblings('.'+self.opt.clearAllButtonClass).on('click', function () {
$(this).removeClass('active');
self.resetList();
});
});
}; };
/** /**
@ -1998,6 +2001,9 @@ if (EXPO.searchBlock){
*/ */
pullData: function (handler) { pullData: function (handler) {
},
clearValue: function () {
this.$field.val('');
} }
}; };

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save