diff --git a/.aditoprj/project.version b/.aditoprj/project.version index 44d012d6ba1e49de18c1b49b608b26b801a63ffb..aebb71fecb0576d5049cc4d7c9b8e1058b807e5f 100644 --- a/.aditoprj/project.version +++ b/.aditoprj/project.version @@ -1,3 +1,3 @@ #This file is generated by ADITO designer. Do NOT delete or modify! -#Wed Feb 05 13:39:26 CET 2020 +#Mon Feb 03 11:04:39 CET 2020 version=6.1.0 diff --git a/entity/Appointment_entity/entityfields/allday/valueProcess.js b/entity/Appointment_entity/entityfields/allday/valueProcess.js index 955e531fbed12b5f25a97577c52729781b7cc595..5823e2d7d7d6a1a68e59e900efb34a36c8ad70bc 100644 --- a/entity/Appointment_entity/entityfields/allday/valueProcess.js +++ b/entity/Appointment_entity/entityfields/allday/valueProcess.js @@ -6,10 +6,12 @@ import("system.result"); /** * Following if() is only for passing param-parts from "new Appointment"-Dialog to AppointmentEditViewTemplate */ -if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param")) +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param") && vars.get("$this.value") == null) { var event = JSON.parse(vars.getString("$param.Entry_param")); if(event["X-ADITO-ISALLDAYEVENT"]) result.string(event["X-ADITO-ISALLDAYEVENT"]); -} \ No newline at end of file +} +else + result.string(vars.get("$this.value")); \ No newline at end of file diff --git a/entity/Appointment_entity/entityfields/classification/valueProcess.js b/entity/Appointment_entity/entityfields/classification/valueProcess.js index a4056b88346388dc049b7dbcf191192c0ce66b57..105ba28ae202d048d9d97e22f924706636e87032 100644 --- a/entity/Appointment_entity/entityfields/classification/valueProcess.js +++ b/entity/Appointment_entity/entityfields/classification/valueProcess.js @@ -6,10 +6,12 @@ import("system.result"); /** * Following if() is only for passing param-parts from "new Appointment"-Dialog to AppointmentEditViewTemplate */ -if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param")) +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param") && vars.get("$this.value") == null) { var event = JSON.parse(vars.getString("$param.Entry_param")); if(event[calendars.CLASSIFICATION]) result.string(event[calendars.CLASSIFICATION]); -} \ No newline at end of file +} +else + result.string(vars.get("$this.value")); \ No newline at end of file diff --git a/entity/Appointment_entity/entityfields/startend/valueProcess.js b/entity/Appointment_entity/entityfields/startend/valueProcess.js index 4a4abfd9cee8bcbba821850fe4ddf343eec9b571..acf5f27c3566e1142126c931be2814e0a61d7441 100644 --- a/entity/Appointment_entity/entityfields/startend/valueProcess.js +++ b/entity/Appointment_entity/entityfields/startend/valueProcess.js @@ -45,9 +45,9 @@ if(startLong != null && endLong != null) datebegin = startdate; if(datetime.isToday(endLong)) - dateend = ranslate.text("today"); + dateend = translate.text("today"); else if(datetime.isTomorrow(endLong)) - dateend = ranslate.text("tomorrow"); + dateend = translate.text("tomorrow"); else dateend = enddate; diff --git a/entity/Appointment_entity/entityfields/transparency/valueProcess.js b/entity/Appointment_entity/entityfields/transparency/valueProcess.js index 774f704312ccb614d774153b95e867a49ac1b952..b403cf735c7af712392d8b538ca9a2ba489714e8 100644 --- a/entity/Appointment_entity/entityfields/transparency/valueProcess.js +++ b/entity/Appointment_entity/entityfields/transparency/valueProcess.js @@ -6,10 +6,12 @@ import("system.result"); /** * Following if() is only for passing param-parts from "new Appointment"-Dialog to AppointmentEditViewTemplate */ -if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param")) +if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.exists("$param.Entry_param") && vars.get("$this.value") == null) { var event = JSON.parse(vars.getString("$param.Entry_param")); if(event[calendars.TRANSPARENCY]) result.string(event[calendars.TRANSPARENCY]); -} \ No newline at end of file +} +else + result.string(vars.get("$this.value")); \ No newline at end of file diff --git a/entity/AttributeUsage_entity/entityfields/object_type/displayValueProcess.js b/entity/AttributeUsage_entity/entityfields/object_type/displayValueProcess.js index 84204be06fa6c446fc7449a4450461f39d413e9f..38e15ca34a8fdc0ca3b4a67d1fd4b3f1ac721f89 100644 --- a/entity/AttributeUsage_entity/entityfields/object_type/displayValueProcess.js +++ b/entity/AttributeUsage_entity/entityfields/object_type/displayValueProcess.js @@ -1,7 +1,7 @@ +import("Context_lib"); import("system.result"); import("system.neon"); import("system.vars"); -import("system.project"); if (vars.get("$field.OBJECT_TYPE")) { @@ -9,5 +9,5 @@ if (vars.get("$field.OBJECT_TYPE")) //@TODO replace this when it's possible to get the old value in onDBUpdate vars.set("$context.originalObjectType", vars.get("$field.OBJECT_TYPE")); - result.string(project.getDataModel(project.DATAMODEL_KIND_CONTEXT, vars.get("$field.OBJECT_TYPE"))[1]); + result.string(ContextUtils.getTitle(vars.get("$field.OBJECT_TYPE"), true)); } \ No newline at end of file diff --git a/entity/Attribute_entity/Attribute_entity.aod b/entity/Attribute_entity/Attribute_entity.aod index 8f0a4a35b9b7724d94c5756cf7a726a8b0778509..d8ffe836b1d5fcfd228a6a3fe87fc882e64d3b46 100644 --- a/entity/Attribute_entity/Attribute_entity.aod +++ b/entity/Attribute_entity/Attribute_entity.aod @@ -7,6 +7,7 @@ <contentTitleProcess>%aditoprj%/entity/Attribute_entity/contentTitleProcess.js</contentTitleProcess> <afterUiInit>%aditoprj%/entity/Attribute_entity/afterUiInit.js</afterUiInit> <onValidation>%aditoprj%/entity/Attribute_entity/onValidation.js</onValidation> + <afterOperatingState>%aditoprj%/entity/Attribute_entity/afterOperatingState.js</afterOperatingState> <iconId>VAADIN:TAG</iconId> <titlePlural>Attributes</titlePlural> <recordContainer>jdito</recordContainer> diff --git a/entity/Attribute_entity/afterOperatingState.js b/entity/Attribute_entity/afterOperatingState.js new file mode 100644 index 0000000000000000000000000000000000000000..084c14a53af4e5b3e5dc2763fb89d3e60dd3715e --- /dev/null +++ b/entity/Attribute_entity/afterOperatingState.js @@ -0,0 +1,5 @@ +import("system.vars"); +import("system.neon"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_VIEW && vars.get("$param.ParentIdPreset_param")) + neon.refreshAll(); \ No newline at end of file diff --git a/entity/Attribute_entity/entityfields/attribute_type/valueProcess.js b/entity/Attribute_entity/entityfields/attribute_type/valueProcess.js index 05edbe151d482c3f16137604791d7808ce4c8e9a..20745951e995fd452c09c29f9160ca4e87f77458 100644 --- a/entity/Attribute_entity/entityfields/attribute_type/valueProcess.js +++ b/entity/Attribute_entity/entityfields/attribute_type/valueProcess.js @@ -12,6 +12,6 @@ if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW && vars.get("$field. if (possibleTypes && possibleTypes.length === 1) //only one type possible -> set that type result.string(possibleTypes[0]); - else if (possibleTypes.indexOf(type) === -1) //selected type can't be used with parent -> reset type + else if (possibleTypes && possibleTypes.indexOf(type) === -1) //selected type can't be used with parent -> reset type result.string(""); } \ No newline at end of file diff --git a/entity/Attribute_entity/recordcontainers/jdito/contentProcess.js b/entity/Attribute_entity/recordcontainers/jdito/contentProcess.js index 362a002d70d5eb5b77c15405674324b23af61443..fc2e0041d563fcf75bc210d954e8cf4247ad731f 100644 --- a/entity/Attribute_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Attribute_entity/recordcontainers/jdito/contentProcess.js @@ -1,3 +1,4 @@ +import("Context_lib"); import("system.translate"); import("Util_lib"); import("JditoFilter_lib"); @@ -171,7 +172,7 @@ function _buildAttributeTable (pAttributes, pUsages) { rowData[9] = pUsages[i].map(function (usage) { - return translate.text(usage); + return ContextUtils.getTitle(usage, true); }).join(", "); } rowData[10] = _getFullName(rowData[1]); //parent full name diff --git a/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod b/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod index 219ec91f9f98e2013ad08c97acffa6e3d2c5ea5a..e00af12fe560dc1b0c0c4036e408f15d9c76a761 100644 --- a/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod +++ b/entity/ClassificationAdmin_entity/ClassificationAdmin_entity.aod @@ -36,6 +36,7 @@ </entityField> <entityField> <name>CLASSIFICATIONGROUP</name> + <title>Group</title> <contentType>TEXT</contentType> <groupable v="true" /> <mandatoryProcess>%aditoprj%/entity/ClassificationAdmin_entity/entityfields/classificationgroup/mandatoryProcess.js</mandatoryProcess> diff --git a/entity/Employee_entity/Employee_entity.aod b/entity/Employee_entity/Employee_entity.aod index d749296985a4dd13f783ab245322be2f4ad0d0b4..f2886451072955e29b55f5fad1fc2ff36bc23909 100644 --- a/entity/Employee_entity/Employee_entity.aod +++ b/entity/Employee_entity/Employee_entity.aod @@ -383,6 +383,9 @@ <isFilterable v="true" /> <isLookupFilter v="true" /> </jDitoRecordFieldMapping> + <jDitoRecordFieldMapping> + <name>PASSWORD.value</name> + </jDitoRecordFieldMapping> <jDitoRecordFieldMapping> <name>CONFIRM_PASSWORD.value</name> </jDitoRecordFieldMapping> @@ -395,12 +398,6 @@ <name>SHORT_UID.value</name> </jDitoRecordFieldMapping> </recordFieldMappings> - <filterExtensions> - <filterExtension> - <name>filterExtension</name> - <contentType>TEXT</contentType> - </filterExtension> - </filterExtensions> </jDitoRecordContainer> </recordContainers> </entity> diff --git a/entity/Employee_entity/recordcontainers/jdito/contentProcess.js b/entity/Employee_entity/recordcontainers/jdito/contentProcess.js index 025da7c21de8740086787505ec89769ff6123825..6b41c5dc3fba505e3f7b8bcc11293fced7e506a6 100644 --- a/entity/Employee_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/Employee_entity/recordcontainers/jdito/contentProcess.js @@ -35,16 +35,17 @@ users = users.map(function (user) user[tools.DESCRIPTION], user[tools.PARAMS][tools.CONTACTID], //8 user[tools.PARAMS].department, - null, - "", - fetchRoles ? tools.getRoles(user[tools.TITLE]) : [] //for filtering + "", //password + "", //confirm_password + fetchRoles ? tools.getRoles(user[tools.TITLE]) : [], //for filtering + EmployeeUtils.sliceUserId(user[tools.NAME]) ]; }); var filter = vars.get("$local.filter"); //TODO: this is a workaround that filters the records manually, it should be possible to filter the users with a tools.* method -var filterFields = ["UID", "TITLE", "ISACTIVE", "FIRSTNAME", "LASTNAME", "EMAIL_ADDRESS", "", "DESCRIPTION", "CONTACT_ID", "", "DEPARTMENT", "", "ROLE_FILTER"]; +var filterFields = ["UID", "TITLE", "ISACTIVE", "FIRSTNAME", "LASTNAME", "EMAIL_ADDRESS", "", "DESCRIPTION", "CONTACT_ID", "DEPARTMENT", "", "", "ROLE_FILTER"]; var filterFns = { "ROLE_FILTER" : function (pRecordVal, pFilterVal, pOperator) { @@ -67,11 +68,7 @@ var filterFns = { }; users = JditoFilterUtils.filterRecords(filterFields, users, filter.filter, filterFns); -for (let i = 0, l = users.length; i < l; i++) -{ - users[i][11] = ""; - users[i][12] = EmployeeUtils.sliceUserId(users[i][0]); -} +users.forEach(function (user) {user[12] = "";}); //clean up the ROLE_FILTER field, we don't need it after filtering var order = vars.get("$local.order"); var columnOrder = { diff --git a/entity/Employee_entity/recordcontainers/jdito/onInsert.js b/entity/Employee_entity/recordcontainers/jdito/onInsert.js index 8902b43befdc346b3e1e5d8595b3861c3bd82147..4b4b5af803c227f575a78738143f63d4076e28d2 100644 --- a/entity/Employee_entity/recordcontainers/jdito/onInsert.js +++ b/entity/Employee_entity/recordcontainers/jdito/onInsert.js @@ -3,22 +3,24 @@ import("system.vars"); import("system.tools"); import("Employee_lib"); +var rowdata = vars.get("$local.rowdata"); + var user = {}; var params = []; //this has to be an array -params[tools.FIRSTNAME] = vars.get("$field.FIRSTNAME"); -params[tools.LASTNAME] = vars.get("$field.LASTNAME"); -params[tools.EMAIL] = vars.get("$field.EMAIL_ADDRESS"); -params[tools.CALENDARID] = vars.get("$field.EMAIL_ADDRESS"); -params[tools.CONTACTID] = vars.get("$field.CONTACT_ID"); -params[tools.DESCRIPTION] = vars.get("$field.DESCRIPTION"); -params[tools.ISACTIVE] = vars.get("$field.ISACTIVE"); -params.department = vars.get("$field.DEPARTMENT"); +params[tools.EMAIL] = rowdata["EMAIL_ADDRESS.value"]; +params[tools.CALENDARID] = rowdata["EMAIL_ADDRESS.value"]; +params[tools.DESCRIPTION] = rowdata["DESCRIPTION.value"]; +params[tools.CONTACTID] = rowdata["CONTACT_ID.value"]; +params[tools.FIRSTNAME] = rowdata["FIRSTNAME.value"]; +params[tools.LASTNAME] = rowdata["LASTNAME.value"]; +params[tools.ISACTIVE] = rowdata["ISACTIVE.value"]; +params.department = rowdata["DEPARTMENT.value"]; -user[tools.TITLE] = vars.get("$field.TITLE"); +user[tools.TITLE] = rowdata["TITLE.value"]; user[tools.PARAMS] = params; -if (vars.get("$field.PASSWORD") && vars.get("$field.PASSWORD") == vars.get("$field.CONFIRM_PASSWORD")) +if (rowdata["PASSWORD.value"] && rowdata["PASSWORD.value"] == rowdata["CONFIRM_PASSWORD.value"]) { - user[tools.PASSWORD] = vars.getString("$field.PASSWORD"); + user[tools.PASSWORD] = rowdata["PASSWORD.value"]; } -tools.insertUser(user, vars.get("$field.UID")); \ No newline at end of file +tools.insertUser(user, rowdata["UID.value"]); \ No newline at end of file diff --git a/entity/Order_entity/Order_entity.aod b/entity/Order_entity/Order_entity.aod index 6c5316dbfc6dfb7f6003c07199f9ca77b60be793..bfbbbc2ee17ab039a9cc90350dc19a069c6320bb 100644 --- a/entity/Order_entity/Order_entity.aod +++ b/entity/Order_entity/Order_entity.aod @@ -1007,12 +1007,6 @@ <name>HEADER.value</name> <recordfield>SALESORDER.HEADER</recordfield> </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>LANGUAGE.value</name> - <recordfield>SALESORDER.ISOLANGUAGE</recordfield> - <isFilterable v="true" /> - <isLookupFilter v="true" /> - </dbRecordFieldMapping> <dbRecordFieldMapping> <name>NET.value</name> <recordfield>SALESORDER.NET</recordfield> @@ -1163,6 +1157,12 @@ <dbRecordFieldMapping> <name>ISOLANGUAGE.value</name> <recordfield>SALESORDER.ISOLANGUAGE</recordfield> + <isFilterable v="true" /> + <isLookupFilter v="false" /> + </dbRecordFieldMapping> + <dbRecordFieldMapping> + <name>ISOLANGUAGE.displayValue</name> + <expression>%aditoprj%/entity/Order_entity/recordcontainers/db/recordfieldmappings/isolanguage.displayvalue/expression.js</expression> </dbRecordFieldMapping> </recordFieldMappings> </dbRecordContainer> diff --git a/entity/Orderitem_entity/grantUpdateProcess.js b/entity/Orderitem_entity/grantUpdateProcess.js index 966985d262774df03719e82cf98d36ca1c520c4b..ef6350e40d2da3038555dbcc8e6bb2c71838c215 100644 --- a/entity/Orderitem_entity/grantUpdateProcess.js +++ b/entity/Orderitem_entity/grantUpdateProcess.js @@ -6,7 +6,7 @@ import("Order_lib"); var itemcount = newSelect("count(*)") .from("SALESORDERITEM") - .whereIfSet("SALESORDERITEM.SALESORDER_ID", "$field.SALESORDERID") + .whereIfSet("SALESORDERITEM.SALESORDER_ID", "$field.SALESORDER_ID") .cell(true, "0"); if (vars.get("$field.OrderStatus") == undefined){ diff --git a/entity/WorkflowInstance_entity/recordcontainers/jdito/contentProcess.js b/entity/WorkflowInstance_entity/recordcontainers/jdito/contentProcess.js index c4b20566c1ee83b1e7cf844f8095cdbbdcd048ca..44de4cc658e251d4b9a7324d4c6967f2a0964009 100644 --- a/entity/WorkflowInstance_entity/recordcontainers/jdito/contentProcess.js +++ b/entity/WorkflowInstance_entity/recordcontainers/jdito/contentProcess.js @@ -36,6 +36,9 @@ else wfInstances = _getInstances(workflowDefId, workflowDefKey); } +if (!wfInstances) + wfInstances = []; + wfInstances = wfInstances.map(function (instance) { return [ diff --git a/neonView/OrderPreview_view/OrderPreview_view.aod b/neonView/OrderPreview_view/OrderPreview_view.aod index 1d208446c7efd329a562e157b4c102310c0efbc3..f778b8a8339ca412ddcaebba6909eb6a9ed06a85 100644 --- a/neonView/OrderPreview_view/OrderPreview_view.aod +++ b/neonView/OrderPreview_view/OrderPreview_view.aod @@ -37,8 +37,8 @@ <entityField>ORDERTYPE</entityField> </entityFieldLink> <entityFieldLink> - <name>49e446b5-015e-45ad-9417-c5c50f9756f1</name> - <entityField>LANGUAGE</entityField> + <name>1be56d96-0a47-4895-a73f-2e01855da628</name> + <entityField>ISOLANGUAGE</entityField> </entityFieldLink> <entityFieldLink> <name>fecf7457-825d-40a3-b330-bace7ed75ddc</name> diff --git a/process/Campaign_lib/process.js b/process/Campaign_lib/process.js index 29c87429d11a2ce2295bb708d3be158d998e9c50..2e1cc2f66a3cecd8ac41b568d6f579ec382dcd19 100644 --- a/process/Campaign_lib/process.js +++ b/process/Campaign_lib/process.js @@ -364,7 +364,7 @@ CampaignUtils.GetContactIdsNotInCampaignByCondition = function(pCampaignId, pCon if(pCondition != "") query.and(pCondition); - return query.arraColumn(); + return query.arrayColumn(); } CampaignUtils.GetContactIdsInCampaignByCondition = function(pCampaignId, pCondition, pRightJoinContacts) diff --git a/process/JditoFilter_lib/process.js b/process/JditoFilter_lib/process.js index eb2982d105e6ef82a229098ee707bdfbbd1e10ec..e00af4d021cf4622d4df305038725c9af9c1f13f 100644 --- a/process/JditoFilter_lib/process.js +++ b/process/JditoFilter_lib/process.js @@ -1,3 +1,4 @@ +import("system.tools"); import("system.logging"); import("Sql_lib"); @@ -44,6 +45,8 @@ JditoFilterHelper.prototype.checkRecord = function (pRow) if (this.filter.length == 0) return true; + var regexFlags = JditoFilterUtils.isUserIgnoreCase() ? "i" : undefined; + return _testRecord.call(this, this.filter); /** @@ -74,17 +77,17 @@ JditoFilterHelper.prototype.checkRecord = function (pRow) switch (pOperator) { case "CONTAINS": - return (new RegExp(pFilterValue)).test(pRowValue); + return (new RegExp(pFilterValue, regexFlags)).test(pRowValue); case "CONTAINSNOT": - return !(new RegExp(pFilterValue)).test(pRowValue); + return !(new RegExp(pFilterValue, regexFlags)).test(pRowValue); case "STARTSWITH": - return (new RegExp("^" + pFilterValue)).test(pRowValue); + return (new RegExp("^" + pFilterValue, regexFlags)).test(pRowValue); case "ENDSWITH": - return (new RegExp(pFilterValue + "$")).test(pRowValue); + return (new RegExp(pFilterValue + "$", regexFlags)).test(pRowValue); case "EQUAL": - return (new RegExp("^" + pFilterValue + "$")).test(pRowValue); + return (new RegExp("^" + pFilterValue + "$", regexFlags)).test(pRowValue); case "NOT_EQUAL": - return !(new RegExp("^" + pFilterValue + "$")).test(pRowValue); + return !(new RegExp("^" + pFilterValue + "$", regexFlags)).test(pRowValue); case "LESS": return pRowValue < pFilterValue; case "LESS_OR_EQUAL": @@ -192,7 +195,9 @@ JditoFilterUtils.filterRecords = function (pColumns, pRecords, pFilter, pCustomC */ JditoFilterUtils.getSqlCondition = function (pFilter, pTable, pTableAlias, pColumnOrFnMap) { - var condition = newWhere(); + var condition = newWhere(); + + var ignoreCase = JditoFilterUtils.isUserIgnoreCase(); if (!pFilter) return condition; @@ -229,11 +234,15 @@ JditoFilterUtils.getSqlCondition = function (pFilter, pTable, pTableAlias, pColu } else { - condition = _getCondition.call(pFilter, pFilter.value, pFilter.operator); + let isStringType, filterValue; + [condition, filterValue, isStringType] = _getCondition(pFilter.value, pFilter.operator); + if (isStringType && ignoreCase) + condition = condition.replace("#", "UPPER(#)").replace("?", "UPPER(?)"); + if (pOperator == "AND") - this.andIfSet(pFilter.name, pFilter.value, condition); + this.andIfSet(pFilter.name, filterValue, condition); else if (pOperator == "OR") - this.orIfSet(pFilter.name, pFilter.value, condition); + this.orIfSet(pFilter.name, filterValue, condition); } } else if (pFilter.type == "group") @@ -251,43 +260,49 @@ JditoFilterUtils.getSqlCondition = function (pFilter, pTable, pTableAlias, pColu } } - //returns the condition depending on the operator and - //adds wildcards to the value if necessary + //returns [condition, value with wildcards, is a string type] depending on the operator function _getCondition (pValue, pOperator) { switch (pOperator) { case "CONTAINS": - this.value = "%" + pValue + "%"; - return SqlBuilder.LIKE(); + return [SqlBuilder.LIKE(), "%" + pValue + "%", true]; case "CONTAINSNOT": - this.value = "%" + pValue + "%"; - return SqlBuilder.NOT_LIKE(); + return [SqlBuilder.NOT_LIKE(), "%" + pValue + "%", true]; case "STARTSWITH": - this.value = pValue + "%"; - return SqlBuilder.LIKE(); + return [SqlBuilder.LIKE(), pValue + "%", true]; case "ENDSWITH": - this.value = "%" + pValue; - return SqlBuilder.LIKE(); + return [SqlBuilder.LIKE(), "%" + pValue, true]; case "EQUAL": - return SqlBuilder.EQUAL(); + return [SqlBuilder.EQUAL(), pValue, true]; case "NOT_EQUAL": - return SqlBuilder.NOT_EQUAL(); + return [SqlBuilder.NOT_EQUAL(), pValue, true]; case "LESS": - return SqlBuilder.LESS(); + return [SqlBuilder.LESS(), pValue, false]; case "LESS_OR_EQUAL": - return SqlBuilder.LESS_OR_EQUAL(); + return [SqlBuilder.LESS_OR_EQUAL(), pValue, false]; case "GREATER": - return SqlBuilder.GREATER(); + return [SqlBuilder.GREATER(), pValue, false]; case "GREATER_OR_EQUAL": - return SqlBuilder.GREATER_OR_EQUAL(); + return [SqlBuilder.GREATER_OR_EQUAL(), pValue, false]; case "ISNULL": - return "# is null"; + return ["# is null", pValue, false]; case "ISNOTNULL": - return "# is not null"; + return ["# is not null", pValue, false]; } } } + +/** + * @return {boolean} the selectionIgnoreCase property of the current user, defaults to true + */ +JditoFilterUtils.isUserIgnoreCase = function () +{ + var user = tools.getCurrentUser(); + var ignoreCase = user ? user[tools.PARAMS][tools.SELECTION_IGNORECASE] : ""; + return ignoreCase == "" || /true/i.test(ignoreCase); +} + return JditoFilterUtils; //return only functions that should be public })();