summaryrefslogtreecommitdiffstats
path: root/browser/components/places/content/places.xhtml
blob: 0d5889651ee1f07218be19530754dacaf1311174 (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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<?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/.

<?xml-stylesheet href="chrome://browser/content/places/places.css"?>
<?xml-stylesheet href="chrome://browser/content/usercontext/usercontext.css"?>

<?xml-stylesheet href="chrome://global/skin/global.css"?>
<?xml-stylesheet href="chrome://browser/skin/places/tree-icons.css"?>
<?xml-stylesheet href="chrome://browser/skin/places/editBookmark.css"?>
<?xml-stylesheet href="chrome://browser/skin/places/organizer-shared.css"?>
<?xml-stylesheet href="chrome://browser/skin/places/organizer.css"?>

<?xml-stylesheet href="chrome://browser/content/downloads/downloads.css"?>
<?xml-stylesheet href="chrome://browser/skin/downloads/allDownloadsView.css"?>

<!DOCTYPE window>

<window id="places"
        data-l10n-id="places-library3"
        windowtype="Places:Organizer"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        xmlns:html="http://www.w3.org/1999/xhtml"
        onload="PlacesOrganizer.init();"
        onunload="PlacesOrganizer.destroy();"
        width="800" height="500"
        screenX="10" screenY="10"
        toggletoolbar="true"
        persist="width height screenX screenY sizemode">

  <linkset>
    <html:link rel="localization" href="toolkit/global/textActions.ftl"/>
    <html:link rel="localization" href="browser/browserSets.ftl"/>
    <html:link rel="localization" href="browser/places.ftl"/>
    <html:link rel="localization" href="browser/downloads.ftl"/>
    <html:link rel="localization" href="browser/editBookmarkOverlay.ftl"/>
  </linkset>

  <script src="chrome://browser/content/places/places.js"/>
  <script src="chrome://global/content/editMenuOverlay.js"/>
#ifndef XP_MACOSX
  <!-- On Mac, this is included via macWindow.inc.xhtml -> global-scripts.inc -> browser.js -> defineLazyScriptGetter -->
  <script src="chrome://browser/content/places/editBookmark.js"/>
  <!-- On Mac, thes are included via macWindow.inc.xhtml -> global-scripts.inc -->
  <script src="chrome://global/content/globalOverlay.js"/>
  <script src="chrome://browser/content/utilityOverlay.js"/>
#endif

#ifdef XP_MACOSX
#include ../../../base/content/macWindow.inc.xhtml
#else
#include placesCommands.inc.xhtml
#endif

  <!-- This must be included after macWindow.inc.xhtml to override DownloadsView -->
  <script src="chrome://browser/content/downloads/allDownloadsView.js"/>
  <script src="chrome://global/content/contentAreaUtils.js"/>
  <script src="chrome://browser/content/places/places-tree.js"/>

  <commandset id="organizerCommandSet">
    <command id="OrganizerCommand_find:all"
             oncommand="PlacesSearchBox.findAll();"/>
    <command id="OrganizerCommand_export"
             oncommand="PlacesOrganizer.exportBookmarks();"/>
    <command id="OrganizerCommand_import"
             oncommand="PlacesOrganizer.importFromFile();"/>
    <command id="OrganizerCommand_browserImport"
             oncommand="PlacesOrganizer.importFromBrowser();"/>
    <command id="OrganizerCommand_backup"
             oncommand="PlacesOrganizer.backupBookmarks();"/>
    <command id="OrganizerCommand_restoreFromFile"
             oncommand="PlacesOrganizer.onRestoreBookmarksFromFile();"/>
    <command id="OrganizerCommand_search:save"
             oncommand="PlacesOrganizer.saveSearch();"/>
    <command id="OrganizerCommand_search:moreCriteria"
             oncommand="PlacesQueryBuilder.addRow();"/>
    <command id="OrganizerCommand:Back"
             oncommand="PlacesOrganizer.back();"/>
    <command id="OrganizerCommand:Forward"
             oncommand="PlacesOrganizer.forward();"/>
  </commandset>
#include ../../downloads/content/downloadsCommands.inc.xhtml

  <keyset id="placesOrganizerKeyset">
    <!-- Instantiation Keys -->
    <key id="placesKey_close" data-l10n-id="places-cmd-close" modifiers="accel"
         oncommand="window.close();"/>

    <!-- Command Keys -->
    <key id="placesKey_find:all"
         command="OrganizerCommand_find:all"
         data-l10n-id="places-cmd-find-key"
         modifiers="accel"/>

    <!-- Back/Forward Keys Support -->
#ifndef XP_MACOSX
    <key id="placesKey_goBackKb"
         keycode="VK_LEFT"
         command="OrganizerCommand:Back"
         modifiers="alt"/>
    <key id="placesKey_goForwardKb"
         keycode="VK_RIGHT"
         command="OrganizerCommand:Forward"
         modifiers="alt"/>
#else
    <key id="placesKey_goBackKb"
         keycode="VK_LEFT"
         command="OrganizerCommand:Back"
         modifiers="accel"/>
    <key id="placesKey_goForwardKb"
         keycode="VK_RIGHT"
         command="OrganizerCommand:Forward"
         modifiers="accel"/>
#endif
#ifdef XP_UNIX
    <key id="placesKey_goBackKb2"
         data-l10n-id="nav-back-shortcut-alt"
         command="OrganizerCommand:Back"
         modifiers="accel"/>
    <key id="placesKey_goForwardKb2"
         data-l10n-id="nav-fwd-shortcut-alt"
         command="OrganizerCommand:Forward"
         modifiers="accel"/>
#endif
  </keyset>

#include ../../../../toolkit/content/editMenuKeys.inc.xhtml
#ifdef XP_MACOSX
  <keyset id="editMenuKeysExtra">
    <key id="key_delete2" keycode="VK_BACK" command="cmd_delete"/>
  </keyset>
#endif

  <popupset id="placesPopupset">
#include placesContextMenu.inc.xhtml
    <menupopup id="placesColumnsContext"
               onpopupshowing="ViewMenu.fillWithColumns(event, null, null, 'checkbox', false);"
               oncommand="ViewMenu.showHideColumn(event.target); event.stopPropagation();"/>
#include ../../downloads/content/downloadsContextMenu.inc.xhtml
  </popupset>

  <toolbox id="placesToolbox">
    <toolbar class="chromeclass-toolbar" id="placesToolbar" align="center">
      <toolbarbutton id="back-button"
                     command="OrganizerCommand:Back"
                     data-l10n-id="places-back-button"
                     disabled="true"/>

      <toolbarbutton id="forward-button"
                     command="OrganizerCommand:Forward"
                     data-l10n-id="places-forward-button"
                     disabled="true"/>

#ifdef XP_MACOSX
        <toolbarbutton type="menu" class="tabbable" wantdropmarker="true"
              onpopupshowing="document.getElementById('placeContent').focus()"
              data-l10n-id="places-organize-button-mac"
#else
      <menubar id="placesMenu">
        <menu class="menu-iconic" data-l10n-id="places-organize-button"
#endif
              id="organizeButton">
          <menupopup id="organizeButtonPopup">
            <menuitem id="newbookmark"
                      command="placesCmd_new:bookmark"
                      data-l10n-id="places-add-bookmark"/>
            <menuitem id="newfolder"
                      command="placesCmd_new:folder"
                      data-l10n-id="places-add-folder"/>
            <menuitem id="newseparator"
                      command="placesCmd_new:separator"
                      data-l10n-id="places-add-separator"/>

#ifdef XP_MACOSX
            <menuseparator id="orgDeleteSeparator"/>

            <menuitem id="orgDelete"
                      command="cmd_delete"
                      data-l10n-id="text-action-delete"
                      key="key_delete"/>
#else
            <menuseparator id="orgUndoSeparator"/>

            <menuitem id="orgUndo"
                      command="cmd_undo"
                      data-l10n-id="text-action-undo"
                      key="key_undo"/>
            <menuitem id="orgRedo"
                      command="cmd_redo"
                      data-l10n-id="text-action-redo"
                      key="key_redo"/>

            <menuseparator id="orgCutSeparator"/>

            <menuitem id="orgCut"
                      command="cmd_cut"
                      data-l10n-id="text-action-cut"
                      key="key_cut"
                      selection="separator|link|folder|mixed"/>
            <menuitem id="orgCopy"
                      command="cmd_copy"
                      data-l10n-id="text-action-copy"
                      key="key_copy"
                      selection="separator|link|folder|mixed"/>
            <menuitem id="orgPaste"
                      command="cmd_paste"
                      data-l10n-id="text-action-paste"
                      key="key_paste"
                      selection="mutable"/>
            <menuitem id="orgDelete"
                      command="cmd_delete"
                      data-l10n-id="text-action-delete"
                      key="key_delete"/>

            <menuseparator id="selectAllSeparator"/>

            <menuitem id="orgSelectAll"
                      command="cmd_selectAll"
                      data-l10n-id="text-action-select-all"
                      key="key_selectAll"/>

            <menuseparator id="orgCloseSeparator"/>

            <menuitem id="orgClose"
                      key="placesKey_close"
                      data-l10n-id="places-file-close"
                      oncommand="window.close();"/>
#endif
          </menupopup>
#ifdef XP_MACOSX
        </toolbarbutton>
        <toolbarbutton type="menu" class="tabbable" wantdropmarker="true"
        data-l10n-id="places-view-button-mac"
#else
        </menu>
        <menu class="menu-iconic" data-l10n-id="places-view-button"
#endif
              id="viewMenu">
          <menupopup id="viewMenuPopup">

            <menu id="viewColumns"
                  data-l10n-id="places-view-menu-columns">
              <menupopup onpopupshowing="ViewMenu.fillWithColumns(event, null, null, 'checkbox', false);"
                         oncommand="ViewMenu.showHideColumn(event.target); event.stopPropagation();"/>
            </menu>

            <menu id="viewSort" data-l10n-id="places-view-menu-sort">
              <menupopup onpopupshowing="ViewMenu.populateSortMenu(event);"
                         oncommand="ViewMenu.setSortColumn(event.target.column, null);">
                <menuitem id="viewUnsorted" type="radio" name="columns"
                          data-l10n-id="places-view-sort-unsorted"
                          oncommand="ViewMenu.setSortColumn(null, null);"/>
                <menuseparator id="directionSeparator"/>
                <menuitem id="viewSortAscending" type="radio" name="direction"
                          data-l10n-id="places-view-sort-ascending"
                          oncommand="ViewMenu.setSortColumn(null, 'ascending'); event.stopPropagation();"/>
                <menuitem id="viewSortDescending" type="radio" name="direction"
                          data-l10n-id="places-view-sort-descending"
                          oncommand="ViewMenu.setSortColumn(null, 'descending'); event.stopPropagation();"/>
              </menupopup>
            </menu>
          </menupopup>
#ifdef XP_MACOSX
        </toolbarbutton>
        <toolbarbutton type="menu" class="tabbable" wantdropmarker="true"
        data-l10n-id="places-maintenance-button-mac"
#else
        </menu>
        <menu class="menu-iconic" data-l10n-id="places-maintenance-button"
#endif
              id="maintenanceButton">
          <menupopup id="maintenanceButtonPopup">
            <menuitem id="backupBookmarks"
                      command="OrganizerCommand_backup"
                      data-l10n-id="places-cmd-backup"/>
            <menu id="fileRestoreMenu" data-l10n-id="places-cmd-restore">
              <menupopup id="fileRestorePopup" onpopupshowing="PlacesOrganizer.populateRestoreMenu();">
                <menuitem id="restoreFromFile"
                          command="OrganizerCommand_restoreFromFile"
                          data-l10n-id="places-cmd-restore-from-file"/>
              </menupopup>
            </menu>
            <menuseparator/>
            <menuitem id="fileImport"
                      command="OrganizerCommand_import"
                      data-l10n-id="places-import-bookmarks-from-html"/>
            <menuitem id="fileExport"
                      command="OrganizerCommand_export"
                      data-l10n-id="places-export-bookmarks-to-html"/>
            <menuseparator/>
            <menuitem id="browserImport"
                      command="OrganizerCommand_browserImport"
                      data-l10n-id="places-import-other-browser"/>
          </menupopup>
#ifdef XP_MACOSX
        </toolbarbutton>
#else
        </menu>
      </menubar>
#endif

      <toolbarbutton id="clearDownloadsButton"
                          data-l10n-id="downloads-clear-downloads-button"
                          class="tabbable"
                          command="downloadsCmd_clearDownloads"/>

      <spacer id="libraryToolbarSpacer" flex="1"/>

      <search-textbox id="searchFilter"
                      flex="1"
                      aria-controls="placeContent"
                      data-l10n-attrs="placeholder"
                      oncommand="PlacesSearchBox.search(this.value);"
                      collection="bookmarks"/>
    </toolbar>
  </toolbox>

  <hbox flex="1" id="placesView">
    <tree id="placesList"
          class="plain placesTree"
          is="places-tree"
          hidecolumnpicker="true" context="placesContext"
          onselect="PlacesOrganizer.onPlaceSelected(true);"
          onclick="PlacesOrganizer.onPlacesListClick(event);"
          onfocus="PlacesOrganizer.updateDetailsPane(event);"
          seltype="single"
          persist="style">
      <treecols>
        <treecol anonid="title" flex="1" primary="true" hideheader="true"/>
      </treecols>
      <treechildren flex="1"/>
    </tree>
    <splitter collapse="none" persist="state"></splitter>
    <vbox id="contentView">
      <vbox id="placesViewsBox" flex="1">
        <tree id="placeContent"
              class="plain placesTree"
              context="placesContext"
              hidecolumnpicker="true"
              flex="1"
              is="places-tree"
              flatList="true"
              selectfirstnode="true"
              enableColumnDrag="true"
              onfocus="PlacesOrganizer.updateDetailsPane(event)"
              onselect="PlacesOrganizer.updateDetailsPane(event)"
              onkeypress="ContentTree.onKeyPress(event);">
          <treecols id="placeContentColumns" context="placesColumnsContext">
            <!--
              The below code may suggest that 'ordinal' is still a supported XUL
              attribute. It is not. This is a crutch so that we can continue
              persisting the CSS order attribute, which is the appropriate
              replacement for the ordinal attribute but cannot yet
              be easily persisted. The code that synchronizes the attribute with
              the CSS lives in toolkit/content/widget/tree.js and is specific to
              tree elements.
            -->
            <treecol data-l10n-id="places-view-sort-col-name" id="placesContentTitle" anonid="title" style="flex: 5 5 auto" primary="true" ordinal="1"
                      persist="width hidden ordinal sortActive sortDirection"/>
            <splitter class="tree-splitter"/>
            <treecol data-l10n-id="places-view-sort-col-tags" id="placesContentTags" anonid="tags" style="flex: 2 2 auto"
                      persist="width hidden ordinal sortActive sortDirection"/>
            <splitter class="tree-splitter"/>
            <treecol data-l10n-id="places-view-sort-col-url" id="placesContentUrl" anonid="url" style="flex: 5 5 auto"
                      persist="width hidden ordinal sortActive sortDirection"/>
            <splitter class="tree-splitter"/>
            <treecol data-l10n-id="places-view-sort-col-most-recent-visit" id="placesContentDate" anonid="date" style="flex: 1 auto" hidden="true"
                      persist="width hidden ordinal sortActive sortDirection"/>
            <splitter class="tree-splitter"/>
            <treecol data-l10n-id="places-view-sort-col-visit-count" id="placesContentVisitCount" anonid="visitCount" style="flex: 1 auto" hidden="true"
                      persist="width hidden ordinal sortActive sortDirection"/>
            <splitter class="tree-splitter"/>
            <treecol data-l10n-id="places-view-sort-col-date-added" id="placesContentDateAdded" anonid="dateAdded" style="flex: 1 auto" hidden="true"
                      persist="width hidden ordinal sortActive sortDirection"/>
            <splitter class="tree-splitter"/>
            <treecol data-l10n-id="places-view-sort-col-last-modified" id="placesContentLastModified" anonid="lastModified" style="flex: 1 auto" hidden="true"
                      persist="width hidden ordinal sortActive sortDirection"/>
          </treecols>
          <treechildren flex="1" onclick="ContentTree.onClick(event);"/>
        </tree>
        <richlistbox flex="1"
                     hidden="true"
                     seltype="multiple"
                     id="downloadsListBox"
                     class="allDownloadsListBox"
                     context="downloadsContextMenu"/>
      </vbox>
      <vbox id="detailsPane">
        <vbox id="itemsCountBox" align="center" flex="1" hidden="true">
          <spacer style="flex: 3 3"/>
          <label id="itemsCountText"/>
          <spacer flex="1"/>
          <description id="selectItemDescription" data-l10n-id="places-details-pane-select-an-item-description">
          </description>
          <spacer style="flex: 3 3"/>
        </vbox>
        <vbox id="infoBox">
#include editBookmarkPanel.inc.xhtml
        </vbox>
      </vbox>
    </vbox>
  </hbox>
</window>