Author: fdesbois Date: 2009-08-26 13:58:06 +0200 (Wed, 26 Aug 2009) New Revision: 1 Added: trunk/ trunk/LICENSE.txt trunk/README.txt trunk/TODO.txt trunk/billy-business/ trunk/billy-business/LICENSE.txt trunk/billy-business/README.txt trunk/billy-business/changelog.txt trunk/billy-business/pom.xml trunk/billy-business/src/ trunk/billy-business/src/main/ trunk/billy-business/src/main/java/ trunk/billy-business/src/main/java/org/ trunk/billy-business/src/main/java/org/chorem/ trunk/billy-business/src/main/java/org/chorem/billy/ trunk/billy-business/src/main/java/org/chorem/billy/BillyException.java trunk/billy-business/src/main/java/org/chorem/billy/ContextUtilBilly.java trunk/billy-business/src/main/java/org/chorem/billy/RegisterBillyServices.java trunk/billy-business/src/main/java/org/chorem/billy/business/ trunk/billy-business/src/main/java/org/chorem/billy/external/ trunk/billy-business/src/main/java/org/chorem/billy/external/ImportReferenceUrl.java trunk/billy-business/src/main/java/org/chorem/billy/external/ImportXPIL.java trunk/billy-business/src/main/java/org/chorem/billy/impl/ trunk/billy-business/src/main/java/org/chorem/billy/impl/ServiceClientImpl.java trunk/billy-business/src/main/java/org/chorem/billy/impl/ServiceInvoiceImpl.java trunk/billy-business/src/main/java/org/chorem/billy/persistence/ trunk/billy-business/src/main/java/org/chorem/billy/services/ trunk/billy-business/src/main/resources/ trunk/billy-business/src/main/resources/TopiaContextBilly.properties trunk/billy-business/src/main/resources/log4j.properties trunk/billy-business/src/main/xmi/ trunk/billy-business/src/main/xmi/billy.zargo trunk/billy-business/src/test/ trunk/billy-business/src/test/java/ trunk/billy-business/src/test/java/org/ trunk/billy-business/src/test/java/org/chorem/ trunk/billy-business/src/test/resources/ trunk/billy-business/src/test/resources/TopiaContextBilly.properties trunk/billy-ui/ trunk/billy-ui/LICENSE.txt trunk/billy-ui/README.txt trunk/billy-ui/changelog.txt trunk/billy-ui/nb-configuration.xml trunk/billy-ui/nbactions.xml trunk/billy-ui/pom.xml trunk/billy-ui/profiles.xml trunk/billy-ui/src/ trunk/billy-ui/src/main/ trunk/billy-ui/src/main/java/ trunk/billy-ui/src/main/java/org/ trunk/billy-ui/src/main/java/org/chorem/ trunk/billy-ui/src/main/java/org/chorem/billy/ trunk/billy-ui/src/main/java/org/chorem/billy/ui/ trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/ trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/AbstractErrorManager.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/AbstractEventMixin.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/DataLoader.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/EventMixin.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/GenericSelectModel.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/ trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/BlockManager.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/ClientMessages.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/Layout.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/SubmitContext.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/WindowLink.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/mixins/ trunk/billy-ui/src/main/java/org/chorem/billy/ui/mixins/Confirm.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/mixins/OnEvent.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/mixins/ZoneUpdater.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/pages/ trunk/billy-ui/src/main/java/org/chorem/billy/ui/pages/Index.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/services/ trunk/billy-ui/src/main/java/org/chorem/billy/ui/services/AppModule.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/services/ContextShutdown.java trunk/billy-ui/src/main/java/org/chorem/billy/ui/utils/ trunk/billy-ui/src/main/java/org/chorem/billy/ui/utils/ErrorHelper.java trunk/billy-ui/src/main/resources/ trunk/billy-ui/src/main/resources/log4j.properties trunk/billy-ui/src/main/resources/org/ trunk/billy-ui/src/main/resources/org/chorem/ trunk/billy-ui/src/main/resources/org/chorem/billy/ trunk/billy-ui/src/main/resources/org/chorem/billy/ui/ trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/ trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/BlockManager.tml trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/ClientMessages.tml trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/Layout.properties trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/Layout.tml trunk/billy-ui/src/main/resources/org/chorem/billy/ui/pages/ trunk/billy-ui/src/main/webapp/ trunk/billy-ui/src/main/webapp/Index.tml trunk/billy-ui/src/main/webapp/META-INF/ trunk/billy-ui/src/main/webapp/META-INF/context.xml trunk/billy-ui/src/main/webapp/WEB-INF/ trunk/billy-ui/src/main/webapp/WEB-INF/web.xml trunk/billy-ui/src/main/webapp/css/ trunk/billy-ui/src/main/webapp/css/common.css trunk/billy-ui/src/main/webapp/css/main.css trunk/billy-ui/src/main/webapp/css/window/ trunk/billy-ui/src/main/webapp/css/window/alert.css trunk/billy-ui/src/main/webapp/css/window/alert/ trunk/billy-ui/src/main/webapp/css/window/alert/bottom.gif trunk/billy-ui/src/main/webapp/css/window/alert/bottom_left.gif trunk/billy-ui/src/main/webapp/css/window/alert/bottom_right.gif trunk/billy-ui/src/main/webapp/css/window/alert/left.gif trunk/billy-ui/src/main/webapp/css/window/alert/overlay.png trunk/billy-ui/src/main/webapp/css/window/alert/progress.gif trunk/billy-ui/src/main/webapp/css/window/alert/right.gif trunk/billy-ui/src/main/webapp/css/window/alert/top.gif trunk/billy-ui/src/main/webapp/css/window/alert/top_left.gif trunk/billy-ui/src/main/webapp/css/window/alert/top_right.gif trunk/billy-ui/src/main/webapp/css/window/alert_lite.css trunk/billy-ui/src/main/webapp/css/window/alphacube.css trunk/billy-ui/src/main/webapp/css/window/alphacube/ trunk/billy-ui/src/main/webapp/css/window/alphacube/bottom-left-c.gif trunk/billy-ui/src/main/webapp/css/window/alphacube/bottom-middle.gif trunk/billy-ui/src/main/webapp/css/window/alphacube/bottom-right-c.gif trunk/billy-ui/src/main/webapp/css/window/alphacube/button-close-focus.gif trunk/billy-ui/src/main/webapp/css/window/alphacube/button-max-focus.gif trunk/billy-ui/src/main/webapp/css/window/alphacube/button-min-focus.gif trunk/billy-ui/src/main/webapp/css/window/alphacube/frame-left.gif trunk/billy-ui/src/main/webapp/css/window/alphacube/frame-right.gif trunk/billy-ui/src/main/webapp/css/window/alphacube/left-top.gif trunk/billy-ui/src/main/webapp/css/window/alphacube/right-top.gif trunk/billy-ui/src/main/webapp/css/window/alphacube/top-middle.gif trunk/billy-ui/src/main/webapp/css/window/behavior.htc trunk/billy-ui/src/main/webapp/css/window/darkX.css trunk/billy-ui/src/main/webapp/css/window/darkX/ trunk/billy-ui/src/main/webapp/css/window/darkX/button-close-focused.png trunk/billy-ui/src/main/webapp/css/window/darkX/button-maximize-focused.png trunk/billy-ui/src/main/webapp/css/window/darkX/button-minimize-focused.png trunk/billy-ui/src/main/webapp/css/window/darkX/frame-bottom-left-focused.png trunk/billy-ui/src/main/webapp/css/window/darkX/frame-bottom-mid-focused.png trunk/billy-ui/src/main/webapp/css/window/darkX/frame-bottom-right-focused.png trunk/billy-ui/src/main/webapp/css/window/darkX/frame-left-focused.png trunk/billy-ui/src/main/webapp/css/window/darkX/frame-right-focused.png trunk/billy-ui/src/main/webapp/css/window/darkX/titlebar-left-focused.png trunk/billy-ui/src/main/webapp/css/window/darkX/titlebar-mid-focused.png trunk/billy-ui/src/main/webapp/css/window/darkX/titlebar-right-focused.png trunk/billy-ui/src/main/webapp/css/window/debug.css trunk/billy-ui/src/main/webapp/css/window/default.css trunk/billy-ui/src/main/webapp/css/window/default/ trunk/billy-ui/src/main/webapp/css/window/default/bottom_left.gif trunk/billy-ui/src/main/webapp/css/window/default/bottom_mid.gif trunk/billy-ui/src/main/webapp/css/window/default/bottom_right.gif trunk/billy-ui/src/main/webapp/css/window/default/bottom_right_resize.gif trunk/billy-ui/src/main/webapp/css/window/default/center_left.gif trunk/billy-ui/src/main/webapp/css/window/default/center_right.gif trunk/billy-ui/src/main/webapp/css/window/default/clear.gif trunk/billy-ui/src/main/webapp/css/window/default/close.gif trunk/billy-ui/src/main/webapp/css/window/default/inspect.gif trunk/billy-ui/src/main/webapp/css/window/default/maximize.gif trunk/billy-ui/src/main/webapp/css/window/default/minimize.gif trunk/billy-ui/src/main/webapp/css/window/default/overlay.png trunk/billy-ui/src/main/webapp/css/window/default/resize.gif trunk/billy-ui/src/main/webapp/css/window/default/sizer.gif trunk/billy-ui/src/main/webapp/css/window/default/top_left.gif trunk/billy-ui/src/main/webapp/css/window/default/top_mid.gif trunk/billy-ui/src/main/webapp/css/window/default/top_right.gif trunk/billy-ui/src/main/webapp/css/window/iefix/ trunk/billy-ui/src/main/webapp/css/window/iefix/blank.gif trunk/billy-ui/src/main/webapp/css/window/iefix/iepngfix.css trunk/billy-ui/src/main/webapp/css/window/iefix/iepngfix.htc trunk/billy-ui/src/main/webapp/css/window/lighting.css trunk/billy-ui/src/main/webapp/css/window/lighting/ trunk/billy-ui/src/main/webapp/css/window/lighting/background_buttons.gif trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-left-blue.png trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-left-darkblue.png trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-left-green.png trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-left-grey.png trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-middle-blue.png trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-middle-darkblue.png trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-middle-green.png trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-middle-grey.png trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-right-blue.png trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-right-darkblue.png trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-right-green.png trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-right-grey.png trunk/billy-ui/src/main/webapp/css/window/lighting/button-close-blue.png trunk/billy-ui/src/main/webapp/css/window/lighting/button-close-darkblue.png trunk/billy-ui/src/main/webapp/css/window/lighting/button-close-green.png trunk/billy-ui/src/main/webapp/css/window/lighting/button-close-grey.png trunk/billy-ui/src/main/webapp/css/window/lighting/button-maximize-blue.png trunk/billy-ui/src/main/webapp/css/window/lighting/button-maximize-darkblue.png trunk/billy-ui/src/main/webapp/css/window/lighting/button-maximize-green.png trunk/billy-ui/src/main/webapp/css/window/lighting/button-maximize-grey.png trunk/billy-ui/src/main/webapp/css/window/lighting/button-minimize-blue.png trunk/billy-ui/src/main/webapp/css/window/lighting/button-minimize-darkblue.png trunk/billy-ui/src/main/webapp/css/window/lighting/button-minimize-green.png trunk/billy-ui/src/main/webapp/css/window/lighting/button-minimize-grey.png trunk/billy-ui/src/main/webapp/css/window/lighting/left-blue.png trunk/billy-ui/src/main/webapp/css/window/lighting/left-darkblue.png trunk/billy-ui/src/main/webapp/css/window/lighting/left-green.png trunk/billy-ui/src/main/webapp/css/window/lighting/left-grey.png trunk/billy-ui/src/main/webapp/css/window/lighting/pngbehavior.htc trunk/billy-ui/src/main/webapp/css/window/lighting/right-blue.png trunk/billy-ui/src/main/webapp/css/window/lighting/right-darkblue.png trunk/billy-ui/src/main/webapp/css/window/lighting/right-green.png trunk/billy-ui/src/main/webapp/css/window/lighting/right-grey.png trunk/billy-ui/src/main/webapp/css/window/lighting/spinner.gif trunk/billy-ui/src/main/webapp/css/window/lighting/top-left-blue.png trunk/billy-ui/src/main/webapp/css/window/lighting/top-left-darkblue.png trunk/billy-ui/src/main/webapp/css/window/lighting/top-left-green.png trunk/billy-ui/src/main/webapp/css/window/lighting/top-left-grey.png trunk/billy-ui/src/main/webapp/css/window/lighting/top-middle-blue.png trunk/billy-ui/src/main/webapp/css/window/lighting/top-middle-darkblue.png trunk/billy-ui/src/main/webapp/css/window/lighting/top-middle-green.png trunk/billy-ui/src/main/webapp/css/window/lighting/top-middle-grey.png trunk/billy-ui/src/main/webapp/css/window/lighting/top-right-blue.png trunk/billy-ui/src/main/webapp/css/window/lighting/top-right-darkblue.png trunk/billy-ui/src/main/webapp/css/window/lighting/top-right-green.png trunk/billy-ui/src/main/webapp/css/window/lighting/top-right-grey.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x.css trunk/billy-ui/src/main/webapp/css/window/mac_os_x/ trunk/billy-ui/src/main/webapp/css/window/mac_os_x/B.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/BL.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/BL_Main.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/BR.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/BR_Main.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/B_Main.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/L.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/L_Main.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/R.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/R_Main.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/T.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/TL.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/TL_Main.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/TR.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/TR_Main.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/T_Main.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x/close.gif trunk/billy-ui/src/main/webapp/css/window/mac_os_x/maximize.gif trunk/billy-ui/src/main/webapp/css/window/mac_os_x/minimize.gif trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog.css trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/ trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/B.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/BL.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/BR.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/L.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/R.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/T.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/TL.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/TR.png trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/bg.gif trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/close.gif trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/maximize.gif trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/minimize.gif trunk/billy-ui/src/main/webapp/css/window/nuncio.css trunk/billy-ui/src/main/webapp/css/window/nuncio/ trunk/billy-ui/src/main/webapp/css/window/nuncio/bottom_left.png trunk/billy-ui/src/main/webapp/css/window/nuncio/bottom_mid.png trunk/billy-ui/src/main/webapp/css/window/nuncio/bottom_right.png trunk/billy-ui/src/main/webapp/css/window/nuncio/center_left.png trunk/billy-ui/src/main/webapp/css/window/nuncio/center_right.png trunk/billy-ui/src/main/webapp/css/window/nuncio/close.png trunk/billy-ui/src/main/webapp/css/window/nuncio/minimize.png trunk/billy-ui/src/main/webapp/css/window/nuncio/overlay.png trunk/billy-ui/src/main/webapp/css/window/nuncio/top_left.png trunk/billy-ui/src/main/webapp/css/window/nuncio/top_mid.png trunk/billy-ui/src/main/webapp/css/window/nuncio/top_right.png trunk/billy-ui/src/main/webapp/css/window/spread.css trunk/billy-ui/src/main/webapp/css/window/spread/ trunk/billy-ui/src/main/webapp/css/window/spread/.gif trunk/billy-ui/src/main/webapp/css/window/spread/bottom-left-c.gif trunk/billy-ui/src/main/webapp/css/window/spread/bottom-middle.gif trunk/billy-ui/src/main/webapp/css/window/spread/bottom-right-c.gif trunk/billy-ui/src/main/webapp/css/window/spread/button-close-focus.gif trunk/billy-ui/src/main/webapp/css/window/spread/button-max-focus.gif trunk/billy-ui/src/main/webapp/css/window/spread/button-min-focus.gif trunk/billy-ui/src/main/webapp/css/window/spread/frame-left.gif trunk/billy-ui/src/main/webapp/css/window/spread/frame-right.gif trunk/billy-ui/src/main/webapp/css/window/spread/left-top.gif trunk/billy-ui/src/main/webapp/css/window/spread/right-top.gif trunk/billy-ui/src/main/webapp/css/window/spread/top-middle.gif trunk/billy-ui/src/main/webapp/img/ trunk/billy-ui/src/main/webapp/img/7ter.jpg trunk/billy-ui/src/main/webapp/img/flag_en.png trunk/billy-ui/src/main/webapp/img/flag_fr.png trunk/billy-ui/src/main/webapp/img/icons/ trunk/billy-ui/src/main/webapp/img/icons/add.png trunk/billy-ui/src/main/webapp/img/icons/crystal/ trunk/billy-ui/src/main/webapp/img/icons/crystal/add.png trunk/billy-ui/src/main/webapp/img/icons/crystal/cancel.png trunk/billy-ui/src/main/webapp/img/icons/crystal/clock.png trunk/billy-ui/src/main/webapp/img/icons/crystal/edit.png trunk/billy-ui/src/main/webapp/img/icons/crystal/info.png trunk/billy-ui/src/main/webapp/img/icons/crystal/movedown.png trunk/billy-ui/src/main/webapp/img/icons/crystal/movetobottom.png trunk/billy-ui/src/main/webapp/img/icons/crystal/movetotop.png trunk/billy-ui/src/main/webapp/img/icons/crystal/moveup.png trunk/billy-ui/src/main/webapp/img/icons/crystal/reload.png trunk/billy-ui/src/main/webapp/img/icons/crystal/remove.png trunk/billy-ui/src/main/webapp/img/icons/crystal/save.png trunk/billy-ui/src/main/webapp/img/icons/crystal/showdetails.png trunk/billy-ui/src/main/webapp/img/icons/crystal/stop.png trunk/billy-ui/src/main/webapp/img/icons/crystal/warning.png trunk/billy-ui/src/main/webapp/img/icons/minus.png trunk/billy-ui/src/main/webapp/img/lutin.gif trunk/billy-ui/src/main/webapp/img/spinner.gif trunk/billy-ui/src/main/webapp/js/ trunk/billy-ui/src/main/webapp/js/ZoneUpdater.js trunk/billy-ui/src/main/webapp/js/chenillekit/ trunk/billy-ui/src/main/webapp/js/chenillekit/Chenillekit.js trunk/billy-ui/src/main/webapp/js/chenillekit/CkOnEvents.js trunk/billy-ui/src/main/webapp/js/dialog.js trunk/billy-ui/src/main/webapp/js/window/ trunk/billy-ui/src/main/webapp/js/window/window.js trunk/billy-ui/src/main/webapp/js/window/window_effects.js trunk/billy-ui/src/main/webapp/js/window/window_ext.js trunk/billy-ui/src/main/webapp/js/window_ajax.js trunk/changelog.txt trunk/pom.xml Log: Beginning of Billy project Added: trunk/LICENSE.txt =================================================================== --- trunk/LICENSE.txt (rev 0) +++ trunk/LICENSE.txt 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + <program> Copyright (C) <year> <name of author> + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. Added: trunk/README.txt =================================================================== --- trunk/README.txt (rev 0) +++ trunk/README.txt 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1 @@ + Added: trunk/TODO.txt =================================================================== --- trunk/TODO.txt (rev 0) +++ trunk/TODO.txt 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1 @@ + Property changes on: trunk/billy-business ___________________________________________________________________ Added: svn:ignore + target Added: trunk/billy-business/LICENSE.txt =================================================================== --- trunk/billy-business/LICENSE.txt (rev 0) +++ trunk/billy-business/LICENSE.txt 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,166 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. + Added: trunk/billy-business/README.txt =================================================================== --- trunk/billy-business/README.txt (rev 0) +++ trunk/billy-business/README.txt 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1 @@ + Added: trunk/billy-business/changelog.txt =================================================================== --- trunk/billy-business/changelog.txt (rev 0) +++ trunk/billy-business/changelog.txt 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1 @@ + Added: trunk/billy-business/pom.xml =================================================================== --- trunk/billy-business/pom.xml (rev 0) +++ trunk/billy-business/pom.xml 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,147 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <!-- ************************************************************* --> + <!-- *** POM Relationships *************************************** --> + <!-- ************************************************************* --> + + <parent> + <groupId>org.chorem</groupId> + <artifactId>billy</artifactId> + <version>1.0.0-alpha-1-SNAPSHOT</version> + </parent> + + <groupId>org.chorem.billy</groupId> + <artifactId>billy-business</artifactId> + + <dependencies> + <!-- ChoReg --> + <dependency> + <groupId>org.chorem.choreg</groupId> + <artifactId>choreg</artifactId> + </dependency> + <dependency> + <groupId>org.chorem</groupId> + <artifactId>chorem-commons</artifactId> + </dependency> + <dependency> + <groupId>org.chorem</groupId> + <artifactId>oasis-ciq-api</artifactId> + </dependency> + <dependency> + <groupId>org.apache.xmlbeans</groupId> + <artifactId>xmlbeans</artifactId> + </dependency> + <!-- ToPIA --> + <dependency> + <groupId>org.nuiton.topia</groupId> + <artifactId>topia-persistence</artifactId> + </dependency> + <dependency> + <groupId>org.nuiton.topia</groupId> + <artifactId>topia-soa</artifactId> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + </dependency> + <!-- DataBase H2 --> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + <version>1.1.112</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + </dependency> + </dependencies> + <!-- ************************************************************* --> + <!-- *** Project Information ************************************* --> + <!-- ************************************************************* --> + + <name>Billy Business</name> + <description>Métier de l'application Billy + Implémentation des services et gestion Base de données. + Les entités, services et DTO sont générés par ToPIA</description> + + <!-- Developpers, contributors... --> + <developers> + <developer> + <id>fdesbois</id> + <name>Florian DESBOIS</name> + <email>fdesbois@codelutin.com</email> + <organization>Code Lutin</organization> + <organizationUrl>http://www.codelutin.com/</organizationUrl> + <timezone>+1</timezone> + <roles> + <role>Analyste</role> + <role>Développeur</role> + </roles> + </developer> + </developers> + + <!-- ************************************************************* --> + <!-- *** Build Settings ****************************************** --> + <!-- ************************************************************* --> + + <packaging>jar</packaging> + + <build> + <resources> + <resource> + <directory>src/main/resources/</directory> + <includes> + <include>*.*</include> + </includes> + </resource> + </resources> + + <plugins> + <!-- Plug in Topia --> + <plugin> + <groupId>org.nuiton.eugene</groupId> + <artifactId>maven-eugene-plugin</artifactId> + <version>${generator.version}</version> + <executions> + <execution> + <phase>generate-sources</phase> + <!--Configuration of model generator--> + <configuration> + <addCompileDirectory>true</addCompileDirectory> + <includes>**/*.objectmodel</includes> + <templates>org.nuiton.topia.generator.TopiaMetaGenerator,org.nuiton.topia.generator.BeanGenerator,org.nuiton.topia.generator.TopiaApplicationServiceMetaGenerator</templates> + <defaultPackage>${project.groupId}</defaultPackage> + <fullPackagePath>${project.groupId}</fullPackagePath> + <extractedPackages>${project.groupId}</extractedPackages> + </configuration> + <goals> + <goal>zargo2xmi</goal> + <goal>xmi2objectmodel</goal> + <goal>generate</goal> + </goals> + </execution> + </executions> + <dependencies> + <!-- Topia generation from zargo --> + <dependency> + <groupId>org.nuiton.topia</groupId> + <artifactId>topia-soa</artifactId> + <version>${topia.version}</version> + <exclusions> + <exclusion> + <groupId>org.codehaus.xfire</groupId> + <artifactId>xfire-java5</artifactId> + </exclusion> + </exclusions> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + +</project> + + Added: trunk/billy-business/src/main/java/org/chorem/billy/BillyException.java =================================================================== --- trunk/billy-business/src/main/java/org/chorem/billy/BillyException.java (rev 0) +++ trunk/billy-business/src/main/java/org/chorem/billy/BillyException.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,48 @@ +/** + * *##% Billy Business + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy; + +import java.io.Serializable; + +/** + * BillyException.java + * + * Created on 2009-08-26 + * + * @author fdesbois + * @version $Revision: 5 $ + * + * Last update: $Date: 2009-07-31 16:58:45 +0200 (Fri, 31 Jul 2009) $ + * by : $Author: fdesbois $ + */ +public class BillyException extends Exception implements Serializable { + + public BillyException(String msg) { + super(msg); + } + + public BillyException(String msg, Throwable eee) { + super(msg,eee); + } + + public boolean isFromIllegalArgumentException() { + return getCause() != null && getCause() instanceof IllegalArgumentException; + } +} Added: trunk/billy-business/src/main/java/org/chorem/billy/ContextUtilBilly.java =================================================================== --- trunk/billy-business/src/main/java/org/chorem/billy/ContextUtilBilly.java (rev 0) +++ trunk/billy-business/src/main/java/org/chorem/billy/ContextUtilBilly.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,146 @@ +/** + * *##% Billy Business + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + + +package org.chorem.billy; + + +import java.io.IOException; +import java.net.URISyntaxException; +import java.util.Properties; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.utils.Convert; +import org.chorem.utils.PropertiesLoader; +import org.nuiton.topia.TopiaContext; +import org.nuiton.topia.TopiaContextFactory; +import org.nuiton.topia.TopiaException; + +/** + * ContextUtilBilly.java + * + * Created on 2009-08-26 + * + * @author fdesbois + * @version $Revision: 8 $ + * + * Last update: $Date: 2009-08-13 09:14:50 +0200 (Thu, 13 Aug 2009) $ + * by : $Author: fdesbois $ + */ +public class ContextUtilBilly { + + private static final Log log = LogFactory.getLog(ContextUtilBilly.class); + + private static TopiaContext rootContext; + + private static boolean init = false; + + /** + * Initialize of rootContext for ToPIA. + * Helped by loadProperties. + */ + private static void init() { + if (!init) { + if (log.isInfoEnabled()) { + log.info("Initialize of TopiaContext..."); + } + try { + Properties config = loadFileProperties("TopiaContextCash.properties"); + config.setProperty("topia.persistence.classes", BillyModelDAOHelper.getImplementationClassesAsString()); + + rootContext = TopiaContextFactory.getContext(config); + + init = true; + if (log.isInfoEnabled()) { + log.info("Context Ready !"); + } + } catch (Exception ex) { + log.error("Initialize error !!",ex); + } + } + } + + /** + * Property file loading + * @param filename + * @return + * @throws java.net.URISyntaxException + * @throws java.io.IOException + */ + private static Properties loadFileProperties(String filename) + throws URISyntaxException, IOException { + /*Properties props = new Properties(); + URL url = Resource.getURL(filename); + if (log.isDebugEnabled()) { + log.debug(url); + } + props.load(url.openStream()); + return props;*/ + return PropertiesLoader.loadPropertiesFile(filename); + } + + public static TopiaContext getRootContext() { + if (!init || rootContext == null || rootContext.isClosed()) { + init(); + } + return rootContext; + } + + public static void closeRootContext() throws BillyException { + if (init) { + try { + rootContext.closeContext(); + init = false; + if (log.isInfoEnabled()) { + log.info("Context Closed !"); + } + } catch (TopiaException eee) { + throw new BillyException("Fatal topia error when close root context", eee); + } + } + } + + public static String convertId(String id) { + return Convert.toWebId(id); + } + + public static void serviceException(TopiaContext transaction, String message, Exception eee) throws BillyException { + if (log.isErrorEnabled()) { + log.error("An error occured",eee); + } + if (!(eee instanceof BillyException)) { + if (!(eee instanceof TopiaException)) { + try { + if (transaction != null && !transaction.isClosed()) { + if (log.isInfoEnabled()) { + log.info("Saving annulation : Transaction rollback"); + } + transaction.rollbackTransaction(); + transaction.closeContext(); + } + } catch (TopiaException eeee) { + throw new BillyException("Fatal topia error when close context", eeee); + } + } + throw new BillyException(message,eee); + } else { + throw (BillyException)eee; + } + } +} Added: trunk/billy-business/src/main/java/org/chorem/billy/RegisterBillyServices.java =================================================================== --- trunk/billy-business/src/main/java/org/chorem/billy/RegisterBillyServices.java (rev 0) +++ trunk/billy-business/src/main/java/org/chorem/billy/RegisterBillyServices.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,92 @@ +/** + * *##% Billy Business + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy; + + +import javax.servlet.ServletContextEvent; +import javax.servlet.ServletContextListener; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.choreg.ChoremConvert; +import org.chorem.choreg.ChoremRegistry; +import org.chorem.choreg.ChoremRegistryImpl; +import org.chorem.choreg.ChoremService; + +/** + * RegisterBillyServices.java + * + * Created on 2009-08-26 + * + * @author fdesbois + * @version $Revision: 5 $ + * + * Last update: $Date: 2009-07-31 16:58:45 +0200 (Fri, 31 Jul 2009) $ + * by : $Author: fdesbois $ + */ +public class RegisterBillyServices implements Runnable, ServletContextListener { + + private static final Log log = LogFactory.getLog(RegisterBillyServices.class); + + private static final ChoremRegistry registry = ChoremRegistryImpl.getInstance(); + + @Override + public void run() { + if (log.isInfoEnabled()) { + log.info("Cash registration business services"); + } + //register(ServicePerson.class, new ServicePersonXPIL()); + } + + @Override + public void contextInitialized(ServletContextEvent arg0) { + run(); + } + + @Override + public void contextDestroyed(ServletContextEvent arg0) { + + //unregister(ServicePerson.class); + + try { + ContextUtilBilly.closeRootContext(); + } catch (BillyException eee) { + if (log.isErrorEnabled()) { + log.error("Error when closing Root Context", eee); + } + } + } + + private void register(Class serviceClass, ChoremService service) { + String sid = ChoremConvert.toSid(serviceClass); + registry.register(sid, service); + if (log.isDebugEnabled()) { + log.debug(sid + " registered"); + } + } + + private void unregister(Class serviceClass) { + String sid = ChoremConvert.toSid(serviceClass); + registry.unregister(sid); + if (log.isDebugEnabled()) { + log.debug(sid + " unregistered"); + } + } + +} Added: trunk/billy-business/src/main/java/org/chorem/billy/external/ImportReferenceUrl.java =================================================================== --- trunk/billy-business/src/main/java/org/chorem/billy/external/ImportReferenceUrl.java (rev 0) +++ trunk/billy-business/src/main/java/org/chorem/billy/external/ImportReferenceUrl.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,66 @@ +/** + * *##% Billy Business + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.external; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.billy.BillyException; +import org.chorem.billy.ContextUtilBilly; +import org.chorem.choreg.ChoremRegistry; +import org.chorem.choreg.ChoremRegistryImpl; +import org.chorem.choreg.Link; +import org.chorem.choreg.exceptions.NoServiceException; + +/** + * ImportReferenceUrl.java + * + * Created on 2009-08-26 + * + * @author fdesbois + * @version $Revision: 6 $ + * + * Last update: $Date: 2009-08-06 14:28:40 +0200 (Thu, 06 Aug 2009) $ + * by : $Author: fdesbois $ + */ +public class ImportReferenceUrl { + + private static ChoremRegistry choreg; + + private static final Log log = LogFactory.getLog(ImportReferenceUrl.class); + + public ImportReferenceUrl() { + choreg = ChoremRegistryImpl.getInstance(); + } + + /*public Reference setReferenceUrl(Reference reference) throws CashException { + try { + String url = choreg.findViewUrl(null, reference.getSource()); + reference.setUrl(url); + } catch (NoServiceException eee) { + if (log.isWarnEnabled()) { + log.warn(eee.getMessage()); + } + } catch (Exception eee) { + ContextUtilCash.serviceException(null, + "An error occured when retrieve url for reference '" + reference.getSource() + "' from ChoremRegistry", eee); + } + return reference; + }*/ +} Added: trunk/billy-business/src/main/java/org/chorem/billy/external/ImportXPIL.java =================================================================== --- trunk/billy-business/src/main/java/org/chorem/billy/external/ImportXPIL.java (rev 0) +++ trunk/billy-business/src/main/java/org/chorem/billy/external/ImportXPIL.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,101 @@ +/** + * *##% Billy Business + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.external; + +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; +import org.chorem.billy.BillyException; +import org.chorem.billy.ContextUtilBilly; +import org.chorem.choreg.ChoremRegistry; +import org.chorem.choreg.ChoremRegistryImpl; +import org.chorem.choreg.FormatType; +import org.chorem.oasis.ciq.api.XNLHelper; +import org.chorem.oasis.ciq.api.XPILHelper; +import urn.oasis.names.tc.ciq.xnl.PartyNameType; +import urn.oasis.names.tc.ciq.xpil.PartyDocument; +import urn.oasis.names.tc.ciq.xpil.PartyType; + +/** + * ImportXPIL.java + * + * Created on 2009-08-26 + * + * @author fdesbois + * @version $Revision: 6 $ + * + * Last update: $Date: 2009-08-06 14:28:40 +0200 (Thu, 06 Aug 2009) $ + * by : $Author: fdesbois $ + */ +public class ImportXPIL { + + public static String BONZOMS_SERVICE_PERSON = "Person"; + + public static String BONZOMS_SERVICE_ORGANIZATION = "Organization"; // voir du cote des filtres pour eviter l'utilisation de ces statics + + private static ChoremRegistry choreg; + + public ImportXPIL() { + choreg = ChoremRegistryImpl.getInstance(); + } + + /*public List<Reference> findAll(String type) throws CashException { + List<Reference> references = new ArrayList<Reference>(); + try { + List<InputStream> results = choreg.findAll(null, FormatType.OASIS_CIQ_XPIL, InputStream.class, null); + + for (InputStream input : results) { + PartyDocument doc = PartyDocument.Factory.parse(input); + PartyType party = doc.getParty(); + PartyNameType partyName = doc.getParty().getPartyName(); + + Reference ref = new Reference(); + ref.setSource(XPILHelper.getMainIdentifier(party)); + + if (!BONZOMS_SERVICE_ORGANIZATION.equals(type) && XNLHelper.hasPersonNames(partyName)) { + ref.setType(type); + ref.setName(XNLHelper.getPersonSimpleName(partyName)); + references.add(ref); + } + if (!BONZOMS_SERVICE_PERSON.equals(type) && XNLHelper.hasOrganisationNames(partyName)) { + ref.setType(type); + ref.setName(XNLHelper.getOrganisationSimpleName(partyName)); + references.add(ref); + } + + } + + } catch (Exception eee) { + ContextUtilCash.serviceException(null, "An error occured when retrieve XPIL references from ChoremRegistry", eee); + } + return references; + } + + public List<String> findReferenceTypes() throws CashException { + List<String> results = new ArrayList<String>(); + try { + results = choreg.findFormatSupportedServiceTitles(FormatType.OASIS_CIQ_XPIL); + } catch (Exception eee) { + ContextUtilCash.serviceException(null, "An error occured when retrieve XPIL reference types from ChoremRegistry", eee); + } + return results; + }*/ + +} Added: trunk/billy-business/src/main/java/org/chorem/billy/impl/ServiceClientImpl.java =================================================================== --- trunk/billy-business/src/main/java/org/chorem/billy/impl/ServiceClientImpl.java (rev 0) +++ trunk/billy-business/src/main/java/org/chorem/billy/impl/ServiceClientImpl.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,73 @@ +/** + * *##% Billy Business + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.impl; + +import java.util.ArrayList; +import java.util.List; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.billy.BillyException; +import org.chorem.billy.ContextUtilBilly; +import org.chorem.billy.dto.ClientOrganization; +import org.chorem.billy.services.ServiceClient; +import org.chorem.billy.services.ServiceClientAbstract; +import org.nuiton.topia.TopiaContext; + +/** + * ServiceClientImpl.java + * + * Created on 2009-08-26 + * + * @author fdesbois + * @version $Revision: 6 $ + * + * Last update: $Date: 2009-08-06 14:28:40 +0200 (Thu, 06 Aug 2009) $ + * by : $Author: fdesbois $ + */ +public class ServiceClientImpl extends ServiceClientAbstract implements ServiceClient { + + private static final Log log = LogFactory.getLog(ServiceClientImpl.class); + + private TopiaContext context; + + public ServiceClientImpl() { + this.context = ContextUtilBilly.getRootContext(); + } + + @Override + public void createUpdateClient(ClientOrganization clientOrganization) throws BillyException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public List<ClientOrganization> getClients() throws BillyException { + TopiaContext transaction = null; + List<ClientOrganization> results = new ArrayList<ClientOrganization>(); + try { + transaction = context.beginTransaction(); + + transaction.closeContext(); + } catch (Exception eee) { + ContextUtilBilly.serviceException(transaction, "Unable to get all clients", eee); + } + return results; + } + +} Added: trunk/billy-business/src/main/java/org/chorem/billy/impl/ServiceInvoiceImpl.java =================================================================== --- trunk/billy-business/src/main/java/org/chorem/billy/impl/ServiceInvoiceImpl.java (rev 0) +++ trunk/billy-business/src/main/java/org/chorem/billy/impl/ServiceInvoiceImpl.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,88 @@ +/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ + +package org.chorem.billy.impl; +/** + * *##% Billy Business + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +import java.util.List; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.chorem.billy.BillyException; +import org.chorem.billy.ContextUtilBilly; +import org.chorem.billy.dto.Invoice; +import org.chorem.billy.services.ServiceInvoice; +import org.chorem.billy.services.ServiceInvoiceAbstract; +import org.chorem.utils.PeriodDates; +import org.nuiton.topia.TopiaContext; + +/** + * ServiceInvoiceImpl.java + * + * Created on 2009-08-26 + * + * @author fdesbois + * @version $Revision: 6 $ + * + * Last update: $Date: 2009-08-06 14:28:40 +0200 (Thu, 06 Aug 2009) $ + * by : $Author: fdesbois $ + */ +public class ServiceInvoiceImpl extends ServiceInvoiceAbstract implements ServiceInvoice { + + private static final Log log = LogFactory.getLog(ServiceClientImpl.class); + + private TopiaContext context; + + public ServiceInvoiceImpl() { + this.context = ContextUtilBilly.getRootContext(); + } + + @Override + public void createUpdateInvoice(Invoice invoice) throws BillyException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public void deleteInvoice(String invoiceId) throws BillyException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public List<Invoice> getAllInvoices() throws BillyException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public List<Invoice> getInvoicesByPeriod(PeriodDates period) throws BillyException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public List<Invoice> getInvoicesByClientAndPeriod(PeriodDates period, String clientId) throws BillyException { + throw new UnsupportedOperationException("Not supported yet."); + } + + @Override + public Invoice getNewInvoice() { + return new Invoice(); + } + +} Added: trunk/billy-business/src/main/resources/TopiaContextBilly.properties =================================================================== --- trunk/billy-business/src/main/resources/TopiaContextBilly.properties (rev 0) +++ trunk/billy-business/src/main/resources/TopiaContextBilly.properties 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,11 @@ +# Propri\u00C3\u00A9t\u00C3\u00A9s par d\u00C3\u00A9faut pour une base de donn\u00C3\u00A9es de type H2 +hibernate.hbm2ddl.auto=update +hibernate.show_sql=false + +hibernate.dialect=org.hibernate.dialect.H2Dialect +hibernate.connection.username=sa +hibernate.connection.password= +hibernate.connection.driver_class=org.h2.Driver +hibernate.connection.url=jdbc:h2:file:~/h2data/billy + + Property changes on: trunk/billy-business/src/main/resources/TopiaContextBilly.properties ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-business/src/main/resources/log4j.properties =================================================================== --- trunk/billy-business/src/main/resources/log4j.properties (rev 0) +++ trunk/billy-business/src/main/resources/log4j.properties 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,8 @@ +### direct log messages to stdout ### +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %M - %m%n +log4j.rootLogger=warn, stdout + +log4j.logger.org.chorem=debug Added: trunk/billy-business/src/main/xmi/billy.zargo =================================================================== (Binary files differ) Property changes on: trunk/billy-business/src/main/xmi/billy.zargo ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-business/src/test/resources/TopiaContextBilly.properties =================================================================== --- trunk/billy-business/src/test/resources/TopiaContextBilly.properties (rev 0) +++ trunk/billy-business/src/test/resources/TopiaContextBilly.properties 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,11 @@ +# Propri\u00C3\u00A9t\u00C3\u00A9s par d\u00C3\u00A9faut pour une base de donn\u00C3\u00A9es de type H2 +hibernate.hbm2ddl.auto=create +hibernate.show_sql=true + +hibernate.dialect=org.hibernate.dialect.H2Dialect +hibernate.connection.username=sa +hibernate.connection.password= +hibernate.connection.driver_class=org.h2.Driver +hibernate.connection.url=jdbc:h2:file:target/h2data/billy + + Property changes on: trunk/billy-business/src/test/resources/TopiaContextBilly.properties ___________________________________________________________________ Added: svn:executable + * Property changes on: trunk/billy-ui ___________________________________________________________________ Added: svn:ignore + target Added: trunk/billy-ui/LICENSE.txt =================================================================== --- trunk/billy-ui/LICENSE.txt (rev 0) +++ trunk/billy-ui/LICENSE.txt 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,166 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. + Added: trunk/billy-ui/README.txt =================================================================== --- trunk/billy-ui/README.txt (rev 0) +++ trunk/billy-ui/README.txt 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1 @@ + Added: trunk/billy-ui/changelog.txt =================================================================== --- trunk/billy-ui/changelog.txt (rev 0) +++ trunk/billy-ui/changelog.txt 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1 @@ + Added: trunk/billy-ui/nb-configuration.xml =================================================================== --- trunk/billy-ui/nb-configuration.xml (rev 0) +++ trunk/billy-ui/nb-configuration.xml 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project-shared-configuration> + <!-- +This file contains additional configuration written by modules in the NetBeans IDE. +The configuration is intended to be shared among all the users of project and +therefore it is assumed to be part of version control checkout. +Without this configuration present, some functionality in the IDE may be limited or fail altogether. +--> + <properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1"> + <!-- +Properties that influence various parts of the IDE, especially code formatting and the like. +You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up. +That way multiple projects can share the same settings (useful for formatting rules for example). +Any value defined here will override the pom.xml file value but is only applicable to the current project. +--> + <netbeans.compile.on.save>all</netbeans.compile.on.save> + </properties> +</project-shared-configuration> Added: trunk/billy-ui/nbactions.xml =================================================================== --- trunk/billy-ui/nbactions.xml (rev 0) +++ trunk/billy-ui/nbactions.xml 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<actions> + <action> + <actionName>CUSTOM-Tomcat embedded</actionName> + <displayName>Tomcat embedded</displayName> + <goals> + <goal>clean</goal> + <goal>install</goal> + <goal>tomcat:run</goal> + <goal>-Dtapestry.compress-whitespace=false</goal> + <goal>-Dorg.apache.tapestry.disable-caching=true</goal> + </goals> + </action> + </actions> Added: trunk/billy-ui/pom.xml =================================================================== --- trunk/billy-ui/pom.xml (rev 0) +++ trunk/billy-ui/pom.xml 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <!-- ************************************************************* --> + <!-- *** POM Relationships *************************************** --> + <!-- ************************************************************* --> + + <parent> + <groupId>org.chorem</groupId> + <artifactId>billy</artifactId> + <version>1.0.0-alpha-1-SNAPSHOT</version> + </parent> + + <groupId>org.chorem.billy</groupId> + <artifactId>billy-ui</artifactId> + + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>billy-business</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.chorem.choreg</groupId> + <artifactId>choreg</artifactId> + </dependency> + <dependency> + <groupId>org.apache.tapestry</groupId> + <artifactId>tapestry-core</artifactId> + </dependency> + <dependency> + <groupId>org.chenillekit</groupId> + <artifactId>chenillekit-tapestry</artifactId> + </dependency> + <dependency> + <groupId>javassist</groupId> + <artifactId>javassist</artifactId> + </dependency> + </dependencies> + + <!-- ************************************************************* --> + <!-- *** Project Information ************************************* --> + <!-- ************************************************************* --> + + <name>Billy Web Interface</name> + <description>Interface Web Tapestry pour Billy</description> + + <!-- ************************************************************* --> + <!-- *** Build Settings ****************************************** --> + <!-- ************************************************************* --> + + <packaging>war</packaging> + <properties> + <netbeans.hint.deploy.server>Tomcat60</netbeans.hint.deploy.server> + </properties> +</project> + Added: trunk/billy-ui/profiles.xml =================================================================== --- trunk/billy-ui/profiles.xml (rev 0) +++ trunk/billy-ui/profiles.xml 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<profilesXml xmlns="http://maven.apache.org/PROFILES/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/PROFILES/1.0.0 http://maven.apache.org/xsd/profiles-1.0.0.xsd"> + <profiles> + <profile> + <id>netbeans-private</id> + <activation> + <property> + <name>netbeans.execution</name> + <value>true</value> + </property> + </activation> + <properties> + <netbeans.deployment.server.id>tomcat60:home=/usr/local/apache-tomcat-6.0.20</netbeans.deployment.server.id> + </properties> + </profile> + </profiles> +</profilesXml> Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/AbstractErrorManager.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/AbstractErrorManager.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/AbstractErrorManager.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,123 @@ +/** + * *##% Billy Web Interface + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.ui.base; + +import java.util.ArrayList; +import java.util.List; + +/** + * AbstractErrorManager.java + * + * @author fdesbois + * @version $Revision: 11 $ + * + * Last update: $Date: 2009-08-14 14:25:09 +0200 (Fri, 14 Aug 2009) $ + * by : $Author: fdesbois $ + */ +public abstract class AbstractErrorManager { + + private List<String> warnings = new ArrayList<String>(); + + private List<String> errors = new ArrayList<String>(); + + private List<String> infos = new ArrayList<String>(); + + protected List<String> getWarnings() { + return this.warnings; + } + + protected List<String> getErrors() { + return this.errors; + } + + protected List<String> getInfos() { + return this.infos; + } + + protected void setWarnings(List<String> warnings) { + this.warnings = warnings; + } + + protected void setErrors(List<String> errors) { + this.errors = errors; + } + + protected void setInfos(List<String> infos) { + this.infos = infos; + } + + public void clean() { + clearWarnings(); + clearErrors(); + clearInfos(); + } + + public void addWarning(String warning) { + this.warnings.add(warning); + } + + public void addWarnings(List<String> warnings) { + this.warnings.addAll(warnings); + } + + public void clearWarnings() { + this.warnings.clear(); + } + + public boolean hasWarnings() { + return !warnings.isEmpty(); + } + + public void addError(String error) { + this.errors.add(error); + } + + public void addErrors(List<String> errors) { + this.errors.addAll(errors); + } + + public void clearErrors() { + this.errors.clear(); + } + + public boolean hasErrors() { + return !this.errors.isEmpty(); + } + + public void addInfo(String info) { + this.infos.add(info); + } + + public void addInfos(List<String> infos) { + this.infos.addAll(infos); + } + + public void clearInfos() { + this.infos.clear(); + } + + public boolean hasInfos() { + return !this.infos.isEmpty(); + } + + public boolean hasMessages() { + return hasErrors() || hasWarnings() || hasInfos(); + } +} Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/AbstractEventMixin.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/AbstractEventMixin.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/AbstractEventMixin.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,126 @@ +/* + * Apache License + * Version 2.0, January 2004 + * http://www.apache.org/licenses/ + * + * Copyright 2008 by chenillekit.org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + */ +package org.chorem.billy.ui.base; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.tapestry5.ClientElement; +import org.apache.tapestry5.ComponentEventCallback; +import org.apache.tapestry5.ComponentResources; +import org.apache.tapestry5.Link; +import org.apache.tapestry5.RenderSupport; +import org.apache.tapestry5.annotations.Environmental; +import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary; +import org.apache.tapestry5.annotations.InjectContainer; +import org.apache.tapestry5.annotations.MixinAfter; +import org.apache.tapestry5.annotations.Parameter; +import org.apache.tapestry5.internal.util.Holder; +import org.apache.tapestry5.ioc.annotations.Inject; +import org.apache.tapestry5.services.Request; + +/** + * @version $Id: AbstractEventMixin.java 3 2009-07-31 14:54:15Z fdesbois $ + */ +@IncludeJavaScriptLibrary({"context:js/chenillekit/Chenillekit.js", "context:js/chenillekit/CkOnEvents.js"}) +@MixinAfter +abstract public class AbstractEventMixin implements EventMixin { + + private static String EVENT_NAME = "internalEvent"; + private static String PARAM_NAME = "value"; + + @Inject + private Request request; + + @Inject + private ComponentResources resources; + + @InjectContainer + private ClientElement clientElement; + /** + * the javascript callback function (optional). + * function has one parameter: the response text + */ + @Parameter(required = false, defaultPrefix = "literal") + private String onCompleteCallback; + + /** + * <a href="http://www.prototypejs.org/api/event/stop">Event.stop</a> + */ + @Parameter(required = false, defaultPrefix = "literal") + private boolean stop; + + /** + * The context for the link (optional parameter). This list of values will be converted into strings and included in + * the URI. The strings will be coerced back to whatever their values are and made available to event handler + * methods. + */ + @Parameter + private List<?> context; + + @Environmental + private RenderSupport pageRenderSupport; + + private Object[] contextArray; + + /** + * get the conext parameter(s) + * + * @return conext parameter(s) + */ + public List<?> getContext() { + return context; + } + + void setupRender() { + contextArray = context == null ? new Object[0] : context.toArray(); + } + + void afterRender() { + Link link = resources.createEventLink(EVENT_NAME, contextArray); + String id = clientElement.getClientId(); + + String jsString = "new Ck.OnEvent('%s', '%s', %b, '%s', '%s');"; + String callBackString = resources.isBound("onCompleteCallback") ? onCompleteCallback : ""; + boolean doStop = resources.isBound("stop") && stop; + + pageRenderSupport.addScript(jsString, getEventName(), id, doStop, link.toAbsoluteURI(), callBackString); + } + + // CORRECTION param Object... context + Object onInternalEvent(Object... context) { + // DEBUT CORRECTION + List<Object> input = new ArrayList<Object>(); + input.add(request.getParameter(PARAM_NAME)); + for (Object o : context) { + input.add(o); + } + // FIN CORRECTION + + final Holder<Object> valueHolder = Holder.create(); + + ComponentEventCallback callback = new ComponentEventCallback<Object>() { + + public boolean handleResult(Object result) { + valueHolder.put(result); + return true; + } + }; + + // CORRECTION input + resources.triggerEvent(getEventName(), input.toArray(), callback); + + return valueHolder.get(); + } +} Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/DataLoader.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/DataLoader.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/DataLoader.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,43 @@ +/** + * *##% Billy Web Interface + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.ui.base; + +/** + * DataLoador.java + * + * @author fdesbois + * @version $Revision: 8 $ + * + * Last update: $Date: 2009-08-13 09:14:50 +0200 (Thu, 13 Aug 2009) $ + * by : $Author: fdesbois $ + */ +public interface DataLoader { + + /** + * Chargement des données pour un composant / une page. + * Permet le contrôle du rendu et des erreurs sur les données. + * Utiliser pour la gestion des erreurs. + * La majorité des pages implémentent cette interface. + * <http://maven-site.chorem.org/bonzoms/bonzoms-ui/developper/layout_erreurs.html> + * @see org.chorem.bonzoms.ui.components.Warnings + * @see org.chorem.bonzoms.ui.components.Layout + */ + public void loadData(); +} Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/EventMixin.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/EventMixin.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/EventMixin.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,37 @@ +/* + * Apache License + * Version 2.0, January 2004 + * http://www.apache.org/licenses/ + * + * Copyright 2008 by chenillekit.org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + */ + +package org.chorem.billy.ui.base; + +import java.util.List; + +/** + * @version $Id: EventMixin.java 3 2009-07-31 14:54:15Z fdesbois $ + */ +public interface EventMixin +{ + /** + * get the event name. + * + * @return the event name + */ + String getEventName(); + + /** + * get the conext parameter(s) + * + * @return conext parameter(s) + */ + List<?> getContext(); +} Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/GenericSelectModel.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/GenericSelectModel.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/base/GenericSelectModel.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,163 @@ +/** + * *##% Billy Web Interface + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.ui.base; + +import java.util.ArrayList; +import java.util.List; + +import java.util.Map; +import org.apache.tapestry5.OptionGroupModel; +import org.apache.tapestry5.OptionModel; +import org.apache.tapestry5.annotations.Log; +import org.apache.tapestry5.internal.OptionGroupModelImpl; +import org.apache.tapestry5.internal.OptionModelImpl; +import org.apache.tapestry5.ioc.annotations.Inject; +import org.apache.tapestry5.ioc.services.PropertyAccess; +import org.apache.tapestry5.ioc.services.PropertyAdapter; +import org.apache.tapestry5.util.AbstractSelectModel; +import org.slf4j.Logger; + +/** + * GenericSelectModel.java + * + * Based on IdSelectModel from <http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/select/easyid> + * A generic selection model whose value is the id of the chosen object, not the object itself. + * + * @author fdesbois + * @version $Revision: 3 $ + * + * Last update: $Date: 2009-07-31 16:54:15 +0200 (ven 31 jui 2009) $ + * by : $Author: fdesbois $ + */ +public class GenericSelectModel<T> extends AbstractSelectModel { + + private List<T> list; + private Map<String, List<T>> map; + private PropertyAdapter labelFieldAdapter; + private PropertyAdapter idFieldAdapter; + + @Inject + private Logger log; + + /** + * @param list the list of objects you want modeled in a Select component. These objects MUST implement + * equals(Object obj) and hashCode(). If the objects are JPA entities, ensure their implementations of + * equals(Object obj) and hashCode() return the same thing for different instances of the same detached + * entity. + * @param clazz the class of objects in the list. + * @param labelField the name of the field you want displayed as the label in the selection list, eg. "name". + * @param idField the name of the field which is the unique identifier of each object in the list, eg. "id". This is + * used in the value property of the Select component. + * @param access Declare a PropertyAccess injected into your page (eg. Inject private PropertyAccess _access) then pass it in here. + * + */ + public GenericSelectModel(List<T> list, Class<T> clazz, String labelField, String idField, PropertyAccess access) { + init(clazz, labelField, idField, access); + + this.list = list; + } + + public GenericSelectModel(Map<String, List<T>> map, Class<T> clazz, String labelField, String idField, PropertyAccess access) { + init(clazz, labelField, idField, access); + + this.map = map; + } + + private void init(Class<T> clazz, String labelField, String idField, PropertyAccess access) { + if (clazz == null) { + throw new IllegalArgumentException("clazz is required."); + } + if (idField == null) { + throw new IllegalArgumentException("idField is required."); + } + if (labelField == null) { + throw new IllegalArgumentException("labelField is required."); + } + + this.idFieldAdapter = access.getAdapter(clazz).getPropertyAdapter(idField); + this.labelFieldAdapter = access.getAdapter(clazz).getPropertyAdapter(labelField); + + if (idFieldAdapter == null) { + throw new IllegalArgumentException("idField " + idField + " does not exist in class " + clazz + "."); + } + if (labelFieldAdapter == null) { + throw new IllegalArgumentException("labelField " + idField + " does not exist in class " + clazz + "."); + } + } + + @Override + public List<OptionGroupModel> getOptionGroups() { + if (list != null) { + return null; + } + List<OptionGroupModel> optionGroupModelList = new ArrayList<OptionGroupModel>(); + for (String key : map.keySet()) { + optionGroupModelList.add(new OptionGroupModelImpl(key, false, getOptions(map.get(key)))); + } + return optionGroupModelList; + } + + @Override + public List<OptionModel> getOptions() { + if (map != null) { + return null; + } + return getOptions(list); + } + + private List<OptionModel> getOptions(List<T> list) { + List<OptionModel> optionModelList = new ArrayList<OptionModel>(); + for (T obj : list) { + optionModelList.add(new OptionModelImpl(nvl(labelFieldAdapter.get(obj)), idFieldAdapter.get(obj))); + } + return optionModelList; + } + + public List<T> getList() { + List<T> results; + if (map != null) { + results = new ArrayList<T>(); + for (String key : map.keySet()) { + results.addAll(map.get(key)); + } + } else { + results = list; + } + return results; + } + + public T findObject(String id) { + if (id != null) { + for (T current : getList()) { + Object currentId = idFieldAdapter.get(current); + if (currentId.equals(id)) { + return current; + } + } + } + return null; + } + + private String nvl(Object o) { + return o == null ? "" : o.toString(); + } + +} + Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/BlockManager.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/BlockManager.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/BlockManager.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,100 @@ +/** + * *##% Billy Web Interface + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.ui.components; + +import org.apache.tapestry5.annotations.Parameter; +import org.apache.tapestry5.annotations.Persist; +import org.apache.tapestry5.json.JSONObject; + +/** + * BlockManager.java + * + * @author fdesbois + * @version $Revision: 3 $ + * + * Last update: $Date: 2009-07-31 16:54:15 +0200 (ven 31 jui 2009) $ + * by : $Author: fdesbois $ + */ +public class BlockManager { + + /** + * Parametre du composant : titre du block + */ + @Parameter(required = true, defaultPrefix = "literal") + private String title; + + public String getTitle() { + return this.title; + } + + /** + * Parametre du composant : identifiant du block + */ + @Parameter(required = true, defaultPrefix = "literal") + private String ident; + + public String getIdent() { + return this.ident; + } + + /** + * Etat du block : true = show, false = hide + */ + @Persist + private boolean state; + + public boolean getState() { + return this.state; + } + + /** + * Style à l'initialisation dependant de l'etat du BlockManager + * @return le style css pour afficher ou cacher le block + */ + public String getStyleInit() { + return this.state ? "display:block;" : "display:none;"; + } + + /** + * Style inverse de celui à l'initialisation dependant de l'etat inverse + * @return le style css pour afficher ou cacher le block + */ + public String getStyleReverse() { + return !this.state ? "display:block;" : "display:none;"; + } + + /** + * Click pour minimiser le block, passage de l'attribut state a false + * @return un JSONObject pour prendre en compte le changement d'etat + */ + JSONObject onClickFromMinimize() { + this.state = false; + return new JSONObject().put("visible", state); + } + + /** + * Click pour maximiser le block, passage de l'attribut state a true + * @return un JSONObject pour prendre en compte le changement d'etat + */ + JSONObject onClickFromMaximize() { + this.state = true; + return new JSONObject().put("visible", state); + } +} Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/ClientMessages.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/ClientMessages.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/ClientMessages.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,179 @@ +/** + * *##% Billy Web Interface + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.ui.components; + +import java.util.ArrayList; +import java.util.List; +import org.apache.tapestry5.Block; +import org.apache.tapestry5.ajax.MultiZoneUpdate; +import org.apache.tapestry5.annotations.InjectComponent; +import org.apache.tapestry5.annotations.InjectContainer; +import org.apache.tapestry5.annotations.Log; +import org.apache.tapestry5.annotations.Parameter; +import org.apache.tapestry5.annotations.Property; +import org.apache.tapestry5.corelib.components.Zone; +import org.apache.tapestry5.ioc.annotations.Inject; +import org.chorem.billy.ui.base.AbstractErrorManager; +import org.chorem.billy.ui.base.DataLoader; + +/** + * Warnings.java + * + * Documentation : <http://maven-site.chorem.org/bonzoms/bonzoms-ui/developper/layout_erreurs.html> + * + * @author fdesbois + * @version $Revision: 12 $ + * + * Last update: $Date: 2009-08-17 15:15:06 +0200 (Mon, 17 Aug 2009) $ + * by : $Author: fdesbois $ + */ +public class ClientMessages extends AbstractErrorManager { + + @Parameter + private String zoneId; + + @SuppressWarnings("unchecked") + private List<String> warnings = new ArrayList<String>(); + + @SuppressWarnings("unchecked") + @Property + private String warning; + + @SuppressWarnings("unchecked") + private List<String> errors = new ArrayList<String>(); + + @SuppressWarnings("unchecked") + @Property + private String error; + + @SuppressWarnings("unchecked") + private List<String> infos = new ArrayList<String>(); + + @SuppressWarnings("unchecked") + @Property + private String info; + + @InjectContainer + private DataLoader container; + + @InjectComponent + private Zone zoneFlash; + + @InjectComponent + private Zone globalZone; + + @Inject + private Block defaultBlock; + + @Inject + private Block warningsBlock; + + @Inject + private Block errorsBlock; + + @Inject + private Block infosBlock; + + @Override + public List<String> getWarnings() { + return super.getWarnings(); + } + + @Override + public List<String> getErrors() { + return super.getErrors(); + } + + @Override + public List<String> getInfos() { + return super.getInfos(); + } + + /** + * Gestion de multi zones pour rafraichissement + * @param zoneId identifiant de la zone de la page / composant a rafraichir + * @param renderer contenu de la zone a rafraichir + * @return la zone de la page / composant a rafraichir + la zone de messages si besoin + */ + public MultiZoneUpdate zoneManager(String zoneId, Object renderer) { + /*MultiZoneUpdate zones = new MultiZoneUpdate(zoneId, renderer); + if (hasMessages()) { + zones = new MultiZoneUpdate(zoneId, renderer).add(getZoneId(), getZone().getBody()); + } + return zones;*/ + return new MultiZoneUpdate(zoneId, renderer).add(getZoneId(), getZone().getBody()); + } + + /** + * Initialisation des erreurs et warnings. Utiliser avant rendu du composant Warnings. + * @param errors liste des messages d'erreurs + * @param warnings liste des messages de warnings + */ + public void initComponent(List<String> errors, List<String> warnings, List<String> infos) { + super.setWarnings(warnings); + super.setErrors(errors); + super.setInfos(infos); + } + + /** + * Zone pour rafraichissement du composant Warnings (rafraichissement des block de messages) + * @return une Zone englobant le composant Delegate permettant l'affichage du composant Warnings + */ + public Zone getZone() { + return zoneFlash; + } + + public String getZoneId() { + return zoneId != null ? zoneId : "zoneFlash"; + } + + public Zone getGlobalZone() { + return globalZone; + } + + public String getGlobalZoneId() { + return "global_" + getZoneId(); + } + + /** + * Selectionne le block courant pour l'affichage du composant Warnings. + * La methode loadData() permet de determiner les erreurs depuis le container du composant Warnings. + * Depend des erreurs/warnings : + * - existance d'erreurs : affichage des messages d'erreurs uniquement + * - existance de warnings (sans erreurs) : affichage des messages de warnings + body + * - ni erreurs, ni warnings : affichage du body + * @return un Block a afficher dans le Delegate + */ + //@Log + public Block getActiveBlock() { + container.loadData(); + if (hasErrors()) { + return errorsBlock; + } + if (hasWarnings()) { + return warningsBlock; + } + if (hasInfos()) { + return infosBlock; + } + return defaultBlock; + } + +} Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/Layout.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/Layout.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/Layout.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,111 @@ +/** + * *##% Billy Web Interface + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.ui.components; + +import java.util.Locale; +import org.apache.tapestry5.Block; +import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary; +import org.apache.tapestry5.annotations.InjectComponent; +import org.apache.tapestry5.annotations.InjectContainer; +import org.apache.tapestry5.annotations.Parameter; +import org.apache.tapestry5.ioc.annotations.Inject; +import org.apache.tapestry5.services.PersistentLocale; +import org.chorem.billy.ui.base.AbstractErrorManager; +import org.chorem.billy.ui.base.DataLoader; + +/** + * Layout.java + * + * Composant entourant toutes les pages. + * Documentation : <http://maven-site.chorem.org/bonzoms/bonzoms-ui/developper/layout_erreurs.html> + * + * @author fdesbois + * @version $Revision: 11 $ + * + * Last update: $Date: 2009-08-14 14:25:09 +0200 (Fri, 14 Aug 2009) $ + * by : $Author: fdesbois $ + */ +public class Layout extends AbstractErrorManager implements DataLoader { + + public static final String SHOW_BORDER = "show"; + + /** + * Parametre du composant : titre de la page + */ + @Parameter(required = true, defaultPrefix = "literal") + private String pageTitle; + + public String getPageTitle() { + return this.pageTitle; + } + + /** + * Parametre du composant : id de la div englobante + */ + @Parameter(required = true, defaultPrefix = "literal") + private String ident; + + public String getIdent() { + return this.ident; + } + + @Parameter(value = "true", defaultPrefix = "literal") + private boolean border; + + public boolean hasBorder() { + return this.border; + } + + /** + * Service de gestion des langues + */ + @Inject + private PersistentLocale localeService; + + /** + * Changement de la langue vers FRENCH + */ + void onActionFromLangFrLink() { + localeService.set(Locale.FRENCH); + } + /** + * Changement de la langue vers ENGLISH + */ + void onActionFromLangEnLink() { + localeService.set(Locale.ENGLISH); + } + + @InjectComponent + private ClientMessages clientMessages; + + @InjectContainer + private DataLoader loader; + + @Override + public void loadData() { + loader.loadData(); + clientMessages.initComponent(getErrors(), getWarnings(), getInfos()); + } + + public Block getBody() { + return clientMessages.getZone().getBody(); + } + +} Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/SubmitContext.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/SubmitContext.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/SubmitContext.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,129 @@ +// Copyright 2007 The Apache Software Foundation +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package org.chorem.billy.ui.components; + +import org.apache.tapestry5.ComponentResources; +import org.apache.tapestry5.MarkupWriter; +import org.apache.tapestry5.annotations.Environmental; +import org.apache.tapestry5.annotations.Parameter; +import org.apache.tapestry5.corelib.base.AbstractField; +import org.apache.tapestry5.ioc.annotations.Inject; +import org.apache.tapestry5.services.FormSupport; +import org.apache.tapestry5.services.Heartbeat; +import org.apache.tapestry5.services.Request; + +/** + * Corresponds to <input type="submit">, a client-side element that can force the + * enclosing form to submit. The submit responsible for the form submission will post a + * notification that allows the application to know that it was the responsible entity. The + * notification is named "selected" and has a String context. + */ +public final class SubmitContext extends AbstractField +{ + static final String SELECTED_EVENT = "selected"; + + /** + * If true, then any notification sent by the component will be deferred until the end of + * the form submission (this is usually desirable). + */ + @Parameter + private boolean _defer = true; + + @Parameter + private String _context; + + @Environmental + private FormSupport _formSupport; + + @Environmental + private Heartbeat _heartbeat; + + @Inject + private ComponentResources _resources; + + @Inject + private Request _request; + + public SubmitContext() + { + } + + SubmitContext(Request request) + { + _request = request; + } + + void beginRender(MarkupWriter writer) + { + // write a hidden input for the context + //String elementName = getElementName(); + String elementName = getControlName(); //Modified to work with 5.0.12 + writer.element("input", "type", "hidden", "name", elementName + "X", "value", _context); + writer.end(); + + // now the submit + writer.element("input", "type", "submit", "name", elementName, "id", getClientId()); + _resources.renderInformalParameters(writer); + } + + void afterRender(MarkupWriter writer) + { + writer.end(); + } + + //protected void processSubmission(FormSupport formSupport, String elementName) + @Override + protected void processSubmission(String elementName) //Modified to work with 5.0.12 + { + String value = _request.getParameter(elementName); + final String context = _request.getParameter(elementName + "X"); + + if (value == null) + return; + + Runnable sendNotification = new Runnable() + { + public void run() + { + _resources.triggerEvent(SELECTED_EVENT, new Object[] {context}, null); + } + }; + + // When not deferred, don't wait, fire the event now (actually, at the end of the current + // heartbeat). This is most likely because the Submit is inside a Loop and some contextual + // information will change if we defer. Another option might be to wait until the next + // heartbeak? + + if (_defer) + _formSupport.defer(sendNotification); + else + _heartbeat.defer(sendNotification); + + } + + // For testing: + + void setDefer(boolean defer) + { + _defer = defer; + } + + void setup(ComponentResources resources, FormSupport support, Heartbeat heartbeat) + { + _resources = resources; + _formSupport = support; + _heartbeat = heartbeat; + } +} Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/WindowLink.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/WindowLink.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/components/WindowLink.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,109 @@ +/** + * *##% Billy Web Interface + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.ui.components; + +import org.apache.tapestry5.BindingConstants; +import org.apache.tapestry5.Link; +import org.apache.tapestry5.MarkupWriter; +import org.apache.tapestry5.RenderSupport; +import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary; +import org.apache.tapestry5.annotations.Parameter; +import org.apache.tapestry5.corelib.base.AbstractLink; +import org.apache.tapestry5.ioc.annotations.Inject; +import org.apache.tapestry5.services.PageRenderLinkSource; + +/** + * WindowLink.java + * + * @author fdesbois + * @version $Revision: 3 $ + * + * Last update: $Date: 2009-07-31 16:54:15 +0200 (ven 31 jui 2009) $ + * by : $Author: fdesbois $ + */ +@IncludeJavaScriptLibrary({ + "context:js/window/window.js", + "context:js/window_ajax.js" +}) +public class WindowLink extends AbstractLink { + + /** + * Page a ouvrir dans la fenetre + */ + @Parameter(required = true, defaultPrefix = BindingConstants.LITERAL) + private String page; + + /** + * Contexte a passer a la page + */ + @Parameter + private Object[] context; + + /** + * Titre de la fenetre + */ + @Parameter(value = "Window", defaultPrefix = BindingConstants.LITERAL) + private String windowTitle; + + @Parameter(value = "600", defaultPrefix = BindingConstants.LITERAL) + private int windowWidth; + + @Parameter(value = "600", defaultPrefix = BindingConstants.LITERAL) + private int windowHeight; + + /** + * Permet l'ajout du script de gestion de la fenetre + */ + @Inject + private RenderSupport renderSupport; + + @Inject + private PageRenderLinkSource pageRender; + + void beginRender(MarkupWriter writer) + { + if (isDisabled()) return; + + Link link = null; + if (context != null) { + link = pageRender.createPageRenderLinkWithContext(page, context); + } else { + link = pageRender.createPageRenderLink(page); + } + + writeLink(writer, link); + } + + /** + * Creation et ajout du script en fin de page + */ + void afterRender(MarkupWriter writer) { + if (!isDisabled()) { + //String manager = "var wm = new UI.WindowManager({ container: 'layout' });"; + String script = "new AjaxWindow('"+getClientId()+"','"+getLink().toRedirectURI()+"','"+windowTitle+"', " + + windowWidth + ", " + windowHeight + ");"; + //renderSupport.addScript(manager); + renderSupport.addScript(script); + + writer.end(); + } + } + +} Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/mixins/Confirm.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/mixins/Confirm.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/mixins/Confirm.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,65 @@ +/** + * *##% Billy Web Interface + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.ui.mixins; + +import org.apache.tapestry5.BindingConstants; +import org.apache.tapestry5.ClientElement; +import org.apache.tapestry5.RenderSupport; +import org.apache.tapestry5.annotations.AfterRender; +import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary; +import org.apache.tapestry5.annotations.InjectContainer; +import org.apache.tapestry5.annotations.Parameter; +import org.apache.tapestry5.ioc.annotations.Inject; + +/** + * Confirm.java + * + * A simple mixin for attaching a javascript confirmation box to the onclick + * event of any component that implements ClientElement. + * + * @author fdesbois + * @version $Revision: 3 $ + * + * Last update: $Date: 2009-07-31 16:54:15 +0200 (ven 31 jui 2009) $ + * by : $Author: fdesbois $ + */ +@IncludeJavaScriptLibrary("context:js/dialog.js") +public class Confirm { + + @Parameter(value = "Are you sure?", defaultPrefix = BindingConstants.LITERAL) + private String message; + + @Inject + private RenderSupport renderSupport; + + @InjectContainer + private ClientElement element; + + @Parameter + private boolean wDisabled; + + @AfterRender + public void afterRender() { + if (!wDisabled) { + renderSupport.addScript(String.format("new Confirm('%s', '%s');",element.getClientId(), message)); + } + } + +} Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/mixins/OnEvent.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/mixins/OnEvent.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/mixins/OnEvent.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,40 @@ +/* + * Apache License + * Version 2.0, January 2004 + * http://www.apache.org/licenses/ + * + * Copyright 2008 by chenillekit.org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + */ + +package org.chorem.billy.ui.mixins; + +import org.apache.tapestry5.annotations.Parameter; +import org.chorem.billy.ui.base.AbstractEventMixin; + +/** + * OnChange mixin catch the browser event "onChange" from a select component + * and redirect it to your application via tapestry event "change". + * + * @version $Id: OnEvent.java 3 2009-07-31 14:54:15Z fdesbois $ + */ +public class OnEvent extends AbstractEventMixin +{ + @Parameter(required = true, defaultPrefix = "literal") + private String event; + + /** + * set the event name. + * + * @return the event name + */ + public String getEventName() + { + return event; + } +} \ No newline at end of file Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/mixins/ZoneUpdater.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/mixins/ZoneUpdater.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/mixins/ZoneUpdater.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,106 @@ +/** + * *##% Billy Web Interface + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.ui.mixins; + +import org.apache.commons.lang.ArrayUtils; +import org.apache.tapestry5.BindingConstants; +import org.apache.tapestry5.ClientElement; +import org.apache.tapestry5.ComponentResources; +import org.apache.tapestry5.Link; +import org.apache.tapestry5.RenderSupport; +import org.apache.tapestry5.annotations.Environmental; +import org.apache.tapestry5.annotations.IncludeJavaScriptLibrary; +import org.apache.tapestry5.annotations.InjectContainer; +import org.apache.tapestry5.annotations.Parameter; +import org.apache.tapestry5.ioc.annotations.Inject; + +/** + * ZoneUpdater.java + * + * From http://tinybits.blogspot.com/2009/05/update-zone-on-any-client-side-event.ht... by ingesol + * + * @author ingesol + * @version $Revision: 41 $ + * + * Last update: $Date: 2009-08-07 19:01:40 +0200 (Fri, 07 Aug 2009) $ + * by : $Author: fdesbois $ + */ +@IncludeJavaScriptLibrary("context:js/ZoneUpdater.js") +public class ZoneUpdater { + + public static final String PLACEHOLDER = "XXX"; + + @Inject + private ComponentResources resources; + + @Environmental + private RenderSupport renderSupport; + + @Parameter(defaultPrefix = BindingConstants.LITERAL) + + private String clientEvent; + + @Parameter(defaultPrefix = BindingConstants.LITERAL, required = true) + + private String event; + + @InjectContainer + private ClientElement element; + + @Parameter + + private Object[] context; + + @Parameter(defaultPrefix = BindingConstants.LITERAL) + + // To enable popups to fire events on this document, enter "document" here. + + private String listeningElement; + + @Parameter(defaultPrefix = BindingConstants.LITERAL, required = true) + + private String zone; + + protected Link createLink(Object[] context) { + + if (context == null) { + context = new Object[1]; + } + context = ArrayUtils.add(context, PLACEHOLDER); // To be replaced by javascript + + return resources.createEventLink(event, context); + + } + + void afterRender() { + String link = createLink(context).toAbsoluteURI(); + String elementId = element.getClientId(); + if (clientEvent == null) { + clientEvent = event; + } + + if (listeningElement == null) { + listeningElement = "$('" + elementId + "')"; + } + renderSupport.addScript("new ZoneUpdater('%s', %s, '%s', '%s', '%s', '%s')", elementId, listeningElement, clientEvent, link, zone, PLACEHOLDER); + + } + +} Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/pages/Index.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/pages/Index.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/pages/Index.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,46 @@ +/** + * *##% Billy Web Interface + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.ui.pages; + +import org.chorem.billy.ui.base.DataLoader; + + +/** + * Index.java + * + * Start page. + * + * @author fdesbois + * @version $Revision: 8 $ + * + * Last update: $Date: 2009-08-13 09:14:50 +0200 (Thu, 13 Aug 2009) $ + * by : $Author: fdesbois $ + */ +public class Index implements DataLoader{ + + /** + * L'utilisation du composant Layout oblige la page Index a implementer DataLoador pour la gestion d'erreurs. + * Pas de donnees a charger ici. + */ + @Override + public void loadData() { + } + +} Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/services/AppModule.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/services/AppModule.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/services/AppModule.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,163 @@ +/** + * *##% Billy Web Interface + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.ui.services; + +import java.io.IOException; +import org.apache.tapestry5.SymbolConstants; +import org.apache.tapestry5.ioc.MappedConfiguration; +import org.apache.tapestry5.ioc.OrderedConfiguration; +import org.apache.tapestry5.ioc.ServiceBinder; +import org.apache.tapestry5.ioc.annotations.EagerLoad; +import org.apache.tapestry5.ioc.annotations.InjectService; +import org.apache.tapestry5.ioc.annotations.Local; +import org.apache.tapestry5.ioc.services.RegistryShutdownHub; +import org.apache.tapestry5.ioc.services.RegistryShutdownListener; +import org.apache.tapestry5.services.Request; +import org.apache.tapestry5.services.RequestFilter; +import org.apache.tapestry5.services.RequestHandler; +import org.apache.tapestry5.services.Response; +import org.chorem.billy.impl.*; +import org.chorem.billy.services.*; +import org.slf4j.Logger; + +/** + * AppModule.java + * + * This module is automatically included as part of the Tapestry IoC Registry, + * it's a good place to configure and extend Tapestry, or to place your own + * service definitions. + * + * @author fdesbois + * @version $Revision: 12 $ + * + * Last update: $Date: 2009-08-17 15:15:06 +0200 (Mon, 17 Aug 2009) $ + * by : $Author: fdesbois $ + */ +public class AppModule { + public static void bind(ServiceBinder binder) { + // Make bind() calls on the binder object to define most IoC services. + // Use service builder methods (example below) when the implementation + // is provided inline, or requires more initialization than simply + // invoking the constructor. + + } + + + public static void contributeApplicationDefaults( + MappedConfiguration < String, String > configuration) { + // Contributions to ApplicationDefaults will override any contributions + // to FactoryDefaults (with the same key). Here we're restricting the + // supported locales to just "en" (English). As you add localised + // message catalogs and other assets, you can extend this list of + // locales (it's a comma separated series of locale names; the first + // locale name is the default when there's no reasonable match). + + configuration.add(SymbolConstants.SUPPORTED_LOCALES, "fr,en"); + + // The factory default is true but during the early stages of an + // application overriding to false is a good idea. In addition, this is + // often overridden on the command line as + // -Dtapestry.production-mode=false + configuration.add(SymbolConstants.PRODUCTION_MODE, "false"); + } + + @EagerLoad + public RegistryShutdownListener buildCashShutdown(@InjectService("RegistryShutdownHub") RegistryShutdownHub hub) { + RegistryShutdownListener listener = new ContextShutdown(); + /*try { + listener = new BonzomsManager(); + } catch (NoClassDefFoundError eee) { + System.out.println("AppModule.buildBonzomsShutdown() : ChoremRegistry unavailable"); + }*/ + hub.addRegistryShutdownListener(listener); + return listener; + } + /*public static void contributeRegistryStartup(OrderedConfiguration<Runnable> configuration, PageRenderLinkSource pageRender) + { + try { + configuration.add("RegisterServices", new RegisterBonzomsServices()); + configuration.add("RegisterUIs", new RegisterBonzomsUIs(pageRender)); + } catch (NoClassDefFoundError eee) { + // No Choreg.jar found in Application server + } + }*/ + + + + /** + * This is a service definition, the service will be named "TimingFilter". + * The interface, RequestFilter, is used within the RequestHandler service + * pipeline, which is built from the RequestHandler service configuration. + * Tapestry IoC is responsible for passing in an appropriate Logger + * instance. Requests for static resources are handled at a higher level, so + * this filter will only be invoked for Tapestry related requests. + * + * <p> + * Service builder methods are useful when the implementation is inline as + * an inner class (as here) or require some other kind of special + * initialization. In most cases, use the static bind() method instead. + * + * <p> + * If this method was named "build", then the service id would be taken from + * the service interface and would be "RequestFilter". Since Tapestry + * already defines a service named "RequestFilter" we use an explicit + * service id that we can reference inside the contribution method. + */ + public RequestFilter buildTimingFilter(final Logger log) { + return new RequestFilter() { + public boolean service(Request request, Response response, + RequestHandler handler) throws IOException { + long startTime = System.currentTimeMillis(); + + try { + // The responsibility of a filter is to invoke the corresponding method + // in the handler. When you chain multiple filters together, each filter + // received a handler that is a bridge to the next filter. + + return handler.service(request, response); + } finally { + long elapsed = System.currentTimeMillis() - startTime; + + log.info(String.format("Request time: %d ms", elapsed)); + } + } + }; + } + + + /** + * This is a contribution to the RequestHandler service configuration. This + * is how we extend Tapestry using the timing filter. A common use for this + * kind of filter is transaction management or security. The @Local + * annotation selects the desired service by type, but only from the same + * module. Without @Local, there would be an error due to the other + * service(s) that implement RequestFilter (defined in other modules). + */ + public void contributeRequestHandler( + OrderedConfiguration<RequestFilter> configuration, + @Local RequestFilter filter) { + // Each contribution to an ordered configuration has a name, When necessary, you may + // set constraints to precisely control the invocation order of the contributed filter + // within the pipeline. + + configuration.add("Timing", filter); + } + +} Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/services/ContextShutdown.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/services/ContextShutdown.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/services/ContextShutdown.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,54 @@ +/** + * *##% Billy Web Interface + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.ui.services; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.tapestry5.ioc.services.RegistryShutdownListener; +import org.chorem.billy.BillyException; +import org.chorem.billy.ContextUtilBilly; + +/** + * ReferenceList.java + * + * Created on 2009-07-31 + * + * @author fdesbois + * @version $Revision: 3 $ + * + * Last update: $Date: 2009-07-31 16:54:15 +0200 (ven 31 jui 2009) $ + * by : $Author: fdesbois $ + */ +public class ContextShutdown implements RegistryShutdownListener { + + private static final Log log = LogFactory.getLog(ContextShutdown.class); + + @Override + public void registryDidShutdown() { + try { + ContextUtilBilly.closeRootContext(); + } catch (BillyException eee) { + if (log.isErrorEnabled()) { + log.error("An error occured when closing Topia root context", eee); + } + } + } + +} Added: trunk/billy-ui/src/main/java/org/chorem/billy/ui/utils/ErrorHelper.java =================================================================== --- trunk/billy-ui/src/main/java/org/chorem/billy/ui/utils/ErrorHelper.java (rev 0) +++ trunk/billy-ui/src/main/java/org/chorem/billy/ui/utils/ErrorHelper.java 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,65 @@ +/** + * *##% Billy Web Interface + * Copyright (C) 2009 CodeLutin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Lesser Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. ##%* + */ + +package org.chorem.billy.ui.utils; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/** + * ErrorHelper.java + * + * @author fdesbois + * @version $Revision: 11 $ + * + * Last update: $Date: 2009-08-14 14:25:09 +0200 (Fri, 14 Aug 2009) $ + * by : $Author: fdesbois $ + */ +public class ErrorHelper { + + private static final Log log = LogFactory.getLog(ErrorHelper.class); + + public static final int PRECISION_0 = 0; + + public static final int PRECISION_1 = 1; + + public static final int PRECISION_2 = 2; + + public static int getPrecision() { + return PRECISION_1; + } + + public static List<String> getMessages(String message, Exception eee, int precision) { + List<String> results = new ArrayList<String>(); + switch (precision) { + case 2: results.add("Error : " + eee.getCause().getClass().getName() + " : " + eee.getCause().getMessage()); + case 1: results.add("Error : " + eee.getMessage()); + case 0: results.add(message); + } + Collections.reverse(results); + return results; + } + + public static List<String> getMessages(String message, Exception eee) { + return getMessages(message, eee, getPrecision()); + } +} Added: trunk/billy-ui/src/main/resources/log4j.properties =================================================================== --- trunk/billy-ui/src/main/resources/log4j.properties (rev 0) +++ trunk/billy-ui/src/main/resources/log4j.properties 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,13 @@ +### direct log messages to stdout ### +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c:%L - %m%n +log4j.rootLogger=warn, stdout + +log4j.category.org.apache.tapestry.TapestryFilter=info +log4j.category.org.apache.tapestry=error +log4j.category.tapestry=error + +log4j.category.org.chorem=debug + Added: trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/BlockManager.tml =================================================================== --- trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/BlockManager.tml (rev 0) +++ trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/BlockManager.tml 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,39 @@ +<!-- BlockManager.tml + + Author: fdesbois + Revision: $Revision: 32 $ + + Last update: $Date: 2009-07-22 14:25:26 +0200 (Wed, 22 Jul 2009) $ + by $Author: fdesbois $ +--> +<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" xmlns:p="tapestry:parameter"> + <div class="component"> + <div class="clearfix"> + <div class="fleft"><h2>${title}</h2></div> + <div class="fright buttons"> + <a t:type="any" t:id="minimize" class="img min_${ident}" t:event="click" t:mixins="onEvent" t:onCompleteCallback="showHideBlock${ident}" style="${styleInit}"> + <img src="${asset:context:/img/icons/minimize.gif}" alt="${message:minimize}" /> + </a> + <a t:type="any" t:id="maximize" class="img max_${ident}" t:event="click" t:mixins="onEvent" t:onCompleteCallback="showHideBlock${ident}" style="${styleReverse}"> + <img src="${asset:context:/img/icons/maximize.gif}" alt="${message:maximize}" /> + </a> + </div> + </div> + <div id="${ident}" style="${styleInit}"> + <t:body /> + </div> + </div> + <script> + function showHideBlock${ident}(params) { + if (params.visible) { + $('${ident}').show(); + $(document.body).down('a.min_${ident}').show(); + $(document.body).down('a.max_${ident}').hide(); + } else { + $('${ident}').hide(); + $(document.body).down('a.min_${ident}').hide(); + $(document.body).down('a.max_${ident}').show(); + } + } + </script> +</html> \ No newline at end of file Added: trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/ClientMessages.tml =================================================================== --- trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/ClientMessages.tml (rev 0) +++ trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/ClientMessages.tml 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,82 @@ +<!-- Warnings.tml + + Author: fdesbois + Revision: $Revision: 12 $ + + Last update: $Date: 2009-08-17 15:15:06 +0200 (Mon, 17 Aug 2009) $ + by $Author: fdesbois $ +--> +<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd" xmlns:p="tapestry:parameter"> + + + <t:zone t:id="globalZone" id="${globalZoneId}" t:update="show"> + <div t:type="zone" t:id="zoneFlash" id="${zoneId}" visible="false"> + <t:if test="hasMessages()"> + <div class="zoneFlash"> + <t:loop t:source="errors" t:value="error"> + <p class="error"> + <t:if test="!error.contains('Error')"> + <img src="${asset:context:/img/icons/crystal/stop.png}" alt="${message:error}" /> + </t:if> + ${error} + </p> + </t:loop> + <t:loop t:source="warnings" t:value="warning"> + <p class="warning"> + <t:if test="!warning.contains('Error')"> + <img src="${asset:context:/img/icons/crystal/warning.png}" alt="${message:warning}" /> + </t:if> + ${warning} + </p> + </t:loop> + <t:loop t:source="infos" t:value="info"> + <p class="info"> + <img src="${asset:context:/img/icons/crystal/info.png}" alt="${message:info}" /> ${info} + </p> + </t:loop> + </div> + <p:else> + </p:else> + </t:if> + </div> + <t:delegate to="activeBlock" /> + </t:zone> + <t:block t:id="defaultBlock"> + <t:body /> + </t:block> + <t:block t:id="errorsBlock"> + <div class="zoneFlash"> + <t:loop t:source="errors" t:value="error"> + <p class="error"> + <t:if test="!error.contains('Error')"> + <img src="${asset:context:/img/icons/crystal/stop.png}" alt="${message:error}" /> + </t:if> + ${error} + </p> + </t:loop> + </div> + </t:block> + <t:block t:id="warningsBlock"> + <div class="zoneFlash"> + <t:loop t:source="warnings" t:value="warning"> + <p class="warning"> + <t:if test="!warning.contains('Error')"> + <img src="${asset:context:/img/icons/crystal/warning.png}" alt="${message:warning}" /> + </t:if> + ${warning} + </p> + </t:loop> + </div> + <t:body /> + </t:block> + <t:block t:id="infosBlock"> + <div class="zoneFlash"> + <t:loop t:source="infos" t:value="info"> + <p class="info"> + <img src="${asset:context:/img/icons/crystal/info.png}" alt="${message:info}" /> ${info} + </p> + </t:loop> + </div> + <t:body /> + </t:block> +</html> \ No newline at end of file Added: trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/Layout.properties =================================================================== --- trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/Layout.properties (rev 0) +++ trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/Layout.properties 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,3 @@ +menu-references=References +menu-entry=Pr\u00E9visionnel +menu-category=Cat\u00E9gories \ No newline at end of file Added: trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/Layout.tml =================================================================== --- trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/Layout.tml (rev 0) +++ trunk/billy-ui/src/main/resources/org/chorem/billy/ui/components/Layout.tml 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,45 @@ +<!-- Layout.tml + + Author: fdesbois + Revision: $Revision: 36 $ + + Last update: $Date: 2009-07-29 14:56:24 +0200 (Wed, 29 Jul 2009) $ + by $Author: fdesbois $ +--> +<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> + <head> + <t:if test="hasBorder()"> + <title>Ca$h : ${pageTitle}</title> + <link rel="stylesheet" type="text/css" href="${asset:context:}/css/main.css" /> + <link rel="stylesheet" type="text/css" href="${asset:context:}/css/window/default.css" /> + <link rel="stylesheet" type="text/css" href="${asset:context:}/css/window/alphacube.css" /> + <link rel="stylesheet" type="text/css" href="${asset:context:}/css/common.css" /> + </t:if> + </head> + <body> + <div id='layout'> + <t:if test="hasBorder()"> + <div id="header">CA$H</div> + <ul id="lang"> + <li><t:actionlink t:id="langFrLink"><img src="${asset:context:img/flag_fr.png}" alt="Français"/></t:actionlink></li> + <li><t:actionlink t:id="langEnLink"><img src="${asset:context:img/flag_en.png}" alt="English" /></t:actionlink></li> + </ul> + <div id="left_side"> + <div id="menu"> + <ul> + <li><t:pagelink t:id="entryLink" t:page="previewTable">${message:menu-entry}</t:pagelink></li> + <li><t:pagelink t:id="categoryLink" t:page="categoryManager">${message:menu-category}</t:pagelink></li> + <li><t:pagelink t:id="referenceLink" t:page="reference/list">${message:menu-references}</t:pagelink></li> + </ul> + </div> + <img src="${asset:context:/img/7ter.jpg}" alt="petits lutins"/> + </div> + </t:if> + <div id="${ident}" class="main"> + <t:clientMessages> + <t:body /> + </t:clientMessages> + </div> + </div> + </body> +</html> Added: trunk/billy-ui/src/main/webapp/Index.tml =================================================================== --- trunk/billy-ui/src/main/webapp/Index.tml (rev 0) +++ trunk/billy-ui/src/main/webapp/Index.tml 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,13 @@ +<!-- Index.tml + + Author: fdesbois + Revision: $Revision: 5 $ + + Last update: $Date: 2009-07-31 16:58:45 +0200 (Fri, 31 Jul 2009) $ + by $Author: fdesbois $ +--> +<t:layout t:ident="index" t:pageTitle="Index" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"> + <div> + ${message:welcome} + </div> +</t:layout> \ No newline at end of file Added: trunk/billy-ui/src/main/webapp/META-INF/context.xml =================================================================== --- trunk/billy-ui/src/main/webapp/META-INF/context.xml (rev 0) +++ trunk/billy-ui/src/main/webapp/META-INF/context.xml 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Context antiJARLocking="true" path="/billy"/> Added: trunk/billy-ui/src/main/webapp/WEB-INF/web.xml =================================================================== --- trunk/billy-ui/src/main/webapp/WEB-INF/web.xml (rev 0) +++ trunk/billy-ui/src/main/webapp/WEB-INF/web.xml 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright 2007 The Apache Software Foundation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<!DOCTYPE web-app + PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" + "http://java.sun.com/dtd/web-app_2_3.dtd"> +<web-app> + <display-name>Billy Web Interface</display-name> + <context-param> + <!-- The only significant configuration for Tapestry 5, this informs Tapestry +of where to look for pages, components and mixins. --> + <param-name>tapestry.app-package</param-name> + <param-value>org.chorem.billy.ui</param-value> + </context-param> + <filter> + <filter-name>app</filter-name> + <filter-class>org.apache.tapestry5.TapestryFilter</filter-class> + </filter> + <filter-mapping> + <filter-name>app</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> +</web-app> + Added: trunk/billy-ui/src/main/webapp/css/common.css =================================================================== --- trunk/billy-ui/src/main/webapp/css/common.css (rev 0) +++ trunk/billy-ui/src/main/webapp/css/common.css 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,214 @@ +* { + margin: 0; + padding: 0; + font-family: Tahoma, Verdana, Arial, Helvetica, Courier New, Courier, mono; + /*font-family: Arial, Helvetica, sans-serif;*/ +} + +.fleft { + float: left; +} + +.fright { + float: right; +} + +.clearfix { + display:block; +} + +.hidden { + display: none; +} + +.clearfix:after { + content:"."; + display:block; + height:0; + clear:both; + visibility:hidden; +} + +.dialog_content { + background-image: url("../img/lutin.gif"); + background-repeat: no-repeat; + background-position: top right; + color: #000000; + background-color: #FFFFFF; + font-size: 1em; +} + +/* Lien sur une image */ +a.img { + text-decoration:none; + cursor: pointer; +} + +/* Balisage d'erreurs/warnings */ +p.warning { + color: blue; + font-size: 1.2em; + font-weight: bold; + font-family: monospace; +} +p.error { + color: red; + font-size: 1.4em; + font-weight: bold; + font-family: monospace; +} +p.info { + color: black; + font-size: 1.2em; + font-weight: bold; + font-family: monospace; +} + +.spinner { + background: url(../img/spinner.gif) no-repeat center center; + height: 40px; +} + +#contacts-grid td p { + margin: 2px; +} + +/* Boutons caches par des images */ +input.ico { + border: 0 none; + font-size: 0; + width: 24px; + height: 24px; + cursor: pointer; +} + +input.add { + background: url(../img/icons/crystal/add.png) no-repeat center center; +} + +input.save { + background: url(../img/icons/crystal/save.png) no-repeat center center; +} + +input.cancel { + background: url(../img/icons/crystal/reload.png) no-repeat center center; +} + +input.clock { + background: url(../img/icons/crystal/clock.png) no-repeat center center; +} + +input.remove { + background: url(../img/icons/crystal/remove.png) no-repeat center center; +} + +input.delete { + background: url(../img/icons/crystal/cancel.png) no-repeat center center; +} + +/* Configuration du BlockManager */ +div.component { + border: 2px outset #000000; + padding: 10px; + background-color: #d9ebf4; + margin: 10px; +} + +div.component div.buttons { + padding-left: 15px; + padding-top: 5px; +} + +/* Ecrasement styles Tapestry */ +table.t-data-grid { + background-color: #FFFFFF; +} + +dl.t-beandisplay { + background-color: transparent; + border: none; + min-width: 500px; +} + +div.t-error { + float: none; +} + +div.t-error ul { + background-color: transparent; +} + +div.t-autocomplete-menu ul { + background-color: #d9ebf4; +} + +/* Bonzoms miniForm */ +form.b-mini-form p { + line-height: 25px; + padding-right: 5px; + padding-bottom: 2px; +} + +form.b-mini-form p input.name { + width: 233px; +} + +input.date { + width: 100px; +} + +div.negative-amount { + color: red; +} + +/* Category */ +.categories td.name { + width: 700px; +} + +#zoneListEntries table.t-data-grid td.amount { + font-size: 0.8em; + letter-spacing: 1px; + padding-left: 15px; +} + +#zoneListEntries table.t-data-grid td.selected-listEntries { + background-color: yellow; +} + +#zoneListEntries table.t-data-grid tr.parentCategory { + background-color: #DDEEFF; + /*font-weight: bold;*/ +} + +#zoneListEntries table.t-data-grid tr.parentCategory td.title { + font-size: 1.2em; +} + +#zoneListEntries table.t-data-grid a.entry { + text-decoration: none; +} + +#zoneListEntries table.t-data-grid a.entry:hover { + text-decoration: underline; + color: black; +} + +#previewTable fieldset { + padding: 15px; + margin: 8px; +} + +#entryFormComponent input.interval { + width: 30px; +} + +div.zoneFlash { + padding: 10px; + border: 1px solid black; + margin: 10px; +} + +#entryFormComponent p.actions { + padding-top: 12px; +} \ No newline at end of file Added: trunk/billy-ui/src/main/webapp/css/main.css =================================================================== --- trunk/billy-ui/src/main/webapp/css/main.css (rev 0) +++ trunk/billy-ui/src/main/webapp/css/main.css 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,258 @@ +body +{ + background-color: #FFF; + background-image: url("../img/lutin.gif"); + background-repeat: no-repeat; + background-position: top right; + border: none; + font-family: Arial, "Arial Black", "Times New Roman", Times, serif; + font-size: small; +} + +body a +{ + color: green; +} + +body a img +{ + border: none; +} + +body ul +{ + list-style-type: none; + margin: 0px; + padding: 0px; +} + +/*Haut de page*/ +#header +{ + /*background-image: url("../img/pollen.png"); + background-repeat: no-repeat; + background-position: left;*/ + letter-spacing: 2px; + font-size: 3em; + height: 50px; + border: none; +} + +ul#lang +{ + border-top: 1px solid #aab; + border-bottom: 1px solid #aab; + padding: 5px; + display: block; + height: 13px; +} + +ul#lang li { + float: right; + padding-left: 5px; +} + +div.main { + padding: 15px; + float: left; +} + + + +DIV.t-error { + float: left; + padding: 2px; +} + +DIV.t-error DIV { + display: none; +} + +HTML>BODY DIV.t-error LI { + margin-left: 0px; +} + + +/*Cote gauche*/ +#left_side +{ + float: left; + width: 200px; + padding-top: 10px; + text-align: center; +} + +/* Le menu */ +#menu +{ + border: 1px solid #aab; + -moz-border-radius: 15px; + padding: 15px; + background-color: #def; + text-align: left; +} + +#menu a +{ + text-decoration: none; +} + +#menu a:hover +{ + background-color: #7ca838; + color: white; +} + +#submenu +{ + margin-bottom: 20px; + padding-right: 5px; + padding-left: 10px; + padding-bottom: 10px; + padding-top: 25px; + background-image: url('../img/titre_submenu.png'); + background-position: top center; + background-repeat: no-repeat; + background-color: #efefef; + border: 2px solid black; +} + +#submenu a +{ + text-decoration: none; +} + +#submenu a:hover +{ + background-color: #7ca838; + color: white; +} + +#submenu ul ul{ + margin-left: 10px; +} + +/*les liens*/ +#liens +{ + margin-bottom: 20px; + padding-right: 5px; + padding-left: 10px; + padding-bottom: 10px; + padding-top: 25px; + background-color: #efefef; + background-image: url('../img/titre_liens.png'); + background-position: top center; + background-repeat: no-repeat; + border: 2px solid black; +} + +#liens a +{ + text-decoration: none; +} + +#liens a:hover +{ + background-color: #7ca838; + color: white; +} + +/*Cote droit*/ +#right_side +{ + float: right; + width: 150px; +} + +#news +{ + margin-bottom: 20px; + padding-right: 10px; + padding-left: 10px; + padding-bottom: 5px; + padding-top: 20px; + background-color: #efefef; + background-image: url('../img/titre_news.png'); + background-position: top center; + background-repeat: no-repeat; + border: 2px solid black; +} + +#news a +{ + text-decoration: none; + font-size: x-small; +} + +#news a:hover +{ + text-decoration: underline; + font-size: x-small; +} + +#news marquee +{ + margin-bottom: 5px; +} + +.elt_news +{ + margin-bottom: 30px; +} + +/* Le corps de la page */ + +#corps +{ + margin-left: 200px; + text-align: justify; + color: #000; + border: none; + font-family: Arial, "Arial Black", "Times New Roman", Times, serif; +} + +#corps h1 +{ + text-align: center; + color: #17a833; +} + +#corps h2, h3, h4 +{ + text-align: center; +} + +#address_bar +{ + background-color: #def; + padding: 5px; + margin-left: 15px; +} + +#content +{ + padding: 15px; +} + +#erreur +{ + text-align: center; +} + +/* Le pied de page (qui se trouve tout en bas, en g�n�ral pour les copyrights) */ + +#footer +{ + padding: 5px; + font-family: Arial, "Arial Black", "Times New Roman", Times, serif; + font-size: small; + text-align: center; + color: #B3B3B3; + border: none; +} + +#sponsors +{ + text-align: center; +} Added: trunk/billy-ui/src/main/webapp/css/window/alert/bottom.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alert/bottom.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alert/bottom_left.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alert/bottom_left.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alert/bottom_right.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alert/bottom_right.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alert/left.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alert/left.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alert/overlay.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alert/overlay.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alert/progress.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alert/progress.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alert/right.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alert/right.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alert/top.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alert/top.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alert/top_left.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alert/top_left.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alert/top_right.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alert/top_right.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alert.css =================================================================== --- trunk/billy-ui/src/main/webapp/css/window/alert.css (rev 0) +++ trunk/billy-ui/src/main/webapp/css/window/alert.css 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,119 @@ +.overlay_alert { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.alert_nw { + width: 5px; + height: 5px; + background: transparent url(alert/top_left.gif) no-repeat bottom left; +} + +.alert_n { + height: 5px; + background: transparent url(alert/top.gif) repeat-x bottom left; +} + +.alert_ne { + width: 5px; + height: 5px; + background: transparent url(alert/top_right.gif) no-repeat bottom left +} + +.alert_e { + width: 5px; + background: transparent url(alert/right.gif) repeat-y 0 0; +} + +.alert_w { + width: 5px; + background: transparent url(alert/left.gif) repeat-y 0 0; +} + +.alert_sw { + width: 5px; + height: 5px; + background: transparent url(alert/bottom_left.gif) no-repeat 0 0; +} + +.alert_s { + height: 5px; + background: transparent url(alert/bottom.gif) repeat-x 0 0; +} + +.alert_se, .alert_sizer { + width: 5px; + height: 5px; + background: transparent url(alert/bottom_right.gif) no-repeat 0 0; +} + +.alert_close { + width:0px; + height:0px; + display:none; +} + +.alert_minimize { + width:0px; + height:0px; + display:none; +} + +.alert_maximize { + width:0px; + height:0px; + display:none; +} + +.alert_title { + float:left; + height:1px; + width:100%; +} + +.alert_content { + overflow:visible; + color: #000; + font-family: Tahoma, Arial, sans-serif; + font: 12px arial; + background: #FFF; +} + +/* For alert/confirm dialog */ +.alert_window { + background: #FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.alert_message { + font: 12px arial; + width:100%; + color:#F00; + padding-bottom:10px; +} + +.alert_buttons { + text-align:center; + width:100%; +} + +.alert_buttons input { + width:20%; + margin:10px; +} + +.alert_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background: #FFF url('alert/progress.gif') no-repeat center center +} + + Property changes on: trunk/billy-ui/src/main/webapp/css/window/alert.css ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/css/window/alert_lite.css =================================================================== --- trunk/billy-ui/src/main/webapp/css/window/alert_lite.css (rev 0) +++ trunk/billy-ui/src/main/webapp/css/window/alert_lite.css 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,88 @@ +.overlay_alert_lite { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.alert_lite_sizer { + width:0px; + height:0px; + display:none; +} + +.alert_lite_close { + width:0px; + height:0px; + display:none; +} + +.alert_lite_minimize { + width:0px; + height:0px; + display:none; +} + +.alert_lite_maximize { + width:0px; + height:0px; + display:none; +} + +.alert_lite_title { + width:0px; + height:0px; + display:none; +} + +.alert_lite_content { + overflow:auto; + color: #000; + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; + background: #FFF; +} + + +/* For alert/confirm dialog */ +.alert_lite_window { + border:1px solid #F00; + background: #FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.alert_lite_message { + font-size:16px; + text-align:center; + width:100%; + color:#F00; + padding-bottom:10px; +} + +.alert_lite_buttons { + text-align:center; + width:100%; +} + +.alert_lite_buttons input { + width:20%; + margin:10px; +} + +.alert_lite_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background: #FFF url('alert/progress.gif') no-repeat center center +} + +table.alert_lite_header { + border:1px solid #F00; + background:#FFF +} + Property changes on: trunk/billy-ui/src/main/webapp/css/window/alert_lite.css ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/css/window/alphacube/bottom-left-c.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alphacube/bottom-left-c.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alphacube/bottom-middle.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alphacube/bottom-middle.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alphacube/bottom-right-c.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alphacube/bottom-right-c.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alphacube/button-close-focus.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alphacube/button-close-focus.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alphacube/button-max-focus.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alphacube/button-max-focus.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alphacube/button-min-focus.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alphacube/button-min-focus.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alphacube/frame-left.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alphacube/frame-left.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alphacube/frame-right.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alphacube/frame-right.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alphacube/left-top.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alphacube/left-top.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alphacube/right-top.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alphacube/right-top.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alphacube/top-middle.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/alphacube/top-middle.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/alphacube.css =================================================================== --- trunk/billy-ui/src/main/webapp/css/window/alphacube.css (rev 0) +++ trunk/billy-ui/src/main/webapp/css/window/alphacube.css 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,150 @@ +.overlay_alphacube { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.alphacube_nw { + background: transparent url(alphacube/left-top.gif) no-repeat 0 0; + width:10px; + height:25px; +} + +.alphacube_n { + background: transparent url(alphacube/top-middle.gif) repeat-x 0 0; + height:25px; +} + +.alphacube_ne { + background: transparent url(alphacube/right-top.gif) no-repeat 0 0; + width:10px; + height:25px; +} + +.alphacube_w { + background: transparent url(alphacube/frame-left.gif) repeat-y top left; + width:7px; +} + +.alphacube_e { + background: transparent url(alphacube/frame-right.gif) repeat-y top right; + width:7px; +} + +.alphacube_sw { + background: transparent url(alphacube/bottom-left-c.gif) no-repeat 0 0; + width:7px; + height:7px; +} + +.alphacube_s { + background: transparent url(alphacube/bottom-middle.gif) repeat-x 0 0; + height:7px; +} + +.alphacube_se, .alphacube_sizer { + background: transparent url(alphacube/bottom-right-c.gif) no-repeat 0 0; + width:7px; + height:7px; +} + +.alphacube_sizer { + cursor:se-resize; +} + +.alphacube_close { + width: 23px; + height: 23px; + background: transparent url(alphacube/button-close-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:11px; + cursor:pointer; + z-index:1000; +} + +.alphacube_minimize { + width: 23px; + height: 23px; + background: transparent url(alphacube/button-min-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:55px; + cursor:pointer; + z-index:1000; +} + +.alphacube_maximize { + width: 23px; + height: 23px; + background: transparent url(alphacube/button-max-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:33px; + cursor:pointer; + z-index:1000; +} + +.alphacube_title { + float:left; + height:14px; + font-size:14px; + text-align:center; + margin-top:2px; + width:100%; + color:#123456; +} + +.alphacube_content { + overflow:auto; + color: #000; + font-family: Tahoma, Arial, sans-serif; + font: 12px arial; + background:#FDFDFD; +} + +/* For alert/confirm dialog */ +.alphacube_window { + border:1px solid #F00; + background: #FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.alphacube_message { + font: 12px arial; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.alphacube_buttons { + text-align:center; + width:100%; +} + +.alphacube_buttons input { + width:20%; + margin:10px; +} + +.alphacube_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background: #FFF url('alert/progress.gif') no-repeat center center +} + +.alphacube_wired_frame { + background: #FFF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + + Property changes on: trunk/billy-ui/src/main/webapp/css/window/alphacube.css ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/css/window/behavior.htc =================================================================== --- trunk/billy-ui/src/main/webapp/css/window/behavior.htc (rev 0) +++ trunk/billy-ui/src/main/webapp/css/window/behavior.htc 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,51 @@ +<public:component> +<public:attach event="onpropertychange" onevent="propertyChanged()" /> +<script> + +var supported = /MSIE (5\.5)|[6789]/.test(navigator.userAgent) && navigator.platform == "Win32"; +var realSrc; +var blankSrc = "blank.gif"; + +if (supported) fixImage(); + +function propertyChanged() { + if (!supported) return; + + var pName = event.propertyName; + if (pName != "src") return; + // if not set to blank + if ( ! new RegExp(blankSrc).test(src)) + fixImage(); +}; + +function fixImage() { + // get src + var src = element.src; + + // check for real change + if (src == realSrc) { + element.src = blankSrc; + return; + } + + if ( ! new RegExp(blankSrc).test(src)) { + // backup old src + realSrc = src; + } + + // test for png + if ( /\.png$/.test( realSrc.toLowerCase() ) ) { + // set blank image + element.src = blankSrc; + // set filter + element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + + src + "',sizingMethod='scale')"; + } + else { + // remove filter + element.runtimeStyle.filter = ""; + } +} + +</script> +</public:component> \ No newline at end of file Property changes on: trunk/billy-ui/src/main/webapp/css/window/behavior.htc ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/css/window/darkX/button-close-focused.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/darkX/button-close-focused.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/darkX/button-maximize-focused.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/darkX/button-maximize-focused.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/darkX/button-minimize-focused.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/darkX/button-minimize-focused.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/darkX/frame-bottom-left-focused.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/darkX/frame-bottom-left-focused.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/darkX/frame-bottom-mid-focused.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/darkX/frame-bottom-mid-focused.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/darkX/frame-bottom-right-focused.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/darkX/frame-bottom-right-focused.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/darkX/frame-left-focused.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/darkX/frame-left-focused.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/darkX/frame-right-focused.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/darkX/frame-right-focused.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/darkX/titlebar-left-focused.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/darkX/titlebar-left-focused.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/darkX/titlebar-mid-focused.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/darkX/titlebar-mid-focused.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/darkX/titlebar-right-focused.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/darkX/titlebar-right-focused.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/darkX.css =================================================================== --- trunk/billy-ui/src/main/webapp/css/window/darkX.css (rev 0) +++ trunk/billy-ui/src/main/webapp/css/window/darkX.css 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,121 @@ +.overlay_darkX { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.darkX_nw { + background: transparent url(darkX/titlebar-left-focused.png) no-repeat 0 0; + width:6px; + height:21px; +} +.darkX_n { + background: transparent url(darkX/titlebar-mid-focused.png) repeat-x 0 0; + height:21px; +} +.darkX_ne { + background: transparent url(darkX/titlebar-right-focused.png) no-repeat 0 0; + width:6px; + height:21px; +} +.darkX_w { + background: transparent url(darkX/frame-left-focused.png) repeat-y top left; + width:3px; +} + +.darkX_e { + background: transparent url(darkX/frame-right-focused.png) repeat-y top right; + width:3px; +} + +.darkX_sw { + background: transparent url(darkX/frame-bottom-left-focused.png) no-repeat 0 0; + width:5px; + height:3px; +} +.darkX_s { + background: transparent url(darkX/frame-bottom-mid-focused.png) repeat-x 0 0; + height:3px; +} +.darkX_se, .darkX_sizer { + background: transparent url(darkX/frame-bottom-right-focused.png) no-repeat 0 0; + width:5px; + height:3px; +} + +.darkX_sizer { + cursor:se-resize; +} + +.darkX_close { + width: 21px; + height: 21px; + background: transparent url(darkX/button-close-focused.png) no-repeat 0 0; + position:absolute; + top:0px; + right:5px; + cursor:pointer; + z-index:1000; +} + +.darkX_minimize { + width: 21px; + height: 21px; + background: transparent url(darkX/button-minimize-focused.png) no-repeat 0 0; + position:absolute; + top:0px; + right:26px; + cursor:pointer; + z-index:1000; +} + +.darkX_maximize { + width: 21px; + height: 21px; + background: transparent url(darkX/button-maximize-focused.png) no-repeat 0 0; + position:absolute; + top:0px; + right:47px; + cursor:pointer; + z-index:1000; +} + + +.darkX_title { + float:left; + height:14px; + font-size:12px; + text-align:center; + margin-top:2px; + width:100%; + color:#FFF; +} + +.darkX_content { + overflow:auto; + color: #E6DF2A; + font-family: Tahoma, Arial, sans-serif; + font-size: 14px; + background:#5E5148; +} + + +/* FOR IE */ +* html .darkX_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-minimize-focused.png", sizingMethod="crop"); +} + +* html .darkX_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-maximize-focused.png", sizingMethod="scale"); +} + +* html .darkX_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/darkX/button-close-focused.png", sizingMethod="crop"); +} Property changes on: trunk/billy-ui/src/main/webapp/css/window/darkX.css ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/css/window/debug.css =================================================================== --- trunk/billy-ui/src/main/webapp/css/window/debug.css (rev 0) +++ trunk/billy-ui/src/main/webapp/css/window/debug.css 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,25 @@ +div.inspector div.inspectable { + padding: 0.25em 0 0.25em 1em; + background-color: Gray; + color: white; + border: outset 2px white; + cursor: pointer; +} + +div.inspector div.child { + margin: 0 0 0 1em; +} + +#debug_window_content { /* DIV container for debug sizing*/ + width:250px; + height:100px; + background-color:#000; +} + +#debug { /* DIV container for debug contents*/ + padding:3px; + color:#0f0; + font-family:monaco, Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size:10px; +} + Property changes on: trunk/billy-ui/src/main/webapp/css/window/debug.css ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/css/window/default/bottom_left.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/bottom_left.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/bottom_mid.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/bottom_mid.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/bottom_right.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/bottom_right.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/bottom_right_resize.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/bottom_right_resize.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/center_left.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/center_left.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/center_right.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/center_right.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/clear.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/clear.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/close.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/close.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/inspect.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/inspect.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/maximize.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/maximize.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/minimize.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/minimize.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/overlay.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/overlay.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/resize.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/resize.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/sizer.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/sizer.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/top_left.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/top_left.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/top_mid.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/top_mid.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default/top_right.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/default/top_right.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/default.css =================================================================== --- trunk/billy-ui/src/main/webapp/css/window/default.css (rev 0) +++ trunk/billy-ui/src/main/webapp/css/window/default.css 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,155 @@ +.overlay_dialog { + background-color: #666666; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.overlay___invisible__ { + background-color: #666666; + filter:alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; +} + +.dialog_nw { + width: 9px; + height: 23px; + background: transparent url(default/top_left.gif) no-repeat 0 0; +} + +.dialog_n { + background: transparent url(default/top_mid.gif) repeat-x 0 0; + height: 23px; +} + +.dialog_ne { + width: 9px; + height: 23px; + background: transparent url(default/top_right.gif) no-repeat 0 0; +} + +.dialog_e { + width: 2px; + background: transparent url(default/center_right.gif) repeat-y 0 0; +} + +.dialog_w { + width: 2px; + background: transparent url(default/center_left.gif) repeat-y 0 0; +} + +.dialog_sw { + width: 9px; + height: 19px; + background: transparent url(default/bottom_left.gif) no-repeat 0 0; +} + +.dialog_s { + background: transparent url(default/bottom_mid.gif) repeat-x 0 0; + height: 19px; +} + +.dialog_se { + width: 9px; + height: 19px; + background: transparent url(default/bottom_right.gif) no-repeat 0 0; +} + +.dialog_sizer { + width: 9px; + height: 19px; + background: transparent url(default/sizer.gif) no-repeat 0 0; + cursor:se-resize; +} + +.dialog_close { + width: 14px; + height: 14px; + background: transparent url(default/close.gif) no-repeat 0 0; + position:absolute; + top:5px; + left:8px; + cursor:pointer; + z-index:2000; +} + +.dialog_minimize { + width: 14px; + height: 15px; + background: transparent url(default/minimize.gif) no-repeat 0 0; + position:absolute; + top:5px; + left:28px; + cursor:pointer; + z-index:2000; +} + +.dialog_maximize { + width: 14px; + height: 15px; + background: transparent url(default/maximize.gif) no-repeat 0 0; + position:absolute; + top:5px; + left:49px; + cursor:pointer; + z-index:2000; +} + +.dialog_title { + float:left; + height:14px; + font-family: Tahoma, Arial, sans-serif; + font-size:12px; + text-align:center; + width:100%; + color:#000; +} + +.dialog_content { + overflow:auto; + color: #DDD; + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; + background-color:#123; +} + +.top_draggable, .bottom_draggable { + cursor:move; +} + +.status_bar { + font-size:12px; +} +.status_bar input{ + font-size:12px; +} + +.wired_frame { + display: block; + position: absolute; + border: 1px #000 dashed; +} + +/* DO NOT CHANGE THESE VALUES*/ +.dialog { + display: block; + position: absolute; +} + +.dialog table.table_window { + border-collapse: collapse; + border-spacing: 0; + width: 100%; + margin: 0px; + padding:0px; +} + +.dialog table.table_window td , .dialog table.table_window th { + padding: 0; +} + +.dialog .title_window { + -moz-user-select:none; +} + Property changes on: trunk/billy-ui/src/main/webapp/css/window/default.css ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/css/window/iefix/blank.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/iefix/blank.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/iefix/iepngfix.css =================================================================== --- trunk/billy-ui/src/main/webapp/css/window/iefix/iepngfix.css (rev 0) +++ trunk/billy-ui/src/main/webapp/css/window/iefix/iepngfix.css 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,3 @@ +/* PNG fix for all themes that uses PNG images on IE */ +td, div { behavior: url(../themes/iefix/iepngfix.htc) } + Property changes on: trunk/billy-ui/src/main/webapp/css/window/iefix/iepngfix.css ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/css/window/iefix/iepngfix.htc =================================================================== --- trunk/billy-ui/src/main/webapp/css/window/iefix/iepngfix.htc (rev 0) +++ trunk/billy-ui/src/main/webapp/css/window/iefix/iepngfix.htc 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,54 @@ +<public:component> +<public:attach event="onpropertychange" onevent="doFix()" /> + +<script type="text/javascript"> + +// IE5.5+ PNG Alpha Fix v1.0RC4 +// (c) 2004-2005 Angus Turnbull http://www.twinhelix.com + +// This is licensed under the CC-GNU LGPL, version 2.1 or later. +// For details, see: http://creativecommons.org/licenses/LGPL/2.1/ + +// Modified/Simplified on 04/23/2007 by Sebastien Gruhier (http://www.xilinus.com) +// To work only on background and to handle repeat bg + +// This must be a path to a blank image. That's all the configuration you need. +if (typeof blankImg == 'undefined') var blankImg = 'blank.gif'; + +var f = 'DXImageTransform.Microsoft.AlphaImageLoader'; + +function filt(s, m) +{ + if (filters[f]) + { + filters[f].enabled = s ? true : false; + if (s) with (filters[f]) { src = s; sizingMethod = m } + } + else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")'; +} + +function doFix() +{ + // Assume IE7 is OK. + if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) || + (event && !/(background|src)/.test(event.propertyName))) return; + + var bgImg = currentStyle.backgroundImage || style.backgroundImage; + var bgRepeat = currentStyle.backgroundRepeat || style.backgroundRepeat; + if (bgImg && bgImg != 'none') + { + if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i)) + { + var s = RegExp.$1; + if (currentStyle.width == 'auto' && currentStyle.height == 'auto') + style.width = offsetWidth + 'px'; + style.backgroundImage = 'none'; + filt(s, bgRepeat == "no-repeat" ? 'crop' : 'scale'); + } + } +} + +doFix(); + +</script> +</public:component> \ No newline at end of file Property changes on: trunk/billy-ui/src/main/webapp/css/window/iefix/iepngfix.htc ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/css/window/lighting/background_buttons.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/background_buttons.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-left-blue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-left-blue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-left-darkblue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-left-darkblue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-left-green.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-left-green.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-left-grey.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-left-grey.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-middle-blue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-middle-blue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-middle-darkblue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-middle-darkblue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-middle-green.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-middle-green.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-middle-grey.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-middle-grey.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-right-blue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-right-blue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-right-darkblue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-right-darkblue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-right-green.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-right-green.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-right-grey.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/bottom-right-grey.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/button-close-blue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/button-close-blue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/button-close-darkblue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/button-close-darkblue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/button-close-green.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/button-close-green.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/button-close-grey.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/button-close-grey.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/button-maximize-blue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/button-maximize-blue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/button-maximize-darkblue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/button-maximize-darkblue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/button-maximize-green.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/button-maximize-green.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/button-maximize-grey.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/button-maximize-grey.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/button-minimize-blue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/button-minimize-blue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/button-minimize-darkblue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/button-minimize-darkblue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/button-minimize-green.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/button-minimize-green.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/button-minimize-grey.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/button-minimize-grey.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/left-blue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/left-blue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/left-darkblue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/left-darkblue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/left-green.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/left-green.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/left-grey.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/left-grey.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/pngbehavior.htc =================================================================== --- trunk/billy-ui/src/main/webapp/css/window/lighting/pngbehavior.htc (rev 0) +++ trunk/billy-ui/src/main/webapp/css/window/lighting/pngbehavior.htc 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,67 @@ +<public:component> +<public:attach event="onpropertychange" onevent="doFix()" /> + +<script type="text/javascript"> + +// IE5.5+ PNG Alpha Fix v1.0RC4 +// (c) 2004-2005 Angus Turnbull http://www.twinhelix.com + +// This is licensed under the CC-GNU LGPL, version 2.1 or later. +// For details, see: http://creativecommons.org/licenses/LGPL/2.1/ + + +// This must be a path to a blank image. That's all the configuration you need. +if (typeof blankImg == 'undefined') var blankImg = 'blank.gif'; + + +var f = 'DXImageTransform.Microsoft.AlphaImageLoader'; + +function filt(s, m) +{ + if (filters[f]) + { + filters[f].enabled = s ? true : false; + if (s) with (filters[f]) { src = s; sizingMethod = m } + } + else if (s) style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")'; +} + +function doFix() +{ + alert('ok') + + // Assume IE7 is OK. + if (!/MSIE (5\.5|6\.)/.test(navigator.userAgent) || + (event && !/(background|src)/.test(event.propertyName))) return; + + var bgImg = currentStyle.backgroundImage || style.backgroundImage; + + if (tagName == 'IMG') + { + if ((/\.png$/i).test(src)) + { + if (currentStyle.width == 'auto' && currentStyle.height == 'auto') + style.width = offsetWidth + 'px'; + filt(src, 'scale'); + src = blankImg; + } + else if (src.indexOf(blankImg) < 0) filt(); + } + else if (bgImg && bgImg != 'none') + { + if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i)) + { + var s = RegExp.$1; + if (currentStyle.width == 'auto' && currentStyle.height == 'auto') + style.width = offsetWidth + 'px'; + style.backgroundImage = 'none'; + filt(s, 'crop'); + // IE link fix. + for (var n = 0; n < childNodes.length; n++) + if (childNodes[n].style) childNodes[n].style.position = 'relative'; + } + else filt(); + } +} + +doFix(); Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/pngbehavior.htc ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/css/window/lighting/right-blue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/right-blue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/right-darkblue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/right-darkblue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/right-green.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/right-green.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/right-grey.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/right-grey.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/spinner.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/spinner.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/top-left-blue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/top-left-blue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/top-left-darkblue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/top-left-darkblue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/top-left-green.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/top-left-green.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/top-left-grey.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/top-left-grey.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/top-middle-blue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/top-middle-blue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/top-middle-darkblue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/top-middle-darkblue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/top-middle-green.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/top-middle-green.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/top-middle-grey.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/top-middle-grey.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/top-right-blue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/top-right-blue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/top-right-darkblue.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/top-right-darkblue.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/top-right-green.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/top-right-green.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting/top-right-grey.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting/top-right-grey.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/lighting.css =================================================================== --- trunk/billy-ui/src/main/webapp/css/window/lighting.css (rev 0) +++ trunk/billy-ui/src/main/webapp/css/window/lighting.css 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,960 @@ +.overlay___invisible__ { + background-color: #666; + filter:alpha(opacity=0); + -moz-opacity: 0; + opacity: 0; +} + +.top_draggable, .bottom_draggable { + cursor:move; +} + +.status_bar { + font-size:12px; +} +.status_bar input{ + font-size:12px; +} + +.wired_frame { + display:block; + position:absolute; + border:1px #000 dashed; +} + + + +.overlay_bluelighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.bluelighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.bluelighting_nw { + background:transparent url(lighting/top-left-blue.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.bluelighting_n { + background:transparent url(lighting/top-middle-blue.png) repeat-x 0 0; + height:28px; +} + +.bluelighting_ne { + background:transparent url(lighting/top-right-blue.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.bluelighting_w { + background:transparent url(lighting/left-blue.png) repeat-y top left; + width:9px; +} + +.bluelighting_e { + background:transparent url(lighting/right-blue.png) repeat-y top right; + width:15px; +} + +.bluelighting_sw { + background:transparent url(lighting/bottom-left-blue.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.bluelighting_s { + background:transparent url(lighting/bottom-middle-blue.png) repeat-x 0 0; + height:15px; +} + +.bluelighting_se, .bluelighting_sizer { + background:transparent url(lighting/bottom-right-blue.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.bluelighting_sizer { + cursor:se-resize; +} + +.bluelighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-blue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.bluelighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-blue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.bluelighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-blue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.bluelighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#17385B; +} + +.bluelighting_content { + overflow:auto; + color:#000; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#BFDBFF; +} + +/* For alert/confirm dialog */ +.bluelighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.bluelighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.bluelighting_buttons { + text-align:center; + width:100%; +} + +.bluelighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.bluelighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .bluelighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-blue.png", sizingMethod="scale"); +} + +* html .bluelighting_se, * html .bluelighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-blue.png", sizingMethod="crop"); +} + +* html .bluelighting_content { + background:#B8D7FF; +} + + + +.overlay_greylighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greylighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greylighting_nw { + background:transparent url(lighting/top-left-grey.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.greylighting_n { + background:transparent url(lighting/top-middle-grey.png) repeat-x 0 0; + height:28px; +} + +.greylighting_ne { + background:transparent url(lighting/top-right-grey.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.greylighting_w { + background:transparent url(lighting/left-grey.png) repeat-y top left; + width:9px; +} + +.greylighting_e { + background:transparent url(lighting/right-grey.png) repeat-y top right; + width:15px; +} + +.greylighting_sw { + background:transparent url(lighting/bottom-left-grey.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.greylighting_s { + background:transparent url(lighting/bottom-middle-grey.png) repeat-x 0 0; + height:15px; +} + +.greylighting_se, .greylighting_sizer { + background:transparent url(lighting/bottom-right-grey.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.greylighting_sizer { + cursor:se-resize; +} + +.greylighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-grey.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.greylighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-grey.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.greylighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-grey.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.greylighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#525252; +} + +.greylighting_content { + overflow:auto; + color:#000; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#CDCDCD; +} + +/* For alert/confirm dialog */ +.greylighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.greylighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.greylighting_buttons { + text-align:center; + width:100%; +} + +.greylighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.greylighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .greylighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-grey.png", sizingMethod="crop"); +} + +* html .greylighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-grey.png", sizingMethod="scale"); +} + +* html .greylighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-grey.png", sizingMethod="crop"); +} + +* html .greylighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-grey.png", sizingMethod="scale"); +} + +* html .greylighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-grey.png", sizingMethod="scale"); +} + +* html .greylighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-grey.png", sizingMethod="crop"); +} + +* html .greylighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-grey.png", sizingMethod="scale"); +} + +* html greylighting_se, * html .greylighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-grey.png", sizingMethod="crop"); +} + +* html .greylighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-grey.png", sizingMethod="crop"); +} + +* html .greylighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-grey.png", sizingMethod="crop"); +} + +* html .greylighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-grey.png", sizingMethod="crop"); +} + +* html .greylighting_content { + background:#C7C7C7; +} + + + +.overlay_greenlighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greenlighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.greenlighting_nw { + background:transparent url(lighting/top-left-green.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.greenlighting_n { + background:transparent url(lighting/top-middle-green.png) repeat-x 0 0; + height:28px; +} + +.greenlighting_ne { + background:transparent url(lighting/top-right-green.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.greenlighting_w { + background:transparent url(lighting/left-green.png) repeat-y top left; + width:9px; +} + +.greenlighting_e { + background:transparent url(lighting/right-green.png) repeat-y top right; + width:15px; +} + +.greenlighting_sw { + background:transparent url(lighting/bottom-left-green.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.greenlighting_s { + background:transparent url(lighting/bottom-middle-green.png) repeat-x 0 0; + height:15px; +} + +.greenlighting_se, .greenlighting_sizer { + background:transparent url(lighting/bottom-right-green.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.greenlighting_sizer { + cursor:se-resize; +} + +.greenlighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-green.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.greenlighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-green.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.greenlighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-green.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.greenlighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#2A6002; +} + +.greenlighting_content { + overflow:auto; + color:#000; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#ACFCAF; +} + +/* For alert/confirm dialog */ +.greenlighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.greenlighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.greenlighting_buttons { + text-align:center; + width:100%; +} + +.greenlighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.greenlighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .greenlighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-green.png", sizingMethod="crop"); +} + +* html .greenlighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-green.png", sizingMethod="scale"); +} + +* html .greenlighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-green.png", sizingMethod="crop"); +} + +* html .greenlighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-green.png", sizingMethod="scale"); +} + +* html .greenlighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-green.png", sizingMethod="scale"); +} + +* html .greenlighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-green.png", sizingMethod="crop"); +} + +* html .greenlighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-green.png", sizingMethod="scale"); +} + +* html greenlighting_se, * html .greenlighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-green.png", sizingMethod="crop"); +} + +* html .greenlighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-green.png", sizingMethod="crop"); +} + +* html .greenlighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-green.png", sizingMethod="crop"); +} + +* html .greenlighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-green.png", sizingMethod="crop"); +} + +* html .greenlighting_content { + background:#A4FCA7; +} + + + +.overlay_darkbluelighting { + background-color:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.darkbluelighting_wired_frame { + background:#FFF; + filter:alpha(opacity=60); + -moz-opacity:0.6; + opacity:0.6; +} + +.darkbluelighting_nw { + background:transparent url(lighting/top-left-darkblue.png) no-repeat 0 0; + width:9px; + height:28px; +} + +.darkbluelighting_n { + background:transparent url(lighting/top-middle-darkblue.png) repeat-x 0 0; + height:28px; +} + +.darkbluelighting_ne { + background:transparent url(lighting/top-right-darkblue.png) no-repeat 0 0; + width:15px; + height:28px; +} + +.darkbluelighting_w { + background:transparent url(lighting/left-darkblue.png) repeat-y top left; + width:9px; +} + +.darkbluelighting_e { + background:transparent url(lighting/right-darkblue.png) repeat-y top right; + width:15px; +} + +.darkbluelighting_sw { + background:transparent url(lighting/bottom-left-darkblue.png) no-repeat 0 0; + width:9px; + height:15px; +} + +.darkbluelighting_s { + background:transparent url(lighting/bottom-middle-darkblue.png) repeat-x 0 0; + height:15px; +} + +.darkbluelighting_se, .darkbluelighting_sizer { + background:transparent url(lighting/bottom-right-darkblue.png) no-repeat 0 0; + width:15px; + height:15px; +} + +.darkbluelighting_sizer { + cursor:se-resize; +} + +.darkbluelighting_close { + width:15px; + height:9px; + background:transparent url(lighting/button-close-darkblue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:10px; + cursor:pointer; + z-index:1000; +} + +.darkbluelighting_maximize { + width:15px; + height:9px; + background:transparent url(lighting/button-maximize-darkblue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:25px; + cursor:pointer; + z-index:1000; +} + +.darkbluelighting_minimize { + width:15px; + height:9px; + background:transparent url(lighting/button-minimize-darkblue.png) no-repeat 0 0; + position:absolute; + top:11px; + right:40px; + cursor:pointer; + z-index:1000; +} + +.darkbluelighting_title { + float:left; + height:14px; + font-size:14px; + font-weight:bold; + font-family:Verdana, Arial, sans-serif; + text-align:center; + margin-top:2px; + width:100%; + color:#E4EFFD; +} + +.darkbluelighting_content { + overflow:auto; + color:#FFF; + font-family:Verdana, Arial, sans-serif; + font-size:12px; + background:#0413C0; +} + +/* For alert/confirm dialog */ +.darkbluelighting_window { + border:1px solid #F00; + background:#FFF; + padding:20px; + margin-left:auto; + margin-right:auto; + width:400px; +} + +.darkbluelighting_message { + font-size:12px; + text-align:center; + width:100%; + padding-bottom:10px; +} + +.darkbluelighting_buttons { + text-align:center; + width:100%; +} + +.darkbluelighting_buttons input { + border:1px solid #999; + border-top-color:#CCC; + border-left-color:#CCC; + padding:2px; + background-color:#FFF; + color:#333; + background-image:url(lighting/background_buttons.gif); + background-repeat:repeat-x; + font-family:Verdana, Arial, sans-serif; + font-size:10px; + font-weight:bold; + text-align:center; +} + +.darkbluelighting_progress { + float:left; + margin:auto; + text-align:center; + width:100%; + height:16px; + background:transparent url('lighting/spinner.gif') no-repeat center center +} + +/* FOR IE */ +* html .darkbluelighting_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-left-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-middle-darkblue.png", sizingMethod="scale"); +} + +* html .darkbluelighting_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/top-right-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/left-darkblue.png", sizingMethod="scale"); +} + +* html .darkbluelighting_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/right-darkblue.png", sizingMethod="scale"); +} + +* html .darkbluelighting_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-left-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-middle-darkblue.png", sizingMethod="scale"); +} + +* html darkbluelighting_se, * html .darkbluelighting_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/bottom-right-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-close-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-minimize-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_maximize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/lighting/button-maximize-darkblue.png", sizingMethod="crop"); +} + +* html .darkbluelighting_content { + background:#020EBA; +} + Property changes on: trunk/billy-ui/src/main/webapp/css/window/lighting.css ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/B.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/B.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/BL.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/BL.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/BL_Main.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/BL_Main.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/BR.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/BR.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/BR_Main.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/BR_Main.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/B_Main.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/B_Main.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/L.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/L.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/L_Main.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/L_Main.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/R.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/R.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/R_Main.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/R_Main.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/T.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/T.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/TL.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/TL.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/TL_Main.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/TL_Main.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/TR.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/TR.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/TR_Main.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/TR_Main.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/T_Main.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/T_Main.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/close.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/close.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/maximize.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/maximize.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/minimize.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x/minimize.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x.css =================================================================== --- trunk/billy-ui/src/main/webapp/css/window/mac_os_x.css (rev 0) +++ trunk/billy-ui/src/main/webapp/css/window/mac_os_x.css 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,333 @@ +/* Focused windows */ +.overlay_mac_os_x { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.mac_os_x_nw { + background: transparent url(mac_os_x/TL_Main.png) no-repeat 0 0; + width:24px; + height:30px; +} + +.mac_os_x_n { + background: transparent url(mac_os_x/T_Main.png) repeat-x 0 0; + height:30px; +} + +.mac_os_x_ne { + background: transparent url(mac_os_x/TR_Main.png) no-repeat 0 0; + width:31px; + height:30px; +} + +.mac_os_x_w { + background: transparent url(mac_os_x/L_Main.png) repeat-y top left; + width:16px; +} + +.mac_os_x_e { + background: transparent url(mac_os_x/R_Main.png) repeat-y top right; + width:16px; +} + +.mac_os_x_sw { + background: transparent url(mac_os_x/BL_Main.png) no-repeat 0 0; + width:31px; + height:40px; +} + +.mac_os_x_s { + background: transparent url(mac_os_x/B_Main.png) repeat-x 0 0; + height:40px; +} + +.mac_os_x_se, .mac_os_x_sizer { + background: transparent url(mac_os_x/BR_Main.png) no-repeat 0 0; + width:31px; + height:40px; +} + +.mac_os_x_sizer { + cursor:se-resize; +} + +.mac_os_x_close { + width: 19px; + height: 19px; + background: transparent url(mac_os_x/close.gif) no-repeat 0 0; + position:absolute; + top:12px; + left:25px; + cursor:pointer; + z-index:1000; +} + +.mac_os_x_minimize { + width: 19px; + height: 19px; + background: transparent url(mac_os_x/minimize.gif) no-repeat 0 0; + position:absolute; + top:12px; + left:45px; + cursor:pointer; + z-index:1000; +} + +.mac_os_x_maximize { + width: 19px; + height: 19px; + background: transparent url(mac_os_x/maximize.gif) no-repeat 0 0; + position:absolute; + top:12px; + left:65px; + cursor:pointer; + z-index:1000; +} + +.mac_os_x_title { + float:left; + height:14px; + font-family: Tahoma, Arial, sans-serif; + font-size:12px; + text-align:center; + margin-top:8px; + width:100%; + color:#000; +} + +.mac_os_x_content { + overflow:auto; + color: #222; + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; + background:#FFF; +} +.mac_os_x_s .status_bar { + padding-bottom:24px; +} + +/* FOR IE */ +* html .mac_os_x_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TL_Main.png", sizingMethod="crop"); +} + +* html .mac_os_x_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/T_Main.png", sizingMethod="scale"); +} + +* html .mac_os_x_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TR_Main.png", sizingMethod="crop"); +} + +* html .mac_os_x_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/L_Main.png", sizingMethod="scale"); +} + +* html .mac_os_x_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/R_Main.png", sizingMethod="scale"); +} + +* html .mac_os_x_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BL_Main.png", sizingMethod="crop"); +} + +* html .mac_os_x_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/B_Main.png", sizingMethod="scale"); +} + +* html .mac_os_x_se { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR_Main.png", sizingMethod="crop"); +} + +* html .mac_os_x_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR_Main.png", sizingMethod="crop"); +} + + +/* Focused windows */ +.overlay_blur_os_x { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.blur_os_x_nw { + background: transparent url(mac_os_x/TL.png) no-repeat 0 0; + width:24px; + height:30px; +} + +.blur_os_x_n { + background: transparent url(mac_os_x/T.png) repeat-x 0 0; + height:30px; +} + +.blur_os_x_ne { + background: transparent url(mac_os_x/TR.png) no-repeat 0 0; + width:31px; + height:30px; +} + +.blur_os_x_w { + background: transparent url(mac_os_x/L.png) repeat-y top left; + width:16px; +} + +.blur_os_x_e { + background: transparent url(mac_os_x/R.png) repeat-y top right; + width:16px; +} + +.blur_os_x_sw { + background: transparent url(mac_os_x/BL.png) no-repeat 0 0; + width:31px; + height:40px; +} + +.blur_os_x_s { + background: transparent url(mac_os_x/B.png) repeat-x 0 0; + height:40px; +} + +.blur_os_x_se, .blur_os_x_sizer { + background: transparent url(mac_os_x/BR.png) no-repeat 0 0; + width:31px; + height:40px; +} + +.blur_os_x_sizer { + cursor:se-resize; +} + +.blur_os_x_close { + width: 19px; + height: 19px; + background: transparent url(mac_os_x/close.gif) no-repeat 0 0; + position:absolute; + top:12px; + left:25px; + cursor:pointer; + z-index:1000; +} + +.blur_os_x_minimize { + width: 19px; + height: 19px; + background: transparent url(mac_os_x/minimize.gif) no-repeat 0 0; + position:absolute; + top:12px; + left:45px; + cursor:pointer; + z-index:1000; +} + +.blur_os_x_maximize { + width: 19px; + height: 19px; + background: transparent url(mac_os_x/maximize.gif) no-repeat 0 0; + position:absolute; + top:12px; + left:65px; + cursor:pointer; + z-index:1000; +} + +.blur_os_x_title { + float:left; + height:14px; + font-family: Tahoma, Arial, sans-serif; + font-size:12px; + text-align:center; + margin-top:8px; + width:100%; + color:#000; +} + +.blur_os_x_content { + overflow:auto; + color: #222; + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; + background:#FFF; +} +.blur_os_x_s .status_bar { + padding-bottom:24px; +} + +/* FOR IE */ +* html .blur_os_x_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TL.png", sizingMethod="crop"); +} + +* html .blur_os_x_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/T.png", sizingMethod="scale"); +} + +* html .blur_os_x_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/TR.png", sizingMethod="crop"); +} + +* html .blur_os_x_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/L.png", sizingMethod="scale"); +} + +* html .blur_os_x_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/R.png", sizingMethod="scale"); +} + +* html .blur_os_x_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BL.png", sizingMethod="crop"); +} + +* html .blur_os_x_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/B.png", sizingMethod="scale"); +} + +* html .blur_os_x_se { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR.png", sizingMethod="crop"); +} + +* html .blur_os_x_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x/BR.png", sizingMethod="crop"); +} + Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x.css ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/B.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/B.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/BL.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/BL.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/BR.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/BR.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/L.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/L.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/R.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/R.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/T.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/T.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/TL.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/TL.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/TR.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/TR.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/bg.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/bg.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/close.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/close.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/maximize.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/maximize.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/minimize.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog/minimize.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog.css =================================================================== --- trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog.css (rev 0) +++ trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog.css 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,160 @@ +.overlay_mac_os_x_dialog { + background-color: #FF7224; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.mac_os_x_dialog_nw { + background: transparent url(mac_os_x_dialog/L.png) repeat-y top left; + width:16px; + height:16px; +} + +.mac_os_x_dialog_n { + background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0; + height:18px; +} + +.mac_os_x_dialog_ne { + background: transparent url(mac_os_x_dialog/R.png) repeat-y top left; + width:16px; + height:16px; +} + +.mac_os_x_dialog_w { + background: transparent url(mac_os_x_dialog/L.png) repeat-y top left; + width:16px; +} + +.mac_os_x_dialog_e { + background: transparent url(mac_os_x_dialog/R.png) repeat-y top right; + width:16px; +} + +.mac_os_x_dialog_sw { + background: transparent url(mac_os_x_dialog/BL.png) no-repeat 0 0; + width:31px; + height:40px; +} + +.mac_os_x_dialog_s { + background: transparent url(mac_os_x_dialog/B.png) repeat-x 0 0; + height:40px; +} + +.mac_os_x_dialog_se, .mac_os_x_dialog_sizer { + background: transparent url(mac_os_x_dialog/BR.png) no-repeat 0 0; + width:31px; + height:40px; +} + +.mac_os_x_dialog_sizer { + cursor:se-resize; +} + +.mac_os_x_dialog_close { + width: 19px; + height: 19px; + background: transparent url(mac_os_x_dialog/close.gif) no-repeat 0 0; + position:absolute; + top:12px; + left:25px; + cursor:pointer; + z-index:1000; +} + +.mac_os_x_dialog_minimize { + width: 19px; + height: 19px; + background: transparent url(mac_os_x_dialog/minimize.gif) no-repeat 0 0; + position:absolute; + top:12px; + left:45px; + cursor:pointer; + z-index:1000; +} + +.mac_os_x_dialog_maximize { + width: 19px; + height: 19px; + background: transparent url(mac_os_x_dialog/maximize.gif) no-repeat 0 0; + position:absolute; + top:12px; + left:65px; + cursor:pointer; + z-index:1000; +} + +.mac_os_x_dialog_title { + float:left; + height:14px; + font-family: Tahoma, Arial, sans-serif; + font-size:12px; + text-align:center; + margin-top:6px; + width:100%; + color:#000; +} + +.mac_os_x_dialog_content { + overflow:auto; + color: #222; + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; + background: transparent url(mac_os_x_dialog/bg.gif) repeat 0 0; +} + +.mac_os_x_dialog_buttons { + text-align: center; +} +/* FOR IE */ +* html .mac_os_x_dialog_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale"); +} + + +* html .mac_os_x_dialog_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale"); +} + +* html .mac_os_x_dialog_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/L.png", sizingMethod="scale"); +} + +* html .mac_os_x_dialog_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/R.png", sizingMethod="scale"); +} + +* html .mac_os_x_dialog_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BL.png", sizingMethod="crop"); +} + +* html .mac_os_x_dialog_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/B.png", sizingMethod="scale"); +} + +* html .mac_os_x_dialog_se { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop"); +} + +* html .mac_os_x_dialog_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/mac_os_x_dialog/BR.png", sizingMethod="crop"); +} + Property changes on: trunk/billy-ui/src/main/webapp/css/window/mac_os_x_dialog.css ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/css/window/nuncio/bottom_left.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/nuncio/bottom_left.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/nuncio/bottom_mid.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/nuncio/bottom_mid.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/nuncio/bottom_right.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/nuncio/bottom_right.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/nuncio/center_left.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/nuncio/center_left.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/nuncio/center_right.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/nuncio/center_right.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/nuncio/close.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/nuncio/close.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/nuncio/minimize.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/nuncio/minimize.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/nuncio/overlay.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/nuncio/overlay.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/nuncio/top_left.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/nuncio/top_left.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/nuncio/top_mid.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/nuncio/top_mid.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/nuncio/top_right.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/nuncio/top_right.png ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/nuncio.css =================================================================== --- trunk/billy-ui/src/main/webapp/css/window/nuncio.css (rev 0) +++ trunk/billy-ui/src/main/webapp/css/window/nuncio.css 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,164 @@ +.overlay_nuncio img { border: none; } + +.overlay_nuncio { + background-color: #666666; +} + +.nuncio_nw { + width: 12px; + height: 28px; + background: url(nuncio/top_left.png) no-repeat; +} + +.nuncio_n { + background: url(nuncio/top_mid.png) repeat-x; + height: 28px; +} + +.nuncio_ne { + width: 21px; + height: 28px; + background: url(nuncio/top_right.png) no-repeat; +} + +.nuncio_e { + width: 21px; + background: url(nuncio/center_right.png) repeat-y top right; +} + +.nuncio_w { + width: 12px; + background: url(nuncio/center_left.png) repeat-y top left; +} + +.nuncio_sw { + width: 12px; + height: 18px; + background: url(nuncio/bottom_left.png) no-repeat; +} + +.nuncio_s { + background: url(nuncio/bottom_mid.png) repeat-x 0 0; + height: 18px; +} + +.nuncio_se, .nuncio_sizer { + width: 21px; + height: 18px; + background: url(nuncio/bottom_right.png) no-repeat; +} + +.nuncio_close { + width: 14px; + height: 14px; + background: url(nuncio/close.png) no-repeat; + position:absolute; + top:10px; + right:22px; + cursor:pointer; + z-index:2000; +} + +.nuncio_minimize { + width: 14px; + height: 15px; + background: url(nuncio/minimize.png) no-repeat; + position:absolute; + top:10px; + right:40px; + cursor:pointer; + z-index:2000; +} + +.nuncio_title { + float:left; + font-size:11px; + font-weight: bold; + font-style: italic; + color: #fff; + width: 100% +} + +.nuncio_content { + background: url(nuncio/overlay.png) repeat; + overflow:auto; + color: #ddd; + font-family: Tahoma, Arial, "sans-serif"; + font-size: 10px; +} + +.nuncio_sizer { + cursor:se-resize; +} + + +.top_draggable, .bottom_draggable { + cursor:move +} +/* FOR IE */ +* html .nuncio_nw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_left.png", sizingMethod="crop"); +} + +* html .nuncio_n { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_mid.png", sizingMethod="scale"); +} + +* html .nuncio_ne { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/top_right.png", sizingMethod="crop"); +} + +* html .nuncio_w { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_left.png", sizingMethod="scale"); +} + +* html .nuncio_e { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/center_right.png", sizingMethod="scale"); +} + +* html .nuncio_sw { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_left.png", sizingMethod="crop"); +} + +* html .nuncio_s { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_mid.png", sizingMethod="scale"); +} + +* html .nuncio_se { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop"); +} + +* html .nuncio_sizer { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/bottom_right.png", sizingMethod="crop"); +} + +* html .nuncio_close { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/close.png", sizingMethod="crop"); +} + +* html .nuncio_minimize { + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="../themes/nuncio/minimize.png", sizingMethod="crop"); +} + Property changes on: trunk/billy-ui/src/main/webapp/css/window/nuncio.css ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/css/window/spread/.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/spread/.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/spread/bottom-left-c.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/spread/bottom-left-c.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/spread/bottom-middle.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/spread/bottom-middle.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/spread/bottom-right-c.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/spread/bottom-right-c.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/spread/button-close-focus.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/spread/button-close-focus.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/spread/button-max-focus.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/spread/button-max-focus.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/spread/button-min-focus.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/spread/button-min-focus.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/spread/frame-left.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/spread/frame-left.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/spread/frame-right.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/spread/frame-right.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/spread/left-top.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/spread/left-top.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/spread/right-top.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/spread/right-top.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/spread/top-middle.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/css/window/spread/top-middle.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/css/window/spread.css =================================================================== --- trunk/billy-ui/src/main/webapp/css/window/spread.css (rev 0) +++ trunk/billy-ui/src/main/webapp/css/window/spread.css 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,108 @@ +.overlay_spread { + background-color: #85BBEF; + filter:alpha(opacity=60); + -moz-opacity: 0.6; + opacity: 0.6; +} + +.spread_nw { + background: transparent url(spread/left-top.gif) no-repeat 0 0; + width:10px; + height:25px; +} + +.spread_n { + background: transparent url(spread/top-middle.gif) repeat-x 0 0; + height:25px; +} + +.spread_ne { + background: transparent url(spread/right-top.gif) no-repeat 0 0; + width:10px; + height:25px; +} + +.spread_w { + background: transparent url(spread/frame-left.gif) repeat-y top left; + width:7px; +} + +.spread_e { + background: transparent url(spread/frame-right.gif) repeat-y top right; + width:7px; +} + +.spread_sw { + background: transparent url(spread/bottom-left-c.gif) no-repeat 0 0; + width:7px; + height:7px; +} + +.spread_s { + background: transparent url(spread/bottom-middle.gif) repeat-x 0 0; + height:7px; +} + +.spread_se, .spread_sizer { + background: transparent url(spread/bottom-right-c.gif) no-repeat 0 0; + width:7px; + height:7px; +} + +.spread_sizer { + cursor:se-resize; +} + +.spread_close { + width: 23px; + height: 23px; + background: transparent url(spread/button-close-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:11px; + cursor:pointer; + z-index:1000; +} + +.spread_minimize { + width: 23px; + height: 23px; + background: transparent url(spread/button-min-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:55px; + cursor:pointer; + z-index:1000; +} + +.spread_maximize { + width: 23px; + height: 23px; + background: transparent url(spread/button-max-focus.gif) no-repeat 0 0; + position:absolute; + top:0px; + right:33px; + cursor:pointer; + z-index:1000; +} + +.spread_title { + float:left; + height:14px; + font-family: Tahoma, Arial, sans-serif; + font-size:14px; + font-weight:bold; + text-align:left; + margin-top:2px; + width:100%; + color:#E47211; +} + +.spread_content { + overflow:auto; + color: #222; + font-family: Tahoma, Arial, sans-serif; + font-size: 10px; + background:#A9EA00; +} + Property changes on: trunk/billy-ui/src/main/webapp/css/window/spread.css ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/img/7ter.jpg =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/7ter.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/flag_en.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/flag_en.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/flag_fr.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/flag_fr.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/add.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/add.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/crystal/add.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/crystal/add.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/crystal/cancel.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/crystal/cancel.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/crystal/clock.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/crystal/clock.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/crystal/edit.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/crystal/edit.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/crystal/info.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/crystal/info.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/crystal/movedown.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/crystal/movedown.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/crystal/movetobottom.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/crystal/movetobottom.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/crystal/movetotop.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/crystal/movetotop.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/crystal/moveup.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/crystal/moveup.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/crystal/reload.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/crystal/reload.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/crystal/remove.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/crystal/remove.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/crystal/save.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/crystal/save.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/crystal/showdetails.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/crystal/showdetails.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/crystal/stop.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/crystal/stop.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/crystal/warning.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/crystal/warning.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/icons/minus.png =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/icons/minus.png ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/lutin.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/lutin.gif ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/img/spinner.gif =================================================================== (Binary files differ) Property changes on: trunk/billy-ui/src/main/webapp/img/spinner.gif ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream Added: trunk/billy-ui/src/main/webapp/js/ZoneUpdater.js =================================================================== --- trunk/billy-ui/src/main/webapp/js/ZoneUpdater.js (rev 0) +++ trunk/billy-ui/src/main/webapp/js/ZoneUpdater.js 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,103 @@ +var ZoneUpdater = Class.create(); + +ZoneUpdater.prototype = { + + initialize: function(zoneElementId, listeningElement, event, link, zone, placeholder) { + + this.zoneElement = $(zoneElementId); + + this.event = event; + + this.link = link; + + this.placeholder = placeholder; + + $T(this.zoneElement).zoneId = zone; + + listeningElement.observe(this.event, this.updateZone.bindAsEventListener(this)); + + }, + + updateZone: function(event) { + + var zoneObject = Tapestry.findZoneManager(this.zoneElement); + + if ( !zoneObject ) return; + + var param; + + if (this.zoneElement.value) { + + param = this.zoneElement.value; + + } + + if (!param) param = ' '; + + param = this.encodeForUrl(param); + + var updatedLink = this.link.gsub(this.placeholder, param); + + zoneObject.updateFromURL(updatedLink); + + }, + + encodeForUrl: function(string) { + + /** + + * See equanda.js for updated version of this + + */ + + string = string.replace(/\r\n/g,"\n"); + + var res = ""; + + for (var n = 0; n < string.length; n++) + + { + + var c = string.charCodeAt( n ); + + if ( '$' == string.charAt( n ) ) + + { + + res += '$$'; + + } + + else if ( this.inRange( c, "AZ" ) || this.inRange( c, "az" ) || this.inRange( c, "09" ) || this.inRange( c, ".." ) ) + + { + + res += string.charAt( n ) + + } + + else + + { + + var tmp = c.toString(16); + + while ( tmp.length < 4 ) tmp = "0" + tmp; + + res += '$' + tmp; + + } + + } + + return res; + + }, + + inRange: function(code, range) { + + return code >= range.charCodeAt( 0 ) && code <= range.charCodeAt( 1 ); + + } + +} \ No newline at end of file Added: trunk/billy-ui/src/main/webapp/js/chenillekit/Chenillekit.js =================================================================== --- trunk/billy-ui/src/main/webapp/js/chenillekit/Chenillekit.js (rev 0) +++ trunk/billy-ui/src/main/webapp/js/chenillekit/Chenillekit.js 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,18 @@ +/* + * Apache License + * Version 2.0, January 2004 + * http://www.apache.org/licenses/ + * + * Copyright 2008 by chenillekit.org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + */ + +/** + * Declare our own name space + */ +if (window.Ck == undefined) Ck = {}; Added: trunk/billy-ui/src/main/webapp/js/chenillekit/CkOnEvents.js =================================================================== --- trunk/billy-ui/src/main/webapp/js/chenillekit/CkOnEvents.js (rev 0) +++ trunk/billy-ui/src/main/webapp/js/chenillekit/CkOnEvents.js 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,80 @@ +/* + * Apache License + * Version 2.0, January 2004 + * http://www.apache.org/licenses/ + * + * Copyright 2008 by chenillekit.org + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + */ + +Ck.OnEvent = Class.create(); +Ck.OnEvent.prototype = { + initialize: function(eventName, elementId, stop, requestUrl, onCompleteCallback) + { + if (!$(elementId)) + throw(elementId + " doesn't exist!"); + + this.element = $(elementId); + this.stop = stop; + this.onCompleteCallback = onCompleteCallback; + this.requestUrl = requestUrl; + + Event.observe(this.element, eventName, this.reflectOnEvent.bind(this), false); + }, + reflectOnEvent: function(myEvent) + { + var fieldValue; + var formElement = this.element.form; + var url = this.requestUrl; + + if(this.stop) Event.stop(myEvent); + + if (typeof formElement != 'undefined') + fieldValue = $F(this.element); + + new Ajax.Request(url, { + method: 'post', + parameters: {"value": fieldValue}, + onFailure: function(t) + { + alert('Error communication with the server: ' + fieldValue + ' _TROULOULOU_ ' + t.responseText.stripTags()); + }, + onSuccess: function(t) + { + if (this.onCompleteCallback != null) + { + var funcToEval = this.onCompleteCallback + "(" + t.responseText + ")"; + eval(funcToEval); + } + }.bind(this) + }); + } +} + + +Ck.ButtonEvent = Class.create(); +Ck.ButtonEvent.prototype = +{ + initialize: function(elementId, requestUrl) + { + if (!$(elementId)) + throw(elementId + " doesn't exist!"); + + this.element = $(elementId); + this.requestUrl = requestUrl; + + Event.observe(this.element, "click", + this.fireEvent.bind(this, this.element), + false); + }, + fireEvent: function(myEvent) + { + document.location = this.requestUrl; + return false; + } +} \ No newline at end of file Added: trunk/billy-ui/src/main/webapp/js/dialog.js =================================================================== --- trunk/billy-ui/src/main/webapp/js/dialog.js (rev 0) +++ trunk/billy-ui/src/main/webapp/js/dialog.js 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,19 @@ +/** + * Dialogue de confirmation + */ +var Confirm = Class.create({ + /** + * element : Element DOM depuis lequel le dialogue de confirmation va s'ouvrir + * message : Message à afficher dans la boîte de dialogue + */ + initialize: function(element, message) { + this.message = message; + Event.observe($(element), 'click', this.doConfirm.bindAsEventListener(this)); + }, + doConfirm: function(e) { + if(! confirm(this.message)) { + Tapestry.debug('STOP ' + e); + Event.stop(e); + } + } +}); Added: trunk/billy-ui/src/main/webapp/js/window/window.js =================================================================== --- trunk/billy-ui/src/main/webapp/js/window/window.js (rev 0) +++ trunk/billy-ui/src/main/webapp/js/window/window.js 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,1843 @@ +// Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// VERSION 1.3 + +var Window = Class.create(); + +Window.keepMultiModalWindow = false; +Window.hasEffectLib = (typeof Effect != 'undefined'); +Window.resizeEffectDuration = 0.4; + +Window.prototype = { + // Constructor + // Available parameters : className, blurClassName, title, minWidth, minHeight, maxWidth, maxHeight, width, height, top, left, bottom, right, resizable, zIndex, opacity, recenterAuto, wiredDrag + // hideEffect, showEffect, showEffectOptions, hideEffectOptions, effectOptions, url, draggable, closable, minimizable, maximizable, parent, onload + // add all callbacks (if you do not use an observer) + // onDestroy onStartResize onStartMove onResize onMove onEndResize onEndMove onFocus onBlur onBeforeShow onShow onHide onMinimize onMaximize onClose + + initialize: function() { + var id; + var optionIndex = 0; + // For backward compatibility like win= new Window("id", {...}) instead of win = new Window({id: "id", ...}) + if (arguments.length > 0) { + if (typeof arguments[0] == "string" ) { + id = arguments[0]; + optionIndex = 1; + } + else + id = arguments[0] ? arguments[0].id : null; + } + + // Generate unique ID if not specified + if (!id) + id = "window_" + new Date().getTime(); + + if ($(id)) + alert("Window " + id + " is already registered in the DOM! Make sure you use setDestroyOnClose() or destroyOnClose: true in the constructor"); + + this.options = Object.extend({ + className: "dialog", + blurClassName: null, + minWidth: 100, + minHeight: 20, + resizable: true, + closable: true, + minimizable: true, + maximizable: true, + draggable: true, + userData: null, + showEffect: (Window.hasEffectLib ? Effect.Appear : Element.show), + hideEffect: (Window.hasEffectLib ? Effect.Fade : Element.hide), + showEffectOptions: {}, + hideEffectOptions: {}, + effectOptions: null, + parent: document.body, + title: " ", + url: null, + onload: Prototype.emptyFunction, + width: 200, + height: 300, + opacity: 1, + recenterAuto: true, + wiredDrag: false, + closeCallback: null, + destroyOnClose: false, + gridX: 1, + gridY: 1 + }, arguments[optionIndex] || {}); + if (this.options.blurClassName) + this.options.focusClassName = this.options.className; + + if (typeof this.options.top == "undefined" && typeof this.options.bottom == "undefined") + this.options.top = this._round(Math.random()*500, this.options.gridY); + if (typeof this.options.left == "undefined" && typeof this.options.right == "undefined") + this.options.left = this._round(Math.random()*500, this.options.gridX); + + if (this.options.effectOptions) { + Object.extend(this.options.hideEffectOptions, this.options.effectOptions); + Object.extend(this.options.showEffectOptions, this.options.effectOptions); + if (this.options.showEffect == Element.Appear) + this.options.showEffectOptions.to = this.options.opacity; + } + if (Window.hasEffectLib) { + if (this.options.showEffect == Effect.Appear) + this.options.showEffectOptions.to = this.options.opacity; + + if (this.options.hideEffect == Effect.Fade) + this.options.hideEffectOptions.from = this.options.opacity; + } + if (this.options.hideEffect == Element.hide) + this.options.hideEffect = function(){ Element.hide(this.element); if (this.options.destroyOnClose) this.destroy(); }.bind(this) + + if (this.options.parent != document.body) + this.options.parent = $(this.options.parent); + + this.element = this._createWindow(id); + this.element.win = this; + + // Bind event listener + this.eventMouseDown = this._initDrag.bindAsEventListener(this); + this.eventMouseUp = this._endDrag.bindAsEventListener(this); + this.eventMouseMove = this._updateDrag.bindAsEventListener(this); + this.eventOnLoad = this._getWindowBorderSize.bindAsEventListener(this); + this.eventMouseDownContent = this.toFront.bindAsEventListener(this); + this.eventResize = this._recenter.bindAsEventListener(this); + + this.topbar = $(this.element.id + "_top"); + this.bottombar = $(this.element.id + "_bottom"); + this.content = $(this.element.id + "_content"); + + Event.observe(this.topbar, "mousedown", this.eventMouseDown); + Event.observe(this.bottombar, "mousedown", this.eventMouseDown); + Event.observe(this.content, "mousedown", this.eventMouseDownContent); + Event.observe(window, "load", this.eventOnLoad); + Event.observe(window, "resize", this.eventResize); + Event.observe(window, "scroll", this.eventResize); + Event.observe(this.options.parent, "scroll", this.eventResize); + + if (this.options.draggable) { + var that = this; + [this.topbar, this.topbar.up().previous(), this.topbar.up().next()].each(function(element) { + element.observe("mousedown", that.eventMouseDown); + element.addClassName("top_draggable"); + }); + [this.bottombar.up(), this.bottombar.up().previous(), this.bottombar.up().next()].each(function(element) { + element.observe("mousedown", that.eventMouseDown); + element.addClassName("bottom_draggable"); + }); + + } + + if (this.options.resizable) { + this.sizer = $(this.element.id + "_sizer"); + Event.observe(this.sizer, "mousedown", this.eventMouseDown); + } + + this.useLeft = null; + this.useTop = null; + if (typeof this.options.left != "undefined") { + this.element.setStyle({left: parseFloat(this.options.left) + 'px'}); + this.useLeft = true; + } + else { + this.element.setStyle({right: parseFloat(this.options.right) + 'px'}); + this.useLeft = false; + } + + if (typeof this.options.top != "undefined") { + this.element.setStyle({top: parseFloat(this.options.top) + 'px'}); + this.useTop = true; + } + else { + this.element.setStyle({bottom: parseFloat(this.options.bottom) + 'px'}); + this.useTop = false; + } + + this.storedLocation = null; + + this.setOpacity(this.options.opacity); + if (this.options.zIndex) + this.setZIndex(this.options.zIndex) + + if (this.options.destroyOnClose) + this.setDestroyOnClose(true); + + this._getWindowBorderSize(); + this.width = this.options.width; + this.height = this.options.height; + this.visible = false; + + this.constraint = false; + this.constraintPad = {top: 0, left:0, bottom:0, right:0}; + + if (this.width && this.height) + this.setSize(this.options.width, this.options.height); + this.setTitle(this.options.title) + Windows.register(this); + }, + + // Destructor + destroy: function() { + this._notify("onDestroy"); + Event.stopObserving(this.topbar, "mousedown", this.eventMouseDown); + Event.stopObserving(this.bottombar, "mousedown", this.eventMouseDown); + Event.stopObserving(this.content, "mousedown", this.eventMouseDownContent); + + Event.stopObserving(window, "load", this.eventOnLoad); + Event.stopObserving(window, "resize", this.eventResize); + Event.stopObserving(window, "scroll", this.eventResize); + + Event.stopObserving(this.content, "load", this.options.onload); + + if (this._oldParent) { + var content = this.getContent(); + var originalContent = null; + for(var i = 0; i < content.childNodes.length; i++) { + originalContent = content.childNodes[i]; + if (originalContent.nodeType == 1) + break; + originalContent = null; + } + if (originalContent) + this._oldParent.appendChild(originalContent); + this._oldParent = null; + } + + if (this.sizer) + Event.stopObserving(this.sizer, "mousedown", this.eventMouseDown); + + if (this.options.url) + this.content.src = null + + if(this.iefix) + Element.remove(this.iefix); + + Element.remove(this.element); + Windows.unregister(this); + }, + + // Sets close callback, if it sets, it should return true to be able to close the window. + setCloseCallback: function(callback) { + this.options.closeCallback = callback; + }, + + // Gets window content + getContent: function () { + return this.content; + }, + + // Sets the content with an element id + setContent: function(id, autoresize, autoposition) { + var element = $(id); + if (null == element) throw "Unable to find element '" + id + "' in DOM"; + this._oldParent = element.parentNode; + + var d = null; + var p = null; + + if (autoresize) + d = Element.getDimensions(element); + if (autoposition) + p = Position.cumulativeOffset(element); + + var content = this.getContent(); + // Clear HTML (and even iframe) + this.setHTMLContent(""); + content = this.getContent(); + + content.appendChild(element); + element.show(); + if (autoresize) + this.setSize(d.width, d.height); + if (autoposition) + this.setLocation(p[1] - this.heightN, p[0] - this.widthW); + }, + + setHTMLContent: function(html) { + // It was an url (iframe), recreate a div content instead of iframe content + if (this.options.url) { + this.content.src = null; + this.options.url = null; + + var content ="<div id=\"" + this.getId() + "_content\" class=\"" + this.options.className + "_content\"> </div>"; + $(this.getId() +"_table_content").innerHTML = content; + + this.content = $(this.element.id + "_content"); + } + + this.getContent().innerHTML = html; + }, + + setAjaxContent: function(url, options, showCentered, showModal) { + this.showFunction = showCentered ? "showCenter" : "show"; + this.showModal = showModal || false; + + options = options || {}; + + // Clear HTML (and even iframe) + this.setHTMLContent(""); + + this.onComplete = options.onComplete; + if (! this._onCompleteHandler) + this._onCompleteHandler = this._setAjaxContent.bind(this); + options.onComplete = this._onCompleteHandler; + + new Ajax.Request(url, options); + options.onComplete = this.onComplete; + }, + + _setAjaxContent: function(originalRequest) { + Element.update(this.getContent(), originalRequest.responseText); + if (this.onComplete) + this.onComplete(originalRequest); + this.onComplete = null; + this[this.showFunction](this.showModal) + }, + + setURL: function(url) { + // Not an url content, change div to iframe + if (this.options.url) + this.content.src = null; + this.options.url = url; + var content= "<iframe frameborder='0' name='" + this.getId() + "_content' id='" + this.getId() + "_content' src='" + url + "' width='" + this.width + "' height='" + this.height + "'> </iframe>"; + $(this.getId() +"_table_content").innerHTML = content; + + this.content = $(this.element.id + "_content"); + }, + + getURL: function() { + return this.options.url ? this.options.url : null; + }, + + refresh: function() { + if (this.options.url) + $(this.element.getAttribute('id') + '_content').src = this.options.url; + }, + + // Stores position/size in a cookie, by default named with window id + setCookie: function(name, expires, path, domain, secure) { + name = name || this.element.id; + this.cookie = [name, expires, path, domain, secure]; + + // Get cookie + var value = WindowUtilities.getCookie(name) + // If exists + if (value) { + var values = value.split(','); + var x = values[0].split(':'); + var y = values[1].split(':'); + + var w = parseFloat(values[2]), h = parseFloat(values[3]); + var mini = values[4]; + var maxi = values[5]; + + this.setSize(w, h); + if (mini == "true") + this.doMinimize = true; // Minimize will be done at onload window event + else if (maxi == "true") + this.doMaximize = true; // Maximize will be done at onload window event + + this.useLeft = x[0] == "l"; + this.useTop = y[0] == "t"; + + this.element.setStyle(this.useLeft ? {left: x[1]} : {right: x[1]}); + this.element.setStyle(this.useTop ? {top: y[1]} : {bottom: y[1]}); + } + }, + + // Gets window ID + getId: function() { + return this.element.id; + }, + + // Detroys itself when closing + setDestroyOnClose: function() { + this.options.destroyOnClose = true; + }, + + setConstraint: function(bool, padding) { + this.constraint = bool; + this.constraintPad = Object.extend(this.constraintPad, padding || {}); + // Reset location to apply constraint + if (this.useTop && this.useLeft) + this.setLocation(parseFloat(this.element.style.top), parseFloat(this.element.style.left)); + }, + + // initDrag event + + _initDrag: function(event) { + // No resize on minimized window + if (Event.element(event) == this.sizer && this.isMinimized()) + return; + + // No move on maximzed window + if (Event.element(event) != this.sizer && this.isMaximized()) + return; + + if (Prototype.Browser.IE && this.heightN == 0) + this._getWindowBorderSize(); + + // Get pointer X,Y + this.pointer = [this._round(Event.pointerX(event), this.options.gridX), this._round(Event.pointerY(event), this.options.gridY)]; + if (this.options.wiredDrag) + this.currentDrag = this._createWiredElement(); + else + this.currentDrag = this.element; + + // Resize + if (Event.element(event) == this.sizer) { + this.doResize = true; + this.widthOrg = this.width; + this.heightOrg = this.height; + this.bottomOrg = parseFloat(this.element.getStyle('bottom')); + this.rightOrg = parseFloat(this.element.getStyle('right')); + this._notify("onStartResize"); + } + else { + this.doResize = false; + + // Check if click on close button, + var closeButton = $(this.getId() + '_close'); + if (closeButton && Position.within(closeButton, this.pointer[0], this.pointer[1])) { + this.currentDrag = null; + return; + } + + this.toFront(); + + if (! this.options.draggable) + return; + this._notify("onStartMove"); + } + // Register global event to capture mouseUp and mouseMove + Event.observe(document, "mouseup", this.eventMouseUp, false); + Event.observe(document, "mousemove", this.eventMouseMove, false); + + // Add an invisible div to keep catching mouse event over iframes + WindowUtilities.disableScreen('__invisible__', '__invisible__', this.overlayOpacity); + + // Stop selection while dragging + document.body.ondrag = function () { return false; }; + document.body.onselectstart = function () { return false; }; + + this.currentDrag.show(); + Event.stop(event); + }, + + _round: function(val, round) { + return round == 1 ? val : val = Math.floor(val / round) * round; + }, + + // updateDrag event + _updateDrag: function(event) { + var pointer = [this._round(Event.pointerX(event), this.options.gridX), this._round(Event.pointerY(event), this.options.gridY)]; + var dx = pointer[0] - this.pointer[0]; + var dy = pointer[1] - this.pointer[1]; + + // Resize case, update width/height + if (this.doResize) { + var w = this.widthOrg + dx; + var h = this.heightOrg + dy; + + dx = this.width - this.widthOrg + dy = this.height - this.heightOrg + + // Check if it's a right position, update it to keep upper-left corner at the same position + if (this.useLeft) + w = this._updateWidthConstraint(w) + else + this.currentDrag.setStyle({right: (this.rightOrg -dx) + 'px'}); + // Check if it's a bottom position, update it to keep upper-left corner at the same position + if (this.useTop) + h = this._updateHeightConstraint(h) + else + this.currentDrag.setStyle({bottom: (this.bottomOrg -dy) + 'px'}); + + this.setSize(w , h); + this._notify("onResize"); + } + // Move case, update top/left + else { + this.pointer = pointer; + + if (this.useLeft) { + var left = parseFloat(this.currentDrag.getStyle('left')) + dx; + var newLeft = this._updateLeftConstraint(left); + // Keep mouse pointer correct + this.pointer[0] += newLeft-left; + this.currentDrag.setStyle({left: newLeft + 'px'}); + } + else + this.currentDrag.setStyle({right: parseFloat(this.currentDrag.getStyle('right')) - dx + 'px'}); + + if (this.useTop) { + var top = parseFloat(this.currentDrag.getStyle('top')) + dy; + var newTop = this._updateTopConstraint(top); + // Keep mouse pointer correct + this.pointer[1] += newTop - top; + this.currentDrag.setStyle({top: newTop + 'px'}); + } + else + this.currentDrag.setStyle({bottom: parseFloat(this.currentDrag.getStyle('bottom')) - dy + 'px'}); + + this._notify("onMove"); + } + if (this.iefix) + this._fixIEOverlapping(); + + this._removeStoreLocation(); + Event.stop(event); + }, + + // endDrag callback + _endDrag: function(event) { + // Remove temporary div over iframes + WindowUtilities.enableScreen('__invisible__'); + + if (this.doResize) + this._notify("onEndResize"); + else + this._notify("onEndMove"); + + // Release event observing + Event.stopObserving(document, "mouseup", this.eventMouseUp,false); + Event.stopObserving(document, "mousemove", this.eventMouseMove, false); + + Event.stop(event); + + this._hideWiredElement(); + + // Store new location/size if need be + this._saveCookie() + + // Restore selection + document.body.ondrag = null; + document.body.onselectstart = null; + }, + + _updateLeftConstraint: function(left) { + if (this.constraint && this.useLeft && this.useTop) { + var width = this.options.parent == document.body ? WindowUtilities.getPageSize().windowWidth : this.options.parent.getDimensions().width; + + if (left < this.constraintPad.left) + left = this.constraintPad.left; + if (left + this.width + this.widthE + this.widthW > width - this.constraintPad.right) + left = width - this.constraintPad.right - this.width - this.widthE - this.widthW; + } + return left; + }, + + _updateTopConstraint: function(top) { + if (this.constraint && this.useLeft && this.useTop) { + var height = this.options.parent == document.body ? WindowUtilities.getPageSize().windowHeight : this.options.parent.getDimensions().height; + + var h = this.height + this.heightN + this.heightS; + + if (top < this.constraintPad.top) + top = this.constraintPad.top; + if (top + h > height - this.constraintPad.bottom) + top = height - this.constraintPad.bottom - h; + } + return top; + }, + + _updateWidthConstraint: function(w) { + if (this.constraint && this.useLeft && this.useTop) { + var width = this.options.parent == document.body ? WindowUtilities.getPageSize().windowWidth : this.options.parent.getDimensions().width; + var left = parseFloat(this.element.getStyle("left")); + + if (left + w + this.widthE + this.widthW > width - this.constraintPad.right) + w = width - this.constraintPad.right - left - this.widthE - this.widthW; + } + return w; + }, + + _updateHeightConstraint: function(h) { + if (this.constraint && this.useLeft && this.useTop) { + var height = this.options.parent == document.body ? WindowUtilities.getPageSize().windowHeight : this.options.parent.getDimensions().height; + var top = parseFloat(this.element.getStyle("top")); + + if (top + h + this.heightN + this.heightS > height - this.constraintPad.bottom) + h = height - this.constraintPad.bottom - top - this.heightN - this.heightS; + } + return h; + }, + + + // Creates HTML window code + _createWindow: function(id) { + var className = this.options.className; + var win = document.createElement("div"); + win.setAttribute('id', id); + win.className = "dialog"; + + var content; + if (this.options.url) + content= "<iframe frameborder=\"0\" name=\"" + id + "_content\" id=\"" + id + "_content\" src=\"" + this.options.url + "\"> </iframe>"; + else + content ="<div id=\"" + id + "_content\" class=\"" +className + "_content\"> </div>"; + + var closeDiv = this.options.closable ? "<div class='"+ className +"_close' id='"+ id +"_close' onclick='Windows.close(\""+ id +"\", event)'> </div>" : ""; + var minDiv = this.options.minimizable ? "<div class='"+ className + "_minimize' id='"+ id +"_minimize' onclick='Windows.minimize(\""+ id +"\", event)'> </div>" : ""; + var maxDiv = this.options.maximizable ? "<div class='"+ className + "_maximize' id='"+ id +"_maximize' onclick='Windows.maximize(\""+ id +"\", event)'> </div>" : ""; + var seAttributes = this.options.resizable ? "class='" + className + "_sizer' id='" + id + "_sizer'" : "class='" + className + "_se'"; + var blank = "../themes/default/blank.gif"; + + win.innerHTML = closeDiv + minDiv + maxDiv + "\ + <table id='"+ id +"_row1' class=\"top table_window\">\ + <tr>\ + <td class='"+ className +"_nw'></td>\ + <td class='"+ className +"_n'><div id='"+ id +"_top' class='"+ className +"_title title_window'>"+ this.options.title +"</div></td>\ + <td class='"+ className +"_ne'></td>\ + </tr>\ + </table>\ + <table id='"+ id +"_row2' class=\"mid table_window\">\ + <tr>\ + <td class='"+ className +"_w'></td>\ + <td id='"+ id +"_table_content' class='"+ className +"_content' valign='top'>" + content + "</td>\ + <td class='"+ className +"_e'></td>\ + </tr>\ + </table>\ + <table id='"+ id +"_row3' class=\"bot table_window\">\ + <tr>\ + <td class='"+ className +"_sw'></td>\ + <td class='"+ className +"_s'><div id='"+ id +"_bottom' class='status_bar'><span style='float:left; width:1px; height:1px'></span></div></td>\ + <td " + seAttributes + "></td>\ + </tr>\ + </table>\ + "; + Element.hide(win); + this.options.parent.insertBefore(win, this.options.parent.firstChild); + Event.observe($(id + "_content"), "load", this.options.onload); + return win; + }, + + + changeClassName: function(newClassName) { + var className = this.options.className; + var id = this.getId(); + $A(["_close", "_minimize", "_maximize", "_sizer", "_content"]).each(function(value) { this._toggleClassName($(id + value), className + value, newClassName + value) }.bind(this)); + this._toggleClassName($(id + "_top"), className + "_title", newClassName + "_title"); + $$("#" + id + " td").each(function(td) {td.className = td.className.sub(className,newClassName); }); + this.options.className = newClassName; + }, + + _toggleClassName: function(element, oldClassName, newClassName) { + if (element) { + element.removeClassName(oldClassName); + element.addClassName(newClassName); + } + }, + + // Sets window location + setLocation: function(top, left) { + top = this._updateTopConstraint(top); + left = this._updateLeftConstraint(left); + + var e = this.currentDrag || this.element; + e.setStyle({top: top + 'px'}); + e.setStyle({left: left + 'px'}); + + this.useLeft = true; + this.useTop = true; + }, + + getLocation: function() { + var location = {}; + if (this.useTop) + location = Object.extend(location, {top: this.element.getStyle("top")}); + else + location = Object.extend(location, {bottom: this.element.getStyle("bottom")}); + if (this.useLeft) + location = Object.extend(location, {left: this.element.getStyle("left")}); + else + location = Object.extend(location, {right: this.element.getStyle("right")}); + + return location; + }, + + // Gets window size + getSize: function() { + return {width: this.width, height: this.height}; + }, + + // Sets window size + setSize: function(width, height, useEffect) { + width = parseFloat(width); + height = parseFloat(height); + + // Check min and max size + if (!this.minimized && width < this.options.minWidth) + width = this.options.minWidth; + + if (!this.minimized && height < this.options.minHeight) + height = this.options.minHeight; + + if (this.options. maxHeight && height > this.options. maxHeight) + height = this.options. maxHeight; + + if (this.options. maxWidth && width > this.options. maxWidth) + width = this.options. maxWidth; + + + if (this.useTop && this.useLeft && Window.hasEffectLib && Effect.ResizeWindow && useEffect) { + new Effect.ResizeWindow(this, null, null, width, height, {duration: Window.resizeEffectDuration}); + } else { + this.width = width; + this.height = height; + var e = this.currentDrag ? this.currentDrag : this.element; + + e.setStyle({width: width + this.widthW + this.widthE + "px"}) + e.setStyle({height: height + this.heightN + this.heightS + "px"}) + + // Update content size + if (!this.currentDrag || this.currentDrag == this.element) { + var content = $(this.element.id + '_content'); + content.setStyle({height: height + 'px'}); + content.setStyle({width: width + 'px'}); + } + } + }, + + updateHeight: function() { + this.setSize(this.width, this.content.scrollHeight, true); + }, + + updateWidth: function() { + this.setSize(this.content.scrollWidth, this.height, true); + }, + + // Brings window to front + toFront: function() { + if (this.element.style.zIndex < Windows.maxZIndex) + this.setZIndex(Windows.maxZIndex + 1); + if (this.iefix) + this._fixIEOverlapping(); + }, + + getBounds: function(insideOnly) { + if (! this.width || !this.height || !this.visible) + this.computeBounds(); + var w = this.width; + var h = this.height; + + if (!insideOnly) { + w += this.widthW + this.widthE; + h += this.heightN + this.heightS; + } + var bounds = Object.extend(this.getLocation(), {width: w + "px", height: h + "px"}); + return bounds; + }, + + computeBounds: function() { + if (! this.width || !this.height) { + var size = WindowUtilities._computeSize(this.content.innerHTML, this.content.id, this.width, this.height, 0, this.options.className) + if (this.height) + this.width = size + 5 + else + this.height = size + 5 + } + + this.setSize(this.width, this.height); + if (this.centered) + this._center(this.centerTop, this.centerLeft); + }, + + // Displays window modal state or not + show: function(modal) { + this.visible = true; + if (modal) { + // Hack for Safari !! + if (typeof this.overlayOpacity == "undefined") { + var that = this; + setTimeout(function() {that.show(modal)}, 10); + return; + } + Windows.addModalWindow(this); + + this.modal = true; + this.setZIndex(Windows.maxZIndex + 1); + Windows.unsetOverflow(this); + } + else + if (!this.element.style.zIndex) + this.setZIndex(Windows.maxZIndex + 1); + + // To restore overflow if need be + if (this.oldStyle) + this.getContent().setStyle({overflow: this.oldStyle}); + + this.computeBounds(); + + this._notify("onBeforeShow"); + if (this.options.showEffect != Element.show && this.options.showEffectOptions) + this.options.showEffect(this.element, this.options.showEffectOptions); + else + this.options.showEffect(this.element); + + this._checkIEOverlapping(); + WindowUtilities.focusedWindow = this + this._notify("onShow"); + }, + + // Displays window modal state or not at the center of the page + showCenter: function(modal, top, left) { + this.centered = true; + this.centerTop = top; + this.centerLeft = left; + + this.show(modal); + }, + + isVisible: function() { + return this.visible; + }, + + _center: function(top, left) { + var windowScroll = WindowUtilities.getWindowScroll(this.options.parent); + var pageSize = WindowUtilities.getPageSize(this.options.parent); + if (typeof top == "undefined") + top = (pageSize.windowHeight - (this.height + this.heightN + this.heightS))/2; + top += windowScroll.top + + if (typeof left == "undefined") + left = (pageSize.windowWidth - (this.width + this.widthW + this.widthE))/2; + left += windowScroll.left + this.setLocation(top, left); + this.toFront(); + }, + + _recenter: function(event) { + if (this.centered) { + var pageSize = WindowUtilities.getPageSize(this.options.parent); + var windowScroll = WindowUtilities.getWindowScroll(this.options.parent); + + // Check for this stupid IE that sends dumb events + if (this.pageSize && this.pageSize.windowWidth == pageSize.windowWidth && this.pageSize.windowHeight == pageSize.windowHeight && + this.windowScroll.left == windowScroll.left && this.windowScroll.top == windowScroll.top) + return; + this.pageSize = pageSize; + this.windowScroll = windowScroll; + // set height of Overlay to take up whole page and show + if ($('overlay_modal')) + $('overlay_modal').setStyle({height: (pageSize.pageHeight + 'px')}); + + if (this.options.recenterAuto) + this._center(this.centerTop, this.centerLeft); + } + }, + + // Hides window + hide: function() { + this.visible = false; + if (this.modal) { + Windows.removeModalWindow(this); + Windows.resetOverflow(); + } + // To avoid bug on scrolling bar + this.oldStyle = this.getContent().getStyle('overflow') || "auto" + this.getContent().setStyle({overflow: "hidden"}); + + this.options.hideEffect(this.element, this.options.hideEffectOptions); + + if(this.iefix) + this.iefix.hide(); + + if (!this.doNotNotifyHide) + this._notify("onHide"); + }, + + close: function() { + // Asks closeCallback if exists + if (this.visible) { + if (this.options.closeCallback && ! this.options.closeCallback(this)) + return; + + if (this.options.destroyOnClose) { + var destroyFunc = this.destroy.bind(this); + if (this.options.hideEffectOptions.afterFinish) { + var func = this.options.hideEffectOptions.afterFinish; + this.options.hideEffectOptions.afterFinish = function() {func();destroyFunc() } + } + else + this.options.hideEffectOptions.afterFinish = function() {destroyFunc() } + } + Windows.updateFocusedWindow(); + + this.doNotNotifyHide = true; + this.hide(); + this.doNotNotifyHide = false; + this._notify("onClose"); + } + }, + + minimize: function() { + if (this.resizing) + return; + + var r2 = $(this.getId() + "_row2"); + + if (!this.minimized) { + this.minimized = true; + + var dh = r2.getDimensions().height; + this.r2Height = dh; + var h = this.element.getHeight() - dh; + + if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow) { + new Effect.ResizeWindow(this, null, null, null, this.height -dh, {duration: Window.resizeEffectDuration}); + } else { + this.height -= dh; + this.element.setStyle({height: h + "px"}); + r2.hide(); + } + + if (! this.useTop) { + var bottom = parseFloat(this.element.getStyle('bottom')); + this.element.setStyle({bottom: (bottom + dh) + 'px'}); + } + } + else { + this.minimized = false; + + var dh = this.r2Height; + this.r2Height = null; + if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow) { + new Effect.ResizeWindow(this, null, null, null, this.height + dh, {duration: Window.resizeEffectDuration}); + } + else { + var h = this.element.getHeight() + dh; + this.height += dh; + this.element.setStyle({height: h + "px"}) + r2.show(); + } + if (! this.useTop) { + var bottom = parseFloat(this.element.getStyle('bottom')); + this.element.setStyle({bottom: (bottom - dh) + 'px'}); + } + this.toFront(); + } + this._notify("onMinimize"); + + // Store new location/size if need be + this._saveCookie() + }, + + maximize: function() { + if (this.isMinimized() || this.resizing) + return; + + if (Prototype.Browser.IE && this.heightN == 0) + this._getWindowBorderSize(); + + if (this.storedLocation != null) { + this._restoreLocation(); + if(this.iefix) + this.iefix.hide(); + } + else { + this._storeLocation(); + Windows.unsetOverflow(this); + + var windowScroll = WindowUtilities.getWindowScroll(this.options.parent); + var pageSize = WindowUtilities.getPageSize(this.options.parent); + var left = windowScroll.left; + var top = windowScroll.top; + + if (this.options.parent != document.body) { + windowScroll = {top:0, left:0, bottom:0, right:0}; + var dim = this.options.parent.getDimensions(); + pageSize.windowWidth = dim.width; + pageSize.windowHeight = dim.height; + top = 0; + left = 0; + } + + if (this.constraint) { + pageSize.windowWidth -= Math.max(0, this.constraintPad.left) + Math.max(0, this.constraintPad.right); + pageSize.windowHeight -= Math.max(0, this.constraintPad.top) + Math.max(0, this.constraintPad.bottom); + left += Math.max(0, this.constraintPad.left); + top += Math.max(0, this.constraintPad.top); + } + + var width = pageSize.windowWidth - this.widthW - this.widthE; + var height= pageSize.windowHeight - this.heightN - this.heightS; + + if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow) { + new Effect.ResizeWindow(this, top, left, width, height, {duration: Window.resizeEffectDuration}); + } + else { + this.setSize(width, height); + this.element.setStyle(this.useLeft ? {left: left} : {right: left}); + this.element.setStyle(this.useTop ? {top: top} : {bottom: top}); + } + + this.toFront(); + if (this.iefix) + this._fixIEOverlapping(); + } + this._notify("onMaximize"); + + // Store new location/size if need be + this._saveCookie() + }, + + isMinimized: function() { + return this.minimized; + }, + + isMaximized: function() { + return (this.storedLocation != null); + }, + + setOpacity: function(opacity) { + if (Element.setOpacity) + Element.setOpacity(this.element, opacity); + }, + + setZIndex: function(zindex) { + this.element.setStyle({zIndex: zindex}); + Windows.updateZindex(zindex, this); + }, + + setTitle: function(newTitle) { + if (!newTitle || newTitle == "") + newTitle = " "; + + Element.update(this.element.id + '_top', newTitle); + }, + + getTitle: function() { + return $(this.element.id + '_top').innerHTML; + }, + + setStatusBar: function(element) { + var statusBar = $(this.getId() + "_bottom"); + + if (typeof(element) == "object") { + if (this.bottombar.firstChild) + this.bottombar.replaceChild(element, this.bottombar.firstChild); + else + this.bottombar.appendChild(element); + } + else + this.bottombar.innerHTML = element; + }, + + _checkIEOverlapping: function() { + if(!this.iefix && (navigator.appVersion.indexOf('MSIE')>0) && (navigator.userAgent.indexOf('Opera')<0) && (this.element.getStyle('position')=='absolute')) { + new Insertion.After(this.element.id, '<iframe id="' + this.element.id + '_iefix" '+ 'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' + 'src="javascript:false;" frameborder="0" scrolling="no"></iframe>'); + this.iefix = $(this.element.id+'_iefix'); + } + if(this.iefix) + setTimeout(this._fixIEOverlapping.bind(this), 50); + }, + + _fixIEOverlapping: function() { + Position.clone(this.element, this.iefix); + this.iefix.style.zIndex = this.element.style.zIndex - 1; + this.iefix.show(); + }, + + _getWindowBorderSize: function(event) { + // Hack to get real window border size!! + var div = this._createHiddenDiv(this.options.className + "_n") + this.heightN = Element.getDimensions(div).height; + div.parentNode.removeChild(div) + + var div = this._createHiddenDiv(this.options.className + "_s") + this.heightS = Element.getDimensions(div).height; + div.parentNode.removeChild(div) + + var div = this._createHiddenDiv(this.options.className + "_e") + this.widthE = Element.getDimensions(div).width; + div.parentNode.removeChild(div) + + var div = this._createHiddenDiv(this.options.className + "_w") + this.widthW = Element.getDimensions(div).width; + div.parentNode.removeChild(div); + + var div = document.createElement("div"); + div.className = "overlay_" + this.options.className ; + document.body.appendChild(div); + //alert("no timeout:\nopacity: " + div.getStyle("opacity") + "\nwidth: " + document.defaultView.getComputedStyle(div, null).width); + var that = this; + + // Workaround for Safari!! + setTimeout(function() {that.overlayOpacity = ($(div).getStyle("opacity")); div.parentNode.removeChild(div);}, 10); + + // Workaround for IE!! + if (Prototype.Browser.IE) { + this.heightS = $(this.getId() +"_row3").getDimensions().height; + this.heightN = $(this.getId() +"_row1").getDimensions().height; + } + + // Safari size fix + if (Prototype.Browser.WebKit && Prototype.Browser.WebKitVersion < 420) + this.setSize(this.width, this.height); + if (this.doMaximize) + this.maximize(); + if (this.doMinimize) + this.minimize(); + }, + + _createHiddenDiv: function(className) { + var objBody = document.body; + var win = document.createElement("div"); + win.setAttribute('id', this.element.id+ "_tmp"); + win.className = className; + win.style.display = 'none'; + win.innerHTML = ''; + objBody.insertBefore(win, objBody.firstChild); + return win; + }, + + _storeLocation: function() { + if (this.storedLocation == null) { + this.storedLocation = {useTop: this.useTop, useLeft: this.useLeft, + top: this.element.getStyle('top'), bottom: this.element.getStyle('bottom'), + left: this.element.getStyle('left'), right: this.element.getStyle('right'), + width: this.width, height: this.height }; + } + }, + + _restoreLocation: function() { + if (this.storedLocation != null) { + this.useLeft = this.storedLocation.useLeft; + this.useTop = this.storedLocation.useTop; + + if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow) + new Effect.ResizeWindow(this, this.storedLocation.top, this.storedLocation.left, this.storedLocation.width, this.storedLocation.height, {duration: Window.resizeEffectDuration}); + else { + this.element.setStyle(this.useLeft ? {left: this.storedLocation.left} : {right: this.storedLocation.right}); + this.element.setStyle(this.useTop ? {top: this.storedLocation.top} : {bottom: this.storedLocation.bottom}); + this.setSize(this.storedLocation.width, this.storedLocation.height); + } + + Windows.resetOverflow(); + this._removeStoreLocation(); + } + }, + + _removeStoreLocation: function() { + this.storedLocation = null; + }, + + _saveCookie: function() { + if (this.cookie) { + var value = ""; + if (this.useLeft) + value += "l:" + (this.storedLocation ? this.storedLocation.left : this.element.getStyle('left')) + else + value += "r:" + (this.storedLocation ? this.storedLocation.right : this.element.getStyle('right')) + if (this.useTop) + value += ",t:" + (this.storedLocation ? this.storedLocation.top : this.element.getStyle('top')) + else + value += ",b:" + (this.storedLocation ? this.storedLocation.bottom :this.element.getStyle('bottom')) + + value += "," + (this.storedLocation ? this.storedLocation.width : this.width); + value += "," + (this.storedLocation ? this.storedLocation.height : this.height); + value += "," + this.isMinimized(); + value += "," + this.isMaximized(); + WindowUtilities.setCookie(value, this.cookie) + } + }, + + _createWiredElement: function() { + if (! this.wiredElement) { + if (Prototype.Browser.IE) + this._getWindowBorderSize(); + var div = document.createElement("div"); + div.className = "wired_frame " + this.options.className + "_wired_frame"; + + div.style.position = 'absolute'; + this.options.parent.insertBefore(div, this.options.parent.firstChild); + this.wiredElement = $(div); + } + if (this.useLeft) + this.wiredElement.setStyle({left: this.element.getStyle('left')}); + else + this.wiredElement.setStyle({right: this.element.getStyle('right')}); + + if (this.useTop) + this.wiredElement.setStyle({top: this.element.getStyle('top')}); + else + this.wiredElement.setStyle({bottom: this.element.getStyle('bottom')}); + + var dim = this.element.getDimensions(); + this.wiredElement.setStyle({width: dim.width + "px", height: dim.height +"px"}); + + this.wiredElement.setStyle({zIndex: Windows.maxZIndex+30}); + return this.wiredElement; + }, + + _hideWiredElement: function() { + if (! this.wiredElement || ! this.currentDrag) + return; + if (this.currentDrag == this.element) + this.currentDrag = null; + else { + if (this.useLeft) + this.element.setStyle({left: this.currentDrag.getStyle('left')}); + else + this.element.setStyle({right: this.currentDrag.getStyle('right')}); + + if (this.useTop) + this.element.setStyle({top: this.currentDrag.getStyle('top')}); + else + this.element.setStyle({bottom: this.currentDrag.getStyle('bottom')}); + + this.currentDrag.hide(); + this.currentDrag = null; + if (this.doResize) + this.setSize(this.width, this.height); + } + }, + + _notify: function(eventName) { + if (this.options[eventName]) + this.options[eventName](this); + else + Windows.notify(eventName, this); + } +}; + +// Windows containers, register all page windows +var Windows = { + windows: [], + modalWindows: [], + observers: [], + focusedWindow: null, + maxZIndex: 0, + overlayShowEffectOptions: {duration: 0.5}, + overlayHideEffectOptions: {duration: 0.5}, + + addObserver: function(observer) { + this.removeObserver(observer); + this.observers.push(observer); + }, + + removeObserver: function(observer) { + this.observers = this.observers.reject( function(o) { return o==observer }); + }, + + // onDestroy onStartResize onStartMove onResize onMove onEndResize onEndMove onFocus onBlur onBeforeShow onShow onHide onMinimize onMaximize onClose + notify: function(eventName, win) { + this.observers.each( function(o) {if(o[eventName]) o[eventName](eventName, win);}); + }, + + // Gets window from its id + getWindow: function(id) { + return this.windows.detect(function(d) { return d.getId() ==id }); + }, + + // Gets the last focused window + getFocusedWindow: function() { + return this.focusedWindow; + }, + + updateFocusedWindow: function() { + this.focusedWindow = this.windows.length >=2 ? this.windows[this.windows.length-2] : null; + }, + + // Registers a new window (called by Windows constructor) + register: function(win) { + this.windows.push(win); + }, + + // Add a modal window in the stack + addModalWindow: function(win) { + // Disable screen if first modal window + if (this.modalWindows.length == 0) { + WindowUtilities.disableScreen(win.options.className, 'overlay_modal', win.overlayOpacity, win.getId(), win.options.parent); + } + else { + // Move overlay over all windows + if (Window.keepMultiModalWindow) { + $('overlay_modal').style.zIndex = Windows.maxZIndex + 1; + Windows.maxZIndex += 1; + WindowUtilities._hideSelect(this.modalWindows.last().getId()); + } + // Hide current modal window + else + this.modalWindows.last().element.hide(); + // Fucking IE select issue + WindowUtilities._showSelect(win.getId()); + } + this.modalWindows.push(win); + }, + + removeModalWindow: function(win) { + this.modalWindows.pop(); + + // No more modal windows + if (this.modalWindows.length == 0) + WindowUtilities.enableScreen(); + else { + if (Window.keepMultiModalWindow) { + this.modalWindows.last().toFront(); + WindowUtilities._showSelect(this.modalWindows.last().getId()); + } + else + this.modalWindows.last().element.show(); + } + }, + + // Registers a new window (called by Windows constructor) + register: function(win) { + this.windows.push(win); + }, + + // Unregisters a window (called by Windows destructor) + unregister: function(win) { + this.windows = this.windows.reject(function(d) { return d==win }); + }, + + // Closes all windows + closeAll: function() { + this.windows.each( function(w) {Windows.close(w.getId())} ); + }, + + closeAllModalWindows: function() { + WindowUtilities.enableScreen(); + this.modalWindows.each( function(win) {if (win) win.close()}); + }, + + // Minimizes a window with its id + minimize: function(id, event) { + var win = this.getWindow(id) + if (win && win.visible) + win.minimize(); + Event.stop(event); + }, + + // Maximizes a window with its id + maximize: function(id, event) { + var win = this.getWindow(id) + if (win && win.visible) + win.maximize(); + Event.stop(event); + }, + + // Closes a window with its id + close: function(id, event) { + var win = this.getWindow(id); + if (win) + win.close(); + if (event) + Event.stop(event); + }, + + blur: function(id) { + var win = this.getWindow(id); + if (!win) + return; + if (win.options.blurClassName) + win.changeClassName(win.options.blurClassName); + if (this.focusedWindow == win) + this.focusedWindow = null; + win._notify("onBlur"); + }, + + focus: function(id) { + var win = this.getWindow(id); + if (!win) + return; + if (this.focusedWindow) + this.blur(this.focusedWindow.getId()) + + if (win.options.focusClassName) + win.changeClassName(win.options.focusClassName); + this.focusedWindow = win; + win._notify("onFocus"); + }, + + unsetOverflow: function(except) { + this.windows.each(function(d) { d.oldOverflow = d.getContent().getStyle("overflow") || "auto" ; d.getContent().setStyle({overflow: "hidden"}) }); + if (except && except.oldOverflow) + except.getContent().setStyle({overflow: except.oldOverflow}); + }, + + resetOverflow: function() { + this.windows.each(function(d) { if (d.oldOverflow) d.getContent().setStyle({overflow: d.oldOverflow}) }); + }, + + updateZindex: function(zindex, win) { + if (zindex > this.maxZIndex) { + this.maxZIndex = zindex; + if (this.focusedWindow) + this.blur(this.focusedWindow.getId()) + } + this.focusedWindow = win; + if (this.focusedWindow) + this.focus(this.focusedWindow.getId()) + } +}; + +var Dialog = { + dialogId: null, + onCompleteFunc: null, + callFunc: null, + parameters: null, + + confirm: function(content, parameters) { + // Get Ajax return before + if (content && typeof content != "string") { + Dialog._runAjaxRequest(content, parameters, Dialog.confirm); + return + } + content = content || ""; + + parameters = parameters || {}; + var okLabel = parameters.okLabel ? parameters.okLabel : "Ok"; + var cancelLabel = parameters.cancelLabel ? parameters.cancelLabel : "Cancel"; + + // Backward compatibility + parameters = Object.extend(parameters, parameters.windowParameters || {}); + parameters.windowParameters = parameters.windowParameters || {}; + + parameters.className = parameters.className || "alert"; + + var okButtonClass = "class ='" + (parameters.buttonClass ? parameters.buttonClass + " " : "") + " ok_button'" + var cancelButtonClass = "class ='" + (parameters.buttonClass ? parameters.buttonClass + " " : "") + " cancel_button'" + var content = "\ + <div class='" + parameters.className + "_message'>" + content + "</div>\ + <div class='" + parameters.className + "_buttons'>\ + <input type='button' value='" + okLabel + "' onclick='Dialog.okCallback()' " + okButtonClass + "/>\ + <input type='button' value='" + cancelLabel + "' onclick='Dialog.cancelCallback()' " + cancelButtonClass + "/>\ + </div>\ + "; + return this._openDialog(content, parameters) + }, + + alert: function(content, parameters) { + // Get Ajax return before + if (content && typeof content != "string") { + Dialog._runAjaxRequest(content, parameters, Dialog.alert); + return + } + content = content || ""; + + parameters = parameters || {}; + var okLabel = parameters.okLabel ? parameters.okLabel : "Ok"; + + // Backward compatibility + parameters = Object.extend(parameters, parameters.windowParameters || {}); + parameters.windowParameters = parameters.windowParameters || {}; + + parameters.className = parameters.className || "alert"; + + var okButtonClass = "class ='" + (parameters.buttonClass ? parameters.buttonClass + " " : "") + " ok_button'" + var content = "\ + <div class='" + parameters.className + "_message'>" + content + "</div>\ + <div class='" + parameters.className + "_buttons'>\ + <input type='button' value='" + okLabel + "' onclick='Dialog.okCallback()' " + okButtonClass + "/>\ + </div>"; + return this._openDialog(content, parameters) + }, + + info: function(content, parameters) { + // Get Ajax return before + if (content && typeof content != "string") { + Dialog._runAjaxRequest(content, parameters, Dialog.info); + return + } + content = content || ""; + + // Backward compatibility + parameters = parameters || {}; + parameters = Object.extend(parameters, parameters.windowParameters || {}); + parameters.windowParameters = parameters.windowParameters || {}; + + parameters.className = parameters.className || "alert"; + + var content = "<div id='modal_dialog_message' class='" + parameters.className + "_message'>" + content + "</div>"; + if (parameters.showProgress) + content += "<div id='modal_dialog_progress' class='" + parameters.className + "_progress'> </div>"; + + parameters.ok = null; + parameters.cancel = null; + + return this._openDialog(content, parameters) + }, + + setInfoMessage: function(message) { + $('modal_dialog_message').update(message); + }, + + closeInfo: function() { + Windows.close(this.dialogId); + }, + + _openDialog: function(content, parameters) { + var className = parameters.className; + + if (! parameters.height && ! parameters.width) { + parameters.width = WindowUtilities.getPageSize(parameters.options.parent || document.body).pageWidth / 2; + } + if (parameters.id) + this.dialogId = parameters.id; + else { + var t = new Date(); + this.dialogId = 'modal_dialog_' + t.getTime(); + parameters.id = this.dialogId; + } + + // compute height or width if need be + if (! parameters.height || ! parameters.width) { + var size = WindowUtilities._computeSize(content, this.dialogId, parameters.width, parameters.height, 5, className) + if (parameters.height) + parameters.width = size + 5 + else + parameters.height = size + 5 + } + parameters.effectOptions = parameters.effectOptions ; + parameters.resizable = parameters.resizable || false; + parameters.minimizable = parameters.minimizable || false; + parameters.maximizable = parameters.maximizable || false; + parameters.draggable = parameters.draggable || false; + parameters.closable = parameters.closable || false; + + var win = new Window(parameters); + win.getContent().innerHTML = content; + + win.showCenter(true, parameters.top, parameters.left); + win.setDestroyOnClose(); + + win.cancelCallback = parameters.onCancel || parameters.cancel; + win.okCallback = parameters.onOk || parameters.ok; + + return win; + }, + + _getAjaxContent: function(originalRequest) { + Dialog.callFunc(originalRequest.responseText, Dialog.parameters) + }, + + _runAjaxRequest: function(message, parameters, callFunc) { + if (message.options == null) + message.options = {} + Dialog.onCompleteFunc = message.options.onComplete; + Dialog.parameters = parameters; + Dialog.callFunc = callFunc; + + message.options.onComplete = Dialog._getAjaxContent; + new Ajax.Request(message.url, message.options); + }, + + okCallback: function() { + var win = Windows.focusedWindow; + if (!win.okCallback || win.okCallback(win)) { + // Remove onclick on button + $$("#" + win.getId()+" input").each(function(element) {element.onclick=null;}) + win.close(); + } + }, + + cancelCallback: function() { + var win = Windows.focusedWindow; + // Remove onclick on button + $$("#" + win.getId()+" input").each(function(element) {element.onclick=null}) + win.close(); + if (win.cancelCallback) + win.cancelCallback(win); + } +} +/* + Based on Lightbox JS: Fullsize Image Overlays + by Lokesh Dhakar - http://www.huddletogether.com + + For more information on this script, visit: + http://huddletogether.com/projects/lightbox/ + + Licensed under the Creative Commons Attribution 2.5 License - http://creativecommons.org/licenses/by/2.5/ + (basically, do anything you want, just leave my name and link) +*/ + +if (Prototype.Browser.WebKit) { + var array = navigator.userAgent.match(new RegExp(/AppleWebKit\/([\d\.\+]*)/)); + Prototype.Browser.WebKitVersion = parseFloat(array[1]); +} + +var WindowUtilities = { + // From dragdrop.js + getWindowScroll: function(parent) { + var T, L, W, H; + parent = parent || document.body; + if (parent != document.body) { + T = parent.scrollTop; + L = parent.scrollLeft; + W = parent.scrollWidth; + H = parent.scrollHeight; + } + else { + var w = window; + with (w.document) { + if (w.document.documentElement && documentElement.scrollTop) { + T = documentElement.scrollTop; + L = documentElement.scrollLeft; + } else if (w.document.body) { + T = body.scrollTop; + L = body.scrollLeft; + } + if (w.innerWidth) { + W = w.innerWidth; + H = w.innerHeight; + } else if (w.document.documentElement && documentElement.clientWidth) { + W = documentElement.clientWidth; + H = documentElement.clientHeight; + } else { + W = body.offsetWidth; + H = body.offsetHeight + } + } + } + return { top: T, left: L, width: W, height: H }; + }, + // + // getPageSize() + // Returns array with page width, height and window width, height + // Core code from - quirksmode.org + // Edit for Firefox by pHaez + // + getPageSize: function(parent){ + parent = parent || document.body; + var windowWidth, windowHeight; + var pageHeight, pageWidth; + if (parent != document.body) { + windowWidth = parent.getWidth(); + windowHeight = parent.getHeight(); + pageWidth = parent.scrollWidth; + pageHeight = parent.scrollHeight; + } + else { + var xScroll, yScroll; + + if (window.innerHeight && window.scrollMaxY) { + xScroll = document.body.scrollWidth; + yScroll = window.innerHeight + window.scrollMaxY; + } else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac + xScroll = document.body.scrollWidth; + yScroll = document.body.scrollHeight; + } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari + xScroll = document.body.offsetWidth; + yScroll = document.body.offsetHeight; + } + + + if (self.innerHeight) { // all except Explorer + windowWidth = self.innerWidth; + windowHeight = self.innerHeight; + } else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode + windowWidth = document.documentElement.clientWidth; + windowHeight = document.documentElement.clientHeight; + } else if (document.body) { // other Explorers + windowWidth = document.body.clientWidth; + windowHeight = document.body.clientHeight; + } + + // for small pages with total height less then height of the viewport + if(yScroll < windowHeight){ + pageHeight = windowHeight; + } else { + pageHeight = yScroll; + } + + // for small pages with total width less then width of the viewport + if(xScroll < windowWidth){ + pageWidth = windowWidth; + } else { + pageWidth = xScroll; + } + } + return {pageWidth: pageWidth ,pageHeight: pageHeight , windowWidth: windowWidth, windowHeight: windowHeight}; + }, + + disableScreen: function(className, overlayId, overlayOpacity, contentId, parent) { + WindowUtilities.initLightbox(overlayId, className, function() {this._disableScreen(className, overlayId, overlayOpacity, contentId)}.bind(this), parent || document.body); + }, + + _disableScreen: function(className, overlayId, overlayOpacity, contentId) { + // prep objects + var objOverlay = $(overlayId); + + var pageSize = WindowUtilities.getPageSize(objOverlay.parentNode); + + // Hide select boxes as they will 'peek' through the image in IE, store old value + if (contentId && Prototype.Browser.IE) { + WindowUtilities._hideSelect(); + WindowUtilities._showSelect(contentId); + } + + // set height of Overlay to take up whole page and show + objOverlay.style.height = (pageSize.pageHeight + 'px'); + objOverlay.style.display = 'none'; + if (overlayId == "overlay_modal" && Window.hasEffectLib && Windows.overlayShowEffectOptions) { + objOverlay.overlayOpacity = overlayOpacity; + new Effect.Appear(objOverlay, Object.extend({from: 0, to: overlayOpacity}, Windows.overlayShowEffectOptions)); + } + else + objOverlay.style.display = "block"; + }, + + enableScreen: function(id) { + id = id || 'overlay_modal'; + var objOverlay = $(id); + if (objOverlay) { + // hide lightbox and overlay + if (id == "overlay_modal" && Window.hasEffectLib && Windows.overlayHideEffectOptions) + new Effect.Fade(objOverlay, Object.extend({from: objOverlay.overlayOpacity, to:0}, Windows.overlayHideEffectOptions)); + else { + objOverlay.style.display = 'none'; + objOverlay.parentNode.removeChild(objOverlay); + } + + // make select boxes visible using old value + if (id != "__invisible__") + WindowUtilities._showSelect(); + } + }, + + _hideSelect: function(id) { + if (Prototype.Browser.IE) { + id = id == null ? "" : "#" + id + " "; + $$(id + 'select').each(function(element) { + if (! WindowUtilities.isDefined(element.oldVisibility)) { + element.oldVisibility = element.style.visibility ? element.style.visibility : "visible"; + element.style.visibility = "hidden"; + } + }); + } + }, + + _showSelect: function(id) { + if (Prototype.Browser.IE) { + id = id == null ? "" : "#" + id + " "; + $$(id + 'select').each(function(element) { + if (WindowUtilities.isDefined(element.oldVisibility)) { + // Why?? Ask IE + try { + element.style.visibility = element.oldVisibility; + } catch(e) { + element.style.visibility = "visible"; + } + element.oldVisibility = null; + } + else { + if (element.style.visibility) + element.style.visibility = "visible"; + } + }); + } + }, + + isDefined: function(object) { + return typeof(object) != "undefined" && object != null; + }, + + // initLightbox() + // Function runs on window load, going through link tags looking for rel="lightbox". + // These links receive onclick events that enable the lightbox display for their targets. + // The function also inserts html markup at the top of the page which will be used as a + // container for the overlay pattern and the inline image. + initLightbox: function(id, className, doneHandler, parent) { + // Already done, just update zIndex + if ($(id)) { + Element.setStyle(id, {zIndex: Windows.maxZIndex + 1}); + Windows.maxZIndex++; + doneHandler(); + } + // create overlay div and hardcode some functional styles (aesthetic styles are in CSS file) + else { + var objOverlay = document.createElement("div"); + objOverlay.setAttribute('id', id); + objOverlay.className = "overlay_" + className + objOverlay.style.display = 'none'; + objOverlay.style.position = 'absolute'; + objOverlay.style.top = '0'; + objOverlay.style.left = '0'; + objOverlay.style.zIndex = Windows.maxZIndex + 1; + Windows.maxZIndex++; + objOverlay.style.width = '100%'; + parent.insertBefore(objOverlay, parent.firstChild); + if (Prototype.Browser.WebKit && id == "overlay_modal") { + setTimeout(function() {doneHandler()}, 10); + } + else + doneHandler(); + } + }, + + setCookie: function(value, parameters) { + document.cookie= parameters[0] + "=" + escape(value) + + ((parameters[1]) ? "; expires=" + parameters[1].toGMTString() : "") + + ((parameters[2]) ? "; path=" + parameters[2] : "") + + ((parameters[3]) ? "; domain=" + parameters[3] : "") + + ((parameters[4]) ? "; secure" : ""); + }, + + getCookie: function(name) { + var dc = document.cookie; + var prefix = name + "="; + var begin = dc.indexOf("; " + prefix); + if (begin == -1) { + begin = dc.indexOf(prefix); + if (begin != 0) return null; + } else { + begin += 2; + } + var end = document.cookie.indexOf(";", begin); + if (end == -1) { + end = dc.length; + } + return unescape(dc.substring(begin + prefix.length, end)); + }, + + _computeSize: function(content, id, width, height, margin, className) { + var objBody = document.body; + var tmpObj = document.createElement("div"); + tmpObj.setAttribute('id', id); + tmpObj.className = className + "_content"; + + if (height) + tmpObj.style.height = height + "px" + else + tmpObj.style.width = width + "px" + + tmpObj.style.position = 'absolute'; + tmpObj.style.top = '0'; + tmpObj.style.left = '0'; + tmpObj.style.display = 'none'; + + tmpObj.innerHTML = content; + objBody.insertBefore(tmpObj, objBody.firstChild); + + var size; + if (height) + size = $(tmpObj).getDimensions().width + margin; + else + size = $(tmpObj).getDimensions().height + margin; + objBody.removeChild(tmpObj); + return size; + } +} + Property changes on: trunk/billy-ui/src/main/webapp/js/window/window.js ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/js/window/window_effects.js =================================================================== --- trunk/billy-ui/src/main/webapp/js/window/window_effects.js (rev 0) +++ trunk/billy-ui/src/main/webapp/js/window/window_effects.js 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,157 @@ +Effect.ResizeWindow = Class.create(); +Object.extend(Object.extend(Effect.ResizeWindow.prototype, Effect.Base.prototype), { + initialize: function(win, top, left, width, height) { + this.window = win; + this.window.resizing = true; + + var size = win.getSize(); + this.initWidth = parseFloat(size.width); + this.initHeight = parseFloat(size.height); + + var location = win.getLocation(); + this.initTop = parseFloat(location.top); + this.initLeft = parseFloat(location.left); + + this.width = width != null ? parseFloat(width) : this.initWidth; + this.height = height != null ? parseFloat(height) : this.initHeight; + this.top = top != null ? parseFloat(top) : this.initTop; + this.left = left != null ? parseFloat(left) : this.initLeft; + + this.dx = this.left - this.initLeft; + this.dy = this.top - this.initTop; + this.dw = this.width - this.initWidth; + this.dh = this.height - this.initHeight; + + this.r2 = $(this.window.getId() + "_row2"); + this.content = $(this.window.getId() + "_content"); + + this.contentOverflow = this.content.getStyle("overflow") || "auto"; + this.content.setStyle({overflow: "hidden"}); + + // Wired mode + if (this.window.options.wiredDrag) { + this.window.currentDrag = win._createWiredElement(); + this.window.currentDrag.show(); + this.window.element.hide(); + } + + this.start(arguments[5]); + }, + + update: function(position) { + var width = Math.floor(this.initWidth + this.dw * position); + var height = Math.floor(this.initHeight + this.dh * position); + var top = Math.floor(this.initTop + this.dy * position); + var left = Math.floor(this.initLeft + this.dx * position); + + if (window.ie) { + if (Math.floor(height) == 0) + this.r2.hide(); + else if (Math.floor(height) >1) + this.r2.show(); + } + this.r2.setStyle({height: height}); + this.window.setSize(width, height); + this.window.setLocation(top, left); + }, + + finish: function(position) { + // Wired mode + if (this.window.options.wiredDrag) { + this.window._hideWiredElement(); + this.window.element.show(); + } + + this.window.setSize(this.width, this.height); + this.window.setLocation(this.top, this.left); + this.r2.setStyle({height: null}); + + this.content.setStyle({overflow: this.contentOverflow}); + + this.window.resizing = false; + } +}); + +Effect.ModalSlideDown = function(element) { + var windowScroll = WindowUtilities.getWindowScroll(); + var height = element.getStyle("height"); + element.setStyle({top: - (parseFloat(height) - windowScroll.top) + "px"}); + + element.show(); + return new Effect.Move(element, Object.extend({ x: 0, y: parseFloat(height) }, arguments[1] || {})); +}; + + +Effect.ModalSlideUp = function(element) { + var height = element.getStyle("height"); + return new Effect.Move(element, Object.extend({ x: 0, y: -parseFloat(height) }, arguments[1] || {})); +}; + +PopupEffect = Class.create(); +PopupEffect.prototype = { + initialize: function(htmlElement) { + this.html = $(htmlElement); + this.options = Object.extend({className: "popup_effect", duration: 0.4}, arguments[1] || {}); + + }, + show: function(element, options) { + var position = Position.cumulativeOffset(this.html); + var size = this.html.getDimensions(); + var bounds = element.win.getBounds(); + this.window = element.win; + // Create a div + if (!this.div) { + this.div = document.createElement("div"); + this.div.className = this.options.className; + this.div.style.height = size.height + "px"; + this.div.style.width = size.width + "px"; + this.div.style.top = position[1] + "px"; + this.div.style.left = position[0] + "px"; + this.div.style.position = "absolute" + document.body.appendChild(this.div); + } + if (this.options.fromOpacity) + this.div.setStyle({opacity: this.options.fromOpacity}) + this.div.show(); + var style = "top:" + bounds.top + ";left:" +bounds.left + ";width:" + bounds.width +";height:" + bounds.height; + if (this.options.toOpacity) + style += ";opacity:" + this.options.toOpacity; + + new Effect.Morph(this.div ,{style: style, duration: this.options.duration, afterFinish: this._showWindow.bind(this)}); + }, + + hide: function(element, options) { + var position = Position.cumulativeOffset(this.html); + var size = this.html.getDimensions(); + this.window.visible = true; + var bounds = this.window.getBounds(); + this.window.visible = false; + + this.window.element.hide(); + + this.div.style.height = bounds.height; + this.div.style.width = bounds.width; + this.div.style.top = bounds.top; + this.div.style.left = bounds.left; + + if (this.options.toOpacity) + this.div.setStyle({opacity: this.options.toOpacity}) + + this.div.show(); + var style = "top:" + position[1] + "px;left:" + position[0] + "px;width:" + size.width +"px;height:" + size.height + "px"; + + if (this.options.fromOpacity) + style += ";opacity:" + this.options.fromOpacity; + new Effect.Morph(this.div ,{style: style, duration: this.options.duration, afterFinish: this._hideDiv.bind(this)}); + }, + + _showWindow: function() { + this.div.hide(); + this.window.element.show(); + }, + + _hideDiv: function() { + this.div.hide(); + } +} + Property changes on: trunk/billy-ui/src/main/webapp/js/window/window_effects.js ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/js/window/window_ext.js =================================================================== --- trunk/billy-ui/src/main/webapp/js/window/window_ext.js (rev 0) +++ trunk/billy-ui/src/main/webapp/js/window/window_ext.js 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,115 @@ +// Copyright (c) 2006 Sébastien Gruhier (http://xilinus.com, http://itseb.com) +// YOU MUST INCLUDE window.js BEFORE +// +// Object to store hide/show windows status in a cookie +// Just add at the end of your HTML file this javascript line: WindowStore.init() +WindowStore = { + doSetCookie: false, + cookieName: "__window_store__", + expired: null, + + // Init function with two optional parameters + // - cookieName (default = __window_store__) + // - expiration date (default 3 years from now) + init: function(cookieName, expired) { + WindowStore.cookieName = cookieName || WindowStore.cookieName + + if (! expired) { + var today = new Date(); + today.setYear(today.getYear()+1903); + WindowStore.expired = today; + } + else + WindowStore.expired = expired; + + Windows.windows.each(function(win) { + win.setCookie(win.getId(), WindowStore.expired); + }); + + // Create observer on show/hide events + var myObserver = { + onShow: function(eventName, win) { + WindowStore._saveCookie(); + }, + + onClose: function(eventName, win) { + WindowStore._saveCookie(); + }, + + onHide: function(eventName, win) { + WindowStore._saveCookie(); + } + } + Windows.addObserver(myObserver); + + WindowStore._restoreWindows(); + WindowStore._saveCookie(); + }, + + show: function(win) { + eval("var cookie = " + WindowUtilities.getCookie(WindowStore.cookieName)); + if (cookie != null) { + if (cookie[win.getId()]) + win.show(); + } + else + win.show(); + }, + + // Function to store windows show/hide status in a cookie + _saveCookie: function() { + if (!doSetCookie) + return; + + var cookieValue = "{"; + Windows.windows.each(function(win) { + if (cookieValue != "{") + cookieValue += "," + cookieValue += win.getId() + ": " + win.isVisible(); + }); + cookieValue += "}" + + WindowUtilities.setCookie(cookieValue, [WindowStore.cookieName, WindowStore.expired]); + }, + + // Function to restore windows show/hide status from a cookie if exists + _restoreWindows: function() { + eval("var cookie = " + WindowUtilities.getCookie(WindowStore.cookieName)); + if (cookie != null) { + doSetCookie = false; + Windows.windows.each(function(win) { + if (cookie[win.getId()]) + win.show(); + }); + } + doSetCookie = true; + } +} + +// Object to set a close key an all windows +WindowCloseKey = { + keyCode: Event.KEY_ESC, + + init: function(keyCode) { + if (keyCode) + WindowCloseKey.keyCode = keyCode; + + Event.observe(document, 'keydown', this._closeCurrentWindow.bindAsEventListener(this)); + }, + + _closeCurrentWindow: function(event) { + var e = event || window.event + var characterCode = e.which || e.keyCode; + + // Check if there is a top window (it means it's an URL content) + var win = top.Windows.focusedWindow; + if (characterCode == WindowCloseKey.keyCode && win) { + if (win.cancelCallback) + top.Dialog.cancelCallback(); + else if (win.okCallback) + top.Dialog.okCallback(); + else + top.Windows.close(top.Windows.focusedWindow.getId()); + } + } +} \ No newline at end of file Property changes on: trunk/billy-ui/src/main/webapp/js/window/window_ext.js ___________________________________________________________________ Added: svn:executable + * Added: trunk/billy-ui/src/main/webapp/js/window_ajax.js =================================================================== --- trunk/billy-ui/src/main/webapp/js/window_ajax.js (rev 0) +++ trunk/billy-ui/src/main/webapp/js/window_ajax.js 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,31 @@ +/** + * Fenêtre avec contenu chargé en Ajax + */ +var AjaxWindow = Class.create({ + /** + * windowTitle : Titre de la fenêtre + * element : Element DOM depuis lequel la fenêtre est ouverte + * uri : Uri de la page à afficher + */ + initialize: function(element, uri, windowTitle, width, height) { + Tapestry.debug('Initialize AjaxWindow :uri= '+uri); + // Création d'une fenêtre + this.window = new Window('dialog'+element, { + className: 'alphacube', + title: windowTitle, + hideEffect:Element.hide, + showEffect:Element.show, + width: width, + height: height + }); + this.uri = uri; + // Bind avec l'évènement click sur l'élément DOM + $(element).observe('click',this.openWindow.bindAsEventListener(this)); + }, + openWindow: function(e) { + e.stop(); + Tapestry.debug('Click'); + // Ouverture de la fenêtre avec chargement en Ajax + this.window.setAjaxContent(this.uri,null,true,true); + } +}); \ No newline at end of file Added: trunk/changelog.txt =================================================================== --- trunk/changelog.txt (rev 0) +++ trunk/changelog.txt 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1 @@ + Added: trunk/pom.xml =================================================================== --- trunk/pom.xml (rev 0) +++ trunk/pom.xml 2009-08-26 11:58:06 UTC (rev 1) @@ -0,0 +1,254 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <!-- ************************************************************* --> + <!-- *** POM Relationships *************************************** --> + <!-- ************************************************************* --> + + <parent> + <groupId>org.nuiton</groupId> + <artifactId>mavenpom</artifactId> + <version>1.0.1</version> + </parent> + + <groupId>org.chorem</groupId> + <artifactId>billy</artifactId> + <version>1.0.0-alpha-1-SNAPSHOT</version> + + <modules> + <module>billy-ui</module> + <module>billy-business</module> + </modules> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.chorem.choreg</groupId> + <artifactId>choreg</artifactId> + <version>${choreg.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.chorem</groupId> + <artifactId>chorem-commons</artifactId> + <version>${choreg.version}</version> + </dependency> + <dependency> + <groupId>org.chorem</groupId> + <artifactId>oasis-ciq-api</artifactId> + <version>${choreg.version}</version> + </dependency> + <dependency> + <groupId>org.nuiton.topia</groupId> + <artifactId>topia-persistence</artifactId> + <version>${topia.version}</version> + </dependency> + <dependency> + <groupId>org.nuiton.topia</groupId> + <artifactId>topia-soa</artifactId> + <version>${topia.version}</version> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>${lang.version}</version> + </dependency> + <dependency> + <groupId>org.apache.xmlbeans</groupId> + <artifactId>xmlbeans</artifactId> + <version>2.4.0</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.tapestry</groupId> + <artifactId>tapestry-core</artifactId> + <version>${tapestry.version}</version> + <exclusions> + <exclusion> + <groupId>jboss</groupId> + <artifactId>javassist</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.chenillekit</groupId> + <artifactId>chenillekit-tapestry</artifactId> + <version>${chenillekit.version}</version> + <exclusions> + <exclusion> + <groupId>jboss</groupId> + <artifactId>javassist</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>${junit.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>javassist</groupId> + <artifactId>javassist</artifactId> + <version>3.8.0.GA</version> + </dependency> + </dependencies> + </dependencyManagement> + + <!-- ************************************************************* --> + <!-- *** Project Information ************************************* --> + <!-- ************************************************************* --> + + <name>Billy</name> + <description>Gestion des factures</description> + <inceptionYear>2009</inceptionYear> + + <!-- Developpers, contributors... --> + <developers> + <developer> + <id>fdesbois</id> + <name>Florian DESBOIS</name> + <email>fdesbois@codelutin.com</email> + <organization>Code Lutin</organization> + <organizationUrl>http://www.codelutin.com/</organizationUrl> + <timezone>+1</timezone> + <roles> + <role>Analyste</role> + <role>Développeur</role> + </roles> + </developer> + </developers> + + <!-- ************************************************************* --> + <!-- *** Build Settings ****************************************** --> + <!-- ************************************************************* --> + + <packaging>pom</packaging> + + <properties> + + <!-- Redmine configuration --> + <projectId>billy</projectId> + <platform>chorem.org</platform> + + <!-- Nuiton librairies --> + <topia.version>2.2.0</topia.version> + <generator.version>1.0.0</generator.version> + <jrst.version>1.0.0</jrst.version> + + <!-- ChoReg --> + <choreg.version>1.0.0-alpha-2-SNAPSHOT</choreg.version> + + <!-- commons-lang for ToPIA --> + <lang.version>2.4</lang.version> + <!-- Hibernate for ToPIA --> + <hibernate.version>3.3.1.GA</hibernate.version> + + <!-- test --> + <junit.version>4.6</junit.version> + + <!-- ui --> + <tapestry.version>5.1.0.5</tapestry.version> + <chenillekit.version>1.0.2</chenillekit.version> + </properties> + + <build> + <defaultGoal>install</defaultGoal> + <pluginManagement> + <plugins> + <plugin> + <artifactId>maven-site-plugin</artifactId> + <dependencies> + <dependency> + <groupId>org.nuiton.jrst</groupId> + <artifactId>doxia-module-jrst</artifactId> + <version>${jrst.version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </pluginManagement> + </build> + + <!-- ************************************************************* --> + <!-- *** Build Environment ************************************** --> + <!-- ************************************************************* --> + + <scm> + <connection>scm:svn:http://svn.chorem.org/svn/billy/trunk</connection> + <developerConnection>scm:svn:svn+ssh://publish@svn.chorem.org/var/lib/svn/svn-chorem/billy/trunk</developerConnection> + <url>http://www.chorem.org/repositories/browse/billy/trunk</url> + </scm> + + <repositories> + <!-- depot des releases nuiton --> + <repository> + <id>nuiton.release</id> + <name>NuitonReleaseRepository</name> + <url>http://maven.nuiton.org/release</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + <releases> + <checksumPolicy>warn</checksumPolicy> + </releases> + </repository> + + <!-- depot des snapshots nuiton --> + <repository> + <id>nuiton.snapshot</id> + <name>NuitonSnapshotRepository</name> + <url>http://maven.nuiton.org/snapshot</url> + <snapshots> + <checksumPolicy>fail</checksumPolicy> + </snapshots> + <releases> + <enabled>false</enabled> + </releases> + </repository> + + <repository> + <id>chenillekit</id> + <url>http://www.chenillekit.org/mvnrepo/release</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + + <pluginRepositories> + <!-- depot des releases nuiton --> + <pluginRepository> + <id>nuiton.release</id> + <name>NuitonReleaseRepository</name> + <url>http://maven.nuiton.org/release</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + <releases> + <checksumPolicy>warn</checksumPolicy> + </releases> + </pluginRepository> + + <!-- depot des snapshots nuiton --> + <pluginRepository> + <id>nuiton.snapshot</id> + <name>NuitonSnapshotRepository</name> + <url>http://maven.nuiton.org/snapshot</url> + <snapshots> + <checksumPolicy>fail</checksumPolicy> + </snapshots> + <releases> + <enabled>false</enabled> + </releases> + </pluginRepository> + </pluginRepositories> + +</project> +