toolkit/components/passwordmgr/content/passwordManager.xul
author Tim Nguyen <ntim.bugs@gmail.com>
Mon, 13 May 2019 18:12:37 +0000
changeset 532499 5a993bd3862b7a5b40771c25d962ba9c30ce76de
parent 532388 fa3cfee27619ddc9bcbcf70555bda4eb1e815146
permissions -rw-r--r--
Bug 1521280 - Convert search-textbox to a custom element. r=dao,bgrins Differential Revision: https://phabricator.services.mozilla.com/D23045

<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil -*- -->
# 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://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://global/skin/passwordmgr.css" type="text/css"?>

<window id="SignonViewerDialog"
        windowtype="Toolkit:PasswordManager"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        xmlns:html="http://www.w3.org/1999/xhtml"
        onload="Startup();"
        onunload="Shutdown();"
        data-l10n-id="saved-logins"
        style="width: 45em;"
        persist="width height screenX screenY">

  <linkset>
    <html:link rel="localization" href="toolkit/passwordmgr/passwordManagerList.ftl"/>
  </linkset>
#if defined(MOZ_BUILD_APP_IS_BROWSER)
  <script src="chrome://browser/content/utilityOverlay.js"/>
#endif
  <script src="chrome://passwordmgr/content/passwordManager.js"/>

  <keyset>
    <key keycode="VK_ESCAPE" oncommand="escapeKeyHandler();"/>
    <key data-l10n-id="window-close" modifiers="accel" oncommand="escapeKeyHandler();"/>
    <key data-l10n-id="focus-search-shortcut" modifiers="accel" oncommand="FocusFilterBox();"/>
    <key data-l10n-id="focus-search-altshortcut" modifiers="accel" oncommand="FocusFilterBox();"/>
  </keyset>

  <popupset id="signonsTreeContextSet">
    <menupopup id="signonsTreeContextMenu"
               onpopupshowing="UpdateContextMenu()">
      <menuitem id="context-copysiteurl"
                data-l10n-id="copy-site-url-cmd"
                oncommand="CopySiteUrl()"/>
      <menuitem id="context-launchsiteurl"
                data-l10n-id="launch-site-url-cmd"
                oncommand="LaunchSiteUrl()"/>
      <menuseparator/>
      <menuitem id="context-copyusername"
                data-l10n-id="copy-username-cmd"
                oncommand="CopyUsername()"/>
      <menuitem id="context-editusername"
                data-l10n-id="edit-username-cmd"
                oncommand="EditCellInSelectedRow('username')"/>
      <menuseparator/>
      <menuitem id="context-copypassword"
                data-l10n-id="copy-password-cmd"
                oncommand="CopyPassword()"/>
      <menuitem id="context-editpassword"
                data-l10n-id="edit-password-cmd"
                oncommand="EditCellInSelectedRow('password')"/>
    </menupopup>
  </popupset>

  <!-- saved signons -->
  <vbox id="savedsignons" class="contentPane" flex="1">
    <!-- filter -->
    <hbox align="center">
      <textbox id="filter" flex="1" is="search-textbox"
               aria-controls="signonsTree"
               oncommand="FilterPasswords();"
               data-l10n-id="search-filter"/>
    </hbox>

    <label control="signonsTree" id="signonsIntro"/>
    <separator class="thin"/>
    <tree id="signonsTree" flex="1"
          width="750"
          style="height: 20em;"
          onkeypress="HandleSignonKeyPress(event)"
          onselect="SignonSelected();"
          editable="true"
          context="signonsTreeContextMenu">
      <treecols>
        <treecol id="siteCol" data-l10n-id="column-heading-site" flex="40"
                 data-field-name="hostname" persist="width"
                 ignoreincolumnpicker="true"
                 sortDirection="ascending"/>
        <splitter class="tree-splitter"/>
        <treecol id="userCol" data-l10n-id="column-heading-username" flex="25"
                 ignoreincolumnpicker="true"
                 data-field-name="username" persist="width"/>
        <splitter class="tree-splitter"/>
        <treecol id="passwordCol" data-l10n-id="column-heading-password" flex="15"
                 ignoreincolumnpicker="true"
                 data-field-name="password" persist="width"
                 hidden="true"/>
        <splitter class="tree-splitter"/>
        <treecol id="timeCreatedCol" data-l10n-id="column-heading-time-created" flex="10"
                 data-field-name="timeCreated" persist="width hidden"
                 hidden="true"/>
        <splitter class="tree-splitter"/>
        <treecol id="timeLastUsedCol" data-l10n-id="column-heading-time-last-used" flex="20"
                 data-field-name="timeLastUsed" persist="width hidden"
                 hidden="true"/>
        <splitter class="tree-splitter"/>
        <treecol id="timePasswordChangedCol" data-l10n-id="column-heading-time-password-changed" flex="10"
                 data-field-name="timePasswordChanged" persist="width hidden"/>
        <splitter class="tree-splitter"/>
        <treecol id="timesUsedCol" data-l10n-id="column-heading-times-used" flex="1"
                 data-field-name="timesUsed" persist="width hidden"
                 hidden="true"/>
        <splitter class="tree-splitter"/>
      </treecols>
      <treechildren/>
    </tree>
    <separator class="thin"/>
    <checkbox id="passwordAutofillCheckbox" oncommand="watchLoginAutofill();"/>
    <separator class="thin"/>
    <hbox id="SignonViewerButtons">
      <button id="removeSignon" disabled="true"
              data-l10n-id="remove"
              oncommand="DeleteSignon();"/>
      <button id="removeAllSignons"
              oncommand="DeleteAllSignons();"/>
      <spacer flex="1"/>
#if defined(MOZ_BUILD_APP_IS_BROWSER) && defined(XP_WIN)
      <button data-l10n-id="import"
              oncommand="OpenMigrator();"/>
#endif
      <button id="togglePasswords"
              oncommand="TogglePasswordVisible();"/>
    </hbox>
  </vbox>
  <hbox align="end">
    <hbox class="actionButtons" flex="1">
      <spacer flex="1"/>
#ifndef XP_MACOSX
      <button oncommand="close();"
              data-l10n-id="close-button"/>
#endif
    </hbox>
  </hbox>
</window>