| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- MWF.xApplication.Selector = MWF.xApplication.Selector || {};
- MWF.xDesktop.requireApp("Organization", "Actions.RestActions", null, false);
- MWF.xDesktop.requireApp("Organization", "Selector.Department", null, false);
- MWF.xApplication.Selector.Application = new Class({
- Extends: MWF.xApplication.Selector.Department,
- options: {
- "style": "default",
- "count": 0,
- "title": "Select Application",
- "values": [],
- "names": [],
- "expand": false
- },
- loadSelectItems: function(addToNext){
- this.action.listApplications(function(json){
- debugger;
- json.data.each(function(data){
- var category = this._newItem(data, this, this.itemAreaNode);
- }.bind(this));
- }.bind(this));
- },
- _scrollEvent: function(y){
- return true;
- },
- _getChildrenItemIds: function(){
- return null;
- },
- _listItemByKey: function(callback, failure, key){
- return false;
- },
- _getItem: function(callback, failure, id, async){
- this.action.getApplications(function(json){
- if (callback) callback.apply(this, [json]);
- }.bind(this), failure, id, async);
- },
- _newItemSelected: function(data, selector, item){
- return new MWF.xApplication.Selector.Application.ItemSelected(data, selector, item)
- },
- _listItemByPinyin: function(callback, failure, key){
- return false;
- },
- _newItem: function(data, selector, container, level){
- return new MWF.xApplication.Selector.Application.Item(data, selector, container, level);
- }
- });
- MWF.xApplication.Selector.Application.Item = new Class({
- Extends: MWF.xApplication.Selector.Department.Item,
- _getShowName: function(){
- return this.data.name;
- },
- _setIcon: function(){
- this.iconNode.setStyle("background-image", "url("+"/x_component_Organization/Selector/$Selector/default/icon/applicationicon.png)");
- },
- loadSubItem: function(){
- return false;
- }
- });
- MWF.xApplication.Selector.Application.ItemSelected = new Class({
- Extends: MWF.xApplication.Selector.Department.ItemSelected,
- _getShowName: function(){
- return this.data.name;
- },
- _setIcon: function(){
- this.iconNode.setStyle("background-image", "url("+"/x_component_Organization/Selector/$Selector/default/icon/applicationicon.png)");
- }
- });
|