mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2026-06-07 10:22:38 +08:00
公共静态信息优化
This commit is contained in:
@ -312,17 +312,7 @@ class Common extends BaseController
|
||||
$assign['admin_color_value'] = $this->admin_color_value;
|
||||
|
||||
// 页面语言
|
||||
$lang_common = MyLang('page_common');
|
||||
if(empty($lang_common) || !is_array($lang_common))
|
||||
{
|
||||
$lang_common = [];
|
||||
}
|
||||
$lang_page = MyLang('page_'.$this->controller_name);
|
||||
if(empty($lang_page) || !is_array($lang_page))
|
||||
{
|
||||
$lang_page = [];
|
||||
}
|
||||
$assign['lang_data'] = array_merge($lang_common, $lang_page);
|
||||
$assign['lang_data'] = SystemService::PageViewLangData();
|
||||
|
||||
// 模板赋值
|
||||
MyViewAssign($assign);
|
||||
|
||||
@ -78,7 +78,6 @@
|
||||
<!-- ueditor 编辑器 -->
|
||||
<script type='text/javascript' src="{{$my_public_url}}static/common/lib/ueditor/ueditor.config.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$public_host}}static/common/lib/ueditor/ueditor.all.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$public_host}}static/common/lib/ueditor/lang/zh-cn/zh-cn.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
|
||||
<!-- 颜色选择器 -->
|
||||
<script type='text/javascript' src="{{$public_host}}static/common/lib/colorpicker/jquery.colorpicker.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
|
||||
@ -89,9 +89,6 @@
|
||||
var __env_max_input_vars_count__ = '{{$env_max_input_vars_count}}';
|
||||
var __map_view_url__ = '{{:MyUrl("admin/map/index")}}';
|
||||
var __load_map_type__ = '{{$load_map_type}}';
|
||||
// 基础提示信息
|
||||
var lang_chosen_select_no_results_text = '没有匹配到结果';
|
||||
var lang_error_text = '异常错误';
|
||||
// 语言定义(用于js调用、模板引擎直接使用$lang_data.xxx获取对应语言即可)
|
||||
{{if !empty($lang_data)}}
|
||||
{{foreach $lang_data as $k=>$v}}
|
||||
|
||||
@ -76,26 +76,79 @@ function MyLang($key, $vars = [], $lang = '')
|
||||
$value = '';
|
||||
if(!empty($key))
|
||||
{
|
||||
// 仅一级则直接读取
|
||||
$arr = explode('.', $key);
|
||||
if(count($arr) == 1)
|
||||
// key使用 . 分隔
|
||||
$key_arr = explode('.', $key);
|
||||
|
||||
// 是否插件语言
|
||||
if(RequestController() == 'plugins')
|
||||
{
|
||||
$value = lang($key, [], $lang);
|
||||
} else {
|
||||
// 默认先读取第一级
|
||||
$value = lang($arr[0], [], $lang);
|
||||
// 移除第一级
|
||||
array_shift($arr);
|
||||
// 循环后面级别的数据
|
||||
foreach($arr as $v)
|
||||
// 静态存储、不用每次都从磁盘读取
|
||||
static $lang_data = [];
|
||||
$file = APP_PATH.'plugins'.DS.MyInput('pluginsname').DS.'lang'.DS.MyConfig('lang.default_lang').'.php';
|
||||
$md5_key = md5($file);
|
||||
if(!array_key_exists($md5_key, $lang_data) && file_exists($file))
|
||||
{
|
||||
if(isset($value[$v]))
|
||||
$lang_data[$md5_key] = require $file;
|
||||
}
|
||||
if(!empty($lang_data[$md5_key]))
|
||||
{
|
||||
$temp_lang_data = $lang_data[$md5_key];
|
||||
// 仅一级则直接读取
|
||||
if(count($key_arr) == 1)
|
||||
{
|
||||
$value = $value[$v];
|
||||
if(array_key_exists($key, $temp_lang_data))
|
||||
{
|
||||
$value = $temp_lang_data[$key];
|
||||
}
|
||||
} else {
|
||||
// 未匹配到则赋空值
|
||||
$value = $key;
|
||||
break;
|
||||
// 默认先读取第一级
|
||||
if(array_key_exists($key_arr[0], $temp_lang_data))
|
||||
{
|
||||
$value = $temp_lang_data[$key_arr[0]];
|
||||
}
|
||||
// 移除第一级
|
||||
array_shift($key_arr);
|
||||
// 循环后面级别的数据
|
||||
foreach($key_arr as $v)
|
||||
{
|
||||
if(is_array($value) && array_key_exists($v, $value))
|
||||
{
|
||||
$value = $value[$v];
|
||||
} else {
|
||||
// 未匹配到则赋空值
|
||||
$value = $key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 默认也从系统读取
|
||||
// 插件未读取成功则从系统读取
|
||||
if($value === '')
|
||||
{
|
||||
// 系统语言
|
||||
// 仅一级则直接读取
|
||||
if(count($key_arr) == 1)
|
||||
{
|
||||
$value = lang($key, [], $lang);
|
||||
} else {
|
||||
// 默认先读取第一级
|
||||
$value = lang($key_arr[0], [], $lang);
|
||||
// 移除第一级
|
||||
array_shift($key_arr);
|
||||
// 循环后面级别的数据
|
||||
foreach($key_arr as $v)
|
||||
{
|
||||
if(isset($value[$v]))
|
||||
{
|
||||
$value = $value[$v];
|
||||
} else {
|
||||
// 未匹配到则赋空值
|
||||
$value = $key;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -391,17 +391,7 @@ class Common extends BaseController
|
||||
$assign['site_store_links'] = $site_store_links;
|
||||
|
||||
// 页面语言
|
||||
$lang_common = MyLang('page_common');
|
||||
if(empty($lang_common) || !is_array($lang_common))
|
||||
{
|
||||
$lang_common = [];
|
||||
}
|
||||
$lang_page = MyLang('page_'.$this->controller_name);
|
||||
if(empty($lang_page) || !is_array($lang_page))
|
||||
{
|
||||
$lang_page = [];
|
||||
}
|
||||
$assign['lang_data'] = array_merge($lang_common, $lang_page);
|
||||
$assign['lang_data'] = SystemService::PageViewLangData();
|
||||
|
||||
// 模板赋值
|
||||
MyViewAssign($assign);
|
||||
|
||||
@ -75,7 +75,6 @@
|
||||
<!-- ueditor 编辑器 -->
|
||||
<script type='text/javascript' src="{{$my_public_url}}static/common/lib/ueditor/ueditor.config.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$public_host}}static/common/lib/ueditor/ueditor.all.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
<script type='text/javascript' src="{{$public_host}}static/common/lib/ueditor/lang/zh-cn/zh-cn.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
|
||||
<!-- 颜色选择器 -->
|
||||
<script type='text/javascript' src="{{$public_host}}static/common/lib/colorpicker/jquery.colorpicker.js?v={{:MyC('home_static_cache_version')}}"></script>
|
||||
|
||||
@ -89,9 +89,6 @@
|
||||
var __env_max_input_vars_count__ = '{{$env_max_input_vars_count}}';
|
||||
var __map_view_url__ = '{{:MyUrl("index/map/index")}}';
|
||||
var __load_map_type__ = '{{$load_map_type}}';
|
||||
// 基础提示信息
|
||||
var lang_chosen_select_no_results_text = '没有匹配到结果';
|
||||
var lang_error_text = '异常错误';
|
||||
// 语言定义(用于js调用、模板引擎直接使用$lang_data.xxx获取对应语言即可)
|
||||
{{if !empty($lang_data)}}
|
||||
{{foreach $lang_data as $k=>$v}}
|
||||
|
||||
@ -47,20 +47,10 @@ class Common extends BaseController
|
||||
// 默认不加载地图api、类型默认百度地图
|
||||
'is_load_map_api' => 0,
|
||||
'load_map_type' => MyC('common_map_type', 'baidu', true),
|
||||
];
|
||||
|
||||
// 页面语言
|
||||
$lang_common = MyLang('page_common');
|
||||
if(empty($lang_common) || !is_array($lang_common))
|
||||
{
|
||||
$lang_common = [];
|
||||
}
|
||||
$lang_page = MyLang('page_'.RequestController());
|
||||
if(empty($lang_page) || !is_array($lang_page))
|
||||
{
|
||||
$lang_page = [];
|
||||
}
|
||||
$assign['lang_data'] = array_merge($lang_common, $lang_page);
|
||||
// 页面语言
|
||||
'lang_data' => SystemService::PageViewLangData(),
|
||||
];
|
||||
|
||||
// 模板赋值
|
||||
MyViewAssign($assign);
|
||||
|
||||
@ -26,9 +26,6 @@
|
||||
var __env_max_input_vars_count__ = '{{$env_max_input_vars_count}}';
|
||||
var __map_view_url__ = '{{:MyUrl("admin/map/index")}}';
|
||||
var __load_map_type__ = '{{$load_map_type}}';
|
||||
// 基础提示信息
|
||||
var lang_chosen_select_no_results_text = '没有匹配到结果';
|
||||
var lang_error_text = '异常错误';
|
||||
// 语言定义(用于js调用、模板引擎直接使用$lang_data.xxx获取对应语言即可)
|
||||
{{if !empty($lang_data)}}
|
||||
{{foreach $lang_data as $k=>$v}}
|
||||
|
||||
@ -20,6 +20,8 @@ return [
|
||||
// 页面公共
|
||||
'page_common' => [
|
||||
// 基础
|
||||
'chosen_select_no_results_text' => '没有匹配到结果',
|
||||
'error_text' => '异常错误',
|
||||
'reminder_title' => '温馨提示',
|
||||
'operate_params_error' => '操作参数有误',
|
||||
'select_reverse_name' => '反选',
|
||||
|
||||
@ -189,5 +189,41 @@ class SystemService
|
||||
{
|
||||
return MyC('common_domain_host', __MY_URL__, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 页面语言数据
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2022-08-22
|
||||
* @desc description
|
||||
*/
|
||||
public static function PageViewLangData()
|
||||
{
|
||||
// 页面公共语言
|
||||
$lang_common = MyLang('page_common');
|
||||
if(empty($lang_common) || !is_array($lang_common))
|
||||
{
|
||||
$lang_common = [];
|
||||
}
|
||||
// 当前控制器
|
||||
$lang_page = MyLang('page_'.RequestController());
|
||||
if(empty($lang_page) || !is_array($lang_page))
|
||||
{
|
||||
$lang_page = [];
|
||||
}
|
||||
$data = array_merge($lang_common, $lang_page);
|
||||
|
||||
// 页面语言读取钩子
|
||||
$hook_name = 'plugins_page_view_lang_data';
|
||||
MyEventTrigger($hook_name,
|
||||
[
|
||||
'hook_name' => $hook_name,
|
||||
'is_backend' => true,
|
||||
'data' => &$data,
|
||||
]);
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -149,7 +149,7 @@ $(function()
|
||||
{
|
||||
$('.verify-submit-win').button('reset');
|
||||
}
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
@ -32,7 +32,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ function ParametersItemHtmlCreated(type, name, value)
|
||||
inherit_select_classes: true,
|
||||
enable_split_word_search: true,
|
||||
search_contains: true,
|
||||
no_results_text: lang_chosen_select_no_results_text
|
||||
no_results_text: window['lang_chosen_select_no_results_text']
|
||||
});
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ function PackageUpgradeRequestHandle(params)
|
||||
var key = params.key || '';
|
||||
var terminal = params.terminal || '';
|
||||
var opt = params.opt || 'url';
|
||||
var msg = params.msg || lang_get_loading_tips || '正在获取中...';
|
||||
var msg = params.msg || window['lang_get_loading_tips'] || '正在获取中...';
|
||||
|
||||
// 加载提示
|
||||
AMUI.dialog.loading({title: msg});
|
||||
@ -133,7 +133,7 @@ function PackageUpgradeRequestHandle(params)
|
||||
case 'url' :
|
||||
params['key'] = result.data;
|
||||
params['opt'] = 'download';
|
||||
params['msg'] = lang_download_loading_tips || '正在下载中...';
|
||||
params['msg'] = window['lang_download_loading_tips'] || '正在下载中...';
|
||||
PackageUpgradeRequestHandle(params);
|
||||
break;
|
||||
|
||||
@ -141,7 +141,7 @@ function PackageUpgradeRequestHandle(params)
|
||||
case 'download' :
|
||||
params['key'] = result.data;
|
||||
params['opt'] = 'upgrade';
|
||||
params['msg'] = lang_update_loading_tips || '正在更新中...';
|
||||
params['msg'] = window['lang_update_loading_tips'] || '正在更新中...';
|
||||
PackageUpgradeRequestHandle(params);
|
||||
break;
|
||||
|
||||
@ -156,13 +156,13 @@ function PackageUpgradeRequestHandle(params)
|
||||
}
|
||||
} else {
|
||||
AMUI.dialog.loading('close');
|
||||
Prompt(((result || null) == null) ? (lang_error_text || '异常错误') : (result.msg || (lang_error_text || '异常错误')));
|
||||
Prompt(((result || null) == null) ? (window['lang_error_text'] || '异常错误') : (result.msg || (window['lang_error_text'] || '异常错误')));
|
||||
}
|
||||
},
|
||||
error: function(xhr, type)
|
||||
{
|
||||
AMUI.dialog.loading('close');
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'));
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -199,7 +199,7 @@ $(function()
|
||||
var terminal = $(this).data('terminal') || '';
|
||||
if(name == null || type == null || value == null || json == null)
|
||||
{
|
||||
Prompt(lang_operate_params_error || '操作事件参数配置有误');
|
||||
Prompt(window['lang_operate_params_error'] || '操作事件参数配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ $(function()
|
||||
var terminal = $(this).attr('data-terminal') || '';
|
||||
if(url == null || type == null || value == null)
|
||||
{
|
||||
Prompt(lang_operate_params_error || '操作参数有误');
|
||||
Prompt(window['lang_operate_params_error'] || '操作参数有误');
|
||||
return false;
|
||||
}
|
||||
$('#package-upgrade-modal').modal('close');
|
||||
@ -269,7 +269,7 @@ $(function()
|
||||
var type = $(this).data('type') || null;
|
||||
if(type == null)
|
||||
{
|
||||
Prompt($table.data('move-type-tips') || lang_operate_params_error || '操作类型配置有误');
|
||||
Prompt($table.data('move-type-tips') || window['lang_operate_params_error'] || '操作类型配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -14,12 +14,12 @@ function SystemUpgradeRequestHandle(params)
|
||||
// 参数处理
|
||||
if((params || null) == null)
|
||||
{
|
||||
Prompt(lang_operate_params_error || '操作参数有误');
|
||||
Prompt(window['lang_operate_params_error'] || '操作参数有误');
|
||||
return false;
|
||||
}
|
||||
var url = params.url || null;
|
||||
var opt = params.opt || 'url';
|
||||
var msg = params.msg || lang_get_loading_tips || '正在获取中...';
|
||||
var msg = params.msg || window['lang_get_loading_tips'] || '正在获取中...';
|
||||
|
||||
// 加载提示
|
||||
AMUI.dialog.loading({title: msg});
|
||||
@ -40,21 +40,21 @@ function SystemUpgradeRequestHandle(params)
|
||||
// 获取下载地址
|
||||
case 'url' :
|
||||
params['opt'] = 'download_system';
|
||||
params['msg'] = lang_system_download_loading_tips || '系统包正在下载中...';
|
||||
params['msg'] = window['lang_system_download_loading_tips'] || '系统包正在下载中...';
|
||||
SystemUpgradeRequestHandle(params);
|
||||
break;
|
||||
|
||||
// 下载系统包
|
||||
case 'download_system' :
|
||||
params['opt'] = 'download_upgrade';
|
||||
params['msg'] = lang_upgrade_download_loading_tips || '升级包正在下载中...';
|
||||
params['msg'] = window['lang_upgrade_download_loading_tips'] || '升级包正在下载中...';
|
||||
SystemUpgradeRequestHandle(params);
|
||||
break;
|
||||
|
||||
// 下载升级包
|
||||
case 'download_upgrade' :
|
||||
params['opt'] = 'upgrade';
|
||||
params['msg'] = lang_update_loading_tips || '正在更新中...';
|
||||
params['msg'] = window['lang_update_loading_tips'] || '正在更新中...';
|
||||
SystemUpgradeRequestHandle(params);
|
||||
break;
|
||||
|
||||
@ -69,13 +69,13 @@ function SystemUpgradeRequestHandle(params)
|
||||
}
|
||||
} else {
|
||||
AMUI.dialog.loading('close');
|
||||
Prompt(((result || null) == null) ? (lang_error_text || '异常错误') : (result.msg || (lang_error_text || '异常错误')));
|
||||
Prompt(((result || null) == null) ? (window['lang_error_text'] || '异常错误') : (result.msg || (window['lang_error_text'] || '异常错误')));
|
||||
}
|
||||
},
|
||||
error: function(xhr, type)
|
||||
{
|
||||
AMUI.dialog.loading('close');
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'));
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -131,7 +131,7 @@ function EchartsOrderProfit(title_arr, name_arr, data)
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {name: lang_order_transaction_amount_name || '订单成交金额走势', show: true}
|
||||
saveAsImage : {name: window['lang_order_transaction_amount_name'] || '订单成交金额走势', show: true}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
@ -192,7 +192,7 @@ function EchartsOrderTrading(title_arr, name_arr, data)
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType : {show: true, type: ['line', 'bar', 'stack', 'tiled']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {name: lang_order_trading_trend_name || '订单交易走势', show: true}
|
||||
saveAsImage : {name: window['lang_order_trading_trend_name'] || '订单交易走势', show: true}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
@ -235,7 +235,7 @@ function EchartsGoodsHot(data)
|
||||
var chart = echarts.init(document.getElementById('echarts-goods-hot'), 'macarons');
|
||||
var option = {
|
||||
title : {
|
||||
subtext: lang_goods_hot_tips || '仅显示前30条商品',
|
||||
subtext: window['lang_goods_hot_tips'] || '仅显示前30条商品',
|
||||
x:'center'
|
||||
},
|
||||
tooltip : {
|
||||
@ -260,7 +260,7 @@ function EchartsGoodsHot(data)
|
||||
}
|
||||
},
|
||||
restore : {show: false},
|
||||
saveAsImage : {name: lang_goods_hot_name || '热销商品', show: true}
|
||||
saveAsImage : {name: window['lang_goods_hot_name'] || '热销商品', show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
@ -305,7 +305,7 @@ function EchartsPayType(title_arr, name_arr, data)
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType : {show: true, type: ['line', 'bar']},
|
||||
restore : {show: false},
|
||||
saveAsImage : {name: lang_payment_name || '支付方式', show: true}
|
||||
saveAsImage : {name: window['lang_payment_name'] || '支付方式', show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
@ -343,7 +343,7 @@ function EchartsOrderMapWholeCountry(name_arr, data)
|
||||
var option = {
|
||||
title: {
|
||||
text: '',
|
||||
subtext: lang_order_region_tips || '仅显示30条数据'
|
||||
subtext: window['lang_order_region_tips'] || '仅显示30条数据'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
@ -361,7 +361,7 @@ function EchartsOrderMapWholeCountry(name_arr, data)
|
||||
dataView : {show: true, readOnly: false},
|
||||
magicType : {show: true, type: ['line', 'bar']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {name: lang_order_region_name || '订单地域分布', show: true}
|
||||
saveAsImage : {name: window['lang_order_region_name'] || '订单地域分布', show: true}
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
@ -475,7 +475,7 @@ function EchartsInit(e)
|
||||
break;
|
||||
|
||||
default :
|
||||
var msg = lang_operate_params_error || '操作类型未定义';
|
||||
var msg = window['lang_operate_params_error'] || '操作类型未定义';
|
||||
console.info(msg+'['+type+']')
|
||||
}
|
||||
|
||||
@ -492,7 +492,7 @@ function EchartsInit(e)
|
||||
{
|
||||
e.button('reset');
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -504,7 +504,7 @@ $(function()
|
||||
$('.inspect-upgrade-submit').on('click', function()
|
||||
{
|
||||
// 基础信息
|
||||
AMUI.dialog.loading({title: lang_upgrade_check_loading_tips || '正在获取最新内容、请稍候...'});
|
||||
AMUI.dialog.loading({title: window['lang_upgrade_check_loading_tips'] || '正在获取最新内容、请稍候...'});
|
||||
|
||||
// ajax请求
|
||||
$.ajax({
|
||||
@ -523,8 +523,8 @@ $(function()
|
||||
// 是否存在数据、网络不通将返回空数据
|
||||
if((result.data || null) != null)
|
||||
{
|
||||
var upgrade_version_name = lang_upgrade_version_name || '更新版本:';
|
||||
var upgrade_date_name = lang_upgrade_date_name || '更新日期:';
|
||||
var upgrade_version_name = window['lang_upgrade_version_name'] || '更新版本:';
|
||||
var upgrade_date_name = window['lang_upgrade_date_name'] || '更新日期:';
|
||||
var html = '<p class="upgrade-title">';
|
||||
html += '<i class="am-icon-info-circle am-icon-md am-text-warning"></i>';
|
||||
html += '<span class="am-margin-left-xs">'+result.data.title+'</span>';
|
||||
@ -584,7 +584,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
AMUI.dialog.loading('close');
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -626,7 +626,7 @@ $(function()
|
||||
var is_empty_time = parseInt($(this).parents('.right-operate').data('empty-time')) || 0;
|
||||
if(is_empty_time == 0 && (start == '' || end == ''))
|
||||
{
|
||||
Prompt(lang_operate_params_error || '快捷时间配置有误');
|
||||
Prompt(window['lang_operate_params_error'] || '快捷时间配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ function RequestHandle(key, opt, msg)
|
||||
{
|
||||
$progress.addClass('am-hide');
|
||||
$error.removeClass('am-hide');
|
||||
$error.find('.msg-text').text(lang_operate_params_error || '请求参数有误');
|
||||
$error.find('.msg-text').text(window['lang_operate_params_error'] || '请求参数有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ function RequestHandle(key, opt, msg)
|
||||
}
|
||||
|
||||
// 加载提示
|
||||
$progress.find('.msg-text').text(msg || lang_get_loading_tips || '正在获取中...');
|
||||
$progress.find('.msg-text').text(msg || window['lang_get_loading_tips'] || '正在获取中...');
|
||||
|
||||
// ajax
|
||||
$.ajax({
|
||||
@ -55,12 +55,12 @@ function RequestHandle(key, opt, msg)
|
||||
{
|
||||
// 获取下载地址
|
||||
case 'url' :
|
||||
RequestHandle(result.data, 'download', lang_download_loading_tips || '正在下载中...');
|
||||
RequestHandle(result.data, 'download', window['lang_download_loading_tips'] || '正在下载中...');
|
||||
break;
|
||||
|
||||
// 下载插件包
|
||||
case 'download' :
|
||||
RequestHandle(result.data, 'install', lang_install_loading_tips || '正在安装中...');
|
||||
RequestHandle(result.data, 'install', window['lang_install_loading_tips'] || '正在安装中...');
|
||||
break;
|
||||
|
||||
// 安装完成
|
||||
@ -77,7 +77,7 @@ function RequestHandle(key, opt, msg)
|
||||
} else {
|
||||
$progress.addClass('am-hide');
|
||||
$error.removeClass('am-hide');
|
||||
$error.find('.msg-text').text(((result || null) == null) ? (lang_error_text || '异常错误') : (result.msg || (lang_error_text || '异常错误')));
|
||||
$error.find('.msg-text').text(((result || null) == null) ? (window['lang_error_text'] || '异常错误') : (result.msg || (window['lang_error_text'] || '异常错误')));
|
||||
}
|
||||
},
|
||||
error: function(xhr, type)
|
||||
@ -103,7 +103,7 @@ function RequestHandle(key, opt, msg)
|
||||
}
|
||||
}
|
||||
var msg = (typeof(data) == 'object') ? data.msg : data;
|
||||
$error.find('.msg-text').text(msg || (lang_error_text || '异常错误'));
|
||||
$error.find('.msg-text').text(msg || (window['lang_error_text'] || '异常错误'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ $(function()
|
||||
{
|
||||
if($(this).parents('.item').hasClass('am-active'))
|
||||
{
|
||||
Prompt(lang_not_enable_tips || '请先点击勾勾启用');
|
||||
Prompt(window['lang_not_enable_tips'] || '请先点击勾勾启用');
|
||||
} else {
|
||||
window.location.href = $(this).data('set-url');
|
||||
}
|
||||
@ -93,7 +93,7 @@ $(function()
|
||||
}
|
||||
if(len <= 0)
|
||||
{
|
||||
Prompt(lang_save_no_data_tips || '没有可保存的插件数据');
|
||||
Prompt(window['lang_save_no_data_tips'] || '没有可保存的插件数据');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -122,7 +122,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -27,7 +27,7 @@ function AddressModalHandle(data)
|
||||
var lat = data.lat || null;
|
||||
if(name == null || tel == null || province == null || city == null || county == null || address == null)
|
||||
{
|
||||
Prompt(lang_operate_params_error || '数据填写有误');
|
||||
Prompt(window['lang_operate_params_error'] || '数据填写有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -120,8 +120,8 @@ $(function()
|
||||
if(value.length > 0)
|
||||
{
|
||||
AMUI.dialog.confirm({
|
||||
title: lang_reminder_title || '温馨提示',
|
||||
content: lang_remove_confirm_tips || '移除后保存生效、确认继续吗?',
|
||||
title: window['lang_reminder_title'] || '温馨提示',
|
||||
content: window['lang_remove_confirm_tips'] || '移除后保存生效、确认继续吗?',
|
||||
onConfirm: function(options)
|
||||
{
|
||||
value.splice(index, 1);
|
||||
@ -142,14 +142,14 @@ $(function()
|
||||
var value = SelfExtractionAddressValue();
|
||||
if(value.length <= 0)
|
||||
{
|
||||
Prompt(lang_address_no_data || '地址数据为空');
|
||||
Prompt(window['lang_address_no_data'] || '地址数据为空');
|
||||
return false;
|
||||
}
|
||||
|
||||
var item = value[index] || null;
|
||||
if(item == null)
|
||||
{
|
||||
Prompt(lang_address_not_exist || '地址不存在');
|
||||
Prompt(window['lang_address_not_exist'] || '地址不存在');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ $(function()
|
||||
if((item.logo || null) != null)
|
||||
{
|
||||
html += '<li>';
|
||||
html += '<input type="text" name="logo" value="'+item.logo+'" data-validation-message="'+(lang_address_logo_message || '请上传logo图片')+'" required />';
|
||||
html += '<input type="text" name="logo" value="'+item.logo+'" data-validation-message="'+(window['lang_address_logo_message'] || '请上传logo图片')+'" required />';
|
||||
html += '<img src="'+item.logo+'" alt="'+item.name+'" />';
|
||||
html += '<i>×</i>';
|
||||
html += '</li>';
|
||||
@ -252,7 +252,7 @@ $(function()
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
$this.button('reset');
|
||||
var msg = HtmlToString(xhr.responseText) || (lang_error_text || '异常错误');
|
||||
var msg = HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误');
|
||||
Prompt(msg, null, 30);
|
||||
$('.goods-list-container ul.am-gallery').html('<div class="table-no"><i class="am-icon-warning"></i> '+msg+'</div>');
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ $(function()
|
||||
var keywords = $('.forth-selection-form-keywords').val();
|
||||
if(warehouse_id <= 0)
|
||||
{
|
||||
Prompt(lang_warehouse_choice_tips || '请选择仓库');
|
||||
Prompt(window['lang_warehouse_choice_tips'] || '请选择仓库');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ $(function()
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
$this.button('reset');
|
||||
var msg = HtmlToString(xhr.responseText) || (lang_error_text || '异常错误');
|
||||
var msg = HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误');
|
||||
Prompt(msg, null, 30);
|
||||
$('.goods-list-container ul.am-gallery').html('<div class="table-no"><i class="am-icon-warning"></i> '+msg+'</div>');
|
||||
}
|
||||
@ -83,7 +83,7 @@ $(function()
|
||||
var goods_id = $this.parents('li').data('gid');
|
||||
if(warehouse_id <= 0)
|
||||
{
|
||||
Prompt(lang_warehouse_choice_tips || '请选择仓库');
|
||||
Prompt(window['lang_warehouse_choice_tips'] || '请选择仓库');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@ -368,7 +368,7 @@ function FromInit(form_name)
|
||||
if((value || null) == null && value != '0')
|
||||
{
|
||||
is_success = false;
|
||||
Prompt(msg || lang_select_not_chosen_tips || '请选择项');
|
||||
Prompt(msg || window['lang_select_not_chosen_tips'] || '请选择项');
|
||||
$(this).trigger('blur');
|
||||
return false;
|
||||
} else {
|
||||
@ -380,7 +380,7 @@ function FromInit(form_name)
|
||||
is_success = false;
|
||||
if((msg || null) == null)
|
||||
{
|
||||
var temp_msg = lang_select_chosen_min_tips || '至少选择{value}项';
|
||||
var temp_msg = window['lang_select_chosen_min_tips'] || '至少选择{value}项';
|
||||
msg = temp_msg.replace('{value}', minchecked);
|
||||
}
|
||||
}
|
||||
@ -389,7 +389,7 @@ function FromInit(form_name)
|
||||
is_success = false;
|
||||
if((msg || null) == null)
|
||||
{
|
||||
var temp_msg = lang_select_chosen_max_tips || '最多选择{value}项';
|
||||
var temp_msg = window['lang_select_chosen_max_tips'] || '最多选择{value}项';
|
||||
msg = temp_msg.replace('{value}', maxchecked);
|
||||
}
|
||||
}
|
||||
@ -432,7 +432,7 @@ function FromInit(form_name)
|
||||
if(request_handle.indexOf(request_type) == -1)
|
||||
{
|
||||
$button.button('reset');
|
||||
Prompt(lang_form_config_type_params_tips || '表单[类型]参数配置有误');
|
||||
Prompt(window['lang_form_config_type_params_tips'] || '表单[类型]参数配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -441,7 +441,7 @@ function FromInit(form_name)
|
||||
if(request_type_value.indexOf(request_type) != -1 && request_value == null)
|
||||
{
|
||||
$button.button('reset');
|
||||
Prompt(lang_form_config_value_params_tips || '表单[类型值]参数配置有误');
|
||||
Prompt(window['lang_form_config_value_params_tips'] || '表单[类型值]参数配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -460,7 +460,7 @@ function FromInit(form_name)
|
||||
{
|
||||
window[request_value](GetFormVal(form_name, true));
|
||||
} else {
|
||||
Prompt((lang_form_call_fun_not_exist_tips || '表单配置的方法未定义')+'['+request_value+']');
|
||||
Prompt((window['lang_form_call_fun_not_exist_tips'] || '表单配置的方法未定义')+'['+request_value+']');
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
@ -491,7 +491,7 @@ function FromInit(form_name)
|
||||
if(!IsExitsFunction(request_value))
|
||||
{
|
||||
$button.button('reset');
|
||||
Prompt((lang_form_call_fun_not_exist_tips || '表单配置的方法未定义')+'['+request_value+']');
|
||||
Prompt((window['lang_form_call_fun_not_exist_tips'] || '表单配置的方法未定义')+'['+request_value+']');
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
@ -502,7 +502,7 @@ function FromInit(form_name)
|
||||
if(action == null || method == null)
|
||||
{
|
||||
$button.button('reset');
|
||||
Prompt(lang_form_config_main_tips || '表单[action或method]参数配置有误');
|
||||
Prompt(window['lang_form_config_main_tips'] || '表单[action或method]参数配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -521,7 +521,7 @@ function FromInit(form_name)
|
||||
if(env_vars_count > 0 && form_data_count > env_vars_count)
|
||||
{
|
||||
$button.button('reset');
|
||||
Prompt((lang_max_input_vars_tips || '请求参数数量已超出php.ini限制')+'[max_input_vars]('+form_data_count+'>'+env_vars_count+')');
|
||||
Prompt((window['lang_max_input_vars_tips'] || '请求参数数量已超出php.ini限制')+'[max_input_vars]('+form_data_count+'>'+env_vars_count+')');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -547,7 +547,7 @@ function FromInit(form_name)
|
||||
window[request_value](result);
|
||||
} else {
|
||||
$button.button('reset');
|
||||
Prompt((lang_form_call_fun_not_exist_tips || '表单配置的方法未定义')+'['+request_value+']');
|
||||
Prompt((window['lang_form_call_fun_not_exist_tips'] || '表单配置的方法未定义')+'['+request_value+']');
|
||||
}
|
||||
} else {
|
||||
// 统一处理
|
||||
@ -594,7 +594,7 @@ function FromInit(form_name)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
$button.button('reset');
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -710,7 +710,7 @@ function Tree(id, url, level = 0, is_delete_all = 0)
|
||||
},
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$('#tree').find('p').text(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'));
|
||||
$('#tree').find('p').text(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'));
|
||||
$('#tree').find('img').remove();
|
||||
}
|
||||
});
|
||||
@ -761,18 +761,18 @@ function TreeItemHtmlHandle(item, pid, level, is_delete_all)
|
||||
// 新增
|
||||
if(level < rank-1)
|
||||
{
|
||||
html += '<button class="am-btn am-btn-success am-btn-xs am-radius am-icon-plus am-margin-right-sm tree-submit-add-node" data-am-modal="{target: \''+popup_tag+'\'}" data-id="'+item.id+'" '+(item.is_enable == 0 ? 'style="display:none;"' : '')+'> '+(lang_operate_add_name || '新增')+'</button>';
|
||||
html += '<button class="am-btn am-btn-success am-btn-xs am-radius am-icon-plus am-margin-right-sm tree-submit-add-node" data-am-modal="{target: \''+popup_tag+'\'}" data-id="'+item.id+'" '+(item.is_enable == 0 ? 'style="display:none;"' : '')+'> '+(window['lang_operate_add_name'] || '新增')+'</button>';
|
||||
}
|
||||
|
||||
// 编辑
|
||||
html += '<button class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-edit submit-edit" data-am-modal="{target: \''+popup_tag+'\'}" data-json="'+encodeURIComponent(item.json)+'" data-is-exist-son="'+item.is_son+'"> '+(lang_operate_edit_name || '编辑')+'</button>';
|
||||
html += '<button class="am-btn am-btn-secondary am-btn-xs am-radius am-icon-edit submit-edit" data-am-modal="{target: \''+popup_tag+'\'}" data-json="'+encodeURIComponent(item.json)+'" data-is-exist-son="'+item.is_son+'"> '+(window['lang_operate_edit_name'] || '编辑')+'</button>';
|
||||
if(item.is_son != 'ok' || is_delete_all == 1)
|
||||
{
|
||||
// 是否需要删除子数据
|
||||
var pid_class = is_delete_all == 1 ? '.tree-pid-'+item.id : '';
|
||||
|
||||
// 删除
|
||||
html += '<button class="am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o am-margin-left-sm submit-delete" data-id="'+item.id+'" data-url="'+delete_url+'" data-ext-delete-tag="'+pid_class+'"> '+(lang_operate_delete_name || '删除')+'</button>';
|
||||
html += '<button class="am-btn am-btn-danger am-btn-xs am-radius am-icon-trash-o am-margin-left-sm submit-delete" data-id="'+item.id+'" data-url="'+delete_url+'" data-ext-delete-tag="'+pid_class+'"> '+(window['lang_operate_delete_name'] || '删除')+'</button>';
|
||||
}
|
||||
html += '</div>';
|
||||
// 操作项 end
|
||||
@ -943,11 +943,11 @@ function ImageFileUploadShow(class_name, show_img, default_images)
|
||||
filextension = filextension.toLowerCase();
|
||||
if((filextension!='.jpg') && (filextension!='.gif') && (filextension!='.jpeg') && (filextension!='.png') && (filextension!='.bmp'))
|
||||
{
|
||||
Prompt(lang_upload_images_format_tips || '图片格式错误,请重新上传');
|
||||
Prompt(window['lang_upload_images_format_tips'] || '图片格式错误,请重新上传');
|
||||
} else {
|
||||
if(document.all)
|
||||
{
|
||||
Prompt(lang_ie_browser_tips || 'ie浏览器不可用');
|
||||
Prompt(window['lang_ie_browser_tips'] || 'ie浏览器不可用');
|
||||
/*imgFile.select();
|
||||
path = document.selection.createRange().text;
|
||||
$(this).parent().parent().find('img').attr('src', '');
|
||||
@ -985,11 +985,11 @@ function VideoFileUploadShow(class_name, show_video, default_video)
|
||||
filextension = filextension.toLowerCase();
|
||||
if(filextension != '.mp4')
|
||||
{
|
||||
Prompt(lang_upload_video_format_tips || '视频格式错误,请重新上传');
|
||||
Prompt(window['lang_upload_video_format_tips'] || '视频格式错误,请重新上传');
|
||||
} else {
|
||||
if(document.all)
|
||||
{
|
||||
Prompt(lang_ie_browser_tips || 'ie浏览器不可用');
|
||||
Prompt(window['lang_ie_browser_tips'] || 'ie浏览器不可用');
|
||||
/*imgFile.select();
|
||||
path = document.selection.createRange().text;
|
||||
$(this).parent().parent().find('img').attr('src', '');
|
||||
@ -1101,12 +1101,12 @@ function DataDelete(e)
|
||||
var view_value = e.attr('data-view-value') || '';
|
||||
var ext_delete_tag = e.attr('data-ext-delete-tag') || null;
|
||||
var is_loading = parseInt(e.attr('data-is-loading') || 0);
|
||||
var loading_msg = e.attr('data-loading-msg') || lang_request_handle_loading_tips || '正在处理中、请稍候...';
|
||||
var loading_msg = e.attr('data-loading-msg') || window['lang_request_handle_loading_tips'] || '正在处理中、请稍候...';
|
||||
|
||||
// 参数校验
|
||||
if((id || null) == null || (url || null) == null)
|
||||
{
|
||||
Prompt(lang_params_error_tips || '参数配置有误');
|
||||
Prompt(window['lang_params_error_tips'] || '参数配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1173,7 +1173,7 @@ function DataDelete(e)
|
||||
result['data_id'] = id;
|
||||
window[value](result);
|
||||
} else {
|
||||
Prompt((lang_config_fun_not_exist_tips || '配置方法未定义')+'['+value+']');
|
||||
Prompt((window['lang_config_fun_not_exist_tips'] || '配置方法未定义')+'['+value+']');
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1219,7 +1219,7 @@ function DataDelete(e)
|
||||
AMUI.dialog.loading('close');
|
||||
}
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1234,8 +1234,8 @@ function DataDelete(e)
|
||||
*/
|
||||
function ConfirmDataDelete(e)
|
||||
{
|
||||
var title = e.attr('data-title') || lang_reminder_title || '温馨提示';
|
||||
var msg = e.attr('data-msg') || lang_delete_confirm_tips || '删除后不可恢复、确认操作吗?';
|
||||
var title = e.attr('data-title') || window['lang_reminder_title'] || '温馨提示';
|
||||
var msg = e.attr('data-msg') || window['lang_delete_confirm_tips'] || '删除后不可恢复、确认操作吗?';
|
||||
var is_confirm = (e.attr('data-is-confirm') == undefined || e.attr('data-is-confirm') == 1) ? 1 : 0;
|
||||
|
||||
if(is_confirm == 1)
|
||||
@ -1274,7 +1274,7 @@ function AjaxRequest(e)
|
||||
var view_value = e.attr('data-view-value') || '';
|
||||
var is_example = e.hasClass('btn-loading-example');
|
||||
var is_loading = parseInt(e.attr('data-is-loading') || 0);
|
||||
var loading_msg = e.attr('data-loading-msg') || lang_request_handle_loading_tips || '正在处理中、请稍候...';
|
||||
var loading_msg = e.attr('data-loading-msg') || window['lang_request_handle_loading_tips'] || '正在处理中、请稍候...';
|
||||
|
||||
// 请求数据
|
||||
var data = {"value": value, "field": field};
|
||||
@ -1342,7 +1342,7 @@ function AjaxRequest(e)
|
||||
{
|
||||
window[value](result);
|
||||
} else {
|
||||
Prompt((lang_config_fun_not_exist_tips || '配置方法未定义')+'['+value+']');
|
||||
Prompt((window['lang_config_fun_not_exist_tips'] || '配置方法未定义')+'['+value+']');
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1390,7 +1390,7 @@ function AjaxRequest(e)
|
||||
e.button('reset');
|
||||
}
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1405,8 +1405,8 @@ function AjaxRequest(e)
|
||||
*/
|
||||
function ConfirmNetworkAjax(e)
|
||||
{
|
||||
var title = e.attr('data-title') || lang_reminder_title || '温馨提示';
|
||||
var msg = e.attr('data-msg') || lang_operate_confirm_tips || '操作后不可恢复、确认继续吗?';
|
||||
var title = e.attr('data-title') || window['lang_reminder_title'] || '温馨提示';
|
||||
var msg = e.attr('data-msg') || window['lang_operate_confirm_tips'] || '操作后不可恢复、确认继续吗?';
|
||||
AMUI.dialog.confirm({
|
||||
title: title,
|
||||
content: msg,
|
||||
@ -1439,7 +1439,7 @@ function FullscreenOpen()
|
||||
{
|
||||
elem.requestFullScreen();
|
||||
} else {
|
||||
Prompt(lang_browser_api_error_tips || '浏览器不支持全屏API或已被禁用');
|
||||
Prompt(window['lang_browser_api_error_tips'] || '浏览器不支持全屏API或已被禁用');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -1469,7 +1469,7 @@ function FullscreenExit()
|
||||
{
|
||||
elem.exitFullscreen();
|
||||
} else {
|
||||
Prompt(lang_browser_api_error_tips || '浏览器不支持全屏API或已被禁用');
|
||||
Prompt(window['lang_browser_api_error_tips'] || '浏览器不支持全屏API或已被禁用');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@ -1492,7 +1492,7 @@ function FullscreenEscEvent()
|
||||
var $fullscreen = $('.fullscreen-event');
|
||||
if(($fullscreen.attr('data-status') || 0) == 1)
|
||||
{
|
||||
$fullscreen.find('.fullscreen-text').text($fullscreen.attr('data-fulltext-open') || lang_fullscreen_open_name || '开启全屏');
|
||||
$fullscreen.find('.fullscreen-text').text($fullscreen.attr('data-fulltext-open') || window['lang_fullscreen_open_name'] || '开启全屏');
|
||||
$fullscreen.attr('data-status', 0);
|
||||
}
|
||||
}
|
||||
@ -1949,7 +1949,7 @@ function MapInit(lng, lat, level, is_dragend, mapid)
|
||||
var cr = new BMap.CopyrightControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT});
|
||||
map.addControl(cr); //添加版权控件
|
||||
var bs = map.getBounds(); //返回地图可视区域
|
||||
cr.addCopyright({id: 1, content: '<div class="map-dragging-tips"><span>'+(lang_map_dragging_icon_tips || '拖动红色图标直接定位')+'</span></div>', bounds:bs});
|
||||
cr.addCopyright({id: 1, content: '<div class="map-dragging-tips"><span>'+(window['lang_map_dragging_icon_tips'] || '拖动红色图标直接定位')+'</span></div>', bounds:bs});
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2079,7 +2079,7 @@ function MapInit(lng, lat, level, is_dragend, mapid)
|
||||
|
||||
// 默认
|
||||
default :
|
||||
Prompt((lang_map_type_not_exist_tips || '该地图功能未定义')+'('+__load_map_type__+')');
|
||||
Prompt((window['lang_map_type_not_exist_tips'] || '该地图功能未定义')+'('+__load_map_type__+')');
|
||||
}
|
||||
|
||||
//获取地址坐标
|
||||
@ -2494,7 +2494,7 @@ $(function()
|
||||
var val = $(this).data('val') || null;
|
||||
if(key == null || val == null)
|
||||
{
|
||||
Prompt(lang_operate_params_error || '排序数据值有误');
|
||||
Prompt(window['lang_operate_params_error'] || '排序数据值有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2527,7 +2527,7 @@ $(function()
|
||||
// 是否有选择的数据
|
||||
if(fields.length <= 0)
|
||||
{
|
||||
Prompt(lang_before_choice_data_tips || '请先选择数据');
|
||||
Prompt(window['lang_before_choice_data_tips'] || '请先选择数据');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2563,7 +2563,7 @@ $(function()
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
$button.button('reset');
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -2574,11 +2574,11 @@ $(function()
|
||||
var value = parseInt($(this).attr('data-value')) || 0;
|
||||
if(value == 1)
|
||||
{
|
||||
var not_checked_text = $(this).data('not-checked-text') || lang_select_all_name || '全选';
|
||||
var not_checked_text = $(this).data('not-checked-text') || window['lang_select_all_name'] || '全选';
|
||||
$(this).text(not_checked_text);
|
||||
$('.form-table-fields-list-container ul li').find('input[type="checkbox"]').uCheck('uncheck');
|
||||
} else {
|
||||
var checked_text = $(this).data('checked-text') || lang_select_reverse_name || '反选';
|
||||
var checked_text = $(this).data('checked-text') || window['lang_select_reverse_name'] || '反选';
|
||||
$(this).text(checked_text);
|
||||
$('.form-table-fields-list-container ul li').find('input[type="checkbox"]').uCheck('check');
|
||||
}
|
||||
@ -2591,11 +2591,11 @@ $(function()
|
||||
var value = parseInt($(this).attr('data-value')) || 0;
|
||||
if(value == 1)
|
||||
{
|
||||
var not_checked_text = $(this).data('not-checked-text') || lang_select_all_name || '全选';
|
||||
var not_checked_text = $(this).data('not-checked-text') || window['lang_select_all_name'] || '全选';
|
||||
$(this).text(not_checked_text);
|
||||
$('.form-table-operate-checkbox').find('input[type="checkbox"]').uCheck('uncheck');
|
||||
} else {
|
||||
var checked_text = $(this).data('checked-text') || lang_select_reverse_name || '反选';
|
||||
var checked_text = $(this).data('checked-text') || window['lang_select_reverse_name'] || '反选';
|
||||
$(this).text(checked_text);
|
||||
$('.form-table-operate-checkbox').find('input[type="checkbox"]').uCheck('check');
|
||||
}
|
||||
@ -2609,7 +2609,7 @@ $(function()
|
||||
var url = $(this).data('url') || null;
|
||||
if(url == null)
|
||||
{
|
||||
Prompt(lang_operate_params_error || 'url参数有误');
|
||||
Prompt(window['lang_operate_params_error'] || 'url参数有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2617,7 +2617,7 @@ $(function()
|
||||
var form = $(this).data('form') || null;
|
||||
if(form == null)
|
||||
{
|
||||
Prompt(lang_operate_params_error || 'form参数有误');
|
||||
Prompt(window['lang_operate_params_error'] || 'form参数有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2625,15 +2625,15 @@ $(function()
|
||||
var values = FromTableCheckedValues(form, '.am-table-scrollable-horizontal');
|
||||
if(values.length <= 0)
|
||||
{
|
||||
Prompt(lang_before_choice_data_tips || '请先选中数据');
|
||||
Prompt(window['lang_before_choice_data_tips'] || '请先选中数据');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 提交字段名称|超时时间|标题|描述
|
||||
var key = $(this).data('key') || form;
|
||||
var timeout = $(this).data('timeout') || 60000;
|
||||
var title = $(this).data('confirm-title') || lang_reminder_title || '温馨提示';
|
||||
var msg = $(this).data('confirm-msg') || lang_delete_confirm_tips || '删除后不可恢复、确认操作吗?';
|
||||
var title = $(this).data('confirm-title') || window['lang_reminder_title'] || '温馨提示';
|
||||
var msg = $(this).data('confirm-msg') || window['lang_delete_confirm_tips'] || '删除后不可恢复、确认操作吗?';
|
||||
|
||||
// 再次确认
|
||||
AMUI.dialog.confirm({
|
||||
@ -2675,7 +2675,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -2699,12 +2699,12 @@ $(function()
|
||||
{
|
||||
if(FullscreenOpen())
|
||||
{
|
||||
$(this).find('.fullscreen-text').text($(this).attr('data-fulltext-exit') || lang_fullscreen_exit_name || '退出全屏');
|
||||
$(this).find('.fullscreen-text').text($(this).attr('data-fulltext-exit') || window['lang_fullscreen_exit_name'] || '退出全屏');
|
||||
}
|
||||
} else {
|
||||
if(FullscreenExit())
|
||||
{
|
||||
$(this).find('.fullscreen-text').text($(this).attr('data-fulltext-open') || lang_fullscreen_open_name || '开启全屏');
|
||||
$(this).find('.fullscreen-text').text($(this).attr('data-fulltext-open') || window['lang_fullscreen_open_name'] || '开启全屏');
|
||||
}
|
||||
}
|
||||
$(this).attr('data-status', status == 0 ? 1 : 0);
|
||||
@ -2733,7 +2733,7 @@ $(function()
|
||||
inherit_select_classes: true,
|
||||
enable_split_word_search: true,
|
||||
search_contains: true,
|
||||
no_results_text: lang_chosen_select_no_results_text
|
||||
no_results_text: window['lang_chosen_select_no_results_text']
|
||||
});
|
||||
}
|
||||
// 多选插件 空内容失去焦点验证bug兼容处理
|
||||
@ -2779,10 +2779,10 @@ $(function()
|
||||
var field = $this.attr('data-field') || '';
|
||||
var is_update_status = $this.attr('data-is-update-status') || 0;
|
||||
var is_loading = parseInt($this.attr('data-is-loading') || 0);
|
||||
var loading_msg = $this.attr('data-loading-msg') || lang_request_handle_loading_tips || '正在处理中、请稍候...';
|
||||
var loading_msg = $this.attr('data-loading-msg') || window['lang_request_handle_loading_tips'] || '正在处理中、请稍候...';
|
||||
if(id == undefined || url == undefined)
|
||||
{
|
||||
Prompt(lang_params_error_tips || '参数配置有误');
|
||||
Prompt(window['lang_params_error_tips'] || '参数配置有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2846,7 +2846,7 @@ $(function()
|
||||
AMUI.dialog.loading('close');
|
||||
}
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -2948,7 +2948,7 @@ $(function()
|
||||
{
|
||||
Tree(id, url, level, is_delete_all);
|
||||
} else {
|
||||
Prompt(lang_operate_params_error || '参数有误');
|
||||
Prompt(window['lang_operate_params_error'] || '参数有误');
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -3026,7 +3026,7 @@ $(function()
|
||||
address += $('#form-address').val();
|
||||
if(province.length <= 0 && address.length <= 0)
|
||||
{
|
||||
Prompt(lang_address_data_empty_tips || '地址为空');
|
||||
Prompt(window['lang_address_data_empty_tips'] || '地址为空');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3044,7 +3044,7 @@ $(function()
|
||||
{
|
||||
MapInit(point.lng, point.lat);
|
||||
} else {
|
||||
Prompt(lang_map_address_analysis_tips || '您选择地址没有解析到结果!');
|
||||
Prompt(window['lang_map_address_analysis_tips'] || '您选择地址没有解析到结果!');
|
||||
}
|
||||
}, province);
|
||||
break;
|
||||
@ -3061,7 +3061,7 @@ $(function()
|
||||
var lnglat = result.geocodes[0].location;
|
||||
MapInit(lnglat.lng, lnglat.lat);
|
||||
} else {
|
||||
Prompt(lang_map_address_analysis_tips || '您选择地址没有解析到结果!');
|
||||
Prompt(window['lang_map_address_analysis_tips'] || '您选择地址没有解析到结果!');
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -3093,7 +3093,7 @@ $(function()
|
||||
|
||||
// 默认
|
||||
default :
|
||||
Prompt((lang_map_type_not_exist_tips || '该地图功能未定义')+'('+__load_map_type__+')');
|
||||
Prompt((window['lang_map_type_not_exist_tips'] || '该地图功能未定义')+'('+__load_map_type__+')');
|
||||
}
|
||||
});
|
||||
|
||||
@ -3223,7 +3223,7 @@ $(function()
|
||||
// 是否限制数量
|
||||
if(max_number > 0 && $tag.find('li').length >= max_number)
|
||||
{
|
||||
var temp_msg = lang_upload_images_max_tips || '最多上传{value}张图片';
|
||||
var temp_msg = window['lang_upload_images_max_tips'] || '最多上传{value}张图片';
|
||||
Prompt(temp_msg.replace('{value}', max_number));
|
||||
break;
|
||||
}
|
||||
@ -3349,14 +3349,14 @@ $(function()
|
||||
// 组件是否初始化
|
||||
if(typeof(upload_editor) != 'object')
|
||||
{
|
||||
Prompt(lang_assembly_not_init_tips || '组件未初始化');
|
||||
Prompt(window['lang_assembly_not_init_tips'] || '组件未初始化');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 容器是否指定
|
||||
if(($(this).attr('data-view-tag') || null) == null)
|
||||
{
|
||||
Prompt(lang_not_specified_container_tips || '未指定容器');
|
||||
Prompt(window['lang_not_specified_container_tips'] || '未指定容器');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3384,14 +3384,14 @@ $(function()
|
||||
}
|
||||
if(dialog_type == null)
|
||||
{
|
||||
Prompt(lang_not_specified_assembly_tips || '未指定加载组建');
|
||||
Prompt(window['lang_not_specified_assembly_tips'] || '未指定加载组建');
|
||||
return false;
|
||||
}
|
||||
|
||||
// 是否指定form名称
|
||||
if(($view_tag.attr('data-form-name') || null) == null)
|
||||
{
|
||||
Prompt(lang_not_specified_form_name_tips || '未指定表单name名称');
|
||||
Prompt(window['lang_not_specified_form_name_tips'] || '未指定表单name名称');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3453,7 +3453,7 @@ $(function()
|
||||
var url = $(this).data('url') || null;
|
||||
if(url == null)
|
||||
{
|
||||
Prompt(lang_operate_params_error || 'url未配置');
|
||||
Prompt(window['lang_operate_params_error'] || 'url未配置');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3475,7 +3475,7 @@ $(function()
|
||||
var lat = $(this).data('lat') || null;
|
||||
if(lng == null || lat == null)
|
||||
{
|
||||
Prompt(lang_map_coordinate_tips || '坐标有误');
|
||||
Prompt(window['lang_map_coordinate_tips'] || '坐标有误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3505,7 +3505,7 @@ $(function()
|
||||
// 关闭窗口
|
||||
$(document).on('click', '.window-close-event', function()
|
||||
{
|
||||
if(confirm($(this).data('msg') || lang_window_close_confirm_tips || '您确定要关闭本页吗?'))
|
||||
if(confirm($(this).data('msg') || window['lang_window_close_confirm_tips'] || '您确定要关闭本页吗?'))
|
||||
{
|
||||
var user_agent = navigator.userAgent;
|
||||
if(user_agent.indexOf('Firefox') != -1 || user_agent.indexOf('Chrome') != -1)
|
||||
|
||||
@ -960,7 +960,7 @@ function FormBackModuleConfigGoodsHandle(data)
|
||||
error:function(res)
|
||||
{
|
||||
$this.button('reset');
|
||||
var msg = HtmlToString(xhr.responseText) || (lang_error_text || '异常错误');
|
||||
var msg = HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误');
|
||||
Prompt(msg, null, 30);
|
||||
}
|
||||
});
|
||||
@ -2680,7 +2680,7 @@ $(function()
|
||||
error:function(res)
|
||||
{
|
||||
$this.button('reset');
|
||||
var msg = HtmlToString(xhr.responseText) || (lang_error_text || '异常错误');
|
||||
var msg = HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误');
|
||||
Prompt(msg, null, 30);
|
||||
$('.goods-list-container ul.am-gallery').html('<div class="table-no"><i class="am-icon-warning"></i> '+msg+'</div>');
|
||||
}
|
||||
@ -2805,7 +2805,7 @@ $(function()
|
||||
error:function(res)
|
||||
{
|
||||
$this.button('reset');
|
||||
var msg = HtmlToString(xhr.responseText) || (lang_error_text || '异常错误');
|
||||
var msg = HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误');
|
||||
Prompt(msg, null, 30);
|
||||
}
|
||||
});
|
||||
@ -3063,7 +3063,7 @@ $(function()
|
||||
error:function(xhr, type)
|
||||
{
|
||||
$this.button('reset');
|
||||
var msg = HtmlToString(xhr.responseText) || (lang_error_text || '异常错误');
|
||||
var msg = HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误');
|
||||
Prompt(msg, null, 30);
|
||||
}
|
||||
});
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
* My97 DatePicker 4.8.5
|
||||
* License: http://www.my97.net/license.asp
|
||||
*/
|
||||
// 默认语言
|
||||
var lang = (window['lang_multilingual_default_code'] || 'auto') == 'en' ? 'en' : 'auto';
|
||||
var $dp,WdatePicker;(function(){var Config={
|
||||
$langList:[{name:'en',charset:'UTF-8'},
|
||||
{name:'zh-cn',charset:'gb2312'},
|
||||
@ -27,7 +29,7 @@ var $dp,WdatePicker;(function(){var Config={
|
||||
autoUpdateOnChanged:null,
|
||||
weekMethod:'MSExcel',
|
||||
position:{},
|
||||
lang:'auto',
|
||||
lang:lang,
|
||||
skin:'default',
|
||||
dateFmt:'yyyy-MM-dd',
|
||||
realDateFmt:'yyyy-MM-dd',
|
||||
|
||||
@ -7,6 +7,21 @@
|
||||
* @since 2012-6-4 15:58:41
|
||||
*/
|
||||
(function($) {
|
||||
// 默认语言
|
||||
var lang = (window['lang_multilingual_default_code'] || 'zh-cn') == 'en' ? 'en' : 'zh-cn';
|
||||
var lang_list = {
|
||||
'zh-cn': {
|
||||
confirm: '确认',
|
||||
close: '关闭',
|
||||
clear: '清除'
|
||||
},
|
||||
'en': {
|
||||
confirm: 'confirm',
|
||||
close: 'close',
|
||||
clear: 'clear'
|
||||
}
|
||||
};
|
||||
var lang_data = lang_list[lang] || lang_list['zh-cn'];
|
||||
var ColorHex=new Array('00','33','66','99','CC','FF');
|
||||
var SpColorHex=new Array('FF0000','00FF00','0000FF','FFFF00','00FFFF','FF00FF');
|
||||
$.fn.colorpicker = function(options) {
|
||||
@ -96,7 +111,7 @@
|
||||
+'<tr><td colspan=21 bgcolor=#cccccc>'
|
||||
+'<table cellpadding="0" cellspacing="1" border="0" style="border-collapse: collapse">'
|
||||
+'<tr><td width="3"><td><input type="text" id="DisColor'+index+'" size="3" disabled style="border:solid 1px #000000;background-color:#000000;padding:0;"></td>'
|
||||
+'<td width="3"><td><input type="text" id="HexColor'+index+'" style="border:inset 1px;font-family:Arial;width:58px;" value="#000000"><a href="javascript:void(0);" id="_determine'+index+'">确定</a> | <a href="javascript:void(0);" id="_cclose'+index+'">关闭</a> | <a href="javascript:void(0);" id="_creset'+index+'">清除</a></td></tr></table></td></table>'
|
||||
+'<td width="3"><td><input type="text" id="HexColor'+index+'" style="border:inset 1px;font-family:Arial;width:58px;" value="#000000"><a href="javascript:void(0);" id="_determine'+index+'">'+lang_data.confirm+'</a> | <a href="javascript:void(0);" id="_cclose'+index+'">'+lang_data.close+'</a> | <a href="javascript:void(0);" id="_creset'+index+'">'+lang_data.clear+'</a></td></tr></table></td></table>'
|
||||
+'<table id="CT'+index+'" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse;border-color:#333;border-width:0 1px 1px 1px;border-style:solid;">'
|
||||
+colorTable+'</table>';
|
||||
$('#colorpanel'+index).html(colorTable);
|
||||
|
||||
@ -24,8 +24,8 @@
|
||||
</div>
|
||||
<div class="alignBar">
|
||||
<div id="search-container" class="none">
|
||||
<input type="text" name="keywords" id="search-input" placeholder="其实搜索很简单^_^!" />
|
||||
<button type="button" id="search-submit">搜索</button>
|
||||
<input type="text" name="keywords" id="search-input" placeholder="" />
|
||||
<button type="button" id="search-submit"><var id="lang_input_search"></var></button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tabbody" class="tabbody">
|
||||
|
||||
@ -793,7 +793,7 @@
|
||||
window.event.preventDefault(); //取消事件的默认行为
|
||||
window.event.stopPropagation(); //阻止事件的传播
|
||||
} finally {
|
||||
if(!confirm("确定要删除吗?")) return;
|
||||
if(!confirm(lang.deleteConfirmTips)) return;
|
||||
var url = editor.getOpt("serverUrl");
|
||||
var join = (url.indexOf('?') == -1) ? '?' : '&';
|
||||
$.post(url + join+"action=deletefile", { "id": del.attr("data-id") }, function(response) {
|
||||
|
||||
@ -25,8 +25,8 @@
|
||||
</div>
|
||||
<div class="alignBar">
|
||||
<div id="search-container" class="none">
|
||||
<input type="text" name="keywords" id="search-input" placeholder="其实搜索很简单^_^!" />
|
||||
<button type="button" id="search-submit">搜索</button>
|
||||
<input type="text" name="keywords" id="search-input" placeholder="" />
|
||||
<button type="button" id="search-submit"><var id="lang_input_search"></var></button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tabbody" class="tabbody">
|
||||
|
||||
@ -968,7 +968,7 @@
|
||||
window.event.preventDefault(); //取消事件的默认行为
|
||||
window.event.stopPropagation(); //阻止事件的传播
|
||||
} finally {
|
||||
if(!confirm("确定要删除吗?")) return;
|
||||
if(!confirm(lang.deleteConfirmTips)) return;
|
||||
var url = editor.getOpt("serverUrl");
|
||||
var join = (url.indexOf('?') == -1) ? '?' : '&';
|
||||
$.post(url + join+"action=deletefile", { "id": del.attr("data-id") }, function(response) {
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
</div>
|
||||
<div class="alignBar">
|
||||
<div id="search-container" class="none">
|
||||
<input type="text" name="keywords" id="search-input" placeholder="其实搜索很简单^_^!" />
|
||||
<button type="button" class="am-btn am-btn-default am-radius am-btn-xs" id="search-submit">搜索</button>
|
||||
<input type="text" name="keywords" id="search-input" placeholder="" />
|
||||
<button type="button" class="am-btn am-btn-default am-radius am-btn-xs" id="search-submit"><var id="lang_input_search"></var></button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="tabBodys" class="tabbody">
|
||||
|
||||
@ -341,7 +341,7 @@
|
||||
window.event.preventDefault(); //取消事件的默认行为
|
||||
window.event.stopPropagation(); //阻止事件的传播
|
||||
} finally {
|
||||
if(!confirm("确定要删除吗?")) return;
|
||||
if(!confirm(lang.deleteConfirmTips)) return;
|
||||
var url = editor.getOpt("serverUrl");
|
||||
var join = (url.indexOf('?') == -1) ? '?' : '&';
|
||||
$.post(url + join+"action=deletefile", { "id": del.attr("data-id") }, function(response) {
|
||||
|
||||
@ -277,7 +277,8 @@ UE.I18N['en'] = {
|
||||
'noneAlign':{'title':'None Float'},
|
||||
'leftAlign':{'title':'Left Float'},
|
||||
'rightAlign':{'title':'Right Float'},
|
||||
'centerAlign':{'title':'Center In A Line'}
|
||||
'centerAlign':{'title':'Center In A Line'},
|
||||
'lang_input_search':'Search'
|
||||
},
|
||||
'uploadSelectFile':'Select File',
|
||||
'uploadAddFile':'Add File',
|
||||
@ -308,14 +309,16 @@ UE.I18N['en'] = {
|
||||
'imageLoadError':"Error,please check the network or URL!",
|
||||
'searchRemind':"Enter the search keyword!",
|
||||
'searchLoading':"Image is loading,please wait...",
|
||||
'searchRetry':" Sorry,can't find the image,please try again!"
|
||||
'searchRetry':" Sorry,can't find the image,please try again!",
|
||||
'deleteConfirmTips': 'Are you sure you want to delete?'
|
||||
},
|
||||
'attachment':{
|
||||
'static':{
|
||||
'lang_tab_upload': 'Upload',
|
||||
'lang_tab_online': 'Online',
|
||||
'lang_start_upload':"Start upload",
|
||||
'lang_drop_remind':"You can drop files here, a single maximum of 300 files"
|
||||
'lang_drop_remind':"You can drop files here, a single maximum of 300 files",
|
||||
'lang_input_search':'Search'
|
||||
},
|
||||
'uploadSelectFile':'Select File',
|
||||
'uploadAddFile':'Add File',
|
||||
@ -338,7 +341,8 @@ UE.I18N['en'] = {
|
||||
'errorInterrupt':'File Upload Interrupted',
|
||||
'errorUploadRetry':'Upload Error, Please Retry.',
|
||||
'errorHttp':'Http Error',
|
||||
'errorServerUpload':'Server Result Error.'
|
||||
'errorServerUpload':'Server Result Error.',
|
||||
'deleteConfirmTips': 'Are you sure you want to delete?'
|
||||
},
|
||||
|
||||
'insertvideo':{
|
||||
@ -346,6 +350,7 @@ UE.I18N['en'] = {
|
||||
'lang_tab_insertV':"Video",
|
||||
'lang_tab_searchV':"Search",
|
||||
'lang_tab_uploadV':"Upload",
|
||||
'lang_tab_onlineV':"Online",
|
||||
'lang_video_url':" URL ",
|
||||
'lang_video_size':"Video Size",
|
||||
'lang_videoW':"Width",
|
||||
@ -363,7 +368,8 @@ UE.I18N['en'] = {
|
||||
'lang_upload_width':"Width",
|
||||
'lang_upload_height':"Height",
|
||||
'lang_upload_alignment':"Alignment",
|
||||
'lang_format_advice':"Recommends mp4 format."
|
||||
'lang_format_advice':"Recommends mp4 format.",
|
||||
'lang_input_search':'Search'
|
||||
},
|
||||
'numError':"Please enter the correct Num. e.g 123,400",
|
||||
'floatLeft':"Float left",
|
||||
@ -424,7 +430,8 @@ UE.I18N['en'] = {
|
||||
'errorInterrupt':'File Upload Interrupted',
|
||||
'errorUploadRetry':'Upload Error, Please Retry.',
|
||||
'errorHttp':'Http Error',
|
||||
'errorServerUpload':'Server Result Error.'
|
||||
'errorServerUpload':'Server Result Error.',
|
||||
'deleteConfirmTips': 'Are you sure you want to delete?'
|
||||
},
|
||||
'webapp':{
|
||||
'tip1':"This function provided by Baidu APP,please apply for baidu APPKey webmaster first!",
|
||||
|
||||
@ -277,7 +277,8 @@ UE.I18N['zh-cn'] = {
|
||||
'noneAlign':{'title':'无浮动'},
|
||||
'leftAlign':{'title':'左浮动'},
|
||||
'rightAlign':{'title':'右浮动'},
|
||||
'centerAlign':{'title':'居中独占一行'}
|
||||
'centerAlign':{'title':'居中独占一行'},
|
||||
'lang_input_search':'搜索'
|
||||
},
|
||||
'uploadSelectFile':'点击选择图片',
|
||||
'uploadAddFile':'继续添加',
|
||||
@ -308,14 +309,16 @@ UE.I18N['zh-cn'] = {
|
||||
'imageLoadError':"图片加载失败!请检查链接地址或网络状态!",
|
||||
'searchRemind':"请输入搜索关键词",
|
||||
'searchLoading':"图片加载中,请稍后……",
|
||||
'searchRetry':" :( ,抱歉,没有找到图片!请重试一次!"
|
||||
'searchRetry':" :( ,抱歉,没有找到图片!请重试一次!",
|
||||
'deleteConfirmTips': '确定要删除吗?'
|
||||
},
|
||||
'attachment':{
|
||||
'static':{
|
||||
'lang_tab_upload': '上传附件',
|
||||
'lang_tab_online': '在线附件',
|
||||
'lang_start_upload':"开始上传",
|
||||
'lang_drop_remind':"可以将文件拖到这里,单次最多可选100个文件"
|
||||
'lang_drop_remind':"可以将文件拖到这里,单次最多可选100个文件",
|
||||
'lang_input_search':'搜索'
|
||||
},
|
||||
'uploadSelectFile':'点击选择文件',
|
||||
'uploadAddFile':'继续添加',
|
||||
@ -338,7 +341,8 @@ UE.I18N['zh-cn'] = {
|
||||
'errorInterrupt':'文件传输中断',
|
||||
'errorUploadRetry':'上传失败,请重试',
|
||||
'errorHttp':'http请求错误',
|
||||
'errorServerUpload':'服务器返回出错'
|
||||
'errorServerUpload':'服务器返回出错',
|
||||
'deleteConfirmTips': '确定要删除吗?'
|
||||
},
|
||||
'insertvideo':{
|
||||
'static':{
|
||||
@ -363,8 +367,8 @@ UE.I18N['zh-cn'] = {
|
||||
'lang_upload_width':"宽度",
|
||||
'lang_upload_height':"高度",
|
||||
'lang_upload_alignment':"对齐方式",
|
||||
'lang_format_advice':"建议使用mp4格式."
|
||||
|
||||
'lang_format_advice':"建议使用mp4格式.",
|
||||
'lang_input_search':'搜索'
|
||||
},
|
||||
'numError':"请输入正确的数值,如123,400",
|
||||
'floatLeft':"左浮动",
|
||||
@ -425,7 +429,8 @@ UE.I18N['zh-cn'] = {
|
||||
'errorInterrupt':'文件传输中断',
|
||||
'errorUploadRetry':'上传失败,请重试',
|
||||
'errorHttp':'http请求错误',
|
||||
'errorServerUpload':'服务器返回出错'
|
||||
'errorServerUpload':'服务器返回出错',
|
||||
'deleteConfirmTips': '确定要删除吗?'
|
||||
},
|
||||
'webapp':{
|
||||
'tip1':"本功能由百度APP提供,如看到此页面,请各位站长首先申请百度APPKey!",
|
||||
|
||||
@ -20,6 +20,8 @@
|
||||
* window.UEDITOR_HOME_URL = "/xxxx/xxxx/";
|
||||
*/
|
||||
var URL = window.UEDITOR_HOME_URL || getUEBasePath();
|
||||
// 默认语言
|
||||
var lang = (window['lang_multilingual_default_code'] || 'zh-cn') == 'en' ? 'en' : 'zh-cn';
|
||||
|
||||
/**
|
||||
* 服务器地址
|
||||
@ -57,7 +59,7 @@
|
||||
|
||||
//语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换,当然,前提条件是lang文件夹下存在对应的语言文件:
|
||||
//lang值也可以通过自动获取 (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase()
|
||||
//,lang:"zh-cn"
|
||||
,lang:lang
|
||||
//,langPath:URL +"lang/"
|
||||
|
||||
//主题配置项,默认是default。有需要的话也可以使用如下这样的方式来自动多主题切换,当然,前提条件是themes文件夹下存在对应的主题文件:
|
||||
|
||||
@ -92,7 +92,7 @@ $(function()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -114,7 +114,7 @@ $(function()
|
||||
if(max > 0 && temp_stock > max)
|
||||
{
|
||||
$input.val(max);
|
||||
Prompt((lang_goods_stock_max_tips || '最大限购数量')+max+unit);
|
||||
Prompt((window['lang_goods_stock_max_tips'] || '最大限购数量')+max+unit);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
@ -122,7 +122,7 @@ $(function()
|
||||
if(temp_stock < min)
|
||||
{
|
||||
$input.val(min);
|
||||
Prompt((lang_goods_stock_min_tips || '最低起购数量')+min+unit);
|
||||
Prompt((window['lang_goods_stock_min_tips'] || '最低起购数量')+min+unit);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -160,10 +160,10 @@ $(function()
|
||||
{
|
||||
if($(this).find('input').is(':checked'))
|
||||
{
|
||||
$(this).find('span.el-text').text(lang_select_reverse_name || '反选');
|
||||
$(this).find('span.el-text').text(window['lang_select_reverse_name'] || '反选');
|
||||
$('.am-table').find('input[type="checkbox"]').not(':disabled').uCheck('check');
|
||||
} else {
|
||||
$(this).find('span.el-text').text(lang_select_all_name || '全选');
|
||||
$(this).find('span.el-text').text(window['lang_select_all_name'] || '全选');
|
||||
$('.am-table').find('input[type="checkbox"]').not(':disabled').uCheck('uncheck');
|
||||
}
|
||||
|
||||
@ -217,7 +217,7 @@ $(function()
|
||||
var ids = $(this).parents('form').find('input[name="ids"]').val() || 0;
|
||||
if(ids == 0)
|
||||
{
|
||||
Prompt(lang_goods_no_choice_tips || '请选择商品');
|
||||
Prompt(window['lang_goods_no_choice_tips'] || '请选择商品');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
@ -31,7 +31,7 @@ function GoodsCommentsHtml(page)
|
||||
if((page || 1) <= 1)
|
||||
{
|
||||
$('.goods-page-no-data').removeClass('none');
|
||||
$('.goods-page-no-data span').text(lang_loading_tips || '加载中...');
|
||||
$('.goods-page-no-data span').text(window['lang_loading_tips'] || '加载中...');
|
||||
} else {
|
||||
$('.goods-page-no-data').addClass('none');
|
||||
}
|
||||
@ -54,13 +54,13 @@ function GoodsCommentsHtml(page)
|
||||
if($('.goods-comment-content article').length <= 0)
|
||||
{
|
||||
$('.goods-page-no-data').removeClass('none');
|
||||
$('.goods-page-no-data span').text(lang_comment_no_data_tips || '没有评论数据');
|
||||
$('.goods-page-no-data span').text(window['lang_comment_no_data_tips'] || '没有评论数据');
|
||||
}
|
||||
},
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$('.goods-page-no-data').removeClass('none');
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -111,17 +111,17 @@ function BuyCartCheck(e)
|
||||
var unit = $('.stock-tips .stock').data('unit') || '';
|
||||
if(stock < min)
|
||||
{
|
||||
Prompt((lang_goods_stock_min_tips || '最低起购数量')+min+unit);
|
||||
Prompt((window['lang_goods_stock_min_tips'] || '最低起购数量')+min+unit);
|
||||
return false;
|
||||
}
|
||||
if(max > 0 && stock > max)
|
||||
{
|
||||
Prompt((lang_goods_stock_max_tips || '最大限购数量')+max+unit);
|
||||
Prompt((window['lang_goods_stock_max_tips'] || '最大限购数量')+max+unit);
|
||||
return false;
|
||||
}
|
||||
if(stock > inventory)
|
||||
{
|
||||
Prompt((lang_goods_inventory_number_tips || '库存数量')+inventory+unit);
|
||||
Prompt((window['lang_goods_inventory_number_tips'] || '库存数量')+inventory+unit);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ function BuyCartCheck(e)
|
||||
$(this).addClass('sku-not-active');
|
||||
}
|
||||
});
|
||||
Prompt(lang_goods_no_choice_spec_tips || '请选择规格');
|
||||
Prompt(window['lang_goods_no_choice_spec_tips'] || '请选择规格');
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -196,7 +196,7 @@ function BuyCartHandle(e)
|
||||
|
||||
// 默认
|
||||
default :
|
||||
Prompt(lang_operate_params_error || '操作参数配置有误');
|
||||
Prompt(window['lang_operate_params_error'] || '操作参数配置有误');
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -296,7 +296,7 @@ function GoodsSpecDetail()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -377,7 +377,7 @@ function GoodsSpecType()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -464,7 +464,7 @@ function GoodsNumberChange()
|
||||
error: function(xhr, type)
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -656,7 +656,7 @@ $(function() {
|
||||
{
|
||||
$.AMUI.progress.done();
|
||||
PoptitClose();
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -734,13 +734,13 @@ $(function() {
|
||||
if(max > 0 && stock > max)
|
||||
{
|
||||
$input.val(max);
|
||||
Prompt((lang_goods_stock_max_tips || '最大限购数量')+max+unit);
|
||||
Prompt((window['lang_goods_stock_max_tips'] || '最大限购数量')+max+unit);
|
||||
return false;
|
||||
}
|
||||
if(stock > inventory)
|
||||
{
|
||||
$input.val(min);
|
||||
Prompt((lang_goods_inventory_number_tips || '库存数量')+inventory+unit);
|
||||
Prompt((window['lang_goods_inventory_number_tips'] || '库存数量')+inventory+unit);
|
||||
return false;
|
||||
}
|
||||
$input.val(stock);
|
||||
@ -755,7 +755,7 @@ $(function() {
|
||||
if(value < min)
|
||||
{
|
||||
$input.val(min);
|
||||
Prompt((lang_goods_stock_min_tips || '最低起购数量')+min+unit);
|
||||
Prompt((window['lang_goods_stock_min_tips'] || '最低起购数量')+min+unit);
|
||||
return false;
|
||||
}
|
||||
$input.val(value);
|
||||
|
||||
@ -34,7 +34,7 @@ $(function()
|
||||
},
|
||||
error: function(xhr, type)
|
||||
{
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
}, 2000);
|
||||
|
||||
@ -89,7 +89,7 @@ $(function()
|
||||
{
|
||||
$('.verify-submit-win').button('reset');
|
||||
}
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -183,7 +183,7 @@ $(function()
|
||||
{
|
||||
$('.verify-submit-win-new').button('reset');
|
||||
}
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
@ -125,7 +125,7 @@ $(function()
|
||||
{
|
||||
$('.verify-submit-win').button('reset');
|
||||
}
|
||||
Prompt(HtmlToString(xhr.responseText) || (lang_error_text || '异常错误'), null, 30);
|
||||
Prompt(HtmlToString(xhr.responseText) || (window['lang_error_text'] || '异常错误'), null, 30);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user