diff --git a/app/assets/javascripts/app/lib/app_post/utils.coffee b/app/assets/javascripts/app/lib/app_post/utils.coffee index b13c90189..5b78fd667 100644 --- a/app/assets/javascripts/app/lib/app_post/utils.coffee +++ b/app/assets/javascripts/app/lib/app_post/utils.coffee @@ -829,6 +829,21 @@ class App.Utils num @icon: (name, className = '') -> + # rtl support + # =========== + # + # translates @Icon('arrow-{start}') to @Icon('arrow-left') on ltr and @Icon('arrow-right') on rtl + dictionary = + ltr: + start: 'left' + end: 'right' + rtl: + start: 'right' + end: 'left' + if name.indexOf('{') > 0 # only run through the dictionary when there is a {helper} + for key, value of dictionary[App.i18n.dir()] + name = name.replace("{#{key}}", value) + # # reverse regex # ============= diff --git a/app/assets/javascripts/app/views/generic/datepicker.jst.eco b/app/assets/javascripts/app/views/generic/datepicker.jst.eco index 0d464a7d6..f088665e8 100644 --- a/app/assets/javascripts/app/views/generic/datepicker.jst.eco +++ b/app/assets/javascripts/app/views/generic/datepicker.jst.eco @@ -6,9 +6,9 @@