mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-24 02:01:30 +02:00
Add nb/suffix
This commit is contained in:
@@ -364,7 +364,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
suffix = '';
|
||||
}
|
||||
|
||||
var nb = getObjectSize(this.debugbar.datasets) + 1;
|
||||
var nb = getObjectSize(this.debugbar.datasets) ;
|
||||
|
||||
if (typeof(data['__meta']) === 'undefined') {
|
||||
return "#" + nb + suffix;
|
||||
@@ -947,7 +947,10 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
return;
|
||||
}
|
||||
|
||||
id = id || (getObjectSize(this.datasets) + 1);
|
||||
var nb = getObjectSize(this.datasets) + 1;
|
||||
id = id || nb;
|
||||
data.__meta['nb'] = nb;
|
||||
data.__meta['suffix'] = suffix;
|
||||
this.datasets[id] = data;
|
||||
|
||||
if (typeof(show) == 'undefined' || show) {
|
||||
|
@@ -715,7 +715,12 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
|
||||
|
||||
this.$table = $('<tbody />');
|
||||
$('<table><thead><tr><th style="width: 175px;">Date</th><th style="width: 80px;">Method</th><th>URL</th><th width="40%">Data</th></tr></thead></table>')
|
||||
$('<table><thead><tr>' +
|
||||
'<th style="width: 20px;"></th>' +
|
||||
'<th style="width: 175px;">Date</th>' +
|
||||
'<th style="width: 80px;">Method</th>' +
|
||||
'<th>URL</th><th width="40%">Data</th>' +
|
||||
'</tr></thead></table>')
|
||||
.append(this.$table)
|
||||
.appendTo(this.$el);
|
||||
|
||||
@@ -778,9 +783,10 @@ if (typeof(PhpDebugBar) == 'undefined') {
|
||||
var tr = $('<tr />')
|
||||
.appendTo(widget.$table)
|
||||
.attr('data-id', meta['id'])
|
||||
.append('<td>#' + meta['nb'] + '</td>')
|
||||
.append('<td>' + meta['datetime'] + '</td>')
|
||||
.append('<td>' + meta['method'] + '</td>')
|
||||
.append($('<td />').append(meta['uri']))
|
||||
.append($('<td />').append(meta['uri'] + (meta['suffix'] ? ' ' + meta['suffix'] : '')))
|
||||
.css('cursor', 'pointer')
|
||||
.on('click', function() {
|
||||
widget.get('debugbar').showDataSet(meta['id']);
|
||||
|
Reference in New Issue
Block a user