Skip to content

Commit

Permalink
Revert "keeps only the main debugbar functionality on iframes (#606)" (
Browse files Browse the repository at this point in the history
…#613)

This reverts commit b6113ae.
  • Loading branch information
barryvdh authored Mar 11, 2024
1 parent d7b954b commit c7d2cfb
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 55 deletions.
13 changes: 0 additions & 13 deletions demo/iframes/iframe1.php

This file was deleted.

9 changes: 0 additions & 9 deletions demo/iframes/iframe2.php

This file was deleted.

13 changes: 0 additions & 13 deletions demo/iframes/index.php

This file was deleted.

4 changes: 0 additions & 4 deletions demo/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
<li><a href="ajax.php" class="ajax">load ajax content</a></li>
<li><a href="ajax_exception.php" class="ajax">load ajax content with exception</a></li>
</ul>
<h2>IFRAMES</h2>
<ul>
<li><a href="iframes/index.php">load through iframes</a></li>
</ul>
<h2>Stack</h2>
<ul>
<li><a href="stack.php">perform a redirect</a></li>
Expand Down
17 changes: 1 addition & 16 deletions src/DebugBar/Resources/debugbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ if (typeof(PhpDebugBar) == 'undefined') {
this.activePanelName = null;
this.datesetTitleFormater = new DatasetTitleFormater(this);
this.options.bodyMarginBottomHeight = parseInt($('body').css('margin-bottom'));
this.hasParent = window.parent && window.parent.phpdebugbar && window.parent.phpdebugbar != this;
this.registerResizeHandler();
},

Expand All @@ -434,7 +433,7 @@ if (typeof(PhpDebugBar) == 'undefined') {
* @this {DebugBar}
*/
registerResizeHandler: function() {
if (typeof this.resize.bind == 'undefined' || this.hasParent) return;
if (typeof this.resize.bind == 'undefined') return;

var f = this.resize.bind(this);
this.respCSSSize = 0;
Expand Down Expand Up @@ -475,10 +474,6 @@ if (typeof(PhpDebugBar) == 'undefined') {
* @this {DebugBar}
*/
render: function() {
if (this.hasParent) {
this.$el.hide();
}

var self = this;
this.$el.appendTo('body');
this.$dragCapture = $('<div />').addClass(csscls('drag-capture')).appendTo(this.$el);
Expand Down Expand Up @@ -578,7 +573,6 @@ if (typeof(PhpDebugBar) == 'undefined') {
* @this {DebugBar}
*/
restoreState: function() {
if (this.hasParent) return;
// bar height
var height = localStorage.getItem('phpdebugbar-height');
this.setHeight(height || this.$body.height());
Expand Down Expand Up @@ -929,15 +923,6 @@ if (typeof(PhpDebugBar) == 'undefined') {
* @return {String} Dataset's id
*/
addDataSet: function(data, id, suffix, show) {
if (this.hasParent) {
if (!suffix || ('(iframe)').indexOf(suffix) < 0) {
suffix = '(iframe)' + (suffix || '');
}

window.parent.phpdebugbar.addDataSet(data, id, suffix, show);
return;
}

var label = this.datesetTitleFormater.format(id, data, suffix);
id = id || (getObjectSize(this.datasets) + 1);
this.datasets[id] = data;
Expand Down

0 comments on commit c7d2cfb

Please sign in to comment.