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(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/notifications