提交 5aff3c69 编写于 作者: NoSubject's avatar NoSubject

英文语言包支持,修改语言包使用模式

上级 1c01cc0e
......@@ -41,6 +41,8 @@ var git = require('gulp-git');
// "windows": "/build/windows.tar.gz"
// };
var supportedLanguage = ["zh-cn", "en"];
var downloadHost = "git.o2oa.net";
var protocol = "https";
var commonUrl = "/o2oa/evn-o2server-commons/-/archive/master/evn-o2server-commons-master.tar.gz?path=commons";
......@@ -710,10 +712,46 @@ function build_concat_basework_clean(cb) {
return del(dest, cb);
}
// function build_concat_lp() {
var lpTasks = {};
supportedLanguage.forEach(function(lp){
var src = [
'o2web/source/o2_core/o2/lp/'+(lp)+'.js',
'o2web/source/x_component_process_Work/lp/'+(lp)+'.js',
'o2web/source/x_component_process_Xform/lp/'+(lp)+'.js',
'o2web/source/x_component_Selector/lp/'+(lp)+'.js',
'o2web/source/x_component_Template/lp/'+(lp)+'.js',
'o2web/source/x_component_portal_Portal/lp/'+(lp)+'.js',
'o2web/source/x_component_cms_Document/lp/'+(lp)+'.js',
'o2web/source/x_component_cms_Xform/lp/'+(lp)+'.js',
];
var dest = 'target/o2server/servers/webServer/x_desktop/js/';
lpTasks["build_concat_lp_"+lp] = function(){
return gulp.src(src, {"allowEmpty": true})
.pipe(sourceMap.init())
.pipe(concat('base_lp_' + lp + '.js'))
.pipe(gulp.dest(dest))
.pipe(concat('base_lp_' + lp + '.min.js'))
.pipe(uglify())
//.pipe(rename({ extname: '.min.js' }))
.pipe(sourceMap.write(""))
.pipe(gulp.dest(dest));
};
});
var build_concat_lp = gulp.parallel( Object.values(lpTasks) );
// return gulp.parallel(lpTasks);
// }
function build_concat_basework_body() {
var src = [
'o2web/source/x_desktop/js/base_concat_head.js',
'o2web/source/o2_core/o2/lp/'+(options.lp || 'zh-cn')+'.js',
//'o2web/source/o2_core/o2/lp/'+(options.lp || 'zh-cn')+'.js',
'o2web/source/x_desktop/js/base_work_style_temp.js',
......@@ -735,10 +773,10 @@ function build_concat_basework_body() {
'o2web/source/o2_core/o2/xDesktop/Window.js',
'o2web/source/x_component_Common/Main.js',
'o2web/source/o2_core/o2/lp/'+(options.lp || 'zh-cn')+'.js',
'o2web/source/x_component_process_Work/lp/'+(options.lp || 'zh-cn')+'.js',
'o2web/source/x_component_process_Xform/lp/'+(options.lp || 'zh-cn')+'.js',
'o2web/source/x_component_Selector/lp/'+(options.lp || 'zh-cn')+'.js',
// 'o2web/source/o2_core/o2/lp/'+(options.lp || 'zh-cn')+'.js',
// 'o2web/source/x_component_process_Work/lp/'+(options.lp || 'zh-cn')+'.js',
// 'o2web/source/x_component_process_Xform/lp/'+(options.lp || 'zh-cn')+'.js',
// 'o2web/source/x_component_Selector/lp/'+(options.lp || 'zh-cn')+'.js',
'o2web/source/x_component_process_Work/Main.js',
'o2web/source/x_component_Selector/package.js',
......@@ -820,7 +858,7 @@ function build_concat_baseportal_clean(cb) {
function build_concat_baseportal_body() {
var src = [
'o2web/source/x_desktop/js/base_concat_head.js',
'o2web/source/o2_core/o2/lp/'+(options.lp || 'zh-cn')+'.js',
//'o2web/source/o2_core/o2/lp/'+(options.lp || 'zh-cn')+'.js',
'o2web/source/x_desktop/js/base_portal_style_temp.js',
......@@ -842,10 +880,10 @@ function build_concat_baseportal_body() {
'o2web/source/x_component_Common/Main.js',
'o2web/source/x_component_process_Work/lp/'+(options.lp || 'zh-cn')+'.js',
'o2web/source/x_component_portal_Portal/lp/'+(options.lp || 'zh-cn')+'.js',
'o2web/source/x_component_process_Xform/lp/'+(options.lp || 'zh-cn')+'.js',
'o2web/source/x_component_Selector/lp/'+(options.lp || 'zh-cn')+'.js',
// 'o2web/source/x_component_process_Work/lp/'+(options.lp || 'zh-cn')+'.js',
// 'o2web/source/x_component_portal_Portal/lp/'+(options.lp || 'zh-cn')+'.js',
// 'o2web/source/x_component_process_Xform/lp/'+(options.lp || 'zh-cn')+'.js',
// 'o2web/source/x_component_Selector/lp/'+(options.lp || 'zh-cn')+'.js',
'o2web/source/x_component_portal_Portal/Main.js',
......@@ -923,7 +961,7 @@ function build_concat_basedocument_clean(cb) {
function build_concat_basedocument_body() {
var src = [
'o2web/source/x_desktop/js/base_concat_head.js',
'o2web/source/o2_core/o2/lp/'+(options.lp || 'zh-cn')+'.js',
//'o2web/source/o2_core/o2/lp/'+(options.lp || 'zh-cn')+'.js',
'o2web/source/x_desktop/js/base_document_style_temp.js',
......@@ -945,10 +983,10 @@ function build_concat_basedocument_body() {
'o2web/source/x_component_Common/Main.js',
'o2web/source/x_component_cms_Document/lp/'+(options.lp || 'zh-cn')+'.js',
'o2web/source/x_component_process_Xform/lp/'+(options.lp || 'zh-cn')+'.js',
'o2web/source/x_component_Selector/lp/'+(options.lp || 'zh-cn')+'.js',
'o2web/source/x_component_cms_Xform/lp/'+(options.lp || 'zh-cn')+'.js',
// 'o2web/source/x_component_cms_Document/lp/'+(options.lp || 'zh-cn')+'.js',
// 'o2web/source/x_component_process_Xform/lp/'+(options.lp || 'zh-cn')+'.js',
// 'o2web/source/x_component_Selector/lp/'+(options.lp || 'zh-cn')+'.js',
// 'o2web/source/x_component_cms_Xform/lp/'+(options.lp || 'zh-cn')+'.js',
'o2web/source/x_component_cms_Document/Main.js',
......@@ -987,6 +1025,7 @@ exports.build_concat = gulp.parallel(
build_concat_xform,
build_concat_cms_xform,
build_bundle,
build_concat_lp,
gulp.series(build_concat_basework_style, build_concat_basework_action, build_concat_basework_body,build_concat_basework_clean),
gulp.series(build_concat_baseportal_style, build_concat_baseportal_action, build_concat_baseportal_body,build_concat_baseportal_clean),
gulp.series(build_concat_basedocument_style, build_concat_basedocument_action, build_concat_basedocument_body,build_concat_basedocument_clean)
......@@ -1146,6 +1185,7 @@ exports.build_web = gulp.series(
build_concat_desktop,
build_concat_xform,
build_concat_cms_xform,
build_concat_lp,
gulp.series(build_concat_basework_style, build_concat_basework_action, build_concat_basework_body,build_concat_basework_clean),
gulp.series(build_concat_baseportal_style, build_concat_baseportal_action, build_concat_baseportal_body,build_concat_baseportal_clean),
gulp.series(build_concat_basedocument_style, build_concat_basedocument_action, build_concat_basedocument_body,build_concat_basedocument_clean),
......
......@@ -23,6 +23,8 @@ var assetRev = require('gulp-tm-asset-rev');
var apps = require('./gulpapps.js');
var ftpconfig = require('./gulpconfig.js');
var supportedLanguage = ["zh-cn", "en"];
var o_options = minimist(process.argv.slice(2), {//upload: local ftp or sftp
string: ["ev", "upload", "location", "host", "user", "pass", "port", "remotePath", "dest", "src", "lp"]
});
......@@ -595,10 +597,10 @@ function createBaseWorkConcatBodyTask(path, isMin, thisOptions) {
var option = thisOptions || options;
var src = [
'source/' + path + '/js/base_concat_head.js',
'source/o2_core/o2/lp/'+(option.lp || 'zh-cn')+'.js',
'source/x_component_process_Work/lp/'+(option.lp || 'zh-cn')+'.js',
'source/x_component_process_Xform/lp/'+(option.lp || 'zh-cn')+'.js',
'source/x_component_Selector/lp/'+(option.lp || 'zh-cn')+'.js',
// 'source/o2_core/o2/lp/'+(option.lp || 'zh-cn')+'.js',
// 'source/x_component_process_Work/lp/'+(option.lp || 'zh-cn')+'.js',
// 'source/x_component_process_Xform/lp/'+(option.lp || 'zh-cn')+'.js',
// 'source/x_component_Selector/lp/'+(option.lp || 'zh-cn')+'.js',
'source/' + path + '/js/base_work_style_temp.js',
......@@ -667,8 +669,63 @@ function createBaseWorkConcatBodyTask(path, isMin, thisOptions) {
})))
.pipe(gulp.dest(dest))
.pipe(uglify())
.pipe(concat('js/base_work.min.js'))
.pipe(uglify())
.pipe( sourceMap.write("") )
.pipe(gulpif((option.upload == 'local' && option.location != ''), gulp.dest(option.location + path + '/')))
.pipe(gulpif((option.upload == 'ftp' && option.host != ''), ftp({
host: option.host,
user: option.user || 'anonymous',
pass: option.pass || '@anonymous',
port: option.port || 21,
remotePath: (option.remotePath || '/') + path
})))
.pipe(gulpif((option.upload == 'sftp' && option.host != ''), sftp({
host: option.host,
user: option.user || 'anonymous',
pass: option.pass || null,
port: option.port || 22,
remotePath: (option.remotePath || '/') + path
})))
.pipe(gulp.dest(dest))
});
}
function createBaseWorkConcatLanguageTask(path, thisOptions, language){
gulp.task(path+".base_lp : "+language, function(){
var option = thisOptions || options;
var src = [
'source/o2_core/o2/lp/'+(language)+'.js',
'source/x_component_process_Work/lp/'+(language)+'.js',
'source/x_component_process_Xform/lp/'+(language)+'.js',
'source/x_component_Selector/lp/'+(language)+'.js',
'source/x_component_Template/lp/'+(language)+'.js',
'source/x_component_portal_Portal/lp/'+(language)+'.js',
'source/x_component_cms_Document/lp/'+(language)+'.js',
'source/x_component_cms_Xform/lp/'+(language)+'.js',
];
var dest = option.dest+'/' + path + '/';
return gulp.src(src, {allowEmpty: true})
.pipe(sourceMap.init())
.pipe(concat('js/base_lp_'+language+'.js'))
.pipe(gulpif((option.upload == 'local' && option.location != ''), gulp.dest(option.location + path + '/')))
.pipe(gulpif((option.upload == 'ftp' && option.host != ''), ftp({
host: option.host,
user: option.user || 'anonymous',
pass: option.pass || '@anonymous',
port: option.port || 21,
remotePath: (option.remotePath || '/') + path
})))
.pipe(gulpif((option.upload == 'sftp' && option.host != ''), sftp({
host: option.host,
user: option.user || 'anonymous',
pass: option.pass || null,
port: option.port || 22,
remotePath: (option.remotePath || '/') + path
})))
.pipe(gulp.dest(dest))
.pipe(uglify())
.pipe(concat('js/base_lp_'+language+'.min.js'))
.pipe( sourceMap.write("") )
.pipe(gulpif((option.upload == 'local' && option.location != ''), gulp.dest(option.location + path + '/')))
.pipe(gulpif((option.upload == 'ftp' && option.host != ''), ftp({
......@@ -693,7 +750,7 @@ function createBaseWorkConcatTask(path, isMin, thisOptions){
createBaseWorkConcatStyleTask(path);
createBaseWorkConcatBodyTask(path, isMin, thisOptions);
createBaseWorkConcatDelTempTask(path);
gulp.task( path+".base_work", gulp.series(path+".base_work : action", path+".base_work : style", path+".base_work : concat", path+".base_work : clean"));
gulp.task( path+".base_work", gulp.series(path+".base_work : action", path+".base_work : style", path+".base_work : concat", lpTasks, path+".base_work : clean"));
}
function createBasePortalConcatStyleTask(path){
......@@ -743,7 +800,7 @@ function createBasePortalConcatBodyTask(path, isMin, thisOptions) {
var option = thisOptions || options;
var src = [
'source/' + path + '/js/base_concat_head.js',
'source/o2_core/o2/lp/'+(option.lp || 'zh-cn')+'.js',
//'source/o2_core/o2/lp/'+(option.lp || 'zh-cn')+'.js',
'source/' + path + '/js/base_portal_style_temp.js',
......@@ -765,10 +822,10 @@ function createBasePortalConcatBodyTask(path, isMin, thisOptions) {
'source/x_component_Common/Main.js',
'source/x_component_process_Work/lp/'+(option.lp || 'zh-cn')+'.js',
'source/x_component_portal_Portal/lp/'+(option.lp || 'zh-cn')+'.js',
'source/x_component_process_Xform/lp/'+(option.lp || 'zh-cn')+'.js',
'source/x_component_Selector/lp/'+(option.lp || 'zh-cn')+'.js',
// 'source/x_component_process_Work/lp/'+(option.lp || 'zh-cn')+'.js',
// 'source/x_component_portal_Portal/lp/'+(option.lp || 'zh-cn')+'.js',
// 'source/x_component_process_Xform/lp/'+(option.lp || 'zh-cn')+'.js',
// 'source/x_component_Selector/lp/'+(option.lp || 'zh-cn')+'.js',
'source/x_component_portal_Portal/Main.js',
......@@ -846,7 +903,7 @@ function createBasePortalConcatTask(path, isMin, thisOptions){
createBasePortalConcatStyleTask(path);
createBasePortalConcatBodyTask(path, isMin, thisOptions);
createBasePortalConcatDelTempTask(path);
gulp.task( path+".base_portal", gulp.series(path+".base_portal : action", path+".base_portal : style", path+".base_portal : concat", path+".base_portal : clean"));
gulp.task( path+".base_portal", gulp.series(path+".base_portal : action", path+".base_portal : style", path+".base_portal : concat", lpTasks, path+".base_portal : clean"));
}
......@@ -883,7 +940,7 @@ function createBaseDocumentConcatBodyTask(path, isMin, thisOptions) {
var option = thisOptions || options;
var src = [
'source/' + path + '/js/base_concat_head.js',
'source/o2_core/o2/lp/'+(option.lp || 'zh-cn')+'.js',
//'source/o2_core/o2/lp/'+(option.lp || 'zh-cn')+'.js',
'source/' + path + '/js/base_document_style_temp.js',
......@@ -905,10 +962,10 @@ function createBaseDocumentConcatBodyTask(path, isMin, thisOptions) {
'source/x_component_Common/Main.js',
'source/x_component_cms_Document/lp/'+(option.lp || 'zh-cn')+'.js',
'source/x_component_process_Xform/lp/'+(option.lp || 'zh-cn')+'.js',
'source/x_component_Selector/lp/'+(option.lp || 'zh-cn')+'.js',
'source/x_component_cms_Xform/lp/'+(option.lp || 'zh-cn')+'.js',
// 'source/x_component_cms_Document/lp/'+(option.lp || 'zh-cn')+'.js',
// 'source/x_component_process_Xform/lp/'+(option.lp || 'zh-cn')+'.js',
// 'source/x_component_Selector/lp/'+(option.lp || 'zh-cn')+'.js',
// 'source/x_component_cms_Xform/lp/'+(option.lp || 'zh-cn')+'.js',
'source/x_component_cms_Document/Main.js',
......@@ -987,7 +1044,7 @@ function createBaseDocumentConcatTask(path, isMin, thisOptions){
createBaseDocumentConcatStyleTask(path);
createBaseDocumentConcatBodyTask(path, isMin, thisOptions);
createBaseDocumentConcatDelTempTask(path);
gulp.task( path+".base_document", gulp.series(path+".base_document : action", path+".base_document : style", path+".base_document : concat", path+".base_document : clean"));
gulp.task( path+".base_document", gulp.series(path+".base_document : action", path+".base_document : style", path+".base_document : concat", lpTasks, path+".base_document : clean"));
}
......@@ -1043,6 +1100,7 @@ function createBaseConcatTask(path, isMin, thisOptions){
});
}
var lpTasks = [];
function getAppTask(path, isMin, thisOptions) {
if (path==="x_component_process_Xform") {
createDefaultTask(path, isMin, thisOptions);
......@@ -1058,6 +1116,12 @@ function getAppTask(path, isMin, thisOptions) {
return gulp.series(path, path+" : concat", path+".xDesktop : concat", path+" : bundle");
}else if (path==="x_desktop") {
createDefaultTask(path, isMin, thisOptions);
supportedLanguage.forEach(function(lp){
createBaseWorkConcatLanguageTask(path, thisOptions, lp);
lpTasks.push(path+".base_lp : "+lp);
})
createBaseWorkConcatTask(path, isMin, thisOptions);
createBasePortalConcatTask(path, isMin, thisOptions);
createBaseDocumentConcatTask(path, isMin, thisOptions);
......
......@@ -164,11 +164,16 @@ MWF.xDesktop.Authentication.LoginForm = new Class({
"hasBottom": false,
"hasScroll": false,
"hasMark": false,
"title": (layout.config && (layout.config.systemTitle || layout.config.title)) ? (layout.config.title || layout.config.systemTitle) : MWF.LP.authentication.LoginFormTitle,
"title": "",
"draggable": true,
"closeAction": true
},
load: function () {
this.setOptions({
"title": (layout.config && (layout.config.systemTitle || layout.config.title)) ? (layout.config.title || layout.config.systemTitle) : MWF.LP.authentication.LoginFormTitle
});
this._loadCss();
},
//Camera Login
_createTopContent: function () {
this.actions = MWF.Actions.get("x_organization_assemble_authentication");
......@@ -1162,10 +1167,16 @@ MWF.xDesktop.Authentication.SignUpForm = new Class({
"hasTopIcon": true,
"hasTopContent": true,
"hasBottom": false,
"title": MWF.LP.authentication.SignUpFormTitle,
"title": "",
"draggable": true,
"closeAction": true
},
load: function () {
if (!this.options.title) this.setOptions({
"title": MWF.LP.authentication.SignUpFormTitle
});
this._loadCss();
},
_createTableContent: function () {
var self = this;
......@@ -1648,10 +1659,16 @@ MWF.xDesktop.Authentication.ResetPasswordForm = new Class({
"hasTopIcon": true,
"hasTopContent": true,
"hasBottom": false,
"title": MWF.LP.authentication.ResetPasswordFormTitle,
"title": "",
"draggable": true,
"closeAction": true
},
load: function () {
if (!this.options.title) this.setOptions({
"title": MWF.LP.authentication.ResetPasswordFormTitle
});
this._loadCss();
},
_createTopContent: function () {
this.actions = MWF.Actions.get("x_organization_assemble_personal");
......@@ -2102,11 +2119,17 @@ MWF.xDesktop.Authentication.ChangePasswordForm = new Class({
"hasBottom": false,
"hasScroll": false,
"hasMark": false,
"title": MWF.LP.authentication.ChangePasswordFormTitle,
"title": "",
"draggable": true,
"closeAction": true,
"userName" : ""
},
load: function () {
if (!this.options.title) this.setOptions({
"title": MWF.LP.authentication.ChangePasswordFormTitle
});
this._loadCss();
},
_createTableContent: function () {
var self = this;
......
......@@ -786,3 +786,11 @@ MWF.org = {
}
}
};
//var lp = o2.session.path + "/lp/" + o2.language + ".js";
// var lp = "../x_desktop/js/base_lp_" + o2.language +((o2.session.isDebugger) ? "" : ".min")+ ".js";
// if (!o2.LP){
// new Request({
// "url": lp,
// "method": "get"
// }).send();
// }
......@@ -5,11 +5,14 @@ MWF.xApplication.Selector.Application = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectAppliction,
"title": "",
"values": [],
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
if (!this.options.title) this.setOptions({"title": MWF.xApplication.Selector.LP.selectAppliction});
},
_init : function(){
this.selectType = "application";
this.className = "Application"
......
......@@ -5,12 +5,15 @@ MWF.xApplication.Selector.CMSApplication = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectCMSApplication,
"title": "",
"values": [],
"names": [],
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
if (!this.options.title) this.setOptions({"title": MWF.xApplication.Selector.LP.selectCMSApplication});
},
_init : function(){
this.selectType = "application";
this.className = "CMSApplication"
......
......@@ -5,12 +5,15 @@ MWF.xApplication.Selector.CMSCategory = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectCMSCategory,
"title": "",
"values": [],
"names": [],
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
if (!this.options.title) this.setOptions({"title": MWF.xApplication.Selector.LP.selectCMSCategory});
},
_init : function(){
this.selectType = "cmscategory";
this.className = "CMSCategory"
......
......@@ -5,7 +5,7 @@ MWF.xApplication.Selector.CMSFormField = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectField,
"title": "",
"fieldType": "",
"values": [],
"names": [],
......@@ -14,6 +14,9 @@ MWF.xApplication.Selector.CMSFormField = new Class({
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
if (!this.options.title) this.setOptions({"title": MWF.xApplication.Selector.LP.selectField});
},
_init : function(){
this.selectType = "formfield";
this.className = "CMSFormField";
......
......@@ -5,12 +5,15 @@ MWF.xApplication.Selector.CMSView = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectView,
"title": "",
"values": [],
"names": [],
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
if (!this.options.title) this.setOptions({"title": MWF.xApplication.Selector.LP.selectView});
},
_init : function(){
this.selectType = "cmsview";
this.className = "CMSView";
......
......@@ -5,13 +5,16 @@ MWF.xApplication.Selector.Dictionary = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectDictionary,
"title": "",
"values": [],
"names": [],
"appType" : ["process","cms"],
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
if (!this.options.title) this.setOptions({"title": MWF.xApplication.Selector.LP.selectDictionary});
},
_init : function(){
this.selectType = "dictionary";
this.className = "Dictionary";
......
......@@ -5,10 +5,13 @@ MWF.xApplication.Selector.Duty = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectDuty,
"title": "",
"values": [],
"expand": false
},
setInitTitle: function(){
if (!this.options.title) this.setOptions({"title": MWF.xApplication.Selector.LP.selectDuty});
},
_init : function(){
this.selectType = "duty";
this.className = "Duty";
......
......@@ -5,7 +5,7 @@ MWF.xApplication.Selector.FormField = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectField,
"title": "",
"fieldType": "",
"values": [],
"application": "",
......@@ -13,6 +13,9 @@ MWF.xApplication.Selector.FormField = new Class({
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
if (!this.options.title) this.setOptions({"title": MWF.xApplication.Selector.LP.selectField});
},
_init : function(){
this.selectType = "formfield";
this.className = "FormField";
......
......@@ -5,13 +5,16 @@ MWF.xApplication.Selector.FormStyle = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectFormStyle,
"title": "",
"values": [],
"names": [],
"expand": false,
"mode" : "pc",
"forceSearchInItem" : true
},
setInitTitle: function(){
if (!this.options.title) this.setOptions({"title": MWF.xApplication.Selector.LP.selectFormStyle});
},
_init : function(){
this.selectType = "formstyle";
this.className = "FormStyle";
......
......@@ -4,7 +4,7 @@ MWF.xApplication.Selector.Group = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectGroup,
"title": "",
"groups": [],
"roles": [],
"values": [],
......@@ -12,6 +12,9 @@ MWF.xApplication.Selector.Group = new Class({
"include" : [],
"selectType" : "group"
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectGroup});
},
_init : function(){
this.selectType = "group";
this.className = "Group";
......@@ -214,4 +217,4 @@ MWF.xApplication.Selector.Group.Filter = new Class({
}
return result;
}
});
\ No newline at end of file
});
......@@ -5,7 +5,7 @@ MWF.xApplication.Selector.Identity = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectIdentity,
"title": "",
"units": [],
"values": [],
"dutys": [],
......@@ -18,6 +18,9 @@ MWF.xApplication.Selector.Identity = new Class({
"expandSubEnable" : true, //是否允许展开下一层,
"selectAllEnable" : true //分类是否允许全选下一层
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectIdentity});
},
_init : function(){
this.selectType = "identity";
this.className = "Identity";
......
......@@ -5,7 +5,7 @@ MWF.xApplication.Selector.IdentityWidthDuty = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectIdentity,
"title": "",
"dutys": [],
"units": [],
"values": [],
......@@ -19,6 +19,9 @@ MWF.xApplication.Selector.IdentityWidthDuty = new Class({
"exclude" : [],
"selectType" : "identity"
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectIdentity});
},
_init : function(){
this.selectType = "identity";
this.className = "IdentityWidthDuty"
......@@ -570,4 +573,4 @@ MWF.xApplication.Selector.IdentityWidthDuty.Filter = new Class({
if (callback) callback(data);
}.bind(this));
}
});
\ No newline at end of file
});
......@@ -5,7 +5,7 @@ MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectIdentity,
"title": "",
"dutys": [],
"units": [],
"values": [],
......@@ -21,6 +21,9 @@ MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit = new Class({
"identitySortBy" : "identityNumber", //身份排序按身份排序号,还是传入的duty
"selectType": "identity"
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectIdentity});
},
_init: function () {
this.selectType = "identity";
this.className = "IdentityWidthDutyCategoryByUnit";
......@@ -752,4 +755,4 @@ MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit.ItemGroupCategory = ne
MWF.xApplication.Selector.IdentityWidthDutyCategoryByUnit.Filter = new Class({
Extends: MWF.xApplication.Selector.IdentityWidthDuty.Filter
});
\ No newline at end of file
});
......@@ -10,9 +10,10 @@ MWF.xApplication.Selector.Main = new Class({
"height": "700",
"isResize": false,
"isMax": false,
"title": MWF.xApplication.Selector.LP.title
"title": ""
},
onQueryLoad: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.title});
this.lp = MWF.xApplication.Selector.LP;
},
loadApplication: function(callback){
......@@ -96,4 +97,4 @@ MWF.xApplication.Selector.Main = new Class({
this.select(function(){layout.mobile = false;}.bind(this));
}
});
\ No newline at end of file
});
MWF.xApplication.Selector = MWF.xApplication.Selector || {};
MWF.xDesktop.requireApp("Selector", "lp."+MWF.language, null, false);
//MWF.xDesktop.requireApp("Selector", "lp."+MWF.language, null, false);
//MWF.xDesktop.requireApp("Selector", "Actions.RestActions", null, false);
MWF.xApplication.Selector.MultipleSelector = new Class({
Extends: MWF.widget.Common,
......@@ -9,7 +9,7 @@ MWF.xApplication.Selector.MultipleSelector = new Class({
"style": "default",
"types" : [],
"count": 0,
"title": MWF.xApplication.Selector.LP.multiSelectTitle,
"title": "",
"groups": [], //选person, group, role 时的范围
"roles": [], //选选person, group, role 时的范围
"units": [], //选 company, department, duty, identity 时的范围
......@@ -23,6 +23,7 @@ MWF.xApplication.Selector.MultipleSelector = new Class({
},
initialize: function(container, options){
this.active = true;
if (!options.title) options.title = MWF.xApplication.Selector.LP.multiSelectTitle;
this.setOptions(options);
this.path = "../x_component_Selector/$Selector/";
......@@ -829,4 +830,4 @@ MWF.xApplication.Selector.MultipleSelector.Filter = new Class({
if (callback) callback(this.filterData);
}
}
});
\ No newline at end of file
});
MWF.xApplication.Selector = MWF.xApplication.Selector || {};
MWF.xDesktop.requireApp("Selector", "lp."+MWF.language, null, false);
//MWF.xDesktop.requireApp("Selector", "lp."+MWF.language, null, false);
//MWF.xDesktop.requireApp("Selector", "Actions.RestActions", null, false);
MWF.xApplication.Selector.Person = new Class({
Extends: MWF.widget.Common,
......@@ -8,7 +8,7 @@ MWF.xApplication.Selector.Person = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectPerson,
"title": "",
"groups": [],
"roles": [],
"values": [],
......@@ -47,9 +47,14 @@ MWF.xApplication.Selector.Person = new Class({
"showEmptyText" : true
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectPerson});
},
initialize: function(container, options){
this.active = true;
this.setOptions(options);
if (!this.options.title) this.setInitTitle();
this.path = "../x_component_Selector/$Selector/";
this.cssPath = "../x_component_Selector/$Selector/"+this.options.style+"/css.wcss";
......
......@@ -5,12 +5,15 @@ MWF.xApplication.Selector.PlatApp = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectProcess,
"title": "",
"values": [],
"names": [],
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectProcess});
},
_init : function(){
this.selectType = "platApp";
this.className = "platApp";
......
......@@ -5,11 +5,14 @@ MWF.xApplication.Selector.Portal = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectApplication,
"title": "",
"values": [],
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectApplication});
},
_init : function(){
this.selectType = "portal";
this.className = "Portal";
......
......@@ -5,7 +5,7 @@ MWF.xApplication.Selector.PortalFile = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectFile,
"title": "",
"values": [],
"names": [],
"isImage": false,
......@@ -13,6 +13,9 @@ MWF.xApplication.Selector.PortalFile = new Class({
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectFile});
},
_init : function(){
this.selectType = "file";
this.className = "PortalFile";
......
......@@ -5,12 +5,15 @@ MWF.xApplication.Selector.Process = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectProcess,
"title": "",
"values": [],
"names": [],
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectProcess});
},
_init : function(){
this.selectType = "process";
this.className = "Process";
......
......@@ -5,12 +5,15 @@ MWF.xApplication.Selector.ProcessFile = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectFile,
"title": "",
"values": [],
"names": [],
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectFile});
},
_init : function(){
this.selectType = "file";
this.className = "ProcessFile";
......
......@@ -5,12 +5,15 @@ MWF.xApplication.Selector.Query = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectView,
"title": "",
"values": [],
"names": [],
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectView});
},
_init : function(){
this.selectType = "query";
this.className = "Query";
......
......@@ -5,12 +5,15 @@ MWF.xApplication.Selector.QueryStat = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectView,
"title": "",
"values": [],
"names": [],
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectView});
},
_init : function(){
this.selectType = "querystat";
this.className = "QueryStat";
......
......@@ -5,12 +5,15 @@ MWF.xApplication.Selector.QueryStatement = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectStatement,
"title": "",
"values": [],
"names": [],
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectStatement});
},
_init : function(){
this.selectType = "querystatement";
this.className = "QueryStatement";
......
......@@ -5,12 +5,15 @@ MWF.xApplication.Selector.QueryTable = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectTable,
"title": "",
"values": [],
"names": [],
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectTable});
},
_init : function(){
this.selectType = "querytable";
this.className = "QueryTable";
......
......@@ -5,12 +5,15 @@ MWF.xApplication.Selector.QueryView = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectView,
"title": "",
"values": [],
"names": [],
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectView});
},
_init : function(){
this.selectType = "queryview";
this.className = "QueryView";
......
......@@ -4,13 +4,16 @@ MWF.xApplication.Selector.Role = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectRole,
"title": "",
"groups": [],
"roles": [],
"values": [],
"names": [],
"selectType" : "role"
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectRole});
},
_init : function(){
this.selectType = "role";
this.className = "Role";
......
......@@ -5,13 +5,15 @@ MWF.xApplication.Selector.Script = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectScript,
"values": [],
"names": [],
"appType" : ["process","portal","cms"],
"expand": false,
"forceSearchInItem" : true
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectScript});
},
_init : function(){
this.selectType = "script";
this.className = "Script";
......
......@@ -5,7 +5,6 @@ MWF.xApplication.Selector.Unit = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectUnit,
"units": [],
//"unitTypes": [],
"values": [],
......@@ -16,6 +15,9 @@ MWF.xApplication.Selector.Unit = new Class({
"selectAllEnable" : true, //分类是否允许全选下一层
"selectType" : "unit"
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectUnit});
},
_init : function(){
this.selectType = "unit";
this.className = "Unit";
......@@ -938,4 +940,4 @@ MWF.xApplication.Selector.Unit.Filter = new Class({
if (callback) callback(data)
}.bind(this), null, key);
}
});
\ No newline at end of file
});
......@@ -5,7 +5,6 @@ MWF.xApplication.Selector.UnitWithType = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectUnit,
"units": [],
"unitType": "",
"values": [],
......@@ -16,6 +15,9 @@ MWF.xApplication.Selector.UnitWithType = new Class({
"expandSubEnable" : true, //是否允许展开下一层
"selectAllEnable" : true //分类是否允许全选下一层
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectUnit});
},
_init : function(){
this.selectType = "unit";
this.className = "UnitWithType";
......@@ -457,4 +459,4 @@ MWF.xApplication.Selector.UnitWithType.Filter = new Class({
}.bind(this), failure, key);
}
});
\ No newline at end of file
});
......@@ -5,11 +5,13 @@ MWF.xApplication.Selector.View = new Class({
options: {
"style": "default",
"count": 0,
"title": MWF.xApplication.Selector.LP.selectView,
"values": [],
"names": [],
"expand": false
},
setInitTitle: function(){
this.setOptions({"title": MWF.xApplication.Selector.LP.selectView});
},
_init : function(){
this.selectType = "view";
this.className = "View";
......
MWF.xApplication.Selector = MWF.xApplication.Selector || {};
MWF.xDesktop.requireApp("Selector", "lp."+MWF.language, null, false);
//MWF.xDesktop.requireApp("Selector", "lp."+MWF.language, null, false);
//MWF.xDesktop.requireApp("Selector", "Actions.RestActions", null, false);
o2.xApplication.Selector.package = MWF.O2Selector = new Class({
Implements: [Options],
options: {
"count": 0,
"type": "person",
"title": MWF.xApplication.Selector.LP.multiSelectTitle,
"title": "",
"groups": [],
"roles": [],
"units": [],
......@@ -19,6 +19,7 @@ o2.xApplication.Selector.package = MWF.O2Selector = new Class({
initialize: function(container, options, delayLoad){
//MWF.xDesktop.requireApp("Selector", "Actions.RestActions", null, false);
this.loading = true;
if (!options.title) options.title = MWF.xApplication.Selector.LP.multiSelectTitle;
this.setOptions(options);
this.container = container;
......
......@@ -2,7 +2,7 @@ MWF.xApplication.Template = MWF.xApplication.Template || {};
MWF.xApplication.Template.Explorer = MWF.xApplication.Template.Explorer || {};
MWF.require("MWF.widget.O2Identity", null, false);
MWF.xDesktop.requireApp("Template", "lp." + MWF.language, null, false);
//MWF.xDesktop.requireApp("Template", "lp." + MWF.language, null, false);
String.implement({
......@@ -1050,7 +1050,7 @@ MWF.xApplication.Template.Explorer.Paging = new Class({
hasTruningBar : true,
hasJumper : true,
hasReturn : true,
returnText : MWF.xApplication.Template.LP.explorer.returnText,
returnText : "",
hiddenWithDisable: true,
text : {
prePage : "",
......@@ -1060,6 +1060,7 @@ MWF.xApplication.Template.Explorer.Paging = new Class({
}
},
initialize: function (topContainer, bottomContainer, options, css) {
if (!options.returnText) options.returnText = MWF.xApplication.Template.LP.explorer.returnText;
this.setOptions( options || {});
this.topContainer = topContainer;
this.bottomContainer = bottomContainer;
......@@ -1258,4 +1259,4 @@ MWF.xApplication.Template.Explorer.Paging = new Class({
//MWF.xApplication.Template.Explorer.PopupForm = new Class({
// Extends: MPopupForm
//});
\ No newline at end of file
//});
......@@ -27,7 +27,7 @@
verify( isShowWarning ) 参数isShowWarning,校验不通过的是否提示用户。根据isShowWarning参数和options的notEmpty、warningType、validRule属性校验对象,返回boolean
*/
MWF.xDesktop.requireApp("Template", "lp." + MWF.language, null, false);
//MWF.xDesktop.requireApp("Template", "lp." + MWF.language, null, false);
var MDomItem_ClassType = {
"text" : "Text",
"textarea" : "Textarea",
......
MWF.xDesktop.requireApp("Template", "MDomItem", null, false);
MWF.xDesktop.requireApp("Template", "lp." + MWF.language, null, false);
//MWF.xDesktop.requireApp("Template", "lp." + MWF.language, null, false);
var MGrid = new Class({
Extends: MWF.widget.Common,
Implements: [Options, Events],
......@@ -928,4 +928,4 @@ var MGridTr = new Class({
return false;
}
}
});
\ No newline at end of file
});
MWF.xApplication.Template = MWF.xApplication.Template || {};
MWF.xDesktop.requireApp("Template", "lp." + MWF.language, null, false);
//MWF.xDesktop.requireApp("Template", "lp." + MWF.language, null, false);
MWF.xApplication.Template.MPopupForm = MPopupForm = new Class({
Extends: MWF.widget.Common,
Implements: [Options, Events],
......
......@@ -17,9 +17,10 @@ MWF.xApplication.Template.Main = new Class({
"height": "700",
"isResize": false,
"isMax": true,
"title": MWF.xApplication.Template.LP.title
"title": ""
},
onQueryLoad: function(){
if (!this.options.title) this.setOptions({"title": MWF.xApplication.Template.LP.title});
this.lp = MWF.xApplication.Template.LP;
},
loadApplication: function(callback){
......
......@@ -12,7 +12,7 @@ MWF.xApplication.cms.Document.Main = new Class({
"icon": "icon.png",
"width": "1200",
"height": "680",
"title": MWF.xApplication.cms.Document.LP.title,
"title": "",
"documentId": "",
"isControl": false,
"readonly": true,
......@@ -26,6 +26,7 @@ MWF.xApplication.cms.Document.Main = new Class({
"editFormId" : null //强制的编辑表单,优先于表单的formId
},
onQueryLoad: function(){
if (!this.options.title) this.setOptions({"title": MWF.xApplication.cms.Document.LP.title})
this.lp = MWF.xApplication.cms.Document.LP;
if (this.status){
this.options.documentId = this.status.documentId;
......
......@@ -13,7 +13,7 @@ MWF.xApplication.portal.Portal.Main = new Class({
"icon": "icon.png",
"width": "1200",
"height": "800",
"title": MWF.xApplication.portal.Portal.LP.title,
"title": "",
"portalId": "",
"pageId": "",
"widgetId" : "",
......@@ -23,6 +23,7 @@ MWF.xApplication.portal.Portal.Main = new Class({
"readonly": false
},
onQueryLoad: function(){
if (!this.options.title) this.setOptions({"title": MWF.xApplication.portal.Portal.LP.title});
this.lp = MWF.xApplication.portal.Portal.LP;
if (this.status){
this.options.portalId = this.status.portalId;
......
MWF.xApplication = MWF.xApplication || {};
MWF.xApplication.process = MWF.xApplication.process || {};
MWF.xApplication.process.Work = MWF.xApplication.process.Work || {};
MWF.xApplication.process.Work.options = Object.clone(o2.xApplication.Common.options);
MWF.xApplication.process.Work.options.multitask = true;
MWF.xApplication.process.Work.Main = new Class({
......@@ -10,7 +13,7 @@ MWF.xApplication.process.Work.Main = new Class({
"icon": "icon.png",
"width": "1200",
"height": "800",
"title": MWF.xApplication.process.Work.LP.title,
"title": "",
"workId": "",
"draftId": "",
"draft": null,
......@@ -25,7 +28,9 @@ MWF.xApplication.process.Work.Main = new Class({
"worklogType": "record" //record, worklog
},
onQueryLoad: function(){
debugger;
if (!this.options.title) this.setOptions({
"title": MWF.xApplication.process.Work.LP.title
});
this.lp = MWF.xApplication.process.Work.LP;
if (!this.status) {
} else {
......
......@@ -218,7 +218,8 @@ o2.addReady(function () {
var configLoaded = false;
var lpLoaded = false;
var commonLoaded = false;
var lp = o2.session.path + "/lp/" + o2.language + ".js";
//var lp = o2.session.path + "/lp/" + o2.language + ".js";
var lp = "../x_desktop/js/base_lp_" + o2.language +((o2.session.isDebugger) ? "" : ".min")+ ".js";
if (o2.session.isDebugger && (o2.session.isMobile || layout.mobile)) o2.load("../o2_lib/eruda/eruda.js");
var loadModuls = function () {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册