webOS Nation Forums >  Homebrew >  webOS patches > [Manual TouchPad Patch] PDF Goto Page
[Manual TouchPad Patch] PDF Goto Page

  Reply
Like Tree7Likes

 
LinkBack Thread Tools Display Modes
Old 09/28/2011, 10:43 PM   #1 (permalink)
Member
 
Join Date: Aug 2011
Posts: 275
Likes Received: 21
Thanks: 14
Thanked 58 Times in 37 Posts
Smile [Manual TouchPad Patch] PDF Goto Page

Update [10/21/2011]: Check out the ipk at http://forums.precentral.net/webos-p...ewed-page.html
Update [9/30/2011]: I added made the page numbers a more visible with a white background. As seen in the second image below. Just replace white.txt in pxxview.white.txt with js. Always remember to backup. OR edit
Code:
{kind: "RowGroup", components: [
                           { name: "pagerichnum", kind: "Input", style: "width: 80px; height: 45px; padding:0px;", inputClassName: "pagerichnumclass", hint: "Page #", onchange:"buttonClick", selectAllOnFocus:"true"}
                                                       ]},
to look like this by changing the style tag
Code:
{kind: "RowGroup", components: [
                           { name: "pagerichnum", kind: "Input", style: "width: 75px;background-color:white;margin:-1px", inputClassName: "pagerichnumclass", hint: "Page #", onchange:"buttonClick", selectAllOnFocus:"true"}
                                                       ]},

Hi all,

I made a goto box that you tap and enter a number to jump to that page. It has a quick error handling so you don't have to worry about a mistype. Backup your file! Please don't do this if you don't understand. Ask and I will give a better step by step later.

If you have Internalz installed, browse to (How I did all my testing):
/media/cryptofs/apps/usr/palm/applications/com.quickoffice.ar/source/Pxxview.js
edit it in the following way (OR You have to rename the attached pxxview.txt to pxxview.js and place it in that folder.) :

Find line ~36, it looks like this:
Code:
{ name: "pagelistselector", kind: "PageListSelector", className: "pageNumber", onPageSelect: "pageSelectChange" },
under that enter
Code:
{kind: "RowGroup", components: [
                           { name: "pagerichnum", kind: "Input", style: "width: 80px; height: 45px; padding:0px;", inputClassName: "pagerichnumclass", hint: "Page #", onchange:"buttonClick", selectAllOnFocus:"true"}
                                                       ]},
Find line ~96, It looks like this:
Code:
 changePages: function(inPage, inMax) {
        if (inMax) {
            this.maxPages = inMax;
			this.$.pagelistselector.updateNumPages(this.maxPages);
			this.$.pagelistselector.setCurrentPageAndRefresh(this.currentPage);
        }
change to
Code:
  if (inMax) {
            this.maxPages = inMax;
			this.$.pagelistselector.updateNumPages(this.maxPages);
			this.$.pagelistselector.setCurrentPageAndRefresh(this.currentPage);
                        this.$.pagerichnum.setValue(this.currentPage);
        }
Find line ~104, It looks like this:
Code:
 if (inPage) {
            this.currentPage = inPage;
			this.$.pagelistselector.setCurrentPageAndRefresh(this.currentPage);
change to
Code:
 if (inPage) {
            this.currentPage = inPage;
			this.$.pagelistselector.setCurrentPageAndRefresh(this.currentPage);
                        this.$.pagerichnum.setValue(this.currentPage);
	}
Find line ~116, It looks like this:
Code:
 pageSelectChange: function(inS1, inS2, inValue, inOldValue) {
        this.$.qowtArea.goToPage(inValue);
},
change to
Code:
pageSelectChange: function(inS1, inS2, inValue, inOldValue) {
        this.$.qowtArea.goToPage(inValue);
        this.$.pagerichnum.setValue(inValue);
    },
    buttonClick:function() {
    var rtcnew= this.$.pagerichnum.getValue();
    if(rtcnew>0 && rtcnew<=this.maxPages){
         this.$.qowtArea.goToPage(rtcnew);
        }
    else{
         this.$.pagerichnum.setValue(this.currentPage);
        }
					},
Just do a device restart and that's all. I have included a picture of my results and have a copy of my modded PxxView. Let me know what you think and how well it works for you.
Attached Images
File Type: png ar_2011-28-09_220302.png (408.6 KB, 250 views) Email Attachment
File Type: png white_box.png (35.3 KB, 106 views) Email Attachment
Attached Files
File Type: txt PxxView.txt (9.3 KB, 242 views) Email Attachment
File Type: txt PxxView.white.txt (9.5 KB, 162 views) Email Attachment

Last edited by knownboyofno; 10/21/2011 at 04:04 AM. Reason: ipk listed
knownboyofno is online now   Reply With Quote
Liked by zc1, pre101, tomassplatch and 2 others like this.
Old 09/29/2011, 02:45 AM   #2 (permalink)
Member
 
Join Date: Sep 2011
Posts: 20
Likes Received: 1
Thanks: 10
Thanked 5 Times in 3 Posts
Default

OMG OMG, this is what I was waiting for!!! Thank you, I think I just **** In My Pants - YouTube

Please give me your PayPal account or something, I would love to send you something for this work.

Would it be possible to make it an easy to apply patch?
tomassplatch is offline   Reply With Quote
Old 09/29/2011, 02:56 AM   #3 (permalink)
Member
 
Join Date: Aug 2011
Posts: 275
Likes Received: 21
Thanks: 14
Thanked 58 Times in 37 Posts
Default

Quote:
Originally Posted by tomassplatch View Post
OMG OMG, this is what I was waiting for!!! Thank you, I think I just **** In My Pants - YouTube

Please give me your PayPal account or something, I would love to send you something for this work.

Would it be possible to make it an easy to apply patch?
Well if you have Internalz installed, browse to /cryptofs/apps/usr/palm/applications/com.quickoffice.ar/source/Pxxview.js and rename it to pxxview.js.old then copy the file attached to /cryptofs/apps/usr/palm/applications/com.quickoffice.ar/source and rename it form txt to js.
Short answer I could make a patch but it wouldn't be uninstallable (really bad for updates)

Last edited by knownboyofno; 09/29/2011 at 10:35 AM. Reason: missed UN in uninstallable
knownboyofno is online now   Reply With Quote
Old 09/29/2011, 08:08 AM   #4 (permalink)
Member
 
Join Date: Dec 2007
Posts: 20
Likes Received: 1
Thanks: 8
Thanked 2 Times in 2 Posts
Default

awesome work, this will make a lot of people happy
hoopsta1423 is offline   Reply With Quote
Old 09/29/2011, 10:22 AM   #5 (permalink)
Member
 
crawfpm's Avatar
 
Join Date: Jul 2005
Posts: 130
Likes Received: 2
Thanks: 24
Thanked 10 Times in 9 Posts
Default

I tried editing the file myself but it did not work well so I made a copy of my unedited file and then copied in your file, worked much better. THANKS!
__________________
Pilot 5000, PalmPilot Personal, Palm III, Palm IIIx, TRGPro, HandEra 330, Kyocera 7135, Treo 600, 650, 700p, 755, Pre Plus and Pre 2/Touchpad.
crawfpm is offline   Reply With Quote
Old 09/29/2011, 10:31 AM   #6 (permalink)
Member
 
Join Date: Aug 2011
Posts: 275
Likes Received: 21
Thanks: 14
Thanked 58 Times in 37 Posts
Default

Quote:
Originally Posted by crawfpm View Post
I tried editing the file myself but it did not work well so I made a copy of my unedited file and then copied in your file, worked much better. THANKS!
What did you mean it didn't work? Like how did you edit it and did you do a restart after the edit? Stuff like that just trying to make the process easier for people.
knownboyofno is online now   Reply With Quote
Old 09/29/2011, 10:53 AM   #7 (permalink)
Member
 
crawfpm's Avatar
 
Join Date: Jul 2005
Posts: 130
Likes Received: 2
Thanks: 24
Thanked 10 Times in 9 Posts
Default

I suspect I just typed something incorrectly. I edited via Internalz but wasn't sure how to do tabs or line returns. When I restarted my device after editing the file, I opened QO then went to open an acrobat file but they were semi grayed out and not able to be opened. When I copied your file over to the proper location and restarted the device, I could open the files just fine.
__________________
Pilot 5000, PalmPilot Personal, Palm III, Palm IIIx, TRGPro, HandEra 330, Kyocera 7135, Treo 600, 650, 700p, 755, Pre Plus and Pre 2/Touchpad.
crawfpm is offline   Reply With Quote
Old 09/29/2011, 10:56 AM   #8 (permalink)
Member
 
Join Date: Aug 2011
Posts: 275
Likes Received: 21
Thanks: 14
Thanked 58 Times in 37 Posts
Default

Quote:
Originally Posted by crawfpm View Post
I suspect I just typed something incorrectly. I edited via Internalz but wasn't sure how to do tabs or line returns. When I restarted my device after editing the file, I opened QO then went to open an acrobat file but they were semi grayed out and not able to be opened. When I copied your file over to the proper location and restarted the device, I could open the files just fine.
Yea, I had that happen several times because of a missing comma or similar. But make tabs the old way(typewriter way) just pressing spaces until you get what you want. Happy it works.
knownboyofno is online now   Reply With Quote
Old 09/29/2011, 02:22 PM   #9 (permalink)
zc1
Member
 
Join Date: Aug 2011
Posts: 90
Likes Received: 11
Thanks: 17
Thanked 17 Times in 12 Posts
Default

Excellent patch. Thanks much. If you add a donate button I will gladly contribute.
zc1 is offline   Reply With Quote
Old 09/30/2011, 12:16 AM   #10 (permalink)
Member
 
Join Date: Aug 2011
Posts: 275
Likes Received: 21
Thanks: 14
Thanked 58 Times in 37 Posts
Default

Quote:
Originally Posted by zc1 View Post
Excellent patch. Thanks much. If you add a donate button I will gladly contribute.
No problem...just doing what I can. I am working on any update on making the number easier to see. I will update the OP shortly.
knownboyofno is online now   Reply With Quote
Old 09/30/2011, 06:20 AM   #11 (permalink)
Member
 
Join Date: Sep 2011
Posts: 2
Likes Received: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Default

great...just registered to get this and say thx. I'd also join the others in a small PayPal donation if you add a donate button.

now...any chance you can make a zoom button? :-)
saranta is offline   Reply With Quote
Old 09/30/2011, 09:06 AM   #12 (permalink)
Member
 
Join Date: Aug 2011
Posts: 275
Likes Received: 21
Thanks: 14
Thanked 58 Times in 37 Posts
Default

Quote:
Originally Posted by saranta View Post
great...just registered to get this and say thx. I'd also join the others in a small PayPal donation if you add a donate button.

now...any chance you can make a zoom button? :-)
If you would have oddly waited a few hours I have an update to the patch. I will update the 1st post now.
knownboyofno is online now   Reply With Quote
Old 09/30/2011, 11:30 AM   #13 (permalink)
Member
 
Join Date: Sep 2011
Posts: 16
Likes Received: 0
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Thanks, worked for me.

Now if only my manuals had page numbers in the index I'd be all set. I need to search within the document for a phrase or section, ie. 3-14.02

Slowly but surely this pitiful PDF viewer is becoming useful thanks to you guys.
johnvan is offline   Reply With Quote
Old 09/30/2011, 11:50 AM   #14 (permalink)
Member
 
Join Date: Aug 2011
Posts: 275
Likes Received: 21
Thanks: 14
Thanked 58 Times in 37 Posts
Default

Quote:
Originally Posted by johnvan View Post
Thanks, worked for me.

Now if only my manuals had page numbers in the index I'd be all set. I need to search within the document for a phrase or section, ie. 3-14.02

Slowly but surely this pitiful PDF viewer is becoming useful thanks to you guys.
Which one did you use? I am checking everything is working. I would like everybody to let me know if they got it working or if they would like any other change for this patch.
knownboyofno is online now   Reply With Quote
Old 09/30/2011, 12:04 PM   #15 (permalink)
Member
 
Join Date: Sep 2011
Posts: 2
Likes Received: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by knownboyofno View Post
If you would have oddly waited a few hours I have an update to the patch. I will update the 1st post now.
so is the updated patch just for the white background?
saranta is offline   Reply With Quote
Old 09/30/2011, 12:33 PM   #16 (permalink)
Member
 
Join Date: Aug 2011
Posts: 275
Likes Received: 21
Thanks: 14
Thanked 58 Times in 37 Posts
Default

yea for better readability I believe.
knownboyofno is online now   Reply With Quote
Old 09/30/2011, 01:19 PM   #17 (permalink)
Member
 
Join Date: Sep 2011
Posts: 16
Likes Received: 0
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by knownboyofno View Post
Which one did you use? I am checking everything is working. I would like everybody to let me know if they got it working or if they would like any other change for this patch.
I used the white.
johnvan is offline   Reply With Quote
Old 09/30/2011, 01:43 PM   #18 (permalink)
Member
 
Join Date: Aug 2011
Posts: 275
Likes Received: 21
Thanks: 14
Thanked 58 Times in 37 Posts
Default

Quote:
Originally Posted by johnvan View Post
I used the white.
Good wanted to make sure both are working.
knownboyofno is online now   Reply With Quote
Old 09/30/2011, 08:29 PM   #19 (permalink)
Member
 
Join Date: Sep 2011
Posts: 4
Likes Received: 0
Thanks: 2
Thanked 0 Times in 0 Posts
Default

OMG ! Just installed the patch - makes the PDF reader usable (some of my books 1,000 pages or so and I always wanted to go near the end ). The only hard part was trying to figure out how to install Internalz- seems alot of info on that app is out of date, using Preware was the way to go.
adarkstar is offline   Reply With Quote
Old 10/01/2011, 12:46 AM   #20 (permalink)
Member
 
Join Date: Aug 2011
Posts: 275
Likes Received: 21
Thanks: 14
Thanked 58 Times in 37 Posts
Default

Quote:
Originally Posted by adarkstar View Post
OMG ! Just installed the patch - makes the PDF reader usable (some of my books 1,000 pages or so and I always wanted to go near the end ). The only hard part was trying to figure out how to install Internalz- seems alot of info on that app is out of date, using Preware was the way to go.
I am happy it all worked out for you.
knownboyofno is online now   Reply With Quote
Reply

 

Tags
goto, page, pdf

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0