jinfei 5 gadi atpakaļ
vecāks
revīzija
90aaec1846

+ 8 - 0
o2web/source/x_component_TeamWork/$Project/default/css.wcss

@@ -608,6 +608,14 @@
         "height":"100%",
         "height":"100%",
         "overflow-y":"auto"
         "overflow-y":"auto"
     },
     },
+    taskSearchEmpty: {
+        "height":"100px",
+        "width":"100%",
+        "line-height":"100px",
+        "background-color":"#ffffff",
+        "text-align":"center",
+        "font-size":"18px"
+    },
     viewSearchContainer:{
     viewSearchContainer:{
         "width":"1000px",
         "width":"1000px",
         "height":"60px",
         "height":"60px",

+ 67 - 17
o2web/source/x_component_TeamWork/Project.js

@@ -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));
     },
     },

+ 24 - 2
o2web/source/x_component_TeamWork/Task.js

@@ -113,6 +113,7 @@ MWF.xApplication.TeamWork.Task = new Class({
         //this._createTableContent();
         //this._createTableContent();
     },
     },
     _createTableContent: function () {
     _createTableContent: function () {
+        //data { taskId:xxx }
         var _self = this;
         var _self = this;
         this.getTaskData(function(){
         this.getTaskData(function(){
             if(this.openType == "window"){
             if(this.openType == "window"){
@@ -1715,13 +1716,34 @@ MWF.xApplication.TeamWork.Task.TaskMore = new Class({
         this.lp = this.options.lp;
         this.lp = this.options.lp;
         //this.data
         //this.data
         //this.contentNode
         //this.contentNode
-
+        //debugger;
         var topMoreTitle = new Element("div.topMoreTitle",{styles:this.css.topMoreTitle,text:this.lp.taskMenu}).inject(this.contentNode);
         var topMoreTitle = new Element("div.topMoreTitle",{styles:this.css.topMoreTitle,text:this.lp.taskMenu}).inject(this.contentNode);
 
 
         var copyTask = new Element("div.copyTask",{styles:this.css.topMoreItem}).inject(this.contentNode);
         var copyTask = new Element("div.copyTask",{styles:this.css.topMoreItem}).inject(this.contentNode);
         copyTask.addEvents({
         copyTask.addEvents({
             mouseenter:function(){this.setStyles({"background-color":"#F7F7F7"})},
             mouseenter:function(){this.setStyles({"background-color":"#F7F7F7"})},
-            mouseleave:function(){this.setStyles({"background-color":""})}
+            mouseleave:function(){this.setStyles({"background-color":""})},
+            click:function(e){
+                _self.app.confirm("warn",e,_self.lp.taskCopy,_self.lp.taskContent,300,120,function(){
+                    _self.rootActions.TaskAction.copyTask(_self.explorer.data.taskId,function(json){ debugger;
+                        if(json.type == "success"){
+                            _self.explorer.data.taskId = json.data.id;
+                            _self.explorer._createTableContent();
+                        }
+                        this.close();
+                        _self.close();
+                    }.bind(this))
+
+                    // _self.rootActions.TaskAction.delete(_self.data.data.id,function(){
+                    //     var rd = {"act":"remove"};
+                    //     _self.close(rd);
+                    //     this.close()
+                    // }.bind(this))
+                },function(){
+                    this.close();
+                });
+
+            }.bind(this)
         });
         });
         var copyTaskIcon = new Element("div.copyTaskIcon",{styles:this.css.topMoreItemIcon}).inject(copyTask);
         var copyTaskIcon = new Element("div.copyTaskIcon",{styles:this.css.topMoreItemIcon}).inject(copyTask);
         copyTaskIcon.setStyles({"background":"url(/x_component_TeamWork/$Task/default/icon/taskcopy.png) no-repeat center"});
         copyTaskIcon.setStyles({"background":"url(/x_component_TeamWork/$Task/default/icon/taskcopy.png) no-repeat center"});

+ 2 - 2
o2web/source/x_component_TeamWork/TaskMove.js

@@ -119,7 +119,7 @@ MWF.xApplication.TeamWork.TaskMove = new Class({
         this.isLoaded = false;
         this.isLoaded = false;
 
 
         //this.data.data.project
         //this.data.data.project
-        this.rootActions.TaskListAction.listWithTaskGroup("9513cfc6-78f8-4650-a4a2-ccdc081831c3",function(json){
+        this.rootActions.TaskListAction.listWithTaskGroup(this.data.data.taskGroupId,function(json){
             tmploading.destroy();
             tmploading.destroy();
             json.data.each(function(d){
             json.data.each(function(d){
                 this.loadGroupItem(d);
                 this.loadGroupItem(d);
@@ -165,7 +165,7 @@ MWF.xApplication.TeamWork.TaskMove = new Class({
         this.okAction.addEvents({
         this.okAction.addEvents({
             click:function(){
             click:function(){
                 if(this.selectedItem){
                 if(this.selectedItem){
-                    if(this.selectedItem.get("id")=="6a933366-5165-4153-bee2-30ec0c327d40"){
+                    if(this.selectedItem.get("id")==this.data.data.taskListId){
                         this.app.notice(this.lp.moveToSelf,"error");
                         this.app.notice(this.lp.moveToSelf,"error");
                         return;
                         return;
                     }
                     }

+ 6 - 0
o2web/source/x_component_TeamWork/lp/zh-cn.js

@@ -94,6 +94,7 @@ MWF.xApplication.TeamWork.LP = {
 		"viewItemFlow":"未完成的任务",
 		"viewItemFlow":"未完成的任务",
 		"viewItemComplete":"已完成的任务",
 		"viewItemComplete":"已完成的任务",
 		"viewItemOver":"逾期的任务",
 		"viewItemOver":"逾期的任务",
+		"taskSearchEmpty":"无任务",
 
 
 		"view":"视图",
 		"view":"视图",
 		"viewRemove":"删除视图",
 		"viewRemove":"删除视图",
@@ -147,6 +148,7 @@ MWF.xApplication.TeamWork.LP = {
 		"editTip":"点击编辑",
 		"editTip":"点击编辑",
 		"taskMenu":"任务菜单",
 		"taskMenu":"任务菜单",
 		"taskCopy":"复制任务",
 		"taskCopy":"复制任务",
+		"taskContent":"确定复制本任务?",
 		"taskMove":"转移任务",
 		"taskMove":"转移任务",
 		"taskRemove":"删除任务",
 		"taskRemove":"删除任务",
 		"taskFav":"收藏任务",
 		"taskFav":"收藏任务",
@@ -236,6 +238,10 @@ MWF.xApplication.TeamWork.LP = {
 		"searchPlace":"按回车搜索",
 		"searchPlace":"按回车搜索",
 		"ok":"确定"
 		"ok":"确定"
 	},
 	},
+	"taskCopy":{
+		"title":"复制任务",
+		"content":"确定复制该任务?"
+	},
 	"stat":{
 	"stat":{
 
 
 	},
 	},

+ 149 - 9
o2web/source/x_component_TeamWork_Task/Main.js

@@ -1,14 +1,15 @@
 MWF.xApplication.TeamWork = MWF.xApplication.TeamWork || {};
 MWF.xApplication.TeamWork = MWF.xApplication.TeamWork || {};
 MWF.xApplication.TeamWork.Task = MWF.xApplication.TeamWork.Task || {};
 MWF.xApplication.TeamWork.Task = MWF.xApplication.TeamWork.Task || {};
 MWF.xApplication.TeamWork.Task.options.multitask = true;
 MWF.xApplication.TeamWork.Task.options.multitask = true;
-MWF.xDesktop.requireApp("TeamWork", "Task", null, false);
+// MWF.xDesktop.requireApp("TeamWork", "Task", null, false);
+MWF.xDesktop.requireApp("TeamWork", "Common", null, false);
 MWF.xApplication.TeamWork.Task.Main = new Class({
 MWF.xApplication.TeamWork.Task.Main = new Class({
 	Extends: MWF.xApplication.Common.Main,
 	Extends: MWF.xApplication.Common.Main,
 	Implements: [Options, Events],
 	Implements: [Options, Events],
 
 
 	options: {
 	options: {
 		"style": "default",
 		"style": "default",
-		"name": "Task",
+		"name": "TeamWork.Task",
 		"icon": "icon.png",
 		"icon": "icon.png",
 		"width": "1000",
 		"width": "1000",
 		"height": "700",
 		"height": "700",
@@ -16,20 +17,159 @@ MWF.xApplication.TeamWork.Task.Main = new Class({
 		"isMax": false,
 		"isMax": false,
 		"title": MWF.xApplication.TeamWork.Task.LP.title
 		"title": MWF.xApplication.TeamWork.Task.LP.title
 	},
 	},
+
 	onQueryLoad: function(){
 	onQueryLoad: function(){
 		this.lp = MWF.xApplication.TeamWork.Task.LP;
 		this.lp = MWF.xApplication.TeamWork.Task.LP;
-		if (this.status){
-			this.taskId = this.status.taskId;
+		//this.lp = MWF.xApplication.TeamWork.LP; debugger;
+		this.cssPath = "/x_component_TeamWork/$Task/"+this.options.style+"/css.wcss";
+
+
+		if (!this.status) {
+		} else {
+			this.options.workId = this.status.workId;
+			this.options.workCompletedId = this.status.workCompletedId;
+			this.options.jobId = this.status.jobId;
+			this.options.priorityWork = this.status.priorityWork;
+			this.options.readonly = (this.status.readonly === "true");
 		}
 		}
+
+
+		this.taskId = this.options.taskId || "";
+		this.projectId = this.options.project ||"";
+
+		MWF.xDesktop.requireApp("TeamWork", "lp.zh-cn", {
+			"onRequestFailure": function(){
+				//alert("fail")
+			}.bind(this),
+			"onSuccess": function(json){
+				this.lp = MWF.xApplication.TeamWork.LP;
+			}.bind(this)
+		}, false);
+
 	},
 	},
 	loadApplication: function(callback) {
 	loadApplication: function(callback) {
-		//
-		this.node = new Element("div", {"styles": this.css.content}).inject(this.content);
+
+		this.rootActions = MWF.Actions.load("x_teamwork_assemble_control");
+		this.orgActions = MWF.Actions.load("x_organization_assemble_express");
+		//this.actions = this.rootActions.TaskAction;
+
+
+		//http://dev.o2oa.net/x_desktop/app.html?app=TeamWork.Task&status={"taskId":"abb0621d-c35c-4010-9cd3-49a439b36a09"}
+		this.node = new Element("div").inject(this.content);
 		//alert(this.taskId)
 		//alert(this.taskId)
 
 
 
 
-		var task = new MWF.xApplication.TeamWork.Task(this,data,opt);
-		task.open();
-	}
+		MWF.xDesktop.requireApp("TeamWork", "Task", function(){
+			//alert("loaded")
+			var data = {
+				taskId:this.taskId
+			};
+			var opt={
+				"type":"window"
+			};
+			var task = new MWF.xApplication.TeamWork.Task(this,data,opt);
+			task.open();
+		}.bind(this));
+	},
+	setScrollBar: function(node, view, style, offset, callback){
+		if (!style) style = "default";
+		if (!offset){
+			offset = {
+				"V": {"x": 0, "y": 0},
+				"H": {"x": 0, "y": 0}
+			};
+		}
+		MWF.require("MWF.widget.ScrollBar", function(){
+			if(this.scrollbar && this.scrollbar.scrollVAreaNode){
+				this.scrollbar.scrollVAreaNode.destroy();
+				delete this.scrollbar;
+			}
+			this.scrollbar = new MWF.widget.ScrollBar(node, {
+				"style": style,
+				"offset": offset,
+				"where": "before",
+				"indent": false,
+				"distance": 100,
+				"friction": 4,
+				"onScroll": function (y) {
+					var scrollSize = node.getScrollSize();
+					var clientSize = node.getSize();
+					var scrollHeight = scrollSize.y - clientSize.y;
+					if (y + 200 > scrollHeight && view && view.loadElementList) {
+						if (! view.isItemsLoaded) view.loadElementList()
+					}
+				}.bind(this)
+			});
+			if (callback) callback();
+		}.bind(this));
+		return false;
+	},
+	setLoading:function(container){
+		var _height = container.getHeight();
+		var _width = container.getWidth();
+		var loading = new Element("img",{styles:{
+				"margin-top":"10px",
+				"margin-bottom":"10px",
+				"width":"100px",
+				"height":"20px"
+			},"src":"/x_component_TeamWork/$Main/default/icon/loading.gif"}).inject(container);
+		//var loading = new Element("img",{"src":"/x_component_TeamWork/$Main/default/icon/loading.gif"}).inject(container);
+
+		loading.setStyles({
+			"margin-left":(_width-loading.getWidth())/2+"px"
+		})
+	},
+	showErrorMessage:function(xhr,text,error){
+		var errorText = error;
+		var errorMessage;
+		if (xhr) errorMessage = xhr.responseText;
+		if(errorMessage!=""){
+			var e = JSON.parse(errorMessage);
+			if(e.message){
+				this.notice( e.message,"error");
+			}else{
+				this.notice( errorText,"error");
+			}
+		}else{
+			this.notice(errorText,"error");
+		}
+
+	},
+	selectCalendar : function( target, container, options, callback ){
+		var type = options.type;
+		var calendarOptions = {
+			"style" : "xform",
+			"isTime":  type == "time" || type.toLowerCase() == "datetime",
+			"timeOnly": type == "time",
+			"target": container,
+			"onQueryComplate" : function( dateString ,date ){
+				var json={
+					"action":"ok",
+					"dateString":dateString,
+					"date":date
+				};
+				if( callback )callback( json );
+			}.bind(this),
+			"onClear":function(){
+				var json={
+					"action":"clear"
+				};
+				if(callback) callback(json);
+				//if(this.calendar) delete this.calendar;
+			}.bind(this),
+			"onHide":function(){
+
+			}.bind(this)
+		};
+		if( options.calendarOptions ){
+			calendarOptions = Object.merge( calendarOptions, options.calendarOptions )
+		}
+
+		MWF.require("MWF.widget.Calendar", function(){
+			this.calendar = new MWF.widget.Calendar( target, calendarOptions);
+			this.calendar.show();
+
+		}.bind(this));
+	},
 
 
 });
 });