Commit 5659b966 authored by Igor.Zotov's avatar Igor.Zotov Committed by Alexander.Trofimov

http://bugzserver/show_bug.cgi?id=30149 - Запросы begins with, does not begin...

http://bugzserver/show_bug.cgi?id=30149 -  Запросы begins with, does not begin with, ends with, does not end with не отрабатывают и вызывают ошибку в консоли

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64292 954022d7-b5bf-4e40-9824-e11837661b57
parent d7d5ac14
...@@ -4999,7 +4999,7 @@ CustomFilter.prototype.init = function(operator, val) { ...@@ -4999,7 +4999,7 @@ CustomFilter.prototype.init = function(operator, val) {
CustomFilter.prototype.isHideValue = function(val) { CustomFilter.prototype.isHideValue = function(val) {
var result = false; var result = false;
var isDigitValue = isNaN(val) ? false : true;
var checkComplexSymbols = null; var checkComplexSymbols = null;
var filterVal, position; var filterVal, position;
if(checkComplexSymbols != null) if(checkComplexSymbols != null)
...@@ -5054,14 +5054,14 @@ CustomFilter.prototype.isHideValue = function(val) { ...@@ -5054,14 +5054,14 @@ CustomFilter.prototype.isHideValue = function(val) {
switch (this.Operator) switch (this.Operator)
{ {
case c_oAscCustomAutoFilter.beginsWith: case c_oAscCustomAutoFilter.beginsWith:
if(type == 1) if(!isDigitValue)
{ {
if(val.search(filterVal) == 0)//beginsWith if(val.search(filterVal) == 0)//beginsWith
result = true; result = true;
} }
break; break;
case c_oAscCustomAutoFilter.doesNotBeginWith: case c_oAscCustomAutoFilter.doesNotBeginWith:
if(type == 1) if(!isDigitValue)
{ {
if(val.search(filterVal) != 0)//doesNotBeginWith if(val.search(filterVal) != 0)//doesNotBeginWith
result = true; result = true;
...@@ -5071,7 +5071,7 @@ CustomFilter.prototype.isHideValue = function(val) { ...@@ -5071,7 +5071,7 @@ CustomFilter.prototype.isHideValue = function(val) {
break; break;
case c_oAscCustomAutoFilter.endsWith: case c_oAscCustomAutoFilter.endsWith:
position = val.length - filterVal.length; position = val.length - filterVal.length;
if(type == 1) if(!isDigitValue)
{ {
if(val.lastIndexOf(filterVal) == position && position > 0)//endsWith if(val.lastIndexOf(filterVal) == position && position > 0)//endsWith
result = true; result = true;
...@@ -5079,7 +5079,7 @@ CustomFilter.prototype.isHideValue = function(val) { ...@@ -5079,7 +5079,7 @@ CustomFilter.prototype.isHideValue = function(val) {
break; break;
case c_oAscCustomAutoFilter.doesNotEndWith: case c_oAscCustomAutoFilter.doesNotEndWith:
position = val.length - filterVal.length; position = val.length - filterVal.length;
if(type == 1) if(!isDigitValue)
{ {
if(val.lastIndexOf(filterVal) != position && position > 0)//doesNotEndWith if(val.lastIndexOf(filterVal) != position && position > 0)//doesNotEndWith
result = true; result = true;
...@@ -5088,14 +5088,14 @@ CustomFilter.prototype.isHideValue = function(val) { ...@@ -5088,14 +5088,14 @@ CustomFilter.prototype.isHideValue = function(val) {
result = true; result = true;
break; break;
case c_oAscCustomAutoFilter.contains: case c_oAscCustomAutoFilter.contains:
if(type == 1) if(!isDigitValue)
{ {
if(val.search(filterVal) != -1)//contains if(val.search(filterVal) != -1)//contains
result = true; result = true;
} }
break; break;
case c_oAscCustomAutoFilter.doesNotContain: case c_oAscCustomAutoFilter.doesNotContain:
if(type == 1) if(!isDigitValue)
{ {
if(val.search(filterVal) == -1)//doesNotContain if(val.search(filterVal) == -1)//doesNotContain
result = true; result = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment