提交 bac9f510 编写于 作者: 蔡祥熠

Merge branch 'fix/datatable_field_valid' into 'wrdp'

Merge of fix/datatable_field_valid 数据表的编译全服务器表改成当前应用的表 to wrdp

See merge request o2oa/o2oa!6210
......@@ -4,7 +4,8 @@
<span MWFnodetype="MWFToolBarSeparator"></span>
<span MWFnodetype="MWFToolBarButton" MWFButtonImage="build.png" title="发布数据表,进入可编译状态" MWFButtonAction="statusBuild" MWFButtonText=""></span>
<span MWFnodetype="MWFToolBarButton" MWFButtonImage="draft.png" title="取消数据库编译,重新编译时会删除已编译的数据表" MWFButtonAction="statusDraft" MWFButtonText=""></span>
<span MWFnodetype="MWFToolBarButton" MWFButtonImage="run.png" title="编译所有数据表" MWFButtonAction="buildAllView" MWFButtonText=""></span>
<!-- <span MWFnodetype="MWFToolBarButton" MWFButtonImage="run.png" title="编译所有数据表" MWFButtonAction="buildAllView" MWFButtonText=""></span>-->
<span MWFnodetype="MWFToolBarButton" MWFButtonImage="run.png" title="编译当前应用所有数据表" MWFButtonAction="bulidCurrentApp" MWFButtonText=""></span>
<span MWFnodetype="MWFToolBarSeparator"></span>
<span MWFnodetype="MWFToolBarButton" MWFButtonImage="formExplode.gif" title="数据导出" MWFButtonAction="tableExplode" MWFButtonText=""></span>
......
......@@ -172,6 +172,9 @@ MWF.xApplication.query.TableDesigner.Main = new Class({
buildAllView: function(){
this.view.buildAllView();
},
bulidCurrentApp: function(){
this.view.bulidCurrentApp();
},
tableExplode: function(){
this.view.tableExplode();
},
......
......@@ -284,6 +284,11 @@ MWF.xApplication.query.TableDesigner.Table = new Class({
this.designer.notice(this.designer.lp.errorName, "error");
return false;
}
var keywords = ["string","int","integer","long","float","double","boolean"];
if( keywords.contains((name||"").toLowerCase()) ){
this.designer.notice(this.designer.lp.nameUseKeywork.replace("{key}", keywords.join(",")), "error");
return false;
}
return true;
},
checkAddColumn: function(){
......@@ -536,6 +541,20 @@ MWF.xApplication.query.TableDesigner.Table = new Class({
this.close();
}, null);
},
bulidCurrentApp: function(e){
var _self = this;
if (!e) e = this.node;
this.designer.confirm("warn", e, MWF.APPDTBD.LP.buildCurrentAppTitle, {
"html": MWF.APPDTBD.LP.buildCurrentAppInfor
}, 480, 120, function(){
o2.Actions.load("x_query_assemble_designer").TableAction.buildDispatch( _self.data.application , function(json){
this.designer.notice(this.designer.lp.buildCurrentApp_success, "success", this.node, {"x": "left", "y": "bottom"});
}.bind(_self));
this.close();
}, function(){
this.close();
}, null);
},
tableClear: function(e){
var _self = this;
if (!e) e = this.node;
......
......@@ -42,6 +42,7 @@ MWF.xApplication.query.TableDesigner.LP = {
"add": "Add"
},
"errorName": "Column names only allow the use of alphanumeric and underscore combinations, and cannot start with a number.",
"nameUseKeywork": "{key} is not allowed for column names",
"errorFieldList": "Please create a data column first.",
"duplicateName": "A column with the same name already exists",
"inputName": "Please enter the column name",
......@@ -65,6 +66,10 @@ MWF.xApplication.query.TableDesigner.LP = {
"tableExplodeInfo": "By default, up to 2000 rows can be exported. Are you sure you want to export?",
"tableExplode_success": "Export successful",
"buildCurrentAppTitle": "Compile the current application data table",
"buildCurrentAppInfor": "All data tables of the current application are about to be compiled, <span style='color: #FF0000;'>After compiling, please restart the server immediately, otherwise it may cause the JVM to crash</span>. Are you sure you want to perform this operation ?",
"buildCurrentApp_success": "All data tables of the current application have been compiled, please restart the server immediately!",
"tableImplodeTitle": "Import Data",
"tableImplodeInfo": "The imported data will be overwritten. Are you sure to import?",
"tableExcelImplodeInfo": "If the imported data has an id field, it will be overwritten, otherwise it will be added. Are you sure to import?",
......
......@@ -42,6 +42,7 @@ MWF.xApplication.query.TableDesigner.LP = {
"add": "添加"
},
"errorName": "列名只允许使用字母数字和下划线组合,并且不能以数字开头。",
"nameUseKeywork": "列名不允许使用{key}",
"errorFieldList": "请先创建数据列。",
"duplicateName": "同名的列已存在",
"inputName": "请输入列名称",
......@@ -65,6 +66,10 @@ MWF.xApplication.query.TableDesigner.LP = {
"tableExplodeInfo": "默认最多导出2000行。确认是否导出?",
"tableExplode_success": "导出成功",
"buildCurrentAppTitle": "编译当前应用数据表",
"buildCurrentAppInfor": "即将编译当前应用所有数据表,<span style='color: #FF0000;'>编译后您请马上重启服务器,否则可能造成JVM崩溃</span>。您确定要执行此操作吗?",
"buildCurrentApp_success": "已编译当前应用所有数据表,请马上重启服务器!",
"tableImplodeTitle": "导入数据",
"tableImplodeInfo": "导入的数据会覆盖。确认是否导入?",
"tableExcelImplodeInfo": "导入的数据如果有id字段,会覆盖,否则会新增。确认是否导入?",
......@@ -78,7 +83,7 @@ MWF.xApplication.query.TableDesigner.LP = {
"buildAllViewInfor": "即将编译所有数据表,包括所有数据应用中的数据表,<span style='color: #FF0000;'>编译后您请马上重启服务器,否则可能造成JVM崩溃</span>。您确定要执行此操作吗?",
"buildAllView_success": "已编译所有数据表,请马上重启服务器!",
"tableHelp": "数据表能够在系统数据库中自动创建真实表,并生成java实体对象,您可以使用JPQL操作数据表。创建数据表需要以下步骤:<br><br>1、创建数据表,并创建每一列;<br>2、点击工具栏按钮,将数据表发布到编译状态;<br>3、点击工具栏按钮,执行“编译所有数据表”操作<br>4、马上重启服务器(否则可能造成JVM崩溃),数据表就可使用了。",
"tableHelp": "数据表能够在系统数据库中自动创建真实表,并生成java实体对象,您可以使用JPQL操作数据表。创建数据表需要以下步骤:<br><br>1、创建数据表,并创建每一列;<br>2、点击工具栏按钮,将数据表发布到编译状态;<br>3、点击工具栏按钮,执行“编译当前应用所有数据表”操作<br>4、马上重启服务器(否则可能造成JVM崩溃),数据表就可使用了。",
"propertyTemplate": {
"base": "基本",
"event": "事件",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册