Forráskód Böngészése

Merge pull request #248 from clq321/patch-2

Update fileinput_locale_zh.js
Kartik Visweswaran 10 éve
szülő
commit
1504a4e585
1 módosított fájl, 5 hozzáadás és 2 törlés
  1. 5 2
      js/fileinput_locale_zh.js

+ 5 - 2
js/fileinput_locale_zh.js

@@ -37,8 +37,11 @@
         msgProgress: '加载第 {index} 文件 共 {files} - {name} - {percent}% 完成.',
         msgProgress: '加载第 {index} 文件 共 {files} - {name} - {percent}% 完成.',
         msgSelected: '{n} 个文件选中',
         msgSelected: '{n} 个文件选中',
         msgFoldersNotAllowed: '只支持拖拽文件! 跳过 {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);
     $.extend($.fn.fileinput.defaults, $.fn.fileinput.locales.zh);
-})(window.jQuery);
+})(window.jQuery);