diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-02-08 15:07:47 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-02-08 15:07:47 -0500 |
commit | acf3941b4aa95bff9e80aa03e22dc064036e69cf (patch) | |
tree | fa00598349637eb125c8eb132f3dd74a2e3e9e6f /app/Core/Helper.php | |
parent | 813b7c4c0036a73c3bb5ef31f98e83cce2630e9e (diff) |
Improve js and add native language support for datepicker and calendar
Diffstat (limited to 'app/Core/Helper.php')
-rw-r--r-- | app/Core/Helper.php | 56 |
1 files changed, 12 insertions, 44 deletions
diff --git a/app/Core/Helper.php b/app/Core/Helper.php index 42cfbc8a..25d580e9 100644 --- a/app/Core/Helper.php +++ b/app/Core/Helper.php @@ -599,56 +599,24 @@ class Helper } /** - * Get calendar translations + * Get javascript language code * * @access public * @return string */ - public function getCalendarTranslations() - { - 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'), - )); + public function jsLang() + { + 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) { |