Hi all, I''m making an Amy Hoy style tip sheet PDF for the Prototype and Scriptaculous AJAX stuff, to be used with Rails. Are there other resources you would suggest besides the websites themselves (the previous thread about Highlight reminded me of this)? Is there a particular focus that would be helpful for such a document? Preferred fonts or colors? I must say, once you get the hang of integrating the AJAX stuff, it''s quite addictive! Incidentally I thought of an idea - I''ve set the cursor change like on the scriptaculous site, to indicate where one can drag an image or whatever. But I wonder, has anyone figured out a good way to integrate the "busy" cursor? It might be neat if after you drag a DIV, the cursor changed to busy until Rails acknowledged the change. Does that make sense? Probably with some Javascript and CSS magic, this could be done, and I think it''s those little things that bring us much closer to the feel of a desktop app. Just a thought. Best, Raymond
Michael Schuerig
2005-Jul-12 16:25 UTC
[Rails-spinoffs] Changing the cursor (was: Tip Sheet for AJAX)
On Tuesday 12 July 2005 20:10, Raymond Brigleb wrote:> But I wonder, has anyone figured out a good way to > integrate the "busy" cursor? It might be neat if after you drag a > DIV, the cursor changed to busy until Rails acknowledged the change. > Does that make sense? Probably with some Javascript and CSS magic, > this could be done, and I think it''s those little things that bring > us much closer to the feel of a desktop app. Just a thought.Below is some code I''m using. It dynamically adds and removes a style declaration to/from the document head. BoilerPlate.Cursor = { setCursor: function(cursor) { var head = document.getElementsByTagName(''head'')[0]; if (!head) { return; } BoilerPlate.Cursor.resetCursor(); var cursorEl = document.createElement(''style''); cursorEl.appendChild(document.createTextNode( ''* { cursor: '' + cursor + '' !important }'')); head.appendChild(cursorEl); BoilerPlate.Cursor.cursorStyleElement = cursorEl; }, resetCursor: function() { if (BoilerPlate.Cursor.cursorStyleElement) { var parent = BoilerPlate.Cursor.cursorStyleElement.parentNode; if (parent) { parent.removeChild(BoilerPlate.Cursor.cursorStyleElement); } BoilerPlate.Cursor.cursorStyleElement = undefined; } } }; Somewhere before triggering the AJAX request, I call BoilerPlate.Cursor.setCursor(''wait''). Then, in a AJAX complete handler BoilerPlate.Cursor.resetCursor() has to be called. Michael -- Michael Schuerig The Fifth Rider of the Apocalypse mailto:michael@schuerig.de is a programmer. http://www.schuerig.de/michael/
Duane Johnson
2005-Jul-12 16:52 UTC
[Rails-spinoffs] Changing the cursor (was: Tip Sheet for AJAX)
On Jul 12, 2005, at 2:58 PM, Michael Schuerig wrote:> On Tuesday 12 July 2005 20:10, Raymond Brigleb wrote: > > >> But I wonder, has anyone figured out a good way to >> integrate the "busy" cursor? It might be neat if after you drag a >> DIV, the cursor changed to busy until Rails acknowledged the change. >> Does that make sense? Probably with some Javascript and CSS magic, >> this could be done, and I think it''s those little things that bring >> us much closer to the feel of a desktop app. Just a thought. >> > > Below is some code I''m using. It dynamically adds and removes a style > declaration to/from the document head. > > BoilerPlate.Cursor = { > setCursor: function(cursor) { > var head = document.getElementsByTagName(''head'')[0]; > if (!head) { > return; > } > BoilerPlate.Cursor.resetCursor(); > var cursorEl = document.createElement(''style''); > cursorEl.appendChild(document.createTextNode( > ''* { cursor: '' + cursor + '' !important }'')); > head.appendChild(cursorEl); > BoilerPlate.Cursor.cursorStyleElement = cursorEl; > }, > > resetCursor: function() { > if (BoilerPlate.Cursor.cursorStyleElement) { > var parent = BoilerPlate.Cursor.cursorStyleElement.parentNode; > if (parent) { > parent.removeChild(BoilerPlate.Cursor.cursorStyleElement); > } > BoilerPlate.Cursor.cursorStyleElement = undefined; > } > } > }; > > Somewhere before triggering the AJAX request, I call > BoilerPlate.Cursor.setCursor(''wait''). Then, in a AJAX complete handler > BoilerPlate.Cursor.resetCursor() has to be called. > > Michael > > --Wow! To both of you, thank-you for making these contributions. I, too, have felt the Ajax addiction set in... web development is fun again :) Raymond, I really look forward to getting my hands on your tip sheet! Duane Johnson (canadaduane) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails-spinoffs/attachments/20050712/e923978d/attachment.html
On 13/07/2005, at 4:10 AM, Raymond Brigleb wrote:> Incidentally I thought of an idea - I''ve set the cursor change like on > the scriptaculous site, to indicate where one can drag an image or > whatever. But I wonder, has anyone figured out a good way to integrate > the "busy" cursor? It might be neat if after you drag a DIV, the > cursor changed to busy until Rails acknowledged the change. Does that > make sense?Busy cursor means ''Stop whilst I do something'', which is missing the whole point of the A in AJAX. Take your email client. As you type the reply to this email it''s most probably saving a draft copy to disk every 30 seconds. You don''t want to see a busy cursor flash every 30 seconds, you just expect it to do whatever it is that is has to do, without getting in your way or distracting you. If the operation you''re performing only makes sense to be made synchronously then make an SJAX (?) call by setting the relevant async flag in the open method and let the browser be responsible for telling the user that it''s busy. The saving of the sort order of lists in the background using AJAX is, to me, the perfect use-case for asynchronous saving. Anyone going out of their way to impose the "edit, save, wait, see" that users have had to put up with for years should be slapped with a large trout. - tim lucas
Hello, Have a look, let me know what you think. It''s a "beta," I can''t figure out if it should be broken into several pages or what. Seems like there''s an awful lot of detail to go in there... also, any suggestions or corrections would be very much appreciated. http://needmoredesigns.com/public/JavaScriptHelpers-Beta.pdf Thanks, Raymond
Thanks Raymond, On 13/07/2005, at 11:09 AM, Raymond Brigleb wrote:> Have a look, let me know what you think. It''s a "beta," I can''t figure > out if it should be broken into several pages or what. Seems like > there''s an awful lot of detail to go in there... also, any suggestions > or corrections would be very much appreciated. > > http://needmoredesigns.com/public/JavaScriptHelpers-Beta.pdfHere''s my 2c: How about "AJAX on Rails Cheet Sheet" for a title? I''d say kill the "For starters,..." section (if its ''for starters'' why isn''t it in the left column anyways). Same goes for "You can call functions..." (and CDATA is XML, so no good for HTML4). This are just basic HTML know-how anyways. Maybe kill the "." on the name of each effect, put the core and other effects in the one bunch, but somehow visually separated. Also, it would be a good idea to list the required params for the different effects. Also, maybe some little notes on the effects that have requirements like "needs a div inside" and "block level only" - tim lucas
Hello, I''ve updated my PDF "tip sheet" for Ajax and Rails stuff. Would again love any feedback of course. I''ll post the final version next weekend (I would call this a pre-release). I''m thinking it needs to run to two pages, because I haven''t even got the drag-and-drop stuff in there yet, and I''ve completely run out of room! Anything else it seems to be missing? Hope you like it! http://needmoredesigns.com/public/JavaScriptHelpers-Pre.pdf Regards, Raymond
Nice! :) Maybe use some color and borders? Thomas Am 17.07.2005 um 03:35 schrieb Raymond Brigleb:> Hello, > > I''ve updated my PDF "tip sheet" for Ajax and Rails stuff. Would > again love any feedback of course. I''ll post the final version next > weekend (I would call this a pre-release). > > I''m thinking it needs to run to two pages, because I haven''t even > got the drag-and-drop stuff in there yet, and I''ve completely run > out of room! Anything else it seems to be missing? Hope you like it! > > http://needmoredesigns.com/public/JavaScriptHelpers-Pre.pdf > > Regards, > Raymond > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
Should the fact that a width or height be required in IE be mentioned for some of the effects to work? Any of the effects that use the IE opacity filter need a width or a height to work properly. A newbie could find that information quite helpful I think... and this is who this tip sheet is targeting I imagine. http://www.quirksmode.org/css/opacity.html Andrew On 7/17/05, Thomas Fuchs <thomas@fesch.at> wrote:> Nice! :) > > Maybe use some color and borders? > > Thomas > > Am 17.07.2005 um 03:35 schrieb Raymond Brigleb: > > > Hello, > > > > I''ve updated my PDF "tip sheet" for Ajax and Rails stuff. Would > > again love any feedback of course. I''ll post the final version next > > weekend (I would call this a pre-release). > > > > I''m thinking it needs to run to two pages, because I haven''t even > > got the drag-and-drop stuff in there yet, and I''ve completely run > > out of room! Anything else it seems to be missing? Hope you like it! > > > > http://needmoredesigns.com/public/JavaScriptHelpers-Pre.pdf > > > > Regards, > > Raymond > > _______________________________________________ > > Rails-spinoffs mailing list > > Rails-spinoffs@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >