[pve-devel] [PATCH widget-toolkit v4] Fix #582: Add delay to button

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Jul 24 18:51:17 CEST 2019


On 7/24/19 12:14 PM, Dominik Csapak wrote:
>> @@ -130,9 +133,11 @@ Ext.define('Proxmox.button.StdRemoveButton', {
>>         handler: function(btn, event, rec) {
>>       var me = this;
>> +    var url = me.getUrl(rec);
>> +    if (typeof me.delay !== 'undefined') url += "?delay=" + me.delay;
> 
> we always use {} for ifs
> 
> if you want to keep it on one line you can do:
> 
> url += (typeof me.delay !== 'undefined)? '?delay=" + me.delay : '';

I'd rather see a "real" if, most of the time it's IMO nicer to not have a
ternary operator - their surely some valid exceptions, though. 





More information about the pve-devel mailing list