16 Updated patches.
[webos-internals:modifications.git] / pdf-viewer / pdf-viewer-pdf-redux.patch
1 diff --git a/usr/palm/applications/com.palm.app.pdfviewer/app/controllers/app-assistant.js b/usr/palm/applications/com.palm.app.pdfviewer/app/controllers/app-assistant.js
2 index 2ae0e7f..72afed5 100644
3 --- a/usr/palm/applications/com.palm.app.pdfviewer/app/controllers/app-assistant.js
4 +++ b/usr/palm/applications/com.palm.app.pdfviewer/app/controllers/app-assistant.js
5 @@ -2,6 +2,12 @@
6  /*global Mojo, Class, $L, Template, WordAssistant, ExcelAssistant, PowerPointAssistant */
7  /*jslint rhino:true, undef:true */
8  
9 +PDFVIEW = {};
10 +PDFVIEW.prefs = {
11 +    openLastDoc: false,
12 +    autoRotate: false
13 +};
14 +
15  function AppAssistant(appController)
16  {
17  }
18 @@ -21,6 +27,13 @@ AppAssistant.prototype.handleLaunch = function(params) {
19  
20          if (Mojo.Controller.appInfo.noWindow) 
21          {
22 +           var cookieModel = new Mojo.Model.Cookie('preferences'); 
23 +           var cookie = cookieModel.get(); 
24 +           if (cookie) { 
25 +               PDFVIEW.prefs.openLastDoc = cookie.openLastDoc; 
26 +               PDFVIEW.prefs.autoRotate = cookie.autoRotate; 
27 +           }
28 +
29              var f = function(stageController) {
30  
31                  if (launchParams.target) {
32 diff --git a/usr/palm/applications/com.palm.app.pdfviewer/app/controllers/document-assistant.js b/usr/palm/applications/com.palm.app.pdfviewer/app/controllers/document-assistant.js
33 index 708a648..ad06d3e 100644
34 --- a/usr/palm/applications/com.palm.app.pdfviewer/app/controllers/document-assistant.js
35 +++ b/usr/palm/applications/com.palm.app.pdfviewer/app/controllers/document-assistant.js
36 @@ -9,6 +9,7 @@ var DocumentAssistant = Class.create({
37          items: [
38          { label:$L('Open'), command:'file-open-cmd' },
39          { label:$L('Save As...'), command:'file-saveas-cmd' },
40 +        { label:$L('Preferences'), command:'prefs-cmd' },
41          { label:$L('Share'), command:'share-cmd' },
42          { label:$L('Find'), command:'find-cmd', chosen:false },
43          { label:$L('Bookmarks'), command:'pdf-outline', chosen:false },
44 @@ -16,13 +17,19 @@ var DocumentAssistant = Class.create({
45      ]},
46  
47         cmdMenuModel: { visible: false, items: [
48 +               { items: [
49 +                       { icon:'sync', command:'rotate-cmd' }
50 +               ]},
51                 {},
52                 { items: [
53                         { icon:'back', command:'prev-cmd' },
54                         { template: 'document/command_bar', command: 'edit-cmd' },
55                         { icon:'forward', command:'next-cmd' }
56                 ]},
57 -               {}
58 +               {},
59 +               { items: [
60 +                       { icon:'refresh', command:'last-cmd' }
61 +               ]}
62         ]},
63  
64         numericMap: {
65 @@ -43,6 +50,13 @@ var DocumentAssistant = Class.create({
66  
67      deactivate: function() {
68          this.findField.mojo.blur();
69 +         var time = new Date();
70 +         time.setMonth(time.getMonth()+1);
71 +         this.cookieModel.put({ 
72 +           currentpage: this.currentpage,
73 +           lastjumpsource: this.lastjumpsource,
74 +           currentOrientation: this.currentOrientation
75 +         }, time);
76      },
77  
78         initialize: function(parameters) {
79 @@ -52,6 +66,7 @@ var DocumentAssistant = Class.create({
80                 this.document_noext = undefined;
81                 this.saveShowing = false;
82                 this.currentpage = 1;
83 +               this.lastjumpsource = 1;
84                 this.wrongpasscount = -1;
85                 this.jumptimeout = undefined;
86                 this.outline_depth = 1;
87 @@ -70,6 +85,8 @@ var DocumentAssistant = Class.create({
88                 this._loadingSpinnerTimeout = null;
89                 this._spinnerShowTime = 0;
90          this.documentPassword = null;
91 +               this.currentOrientation = "up";
92 +               this.autoRotate = PDFVIEW.prefs.autoRotate;
93  
94          // Variables need for find / search
95          this.findShowing = false;
96 @@ -97,6 +114,23 @@ var DocumentAssistant = Class.create({
97              this.filename = this.filename.substr(7);
98          }
99  
100 +           var lastDocModel = new Mojo.Model.Cookie('lastdoc');
101 +           lastDocModel.put({
102 +               lastdoc: this.filename
103 +           });
104 +
105 +               this.cookieModel = new Mojo.Model.Cookie(this.filename); 
106 +               var cookie = this.cookieModel.get(); 
107 +               if (cookie) { 
108 +                 this.currentpage = cookie.currentpage; 
109 +                 this.lastjumpsource = cookie.lastjumpsource;
110 +                 if (!this.autoRotate) {
111 +                   this.currentOrientation = cookie.currentOrientation;
112 +                 }
113 +               }
114 +
115 +           this.cmdMenuModel.items[0].items[0].disabled = this.autoRotate;
116 +
117          Mojo.Log.info("Filename = '%s'", this.filename);
118      },
119  
120 @@ -105,13 +139,16 @@ var DocumentAssistant = Class.create({
121  
122          try {
123  
124 +            // Restore old view.
125 +            this.controller.stageController.setWindowOrientation(this.currentOrientation);
126 +
127              this.spinnerRunning = false;
128  
129                         // Set up the view buttons (header)
130 -                       var viewMenuModel = { visible: false, items: [ { template: 'document/header_bar' } ] };
131 +                       /*var viewMenuModel = { visible: false, items: [ { template: 'document/header_bar' } ] };
132              this.controller.setupWidget(Mojo.Menu.viewMenu,
133                                          {menuClass:'no-fade'},
134 -                                        viewMenuModel);
135 +                                        viewMenuModel);*/
136  
137                         // Set up the command buttons (footer)
138              this.controller.setupWidget(Mojo.Menu.commandMenu,
139 @@ -220,9 +257,7 @@ var DocumentAssistant = Class.create({
140  
141      orientationChanged: function(orientation) {
142  
143 -       return;
144 -/*
145 -       if (this.currentOrientation === orientation)
146 +       if (!this.autoRotate || this.currentOrientation === orientation)
147         {
148             return;
149         }
150 @@ -238,7 +273,27 @@ var DocumentAssistant = Class.create({
151  
152         // Re-create the adapter
153         this.dosetup();
154 -*/
155 +    },
156 +
157 +    rotateView: function() {
158 +       var orientation;
159 +       if (this.currentOrientation === "left") {
160 +           orientation = "up";
161 +       } else {
162 +           orientation = "left";
163 +       }
164 +
165 +       // Replace the adapter with an empty div during the rotate
166 +       var viewerObject = this.controller.get('viewerObject');
167 +       var emptyDiv = this.controller.document.createElement('div');
168 +       emptyDiv.id = 'viewerObject'; 
169 +       viewerObject.parentNode.replaceChild(emptyDiv, viewerObject); 
170 +
171 +       this.currentOrientation = orientation;
172 +       this.controller.window.PalmSystem.setWindowOrientation(orientation);
173 +
174 +       // Re-create the adapter
175 +       this.dosetup();
176      },
177  
178      NeedPassword: function(docid) {
179 @@ -277,6 +332,9 @@ var DocumentAssistant = Class.create({
180                 }
181                 this._hideLoadingSpinner();
182  
183 +        // Remove last doc to prevent infinite errors.
184 +        new Mojo.Model.Cookie('lastdoc').remove();
185 +
186          switch (parseInt(error_type, 10)) {
187              case 0:
188                  Mojo.Log.error("Open Document Error!");
189 @@ -332,8 +390,8 @@ var DocumentAssistant = Class.create({
190  
191                 if (this.currentpage !== undefined) {
192  
193 -                       this.cmdMenuModel.items[1].items[0].disabled = (this.currentpage == 1);
194 -                       this.cmdMenuModel.items[1].items[2].disabled = (this.currentpage == this.pagecount);
195 +                       this.cmdMenuModel.items[2].items[0].disabled = (this.currentpage == 1);
196 +                       this.cmdMenuModel.items[2].items[2].disabled = (this.currentpage == this.pagecount);
197                         this.controller.modelChanged(this.cmdMenuModel);
198  
199                         // rebind key event
200 @@ -375,6 +433,13 @@ var DocumentAssistant = Class.create({
201          this.JumpToPage( this.currentpage );
202         },
203  
204 +       goToLastJumpSource: function () {
205 +               var target = this.lastjumpsource;
206 +               this.lastjumpsource = this.currentpage;
207 +               this.currentpage = target;
208 +               this.JumpToPage( this.currentpage );
209 +       },
210 +
211      forceFootChange: function () {
212  
213          var goto_page = parseInt(this.controller.get('page_foot_cur_ent').value, 10);
214 @@ -462,7 +527,7 @@ var DocumentAssistant = Class.create({
215  
216                 // Set up the command buttons (footer)
217                 var page_len = (this.pagecount+'').length;
218 -               this.cmdMenuModel.items[1].items[1].width = 60 + (page_len * 15);
219 +               this.cmdMenuModel.items[2].items[1].width = 60 + (page_len * 15);
220                 this.controller.modelChanged(this.cmdMenuModel);
221  
222                 this.controller.setMenuVisible(Mojo.Menu.commandMenu, true);
223 @@ -568,6 +633,7 @@ var DocumentAssistant = Class.create({
224  
225                 if (e.keyCode == Mojo.Char.enter) {
226                         var goto_page = parseInt(this.controller.get('page_foot_cur_ent').value, 10);
227 +                       this.lastjumpsource = this.currentpage;
228              this.JumpToPage(goto_page);
229                         this.showFootPageOf();
230                 }
231 @@ -783,7 +849,7 @@ var DocumentAssistant = Class.create({
232          var splittext = this.filename.split('/');
233          this.document_name = splittext[splittext.length-1];
234          this.document_noext = this.document_name.substr(0, this.document_name.indexOf('.pdf'));
235 -        this.controller.get('documentname').innerHTML = this.document_noext;
236 +        //this.controller.get('documentname').innerHTML = this.document_noext;
237          new_obj.eventListener = this;
238  
239          this.adapter = new_obj;
240 @@ -809,9 +875,10 @@ var DocumentAssistant = Class.create({
241      openFilePicker: function () {
242  
243          // Right now lets just open a new window and send it to the recent scene
244 +       var openParams = { disableOpenLast: true };
245          this.controller.serviceRequest('palm://com.palm.applicationManager', {
246              method: 'open',
247 -            parameters: { 'id': 'com.palm.app.pdfviewer' }
248 +            parameters: { 'id': 'com.palm.app.pdfviewer', params: openParams }
249          });
250      },
251  
252 @@ -835,6 +902,10 @@ var DocumentAssistant = Class.create({
253                                                 this.saveAsDialog();
254                                                 break;
255  
256 +                                       case 'prefs-cmd':
257 +                                               this.controller.stageController.pushScene('preferences', this);
258 +                                               break;
259 +
260                                         case 'share-cmd':
261                                                 this.shareDocument();
262                                                 break;
263 @@ -860,6 +931,14 @@ var DocumentAssistant = Class.create({
264                                                 this.showFootPageOf();
265                                                 break;
266  
267 +                                       case 'last-cmd':                                        
268 +                                               this.goToLastJumpSource();
269 +                                               break;
270 +                                               
271 +                                       case 'rotate-cmd':                                      
272 +                                               this.rotateView();
273 +                                               break;
274 +                                               
275                                         case 'pdf-outline':
276  
277                                                 // Create the PDF outline/bookmarks
278 @@ -919,7 +998,7 @@ var DocumentAssistant = Class.create({
279                         var menuAssistant = this.controller._menu.assistant;
280                         menuAssistant.viewSpacerHeight = 0;
281  
282 -            this.controller.setMenuVisible(Mojo.Menu.viewMenu, visible);
283 +            //this.controller.setMenuVisible(Mojo.Menu.viewMenu, visible);
284          }
285      },
286  
287 @@ -1281,7 +1360,7 @@ SaveAsDialogAssistant = Class.create({
288                          this.documentAssistant.document_name = save_input;
289                          this.documentAssistant.document_noext = this.documentAssistant.document_name.substr(0, this.documentAssistant.document_name.indexOf('.pdf'));
290  
291 -                        this.documentAssistant.controller.get('documentname').innerHTML = this.documentAssistant.document_noext;
292 +                        //this.documentAssistant.controller.get('documentname').innerHTML = this.documentAssistant.document_noext;
293  
294                      }
295                      catch(e)
296 diff --git a/usr/palm/applications/com.palm.app.pdfviewer/app/controllers/preferences-assistant.js b/usr/palm/applications/com.palm.app.pdfviewer/app/controllers/preferences-assistant.js
297 new file mode 100644
298 index 0000000..e8fa320
299 --- /dev/null
300 +++ b/usr/palm/applications/com.palm.app.pdfviewer/app/controllers/preferences-assistant.js
301 @@ -0,0 +1,44 @@
302 +function PreferencesAssistant() {
303 +}
304 +
305 +PreferencesAssistant.prototype.setup = function() {
306 +    this.controller.setupWidget('lastDoc',
307 +                               this.lastDocAttributes = {
308 +                                   trueLabel: $L('On'),
309 +                                   falseLabel: $L('Off')
310 +                               },
311 +                               this.lastDocModel = {
312 +                                   value: PDFVIEW.prefs.openLastDoc,
313 +                                   disabled: false                     
314 +                               });
315 +
316 +    this.controller.setupWidget('autoRotate',
317 +                               this.autoRotateAttributes = {
318 +                                   trueLabel: $L('On'),
319 +                                   falseLabel: $L('Off')
320 +                               },
321 +                               this.autoRotateModel = {
322 +                                   value: PDFVIEW.prefs.autoRotate,
323 +                                   disabled: false                     
324 +                               });
325 +
326 +    this.prefsappMenuModel = {
327 +       visible: true,
328 +       items: [
329 +           Mojo.Menu.editItem,
330 +           { label: $L("Help") + "...", command: Mojo.Menu.helpCmd, disabled: true }
331 +       ]
332 +    };
333 +    this.controller.setupWidget(Mojo.Menu.appMenu, {omitDefaultItems: true}, this.prefsappMenuModel);
334 +    this.controller.setInitialFocusedElement(null);
335 +}
336 +
337 +PreferencesAssistant.prototype.deactivate = function(event) {
338 +    this.cookieModel = new Mojo.Model.Cookie('preferences');
339 +    PDFVIEW.prefs.openLastDoc = this.lastDocModel.value;
340 +    PDFVIEW.prefs.autoRotate = this.autoRotateModel.value;
341 +    this.cookieModel.put({ 
342 +       openLastDoc: PDFVIEW.prefs.openLastDoc,
343 +       autoRotate: PDFVIEW.prefs.autoRotate
344 +    });
345 +}
346 diff --git a/usr/palm/applications/com.palm.app.pdfviewer/app/controllers/recent-assistant.js b/usr/palm/applications/com.palm.app.pdfviewer/app/controllers/recent-assistant.js
347 index ad54e64..d1ae625 100644
348 --- a/usr/palm/applications/com.palm.app.pdfviewer/app/controllers/recent-assistant.js
349 +++ b/usr/palm/applications/com.palm.app.pdfviewer/app/controllers/recent-assistant.js
350 @@ -56,6 +56,17 @@ var RecentAssistant = Class.create({
351         {
352          //Mojo.Log.info("RecentAssistant: activate");
353  
354 +           if (!this.disableOpenLast && PDFVIEW.prefs.openLastDoc && this.lastdoc != null) {
355 +               this.disableOpenLast = true;
356 +                // Push the new document scene
357 +                var args = { name: 'document', disableSceneScroller: true };
358 +                var params = { hidemode: 'none', filename: this.lastdoc };
359 +               
360 +                this.controller.stageController.pushScene(args, params);
361 +           } else {
362 +
363 +           this.disableOpenLast = true;;
364 +
365          var params = {
366              // Only show files
367              kind: 'file',
368 @@ -78,10 +89,21 @@ var RecentAssistant = Class.create({
369  
370          Mojo.FilePicker.pickFile(params, this.controller.stageController);
371  
372 +           }
373      },
374  
375 -    initialize: function() 
376 +    initialize: function(parameters) 
377         {
378 +           this.disableOpenLast = false;
379 +           this.lastdoc = null;
380 +           this.cookieModel = new Mojo.Model.Cookie('lastdoc');
381 +           var cookie = this.cookieModel.get();
382 +           if (cookie) {
383 +               this.lastdoc = cookie.lastdoc;
384 +           }
385 +           if (parameters.launchParams) {
386 +               this.disableOpenLast = parameters.launchParams.disableOpenLast;
387 +           }
388          //Mojo.Log.info("RecentAssistant: initialize");
389      },
390  
391 diff --git a/usr/palm/applications/com.palm.app.pdfviewer/app/views/document/command_bar.html b/usr/palm/applications/com.palm.app.pdfviewer/app/views/document/command_bar.html
392 index 8fe00ff..96851f0 100644
393 --- a/usr/palm/applications/com.palm.app.pdfviewer/app/views/document/command_bar.html
394 +++ b/usr/palm/applications/com.palm.app.pdfviewer/app/views/document/command_bar.html
395 @@ -6,7 +6,7 @@
396      </div>
397      <div id="page_foot_ent" class="foot-page" style="display: none;">
398          <input id="page_foot_cur_ent" class="foot-page-ent" />
399 -               <span class="foot-page-cnt">&nbsp;/&nbsp;</span>
400 -        <span id="page_foot_cnt_ent" class="foot-page-cnt"></span>
401 +               <span class="foot-page-cnt-inp">&nbsp;/&nbsp;</span>
402 +        <span id="page_foot_cnt_ent" class="foot-page-cnt-inp"></span>
403      </div>
404  </div>
405 diff --git a/usr/palm/applications/com.palm.app.pdfviewer/app/views/document/document-scene.html b/usr/palm/applications/com.palm.app.pdfviewer/app/views/document/document-scene.html
406 index 3e95f8b..25d9402 100644
407 --- a/usr/palm/applications/com.palm.app.pdfviewer/app/views/document/document-scene.html
408 +++ b/usr/palm/applications/com.palm.app.pdfviewer/app/views/document/document-scene.html
409 @@ -1,4 +1,4 @@
410 -<div id="header" style="height:56px;">
411 +<div id="header" style="height:0px;">
412    <div id="findField" name="findField" x-mojo-element="Find"> </div>
413  </div>
414  
415 diff --git a/usr/palm/applications/com.palm.app.pdfviewer/app/views/document/header_bar.html b/usr/palm/applications/com.palm.app.pdfviewer/app/views/document/header_bar.html
416 index cdb2766..0a5480f 100644
417 --- a/usr/palm/applications/com.palm.app.pdfviewer/app/views/document/header_bar.html
418 +++ b/usr/palm/applications/com.palm.app.pdfviewer/app/views/document/header_bar.html
419 @@ -1,4 +1,3 @@
420  <div id="topHead" class="palm-header left">
421      <div id="my_spinner" x-mojo-element="Spinner"> </div>
422 -    <div id="documentname" x-mojo-loc="" class="truncating-text"></div>
423  </div>
424 diff --git a/usr/palm/applications/com.palm.app.pdfviewer/app/views/preferences/preferences-scene.html b/usr/palm/applications/com.palm.app.pdfviewer/app/views/preferences/preferences-scene.html
425 new file mode 100644
426 index 0000000..caa5024
427 --- /dev/null
428 +++ b/usr/palm/applications/com.palm.app.pdfviewer/app/views/preferences/preferences-scene.html
429 @@ -0,0 +1,41 @@
430 +<div id="prefs_view" class="prefs-main">
431 +  <div class="palm-page-header">
432 +    <div class="header-icon pdfview"></div>
433 +    <div class="header-text">
434 +                 <span x-mojo-loc=''>Preferences</span>
435 +    </div>
436 +  </div>
437 +
438 +        <div class="palm-group">
439 +               <div class="palm-group-title">
440 +                       <span x-mojo-loc=''>Startup</span>
441 +               </div>
442 +               <div class="palm-list">
443 +                       <div class="palm-row single">
444 +                               <div class="palm-row-wrapper">
445 +                                       <div x-mojo-element="ToggleButton" id="lastDoc"></div>
446 +                                       <div class="title capitalize" x-mojo-loc='' id='lastDocLabel'>Load last document on startup</div>
447 +                               </div>
448 +                       </div>
449 +               </div>
450 +       </div>
451 +
452 +       <div class="palm-group">
453 +               <div class="palm-group-title">
454 +                       <span x-mojo-loc=''>Rotation</span>
455 +               </div>
456 +               <div class="palm-list">
457 +                       <div class="palm-row single">
458 +                               <div class="palm-row-wrapper">
459 +                                       <div x-mojo-element="ToggleButton" id="autoRotate"></div>
460 +                                       <div class="title capitalize" x-mojo-loc=''>Use accelerometer for rotation</div>
461 +                               </div>
462 +                       </div>
463 +               </div>
464 +       </div>
465 +
466 +       <div class="palm-info-text single" x-mojo-loc=''>
467 +               Changes will take effect next time a document is opened.
468 +       </div>
469 +
470 +</div>
471 diff --git a/usr/palm/applications/com.palm.app.pdfviewer/sources.json b/usr/palm/applications/com.palm.app.pdfviewer/sources.json
472 index ef04afe..b213095 100644
473 --- a/usr/palm/applications/com.palm.app.pdfviewer/sources.json
474 +++ b/usr/palm/applications/com.palm.app.pdfviewer/sources.json
475 @@ -6,5 +6,6 @@
476    { "source": "app\/controllers\/error-assistant.js" },
477    { "source": "app\/controllers\/pagetext-assistant.js" },
478    { "source": "app\/controllers\/password-assistant.js" },
479 +  { "source": "app\/controllers\/preferences-assistant.js" },
480    { "source": "javascripts\/widget_find.js" }
481  ]
482 diff --git a/usr/palm/applications/com.palm.app.pdfviewer/stylesheets/pdf-viewer.css b/usr/palm/applications/com.palm.app.pdfviewer/stylesheets/pdf-viewer.css
483 index 572f564..76dabb2 100644
484 --- a/usr/palm/applications/com.palm.app.pdfviewer/stylesheets/pdf-viewer.css
485 +++ b/usr/palm/applications/com.palm.app.pdfviewer/stylesheets/pdf-viewer.css
486 @@ -166,7 +166,7 @@ div.foot-page
487  
488  span.foot-page-cur
489  {
490 -    color: white;
491 +    color: transparent;
492      font-size: 14px;
493      font-style: normal;
494      font-weight: bold;
495 @@ -193,6 +193,16 @@ input.foot-page-ent
496  
497  span.foot-page-cnt
498  {
499 +    color: transparent;
500 +    font-size: 14px;
501 +    font-style: normal;
502 +    font-weight: bold;
503 +    text-transform: none;
504 +    text-decoration: none;
505 +}
506 +
507 +span.foot-page-cnt-inp
508 +{
509      color: white;
510      font-size: 14px;
511      font-style: normal;
512 @@ -200,3 +210,52 @@ span.foot-page-cnt
513      text-transform: none;
514      text-decoration: none;
515  }
516 +
517 +/* Grouped buttons */
518 +
519 +.palm-menu-group .palm-menu-button,
520 +.palm-menu-group .palm-menu-label,
521 +.palm-menu-group .palm-menu-text {
522 +  top: 0px;
523 +  -webkit-border-image: url(../images/textfield-noshadow.png) 0 20 0 20 stretch stretch;
524 +}
525 +
526 +.palm-menu-group .palm-menu-button:first-child,
527 +.palm-menu-group .palm-menu-label:first-child,
528 +.palm-menu-group .palm-menu-text:first-child {
529 +  -webkit-border-image: url(../images/textfield-noshadow.png) 0 20 0 20 stretch stretch;
530 +  padding-left: 10px;
531 +}
532 +
533 +.palm-menu-group .palm-menu-button:last-child,
534 +.palm-menu-group .palm-menu-label:last-child,
535 +.palm-menu-group .palm-menu-text:last-child {
536 +  -webkit-border-image: url(../images/textfield-noshadow.png) 0 20 0 20 stretch stretch;
537 +  padding-right: 10px;
538 +}
539 +
540 +/* Disabled states for menu system buttons. */
541 +
542 +.palm-menu-group .palm-menu-text.palm-disabled,
543 +.palm-menu-group .palm-menu-label.palm-disabled,
544 +.palm-menu-group .palm-menu-button.palm-disabled {
545 +  -webkit-border-image: url(../images/textfield-noshadow.png) 0 20 0 20 stretch stretch;
546 +}
547 +
548 +.palm-menu-group .palm-menu-text.palm-disabled:first-child,
549 +.palm-menu-group .palm-menu-label.palm-disabled:first-child,
550 +.palm-menu-group .palm-menu-button.palm-disabled:first-child {
551 +  -webkit-border-image: url(../images/textfield-noshadow.png) 0 20 0 20 stretch stretch;
552 +}
553 +
554 +.palm-menu-group .palm-menu-text.palm-disabled:last-child,
555 +.palm-menu-group .palm-menu-label.palm-disabled:last-child,
556 +.palm-menu-group .palm-menu-button.palm-disabled:last-child {
557 +  -webkit-border-image: url(../images/textfield-noshadow.png) 0 20 0 20 stretch stretch;
558 +}
559 +
560 +.palm-page-header .header-icon.pdfview {
561 +               width: 32px;
562 +               height: 32px;
563 +               background: url(../images/pdfsmall.png) center center no-repeat;
564 +}