Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var tb = this.get('deliveryLines');
  2.             var tr = $('<tr/>', {'class': 'expandable shown','rowspan': '4','id': 'delivery_'+index}).on('click', {'self': this}, this._displayDelivery);
  3.             var th = $('<tr/>',{'id': 'deliveryLine_'+index+'_head'}).append($('<td/>', {'html': _t('Address'), 'colspan': '','class': 'tableShow'})).append($('<td/>', {'html': _t('Product'), 'colspan': '', 'class': 'tableShow'})).append($('<td/>',{'html': _t('Quantity'),'class': 'centered tableShow'})).append($('<td/>',{'class': 'tableShow'}));
  4.             tb.append(th);
  5.             if (self_pickup){
  6.                 tr.append($('<td/>', {'html': _t('Self Pickup'), 'rowspan': '4', 'class': 'centered'}));
  7.             }
  8.             else{
  9.                 address_text = address.id == 0 ? _t('Address not available at the moment') : address.complete_address.replace(/\n/g,'<br/>');
  10.                 tr.append($('<td/>', {'html': (hold_at_depot ? _t("Hold At Depot")+" " : "")+address_text})).append($('<tr/>', {'html': carrier.name+' ('+(use_own_carrier ? _t('own') : _t('company'))+')'}));
  11.             }
  12.             tb.append(tr);
  13.             var vCheck = {
  14.                 'type': 'checkbox',
  15.                 'name': 'anonymous',
  16.                 'id': 'anonymous_'+index+'_'+this.id,
  17.             };
  18.             var aCheck = $('<input/>', vCheck).on('click', {'self': this, 'index': index}, this._anonymousClick);
  19.             if (anonymous){
  20.                 vCheck['checked'] = true;
  21.             }
  22.             var iButton = $('<button/>', {
  23.                 'class': 'button-display',
  24.                 'id': 'removeDelivery_'+index+'_0_'+(sample ? 'S' : 'P')+'_'+this.id,
  25.                 'name': 'removeDelivery',
  26.                 'html': 'cancella spedizione',
  27.             }).on('click', {'self': this}, this._removeDelivery);
  28.             tb.append($('<tr/>', {'id': 'deliveryLine_'+index+'_service','class': 'colorstrip'}).append($('<tr/>', {'class': ''}).append(aCheck).append($('<label/>', {'html': _t('Anonymous Box'), 'for': 'anonymous_'+index+'_'+this.id, 'class': 'control-label'}))).append($('<tr/>',{'colspan': ''}).append(iButton)));
  29.             return tb;
  30.     },
  31.  
  32. _createRowDetDelivery: function(tbody, index, product, quantity, sample){
  33.             var iButton = $('<button/>', {
  34.                 'class': 'btn-icon-small',
  35.                 'id': 'removeDelivery_'+index+'_'+product.id+'_'+(sample ? 'S' : 'P')+'_'+this.id,
  36.                 'name': 'removeDelivery',
  37.                 'html': 'd',
  38.             }).on('click', {'self': this}, this._removeDelivery);
  39.             tbody.append($('<tr/>',{'id': 'deliveryLine_'+index+'_'+product.id,'class':'colors', 'colspan': '4'}).append($('<td/>',{'class': 'arrow','colspan': '2','html': product.name+(sample ? ' '+_t('(SAMPLE)') : '')})).append($('<td/>', {'id': 'quantityDelivery_'+index+'_'+product.id+'_'+this.id, 'html': quantity, 'class':'centered'})).append($('<td/>').append(iButton)));
  40.         },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement