summaryrefslogtreecommitdiffstats
path: root/devtools/client/styleeditor/index.xhtml
blob: 9178f7c2f5a932a8c2dcd985c9feeb6ac564ec0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<?xml version="1.0"?>
<!-- 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 window>

<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://devtools/content/shared/widgets/widgets.css" type="text/css"?>
<?xml-stylesheet href="chrome://devtools/content/shared/toolbarbutton.css" type="text/css"?>
<?xml-stylesheet href="chrome://devtools/skin/chart.css" type="text/css"?>
<?xml-stylesheet href="chrome://devtools/skin/widgets.css" type="text/css"?>
<?xml-stylesheet href="chrome://devtools/skin/splitview.css" type="text/css"?>
<?xml-stylesheet href="chrome://devtools/skin/styleeditor.css" type="text/css"?>

<window
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  xmlns:html="http://www.w3.org/1999/xhtml"
  id="style-editor-chrome-window"
>
  <linkset>
    <html:link rel="localization" href="toolkit/global/textActions.ftl" />
    <html:link rel="localization" href="devtools/client/styleeditor.ftl" />
  </linkset>

  <script src="chrome://devtools/content/shared/theme-switching.js" />
  <script src="chrome://global/content/globalOverlay.js" />
  <script src="chrome://browser/content/utilityOverlay.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" />

  <box
    id="style-editor-chrome"
    class="devtools-responsive-container loading theme-body"
    context="sidebar-context"
  >
    <box class="splitview-controller">
      <box class="splitview-main">
        <toolbar class="devtools-toolbar">
          <toolbarbutton
            class="style-editor-newButton devtools-toolbarbutton"
            data-l10n-id="styleeditor-new-button"
          />
          <toolbarbutton
            class="style-editor-importButton devtools-toolbarbutton"
            data-l10n-id="styleeditor-import-button"
          />
          <toolbaritem class="devtools-searchbox" flex="1">
            <html:input
              class="devtools-filterinput"
              data-l10n-id="styleeditor-filter-input"
            />
            <html:button
              class="devtools-searchinput-clear"
              tabindex="-1"
              hidden=""
            ></html:button>
          </toolbaritem>
          <toolbarbutton
            id="style-editor-options"
            class="devtools-toolbarbutton devtools-option-toolbarbutton"
            data-l10n-id="styleeditor-options-button"
          />
        </toolbar>
      </box>
      <box
        id="splitview-resizer-target"
        class="theme-sidebar splitview-nav-container"
        persist="height"
      >
        <html:ol class="splitview-nav" tabindex="0"></html:ol>
        <html:div class="splitview-nav placeholder empty">
          <html:p>
            <html:strong data-l10n-id="styleeditor-no-stylesheet"></html:strong>
          </html:p>
          <html:p data-l10n-id="styleeditor-no-stylesheet-tip">
            <html:a
              class="style-editor-newButton"
              data-l10n-name="append-new-stylesheet"
              href="#"
            />
          </html:p>
        </html:div>
        <html:div class="splitview-nav placeholder all-filtered">
          <html:p data-l10n-id="styleeditor-stylesheet-all-filtered"></html:p>
        </html:div>
      </box>
    </box>
    <splitter
      class="devtools-side-splitter devtools-invisible-splitter"
      resizebefore="sibling"
      resizeafter="none"
    />
    <box class="splitview-side-details devtools-main-content" />

    <html:div id="splitview-templates" hidden="">
      <html:li id="splitview-tpl-summary-stylesheet" tabindex="0">
        <label
          class="stylesheet-toggle"
          tabindex="0"
          data-l10n-id="styleeditor-visibility-toggle"
        ></label>
        <html:hgroup class="stylesheet-info">
          <html:h1
            ><html:a class="stylesheet-name" tabindex="0"
              ><label crop="center" /></html:a
          ></html:h1>
          <html:div class="stylesheet-more">
            <html:h3 class="stylesheet-title"></html:h3>
            <html:h3 class="stylesheet-linked-file"></html:h3>
            <html:h3 class="stylesheet-rule-count"></html:h3>
            <spacer />
            <html:h3
              ><label
                class="stylesheet-saveButton"
                data-l10n-id="styleeditor-save-button"
              ></label
            ></html:h3>
          </html:div>
        </html:hgroup>
      </html:li>

      <box id="splitview-tpl-details-stylesheet" class="splitview-details">
        <hbox class="stylesheet-details-container">
          <box
            class="stylesheet-editor-input textbox"
            data-l10n-id="styleeditor-editor-textbox"
          />
          <splitter
            class="devtools-side-splitter"
            resizebefore="none"
            resizeafter="sibling"
          />
          <vbox class="stylesheet-sidebar theme-sidebar" hidden="true">
            <toolbar
              class="devtools-toolbar"
              data-l10n-id="styleeditor-at-rules"
            >
            </toolbar>
            <vbox class="stylesheet-at-rules-container" flex="1">
              <html:div class="stylesheet-at-rules-list" />
            </vbox>
          </vbox>
        </hbox>
      </box>
    </html:div>
  </box>
</window>