diff --git a/browser/devtools/webide/content/webide.js b/browser/devtools/webide/content/webide.js index a7dab34ac9a..4d212299947 100644 --- a/browser/devtools/webide/content/webide.js +++ b/browser/devtools/webide/content/webide.js @@ -17,7 +17,6 @@ const {AppProjects} = require("devtools/app-manager/app-projects"); const {Connection} = require("devtools/client/connection-manager"); const {AppManager} = require("devtools/app-manager"); const {Promise: promise} = Cu.import("resource://gre/modules/Promise.jsm", {}); -const ProjectEditor = require("projecteditor/projecteditor"); const Strings = Services.strings.createBundle("chrome://webide/content/webide.properties"); @@ -269,65 +268,22 @@ let UI = { } }, - // ProjectEditor & details screen - - getProjectEditor: function() { - if (this.projecteditor) { - return this.projecteditor.loaded; - } - - let projecteditorIframe = document.querySelector("#projecteditor"); - this.projecteditor = ProjectEditor.ProjectEditor(projecteditorIframe); - this.projecteditor.on("onEditorSave", (editor, resource) => { - AppManager.validateProject(AppManager.selectedProject); - }); - return this.projecteditor.loaded; - }, - - isProjectEditorEnabled: function() { - return Services.prefs.getBoolPref("devtools.webide.showProjectEditor"); - }, + // details.xhtml openProject: function() { - let detailsIframe = document.querySelector("#details"); - let projecteditorIframe = document.querySelector("#projecteditor"); - + let details = document.querySelector("#details"); let project = AppManager.selectedProject; - // Nothing to show - if (!project) { - detailsIframe.setAttribute("hidden", "true"); - projecteditorIframe.setAttribute("hidden", "true"); - document.commandDispatcher.focusedElement = document.documentElement; + details.setAttribute("hidden", "true"); return; } - // Show only the details screen - - if (project.type != "packaged" || !this.isProjectEditorEnabled()) { - detailsIframe.removeAttribute("hidden"); - projecteditorIframe.setAttribute("hidden", "true"); - document.commandDispatcher.focusedElement = document.documentElement; - return; - } - - // Show ProjectEditor - - detailsIframe.setAttribute("hidden", "true"); - projecteditorIframe.removeAttribute("hidden"); - - this.getProjectEditor().then((projecteditor) => { - projecteditor.setProjectToAppPath(project.location, { - name: project.name, - iconUrl: project.icon, - projectOverviewURL: "chrome://webide/content/details.xhtml" - }); - }, UI.console.error); - if (project.location) { Services.prefs.setCharPref("devtools.webide.lastprojectlocation", project.location); } + + details.removeAttribute("hidden"); }, /********** COMMANDS **********/ @@ -836,7 +792,6 @@ let Cmds = { }, toggleEditors: function() { - Services.prefs.setBoolPref("devtools.webide.showProjectEditor", !UI.isProjectEditorEnabled()); - UI.openProject(); + // Toggle Itchpad }, } diff --git a/browser/devtools/webide/content/webide.xul b/browser/devtools/webide/content/webide.xul index d6b52931c2c..60f7709bb7b 100644 --- a/browser/devtools/webide/content/webide.xul +++ b/browser/devtools/webide/content/webide.xul @@ -150,7 +150,6 @@