save handle bar position of transaction list page

This commit is contained in:
denz
2016-05-23 15:50:26 +09:00
parent d6ca74cc58
commit 2d9f069ceb
3 changed files with 15 additions and 8 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -7,12 +7,13 @@
* @name TransactionListCtrl
* @class
*/
pinpointApp.constant('TransactionListConfig', {
applicationUrl: '/transactionmetadata.pinpoint',
MAX_FETCH_BLOCK_SIZE: 100
pinpointApp.constant("TransactionListConfig", {
applicationUrl: "/transactionmetadata.pinpoint",
MAX_FETCH_BLOCK_SIZE: 100,
TRANSACTION_LIST_RESIZER: "transactionList.resizer"
});
pinpointApp.controller('TransactionListCtrl', ['TransactionListConfig', '$scope', '$location', '$routeParams', '$rootScope', '$timeout', '$window', '$http', 'webStorage', 'TimeSliderVoService', 'TransactionDaoService', 'AnalyticsService', 'helpContentService',
pinpointApp.controller("TransactionListCtrl", ["TransactionListConfig", "$scope", "$location", "$routeParams", "$rootScope", "$timeout", "$window", "$http", "webStorage", "TimeSliderVoService", "TransactionDaoService", "AnalyticsService", "helpContentService",
function (cfg, $scope, $location, $routeParams, $rootScope, $timeout, $window, $http, webStorage, TimeSliderVoService, oTransactionDaoService, analyticsService, helpContentService) {
analyticsService.send(analyticsService.CONST.TRANSACTION_LIST_PAGE);
// define private variables
@@ -62,13 +63,19 @@
}
$timeout(function () {
var resizerY = webStorage.get( cfg.TRANSACTION_LIST_RESIZER ) == null ? (window.innerHeight - 40) / 2 : parseInt( webStorage.get( cfg.TRANSACTION_LIST_RESIZER ) );
$("#main-container").layout({
north__minSize: 20,
north__size: (window.innerHeight - 40) / 2,
north__size: resizerY,
// north__spacing_closed: 20,
// north__togglerLength_closed: 100,
// north__togglerAlign_closed: "top",
center__maskContents: true // IMPORTANT - enable iframe masking
center__maskContents: true, // IMPORTANT - enable iframe masking
onresize: function() {
if ( arguments[0] === "north" ) {
webStorage.add(cfg.TRANSACTION_LIST_RESIZER, arguments[2].innerHeight);
}
}
});
}, 100);