[pve-devel] [PATCH manager 2/2] disable selecting when right clicking in tree

Dominik Csapak d.csapak at proxmox.com
Fri Apr 29 09:03:41 CEST 2016


yeah sorry, this is a leftover from an old version of this patch
should i send a v2 or do you want to correct this?

On 04/29/2016 07:41 AM, Dietmar Maurer wrote:
>>   	Ext.apply(me, {
>> +	    allowSelection: true,
>>   	    store: store,
>>   	    viewConfig: {
>>   		// note: animate cause problems with applyState
>> @@ -398,7 +399,16 @@ Ext.define('PVE.tree.ResourceTree', {
>>   		},
>>   		destroy: function() {
>>   		    rstore.un("load", updateTree);
>> -		}
>> +		},
>> +		beforecellmousedown: function (tree, record,item,index,ev) {
>> +		    // disable selection when right clicking
>> +		    me.allowSelection = !(event.button === 2);
>> +		},
>> +		beforeselect: function (tree, record, index, eopts) {
>> +		    var allow = !!me.allowSelection;
> me.allowSelection looks like a boolean to me, So why do you use '!!' here?




More information about the pve-devel mailing list