123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216 |
- GlobalMenu=function(){
- {
- this.rootMenu=null;
- this.menuMenu=null;
- this.treeNode=null;
- this.menuMenuFlat=null;
- };
- this.getMenu=function(treeNode,handler){
- this.treeNode=treeNode;
- var isRoot=0;
- if(treeNode.isRoot) isRoot=1;
-
- if(this.menuMenu==null){
- this.menuMenu=$.ligerMenu({ top: 100, left: 100, width: 120, items:
- [{ text: '增加分类', click:handler },
- { text: '删除', click:handler },
- {text:'导出',click:handler},
- {text:'导入',click:handler},
- {text:'排序',click:handler},
- { text: '刷新', click: handler }]
- });
-
-
- };
- if(this.menuMenuFlat==null){
- this.menuMenuFlat=$.ligerMenu({ top: 100, left: 100, width: 120, items:
- [ { text: '删除', click:handler },
- {text:'导出',click:handler},
- {text:'导入',click:handler}]
- });
- }
- if(this.rootMenu==null){
- this.rootMenu=$.ligerMenu({ top: 100, left: 100, width: 120, items:
- [{ text: '增加分类', click: handler },
- {text:'导出',click:handler},
- {text:'导入',click:handler},
- {text:'排序',click:handler},
- { text: '刷新', click: handler }]
- });
- };
- if(isRoot==1){
- return this.rootMenu;
- }
- else{
-
- if(treeNode.type==0){
-
- return this.menuMenuFlat;
- }
-
- return this.menuMenu;
- }
-
-
- };
- };
- FlowTypeMenu=function(){
- {
- this.rootMenu=null;
- this.menuMenu=null;
- this.treeNode=null;
- };
- this.getMenu=function(treeNode,handler){
- this.treeNode=treeNode;
- var isRoot=0;
- if(treeNode.isRoot) isRoot=1;
-
- if(this.menuMenu==null){
- this.menuMenu = $.ligerMenu({top: 100, left: 100, width: 120, items:
- [
- { text: '增加分类', click: handler },
- { text: '编辑分类', click: handler },
- { text: '删除分类', click: handler }
- ]
- });
- };
- if(this.rootMenu==null){
- this.rootMenu=$.ligerMenu({ top: 100, left: 100, width: 120, items:
- [{ text: '增加分类', click: handler }]
- });
- };
- if(isRoot==1){
- return this.rootMenu;
- }
- else{
- return this.menuMenu;
- }
- };
- };
- ReportTypeMenu=function(){
- {
- this.rootMenu=null;
- this.menuMenu=null;
- this.treeNode=null;
- };
- this.getMenu=function(treeNode,handler){
- this.treeNode=treeNode;
- var isRoot=0;
- if(treeNode.isRoot) isRoot=1;
-
- if(this.menuMenu==null){
- this.menuMenu = $.ligerMenu({top: 100, left: 100, width: 120, items:
- [
- { text: '增加分类', click: handler },
- { text: '编辑分类', click: handler },
- { text: '删除分类', click: handler }
- ]
- });
-
-
- };
-
- if(this.rootMenu==null){
- this.rootMenu=$.ligerMenu({ top: 100, left: 100, width: 120, items:
- [{ text: '增加分类', click: handler }]
- });
- };
- if(isRoot==1){
- return this.rootMenu;
- }
- else{
- return this.menuMenu;
- }
-
-
- };
- };
- /**
- * 数据字典菜单。
- * @returns {DiclMenu}
- */
- DicMenu=function(){
- {
- this.rootMenu=null;
- this.menuMenu=null;
- this.treeNode=null;
- };
- this.getMenu=function(treeNode,handler){
- this.treeNode=treeNode;
- var isRoot=0;
- if(treeNode.isRoot) isRoot=1;
-
-
- var items=[{ text: '增加字典分类', click:handler },
- { text: '编辑分类', click: handler },
- { text: '排序', click: handler },
- { text: '删除', click:handler }];
- if(treeNode.type==0){
- items.splice(0, 1);
- }
- this.menuMenu=$.ligerMenu({ top: 100, left: 100, width: 120, items:items});
-
-
- if(this.rootMenu==null){
- this.rootMenu=$.ligerMenu({ top: 100, left: 100, width: 120, items:
- [{ text: '增加字典分类', click: handler },
- { text: '排序', click: handler }]
- });
- };
- if(isRoot==1){
- return this.rootMenu;
- }
- else{
- return this.menuMenu;
- }
-
-
- };
- };
- /**
- * 知识库菜单。
- * @returns {CAT_KNOWLEDGE}
- */
- KnowledgeTypeMenu=function(){
- {
- this.rootMenu=null;
- this.menuMenu=null;
- this.treeNode=null;
- };
- this.getMenu=function(typeId,treeNode,handler,menu){
- this.treeNode=treeNode;
- var isRoot=0;
- if(treeNode.isRoot) isRoot=1;
- if(knowPerData.isSuperAdmin=="true"){
- this.menuMenu = $.ligerMenu
- ({top: 100, left: 100, width: 120, items:menu
- });
- };
- if(this.menuMenu==null){
- this.menuMenu = $.ligerMenu
- ({top: 100, left: 100, width: 120, items:menu
- });
- };
- if(this.rootMenu==null){
- this.rootMenu=$.ligerMenu({ top: 100, left: 100, width: 120, items:
- [{ text: '增加分类', click: handler }]
- });
- };
-
- if(isRoot==1){
- return this.rootMenu;
- }
- else{
- return this.menuMenu;
- }
- };
- };
|