Private
Public Access
1
0

working somewhat on thinkpad - doesn't pass tests

This commit is contained in:
Sander Roosendaal
2019-02-05 22:04:48 +01:00
parent c9695a9f8f
commit b6818ccabc
20 changed files with 9584 additions and 9448 deletions

View File

@@ -1,4 +1 @@
var djdt = {jQuery: jQuery.noConflict(true)};
if (window.define) {
window.define.amd = _djdt_define_amd_backup;
}
var djdt = {jQuery: jQuery.noConflict(true)}; window.define = _djdt_define_backup;

View File

@@ -1,5 +1 @@
var _djdt_define_amd_backup;
if (window.define) {
_djdt_define_amd_backup = window.define.amd;
window.define.amd = undefined;
}
var _djdt_define_backup = window.define; window.define = undefined;

View File

@@ -64,16 +64,16 @@
if (name == 'button') {
var form = self.parents('form:eq(0)');
ajax_data.url = self.attr('formaction');
ajax_data['url'] = self.attr('formaction');
if (form.length) {
ajax_data.data = form.serialize();
ajax_data.type = form.attr('method') || 'POST';
ajax_data['data'] = form.serialize();
ajax_data['type'] = form.attr('method') || 'POST';
}
}
if (name == 'a') {
ajax_data.url = self.attr('href');
ajax_data['url'] = self.attr('href');
}
$.ajax(ajax_data).done(function(data){
@@ -141,13 +141,13 @@
// due to djdt.handleDragged being set to true.
if (djdt.handleDragged || event.pageY != startPageY) {
var top = baseY + event.clientY;
if (top < 0) {
top = 0;
} else if (top + handle.height() > windowHeight) {
top = windowHeight - handle.height();
}
handle.css({top: top});
djdt.handleDragged = true;
}
@@ -213,13 +213,11 @@
$('#djDebugToolbar li').removeClass('djdt-active');
// finally close toolbar
$('#djDebugToolbar').hide('fast');
handle = $('#djDebugToolbarHandle');
handle.show();
$('#djDebugToolbarHandle').show();
// set handle position
var handleTop = djdt.cookie.get('djdttop');
if (handleTop) {
handleTop = Math.min(handleTop, window.innerHeight - handle.outerHeight() - 10);
handle.css({top: handleTop + 'px'});
$('#djDebugToolbarHandle').css({top: handleTop + 'px'});
}
// Unbind keydown
$(document).unbind('keydown.djDebug');

View File

@@ -23,16 +23,16 @@
var $row = $('<tr class="' + ((rowCount % 2) ? 'djDebugOdd' : 'djDebugEven') + '"></tr>');
if (endStat) {
// Render a start through end bar
$row.html('<td>' + stat.replace('Start', '') + '</td>' +
'<td class="timeline"><div class="djDebugTimeline"><div class="djDebugLineChart"><strong>&#160;</strong></div></div></td>' +
$row.html('<td>' + stat.replace('Start', '') + '</td>' +
'<td class="timeline"><div class="djDebugTimeline"><div class="djDebugLineChart"><strong>&nbsp;</strong></div></div></td>' +
'<td>' + (perf.timing[stat] - timingOffset) + ' (+' + (perf.timing[endStat] - perf.timing[stat]) + ')</td>');
$row.find('strong').css({width: getCSSWidth(stat, endStat)});
} else {
// Render a point in time
$row.html('<td>' + stat + '</td>' +
'<td class="timeline"><div class="djDebugTimeline"><div class="djDebugLineChart"><strong>&#160;</strong></div></div></td>' +
'<td>' + (perf.timing[stat] - timingOffset) + '</td>');
$row.find('strong').css({width: 2});
$row.html('<td>' + stat + '</td>' +
'<td class="timeline"><div class="djDebugTimeline"><div class="djDebugLineChart"><strong>&nbsp;</strong></div></div></td>' +
'<td>' + (perf.timing[stat] - timingOffset) + '</td>');
$row.find('strong').css({width: 2});
}
$row.find('djDebugLineChart').css({left: getLeft(stat) + '%'});
$('#djDebugBrowserTimingTableBody').append($row);