updates and additions
[webos-internals:modifications.git] / notifications / notifications-advanced-reset-options.patch
1 diff --git a/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js b/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
2 index 0e239cc..70610cc 100644
3 --- a/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
4 +++ b/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
5 @@ -2921,7 +2921,7 @@ showPowerOffAlert: function() {
6                     var f = function(stageController){
7                       stageController.pushScene('poweroffalert',this);
8                     }.bind(this);
9 -                   var params = {name: 'PowerOffAlert', height: 175,lightweight:true};                     
10 +                   var params = {name: 'PowerOffAlert', height: 290,lightweight:true};
11                     appController.createStageWithCallback(params,f,'popupalert');
12          }
13         //Close the Storage Alert and create a USB dashboard.
14 diff --git a/usr/lib/luna/system/luna-systemui/app/controllers/poweroffalert-assistant.js b/usr/lib/luna/system/luna-systemui/app/controllers/poweroffalert-assistant.js
15 index de1ec12..8d7e54f 100644
16 --- a/usr/lib/luna/system/luna-systemui/app/controllers/poweroffalert-assistant.js
17 +++ b/usr/lib/luna/system/luna-systemui/app/controllers/poweroffalert-assistant.js
18 @@ -7,7 +7,9 @@ var PoweroffalertAssistant = Foundations.Class.create({
19      
20      setup: function() {                
21                 var flightMode = this.flightMode.bindAsEventListener(this);
22 -               var powerOff = this.powerOff.bindAsEventListener(this);
23 +               var luna = this.luna.bindAsEventListener(this);
24 +               var restart = this.restart.bindAsEventListener(this);
25 +               var shutdown = this.shutdown.bindAsEventListener(this);
26                 var cancel = this.cancel.bindAsEventListener(this);
27                 var launchAirplaneModeHelp = this.launchAirplaneModeHelp.bindAsEventListener(this);
28                 this.flightMode = this.barAssistant.getAirplaneMode();
29 @@ -16,8 +18,10 @@ var PoweroffalertAssistant = Foundations.Class.create({
30                 else
31                         this.controller.get('flightmode').innerHTML = "<div class='info-icon' id='airplaneInfo' x-mojo-touch-feedback='immediate'></div>" + $L('Airplane Mode');
32                         
33 -               this.controller.get('poweroff').addEventListener(Mojo.Event.tap, powerOff);
34                 this.controller.get('flightmode').addEventListener(Mojo.Event.tap, flightMode);
35 +               this.controller.get('luna').addEventListener(Mojo.Event.tap, luna);
36 +               this.controller.get('restart').addEventListener(Mojo.Event.tap, restart);
37 +               this.controller.get('shutdown').addEventListener(Mojo.Event.tap, shutdown);
38                 this.controller.get('cancel').addEventListener(Mojo.Event.tap, cancel);
39                 if(this.controller.get('airplaneInfo'))
40                         this.controller.get('airplaneInfo').addEventListener(Mojo.Event.tap, launchAirplaneModeHelp);
41 @@ -47,6 +51,32 @@ var PoweroffalertAssistant = Foundations.Class.create({
42                 this.controller.window.close();
43         },
44         
45 +       java: function() {
46 +               this.controller.serviceRequest('palm://ca.canucksoftware.systoolsmgr', {
47 +                       method: "javaRestart",
48 +                       parameters: {}
49 +               });
50 +               this.controller.window.close();
51 +       },
52 +       
53 +       luna: function() {
54 +               this.controller.serviceRequest('palm://ca.canucksoftware.systoolsmgr', {
55 +                       method: "lunaRestart",
56 +                       parameters: {}
57 +               });
58 +               this.controller.window.close();
59 +       },
60 +       
61 +       restart: function() {
62 +               this.barAssistant.machineReboot("Restart selected by User in PowerOff Dialog");
63 +               this.controller.window.close();
64 +       },
65 +       
66 +       shutdown:function() {
67 +               this.barAssistant.machineOffNow("Shutdown request by User");
68 +               this.controller.window.close();
69 +       },
70 +       
71         flightMode:function(event) {
72                 
73                 var targetId = event.target.id;
74 diff --git a/usr/lib/luna/system/luna-systemui/app/views/poweroffalert/poweroffalert-scene.html b/usr/lib/luna/system/luna-systemui/app/views/poweroffalert/poweroffalert-scene.html
75 index dfb04c1..ba0132a 100644
76 --- a/usr/lib/luna/system/luna-systemui/app/views/poweroffalert/poweroffalert-scene.html
77 +++ b/usr/lib/luna/system/luna-systemui/app/views/poweroffalert/poweroffalert-scene.html
78 @@ -1,5 +1,7 @@
79  <div class="system-notification power-off">
80                 <div class="palm-notification-button affirmative" x-mojo-tap-highlight="immediate" id='flightmode' x-mojo-loc=''></div>
81 -               <div class="palm-notification-button negative" x-mojo-tap-highlight="immediate" id='poweroff' x-mojo-loc=''>Power</div>
82 +               <div class="palm-notification-button alternate" x-mojo-tap-highlight="immediate" id='luna' x-mojo-loc=''>Luna Restart</div>
83 +               <div class="palm-notification-button alternate" x-mojo-tap-highlight="immediate" id='restart' x-mojo-loc=''>Device Restart</div>
84 +               <div class="palm-notification-button negative" x-mojo-tap-highlight="immediate" id='shutdown' x-mojo-loc=''>Shut Down</div>
85                 <div class="palm-notification-button" x-mojo-tap-highlight="immediate" id='cancel' x-mojo-loc=''>Cancel</div>
86  </div>
87 \ No newline at end of file