X-Git-Url: http://git.pippins.net/embedvideo/.git/static/git-logo.png?a=blobdiff_plain;f=inc%2Fclass.jscalendar.inc.php;fp=inc%2Fclass.jscalendar.inc.php;h=0fda17501013203373a2d5f7efb23fd5cd87b233;hb=f71b8f33d78f087691e594edf9ca5686c6eeb083;hp=0000000000000000000000000000000000000000;hpb=e7988503f790bfa136f25cd4ae6e23fdcfaee322;p=eq%2F.git diff --git a/inc/class.jscalendar.inc.php b/inc/class.jscalendar.inc.php new file mode 100644 index 0000000..0fda175 --- /dev/null +++ b/inc/class.jscalendar.inc.php @@ -0,0 +1,143 @@ + + * @copyright Copyright (C) 2003,2004 Free Software Foundation, Inc. http://www.fsf.org/ + * @license http://www.fsf.org/licenses/gpl.html GNU General Public License + * @package phpgwapi + * @subpackage gui + * @version $Id: class.jscalendar.inc.php,v 1.1.2.12 2004/05/01 09:24:53 skwashd Exp $ + */ + + /** + * jsCalendar wrapper-class + * + * @package phpgwapi + * @subpackage gui + * @internal The constructor load the necessary javascript-files + */ +class jscalendar +{ + /*! + @function jscalendar + @syntax jscalendar( $do_header=True ) + @author ralfbecker + @abstract constructor of the class + @param $do_header if true, necessary javascript and css gets loaded, only needed for input + */ + function jscalendar($do_header=True) + { + if(!is_object($GLOBALS['phpgw']->js)) + { + $GLOBALS['phpgw']->js = createObject('phpgwapi.javascript'); + } + $GLOBALS['phpgw']->js->validate_file('jscalendar', 'calendar'); + $this->phpgw_js_url = $GLOBALS['phpgw_info']['server']['webserver_url'].'/phpgwapi/js'; + $this->dateformat = $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']; + + if ($do_header && !strstr($GLOBALS['phpgw_info']['flags']['css'],'jscalendar')) + { + $GLOBALS['phpgw_info']['flags']['css'] .= "-->\n\n" + . '' + . "\n