UNPKG

fd-gulp-convert-encoding

Version:

convert file to assigned charset

76 lines (62 loc) 2.47 kB
define('detail.modules.logistics.View', ['jQuery', 'Class','lofty.ui.timer', 'detail.core.Event', 'detail.lib.pageDialog.PageDialog'], function($, Class,Timer,Event,PageDialog){ return Class({ init: function(view, config) { this.onEvent = $.os.supportsTouch ? 'tap' : 'click'; this.div = view; this.config = config; this.bindEvent(); this.initCountdown(); this.initPopup(); }, bindEvent:function(){ var self = this; $('a.d-showup', this.div).on('click', function(e){ e.preventDefault(); }); this.div.on(this.onEvent,function(){ if(self.config.isFreePostage=="true" || self.config.freeDeliverFee == "true"){ return; } if(self.config.freightInfo.deliveryFee == "STATED"||self.config.freightInfo.deliveryFee == "TEMPLATED"){ self.openDialog = true; self.pageDialog.showDialog(); Event.trigger('setCurPageDialog', self.pageDialog, self.config.action.module); } }); Event.on('logistics.closeDialog', function(){ self.pageDialog.closeDialog(); self.openDialog = false; }).on('resetCurPageDialog',function(){ Event.trigger('setCurPageDialog', self.pageDialog, self.config.action.module); }).on('back',function(){ if (self.openDialog){ Event.trigger('logistics.closeDialog'); return false; } }); }, initCountdown:function(){ var today = new Date().getTime(),timer; timer = new Timer({ to: this.config.countdown-0+today, el: '#d-logistics-timer' }); }, initPopup:function(){ this.pageDialog = new PageDialog({ module: 'logisticsInfo', actionType: 'logistics', afterShow: function(){ Event.trigger('hideOrderOperator'); }, afterClose: function(){ Event.trigger('showOrderOperator'); } }); } }) });