asked
2017-12-13 22:13:52 +0800
Rish 101 ● 2 Hello, folks!
It is possible to add tooltips to the buttons in paging in grid?
In fact, I've managed to add them at the moment the page in loaded. But they disapear after navigating by paging. That is an auto paging with mold "paging" in grid. Should I place <paging> in zul and rewrite paging work to add tooltips on onPaging event?
I also don't want to show paging when elements fit in one page.
public void afterCompose(@ContextParam(ContextType.VIEW) Component view) {
// ...
tunePagingTooltips()
}
def tunePagingTooltips() {
def script = "setTimeout(function(){\$(\".z-paging-prev\").attr(\"title\",\"Previous page\");\n" +
" \$(\".z-paging-next\").attr(\"title\",\"Next page\");\n" +
" \$(\".z-paging-first\").attr(\"title\",\"First page\");\n" +
" \$(\".z-paging-last\").attr(\"title\",\"Last page\");\n" +
" msgzk.GOTO_ERROR_FIELD=\"Close\" \n" +
" \$(\".z-paging-inp\").attr(\"title\",\"Enter page number\");}, 100);"
Clients.evalJavaScript(script)
}
Thanks in advance.