Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
28 Mar 2012 at 03:31 UTC
Updated:
17 Apr 2012 at 00:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
litwol commentedThings to note:
* I've converted js/*.js files to use .once() to the best of my understanding, except stylizer.js
* stylizer.js is relatively more complicated than other files, so i am leaving it to be tackled last once i receive confirmation that changes i've introduced to other files are on the correct track.
* Be thorough when reviewing & testing this patch as I have negligible experience with ctools js [framework?].
* this patch is a little longer than it should have been due to realigned code blocks after removing/introducing new scope ({}) blocks.
Comment #2
tim.plunkettFrom the patch context, its not clear why this was changed.
This is now indented too far
Maybe this is a good section for
var $this = $(this);since its used 4 timesPossibly here too? $(this) is used twice, as well as $(button) which is the same.
And 3 times here as well.
Nice clean-up!
Comment #3
litwol commented* Stylizer.js still largely unchanged. still needs to be addressed with .once() rewrite.
* integrated above feedback
Comment #4
merlinofchaos commentedShould probably use ctools-dependent rather than just ctools -- too much risk of accidental collision. It should probably never have been 'ctools-processed' in the first place.
Comment #5
litwol commentedMinor patch update, integrating feedback from #4.
Next i will upload converted stylizer.js.
Comment #6
litwol commentedas per conversation on irc, stylizer.js is not to be addressed as part of this patch. there is other work that needs to be done on stylizer.js before (if ever) converting it to .once(). more info here: #1275992: Removing anonymous functions in stylizer.js
Comment #7
tim.plunkettCommitted!
http://drupalcode.org/project/ctools.git/commit/5d7edd1
Thanks litwol.