updates and additions
[webos-internals:modifications.git] / browser / browser-bookmarks-list-button.patch
1 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
2 index 6ad7ebd..eac15f3 100644
3 --- a/usr/palm/applications/com.palm.app.browser/app/controllers/page-controls.js
4 +++ b/usr/palm/applications/com.palm.app.browser/app/controllers/page-controls.js
5 @@ -24,10 +24,17 @@ function PageControls (controller){
6                         icon: MenuData.NavigationMenu.Forward.icon,
7                         command: MenuData.NavigationMenu.Forward.command
8                 };
9 +               
10 +               this._bookmarksModel = {
11 +                       disabled: false,
12 +                       label: MenuData.NavigationMenu.Bookmarks.label,
13 +                       icon: MenuData.NavigationMenu.Bookmarks.icon,
14 +                       command: MenuData.NavigationMenu.Bookmarks.command
15 +               };
16  
17                 this._model = {
18                         visible: true,
19 -                       items: [this._backModel, {}, {}]
20 +                       items: [this._backModel, this._bookmarksModel, {}, {}]
21                 };
22  
23                 this._currentPageModel = {};
24 @@ -65,6 +72,7 @@ PageControls.prototype={
25                 var items = _.toArray();
26                 this._backModel.disabled = !back;
27                 items.push(this._backModel);
28 +               items.push(this._bookmarksModel);
29  
30                 if (forward) {
31                         this._forwardModel.disabled = !forward;
32 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
33 index 007600b..df35933 100644
34 --- a/usr/palm/applications/com.palm.app.browser/app/controllers/page-navigationmenu.js
35 +++ b/usr/palm/applications/com.palm.app.browser/app/controllers/page-navigationmenu.js
36 @@ -12,6 +12,12 @@ MenuData.NavigationMenu = {
37                 command: 'back'
38         },
39         
40 +       Bookmarks: {
41 +               label: $L('Bookmarks'),
42 +               icon: 'bookmarks',
43 +               command: 'show-bookmarks-cmd'
44 +       },
45 +       
46         Forward: {
47                 label: $L('Go forward'),
48                 icon: 'forward',