$laCommon.onReady(function() { if(laTokenFinal){ $maskManager.createMaskWatiting(); $maskManager.createMask(); $laIscroll.init(); $laIscroll.down(function() { $('.desc', '#refreshAction').text('松开即可刷新...'); }, function() { $('.desc', '#refreshAction').text('下拉刷新列表...'); }, function() { $maskManager.showMask(); $('.desc', '#refreshAction').text('正在刷新列表...'); $('#moreAction').html(' '); var params = $list.params(); params = $.extend({}, params, { 'start' : 0 }); $list.params(params); $list.load(); }); $laIscroll.refreshing(function() { $('#refreshAction').removeClass('up').removeClass('wait'); }); $laIscroll.up(function() { if ($more.hasMore()) { $('#moreAction').text('松开获取更多...'); } }, function() { $more.reload(); }, function() { if ($more.hasMore()) { $maskManager.showMask(); $('#moreAction').text('正在加载更多...'); var params = $list.params(); params = $.extend({}, params, { 'start' : $more.getNextIndex() }); $list.params(params); $list.appendBind(function(jsonData) { var reqList = jsonData['reqList']; if (reqList) { $(reqList).each(function(i, o) { var listTemp; if (o['tip'] == 0) { listTemp = $templete.getManageListTemp(true); } else if (o['tip'] == 1) { listTemp = $templete.getManageListTemp(false); } $('#reqListUL').append(String.formatmodel(listTemp, { 'id' : o['id'], 'reqId' : o['reqId'], 'userName' : o['userName'], 'applyName' : o['applyName'], 'applyDate' : o['receiveDate'], 'reqNo' : o['reqNo'], 'icon':o['icon'], 'resultClass':'', 'resultText':' ' })); }); bindRemoveMoveEvent(); } $maskManager.hideMaskWatiting(); $more.init($('#moreAction'), jsonData['page']); $laIscroll.refresh(); $maskManager.hideMask(); }); $list.appendLoad(); } else { $more.reload(); } }); loadIngData(); } });
$laCommon.onReady(function() { $maskManager.createMaskWatiting(); $maskManager.createMask(); $sidebar.init(); $laIscroll.init(); $laIscroll.down(function() { $('.desc', '#refreshAction').text('松开即可刷新...'); }, function() { $('.desc', '#refreshAction').text('下拉刷新列表...'); }, function() { $maskManager.showMask(); $('.desc', '#refreshAction').text('正在刷新列表...'); $('#moreAction').html(' '); var params = $list.params(); params = $.extend({}, params, { 'start' : 0 }); $list.params(params); $list.load(); }); $laIscroll.refreshing(function() { $('#refreshAction').removeClass('up').removeClass('wait'); }); $laIscroll.up(function() { if ($more.hasMore()) { $('#moreAction').text('松开获取更多...'); } }, function() { $more.reload(); }, function() { if ($more.hasMore()) { $maskManager.showMask(); $('#moreAction').text('正在加载更多...'); var params = $list.params(); params = $.extend({}, params, { 'start' : $more.getNextIndex() }); $list.params(params); $list.appendBind(function(jsonData) { var reqList = jsonData['reqList']; if (reqList) { $(reqList).each(function(i, o) { var listTemp = $templete.getTaskListTemp(); $('#reqListUL').append(String.formatmodel(listTemp, { 'id' : o['id'], 'applyName' : o['applyName'], 'applyDate' : o['receiveDate'], 'reqNo' : o['reqNo'] })); }); } $maskManager.hideMaskWatiting(); $more.init($('#moreAction'), jsonData['page']); $laIscroll.refresh(); $maskManager.hideMask(); }); $list.appendLoad(); } else { $more.reload(); } }); $laCommon.touchSE($('.Calleft'), function(event, startTouch, o) { $sidebar.toggle(); }, function(event, o) { }); $laCommon.touchSE($('#RemoveLeft'), function(event, startTouch, o) { $sidebar.toggle(); }, function(event, o) { }); $laCommon.touchSE($('#Search'), function(event, startTouch, o) { $menu.close(); $search.toggle(); }, function(event, o) { }); $laCommon.touchSE($('#menuDown'), function(event, startTouch, o) { $search.close(); $menu.toggle(); }, function(event, o) { }); $laCommon.touchSE($('#sendAction'), function(event, startTouch, o) { }, function(event, o) { $userInfo.put("sendReq", "1"); $windowManager.create('send.html', 'zoom-out', true); }); loadIngData(); $menu.select('ing'); $remind.menuTASK(); $remind.sidebar(); $menu.click(function(selectMenu) { window.setTimeout(function() { $menu.toggle(function() { $('li', '#reqListUL').fadeOut(300); $maskManager.showMaskWatiting(); $('.desc', '#refreshAction').text('正在加载数据...'); $('#moreAction').html(' '); var params = $list.params(); if (selectMenu == 'ing') { $list.url($laCommon.getRestApiURL() + "/wf/reqTask/ingList"); } else if (selectMenu == 'history') { $list.url($laCommon.getRestApiURL() + "/wf/reqTask/historyList"); } params = $.extend({}, params, { 'start' : 0 }); $list.params(params); $list.load(); $menu.select(selectMenu); $remind.menuREQ(selectMenu); }); }, 300); }); $sidebar.menuAction(function(selectMenu) { $sidebar.toggle(function() { if (selectMenu == 'req') { $windowManager.load('../req/index.html'); } else if (selectMenu == 'manage') { $windowManager.load('../manage/index.html'); } }); }); });