|
|
@@ -940,16 +940,18 @@ var TableAjax = function() {
|
|
|
|
|
|
// TODO: priv.options.router.init();
|
|
|
// priv.options.router.getLinkOnclickFunction(task, args);
|
|
|
- if (location.hash) {
|
|
|
- priv.options.router()
|
|
|
- } else {
|
|
|
- priv.update(priv.options.router)
|
|
|
- }
|
|
|
-
|
|
|
if (typeof priv.options.router == "function") {
|
|
|
+ if (location.hash) {
|
|
|
+ priv.options.router()
|
|
|
+ } else {
|
|
|
+ priv.update(priv.options.router)
|
|
|
+ }
|
|
|
+
|
|
|
$(window).bind('hashchange', function() {
|
|
|
priv.options.router();
|
|
|
});
|
|
|
+ } else {
|
|
|
+ priv.update()
|
|
|
}
|
|
|
};
|
|
|
|
|
|
@@ -1631,13 +1633,13 @@ var TableAjax = function() {
|
|
|
};
|
|
|
|
|
|
priv.renderCellRowFunctions = function(rowFunctions, rowPK, rowProps) {
|
|
|
- var cellNode = $('<td></td>'),
|
|
|
- keys = Object.keys(rowFunctions),
|
|
|
- total = keys.length,
|
|
|
- moreFuncBtnNode,
|
|
|
- moreFunctions = [],
|
|
|
- idx
|
|
|
- ;
|
|
|
+ var cellNode = $('<td></td>');
|
|
|
+ var keys = Object.keys(rowFunctions);
|
|
|
+ var total = keys.length;
|
|
|
+ var moreFuncBtnNode;
|
|
|
+ var moreFunctions = [];
|
|
|
+ var idx;
|
|
|
+
|
|
|
if (priv.options.debug || DBG) console.log('TableAjax::renderCellRowFunctions: rowFunctions', rowFunctions);
|
|
|
idx = keys.indexOf('hist');
|
|
|
if (idx !== -1) {
|
|
|
@@ -1653,9 +1655,9 @@ var TableAjax = function() {
|
|
|
// if (funObj['ui-function'] && global[funObj['ui-function']]) {
|
|
|
// funcNode.on('click', function (event) { event.preventDefault(); global[funObj['ui-function']](rowPK); });
|
|
|
// }
|
|
|
- var funObj = rowFunctions[key],
|
|
|
- funcNode = p5UI_TableAjax_generateFunctionNode(funObj, rowPK, {ico: true, label: false})
|
|
|
- ;
|
|
|
+ var funObj = rowFunctions[key];
|
|
|
+ var funcNode = p5UI_TableAjax_generateFunctionNode(funObj, rowPK, {ico: true, label: false});
|
|
|
+
|
|
|
funcNode.appendTo(cellNode);
|
|
|
});
|
|
|
moreFuncBtnNode = $('<a href="#" style="margin:0 2px;text-decoration:none" title="Więcej funkcji dla rekordu nr '+rowPK+'" class="glyphicon glyphicon-menu-hamburger"> </a>');
|