1- ( function ( ) {
1+ ( function ( $ ) {
22 'use strict' ;
33 /**
44 * (en)TransactionListCtrl
1818 analyticsService . send ( analyticsService . CONST . TRANSACTION_LIST_PAGE ) ;
1919 // define private variables
2020 var nFetchCount , nLastFetchedIndex , htTransactionInfo , htTransactionData , oTimeSliderVoService ;
21- var aParamTransactionInfo ;
21+ var aParamTransactionInfo , beforeTransactionDetailUrl = "" ;
2222
2323 // define private variables of methods
2424 var fetchStart , fetchNext , fetchAll , emitTransactionListToTable , getQuery , getTransactionList , changeTransactionDetail ,
300300 * @param transaction
301301 */
302302 changeTransactionDetail = function ( transaction ) {
303- $location . path ( "/transactionList/" + $routeParams . application + "/" + $routeParams . readablePeriod + "/" + $routeParams . queryEndDateTime + "/" + transaction . traceId + "-" + transaction . collectorAcceptTime + "-" + transaction . elapsed , false ) ;
304- var transactionDetailUrl = 'index.html#/transactionDetail' ; // the filename should be existing, if not it's doesn't work on ie and firefox
305- if ( transaction . traceId && transaction . collectorAcceptTime ) {
306- transactionDetailUrl += '/' + $window . encodeURIComponent ( transaction . traceId ) + '/' + transaction . collectorAcceptTime ;
307- $timeout ( function ( ) {
303+ var transactionDetailUrl = 'index.html#/transactionDetail' ;
304+ if ( transaction . traceId && transaction . collectorAcceptTime ) {
305+ transactionDetailUrl += '/' + $window . encodeURIComponent ( transaction . traceId ) + '/' + transaction . collectorAcceptTime ;
306+ }
307+ if ( beforeTransactionDetailUrl == transactionDetailUrl ) {
308+ $scope . $emit ( "transactionTableDirective.completedDetailPageLoad" ) ;
309+ } else {
310+ beforeTransactionDetailUrl = transactionDetailUrl ;
311+ $location . path ( "/transactionList/" + $routeParams . application + "/" + $routeParams . readablePeriod + "/" + $routeParams . queryEndDateTime + "/" + transaction . traceId + "-" + transaction . collectorAcceptTime + "-" + transaction . elapsed , false ) ;
312+ $timeout ( function ( ) {
308313 $scope . transactionDetailUrl = transactionDetailUrl ;
309314 } ) ;
310- }
315+ }
311316 } ;
312317
313318 /**
326331 $timeout ( function ( ) {
327332 fetchNext ( ) ;
328333 } , 1000 ) ;
329-
330334 } ) ;
335+ $scope . completedDetailPageLoad = function ( ) {
336+ $scope . $emit ( "transactionTableDirective.completedDetailPageLoad" ) ;
337+ } ;
331338 }
332339 ] ) ;
333- } ) ( ) ;
340+ } ) ( jQuery ) ;
0 commit comments