-
Notifications
You must be signed in to change notification settings - Fork 505
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
Implemented dropdown actions using bootstrap and tether #2038
Conversation
dev/jquery.jtable.core.js
Outdated
@@ -715,7 +715,10 @@ | |||
return this._getDisplayTextForDateRecordField(field, fieldValue); | |||
} else if (field.type == 'checkbox') { | |||
return this._getCheckBoxTextForFieldByValue(fieldName, fieldValue); | |||
} else if (field.options) { //combobox or radio button list since there are options. | |||
}else if (field.type == 'record-actions') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Core file should not be depend on extensions. Also jquery.jtable.record-actions.js should be completely an isolated extension rather than including to main jtable bundle.
Thanks a lot. |
@ismcagdas |
Hi, The comment above contains an example usage, did you try it ? |
@ismcagdas |
Hi, I don't have time for preparing full example right now but yhe usage is very simple.
Thanks. |
Hello, Thanks. |
This extension depends on bootstrap v.3.x (https://github.com/twbs/bootstrap) and tether (https://github.com/HubSpot/tether). So in order to use it, jquery.jtable.record-actions.js must be added after jtable and both bootstrap and tether libraries must be referenced.
Example definition of an actions field is:
Also, if you want to show/hide a dropdown conditionally, you can define a function named "visible" to your dropdown list item which returns a boolean. If all dropdown list items are invisible, then main dropdown button becomes invisible as well.