Exemple #1
0
 dialKeyPressed: function (dialKey) {
     var phoneNumber = this.textViewPhoneNumber.model.get("text");
     if (phoneNumber == placeholderText) {
         phoneNumber = null;
     }
     var id = dialKey.model.get("id");
     if (id === "dial-key-backspace") {
         if (phoneNumber && phoneNumber.length > 0) {
             phoneNumber = phoneNumber.slice(0, -1);
             this.textViewPhoneNumber.model.set("text", this.formatPhoneNumber(phoneNumber));
         }
         if (!phoneNumber) {
             this.textViewPhoneNumber.model.set("text", placeholderText);
             this.textViewPhoneNumber.setClasses(["placeholder"]);
         }
     } else if (id === "dial-key-contacts") {
     } else if (id === "dial-key-call") {
         if (phoneNumber) {
             var callingApp = null;
             // tests for presence of data and existence of a callingApp
             if (this.data && this.data.callingApp) {
                 callingApp = this.data.callingApp;
             }
             this.resume("chamber-call-info", {"phoneNumber": phoneNumber, "callingApp": callingApp});
         } else {
             Toast.show(toastWarningText);
         }
     } else {
         if (!phoneNumber) {
             this.textViewPhoneNumber.removeClasses(["placeholder"]);
             phoneNumber = "";
         }
         phoneNumber = phoneNumber + this.getCharacterFromDialKey(dialKey);
         this.textViewPhoneNumber.model.set("text", this.formatPhoneNumber(phoneNumber));
     }
 },
Exemple #2
0
 codeNotFound: function() {
     Toast.show('No saved code found.');
 }