-
1. Re: JBPORTAL-1978 : scriptaculous & prototype js
theute Aug 18, 2008 9:41 AM (in response to chuaky)Scriptaculous had to be rolledback because the upgrade broke the Drag And Drop feature of the dashboard.
Wesley didn't find the time yet to find what changed that broke the DnD so for now there is no solution.
If you are willing to look at the issues, i would be very glad :) -
2. Re: JBPORTAL-1978 : scriptaculous & prototype js
chuaky Aug 18, 2008 1:07 PM (in response to chuaky)oic, i try to see if by loading the new scriptaculous and prototype js from portal headers can be a workaround.
If i can find wat cause the problem, i would post it :)
Thanks Thomas. -
3. Re: JBPORTAL-1978 : scriptaculous & prototype js
chuaky Aug 18, 2008 10:27 PM (in response to chuaky)hi,
I try to manually add the scriptaculous.js into the header-content of the jboss-portlet.xml but got "resource not register" error. Guess, i would fall back to 2.6.5.SP1 :(
Thanks. -
4. Re: JBPORTAL-1978 : scriptaculous & prototype js
wesleyhales Aug 18, 2008 11:10 PM (in response to chuaky)Please refer to https://jira.jboss.org/jira/browse/JBPORTAL-2047
I started to track the problem but was not able to finish. Like Thomas said, if you want to further investigate until our time frees up, it would be much appreciated. -
5. Re: JBPORTAL-1978 : scriptaculous & prototype js
cpage Nov 25, 2008 8:49 AM (in response to chuaky)I use prototype 1.6.0.2 and scriptaculous 1.8.1 with Portal 2.6.6 and DnD is ok for me in IE7, FF2 and FF3. I have made changes only in dyna.js.
I have changed lot of things in Portal java code so i don't know if these changes in js will be ok for everyone.
The 5 lines in dyna.js :
replace line 27 :
var regions_on_page = document.getElementsByClassName("dnd-region");
by :
var regions_on_page = $$(".dnd-region");
replace line 221 :
var srcs = Element.getElementsByClassName(srcContainer, className);
by :
var srcs = srcContainer.select("." + className);
replace line 227 :
var dsts = Element.getElementsByClassName(dstContainer, className)
by :
var dsts = dstContainer.select("." + className);
replace line 306 :
var regions_on_page = document.getElementsByClassName("dnd-region");
by :
var regions_on_page = $$(".dnd-region");
replace line 321 :
var portlets_on_page = document.getElementsByClassName("partial-refresh-window");
by :
var portlets_on_page = $$(".partial-refresh-window"); -
6. Re: JBPORTAL-1978 : scriptaculous & prototype js
theute Nov 25, 2008 11:08 AM (in response to chuaky)Sounds great ! Thanks a bunch !
Adding this to the Jira in your name -
7. Re: JBPORTAL-1978 : scriptaculous & prototype js
wesleyhales Nov 25, 2008 12:49 PM (in response to chuaky)This is in 2.7 trunk. Thanks!
-
8. Re: JBPORTAL-1978 : scriptaculous & prototype js
wesleyhales Nov 25, 2008 8:25 PM (in response to chuaky)btw, I checked the code to see where drag and drop was failing and the only relevant change is the one at line 306 :
var regions_on_page = $$(".dnd-region");
Prototype uses the double dollar sign to getElementByClassNames but when you do this manually using the document.getElementByClassNames() js function the "drop" in drag and drop stops working.
It even returns the proper elements but for some reason the followinf for loop using Sortable.create does not handle the element... weird. -
9. Re: JBPORTAL-1978 : scriptaculous & prototype js
cpage Nov 26, 2008 6:10 AM (in response to chuaky)Indeed, FF3 implements the new function getElementsByClassName but return NodeList instead of Array.
I replaced also "Element.getElementsByClassName" because i had pb with the changes between view and edit modes (there was no refresh of the portlet content). -
10. Re: JBPORTAL-1978 : scriptaculous & prototype js
dkrieger Nov 27, 2008 12:53 AM (in response to chuaky)Its a little disheartening to hear that when I reported this way back in June it went completely ignored:
https://jira.jboss.org/jira/browse/JBPORTAL-2035
But i'm glad at least now I don't have to worry about manually updating dyna.js with each release... -
11. Re: JBPORTAL-1978 : scriptaculous & prototype js
theute Nov 27, 2008 2:12 AM (in response to chuaky)Sorry about that Dan :(
Not trying to justify but for some reason it got assigned to the wrong component CMS, so to the wrong person and also classified as "optional".
Hopefully this won't happen again and we won't loose any contribution anymore.
Thanks