swapping dates in interval modal window bug fixed

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

@ -1602,6 +1602,7 @@ if (EXPO.searchBlock){
$modal = $('#'+self.opt.id),
$modalTrigger = $('#'+self.opt.modalTrigger),
applyBtnClass = self.opt.applyBtnClass,
$activeField,
/**
* make string from input:text values
* @returns {string}
@ -1672,11 +1673,11 @@ if (EXPO.searchBlock){
/**
* swap values between date fields
*/
if(thatValInt > itValInt && thatValInt != 0 && thatValInt){
if(itValInt > thatValInt && itId == self.opt.dateFrom){
bfr = document.getElementById(itId).value;
document.getElementById(itId).value = document.getElementById(thatId).value;
document.getElementById(thatId).value = bfr;
}else if(thatValInt < itValInt && thatValInt != 0 && thatValInt){
}else if(itValInt < thatValInt && itId == self.opt.dateTo){
bfr = document.getElementById(thatId).value;
document.getElementById(thatId).value = document.getElementById(itId).value;
document.getElementById(itId).value = bfr;
@ -1702,7 +1703,7 @@ if (EXPO.searchBlock){
}).inputmask("99.99.9999",{
showMaskOnHover:false,
'oncomplete': function () {
checkInterval(this);
$activeField = this;
}
});
$dateTo.datepicker({
@ -1716,15 +1717,21 @@ if (EXPO.searchBlock){
}).inputmask("99.99.9999",{
showMaskOnHover:false,
'oncomplete': function () {
checkInterval(this);
$activeField = this;
}
});
$('input[type="text"]',$modal).on('change', function () {
var stringToset = inputsTostring();
triggerSetText(stringToset);
if (self.validate()){
triggerSetText(stringToset);
}
});
$('.'+applyBtnClass, $modal).on('click', function () {
if($activeField){
checkInterval($activeField);
}
self.applyHandler(this);
return false;
});

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