Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var tb = this.get('deliveryLines');
- var tr = $('<tr/>', {'class': 'expandable shown','rowspan': '4','id': 'delivery_'+index}).on('click', {'self': this}, this._displayDelivery);
- var th = $('<tr/>',{'id': 'deliveryLine_'+index+'_head'}).append($('<td/>', {'html': _t('Address'), 'colspan': '2','class': 'tableShow'})).append($('<td/>', {'html': _t('Product'), 'colspan': '', 'class': 'tableShow'})).append($('<td/>',{'html': _t('Quantity'),'class': 'centered tableShow'})).append($('<td/>',{'class': 'tableShow'}));
- tb.append(th);
- if (self_pickup){
- tr.append($('<td/>', {'html': _t('Self Pickup'), 'rowspan': '4', 'class': 'centered'}));
- }
- else{
- address_text = address.id == 0 ? _t('Address not available at the moment') : address.complete_address.replace(/\n/g,'<br/>');
- tr.append($('<td/>', {'html': (hold_at_depot ? _t("Hold At Depot")+" " : "")+address_text, 'rowspan': '2'})).append($('<td/>', {'html': carrier.name+' ('+(use_own_carrier ? _t('own') : _t('company'))+')', 'rowspan': '2'}));
- }
- tb.append(tr);
- var vCheck = {
- 'type': 'checkbox',
- 'name': 'anonymous',
- 'id': 'anonymous_'+index+'_'+this.id,
- };
- var aCheck = $('<input/>', vCheck).on('click', {'self': this, 'index': index}, this._anonymousClick);
- if (anonymous){
- vCheck['checked'] = true;
- }
- var iButton = $('<button/>', {
- 'class': 'button-display',
- 'id': 'removeDelivery_'+index+'_0_'+(sample ? 'S' : 'P')+'_'+this.id,
- 'name': 'removeDelivery',
- 'html': 'cancella spedizione',
- }).on('click', {'self': this}, this._removeDelivery);
- 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': '3'}).append(iButton)));
- return tb;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement