Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _createRowDelivery: function(index, address, carrier, price, anonymous, self_pickup, use_own_carrier, hold_at_depot, sample){
- var tb = this.get('deliveryLines');
- var tr = $('<tr/>', {'class': 'expandable shown','colspan': '4','id': 'delivery_'+index}).on('click', {'self': this}, this._displayDelivery);
- var th = $('<tr/>',{'id': 'deliveryLine_'+index+'_head'}).append($('<td/>', {'html': _t('Address'), 'colspan': '','class': 'tableShow'})).append($('<td/>', {'html': _t('Product'), 'colspan': '2', 'class': 'tableShow'})).append($('<td/>',{'html': _t('Quantity'),'class': 'centered tableShow'})).append($('<td/>',{'class': 'tableShow'}));
- tb.append(th);
- if (self_pickup){
- tr.append($('<tr/>')).append($('<td/>', {'html': _t('Self Pickup'), 'colspan': '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($('<tr/>')).append($('<td/>', {'html': (hold_at_depot ? _t("Hold At Depot")+" " : "")+address_text, 'colspan': ''})).append($('<tr/>', {'html': carrier.name+' ('+(use_own_carrier ? _t('own') : _t('company'))+')', 'colspan': ''}));
- }
- tb.append(th);
- 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);
- tr.append($('<tr/>', {'id': 'deliveryLine_'+index+'_service','class': 'colorstrip'})).append($('<td/>', {'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;
- },
- _createRowDetDelivery: function(tbody, index, product, quantity, sample){
- var iButton = $('<button/>', {
- 'class': 'btn-icon-small',
- 'id': 'removeDelivery_'+index+'_'+product.id+'_'+(sample ? 'S' : 'P')+'_'+this.id,
- 'name': 'removeDelivery',
- 'html': 'd',
- }).on('click', {'self': this}, this._removeDelivery);
- 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)));
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement