Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability for clear search btn to trigger events #598

Closed
wants to merge 20 commits into from

Conversation

kccarter76
Copy link

we use a custom multi-select widget for some of our columns and when the clear search was clicked the control could not reflect the actual value of the underlying select. so we added a trigger for the respective input type to the function below.

Adding the triggers to the clear search class function allows for custom toolbar search widgets to respond to the user when they click the clear search button in the toolbar search.
Added the ability for a custom toolbar search control to respond to the clear search button being clicked by listening for a change or select event.
we have a use case where the search operators are needed to post back to a server with the field name, operator and value of the filter.
updated the code to account for array's
Updated the clearToolbar function to generate a filters argument for the default values.
wanted to implement support for being able to determine which fields changed and if necessary update UI to reflect.
addressed an empty array issue
comma is to common to show in in formatted names. changed separator to a pipe symbol which should not come up in common text.
this was preventing multi select widgets from wrapping the select element correctly.
we had trouble with positioning the column chooser dialog so we fixed the dialog options to make use of the ui.position in jquery ui.
when string data contains characters like '<' or '&' this generates a error in xml parsers.
updated the xml output to check for these two characters and when detected wrap these strings in a CDATA element.
xml elements can not be numbers or empty ie '<0>' or '<>'.

When we where dealing with a <value> element for a select we where seeing <0>No</0><1>Yes</1><>All</>.

this was invalid xml markup so we added logic to detect this and re write the elements as
<No>0</No><Yes>1</Yes><All/>
added the ability for the grid import to restore functions from a export.
some scripts need to be massaged a little before they can be parsed back into a java script method.
@kccarter76
Copy link
Author

I understand that a lot of these features were planned for 4.7 however we needed them now. I am not sure if the changes to the scripts are in line with what you had planned. what is the likely hood to include these updates in 4.7?

minimized the text necessary to parse a function back into a function.
just like the function issue booleans where keeping there string equivalent.

0 = "false" is still true because the string is not null, empty or undefined.
in fire fox and maybe other browsers special characters found in java script functions like '&&','>', and '<'. where not being processed back to there actual and were breaking the import.
updated to use existing code in the jgrid namespace
clean up empty filters
@tonytomov
Copy link
Owner

Hello,

Thank you for posting these commits.
The problem here is that you update the entire jqGrid file. This is not correct.
In order to make the changes you will need to manipulate the separate module files which starts with grid.xxxxx.

I will close this pull request.

@tonytomov tonytomov closed this May 13, 2014
kccarter76 added a commit to kccarter76/jqGrid that referenced this pull request May 13, 2014
reference to pull request reference request tonytomov#598 for original
kccarter76 added a commit to kccarter76/jqGrid that referenced this pull request May 13, 2014
kccarter76 added a commit to kccarter76/jqGrid that referenced this pull request May 13, 2014
see the original request tonytomov#598
kccarter76 added a commit to kccarter76/jqGrid that referenced this pull request May 13, 2014
kccarter76 added a commit to kccarter76/jqGrid that referenced this pull request May 13, 2014
Added the ability for a custom toolbar search control to respond to the clear search button being clicked by listening for a change or select event.

see tonytomov#598 for original
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants