aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: 1 [2] 3 4

Author Topic: AJAX skin with xslt stylesheet  (Read 61387 times)

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: AJAX skin with xslt stylesheet
« Reply #15 on: March 19, 2010, 09:44:05 PM »

I'm getting only text with firefox.  :(
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #16 on: March 19, 2010, 09:47:45 PM »

I only styled the transfers page. The other two are without css and much more basic. I created those to test and learn about xslt. The links to downloads & uploads will be gone soon :D
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: AJAX skin with xslt stylesheet
« Reply #17 on: March 19, 2010, 10:11:36 PM »

I'm getting only text with firefox on the transfers page.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #18 on: March 19, 2010, 10:27:26 PM »

Hmm well I normally never use Firefox and especially downloaded it for testing & developing this skin because it is a browser many people use.  I try to have the skin working on both Firefox and Opera. As a sideeffect I do have the newest version of Firefox installed but I don't know how important that is. If the css isn't loaded then effectively you would have only text so I think that's where things go wrong. Maybe you could try removing every line containing border-radius fom transfers.css . Those are css3 and are only used to get rounded corners on the progress bars.

The webserver does tend to not serve files if it isn't pampered enough it seems. I also noticed frequent crashes of it with this skin. Sometimes it just sits there and doesn't respond. (I'm using 2.2.6 with the xml-types patch btw.)

Anyway, here's a new version that can also cancel your downloads. Just tested on FF 3.6 and Opera 10.51
Logged

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #19 on: March 20, 2010, 12:48:46 PM »

Stu, could you further explain what you see on the page?

Only the title? --> xslt didn't work
Only title and table headers? --> xml/php didn't work
Only plain text without colours and progressbars? --> css wasn't loaded
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: AJAX skin with xslt stylesheet
« Reply #20 on: March 20, 2010, 06:54:51 PM »

With your latest files I get it running.
But it displays only, I can't do anything.
And I'm getting a lot of
Code: [Select]
/**
 * This is to generate an xml file which contains the output of
 * amule_load_vars("downloads"). Also including an xml scheme and stylesheet if
 * possible. Otherwise, javascript can handle it in a separate page with ajax.
 PHP Error: Function [ header ] is not defined
in the console.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #21 on: March 20, 2010, 09:14:41 PM »

Okay, this is an odd one for me too. Javascript obviously works, otherwise the page wouldn't load at all. What I can think of is that maybe you have a longer mouse-down than me. If the page refreshes during a click it gets lost. I'll change all the onclick events to onmouseup later. For now maybe could you test by changing the refresh rate of the page? It is done by editing line 259 (near the end of the file) of transfers.html. var timeout = 5 should set it to 5 seconds time between loads.

I'll also edit the skin to remove the noise in console.
« Last Edit: March 20, 2010, 09:16:22 PM by woutermense »
Logged

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #22 on: March 20, 2010, 09:46:19 PM »

OK, that was a quick edit. Updated so mouse clicks can't get lost anymore. Also no more chatter in console.

Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: AJAX skin with xslt stylesheet
« Reply #23 on: March 20, 2010, 09:52:56 PM »

I can click on the headers to sort the columns (it is confusing that there is no indication what is clickable and what isn't), but I have to hold down the button for more than a second sometimes for it to work.
I didn't find anything else to do, except for canceling a download (which could use a confirmation).

(installing update)
With your update click reaction has become worse actually. Before it worked by long holding clicked, now it's random. Sometimes it works, more often not. Chatter in console remains unchanged.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #24 on: March 20, 2010, 10:45:30 PM »

Ok that puzzles me. For me, long/slow clicks were guaranteed to fail every time using the old method (onclick). Short ones had a higher chance. Using the new method (onmouseup), they work every time both in FF and Opera. Short clicks, long clicks, dragging clicks. (Even right clicks, will fix that later)

However, I did manage to indicate the control surfaces a little more obvious. How does a hand pointer  and  underline on hover work for you? I also added a confirmation to the delete control.
« Last Edit: March 20, 2010, 10:58:13 PM by woutermense »
Logged

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #25 on: March 20, 2010, 11:44:11 PM »

Just checked out Google Chrome and Safari. Seems they both can't do math (rounding errors in speed display). This gives a very jumpy display going from 10 to 9.9999999999 and stuff.

I hope all these browsers won't start to bite eachother though, never had this many installed :)

-edit-

Fixed rounding.
« Last Edit: March 21, 2010, 12:34:25 AM by woutermense »
Logged

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #26 on: March 22, 2010, 04:42:51 PM »

Just a quick question here. I edited the amuleweb-php wiki page a little but I'm not sure if my statements there are 100%. When you do amuleweb_load_vars("downloads"),

Quote
file->status: Indicates the status of the file, where 0 = ready, 1 = empty (?), 2 and 3 = hashing the file, 4 = an error occured, 5 = insufficient disk space, 6 = unknown, never happens, 7 = stopped or paused, 8 = completing (copying the file), 9 = download complete, 10 = allocating full disk space needed for the file. When status = 0, evaluate src_count_xfer, to determine whether the file is currently downloading or waiting. When status = 7, evaluate src_count to distinguish between stopped and paused. A stopped file has 0 sources. A file which has 0 known sources can also be paused but the effect is the same.

Correct? (also what does PS_EMPTY mean in the sourcecode?)
« Last Edit: March 22, 2010, 04:50:11 PM by woutermense »
Logged

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #27 on: March 22, 2010, 06:38:57 PM »

Apparently PS_EMPTY means no complete parts downloaded yet. I think... :)


Sorry for the ultra-multipost but my modify button seems to be missing. Sometimes
« Last Edit: March 22, 2010, 07:07:45 PM by woutermense »
Logged

woutermense

  • Full Member
  • ***
  • Karma: 18
  • Offline Offline
  • Posts: 154
Re: AJAX skin with xslt stylesheet
« Reply #28 on: March 23, 2010, 09:18:20 PM »

Updates yay :)

  • Did a lot of code cleanup, preparations for reusing code in other pages of the skin mostly.
  • Made a start of the search page, its not functional yet, just design.
  • Removed "completed (MB)" column of downloads table in favour of a sources column.
  • Attempt to better handle mouse events.

Stu Redman, could you please test if this version works better for you? I made a modification where refreshing of the page is stopped after an onmousedown event for a little while. Then when the click is completed the original function is called. Holding down the mouse button < 1 second works best. Longer clicks may work, but I'm not sure of all browsers on all platforms.
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: AJAX skin with xslt stylesheet
« Reply #29 on: March 23, 2010, 10:23:43 PM »

On first run it got stuck quickly and didn't update anymore.
After I restarted the webserver it keeps updating, but I can't click anything anymore.
Mouse cursor keeps changing between arrow, hand and text cursor in a way I don't understand.
Still a lot of
Code: [Select]
/**
 * This is to generate an xml file which contains the output of
 * amule_load_vars("uploads").
 PHP Error: Function [ header ] is not defined
in the console.

It is looking very nice (except for the progress bars which aren't supposed to show just a percent value) and will sure be great when it works.

Edit was disabled after a timeout (15min iirc) as protection against spam.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon
Pages: 1 [2] 3 4