member upload avatar
This commit is contained in:
@ -36,14 +36,8 @@ var GlobalConfigs = {{.globalConfigs|jsonJs}}; // 2014/11/9 beta2
|
||||
require.config({
|
||||
baseUrl: '/public',
|
||||
paths: {
|
||||
// ajax upload image/attach
|
||||
'avatar': 'js/plugins/avatar',
|
||||
'jquery.ui.widget': 'js/plugins/libs-min/jquery.ui.widget',
|
||||
'fileupload': 'js/plugins/libs-min/jquery.fileupload',
|
||||
'iframe-transport': 'js/plugins/libs-min/jquery.iframe-transport',
|
||||
},
|
||||
shim: {
|
||||
'fileupload': {deps: ['jquery.ui.widget', 'iframe-transport']}
|
||||
'avatar': 'member/js/avatar',
|
||||
'fileupload': 'js/plugins/libs-min/fileupload',
|
||||
}
|
||||
});
|
||||
$(function() {
|
||||
|
3
public/js/plugins/libs-min/fileupload.js
Normal file
3
public/js/plugins/libs-min/fileupload.js
Normal file
File diff suppressed because one or more lines are too long
@ -1,7 +1,5 @@
|
||||
// upload attachment
|
||||
// 依赖note
|
||||
var urlPrefix = UrlPrefix;
|
||||
define('avatar', ['jquery.ui.widget', 'fileupload'], function(){
|
||||
define('avatar', ['fileupload'], function(){
|
||||
// Helper function that formats the file sizes
|
||||
function formatFileSize(bytes) {
|
||||
if (typeof bytes !== 'number') {
|
Reference in New Issue
Block a user