pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)
[personal profile] pauamma2013-04-22 08:03 pm
Entry tags:

jQuery tutorials for perl programmers

http://savage.net.au/jQuery-tutorials.html

I haven't read them yet, and can't vouch for their usefulness, or the knowledge of perl they require. (I suspect YMMV for both, as always.)
purplecat: Hand Drawn picture of a Toy Cat (programming)
[personal profile] purplecat2013-03-27 06:18 pm
Entry tags:

Identifying community administrators in jquery.postform.js

I've been adding a stickies module to the entry post and edit pages as part of my work on Bug 2152 (multiple stickies). I had this set up so that if the user posts to a community all the sticky options quietly vanished and a little message appeared saying you couldn't sticky entries in communities. Unfortunately, as [personal profile] fu pointed out, administrators can sticky entries in communities.

My problem is I have no idea how to identify a community administrator from jquery.postform.js (which is where I'm controlling this from). Is that possible? If not is there an obvious work around?

If the worst comes to the worst I can always have the message direct people to Organise->Manage Accounts->Display but that wouldn't be optimal.
pauamma: Cartooney crab wearing hot pink and acid green facemask holding drink with straw (Default)
[personal profile] pauamma2010-09-01 09:39 pm
Entry tags:

jQuery, need_res, and set_active_resource_group

Is there a Wiki page (or something) on using jQuery on DW? I'm confused on what the group option to need_res is for vs. set_active_resource_group. And I need that info so I can update the TTization page (http://wiki.dwscoalition.org/notes/Routing_and_Template_Toolkit)
jportela: (Default)
[personal profile] jportela2010-07-14 07:27 pm
Entry tags:

Best way to add jQuery to a page

I've been trying to add jQuery support to the poll pages, and I want to know the best way to do this.

I tried to use

LJ::need_res('js/jquery/jquery-1.3.2.min.js');

in cgi-bin/LJ/Poll.pm render method, and doing this did include the jquery library (at least by navigating the source code, the <script> tag was there). However, it appears that I can't use it in htdocs/js/livejournal.js (I wanted to use the initPolls function, to change the submit event on polls), there seems to be a conflict and the script crashes the first time a $ (jquery) is used.

One way around this would be not use the jQuery library at all, but that would mean I would have to serialize the form myself (not very hard, but the jquery implementation would probably be the best).

Please share your thoughts on this, I may be including the jquery library in a very unorthodox way :)
fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
[personal profile] fu2010-07-12 06:55 pm
Entry tags:

jQuery from Novice to Ninja (temporarily free)

In celebration of the world cup, the jQuery book from SitePoint is free today: http://sale.sitepoint.com/. I just grabbed a copy, and I suspect a bunch of you will appreciate one as well *g*

(found via IRC)