зеркало из https://github.com/mozilla/pjs.git
bug 88661, remove-all button for form manager, r=vishy, sr=blake
This commit is contained in:
Родитель
87aaf656a2
Коммит
bd1c094866
|
@ -24,6 +24,9 @@
|
|||
<!ENTITY urlspecific.label "URL-Specific">
|
||||
<!ENTITY experimental.label "Experimental">
|
||||
|
||||
<!-- WalletViewer.xul -->
|
||||
<!ENTITY removeall.label "Remove All Saved Data">
|
||||
|
||||
<!-- WalletName.xul -->
|
||||
<!ENTITY name.title "Name">
|
||||
<!ENTITY namePrefix.label "Prefix:">
|
||||
|
|
|
@ -343,6 +343,27 @@ nsWalletViewer.prototype =
|
|||
walletViewerInterface.SetValue(output, window);
|
||||
}
|
||||
|
||||
/* clear all data */
|
||||
function ClearAll() {
|
||||
|
||||
// clear out all values from database
|
||||
schemaToValue = [];
|
||||
|
||||
// clear out values on current page
|
||||
var elementIDs = window.frames[hWalletViewer.contentFrame]._elementIDs;
|
||||
for(var i = 0; i < elementIDs.length; i++) {
|
||||
var menuList = window.frames[hWalletViewer.contentFrame].document.getElementById(elementIDs[i]);
|
||||
var menuPopup = menuList.firstChild;
|
||||
|
||||
// remove all menuItems except for last one
|
||||
while (menuPopup.childNodes.length > 1) {
|
||||
menuPopup.removeChild(menuPopup.firstChild);
|
||||
}
|
||||
menuList.removeAttribute("label");
|
||||
menuList.selectedItem = menuPopup.firstChild;
|
||||
}
|
||||
}
|
||||
|
||||
/* get the wallet input data */
|
||||
function FetchInput() {
|
||||
/* get wallet data into a list */
|
||||
|
|
|
@ -50,8 +50,10 @@
|
|||
|
||||
<hbox flex="1">
|
||||
<!-- tree sidebar -->
|
||||
<tree class="inset" id="panelTree" style="width: 0px" flex="3"/>
|
||||
|
||||
<vbox style="width: 0px" flex="3">
|
||||
<tree class="inset" id="panelTree" style="width: 0px" flex="3"/>
|
||||
<button id="clearButton" label="&removeall.label;" oncommand="ClearAll()"/>
|
||||
</vbox>
|
||||
<iframe id="panelFrame" name="panelFrame" style="width:0px" flex="7"/>
|
||||
<script type="application/x-javascript">
|
||||
<![CDATA[
|
||||
|
|
|
@ -343,6 +343,27 @@ nsWalletViewer.prototype =
|
|||
walletViewerInterface.SetValue(output, window);
|
||||
}
|
||||
|
||||
/* clear all data */
|
||||
function ClearAll() {
|
||||
|
||||
// clear out all values from database
|
||||
schemaToValue = [];
|
||||
|
||||
// clear out values on current page
|
||||
var elementIDs = window.frames[hWalletViewer.contentFrame]._elementIDs;
|
||||
for(var i = 0; i < elementIDs.length; i++) {
|
||||
var menuList = window.frames[hWalletViewer.contentFrame].document.getElementById(elementIDs[i]);
|
||||
var menuPopup = menuList.firstChild;
|
||||
|
||||
// remove all menuItems except for last one
|
||||
while (menuPopup.childNodes.length > 1) {
|
||||
menuPopup.removeChild(menuPopup.firstChild);
|
||||
}
|
||||
menuList.removeAttribute("label");
|
||||
menuList.selectedItem = menuPopup.firstChild;
|
||||
}
|
||||
}
|
||||
|
||||
/* get the wallet input data */
|
||||
function FetchInput() {
|
||||
/* get wallet data into a list */
|
||||
|
|
|
@ -50,8 +50,10 @@
|
|||
|
||||
<hbox flex="1">
|
||||
<!-- tree sidebar -->
|
||||
<tree class="inset" id="panelTree" style="width: 0px" flex="3"/>
|
||||
|
||||
<vbox style="width: 0px" flex="3">
|
||||
<tree class="inset" id="panelTree" style="width: 0px" flex="3"/>
|
||||
<button id="clearButton" label="&removeall.label;" oncommand="ClearAll()"/>
|
||||
</vbox>
|
||||
<iframe id="panelFrame" name="panelFrame" style="width:0px" flex="7"/>
|
||||
<script type="application/x-javascript">
|
||||
<![CDATA[
|
||||
|
|
|
@ -24,6 +24,9 @@
|
|||
<!ENTITY urlspecific.label "URL-Specific">
|
||||
<!ENTITY experimental.label "Experimental">
|
||||
|
||||
<!-- WalletViewer.xul -->
|
||||
<!ENTITY removeall.label "Remove All Saved Data">
|
||||
|
||||
<!-- WalletName.xul -->
|
||||
<!ENTITY name.title "Name">
|
||||
<!ENTITY namePrefix.label "Prefix:">
|
||||
|
|
Загрузка…
Ссылка в новой задаче