gecko/browser/devtools/app-manager/content/projects.xhtml

98 lines
6.0 KiB
HTML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<!DOCTYPE html [
<!ENTITY % appMgrDTD SYSTEM "chrome://browser/locale/devtools/app-manager.dtd" >
%appMgrDTD;
]>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf8"/>
<base href="chrome://browser/content/devtools/app-manager/"></base>
<title>&projects.title;</title>
<link rel="stylesheet" href="chrome://browser/skin/devtools/app-manager/projects.css" type="text/css"/>
<script type="application/javascript;version=1.8" src="utils.js"></script>
<script type="application/javascript;version=1.8" src="projects.js"></script>
<script type="application/javascript;version=1.8" src="template.js"></script>
<script type="application/javascript;version=1.8" src="manifest-editor.js"></script>
</head>
<body onload="UI.onload()">
<aside id="sidebar">
<div id="project-list" template='{"type":"attribute","path":"projects.length","name":"projects-count"}'>
<div template-loop='{"arrayPath":"projects","childSelector":"#project-item-template"}'></div>
<div id="no-project">&projects.noProjects;</div>
</div>
<div id="new-packaged-project" onclick="UI.addPackaged()" title="&projects.addPackagedTooltip;">&projects.addPackaged;</div>
<div id="new-hosted-project">&projects.addHosted;
<form onsubmit="UI.addHosted(); return false;" id="new-hosted-project-wrapper">
<input value="" id="url-input" type="url" required="true" pattern="(https?|chrome)://.+" placeholder="&projects.hostedManifestPlaceHolder2;" size="50" />
<div onclick="UI.addHosted()" id="new-hosted-project-click" title="&projects.addHostedTooltip;"></div>
<input type="submit" hidden="true"></input>
</form>
</div>
</aside>
<section id="lense"></section>
</body>
<template id="project-item-template">
<div class="project-item" template='{"type":"attribute","path":"location","name":"id"}' onclick="UI.selectProject(this.id)">
<div class="project-item-status" template='{"type":"attribute","path":"validationStatus","name":"status"}'></div>
<img class="project-item-icon" template='{"type":"attribute","path":"icon","name":"src"}' />
<div class="project-item-meta">
<div class="button-remove" onclick="UI.remove(this.dataset.location, event)" template='{"type":"attribute","path":"location","name":"data-location"}' title="&projects.removeAppFromList;"></div>
<strong template='{"type":"textContent","path":"manifest.name"}'></strong>
<span class="project-item-type" template='{"type":"textContent","path":"type"}'></span>
<p class="project-item-description" template='{"type":"textContent","path":"manifest.description"}'></p>
<div template='{"type":"attribute","path":"validationStatus","name":"status"}'>
<div class="project-item-errors"><span template='{"type":"textContent","path":"errorsCount"}'></span></div>
<div class="project-item-warnings"><span template='{"type":"textContent","path":"warningsCount"}'></span></div>
</div>
</div>
</div>
</template>
<template id="lense-template">
<div>
<div class="project-details" template='{"type":"attribute","path":"validationStatus","name":"status"}'>
<div class="project-header">
<img class="project-icon" template='{"type":"attribute","path":"icon","name":"src"}'/>
<div class="project-metadata">
<div class="project-title">
<h1 template='{"type":"textContent","path":"manifest.name"}'></h1>
<div class="project-status" template='{"type":"attribute","path":"validationStatus","name":"status"}'>
<p class="project-validation valid">&projects.valid;</p>
<p class="project-validation warning">&projects.warning;</p>
<p class="project-validation error">&projects.error;</p>
</div>
<div class="project-status" template='{"type":"attribute","path":"type","name":"type"}'>
<p class="project-type hosted">&projects.hosted;</p>
<p class="project-type packaged">&projects.packaged;</p>
</div>
</div>
<span template='{"type":"textContent","path":"manifest.developer.name"}'></span>
<p class="project-location" template='{"type":"textContent","path":"location"}' onclick="UI.reveal(this.textContent)"></p>
<p class="project-description" template='{"type":"textContent","path":"manifest.description"}'></p>
</div>
</div>
<div class="project-buttons" template='{"type":"attribute","path":"type","name":"type"}'>
<button class="project-button-update" onclick="UI.update(this, this.dataset.location)" template='{"type":"attribute","path":"location","name":"data-location"}' title="&projects.updateAppTooltip;">&projects.updateApp;</button>
<button class="device-action project-button-debug" onclick="UI.debug(this, this.dataset.location)" template='{"type":"attribute","path":"location","name":"data-location"}' title="&projects.debugAppTooltip;">&projects.debugApp;</button>
</div>
<div class="project-errors" template='{"type":"textContent","path":"errors"}'></div>
<div class="project-warnings" template='{"type":"textContent","path":"warnings"}'></div>
</div>
<div class="manifest-editor">
<div class="manifest-header" template='{"type":"attribute","path":"type","name":"type"}'>
<h2 class="editable" title="&projects.manifestEditorTooltip;">&projects.manifestEditor;</h2>
<h2 class="viewable" title="&projects.manifestViewerTooltip;">&projects.manifestViewer;</h2>
<button class="editable manifest-button-save" onclick="UI.saveManifest(this, this.dataset.location)" template='{"type":"attribute","path":"location","name":"data-location"}' title="&projects.saveManifestTooltip;">&projects.saveManifest;</button>
</div>
</div>
</div>
</template>
</html>