Commit 1c01b264 authored by timothy@apple.com's avatar timothy@apple.com

Adds an overlay window that covers the scripts panel and

informs the user that they need to attach the debugger.
Provides an "Attach Debugger" button below the info text.

Reviewed by Dan Bernstein.

* English.lproj/localizedStrings.js: New strings.
* page/inspector/ScriptsPanel.js:
(WebInspector.ScriptsPanel): Create the overlay elements and
append to the main panel element.
* page/inspector/inspector.css: New styles for the over lay elements.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33416 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b706da23
2008-05-13 Timothy Hatcher <timothy@apple.com>
Adds an overlay window that covers the scripts panel and
informs the user that they need to attach the debugger.
Provides an "Attach Debugger" button below the info text.
Reviewed by Dan Bernstein.
* English.lproj/localizedStrings.js: New strings.
* page/inspector/ScriptsPanel.js:
(WebInspector.ScriptsPanel): Create the overlay elements and
append to the main panel element.
* page/inspector/inspector.css: New styles for the over lay elements.
2008-05-13 Timothy Hatcher <timothy@apple.com>
Fixes the assertion and crash that would happen when inspecting a element from a frame.
Bvar localizedStrings = new Object;
......
......@@ -133,6 +133,26 @@ WebInspector.ScriptsPanel = function()
this.sidebarPanes.scopechain.expanded = true;
this.attachOverlayElement = document.createElement("div");
this.attachOverlayElement.id = "scripts-attach-overlay";
var headerElement = document.createElement("h1");
headerElement.textContent = WebInspector.UIString("Debugging scripts requires you to attach the debugger.");
this.attachOverlayElement.appendChild(headerElement);
var infoElement = document.createElement("span");
infoElement.textContent = WebInspector.UIString("Attaching will reload the inspected page.");
this.attachOverlayElement.appendChild(infoElement);
this.attachOverlayElement.appendChild(document.createElement("br"));
this.attachOverlayElement.appendChild(document.createElement("br"));
var attachButton = document.createElement("button");
attachButton.textContent = WebInspector.UIString("Attach Debugger");
attachButton.addEventListener("click", this._toggleDebugging.bind(this), false);
this.attachOverlayElement.appendChild(attachButton);
this.element.appendChild(this.attachOverlayElement);
this.element.appendChild(this.scriptResourceViews);
this.element.appendChild(this.sidebarElement);
this.element.appendChild(this.sidebarResizeElement);
......@@ -550,10 +570,13 @@ WebInspector.ScriptsPanel.prototype = {
this._waitingToPause = false;
this._stepping = false;
if (InspectorController.debuggerAttached())
if (InspectorController.debuggerAttached()) {
this.element.appendChild(this.attachOverlayElement);
InspectorController.stopDebugging();
else
} else {
this.attachOverlayElement.parentNode.removeChild(this.attachOverlayElement);
InspectorController.startDebuggingAndReloadInspectedPage();
}
this.sidebarPanes.callstack.update(null);
this.sidebarPanes.scopechain.update(null);
......
......@@ -1466,6 +1466,29 @@ body.inactive .data-grid th.sort-ascending, body.inactive .data-grid th.sort-des
background-image: url(Images/errorIcon.png);
}
#scripts-attach-overlay {
z-index: 1000;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: white;
color: rgb(96, 96, 96);
padding: 75px 50px;
text-align: center;
font-size: 16px;
}
#scripts-attach-overlay h1 {
font-size: 18px;
}
#scripts-attach-overlay button {
padding-left: 15px;
padding-right: 15px;
}
#scripts-debugging-status-bar-item {
background-image: url(Images/debuggingButtons.png);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment