不能在卡纸上放卡,我可以拖动但是当我拖动卡片显示在其他卡片后面

时间:2015-02-06 13:28:54

标签: rally

不能将卡片放在纸板上,我可以拖动但是当我拖动卡片时显示在其他卡片后面。你可以在图像中看到我拖动F4252所以它落后于其他卡片而且它卡在那里只有我不能放弃它 我可以拖动

enter image description here

以下是我的代码

                me.cardboard = Ext.create('Rally.ui.cardboard.CardBoard',{
                    types: ['PortfolioItem/Feature'],
                    attribute: 'Release',
                    config: {globalVar: this.globalVar, filters: this.filters, project: that.getContext().getProject()._ref},
                    filterHash: filters,
                    context: this.getContext(),
                    columnConfig: {
                        xtype: 'rallycardboardcolumn',
                        displayField: 'Name',
                        valueField: '_ref',
                        plugins: [
                            {ptype:'rallycolumndropcontroller'},
                            {ptype:'rallycardboardcardrecordprocessor', pluginId: 'card-set' },
                            //{ptype:'rallycardboardcollapsiblecolumns', pluginId: 'collapse' },                                
                            {ptype:'tscolumnheaderupdater'}  /*,
                            {ptype:'tscolumnheaderupdater', field_to_aggregate: 'LeafStoryPlanEstimateTotal'}*/
                        ],
                        fType: fType,
                        //storeConfig: { 
                            //filters: filters,
                            //context: this.getContext().getDataContext()
                        //}                         
                    },
                    addColumn: function (columnConfig, index) {
                        if (fType != null) {
                            var key = "Release";
                            if (columnConfig.value == null) {
                                key = "Backlog";
                            }
                            if (this.filterHash && this.filterHash[key]!= undefined){
                                if (columnConfig.storeConfig == undefined){
                                    columnConfig.storeConfig = {};
                                }
                                if (columnConfig.storeConfig.filters == undefined){
                                    columnConfig.storeConfig.filters = [];
                                }
                                columnConfig.storeConfig.filters.push(this.filterHash[key]);
                            }
                        }       
                        var column = this._createColumnDefinition(columnConfig);
                        Ext.Array.insert(this.columnDefinitions, Ext.isNumber(index) ? index : this.columnDefinitions.length, [column]);
                        return column;
                    },
                    cardConfig: {
                        editable: true, 
                        //setBorder: 10,
                        //draggable: true,
                        //floating: true,
                        draggable: true,                        
                        //backgroundColor: '#FFFFE7',
                        style: {
                            borderColor: 'green',
                            backgroundColor: '#FFFFE7',
                            borderStyle: 'solid'
                        },                          
                        //showIconsAndHighlightBorder: false,   
                        enableValidationUi: true,   
                        showReadyIcon: true,
                        showBlockedIcon: true,
                        showColorIcon: true,
                        showPlusIcon: true,
                        showGearIcon: true,                     
                        fields: [
                            'FormattedID',
                            'Name',
                            //'Parent',
                            'ReleaseDate',
                            'ReleaseStartDate',
                            { name: 'Project', renderer: me._renderProject },
                            { name: 'PercentDoneByStoryPlanEstimate' },
                            { name: 'Parent', renderer: me._renderParent},
                            //{ name: 'Parent', fetch: ['Parent', 'Name'], renderTpl: Ext.create('Ext.XTemplate', 'Top Parent: {Parent.Name}')},                                
                            { name: 'PreliminaryEstimate', fetch: ['PreliminaryEstimate', 'Value'], renderTpl: Ext.create('Ext.XTemplate', 'Plan Estimate Total: {PreliminaryEstimate.Value}')},
                            { name: 'LeafStoryPlanEstimateTotal', fetch: ['LeafStoryPlanEstimateTotal'], renderTpl: Ext.create('Ext.XTemplate', 'Actual: {LeafStoryPlanEstimateTotal}')}                                
                        ],
                    },
                    listeners: {
                        added: function(card,container){
                            //card.set('DisplayColor', "blue");
                            me.logger.log(this,card,container);
                        },
                        fieldClick: function(eOpts) {
                            me.logger.log(this,eOpts);
                            if ( eOpts == "PercentDoneByStoryPlanEstimate" ) {
                                me._showDoneTooltip(eOpts,this);
                            }
                        },
                        scope: this
                    }
                });

它在sdk 2.0rc1中工作但在sdk 2.0rc3中它无法正常工作

我试图覆盖某些功能,但没有使用

        Ext.override(Rally.ui.cardboard.plugin.ColumnDropController, {
            dropControllerConfig: {
                cardDraggableCls: 'drag-handle'
            }
        }); 

1 个答案:

答案 0 :(得分:0)

我猜你的addColumn覆盖可能会阻止在Rally.ui.cardboard.CardBoard组件中发生一些重要的基本功能。您也不需要在columnConfig中手动包含rallycolumndropcontroller,它也应该在基类中免费连接。这会让你更进一步吗?