Commit 8880e34a authored by huqi's avatar huqi
Browse files

修复语言包获取

Showing with 141 additions and 71 deletions
+141 -71
o2web/source/x_component_Empty/$Main/appicon.png

4.45 KB | W: 0px | H: 0px

o2web/source/x_component_Empty/$Main/appicon.png

1.93 KB | W: 0px | H: 0px

o2web/source/x_component_Empty/$Main/appicon.png
o2web/source/x_component_Empty/$Main/appicon.png
o2web/source/x_component_Empty/$Main/appicon.png
o2web/source/x_component_Empty/$Main/appicon.png
  • 2-up
  • Swipe
  • Onion skin
{
}
\ No newline at end of file
o2web/source/x_component_Empty/$Main/default/icon.png

4.16 KB | W: 0px | H: 0px

o2web/source/x_component_Empty/$Main/default/icon.png

1.11 KB | W: 0px | H: 0px

o2web/source/x_component_Empty/$Main/default/icon.png
o2web/source/x_component_Empty/$Main/default/icon.png
o2web/source/x_component_Empty/$Main/default/icon.png
o2web/source/x_component_Empty/$Main/default/icon.png
  • 2-up
  • Swipe
  • Onion skin
o2web/source/x_component_Empty/$Main/default/icons/icon_wugongzuo.png

943 Bytes

o2web/source/x_component_Empty/$Main/default/icons/o2logo.png

16.9 KB

.o2_empty_content{
height: 800px;
background-color: #1d5987;
.hello{
text-align: center;
}
.o2_empty_div1 {
color: #ffffff;
background: url(../x_component_Empty/$Main/default/icons/icon_wugongzuo.png) center center no-repeat;
width: 300px;
height: 500px;
border: 1px solid #ffffff;
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
.logo {
margin-top: 20px;
width: 200px;
height: 200px;
}
.taskListTable{
width: 800px;
box-sizing: border-box;
border-collapse: collapse;
}
.taskListTable th{
height: 30px;
line-height: 30px;
background-color: #d4e6fb;
}
.taskListTable td{
height: 24px;
line-height: 24px;
}
button {
cursor: pointer;
font-size: 12px;
margin: 10px;
padding: 5px 10px;
color: #ffffff;
background-color: #4a90e2;
border: 1px solid #4a90e2;
border-radius: 100px;
}
\ No newline at end of file
<h3>{{$.lp.taskListTitle}}</h3>
<br>
<table align="center" class="taskListTable" border="1">
<tr>
<th>{{$.lp.taskTitle}}</th>
<th>{{$.lp.taskProcess}}</th>
<th>{{$.lp.taskTime}}</th>
</tr>
{{each $.data}}
<tr>
<td><a href="#" data-o2-events="click:openTask:{{$.work}}">{{$.title}}</a></td>
<td>{{$.processName}}</td>
<td>{{$.startTime}}</td>
</tr>
{{end each}}
</table>
<br>
<button data-o2-events="click:openCalendar">{{$.lp.openCalendar}}</button>
<button data-o2-events="click:openOrganization">{{$.lp.openOrganization}}</button>
<button data-o2-events="click:startProcess">{{$.lp.startProcess}}</button>
<br>
<button data-o2-events="click:openInBrowser">{{$.lp.openInBrowser}}</button>
<div class="o2_empty_content deepColor_bg" data-o2-element="contentNode">
<div class="o2_empty_div1" data-o2-element="myNode" data-o2-events="click:loadTask;mouseover:tabover;mouseout:tabout">
<div class="o2_empty_div2">{{$.lp.title}}</div>
<div class="o2_empty_div2">{{$.data.type}}</div>
</div>
<div data-o2-element="eachNode">
{{each ($.data.data)}}
<div data-o2-events="click:clickNode">{{$.title}}</div>
{{end each}}
</div>
<div class="hello">
<img class="logo" alt="O2OA logo" src="../x_component_Empty/$Main/default/icons/o2logo.png">
<h1>{{ $.lp.welcome }}</h1>
<p>
For more O2OA development document,<br>
check out the
<a href="https://www.o2oa.net/develop.html" target="_blank" rel="noopener">O2OA develop documentation</a>.
</p>
<div class="task" data-o2-element="taskListView"></div>
</div>
<div class="o2_empty_content2">
</div>
......@@ -9,63 +9,68 @@ MWF.xApplication.Empty.Main = new Class({
"name": "Empty",
"mvcStyle": "style.css",
"icon": "icon.png",
"width": "400",
"height": "700",
"isResize": false,
"isMax": false,
"title": MWF.xApplication.Empty.LP.title
},
onQueryLoad: function(){
this.lp = MWF.xApplication.Empty.LP;
},
loadApplication: function(callback){
//1var url = "../x_component_Empty/$Main/default/view.html";
var url = this.path+this.options.style+"/view.html";
var url2 = this.path+this.options.style+"/view2.html";
o2.Actions.load("x_processplatform_assemble_surface").TaskAction.listMyPaging(1,20, function(json){
this.content.loadHtml(url, {"bind": {"lp": this.lp, "data": json}, "module": this}, function(){
this.content.loadHtml(url, {"bind": {"lp": this.lp}, "module": this}, function(){
this.loadTaskView();
}.bind(this));
},
loadTaskView: function(){
o2.Actions.load("x_processplatform_assemble_surface").TaskAction.listMyPaging(1,5, function(json){
debugger;
this.taskListView.loadHtml(this.path+this.options.style+"/taskView.html", {"bind": {"lp": this.lp, "data": json.data}, "module": this}, function(){
this.doSomething();
}.bind(this));
// this.content.loadHtml(url, {"bind": {"lp": this.lp, "data": json}, "module": this}, function(){
// this.doSomething();
// }.bind(this));
//
// o2.load(["js1", "js2"], {}, function(){}); //js
//
// o2.loadCss //css
// o2.loadHtml("", {"dom": this.content})
// o2.loadAll //js,css,html
//
// o2.loadAll({
// "css": [],
// "js":[],
// "html": []
// },
// )
//
}.bind(this));
},
doSomething: function(){
},
loadTask: function(){
alert("loadTask");
openTask: function(e, data, id){
layout.openApplication(null, "process.Work", {"workid": id});
},
openCalendar: function(){
layout.openApplication(null, "Calendar");
},
tabover: function(){
//alert("tabover");
this.myNode.addClass("mainColor_bg");
openOrganization: function(){
layout.openApplication(null, "Org");
},
tabout: function(){
//alert("tabout")
this.myNode.removeClass("mainColor_bg");
openInBrowser: function() {
this.openInNewBrowser(true);
},
clickNode: function(e, data){
alert(data.title);
startProcess: function(){
o2.api.page.startProcess();
// const cmpt = this;
// o2.requireApp([["process.TaskCenter", "lp."+o2.language], ["process.TaskCenter", ""]],"", ()=>{
// var obj = {
// "lp": o2.xApplication.process.TaskCenter.LP,
// "content": cmpt.content,
// "addEvent": function(type, fun){
// cmpt.addEvent(type, fun);
// },
// "getAction": function (callback) {
// if (!this.action) {
// this.action = o2.Actions.get("x_processplatform_assemble_surface");
// if (callback) callback();
// } else {
// if (callback) callback();
// }
// },
// "desktop": layout.desktop,
// "refreshAll": function(){},
// "notice": cmpt.notice,
// }
// o2.JSON.get("../x_component_process_TaskCenter/$Main/default/css.wcss", function(data){
// obj.css = data;
// }, false);
//
// if (!cmpt.processStarter) cmpt.processStarter = new o2.xApplication.process.TaskCenter.Starter(obj);
// cmpt.processStarter.load();
// }, true, true);
}
});
MWF.xApplication.Empty.LP = {
"title": ""
"title": "",
"welcome": "Welcome to O2OA Component",
"taskListTitle": "此处列出您的5个最新待办",
"taskTitle": "标题",
"taskProcess": "流程",
"taskTime": "到达时间",
"openCalendar": "打开日程管理",
"openOrganization": "打开组织管理",
"startProcess": "启动流程",
"openInBrowser": "在新浏览器窗口中打开"
};
\ No newline at end of file
......@@ -368,6 +368,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class(
},
load: function (callback) {
this.loadMacro(function () {
debugger
this.loadLanguage(function(flag){
if (flag && this.formDataText){
var data = o2.bindJson(this.formDataText, {"lp": MWF.xApplication.process.Xform.LP.form});
......@@ -431,6 +432,7 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class(
},
loadLanguage: function(callback){
//formDataText
debugger;
if (this.json.languageType!=="script" && this.json.languageType!=="default"){
if (callback) callback();
return true;
......@@ -448,7 +450,11 @@ MWF.xApplication.process.Xform.Form = MWF.APPForm = new Class(
if (this.options.macro==="PageContext"){
var portal = this.app.portal.id;
languageJson = this.workAction.getScriptByNameV2(portal, name, function(d){
// languageJson = this.workAction.getScriptByNameV2(portal, name, function(d){
// return this.Macro.exec(d.data.text, this);
// }.bind(this), function(){});
languageJson = this.workAction.getScriptByNameV2(portal, name).then(function(d){
return this.Macro.exec(d.data.text, this);
}.bind(this), function(){});
}else{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment