forked from 0x2620/pandora
now that we have js tracebacks, also open dialog for js errors, fixes #2756
This commit is contained in:
parent
0e4c49729b
commit
d4a7ec0e0c
1 changed files with 27 additions and 29 deletions
|
@ -141,35 +141,33 @@ pandora.ui.errorlogsDialog = function() {
|
||||||
open: function(data) {
|
open: function(data) {
|
||||||
var value = $list.value(Ox.last(data.ids)),
|
var value = $list.value(Ox.last(data.ids)),
|
||||||
$dialog;
|
$dialog;
|
||||||
if (/^Traceback/.test(value.text)) {
|
$dialog = Ox.Dialog({
|
||||||
$dialog = Ox.Dialog({
|
buttons: [
|
||||||
buttons: [
|
Ox.Button({
|
||||||
Ox.Button({
|
id: 'close',
|
||||||
id: 'close',
|
title: Ox._('Close')
|
||||||
title: Ox._('Close')
|
})
|
||||||
})
|
.bindEvent({
|
||||||
.bindEvent({
|
click: function() {
|
||||||
click: function() {
|
$dialog.close();
|
||||||
$dialog.close();
|
}
|
||||||
}
|
})
|
||||||
})
|
],
|
||||||
],
|
closeButton: true,
|
||||||
closeButton: true,
|
content: $('<code>').append(
|
||||||
content: $('<code>').append(
|
$('<pre>')
|
||||||
$('<pre>')
|
.addClass('OxSelectable')
|
||||||
.addClass('OxSelectable')
|
.css({margin: '16px'})
|
||||||
.css({margin: '16px'})
|
.text(value.text)
|
||||||
.text(value.text)
|
),
|
||||||
),
|
height: height - 48,
|
||||||
height: height - 48,
|
keys: {enter: 'close', escape: 'close'},
|
||||||
keys: {enter: 'close', escape: 'close'},
|
maximizeButton: true,
|
||||||
maximizeButton: true,
|
removeOnClose: true,
|
||||||
removeOnClose: true,
|
title: formatURL(value.url, value.line),
|
||||||
title: formatURL(value.url, value.line),
|
width: width - 48
|
||||||
width: width - 48
|
})
|
||||||
})
|
.open();
|
||||||
.open();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue