Just a short script-fragment. A customer asked for a heading above children tabs. There is not much to do, and nothing complicated. Just add the following code to your hooks/TABLENAME-dv.js
file and change the text between <h1>
and </h1>
.
Table of Contents
Code
// file: hooks/TABLENAME-dv.js $j(".children-tabs").parent().prepend("<h1>Dependent Records</h1>");
Result
Tip: do not insert headline in insert-mode
If you do not want to see it in insert-mode, just check if we are in insert-mode or not.
Using our AppGini Helper Javascript Library there is a useful function isInsert()
for this:
var dv = AppGiniHelper.DV; if (!dv.isInsert()) { $j(".children-tabs").parent().prepend("<h1>Dependent Records</h1>"); }
Note the exclamation mark "!
" right before dv.isInsert()
function call: The exclamation mark means logical not
. If it is more readable and understandable for you, you can write the same code like this instead:
var dv = AppGiniHelper.DV; var insert_mode = dv.isInsert(); if (insert_mode == false) { $j(".children-tabs").parent().prepend("<h1>Dependent Records</h1>"); }
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.