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