Bladeren bron

added RefGraph link in TableAjax

Piotr Labudda 8 jaren geleden
bovenliggende
commit
166e70d6aa
1 gewijzigde bestanden met toevoegingen van 14 en 0 verwijderingen
  1. 14 0
      SE/se-lib/TableAjax.php

+ 14 - 0
SE/se-lib/TableAjax.php

@@ -1269,6 +1269,7 @@ class TableAjax extends ViewAjax {
 					_popoverCell.data('col', 'rowFunctions');
 					_popoverCell.empty();
 					funcListNode = $('<ul class="list-unstyled popoverRowFunctions"></ul>').appendTo(_popoverCell);
+
 					moreFunctions.forEach(function(funcName) {
 						var funcItemNode = $('<li></li>').appendTo(funcListNode),
 								funObj = rowFunctions[funcName],
@@ -1277,6 +1278,19 @@ class TableAjax extends ViewAjax {
 						funcNode.addClass('func_name-' + funcName);
 						funcItemNode.append(funcNode);
 					});
+					{ // TODO: id namesapce is AntAcl [ and has ref fields or back ref ]
+						var funcItemNode = $('<li></li>').appendTo(funcListNode)
+						var funObj = {
+							ico: 'glyphicon glyphicon-random',
+							label: 'przeglądaj powiązania',
+							href: 'index.php?_route=RefGraph&namespace=' + priv.options.namespace + '&primaryKey=' + rowPK,
+							// onclick: function (e) { // TODO: open in
+							// 	console.log('TODO: przeglądaj powiązania')
+							// }
+						}
+						var funcNode = p5UI_TableAjax_generateFunctionNode(funObj, rowPK, { ico: true, label: true })
+						funcItemNode.append(funcNode);
+					}
 
 					_popoverCell.append('<div class="popoverCellContent" style="white-space:normal"></div>');