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 exclusive list and select list #13

Merged
merged 1 commit into from Jan 9, 2017
Merged

Conversation

jsmccrumb
Copy link

I implemented a version of select and exclusive lists (based on description in the issues I opened). Works fine on my end but I don't know your code too well and since its not a particularly minor change, it is possible that I broke something in the process.

@@ -153,7 +155,7 @@ $.widget( 'evol.structFilter', {
that._field=that._getFieldById(fieldID);
var fType=that._type=that._field.type;
that._setEditorOperator();
if(fType==fTypes.list || fType==fTypes.bool){
if([fTypes.list, fTypes.bool, fTypes.exList, fTypes.selList].indexOf(fType) > -1){
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively could be (here and 177):

if(fType==fTypes.list || fType==fTypes.bool || fType==fTypes.exList || fType==fTypes.selList){}

though I think array is more succinct and easier to maintain?

@@ -339,6 +341,8 @@ $.widget( 'evol.structFilter', {
h+=EvoUI.inputHidden('operator',evoAPI.sInList);
this._operator=evoAPI.sInList;
break;
case fTypes.exList:
case fTypes.selList:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exclusive list and select list follow the same operator rule as boolean (equal)

@evoluteur
Copy link
Owner

Thanks. I like the feature idea. It not fully working yet. I'm looking at it.

@jsmccrumb
Copy link
Author

Excellent, thanks! If there is anything in particular I can do to help just let me know.

@evoluteur evoluteur merged commit 6c336e0 into evoluteur:master Jan 9, 2017
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