This is just some static backup of the original site, don't expect every link to work!

Ignore:
Timestamp:
Mar 24, 2012, 8:33:52 PM (11 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
d415fa
Parents:
9258d9
Message:

refer to window if opening dialogs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/vI_rdfDatasource.js

    r9258d9 r7c85ef  
    877877    },
    878878   
    879     updateVIdentityFromStorage : function(recipientName, recipientType, currentIdentity, currentIdentityIsVid, isNotFirstInputElement) {
     879    updateVIdentityFromStorage : function(recipientName, recipientType, currentIdentity, currentIdentityIsVid, isNotFirstInputElement, currentWindow) {
    880880        var localIdentities = new identityCollection();
    881881        localIdentities.addWithoutDuplicates(this._rdfDataSource.readVIdentityFromRDF(recipientName, recipientType));
     
    903903                    if (    !currentIdentityIsVid ||
    904904                        !vIprefs.get("storage_warn_vI_replace") ||
    905                         (this.__askWarning(warning) == "accept")) {
     905                        (this.__askWarning(warning, currentWindow) == "accept")) {
    906906                            returnValue.result = "accept";
    907907                    }
     
    915915    },
    916916   
    917     storeVIdentityToAllRecipients : function(identityData, recipients) {
     917    storeVIdentityToAllRecipients : function(identityData, recipients, currentWindow) {
    918918        var multipleRecipients = (recipients.length > 1);
    919919        var dontUpdateMultipleNoEqual = (vIprefs.get("storage_dont_update_multiple") && multipleRecipients)
     
    922922        let returnValue = { update : "cancel" };
    923923        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);
    925925            if (returnValue.update != "accept")  break;
    926926        }
     
    939939    },
    940940
    941     __updateStorageFromVIdentity : function(identityData, recipient, recipientType, dontUpdateMultipleNoEqual) {
     941    __updateStorageFromVIdentity : function(identityData, recipient, recipientType, dontUpdateMultipleNoEqual, currentWindow) {
    942942        Log.debug("__updateStorageFromVIdentity.")
    943943        var storageDataByType = this._rdfDataSource.readVIdentityFromRDF(recipient, recipientType);
     
    956956            if (storageDataByType && !storageDataByTypeEqual && vIprefs.get("storage_warn_update")) {
    957957                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);
    959959            }
    960960        }
     
    981981    },
    982982
    983     __askWarning : function(warning) {
     983    __askWarning : function(warning, currentWindow) {
    984984        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","",
    986986                    "chrome, dialog, modal, alwaysRaised, resizable=yes",
    987987                     warning, retVar)
Note: See TracChangeset for help on using the changeset viewer.