Changeset 7c85ef for modules/vI_rdfDatasource.js
- Timestamp:
- Mar 24, 2012, 8:33:52 PM (11 years ago)
- Branches:
- ng_0.9
- Children:
- d415fa
- Parents:
- 9258d9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/vI_rdfDatasource.js
r9258d9 r7c85ef 877 877 }, 878 878 879 updateVIdentityFromStorage : function(recipientName, recipientType, currentIdentity, currentIdentityIsVid, isNotFirstInputElement ) {879 updateVIdentityFromStorage : function(recipientName, recipientType, currentIdentity, currentIdentityIsVid, isNotFirstInputElement, currentWindow) { 880 880 var localIdentities = new identityCollection(); 881 881 localIdentities.addWithoutDuplicates(this._rdfDataSource.readVIdentityFromRDF(recipientName, recipientType)); … … 903 903 if ( !currentIdentityIsVid || 904 904 !vIprefs.get("storage_warn_vI_replace") || 905 (this.__askWarning(warning ) == "accept")) {905 (this.__askWarning(warning, currentWindow) == "accept")) { 906 906 returnValue.result = "accept"; 907 907 } … … 915 915 }, 916 916 917 storeVIdentityToAllRecipients : function(identityData, recipients ) {917 storeVIdentityToAllRecipients : function(identityData, recipients, currentWindow) { 918 918 var multipleRecipients = (recipients.length > 1); 919 919 var dontUpdateMultipleNoEqual = (vIprefs.get("storage_dont_update_multiple") && multipleRecipients) … … 922 922 let returnValue = { update : "cancel" }; 923 923 for (var j = 0; j < recipients.length; j++) { 924 returnValue = this.__updateStorageFromVIdentity(identityData, recipients[j].recipient, recipients[j].recipientType, dontUpdateMultipleNoEqual );924 returnValue = this.__updateStorageFromVIdentity(identityData, recipients[j].recipient, recipients[j].recipientType, dontUpdateMultipleNoEqual, currentWindow); 925 925 if (returnValue.update != "accept") break; 926 926 } … … 939 939 }, 940 940 941 __updateStorageFromVIdentity : function(identityData, recipient, recipientType, dontUpdateMultipleNoEqual ) {941 __updateStorageFromVIdentity : function(identityData, recipient, recipientType, dontUpdateMultipleNoEqual, currentWindow) { 942 942 Log.debug("__updateStorageFromVIdentity.") 943 943 var storageDataByType = this._rdfDataSource.readVIdentityFromRDF(recipient, recipientType); … … 956 956 if (storageDataByType && !storageDataByTypeEqual && vIprefs.get("storage_warn_update")) { 957 957 Log.debug("__updateStorageFromVIdentity overwrite warning"); 958 doUpdate = this.__askWarning(this.__getWarning("updateStorage", recipient, storageDataByTypeCompResult.compareMatrix) );958 doUpdate = this.__askWarning(this.__getWarning("updateStorage", recipient, storageDataByTypeCompResult.compareMatrix), currentWindow); 959 959 } 960 960 } … … 981 981 }, 982 982 983 __askWarning : function(warning ) {983 __askWarning : function(warning, currentWindow) { 984 984 var retVar = { returnValue: null }; 985 var answer = get3PaneWindow().openDialog("chrome://v_identity/content/vI_Dialog.xul","",985 var answer = currentWindow.openDialog("chrome://v_identity/content/vI_Dialog.xul","", 986 986 "chrome, dialog, modal, alwaysRaised, resizable=yes", 987 987 warning, retVar)
Note: See TracChangeset
for help on using the changeset viewer.