141 lines
7.1 KiB
HTML
141 lines
7.1 KiB
HTML
|
<?xml version="1.0"?>
|
||
|
|
||
|
<!DOCTYPE window>
|
||
|
|
||
|
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||
|
<?xml-stylesheet href="chrome://userchromejs/content/styloaix/edit.css" type="text/css"?>
|
||
|
<?xml-stylesheet href="chrome://devtools/content/shared/toolbarbutton.css" type="text/css"?>
|
||
|
|
||
|
<window
|
||
|
class="theme-body"
|
||
|
id="styloaix-edit"
|
||
|
title="StyloaiX Editor"
|
||
|
persist="width height screenX screenY sizemode"
|
||
|
height="350"
|
||
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||
|
xmlns:html="http://www.w3.org/1999/xhtml">
|
||
|
|
||
|
<html:link rel="icon" href="chrome://userchromejs/content/styloaix/16.png"/>
|
||
|
<html:link rel="localization" href="toolkit/global/textActions.ftl"/>
|
||
|
<html:link rel="localization" href="devtools/client/styleeditor.ftl"/>
|
||
|
|
||
|
<script src="chrome://userchromejs/content/styloaix/edit.js"/>
|
||
|
<script src="chrome://devtools/content/shared/theme-switching.js"/>
|
||
|
<script src="chrome://global/content/globalOverlay.js"/>
|
||
|
<script src="chrome://global/content/editMenuOverlay.js"/>
|
||
|
<script>
|
||
|
"use strict";
|
||
|
/* import-globals-from ../../../toolkit/content/globalOverlay.js */
|
||
|
/* import-globals-from ../../../toolkit/content/editMenuOverlay.js */
|
||
|
/* exported goUpdateSourceEditorMenuItems */
|
||
|
function goUpdateSourceEditorMenuItems() {
|
||
|
goUpdateGlobalEditMenuItems();
|
||
|
|
||
|
['cmd_undo', 'cmd_redo', 'cmd_cut', 'cmd_paste',
|
||
|
'cmd_delete', 'cmd_find', 'cmd_findAgain'].forEach(goUpdateCommand);
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<popupset id="style-editor-popups">
|
||
|
<menupopup id="sourceEditorContextMenu"
|
||
|
incontentshell="false"
|
||
|
onpopupshowing="goUpdateSourceEditorMenuItems()">
|
||
|
<menuitem id="cMenu_undo"
|
||
|
data-l10n-id="text-action-undo" command="cmd_undo"/>
|
||
|
<menuseparator/>
|
||
|
<menuitem id="cMenu_cut"
|
||
|
data-l10n-id="text-action-cut" command="cmd_cut"/>
|
||
|
<menuitem id="cMenu_copy"
|
||
|
data-l10n-id="text-action-copy" command="cmd_copy"/>
|
||
|
<menuitem id="cMenu_paste"
|
||
|
data-l10n-id="text-action-paste" command="cmd_paste"/>
|
||
|
<menuitem id="cMenu_delete"
|
||
|
data-l10n-id="text-action-delete" command="cmd_delete"/>
|
||
|
<menuseparator/>
|
||
|
<menuitem id="cMenu_selectAll"
|
||
|
data-l10n-id="text-action-select-all" command="cmd_selectAll"/>
|
||
|
<menuseparator/>
|
||
|
<menuitem id="se-menu-find" data-l10n-id="styleeditor-find"
|
||
|
command="cmd_find"/>
|
||
|
<menuitem id="cMenu_findAgain" data-l10n-id="styleeditor-find-again"
|
||
|
command="cmd_findAgain"/>
|
||
|
<menuseparator/>
|
||
|
<menuitem id="se-menu-gotoLine"
|
||
|
data-l10n-id="styleeditor-go-to-line"
|
||
|
command="cmd_gotoLine"/>
|
||
|
</menupopup>
|
||
|
<menupopup id="sidebar-context" incontentshell="false">
|
||
|
<menuitem id="context-openlinknewtab"
|
||
|
data-l10n-id="styleeditor-open-link-new-tab"/>
|
||
|
<menuitem id="context-copyurl"
|
||
|
data-l10n-id="styleeditor-copy-url"/>
|
||
|
</menupopup>
|
||
|
</popupset>
|
||
|
|
||
|
<commandset id="sourceEditorCommands">
|
||
|
<command id="cmd_gotoLine" oncommand="goDoCommand('cmd_gotoLine')"/>
|
||
|
<command id="cmd_find" oncommand="goDoCommand('cmd_find')"/>
|
||
|
<command id="cmd_findAgain" oncommand="goDoCommand('cmd_findAgain')"/>
|
||
|
</commandset>
|
||
|
|
||
|
<keyset id="sourceEditorKeys"/>
|
||
|
|
||
|
<keyset>
|
||
|
<key id="find-key" modifiers="control" key="F" oncommand="sourceEditor.codeMirror.execCommand('find')"/>
|
||
|
<key id="save-key" modifiers="control" key="S" oncommand="save()"/>
|
||
|
<key id="close-key" modifiers="control" key="W" oncommand="window.close()"/>
|
||
|
</keyset>
|
||
|
|
||
|
<vbox id="main-area" flex="1" class="theme-toolbar">
|
||
|
<hbox id="editor-tools">
|
||
|
<button class="devtools-toolbarbutton" id="save-button" label="Save" accesskey="S" oncommand="save()" disabled="true"/>
|
||
|
<button class="devtools-toolbarbutton" id="preview-button" label="Preview" accesskey="P" oncommand="preview()" disabled="true"/>
|
||
|
<button class="devtools-toolbarbutton" id="check-for-errors-button" label="Check for Errors" accesskey="C" oncommand="checkForErrors()"/>
|
||
|
|
||
|
<vbox class="devtools-separator"></vbox>
|
||
|
|
||
|
<button class="devtools-toolbarbutton" label="Insert" accesskey="I" type="menu">
|
||
|
<menupopup>
|
||
|
<menuitem label="Firefox chrome URL" accesskey="F" oncommand="insertCodeAtStart('@-moz-document url(\u0022' + _uc.BROWSERCHROME + '\u0022) {\n\n\n}')"/>
|
||
|
<menuitem label="Current Tab URL" accesskey="T" oncommand="insertCodeAtStart('@-moz-document url(\u0022' + Services.wm.getMostRecentBrowserWindow().gBrowser.currentURI.specIgnoringRef + '\u0022) {\n\n\n}')"/>
|
||
|
<menuitem label="Current Tab domain" accesskey="D" oncommand="let uri = Services.wm.getMostRecentBrowserWindow().gBrowser.currentURI; let host = uri.asciiHost; insertCodeAtStart('@-moz-document ' + (host ? 'domain' : 'url') + '(\u0022' + (host || uri.currentURI.specIgnoringRef) + '\u0022) {\n\n\n}')"/>
|
||
|
<menuitem label="HTML namespace as default" accesskey="H" oncommand="insertCodeAtStart('@namespace url(\u0022http://www.w3.org/1999/xhtml\u0022);')"/>
|
||
|
<menuitem label="XUL namespace as default" accesskey="X" oncommand="insertCodeAtStart('@namespace url(\u0022http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\u0022);');"/>
|
||
|
<menuitem label="Chrome folder path" accesskey="C" oncommand="insertCodeAtCaret('resource://userchromejs/')"/>
|
||
|
<menuitem label="Data URI…" accesskey="D" oncommand="insertDataURI()"/>
|
||
|
</menupopup>
|
||
|
</button>
|
||
|
<checkbox id="wrap-lines" label="Wrap lines" accesskey="W" oncommand="changeWordWrap(this.checked, event.shiftKey)" tooltiptext="Press holding Shift to save setting" />
|
||
|
<checkbox id="instant-preview" label="Instant Preview" accesskey="R" oncommand="instantPreview(this.checked, event.shiftKey)" tooltiptext="Press holding Shift to save setting" />
|
||
|
<checkbox id="instant-check" label="Instant Check for Errors" accesskey="T" oncommand="instantCheck(this.checked, event.shiftKey)" tooltiptext="Press holding Shift to save setting" />
|
||
|
<spacer flex="1"/>
|
||
|
<label>Origin:</label>
|
||
|
<menulist id="origin" oncommand="val = Number(this.value); if (origin != val) { lastOrigin = origin; origin = val; changed();}">
|
||
|
<menupopup>
|
||
|
<menuitem label="AGENT_SHEET" value="0"/>
|
||
|
<menuitem label="USER_SHEET" value="1"/>
|
||
|
<menuitem label="AUTHOR_SHEET" value="2" selected="true"/>
|
||
|
</menupopup>
|
||
|
</menulist>
|
||
|
</hbox>
|
||
|
<separator orient="horizontal" class="devtools-horizontal-splitter"/>
|
||
|
<hbox align="center" style="margin-bottom: 4px;">
|
||
|
<hbox style="margin-bottom: 2px;">
|
||
|
<label control="name" accesskey="N">Name:</label>
|
||
|
</hbox>
|
||
|
<hbox flex="1">
|
||
|
<html:input class="devtools-textinput" id="name"/>
|
||
|
</hbox>
|
||
|
</hbox>
|
||
|
<separator orient="horizontal" class="devtools-horizontal-splitter"/>
|
||
|
<deck id="editor" flex="1">
|
||
|
<hbox flex="1" style="display: flex; margin: 1px 4px;">
|
||
|
<html:textarea id="internal-code" style="width: 100%;box-sizing: border-box; resize: none;"/>
|
||
|
</hbox>
|
||
|
<hbox id="sourceeditor" flex="1"/>
|
||
|
</deck>
|
||
|
<vbox class="theme-toolbar" id="errors" style="display:none;"/>
|
||
|
</vbox>
|
||
|
|
||
|
</window>
|