updates and additions
[webos-internals:djcin7s-modifications.git] / phone / phone-reverse-number-lookup-for-switzerland.patch
1 diff --git a/usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.js b/usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.js
2 index a7d2920..ec757db 100644
3 --- a/usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.js
4 +++ b/usr/palm/applications/com.palm.app.phone/app/controllers/calllog-assistant.js
5 @@ -213,6 +213,8 @@ var CalllogAssistant = Class.create({
6                                 name: "contact",
7                                 label: isKnown ? $L("View Contact") : $L("Add to Contacts")
8                         }});
9 +                       
10 +                       viewContact += '<div class="palm-row" x-mojo-touch-feedback="momentary" name="dolookup" displayName="asd"><div class="palm-row-wrapper"><div class="title contact-title truncating-text">Anrufer identifizieren (search.ch)</div></div></div>';
11                 } else {
12                         viewContact = "";
13                 }
14 @@ -322,6 +324,33 @@ var CalllogAssistant = Class.create({
15                                                 TelephonyCommands.contactsLaunchWithPseudocard(itemModel.recentcall_address.addr, itemModel.recentcall_address.service);
16                                         }
17                                         return;
18 +                               
19 +                               case "dolookup":
20 +                                       //Mojo.Log.error("TelSearch Lookup");
21 +                                       //Mojo.Log.error("itemModel.recentcall_address.addr = " + itemModel.recentcall_address.addr);
22 +
23 +                                       // Launch the Browser with tel.search.ch reverse lookup
24 +                                       TelSearchURL = "http://tel.search.ch?was=" + itemModel.recentcall_address.addr; 
25 +                       
26 +                                       this.controller.serviceRequest("palm://com.palm.applicationManager", {
27 +                                          method: "open",
28 +                                          parameters:  {
29 +                                              id: 'com.palm.app.browser',
30 +                                              params: {
31 +                                                  target: TelSearchURL
32 +                                              }
33 +                                          }
34 +                                        }); 
35 +                                       
36 +                                       //this.controller.serviceRequest('palm://com.palm.applicationManager', {
37 +                                       //      method: 'launch',
38 +                                       //      parameters: {
39 +                                       //              id: "com.whitepages.mobile",
40 +                                       //              params:{action: "search", scene: "reverse", search_number: itemModel.recentcall_address.addr, autosearch:true}
41 +                                       //      },
42 +                                       return;
43 +                                       
44 +                                       
45                                 }
46                         target = target.parentNode;
47                 }