浏览代码

Fix #987: Zoom preview arrows orientation for RTL

Kartik Visweswaran 8 年之前
父节点
当前提交
cdb260b634
共有 3 个文件被更改,包括 8 次插入2 次删除
  1. 2 1
      CHANGE.md
  2. 6 1
      js/fileinput.js
  3. 0 0
      js/fileinput.min.js

+ 2 - 1
CHANGE.md

@@ -3,8 +3,9 @@ Change Log: `bootstrap-fileinput`
 
 ## version 4.4.2 (_under development_)
 
-**Date:** 28-May-2017
+**Date:** 30-May-2017
 
+- (enh #987): Zoom preview arrows orientation for RTL.
 - (enh #986): Image width parsing and styling enhancements.
 - (enh #981): Update Hungarian Translations.
 - (enh #977): Add RTL capability (new property `rtl` to be set) - includes new `fileinput-rtl.css` (to be loaded after `fileinput.css` for RTL styling).

+ 6 - 1
js/fileinput.js

@@ -372,7 +372,7 @@
             self.cancelling = false;
         },
         _init: function (options) {
-            var self = this, $el = self.$element, $cont, t;
+            var self = this, $el = self.$element, $cont, t, tmp;
             self.options = options;
             $.each(options, function (key, value) {
                 switch (key) {
@@ -397,6 +397,11 @@
                         break;
                 }
             });
+            if (self.rtl) { // swap buttons for rtl
+                tmp = self.previewZoomButtonIcons.prev;
+                self.previewZoomButtonIcons.prev = self.previewZoomButtonIcons.next;
+                self.previewZoomButtonIcons.next = tmp;
+            }
             self._cleanup();
             self.$form = $el.closest('form');
             self._initTemplateDefaults();

文件差异内容过多而无法显示
+ 0 - 0
js/fileinput.min.js


部分文件因为文件数量过多而无法显示