Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Keeps only the main debugbar functionality on iframes" #613

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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