Re: [xwiki-devs] [xwiki-notifications] r19003 - in platform/web/trunk/standard/src/main/webapp: resources/js/xwiki resources/js/xwiki/widgets templates
Hi Sergiu, sdumitriu (SVN) wrote:
Author: sdumitriu Date: 2009-04-23 22:06:46 +0200 (Thu, 23 Apr 2009) New Revision: 19003
Added: platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/widgets/ platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/widgets/jumpToPage.css platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/widgets/jumpToPage.js platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/widgets/modalPopup.css platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/widgets/modalPopup.js Modified: platform/web/trunk/standard/src/main/webapp/templates/javascript.vm Log: XWIKI-3694: Add a reusable ModalPopup javascript widget Done.
For a project I started to work out an integration of modalbox (http://www.wildbit.com/labs/modalbox/), also based on prototype and Scriptaculous's Effects. You can see it in action in XWiki here http://incubator.myxwiki.org/xwiki/bin/view/XWiki/ModalBox While it doesn't have the needed shortcut binding feature, the DOM part of it is pretty powerful (but still pretty lightweight) and it has rock solid browser support. It also has nice options like callbacks on after/before content loading and after/before hiding, the possibility to initialize with content already in the DOM (copying over the elements), automatic height resize based on content, etc. I propose we merge both: we still need our own options here like the keyboard shortcuts and probably more in the future, but for the box display part of it it's IMHO better we take advantage of this library: mature and from which evolution we will be able to benefit. If we agree I'll be willing to do that merge. One comment below:
Modified: platform/web/trunk/standard/src/main/webapp/templates/javascript.vm =================================================================== --- platform/web/trunk/standard/src/main/webapp/templates/javascript.vm 2009-04-23 19:39:22 UTC (rev 19002) +++ platform/web/trunk/standard/src/main/webapp/templates/javascript.vm 2009-04-23 20:06:46 UTC (rev 19003) @@ -10,6 +10,11 @@ ## ## JS Libraries. ## +$xwiki.jsfx.use('js/scriptaculous/effects.js', true) +$xwiki.jsfx.use('js/xwiki/widgets/modalPopup.js', true) +$xwiki.ssfx.use('js/xwiki/widgets/modalPopup.css', true) +$xwiki.jsfx.use('js/xwiki/widgets/jumpToPage.js', true) +$xwiki.ssfx.use('js/xwiki/widgets/jumpToPage.css', true) <script type="text/javascript" src="$xwiki.getSkinFile("js/prototype/prototype.js")"></script> <script type="text/javascript" src="$xwiki.getSkinFile("js/xwiki/xwiki.js", true)"></script> <script type="text/javascript" src="$xwiki.getSkinFile("js/xwiki/compatibility.js", true)"></script>
We should decide on which way we want to include our JS/CSS in templates. I'd say only with (js|ss)fx plugin is ok. Jerome.
_______________________________________________ notifications mailing list notifications@xwiki.org http://lists.xwiki.org/mailman/listinfo/notifications
Jerome Velociter wrote:
Hi Sergiu,
sdumitriu (SVN) wrote:
Author: sdumitriu Date: 2009-04-23 22:06:46 +0200 (Thu, 23 Apr 2009) New Revision: 19003
Added: platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/widgets/ platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/widgets/jumpToPage.css platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/widgets/jumpToPage.js platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/widgets/modalPopup.css platform/web/trunk/standard/src/main/webapp/resources/js/xwiki/widgets/modalPopup.js Modified: platform/web/trunk/standard/src/main/webapp/templates/javascript.vm Log: XWIKI-3694: Add a reusable ModalPopup javascript widget Done.
For a project I started to work out an integration of modalbox (http://www.wildbit.com/labs/modalbox/), also based on prototype and Scriptaculous's Effects.
You can give look up its code here http://github.com/okonet/modalbox/blob/796003b1c4bc237f37847fbc0c5caac4a7c86... Jerome
You can see it in action in XWiki here http://incubator.myxwiki.org/xwiki/bin/view/XWiki/ModalBox
While it doesn't have the needed shortcut binding feature, the DOM part of it is pretty powerful (but still pretty lightweight) and it has rock solid browser support. It also has nice options like callbacks on after/before content loading and after/before hiding, the possibility to initialize with content already in the DOM (copying over the elements), automatic height resize based on content, etc.
I propose we merge both: we still need our own options here like the keyboard shortcuts and probably more in the future, but for the box display part of it it's IMHO better we take advantage of this library: mature and from which evolution we will be able to benefit.
If we agree I'll be willing to do that merge.
One comment below:
Modified: platform/web/trunk/standard/src/main/webapp/templates/javascript.vm =================================================================== --- platform/web/trunk/standard/src/main/webapp/templates/javascript.vm 2009-04-23 19:39:22 UTC (rev 19002) +++ platform/web/trunk/standard/src/main/webapp/templates/javascript.vm 2009-04-23 20:06:46 UTC (rev 19003) @@ -10,6 +10,11 @@ ## ## JS Libraries. ## +$xwiki.jsfx.use('js/scriptaculous/effects.js', true) +$xwiki.jsfx.use('js/xwiki/widgets/modalPopup.js', true) +$xwiki.ssfx.use('js/xwiki/widgets/modalPopup.css', true) +$xwiki.jsfx.use('js/xwiki/widgets/jumpToPage.js', true) +$xwiki.ssfx.use('js/xwiki/widgets/jumpToPage.css', true) <script type="text/javascript" src="$xwiki.getSkinFile("js/prototype/prototype.js")"></script> <script type="text/javascript" src="$xwiki.getSkinFile("js/xwiki/xwiki.js", true)"></script> <script type="text/javascript" src="$xwiki.getSkinFile("js/xwiki/compatibility.js", true)"></script>
We should decide on which way we want to include our JS/CSS in templates. I'd say only with (js|ss)fx plugin is ok.
Jerome.
_______________________________________________ notifications mailing list notifications@xwiki.org http://lists.xwiki.org/mailman/listinfo/notifications
_______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
Jerome Velociter wrote:
Modified: platform/web/trunk/standard/src/main/webapp/templates/javascript.vm =================================================================== --- platform/web/trunk/standard/src/main/webapp/templates/javascript.vm 2009-04-23 19:39:22 UTC (rev 19002) +++ platform/web/trunk/standard/src/main/webapp/templates/javascript.vm 2009-04-23 20:06:46 UTC (rev 19003) @@ -10,6 +10,11 @@ ## ## JS Libraries. ## +$xwiki.jsfx.use('js/scriptaculous/effects.js', true) +$xwiki.jsfx.use('js/xwiki/widgets/modalPopup.js', true) +$xwiki.ssfx.use('js/xwiki/widgets/modalPopup.css', true) +$xwiki.jsfx.use('js/xwiki/widgets/jumpToPage.js', true) +$xwiki.ssfx.use('js/xwiki/widgets/jumpToPage.css', true) <script type="text/javascript" src="$xwiki.getSkinFile("js/prototype/prototype.js")"></script> <script type="text/javascript" src="$xwiki.getSkinFile("js/xwiki/xwiki.js", true)"></script> <script type="text/javascript" src="$xwiki.getSkinFile("js/xwiki/compatibility.js", true)"></script>
We should decide on which way we want to include our JS/CSS in templates. I'd say only with (js|ss)fx plugin is ok.
I don't know, this will create a stronger dependency on the plugin. Are we 100% sure we want that? I guess that if a sysadmin decides to remove the js plugins, then he can also replace these calls with <script> tags, too, so I don't think that this is a severe problem. using jsfx seems better to me, too. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Sergiu Dumitriu wrote:
Jerome Velociter wrote:
Modified: platform/web/trunk/standard/src/main/webapp/templates/javascript.vm =================================================================== --- platform/web/trunk/standard/src/main/webapp/templates/javascript.vm 2009-04-23 19:39:22 UTC (rev 19002) +++ platform/web/trunk/standard/src/main/webapp/templates/javascript.vm 2009-04-23 20:06:46 UTC (rev 19003) @@ -10,6 +10,11 @@ ## ## JS Libraries. ## +$xwiki.jsfx.use('js/scriptaculous/effects.js', true) +$xwiki.jsfx.use('js/xwiki/widgets/modalPopup.js', true) +$xwiki.ssfx.use('js/xwiki/widgets/modalPopup.css', true) +$xwiki.jsfx.use('js/xwiki/widgets/jumpToPage.js', true) +$xwiki.ssfx.use('js/xwiki/widgets/jumpToPage.css', true) <script type="text/javascript" src="$xwiki.getSkinFile("js/prototype/prototype.js")"></script> <script type="text/javascript" src="$xwiki.getSkinFile("js/xwiki/xwiki.js", true)"></script> <script type="text/javascript" src="$xwiki.getSkinFile("js/xwiki/compatibility.js", true)"></script>
We should decide on which way we want to include our JS/CSS in templates. I'd say only with (js|ss)fx plugin is ok.
I don't know, this will create a stronger dependency on the plugin. Are we 100% sure we want that?
I guess that if a sysadmin decides to remove the js plugins, then he can also replace these calls with <script> tags, too, so I don't think that this is a severe problem. using jsfx seems better to me, too.
Also, with jsfx is the order in which the resulting script tags are written down deterministic ? Is it First In First Out ? If not then it's probably too dangerous.
Jerome Velociter wrote:
Sergiu Dumitriu wrote:
Jerome Velociter wrote:
We should decide on which way we want to include our JS/CSS in templates. I'd say only with (js|ss)fx plugin is ok.
I don't know, this will create a stronger dependency on the plugin. Are we 100% sure we want that?
I guess that if a sysadmin decides to remove the js plugins, then he can also replace these calls with <script> tags, too, so I don't think that this is a severe problem. using jsfx seems better to me, too.
Also, with jsfx is the order in which the resulting script tags are written down deterministic ? Is it First In First Out ? If not then it's probably too dangerous.
It uses a Set interface, which internally is a LinkedHashSet. From the javadoc: "This linked list defines the iteration ordering, which is the order in which elements were inserted into the set (insertion-order). Note that insertion order is not affected if an element is re-inserted into the set." So the order is right. -- Sergiu Dumitriu http://purl.org/net/sergiu/
participants (2)
-
Jerome Velociter -
Sergiu Dumitriu