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

Ignore:
Timestamp:
Nov 3, 2014, 12:35:40 PM (8 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
7204cb
Parents:
3c9c29
Message:

code formatting (no code changes)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • content/vI_smartReplyDialog.js

    r3c9c29 r509348  
    2424
    2525Components.utils.import("resource://v_identity/vI_nameSpaceWrapper.js");
    26 virtualIdentityExtension.ns(function() { with (virtualIdentityExtension.LIB) {
    27 var smartReply_dialog = {
    28     Obj_radioGroup : null,
    29     all_addresses : null,
     26virtualIdentityExtension.ns(function () {
     27  with(virtualIdentityExtension.LIB) {
     28    var smartReply_dialog = {
     29      Obj_radioGroup: null,
     30      all_addresses: null,
    3031
    31     init : function() {
    32         smartReply_dialog.Obj_radioGroup = document.getElementById("replySelector.radiogroup");
    33         smartReply_dialog.all_addresses = window.arguments[0];
    34         for (var index = 0; index < smartReply_dialog.all_addresses.number; index++) {
    35             var menuentry = smartReply_dialog.all_addresses.identityDataCollection[index].combinedName;
     32      init: function () {
     33        smartReply_dialog.Obj_radioGroup = document.getElementById("replySelector.radiogroup");
     34        smartReply_dialog.all_addresses = window.arguments[0];
     35        for (var index = 0; index < smartReply_dialog.all_addresses.number; index++) {
     36          var menuentry = smartReply_dialog.all_addresses.identityDataCollection[index].combinedName;
    3637
    37             var id = null; var smtp = null;
     38          var id = null;
     39          var smtp = null;
    3840
    39             if (smartReply_dialog.all_addresses.identityDataCollection[index].id)
    40                 id = smartReply_dialog.all_addresses.identityDataCollection[index].id.value;
    41             if (smartReply_dialog.all_addresses.identityDataCollection[index].smtp)
    42                 smtp = smartReply_dialog.all_addresses.identityDataCollection[index].smtp.value;
    43            
    44             let defaultServerTag = Components.classes["@mozilla.org/intl/stringbundle;1"]
    45               .getService(Components.interfaces.nsIStringBundleService)
    46               .createBundle("chrome://messenger/locale/messenger.properties")
    47               .GetStringFromName("defaultServerTag")
    48            
    49             menuentry += (id?" (" + id + "," + (smtp?smtp:defaultServerTag) + ")":"")
    50             smartReply_dialog.add_row(menuentry);
    51         }
    52     },
     41          if (smartReply_dialog.all_addresses.identityDataCollection[index].id)
     42            id = smartReply_dialog.all_addresses.identityDataCollection[index].id.value;
     43          if (smartReply_dialog.all_addresses.identityDataCollection[index].smtp)
     44            smtp = smartReply_dialog.all_addresses.identityDataCollection[index].smtp.value;
    5345
    54     add_row : function(combinedName) {
    55         var radio = document.createElement("radio");
    56         radio.setAttribute("label",combinedName);
    57         smartReply_dialog.Obj_radioGroup.appendChild(radio);
    58     },
     46          let defaultServerTag = Components.classes["@mozilla.org/intl/stringbundle;1"]
     47            .getService(Components.interfaces.nsIStringBundleService)
     48            .createBundle("chrome://messenger/locale/messenger.properties")
     49            .GetStringFromName("defaultServerTag")
    5950
    60     accept : function() {
    61         /* window.argument[1] stores callback function */
    62         window.arguments[1](smartReply_dialog.all_addresses, smartReply_dialog.Obj_radioGroup.selectedIndex);
    63         document.documentElement.acceptDialog();
    64     }
    65 }
    66 window.addEventListener("load", smartReply_dialog.init, false);
    67 vI.smartReply_dialog = smartReply_dialog;
    68 }});
     51          menuentry += (id ? " (" + id + "," + (smtp ? smtp : defaultServerTag) + ")" : "")
     52          smartReply_dialog.add_row(menuentry);
     53        }
     54      },
     55
     56      add_row: function (combinedName) {
     57        var radio = document.createElement("radio");
     58        radio.setAttribute("label", combinedName);
     59        smartReply_dialog.Obj_radioGroup.appendChild(radio);
     60      },
     61
     62      accept: function () {
     63        /* window.argument[1] stores callback function */
     64        window.arguments[1](smartReply_dialog.all_addresses, smartReply_dialog.Obj_radioGroup.selectedIndex);
     65        document.documentElement.acceptDialog();
     66      }
     67    }
     68    window.addEventListener("load", smartReply_dialog.init, false);
     69    vI.smartReply_dialog = smartReply_dialog;
     70  }
     71});
Note: See TracChangeset for help on using the changeset viewer.