Improve js and add native language support for datepicker and calendar
This commit is contained in:
@@ -599,56 +599,24 @@ class Helper
|
||||
}
|
||||
|
||||
/**
|
||||
* Get calendar translations
|
||||
* Get javascript language code
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getCalendarTranslations()
|
||||
public function jsLang()
|
||||
{
|
||||
return json_encode(array(
|
||||
'Today' => t('Today'),
|
||||
'Jan' => t('Jan'),
|
||||
'Feb' => t('Feb'),
|
||||
'Mar' => t('Mar'),
|
||||
'Apr' => t('Apr'),
|
||||
'May' => t('May'),
|
||||
'Jun' => t('Jun'),
|
||||
'Jul' => t('Jul'),
|
||||
'Aug' => t('Aug'),
|
||||
'Sep' => t('Sep'),
|
||||
'Oct' => t('Oct'),
|
||||
'Nov' => t('Nov'),
|
||||
'Dec' => t('Dec'),
|
||||
'January' => t('January'),
|
||||
'February' => t('February'),
|
||||
'March' => t('March'),
|
||||
'April' => t('April'),
|
||||
'May' => t('May'),
|
||||
'June' => t('June'),
|
||||
'July' => t('July'),
|
||||
'August' => t('August'),
|
||||
'September' => t('September'),
|
||||
'October' => t('October'),
|
||||
'November' => t('November'),
|
||||
'December' => t('December'),
|
||||
'Sunday' => t('Sunday'),
|
||||
'Monday' => t('Monday'),
|
||||
'Tuesday' => t('Tuesday'),
|
||||
'Wednesday' => t('Wednesday'),
|
||||
'Thursday' => t('Thursday'),
|
||||
'Friday' => t('Friday'),
|
||||
'Saturday' => t('Saturday'),
|
||||
'Sun' => t('Sun'),
|
||||
'Mon' => t('Mon'),
|
||||
'Tue' => t('Tue'),
|
||||
'Wed' => t('Wed'),
|
||||
'Thu' => t('Thu'),
|
||||
'Fri' => t('Fri'),
|
||||
'Sat' => t('Sat'),
|
||||
));
|
||||
return $this->config->getJsLanguageCode();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the link to toggle subtask status
|
||||
*
|
||||
* @access public
|
||||
* @param array $subtask
|
||||
* @param string $redirect
|
||||
* @return string
|
||||
*/
|
||||
public function toggleSubtaskStatus(array $subtask, $redirect)
|
||||
{
|
||||
if ($subtask['status'] == 0 && isset($this->session['has_subtask_inprogress']) && $this->session['has_subtask_inprogress'] === true) {
|
||||
|
||||
Reference in New Issue
Block a user