Hmm the idea is in principle right.. BUT I want to see the current content fade. See as long as the content is exchanged nothing, and then have it come up. Now tell me how to do that with you approach. If I fade first and then let the updater run, I can not be sure in which state the fading currently is when it completes. So it might be that the content is replaced while it is fading. Or if the Ajax stuff takes ages: the old content is gone, but no new there. We see a blank screen until ajax completes. These three things have to run in sequence to give the expected result. Fabian PS: my IE 7 seems not be able to alpha-filter-fade a <div> that contains a <ul>.... -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of jaimz Sent: Mittwoch, 19. Juli 2006 00:20 To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails-spinoffs] script.aculo.us effect to update elements here''s an idea!.. instead of programming as if it were BASIC... dothis1 dothis2 dothis3 why don''t you make it fade, then run the updater, then put the appear effect on the onSuccess event of the updater.. seems quite logical to me. -Jaimz -----Original message----- From: "Fabian Lange" Fabian.Lange-S0/GAf8tV78@public.gmane.org Date: Tue, 18 Jul 2006 16:46:07 -0400 To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] script.aculo.us effect to update elements> Hi, > perhaps I am overseeing this but it seems that there is no easy way to set > up a queue with two effects (fade and appear) and in between exchange the > content. > So I have an application with static layout and just want to animate the > exchange of the content from the main div. > > So I wrote my own effect. The nice thing is that this is now queue able. > > Effect.Updater = Class.create(); > Object.extend(Object.extend(Effect.Updater.prototype, > Effect.Base.prototype), { > initialize: function(element) { > this.element = $(element); > var options = Object.extend({ > duration: 0.001, > newContent: '''' > }, arguments[1] || {}); > this.start(options); > }, > loop: function(timePos) { > if(timePos >= this.startOn) { > Element.update(this.element,this.options.newContent); > this.cancel(); > return; > } > } > }); > > So I can now put this to the method I pass to onComplete of Ajax.Request > > function reload_content(ajax){ > el = $(''content''); > new Effect.Fade(el,{queue:''front''}); > new Effect.Updater(el,{newContent:ajax.responseText,queue:''end''}); > new Effect.Appear(el,{queue:''end''}); > } > > Is there a better way to accomplish this? If not, then I might contribute > this when I figure out how the version control system works :) > > > Br > Fabian > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
can i see this in action ? im not sure how to impliment this.. LOL On 7/18/06, Fabian Lange <Fabian.Lange-S0/GAf8tV78@public.gmane.org> wrote:> > Hmm the idea is in principle right.. BUT > I want to see the current content fade. See as long as the content is > exchanged nothing, and then have it come up. > > Now tell me how to do that with you approach. If I fade first and then let > the updater run, I can not be sure in which state the fading currently is > when it completes. So it might be that the content is replaced while it is > fading. > Or if the Ajax stuff takes ages: the old content is gone, but no new > there. > We see a blank screen until ajax completes. > > These three things have to run in sequence to give the expected result. > > Fabian > > PS: my IE 7 seems not be able to alpha-filter-fade a <div> that contains a > <ul>.... > > > -----Original Message----- > From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of jaimz > Sent: Mittwoch, 19. Juli 2006 00:20 > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails-spinoffs] script.aculo.us effect to update elements > > here''s an idea!.. > > instead of programming as if it were BASIC... > > dothis1 > dothis2 > dothis3 > > why don''t you make it fade, then run the updater, then put the appear > effect > on the onSuccess event of the updater.. > > seems quite logical to me. > > -Jaimz > -----Original message----- > From: "Fabian Lange" Fabian.Lange-S0/GAf8tV78@public.gmane.org > Date: Tue, 18 Jul 2006 16:46:07 -0400 > To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: [Rails-spinoffs] script.aculo.us effect to update elements > > > Hi, > > perhaps I am overseeing this but it seems that there is no easy way to > set > > up a queue with two effects (fade and appear) and in between exchange > the > > content. > > So I have an application with static layout and just want to animate the > > exchange of the content from the main div. > > > > So I wrote my own effect. The nice thing is that this is now queue able. > > > > Effect.Updater = Class.create(); > > Object.extend(Object.extend(Effect.Updater.prototype, > > Effect.Base.prototype), { > > initialize: function(element) { > > this.element = $(element); > > var options = Object.extend({ > > duration: 0.001, > > newContent: '''' > > }, arguments[1] || {}); > > this.start(options); > > }, > > loop: function(timePos) { > > if(timePos >= this.startOn) { > > Element.update(this.element,this.options.newContent); > > this.cancel(); > > return; > > } > > } > > }); > > > > So I can now put this to the method I pass to onComplete of Ajax.Request > > > > function reload_content(ajax){ > > el = $(''content''); > > new Effect.Fade(el,{queue:''front''}); > > new Effect.Updater(el,{newContent:ajax.responseText,queue:''end''}); > > new Effect.Appear(el,{queue:''end''}); > > } > > > > Is there a better way to accomplish this? If not, then I might > contribute > > this when I figure out how the version control system works :) > > > > > > Br > > Fabian > > > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- "I have learned that you should''nt compare yourself to others - they are more screwed up than you think." ...unknown "In the 60''s, people took acid to make the world weird. Now the world is weird and people take Prozac to make it normal." ..unknown _____________________________ Terry Remsik stripe-man.dyndns.org remsikt-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
here''s an idea!.. instead of programming as if it were BASIC... dothis1 dothis2 dothis3 why don''t you make it fade, then run the updater, then put the appear effect on the onSuccess event of the updater.. seems quite logical to me. -Jaimz -----Original message----- From: "Fabian Lange" Fabian.Lange-S0/GAf8tV78@public.gmane.org Date: Tue, 18 Jul 2006 16:46:07 -0400 To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] script.aculo.us effect to update elements> Hi, > perhaps I am overseeing this but it seems that there is no easy way to set > up a queue with two effects (fade and appear) and in between exchange the > content. > So I have an application with static layout and just want to animate the > exchange of the content from the main div. > > So I wrote my own effect. The nice thing is that this is now queue able. > > Effect.Updater = Class.create(); > Object.extend(Object.extend(Effect.Updater.prototype, > Effect.Base.prototype), { > initialize: function(element) { > this.element = $(element); > var options = Object.extend({ > duration: 0.001, > newContent: '''' > }, arguments[1] || {}); > this.start(options); > }, > loop: function(timePos) { > if(timePos >= this.startOn) { > Element.update(this.element,this.options.newContent); > this.cancel(); > return; > } > } > }); > > So I can now put this to the method I pass to onComplete of Ajax.Request > > function reload_content(ajax){ > el = $(''content''); > new Effect.Fade(el,{queue:''front''}); > new Effect.Updater(el,{newContent:ajax.responseText,queue:''end''}); > new Effect.Appear(el,{queue:''end''}); > } > > Is there a better way to accomplish this? If not, then I might contribute > this when I figure out how the version control system works :) > > > Br > Fabian > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs