|
@@ -379,7 +379,8 @@ MWF.xApplication.TeamWork.Project = new Class({
|
|
|
// );
|
|
// );
|
|
|
this.naviItemFlowContainer.addEvents({
|
|
this.naviItemFlowContainer.addEvents({
|
|
|
click:function(){
|
|
click:function(){
|
|
|
- alert("open")
|
|
|
|
|
|
|
+ this.curNaviItem = json.name;
|
|
|
|
|
+ this.openView(this.naviItemFlowContainer);
|
|
|
}.bind(this),
|
|
}.bind(this),
|
|
|
mouseenter:function(){ _self.naviItemChange(this,"enter")},
|
|
mouseenter:function(){ _self.naviItemChange(this,"enter")},
|
|
|
mouseleave:function(){_self.naviItemChange(this,"leave")}
|
|
mouseleave:function(){_self.naviItemChange(this,"leave")}
|
|
@@ -398,7 +399,8 @@ MWF.xApplication.TeamWork.Project = new Class({
|
|
|
// );
|
|
// );
|
|
|
this.naviItemCompleteContainer.addEvents({
|
|
this.naviItemCompleteContainer.addEvents({
|
|
|
click:function(){
|
|
click:function(){
|
|
|
- alert("open")
|
|
|
|
|
|
|
+ this.curNaviItem = json.name;
|
|
|
|
|
+ this.openView(this.naviItemCompleteContainer);
|
|
|
}.bind(this),
|
|
}.bind(this),
|
|
|
mouseenter:function(){ _self.naviItemChange(this,"enter")},
|
|
mouseenter:function(){ _self.naviItemChange(this,"enter")},
|
|
|
mouseleave:function(){_self.naviItemChange(this,"leave")}
|
|
mouseleave:function(){_self.naviItemChange(this,"leave")}
|
|
@@ -417,7 +419,8 @@ MWF.xApplication.TeamWork.Project = new Class({
|
|
|
// );
|
|
// );
|
|
|
this.naviItemOverContainer.addEvents({
|
|
this.naviItemOverContainer.addEvents({
|
|
|
click:function(){
|
|
click:function(){
|
|
|
- alert("open")
|
|
|
|
|
|
|
+ this.curNaviItem = json.name;
|
|
|
|
|
+ this.openView(this.naviItemOverContainer);
|
|
|
}.bind(this),
|
|
}.bind(this),
|
|
|
mouseenter:function(){ _self.naviItemChange(this,"enter")},
|
|
mouseenter:function(){ _self.naviItemChange(this,"enter")},
|
|
|
mouseleave:function(){_self.naviItemChange(this,"leave")}
|
|
mouseleave:function(){_self.naviItemChange(this,"leave")}
|
|
@@ -632,8 +635,10 @@ MWF.xApplication.TeamWork.Project = new Class({
|
|
|
|
|
|
|
|
var drag = new Drag(taskItemContainer, {
|
|
var drag = new Drag(taskItemContainer, {
|
|
|
"compensateScroll": true,
|
|
"compensateScroll": true,
|
|
|
-
|
|
|
|
|
- container: this.taskContentLayout,
|
|
|
|
|
|
|
+ //preventDefault:true,
|
|
|
|
|
+ //stopPropagation:true,
|
|
|
|
|
+ //container:this.contentLayout,
|
|
|
|
|
+ //container: this.taskContentLayout,
|
|
|
"onStart": function(el, e){
|
|
"onStart": function(el, e){
|
|
|
this.dragMove(el,e);
|
|
this.dragMove(el,e);
|
|
|
drag.stop();
|
|
drag.stop();
|
|
@@ -657,15 +662,16 @@ MWF.xApplication.TeamWork.Project = new Class({
|
|
|
var time = 200;
|
|
var time = 200;
|
|
|
//this.cloneTaskItem = new Element("").inject()
|
|
//this.cloneTaskItem = new Element("").inject()
|
|
|
var position = el.getPosition(this.taskContentLayout);
|
|
var position = el.getPosition(this.taskContentLayout);
|
|
|
|
|
+ //alert(JSON.stringify(position))
|
|
|
//var clone = this.cloneTaskItem = el.clone(true,true).inject($(document.body));
|
|
//var clone = this.cloneTaskItem = el.clone(true,true).inject($(document.body));
|
|
|
var clone = this.cloneTaskItem = el.clone(true,true).inject(this.taskContentLayout);
|
|
var clone = this.cloneTaskItem = el.clone(true,true).inject(this.taskContentLayout);
|
|
|
this.cloneTaskItem.removeClass("dragin");
|
|
this.cloneTaskItem.removeClass("dragin");
|
|
|
this.cloneTaskItem.setStyles({
|
|
this.cloneTaskItem.setStyles({
|
|
|
"top":position.y+"px",
|
|
"top":position.y+"px",
|
|
|
- "left":(position.x+this.taskContentLayout.getScroll().x)+"px",
|
|
|
|
|
|
|
+ "left":(position.x + this.taskContentLayout.getScrollLeft())+"px",
|
|
|
"z-index":"9999",
|
|
"z-index":"9999",
|
|
|
"margin":"0px",
|
|
"margin":"0px",
|
|
|
- //"position":"position",
|
|
|
|
|
|
|
+ "position":"absolute",
|
|
|
"cursor":"move"
|
|
"cursor":"move"
|
|
|
});
|
|
});
|
|
|
el.setStyles({"border":"1px dotted #000000","opacity":"0.3"});
|
|
el.setStyles({"border":"1px dotted #000000","opacity":"0.3"});
|
|
@@ -674,15 +680,23 @@ MWF.xApplication.TeamWork.Project = new Class({
|
|
|
this.ccc = 0;
|
|
this.ccc = 0;
|
|
|
var drag = new Drag.Move(this.cloneTaskItem, {
|
|
var drag = new Drag.Move(this.cloneTaskItem, {
|
|
|
container: this.taskContentLayout,
|
|
container: this.taskContentLayout,
|
|
|
- //container: $$("#6a933366-5165-4153-bee2-30ec0c327d40"),
|
|
|
|
|
|
|
+ //container: this.contentLayout,
|
|
|
//"stopPropagation": true,
|
|
//"stopPropagation": true,
|
|
|
"compensateScroll": true,
|
|
"compensateScroll": true,
|
|
|
"droppables": $$(".dragin"),
|
|
"droppables": $$(".dragin"),
|
|
|
"onStart": function(){
|
|
"onStart": function(){
|
|
|
// this.topBarTabItemStat.set("text",JSON.stringify(el.getPosition()));
|
|
// this.topBarTabItemStat.set("text",JSON.stringify(el.getPosition()));
|
|
|
-
|
|
|
|
|
}.bind(this),
|
|
}.bind(this),
|
|
|
"onDrag": function(el,e){
|
|
"onDrag": function(el,e){
|
|
|
|
|
+ // this.topBarTabItemStat.set("text",JSON.stringify(el.getPosition()));
|
|
|
|
|
+ //if(el.getPosition().x + el.getWidth() >1900){
|
|
|
|
|
+ //this.topBarTabItemStat.set("text",JSON.stringify("treeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"));
|
|
|
|
|
+ //drag.cancel();
|
|
|
|
|
+ //e.stopPropagation();return;
|
|
|
|
|
+ //this.taskContentLayout.scrollTo( this.taskContentLayout.getScrollLeft() +500,0);
|
|
|
|
|
+ //el.setStyles({"margin-right":"-500px"})
|
|
|
|
|
+ //this.topBarTabItemStat.set("text","000000000000000000");
|
|
|
|
|
+ //}
|
|
|
// var _width = el.getWidth().toInt();
|
|
// var _width = el.getWidth().toInt();
|
|
|
//
|
|
//
|
|
|
// var _l= el.getPosition().x;
|
|
// var _l= el.getPosition().x;
|
|
@@ -1000,7 +1014,12 @@ MWF.xApplication.TeamWork.Project = new Class({
|
|
|
var tmpLoading = new Element("div.tmpLoading",{styles:{"background-color":"#ffffff"}}).inject(viewListContainer);
|
|
var tmpLoading = new Element("div.tmpLoading",{styles:{"background-color":"#ffffff"}}).inject(viewListContainer);
|
|
|
this.app.setLoading(tmpLoading);
|
|
this.app.setLoading(tmpLoading);
|
|
|
this.searchLoading = false;
|
|
this.searchLoading = false;
|
|
|
- this.actions.taskListNext("(0)",100,data,function(json){
|
|
|
|
|
|
|
+
|
|
|
|
|
+ var filter = {
|
|
|
|
|
+ title:key
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ this.rootActions.TaskAction.listAllTaskNextWithFilter("(0)",100,this.data.id,filter,function(json){
|
|
|
viewListContainer.empty();
|
|
viewListContainer.empty();
|
|
|
json.data.each(function(data){
|
|
json.data.each(function(data){
|
|
|
this.loadViewItem(data)
|
|
this.loadViewItem(data)
|
|
@@ -1017,6 +1036,25 @@ MWF.xApplication.TeamWork.Project = new Class({
|
|
|
}
|
|
}
|
|
|
this.searchLoading = true;
|
|
this.searchLoading = true;
|
|
|
}.bind(this))
|
|
}.bind(this))
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //this.actions.taskListNext("(0)",100,data,function(json){
|
|
|
|
|
+ // viewListContainer.empty();
|
|
|
|
|
+ // json.data.each(function(data){
|
|
|
|
|
+ // this.loadViewItem(data)
|
|
|
|
|
+ // }.bind(this));
|
|
|
|
|
+ // if(json.count==0){
|
|
|
|
|
+ // new Element("div.none",{styles:{
|
|
|
|
|
+ // "height":"100px",
|
|
|
|
|
+ // "line-height":"100px",
|
|
|
|
|
+ // "width":"100%",
|
|
|
|
|
+ // "text-align":"center",
|
|
|
|
|
+ // "background-color":"#ffffff",
|
|
|
|
|
+ // "font-size":"16px"
|
|
|
|
|
+ // },text:"未查找到数据"}).inject(this.viewListContainer);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // this.searchLoading = true;
|
|
|
|
|
+ //}.bind(this))
|
|
|
},
|
|
},
|
|
|
loadView:function(id){
|
|
loadView:function(id){
|
|
|
//this.curNaviItem 所有工作,我负责的任务。。。。。
|
|
//this.curNaviItem 所有工作,我负责的任务。。。。。
|
|
@@ -1040,7 +1078,20 @@ MWF.xApplication.TeamWork.Project = new Class({
|
|
|
// var filter = {
|
|
// var filter = {
|
|
|
// //"title":this.viewSearchInput.get("value")||""
|
|
// //"title":this.viewSearchInput.get("value")||""
|
|
|
// }
|
|
// }
|
|
|
- this.rootActions.TaskAction.listNextWithFilter(id||"(0)",10,data,function(json){
|
|
|
|
|
|
|
+
|
|
|
|
|
+ var action = "listAllTaskNextWithFilter";
|
|
|
|
|
+ if(this.curNaviItem == this.lp.viewItemMy){ //我负责的任务
|
|
|
|
|
+ action = "listMyExecutTaskNextWithFilter"
|
|
|
|
|
+ }else if(this.curNaviItem == this.lp.viewItemFlow){ //未完成的任务
|
|
|
|
|
+ action = "listUncompletedTaskNextWithFilter"
|
|
|
|
|
+ }else if(this.curNaviItem == this.lp.viewItemComplete){ //已完成的任务
|
|
|
|
|
+ action = "listCompletedTaskNextWithFilter"
|
|
|
|
|
+ }else if(this.curNaviItem == this.lp.viewItemOver){ //逾期的任务
|
|
|
|
|
+ action = "listOverTimeTaskNextWithFilter"
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ this.rootActions.TaskAction[action](id||"(0)",10,this.data.id,data,function(json){
|
|
|
this.viewListContainer.getElements(".tmpLoading").destroy();
|
|
this.viewListContainer.getElements(".tmpLoading").destroy();
|
|
|
json.data.each(function(data){
|
|
json.data.each(function(data){
|
|
|
this.loadViewItem(data);
|
|
this.loadViewItem(data);
|
|
@@ -1049,6 +1100,10 @@ MWF.xApplication.TeamWork.Project = new Class({
|
|
|
}.bind(this));
|
|
}.bind(this));
|
|
|
this.viewLoading = true;
|
|
this.viewLoading = true;
|
|
|
|
|
|
|
|
|
|
+ if(json.count == 0){
|
|
|
|
|
+ new Element("div",{styles:this.css.taskSearchEmpty,text:this.lp.taskSearchEmpty}).inject(this.viewListContainer);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
var sHeight = this.viewListContainer.getHeight();
|
|
var sHeight = this.viewListContainer.getHeight();
|
|
|
var cHeight = this.viewContainer.getHeight();
|
|
var cHeight = this.viewContainer.getHeight();
|
|
|
|
|
|
|
@@ -1060,7 +1115,6 @@ MWF.xApplication.TeamWork.Project = new Class({
|
|
|
}.bind(this)
|
|
}.bind(this)
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
}.bind(this))
|
|
}.bind(this))
|
|
|
},
|
|
},
|
|
|
loadViewItem:function(data){
|
|
loadViewItem:function(data){
|
|
@@ -1082,12 +1136,8 @@ MWF.xApplication.TeamWork.Project = new Class({
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
createStatLayout:function(){
|
|
createStatLayout:function(){
|
|
|
-
|
|
|
|
|
MWF.xDesktop.requireApp("TeamWork", "Stat", function(){
|
|
MWF.xDesktop.requireApp("TeamWork", "Stat", function(){
|
|
|
- var stat = new MWF.xApplication.TeamWork.Stat(this.contentLayout,this.app,this.data,{
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ var stat = new MWF.xApplication.TeamWork.Stat(this.contentLayout,this.app,this.data,{ });
|
|
|
stat.load();
|
|
stat.load();
|
|
|
}.bind(this));
|
|
}.bind(this));
|
|
|
},
|
|
},
|