// file: hooks/patients-tv.js jQuery(function () { // please note the placeholder %ID% var url = "patients_view.php?SelectedID=%ID%"; var tv = AppGiniHelper.TV; tv.addLink(url, "search", "Open"); // tv.addLink(href, icon, text, variation, prompt) });
Tipp
You can also add buttons executing a custom javascript function. See here.
.addLink(href, icon, text, variation, prompt)
Parameters
href
Link address (url)
string, eg.TABLENAME_view.php?SelectedID=%ID%
Accepts placeholder%ID%
which will be replaced by the record's primary key per rowicon
optional, string, e.g. "cog", see also Glyphiconstext
Button Text
optional, e.g. "Edit"variation
optional, e.g. Variation.dangerprompt
optional, string
If defined, there will be a confirmation prompt before
// file: hooks/patients-tv.js jQuery(function () { var tv = AppGiniHelper.TV; // get table name var tablename = tv.getTableName(); // build link url // note the %ID% placeholder var url = tablename + "_view.php?SelectedID=%ID%"; // add the link button // please note the text for the confirmation prompt tv.addLink(url, "search", "Open",Variation.warning, "Really?"); });
See also
Do you like it?
We can only get better if you give us constructive suggestions for improvement. Just voting "No" without giving reasons or suggestions is not helpful and cannot lead to changes.
If you have been searching for a completely different solution than the subject says, this article can not be and will not be helpful for you. In these cases you should consider not to vote.
This is website feedback, only. This voting is not a support form nor ticket system.