Added: added some js files for dashboard graphs
This commit is contained in:
parent
614cce4d34
commit
4035261cb7
6 changed files with 379 additions and 0 deletions
57
upload/admin_area/styles/cb_2014/theme/js/jquery.amcharts.js
Normal file
57
upload/admin_area/styles/cb_2014/theme/js/jquery.amcharts.js
Normal file
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,295 @@
|
|||
/*
|
||||
* jQuery Bootstrap News Box v1.0.1
|
||||
*
|
||||
* Copyright 2014, Dragan Mitrovic
|
||||
* email: gagi270683@gmail.com
|
||||
* Free to use and abuse under the MIT license.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
*/
|
||||
|
||||
//Utility
|
||||
if (typeof Object.create !== 'function') {
|
||||
//Douglas Crockford inheritance function
|
||||
Object.create = function (obj) {
|
||||
function F() { };
|
||||
F.prototype = obj;
|
||||
return new F();
|
||||
};
|
||||
}
|
||||
|
||||
(function ($, w, d, undefined) {
|
||||
|
||||
var NewsBox = {
|
||||
|
||||
init: function ( options, elem ) {
|
||||
//cache the references
|
||||
var self = this;
|
||||
self.elem = elem;
|
||||
self.$elem = $( elem );
|
||||
|
||||
self.newsTagName = self.$elem.find(":first-child").prop('tagName');
|
||||
self.newsClassName = self.$elem.find(":first-child").attr('class');
|
||||
|
||||
self.timer = null;
|
||||
self.resizeTimer = null; // used with window.resize event
|
||||
self.animationStarted = false;
|
||||
self.isHovered = false;
|
||||
|
||||
|
||||
if ( typeof options === 'string' ) {
|
||||
//string was passed
|
||||
if(console) {
|
||||
console.error("String property override is not supported");
|
||||
}
|
||||
throw ("String property override is not supported");
|
||||
} else {
|
||||
//object was passed
|
||||
//extend user options overrides
|
||||
self.options = $.extend( {}, $.fn.bootstrapNews.options, options );
|
||||
|
||||
self.prepareLayout();
|
||||
|
||||
|
||||
//autostart animation
|
||||
if(self.options.autoplay) {
|
||||
self.animate();
|
||||
}
|
||||
|
||||
if ( self.options.navigation ) {
|
||||
self.buildNavigation();
|
||||
}
|
||||
|
||||
//enable users to override the methods
|
||||
if( typeof self.options.onToDo === 'function') {
|
||||
self.options.onToDo.apply(self, arguments);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
prepareLayout: function() {
|
||||
var self = this;
|
||||
|
||||
//checking mouse position
|
||||
|
||||
$(self.elem).find('.'+self.newsClassName).on('mouseenter', function(){
|
||||
self.onReset(true);
|
||||
});
|
||||
|
||||
$(self.elem).find('.'+self.newsClassName).on('mouseout', function(){
|
||||
self.onReset(false);
|
||||
});
|
||||
|
||||
//set news visible / hidden
|
||||
$.map(self.$elem.find(self.newsTagName), function(newsItem, index){
|
||||
if(index > self.options.newsPerPage - 1) {
|
||||
$(newsItem).hide();
|
||||
} else {
|
||||
$(newsItem).show();
|
||||
}
|
||||
});
|
||||
|
||||
//prevent user to select more news that it actualy have
|
||||
|
||||
if( self.$elem.find(self.newsTagName).length < self.options.newsPerPage ) {
|
||||
self.options.newsPerPage = self.$elem.find(self.newsTagName).length;
|
||||
}
|
||||
|
||||
//get height of the very first self.options.newsPerPage news
|
||||
var height = 0;
|
||||
|
||||
$.map(self.$elem.find(self.newsTagName), function( newsItem, index ) {
|
||||
if ( index < self.options.newsPerPage ) {
|
||||
height = parseInt(height) + parseInt($(newsItem).height()) + 10;
|
||||
}
|
||||
});
|
||||
|
||||
$(self.elem).css({"overflow-y": "hidden", "height": height});
|
||||
|
||||
//recalculate news box height for responsive interfaces
|
||||
$( w ).resize(function() {
|
||||
if ( self.resizeTimer !== null ) {
|
||||
clearTimeout( self.resizeTimer );
|
||||
}
|
||||
self.resizeTimer = setTimeout( function() {
|
||||
self.prepareLayout();
|
||||
}, 200 );
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
findPanelObject: function() {
|
||||
var panel = this.$elem;
|
||||
|
||||
while ( panel.parent() !== undefined ) {
|
||||
panel = panel.parent();
|
||||
if ( panel.parent().hasClass('panel') ) {
|
||||
return panel.parent();
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
},
|
||||
|
||||
buildNavigation: function() {
|
||||
var panel = this.findPanelObject();
|
||||
if( panel ) {
|
||||
var nav = '<ul class="pagination pull-right" style="margin: 0px;">' +
|
||||
'<li><a href="#" class="prev"><span class="glyphicon glyphicon-chevron-down"></span></a></li>' +
|
||||
'<li><a href="#" class="next"><span class="glyphicon glyphicon-chevron-up"></span></a></li>' +
|
||||
'</ul><div class="clearfix"></div>';
|
||||
|
||||
|
||||
var footer = $(panel).find(".panel-footer")[0];
|
||||
if( footer ) {
|
||||
$(footer).append(nav);
|
||||
} else {
|
||||
$(panel).append('<div class="panel-footer">' + nav + '</div>');
|
||||
}
|
||||
|
||||
var self = this;
|
||||
$(panel).find('.prev').on('click', function(ev){
|
||||
ev.preventDefault();
|
||||
self.onPrev();
|
||||
});
|
||||
|
||||
$(panel).find('.next').on('click', function(ev){
|
||||
ev.preventDefault();
|
||||
self.onNext();
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
onStop: function() {
|
||||
|
||||
},
|
||||
|
||||
onPause: function() {
|
||||
var self = this;
|
||||
self.isHovered = true;
|
||||
if(this.options.autoplay && self.timer) {
|
||||
clearTimeout(self.timer);
|
||||
}
|
||||
},
|
||||
|
||||
onReset: function(status) {
|
||||
var self = this;
|
||||
if(self.timer) {
|
||||
clearTimeout(self.timer);
|
||||
}
|
||||
|
||||
if(self.options.autoplay) {
|
||||
self.isHovered = status;
|
||||
self.animate();
|
||||
}
|
||||
},
|
||||
|
||||
animate: function() {
|
||||
var self = this;
|
||||
self.timer = setTimeout(function() {
|
||||
|
||||
if ( !self.options.pauseOnHover ) {
|
||||
self.isHovered = false;
|
||||
}
|
||||
|
||||
if (! self.isHovered) {
|
||||
if(self.options.direction === 'up') {
|
||||
self.onNext();
|
||||
} else {
|
||||
self.onPrev();
|
||||
}
|
||||
}
|
||||
}, self.options.newsTickerInterval);
|
||||
},
|
||||
|
||||
onPrev: function() {
|
||||
|
||||
var self = this;
|
||||
|
||||
if ( self.animationStarted ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
self.animationStarted = true;
|
||||
|
||||
var html = '<' + self.newsTagName + ' style="display:none;" class="' + self.newsClassName + '">' + $(self.$elem).find(self.newsTagName).last().html() + '</' + self.newsTagName + '>';
|
||||
$(self.$elem).prepend(html);
|
||||
$(self.$elem).find(self.newsTagName).first().slideDown(self.options.animationSpeed, function(){
|
||||
$(self.$elem).find(self.newsTagName).last().remove();
|
||||
});
|
||||
|
||||
$(self.$elem).find(self.newsTagName +':nth-child(' + parseInt(self.options.newsPerPage + 1) + ')').slideUp(self.options.animationSpeed, function(){
|
||||
self.animationStarted = false;
|
||||
self.onReset(self.isHovered);
|
||||
});
|
||||
|
||||
$(self.elem).find('.'+self.newsClassName).on('mouseenter', function(){
|
||||
self.onReset(true);
|
||||
});
|
||||
|
||||
$(self.elem).find('.'+self.newsClassName).on('mouseout', function(){
|
||||
self.onReset(false);
|
||||
});
|
||||
},
|
||||
|
||||
onNext: function() {
|
||||
var self = this;
|
||||
|
||||
if ( self.animationStarted ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
self.animationStarted = true;
|
||||
|
||||
var html = '<' + self.newsTagName + ' style="display:none;" class=' + self.newsClassName + '>' + $(self.$elem).find(self.newsTagName).first().html() + '</' + self.newsTagName + '>';
|
||||
$(self.$elem).append(html);
|
||||
|
||||
$(self.$elem).find(self.newsTagName).first().slideUp(self.options.animationSpeed, function(){
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
$(self.$elem).find(self.newsTagName +':nth-child(' + parseInt(self.options.newsPerPage + 1) + ')').slideDown(self.options.animationSpeed, function(){
|
||||
self.animationStarted = false;
|
||||
self.onReset(self.isHovered);
|
||||
});
|
||||
|
||||
$(self.elem).find('.'+self.newsClassName).on('mouseenter', function(){
|
||||
self.onReset(true);
|
||||
});
|
||||
|
||||
$(self.elem).find('.'+self.newsClassName).on('mouseout', function(){
|
||||
self.onReset(false);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.bootstrapNews = function ( options ) {
|
||||
//enable multiple DOM object selection (class selector) + enable chaining like $(".class").bootstrapNews().chainingMethod()
|
||||
return this.each( function () {
|
||||
|
||||
var newsBox = Object.create( NewsBox );
|
||||
|
||||
newsBox.init( options, this );
|
||||
//console.log(newsBox);
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.bootstrapNews.options = {
|
||||
newsPerPage: 4,
|
||||
navigation: true,
|
||||
autoplay: true,
|
||||
direction:'up',
|
||||
animationSpeed: 'normal',
|
||||
newsTickerInterval: 4000, //4 secs
|
||||
pauseOnHover: true,
|
||||
onStop: null,
|
||||
onPause: null,
|
||||
onReset: null,
|
||||
onPrev: null,
|
||||
onNext: null,
|
||||
onToDo: null
|
||||
};
|
||||
|
||||
})(jQuery, window, document);
|
9
upload/admin_area/styles/cb_2014/theme/js/jquery.bootstrap.newsbox.min.js
vendored
Normal file
9
upload/admin_area/styles/cb_2014/theme/js/jquery.bootstrap.newsbox.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
|||
AmCharts.themes.light={themeName:"light",AmChart:{color:"#000000",backgroundColor:"#FFFFFF"},AmCoordinateChart:{colors:["#67b7dc","#fdd400","#84b761","#cc4748","#cd82ad","#2f4074","#448e4d","#b7b83f","#b9783f","#b93e3d","#913167"]},AmStockChart:{colors:["#67b7dc","#fdd400","#84b761","#cc4748","#cd82ad","#2f4074","#448e4d","#b7b83f","#b9783f","#b93e3d","#913167"]},AmSlicedChart:{colors:["#67b7dc","#fdd400","#84b761","#cc4748","#cd82ad","#2f4074","#448e4d","#b7b83f","#b9783f","#b93e3d","#913167"],outlineAlpha:1,outlineThickness:2,labelTickColor:"#000000",labelTickAlpha:0.3},AmRectangularChart:{zoomOutButtonColor:'#000000',zoomOutButtonRollOverAlpha:0.15,zoomOutButtonImage:"lens"},AxisBase:{axisColor:"#000000",axisAlpha:0.3,gridAlpha:0.1,gridColor:"#000000"},ChartScrollbar:{backgroundColor:"#000000",backgroundAlpha:0.12,graphFillAlpha:0.5,graphLineAlpha:0,selectedBackgroundColor:"#FFFFFF",selectedBackgroundAlpha:0.4,gridAlpha:0.15},ChartCursor:{cursorColor:"#000000",color:"#FFFFFF",cursorAlpha:0.5},AmLegend:{color:"#000000"},AmGraph:{lineAlpha:0.9},GaugeArrow:{color:"#000000",alpha:0.8,nailAlpha:0,innerRadius:"40%",nailRadius:15,startWidth:15,borderAlpha:0.8,nailBorderAlpha:0},GaugeAxis:{tickColor:"#000000",tickAlpha:1,tickLength:15,minorTickLength:8,axisThickness:3,axisColor:'#000000',axisAlpha:1,bandAlpha:0.8},TrendLine:{lineColor:"#c03246",lineAlpha:0.8},AreasSettings:{alpha:0.8,color:"#67b7dc",colorSolid:"#003767",unlistedAreasAlpha:0.4,unlistedAreasColor:"#000000",outlineColor:"#FFFFFF",outlineAlpha:0.5,outlineThickness:0.5,rollOverColor:"#3c5bdc",rollOverOutlineColor:"#FFFFFF",selectedOutlineColor:"#FFFFFF",selectedColor:"#f15135",unlistedAreasOutlineColor:"#FFFFFF",unlistedAreasOutlineAlpha:0.5},LinesSettings:{color:"#000000",alpha:0.8},ImagesSettings:{alpha:0.8,labelColor:"#000000",color:"#000000",labelRollOverColor:"#3c5bdc"},ZoomControl:{buttonFillAlpha:0.7,buttonIconColor:"#a7a7a7"},SmallMap:{mapColor:"#000000",rectangleColor:"#f15135",backgroundColor:"#FFFFFF",backgroundAlpha:0.7,borderThickness:1,borderAlpha:0.8},PeriodSelector:{color:"#000000"},PeriodButton:{color:"#000000",background:"transparent",opacity:0.7,border:"1px solid rgba(0, 0, 0, .3)",MozBorderRadius:"5px",borderRadius:"5px",margin:"1px",outline:"none",boxSizing:"border-box"},PeriodButtonSelected:{color:"#000000",backgroundColor:"#b9cdf5",border:"1px solid rgba(0, 0, 0, .3)",MozBorderRadius:"5px",borderRadius:"5px",margin:"1px",outline:"none",opacity:1,boxSizing:"border-box"},PeriodInputField:{color:"#000000",background:"transparent",border:"1px solid rgba(0, 0, 0, .3)",outline:"none"},DataSetSelector:{color:"#000000",selectedBackgroundColor:"#b9cdf5",rollOverBackgroundColor:"#a8b0e4"},DataSetCompareList:{color:"#000000",lineHeight:"100%",boxSizing:"initial",webkitBoxSizing:"initial",border:"1px solid rgba(0, 0, 0, .3)"},DataSetSelect:{border:"1px solid rgba(0, 0, 0, .3)",outline:"none"}};
|
5
upload/admin_area/styles/cb_2014/theme/js/jquery.pie.js
Normal file
5
upload/admin_area/styles/cb_2014/theme/js/jquery.pie.js
Normal file
File diff suppressed because one or more lines are too long
12
upload/admin_area/styles/cb_2014/theme/js/jquery.serial.js
Normal file
12
upload/admin_area/styles/cb_2014/theme/js/jquery.serial.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue