You can subscribe to this list here.
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(84) |
Oct
(70) |
Nov
(164) |
Dec
(71) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2012 |
Jan
(52) |
Feb
(77) |
Mar
(70) |
Apr
(58) |
May
(81) |
Jun
(74) |
Jul
(87) |
Aug
(30) |
Sep
(45) |
Oct
(37) |
Nov
(51) |
Dec
(31) |
| 2013 |
Jan
(47) |
Feb
(29) |
Mar
(40) |
Apr
(33) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <gem...@li...> - 2012-12-30 18:24:07
|
Revision: 1082
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1082&view=rev
Author: matijsdejong
Date: 2012-12-30 18:24:01 +0000 (Sun, 30 Dec 2012)
Log Message:
-----------
Cleaned up dead code
Moved date_default_timezone_set to index.php
Modified Paths:
--------------
trunk/new_project/htdocs/index.php
Modified: trunk/new_project/htdocs/index.php
===================================================================
--- trunk/new_project/htdocs/index.php 2012-12-30 18:23:40 UTC (rev 1081)
+++ trunk/new_project/htdocs/index.php 2012-12-30 18:24:01 UTC (rev 1082)
@@ -73,6 +73,9 @@
define('APPLICATION_ENV', $env);
}
+// May be needed for strict, depending on server settings
+date_default_timezone_set('Europe/Amsterdam');
+
/**
* Load database login variables, Erasmus MC way.
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-30 18:23:53
|
Revision: 1081
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1081&view=rev
Author: matijsdejong
Date: 2012-12-30 18:23:40 +0000 (Sun, 30 Dec 2012)
Log Message:
-----------
Cleaned up dead code
Moved date_default_timezone_set to index.php
Modified Paths:
--------------
trunk/library/changelog.txt
trunk/library/classes/Gems/Loader/LoaderAbstract.php
trunk/library/classes/MUtil/Lazy.php
trunk/library/pre_bootstrap.php
Modified: trunk/library/changelog.txt
===================================================================
--- trunk/library/changelog.txt 2012-12-29 19:36:44 UTC (rev 1080)
+++ trunk/library/changelog.txt 2012-12-30 18:23:40 UTC (rev 1081)
@@ -1,3 +1,8 @@
+Important changes from 1.5.7 => 1.6
+============================================================
+Defined constant GEMS_PROJECT_PATH removed from code
+Moved date_default_timezone_set to index.php (can generate warnings)
+
Important changes from 1.5.6 => 1.5.7
============================================================
In LimeSurvey tokenanswerpersistence must be set to true for all surveys
Modified: trunk/library/classes/Gems/Loader/LoaderAbstract.php
===================================================================
--- trunk/library/classes/Gems/Loader/LoaderAbstract.php 2012-12-29 19:36:44 UTC (rev 1080)
+++ trunk/library/classes/Gems/Loader/LoaderAbstract.php 2012-12-30 18:23:40 UTC (rev 1081)
@@ -37,7 +37,7 @@
/**
* LoaderAbstract is used for classes that chain from Gems_Loader and that thus allow
- * projects to overrule the origingal implementation.
+ * projects to overrule the original implementation.
*
* I.e if you create a class <Project_name>_Model or <Project_name>_Util, that class is loaded
* automatically instead of Gems_Model or Gems_Util. <Project_name>_Model should be a subclass
Modified: trunk/library/classes/MUtil/Lazy.php
===================================================================
--- trunk/library/classes/MUtil/Lazy.php 2012-12-29 19:36:44 UTC (rev 1080)
+++ trunk/library/classes/MUtil/Lazy.php 2012-12-30 18:23:40 UTC (rev 1081)
@@ -253,26 +253,3 @@
return new MUtil_Lazy_Stack_EmptyStack($source);
}
}
-
-if (defined('MUTIL_LAZY_FUNCTIONS')) {
-
- function iff($if, $then, $else = null)
- {
- return MUtil_Lazy::iff($if, $then, $else = null);
- }
-
- function iif($if, $then, $else = null)
- {
- return MUtil_Lazy::iif($if, $then, $else = null);
- }
-
- function L($var)
- {
- return MUtil_Lazy::L($var);
- }
-
- function lazy($var)
- {
- return MUtil_Lazy::L($var);
- }
- }
Modified: trunk/library/pre_bootstrap.php
===================================================================
--- trunk/library/pre_bootstrap.php 2012-12-29 19:36:44 UTC (rev 1080)
+++ trunk/library/pre_bootstrap.php 2012-12-30 18:23:40 UTC (rev 1081)
@@ -38,15 +38,11 @@
* @subpackage Project
*/
-// GENERAL PHP SETUP
+// PHP ENCODING SETUP
+defined('APPLICATION_ENCODING') || define('APPLICATION_ENCODING', 'UTF-8');
-// Needed for strict on >= PHP 5.1.2
-if (version_compare(phpversion(), '5.1.2') > 0) {
- date_default_timezone_set('Europe/Amsterdam');
-}
+mb_internal_encoding(APPLICATION_ENCODING);
-mb_internal_encoding('UTF-8');
-
// ZEND FRAMEWORK STARTS HERE
/**
@@ -55,18 +51,13 @@
defined('APPLICATION_PATH') || define('APPLICATION_PATH', GEMS_ROOT_DIR . '/application');
/**
- * Compatibility, remove in 1.6
- */
-define('GEMS_PROJECT_PATH', APPLICATION_PATH);
-
-/**
* Set path to Zend Framework
* then to project directory
* then to Gems application directory
*/
set_include_path(
- GEMS_LIBRARY_DIR . '/classes' . PATH_SEPARATOR .
APPLICATION_PATH . '/classes' . PATH_SEPARATOR .
+ GEMS_LIBRARY_DIR . '/classes' . PATH_SEPARATOR .
get_include_path()
//. PATH_SEPARATOR . GEMS_ROOT_DIR . '/library' //Shouldn't be needed, uncomment when neccessary
);
@@ -76,10 +67,6 @@
'Gems' => GEMS_LIBRARY_DIR . '/classes'
);
-// Make sure Lazy is loaded
-// defined('MUTIL_LAZY_FUNCTIONS') || define('MUTIL_LAZY_FUNCTIONS', 1);
-require_once 'MUtil/Lazy.php';
-
// Zend_Application: loads the autoloader
require_once 'Zend/Application.php';
@@ -89,15 +76,12 @@
APPLICATION_PATH . '/configs/application.ini'
);
-// Set up autoload.
-// require_once "Zend/Loader/Autoloader.php";
+// Set up autoload (included by Zend_Application).
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->registerNamespace('MUtil_');
$autoloader->registerNamespace('Gems_');
$autoloader->registerNamespace(GEMS_PROJECT_NAME_UC . '_');
-// Zend_Date::setOptions(array('format_type' => 'php'));
-
// MUtil_Model::$verbose = true;
$application->bootstrap()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-29 19:36:50
|
Revision: 1080
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1080&view=rev
Author: matijsdejong
Date: 2012-12-29 19:36:44 +0000 (Sat, 29 Dec 2012)
Log Message:
-----------
not a tag
Removed Paths:
-------------
tags/MUtil_1.2/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-29 19:35:32
|
Revision: 1079
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1079&view=rev
Author: matijsdejong
Date: 2012-12-29 19:35:24 +0000 (Sat, 29 Dec 2012)
Log Message:
-----------
Started on 'model needs to have a function to format values'
Modified Paths:
--------------
trunk/library/classes/MUtil/Version.php
Added Paths:
-----------
trunk/library/classes/MUtil/Model/Assembler/
trunk/library/classes/MUtil/Model/Assembler/FormAssembler.php
trunk/library/classes/MUtil/Model/AssemblerAbstract.php
trunk/library/classes/MUtil/Model/AssemblerInterface.php
trunk/library/classes/MUtil/Model/Input.php
trunk/library/classes/MUtil/Model/Processor/
trunk/library/classes/MUtil/Model/Processor/ChainedProcessor.php
trunk/library/classes/MUtil/Model/Processor/Display/
trunk/library/classes/MUtil/Model/Processor/Display/FormatsProcessor.php
trunk/library/classes/MUtil/Model/Processor/Display/MultiOptionProcessor.php
trunk/library/classes/MUtil/Model/Processor/Element/
trunk/library/classes/MUtil/Model/Processor/Element/TextElementProcessor.php
trunk/library/classes/MUtil/Model/Processor/ElementProcessorAbstract.php
trunk/library/classes/MUtil/Model/ProcessorInterface.php
Added: trunk/library/classes/MUtil/Model/Assembler/FormAssembler.php
===================================================================
--- trunk/library/classes/MUtil/Model/Assembler/FormAssembler.php (rev 0)
+++ trunk/library/classes/MUtil/Model/Assembler/FormAssembler.php 2012-12-29 19:35:24 UTC (rev 1079)
@@ -0,0 +1,60 @@
+<?php
+
+/**
+ * Copyright (c) 2012, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @version $id: FormAssembler.php 203 2012-01-01t 12:51:32Z matijs $
+ */
+
+/**
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @since Class available since MUtil version 1.2
+ */
+class MUtil_Model_Assembler_FormAssembler extends MUtil_Model_AssemblerAbstract
+{
+ /**
+ * Create the processor for this name
+ *
+ * @param string $name
+ * @return MUtil_Model_ProcessorInterface or null when it does not exist
+ */
+ protected function _assemble($name)
+ {
+ return new MUtil_Model_Processor_Element_TextElementProcessor();
+ }
+
+}
Added: trunk/library/classes/MUtil/Model/AssemblerAbstract.php
===================================================================
--- trunk/library/classes/MUtil/Model/AssemblerAbstract.php (rev 0)
+++ trunk/library/classes/MUtil/Model/AssemblerAbstract.php 2012-12-29 19:35:24 UTC (rev 1079)
@@ -0,0 +1,252 @@
+<?php
+
+/**
+ * Copyright (c) 2012, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @version $id: AssemblerAbstract.php 203 2012-01-01t 12:51:32Z matijs $
+ */
+
+/**
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @since Class available since MUtil version 1.2
+ */
+abstract class MUtil_Model_AssemblerAbstract implements MUtil_Model_AssemblerInterface
+{
+ /**
+ *
+ * @var mixed
+ */
+ protected $_data = array();
+
+ /**
+ *
+ * @var MUtil_Model_ModelAbstract
+ */
+ protected $_model;
+
+ /**
+ *
+ * @var array Of name => MUtil_Model_ProcessorInterface
+ */
+ protected $_processors = array();
+
+ /**
+ *
+ * @var MUtil_Lazy_RepeatableInterface
+ */
+ protected $_repeater;
+
+ /**
+ *
+ * @var array
+ */
+ protected $_row = array();
+
+ /**
+ * Create the processor for this name
+ *
+ * @param string $name
+ * @return MUtil_Model_ProcessorInterface or null when it does not exist
+ */
+ abstract protected function _assemble($name);
+
+ /**
+ * Get the processed output of the input or a lazy object if the data is repeated
+ * or not yet set using setRepeater() or setRow().
+ *
+ * @param string $name
+ * @return mixed MUtil_Lazy_Call when not using setRow(), actual output otherwise
+ */
+ public function getOutput($name)
+ {
+ if (! $this->hasProcessor($name)) {
+ if ($this->_row) {
+ if (isset($this->_row[$name])) {
+ return $this->_row[$name];
+ }
+
+ return null;
+ }
+ // Fall through and return lazy call
+
+ } else {
+ // Assembler should be created with current values
+ $processor = $this->getProcessor($name);
+
+ if ($this->_row) {
+ $input = new MUtil_Model_Input($this->_model, $name, $this->_row);
+
+ $processor->process($input);
+
+ return $input->getOutput();
+ }
+ }
+
+ return new MUtil_Lazy_Call(array($this, 'output'), array($name));
+ }
+
+ /**
+ * Returns the processor for the name
+ *
+ * @param string $name
+ * @return MUtil_Model_ProcessorInterface or null when it does not exist
+ */
+ public function getProcessor($name)
+ {
+ if ($this->hasProcessor($name)) {
+ return $this->_processors[$name];
+ }
+ }
+
+ /**
+ * Returns true if a processor exist for $name
+ *
+ * @param string $name
+ * @return boolean
+ */
+ public function hasProcessor($name)
+ {
+ if (! array_key_exists($name, $this->_processors)) {
+ // Default if nothing there
+ $this->_processors[$name] = false;
+
+ // Try to create one
+ if ($this->_model->has($name)) {
+ if ($processor = $this->_assemble($name)) {
+ $this->setProcessor($name, $processor);
+ }
+ }
+ }
+
+ return false !== $this->_processors[$name];
+ }
+
+ /**
+ * Helper function for when using lazy output or late use of setRow()
+ *
+ * @param string $name
+ * @return mixed
+ */
+ public function output($name)
+ {
+ if ($this->_row) {
+ $data = $this->_row;
+ } else {
+ $data = $this->_repeater->__current();
+ }
+
+ if ($this->hasProcessor($name)) {
+ $processor = $this->getProcessor($name);
+
+ $input = new MUtil_Model_Input($this->_model, $name, $data);
+
+ $processor->process($input);
+
+ return $input->getOutput();
+
+ } elseif (isset($data[$name])) {
+
+ return $data[$name];
+ }
+ }
+
+ /**
+ * Set the processor for a name
+ *
+ * @param string $name
+ * $param MUtil_Model_ProcessorInterface $processor
+ * @return MUtil_Model_AssemblerInterface (continuation pattern)
+ */
+ public function setProcessor($name, MUtil_Model_ProcessorInterface $processor)
+ {
+ $this->_processors[$name] = $processor;
+
+ return $this;
+ }
+
+ /**
+ * Set the model of this assembler
+ *
+ * @param MUtil_Model_ModelAbstract $model
+ * @return MUtil_Model_AssemblerInterface (continuation pattern)
+ */
+ public function setModel(MUtil_Model_ModelAbstract $model)
+ {
+ $this->_model = $model;
+
+ return $this;
+ }
+
+ /**
+ * Use this method when you want to repeat the output for each row when rendering.
+ *
+ * The assembler does not itself loop through the multiple rows, for that to happen
+ * you need to place the outputs of the gets on something that has the same repeater
+ * and does repeat it, e.g. an MUtil_Html object.
+ *
+ * Either setRepeater() or setRow() should be set. setRow() is dominant.
+ *
+ * @param mixed $repeater MUtil_Lazy_RepeatableInterface or something that can be made into one.
+ * @return MUtil_Model_AssemblerInterface (continuation pattern)
+ */
+ public function setRepeater($repeater)
+ {
+ if ($repeater instanceof MUtil_Lazy_RepeatableInterface) {
+ $this->_repeater = $repeater;
+ } else {
+ $this->_repeater = new MUtil_Lazy_Repeatable($repeater);
+ }
+
+ return $this;
+ }
+
+ /**
+ * Use this method when using a single row of input, i.e. do nothing lazy
+ * and just draw the current row.
+ *
+ * Either setRepeater() or setRow() should be set. setRow() is dominant.
+ *
+ * @param array $data An array with data.
+ * @return MUtil_Model_AssemblerInterface (continuation pattern)
+ */
+ public function setRow(array $data)
+ {
+ $this->_row = $data;
+
+ return $this;
+ }
+}
Added: trunk/library/classes/MUtil/Model/AssemblerInterface.php
===================================================================
--- trunk/library/classes/MUtil/Model/AssemblerInterface.php (rev 0)
+++ trunk/library/classes/MUtil/Model/AssemblerInterface.php 2012-12-29 19:35:24 UTC (rev 1079)
@@ -0,0 +1,115 @@
+<?php
+
+/**
+ * Copyright (c) 2012, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @version $id: AssemblerInterface.php 203 2012-01-01t 12:51:32Z matijs $
+ */
+
+/**
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @since Class available since MUtil version 1.2
+ */
+interface MUtil_Model_AssemblerInterface
+{
+ /**
+ * Get the processed output of the input or a lazy object if the data is repeated
+ * or not yet set using setRepeater() or setRow().
+ *
+ * @param string $name
+ * @return mixed MUtil_Lazy_Call when not using setRow(), actual output otherwise
+ */
+ public function getOutput($name);
+
+ /**
+ * Returns the processor for the name
+ *
+ * @param string $name
+ * @return MUtil_Model_ProcessorInterface or null when it does not exist
+ */
+ public function getProcessor($name);
+
+ /**
+ * Returns true if a processor exist for $name
+ *
+ * @param string $name
+ * @return boolean
+ */
+ public function hasProcessor($name);
+
+ /**
+ * Set the model of this assembler
+ *
+ * @param MUtil_Model_ModelAbstract $model
+ * @return MUtil_Model_AssemblerInterface
+ */
+ public function setModel(MUtil_Model_ModelAbstract $model);
+
+ /**
+ * Set the processor for a name
+ *
+ * @param string $name
+ * $param MUtil_Model_ProcessorInterface $processor
+ * @return MUtil_Model_AssemblerInterface (continuation pattern)
+ */
+ public function setProcessor($name, MUtil_Model_ProcessorInterface $processor);
+
+ /**
+ * Use this method when you want to repeat the output for each row when rendering.
+ *
+ * The assembler does not itself loop through the multiple rows, for that to happen
+ * you need to place the outputs of the gets on something that has the same repeater
+ * and does repeat it, e.g. an MUtil_Html object.
+ *
+ * Either setRepeater() or setRow() should be set. setRow() is dominant.
+ *
+ * @param mixed $repeater MUtil_Lazy_RepeatableInterface or something that can be made into one.
+ * @return MUtil_Model_AssemblerInterface (continuation pattern)
+ */
+ public function setRepeater($repeater);
+
+ /**
+ * Use this method when using a single row of input, i.e. do nothing lazy
+ * and just draw the current row.
+ *
+ * Either setRepeater() or setRow() should be set. setRow() is dominant.
+ *
+ * @param array $data An array with data.
+ * @return MUtil_Model_AssemblerInterface (continuation pattern)
+ */
+ public function setRow(array $data);
+}
Added: trunk/library/classes/MUtil/Model/Input.php
===================================================================
--- trunk/library/classes/MUtil/Model/Input.php (rev 0)
+++ trunk/library/classes/MUtil/Model/Input.php 2012-12-29 19:35:24 UTC (rev 1079)
@@ -0,0 +1,253 @@
+<?php
+
+/**
+ * Copyright (c) 2012, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @version $id: Crop.php 203 2012-01-01t 12:51:32Z matijs $
+ */
+
+/**
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @since Class available since MUtil version 1.2
+ */
+class MUtil_Model_Input
+{
+ /**
+ * The data incuding $this->_context[$this->_name]
+ *
+ * @var array
+ */
+ protected $_context;
+
+ /**
+ *
+ * @var MUtil_Model_ModelAbstract
+ */
+ protected $_model;
+
+ /**
+ * The name of the item being garvested
+ *
+ * @var string
+ */
+ protected $_name;
+
+ /**
+ *
+ * @var array
+ */
+ protected $_options;
+
+ /**
+ * The original begin value
+ *
+ * @var mixed
+ */
+ protected $_origValue;
+
+ /**
+ * The current output result
+ *
+ * @var mixed
+ */
+ protected $_output;
+
+ /**
+ *
+ * @param MUtil_Model_ModelAbstract $model The model used
+ * @param string $name The item being cropped
+ * @param array $context The current data
+ */
+ public function __construct(MUtil_Model_ModelAbstract $model, $name, array $context = array())
+ {
+ // Should always exist
+ if (! array_key_exists($name, $context)) {
+ $content[$name] = null;
+ }
+
+ $this->_context = $context;
+ $this->_model = $model;
+ $this->_name = $name;
+ $this->_options = $model->get($name);
+ $this->_origValue = $context[$name];
+ $this->_output = $this->_origValue;
+ }
+
+ /**
+ * Returns a context item or the whole context array when no name
+ * is given.
+ *
+ * @param string $name Optional name of context item
+ * @return mixed
+ */
+ public function getContext($name = null)
+ {
+ if (null === $name) {
+ return $this->_context;
+ }
+
+ if (array_key_exists($name, $this->_context)) {
+ return $this->_context[$name];
+ }
+ }
+
+ /**
+ *
+ * @return string The name of the current item
+ */
+ public function getName()
+ {
+ return $this->_name;
+ }
+
+ /**
+ * Return a single option value
+ *
+ * @param string $name The name of an option item
+ * @return mixed
+ */
+ public function getOption($name)
+ {
+ if (array_key_exists($name, $this->_options)) {
+ return $this->_options[$name];
+ }
+ }
+
+ /**
+ * Return all options
+ *
+ * @return array
+ */
+ public function getOptions()
+ {
+ return $this->_options;
+ }
+
+ /**
+ * Return the original value
+ *
+ * @return mixed
+ */
+ public function getOriginalValue()
+ {
+ return $this->_origValue;
+ }
+
+ /**
+ * Return the current output
+ *
+ * @return mixed
+ */
+ public function getOutput()
+ {
+ return $this->_output;
+ }
+
+ /**
+ * Set a context item or replace the whole context array when an array is passed.
+ *
+ * @param mixed $nameOrArray The name of context item to set or an array containing a new context
+ * @param mixed $value The value to set
+ * @return MUtil_Model_Crop (continuation pattern)
+ */
+ public function setContext($nameOrArray, $value = null)
+ {
+ if (is_array($nameOrArray)) {
+ $this->_context = $nameOrArray;
+ } else {
+ $this->_context[$nameOrArray] = $value;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Set an option item.
+ *
+ * @param mixed $name The name of option item to set
+ * @param mixed $value The value to set
+ * @return MUtil_Model_Crop (continuation pattern)
+ */
+ public function setOption($name, $value = null)
+ {
+ // If $key end with ] it is array value
+ if (substr($name, -1) == ']') {
+ if (substr($name, -2) == '[]') {
+ // If $name ends with [], append it to array
+ $name = substr($name, 0, -2);
+ $this->_options[$name][] = $value;
+ } else {
+ // Otherwise extract subkey
+ $pos = strpos($name, '[');
+ $subkey = substr($name, $pos + 1, -1);
+ $name = substr($name, 0, $pos);
+
+ $this->_options[$name][$subkey] = $value;
+ }
+ } else {
+ $this->_options[$name] = $value;
+ }
+
+ return $this;
+ }
+
+ /**
+ * Set a context item or replace the whole context array when an array is passed.
+ *
+ * @param array $options An array containing a new options
+ * @return MUtil_Model_Crop (continuation pattern)
+ */
+ public function setOptions(array $options)
+ {
+ $this->_options = $options;
+
+ return $this;
+ }
+
+ /**
+ * The output result value of this crop item
+ *
+ * @param mixed $output The new output result
+ * @return MUtil_Model_Crop (continuation pattern)
+ */
+ public function setOutput($output)
+ {
+ $this->_output = $output;
+
+ return $this;
+ }
+}
Added: trunk/library/classes/MUtil/Model/Processor/ChainedProcessor.php
===================================================================
--- trunk/library/classes/MUtil/Model/Processor/ChainedProcessor.php (rev 0)
+++ trunk/library/classes/MUtil/Model/Processor/ChainedProcessor.php 2012-12-29 19:35:24 UTC (rev 1079)
@@ -0,0 +1,83 @@
+<?php
+
+/**
+ * Copyright (c) 2012, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @version $id: ChainedProcessor.php 203 2012-01-01t 12:51:32Z matijs $
+ */
+
+/**
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @since Class available since MUtil version 1.2
+ */
+class MUtil_Model_Processor_ChainedProcessor implements MUtil_Model_ProcessorInterface
+{
+ /**
+ *
+ * @var array Of MUtil_Model_ProcessorInterface
+ */
+ protected $_processors;
+
+ /**
+ *
+ * @param array $processors Of MUtil_Model_ProcessorInterface
+ */
+ public function __construct(array $processors)
+ {
+ foreach ($processors as $processor) {
+ if ($processor instanceof MUtil_Model_ProcessorInterface) {
+ throw new MUtil_Model_ModelException(
+ 'Each processor must be an instance of MUtil_Model_ProcessorInterface'
+ );
+ }
+ }
+
+ $this->_processors = $processors;
+ }
+
+ /**
+ * Processes the input, changing e.g. the result, context or options
+ *
+ * @param MUtil_Model_Input $input
+ */
+ public function process(MUtil_Model_Input $input)
+ {
+ foreach ($this->_processors as $processor) {
+ $processor->process($input);
+ }
+ }
+}
Added: trunk/library/classes/MUtil/Model/Processor/Display/FormatsProcessor.php
===================================================================
--- trunk/library/classes/MUtil/Model/Processor/Display/FormatsProcessor.php (rev 0)
+++ trunk/library/classes/MUtil/Model/Processor/Display/FormatsProcessor.php 2012-12-29 19:35:24 UTC (rev 1079)
@@ -0,0 +1,75 @@
+<?php
+
+/**
+ * Copyright (c) 2012, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @version $id: MultiOptionValueProcessor.php 203 2012-01-01t 12:51:32Z matijs $
+ */
+
+/**
+ * Apply the formatFunction or dateFormat formats instead of the original value
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @since Class available since MUtil version 1.2
+ */
+class MUtil_Model_Processor_Display_FormatsProcessor implements MUtil_Model_ProcessorInterface
+{
+ /**
+ * Processes the input, changing e.g. the result, context or options
+ *
+ * @param MUtil_Model_Input $input
+ * @return void
+ */
+ public function process(MUtil_Model_Input $input)
+ {
+ $value = $input->getResult();
+ $result = false;
+
+ if ($function = $input->getOption('formatFunction')) {
+ $result = $function($value);
+
+ } elseif ($format = $input->getOption('dateFormat')) {
+ if (is_callable($format)) {
+ $result = $format($value);
+ } else {
+ $result = MUtil_Date::format($value, $format, $input->getOption('storageFormat'));
+ }
+ }
+
+ if ($result) {
+ $input->setOutput($result);
+ }
+ }
+}
Added: trunk/library/classes/MUtil/Model/Processor/Display/MultiOptionProcessor.php
===================================================================
--- trunk/library/classes/MUtil/Model/Processor/Display/MultiOptionProcessor.php (rev 0)
+++ trunk/library/classes/MUtil/Model/Processor/Display/MultiOptionProcessor.php 2012-12-29 19:35:24 UTC (rev 1079)
@@ -0,0 +1,65 @@
+<?php
+
+/**
+ * Copyright (c) 2012, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @version $id: MultiOptionValueProcessor.php 203 2012-01-01t 12:51:32Z matijs $
+ */
+
+/**
+ * Display the multi option text instead of the original value
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @since Class available since MUtil version 1.2
+ */
+class MUtil_Model_Processor_Display_MultiOptionProcessor implements MUtil_Model_ProcessorInterface
+{
+ /**
+ * Processes the input, changing e.g. the result, context or options
+ *
+ * @param MUtil_Model_Input $input
+ * @return void
+ */
+ public function process(MUtil_Model_Input $input)
+ {
+ if ($multi = $input->getOption('multiOptions')) {
+
+ $value = $input->getResult();
+ if (isset($multi[$value])) {
+ $input->setOutput($multi[$value]);
+ }
+ }
+ }
+}
Added: trunk/library/classes/MUtil/Model/Processor/Element/TextElementProcessor.php
===================================================================
--- trunk/library/classes/MUtil/Model/Processor/Element/TextElementProcessor.php (rev 0)
+++ trunk/library/classes/MUtil/Model/Processor/Element/TextElementProcessor.php 2012-12-29 19:35:24 UTC (rev 1079)
@@ -0,0 +1,77 @@
+<?php
+
+/**
+ * Copyright (c) 2012, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @version $id: DateProcessor.php 203 2012-01-01t 12:51:32Z matijs $
+ */
+
+/**
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @since Class available since MUtil version 1.2
+ */
+class MUtil_Model_Processor_Element_TextElementProcessor extends MUtil_Model_Processor_ElementProcessorAbstract
+{
+ /**
+ * Allow use textbox specific options
+ *
+ * @var boolean
+ */
+ protected $useTextOptions = true;
+
+ /**
+ * Processes the input, changing e.g. the result, context or options
+ *
+ * @param MUtil_Model_Input $input
+ * @return void
+ */
+ public function process(MUtil_Model_Input $input)
+ {
+ $options = $this->getFilteredOptions($input);
+
+ $stringLengthValidator = $this->getStringLengthValidator($options);
+
+ if ($stringLengthValidator) {
+ $input->setOption('validators[]', $stringLengthValidator);
+ }
+
+ $this->applyElement(
+ $input,
+ new Zend_Form_Element_Text($input->getName(), $options)
+ );
+ }
+}
Added: trunk/library/classes/MUtil/Model/Processor/ElementProcessorAbstract.php
===================================================================
--- trunk/library/classes/MUtil/Model/Processor/ElementProcessorAbstract.php (rev 0)
+++ trunk/library/classes/MUtil/Model/Processor/ElementProcessorAbstract.php 2012-12-29 19:35:24 UTC (rev 1079)
@@ -0,0 +1,181 @@
+<?php
+
+/**
+ * Copyright (c) 2012, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @version $id: ElementProcessorAbstract.php 203 2012-01-01t 12:51:32Z matijs $
+ */
+
+/**
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @since Class available since MUtil version 1.2
+ */
+abstract class MUtil_Model_Processor_ElementProcessorAbstract implements MUtil_Model_ProcessorInterface
+{
+ /**
+ * When no size is set for a text-element, the size will be set to the minimum of the
+ * maxsize and this value.
+ *
+ * @var int
+ */
+ protected $defaultTextLength = 40;
+
+ /**
+ * Allow use of general display options
+ *
+ * @var boolean
+ */
+ protected $useDisplayOptions = true;
+
+ /**
+ * Allow use textbox specific options
+ *
+ * @var boolean
+ */
+ protected $useTextOptions = false;
+
+ /**
+ * Apply the standard processing needed and set the element as the output
+ *
+ * @param MUtil_Model_Input $input
+ * @param Zend_Form_Element $element
+ */
+ protected function applyElement(MUtil_Model_Input $input, Zend_Form_Element $element)
+ {
+ if ($value = $input->getOutput()) {
+ $element->setValue($value);
+ }
+
+ $input->setOutput($element);
+ }
+
+ /**
+ * Nested array of allowed option names
+ *
+ * @return array
+ */
+ protected function getAllowedOptionsNames()
+ {
+ $options = array();
+
+ if ($this->useDisplayOptions) {
+ $options[] = array(
+ 'accesskey',
+ 'autoInsertNotEmptyValidator',
+ 'class',
+ 'disabled',
+ 'description',
+ 'escape',
+ 'label',
+ 'onclick',
+ 'readonly',
+ 'required',
+ 'tabindex',
+ 'value',
+ 'showLabels',
+ 'labelplacement',
+ );
+ }
+
+ if ($this->useTextOptions) {
+ $options[] = array(
+ 'maxlength',
+ 'minlength',
+ 'onchange',
+ 'onfocus',
+ 'onselect',
+ 'size');
+ }
+ /*
+ self::CHECK_OPTIONS => array('checkedValue', 'uncheckedValue'),
+ self::DATE_OPTIONS => array('dateFormat', 'storageFormat'),
+ self::EXHIBIT_OPTIONS => array('formatFunction'),
+ self::FILE_OPTIONS => array('accept', 'count', 'destination', 'valueDisabled'),
+ self::GROUP_OPTIONS => array('elements', 'legend', 'separator'),
+ self::JQUERY_OPTIONS => array('jQueryParams'),
+ self::MULTI_OPTIONS => array('disable', 'multiOptions', 'onchange', 'separator', 'size', 'disableTranslator'),
+ self::PASSWORD_OPTIONS => array('repeatLabel'),
+ self::TAB_OPTIONS => array('value'),
+ self::TEXTAREA_OPTIONS => array('cols', 'rows', 'wrap'),
+ //*/
+
+ return $options;
+ }
+
+ /**
+ * Get those options that are actually allowed to be used by this element
+ *
+ * @param MUtil_Model_Input $input
+ * @return array
+ */
+ protected function getFilteredOptions(MUtil_Model_Input $input)
+ {
+ $allowedOptions = MUtil_Ra::flatten($this->getAllowedOptionsNames());
+
+ $options = $input->getOptions();
+
+ return array_intersect_key($options, array_flip($allowedOptions));
+ }
+
+ /**
+ * Create a StringLength validator (array) and remove those
+ * options that should not appear in the output.
+ *
+ * @param array $options
+ * @return array For validator creation
+ */
+ protected function getStringLengthValidator(array &$options)
+ {
+ if (isset($options['minlength'])) {
+ $stringlength['min'] = $options['minlength'];
+ unset($options['minlength']);
+ }
+ if (isset($options['size']) && (! isset($options['maxlength']))) {
+ $options['maxlength'] = $options['size'];
+ }
+ if (isset($options['maxlength'])) {
+ if (! isset($options['size'])) {
+ $options['size'] = min($options['maxlength'], $this->defaultTextLength);
+ }
+ $stringlength['max'] = $options['maxlength'];
+ }
+
+ if (isset($stringlength)) {
+ return array('StringLength', true, $stringlength);
+ }
+ }
+}
Added: trunk/library/classes/MUtil/Model/ProcessorInterface.php
===================================================================
--- trunk/library/classes/MUtil/Model/ProcessorInterface.php (rev 0)
+++ trunk/library/classes/MUtil/Model/ProcessorInterface.php 2012-12-29 19:35:24 UTC (rev 1079)
@@ -0,0 +1,55 @@
+<?php
+
+/**
+ * Copyright (c) 2012, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @version $id: ProcessorInterface.php 203 2012-01-01t 12:51:32Z matijs $
+ */
+
+/**
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @since Class available since MUtil version 1.2
+ */
+interface MUtil_Model_ProcessorInterface
+{
+ /**
+ * Processes the input, changing e.g. the result, context or options
+ *
+ * @param MUtil_Model_Input $input
+ */
+ public function process(MUtil_Model_Input $input);
+}
Modified: trunk/library/classes/MUtil/Version.php
===================================================================
--- trunk/library/classes/MUtil/Version.php 2012-12-29 19:32:02 UTC (rev 1078)
+++ trunk/library/classes/MUtil/Version.php 2012-12-29 19:35:24 UTC (rev 1079)
@@ -47,8 +47,8 @@
class MUtil_Version
{
const MAJOR = 1;
- const MINOR = 1;
- const BUILD = 36;
+ const MINOR = 2;
+ const BUILD = 40;
public static function get()
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-29 19:32:12
|
Revision: 1078
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1078&view=rev
Author: matijsdejong
Date: 2012-12-29 19:32:02 +0000 (Sat, 29 Dec 2012)
Log Message:
-----------
Modified Paths:
--------------
tags/MUtil_1.2/Version.php
Added Paths:
-----------
tags/MUtil_1.2/
tags/MUtil_1.2/Html/Creator.php
tags/MUtil_1.2/Html/Renderer.php
tags/MUtil_1.2/Model/TableModel.php
tags/MUtil_1.2/Util/ClassList.php
tags/MUtil_1.2/Util/FunctionList.php
tags/MUtil_1.2/Util/LookupList.php
Removed Paths:
-------------
tags/MUtil_1.2/Html/Creator.php
tags/MUtil_1.2/Html/Renderer.php
tags/MUtil_1.2/Model/TableModel.php
tags/MUtil_1.2/Util/ClassList.php
tags/MUtil_1.2/Util/FunctionList.php
tags/MUtil_1.2/Util/LookupList.php
Property changes on: tags/MUtil_1.2
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/1.5.0-pulse/library/classes/MUtil:306-344,346,467
/branches/1.5.x/library/classes/MUtil:426-455,458-472,475-481
/branches/newUser/classes/MUtil:113-150
/branches/newUser2/classes/MUtil:175-207
/branches/receptioncodes/library/classes/MUtil:1053-1054
/branches/userloader/classes/MUtil:259-324
/tags/1.5.0beta1/library/classes/MUtil:305
/tags/1.5.1/library/classes/MUtil:485,489,509-510,534
/tags/1.5.3-rc2/library/classes/MUtil:612,614,616,618
/tags/1.5.6-pulse20121012/library/classes/MUtil:986
Deleted: tags/MUtil_1.2/Html/Creator.php
===================================================================
--- trunk/library/classes/MUtil/Html/Creator.php 2012-12-27 14:35:57 UTC (rev 1073)
+++ tags/MUtil_1.2/Html/Creator.php 2012-12-29 19:32:02 UTC (rev 1078)
@@ -1,236 +0,0 @@
-<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @package MUtil
- * @subpackage Html
- * @author Matijs de Jong <mj...@ma...>
- * @copyright Copyright (c) 2011 Erasmus MC
- * @license New BSD License
- * @version $id: Creator.php 362 2011-12-15 17:21:17Z matijsdejong $
- */
-
-/**
- * Class for storing references for creating html attributes, elements and other objects.
- *
- * Basically this class stores list of element and attributes names that should be treated
- * in different from just creating the most basic of element types.
- *
- * @package MUtil
- * @subpackage Html
- * @copyright Copyright (c) 2011 Erasmus MC
- * @license New BSD License
- * @since Class available since version 1.0
- */
-
-class MUtil_Html_Creator
-{
- /**
- *
- * @var MUtil_Util_LookupList
- */
- protected $_attributeFunctionList;
-
- /**
- *
- * @var MUtil_Util_LookupList
- */
- protected $_elementFunctionList;
-
- /**
- *
- * @var array
- */
- protected $_initialAttributeFunctions = array(
- 'href' => 'MUtil_Html_HrefArrayAttribute::hrefAttribute',
- 'onclick' => 'MUtil_Html_OnClickArrayAttribute::onclickAttribute',
- 'src' => 'MUtil_Html_SrcArrayAttribute::srcAttribute',
- 'style' => 'MUtil_Html_StyleArrayAttribute::styleAttribute',
- );
-
- /**
- *
- * @var array
- */
- protected $_initalElementFunctions = array(
- 'a' => 'MUtil_Html_AElement::a',
- 'array' => 'MUtil_Html_Sequence::createSequence',
- 'call' => 'MUtil_Lazy::call',
- 'col' => 'MUtil_Html_ColElement::col',
- 'colgroup' => 'MUtil_Html_ColGroupElement::colgroup',
- 'dir' => 'MUtil_Html_ListElement::dir',
- 'dd' => 'MUtil_Html_DdElement::dd',
- 'dl' => 'MUtil_Html_DlElement::dl',
- 'dt' => 'MUtil_Html_DtElement::dt',
- 'echo' => 'MUtil_Html_TableElement::createVar',
- 'email' => 'MUtil_Html_AElement::email',
- 'h1' => 'MUtil_Html_HnElement::h1',
- 'h2' => 'MUtil_Html_HnElement::h2',
- 'h3' => 'MUtil_Html_HnElement::h3',
- 'h4' => 'MUtil_Html_HnElement::h4',
- 'h5' => 'MUtil_Html_HnElement::h5',
- 'h6' => 'MUtil_Html_HnElement::h6',
- 'if' => 'MUtil_Lazy::iff',
- 'iflink' => 'MUtil_Html_AElement::iflink',
- 'ifmail' => 'MUtil_Html_AElement::ifmail',
- 'iframe' => 'MUtil_Html_IFrameElement::iFrame',
- 'img' => 'MUtil_Html_ImgElement::img',
- 'image' => 'MUtil_Html_ImgElement::img',
- 'input' => 'MUtil_Html_InputRenderer::input',
- 'inputComplete' => 'MUtil_Html_InputRenderer::inputComplete',
- 'inputDescription' => 'MUtil_Html_InputRenderer::inputDescription',
- 'inputDisplayGroup' => 'MUtil_Html_InputRenderer::inputDisplayGroup',
- 'inputElement' => 'MUtil_Html_InputRenderer::inputElement',
- 'inputErrors' => 'MUtil_Html_InputRenderer::inputErrors',
- 'inputExcept' => 'MUtil_Html_InputRenderer::inputExcept',
- 'inputForm' => 'MUtil_Html_InputRenderer::inputForm',
- 'inputLabel' => 'MUtil_Html_LabelElement::label',
- 'inputOnly' => 'MUtil_Html_InputRenderer::inputOnly',
- 'inputOnlyArray' => 'MUtil_Html_InputRenderer::inputOnlyArray',
- 'inputUntil' => 'MUtil_Html_InputRenderer::inputUntil',
- 'inputUpto' => 'MUtil_Html_InputRenderer::inputUpto',
- 'label' => 'MUtil_Html_LabelElement::label',
- 'menu' => 'MUtil_Html_ListElement::menu',
- 'ol' => 'MUtil_Html_ListElement::ol',
- 'pagePanel' => 'MUtil_Html_PagePanel::pagePanel',
- 'pForm' => 'MUtil_Html_PFormElement::pForm',
- 'progress' => 'MUtil_Html_ProgressPanel::progress',
- 'progressPanel' => 'MUtil_Html_ProgressPanel::progress',
- 'raw' => 'MUtil_Html_Raw::raw',
- 'seq' => 'MUtil_Html_Sequence::createSequence',
- 'sequence' => 'MUtil_Html_Sequence::createSequence', // A sequence can contain another sequence, so other function name used
- 'snippet' => 'MUtil_Html::snippet',
- 'spaced' => 'MUtil_Html_Sequence::createSpaced', // A sequence can contain another sequence, so other function name used
- 'table' => 'MUtil_Html_TableElement::table',
- 'tbody' => 'MUtil_Html_TBodyElement::tbody',
- 'tfoot' => 'MUtil_Html_TBodyElement::tfoot',
- 'thead' => 'MUtil_Html_TBodyElement::thead',
- 'tr' => 'MUtil_Html_TrElement::tr',
- 'ul' => 'MUtil_Html_ListElement::ul',
- );
-
- public function __call($name, array $arguments)
- {
- return $this->create($name, $arguments);
- }
-
- public function __construct($elementFunctions = null, $attributeFunctions = null, $append = true)
- {
- $this->setElementFunctionList($elementFunctions, $append);
- $this->setAttributeFunctionList($attributeFunctions, $append);
- }
-
- public function addAttributeFunction($name_1, $function_1, $name_n = null, $function_n = null)
- {
- $args = MUtil_Ra::pairs(func_get_args());
-
- return $this->setAttributeFunctionList($args, true);
- }
-
- public function addElementFunction($name_1, $function_1, $name_n = null, $function_n = null)
- {
- $args = MUtil_Ra::pairs(func_get_args());
-
- $this->setElementFunctionList($args, true);
-
- return $this;
- }
-
- public function create($tagName, array $args = array())
- {
- if ($function = $this->_elementFunctionList->get($tagName)) {
- return call_user_func_array($function, $args);
-
- } else {
- return new MUtil_Html_HtmlElement($tagName, $args);
- }
- }
-
- public function createAttribute($attributeName, array $args = array())
- {
- if ($function = $this->_attributeFunctionList->get($attributeName)) {
- return call_user_func($function, $args);
-
- } else {
- return new MUtil_Html_ArrayAttribute($attributeName, $args);
-
- }
- }
-
- public function createRaw($tagName, array $args = array())
- {
- return new MUtil_Html_HtmlElement($tagName, $args);
- }
-
- public function getAttributeFunctionList()
- {
- return $this->_attributeFunctionList;
- }
-
- public function getElementFunctionList()
- {
- return $this->_elementFunctionList;
- }
-
- public function setAttributeFunctionList($attributeFunctions, $append = false)
- {
- if ($attributeFunctions instanceof MUtil_Util_LookupList) {
- $this->_attributeFunctionList = $attributeFunctions;
- } else {
- $this->_attributeFunctionList = new MUtil_Util_FunctionList($this->_initialAttributeFunctions);
-
- if ($attributeFunctions) {
- if ($append) {
- $this->_attributeFunctionList->add((array) $attributeFunctions);
- } else {
- $this->_attributeFunctionList->set((array) $attributeFunctions);
- }
- }
- }
- return $this;
- }
-
- public function setElementFunctionList($elementFunctions, $append = false)
- {
- if ($elementFunctions instanceof MUtil_Util_LookupList) {
- $this->_elementFunctionList = $elementFunctions;
- } else {
- if (! $this->_elementFunctionList instanceof MUtil_Util_FunctionList) {
- $this->_elementFunctionList = new MUtil_Util_FunctionList($this->_initalElementFunctions);
- }
-
- if ($elementFunctions) {
- if ($append) {
- $this->_elementFunctionList->add((array) $elementFunctions);
- } else {
- $this->_elementFunctionList->set((array) $elementFunctions);
- }
- }
- }
- return $this;
- }
-}
Copied: tags/MUtil_1.2/Html/Creator.php (from rev 1074, trunk/library/classes/MUtil/Html/Creator.php)
===================================================================
--- tags/MUtil_1.2/Html/Creator.php (rev 0)
+++ tags/MUtil_1.2/Html/Creator.php 2012-12-29 19:32:02 UTC (rev 1078)
@@ -0,0 +1,237 @@
+<?php
+
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @package MUtil
+ * @subpackage Html
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $id: Creator.php 362 2011-12-15 17:21:17Z matijsdejong $
+ */
+
+/**
+ * Class for storing references for creating html attributes, elements and other objects.
+ *
+ * Basically this class stores list of element and attributes names that should be treated
+ * in different from just creating the most basic of element types.
+ *
+ * @package MUtil
+ * @subpackage Html
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.0
+ */
+
+class MUtil_Html_Creator
+{
+ /**
+ *
+ * @var MUtil_Util_LookupList
+ */
+ protected $_attributeFunctionList;
+
+ /**
+ *
+ * @var MUtil_Util_LookupList
+ */
+ protected $_elementFunctionList;
+
+ /**
+ *
+ * @var array
+ */
+ protected $_initialAttributeFunctions = array(
+ 'href' => 'MUtil_Html_HrefArrayAttribute::hrefAttribute',
+ 'onclick' => 'MUtil_Html_OnClickArrayAttribute::onclickAttribute',
+ 'src' => 'MUtil_Html_SrcArrayAttribute::srcAttribute',
+ 'style' => 'MUtil_Html_StyleArrayAttribute::styleAttribute',
+ );
+
+ /**
+ *
+ * @var array
+ */
+ protected $_initalElementFunctions = array(
+ 'a' => 'MUtil_Html_AElement::a',
+ 'array' => 'MUtil_Html_Sequence::createSequence',
+ 'call' => 'MUtil_Lazy::call',
+ 'col' => 'MUtil_Html_ColElement::col',
+ 'colgroup' => 'MUtil_Html_ColGroupElement::colgroup',
+ 'dir' => 'MUtil_Html_ListElement::dir',
+ 'dd' => 'MUtil_Html_DdElement::dd',
+ 'dl' => 'MUtil_Html_DlElement::dl',
+ 'dt' => 'MUtil_Html_DtElement::dt',
+ 'echo' => 'MUtil_Html_TableElement::createVar',
+ 'email' => 'MUtil_Html_AElement::email',
+ 'h1' => 'MUtil_Html_HnElement::h1',
+ 'h2' => 'MUtil_Html_HnElement::h2',
+ 'h3' => 'MUtil_Html_HnElement::h3',
+ 'h4' => 'MUtil_Html_HnElement::h4',
+ 'h5' => 'MUtil_Html_HnElement::h5',
+ 'h6' => 'MUtil_Html_HnElement::h6',
+ 'if' => 'MUtil_Lazy::iff',
+ 'iflink' => 'MUtil_Html_AElement::iflink',
+ 'ifmail' => 'MUtil_Html_AElement::ifmail',
+ 'iframe' => 'MUtil_Html_IFrameElement::iFrame',
+ 'img' => 'MUtil_Html_ImgElement::img',
+ 'image' => 'MUtil_Html_ImgElement::img',
+ 'input' => 'MUtil_Html_InputRenderer::input',
+ 'inputComplete' => 'MUtil_Html_InputRenderer::inputComplete',
+ 'inputDescription' => 'MUtil_Html_InputRenderer::inputDescription',
+ 'inputDisplayGroup' => 'MUtil_Html_InputRenderer::inputDisplayGroup',
+ 'inputElement' => 'MUtil_Html_InputRenderer::inputElement',
+ 'inputErrors' => 'MUtil_Html_InputRenderer::inputErrors',
+ 'inputExcept' => 'MUtil_Html_InputRenderer::inputExcept',
+ 'inputForm' => 'MUtil_Html_InputRenderer::inputForm',
+ 'inputLabel' => 'MUtil_Html_LabelElement::label',
+ 'inputOnly' => 'MUtil_Html_InputRenderer::inputOnly',
+ 'inputOnlyArray' => 'MUtil_Html_InputRenderer::inputOnlyArray',
+ 'inputUntil' => 'MUtil_Html_InputRenderer::inputUntil',
+ 'inputUpto' => 'MUtil_Html_InputRenderer::inputUpto',
+ 'label' => 'MUtil_Html_LabelElement::label',
+ 'menu' => 'MUtil_Html_ListElement::menu',
+ 'ol' => 'MUtil_Html_ListElement::ol',
+ 'pagePanel' => 'MUtil_Html_PagePanel::pagePanel',
+ 'pForm' => 'MUtil_Html_PFormElement::pForm',
+ 'progress' => 'MUtil_Html_ProgressPanel::progress',
+ 'progressPanel' => 'MUtil_Html_ProgressPanel::progress',
+ 'raw' => 'MUtil_Html_Raw::raw',
+ 'seq' => 'MUtil_Html_Sequence::createSequence',
+ 'sequence' => 'MUtil_Html_Sequence::createSequence', // A sequence can contain another sequence, so other function name used
+ 'snippet' => 'MUtil_Html::snippet',
+ 'sprintf' => 'sprintf',
+ 'spaced' => 'MUtil_Html_Sequence::createSpaced', // A sequence can contain another sequence, so other function name used
+ 'table' => 'MUtil_Html_TableElement::table',
+ 'tbody' => 'MUtil_Html_TBodyElement::tbody',
+ 'tfoot' => 'MUtil_Html_TBodyElement::tfoot',
+ 'thead' => 'MUtil_Html_TBodyElement::thead',
+ 'tr' => 'MUtil_Html_TrElement::tr',
+ 'ul' => 'MUtil_Html_ListElement::ul',
+ );
+
+ public function __call($name, array $arguments)
+ {
+ return $this->create($name, $arguments);
+ }
+
+ public function __construct($elementFunctions = null, $attributeFunctions = null, $append = true)
+ {
+ $this->setElementFunctionList($elementFunctions, $append);
+ $this->setAttributeFunctionList($attributeFunctions, $append);
+ }
+
+ public function addAttributeFunction($name_1, $function_1, $name_n = null, $function_n = null)
+ {
+ $args = MUtil_Ra::pairs(func_get_args());
+
+ return $this->setAttributeFunctionList($args, true);
+ }
+
+ public function addElementFunction($name_1, $function_1, $name_n = null, $function_n = null)
+ {
+ $args = MUtil_Ra::pairs(func_get_args());
+
+ $this->setElementFunctionList($args, true);
+
+ return $this;
+ }
+
+ public function create($tagName, array $args = array())
+ {
+ if ($function = $this->_elementFunctionList->get($tagName)) {
+ return call_user_func_array($function, $args);
+
+ } else {
+ return new MUtil_Html_HtmlElement($tagName, $args);
+ }
+ }
+
+ public function createAttribute($attributeName, array $args = array())
+ {
+ if ($function = $this->_attributeFunctionList->get($attributeName)) {
+ return call_user_func($function, $args);
+
+ } else {
+ return new MUtil_Html_ArrayAttribute($attributeName, $args);
+
+ }
+ }
+
+ public function createRaw($tagName, array $args = array())
+ {
+ return new MUtil_Html_HtmlElement($tagName, $args);
+ }
+
+ public function getAttributeFunctionList()
+ {
+ return $this->_attributeFunctionList;
+ }
+
+ public function getElementFunctionList()
+ {
+ return $this->_elementFunctionList;
+ }
+
+ public function setAttributeFunctionList($attributeFunctions, $append = false)
+ {
+ if ($attributeFunctions instanceof MUtil_Util_LookupList) {
+ $this->_attributeFunctionList = $attributeFunctions;
+ } else {
+ $this->_attributeFunctionList = new MUtil_Util_FunctionList($this->_initialAttributeFunctions);
+
+ if ($attributeFunctions) {
+ if ($append) {
+ $this->_attributeFunctionList->add((array) $attributeFunctions);
+ } else {
+ $this->_attributeFunctionList->set((array) $attributeFunctions);
+ }
+ }
+ }
+ return $this;
+ }
+
+ public function setElementFunctionList($elementFunctions, $append = false)
+ {
+ if ($elementFunctions instanceof MUtil_Util_LookupList) {
+ $this->_elementFunctionList = $elementFunctions;
+ } else {
+ if (! $this->_elementFunctionList instanceof MUtil_Util_FunctionList) {
+ $this->_elementFunctionList = new MUtil_Util_FunctionList($this->_initalElementFunctions);
+ }
+
+ if ($elementFunctions) {
+ if ($append) {
+ $this->_elementFunctionList->add((array) $elementFunctions);
+ } else {
+ $this->_elementFunctionList->set((array) $elementFunctions);
+ }
+ }
+ }
+ return $this;
+ }
+}
Deleted: tags/MUtil_1.2/Html/Renderer.php
===================================================================
--- trunk/library/classes/MUtil/Html/Renderer.php 2012-12-27 14:35:57 UTC (rev 1073)
+++ tags/MUtil_1.2/Html/Renderer.php 2012-12-29 19:32:02 UTC (rev 1078)
@@ -1,239 +0,0 @@
-<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * @package MUtil
- * @subpackage Html
- * @author Matijs de Jong <mj...@ma...>
- * @copyright Copyright (c) 2011 Erasmus MC
- * @license New BSD License
- * @version $id: Renderer.php 362 2011-12-15 17:21:17Z matijsdejong $
- */
-
-/**
- * Render output for a view.
- *
- * This object handles MUtil_Html_HtmlInterface and MUtil_Lazy_LazyInterface
- * objects natively, as well as array, scalar values and objects with a
- * __toString function.
- *
- * All other object types passed to the renderer should have a render function
- * defined for them in the ClassRenderList.
- *
- * @package MUtil
- * @subpackage Html
- * @copyright Copyright (c) 2011 Erasmus MC
- * @license New BSD License
- * @since Class available since version 1.0
- */
-class MUtil_Html_Renderer
-{
- /**
- *
- * @var MUtil_Util_ClassList
- */
- protected $_classRenderFunctions;
-
- /**
- * Default array of objects rendering functions.
- *
- * The MUtil_Html_Renderer::doNotRender function allows items to be passed
- * as content without triggering error messages.
- *
- * This is usefull if you want to pass an item to sub objects, but are not
- * sure that it will be used in every case.
- *
- * @var array classname => static output function
- */
- protected $_initialClassRenderFunctions = array(
- 'Zend_Db_Adapter_Abstract' => 'MUtil_Html_Renderer::doNotRender',
- 'Zend_Controller_Request_Abstract' => 'MUtil_Html_Renderer::doNotRender',
- 'Zend_Form' => 'MUtil_Html_InputRenderer::renderForm',
- 'Zend_Form_DisplayGroup' => 'MUtil_Html_InputRenderer::renderDisplayGroup',
- 'Zend_Form_Element' => 'MUtil_Html_InputRenderer::renderElement',
- 'Zend_Translate' => 'MUtil_Html_Renderer::doNotRender',
- );
-
- /**
- * Create the renderer
- *
- * @param mixed $classRenderFunctions Array of classname => renderFunction or MUtil_Util_ClassList
- * @param boolean $append Replace when false, append to default definitions otherwise
- */
- public function __construct($classRenderFunctions = null, $append = true)
- {
- $this->setClassRenderList($classRenderFunctions, $append);
- }
-
- /**
- * Check if the value can be rendered by this object
- *
- * @param mixed $value
- * @return boolean True when the object can be rendered
- */
- public function canRender($value)
- {
- if (is_object($value)) {
- if (method_exists($value, '__toString') ||
- ($value instanceof MUtil_Lazy_LazyInterface) ||
- ($value instanceof MUtil_Html_HtmlInterface)) {
- return true;
- }
-
- return $this->_classRenderFunctions->get($content);
-
- } else {
- if (is_array($value)) {
- foreach ($value as $key => $val) {
- if (! $this->canRender($val)) {
- return false;
- }
- }
- }
-
- return true;
- }
- }
-
- /**
- * Static helper function used for object types that should
- * not produce output when (accidently) rendered.
- *
- * Eg Zend_Translate or Zend_Db_Adapter_Abstract
- *
- * @param Zend_View_Abstract $view
- * @param mixed $content
- * @return null
- */
- public static function doNotRender(Zend_View_Abstract $view, $content)
- {
- if (MUtil_Html::$verbose) {
- MUtil_Echo::r('Did not render ' . get_class($content) . ' object.');
- }
- return null;
- }
-
- /**
- * Get the classlist containing render functions for non-builtin objects
- *
- * @return MUtil_Util_ClassList
- */
- public function getClassRenderList()
- {
- return $this->_classRenderFunctions;
- }
-
- /**
- * Renders the $content so that it can be used as output for the $view,
- * including output escaping and encoding correction.
- *
- * This functions handles MUtil_Html_HtmlInterface and MUtil_Lazy_LazyInterface
- * objects natively, as well as array, scalar values and objects with a
- * __toString function.
- *
- * Other objects a definition should have a render function in getClassRenderList().
- *
- * All Lazy variabables are raised.
- *
- * @param Zend_View_Abstract $view
- * @param mixed $content Anything HtmlInterface, number, string, array, object with __toString
- * or an object that has a defined render function in getClassRenderList().
- * @return string Output to echo to the user
- */
- public function renderAny(Zend_View_Abstract $view, $content)
- {
- // Resolve first as this function as recursion heavy enough as it is.
- if ($content instanceof MUtil_Lazy_LazyInterface) {
- $content = MUtil_Lazy::rise($content);
- }
-
- if ($content) {
- if ($content instanceof MUtil_Html_HtmlInterface) {
- $new_content = $content->render($view);
-
- } elseif (is_array($content) && (! is_object($content))) {
-
- // Again, skip on the recursion count
- foreach ($content as $key => $item) {
- $new_content[] = $this->renderAny($view, $item);
- }
-
- return implode('', $new_content);
-
- } else {
- if (is_object($content)) {
- if ($function = $this->_classRenderFunctions->get($content)) {
- return call_user_func($function, $view, $content);
- }
-
- if (method_exists($content, '__toString')) {
- $new_content = $content->__toString();
- } else {
- // $new_content = 'WARNING: Object of type ' . get_class($content) . ' cannot be converted to string.';
- throw new MUtil_Html_HtmlException('WARNING: Object of type ' . get_class($content) . ' cannot be converted to string.');
- }
- } else {
- $new_content = (string) $content;
- }
-
- $new_content = $view->escape($new_content);
- }
-
- return $new_content;
-
- }
-
- if (! is_array($content)) { // Skip empty array
- return $content; // Returns 0 (zero) and '' when that is the value of $content
- }
- }
-
- /**
- * Change the list of non-builtin objects that can be rendered by this renderer.
- *
- * @param mixed $classRenderFunctions Array of classname => renderFunction or MUtil_Util_ClassList
- * @param boolean $append Replace when false, append otherwise
- * @return MUtil_Html_Renderer (continuation pattern)
- */
- public function setClassRenderList($classRenderFunctions = null, $append = false)
- {
- if ($classRenderFunctions instanceof MUtil_Util_ClassList) {
- $this->_classRenderFunctions = $classRenderFunctions;
- } else {
- $this->_classRenderFunctions = new MUtil_Util_ClassList($this->_initialClassRenderFunctions);
-
- if ($classRenderFunctions) {
- if ($append) {
- $this->_classRenderFunctions->add((array) $classRenderFunctions);
- } else {
- $this->_classRenderFunctions->set((array) $classRenderFunctions);
- }
- }
- }
- return $this;
- }
-}
Copied: tags/MUtil_1.2/Html/Renderer.php (from rev 1076, trunk/library/classes/MUtil/Html/Renderer.php)
===================================================================
--- tags/MUtil_1.2/Html/Renderer.php (rev 0)
+++ tags/MUtil_1.2/Html/Renderer.php 2012-12-29 19:32:02 UTC (rev 1078)
@@ -0,0 +1,239 @@
+<?php
+
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @package MUtil
+ * @subpackage Html
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $id: Renderer.php 362 2011-12-15 17:21:17Z matijsdejong $
+ */
+
+/**
+ * Render output for a view.
+ *
+ * This object handles MUtil_Html_HtmlInterface and MUtil_Lazy_LazyInterface
+ * objects natively, as well as array, scalar values and objects with a
+ * __toString function.
+ *
+ * All other object types passed to the renderer should have a render function
+ * defined for them in the ClassRenderList.
+ *
+ * @package MUtil
+ * @subpackage Html
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.0
+ */
+class MUtil_Html_Renderer
+{
+ /**
+ *
+ * @var MUtil_Util_ClassList
+ */
+ protected $_classRenderFunctions;
+
+ /**
+ * Default array of objects rendering functions.
+ *
+ * The MUtil_Html_Renderer::doNotRender function allows items to be passed
+ * as content without triggering error messages.
+ *
+ * This is usefull if you want to pass an item to sub objects, but are not
+ * sure that it will be used in every case.
+ *
+ * @var array classname => static output function
+ */
+ protected $_initialClassRenderFunctions = array(
+ 'Zend_Db_Adapter_Abstract' => 'MUtil_Html_Renderer::doNotRender',
+ 'Zend_Controller_Request_Abstract' => 'MUtil_Html_Renderer::doNotRender',
+ 'Zend_Form' => 'MUtil_Html_InputRenderer::renderForm',
+ 'Zend_Form_DisplayGroup' => 'MUtil_Html_InputRenderer::renderDisplayGroup',
+ 'Zend_Form_Element' => 'MUtil_Html_InputRenderer::renderElement',
+ 'Zend_Translate' => 'MUtil_Html_Renderer::doNotRender',
+ );
+
+ /**
+ * Create the renderer
+ *
+ * @param mixed $classRenderFunctions Array of classname => renderFunction or MUtil_Util_ClassList
+ * @param boolean $append Replace when false, append to default definitions otherwise
+ */
+ public function __construct($classRenderFunctions = null, $append = true)
+ {
+ $this->setClassRenderList($classRenderFunctions, $append);
+ }
+
+ /**
+ * Check if the value can be rendered by this object
+ *
+ * @param mixed $value
+ * @return boolean True when the object can be rendered
+ */
+ public function canRender($value)
+ {
+ if (is_object($value)) {
+ if (($value instanceof MUtil_Lazy_LazyInterface) ||
+ ($value instanceof MUtil_Html_HtmlInterface) ||
+ method_exists($value, '__toString')) {
+ return true;
+ }
+
+ return $this->_classRenderFunctions->get($value);
+
+ } else {
+ if (is_array($value)) {
+ foreach ($value as $key => $val) {
+ if (! $this->canRender($val)) {
+ return false;
+ }
+ }
+ }
+
+ return true;
+ }
+ }
+
+ /**
+ * Static helper function used for object types that should
+ * not produce output when (accidently) rendered.
+ *
+ * Eg Zend_Translate or Zend_Db_Adapter_Abstract
+ *
+ * @param Zend_View_Abstract $view
+ * @param mixed $content
+ * @return null
+ */
+ public static function doNotRender(Zend_View_Abstract $view, $content)
+ {
+ if (MUtil_Html::$verbose) {
+ MUtil_Echo::r('Did not render ' . get_class($content) . ' object.');
+ }
+ return null;
+ }
+
+ /**
+ * Get the classlist containing render functions for non-builtin objects
+ *
+ * @return MUtil_Util_ClassList
+ */
+ public function getClassRenderList()
+ {
+ return $this->_classRenderFunctions;
+ }
+
+ /**
+ * Renders the $content so that it can be used as output for the $view,
+ * including output escaping and encoding correction.
+ *
+ * This functions handles MUtil_Html_HtmlInterface and MUtil_Lazy_LazyInterface
+ * objects natively, as well as array, scalar values and objects with a
+ * __toString function.
+ *
+ * Other objects a definition should have a render function in getClassRenderList().
+ *
+ * All Lazy variabables are raised.
+ *
+ * @param Zend_View_Abstract $view
+ * @param mixed $content Anything HtmlInterface, number, string, array, object with __toString
+ * or an object that has a defined render function in getClassRenderList().
+ * @return string Output to echo to the user
+ */
+ public function renderAny(Zend_View_Abstract $view, $content)
+ {
+ // Resolve first as this function as recursion heavy enough as it is.
+ if ($content instanceof MUtil_Lazy_LazyInterface) {
+ $content = MUtil_Lazy::rise($content);
+ }
+
+ if ($content) {
+ if ($content instanceof MUtil_Html_HtmlInterface) {
+ $new_content = $content->render($view);
+
+ } elseif (is_array($content) && (! is_object($content))) {
+
+ // Again, skip on the recursion count
+ foreach ($content as $key => $item) {
+ $new_content[] = $this->renderAny($view, $item);
+ }
+
+ return implode('', $new_content);
+
+ } else {
+ if (is_object($content)) {
+ if ($function = $this->_classRenderFunctions->get($content)) {
+ return call_user_func($function, $view, $content);
+ }
+
+ if (method_exists($content, '__toString')) {
+ $new_content = $content->__toString();
+ } else {
+ // $new_content = 'WARNING: Object of type ' . get_class($content) . ' cannot be converted to string.';
+ throw new MUtil_Html_HtmlException('WARNING: Object of type ' . get_class($content) . ' cannot be converted to string.');
+ }
+ } else {
+ $new_content = (string) $content;
+ }
+
+ $new_content = $view->escape($new_content);
+ }
+
+ return $new_content;
+
+ }
+
+ if (! is_array($content)) { // Skip empty array
+ return $content; // Returns 0 (zero) and '' when that is the value of $content
+ }
+ }
+
+ /**
+ * Change the list of non-builtin objects that can be rendered by this renderer.
+ *
+ * @param mixed $classRenderFunctions Array of classname => renderFunction or MUtil_Util_ClassList
+ * @param boolean $append Replace when false, append otherwise
+ * @return MUtil_Html_Renderer (continuation pattern)
+ */
+ public function setClassRenderList($classRenderFunctions = null, $append = false)
+ {
+ if ($classRenderFunctions instanceof MUtil_Util_ClassList) {
+ $this->_classRenderFunctions = $classRenderFunctions;
+ } else {
+ $this->_classRenderFunctions = new MUtil_Util_ClassList($this->_initialClassRenderFunctions);
+
+ if ($classRenderFunctions) {
+ if ($append) {
+ $this->_classRenderFunctions->add((array) $classRenderFunctions);
+ } else {
+ $this->_classRenderFunctions->set((array) $classRenderFunctions);
+ }
+ }
+ }
+ return $this;
+ }
+}
Deleted: tags/MUtil_1.2/Model/TableModel.php
===================================================================
--- trunk/library/classes/MUtil/Model/TableModel.php 2012-12-27 14:35:57 UTC (rev 1073)
+++ tags/MUtil_1.2/Model/TableModel.php 2012-12-29 19:32:02 UTC (rev 1078)
@@ -1,128 +0,0 @@
-<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *
- * @package MUtil
- * @subpackage Model
- * @author Matijs de Jong <mj...@ma...>
- * @copyright Copyright (c) 2011 Erasmus MC
- * @license New BSD License
- * @version $Id$
- */
-
-/**
- * A simple mode for a single table
- *
- * @package MUtil
- * @subpackage Model
- * @copyright Copyright (c) 2011 Erasmus MC
- * @license New BSD License
- * @since Class available since version 1.2
- */
-class MUtil_Model_TableModel extends MUtil_Model_DatabaseModelAbstract
-{
- /**
- *
- * @var Zend_Db_Table_Abstract
- */
- private $_table;
-
- public function __construct($table, $altName = null)
- {
- if ($table instanceof Zend_Db_Table_Abstract) {
- $this->_table = $table;
- $table_name = $this->_getTableName($table);
- } else {
- $this->_table = new Zend_DB_Table($table);
- $table_name = $table;
- }
-
- parent::__construct(null === $altName ? $table_name : $altName);
-
- $this->_loadTableMetaData($this->_table);
- }
-
- /**
- * Delete items from the model
- *
- * @param mixed $filter True to use the stored filter, array to specify a different filter
- * @return int The number of items deleted
- */
- public function delete($filter = true)
- {
- return $this->_deleteTableData(
- $this->_table,
- $this->_checkFilterUsed($filter),
- $this->_deleteValues);
- }
-
- /**
- * The database adapter used by the model.
- *
- * @return Zend_Db_Adapter_Abstract
- */
- public function getAdapter()
- {
- return $this->_table->getAdapter();
- }
-
- /**
- * Returns a Zend_Db_Table_Select object to work with
- *
- * @return Zend_Db_Table_Select
- */
- public function getSelect()
- {
- if ($this->hasItemsUsed()) {
- $select = $this->_table->select(Zend_Db_Table_Abstract::SELECT_WITHOUT_FROM_PART);
- $select->from($this->_getTableName($this->_table), array());
- return $select;
- } else {
- return $this->_table->select(Zend_Db_Table_Abstract::SELECT_WITH_FROM_PART);
- }
- }
-
- /**
- * Save a single model item.
- *
- * @param array $newValues The values to store for a single model item.
- * @param array $filter If the filter contains old key values these are used
- * to decide on update versus insert.
- * @return array The values as they are after saving (they may change).
- */
- public function save(array $newValues, array $filter = null)
- {
- // $this->_saveTableData returns the new row values, including any automatic changes.
- // add $newValues to throw nothing away.
- $updatedValues = $this->_saveTableData($this->_table, $newValues, $filter, parent::SAVE_MODE_ALL) + $newValues;
-
- // Handle possible onLoad
- $updatedValues = $this->processAfterLoad(array($updatedValues));
- return reset($updatedValues);
- }
-}
Copied: tags/MUtil_1.2/Model/TableModel.php (from rev 1076, trunk/library/classes/MUtil/Model/TableModel.php)
===================================================================
--- tags/MUtil_1.2/Model/TableModel.php (rev 0)
+++ tags/MUtil_1.2/Model/TableModel.php 2012-12-29 19:32:02 UTC (rev 1078)
@@ -0,0 +1,133 @@
+<?php
+
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $Id$
+ */
+
+/**
+ * A simple mode for a single table
+ *
+ * @package MUtil
+ * @subpackage Model
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.2
+ */
+class MUtil_Model_TableModel extends MUtil_Model_DatabaseModelAbstract
+{
+ /**
+ *
+ * @var Zend_Db_Table_Abstract
+ */
+ private $_table;
+
+ /**
+ *
+ * @param Zend_Db_Table_Abstract $table An Zend abstract table or the table name
+ * @param string $altName An alternative name to use, default is the name of the table itself
+ */
+ public function __construct($table, $altName = null)
+ {
+ if ($table instanceof Zend_Db_Table_Abstract) {
+ $this->_table = $table;
+ $table_name = $this->_getTableName($table);
+ } else {
+ $this->_table = new Zend_DB_Table($table);
+ $table_name = $table;
+ }
+
+ parent::__construct(null === $altName ? $table_name : $altName);
+
+ $this->_loadTableMetaData($this->_table);
+ }
+
+ /**
+ * Delete items from the model
+ *
+ * @param mixed $filter True to use the stored filter, array to specify a different filter
+ * @return int The number of items deleted
+ */
+ public function delete($filter = true)
+ {
+ return $this->_deleteTableData(
+ $this->_table,
+ $this->_checkFilterUsed($filter),
+ $this->_deleteValues);
+ }
+
+ /**
+ * The database adapter used by the model.
+ *
+ * @return Zend_Db_Adapter_Abstract
+ */
+ public function getAdapter()
+ {
+ return $this->_table->getAdapter();
+ }
+
+ /**
+ * Returns a Zend_Db_Table_Select object to work with
+ *
+ * @return Zend_Db_Table_Select
+ */
+ public function getSelect()
+ {
+ if ($this->hasItemsUsed()) {
+ $select = $this->_table->select(Zend_Db_Table_Abstract::SELECT_WITHOUT_FROM_PART);
+ $select->from($this->_getTableName($this->_table), array());
+ return $select;
+ } else {
+ return $this->_table->select(Zend_Db_Table_Abstract::SELECT_WITH_FROM_PART);
+ }
+ }
+
+ /**
+ * Save a single model item.
+ *
+ * @param array $newValues The values to store for a single model item.
+ * @param array $filter If the filter contains old key values these are used
+ * to decide on update versus insert.
+ * @return array The values as they are after saving (they may change).
+ */
+ public function save(array $newValues, array $filter = null)
+ {
+ // $this->_saveTableData returns the new row values, including any automatic changes.
+ // add $newValues to throw nothing away.
+ $updatedValues = $this->_saveTableData($this->_table, $newValues, $filter, parent::SAVE_MODE_ALL) + $newValues;
+
+ // Handle possible onLoad
+ $updatedValues = $this->processAfterLoad(array($updatedValues));
+ return reset($updatedValues);
+ }
+}
Deleted: tags/MUtil_1.2/Util/ClassList.php
===================================================================
--- trunk/library/classes/MUtil/Util/ClassList.php 2012-12-27 14:35:57 UTC (rev 1073)
+++ tags/MUtil_1.2/Util/ClassList.php 2012-12-29 19:32:02 UTC (rev 1078)
@@ -1,130 +0,0 @@
-<?php
-
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- *
- * @author Matijs de Jong
- * @since 1.0
- * @version 1.1
- * @package MUtil
- * @subpackage Util
- */
-
-/**
- *
- * @author Matijs de Jong
- * @package MUtil
- * @subpackage Util
- */
-class MUtil_Util_ClassList extends MUtil_Util_LookupList
-{
- protected $_subClasses;
- protected $_notSubClasses;
-
- /**
- * Function triggered when the underlying lookup array has changed.
- *
- * This function exists to allow overloading in subclasses.
- *
- * @return void
- */
- protected function _changed()
- {
- // Clean up caches
- $this->_subClasses = array();
- $this->_notSubClasses = array();
- }
-
- /**
- * Item lookup function.
- *
- * This is a separate function to allow overloading by subclasses.
- *
- * @param scalar $key
- * @param mixed $default
- * @return mixed
- */
- protected function _getItem($key, $default = null)
- {
- if (is_object($key)) {
- $class = get_class($key);
-
- // Check for existence
- if ($result = parent::_getItem($class, $default)) {
- return $result;
- }
- // Check was already found
- if (array_key_exists($class, $this->_subClasses)) {
- return $this->_subClasses[$class];
- }
- // Check was already searched and not found
- if (array_key_exists($class, $this->_notSubClasses)) {
- return $default;
- }
-
- // Check the parent classes of the object
- $parents = class_parents($key);
- $result = null;
- foreach ($parents as $parentClass) {
- if ($result = parent::_getItem($parentClass, null)) {
- // Add the current class to the cache
- $this->_subClasses[$class] = $result;
-
- // Add all parents up to the one matching to the cache
- foreach ($parents as $priorParent) {
- $this->_subClasses[$priorParent] = $result;
- if ($parentClass === $priorParent) {
- // Further parents are not automatically in the list
- break;
- }
- }
- return $result;
- }
- }
-
- // Check the interfaces implemented by the object
- $implemented = class_implements($key);
- foreach ($implemented as $interface) {
- if ($result = parent::_getItem($interface, null)) {
- // Add the current class to the cache
- $this->_subClasses[$class] = $result;
- return $result;
- }
- }
-
- // Add to the not found cache
- $this->_notSubClasses[$class] = true;
-
- return $default;
- } else {
- return parent::_getItem($key, $default);
- }
- }
-}
\ No newline at end of file
Copied: tags/MUtil_1.2/Util/ClassList.php (from rev 1076, trunk/library/classes/MUtil/Util/ClassList.php)
===================================================================
--- tags/MUtil_1.2/Util/ClassList.php (rev 0)
+++ tags/MUtil_1.2/Util/ClassList.php 2012-12-29 19:32:02 UTC (rev 1078)
@@ -0,0 +1,149 @@
+<?php
+
+
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Util
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $id: ClassList.php 362 2011-12-15 17:21:17Z matijsdejong $
+ */
+
+/**
+ * Return a value (the kind is up to the user), using either an object
+ * or a class name as lookup key.
+ *
+ * When not finding a direct match, this object checks (first) the parent classes
+ * and then the interfaces for a match. Search results are then stored in a cache.
+ *
+ * @package MUtil
+ * @subpackage Util
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.0
+ */
+class MUtil_Util_ClassList extends MUtil_Util_LookupList
+{
+ /**
+ * Sub classes known to have a mapping
+ *
+ * @var array
+ */
+ protected $_subClasses;
+
+ /**
+ * Classes not found in this lookup list
+ *
+ * @var array
+ */
+ protected $_notSubClasses;
+
+ /**
+ * Function triggered when the underlying lookup array has changed.
+ *
+ * This function exists to allow overloading in subclasses.
+ *
+ * @return void
+ */
+ protected function _changed()
+ {
+ // Clean up caches
+ $this->_subClasses = array();
+ $this->_notSubClasses = array();
+ }
+
+ /**
+ * Item lookup function.
+ *
+ * This is a separate function to allow overloading by subclasses.
+ *
+ * @param scalar $key
+ * @param mixed $default
+ * @return mixed
+ */
+ protected function _getItem($key, $default = null)
+ {
+ if (is_object($key)) {
+ $class = get_class($key);
+ } else {
+ $class = $key;
+ }
+
+ // Check for simple existence
+ if ($result = parent::_getItem($class, $default)) {
+ return $result;
+ }
+
+ // Check was already found
+ if (array_key_exists($class, $this->_subClasses)) {
+ return $this->_subClasses[$class];
+ }
+
+ // Check was already searched and not found
+ if (array_k...
[truncated message content] |
|
From: <gem...@li...> - 2012-12-28 17:19:01
|
Revision: 1077
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1077&view=rev
Author: matijsdejong
Date: 2012-12-28 17:18:54 +0000 (Fri, 28 Dec 2012)
Log Message:
-----------
Base url disables the working with tabs in jQuery UI 1.9.3
The only other option would be to try to put the full page url with each tab - but that might trigger a reload
Modified Paths:
--------------
trunk/library/layouts/scripts/gems-fluid.phtml
trunk/library/layouts/scripts/gems.phtml
trunk/library/layouts/scripts/gemsnew.phtml
Modified: trunk/library/layouts/scripts/gems-fluid.phtml
===================================================================
--- trunk/library/layouts/scripts/gems-fluid.phtml 2012-12-28 16:16:11 UTC (rev 1076)
+++ trunk/library/layouts/scripts/gems-fluid.phtml 2012-12-28 17:18:54 UTC (rev 1077)
@@ -1,7 +1,6 @@
<?php echo $this->doctype(); ?>
<html <?php echo 'xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$this->locale.'"' ?> lang="<?php echo $this->locale; ?>">
<head>
- <base href="<?php echo $this->serverUrl() . $this->baseUrl() ?>"/>
<?php
echo $this->headMeta();
echo $this->headTitle();
Modified: trunk/library/layouts/scripts/gems.phtml
===================================================================
--- trunk/library/layouts/scripts/gems.phtml 2012-12-28 16:16:11 UTC (rev 1076)
+++ trunk/library/layouts/scripts/gems.phtml 2012-12-28 17:18:54 UTC (rev 1077)
@@ -1,7 +1,6 @@
<?php echo $this->doctype(); ?>
<html <?php echo 'xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$this->locale.'"' ?> lang="<?php echo $this->locale; ?>">
<head>
- <base href="<?php echo $this->serverUrl() . $this->baseUrl() ?>"/>
<?php
echo $this->headMeta();
echo $this->headTitle();
Modified: trunk/library/layouts/scripts/gemsnew.phtml
===================================================================
--- trunk/library/layouts/scripts/gemsnew.phtml 2012-12-28 16:16:11 UTC (rev 1076)
+++ trunk/library/layouts/scripts/gemsnew.phtml 2012-12-28 17:18:54 UTC (rev 1077)
@@ -1,7 +1,6 @@
<?php echo $this->doctype(); ?>
<html <?php echo 'xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$this->locale.'"' ?> lang="<?php echo $this->locale; ?>">
<head>
- <base href="<?php echo $this->serverUrl() . $this->baseUrl() ?>"/>
<?php
echo $this->headMeta();
echo $this->headTitle();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-28 16:16:19
|
Revision: 1076
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1076&view=rev
Author: matijsdejong
Date: 2012-12-28 16:16:11 +0000 (Fri, 28 Dec 2012)
Log Message:
-----------
Added/fixed documentation and small bugs
Modified Paths:
--------------
trunk/library/classes/MUtil/Html/Renderer.php
trunk/library/classes/MUtil/Model/TableModel.php
trunk/library/classes/MUtil/Util/ClassList.php
trunk/library/classes/MUtil/Util/FunctionList.php
trunk/library/classes/MUtil/Util/LookupList.php
Modified: trunk/library/classes/MUtil/Html/Renderer.php
===================================================================
--- trunk/library/classes/MUtil/Html/Renderer.php 2012-12-28 13:55:22 UTC (rev 1075)
+++ trunk/library/classes/MUtil/Html/Renderer.php 2012-12-28 16:16:11 UTC (rev 1076)
@@ -98,13 +98,13 @@
public function canRender($value)
{
if (is_object($value)) {
- if (method_exists($value, '__toString') ||
- ($value instanceof MUtil_Lazy_LazyInterface) ||
- ($value instanceof MUtil_Html_HtmlInterface)) {
+ if (($value instanceof MUtil_Lazy_LazyInterface) ||
+ ($value instanceof MUtil_Html_HtmlInterface) ||
+ method_exists($value, '__toString')) {
return true;
}
- return $this->_classRenderFunctions->get($content);
+ return $this->_classRenderFunctions->get($value);
} else {
if (is_array($value)) {
Modified: trunk/library/classes/MUtil/Model/TableModel.php
===================================================================
--- trunk/library/classes/MUtil/Model/TableModel.php 2012-12-28 13:55:22 UTC (rev 1075)
+++ trunk/library/classes/MUtil/Model/TableModel.php 2012-12-28 16:16:11 UTC (rev 1076)
@@ -52,6 +52,11 @@
*/
private $_table;
+ /**
+ *
+ * @param Zend_Db_Table_Abstract $table An Zend abstract table or the table name
+ * @param string $altName An alternative name to use, default is the name of the table itself
+ */
public function __construct($table, $altName = null)
{
if ($table instanceof Zend_Db_Table_Abstract) {
Modified: trunk/library/classes/MUtil/Util/ClassList.php
===================================================================
--- trunk/library/classes/MUtil/Util/ClassList.php 2012-12-28 13:55:22 UTC (rev 1075)
+++ trunk/library/classes/MUtil/Util/ClassList.php 2012-12-28 16:16:11 UTC (rev 1076)
@@ -1,51 +1,68 @@
<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
+
/**
- *
- * @author Matijs de Jong
- * @since 1.0
- * @version 1.1
- * @package MUtil
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
* @subpackage Util
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $id: ClassList.php 362 2011-12-15 17:21:17Z matijsdejong $
*/
/**
- *
- * @author Matijs de Jong
- * @package MUtil
+ * Return a value (the kind is up to the user), using either an object
+ * or a class name as lookup key.
+ *
+ * When not finding a direct match, this object checks (first) the parent classes
+ * and then the interfaces for a match. Search results are then stored in a cache.
+ *
+ * @package MUtil
* @subpackage Util
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.0
*/
class MUtil_Util_ClassList extends MUtil_Util_LookupList
{
+ /**
+ * Sub classes known to have a mapping
+ *
+ * @var array
+ */
protected $_subClasses;
+
+ /**
+ * Classes not found in this lookup list
+ *
+ * @var array
+ */
protected $_notSubClasses;
/**
@@ -75,56 +92,58 @@
{
if (is_object($key)) {
$class = get_class($key);
+ } else {
+ $class = $key;
+ }
- // Check for existence
- if ($result = parent::_getItem($class, $default)) {
- return $result;
- }
- // Check was already found
- if (array_key_exists($class, $this->_subClasses)) {
- return $this->_subClasses[$class];
- }
- // Check was already searched and not found
- if (array_key_exists($class, $this->_notSubClasses)) {
- return $default;
- }
+ // Check for simple existence
+ if ($result = parent::_getItem($class, $default)) {
+ return $result;
+ }
- // Check the parent classes of the object
- $parents = class_parents($key);
- $result = null;
- foreach ($parents as $parentClass) {
- if ($result = parent::_getItem($parentClass, null)) {
- // Add the current class to the cache
- $this->_subClasses[$class] = $result;
+ // Check was already found
+ if (array_key_exists($class, $this->_subClasses)) {
+ return $this->_subClasses[$class];
+ }
- // Add all parents up to the one matching to the cache
- foreach ($parents as $priorParent) {
- $this->_subClasses[$priorParent] = $result;
- if ($parentClass === $priorParent) {
- // Further parents are not automatically in the list
- break;
- }
+ // Check was already searched and not found
+ if (array_key_exists($class, $this->_notSubClasses)) {
+ return $default;
+ }
+
+ // Check the parent classes of the object
+ $parents = class_parents($key);
+ $result = null;
+ foreach ($parents as $parentClass) {
+ if ($result = parent::_getItem($parentClass, null)) {
+ // Add the current class to the cache
+ $this->_subClasses[$class] = $result;
+
+ // Add all parents up to the one matching to the cache
+ foreach ($parents as $priorParent) {
+ $this->_subClasses[$priorParent] = $result;
+ if ($parentClass === $priorParent) {
+ // Further parents are not automatically in the list
+ break;
}
- return $result;
}
+ return $result;
}
+ }
- // Check the interfaces implemented by the object
- $implemented = class_implements($key);
- foreach ($implemented as $interface) {
- if ($result = parent::_getItem($interface, null)) {
- // Add the current class to the cache
- $this->_subClasses[$class] = $result;
- return $result;
- }
+ // Check the interfaces implemented by the object
+ $implemented = class_implements($key);
+ foreach ($implemented as $interface) {
+ if ($result = parent::_getItem($interface, null)) {
+ // Add the current class to the cache
+ $this->_subClasses[$class] = $result;
+ return $result;
}
+ }
- // Add to the not found cache
- $this->_notSubClasses[$class] = true;
+ // Add to the not found cache
+ $this->_notSubClasses[$class] = true;
- return $default;
- } else {
- return parent::_getItem($key, $default);
- }
+ return $default;
}
}
\ No newline at end of file
Modified: trunk/library/classes/MUtil/Util/FunctionList.php
===================================================================
--- trunk/library/classes/MUtil/Util/FunctionList.php 2012-12-28 13:55:22 UTC (rev 1075)
+++ trunk/library/classes/MUtil/Util/FunctionList.php 2012-12-28 16:16:11 UTC (rev 1076)
@@ -1,47 +1,49 @@
<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
+
/**
- *
- * @author Matijs de Jong
- * @since 1.0
- * @version 1.1
- * @package MUtil
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
* @subpackage Util
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $id: FunctionList.php 362 2011-12-15 17:21:17Z matijsdejong $
*/
/**
- *
- * @author Matijs de Jong
- * @package MUtil
+ * Return a function value using a scalar key.
+ *
+ * @package MUtil
* @subpackage Util
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.0
*/
class MUtil_Util_FunctionList extends MUtil_Util_LookupList
{
@@ -59,9 +61,11 @@
if (isset($this->_elements[$key])) {
$function = $this->_elements[$key];
- // TODO: Check for object loading here
-
- return $function;
+ if (is_callable($function)) {
+ return $function;
+ } else {
+ return $default;
+ }
} else {
return $default;
}
Modified: trunk/library/classes/MUtil/Util/LookupList.php
===================================================================
--- trunk/library/classes/MUtil/Util/LookupList.php 2012-12-28 13:55:22 UTC (rev 1075)
+++ trunk/library/classes/MUtil/Util/LookupList.php 2012-12-28 16:16:11 UTC (rev 1076)
@@ -1,47 +1,52 @@
<?php
-
-/**
- * Copyright (c) 2011, Erasmus MC
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of Erasmus MC nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
+
/**
- *
- * @author Matijs de Jong
- * @since 1.0
- * @version 1.1
- * @package MUtil
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
* @subpackage Util
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $id: LookupList.php 362 2011-12-15 17:21:17Z matijsdejong $
*/
/**
- *
- * @author Matijs de Jong
- * @package MUtil
+ * Return a value (the kind is up to the user) using a scalar key.
+ *
+ * The advantages to using e.g. a standard array object is that both the
+ * key type and the search algorithm can be customized in each child class.
+ *
+ * @package MUtil
* @subpackage Util
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.0
*/
class MUtil_Util_LookupList
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-28 13:55:37
|
Revision: 1075
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1075&view=rev
Author: matijsdejong
Date: 2012-12-28 13:55:22 +0000 (Fri, 28 Dec 2012)
Log Message:
-----------
Fix error in array check
Modified Paths:
--------------
trunk/library/classes/Gems/Project/ProjectSettings.php
Modified: trunk/library/classes/Gems/Project/ProjectSettings.php
===================================================================
--- trunk/library/classes/Gems/Project/ProjectSettings.php 2012-12-27 19:20:28 UTC (rev 1074)
+++ trunk/library/classes/Gems/Project/ProjectSettings.php 2012-12-28 13:55:22 UTC (rev 1075)
@@ -349,7 +349,7 @@
*/
public function getJQueryLocal()
{
- if (isset($this['jquery']['local'])) {
+ if (isset($this['jquery'], $this['jquery']['local'])) {
return $this['jquery']['local'];
} else {
return null;
@@ -531,6 +531,6 @@
*/
public function isJQueryLocal()
{
- return isset($this['jquery']['local']);
+ return isset($this['jquery'], $this['jquery']['local']);
}
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-27 19:20:38
|
Revision: 1074
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1074&view=rev
Author: matijsdejong
Date: 2012-12-27 19:20:28 +0000 (Thu, 27 Dec 2012)
Log Message:
-----------
Text content can now be added using sprintf()
Modified Paths:
--------------
trunk/library/classes/MUtil/Html/Creator.php
Modified: trunk/library/classes/MUtil/Html/Creator.php
===================================================================
--- trunk/library/classes/MUtil/Html/Creator.php 2012-12-27 14:35:57 UTC (rev 1073)
+++ trunk/library/classes/MUtil/Html/Creator.php 2012-12-27 19:20:28 UTC (rev 1074)
@@ -124,6 +124,7 @@
'seq' => 'MUtil_Html_Sequence::createSequence',
'sequence' => 'MUtil_Html_Sequence::createSequence', // A sequence can contain another sequence, so other function name used
'snippet' => 'MUtil_Html::snippet',
+ 'sprintf' => 'sprintf',
'spaced' => 'MUtil_Html_Sequence::createSpaced', // A sequence can contain another sequence, so other function name used
'table' => 'MUtil_Html_TableElement::table',
'tbody' => 'MUtil_Html_TBodyElement::tbody',
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-27 14:36:04
|
Revision: 1073
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1073&view=rev
Author: matijsdejong
Date: 2012-12-27 14:35:57 +0000 (Thu, 27 Dec 2012)
Log Message:
-----------
Some answer is required
Modified Paths:
--------------
trunk/library/classes/Gems/Default/RespondentAction.php
Modified: trunk/library/classes/Gems/Default/RespondentAction.php
===================================================================
--- trunk/library/classes/Gems/Default/RespondentAction.php 2012-12-27 14:23:23 UTC (rev 1072)
+++ trunk/library/classes/Gems/Default/RespondentAction.php 2012-12-27 14:35:57 UTC (rev 1073)
@@ -193,7 +193,7 @@
$bridge->addTab( 'caption4')->h4($this->_('Settings'));
$bridge->addSelect( 'grs_iso_lang', 'label', $this->_('Language'), 'multiOptions', $this->util->getLocalized()->getLanguages());
- $bridge->addRadio( 'gr2o_consent', 'separator', '', 'description', $this->_('Has the respondent signed the informed consent letter?'));
+ $bridge->addRadio( 'gr2o_consent', 'separator', '', 'description', $this->_('Has the respondent signed the informed consent letter?'), 'required', true);
return $returnValues;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-27 14:23:30
|
Revision: 1072
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1072&view=rev
Author: matijsdejong
Date: 2012-12-27 14:23:23 +0000 (Thu, 27 Dec 2012)
Log Message:
-----------
Updated to use latest 1.8.3 version of jQuery
User can switch to local files for jQuery
Modified Paths:
--------------
trunk/library/classes/Gems/Project/ProjectSettings.php
trunk/library/classes/GemsEscort.php
trunk/library/classes/MUtil/JQuery/Form/Element/DatePicker.php
trunk/library/classes/MUtil/JQuery/View/Helper/DatePicker.php
Modified: trunk/library/classes/Gems/Project/ProjectSettings.php
===================================================================
--- trunk/library/classes/Gems/Project/ProjectSettings.php 2012-12-27 14:21:39 UTC (rev 1071)
+++ trunk/library/classes/Gems/Project/ProjectSettings.php 2012-12-27 14:23:23 UTC (rev 1072)
@@ -341,6 +341,22 @@
}
/**
+ * Get the local jQuery directory (without base url)
+ *
+ * Instead of e.g. google Content Delivery Network.
+ *
+ * @return boolean
+ */
+ public function getJQueryLocal()
+ {
+ if (isset($this['jquery']['local'])) {
+ return $this['jquery']['local'];
+ } else {
+ return null;
+ }
+ }
+
+ /**
* Get the logLevel to use with the Gems_Log
*
* Default settings is for development and testing environment to use Zend_Log::DEBUG and
@@ -505,4 +521,16 @@
{
return isset($this['password']['initialPassword']);
}
+
+ /**
+ * Does this project use a local jQuery
+ *
+ * Instead of e.g. google Content Delivery Network.
+ *
+ * @return boolean
+ */
+ public function isJQueryLocal()
+ {
+ return isset($this['jquery']['local']);
+ }
}
\ No newline at end of file
Modified: trunk/library/classes/GemsEscort.php
===================================================================
--- trunk/library/classes/GemsEscort.php 2012-12-27 14:21:39 UTC (rev 1071)
+++ trunk/library/classes/GemsEscort.php 2012-12-27 14:23:23 UTC (rev 1072)
@@ -723,14 +723,7 @@
if (MUtil_JQuery::usesJQuery($this->view)) {
$jquery = $this->view->jQuery();
$jquery->uiEnable(); // enable user interface
- $jquery->setUiVersion('1.8.9');
- if (MUtil_Https::on()) {
- $jquery->setCdnSsl(true);
- }
-
- // $jquery->setLocalPath('jquery-1.3.2.min.js');
-
if (isset($this->project->jquerycss)) {
foreach ((array) $this->project->jquerycss as $css) {
$jquery->addStylesheet($this->basepath->getBasePath() . '/' . $css);
@@ -1579,6 +1572,27 @@
// Set the base path, the route is now fixed
$this->basepath->setBasePath($request->getBasePath());
+
+ // Set the jQuery version and other information needed
+ // by classes using jQuery
+ $jquery = MUtil_JQuery::jQuery();
+
+ $jqueryVersion = '1.8.3';
+ $jqueryUiVersion = '1.9.2';
+ $jquery->setVersion($jqueryVersion);
+ $jquery->setUiVersion($jqueryUiVersion);
+
+ if ($this->project->isJQueryLocal()) {
+ $jqueryDir = $request->getBasePath() . $this->project->getJQueryLocal();
+
+ $jquery->setLocalPath($jqueryDir . 'jquery-' . $jqueryVersion . '.js');
+ $jquery->setUiLocalPath($jqueryDir . 'jquery-ui-' . $jqueryUiVersion . '.js');
+
+ } else {
+ if (MUtil_Https::on()) {
+ $jquery->setCdnSsl(true);
+ }
+ }
}
Modified: trunk/library/classes/MUtil/JQuery/Form/Element/DatePicker.php
===================================================================
--- trunk/library/classes/MUtil/JQuery/Form/Element/DatePicker.php 2012-12-27 14:21:39 UTC (rev 1071)
+++ trunk/library/classes/MUtil/JQuery/Form/Element/DatePicker.php 2012-12-27 14:23:23 UTC (rev 1072)
@@ -189,19 +189,6 @@
public function setView(Zend_View_Interface $view = null)
{
- /*
- http://jquery-ui.googlecode.com/svn/tags/latest/ui/minified/i18n/jquery-ui-i18n.min.js"
-
- $(function() {
- $.datepicker.setDefaults($.datepicker.regional['']);
- $("#datepicker").datepicker($.datepicker.regional['fr']);
- $("#locale").change(function() {
- $('#datepicker').datepicker('option', $.datepicker.regional[$(this).val()]);
- });
- });
-
- */
-
$element = parent::setView($view);
if (null !== $view) {
@@ -210,20 +197,28 @@
}
}
-
if ($locale = Zend_Registry::get('Zend_Locale')) {
$language = $locale->getLanguage();
+ // We have a language, but only when not english
if ($language && $language != 'en') {
- //TODO : work out correct link / setup: now defaults to last language
- // $view->jquery()->addJavascriptFile(ZendX_JQuery::CDN_BASE_GOOGLE . ZendX_JQuery::CDN_SUBFOLDER_JQUERYUI . ZendX_JQuery::DEFAULT_UI_VERSION . '/i18n/jquery-ui-i18n.min.js');
+ $jquery = $view->JQuery();
- // $ljs = "$('#" . $this->getId() . "').datepicker('option', $.datepicker.regional['" . $language . "']);";
- // $view->JQuery()->addOnLoad($ljs);
+ if ($uiPath = $jquery->getUiLocalPath()) {
+ $baseUrl = dirname($uiPath);
- $http = MUtil_Https::on() ? ZendX_JQuery::CDN_BASE_GOOGLE_SSL : ZendX_JQuery::CDN_BASE_GOOGLE ;
- $version = ZendX_JQuery::DEFAULT_UI_VERSION;
- $version = '1.8.9'; //Overrule want vertaling nederlands wordt anders niet gevonden
- $view->JQuery()->addJavascriptFile($http . ZendX_JQuery::CDN_SUBFOLDER_JQUERYUI . $version . '/i18n/jquery.ui.datepicker-' . $language . '.js');
+ } else {
+ $baseUrl = MUtil_Https::on() ? ZendX_JQuery::CDN_BASE_GOOGLE_SSL : ZendX_JQuery::CDN_BASE_GOOGLE;
+ $baseUrl .= ZendX_JQuery::CDN_SUBFOLDER_JQUERYUI;
+ $baseUrl .= $jquery->getUiVersion();
+ }
+ // Option 1: download single language file
+ $jquery->addJavascriptFile($baseUrl . '/i18n/jquery.ui.datepicker-' . $language . '.js');
+
+ // Option 2: download all languages and select current
+ // $jquery->addJavascriptFile($baseUrl . '/i18n/jquery-ui-i18n.min.js');
+ // $jquery->addOnLoad("$.datepicker.setDefaults($.datepicker.regional['$language'])");
+
+ // TODO: Option 3: enable language setting for each individual date
}
}
Modified: trunk/library/classes/MUtil/JQuery/View/Helper/DatePicker.php
===================================================================
--- trunk/library/classes/MUtil/JQuery/View/Helper/DatePicker.php 2012-12-27 14:21:39 UTC (rev 1071)
+++ trunk/library/classes/MUtil/JQuery/View/Helper/DatePicker.php 2012-12-27 14:23:23 UTC (rev 1072)
@@ -53,7 +53,7 @@
$this->jquery->addOnLoad($js);
}
- if (isset($params['dateFormat']) && ($format = $params['dateFormat'])) {
+ if (isset($params['dateFormat']) && $params['dateFormat']) {
//*
$js = array();
$js[] = '{';
@@ -61,10 +61,7 @@
$js[] = '';
$js[] = " datePick.blur(function() {";
$js[] = " var dateused;";
- $js[] = " var dateformat = '" . $format . "';";
- // TODO: Why won't this work
- // $js[] = " var dateformat = datePick.datepicker('option', 'dateFormat');";
- // $js[] = " alert(dateformat);";
+ $js[] = " var dateformat = datePick.datepicker('option', 'dateFormat');";
$js[] = " dateused = datePick.attr('value');";
$js[] = " dateused = $.datepicker.parseDate(dateformat, dateused);";
$js[] = " datePick.attr('value', $.datepicker.formatDate(dateformat, dateused));";
@@ -72,7 +69,6 @@
$js[] = '}';
$this->jquery->addOnLoad(implode("\n", $js));
- //$this->view->inlineScript()->appendScript(implode("\n", $js)); // */
}
return $result;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-27 14:21:50
|
Revision: 1071
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1071&view=rev
Author: matijsdejong
Date: 2012-12-27 14:21:39 +0000 (Thu, 27 Dec 2012)
Log Message:
-----------
Changed names to reflect CDN download
Added Paths:
-----------
trunk/templates/jquery/Development/i18n/jquery-ui-i18n.min.js
trunk/templates/jquery/Production/i18n/jquery-ui-i18n.min.js
Removed Paths:
-------------
trunk/templates/jquery/Development/i18n/jquery-ui-i18n.js
trunk/templates/jquery/Production/i18n/jquery-ui-i18n.js
Deleted: trunk/templates/jquery/Development/i18n/jquery-ui-i18n.js
===================================================================
--- trunk/templates/jquery/Development/i18n/jquery-ui-i18n.js 2012-12-27 13:49:10 UTC (rev 1070)
+++ trunk/templates/jquery/Development/i18n/jquery-ui-i18n.js 2012-12-27 14:21:39 UTC (rev 1071)
@@ -1,1675 +0,0 @@
-/*! jQuery UI - v1.9.2 - 2012-11-23
-* http://jqueryui.com
-* Includes: jquery.ui.datepicker-af.js, jquery.ui.datepicker-ar-DZ.js, jquery.ui.datepicker-ar.js, jquery.ui.datepicker-az.js, jquery.ui.datepicker-bg.js, jquery.ui.datepicker-bs.js, jquery.ui.datepicker-ca.js, jquery.ui.datepicker-cs.js, jquery.ui.datepicker-cy-GB.js, jquery.ui.datepicker-da.js, jquery.ui.datepicker-de.js, jquery.ui.datepicker-el.js, jquery.ui.datepicker-en-AU.js, jquery.ui.datepicker-en-GB.js, jquery.ui.datepicker-en-NZ.js, jquery.ui.datepicker-eo.js, jquery.ui.datepicker-es.js, jquery.ui.datepicker-et.js, jquery.ui.datepicker-eu.js, jquery.ui.datepicker-fa.js, jquery.ui.datepicker-fi.js, jquery.ui.datepicker-fo.js, jquery.ui.datepicker-fr-CH.js, jquery.ui.datepicker-fr.js, jquery.ui.datepicker-gl.js, jquery.ui.datepicker-he.js, jquery.ui.datepicker-hi.js, jquery.ui.datepicker-hr.js, jquery.ui.datepicker-hu.js, jquery.ui.datepicker-hy.js, jquery.ui.datepicker-id.js, jquery.ui.datepicker-is.js, jquery.ui.datepicker-it.js, jquery.ui.datepicker-ja.js, jquery.ui.datepicker-ka.js, jquery.ui.datepicker-kk.js, jquery.ui.datepicker-km.js, jquery.ui.datepicker-ko.js, jquery.ui.datepicker-lb.js, jquery.ui.datepicker-lt.js, jquery.ui.datepicker-lv.js, jquery.ui.datepicker-mk.js, jquery.ui.datepicker-ml.js, jquery.ui.datepicker-ms.js, jquery.ui.datepicker-nl-BE.js, jquery.ui.datepicker-nl.js, jquery.ui.datepicker-no.js, jquery.ui.datepicker-pl.js, jquery.ui.datepicker-pt-BR.js, jquery.ui.datepicker-pt.js, jquery.ui.datepicker-rm.js, jquery.ui.datepicker-ro.js, jquery.ui.datepicker-ru.js, jquery.ui.datepicker-sk.js, jquery.ui.datepicker-sl.js, jquery.ui.datepicker-sq.js, jquery.ui.datepicker-sr-SR.js, jquery.ui.datepicker-sr.js, jquery.ui.datepicker-sv.js, jquery.ui.datepicker-ta.js, jquery.ui.datepicker-th.js, jquery.ui.datepicker-tj.js, jquery.ui.datepicker-tr.js, jquery.ui.datepicker-uk.js, jquery.ui.datepicker-vi.js, jquery.ui.datepicker-zh-CN.js, jquery.ui.datepicker-zh-HK.js, jquery.ui.datepicker-zh-TW.js
-* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */
-
-/* Afrikaans initialisation for the jQuery UI date picker plugin. */
-/* Written by Renier Pretorius. */
-jQuery(function($){
- $.datepicker.regional['af'] = {
- closeText: 'Selekteer',
- prevText: 'Vorige',
- nextText: 'Volgende',
- currentText: 'Vandag',
- monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie',
- 'Julie','Augustus','September','Oktober','November','Desember'],
- monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun',
- 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'],
- dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'],
- dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'],
- dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'],
- weekHeader: 'Wk',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['af']);
-});
-
-/* Algerian Arabic Translation for jQuery UI date picker plugin. (can be used for Tunisia)*/
-/* Mohamed Cherif BOUCHELAGHEM -- che...@ya... */
-
-jQuery(function($){
- $.datepicker.regional['ar-DZ'] = {
- closeText: 'إغلاق',
- prevText: '<السابق',
- nextText: 'التالي>',
- currentText: 'اليوم',
- monthNames: ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان',
- 'جويلية', 'أوت', 'سبتمبر','أكتوبر', 'نوفمبر', 'ديسمبر'],
- monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
- dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
- dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
- dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
- weekHeader: 'أسبوع',
- dateFormat: 'dd/mm/yy',
- firstDay: 6,
- isRTL: true,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['ar-DZ']);
-});
-
-/* Arabic Translation for jQuery UI date picker plugin. */
-/* Khaled Alhourani -- me...@kh... */
-/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
-jQuery(function($){
- $.datepicker.regional['ar'] = {
- closeText: 'إغلاق',
- prevText: '<السابق',
- nextText: 'التالي>',
- currentText: 'اليوم',
- monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران',
- 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
- monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
- dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
- dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
- dayNamesMin: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
- weekHeader: 'أسبوع',
- dateFormat: 'dd/mm/yy',
- firstDay: 6,
- isRTL: true,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['ar']);
-});
-
-/* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */
-/* Written by Jamil Najafov (nec...@gm...). */
-jQuery(function($) {
- $.datepicker.regional['az'] = {
- closeText: 'Bağla',
- prevText: '<Geri',
- nextText: 'İrəli>',
- currentText: 'Bugün',
- monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun',
- 'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'],
- monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun',
- 'İyul','Avq','Sen','Okt','Noy','Dek'],
- dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'],
- dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'],
- dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'],
- weekHeader: 'Hf',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['az']);
-});
-
-/* Bulgarian initialisation for the jQuery UI date picker plugin. */
-/* Written by Stoyan Kyosev (http://svest.org). */
-jQuery(function($){
- $.datepicker.regional['bg'] = {
- closeText: 'затвори',
- prevText: '<назад',
- nextText: 'напред>',
- nextBigText: '>>',
- currentText: 'днес',
- monthNames: ['Януари','Февруари','Март','Април','Май','Юни',
- 'Юли','Август','Септември','Октомври','Ноември','Декември'],
- monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни',
- 'Юли','Авг','Сеп','Окт','Нов','Дек'],
- dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],
- dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'],
- dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'],
- weekHeader: 'Wk',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['bg']);
-});
-
-/* Bosnian i18n for the jQuery UI date picker plugin. */
-/* Written by Kenan Konjo. */
-jQuery(function($){
- $.datepicker.regional['bs'] = {
- closeText: 'Zatvori',
- prevText: '<',
- nextText: '>',
- currentText: 'Danas',
- monthNames: ['Januar','Februar','Mart','April','Maj','Juni',
- 'Juli','August','Septembar','Oktobar','Novembar','Decembar'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
- 'Jul','Aug','Sep','Okt','Nov','Dec'],
- dayNames: ['Nedelja','Ponedeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
- dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
- dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
- weekHeader: 'Wk',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['bs']);
-});
-
-/* Inicialització en català per a l'extensió 'UI date picker' per jQuery. */
-/* Writers: (joa...@gm...). */
-jQuery(function($){
- $.datepicker.regional['ca'] = {
- closeText: 'Tanca',
- prevText: 'Anterior',
- nextText: 'Següent',
- currentText: 'Avui',
- monthNames: ['gener','febrer','març','abril','maig','juny',
- 'juliol','agost','setembre','octubre','novembre','desembre'],
- monthNamesShort: ['gen','feb','març','abr','maig','juny',
- 'jul','ag','set','oct','nov','des'],
- dayNames: ['diumenge','dilluns','dimarts','dimecres','dijous','divendres','dissabte'],
- dayNamesShort: ['dg','dl','dt','dc','dj','dv','ds'],
- dayNamesMin: ['dg','dl','dt','dc','dj','dv','ds'],
- weekHeader: 'Set',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['ca']);
-});
-
-/* Czech initialisation for the jQuery UI date picker plugin. */
-/* Written by Tomas Muller (to...@to...). */
-jQuery(function($){
- $.datepicker.regional['cs'] = {
- closeText: 'Zavřít',
- prevText: '<Dříve',
- nextText: 'Později>',
- currentText: 'Nyní',
- monthNames: ['leden','únor','březen','duben','květen','červen',
- 'červenec','srpen','září','říjen','listopad','prosinec'],
- monthNamesShort: ['led','úno','bře','dub','kvě','čer',
- 'čvc','srp','zář','říj','lis','pro'],
- dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
- dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
- dayNamesMin: ['ne','po','út','st','čt','pá','so'],
- weekHeader: 'Týd',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['cs']);
-});
-
-/* Welsh/UK initialisation for the jQuery UI date picker plugin. */
-/* Written by William Griffiths. */
-jQuery(function($){
- $.datepicker.regional['cy-GB'] = {
- closeText: 'Done',
- prevText: 'Prev',
- nextText: 'Next',
- currentText: 'Today',
- monthNames: ['Ionawr','Chwefror','Mawrth','Ebrill','Mai','Mehefin',
- 'Gorffennaf','Awst','Medi','Hydref','Tachwedd','Rhagfyr'],
- monthNamesShort: ['Ion', 'Chw', 'Maw', 'Ebr', 'Mai', 'Meh',
- 'Gor', 'Aws', 'Med', 'Hyd', 'Tac', 'Rha'],
- dayNames: ['Dydd Sul', 'Dydd Llun', 'Dydd Mawrth', 'Dydd Mercher', 'Dydd Iau', 'Dydd Gwener', 'Dydd Sadwrn'],
- dayNamesShort: ['Sul', 'Llu', 'Maw', 'Mer', 'Iau', 'Gwe', 'Sad'],
- dayNamesMin: ['Su','Ll','Ma','Me','Ia','Gw','Sa'],
- weekHeader: 'Wy',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['cy-GB']);
-});
-
-/* Danish initialisation for the jQuery UI date picker plugin. */
-/* Written by Jan Christensen ( del...@gm...). */
-jQuery(function($){
- $.datepicker.regional['da'] = {
- closeText: 'Luk',
- prevText: '<Forrige',
- nextText: 'Næste>',
- currentText: 'Idag',
- monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
- 'Juli','August','September','Oktober','November','December'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
- 'Jul','Aug','Sep','Okt','Nov','Dec'],
- dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
- dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
- dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
- weekHeader: 'Uge',
- dateFormat: 'dd-mm-yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['da']);
-});
-
-/* German initialisation for the jQuery UI date picker plugin. */
-/* Written by Milian Wolff (ma...@mi...). */
-jQuery(function($){
- $.datepicker.regional['de'] = {
- closeText: 'schließen',
- prevText: '<zurück',
- nextText: 'Vor>',
- currentText: 'heute',
- monthNames: ['Januar','Februar','März','April','Mai','Juni',
- 'Juli','August','September','Oktober','November','Dezember'],
- monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
- 'Jul','Aug','Sep','Okt','Nov','Dez'],
- dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
- dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
- dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
- weekHeader: 'KW',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['de']);
-});
-
-/* Greek (el) initialisation for the jQuery UI date picker plugin. */
-/* Written by Alex Cicovic (http://www.alexcicovic.com) */
-jQuery(function($){
- $.datepicker.regional['el'] = {
- closeText: 'Κλείσιμο',
- prevText: 'Προηγούμενος',
- nextText: 'Επόμενος',
- currentText: 'Τρέχων Μήνας',
- monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
- 'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],
- monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν',
- 'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'],
- dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'],
- dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'],
- dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'],
- weekHeader: 'Εβδ',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['el']);
-});
-
-/* English/Australia initialisation for the jQuery UI date picker plugin. */
-/* Based on the en-GB initialisation. */
-jQuery(function($){
- $.datepicker.regional['en-AU'] = {
- closeText: 'Done',
- prevText: 'Prev',
- nextText: 'Next',
- currentText: 'Today',
- monthNames: ['January','February','March','April','May','June',
- 'July','August','September','October','November','December'],
- monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
- 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
- dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
- dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
- dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
- weekHeader: 'Wk',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['en-AU']);
-});
-
-/* English/UK initialisation for the jQuery UI date picker plugin. */
-/* Written by Stuart. */
-jQuery(function($){
- $.datepicker.regional['en-GB'] = {
- closeText: 'Done',
- prevText: 'Prev',
- nextText: 'Next',
- currentText: 'Today',
- monthNames: ['January','February','March','April','May','June',
- 'July','August','September','October','November','December'],
- monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
- 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
- dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
- dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
- dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
- weekHeader: 'Wk',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['en-GB']);
-});
-
-/* English/New Zealand initialisation for the jQuery UI date picker plugin. */
-/* Based on the en-GB initialisation. */
-jQuery(function($){
- $.datepicker.regional['en-NZ'] = {
- closeText: 'Done',
- prevText: 'Prev',
- nextText: 'Next',
- currentText: 'Today',
- monthNames: ['January','February','March','April','May','June',
- 'July','August','September','October','November','December'],
- monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
- 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
- dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
- dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
- dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
- weekHeader: 'Wk',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['en-NZ']);
-});
-
-/* Esperanto initialisation for the jQuery UI date picker plugin. */
-/* Written by Olivier M. (oli...@if...). */
-jQuery(function($){
- $.datepicker.regional['eo'] = {
- closeText: 'Fermi',
- prevText: '<Anta',
- nextText: 'Sekv>',
- currentText: 'Nuna',
- monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio',
- 'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
- 'Jul','Aŭg','Sep','Okt','Nov','Dec'],
- dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'],
- dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'],
- dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'],
- weekHeader: 'Sb',
- dateFormat: 'dd/mm/yy',
- firstDay: 0,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['eo']);
-});
-
-/* Inicialización en español para la extensión 'UI date picker' para jQuery. */
-/* Traducido por Vester (xv...@gm...). */
-jQuery(function($){
- $.datepicker.regional['es'] = {
- closeText: 'Cerrar',
- prevText: '<Ant',
- nextText: 'Sig>',
- currentText: 'Hoy',
- monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
- 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
- monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
- 'Jul','Ago','Sep','Oct','Nov','Dic'],
- dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
- dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
- dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'],
- weekHeader: 'Sm',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['es']);
-});
-
-/* Estonian initialisation for the jQuery UI date picker plugin. */
-/* Written by Mart Sõmermaa (mrts.pydev at gmail com). */
-jQuery(function($){
- $.datepicker.regional['et'] = {
- closeText: 'Sulge',
- prevText: 'Eelnev',
- nextText: 'Järgnev',
- currentText: 'Täna',
- monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni',
- 'Juuli','August','September','Oktoober','November','Detsember'],
- monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni',
- 'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'],
- dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'],
- dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'],
- dayNamesMin: ['P','E','T','K','N','R','L'],
- weekHeader: 'näd',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['et']);
-});
-
-/* Euskarako oinarria 'UI date picker' jquery-ko extentsioarentzat */
-/* Karrikas-ek itzulia (kar...@ka...) */
-jQuery(function($){
- $.datepicker.regional['eu'] = {
- closeText: 'Egina',
- prevText: '<Aur',
- nextText: 'Hur>',
- currentText: 'Gaur',
- monthNames: ['urtarrila','otsaila','martxoa','apirila','maiatza','ekaina',
- 'uztaila','abuztua','iraila','urria','azaroa','abendua'],
- monthNamesShort: ['urt.','ots.','mar.','api.','mai.','eka.',
- 'uzt.','abu.','ira.','urr.','aza.','abe.'],
- dayNames: ['igandea','astelehena','asteartea','asteazkena','osteguna','ostirala','larunbata'],
- dayNamesShort: ['ig.','al.','ar.','az.','og.','ol.','lr.'],
- dayNamesMin: ['ig','al','ar','az','og','ol','lr'],
- weekHeader: 'As',
- dateFormat: 'yy-mm-dd',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['eu']);
-});
-
-/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */
-/* Javad Mowlanezhad -- jm...@gm... */
-/* Jalali calendar should supported soon! (Its implemented but I have to test it) */
-jQuery(function($) {
- $.datepicker.regional['fa'] = {
- closeText: 'بستن',
- prevText: '<قبلی',
- nextText: 'بعدی>',
- currentText: 'امروز',
- monthNames: [
- 'فروردين',
- 'ارديبهشت',
- 'خرداد',
- 'تير',
- 'مرداد',
- 'شهريور',
- 'مهر',
- 'آبان',
- 'آذر',
- 'دی',
- 'بهمن',
- 'اسفند'
- ],
- monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
- dayNames: [
- 'يکشنبه',
- 'دوشنبه',
- 'سهشنبه',
- 'چهارشنبه',
- 'پنجشنبه',
- 'جمعه',
- 'شنبه'
- ],
- dayNamesShort: [
- 'ی',
- 'د',
- 'س',
- 'چ',
- 'پ',
- 'ج',
- 'ش'
- ],
- dayNamesMin: [
- 'ی',
- 'د',
- 'س',
- 'چ',
- 'پ',
- 'ج',
- 'ش'
- ],
- weekHeader: 'هف',
- dateFormat: 'yy/mm/dd',
- firstDay: 6,
- isRTL: true,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['fa']);
-});
-
-/* Finnish initialisation for the jQuery UI date picker plugin. */
-/* Written by Harri Kilpiö (har...@gm...). */
-jQuery(function($){
- $.datepicker.regional['fi'] = {
- closeText: 'Sulje',
- prevText: '«Edellinen',
- nextText: 'Seuraava»',
- currentText: 'Tänään',
- monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu',
- 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
- monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä',
- 'Heinä','Elo','Syys','Loka','Marras','Joulu'],
- dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','La'],
- dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
- dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
- weekHeader: 'Vk',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['fi']);
-});
-
-/* Faroese initialisation for the jQuery UI date picker plugin */
-/* Written by Sverri Mohr Olsen, sve...@gm... */
-jQuery(function($){
- $.datepicker.regional['fo'] = {
- closeText: 'Lat aftur',
- prevText: '<Fyrra',
- nextText: 'Næsta>',
- currentText: 'Í dag',
- monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni',
- 'Juli','August','September','Oktober','November','Desember'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
- 'Jul','Aug','Sep','Okt','Nov','Des'],
- dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','Fríggjadagur','Leyardagur'],
- dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','Frí','Ley'],
- dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'],
- weekHeader: 'Vk',
- dateFormat: 'dd-mm-yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['fo']);
-});
-
-/* Swiss-French initialisation for the jQuery UI date picker plugin. */
-/* Written Martin Voelkle (mar...@e-...). */
-jQuery(function($){
- $.datepicker.regional['fr-CH'] = {
- closeText: 'Fermer',
- prevText: '<Préc',
- nextText: 'Suiv>',
- currentText: 'Courant',
- monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
- 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
- monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
- 'Jul','Aoû','Sep','Oct','Nov','Déc'],
- dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
- dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
- dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
- weekHeader: 'Sm',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['fr-CH']);
-});
-
-/* French initialisation for the jQuery UI date picker plugin. */
-/* Written by Keith Wood (kbwood{at}iinet.com.au),
- Stéphane Nahmani (sh...@sh...),
- Stéphane Raimbault <ste...@gm...> */
-jQuery(function($){
- $.datepicker.regional['fr'] = {
- closeText: 'Fermer',
- prevText: 'Précédent',
- nextText: 'Suivant',
- currentText: 'Aujourd\'hui',
- monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
- 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
- monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
- 'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
- dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
- dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],
- dayNamesMin: ['D','L','M','M','J','V','S'],
- weekHeader: 'Sem.',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['fr']);
-});
-
-/* Galician localization for 'UI date picker' jQuery extension. */
-/* Translated by Jorge Barreiro <yor...@gm...>. */
-jQuery(function($){
- $.datepicker.regional['gl'] = {
- closeText: 'Pechar',
- prevText: '<Ant',
- nextText: 'Seg>',
- currentText: 'Hoxe',
- monthNames: ['Xaneiro','Febreiro','Marzo','Abril','Maio','Xuño',
- 'Xullo','Agosto','Setembro','Outubro','Novembro','Decembro'],
- monthNamesShort: ['Xan','Feb','Mar','Abr','Mai','Xuñ',
- 'Xul','Ago','Set','Out','Nov','Dec'],
- dayNames: ['Domingo','Luns','Martes','Mércores','Xoves','Venres','Sábado'],
- dayNamesShort: ['Dom','Lun','Mar','Mér','Xov','Ven','Sáb'],
- dayNamesMin: ['Do','Lu','Ma','Mé','Xo','Ve','Sá'],
- weekHeader: 'Sm',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['gl']);
-});
-
-/* Hebrew initialisation for the UI Datepicker extension. */
-/* Written by Amir Hardon (ahardon at gmail dot com). */
-jQuery(function($){
- $.datepicker.regional['he'] = {
- closeText: 'סגור',
- prevText: '<הקודם',
- nextText: 'הבא>',
- currentText: 'היום',
- monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני',
- 'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'],
- monthNamesShort: ['ינו','פבר','מרץ','אפר','מאי','יוני',
- 'יולי','אוג','ספט','אוק','נוב','דצמ'],
- dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
- dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
- dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
- weekHeader: 'Wk',
- dateFormat: 'dd/mm/yy',
- firstDay: 0,
- isRTL: true,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['he']);
-});
-
-/* Hindi initialisation for the jQuery UI date picker plugin. */
-/* Written by Michael Dawart. */
-jQuery(function($){
- $.datepicker.regional['hi'] = {
- closeText: 'बंद',
- prevText: 'पिछला',
- nextText: 'अगला',
- currentText: 'आज',
- monthNames: ['जनवरी ','फरवरी','मार्च','अप्रेल','मई','जून',
- 'जूलाई','अगस्त ','सितम्बर','अक्टूबर','नवम्बर','दिसम्बर'],
- monthNamesShort: ['जन', 'फर', 'मार्च', 'अप्रेल', 'मई', 'जून',
- 'जूलाई', 'अग', 'सित', 'अक्ट', 'नव', 'दि'],
- dayNames: ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरुवार', 'शुक्रवार', 'शनिवार'],
- dayNamesShort: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
- dayNamesMin: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
- weekHeader: 'हफ्ता',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['hi']);
-});
-
-/* Croatian i18n for the jQuery UI date picker plugin. */
-/* Written by Vjekoslav Nesek. */
-jQuery(function($){
- $.datepicker.regional['hr'] = {
- closeText: 'Zatvori',
- prevText: '<',
- nextText: '>',
- currentText: 'Danas',
- monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj',
- 'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'],
- monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip',
- 'Srp','Kol','Ruj','Lis','Stu','Pro'],
- dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
- dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
- dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
- weekHeader: 'Tje',
- dateFormat: 'dd.mm.yy.',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['hr']);
-});
-
-/* Hungarian initialisation for the jQuery UI date picker plugin. */
-/* Written by Istvan Karaszi (jq...@sp...). */
-jQuery(function($){
- $.datepicker.regional['hu'] = {
- closeText: 'bezár',
- prevText: 'vissza',
- nextText: 'előre',
- currentText: 'ma',
- monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
- 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
- monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
- 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
- dayNames: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
- dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
- dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
- weekHeader: 'Hét',
- dateFormat: 'yy.mm.dd.',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: true,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['hu']);
-});
-
-/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
-/* Written by Levon Zakaryan (lev...@gm...)*/
-jQuery(function($){
- $.datepicker.regional['hy'] = {
- closeText: 'Փակել',
- prevText: '<Նախ.',
- nextText: 'Հաջ.>',
- currentText: 'Այսօր',
- monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
- 'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
- monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս',
- 'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'],
- dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
- dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
- dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
- weekHeader: 'ՇԲՏ',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['hy']);
-});
-
-/* Indonesian initialisation for the jQuery UI date picker plugin. */
-/* Written by Deden Fathurahman (de...@gm...). */
-jQuery(function($){
- $.datepicker.regional['id'] = {
- closeText: 'Tutup',
- prevText: '<mundur',
- nextText: 'maju>',
- currentText: 'hari ini',
- monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
- 'Juli','Agustus','September','Oktober','Nopember','Desember'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
- 'Jul','Agus','Sep','Okt','Nop','Des'],
- dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
- dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
- dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
- weekHeader: 'Mg',
- dateFormat: 'dd/mm/yy',
- firstDay: 0,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['id']);
-});
-
-/* Icelandic initialisation for the jQuery UI date picker plugin. */
-/* Written by Haukur H. Thorsson (ha...@es...). */
-jQuery(function($){
- $.datepicker.regional['is'] = {
- closeText: 'Loka',
- prevText: '< Fyrri',
- nextText: 'Næsti >',
- currentText: 'Í dag',
- monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní',
- 'Júlí','Ágúst','September','Október','Nóvember','Desember'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún',
- 'Júl','Ágú','Sep','Okt','Nóv','Des'],
- dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'],
- dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'],
- dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'],
- weekHeader: 'Vika',
- dateFormat: 'dd/mm/yy',
- firstDay: 0,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['is']);
-});
-
-/* Italian initialisation for the jQuery UI date picker plugin. */
-/* Written by Antonello Pasella (ant...@gm...). */
-jQuery(function($){
- $.datepicker.regional['it'] = {
- closeText: 'Chiudi',
- prevText: '<Prec',
- nextText: 'Succ>',
- currentText: 'Oggi',
- monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
- 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
- monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
- 'Lug','Ago','Set','Ott','Nov','Dic'],
- dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
- dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
- dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
- weekHeader: 'Sm',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['it']);
-});
-
-/* Japanese initialisation for the jQuery UI date picker plugin. */
-/* Written by Kentaro SATO (ke...@ra...). */
-jQuery(function($){
- $.datepicker.regional['ja'] = {
- closeText: '閉じる',
- prevText: '<前',
- nextText: '次>',
- currentText: '今日',
- monthNames: ['1月','2月','3月','4月','5月','6月',
- '7月','8月','9月','10月','11月','12月'],
- monthNamesShort: ['1月','2月','3月','4月','5月','6月',
- '7月','8月','9月','10月','11月','12月'],
- dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'],
- dayNamesShort: ['日','月','火','水','木','金','土'],
- dayNamesMin: ['日','月','火','水','木','金','土'],
- weekHeader: '週',
- dateFormat: 'yy/mm/dd',
- firstDay: 0,
- isRTL: false,
- showMonthAfterYear: true,
- yearSuffix: '年'};
- $.datepicker.setDefaults($.datepicker.regional['ja']);
-});
-
-/* Georgian (UTF-8) initialisation for the jQuery UI date picker plugin. */
-/* Written by Lado Lomidze (lad...@gm...). */
-jQuery(function($){
- $.datepicker.regional['ka'] = {
- closeText: 'დახურვა',
- prevText: '< წინა',
- nextText: 'შემდეგი >',
- currentText: 'დღეს',
- monthNames: ['იანვარი','თებერვალი','მარტი','აპრილი','მაისი','ივნისი', 'ივლისი','აგვისტო','სექტემბერი','ოქტომბერი','ნოემბერი','დეკემბერი'],
- monthNamesShort: ['იან','თებ','მარ','აპრ','მაი','ივნ', 'ივლ','აგვ','სექ','ოქტ','ნოე','დეკ'],
- dayNames: ['კვირა','ორშაბათი','სამშაბათი','ოთხშაბათი','ხუთშაბათი','პარასკევი','შაბათი'],
- dayNamesShort: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
- dayNamesMin: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
- weekHeader: 'კვირა',
- dateFormat: 'dd-mm-yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['ka']);
-});
-
-/* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */
-/* Written by Dmitriy Karasyov (dmi...@gm...). */
-jQuery(function($){
- $.datepicker.regional['kk'] = {
- closeText: 'Жабу',
- prevText: '<Алдыңғы',
- nextText: 'Келесі>',
- currentText: 'Бүгін',
- monthNames: ['Қаңтар','Ақпан','Наурыз','Сәуір','Мамыр','Маусым',
- 'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','Желтоқсан'],
- monthNamesShort: ['Қаң','Ақп','Нау','Сәу','Мам','Мау',
- 'Шіл','Там','Қыр','Қаз','Қар','Жел'],
- dayNames: ['Жексенбі','Дүйсенбі','Сейсенбі','Сәрсенбі','Бейсенбі','Жұма','Сенбі'],
- dayNamesShort: ['жкс','дсн','ссн','срс','бсн','жма','снб'],
- dayNamesMin: ['Жк','Дс','Сс','Ср','Бс','Жм','Сн'],
- weekHeader: 'Не',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['kk']);
-});
-
-/* Khmer initialisation for the jQuery calendar extension. */
-/* Written by Chandara Om (cha...@gm...). */
-jQuery(function($){
- $.datepicker.regional['km'] = {
- closeText: 'ធ្វើរួច',
- prevText: 'មុន',
- nextText: 'បន្ទាប់',
- currentText: 'ថ្ងៃនេះ',
- monthNames: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
- 'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
- monthNamesShort: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
- 'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
- dayNames: ['អាទិត្យ', 'ចន្ទ', 'អង្គារ', 'ពុធ', 'ព្រហស្បតិ៍', 'សុក្រ', 'សៅរ៍'],
- dayNamesShort: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
- dayNamesMin: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
- weekHeader: 'សប្ដាហ៍',
- dateFormat: 'dd-mm-yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['km']);
-});
-
-/* Korean initialisation for the jQuery calendar extension. */
-/* Written by DaeKwon Kang (ncr...@gm...), Edited by Genie. */
-jQuery(function($){
- $.datepicker.regional['ko'] = {
- closeText: '닫기',
- prevText: '이전달',
- nextText: '다음달',
- currentText: '오늘',
- monthNames: ['1월','2월','3월','4월','5월','6월',
- '7월','8월','9월','10월','11월','12월'],
- monthNamesShort: ['1월','2월','3월','4월','5월','6월',
- '7월','8월','9월','10월','11월','12월'],
- dayNames: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'],
- dayNamesShort: ['일','월','화','수','목','금','토'],
- dayNamesMin: ['일','월','화','수','목','금','토'],
- weekHeader: 'Wk',
- dateFormat: 'yy-mm-dd',
- firstDay: 0,
- isRTL: false,
- showMonthAfterYear: true,
- yearSuffix: '년'};
- $.datepicker.setDefaults($.datepicker.regional['ko']);
-});
-
-/* Luxembourgish initialisation for the jQuery UI date picker plugin. */
-/* Written by Michel Weimerskirch <mi...@we...> */
-jQuery(function($){
- $.datepicker.regional['lb'] = {
- closeText: 'Fäerdeg',
- prevText: 'Zréck',
- nextText: 'Weider',
- currentText: 'Haut',
- monthNames: ['Januar','Februar','Mäerz','Abrëll','Mee','Juni',
- 'Juli','August','September','Oktober','November','Dezember'],
- monthNamesShort: ['Jan', 'Feb', 'Mäe', 'Abr', 'Mee', 'Jun',
- 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
- dayNames: ['Sonndeg', 'Méindeg', 'Dënschdeg', 'Mëttwoch', 'Donneschdeg', 'Freideg', 'Samschdeg'],
- dayNamesShort: ['Son', 'Méi', 'Dën', 'Mët', 'Don', 'Fre', 'Sam'],
- dayNamesMin: ['So','Mé','Dë','Më','Do','Fr','Sa'],
- weekHeader: 'W',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['lb']);
-});
-
-/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
-/* @author Arturas Paleicikas <ar...@av...> */
-jQuery(function($){
- $.datepicker.regional['lt'] = {
- closeText: 'Uždaryti',
- prevText: '<Atgal',
- nextText: 'Pirmyn>',
- currentText: 'Šiandien',
- monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
- 'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
- monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir',
- 'Lie','Rugp','Rugs','Spa','Lap','Gru'],
- dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],
- dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
- dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'],
- weekHeader: 'Wk',
- dateFormat: 'yy-mm-dd',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['lt']);
-});
-
-/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
-/* @author Arturas Paleicikas <art...@me...> */
-jQuery(function($){
- $.datepicker.regional['lv'] = {
- closeText: 'Aizvērt',
- prevText: 'Iepr',
- nextText: 'Nāka',
- currentText: 'Šodien',
- monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs',
- 'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn',
- 'Jūl','Aug','Sep','Okt','Nov','Dec'],
- dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
- dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
- dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
- weekHeader: 'Nav',
- dateFormat: 'dd-mm-yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['lv']);
-});
-
-/* Macedonian i18n for the jQuery UI date picker plugin. */
-/* Written by Stojce Slavkovski. */
-jQuery(function($){
- $.datepicker.regional['mk'] = {
- closeText: 'Затвори',
- prevText: '<',
- nextText: '>',
- currentText: 'Денес',
- monthNames: ['Јануари','Февруари','Март','Април','Мај','Јуни',
- 'Јули','Август','Септември','Октомври','Ноември','Декември'],
- monthNamesShort: ['Јан','Фев','Мар','Апр','Мај','Јун',
- 'Јул','Авг','Сеп','Окт','Ное','Дек'],
- dayNames: ['Недела','Понеделник','Вторник','Среда','Четврток','Петок','Сабота'],
- dayNamesShort: ['Нед','Пон','Вто','Сре','Чет','Пет','Саб'],
- dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Са'],
- weekHeader: 'Сед',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['mk']);
-});
-
-/* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */
-/* Written by Saji Nediyanchath (sa...@gm...). */
-jQuery(function($){
- $.datepicker.regional['ml'] = {
- closeText: 'ശരി',
- prevText: 'മുന്നത്തെ',
- nextText: 'അടുത്തത് ',
- currentText: 'ഇന്ന്',
- monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്ച്ച്','ഏപ്രില്','മേയ്','ജൂണ്',
- 'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്','ഒക്ടോബര്','നവംബര്','ഡിസംബര്'],
- monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്', 'ഏപ്രി', 'മേയ്', 'ജൂണ്',
- 'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'],
- dayNames: ['ഞായര്', 'തിങ്കള്', 'ചൊവ്വ', 'ബുധന്', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
- dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
- dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'],
- weekHeader: 'ആ',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['ml']);
-});
-
-/* Malaysian initialisation for the jQuery UI date picker plugin. */
-/* Written by Mohd Nawawi Mohamad Jamili (na...@ro...). */
-jQuery(function($){
- $.datepicker.regional['ms'] = {
- closeText: 'Tutup',
- prevText: '<Sebelum',
- nextText: 'Selepas>',
- currentText: 'hari ini',
- monthNames: ['Januari','Februari','Mac','April','Mei','Jun',
- 'Julai','Ogos','September','Oktober','November','Disember'],
- monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun',
- 'Jul','Ogo','Sep','Okt','Nov','Dis'],
- dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'],
- dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'],
- dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'],
- weekHeader: 'Mg',
- dateFormat: 'dd/mm/yy',
- firstDay: 0,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['ms']);
-});
-
-/* Dutch (Belgium) initialisation for the jQuery UI date picker plugin. */
-/* David De Sloovere @DavidDeSloovere */
-jQuery(function($){
- $.datepicker.regional['nl-BE'] = {
- closeText: 'Sluiten',
- prevText: '←',
- nextText: '→',
- currentText: 'Vandaag',
- monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
- 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
- monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
- 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
- dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
- dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
- dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
- weekHeader: 'Wk',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['nl-BE']);
-});
-
-/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
-/* Written by Mathias Bynens <http://mathiasbynens.be/> */
-jQuery(function($){
- $.datepicker.regional.nl = {
- closeText: 'Sluiten',
- prevText: '←',
- nextText: '→',
- currentText: 'Vandaag',
- monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
- 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
- monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
- 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
- dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
- dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
- dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
- weekHeader: 'Wk',
- dateFormat: 'dd-mm-yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional.nl);
-});
-
-/* Norwegian initialisation for the jQuery UI date picker plugin. */
-/* Written by Naimdjon Takhirov (nai...@gm...). */
-
-jQuery(function($){
- $.datepicker.regional['no'] = {
- closeText: 'Lukk',
- prevText: '«Forrige',
- nextText: 'Neste»',
- currentText: 'I dag',
- monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
- monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
- dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'],
- dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'],
- dayNamesMin: ['sø','ma','ti','on','to','fr','lø'],
- weekHeader: 'Uke',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''
- };
- $.datepicker.setDefaults($.datepicker.regional['no']);
-});
-
-/* Polish initialisation for the jQuery UI date picker plugin. */
-/* Written by Jacek Wysocki (jac...@gm...). */
-jQuery(function($){
- $.datepicker.regional['pl'] = {
- closeText: 'Zamknij',
- prevText: '<Poprzedni',
- nextText: 'Następny>',
- currentText: 'Dziś',
- monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
- 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
- monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
- 'Lip','Sie','Wrz','Pa','Lis','Gru'],
- dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
- dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
- dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
- weekHeader: 'Tydz',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['pl']);
-});
-
-/* Brazilian initialisation for the jQuery UI date picker plugin. */
-/* Written by Leonildo Costa Silva (leo...@gm...). */
-jQuery(function($){
- $.datepicker.regional['pt-BR'] = {
- closeText: 'Fechar',
- prevText: '<Anterior',
- nextText: 'Próximo>',
- currentText: 'Hoje',
- monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
- 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
- monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
- 'Jul','Ago','Set','Out','Nov','Dez'],
- dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
- dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
- dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
- weekHeader: 'Sm',
- dateFormat: 'dd/mm/yy',
- firstDay: 0,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['pt-BR']);
-});
-
-/* Portuguese initialisation for the jQuery UI date picker plugin. */
-jQuery(function($){
- $.datepicker.regional['pt'] = {
- closeText: 'Fechar',
- prevText: '<Anterior',
- nextText: 'Seguinte',
- currentText: 'Hoje',
- monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
- 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
- monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
- 'Jul','Ago','Set','Out','Nov','Dez'],
- dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
- dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
- dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
- weekHeader: 'Sem',
- dateFormat: 'dd/mm/yy',
- firstDay: 0,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['pt']);
-});
-
-/* Romansh initialisation for the jQuery UI date picker plugin. */
-/* Written by Yvonne Gienal (yvo...@ed...). */
-jQuery(function($){
- $.datepicker.regional['rm'] = {
- closeText: 'Serrar',
- prevText: '<Suandant',
- nextText: 'Precedent>',
- currentText: 'Actual',
- monthNames: ['Schaner','Favrer','Mars','Avrigl','Matg','Zercladur', 'Fanadur','Avust','Settember','October','November','December'],
- monthNamesShort: ['Scha','Fev','Mar','Avr','Matg','Zer', 'Fan','Avu','Sett','Oct','Nov','Dec'],
- dayNames: ['Dumengia','Glindesdi','Mardi','Mesemna','Gievgia','Venderdi','Sonda'],
- dayNamesShort: ['Dum','Gli','Mar','Mes','Gie','Ven','Som'],
- dayNamesMin: ['Du','Gl','Ma','Me','Gi','Ve','So'],
- weekHeader: 'emna',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['rm']);
-});
-
-/* Romanian initialisation for the jQuery UI date picker plugin.
- *
- * Written by Edmond L. (ll_...@wa...)
- * and Ionut G. Stan (ion...@gm...)
- */
-jQuery(function($){
- $.datepicker.regional['ro'] = {
- closeText: 'Închide',
- prevText: '« Luna precedentă',
- nextText: 'Luna următoare »',
- currentText: 'Azi',
- monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie',
- 'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
- monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun',
- 'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
- dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'],
- dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
- dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'],
- weekHeader: 'Săpt',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['ro']);
-});
-
-/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
-/* Written by Andrew Stromnov (str...@gm...). */
-jQuery(function($){
- $.datepicker.regional['ru'] = {
- closeText: 'Закрыть',
- prevText: '<Пред',
- nextText: 'След>',
- currentText: 'Сегодня',
- monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
- 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
- monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
- 'Июл','Авг','Сен','Окт','Ноя','Дек'],
- dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
- dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
- dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
- weekHeader: 'Нед',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['ru']);
-});
-
-/* Slovak initialisation for the jQuery UI date picker plugin. */
-/* Written by Vojtech Rinik (vo...@hm...). */
-jQuery(function($){
- $.datepicker.regional['sk'] = {
- closeText: 'Zavrieť',
- prevText: '<Predchádzajúci',
- nextText: 'Nasledujúci>',
- currentText: 'Dnes',
- monthNames: ['Január','Február','Marec','Apríl','Máj','Jún',
- 'Júl','August','September','Október','November','December'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
- 'Júl','Aug','Sep','Okt','Nov','Dec'],
- dayNames: ['Nedeľa','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'],
- dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'],
- dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
- weekHeader: 'Ty',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['sk']);
-});
-
-/* Slovenian initialisation for the jQuery UI date picker plugin. */
-/* Written by Jaka Jancar (ja...@ku...). */
-/* c = č, s = š z = ž C = Č S = Š Z = Ž */
-jQuery(function($){
- $.datepicker.regional['sl'] = {
- closeText: 'Zapri',
- prevText: '<Prejšnji',
- nextText: 'Naslednji>',
- currentText: 'Trenutni',
- monthNames: ['Januar','Februar','Marec','April','Maj','Junij',
- 'Julij','Avgust','September','Oktober','November','December'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
- 'Jul','Avg','Sep','Okt','Nov','Dec'],
- dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'],
- dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'],
- dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'],
- weekHeader: 'Teden',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['sl']);
-});
-
-/* Albanian initialisation for the jQuery UI date picker plugin. */
-/* Written by Flakron Bytyqi (fl...@gm...). */
-jQuery(function($){
- $.datepicker.regional['sq'] = {
- closeText: 'mbylle',
- prevText: '<mbrapa',
- nextText: 'Përpara>',
- currentText: 'sot',
- monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor',
- 'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'],
- monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer',
- 'Kor','Gus','Sht','Tet','Nën','Dhj'],
- dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'],
- dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'],
- dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'],
- weekHeader: 'Ja',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['sq']);
-});
-
-/* Serbian i18n for the jQuery UI date picker plugin. */
-/* Written by Dejan Dimić. */
-jQuery(function($){
- $.datepicker.regional['sr-SR'] = {
- closeText: 'Zatvori',
- prevText: '<',
- nextText: '>',
- currentText: 'Danas',
- monthNames: ['Januar','Februar','Mart','April','Maj','Jun',
- 'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
- 'Jul','Avg','Sep','Okt','Nov','Dec'],
- dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'],
- dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'],
- dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
- weekHeader: 'Sed',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['sr-SR']);
-});
-
-/* Serbian i18n for the jQuery UI date picker plugin. */
-/* Written by Dejan Dimić. */
-jQuery(function($){
- $.datepicker.regional['sr'] = {
- closeText: 'Затвори',
- prevText: '<',
- nextText: '>',
- currentText: 'Данас',
- monthNames: ['Јануар','Фебруар','Март','Април','Мај','Јун',
- 'Јул','Август','Септембар','Октобар','Новембар','Децембар'],
- monthNamesShort: ['Јан','Феб','Мар','Апр','Мај','Јун',
- 'Јул','Авг','Сеп','Окт','Нов','Дец'],
- dayNames: ['Недеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'],
- dayNamesShort: ['Нед','Пон','Уто','Сре','Чет','Пет','Суб'],
- dayNamesMin: ['Не','По','Ут','Ср','Че','Пе','Су'],
- weekHeader: 'Сед',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['sr']);
-});
-
-/* Swedish initialisation for the jQuery UI date picker plugin. */
-/* Written by Anders Ekdahl ( an...@no...). */
-jQuery(function($){
- $.datepicker.regional['sv'] = {
- closeText: 'Stäng',
- prevText: '«Förra',
- nextText: 'Nästa»',
- currentText: 'Idag',
- monthNames: ['Januari','Februari','Mars','April','Maj','Juni',
- 'Juli','Augusti','September','Oktober','November','December'],
- monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
- 'Jul','Aug','Sep','Okt','Nov','Dec'],
- dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
- dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
- dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
- weekHeader: 'Ve',
- dateFormat: 'yy-mm-dd',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['sv']);
-});
-
-/* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */
-/* Written by S A Sureshkumar (sas...@li...). */
-jQuery(function($){
- $.datepicker.regional['ta'] = {
- closeText: 'மூடு',
- prevText: 'முன்னையது',
- nextText: 'அடுத்தது',
- currentText: 'இன்று',
- monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி',
- 'ஆடி','ஆவணி','புரட்டாசி','ஐப்பசி','கார்த்திகை','மார்கழி'],
- monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி',
- 'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'],
- dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'],
- dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'],
- dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'],
- weekHeader: 'Не',
- dateFormat: 'dd/mm/yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['ta']);
-});
-
-/* Thai initialisation for the jQuery UI date picker plugin. */
-/* Written by pipo (pi...@si...). */
-jQuery(function($){
- $.datepicker.regional['th'] = {
- closeText: 'ปิด',
- prevText: '« ย้อน',
- nextText: 'ถัดไป »',
- currentText: 'วันนี้',
- monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
- 'กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
- monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
- 'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
- dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
- dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
- dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
- weekHeader: 'Wk',
- dateFormat: 'dd/mm/yy',
- firstDay: 0,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['th']);
-});
-
-/* Tajiki (UTF-8) initialisation for the jQuery UI date picker plugin. */
-/* Written by Abdurahmon Saidov (sai...@gm...). */
-jQuery(function($){
- $.datepicker.regional['tj'] = {
- closeText: 'Идома',
- prevText: '<Қафо',
- nextText: 'Пеш>',
- currentText: 'Имрӯз',
- monthNames: ['Январ','Феврал','Март','Апрел','Май','Июн',
- 'Июл','Август','Сентябр','Октябр','Ноябр','Декабр'],
- monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
- 'Июл','Авг','Сен','Окт','Ноя','Дек'],
- dayNames: ['якшанбе','душанбе','сешанбе','чоршанбе','панҷшанбе','ҷумъа','шанбе'],
- dayNamesShort: ['якш','душ','сеш','чор','пан','ҷум','шан'],
- dayNamesMin: ['Як','Дш','Сш','Чш','Пш','Ҷм','Шн'],
- weekHeader: 'Хф',
- dateFormat: 'dd.mm.yy',
- firstDay: 1,
- isRTL: false,
- showMonthAfterYear: false,
- yearSuffix: ''};
- $.datepicker.setDefaults($.datepicker.regional['tj']);
-});
-
-/* Turkish initialisation for the jQuery UI date picker plugin. */
-/* Written by Izzet Emre Erkan (ka...@ka...). */
-jQuery(function($){
- $.datepicker.regional['tr'] = {
- clos...
[truncated message content] |
|
From: <gem...@li...> - 2012-12-27 13:49:22
|
Revision: 1070
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1070&view=rev
Author: matijsdejong
Date: 2012-12-27 13:49:10 +0000 (Thu, 27 Dec 2012)
Log Message:
-----------
Added jquery 1.8.3 files to templates
Added Paths:
-----------
trunk/templates/jquery/
trunk/templates/jquery/Development/
trunk/templates/jquery/Development/i18n/
trunk/templates/jquery/Development/i18n/jquery-ui-i18n.js
trunk/templates/jquery/Development/i18n/jquery.ui.datepicker-de.js
trunk/templates/jquery/Development/i18n/jquery.ui.datepicker-nl.js
trunk/templates/jquery/Development/jquery-1.8.3.js
trunk/templates/jquery/Development/jquery-ui-1.9.2.js
trunk/templates/jquery/Production/
trunk/templates/jquery/Production/i18n/
trunk/templates/jquery/Production/i18n/jquery-ui-i18n.js
trunk/templates/jquery/Production/i18n/jquery.ui.datepicker-de.js
trunk/templates/jquery/Production/i18n/jquery.ui.datepicker-nl.js
trunk/templates/jquery/Production/jquery-1.8.3.js
trunk/templates/jquery/Production/jquery-ui-1.9.2.js
Added: trunk/templates/jquery/Development/i18n/jquery-ui-i18n.js
===================================================================
--- trunk/templates/jquery/Development/i18n/jquery-ui-i18n.js (rev 0)
+++ trunk/templates/jquery/Development/i18n/jquery-ui-i18n.js 2012-12-27 13:49:10 UTC (rev 1070)
@@ -0,0 +1,1675 @@
+/*! jQuery UI - v1.9.2 - 2012-11-23
+* http://jqueryui.com
+* Includes: jquery.ui.datepicker-af.js, jquery.ui.datepicker-ar-DZ.js, jquery.ui.datepicker-ar.js, jquery.ui.datepicker-az.js, jquery.ui.datepicker-bg.js, jquery.ui.datepicker-bs.js, jquery.ui.datepicker-ca.js, jquery.ui.datepicker-cs.js, jquery.ui.datepicker-cy-GB.js, jquery.ui.datepicker-da.js, jquery.ui.datepicker-de.js, jquery.ui.datepicker-el.js, jquery.ui.datepicker-en-AU.js, jquery.ui.datepicker-en-GB.js, jquery.ui.datepicker-en-NZ.js, jquery.ui.datepicker-eo.js, jquery.ui.datepicker-es.js, jquery.ui.datepicker-et.js, jquery.ui.datepicker-eu.js, jquery.ui.datepicker-fa.js, jquery.ui.datepicker-fi.js, jquery.ui.datepicker-fo.js, jquery.ui.datepicker-fr-CH.js, jquery.ui.datepicker-fr.js, jquery.ui.datepicker-gl.js, jquery.ui.datepicker-he.js, jquery.ui.datepicker-hi.js, jquery.ui.datepicker-hr.js, jquery.ui.datepicker-hu.js, jquery.ui.datepicker-hy.js, jquery.ui.datepicker-id.js, jquery.ui.datepicker-is.js, jquery.ui.datepicker-it.js, jquery.ui.datepicker-ja.js, jquery.ui.datepicker-ka.js, jquery.ui.datepicker-kk.js, jquery.ui.datepicker-km.js, jquery.ui.datepicker-ko.js, jquery.ui.datepicker-lb.js, jquery.ui.datepicker-lt.js, jquery.ui.datepicker-lv.js, jquery.ui.datepicker-mk.js, jquery.ui.datepicker-ml.js, jquery.ui.datepicker-ms.js, jquery.ui.datepicker-nl-BE.js, jquery.ui.datepicker-nl.js, jquery.ui.datepicker-no.js, jquery.ui.datepicker-pl.js, jquery.ui.datepicker-pt-BR.js, jquery.ui.datepicker-pt.js, jquery.ui.datepicker-rm.js, jquery.ui.datepicker-ro.js, jquery.ui.datepicker-ru.js, jquery.ui.datepicker-sk.js, jquery.ui.datepicker-sl.js, jquery.ui.datepicker-sq.js, jquery.ui.datepicker-sr-SR.js, jquery.ui.datepicker-sr.js, jquery.ui.datepicker-sv.js, jquery.ui.datepicker-ta.js, jquery.ui.datepicker-th.js, jquery.ui.datepicker-tj.js, jquery.ui.datepicker-tr.js, jquery.ui.datepicker-uk.js, jquery.ui.datepicker-vi.js, jquery.ui.datepicker-zh-CN.js, jquery.ui.datepicker-zh-HK.js, jquery.ui.datepicker-zh-TW.js
+* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */
+
+/* Afrikaans initialisation for the jQuery UI date picker plugin. */
+/* Written by Renier Pretorius. */
+jQuery(function($){
+ $.datepicker.regional['af'] = {
+ closeText: 'Selekteer',
+ prevText: 'Vorige',
+ nextText: 'Volgende',
+ currentText: 'Vandag',
+ monthNames: ['Januarie','Februarie','Maart','April','Mei','Junie',
+ 'Julie','Augustus','September','Oktober','November','Desember'],
+ monthNamesShort: ['Jan', 'Feb', 'Mrt', 'Apr', 'Mei', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Des'],
+ dayNames: ['Sondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrydag', 'Saterdag'],
+ dayNamesShort: ['Son', 'Maa', 'Din', 'Woe', 'Don', 'Vry', 'Sat'],
+ dayNamesMin: ['So','Ma','Di','Wo','Do','Vr','Sa'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['af']);
+});
+
+/* Algerian Arabic Translation for jQuery UI date picker plugin. (can be used for Tunisia)*/
+/* Mohamed Cherif BOUCHELAGHEM -- che...@ya... */
+
+jQuery(function($){
+ $.datepicker.regional['ar-DZ'] = {
+ closeText: 'إغلاق',
+ prevText: '<السابق',
+ nextText: 'التالي>',
+ currentText: 'اليوم',
+ monthNames: ['جانفي', 'فيفري', 'مارس', 'أفريل', 'ماي', 'جوان',
+ 'جويلية', 'أوت', 'سبتمبر','أكتوبر', 'نوفمبر', 'ديسمبر'],
+ monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
+ dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesMin: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ weekHeader: 'أسبوع',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 6,
+ isRTL: true,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ar-DZ']);
+});
+
+/* Arabic Translation for jQuery UI date picker plugin. */
+/* Khaled Alhourani -- me...@kh... */
+/* NOTE: monthNames are the original months names and they are the Arabic names, not the new months name فبراير - يناير and there isn't any Arabic roots for these months */
+jQuery(function($){
+ $.datepicker.regional['ar'] = {
+ closeText: 'إغلاق',
+ prevText: '<السابق',
+ nextText: 'التالي>',
+ currentText: 'اليوم',
+ monthNames: ['كانون الثاني', 'شباط', 'آذار', 'نيسان', 'مايو', 'حزيران',
+ 'تموز', 'آب', 'أيلول', 'تشرين الأول', 'تشرين الثاني', 'كانون الأول'],
+ monthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
+ dayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesShort: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],
+ dayNamesMin: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],
+ weekHeader: 'أسبوع',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 6,
+ isRTL: true,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ar']);
+});
+
+/* Azerbaijani (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Jamil Najafov (nec...@gm...). */
+jQuery(function($) {
+ $.datepicker.regional['az'] = {
+ closeText: 'Bağla',
+ prevText: '<Geri',
+ nextText: 'İrəli>',
+ currentText: 'Bugün',
+ monthNames: ['Yanvar','Fevral','Mart','Aprel','May','İyun',
+ 'İyul','Avqust','Sentyabr','Oktyabr','Noyabr','Dekabr'],
+ monthNamesShort: ['Yan','Fev','Mar','Apr','May','İyun',
+ 'İyul','Avq','Sen','Okt','Noy','Dek'],
+ dayNames: ['Bazar','Bazar ertəsi','Çərşənbə axşamı','Çərşənbə','Cümə axşamı','Cümə','Şənbə'],
+ dayNamesShort: ['B','Be','Ça','Ç','Ca','C','Ş'],
+ dayNamesMin: ['B','B','Ç','С','Ç','C','Ş'],
+ weekHeader: 'Hf',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['az']);
+});
+
+/* Bulgarian initialisation for the jQuery UI date picker plugin. */
+/* Written by Stoyan Kyosev (http://svest.org). */
+jQuery(function($){
+ $.datepicker.regional['bg'] = {
+ closeText: 'затвори',
+ prevText: '<назад',
+ nextText: 'напред>',
+ nextBigText: '>>',
+ currentText: 'днес',
+ monthNames: ['Януари','Февруари','Март','Април','Май','Юни',
+ 'Юли','Август','Септември','Октомври','Ноември','Декември'],
+ monthNamesShort: ['Яну','Фев','Мар','Апр','Май','Юни',
+ 'Юли','Авг','Сеп','Окт','Нов','Дек'],
+ dayNames: ['Неделя','Понеделник','Вторник','Сряда','Четвъртък','Петък','Събота'],
+ dayNamesShort: ['Нед','Пон','Вто','Сря','Чет','Пет','Съб'],
+ dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Съ'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['bg']);
+});
+
+/* Bosnian i18n for the jQuery UI date picker plugin. */
+/* Written by Kenan Konjo. */
+jQuery(function($){
+ $.datepicker.regional['bs'] = {
+ closeText: 'Zatvori',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Danas',
+ monthNames: ['Januar','Februar','Mart','April','Maj','Juni',
+ 'Juli','August','Septembar','Oktobar','Novembar','Decembar'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['Nedelja','Ponedeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
+ dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
+ dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['bs']);
+});
+
+/* Inicialització en català per a l'extensió 'UI date picker' per jQuery. */
+/* Writers: (joa...@gm...). */
+jQuery(function($){
+ $.datepicker.regional['ca'] = {
+ closeText: 'Tanca',
+ prevText: 'Anterior',
+ nextText: 'Següent',
+ currentText: 'Avui',
+ monthNames: ['gener','febrer','març','abril','maig','juny',
+ 'juliol','agost','setembre','octubre','novembre','desembre'],
+ monthNamesShort: ['gen','feb','març','abr','maig','juny',
+ 'jul','ag','set','oct','nov','des'],
+ dayNames: ['diumenge','dilluns','dimarts','dimecres','dijous','divendres','dissabte'],
+ dayNamesShort: ['dg','dl','dt','dc','dj','dv','ds'],
+ dayNamesMin: ['dg','dl','dt','dc','dj','dv','ds'],
+ weekHeader: 'Set',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ca']);
+});
+
+/* Czech initialisation for the jQuery UI date picker plugin. */
+/* Written by Tomas Muller (to...@to...). */
+jQuery(function($){
+ $.datepicker.regional['cs'] = {
+ closeText: 'Zavřít',
+ prevText: '<Dříve',
+ nextText: 'Později>',
+ currentText: 'Nyní',
+ monthNames: ['leden','únor','březen','duben','květen','červen',
+ 'červenec','srpen','září','říjen','listopad','prosinec'],
+ monthNamesShort: ['led','úno','bře','dub','kvě','čer',
+ 'čvc','srp','zář','říj','lis','pro'],
+ dayNames: ['neděle', 'pondělí', 'úterý', 'středa', 'čtvrtek', 'pátek', 'sobota'],
+ dayNamesShort: ['ne', 'po', 'út', 'st', 'čt', 'pá', 'so'],
+ dayNamesMin: ['ne','po','út','st','čt','pá','so'],
+ weekHeader: 'Týd',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['cs']);
+});
+
+/* Welsh/UK initialisation for the jQuery UI date picker plugin. */
+/* Written by William Griffiths. */
+jQuery(function($){
+ $.datepicker.regional['cy-GB'] = {
+ closeText: 'Done',
+ prevText: 'Prev',
+ nextText: 'Next',
+ currentText: 'Today',
+ monthNames: ['Ionawr','Chwefror','Mawrth','Ebrill','Mai','Mehefin',
+ 'Gorffennaf','Awst','Medi','Hydref','Tachwedd','Rhagfyr'],
+ monthNamesShort: ['Ion', 'Chw', 'Maw', 'Ebr', 'Mai', 'Meh',
+ 'Gor', 'Aws', 'Med', 'Hyd', 'Tac', 'Rha'],
+ dayNames: ['Dydd Sul', 'Dydd Llun', 'Dydd Mawrth', 'Dydd Mercher', 'Dydd Iau', 'Dydd Gwener', 'Dydd Sadwrn'],
+ dayNamesShort: ['Sul', 'Llu', 'Maw', 'Mer', 'Iau', 'Gwe', 'Sad'],
+ dayNamesMin: ['Su','Ll','Ma','Me','Ia','Gw','Sa'],
+ weekHeader: 'Wy',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['cy-GB']);
+});
+
+/* Danish initialisation for the jQuery UI date picker plugin. */
+/* Written by Jan Christensen ( del...@gm...). */
+jQuery(function($){
+ $.datepicker.regional['da'] = {
+ closeText: 'Luk',
+ prevText: '<Forrige',
+ nextText: 'Næste>',
+ currentText: 'Idag',
+ monthNames: ['Januar','Februar','Marts','April','Maj','Juni',
+ 'Juli','August','September','Oktober','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['Søndag','Mandag','Tirsdag','Onsdag','Torsdag','Fredag','Lørdag'],
+ dayNamesShort: ['Søn','Man','Tir','Ons','Tor','Fre','Lør'],
+ dayNamesMin: ['Sø','Ma','Ti','On','To','Fr','Lø'],
+ weekHeader: 'Uge',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['da']);
+});
+
+/* German initialisation for the jQuery UI date picker plugin. */
+/* Written by Milian Wolff (ma...@mi...). */
+jQuery(function($){
+ $.datepicker.regional['de'] = {
+ closeText: 'schließen',
+ prevText: '<zurück',
+ nextText: 'Vor>',
+ currentText: 'heute',
+ monthNames: ['Januar','Februar','März','April','Mai','Juni',
+ 'Juli','August','September','Oktober','November','Dezember'],
+ monthNamesShort: ['Jan','Feb','Mär','Apr','Mai','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dez'],
+ dayNames: ['Sonntag','Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag'],
+ dayNamesShort: ['So','Mo','Di','Mi','Do','Fr','Sa'],
+ dayNamesMin: ['So','Mo','Di','Mi','Do','Fr','Sa'],
+ weekHeader: 'KW',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['de']);
+});
+
+/* Greek (el) initialisation for the jQuery UI date picker plugin. */
+/* Written by Alex Cicovic (http://www.alexcicovic.com) */
+jQuery(function($){
+ $.datepicker.regional['el'] = {
+ closeText: 'Κλείσιμο',
+ prevText: 'Προηγούμενος',
+ nextText: 'Επόμενος',
+ currentText: 'Τρέχων Μήνας',
+ monthNames: ['Ιανουάριος','Φεβρουάριος','Μάρτιος','Απρίλιος','Μάιος','Ιούνιος',
+ 'Ιούλιος','Αύγουστος','Σεπτέμβριος','Οκτώβριος','Νοέμβριος','Δεκέμβριος'],
+ monthNamesShort: ['Ιαν','Φεβ','Μαρ','Απρ','Μαι','Ιουν',
+ 'Ιουλ','Αυγ','Σεπ','Οκτ','Νοε','Δεκ'],
+ dayNames: ['Κυριακή','Δευτέρα','Τρίτη','Τετάρτη','Πέμπτη','Παρασκευή','Σάββατο'],
+ dayNamesShort: ['Κυρ','Δευ','Τρι','Τετ','Πεμ','Παρ','Σαβ'],
+ dayNamesMin: ['Κυ','Δε','Τρ','Τε','Πε','Πα','Σα'],
+ weekHeader: 'Εβδ',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['el']);
+});
+
+/* English/Australia initialisation for the jQuery UI date picker plugin. */
+/* Based on the en-GB initialisation. */
+jQuery(function($){
+ $.datepicker.regional['en-AU'] = {
+ closeText: 'Done',
+ prevText: 'Prev',
+ nextText: 'Next',
+ currentText: 'Today',
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'],
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['en-AU']);
+});
+
+/* English/UK initialisation for the jQuery UI date picker plugin. */
+/* Written by Stuart. */
+jQuery(function($){
+ $.datepicker.regional['en-GB'] = {
+ closeText: 'Done',
+ prevText: 'Prev',
+ nextText: 'Next',
+ currentText: 'Today',
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'],
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['en-GB']);
+});
+
+/* English/New Zealand initialisation for the jQuery UI date picker plugin. */
+/* Based on the en-GB initialisation. */
+jQuery(function($){
+ $.datepicker.regional['en-NZ'] = {
+ closeText: 'Done',
+ prevText: 'Prev',
+ nextText: 'Next',
+ currentText: 'Today',
+ monthNames: ['January','February','March','April','May','June',
+ 'July','August','September','October','November','December'],
+ monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+ dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['en-NZ']);
+});
+
+/* Esperanto initialisation for the jQuery UI date picker plugin. */
+/* Written by Olivier M. (oli...@if...). */
+jQuery(function($){
+ $.datepicker.regional['eo'] = {
+ closeText: 'Fermi',
+ prevText: '<Anta',
+ nextText: 'Sekv>',
+ currentText: 'Nuna',
+ monthNames: ['Januaro','Februaro','Marto','Aprilo','Majo','Junio',
+ 'Julio','Aŭgusto','Septembro','Oktobro','Novembro','Decembro'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Aŭg','Sep','Okt','Nov','Dec'],
+ dayNames: ['Dimanĉo','Lundo','Mardo','Merkredo','Ĵaŭdo','Vendredo','Sabato'],
+ dayNamesShort: ['Dim','Lun','Mar','Mer','Ĵaŭ','Ven','Sab'],
+ dayNamesMin: ['Di','Lu','Ma','Me','Ĵa','Ve','Sa'],
+ weekHeader: 'Sb',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['eo']);
+});
+
+/* Inicialización en español para la extensión 'UI date picker' para jQuery. */
+/* Traducido por Vester (xv...@gm...). */
+jQuery(function($){
+ $.datepicker.regional['es'] = {
+ closeText: 'Cerrar',
+ prevText: '<Ant',
+ nextText: 'Sig>',
+ currentText: 'Hoy',
+ monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio',
+ 'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'],
+ monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun',
+ 'Jul','Ago','Sep','Oct','Nov','Dic'],
+ dayNames: ['Domingo','Lunes','Martes','Miércoles','Jueves','Viernes','Sábado'],
+ dayNamesShort: ['Dom','Lun','Mar','Mié','Juv','Vie','Sáb'],
+ dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sá'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['es']);
+});
+
+/* Estonian initialisation for the jQuery UI date picker plugin. */
+/* Written by Mart Sõmermaa (mrts.pydev at gmail com). */
+jQuery(function($){
+ $.datepicker.regional['et'] = {
+ closeText: 'Sulge',
+ prevText: 'Eelnev',
+ nextText: 'Järgnev',
+ currentText: 'Täna',
+ monthNames: ['Jaanuar','Veebruar','Märts','Aprill','Mai','Juuni',
+ 'Juuli','August','September','Oktoober','November','Detsember'],
+ monthNamesShort: ['Jaan', 'Veebr', 'Märts', 'Apr', 'Mai', 'Juuni',
+ 'Juuli', 'Aug', 'Sept', 'Okt', 'Nov', 'Dets'],
+ dayNames: ['Pühapäev', 'Esmaspäev', 'Teisipäev', 'Kolmapäev', 'Neljapäev', 'Reede', 'Laupäev'],
+ dayNamesShort: ['Pühap', 'Esmasp', 'Teisip', 'Kolmap', 'Neljap', 'Reede', 'Laup'],
+ dayNamesMin: ['P','E','T','K','N','R','L'],
+ weekHeader: 'näd',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['et']);
+});
+
+/* Euskarako oinarria 'UI date picker' jquery-ko extentsioarentzat */
+/* Karrikas-ek itzulia (kar...@ka...) */
+jQuery(function($){
+ $.datepicker.regional['eu'] = {
+ closeText: 'Egina',
+ prevText: '<Aur',
+ nextText: 'Hur>',
+ currentText: 'Gaur',
+ monthNames: ['urtarrila','otsaila','martxoa','apirila','maiatza','ekaina',
+ 'uztaila','abuztua','iraila','urria','azaroa','abendua'],
+ monthNamesShort: ['urt.','ots.','mar.','api.','mai.','eka.',
+ 'uzt.','abu.','ira.','urr.','aza.','abe.'],
+ dayNames: ['igandea','astelehena','asteartea','asteazkena','osteguna','ostirala','larunbata'],
+ dayNamesShort: ['ig.','al.','ar.','az.','og.','ol.','lr.'],
+ dayNamesMin: ['ig','al','ar','az','og','ol','lr'],
+ weekHeader: 'As',
+ dateFormat: 'yy-mm-dd',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['eu']);
+});
+
+/* Persian (Farsi) Translation for the jQuery UI date picker plugin. */
+/* Javad Mowlanezhad -- jm...@gm... */
+/* Jalali calendar should supported soon! (Its implemented but I have to test it) */
+jQuery(function($) {
+ $.datepicker.regional['fa'] = {
+ closeText: 'بستن',
+ prevText: '<قبلی',
+ nextText: 'بعدی>',
+ currentText: 'امروز',
+ monthNames: [
+ 'فروردين',
+ 'ارديبهشت',
+ 'خرداد',
+ 'تير',
+ 'مرداد',
+ 'شهريور',
+ 'مهر',
+ 'آبان',
+ 'آذر',
+ 'دی',
+ 'بهمن',
+ 'اسفند'
+ ],
+ monthNamesShort: ['1','2','3','4','5','6','7','8','9','10','11','12'],
+ dayNames: [
+ 'يکشنبه',
+ 'دوشنبه',
+ 'سهشنبه',
+ 'چهارشنبه',
+ 'پنجشنبه',
+ 'جمعه',
+ 'شنبه'
+ ],
+ dayNamesShort: [
+ 'ی',
+ 'د',
+ 'س',
+ 'چ',
+ 'پ',
+ 'ج',
+ 'ش'
+ ],
+ dayNamesMin: [
+ 'ی',
+ 'د',
+ 'س',
+ 'چ',
+ 'پ',
+ 'ج',
+ 'ش'
+ ],
+ weekHeader: 'هف',
+ dateFormat: 'yy/mm/dd',
+ firstDay: 6,
+ isRTL: true,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['fa']);
+});
+
+/* Finnish initialisation for the jQuery UI date picker plugin. */
+/* Written by Harri Kilpiö (har...@gm...). */
+jQuery(function($){
+ $.datepicker.regional['fi'] = {
+ closeText: 'Sulje',
+ prevText: '«Edellinen',
+ nextText: 'Seuraava»',
+ currentText: 'Tänään',
+ monthNames: ['Tammikuu','Helmikuu','Maaliskuu','Huhtikuu','Toukokuu','Kesäkuu',
+ 'Heinäkuu','Elokuu','Syyskuu','Lokakuu','Marraskuu','Joulukuu'],
+ monthNamesShort: ['Tammi','Helmi','Maalis','Huhti','Touko','Kesä',
+ 'Heinä','Elo','Syys','Loka','Marras','Joulu'],
+ dayNamesShort: ['Su','Ma','Ti','Ke','To','Pe','La'],
+ dayNames: ['Sunnuntai','Maanantai','Tiistai','Keskiviikko','Torstai','Perjantai','Lauantai'],
+ dayNamesMin: ['Su','Ma','Ti','Ke','To','Pe','La'],
+ weekHeader: 'Vk',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['fi']);
+});
+
+/* Faroese initialisation for the jQuery UI date picker plugin */
+/* Written by Sverri Mohr Olsen, sve...@gm... */
+jQuery(function($){
+ $.datepicker.regional['fo'] = {
+ closeText: 'Lat aftur',
+ prevText: '<Fyrra',
+ nextText: 'Næsta>',
+ currentText: 'Í dag',
+ monthNames: ['Januar','Februar','Mars','Apríl','Mei','Juni',
+ 'Juli','August','September','Oktober','November','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Des'],
+ dayNames: ['Sunnudagur','Mánadagur','Týsdagur','Mikudagur','Hósdagur','Fríggjadagur','Leyardagur'],
+ dayNamesShort: ['Sun','Mán','Týs','Mik','Hós','Frí','Ley'],
+ dayNamesMin: ['Su','Má','Tý','Mi','Hó','Fr','Le'],
+ weekHeader: 'Vk',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['fo']);
+});
+
+/* Swiss-French initialisation for the jQuery UI date picker plugin. */
+/* Written Martin Voelkle (mar...@e-...). */
+jQuery(function($){
+ $.datepicker.regional['fr-CH'] = {
+ closeText: 'Fermer',
+ prevText: '<Préc',
+ nextText: 'Suiv>',
+ currentText: 'Courant',
+ monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
+ 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
+ monthNamesShort: ['Jan','Fév','Mar','Avr','Mai','Jun',
+ 'Jul','Aoû','Sep','Oct','Nov','Déc'],
+ dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
+ dayNamesShort: ['Dim','Lun','Mar','Mer','Jeu','Ven','Sam'],
+ dayNamesMin: ['Di','Lu','Ma','Me','Je','Ve','Sa'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['fr-CH']);
+});
+
+/* French initialisation for the jQuery UI date picker plugin. */
+/* Written by Keith Wood (kbwood{at}iinet.com.au),
+ Stéphane Nahmani (sh...@sh...),
+ Stéphane Raimbault <ste...@gm...> */
+jQuery(function($){
+ $.datepicker.regional['fr'] = {
+ closeText: 'Fermer',
+ prevText: 'Précédent',
+ nextText: 'Suivant',
+ currentText: 'Aujourd\'hui',
+ monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
+ 'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
+ monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
+ 'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
+ dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'],
+ dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'],
+ dayNamesMin: ['D','L','M','M','J','V','S'],
+ weekHeader: 'Sem.',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['fr']);
+});
+
+/* Galician localization for 'UI date picker' jQuery extension. */
+/* Translated by Jorge Barreiro <yor...@gm...>. */
+jQuery(function($){
+ $.datepicker.regional['gl'] = {
+ closeText: 'Pechar',
+ prevText: '<Ant',
+ nextText: 'Seg>',
+ currentText: 'Hoxe',
+ monthNames: ['Xaneiro','Febreiro','Marzo','Abril','Maio','Xuño',
+ 'Xullo','Agosto','Setembro','Outubro','Novembro','Decembro'],
+ monthNamesShort: ['Xan','Feb','Mar','Abr','Mai','Xuñ',
+ 'Xul','Ago','Set','Out','Nov','Dec'],
+ dayNames: ['Domingo','Luns','Martes','Mércores','Xoves','Venres','Sábado'],
+ dayNamesShort: ['Dom','Lun','Mar','Mér','Xov','Ven','Sáb'],
+ dayNamesMin: ['Do','Lu','Ma','Mé','Xo','Ve','Sá'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['gl']);
+});
+
+/* Hebrew initialisation for the UI Datepicker extension. */
+/* Written by Amir Hardon (ahardon at gmail dot com). */
+jQuery(function($){
+ $.datepicker.regional['he'] = {
+ closeText: 'סגור',
+ prevText: '<הקודם',
+ nextText: 'הבא>',
+ currentText: 'היום',
+ monthNames: ['ינואר','פברואר','מרץ','אפריל','מאי','יוני',
+ 'יולי','אוגוסט','ספטמבר','אוקטובר','נובמבר','דצמבר'],
+ monthNamesShort: ['ינו','פבר','מרץ','אפר','מאי','יוני',
+ 'יולי','אוג','ספט','אוק','נוב','דצמ'],
+ dayNames: ['ראשון','שני','שלישי','רביעי','חמישי','שישי','שבת'],
+ dayNamesShort: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
+ dayNamesMin: ['א\'','ב\'','ג\'','ד\'','ה\'','ו\'','שבת'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: true,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['he']);
+});
+
+/* Hindi initialisation for the jQuery UI date picker plugin. */
+/* Written by Michael Dawart. */
+jQuery(function($){
+ $.datepicker.regional['hi'] = {
+ closeText: 'बंद',
+ prevText: 'पिछला',
+ nextText: 'अगला',
+ currentText: 'आज',
+ monthNames: ['जनवरी ','फरवरी','मार्च','अप्रेल','मई','जून',
+ 'जूलाई','अगस्त ','सितम्बर','अक्टूबर','नवम्बर','दिसम्बर'],
+ monthNamesShort: ['जन', 'फर', 'मार्च', 'अप्रेल', 'मई', 'जून',
+ 'जूलाई', 'अग', 'सित', 'अक्ट', 'नव', 'दि'],
+ dayNames: ['रविवार', 'सोमवार', 'मंगलवार', 'बुधवार', 'गुरुवार', 'शुक्रवार', 'शनिवार'],
+ dayNamesShort: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
+ dayNamesMin: ['रवि', 'सोम', 'मंगल', 'बुध', 'गुरु', 'शुक्र', 'शनि'],
+ weekHeader: 'हफ्ता',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['hi']);
+});
+
+/* Croatian i18n for the jQuery UI date picker plugin. */
+/* Written by Vjekoslav Nesek. */
+jQuery(function($){
+ $.datepicker.regional['hr'] = {
+ closeText: 'Zatvori',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Danas',
+ monthNames: ['Siječanj','Veljača','Ožujak','Travanj','Svibanj','Lipanj',
+ 'Srpanj','Kolovoz','Rujan','Listopad','Studeni','Prosinac'],
+ monthNamesShort: ['Sij','Velj','Ožu','Tra','Svi','Lip',
+ 'Srp','Kol','Ruj','Lis','Stu','Pro'],
+ dayNames: ['Nedjelja','Ponedjeljak','Utorak','Srijeda','Četvrtak','Petak','Subota'],
+ dayNamesShort: ['Ned','Pon','Uto','Sri','Čet','Pet','Sub'],
+ dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
+ weekHeader: 'Tje',
+ dateFormat: 'dd.mm.yy.',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['hr']);
+});
+
+/* Hungarian initialisation for the jQuery UI date picker plugin. */
+/* Written by Istvan Karaszi (jq...@sp...). */
+jQuery(function($){
+ $.datepicker.regional['hu'] = {
+ closeText: 'bezár',
+ prevText: 'vissza',
+ nextText: 'előre',
+ currentText: 'ma',
+ monthNames: ['Január', 'Február', 'Március', 'Április', 'Május', 'Június',
+ 'Július', 'Augusztus', 'Szeptember', 'Október', 'November', 'December'],
+ monthNamesShort: ['Jan', 'Feb', 'Már', 'Ápr', 'Máj', 'Jún',
+ 'Júl', 'Aug', 'Szep', 'Okt', 'Nov', 'Dec'],
+ dayNames: ['Vasárnap', 'Hétfő', 'Kedd', 'Szerda', 'Csütörtök', 'Péntek', 'Szombat'],
+ dayNamesShort: ['Vas', 'Hét', 'Ked', 'Sze', 'Csü', 'Pén', 'Szo'],
+ dayNamesMin: ['V', 'H', 'K', 'Sze', 'Cs', 'P', 'Szo'],
+ weekHeader: 'Hét',
+ dateFormat: 'yy.mm.dd.',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: true,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['hu']);
+});
+
+/* Armenian(UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Levon Zakaryan (lev...@gm...)*/
+jQuery(function($){
+ $.datepicker.regional['hy'] = {
+ closeText: 'Փակել',
+ prevText: '<Նախ.',
+ nextText: 'Հաջ.>',
+ currentText: 'Այսօր',
+ monthNames: ['Հունվար','Փետրվար','Մարտ','Ապրիլ','Մայիս','Հունիս',
+ 'Հուլիս','Օգոստոս','Սեպտեմբեր','Հոկտեմբեր','Նոյեմբեր','Դեկտեմբեր'],
+ monthNamesShort: ['Հունվ','Փետր','Մարտ','Ապր','Մայիս','Հունիս',
+ 'Հուլ','Օգս','Սեպ','Հոկ','Նոյ','Դեկ'],
+ dayNames: ['կիրակի','եկուշաբթի','երեքշաբթի','չորեքշաբթի','հինգշաբթի','ուրբաթ','շաբաթ'],
+ dayNamesShort: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
+ dayNamesMin: ['կիր','երկ','երք','չրք','հնգ','ուրբ','շբթ'],
+ weekHeader: 'ՇԲՏ',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['hy']);
+});
+
+/* Indonesian initialisation for the jQuery UI date picker plugin. */
+/* Written by Deden Fathurahman (de...@gm...). */
+jQuery(function($){
+ $.datepicker.regional['id'] = {
+ closeText: 'Tutup',
+ prevText: '<mundur',
+ nextText: 'maju>',
+ currentText: 'hari ini',
+ monthNames: ['Januari','Februari','Maret','April','Mei','Juni',
+ 'Juli','Agustus','September','Oktober','Nopember','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mei','Jun',
+ 'Jul','Agus','Sep','Okt','Nop','Des'],
+ dayNames: ['Minggu','Senin','Selasa','Rabu','Kamis','Jumat','Sabtu'],
+ dayNamesShort: ['Min','Sen','Sel','Rab','kam','Jum','Sab'],
+ dayNamesMin: ['Mg','Sn','Sl','Rb','Km','jm','Sb'],
+ weekHeader: 'Mg',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['id']);
+});
+
+/* Icelandic initialisation for the jQuery UI date picker plugin. */
+/* Written by Haukur H. Thorsson (ha...@es...). */
+jQuery(function($){
+ $.datepicker.regional['is'] = {
+ closeText: 'Loka',
+ prevText: '< Fyrri',
+ nextText: 'Næsti >',
+ currentText: 'Í dag',
+ monthNames: ['Janúar','Febrúar','Mars','Apríl','Maí','Júní',
+ 'Júlí','Ágúst','September','Október','Nóvember','Desember'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maí','Jún',
+ 'Júl','Ágú','Sep','Okt','Nóv','Des'],
+ dayNames: ['Sunnudagur','Mánudagur','Þriðjudagur','Miðvikudagur','Fimmtudagur','Föstudagur','Laugardagur'],
+ dayNamesShort: ['Sun','Mán','Þri','Mið','Fim','Fös','Lau'],
+ dayNamesMin: ['Su','Má','Þr','Mi','Fi','Fö','La'],
+ weekHeader: 'Vika',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['is']);
+});
+
+/* Italian initialisation for the jQuery UI date picker plugin. */
+/* Written by Antonello Pasella (ant...@gm...). */
+jQuery(function($){
+ $.datepicker.regional['it'] = {
+ closeText: 'Chiudi',
+ prevText: '<Prec',
+ nextText: 'Succ>',
+ currentText: 'Oggi',
+ monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno',
+ 'Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
+ monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu',
+ 'Lug','Ago','Set','Ott','Nov','Dic'],
+ dayNames: ['Domenica','Lunedì','Martedì','Mercoledì','Giovedì','Venerdì','Sabato'],
+ dayNamesShort: ['Dom','Lun','Mar','Mer','Gio','Ven','Sab'],
+ dayNamesMin: ['Do','Lu','Ma','Me','Gi','Ve','Sa'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['it']);
+});
+
+/* Japanese initialisation for the jQuery UI date picker plugin. */
+/* Written by Kentaro SATO (ke...@ra...). */
+jQuery(function($){
+ $.datepicker.regional['ja'] = {
+ closeText: '閉じる',
+ prevText: '<前',
+ nextText: '次>',
+ currentText: '今日',
+ monthNames: ['1月','2月','3月','4月','5月','6月',
+ '7月','8月','9月','10月','11月','12月'],
+ monthNamesShort: ['1月','2月','3月','4月','5月','6月',
+ '7月','8月','9月','10月','11月','12月'],
+ dayNames: ['日曜日','月曜日','火曜日','水曜日','木曜日','金曜日','土曜日'],
+ dayNamesShort: ['日','月','火','水','木','金','土'],
+ dayNamesMin: ['日','月','火','水','木','金','土'],
+ weekHeader: '週',
+ dateFormat: 'yy/mm/dd',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: true,
+ yearSuffix: '年'};
+ $.datepicker.setDefaults($.datepicker.regional['ja']);
+});
+
+/* Georgian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Lado Lomidze (lad...@gm...). */
+jQuery(function($){
+ $.datepicker.regional['ka'] = {
+ closeText: 'დახურვა',
+ prevText: '< წინა',
+ nextText: 'შემდეგი >',
+ currentText: 'დღეს',
+ monthNames: ['იანვარი','თებერვალი','მარტი','აპრილი','მაისი','ივნისი', 'ივლისი','აგვისტო','სექტემბერი','ოქტომბერი','ნოემბერი','დეკემბერი'],
+ monthNamesShort: ['იან','თებ','მარ','აპრ','მაი','ივნ', 'ივლ','აგვ','სექ','ოქტ','ნოე','დეკ'],
+ dayNames: ['კვირა','ორშაბათი','სამშაბათი','ოთხშაბათი','ხუთშაბათი','პარასკევი','შაბათი'],
+ dayNamesShort: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
+ dayNamesMin: ['კვ','ორშ','სამ','ოთხ','ხუთ','პარ','შაბ'],
+ weekHeader: 'კვირა',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ka']);
+});
+
+/* Kazakh (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Dmitriy Karasyov (dmi...@gm...). */
+jQuery(function($){
+ $.datepicker.regional['kk'] = {
+ closeText: 'Жабу',
+ prevText: '<Алдыңғы',
+ nextText: 'Келесі>',
+ currentText: 'Бүгін',
+ monthNames: ['Қаңтар','Ақпан','Наурыз','Сәуір','Мамыр','Маусым',
+ 'Шілде','Тамыз','Қыркүйек','Қазан','Қараша','Желтоқсан'],
+ monthNamesShort: ['Қаң','Ақп','Нау','Сәу','Мам','Мау',
+ 'Шіл','Там','Қыр','Қаз','Қар','Жел'],
+ dayNames: ['Жексенбі','Дүйсенбі','Сейсенбі','Сәрсенбі','Бейсенбі','Жұма','Сенбі'],
+ dayNamesShort: ['жкс','дсн','ссн','срс','бсн','жма','снб'],
+ dayNamesMin: ['Жк','Дс','Сс','Ср','Бс','Жм','Сн'],
+ weekHeader: 'Не',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['kk']);
+});
+
+/* Khmer initialisation for the jQuery calendar extension. */
+/* Written by Chandara Om (cha...@gm...). */
+jQuery(function($){
+ $.datepicker.regional['km'] = {
+ closeText: 'ធ្វើរួច',
+ prevText: 'មុន',
+ nextText: 'បន្ទាប់',
+ currentText: 'ថ្ងៃនេះ',
+ monthNames: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
+ 'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
+ monthNamesShort: ['មករា','កុម្ភៈ','មីនា','មេសា','ឧសភា','មិថុនា',
+ 'កក្កដា','សីហា','កញ្ញា','តុលា','វិច្ឆិកា','ធ្នូ'],
+ dayNames: ['អាទិត្យ', 'ចន្ទ', 'អង្គារ', 'ពុធ', 'ព្រហស្បតិ៍', 'សុក្រ', 'សៅរ៍'],
+ dayNamesShort: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
+ dayNamesMin: ['អា', 'ច', 'អ', 'ពុ', 'ព្រហ', 'សុ', 'សៅ'],
+ weekHeader: 'សប្ដាហ៍',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['km']);
+});
+
+/* Korean initialisation for the jQuery calendar extension. */
+/* Written by DaeKwon Kang (ncr...@gm...), Edited by Genie. */
+jQuery(function($){
+ $.datepicker.regional['ko'] = {
+ closeText: '닫기',
+ prevText: '이전달',
+ nextText: '다음달',
+ currentText: '오늘',
+ monthNames: ['1월','2월','3월','4월','5월','6월',
+ '7월','8월','9월','10월','11월','12월'],
+ monthNamesShort: ['1월','2월','3월','4월','5월','6월',
+ '7월','8월','9월','10월','11월','12월'],
+ dayNames: ['일요일','월요일','화요일','수요일','목요일','금요일','토요일'],
+ dayNamesShort: ['일','월','화','수','목','금','토'],
+ dayNamesMin: ['일','월','화','수','목','금','토'],
+ weekHeader: 'Wk',
+ dateFormat: 'yy-mm-dd',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: true,
+ yearSuffix: '년'};
+ $.datepicker.setDefaults($.datepicker.regional['ko']);
+});
+
+/* Luxembourgish initialisation for the jQuery UI date picker plugin. */
+/* Written by Michel Weimerskirch <mi...@we...> */
+jQuery(function($){
+ $.datepicker.regional['lb'] = {
+ closeText: 'Fäerdeg',
+ prevText: 'Zréck',
+ nextText: 'Weider',
+ currentText: 'Haut',
+ monthNames: ['Januar','Februar','Mäerz','Abrëll','Mee','Juni',
+ 'Juli','August','September','Oktober','November','Dezember'],
+ monthNamesShort: ['Jan', 'Feb', 'Mäe', 'Abr', 'Mee', 'Jun',
+ 'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'],
+ dayNames: ['Sonndeg', 'Méindeg', 'Dënschdeg', 'Mëttwoch', 'Donneschdeg', 'Freideg', 'Samschdeg'],
+ dayNamesShort: ['Son', 'Méi', 'Dën', 'Mët', 'Don', 'Fre', 'Sam'],
+ dayNamesMin: ['So','Mé','Dë','Më','Do','Fr','Sa'],
+ weekHeader: 'W',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['lb']);
+});
+
+/* Lithuanian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <ar...@av...> */
+jQuery(function($){
+ $.datepicker.regional['lt'] = {
+ closeText: 'Uždaryti',
+ prevText: '<Atgal',
+ nextText: 'Pirmyn>',
+ currentText: 'Šiandien',
+ monthNames: ['Sausis','Vasaris','Kovas','Balandis','Gegužė','Birželis',
+ 'Liepa','Rugpjūtis','Rugsėjis','Spalis','Lapkritis','Gruodis'],
+ monthNamesShort: ['Sau','Vas','Kov','Bal','Geg','Bir',
+ 'Lie','Rugp','Rugs','Spa','Lap','Gru'],
+ dayNames: ['sekmadienis','pirmadienis','antradienis','trečiadienis','ketvirtadienis','penktadienis','šeštadienis'],
+ dayNamesShort: ['sek','pir','ant','tre','ket','pen','šeš'],
+ dayNamesMin: ['Se','Pr','An','Tr','Ke','Pe','Še'],
+ weekHeader: 'Wk',
+ dateFormat: 'yy-mm-dd',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['lt']);
+});
+
+/* Latvian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* @author Arturas Paleicikas <art...@me...> */
+jQuery(function($){
+ $.datepicker.regional['lv'] = {
+ closeText: 'Aizvērt',
+ prevText: 'Iepr',
+ nextText: 'Nāka',
+ currentText: 'Šodien',
+ monthNames: ['Janvāris','Februāris','Marts','Aprīlis','Maijs','Jūnijs',
+ 'Jūlijs','Augusts','Septembris','Oktobris','Novembris','Decembris'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Mai','Jūn',
+ 'Jūl','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['svētdiena','pirmdiena','otrdiena','trešdiena','ceturtdiena','piektdiena','sestdiena'],
+ dayNamesShort: ['svt','prm','otr','tre','ctr','pkt','sst'],
+ dayNamesMin: ['Sv','Pr','Ot','Tr','Ct','Pk','Ss'],
+ weekHeader: 'Nav',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['lv']);
+});
+
+/* Macedonian i18n for the jQuery UI date picker plugin. */
+/* Written by Stojce Slavkovski. */
+jQuery(function($){
+ $.datepicker.regional['mk'] = {
+ closeText: 'Затвори',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Денес',
+ monthNames: ['Јануари','Февруари','Март','Април','Мај','Јуни',
+ 'Јули','Август','Септември','Октомври','Ноември','Декември'],
+ monthNamesShort: ['Јан','Фев','Мар','Апр','Мај','Јун',
+ 'Јул','Авг','Сеп','Окт','Ное','Дек'],
+ dayNames: ['Недела','Понеделник','Вторник','Среда','Четврток','Петок','Сабота'],
+ dayNamesShort: ['Нед','Пон','Вто','Сре','Чет','Пет','Саб'],
+ dayNamesMin: ['Не','По','Вт','Ср','Че','Пе','Са'],
+ weekHeader: 'Сед',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['mk']);
+});
+
+/* Malayalam (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Saji Nediyanchath (sa...@gm...). */
+jQuery(function($){
+ $.datepicker.regional['ml'] = {
+ closeText: 'ശരി',
+ prevText: 'മുന്നത്തെ',
+ nextText: 'അടുത്തത് ',
+ currentText: 'ഇന്ന്',
+ monthNames: ['ജനുവരി','ഫെബ്രുവരി','മാര്ച്ച്','ഏപ്രില്','മേയ്','ജൂണ്',
+ 'ജൂലൈ','ആഗസ്റ്റ്','സെപ്റ്റംബര്','ഒക്ടോബര്','നവംബര്','ഡിസംബര്'],
+ monthNamesShort: ['ജനു', 'ഫെബ്', 'മാര്', 'ഏപ്രി', 'മേയ്', 'ജൂണ്',
+ 'ജൂലാ', 'ആഗ', 'സെപ്', 'ഒക്ടോ', 'നവം', 'ഡിസ'],
+ dayNames: ['ഞായര്', 'തിങ്കള്', 'ചൊവ്വ', 'ബുധന്', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
+ dayNamesShort: ['ഞായ', 'തിങ്ക', 'ചൊവ്വ', 'ബുധ', 'വ്യാഴം', 'വെള്ളി', 'ശനി'],
+ dayNamesMin: ['ഞാ','തി','ചൊ','ബു','വ്യാ','വെ','ശ'],
+ weekHeader: 'ആ',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ml']);
+});
+
+/* Malaysian initialisation for the jQuery UI date picker plugin. */
+/* Written by Mohd Nawawi Mohamad Jamili (na...@ro...). */
+jQuery(function($){
+ $.datepicker.regional['ms'] = {
+ closeText: 'Tutup',
+ prevText: '<Sebelum',
+ nextText: 'Selepas>',
+ currentText: 'hari ini',
+ monthNames: ['Januari','Februari','Mac','April','Mei','Jun',
+ 'Julai','Ogos','September','Oktober','November','Disember'],
+ monthNamesShort: ['Jan','Feb','Mac','Apr','Mei','Jun',
+ 'Jul','Ogo','Sep','Okt','Nov','Dis'],
+ dayNames: ['Ahad','Isnin','Selasa','Rabu','Khamis','Jumaat','Sabtu'],
+ dayNamesShort: ['Aha','Isn','Sel','Rab','kha','Jum','Sab'],
+ dayNamesMin: ['Ah','Is','Se','Ra','Kh','Ju','Sa'],
+ weekHeader: 'Mg',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ms']);
+});
+
+/* Dutch (Belgium) initialisation for the jQuery UI date picker plugin. */
+/* David De Sloovere @DavidDeSloovere */
+jQuery(function($){
+ $.datepicker.regional['nl-BE'] = {
+ closeText: 'Sluiten',
+ prevText: '←',
+ nextText: '→',
+ currentText: 'Vandaag',
+ monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
+ 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
+ monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
+ 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
+ dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
+ dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
+ dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['nl-BE']);
+});
+
+/* Dutch (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Mathias Bynens <http://mathiasbynens.be/> */
+jQuery(function($){
+ $.datepicker.regional.nl = {
+ closeText: 'Sluiten',
+ prevText: '←',
+ nextText: '→',
+ currentText: 'Vandaag',
+ monthNames: ['januari', 'februari', 'maart', 'april', 'mei', 'juni',
+ 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
+ monthNamesShort: ['jan', 'feb', 'mrt', 'apr', 'mei', 'jun',
+ 'jul', 'aug', 'sep', 'okt', 'nov', 'dec'],
+ dayNames: ['zondag', 'maandag', 'dinsdag', 'woensdag', 'donderdag', 'vrijdag', 'zaterdag'],
+ dayNamesShort: ['zon', 'maa', 'din', 'woe', 'don', 'vri', 'zat'],
+ dayNamesMin: ['zo', 'ma', 'di', 'wo', 'do', 'vr', 'za'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd-mm-yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional.nl);
+});
+
+/* Norwegian initialisation for the jQuery UI date picker plugin. */
+/* Written by Naimdjon Takhirov (nai...@gm...). */
+
+jQuery(function($){
+ $.datepicker.regional['no'] = {
+ closeText: 'Lukk',
+ prevText: '«Forrige',
+ nextText: 'Neste»',
+ currentText: 'I dag',
+ monthNames: ['januar','februar','mars','april','mai','juni','juli','august','september','oktober','november','desember'],
+ monthNamesShort: ['jan','feb','mar','apr','mai','jun','jul','aug','sep','okt','nov','des'],
+ dayNamesShort: ['søn','man','tir','ons','tor','fre','lør'],
+ dayNames: ['søndag','mandag','tirsdag','onsdag','torsdag','fredag','lørdag'],
+ dayNamesMin: ['sø','ma','ti','on','to','fr','lø'],
+ weekHeader: 'Uke',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''
+ };
+ $.datepicker.setDefaults($.datepicker.regional['no']);
+});
+
+/* Polish initialisation for the jQuery UI date picker plugin. */
+/* Written by Jacek Wysocki (jac...@gm...). */
+jQuery(function($){
+ $.datepicker.regional['pl'] = {
+ closeText: 'Zamknij',
+ prevText: '<Poprzedni',
+ nextText: 'Następny>',
+ currentText: 'Dziś',
+ monthNames: ['Styczeń','Luty','Marzec','Kwiecień','Maj','Czerwiec',
+ 'Lipiec','Sierpień','Wrzesień','Październik','Listopad','Grudzień'],
+ monthNamesShort: ['Sty','Lu','Mar','Kw','Maj','Cze',
+ 'Lip','Sie','Wrz','Pa','Lis','Gru'],
+ dayNames: ['Niedziela','Poniedziałek','Wtorek','Środa','Czwartek','Piątek','Sobota'],
+ dayNamesShort: ['Nie','Pn','Wt','Śr','Czw','Pt','So'],
+ dayNamesMin: ['N','Pn','Wt','Śr','Cz','Pt','So'],
+ weekHeader: 'Tydz',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['pl']);
+});
+
+/* Brazilian initialisation for the jQuery UI date picker plugin. */
+/* Written by Leonildo Costa Silva (leo...@gm...). */
+jQuery(function($){
+ $.datepicker.regional['pt-BR'] = {
+ closeText: 'Fechar',
+ prevText: '<Anterior',
+ nextText: 'Próximo>',
+ currentText: 'Hoje',
+ monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
+ 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
+ monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
+ 'Jul','Ago','Set','Out','Nov','Dez'],
+ dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ weekHeader: 'Sm',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['pt-BR']);
+});
+
+/* Portuguese initialisation for the jQuery UI date picker plugin. */
+jQuery(function($){
+ $.datepicker.regional['pt'] = {
+ closeText: 'Fechar',
+ prevText: '<Anterior',
+ nextText: 'Seguinte',
+ currentText: 'Hoje',
+ monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
+ 'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
+ monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
+ 'Jul','Ago','Set','Out','Nov','Dez'],
+ dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
+ dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
+ weekHeader: 'Sem',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['pt']);
+});
+
+/* Romansh initialisation for the jQuery UI date picker plugin. */
+/* Written by Yvonne Gienal (yvo...@ed...). */
+jQuery(function($){
+ $.datepicker.regional['rm'] = {
+ closeText: 'Serrar',
+ prevText: '<Suandant',
+ nextText: 'Precedent>',
+ currentText: 'Actual',
+ monthNames: ['Schaner','Favrer','Mars','Avrigl','Matg','Zercladur', 'Fanadur','Avust','Settember','October','November','December'],
+ monthNamesShort: ['Scha','Fev','Mar','Avr','Matg','Zer', 'Fan','Avu','Sett','Oct','Nov','Dec'],
+ dayNames: ['Dumengia','Glindesdi','Mardi','Mesemna','Gievgia','Venderdi','Sonda'],
+ dayNamesShort: ['Dum','Gli','Mar','Mes','Gie','Ven','Som'],
+ dayNamesMin: ['Du','Gl','Ma','Me','Gi','Ve','So'],
+ weekHeader: 'emna',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['rm']);
+});
+
+/* Romanian initialisation for the jQuery UI date picker plugin.
+ *
+ * Written by Edmond L. (ll_...@wa...)
+ * and Ionut G. Stan (ion...@gm...)
+ */
+jQuery(function($){
+ $.datepicker.regional['ro'] = {
+ closeText: 'Închide',
+ prevText: '« Luna precedentă',
+ nextText: 'Luna următoare »',
+ currentText: 'Azi',
+ monthNames: ['Ianuarie','Februarie','Martie','Aprilie','Mai','Iunie',
+ 'Iulie','August','Septembrie','Octombrie','Noiembrie','Decembrie'],
+ monthNamesShort: ['Ian', 'Feb', 'Mar', 'Apr', 'Mai', 'Iun',
+ 'Iul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ dayNames: ['Duminică', 'Luni', 'Marţi', 'Miercuri', 'Joi', 'Vineri', 'Sâmbătă'],
+ dayNamesShort: ['Dum', 'Lun', 'Mar', 'Mie', 'Joi', 'Vin', 'Sâm'],
+ dayNamesMin: ['Du','Lu','Ma','Mi','Jo','Vi','Sâ'],
+ weekHeader: 'Săpt',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ro']);
+});
+
+/* Russian (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Andrew Stromnov (str...@gm...). */
+jQuery(function($){
+ $.datepicker.regional['ru'] = {
+ closeText: 'Закрыть',
+ prevText: '<Пред',
+ nextText: 'След>',
+ currentText: 'Сегодня',
+ monthNames: ['Январь','Февраль','Март','Апрель','Май','Июнь',
+ 'Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь'],
+ monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
+ 'Июл','Авг','Сен','Окт','Ноя','Дек'],
+ dayNames: ['воскресенье','понедельник','вторник','среда','четверг','пятница','суббота'],
+ dayNamesShort: ['вск','пнд','втр','срд','чтв','птн','сбт'],
+ dayNamesMin: ['Вс','Пн','Вт','Ср','Чт','Пт','Сб'],
+ weekHeader: 'Нед',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ru']);
+});
+
+/* Slovak initialisation for the jQuery UI date picker plugin. */
+/* Written by Vojtech Rinik (vo...@hm...). */
+jQuery(function($){
+ $.datepicker.regional['sk'] = {
+ closeText: 'Zavrieť',
+ prevText: '<Predchádzajúci',
+ nextText: 'Nasledujúci>',
+ currentText: 'Dnes',
+ monthNames: ['Január','Február','Marec','Apríl','Máj','Jún',
+ 'Júl','August','September','Október','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Máj','Jún',
+ 'Júl','Aug','Sep','Okt','Nov','Dec'],
+ dayNames: ['Nedeľa','Pondelok','Utorok','Streda','Štvrtok','Piatok','Sobota'],
+ dayNamesShort: ['Ned','Pon','Uto','Str','Štv','Pia','Sob'],
+ dayNamesMin: ['Ne','Po','Ut','St','Št','Pia','So'],
+ weekHeader: 'Ty',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sk']);
+});
+
+/* Slovenian initialisation for the jQuery UI date picker plugin. */
+/* Written by Jaka Jancar (ja...@ku...). */
+/* c = č, s = š z = ž C = Č S = Š Z = Ž */
+jQuery(function($){
+ $.datepicker.regional['sl'] = {
+ closeText: 'Zapri',
+ prevText: '<Prejšnji',
+ nextText: 'Naslednji>',
+ currentText: 'Trenutni',
+ monthNames: ['Januar','Februar','Marec','April','Maj','Junij',
+ 'Julij','Avgust','September','Oktober','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Avg','Sep','Okt','Nov','Dec'],
+ dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'],
+ dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'],
+ dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'],
+ weekHeader: 'Teden',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sl']);
+});
+
+/* Albanian initialisation for the jQuery UI date picker plugin. */
+/* Written by Flakron Bytyqi (fl...@gm...). */
+jQuery(function($){
+ $.datepicker.regional['sq'] = {
+ closeText: 'mbylle',
+ prevText: '<mbrapa',
+ nextText: 'Përpara>',
+ currentText: 'sot',
+ monthNames: ['Janar','Shkurt','Mars','Prill','Maj','Qershor',
+ 'Korrik','Gusht','Shtator','Tetor','Nëntor','Dhjetor'],
+ monthNamesShort: ['Jan','Shk','Mar','Pri','Maj','Qer',
+ 'Kor','Gus','Sht','Tet','Nën','Dhj'],
+ dayNames: ['E Diel','E Hënë','E Martë','E Mërkurë','E Enjte','E Premte','E Shtune'],
+ dayNamesShort: ['Di','Hë','Ma','Më','En','Pr','Sh'],
+ dayNamesMin: ['Di','Hë','Ma','Më','En','Pr','Sh'],
+ weekHeader: 'Ja',
+ dateFormat: 'dd.mm.yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sq']);
+});
+
+/* Serbian i18n for the jQuery UI date picker plugin. */
+/* Written by Dejan Dimić. */
+jQuery(function($){
+ $.datepicker.regional['sr-SR'] = {
+ closeText: 'Zatvori',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Danas',
+ monthNames: ['Januar','Februar','Mart','April','Maj','Jun',
+ 'Jul','Avgust','Septembar','Oktobar','Novembar','Decembar'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Avg','Sep','Okt','Nov','Dec'],
+ dayNames: ['Nedelja','Ponedeljak','Utorak','Sreda','Četvrtak','Petak','Subota'],
+ dayNamesShort: ['Ned','Pon','Uto','Sre','Čet','Pet','Sub'],
+ dayNamesMin: ['Ne','Po','Ut','Sr','Če','Pe','Su'],
+ weekHeader: 'Sed',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sr-SR']);
+});
+
+/* Serbian i18n for the jQuery UI date picker plugin. */
+/* Written by Dejan Dimić. */
+jQuery(function($){
+ $.datepicker.regional['sr'] = {
+ closeText: 'Затвори',
+ prevText: '<',
+ nextText: '>',
+ currentText: 'Данас',
+ monthNames: ['Јануар','Фебруар','Март','Април','Мај','Јун',
+ 'Јул','Август','Септембар','Октобар','Новембар','Децембар'],
+ monthNamesShort: ['Јан','Феб','Мар','Апр','Мај','Јун',
+ 'Јул','Авг','Сеп','Окт','Нов','Дец'],
+ dayNames: ['Недеља','Понедељак','Уторак','Среда','Четвртак','Петак','Субота'],
+ dayNamesShort: ['Нед','Пон','Уто','Сре','Чет','Пет','Суб'],
+ dayNamesMin: ['Не','По','Ут','Ср','Че','Пе','Су'],
+ weekHeader: 'Сед',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sr']);
+});
+
+/* Swedish initialisation for the jQuery UI date picker plugin. */
+/* Written by Anders Ekdahl ( an...@no...). */
+jQuery(function($){
+ $.datepicker.regional['sv'] = {
+ closeText: 'Stäng',
+ prevText: '«Förra',
+ nextText: 'Nästa»',
+ currentText: 'Idag',
+ monthNames: ['Januari','Februari','Mars','April','Maj','Juni',
+ 'Juli','Augusti','September','Oktober','November','December'],
+ monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun',
+ 'Jul','Aug','Sep','Okt','Nov','Dec'],
+ dayNamesShort: ['Sön','Mån','Tis','Ons','Tor','Fre','Lör'],
+ dayNames: ['Söndag','Måndag','Tisdag','Onsdag','Torsdag','Fredag','Lördag'],
+ dayNamesMin: ['Sö','Må','Ti','On','To','Fr','Lö'],
+ weekHeader: 'Ve',
+ dateFormat: 'yy-mm-dd',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['sv']);
+});
+
+/* Tamil (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by S A Sureshkumar (sas...@li...). */
+jQuery(function($){
+ $.datepicker.regional['ta'] = {
+ closeText: 'மூடு',
+ prevText: 'முன்னையது',
+ nextText: 'அடுத்தது',
+ currentText: 'இன்று',
+ monthNames: ['தை','மாசி','பங்குனி','சித்திரை','வைகாசி','ஆனி',
+ 'ஆடி','ஆவணி','புரட்டாசி','ஐப்பசி','கார்த்திகை','மார்கழி'],
+ monthNamesShort: ['தை','மாசி','பங்','சித்','வைகா','ஆனி',
+ 'ஆடி','ஆவ','புர','ஐப்','கார்','மார்'],
+ dayNames: ['ஞாயிற்றுக்கிழமை','திங்கட்கிழமை','செவ்வாய்க்கிழமை','புதன்கிழமை','வியாழக்கிழமை','வெள்ளிக்கிழமை','சனிக்கிழமை'],
+ dayNamesShort: ['ஞாயிறு','திங்கள்','செவ்வாய்','புதன்','வியாழன்','வெள்ளி','சனி'],
+ dayNamesMin: ['ஞா','தி','செ','பு','வி','வெ','ச'],
+ weekHeader: 'Не',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 1,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['ta']);
+});
+
+/* Thai initialisation for the jQuery UI date picker plugin. */
+/* Written by pipo (pi...@si...). */
+jQuery(function($){
+ $.datepicker.regional['th'] = {
+ closeText: 'ปิด',
+ prevText: '« ย้อน',
+ nextText: 'ถัดไป »',
+ currentText: 'วันนี้',
+ monthNames: ['มกราคม','กุมภาพันธ์','มีนาคม','เมษายน','พฤษภาคม','มิถุนายน',
+ 'กรกฎาคม','สิงหาคม','กันยายน','ตุลาคม','พฤศจิกายน','ธันวาคม'],
+ monthNamesShort: ['ม.ค.','ก.พ.','มี.ค.','เม.ย.','พ.ค.','มิ.ย.',
+ 'ก.ค.','ส.ค.','ก.ย.','ต.ค.','พ.ย.','ธ.ค.'],
+ dayNames: ['อาทิตย์','จันทร์','อังคาร','พุธ','พฤหัสบดี','ศุกร์','เสาร์'],
+ dayNamesShort: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
+ dayNamesMin: ['อา.','จ.','อ.','พ.','พฤ.','ศ.','ส.'],
+ weekHeader: 'Wk',
+ dateFormat: 'dd/mm/yy',
+ firstDay: 0,
+ isRTL: false,
+ showMonthAfterYear: false,
+ yearSuffix: ''};
+ $.datepicker.setDefaults($.datepicker.regional['th']);
+});
+
+/* Tajiki (UTF-8) initialisation for the jQuery UI date picker plugin. */
+/* Written by Abdurahmon Saidov (sai...@gm...). */
+jQuery(function($){
+ $.datepicker.regional['tj'] = {
+ closeText: 'Идома',
+ prevText: '<Қафо',
+ nextText: 'Пеш>',
+ currentText: 'Имрӯз',
+ monthNames: ['Январ','Феврал','Март','Апрел','Май','Июн',
+ 'Июл','Август','Сентябр','Октябр','Ноябр','Декабр'],
+ monthNamesShort: ['Янв','Фев','Мар','Апр','Май','Июн',
+ 'Июл','Авг','Сен','Окт','Ноя','Дек'],
+ dayNames: ['якшанбе','душанбе','сешанбе','чорша...
[truncated message content] |
|
From: <gem...@li...> - 2012-12-20 10:57:27
|
Revision: 1069
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1069&view=rev
Author: matijsdejong
Date: 2012-12-20 10:57:18 +0000 (Thu, 20 Dec 2012)
Log Message:
-----------
Started using MUtil/Db/Expr/CurrentTimestamp.php and MUtil/Translate/Translateable.php
Modified Paths:
--------------
trunk/library/classes/Gems/AccessLog.php
trunk/library/classes/Gems/Default/RespondentAction.php
trunk/library/classes/Gems/Email/Mailer.php
trunk/library/classes/Gems/Email/TemplateMailer.php
trunk/library/classes/Gems/Model/RespondentModel.php
trunk/library/classes/Gems/Model.php
trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php
trunk/library/classes/Gems/Tracker/RespondentTrack.php
trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php
trunk/library/classes/Gems/Tracker/Source/SourceAbstract.php
trunk/library/classes/Gems/Tracker/Survey.php
trunk/library/classes/Gems/Tracker/Token/TokenLibrary.php
trunk/library/classes/Gems/Tracker/Token.php
trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php
trunk/library/classes/Gems/User/OldStaffUserDefinition.php
trunk/library/classes/Gems/User/Organization.php
trunk/library/classes/Gems/User/User.php
trunk/library/classes/Gems/User/UserLoader.php
trunk/library/classes/Gems/Util/DatabasePatcher.php
trunk/library/classes/MUtil/Snippets/SnippetAbstract.php
Added Paths:
-----------
trunk/library/classes/MUtil/Db/
trunk/library/classes/MUtil/Db/Expr/
trunk/library/classes/MUtil/Db/Expr/CurrentTimestamp.php
Modified: trunk/library/classes/Gems/AccessLog.php
===================================================================
--- trunk/library/classes/Gems/AccessLog.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/AccessLog.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -1,6 +1,5 @@
<?php
-
/**
* Copyright (c) 2011, Erasmus MC
* All rights reserved.
@@ -125,7 +124,7 @@
* actions like the autofilter
*/
//$values['glac_log'] = !substr_count($action, '.autofilter');
- $values['glac_created'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $values['glac_created'] = new MUtil_Db_Expr_CurrentTimestamp();
$this->_db->insert('gems__log_actions', $values);
@@ -192,7 +191,7 @@
$values['glua_organization'] = $this->_userInfo->user_organization_id ? $this->_userInfo->user_organization_id : 0;
$values['glua_action'] = $this->getActionId($action);
$values['glua_role'] = $this->_userInfo->user_role ? $this->_userInfo->user_role : '--not set--' ;
- $values['glua_created'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $values['glua_created'] = new MUtil_Db_Expr_CurrentTimestamp();
if ($request instanceof Zend_Controller_Request_Http) {
$values['glua_remote_ip'] = $request->getClientIp();
Modified: trunk/library/classes/Gems/Default/RespondentAction.php
===================================================================
--- trunk/library/classes/Gems/Default/RespondentAction.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/Default/RespondentAction.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -284,7 +284,7 @@
// Perform actual save, but not simple stop codes.
if ($code->isForRespondents()) {
$values['gr2o_reception_code'] = $data['gr2o_reception_code'];
- $values['gr2o_changed'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $values['gr2o_changed'] = new MUtil_Db_Expr_CurrentTimestamp();
$values['gr2o_changed_by'] = $userId;
$where = 'gr2o_id_user = ? AND gr2o_id_organization = ?';
@@ -497,8 +497,8 @@
if ($patientId) {
$where['gr2o_patient_nr = ?'] = $patientId;
$where['gr2o_id_organization = ?'] = $orgId ? $orgId : $this->escort->getCurrentOrganization();
- $values['gr2o_opened'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
- $values['gr2o_opened_by'] = $this->session->user_id;
+ $values['gr2o_opened'] = new MUtil_Db_Expr_CurrentTimestamp();
+ $values['gr2o_opened_by'] = $this->session->user_id;
$this->db->update('gems__respondent2org', $values, $where);
}
Modified: trunk/library/classes/Gems/Email/Mailer.php
===================================================================
--- trunk/library/classes/Gems/Email/Mailer.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/Email/Mailer.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -1,4 +1,5 @@
<?php
+
/**
* Copyright (c) 2011, Erasmus MC
* All rights reserved.
@@ -166,7 +167,7 @@
{
return $this->messages;
}
-
+
/**
* Logs the communication if needed
*
@@ -177,7 +178,7 @@
protected function logCommunication($to = null, $from = null, $tokenData = array() )
{
if (null === $this->_changeDate) {
- $this->_changeDate = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $this->_changeDate = new MUtil_Db_Expr_CurrentTimestamp();
}
$db = $this->escort->db;
@@ -225,7 +226,7 @@
MUtil_Echo::r($from, $from_name);
}
-
+
// If bounce is active, the Gems_Mail will take care of resetting the to field
if (!$this->bounceCheck()) {
$validate = new Zend_Validate_EmailAddress();
@@ -236,7 +237,7 @@
}
$mail = new Gems_Mail();
-
+
$mail->setFrom($from, $from_name);
$mail->addTo($to, $to_name);
if (isset($this->escort->project->email['bcc'])) {
@@ -254,7 +255,7 @@
try {
$mail->send($this->checkTransport($from));
$result = false;
-
+
// communication successful, now log it
$this->logCommunication($to, $from, $tokenData);
Modified: trunk/library/classes/Gems/Email/TemplateMailer.php
===================================================================
--- trunk/library/classes/Gems/Email/TemplateMailer.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/Email/TemplateMailer.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -518,7 +518,7 @@
protected function updateToken(array $tokenData, $to = null, $from = null)
{
if (null === $this->_changeDate) {
- $this->_changeDate = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $this->_changeDate = new MUtil_Db_Expr_CurrentTimestamp();
}
$db = $this->escort->db;
Modified: trunk/library/classes/Gems/Model/RespondentModel.php
===================================================================
--- trunk/library/classes/Gems/Model/RespondentModel.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/Model/RespondentModel.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -79,7 +79,7 @@
$this->setKeys($this->_getKeysFor('gems__respondent2org'));
- $this->setOnSave('gr2o_opened', new Zend_Db_Expr('CURRENT_TIMESTAMP'));
+ $this->setOnSave('gr2o_opened', new MUtil_Db_Expr_CurrentTimestamp());
$this->setSaveOnChange('gr2o_opened');
$this->setOnSave('gr2o_opened_by', GemsEscort::getInstance()->session->user_id);
$this->setSaveOnChange('gr2o_opened_by');
Modified: trunk/library/classes/Gems/Model.php
===================================================================
--- trunk/library/classes/Gems/Model.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/Model.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -138,7 +138,7 @@
public function createGemsUserId($value, $isNew = false, $name = null, array $context = array())
{
if ($isNew || (null === $value)) {
- $creationTime = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $creationTime = new MUtil_Db_Expr_CurrentTimestamp();
do {
$out = mt_rand(1, 9);
@@ -288,9 +288,9 @@
$created_field = $prefix . '_created';
$created_by_field = $prefix . '_created_by';
- $model->setOnSave($changed_field, new Zend_Db_Expr('CURRENT_TIMESTAMP'));
+ $model->setOnSave($changed_field, new MUtil_Db_Expr_CurrentTimestamp());
$model->setSaveOnChange($changed_field);
- $model->setOnSave($created_field, new Zend_Db_Expr('CURRENT_TIMESTAMP'));
+ $model->setOnSave($created_field, new MUtil_Db_Expr_CurrentTimestamp());
$model->setSaveWhenNew($created_field);
if (! $userid) {
Modified: trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/Tracker/Engine/TrackEngineAbstract.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -44,7 +44,7 @@
* @license New BSD License
* @since Class available since version 1.4
*/
-abstract class Gems_Tracker_Engine_TrackEngineAbstract extends MUtil_Registry_TargetAbstract implements Gems_Tracker_Engine_TrackEngineInterface
+abstract class Gems_Tracker_Engine_TrackEngineAbstract extends MUtil_Translate_TranslateableAbstract implements Gems_Tracker_Engine_TrackEngineInterface
{
const FIELD_SEP = '|';
@@ -97,16 +97,8 @@
*/
protected $tracker;
-
/**
- * Set as this is a MUtil_Registry_TargetInterface
*
- * @var Zend_Translate $translate
- */
- protected $translate;
-
- /**
- *
* @var Gems_Util
*/
protected $util;
@@ -118,23 +110,7 @@
protected $view;
/**
- * Copy from Zend_Translate_Adapter
*
- * Translates the given string
- * returns the translation
- *
- * @param string $text Translation string
- * @param string|Zend_Locale $locale (optional) Locale/Language to use, identical with locale
- * identifier, @see Zend_Locale for more information
- * @return string
- */
- public function _($text, $locale = null)
- {
- return $this->translate->getAdapter()->_($text, $locale);
- }
-
- /**
- *
* @param array $trackData array containing track record
*/
public function __construct($trackData)
@@ -237,7 +213,7 @@
}
if (! isset($values['gto_changed'])) {
- $values['gtr_changed'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $values['gtr_changed'] = new MUtil_Db_Expr_CurrentTimestamp();
}
if (! isset($values['gtr_changed_by'])) {
$values['gtr_changed_by'] = $userId;
Modified: trunk/library/classes/Gems/Tracker/RespondentTrack.php
===================================================================
--- trunk/library/classes/Gems/Tracker/RespondentTrack.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/Tracker/RespondentTrack.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -36,6 +36,7 @@
*/
/**
+ * Object representing a track assignment to a respondent.
*
* @package Gems
* @subpackage Tracker
@@ -250,7 +251,7 @@
}
if (! isset($values['gr2t_changed'])) {
- $values['gr2t_changed'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $values['gr2t_changed'] = new MUtil_Db_Expr_CurrentTimestamp();
}
if (! isset($values['gr2t_changed_by'])) {
$values['gr2t_changed_by'] = $userId;
@@ -413,7 +414,7 @@
if ($date instanceof MUtil_Date) {
return $date;
}
-
+
if (Zend_Date::isDate($date, Gems_Tracker::DB_DATETIME_FORMAT)) {
return new MUtil_Date($date, Gems_Tracker::DB_DATETIME_FORMAT);
}
Modified: trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/Tracker/Source/LimeSurvey1m9Database.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -36,7 +36,8 @@
*/
/**
- * Class description of LimeSurvey1m9Database
+ * LimeSurvey1m9Database is a Source interface that enables the use of LimeSurvey 1.9.x
+ * installation as survey/answer source for Gems projects.
*
* @package Gems
* @subpackage Tracker
@@ -347,7 +348,7 @@
$values['gso_active'] = $active ? 1 : 0;
$values['gso_status'] = $active ? 'Active' : 'Inactive';
- $values['gso_last_synch'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $values['gso_last_synch'] = new MUtil_Db_Expr_CurrentTimestamp();
$this->_updateSource($values, $userId);
@@ -1071,7 +1072,7 @@
$where = $lsDb->quoteInto("token = ?", $lsTokenId);
$lsDb->update($lsTab, $answers, $where);
} else {
- $current = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $current = new MUtil_Db_Expr_CurrentTimestamp();
$answers['token'] = $lsTokenId;
$answers['startlanguage'] = $this->locale->getLanguage();
Modified: trunk/library/classes/Gems/Tracker/Source/SourceAbstract.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Source/SourceAbstract.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/Tracker/Source/SourceAbstract.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -49,11 +49,11 @@
{
/**
* Holds the current batch if there is any
- *
+ *
* @var Gems_Task_TaskRunnerBatch
*/
protected $_batch = null;
-
+
/**
* The database connection to Gems itself
*
@@ -166,11 +166,11 @@
AND gsu_surveyor_id NOT IN (' . implode(', ', $surveyorSids) . ')';
// Fixed values
- $data['gsu_active'] = 0;
+ $data['gsu_active'] = 0;
$data['gsu_surveyor_active'] = 0;
- $data['gsu_status'] = 'Survey was removed from source.';
- $data['gsu_changed'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
- $data['gsu_changed_by'] = $userId;
+ $data['gsu_status'] = 'Survey was removed from source.';
+ $data['gsu_changed'] = new MUtil_Db_Expr_CurrentTimestamp();
+ $data['gsu_changed_by'] = $userId;
$this->_gemsDb->update('gems__surveys', $data, $sqlWhere);
@@ -198,7 +198,7 @@
}
if (! isset($values['gso_changed'])) {
- $values['gso_changed'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $values['gso_changed'] = new MUtil_Db_Expr_CurrentTimestamp();
}
if (! isset($values['gso_changed_by'])) {
$values['gso_changed_by'] = $userId;
Modified: trunk/library/classes/Gems/Tracker/Survey.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Survey.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/Tracker/Survey.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -36,7 +36,7 @@
*/
/**
- * Class description of Survey
+ * Object representing a specific Survey
*
* @package Gems
* @subpackage Tracker
@@ -151,7 +151,7 @@
}
if (! isset($values['gsu_changed'])) {
- $values['gsu_changed'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $values['gsu_changed'] = new MUtil_Db_Expr_CurrentTimestamp();
}
if (! isset($values['gsu_changed_by'])) {
$values['gsu_changed_by'] = $userId;
@@ -166,7 +166,7 @@
} else {
if (! isset($values['gsu_created'])) {
- $values['gsu_created'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $values['gsu_created'] = new MUtil_Db_Expr_CurrentTimestamp();
}
if (! isset($values['gsu_created_by'])) {
$values['gsu_created_by'] = $userId;
Modified: trunk/library/classes/Gems/Tracker/Token/TokenLibrary.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Token/TokenLibrary.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/Tracker/Token/TokenLibrary.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -36,7 +36,7 @@
*/
/**
- * Class description of TokenLibrary
+ * Utility functions for token string functions
*
* @package Gems
* @subpackage Tracker
@@ -127,7 +127,7 @@
*/
public function createToken(array $tokenData, $userId)
{
- $current = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $current = new MUtil_Db_Expr_CurrentTimestamp();
$tokenData['gto_changed'] = $current;
$tokenData['gto_changed_by'] = $userId;
Modified: trunk/library/classes/Gems/Tracker/Token.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Token.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/Tracker/Token.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -36,7 +36,7 @@
*/
/**
- * Utility class for checking and changing tokens.
+ * Object class for checking and changing tokens.
*
* @package Gems
* @subpackage Tracker
@@ -232,7 +232,7 @@
}
if (! isset($values['gto_changed'])) {
- $values['gto_changed'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $values['gto_changed'] = new MUtil_Db_Expr_CurrentTimestamp();
}
if (! isset($values['gto_changed_by'])) {
$values['gto_changed_by'] = $userId;
@@ -657,7 +657,7 @@
if ($this->_gemsData[$fieldName] instanceof MUtil_Date) {
return $this->_gemsData[$fieldName];
}
-
+
if (Zend_Date::isDate($this->_gemsData[$fieldName], Gems_Tracker::DB_DATETIME_FORMAT)) {
return new MUtil_Date($this->_gemsData[$fieldName], Gems_Tracker::DB_DATETIME_FORMAT);
}
@@ -1157,7 +1157,7 @@
$survey->copyTokenToSource($this, $language);
if (! $this->_gemsData['gto_in_source']) {
- $values['gto_start_time'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $values['gto_start_time'] = new MUtil_Db_Expr_CurrentTimestamp();
$values['gto_in_source'] = 1;
}
$values['gto_by'] = $userId;
Modified: trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php
===================================================================
--- trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/User/DbUserDefinitionAbstract.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -149,7 +149,7 @@
} else {
$data['gup_reset_key'] = $this->hashPassword(time() . $user->getEmailAddress());
}
- $data['gup_reset_requested'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $data['gup_reset_requested'] = new MUtil_Db_Expr_CurrentTimestamp();
// Loop for case when hash is not unique
while (true) {
Modified: trunk/library/classes/Gems/User/OldStaffUserDefinition.php
===================================================================
--- trunk/library/classes/Gems/User/OldStaffUserDefinition.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/User/OldStaffUserDefinition.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -163,7 +163,7 @@
} else {
$data['gsf_reset_key'] = $this->hashPassword(time() . $user->getEmailAddress());
}
- $data['gsf_reset_req'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $data['gsf_reset_req'] = new MUtil_Db_Expr_CurrentTimestamp();
// Loop for case when hash is not unique
while (true) {
@@ -280,7 +280,7 @@
try {
$user_id = $this->db->fetchOne($sql, array($user->getLoginName(), $user->getBaseOrganizationId()));
- $currentTimestamp = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $currentTimestamp = new MUtil_Db_Expr_CurrentTimestamp();
// Move to USER_STAFF
$values['gup_id_user'] = $user_id;
Modified: trunk/library/classes/Gems/User/Organization.php
===================================================================
--- trunk/library/classes/Gems/User/Organization.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/User/Organization.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -373,7 +373,7 @@
{
if (! $this->_get('gor_has_respondents')) {
$values['gor_has_respondents'] = 1;
- $values['gor_changed'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $values['gor_changed'] = new MUtil_Db_Expr_CurrentTimestamp();
$values['gor_changed_by'] = $userId;
$where = $this->db->quoteInto('gor_id_organization = ?', $this->_id);
Modified: trunk/library/classes/Gems/User/User.php
===================================================================
--- trunk/library/classes/Gems/User/User.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/User/User.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -300,7 +300,7 @@
}
// Always record the last fail
- $values['gula_last_failed'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $values['gula_last_failed'] = new MUtil_Db_Expr_CurrentTimestamp();
$values['gula_failed_logins'] = max(1, $values['gula_failed_logins']);
// Response gets slowly slower
Modified: trunk/library/classes/Gems/User/UserLoader.php
===================================================================
--- trunk/library/classes/Gems/User/UserLoader.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/User/UserLoader.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -176,7 +176,7 @@
*/
public function createUser($login_name, $organization, $userClassName, $userId)
{
- $now = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $now = new MUtil_Db_Expr_CurrentTimestamp();;
$values['gul_user_class'] = $userClassName;
$values['gul_can_login'] = 1;
@@ -553,9 +553,9 @@
$values['gul_id_organization'] = $organization;
$values['gul_user_class'] = self::USER_OLD_STAFF; // Old staff as password is still in gems__staff
$values['gul_can_login'] = 1;
- $values['gul_changed'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $values['gul_changed'] = new MUtil_Db_Expr_CurrentTimestamp();
$values['gul_changed_by'] = $user_id;
- $values['gul_created'] = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $values['gul_created'] = $values['gul_changed'];
$values['gul_created_by'] = $user_id;
try {
Modified: trunk/library/classes/Gems/Util/DatabasePatcher.php
===================================================================
--- trunk/library/classes/Gems/Util/DatabasePatcher.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/Gems/Util/DatabasePatcher.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -157,7 +157,7 @@
$sql .= ' ORDER BY gpa_level, gpa_location, gpa_id_patch';
// MUtil_Echo::rs($ignoreCompleted, $ignoreExecuted, $sql);
- $current = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $current = new MUtil_Db_Expr_CurrentTimestamp();
$executed = 0;
$patches = $this->db->fetchAll($sql, $patchLevel);
@@ -235,7 +235,7 @@
$tree = MUtil_Ra_Nested::toTree($existing, 'gpa_level', 'gpa_location', 'gpa_name', 'gpa_order');
$changed = 0;
- $current = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ $current = new MUtil_Db_Expr_CurrentTimestamp();
$minimum = $this->getMinimumPatchLevel();
// MUtil_Echo::track($minimum);
Added: trunk/library/classes/MUtil/Db/Expr/CurrentTimestamp.php
===================================================================
--- trunk/library/classes/MUtil/Db/Expr/CurrentTimestamp.php (rev 0)
+++ trunk/library/classes/MUtil/Db/Expr/CurrentTimestamp.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -0,0 +1,56 @@
+<?php
+
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Db
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @version $Id: CurrentTimestamp.php$
+ */
+
+/**
+ * Standard current timestamp expression
+ *
+ * @package MUtil
+ * @subpackage Db
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.1.36
+ */
+class MUtil_Db_Expr_CurrentTimestamp extends Zend_Db_Expr
+{
+ /**
+ * Instantiate teh current timestamp expression.
+ */
+ public function __construct()
+ {
+ parent::__construct('CURRENT_TIMESTAMP');
+ }
+}
Modified: trunk/library/classes/MUtil/Snippets/SnippetAbstract.php
===================================================================
--- trunk/library/classes/MUtil/Snippets/SnippetAbstract.php 2012-12-17 12:46:11 UTC (rev 1068)
+++ trunk/library/classes/MUtil/Snippets/SnippetAbstract.php 2012-12-20 10:57:18 UTC (rev 1069)
@@ -52,7 +52,7 @@
* @license New BSD License
* @since Class available since version 1.1
*/
-abstract class MUtil_Snippets_SnippetAbstract extends MUtil_Registry_TargetAbstract implements MUtil_Snippets_SnippetInterface
+abstract class MUtil_Snippets_SnippetAbstract extends MUtil_Translate_TranslateableAbstract implements MUtil_Snippets_SnippetInterface
{
/**
*
@@ -83,29 +83,6 @@
public $resetRoute = false;
/**
- * Set as this is a MUtil_Registry_TargetInterface
- *
- * @var Zend_Translate $translate
- */
- protected $translate;
-
- /**
- * Copy from Zend_Translate_Adapter
- *
- * Translates the given string
- * returns the translation
- *
- * @param string $text Translation string
- * @param string|Zend_Locale $locale (optional) Locale/Language to use, identical with locale
- * identifier, @see Zend_Locale for more information
- * @return string
- */
- public function _($text, $locale = null)
- {
- return $this->translate->getAdapter()->_($text, $locale);
- }
-
- /**
* Adds one or more messages to the session based message store.
*
* @param mixed $message_args Can be an array or multiple argemuents. Each sub element is a single message string
@@ -214,26 +191,6 @@
}
/**
- * Copy from Zend_Translate_Adapter
- *
- * Translates the given string using plural notations
- * Returns the translated string
- *
- * @see Zend_Locale
- * @param string $singular Singular translation string
- * @param string $plural Plural translation string
- * @param integer $number Number for detecting the correct plural
- * @param string|Zend_Locale $locale (Optional) Locale/Language to use, identical with
- * locale identifier, @see Zend_Locale for more information
- * @return string
- */
- public function plural($singular, $plural, $number, $locale = null)
- {
- $args = func_get_args();
- return call_user_func_array(array($this->translate->getAdapter(), 'plural'), $args);
- }
-
- /**
* When there is a redirectRoute this function will execute it.
*
* When hasHtmlOutput() is true this functions should not be called.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-17 12:46:18
|
Revision: 1068
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1068&view=rev
Author: mennodekker
Date: 2012-12-17 12:46:11 +0000 (Mon, 17 Dec 2012)
Log Message:
-----------
Removed debug statement
Modified Paths:
--------------
trunk/library/classes/Gems/Tracker/Token.php
Modified: trunk/library/classes/Gems/Tracker/Token.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Token.php 2012-12-17 12:27:22 UTC (rev 1067)
+++ trunk/library/classes/Gems/Tracker/Token.php 2012-12-17 12:46:11 UTC (rev 1068)
@@ -201,7 +201,7 @@
$respId = $this->_gemsData['gto_id_respondent'];
$orgId = $this->_gemsData['gto_id_organization'];
- MUtil_Echo::track($this->_gemsData);
+ // MUtil_Echo::track($this->_gemsData);
if ($row = $this->db->fetchRow($sql, array($respId, $orgId))) {
$this->_gemsData = $this->_gemsData + $row;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-17 12:27:29
|
Revision: 1067
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1067&view=rev
Author: mennodekker
Date: 2012-12-17 12:27:22 +0000 (Mon, 17 Dec 2012)
Log Message:
-----------
Fixes for date calculations to accept MUtil_Date instead of a string
Modified Paths:
--------------
trunk/library/classes/Gems/Tracker/RespondentTrack.php
trunk/library/classes/Gems/Tracker/Token.php
trunk/library/classes/Gems/Util/Translated.php
Modified: trunk/library/classes/Gems/Tracker/RespondentTrack.php
===================================================================
--- trunk/library/classes/Gems/Tracker/RespondentTrack.php 2012-12-17 10:01:04 UTC (rev 1066)
+++ trunk/library/classes/Gems/Tracker/RespondentTrack.php 2012-12-17 12:27:22 UTC (rev 1067)
@@ -410,6 +410,10 @@
}
if ($date) {
+ if ($date instanceof MUtil_Date) {
+ return $date;
+ }
+
if (Zend_Date::isDate($date, Gems_Tracker::DB_DATETIME_FORMAT)) {
return new MUtil_Date($date, Gems_Tracker::DB_DATETIME_FORMAT);
}
Modified: trunk/library/classes/Gems/Tracker/Token.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Token.php 2012-12-17 10:01:04 UTC (rev 1066)
+++ trunk/library/classes/Gems/Tracker/Token.php 2012-12-17 12:27:22 UTC (rev 1067)
@@ -611,6 +611,9 @@
public function getCompletionTime()
{
if (isset($this->_gemsData['gto_completion_time']) && $this->_gemsData['gto_completion_time']) {
+ if ($this->_gemsData['gto_completion_time'] instanceof MUtil_Date) {
+ return $this->_gemsData['gto_completion_time'];
+ }
return new MUtil_Date($this->_gemsData['gto_completion_time'], Gems_Tracker::DB_DATETIME_FORMAT);
}
}
@@ -651,7 +654,10 @@
public function getDateTime($fieldName)
{
if (isset($this->_gemsData[$fieldName])) {
-
+ if ($this->_gemsData[$fieldName] instanceof MUtil_Date) {
+ return $this->_gemsData[$fieldName];
+ }
+
if (Zend_Date::isDate($this->_gemsData[$fieldName], Gems_Tracker::DB_DATETIME_FORMAT)) {
return new MUtil_Date($this->_gemsData[$fieldName], Gems_Tracker::DB_DATETIME_FORMAT);
}
@@ -1173,6 +1179,9 @@
public function getValidFrom()
{
if (isset($this->_gemsData['gto_valid_from']) && $this->_gemsData['gto_valid_from']) {
+ if ($this->_gemsData['gto_valid_from'] instanceof MUtil_Date) {
+ return $this->_gemsData['gto_valid_from'];
+ }
return new MUtil_Date($this->_gemsData['gto_valid_from'], Gems_Tracker::DB_DATETIME_FORMAT);
}
}
@@ -1184,6 +1193,9 @@
public function getValidUntil()
{
if (isset($this->_gemsData['gto_valid_until']) && $this->_gemsData['gto_valid_until']) {
+ if ($this->_gemsData['gto_valid_until'] instanceof MUtil_Date) {
+ return $this->_gemsData['gto_valid_until'];
+ }
return new MUtil_Date($this->_gemsData['gto_valid_until'], Gems_Tracker::DB_DATETIME_FORMAT);
}
}
Modified: trunk/library/classes/Gems/Util/Translated.php
===================================================================
--- trunk/library/classes/Gems/Util/Translated.php 2012-12-17 10:01:04 UTC (rev 1066)
+++ trunk/library/classes/Gems/Util/Translated.php 2012-12-17 12:27:22 UTC (rev 1067)
@@ -131,7 +131,11 @@
// MUtil_Echo::track($dateTimeValue, date('c', $dateTime), $dateTime / 86400, date('c', time()), time() / 86400);
// TODO: Timezone seems to screw this one up
//$days = floor($dateTime / 86400) - floor(time() / 86400); // 86400 = 24*60*60
- $dateTime = new MUtil_Date($dateTimeValue, Zend_Date::ISO_8601);
+ if ($dateTimeValue instanceof MUtil_Date) {
+ $dateTime = clone $dateTimeValue;
+ } else {
+ $dateTime = new MUtil_Date($dateTimeValue, Zend_Date::ISO_8601);
+ }
$days = $dateTime->diffDays();
switch ($days) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-17 10:01:10
|
Revision: 1066
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1066&view=rev
Author: mennodekker
Date: 2012-12-17 10:01:04 +0000 (Mon, 17 Dec 2012)
Log Message:
-----------
strict standards fix
Modified Paths:
--------------
trunk/library/classes/MUtil/Model/JoinModel.php
trunk/library/classes/MUtil/Model/TableModel.php
Modified: trunk/library/classes/MUtil/Model/JoinModel.php
===================================================================
--- trunk/library/classes/MUtil/Model/JoinModel.php 2012-12-17 09:59:11 UTC (rev 1065)
+++ trunk/library/classes/MUtil/Model/JoinModel.php 2012-12-17 10:01:04 UTC (rev 1066)
@@ -375,9 +375,9 @@
}
// Handle possible onLoad
- $newValues = reset($this->processAfterLoad(array($newValues)));
+ $newValues = $this->processAfterLoad(array($newValues));
- return $newValues;
+ return reset($newValues);
}
/**
Modified: trunk/library/classes/MUtil/Model/TableModel.php
===================================================================
--- trunk/library/classes/MUtil/Model/TableModel.php 2012-12-17 09:59:11 UTC (rev 1065)
+++ trunk/library/classes/MUtil/Model/TableModel.php 2012-12-17 10:01:04 UTC (rev 1066)
@@ -122,7 +122,7 @@
$updatedValues = $this->_saveTableData($this->_table, $newValues, $filter, parent::SAVE_MODE_ALL) + $newValues;
// Handle possible onLoad
- $updatedValues = reset($this->processAfterLoad(array($updatedValues)));
- return $updatedValues;
+ $updatedValues = $this->processAfterLoad(array($updatedValues));
+ return reset($updatedValues);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-17 09:59:18
|
Revision: 1065
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1065&view=rev
Author: mennodekker
Date: 2012-12-17 09:59:11 +0000 (Mon, 17 Dec 2012)
Log Message:
-----------
Fixed commit 1059: output of save should not be a nested array
Modified Paths:
--------------
trunk/library/classes/MUtil/Model/JoinModel.php
trunk/library/classes/MUtil/Model/TableModel.php
Modified: trunk/library/classes/MUtil/Model/JoinModel.php
===================================================================
--- trunk/library/classes/MUtil/Model/JoinModel.php 2012-12-14 16:26:58 UTC (rev 1064)
+++ trunk/library/classes/MUtil/Model/JoinModel.php 2012-12-17 09:59:11 UTC (rev 1065)
@@ -375,7 +375,7 @@
}
// Handle possible onLoad
- $newValues = $this->processAfterLoad(array($newValues));
+ $newValues = reset($this->processAfterLoad(array($newValues)));
return $newValues;
}
Modified: trunk/library/classes/MUtil/Model/TableModel.php
===================================================================
--- trunk/library/classes/MUtil/Model/TableModel.php 2012-12-14 16:26:58 UTC (rev 1064)
+++ trunk/library/classes/MUtil/Model/TableModel.php 2012-12-17 09:59:11 UTC (rev 1065)
@@ -122,7 +122,7 @@
$updatedValues = $this->_saveTableData($this->_table, $newValues, $filter, parent::SAVE_MODE_ALL) + $newValues;
// Handle possible onLoad
- $updatedValues = $this->processAfterLoad(array($updatedValues));
+ $updatedValues = reset($this->processAfterLoad(array($updatedValues)));
return $updatedValues;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-14 16:27:04
|
Revision: 1064
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1064&view=rev
Author: matijsdejong
Date: 2012-12-14 16:26:58 +0000 (Fri, 14 Dec 2012)
Log Message:
-----------
TranslateableAbstract.php object for easy (and correct) addition of translation to objects
Added Paths:
-----------
trunk/library/classes/MUtil/Translate/TranslateableAbstract.php
Added: trunk/library/classes/MUtil/Translate/TranslateableAbstract.php
===================================================================
--- trunk/library/classes/MUtil/Translate/TranslateableAbstract.php (rev 0)
+++ trunk/library/classes/MUtil/Translate/TranslateableAbstract.php 2012-12-14 16:26:58 UTC (rev 1064)
@@ -0,0 +1,144 @@
+<?php
+
+/**
+ * Copyright (c) 2012, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *
+ * @package MUtil
+ * @subpackage Translate
+ * @author Matijs de Jong <mj...@ma...>
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @version $id: TranslateableAbstract.php 203 2012-01-01t 12:51:32Z matijs $
+ */
+
+/**
+ * Add auto translate functions to a class
+ *
+ * Can be implemented as Traight in PHP 5.4 or copied into source
+ *
+ * @package MUtil
+ * @subpackage Translate
+ * @copyright Copyright (c) 2012 Erasmus MC
+ * @license New BSD License
+ * @since Class available since version 1.1.35
+ */
+class MUtil_Translate_TranslateableAbstract extends MUtil_Registry_TargetAbstract
+{
+ /**
+ *
+ * @var Zend_Translate
+ */
+ protected $translate;
+
+ /**
+ *
+ * @var Zend_Translate_Adapter
+ */
+ protected $translateAdapter;
+
+ /**
+ * Copy from Zend_Translate_Adapter
+ *
+ * Translates the given string
+ * returns the translation
+ *
+ * @param string $text Translation string
+ * @param string|Zend_Locale $locale (optional) Locale/Language to use, identical with locale
+ * identifier, @see Zend_Locale for more information
+ * @return string
+ */
+ public function _($text, $locale = null)
+ {
+ return $this->translateAdapter->_($text, $locale);
+ }
+
+ /**
+ * Called after the check that all required registry values
+ * have been set correctly has run.
+ *
+ * This function is no needed if the classes are setup correctly
+ *
+ * @return void
+ */
+ public function afterRegistry()
+ {
+ parent::afterRegistry();
+
+ $this->initTranslateable();
+ }
+
+ /**
+ * Function that checks the setup of this class/traight
+ *
+ * This function is not needed if the variables have been defined correctly in the
+ * source for this object and theose variables have been applied.
+ *
+ * return @void
+ */
+ protected function initTranslateable()
+ {
+ if ($this->translateAdapter instanceof Zend_Translate_Adapter) {
+ // OK
+ return;
+ }
+
+ if ($this->translate instanceof Zend_Translate) {
+ // Just one step
+ $this->translateAdapter = $this->translate->getAdapter();
+ return;
+ }
+
+ if ($this->translate instanceof Zend_Translate_Adapter) {
+ // It does happen and if it is all we have
+ $this->translateAdapter = $this->translate;
+ return;
+ }
+
+ // Make sure there always is an adapter, even if it is fake.
+ $this->translateAdapter = new MUtil_Translate_Adapter_Potemkin();
+ }
+
+ /**
+ * Copy from Zend_Translate_Adapter
+ *
+ * Translates the given string using plural notations
+ * Returns the translated string
+ *
+ * @see Zend_Locale
+ * @param string $singular Singular translation string
+ * @param string $plural Plural translation string
+ * @param integer $number Number for detecting the correct plural
+ * @param string|Zend_Locale $locale (Optional) Locale/Language to use, identical with
+ * locale identifier, @see Zend_Locale for more information
+ * @return string
+ */
+ public function plural($singular, $plural, $number, $locale = null)
+ {
+ $args = func_get_args();
+ return call_user_func_array(array($this->translateAdapter, 'plural'), $args);
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-14 09:19:09
|
Revision: 1063
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1063&view=rev
Author: mennodekker
Date: 2012-12-14 09:19:01 +0000 (Fri, 14 Dec 2012)
Log Message:
-----------
Created mailer class that handles logging and server selection, first step towards a more generic templatemailer (will be a separate class with a different name for backward compatibility)
Added Paths:
-----------
trunk/library/classes/Gems/Email/Mailer.php
Added: trunk/library/classes/Gems/Email/Mailer.php
===================================================================
--- trunk/library/classes/Gems/Email/Mailer.php (rev 0)
+++ trunk/library/classes/Gems/Email/Mailer.php 2012-12-14 09:19:01 UTC (rev 1063)
@@ -0,0 +1,321 @@
+<?php
+/**
+ * Copyright (c) 2011, Erasmus MC
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of Erasmus MC nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @version $Id: TemplateMailer.php 792 2012-06-27 11:59:17Z matijsdejong $
+ * @package Gems
+ * @subpackage Email
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ */
+
+/**
+ * Mailer utility class
+ *
+ * @author Michiel Rook <mi...@to...>
+ * @package Gems
+ * @subpackage Email
+ * @copyright Copyright (c) 2011 Erasmus MC
+ * @license New BSD License
+ */
+class Gems_Email_Mailer
+{
+ const MAIL_NO_ENCRYPT = 0;
+ const MAIL_SSL = 1;
+ const MAIL_TLS = 2;
+
+ /**
+ * Should the mailer continue sending mails, even when it encounters errors?
+ *
+ * @var boolean
+ */
+ public $continueOnError = false;
+
+ /**
+ *
+ * @var Zend_Mail_Transport
+ */
+ protected $defaultTransport = null;
+
+ /**
+ * @var GemsEscort $escort
+ */
+ protected $escort;
+
+ /**
+ * Feedback messages for this action.
+ *
+ * @var array of string
+ */
+ protected $messages = array();
+
+ private $_changeDate;
+ private $_mailSubject;
+ private $_mailDate;
+
+ private $_subject = null;
+ private $_body = null;
+ private $_templateId = null; // Not used for lookup
+
+ private $_verbose = false;
+
+ /**
+ * Constructs a new Gems_Email_TemplateMailer
+ * @param GemsEscort $escort
+ */
+ public function __construct(GemsEscort $escort)
+ {
+ $this->escort = $escort;
+ $this->_mailDate = MUtil_Date::format(new Zend_Date(), 'yyyy-MM-dd');
+ }
+
+ protected function addMessage($message)
+ {
+ $this->messages[] = $message;
+ return $this;
+ }
+
+ /**
+ * Returns true if the "email.bounce" setting exists in the project
+ * configuration and is true
+ * @return boolean
+ */
+ public function bounceCheck()
+ {
+ return $this->escort->project->getEmailBounce();
+ }
+
+ /**
+ * Returns Zend_Mail_Transport_Abstract when something else than the default mail protocol should be used.
+ *
+ * @staticvar array $mailServers
+ * @param email address $from
+ * @return Zend_Mail_Transport_Abstract or null
+ */
+ public function checkTransport($from)
+ {
+ static $mailServers = array();
+
+ if (! array_key_exists($from, $mailServers)) {
+ $sql = 'SELECT * FROM gems__mail_servers WHERE ? LIKE gms_from ORDER BY LENGTH(gms_from) DESC LIMIT 1';
+
+ // Always set cache, se we know when not to check for this row.
+ $serverData = $this->escort->db->fetchRow($sql, $from);
+
+ // MUtil_Echo::track($serverData);
+
+ if (isset($serverData['gms_server'])) {
+ $options = array();
+ if (isset($serverData['gms_user'], $serverData['gms_password'])) {
+ $options['auth'] = 'login';
+ $options['username'] = $serverData['gms_user'];
+ $options['password'] = $serverData['gms_password'];
+ }
+ if (isset($serverData['gms_port'])) {
+ $options['port'] = $serverData['gms_port'];
+ }
+ if (isset($serverData['gms_ssl'])) {
+ switch ($serverData['gms_ssl']) {
+ case self::MAIL_SSL:
+ $options['ssl'] = 'ssl';
+ break;
+
+ case self::MAIL_TLS:
+ $options['ssl'] = 'tls';
+ break;
+
+ default:
+ // intentional fall through
+
+ }
+ }
+
+ $mailServers[$from] = new Zend_Mail_Transport_Smtp($serverData['gms_server'], $options);
+ } else {
+ $mailServers[$from] = $this->defaultTransport;
+ }
+ }
+
+ return $mailServers[$from];
+ }
+
+ public function getMessages()
+ {
+ return $this->messages;
+ }
+
+ /**
+ * Logs the communication if needed
+ *
+ * @param string $to Optional, if available the communication is logged.
+ * @param string $from Optional
+ * @param array $tokenData Optional, array containing grs_id_user, gor_id_organization, gto_id_token
+ */
+ protected function logCommunication($to = null, $from = null, $tokenData = array() )
+ {
+ if (null === $this->_changeDate) {
+ $this->_changeDate = new Zend_Db_Expr('CURRENT_TIMESTAMP');
+ }
+
+ $db = $this->escort->db;
+ $uid = $this->escort->getCurrentUserId();
+
+ if ($to) {
+ $cdata['grco_id_to'] = array_key_exists('grs_id_user', $tokenData) ? $tokenData['grs_id_user'] : 0 ;
+ $cdata['grco_id_by'] = $uid;
+ $cdata['grco_organization'] = array_key_exists('gor_id_organization', $tokenData) ? $tokenData['gor_id_organization'] : 0;
+ $cdata['grco_id_token'] = array_key_exists('gto_id_token', $tokenData) ? $tokenData['gto_id_token'] : null ;
+
+ $cdata['grco_method'] = 'email';
+ $cdata['grco_topic'] = substr($this->_mailSubject, 0, 120);
+ $cdata['grco_address'] = substr($to, 0, 120);
+ $cdata['grco_sender'] = substr($from, 0, 120);
+
+ $cdata['grco_id_message'] = $this->_templateId ? $this->_templateId : null;
+
+ $cdata['grco_changed'] = $this->_changeDate;
+ $cdata['grco_changed_by'] = $uid;
+ $cdata['grco_created'] = $this->_changeDate;
+ $cdata['grco_created_by'] = $uid;
+
+ $db->insert('gems__log_respondent_communications', $cdata);
+ }
+ }
+
+ /**
+ * Sends a single e-mail
+ * @param string $to
+ * @param string $to_name
+ * @param string $from
+ * @param string $from_name
+ * @param array $tokenData
+ * @return boolean|string String = error message from protocol.
+ */
+ public function sendMail($to, $to_name, $from, $from_name, array $tokenData)
+ {
+ if (empty($from) || empty($to)) {
+ return "Need a sender and a recipient to continue";
+ }
+
+ if ($this->_verbose) {
+ MUtil_Echo::r($to, $to_name);
+ MUtil_Echo::r($from, $from_name);
+ }
+
+
+ // If bounce is active, the Gems_Mail will take care of resetting the to field
+ if (!$this->bounceCheck()) {
+ $validate = new Zend_Validate_EmailAddress();
+
+ if (!$validate->isValid($to)) {
+ return sprintf($this->escort->_("Invalid e-mail address '%s'."), $to);
+ }
+ }
+
+ $mail = new Gems_Mail();
+
+ $mail->setFrom($from, $from_name);
+ $mail->addTo($to, $to_name);
+ if (isset($this->escort->project->email['bcc'])) {
+ $mail->addBcc($this->escort->project->email['bcc']);
+ }
+
+ $subject = $this->_subject;
+ $body = $this->_body;
+
+ $mail->setSubject($subject);
+ $mail->setBodyBBCode($body);
+
+ $this->_mailSubject = $subject;
+
+ try {
+ $mail->send($this->checkTransport($from));
+ $result = false;
+
+ // communication successful, now log it
+ $this->logCommunication($to, $from, $tokenData);
+
+ } catch (Exception $e) {
+ $result = $e->getMessage();
+
+ // Log to error file
+ $this->escort->logger->logError($e, $this->escort->request);
+ }
+
+ return $result;
+ }
+
+ /**
+ * Sets the body of the mail
+ * @param string $body
+ * @return Gems_Email_TemplateMailer (continuation pattern)
+ */
+ public function setBody($body)
+ {
+ $this->_body = $body;
+ return $this;
+ }
+
+ /**
+ * Set a different default transport protocol.
+ *
+ * @param Zend_Mail_Transport_Abstract $transport
+ * @return Gems_Email_TemplateMailer (continuation pattern)
+ */
+ public function setDefaultTransport(Zend_Mail_Transport_Abstract $transport)
+ {
+ $this->defaultTransport = $transport;
+ return $this;
+ }
+
+ /**
+ * Sets the subject of the mail
+ * @param string $subject
+ * @return Gems_Email_TemplateMailer (continuation pattern)
+ */
+ public function setSubject($subject)
+ {
+ $this->_subject = $subject;
+ }
+
+ public function setTemplateId($templatedId)
+ {
+ $this->_templateId = $templatedId;
+ return $this;
+ }
+
+ /**
+ * Sets verbose (noisy) operation
+ *
+ * @param boolean $verbose
+ * @return Gems_Email_TemplateMailer (continuation pattern)
+ */
+ public function setVerbose($verbose)
+ {
+ $this->_verbose = $verbose;
+ return $this;
+ }
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-13 17:02:28
|
Revision: 1062
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1062&view=rev
Author: matijsdejong
Date: 2012-12-13 17:02:21 +0000 (Thu, 13 Dec 2012)
Log Message:
-----------
Slightly more polite phrasing used
Modified Paths:
--------------
trunk/library/classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php
trunk/library/languages/default-en.mo
trunk/library/languages/default-en.po
trunk/library/languages/default-nl.mo
trunk/library/languages/default-nl.po
Modified: trunk/library/classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php
===================================================================
--- trunk/library/classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php 2012-12-13 14:55:27 UTC (rev 1061)
+++ trunk/library/classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php 2012-12-13 17:02:21 UTC (rev 1062)
@@ -164,23 +164,32 @@
switch ($days) {
case 0:
- return array(MUtil_Html::create('strong', $this->_('Warning!!!')), ' ', $this->_('Survey must be answered today!'));
+ return array(
+ MUtil_Html::create('strong', $this->_('Warning!!!')),
+ ' ',
+ $this->_('This survey must be answered today!')
+ );
case 1:
- return array(MUtil_Html::create('strong', $this->_('Warning!!')), ' ', $this->_('Survey must be answered tomorrow!'));
+ return array(
+ MUtil_Html::create('strong', $this->_('Warning!!')),
+ ' ',
+ $this->_('This survey can only be answered until tomorrow!')
+ );
case 2:
- return $this->_('Warning! Survey must be answered over 2 days!');
+ return $this->_('Warning! This survey can only be answered for another 2 days!');
default:
- if (abs($days) <= 14) {
- if ($days >= 0) {
- return sprintf($this->_('Survey must be answered in %d days.'), $days);
- } else {
- return $this->_('Survey can no longer be answered.');
- }
+ if ($days <= 14) {
+ return sprintf($this->_('Please answer this survey within %d days.'), $days);
}
- return sprintf($this->_('Survey can be answered until %s.'), $dateTime->toString($this->dateFormat));
+
+ if ($days <= 0) {
+ return $this->_('This survey can no longer be answered.');
+ }
+
+ return sprintf($this->_('Please answer this survey before %s.'), $dateTime->toString($this->dateFormat));
}
}
Modified: trunk/library/languages/default-en.mo
===================================================================
(Binary files differ)
Modified: trunk/library/languages/default-en.po
===================================================================
--- trunk/library/languages/default-en.po 2012-12-13 14:55:27 UTC (rev 1061)
+++ trunk/library/languages/default-en.po 2012-12-13 17:02:21 UTC (rev 1062)
@@ -2,7 +2,7 @@
msgstr ""
"Project-Id-Version: GemsTracker EN\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-12-13 15:39+0100\n"
+"POT-Creation-Date: 2012-12-13 17:56+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Matijs de Jong <mj...@ma...>\n"
"Language-Team: Erasmus MGZ <mat...@ma...>\n"
@@ -4203,39 +4203,39 @@
msgid "Survey has no time limit."
msgstr "Survey has no time limit."
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:167
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:168
msgid "Warning!!!"
msgstr "Warning!!!"
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:167
-msgid "Survey must be answered today!"
-msgstr "Survey must be answered today!"
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:170
+msgid "This survey must be answered today!"
+msgstr "This survey must be answered today!"
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:170
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:175
msgid "Warning!!"
msgstr "Warning!!"
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:170
-msgid "Survey must be answered tomorrow!"
-msgstr "Survey must be answered tomorrow!"
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:177
+msgid "This survey can only be answered until tomorrow!"
+msgstr "This survey can only be answered until tomorrow!"
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:173
-msgid "Warning! Survey must be answered over 2 days!"
-msgstr "Warning! Survey must be answered over 2 days!"
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:181
+msgid "Warning! This survey can only be answered for another 2 days!"
+msgstr "Warning! This survey can only be answered for another 2 days!"
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:178
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:185
#, php-format
-msgid "Survey must be answered in %d days."
-msgstr "Survey must be answered in %d days."
+msgid "Please answer this survey within %d days."
+msgstr "Please answer this survey within %d days."
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:180
-msgid "Survey can no longer be answered."
-msgstr "Survey can no longer be answered."
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:189
+msgid "This survey can no longer be answered."
+msgstr "This survey can no longer be answered."
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:183
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:192
#, php-format
-msgid "Survey can be answered until %s."
-msgstr "Survey can be answered until %s."
+msgid "Please answer this survey before %s."
+msgstr "Please answer this survey before %s."
#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:376
#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1173
@@ -5184,6 +5184,15 @@
msgstr[1] ""
"After this survey there are another %d surveys we would like you to answer."
+#~ msgid "Survey can be answered until %s."
+#~ msgstr "Survey can be answered until %s."
+
+#~ msgid "Survey must be answered tomorrow!"
+#~ msgstr "Survey must be answered tomorrow!"
+
+#~ msgid "Survey must be answered in %d days."
+#~ msgstr "Survey must be answered in %d days."
+
#~ msgid "reset"
#~ msgstr "reset"
Modified: trunk/library/languages/default-nl.mo
===================================================================
(Binary files differ)
Modified: trunk/library/languages/default-nl.po
===================================================================
--- trunk/library/languages/default-nl.po 2012-12-13 14:55:27 UTC (rev 1061)
+++ trunk/library/languages/default-nl.po 2012-12-13 17:02:21 UTC (rev 1062)
@@ -2,7 +2,7 @@
msgstr ""
"Project-Id-Version: GemsTracker NL\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-12-13 15:38+0100\n"
+"POT-Creation-Date: 2012-12-13 17:55+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Matijs de Jong <mj...@ma...>\n"
"Language-Team: Erasmus MGZ <mat...@ma...>\n"
@@ -4236,39 +4236,39 @@
msgid "Survey has no time limit."
msgstr "Vragenlijst zonder eindtijd."
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:167
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:168
msgid "Warning!!!"
msgstr "Let op!!!"
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:167
-msgid "Survey must be answered today!"
-msgstr "Vragenlijst moet vandaag ingevuld zijn!"
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:170
+msgid "This survey must be answered today!"
+msgstr "Deze vragenlijst kan alleen vandaag nog ingevuld worden!"
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:170
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:175
msgid "Warning!!"
msgstr "Let op!!"
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:170
-msgid "Survey must be answered tomorrow!"
-msgstr "Vragenlijst moet morgen ingevuld zijn!"
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:177
+msgid "This survey can only be answered until tomorrow!"
+msgstr "Deze vragenlijst kan slechts tot morgen ingevuld worden!"
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:173
-msgid "Warning! Survey must be answered over 2 days!"
-msgstr "Let op! Vragenlijst moet overmorgen ingevuld zijn!"
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:181
+msgid "Warning! This survey can only be answered for another 2 days!"
+msgstr "Let op! Deze vragenlijst kan slechts tot overmorgen ingevuld worden!"
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:178
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:185
#, php-format
-msgid "Survey must be answered in %d days."
-msgstr "Vragenlijst moet binnen %d dagen ingevuld zijn!"
+msgid "Please answer this survey within %d days."
+msgstr "Wij verzoeken u deze vragenlijst binnen %d dagen in te vullen."
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:180
-msgid "Survey can no longer be answered."
-msgstr "Vragenlijst kan niet langer worden ingevuld!"
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:189
+msgid "This survey can no longer be answered."
+msgstr "Deze vragenlijst kan niet langer worden ingevuld!"
-#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:183
+#: classes/Gems/Tracker/Snippets/ShowTokenLoopAbstract.php:192
#, php-format
-msgid "Survey can be answered until %s."
-msgstr "Moet ingevuld worden voor %s."
+msgid "Please answer this survey before %s."
+msgstr "Wij verzoeken u deze vragenlijst voor %s in te vullen."
#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:376
#: classes/Gems/Tracker/Source/LimeSurvey1m9Database.php:1173
@@ -5240,6 +5240,15 @@
msgstr[0] "Na deze vragenlijst hebben we nog één andere vragenlijst voor u."
msgstr[1] "Na deze vragenlijst hebben we nog %d andere vragenlijsten voor u."
+#~ msgid "Survey can be answered until %s."
+#~ msgstr "Moet ingevuld worden voor %s."
+
+#~ msgid "Survey must be answered tomorrow!"
+#~ msgstr "Vragenlijst moet morgen ingevuld zijn!"
+
+#~ msgid "Survey must be answered in %d days."
+#~ msgstr "Vragenlijst moet binnen %d dagen ingevuld zijn!"
+
#~ msgid "reset"
#~ msgstr "herstellen"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-13 14:55:36
|
Revision: 1061
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1061&view=rev
Author: matijsdejong
Date: 2012-12-13 14:55:27 +0000 (Thu, 13 Dec 2012)
Log Message:
-----------
Updated version numbers
Modified Paths:
--------------
trunk/library/classes/Gems/Versions.php
trunk/library/classes/MUtil/Version.php
trunk/library/configs/db/tables/gems__patch_levels.10.sql
Modified: trunk/library/classes/Gems/Versions.php
===================================================================
--- trunk/library/classes/Gems/Versions.php 2012-12-13 14:42:39 UTC (rev 1060)
+++ trunk/library/classes/Gems/Versions.php 2012-12-13 14:55:27 UTC (rev 1061)
@@ -51,15 +51,15 @@
public final function getBuild()
{
/**
- * DO NOT FORGET !!! to update gems__patch_levels:
+ * DO NOT FORGET !!! to update GEMS__PATCH_LEVELS:
*
* For new installations the initial patch level should
- * be THIS LEVEL.
+ * be THIS LEVEL plus one.
*
- * This means that future patches for the current level
- * will be loaded, but that previous patches are ignored.
+ * This means that future patches for will be loaded,
+ * but that previous patches are ignored.
*/
- return 50;
+ return 51;
}
/**
@@ -69,7 +69,7 @@
*/
public final function getGemsVersion()
{
- return '1.5.7';
+ return '1.5.8';
}
/**
Modified: trunk/library/classes/MUtil/Version.php
===================================================================
--- trunk/library/classes/MUtil/Version.php 2012-12-13 14:42:39 UTC (rev 1060)
+++ trunk/library/classes/MUtil/Version.php 2012-12-13 14:55:27 UTC (rev 1061)
@@ -48,7 +48,7 @@
{
const MAJOR = 1;
const MINOR = 1;
- const BUILD = 35;
+ const BUILD = 36;
public static function get()
{
Modified: trunk/library/configs/db/tables/gems__patch_levels.10.sql
===================================================================
--- trunk/library/configs/db/tables/gems__patch_levels.10.sql 2012-12-13 14:42:39 UTC (rev 1060)
+++ trunk/library/configs/db/tables/gems__patch_levels.10.sql 2012-12-13 14:55:27 UTC (rev 1061)
@@ -11,4 +11,4 @@
INSERT INTO gems__patch_levels (gpl_level, gpl_created)
VALUES
- (51, CURRENT_TIMESTAMP);
+ (52, CURRENT_TIMESTAMP);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-13 14:42:49
|
Revision: 1060
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1060&view=rev
Author: matijsdejong
Date: 2012-12-13 14:42:39 +0000 (Thu, 13 Dec 2012)
Log Message:
-----------
Fix for #535: password request can only be done from allowed addresses and when user is not blocked
Added logging to password reset actionLink(s)
Clarified reset password button in staff overview
Modified Paths:
--------------
trunk/library/classes/Gems/Default/IndexAction.php
trunk/library/classes/Gems/Default/StaffAction.php
trunk/library/classes/Gems/User/User.php
trunk/library/languages/default-en.mo
trunk/library/languages/default-en.po
trunk/library/languages/default-nl.mo
trunk/library/languages/default-nl.po
Modified: trunk/library/classes/Gems/Default/IndexAction.php
===================================================================
--- trunk/library/classes/Gems/Default/IndexAction.php 2012-12-13 13:13:53 UTC (rev 1059)
+++ trunk/library/classes/Gems/Default/IndexAction.php 2012-12-13 14:42:39 UTC (rev 1060)
@@ -326,6 +326,7 @@
{
$errors = array();
$form = $this->createResetRequestForm();
+ $logger = Gems_AccessLog::getLog($this->db);
$request = $this->getRequest();
if ($key = $this->_getParam('key')) {
@@ -333,8 +334,43 @@
if ($user->hasValidResetKey()) {
$form = $user->getChangePasswordForm(array('askOld' => false, 'askCheck' => true, 'labelWidthFactor' => $this->labelWidthFactor));
+
+ $result = $user->authenticate(null, false);
+ if (! $result->isValid()) {
+ $this->addMessage($result->getMessages());
+ $this->addMessage($this->_('For that reason you cannot reset your password.'));
+ return;
+ }
+
+ if (! $request->isPost()) {
+ $logger->log(
+ "index.resetpassword.clicked",
+ $request,
+ sprintf("User %s opened valid reset link.", $user->getLoginName()),
+ $user->getUserId(),
+ true
+ );
+ }
} else {
if (! $request->isPost()) {
+ if ($user->getLoginName()) {
+ $logger->log(
+ "index.resetpassword.old",
+ $request,
+ sprintf("User %s used old reset key.", $user->getLoginName()),
+ $user->getUserId(),
+ true
+ );
+ } else {
+ $logger->log(
+ "index.resetpassword.false",
+ $request,
+ sprintf("Someone used a non existent reset key.", $user->getLoginName()),
+ $user->getUserId(),
+ true
+ );
+ }
+
if ($user->hasPassword() || (! $user->isActive())) {
$errors[] = $this->_('Your password reset request is no longer valid, please request a new link.');
} else {
@@ -354,11 +390,42 @@
if ($form instanceof Gems_User_Form_ResetRequestForm) {
$user = $form->getUser();
+ $result = $user->authenticate(null, false);
+ if (! $result->isValid()) {
+ $this->addMessage($result->getMessages());
+ $this->addMessage($this->_('For that reason you cannot request a password reset.'));
+ return;
+ }
+
$errors = $this->sendUserResetEMail($user);
- if (! $errors) {
+ if ($errors) {
+ $logger->log(
+ "index.resetpassword.request.error",
+ $request,
+ sprintf(
+ "User %s requested reset password but got %d error(s). %s",
+ $form->getUserNameElement()->getValue(),
+ count($errors),
+ implode(' ', $errors)
+ ),
+ $user->getUserId(),
+ true
+ );
+
+ } else {
// Everything went OK!
- $this->addMessage($this->_('We sent you an e-mail with a reset link. Click on the link in the e-mail.'));
+ $this->addMessage($this->_(
+ 'We sent you an e-mail with a reset link. Click on the link in the e-mail.'
+ ));
+ $logger->log(
+ "index.resetpassword.request",
+ $request,
+ sprintf("User %s requested reset password.", $form->getUserNameElement()->getValue()),
+ $user->getUserId(),
+ true
+ );
+
if ($this->returnToLoginAfterReset) {
$this->setCurrentOrganizationTo($user);
$this->loader->getCurrentUser()->gotoStartPage($this->menu, $request);
@@ -370,7 +437,20 @@
// User set before this form was initiated
$user->setAsCurrentUser();
+
+ /**
+ * Log the login
+ */
+ $logger->log(
+ "index.loginreset",
+ $request,
+ "User logged in through reset password.",
+ $user->getUserId(),
+ true
+ );
+
$user->gotoStartPage($this->menu, $this->getRequest());
+ return;
}
}
Modified: trunk/library/classes/Gems/Default/StaffAction.php
===================================================================
--- trunk/library/classes/Gems/Default/StaffAction.php 2012-12-13 13:13:53 UTC (rev 1059)
+++ trunk/library/classes/Gems/Default/StaffAction.php 2012-12-13 14:42:39 UTC (rev 1060)
@@ -119,7 +119,7 @@
}
// Add reset button if allowed
if ($menuItem = $this->findAllowedMenuItem('reset')) {
- $bridge->addItemLink($menuItem->toActionLink($this->getRequest(), $bridge, $this->_('reset')));
+ $bridge->addItemLink($menuItem->toActionLink($this->getRequest(), $bridge, $this->_('password')));
}
}
Modified: trunk/library/classes/Gems/User/User.php
===================================================================
--- trunk/library/classes/Gems/User/User.php 2012-12-13 13:13:53 UTC (rev 1059)
+++ trunk/library/classes/Gems/User/User.php 2012-12-13 14:42:39 UTC (rev 1060)
@@ -331,11 +331,12 @@
* Authenticate a users credentials using the submitted form
*
* @param string $password The password to test
+ * @param boolean $testPassword Set to false to test the non-password checks only
* @return Zend_Auth_Result
*/
- public function authenticate($password)
+ public function authenticate($password, $testPassword = true)
{
- $auths = $this->loadAuthorizers($password);
+ $auths = $this->loadAuthorizers($password, $testPassword);
$lastAuthorizer = null;
foreach ($auths as $lastAuthorizer => $result) {
@@ -1146,9 +1147,10 @@
* is boolean, string or array it is converted into a Zend_Auth_Result.
*
* @param string $password
+ * @param boolean $testPassword Set to false to test on the non-password checks only
* @return array Of Callable|Zend_Auth_Adapter_Interface|Zend_Auth_Result|boolean|string|array
*/
- protected function loadAuthorizers($password)
+ protected function loadAuthorizers($password, $testPassword = true)
{
if ($this->isBlockable()) {
$auths['block'] = array($this, 'authorizeBlock');
@@ -1160,10 +1162,12 @@
// group ip restriction
$auths['ip'] = array($this, 'authorizeIp');
- if ($this->isActive()) {
- $auths['pwd'] = $this->definition->getAuthAdapter($this, $password);
- } else {
- $auths['pwd'] = false;
+ if ($testPassword) {
+ if ($this->isActive()) {
+ $auths['pwd'] = $this->definition->getAuthAdapter($this, $password);
+ } else {
+ $auths['pwd'] = false;
+ }
}
return $auths;
Modified: trunk/library/languages/default-en.mo
===================================================================
(Binary files differ)
Modified: trunk/library/languages/default-en.po
===================================================================
--- trunk/library/languages/default-en.po 2012-12-13 13:13:53 UTC (rev 1059)
+++ trunk/library/languages/default-en.po 2012-12-13 14:42:39 UTC (rev 1060)
@@ -2,7 +2,7 @@
msgstr ""
"Project-Id-Version: GemsTracker EN\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-29 12:04+0100\n"
+"POT-Creation-Date: 2012-12-13 15:39+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Matijs de Jong <mj...@ma...>\n"
"Language-Team: Erasmus MGZ <mat...@ma...>\n"
@@ -380,7 +380,7 @@
#: classes/Gems/Menu.php:578 classes/Gems/Default/GroupAction.php:122
#: classes/Gems/Default/OrganizationAction.php:154
-#: classes/Gems/Default/RespondentAction.php:470
+#: classes/Gems/Default/RespondentAction.php:462
msgid "Respondents"
msgstr "Patients"
@@ -404,7 +404,7 @@
msgid "Mail"
msgstr "Mail"
-#: classes/Gems/Menu.php:608 classes/Gems/Default/RespondentAction.php:364
+#: classes/Gems/Menu.php:608 classes/Gems/Default/RespondentAction.php:356
#: classes/Gems/Default/RespondentExportAction.php:60
msgid "Export respondent"
msgstr "Export respondent"
@@ -526,11 +526,11 @@
msgid "Unable to run PDF conversion (%s): \"%s\""
msgstr "Unable to run PDF conversion (%s): \"%s\""
-#: classes/Gems/Upgrades.php:90
+#: classes/Gems/Upgrades.php:91
msgid "Syncing surveys for all sources"
msgstr "Syncing surveys for all sources"
-#: classes/Gems/Upgrades.php:150 classes/Gems/Upgrades.php:162
+#: classes/Gems/Upgrades.php:151 classes/Gems/Upgrades.php:163
msgid "Make sure to read the changelog as it contains important instructions"
msgstr "Make sure to read the changelog as it contains important instructions"
@@ -649,9 +649,9 @@
msgstr "No"
#: classes/Gems/Controller/BrowseEditAction.php:875
-#: classes/Gems/Default/RespondentAction.php:254
-#: classes/Gems/Default/RespondentAction.php:347
-#: classes/Gems/Default/RespondentAction.php:540
+#: classes/Gems/Default/RespondentAction.php:246
+#: classes/Gems/Default/RespondentAction.php:339
+#: classes/Gems/Default/RespondentAction.php:515
#: classes/Gems/Default/TrackAction.php:554
#, php-format
msgid "Unknown %s requested"
@@ -681,7 +681,7 @@
msgstr "No changes to save."
#: classes/Gems/Controller/BrowseEditAction.php:954
-#: classes/Gems/Default/RespondentAction.php:315
+#: classes/Gems/Default/RespondentAction.php:307
msgid "Input error! No changes saved!"
msgstr "Input error! No changes saved!"
@@ -1330,35 +1330,43 @@
msgid "Good bye: %s."
msgstr "Good bye: %s."
-#: classes/Gems/Default/IndexAction.php:339
+#: classes/Gems/Default/IndexAction.php:341
+msgid "For that reason you cannot reset your password."
+msgstr "For that reason you cannot reset your password."
+
+#: classes/Gems/Default/IndexAction.php:375
msgid ""
"Your password reset request is no longer valid, please request a new link."
msgstr ""
"Your password reset request is no longer valid, please request a new link."
-#: classes/Gems/Default/IndexAction.php:341
+#: classes/Gems/Default/IndexAction.php:377
msgid ""
"Your password input request is no longer valid, please request a new link."
msgstr ""
"Your password input request is no longer valid, please request a new link."
-#: classes/Gems/Default/IndexAction.php:360
+#: classes/Gems/Default/IndexAction.php:396
+msgid "For that reason you cannot request a password reset."
+msgstr "For that reason you cannot request a password reset."
+
+#: classes/Gems/Default/IndexAction.php:418
msgid ""
"We sent you an e-mail with a reset link. Click on the link in the e-mail."
msgstr ""
"We sent you an e-mail with a reset link. Click on the link in the e-mail."
-#: classes/Gems/Default/IndexAction.php:369
+#: classes/Gems/Default/IndexAction.php:436
#: classes/Gems/Default/OptionAction.php:94
#: classes/Gems/Default/StaffAction.php:510
msgid "New password is active."
msgstr "New password is active."
-#: classes/Gems/Default/IndexAction.php:390
+#: classes/Gems/Default/IndexAction.php:470
msgid "Password reset requested"
msgstr "Password reset requested"
-#: classes/Gems/Default/IndexAction.php:393
+#: classes/Gems/Default/IndexAction.php:473
msgid ""
"Dear {greeting},\n"
"\n"
@@ -1721,7 +1729,7 @@
msgstr "Email servers"
#: classes/Gems/Default/MailTemplateAction.php:76
-#: classes/Gems/Default/RespondentAction.php:394
+#: classes/Gems/Default/RespondentAction.php:386
#: classes/Gems/Default/StaffAction.php:335
#: classes/Gems/Default/StaffAction.php:405
msgid "(all organizations)"
@@ -1747,7 +1755,7 @@
#: classes/Gems/Default/OptionAction.php:136
#: classes/Gems/Default/OrganizationAction.php:147
-#: classes/Gems/Default/RespondentAction.php:203
+#: classes/Gems/Default/RespondentAction.php:195
#: classes/Gems/Default/StaffAction.php:351
msgid "Language"
msgstr "Language"
@@ -2151,69 +2159,69 @@
msgstr[0] "reception code"
msgstr[1] "reception codes"
-#: classes/Gems/Default/RespondentAction.php:135
+#: classes/Gems/Default/RespondentAction.php:127
#, php-format
msgid "Random Example BSN: %s"
msgstr "Random Example BSN: %s"
-#: classes/Gems/Default/RespondentAction.php:137
+#: classes/Gems/Default/RespondentAction.php:129
msgid "Enter a 9-digit SSN number."
msgstr "Enter a 9-digit BSN number."
-#: classes/Gems/Default/RespondentAction.php:151
+#: classes/Gems/Default/RespondentAction.php:143
msgid "Identification"
msgstr "Identification"
-#: classes/Gems/Default/RespondentAction.php:162
+#: classes/Gems/Default/RespondentAction.php:154
msgid "SSN"
msgstr "BSN"
-#: classes/Gems/Default/RespondentAction.php:166
+#: classes/Gems/Default/RespondentAction.php:158
msgid "Patient number"
msgstr "Patient number"
-#: classes/Gems/Default/RespondentAction.php:175
+#: classes/Gems/Default/RespondentAction.php:167
msgid "Medical data"
msgstr "Medical data"
-#: classes/Gems/Default/RespondentAction.php:182
+#: classes/Gems/Default/RespondentAction.php:174
msgid "DBC's, etc..."
msgstr "DBC's, etc..."
-#: classes/Gems/Default/RespondentAction.php:185
+#: classes/Gems/Default/RespondentAction.php:177
msgid "Contact information"
msgstr "Contact information"
-#: classes/Gems/Default/RespondentAction.php:190
+#: classes/Gems/Default/RespondentAction.php:182
msgid "Respondent has no e-mail"
msgstr "Patient has no e-mail"
-#: classes/Gems/Default/RespondentAction.php:191
+#: classes/Gems/Default/RespondentAction.php:183
msgid "With housenumber"
msgstr "With housenumber"
-#: classes/Gems/Default/RespondentAction.php:198
+#: classes/Gems/Default/RespondentAction.php:190
msgid "Country"
msgstr "Country"
-#: classes/Gems/Default/RespondentAction.php:202
+#: classes/Gems/Default/RespondentAction.php:194
msgid "Settings"
msgstr "Settings"
-#: classes/Gems/Default/RespondentAction.php:204
+#: classes/Gems/Default/RespondentAction.php:196
msgid "Has the respondent signed the informed consent letter?"
msgstr "Has the patient signed the informed consent letter?"
-#: classes/Gems/Default/RespondentAction.php:236
+#: classes/Gems/Default/RespondentAction.php:228
#: classes/Gems/Tracker/Model/StandardTokenModel.php:203
msgid "Comments"
msgstr "Comments"
-#: classes/Gems/Default/RespondentAction.php:237
+#: classes/Gems/Default/RespondentAction.php:229
msgid "Treatment"
msgstr "Treatment"
-#: classes/Gems/Default/RespondentAction.php:265
+#: classes/Gems/Default/RespondentAction.php:257
#: classes/Gems/Default/TrackAction.php:132
#: classes/Gems/Default/TrackAction.php:482
#: classes/Gems/Tracker/Model/StandardTokenModel.php:212
@@ -2222,30 +2230,30 @@
msgid "Rejection code"
msgstr "Rejection code"
-#: classes/Gems/Default/RespondentAction.php:272
+#: classes/Gems/Default/RespondentAction.php:264
msgid "Delete respondent"
msgstr "Delete patient"
-#: classes/Gems/Default/RespondentAction.php:304
+#: classes/Gems/Default/RespondentAction.php:296
msgid "Respondent deleted."
msgstr "Patient deleted"
-#: classes/Gems/Default/RespondentAction.php:308
+#: classes/Gems/Default/RespondentAction.php:300
msgid "Respondent tracks stopped."
msgstr "Patient tracks stopped."
-#: classes/Gems/Default/RespondentAction.php:312
+#: classes/Gems/Default/RespondentAction.php:304
#: classes/Gems/Default/TrackAction.php:405
msgid "Choose a reception code to delete."
msgstr "Choose a reception code to delete."
-#: classes/Gems/Default/RespondentAction.php:465
+#: classes/Gems/Default/RespondentAction.php:457
msgid "respondent"
msgid_plural "respondents"
msgstr[0] "patient"
msgstr[1] "patients"
-#: classes/Gems/Default/RespondentAction.php:557
+#: classes/Gems/Default/RespondentAction.php:532
msgid "Please settle the informed consent form for this respondent."
msgstr "Please settle the informed consent form for this patient."
@@ -2515,8 +2523,8 @@
msgstr "Synchronize all sources."
#: classes/Gems/Default/StaffAction.php:122
-msgid "reset"
-msgstr "reset"
+msgid "password"
+msgstr "password"
#: classes/Gems/Default/StaffAction.php:164
msgid "Unsupported User Definition"
@@ -2543,7 +2551,7 @@
"User with id %s already exists but is deleted, do you want to reactivate the "
"account?"
-#: classes/Gems/Default/StaffAction.php:327 classes/Gems/User/User.php:1208
+#: classes/Gems/Default/StaffAction.php:327 classes/Gems/User/User.php:1212
#: classes/Gems/User/Form/OrganizationFormAbstract.php:232
msgid "Username"
msgstr "Username"
@@ -4471,33 +4479,33 @@
msgid "Shared secret"
msgstr "Shared secret"
-#: classes/Gems/User/User.php:407
+#: classes/Gems/User/User.php:408
#, php-format
msgid "Your account is temporarily blocked, please wait a minute."
msgid_plural "Your account is temporarily blocked, please wait %d minutes."
msgstr[0] "Your account is temporarily blocked, please wait a minute."
msgstr[1] "Your account is temporarily blocked, please wait %d minutes."
-#: classes/Gems/User/User.php:446 classes/Gems/User/User.php:473
+#: classes/Gems/User/User.php:447 classes/Gems/User/User.php:474
#: languages/FakeTranslations.php:47
msgid "You are not allowed to login from this location."
msgstr "You are not allowed to login from this location."
-#: classes/Gems/User/User.php:1187
+#: classes/Gems/User/User.php:1191
msgid "Your birthday"
msgstr "Your birthday"
-#: classes/Gems/User/User.php:1203
+#: classes/Gems/User/User.php:1207
#: classes/Gems/User/Form/ChangePasswordForm.php:163
#, php-format
msgid "%s is not correct."
msgstr "%s is not correct."
-#: classes/Gems/User/User.php:1288
+#: classes/Gems/User/User.php:1292
msgid "Trying to send a password reset to a user that cannot be reset."
msgstr "Trying to send a password reset to a user that cannot be reset."
-#: classes/Gems/User/User.php:1316
+#: classes/Gems/User/User.php:1320
msgid "Unable to send e-mail."
msgstr "Unable to send e-mail."
@@ -5176,6 +5184,9 @@
msgstr[1] ""
"After this survey there are another %d surveys we would like you to answer."
+#~ msgid "reset"
+#~ msgstr "reset"
+
#~ msgid "Show all stand alone surveys for this type"
#~ msgstr "Show all stand alone surveys for this type"
Modified: trunk/library/languages/default-nl.mo
===================================================================
(Binary files differ)
Modified: trunk/library/languages/default-nl.po
===================================================================
--- trunk/library/languages/default-nl.po 2012-12-13 13:13:53 UTC (rev 1059)
+++ trunk/library/languages/default-nl.po 2012-12-13 14:42:39 UTC (rev 1060)
@@ -2,7 +2,7 @@
msgstr ""
"Project-Id-Version: GemsTracker NL\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-11-29 12:04+0100\n"
+"POT-Creation-Date: 2012-12-13 15:38+0100\n"
"PO-Revision-Date: \n"
"Last-Translator: Matijs de Jong <mj...@ma...>\n"
"Language-Team: Erasmus MGZ <mat...@ma...>\n"
@@ -380,7 +380,7 @@
#: classes/Gems/Menu.php:578 classes/Gems/Default/GroupAction.php:122
#: classes/Gems/Default/OrganizationAction.php:154
-#: classes/Gems/Default/RespondentAction.php:470
+#: classes/Gems/Default/RespondentAction.php:462
msgid "Respondents"
msgstr "Patiënten"
@@ -404,7 +404,7 @@
msgid "Mail"
msgstr "Email"
-#: classes/Gems/Menu.php:608 classes/Gems/Default/RespondentAction.php:364
+#: classes/Gems/Menu.php:608 classes/Gems/Default/RespondentAction.php:356
#: classes/Gems/Default/RespondentExportAction.php:60
msgid "Export respondent"
msgstr "Exporteer patiënt"
@@ -526,11 +526,11 @@
msgid "Unable to run PDF conversion (%s): \"%s\""
msgstr "Kan PDF conversie (%s) niet starten: \"%s\""
-#: classes/Gems/Upgrades.php:90
+#: classes/Gems/Upgrades.php:91
msgid "Syncing surveys for all sources"
msgstr "Vragenlijsten synchroniseren voor alle bronnen."
-#: classes/Gems/Upgrades.php:150 classes/Gems/Upgrades.php:162
+#: classes/Gems/Upgrades.php:151 classes/Gems/Upgrades.php:163
msgid "Make sure to read the changelog as it contains important instructions"
msgstr "Lees de wijzigingen, er kunnen belangrijke aanwijzingen in staan"
@@ -649,9 +649,9 @@
msgstr "Nee"
#: classes/Gems/Controller/BrowseEditAction.php:875
-#: classes/Gems/Default/RespondentAction.php:254
-#: classes/Gems/Default/RespondentAction.php:347
-#: classes/Gems/Default/RespondentAction.php:540
+#: classes/Gems/Default/RespondentAction.php:246
+#: classes/Gems/Default/RespondentAction.php:339
+#: classes/Gems/Default/RespondentAction.php:515
#: classes/Gems/Default/TrackAction.php:554
#, php-format
msgid "Unknown %s requested"
@@ -681,7 +681,7 @@
msgstr "Geen verandering om op te slaan."
#: classes/Gems/Controller/BrowseEditAction.php:954
-#: classes/Gems/Default/RespondentAction.php:315
+#: classes/Gems/Default/RespondentAction.php:307
msgid "Input error! No changes saved!"
msgstr "Invoer fout! Veranderingen niet opgeslagen!"
@@ -1336,37 +1336,45 @@
msgid "Good bye: %s."
msgstr "Tot ziens: %s."
-#: classes/Gems/Default/IndexAction.php:339
+#: classes/Gems/Default/IndexAction.php:341
+msgid "For that reason you cannot reset your password."
+msgstr "Om die reden kunt u uw wachtwoord niet wijzigen."
+
+#: classes/Gems/Default/IndexAction.php:375
msgid ""
"Your password reset request is no longer valid, please request a new link."
msgstr ""
"Uw verzoek om een nieuw wachtwoord is niet meer geldig, maar u kan hieronder "
"een nieuwe link aanvragen."
-#: classes/Gems/Default/IndexAction.php:341
+#: classes/Gems/Default/IndexAction.php:377
msgid ""
"Your password input request is no longer valid, please request a new link."
msgstr ""
"Uw link om een wachtwoord in te voeren is niet meer geldig, maar u kan "
"hieronder een nieuwe link aanvragen."
-#: classes/Gems/Default/IndexAction.php:360
+#: classes/Gems/Default/IndexAction.php:396
+msgid "For that reason you cannot request a password reset."
+msgstr "Om die reden kunt u geen wachtwoord wijziging aanvragen."
+
+#: classes/Gems/Default/IndexAction.php:418
msgid ""
"We sent you an e-mail with a reset link. Click on the link in the e-mail."
msgstr ""
"We hebben u een email met reset link gestuurd. Klik op de link in de email."
-#: classes/Gems/Default/IndexAction.php:369
+#: classes/Gems/Default/IndexAction.php:436
#: classes/Gems/Default/OptionAction.php:94
#: classes/Gems/Default/StaffAction.php:510
msgid "New password is active."
msgstr "Nieuwe wachtwoord geactiveerd."
-#: classes/Gems/Default/IndexAction.php:390
+#: classes/Gems/Default/IndexAction.php:470
msgid "Password reset requested"
-msgstr "Wachtwoord reset aangevraagd"
+msgstr "Wachtwoord wijziging aangevraagd"
-#: classes/Gems/Default/IndexAction.php:393
+#: classes/Gems/Default/IndexAction.php:473
msgid ""
"Dear {greeting},\n"
"\n"
@@ -1730,7 +1738,7 @@
msgstr "Email servers"
#: classes/Gems/Default/MailTemplateAction.php:76
-#: classes/Gems/Default/RespondentAction.php:394
+#: classes/Gems/Default/RespondentAction.php:386
#: classes/Gems/Default/StaffAction.php:335
#: classes/Gems/Default/StaffAction.php:405
msgid "(all organizations)"
@@ -1756,7 +1764,7 @@
#: classes/Gems/Default/OptionAction.php:136
#: classes/Gems/Default/OrganizationAction.php:147
-#: classes/Gems/Default/RespondentAction.php:203
+#: classes/Gems/Default/RespondentAction.php:195
#: classes/Gems/Default/StaffAction.php:351
msgid "Language"
msgstr "Taal"
@@ -2162,69 +2170,69 @@
msgstr[0] "Ontvangst code"
msgstr[1] "Ontvangst code"
-#: classes/Gems/Default/RespondentAction.php:135
+#: classes/Gems/Default/RespondentAction.php:127
#, php-format
msgid "Random Example BSN: %s"
msgstr "Willekeurig voorbeeld BSN: %s"
-#: classes/Gems/Default/RespondentAction.php:137
+#: classes/Gems/Default/RespondentAction.php:129
msgid "Enter a 9-digit SSN number."
msgstr "Voer een BSN nummer van 9 cijfers in."
-#: classes/Gems/Default/RespondentAction.php:151
+#: classes/Gems/Default/RespondentAction.php:143
msgid "Identification"
msgstr "Identificatie"
-#: classes/Gems/Default/RespondentAction.php:162
+#: classes/Gems/Default/RespondentAction.php:154
msgid "SSN"
msgstr "SSN"
-#: classes/Gems/Default/RespondentAction.php:166
+#: classes/Gems/Default/RespondentAction.php:158
msgid "Patient number"
msgstr "Patiënt nummer"
-#: classes/Gems/Default/RespondentAction.php:175
+#: classes/Gems/Default/RespondentAction.php:167
msgid "Medical data"
msgstr "Medische gegevens"
-#: classes/Gems/Default/RespondentAction.php:182
+#: classes/Gems/Default/RespondentAction.php:174
msgid "DBC's, etc..."
msgstr "DBC's, etc..."
-#: classes/Gems/Default/RespondentAction.php:185
+#: classes/Gems/Default/RespondentAction.php:177
msgid "Contact information"
msgstr "Contact informatie"
-#: classes/Gems/Default/RespondentAction.php:190
+#: classes/Gems/Default/RespondentAction.php:182
msgid "Respondent has no e-mail"
msgstr "Patiënt zonder email"
-#: classes/Gems/Default/RespondentAction.php:191
+#: classes/Gems/Default/RespondentAction.php:183
msgid "With housenumber"
msgstr "Met huisnummer"
-#: classes/Gems/Default/RespondentAction.php:198
+#: classes/Gems/Default/RespondentAction.php:190
msgid "Country"
msgstr "Land"
-#: classes/Gems/Default/RespondentAction.php:202
+#: classes/Gems/Default/RespondentAction.php:194
msgid "Settings"
msgstr "Instellingen"
-#: classes/Gems/Default/RespondentAction.php:204
+#: classes/Gems/Default/RespondentAction.php:196
msgid "Has the respondent signed the informed consent letter?"
msgstr "Heeft de patiënt het \"informed consent\" formulier ondertekend?"
-#: classes/Gems/Default/RespondentAction.php:236
+#: classes/Gems/Default/RespondentAction.php:228
#: classes/Gems/Tracker/Model/StandardTokenModel.php:203
msgid "Comments"
msgstr "Opmerkingen"
-#: classes/Gems/Default/RespondentAction.php:237
+#: classes/Gems/Default/RespondentAction.php:229
msgid "Treatment"
msgstr "Behandeling"
-#: classes/Gems/Default/RespondentAction.php:265
+#: classes/Gems/Default/RespondentAction.php:257
#: classes/Gems/Default/TrackAction.php:132
#: classes/Gems/Default/TrackAction.php:482
#: classes/Gems/Tracker/Model/StandardTokenModel.php:212
@@ -2233,30 +2241,30 @@
msgid "Rejection code"
msgstr "Afkeuringscode"
-#: classes/Gems/Default/RespondentAction.php:272
+#: classes/Gems/Default/RespondentAction.php:264
msgid "Delete respondent"
msgstr "Verwijder patiënt"
-#: classes/Gems/Default/RespondentAction.php:304
+#: classes/Gems/Default/RespondentAction.php:296
msgid "Respondent deleted."
msgstr "Patiënt verwijderd"
-#: classes/Gems/Default/RespondentAction.php:308
+#: classes/Gems/Default/RespondentAction.php:300
msgid "Respondent tracks stopped."
msgstr "Trajecten van patiënt zijn gestopt."
-#: classes/Gems/Default/RespondentAction.php:312
+#: classes/Gems/Default/RespondentAction.php:304
#: classes/Gems/Default/TrackAction.php:405
msgid "Choose a reception code to delete."
msgstr "Kies een ontvangst code om te verwijderen."
-#: classes/Gems/Default/RespondentAction.php:465
+#: classes/Gems/Default/RespondentAction.php:457
msgid "respondent"
msgid_plural "respondents"
msgstr[0] "patiënt"
msgstr[1] "patiënten"
-#: classes/Gems/Default/RespondentAction.php:557
+#: classes/Gems/Default/RespondentAction.php:532
msgid "Please settle the informed consent form for this respondent."
msgstr "A.u.b. het informed consent formulier doornemen met deze patiënt"
@@ -2529,8 +2537,8 @@
msgstr "Synchroniseer alle bronnen."
#: classes/Gems/Default/StaffAction.php:122
-msgid "reset"
-msgstr "herstellen"
+msgid "password"
+msgstr "wachtwoord"
#: classes/Gems/Default/StaffAction.php:164
msgid "Unsupported User Definition"
@@ -2559,7 +2567,7 @@
"Gebruiker met inlognaam %s bestaat al maar is verwijderd, wilt u het account "
"opnieuw activeren?"
-#: classes/Gems/Default/StaffAction.php:327 classes/Gems/User/User.php:1208
+#: classes/Gems/Default/StaffAction.php:327 classes/Gems/User/User.php:1212
#: classes/Gems/User/Form/OrganizationFormAbstract.php:232
msgid "Username"
msgstr "Gebruikersnaam"
@@ -3600,7 +3608,7 @@
#: classes/Gems/Menu/MenuAbstract.php:421
msgid "Reset password"
-msgstr "Reset wachtwoord"
+msgstr "Wijzig wachtwoord"
#: classes/Gems/Menu/MenuAbstract.php:448
msgid "Check status"
@@ -4511,7 +4519,7 @@
msgid "Shared secret"
msgstr "Shared secret"
-#: classes/Gems/User/User.php:407
+#: classes/Gems/User/User.php:408
#, php-format
msgid "Your account is temporarily blocked, please wait a minute."
msgid_plural "Your account is temporarily blocked, please wait %d minutes."
@@ -4520,26 +4528,26 @@
msgstr[1] ""
"Uw account is tijdelijk geblokkeerd. U kunt over %d minuten opnieuw inloggen."
-#: classes/Gems/User/User.php:446 classes/Gems/User/User.php:473
+#: classes/Gems/User/User.php:447 classes/Gems/User/User.php:474
#: languages/FakeTranslations.php:47
msgid "You are not allowed to login from this location."
msgstr "U kunt vanaf deze locatie niet inloggen."
-#: classes/Gems/User/User.php:1187
+#: classes/Gems/User/User.php:1191
msgid "Your birthday"
msgstr "Uw geboortedatum"
-#: classes/Gems/User/User.php:1203
+#: classes/Gems/User/User.php:1207
#: classes/Gems/User/Form/ChangePasswordForm.php:163
#, php-format
msgid "%s is not correct."
msgstr "%s is onjuist."
-#: classes/Gems/User/User.php:1288
+#: classes/Gems/User/User.php:1292
msgid "Trying to send a password reset to a user that cannot be reset."
msgstr "Het wachtwoord voor deze gebruiker kan niet gewijzigd worden."
-#: classes/Gems/User/User.php:1316
+#: classes/Gems/User/User.php:1320
msgid "Unable to send e-mail."
msgstr "Verzenden email mislukt."
@@ -5232,6 +5240,9 @@
msgstr[0] "Na deze vragenlijst hebben we nog één andere vragenlijst voor u."
msgstr[1] "Na deze vragenlijst hebben we nog %d andere vragenlijsten voor u."
+#~ msgid "reset"
+#~ msgstr "herstellen"
+
#~ msgid "Show all stand alone surveys for this type"
#~ msgstr "Toon alle antwoorden voor deze losse vragenlijst"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-13 13:14:01
|
Revision: 1059
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1059&view=rev
Author: matijsdejong
Date: 2012-12-13 13:13:53 +0000 (Thu, 13 Dec 2012)
Log Message:
-----------
processAfterLoad expects a nested array
Modified Paths:
--------------
trunk/library/classes/MUtil/Model/JoinModel.php
trunk/library/classes/MUtil/Model/TableModel.php
Modified: trunk/library/classes/MUtil/Model/JoinModel.php
===================================================================
--- trunk/library/classes/MUtil/Model/JoinModel.php 2012-12-13 10:08:08 UTC (rev 1058)
+++ trunk/library/classes/MUtil/Model/JoinModel.php 2012-12-13 13:13:53 UTC (rev 1059)
@@ -373,9 +373,9 @@
if ($this->getChanged() > $oldChanged) {
$this->setChanged(++$oldChanged);
}
-
+
// Handle possible onLoad
- $newValues = $this->processAfterLoad($newValues);
+ $newValues = $this->processAfterLoad(array($newValues));
return $newValues;
}
Modified: trunk/library/classes/MUtil/Model/TableModel.php
===================================================================
--- trunk/library/classes/MUtil/Model/TableModel.php 2012-12-13 10:08:08 UTC (rev 1058)
+++ trunk/library/classes/MUtil/Model/TableModel.php 2012-12-13 13:13:53 UTC (rev 1059)
@@ -120,9 +120,9 @@
// $this->_saveTableData returns the new row values, including any automatic changes.
// add $newValues to throw nothing away.
$updatedValues = $this->_saveTableData($this->_table, $newValues, $filter, parent::SAVE_MODE_ALL) + $newValues;
-
+
// Handle possible onLoad
- $updatedValues = $this->processAfterLoad($updatedValues);
+ $updatedValues = $this->processAfterLoad(array($updatedValues));
return $updatedValues;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gem...@li...> - 2012-12-13 10:08:14
|
Revision: 1058
http://gemstracker.svn.sourceforge.net/gemstracker/?rev=1058&view=rev
Author: matijsdejong
Date: 2012-12-13 10:08:08 +0000 (Thu, 13 Dec 2012)
Log Message:
-----------
Fix for CURRENT_TIMESTAMP in defaults
Modified Paths:
--------------
trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php
Modified: trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php
===================================================================
--- trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php 2012-12-06 14:56:37 UTC (rev 1057)
+++ trunk/library/classes/MUtil/Model/DatabaseModelAbstract.php 2012-12-13 10:08:08 UTC (rev 1058)
@@ -377,7 +377,18 @@
if ($field['PRECISION']) {
$finfo['decimals'] = $field['PRECISION'];
}
- $finfo['default'] = $field['DEFAULT'];
+ switch (strtoupper($field['DEFAULT'])) {
+ case 'CURRENT_DATE':
+ case 'CURRENT_TIME':
+ case 'CURRENT_TIMESTAMP':
+ $finfo['default'] = new Zend_Db_Expr($field['DEFAULT']);
+ break;
+ case 'NULL':
+ break;
+
+ default:
+ $finfo['default'] = $field['DEFAULT'];
+ }
$finfo['required'] = ! ($field['NULLABLE'] || $field['DEFAULT']);
if ($field['PRIMARY']) {
@@ -673,14 +684,14 @@
throw new MUtil_Model_ModelException("Cannot create UniqueValue validator as no table was defined for field $name.");
}
-
+
/**
- * A ModelAbstract->setOnLoad() function that takes care of transforming a
+ * A ModelAbstract->setOnLoad() function that takes care of transforming a
* dateformat read from the database to a Zend_Date format
- *
+ *
* If empty or Zend_Db_Expression (after save) it will return just the value
* currently there are no checks for a valid date format.
- *
+ *
* @see MUtil_Model_ModelAbstract
*
* @param mixed $value The value being saved
@@ -691,7 +702,7 @@
*/
public function formatLoadDate($value, $isNew = false, $name = null, array $context = array())
{
- // If not empty or zend_db_expression and not already a zend date, we
+ // If not empty or zend_db_expression and not already a zend date, we
// transform to a Zend_Date using the ISO_8601 format
if (!empty($value) && !($value instanceof Zend_Date) && !($value instanceof Zend_Db_Expr)) {
$tmpDate = new MUtil_Date($value, Zend_Date::ISO_8601);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|