mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-13 14:55:58 +10:00
change link to merged and minified source
update grunt setting
This commit is contained in:
+161
-18
@@ -22,10 +22,8 @@ module.exports = function (grunt) {
|
||||
'<%= concat.baseLib.dest %>',
|
||||
'<%= concat.utilLib.dest %>'
|
||||
],
|
||||
pinpointComponentJS: [
|
||||
DEST_LIB_PATH + 'js/*.js',
|
||||
'!' + DEST_LIB_PATH + 'js/*.min.js'
|
||||
]
|
||||
pinpointComponentJS: [ DEST_LIB_PATH + 'js/*.js', '!' + DEST_LIB_PATH + 'js/*.min.js' ],
|
||||
pinpointSrc: [ DEST_LIB_PATH + 'js/*.js', '!' + DEST_LIB_PATH + 'js/*.min.js' ]
|
||||
},
|
||||
jsdoc: {
|
||||
dist: {
|
||||
@@ -190,10 +188,21 @@ module.exports = function (grunt) {
|
||||
separator: '\n'
|
||||
},
|
||||
src: [
|
||||
COMPONENT_PATH + 'infiniteCircularScroll/InfiniteCircularScroll.js'
|
||||
COMPONENT_PATH + 'infinite-circular-scroll/InfiniteCircularScroll.js'
|
||||
],
|
||||
dest: DEST_LIB_PATH + 'js/infinite-circular-scroll.js'
|
||||
},
|
||||
serverMap: {
|
||||
options: {
|
||||
stripBanner: true,
|
||||
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %> */',
|
||||
separator: '\n'
|
||||
},
|
||||
src: [
|
||||
COMPONENT_PATH + 'server-map2/jquery.ServerMap2.js'
|
||||
],
|
||||
dest: DEST_LIB_PATH + 'js/server-map2.js'
|
||||
},
|
||||
pinpointComponent: {
|
||||
options: {
|
||||
stripBanner: true,
|
||||
@@ -201,12 +210,93 @@ module.exports = function (grunt) {
|
||||
separator: '\n'
|
||||
},
|
||||
src: makePath( [
|
||||
'js/time-slider.js',
|
||||
'js/big-scatter-chart2.js',
|
||||
'js/infinite-circular-scroll.js'
|
||||
'js/time-slider.min.js',
|
||||
'js/big-scatter-chart2.min.js',
|
||||
'js/infinite-circular-scroll.min.js',
|
||||
'js/server-map2.min.js'
|
||||
], DEST_LIB_PATH ),
|
||||
dest: DEST_LIB_PATH + 'js/pinpoint-component.min.js'
|
||||
},
|
||||
pinpointSrc: {
|
||||
options: {
|
||||
stripBanner: true,
|
||||
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>*/',
|
||||
separator: '\n'
|
||||
},
|
||||
src: makePath( [
|
||||
'common/filters/icon-url.filter.js',
|
||||
'common/filters/application-name-to-class-name.filter.js',
|
||||
'common/services/time-slider-vo.service.js',
|
||||
'common/services/alerts.service.js',
|
||||
'common/services/progress-bar.service.js',
|
||||
'common/services/navbar-vo.service.js',
|
||||
'common/services/transaction-dao.service.js',
|
||||
'common/services/location.service.js',
|
||||
'common/services/server-map-dao.service.js',
|
||||
'common/services/agent-dao.service.js',
|
||||
'common/services/sidebar-title-vo.service.js',
|
||||
'common/services/filtered-map-util.service.js',
|
||||
'common/services/filter.config.js',
|
||||
'common/services/server-map-filter-vo.service.js',
|
||||
'common/services/alarm-ajax.service.js',
|
||||
'common/services/alarm-util.service.js',
|
||||
'common/services/alarm-broadcast.service.js',
|
||||
'common/services/server-map-hint-vo.service.js',
|
||||
'common/services/is-visible.service.js',
|
||||
'common/services/user-locales.service.js',
|
||||
'common/help/help-content-en.js',
|
||||
'common/help/help-content-ko.js',
|
||||
'common/help/help-content-template.js',
|
||||
'common/services/help-content.service.js',
|
||||
'common/services/analytics.service.js',
|
||||
'common/services/realtime-websocket.service.js',
|
||||
'common/services/preference.service.js',
|
||||
'common/services/common-ajax.service.js',
|
||||
'common/services/agent-ajax.service.js',
|
||||
'common/services/tooltip.service.js',
|
||||
|
||||
'features/navbar/navbar.directive.js',
|
||||
'features/serverMap/server-map.directive.js',
|
||||
'features/realtimeChart/realtime-chart.directive.js',
|
||||
'features/scatter/scatter.directive.js',
|
||||
'features/nodeInfoDetails/node-info-details.directive.js',
|
||||
'features/linkInfoDetails/link-info-details.directive.js',
|
||||
//'features/serverList/server-list.directive.js',
|
||||
'features/agentList/agent-list.directive.js',
|
||||
'features/agentInfo/agent-info.directive.js',
|
||||
'features/timeSlider/time-slider.directive.js',
|
||||
'features/transactionTable/transaction-table.directive.js',
|
||||
'features/timeline/timeline.directive.js',
|
||||
'features/agentChartGroup/agent-chart-group.directive.js',
|
||||
'features/sidebar/title/sidebar-title.directive.js',
|
||||
'features/sidebar/filter/filter-information.directive.js',
|
||||
'features/distributedCallFlow/distributed-call-flow.directive.js',
|
||||
'features/responseTimeChart/response-time-chart.directive.js',
|
||||
'features/loadChart/load-chart.directive.js',
|
||||
'features/jvmMemoryChart/jvm-memory-chart.directive.js',
|
||||
'features/cpuLoadChart/cpu-load-chart.directive.js',
|
||||
'features/tpsChart/tps-chart.directive.js',
|
||||
'features/loading/loading.directive.js',
|
||||
'features/configuration/configuration.controller.js',
|
||||
'features/configuration/help/help.controller.js',
|
||||
'features/configuration/general/general.controller.js',
|
||||
'features/configuration/alarm/alarm-user-group.directive.js',
|
||||
'features/configuration/alarm/alarm-group-member.directive.js',
|
||||
'features/configuration/alarm/alarm-pinpoint-user.directive.js',
|
||||
'features/configuration/alarm/alarm-rule.directive.js',
|
||||
'features/realtimeChart/realtime-chart.controller.js',
|
||||
|
||||
'pages/main/main.controller.js',
|
||||
'pages/inspector/inspector.controller.js',
|
||||
'pages/transactionList/transaction-list.controller.js',
|
||||
'pages/transactionDetail/transaction-detail.controller.js',
|
||||
'pages/filteredMap/filtered-map.controller.js',
|
||||
'pages/transactionView/transaction-view.controller.js',
|
||||
'pages/scatterFullScreenMode/scatter-full-screen-mode.controller.js'
|
||||
|
||||
], 'main/webapp/' ),
|
||||
dest: DEST_LIB_PATH + 'js/pinpoint.js'
|
||||
},
|
||||
vernderCSS: {
|
||||
options: {
|
||||
stripBanner: true,
|
||||
@@ -308,27 +398,69 @@ module.exports = function (grunt) {
|
||||
files: {
|
||||
'main/webapp/lib/js/infinite-circular-scroll.min.js': 'main/webapp/lib/js/infinite-circular-scroll.js'
|
||||
}
|
||||
},
|
||||
serverMap : {
|
||||
options: {
|
||||
preserveComments: false,
|
||||
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>*/'
|
||||
},
|
||||
files: {
|
||||
'main/webapp/lib/js/server-map2.min.js': 'main/webapp/lib/js/server-map2.js'
|
||||
}
|
||||
},
|
||||
pinpointSrc: {
|
||||
options: {
|
||||
preserveComments: false,
|
||||
sourceMap: true,
|
||||
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>*/'
|
||||
},
|
||||
files: {
|
||||
'main/webapp/lib/js/pinpoint.min.js': 'main/webapp/lib/js/pinpoint.js'
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
cssDev: {
|
||||
pinpoint: {
|
||||
files: makePath([
|
||||
'styles/*.css',
|
||||
'components/time-slider/*.js',
|
||||
'components/big-scatter-chart/*.js',
|
||||
'components/infinite-circular-scroll/*.js',
|
||||
'components/server-map2/*.js',
|
||||
'common/**/*.js',
|
||||
'features/**/*.js',
|
||||
'pages/**/*.js'
|
||||
], 'main/webapp/' ),
|
||||
tasks: [ 'buildPinpointCSS', 'buildPinpointComponentJS', 'buildPinpointSrc' ]
|
||||
},
|
||||
pinpointCSS: {
|
||||
files: makePath([
|
||||
'*.js'
|
||||
], STYLE_PATH ),
|
||||
tasks: [ 'buildPinpointCSS']
|
||||
},
|
||||
jsDev: {
|
||||
pinpointComponent: {
|
||||
files: makePath([
|
||||
'time-slider/*.js',
|
||||
'big-scatter-chart/*.js',
|
||||
'infiniteCircularScroll/*.js'
|
||||
'infinite-circular-scroll/*.js',
|
||||
'server-map2/*.js'
|
||||
], COMPONENT_PATH),
|
||||
tasks: ['buildPinpointComponentJS' ]
|
||||
},
|
||||
pinpointSrc: {
|
||||
files: makePath([
|
||||
'common/**/*.js',
|
||||
'features/**/*.js',
|
||||
'pages/**/*.js'
|
||||
], 'main/webapp/' ),
|
||||
tasks: ['buildPinpointSrc' ]
|
||||
}
|
||||
},
|
||||
jshint: {
|
||||
options: {
|
||||
sub: true,
|
||||
boss: true,
|
||||
newcap: false,
|
||||
loopfunc: true
|
||||
},
|
||||
@@ -399,10 +531,20 @@ module.exports = function (grunt) {
|
||||
'concat:infiniteScroll',
|
||||
'uglify:infiniteScroll'
|
||||
]);
|
||||
grunt.registerTask('buildServerMap', '', [
|
||||
'concat:serverMap',
|
||||
'uglify:serverMap'
|
||||
]);
|
||||
grunt.registerTask('buildPinpointSrc', 'Create pinpoint js file', [
|
||||
'concat:pinpointSrc',
|
||||
'uglify:pinpointSrc',
|
||||
'clean:pinpointSrc'
|
||||
]);
|
||||
|
||||
grunt.registerTask('buildAllJS', 'Create js file', [
|
||||
'buildVendorJS',
|
||||
'buildPinpointComponentJS'
|
||||
'buildPinpointComponentJS',
|
||||
'buildPinpointSrc'
|
||||
]);
|
||||
grunt.registerTask('buildVendorJS', 'Create vendor js file', [
|
||||
'buildBaseLibJS',
|
||||
@@ -411,10 +553,11 @@ module.exports = function (grunt) {
|
||||
'buildAngularJS',
|
||||
'clean:vendorJS'
|
||||
]);
|
||||
grunt.registerTask('buildPinpointComponentJS', 'Create pinpoint js file', [
|
||||
grunt.registerTask('buildPinpointComponentJS', 'Create pinpoint component js file', [
|
||||
'buildTimeSlider',
|
||||
'buildBigScatter',
|
||||
'buildInfiniteScroll',
|
||||
'buildServerMap',
|
||||
'concat:pinpointComponent',
|
||||
'clean:pinpointComponentJS'
|
||||
]);
|
||||
@@ -423,15 +566,15 @@ module.exports = function (grunt) {
|
||||
'concat:vernderCSS',
|
||||
'concat:pinpointCSS'
|
||||
]);
|
||||
grunt.registerTask('buildVendorCSS', 'Create css file', [
|
||||
grunt.registerTask('buildVendorCSS', 'Create vendor css file', [
|
||||
'concat:vernderCSS'
|
||||
]);
|
||||
grunt.registerTask('buildPinpointCSS', 'Create css file', [
|
||||
grunt.registerTask('buildPinpointCSS', 'Create pinpoint css file', [
|
||||
'concat:pinpointCSS'
|
||||
]);
|
||||
grunt.registerTask('watchDev', 'Watch js, css', [
|
||||
'watch:jsDev',
|
||||
'watch:cssDev'
|
||||
grunt.registerTask('watchDev', 'Watch your source', [
|
||||
'jshint',
|
||||
'watch:pinpoint'
|
||||
]);
|
||||
grunt.registerTask('jshintDev', '', [
|
||||
'jshint'
|
||||
|
||||
@@ -14,30 +14,37 @@
|
||||
});
|
||||
|
||||
pinpointApp.service( "CommonAjaxService", [ "CommonAjaxServiceConfig", "$http", function( cfg, $http ) {
|
||||
|
||||
|
||||
this.getSQLBind = function(url, data, cb) {
|
||||
$http.post( url, data).success( function( result ) {
|
||||
cb( result );
|
||||
}).error( function( error ) {
|
||||
cb( error );
|
||||
});
|
||||
//jQuery.ajax({
|
||||
// type: 'POST',
|
||||
// url: url,
|
||||
// data: data,
|
||||
// cache: false,
|
||||
// dataType: 'json',
|
||||
// success: function (result) {
|
||||
// if (angular.isFunction(cb)) {
|
||||
// cb(result);
|
||||
// }
|
||||
//$http({
|
||||
// "url": url,
|
||||
// "method": "POST",
|
||||
// "headers": {
|
||||
// "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"
|
||||
// },
|
||||
// error: function (xhr, status, error) {
|
||||
// if (angular.isFunction(cb)) {
|
||||
// cb(error);
|
||||
// }
|
||||
// }
|
||||
// "data": data
|
||||
//}).then(function(result) {
|
||||
// cb( result );
|
||||
//}, function( error ) {
|
||||
// cb( error );
|
||||
//});
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
url: url,
|
||||
data: data,
|
||||
cache: false,
|
||||
dataType: 'json',
|
||||
success: function (result) {
|
||||
if (angular.isFunction(cb)) {
|
||||
cb(result);
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
if (angular.isFunction(cb)) {
|
||||
cb(error);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
this.getServerTime = function( cb ) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* @name UserLocalesService
|
||||
* @class
|
||||
*/
|
||||
pinpointApp.factory("UserLocalesService", function( $window) {
|
||||
pinpointApp.factory("UserLocalesService", [ "$window", function( $window ) {
|
||||
var defaultLocale = "en";
|
||||
// May not be the best way to get locale.
|
||||
var localeCode = $window.navigator.userLanguage || $window.navigator.language;
|
||||
@@ -20,5 +20,5 @@
|
||||
"userLocale" : localeCode,
|
||||
"defaultLocale" : defaultLocale
|
||||
};
|
||||
});
|
||||
}]);
|
||||
})();
|
||||
@@ -137,7 +137,7 @@
|
||||
$rootScope.$broadcast( "responseTimeChartDirective.loadRealtime", applicationName, oScatterChart.getCurrentAgent(), oChartXRange.min, oChartXRange.max );
|
||||
}));
|
||||
} else {
|
||||
oScatterChart.addBubbleAndMoveAndDraw( scatterData );
|
||||
oScatterChart.addBubbleAndMoveAndDraw( oScatterChart.createDataBlock( scatterData ) );
|
||||
}
|
||||
$window.htoScatter[application] = oScatterChart;
|
||||
}, 100);
|
||||
@@ -158,14 +158,13 @@
|
||||
htScatterSet[application].scatter.resume();
|
||||
htScatterSet[application].scatter.selectAgent( preferenceService.getAgentAllStr(), true);
|
||||
}
|
||||
|
||||
} else {
|
||||
makeNewScatter( application, w, h );
|
||||
}
|
||||
}
|
||||
function showScatterWithData(application, w, h, data) {
|
||||
if (angular.isDefined(htScatterSet[application])) {
|
||||
htScatterSet[application].scatter.addBubbleAndMoveAndDraw( data );
|
||||
htScatterSet[application].scatter.addBubbleAndMoveAndDraw( htScatterSet[application].scatter.createDataBlocK( data ) );
|
||||
} else {
|
||||
makeNewScatter(application, w, h, data).hide();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
<script src="lib/js/util-lib.min.js?v=${buildTime}"></script>
|
||||
<script src="lib/js/pinpoint-component.min.js?v=${buildTime}"></script>
|
||||
|
||||
<script src="features/serverMap/jquery.ServerMap2.js?v=${buildTime}"></script>
|
||||
<script src="scripts/extra/google-analytics.js?v=${buildTime}"></script>
|
||||
</head>
|
||||
<body ng-app="pinpointApp">
|
||||
@@ -353,77 +352,8 @@
|
||||
|
||||
<!-- build:js({.tmp,app}) scripts/scripts.js -->
|
||||
<script src="scripts/app.js?v=${buildTime}"></script>
|
||||
<script src="scripts/extra/checkLoginSession.js"></script>
|
||||
|
||||
<script src="common/filters/icon-url.filter.js?v=${buildTime}"></script>
|
||||
<script src="common/filters/application-name-to-class-name.filter.js?v=${buildTime}"></script>
|
||||
<script src="common/services/time-slider-vo.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/alerts.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/progress-bar.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/navbar-vo.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/transaction-dao.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/location.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/server-map-dao.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/agent-dao.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/sidebar-title-vo.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/filtered-map-util.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/filter.config.js?v=${buildTime}"></script>
|
||||
<script src="common/services/server-map-filter-vo.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/alarm-ajax.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/alarm-util.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/alarm-broadcast.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/server-map-hint-vo.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/is-visible.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/user-locales.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/help-content.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/analytics.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/realtime-websocket.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/preference.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/common-ajax.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/agent-ajax.service.js?v=${buildTime}"></script>
|
||||
<script src="common/services/tooltip.service.js?v=${buildTime}"></script>
|
||||
<script src="common/help/help-content-en.js?v=${buildTime}"></script>
|
||||
<script src="common/help/help-content-ko.js?v=${buildTime}"></script>
|
||||
<script src="common/help/help-content-template.js?v=${buildTime}"></script>
|
||||
|
||||
<script src="features/navbar/navbar.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/serverMap/server-map.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/realtimeChart/realtime-chart.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/scatter/scatter.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/nodeInfoDetails/node-info-details.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/linkInfoDetails/link-info-details.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/serverList/server-list.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/agentList/agent-list.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/agentInfo/agent-info.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/timeSlider/time-slider.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/transactionTable/transaction-table.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/timeline/timeline.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/agentChartGroup/agent-chart-group.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/sidebar/title/sidebar-title.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/sidebar/filter/filter-information.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/distributedCallFlow/distributed-call-flow.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/responseTimeChart/response-time-chart.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/loadChart/load-chart.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/jvmMemoryChart/jvm-memory-chart.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/cpuLoadChart/cpu-load-chart.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/tpsChart/tps-chart.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/loading/loading.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/configuration/configuration.controller.js?v=${buildTime}"></script>
|
||||
<script src="features/configuration/help/help.controller.js?v=${buildTime}"></script>
|
||||
<script src="features/configuration/general/general.controller.js?v=${buildTime}"></script>
|
||||
<script src="features/configuration/alarm/alarm-user-group.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/configuration/alarm/alarm-group-member.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/configuration/alarm/alarm-pinpoint-user.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/configuration/alarm/alarm-rule.directive.js?v=${buildTime}"></script>
|
||||
<script src="features/realtimeChart/realtime-chart.controller.js?v=${buildTime}"></script>
|
||||
|
||||
<script src="pages/main/main.controller.js?v=${buildTime}"></script>
|
||||
<script src="pages/inspector/inspector.controller.js?v=${buildTime}"></script>
|
||||
<script src="pages/transactionList/transaction-list.controller.js?v=${buildTime}"></script>
|
||||
<script src="pages/transactionDetail/transaction-detail.controller.js?v=${buildTime}"></script>
|
||||
<script src="pages/filteredMap/filtered-map.controller.js?v=${buildTime}"></script>
|
||||
<script src="pages/transactionView/transaction-view.controller.js?v=${buildTime}"></script>
|
||||
<script src="pages/scatterFullScreenMode/scatter-full-screen-mode.controller.js?v=${buildTime}"></script>
|
||||
<script src="lib/js/pinpoint.min.js?v=${buildTime}"></script>
|
||||
<script>
|
||||
G_BUILD_TIME = "${buildTime}";
|
||||
</script>
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
/*! pinpoint - v1.5.2 - 2016-03-15*/!function(a,b){"use strict";var c=8,d=function(a){this.options=a,this._init(),this._initOption(),this._initVar(),this._initEvent(),this._renderScrollArea()};d.prototype._init=function(){this.$wrapper=this.options.wrapper,this._threshold=this.options.elementHeight*(c/4)},d.prototype._initOption=function(){this._viewAreaHeight=this.options.viewAreaHeight,this._renderFunc=this.options.renderFunc||function(){},this._source=this.options.source,this._previousTop=0,this._previousTime=-1,this._selectedRow=-1},d.prototype._initVar=function(){this._elementArray=[],this._elementArrayStartIndex=0,this._elementArrayEndIndex=0,this._elementArraySize=0,this._previousTop=0},d.prototype._initEvent=function(){var a=this;this.options.scroller.on("scroll",function(c){a._scrollEventHandler(c,b(this))})},d.prototype._isDefined=function(a){return"undefined"!=typeof a},d.prototype._renderScrollArea=function(){this._isDefined(this._source)&&this._isDefined(this.options.viewAreaHeight)&&this.reset()},d.prototype._calculateElementStartCount=function(){var a=parseInt(this._viewAreaHeight/this.options.elementHeight)+c;this._elementArraySize=a>this._source.length?this._source.length:a,this._elementArrayEndIndex=this._elementArraySize-1,this.$wrapper.height(this._source.length*this.options.elementHeight)},d.prototype._initElementArray=function(){this.$wrapper.empty();for(var a=0;a<this._elementArraySize;a++){var c=b(this.options.template);this._renderElement(c,a),this._elementArray.push(c),this.$wrapper.append(c)}},d.prototype._renderElement=function(a,b){this._renderFunc.call(this,a,b,this._source[b]),a.attr("data-index",b).css("top",b*this.options.elementHeight+"px")},d.prototype._getDataIndex=function(a){return parseInt(this._elementArray[a].attr("data-index"))},d.prototype._getTopByIndex=function(a){return parseInt(this._elementArray[a].css("top"))},d.prototype._getNextArrayIndex=function(a){return a+1>=this._elementArraySize?0:a+1},d.prototype._getPreviousArrayIndex=function(a){return(0>a-1?this._elementArraySize:a)-1},d.prototype._scrollEventHandler=function(a,b){var c=b.scrollTop(),d=(new Date).valueOf();if(c!=this._previousTop){var e=c-this._previousTop>0;e?this._scrollDown(c,this._getTopByIndex(this._elementArrayStartIndex)):this._scrollUp(c,this._getTopByIndex(this._elementArrayEndIndex)),this._previousTop=c,this._previousTime=d}},d.prototype._scrollDown=function(a,b){var c=a-b-this._threshold;if(c>=0){for(var d=this._getDataIndex(this._elementArrayEndIndex),e=this._elementArrayStartIndex,f=parseInt(c/this.options.elementHeight),g=0;f>g;g++){var h=d+g+1;if(h>=this._source.length)break;f-g<=2*this._elementArraySize&&this._renderElement(this._elementArray[e],h),e=this._getNextArrayIndex(e)}this._elementArrayStartIndex=e,this._elementArrayEndIndex=this._getPreviousArrayIndex(e)}},d.prototype._scrollUp=function(a,b){var c=b+this.options.elementHeight-a-this._viewAreaHeight-this._threshold;if(c>=0){for(var d=this._getDataIndex(this._elementArrayStartIndex),e=this._elementArrayEndIndex,f=parseInt(c/this.options.elementHeight),g=0;f>g;g++){var h=d-(g+1);if(0>h)break;f-g<=2*this._elementArraySize&&this._renderElement(this._elementArray[e],h),e=this._getPreviousArrayIndex(e)}this._elementArrayEndIndex=e,this._elementArrayStartIndex=this._getNextArrayIndex(e)}},d.prototype.source=function(){return 1==arguments.length?(this.options.source=arguments[0],this):this._source},d.prototype.viewAreaHeight=function(){return 1==arguments.length?(this.options.viewAreaHeight=arguments[0],this):this._viewAreaHeight},d.prototype.renderFunc=function(){return 1==arguments.length?(this.options.renderFunc=arguments[0],this):this._renderFunc},d.prototype.reset=function(){return this._initOption(),this._initVar(),this._calculateElementStartCount(),this._initElementArray(),this},d.prototype.contentsAreaHeight=function(){return this.options.elementHeight*this._source.length},d.prototype.destroy=function(){this.options.scroller.off("scroll")},d.prototype.resize=function(a){if(this._isDefined(this._source)!==!1){var b=parseInt(this.options.scroller.scrollTop()/this.options.elementHeight);this.reset(),this.moveByRow(b)}},d.prototype.moveByRow=function(a){var b=this;setTimeout(function(){b.options.scroller.scrollTop(a*b.options.elementHeight)},0)},d.prototype.searchRow=function(a,b,c){var d=-1;b=-1==b?this._source.length:b;for(var e=a;b>e;e++)if(c(this._source[e])){d=e;break}return d},d.prototype.selectedRow=function(a,b){return 0==arguments.length?this._selectedRow:(b.call(this,a),this._selectedRow=a,this)},a.InfiniteCircularScroll=d}(window,jQuery);
|
||||
/*! pinpoint - v1.5.2 - 2016-03-17*/!function(a,b){"use strict";var c=8,d=function(a){this.options=a,this._init(),this._initOption(),this._initVar(),this._initEvent(),this._renderScrollArea()};d.prototype._init=function(){this.$wrapper=this.options.wrapper,this._threshold=this.options.elementHeight*(c/4)},d.prototype._initOption=function(){this._viewAreaHeight=this.options.viewAreaHeight,this._renderFunc=this.options.renderFunc||function(){},this._source=this.options.source,this._previousTop=0,this._previousTime=-1,this._selectedRow=-1},d.prototype._initVar=function(){this._elementArray=[],this._elementArrayStartIndex=0,this._elementArrayEndIndex=0,this._elementArraySize=0,this._previousTop=0},d.prototype._initEvent=function(){var a=this;this.options.scroller.on("scroll",function(c){a._scrollEventHandler(c,b(this))})},d.prototype._isDefined=function(a){return"undefined"!=typeof a},d.prototype._renderScrollArea=function(){this._isDefined(this._source)&&this._isDefined(this.options.viewAreaHeight)&&this.reset()},d.prototype._calculateElementStartCount=function(){var a=parseInt(this._viewAreaHeight/this.options.elementHeight)+c;this._elementArraySize=a>this._source.length?this._source.length:a,this._elementArrayEndIndex=this._elementArraySize-1,this.$wrapper.height(this._source.length*this.options.elementHeight)},d.prototype._initElementArray=function(){this.$wrapper.empty();for(var a=0;a<this._elementArraySize;a++){var c=b(this.options.template);this._renderElement(c,a),this._elementArray.push(c),this.$wrapper.append(c)}},d.prototype._renderElement=function(a,b){this._renderFunc.call(this,a,b,this._source[b]),a.attr("data-index",b).css("top",b*this.options.elementHeight+"px")},d.prototype._getDataIndex=function(a){return parseInt(this._elementArray[a].attr("data-index"))},d.prototype._getTopByIndex=function(a){return parseInt(this._elementArray[a].css("top"))},d.prototype._getNextArrayIndex=function(a){return a+1>=this._elementArraySize?0:a+1},d.prototype._getPreviousArrayIndex=function(a){return(0>a-1?this._elementArraySize:a)-1},d.prototype._scrollEventHandler=function(a,b){var c=b.scrollTop(),d=(new Date).valueOf();if(c!=this._previousTop){var e=c-this._previousTop>0;e?this._scrollDown(c,this._getTopByIndex(this._elementArrayStartIndex)):this._scrollUp(c,this._getTopByIndex(this._elementArrayEndIndex)),this._previousTop=c,this._previousTime=d}},d.prototype._scrollDown=function(a,b){var c=a-b-this._threshold;if(c>=0){for(var d=this._getDataIndex(this._elementArrayEndIndex),e=this._elementArrayStartIndex,f=parseInt(c/this.options.elementHeight),g=0;f>g;g++){var h=d+g+1;if(h>=this._source.length)break;f-g<=2*this._elementArraySize&&this._renderElement(this._elementArray[e],h),e=this._getNextArrayIndex(e)}this._elementArrayStartIndex=e,this._elementArrayEndIndex=this._getPreviousArrayIndex(e)}},d.prototype._scrollUp=function(a,b){var c=b+this.options.elementHeight-a-this._viewAreaHeight-this._threshold;if(c>=0){for(var d=this._getDataIndex(this._elementArrayStartIndex),e=this._elementArrayEndIndex,f=parseInt(c/this.options.elementHeight),g=0;f>g;g++){var h=d-(g+1);if(0>h)break;f-g<=2*this._elementArraySize&&this._renderElement(this._elementArray[e],h),e=this._getPreviousArrayIndex(e)}this._elementArrayEndIndex=e,this._elementArrayStartIndex=this._getNextArrayIndex(e)}},d.prototype.source=function(){return 1==arguments.length?(this.options.source=arguments[0],this):this._source},d.prototype.viewAreaHeight=function(){return 1==arguments.length?(this.options.viewAreaHeight=arguments[0],this):this._viewAreaHeight},d.prototype.renderFunc=function(){return 1==arguments.length?(this.options.renderFunc=arguments[0],this):this._renderFunc},d.prototype.reset=function(){return this._initOption(),this._initVar(),this._calculateElementStartCount(),this._initElementArray(),this},d.prototype.contentsAreaHeight=function(){return this.options.elementHeight*this._source.length},d.prototype.destroy=function(){this.options.scroller.off("scroll")},d.prototype.resize=function(a){if(this._isDefined(this._source)!==!1){var b=parseInt(this.options.scroller.scrollTop()/this.options.elementHeight);this.reset(),this.moveByRow(b)}},d.prototype.moveByRow=function(a){var b=this;setTimeout(function(){b.options.scroller.scrollTop(a*b.options.elementHeight)},0)},d.prototype.searchRow=function(a,b,c){var d=-1;b=-1==b?this._source.length:b;for(var e=a;b>e;e++)if(c(this._source[e])){d=e;break}return d},d.prototype.selectedRow=function(a,b){return 0==arguments.length?this._selectedRow:(b.call(this,a),this._selectedRow=a,this)},a.InfiniteCircularScroll=d}(window,jQuery);
|
||||
+6
-3818
File diff suppressed because one or more lines are too long
+10
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user