Sfoglia il codice sorgente

Update fileinput_locale_zh.js

if file name have chinese characters,keep it in file caption
clq321 10 anni fa
parent
commit
53b7e009e5
1 ha cambiato i file con 5 aggiunte e 2 eliminazioni
  1. 5 2
      js/fileinput_locale_zh.js

+ 5 - 2
js/fileinput_locale_zh.js

@@ -37,8 +37,11 @@
         msgProgress: '加载第 {index} 文件 共 {files} - {name} - {percent}% 完成.',
         msgSelected: '{n} 个文件选中',
         msgFoldersNotAllowed: '只支持拖拽文件! 跳过 {n} 拖拽的文件夹.',
-        dropZoneTitle: '拖拽文件到这里 …'
+        dropZoneTitle: '拖拽文件到这里 …',
+        slugCallback: function(text){
+            return text ? text.split(/(\\|\/)/g).pop().replace(/[^\w\u4e00-\u9fa5\-.\\\/ ]+/g, '') : '';
+        }
     };
 
     $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.zh);
-})(window.jQuery);
+})(window.jQuery);