Explorar o código

Fix #987: Zoom preview arrows orientation for RTL

Kartik Visweswaran %!s(int64=8) %!d(string=hai) anos
pai
achega
cdb260b634
Modificáronse 3 ficheiros con 8 adicións e 2 borrados
  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();

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
js/fileinput.min.js


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio