浏览代码

Merge pull request #248 from clq321/patch-2

Update fileinput_locale_zh.js
Kartik Visweswaran 10 年之前
父节点
当前提交
1504a4e585
共有 1 个文件被更改,包括 5 次插入2 次删除
  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);