Open GoogleCodeExporter opened 9 years ago
Well, someone beat me to issue #152, so please substitute "Issue #153" where I
mention issue #152 in the descriptions.
Original comment by t...@speednet.biz
on 27 Jul 2009 at 2:35
I have updated the Lottery Post iPhone edition to use the exact code file
(iui.js)
that I have submitted here.
The URL is http://www.lotterypost.com
It allows you to see all of the changes made in this file:
- The animated dialog is used in the Lottery Results section. CLick Lottery
Results, then click the Change button at the top.
- The new scrollTo() code can be viewed in the same section. Scroll far down
the
page listing the various states, and then click one of them. You will see the
smooth scroll occur first, then it goes to the top of the page. (A nice
addition to
the iui code would be to smooth-scroll up to the top instead of using
scrollTo(),
but that's a fight for another day.)
- The onLoad and onPageUpdated events are both used. In particular, you can
see the
effects of the onPageUpdated event, as the toolbar buttons appear and disappear
depending on the page you navigate to. For example, if you navigate to the
home
page you will see the buttons disappear. That is handled in the onPageUpdated
event.
- The _replaceinner functionality is used on the page that displays the current
lottery results. From the Home page, click Lottery Results, then click
Arizona,
then click Powerball. Scroll down to the bottom and you'll see buttons for
Show
Last 10 Drawings and Show Last 10 Jackpots. You will notice that when you
click
those buttons, the buttons are replaced with the new content, rather than
having the
content appended to the page if the normal _replace was used. _replaceinner
replaced the item clicked with the new content.
- Finally, you will notice throughout the site that the URL bar never drops
down as
new pages are loaded, despite the fact that nearly every page is an AJAX load.
That's because all of the AJAX page names in the href attribute are prefixed
with a
hash mark, and the new code submitted here figures out that it is an AJAX page
reference and not an element on the page to load.
Original comment by t...@speednet.biz
on 27 Jul 2009 at 3:02
i attached the patch file...
Original comment by kaisergi...@googlemail.com
on 31 Jul 2009 at 11:34
Attachments:
Thank you kaisergimmel!
By the way, I have downloaded the latest 0.30 beta 1 code and as a test took
the
iui.js file attached to this issue and directly overlaid the iui.js file in the
demo
pages. It worked bug-free (from what I could tell), and the animations for the
dialog were working nicely too.
Original comment by t...@speednet.biz
on 31 Jul 2009 at 2:49
We still need to look at this functionality for 0.40. Not as a monolithic
patch, but we don't want to lose any of
this good stuff. I'm not sure if we should open some other issues for this or
what the approach is. For now, I"m
going to mark this as being part of 0.40.
Original comment by msgilli...@gmail.com
on 8 Sep 2009 at 3:31
I'm looking at this patch today to make sure the extensibility changes to 0.40
will support all the features proposed in this patch.
Since the functionality of the onload and onunload events in this patch can be
implemented just by calling:
addEventListener("load", function) or addEventListener("unload", function) and
using addEventListener allows multiple listeners
whereas iui.onload = function does not, I think it's best to recommend using
addEventListener for this function.
The functionality of onPageUpdated will be added to iui.js, but I'm also
leaning towards using addEventListener with a custom,
synthetic event to implement this. This would also allow multiple listeners.
Original comment by msgilli...@gmail.com
on 13 Sep 2009 at 12:57
thanks, looks cool.
specialy i like feature 5 with the popup.
is it possible to make it also appear from the bottom?
greets
chris
Original comment by ilovesi...@gmail.com
on 13 Sep 2009 at 10:57
Thanks Chris. That dialog is fun to watch gliding in like a native app. I am
sure
that it can be slid from the bottom too, but would require a lot more effort
than
sliding from the top. That's because the bottom of the visible area is not
really
the bottom of the page. Getting the dialog to display is a bit of trickery
that
overlays some elements on the page. When sliding from the top, I can deal in
specific size elements, but with sliding from the bottom the page can be any
length,
and I would somehow need to figure out how to deal with that.
I know that native apps tend to slide the dialog from the bottom, but in
actually
making this work, I found that making it slide at all was very difficult and
filled
with trial-and-error. Then, thinking about accomplishing that from the bottom
was a
bit overwhelming at the time and I considered myself lucky to get it working
the way
it is! :)
I was actually trying to *fade* to black and then do the slide, which worked
great
in the Safari desktop browser, but on the iPhone it was very glitchy. That
would
have been a really nice effect.
Original comment by t...@speednet.biz
on 14 Sep 2009 at 2:17
Original comment by msgilli...@gmail.com
on 26 Sep 2011 at 12:04
Original issue reported on code.google.com by
t...@speednet.biz
on 27 Jul 2009 at 2:34Attachments: