|
@@ -128,20 +128,20 @@ print ' | <a href="?action=downloadcsv">'.$langs->trans('DownloadLogCSV').'</a>'
|
|
|
print ' </div>';
|
|
|
|
|
|
|
|
|
+print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
|
|
print '<table class="noborder" width="100%">';
|
|
|
-print '<tr class="liste_titre">';
|
|
|
-
|
|
|
-print '<td class="minwidth50">'.$langs->trans('#').'</td>';
|
|
|
-print '<td class="center">'.$langs->trans('Date').'</td>';
|
|
|
-print '<td>'.$langs->trans('Author').'</td>';
|
|
|
-print '<td>'.$langs->trans('Action').'</td>';
|
|
|
-print '<td>'.$langs->trans('Ref').'</td>';
|
|
|
-print '<td>'.$langs->trans('Element').'</td>';
|
|
|
-print '<td>'.$langs->trans('Amount').'</td>';
|
|
|
-print '<td class="center">'.$langs->trans('DataOfArchivedEvent').'</td>';
|
|
|
-print '<td>'.$langs->trans('Fingerprint').'</td>';
|
|
|
-print '<td><span id="blockchainstatus"></span></td>';
|
|
|
|
|
|
+print '<tr class="liste_titre">';
|
|
|
+print getTitleFieldOfList($langs->trans('#'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'minwidth50 ')."\n";
|
|
|
+print getTitleFieldOfList($langs->trans('Date'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n";
|
|
|
+print getTitleFieldOfList($langs->trans('Author'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n";
|
|
|
+print getTitleFieldOfList($langs->trans('Action'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n";
|
|
|
+print getTitleFieldOfList($langs->trans('Ref'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n";
|
|
|
+print getTitleFieldOfList($langs->trans('Element'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n";
|
|
|
+print getTitleFieldOfList($langs->trans('Amount'), 0, $_SERVER["PHP_SELF"],'','','','align="right"',$sortfield,$sortorder,'')."\n";
|
|
|
+print getTitleFieldOfList($langs->trans('DataOfArchivedEvent'), 0, $_SERVER["PHP_SELF"],'','','','align="center"',$sortfield,$sortorder,'')."\n";
|
|
|
+print getTitleFieldOfList($langs->trans('Fingerprint'), 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n";
|
|
|
+print getTitleFieldOfList('<span id="blockchainstatus"></span>', 0, $_SERVER["PHP_SELF"],'','','','',$sortfield,$sortorder,'')."\n";
|
|
|
print '</tr>';
|
|
|
|
|
|
foreach($blocks as &$block) {
|
|
@@ -159,7 +159,7 @@ foreach($blocks as &$block) {
|
|
|
print '<td>'.$block->ref_object.'</td>';
|
|
|
print '<td>'.$object_link.'</td>';
|
|
|
print '<td align="right">'.price($block->amounts).'</td>';
|
|
|
- print '<td align="center"><a href="#" blockid="'.$block->id.'" rel="show-info">'.img_info($langs->trans('ShowDetails')).'</a></td>';
|
|
|
+ print '<td align="center"><a href="#" data-blockid="'.$block->id.'" rel="show-info">'.img_info($langs->trans('ShowDetails')).'</a></td>';
|
|
|
|
|
|
print '<td>';
|
|
|
print $form->textwithpicto(dol_trunc($block->signature, '12'), $block->signature);
|
|
@@ -179,53 +179,49 @@ foreach($blocks as &$block) {
|
|
|
}
|
|
|
|
|
|
print '</table>';
|
|
|
+print '</div>';
|
|
|
|
|
|
+print '<script type="text/javascript">
|
|
|
|
|
|
+jQuery(document).ready(function () {
|
|
|
+ jQuery("#dialogforpopup").dialog(
|
|
|
+ { closeOnEscape: true, classes: { "ui-dialog": "highlight" },
|
|
|
+ maxHeight: window.innerHeight-60, height: window.innerHeight-60, width: '.($conf->browser->layout == 'phone' ? 400 : 700).',
|
|
|
+ modal: true,
|
|
|
+ autoOpen: false }).css("z-index: 5000");
|
|
|
|
|
|
-?>
|
|
|
-<script type="text/javascript">
|
|
|
-$('a[rel=show-info]').click(function() {
|
|
|
+ $("a[rel=show-info]").click(function() {
|
|
|
|
|
|
- $pop = $('<div id="pop-info"><table width="100%" class="border"><thead><th width="25%"><?php echo $langs->trans('Field') ?></th><th><?php echo $langs->trans('Value') ?></th></thead><tbody></tbody></table></div>');
|
|
|
+ console.log("We click on tooltip");
|
|
|
|
|
|
- $pop.dialog({
|
|
|
- title:"<?php echo $langs->transnoentities('BlockedlogInfoDialog'); ?>"
|
|
|
- ,modal:true
|
|
|
- ,width:'80%'
|
|
|
- });
|
|
|
-
|
|
|
- var fk_block = $(this).attr("blockid");
|
|
|
+ jQuery("#dialogforpopup").html(\'<div id="pop-info"><table width="100%" height="80%" class="border"><thead><th width="50%">'.$langs->trans('Field').'</th><th>'.$langs->trans('Value').'</th></thead><tbody></tbody></table></div>\');
|
|
|
|
|
|
- $.ajax({
|
|
|
- url:"../ajax/block-info.php?id="+fk_block
|
|
|
- ,dataType:'json'
|
|
|
- }).done(function(data) {
|
|
|
+ var fk_block = $(this).attr("data-blockid");
|
|
|
|
|
|
- drawData(data,'');
|
|
|
+ $.ajax({
|
|
|
+ url:"../ajax/block-info.php?id="+fk_block
|
|
|
+ ,dataType:"json"
|
|
|
+ }).done(function(data) {
|
|
|
+ drawData(data,"");
|
|
|
+ });
|
|
|
|
|
|
+ jQuery("#dialogforpopup").dialog("open");
|
|
|
});
|
|
|
|
|
|
-});
|
|
|
-
|
|
|
-function drawData(data, prefix) {
|
|
|
|
|
|
- for(x in data) {
|
|
|
+ function drawData(data, prefix) {
|
|
|
+ for(x in data) {
|
|
|
+ value = data[x];
|
|
|
|
|
|
- value = data[x];
|
|
|
-
|
|
|
- $('#pop-info table tbody').append('<tr><td>'+prefix+x+'</td><td>'+value+'</td></tr>');
|
|
|
-
|
|
|
- if( (typeof value === "object") && (value !== null) ) {
|
|
|
- drawData(value, prefix+x+' >> ');
|
|
|
+ $("#pop-info table tbody").append("<tr><td>"+prefix+x+"</td><td class=\"wordwrap\">"+value+"</td></tr>");
|
|
|
+ if( (typeof value === "object") && (value !== null) ) {
|
|
|
+ drawData(value, prefix+x+" >> ");
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|
|
|
-}
|
|
|
-
|
|
|
-</script>
|
|
|
-
|
|
|
-<?php
|
|
|
+})
|
|
|
+</script>'."\n";
|
|
|
|
|
|
|
|
|
if(!empty($conf->global->BLOCKEDLOG_USE_REMOTE_AUTHORITY) && !empty($conf->global->BLOCKEDLOG_AUTHORITY_URL)) {
|