14 New, 1 Updated patches
[webos-internals:imagineer1981s-modifications.git] / browser / browser-bookmarks-tile-button.patch
1 diff --git a/usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js b/usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js
2 index 09c898f..f86fc6a 100644
3 --- a/usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js
4 +++ b/usr/palm/applications/com.palm.app.browser/app/controllers/page-assistant.js
5 @@ -2128,6 +2128,10 @@ PageAssistant.prototype.handleCommand = function(event) {
6                                         this._goBack();
7                                         break;
8  
9 +                               case MenuData.NavigationMenu.Bookmarks.command:
10 +                                       this._showStartPage();
11 +                                       break;
12 +
13                                 case MenuData.NavigationMenu.Forward.command:
14                                         this._goForward();
15                                         break;
16 diff --git a/usr/palm/applications/com.palm.app.browser/app/controllers/page-controls.js b/usr/palm/applications/com.palm.app.browser/app/controllers/page-controls.js
17 index 965e167..3bdd8d3 100644
18 --- a/usr/palm/applications/com.palm.app.browser/app/controllers/page-controls.js
19 +++ b/usr/palm/applications/com.palm.app.browser/app/controllers/page-controls.js
20 @@ -26,9 +26,16 @@ PageControls = Class.create({
21                         command: MenuData.NavigationMenu.Forward.command
22                 };
23  
24 +               this._bookmarksModel = {
25 +                       disabled: false,
26 +                       label: MenuData.NavigationMenu.Bookmarks.label,
27 +                       icon: MenuData.NavigationMenu.Bookmarks.icon,
28 +                       command: MenuData.NavigationMenu.Bookmarks.command
29 +               };
30 +
31                 this._model = {
32                         visible: true,
33 -                       items: [this._backModel, {}, {}]
34 +                       items: [this._backModel, this._bookmarksModel, {}, {}]
35                 };
36  
37                 this._currentPageModel = {};
38 @@ -64,6 +71,7 @@ PageControls = Class.create({
39                 var items = $A();
40                 this._backModel.disabled = !back;
41                 items.push(this._backModel);
42 +               items.push(this._bookmarksModel);
43  
44                 if (forward) {
45                         this._forwardModel.disabled = !forward;
46 diff --git a/usr/palm/applications/com.palm.app.browser/app/controllers/page-navigationmenu.js b/usr/palm/applications/com.palm.app.browser/app/controllers/page-navigationmenu.js
47 index 0271a5b..07ee090 100644
48 --- a/usr/palm/applications/com.palm.app.browser/app/controllers/page-navigationmenu.js
49 +++ b/usr/palm/applications/com.palm.app.browser/app/controllers/page-navigationmenu.js
50 @@ -10,6 +10,12 @@ MenuData.NavigationMenu = {
51                 command: 'back'
52         },
53         
54 +       Bookmarks: {
55 +               label: $L('Bookmarks'),
56 +               icon: 'bookmarks',
57 +               command: 'bookmarks-page'
58 +       },
59 +       
60         Forward: {
61                 label: $L('Go forward'),
62                 icon: 'forward',