mirror of
https://gitlab.com/signalytic/client-external/streamline/streamline-emr.git
synced 2026-09-13 03:31:31 +00:00
Build modified streamline images
The official image from streamline does not currently work for the arm64 platform. As a temporary measure, the source code and docker build scripts have been lifted from the official images and are used to build locally. Some additional modifications are made to reduce overall image size, these are documented in docker/README.md
This commit is contained in:
+191
@@ -0,0 +1,191 @@
|
||||
[
|
||||
{
|
||||
"id": 0,
|
||||
"name": "test0",
|
||||
"price": "$0",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"name": "test1",
|
||||
"price": "$1",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "test2",
|
||||
"price": "$2",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "test3",
|
||||
"price": "$3",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "test4",
|
||||
"price": "$4",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "test5",
|
||||
"price": "$5",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "test6",
|
||||
"price": "$6",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "test7",
|
||||
"price": "$7",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "test8",
|
||||
"price": "$8",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"name": "test9",
|
||||
"price": "$9",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"name": "test10",
|
||||
"price": "$10",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"name": "test11",
|
||||
"price": "$11",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": "test12",
|
||||
"price": "$12",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"name": "test13",
|
||||
"price": "$13",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"name": "test14",
|
||||
"price": "$14",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"name": "test15",
|
||||
"price": "$15",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"name": "test16",
|
||||
"price": "$16",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"name": "test17",
|
||||
"price": "$17",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 18,
|
||||
"name": "test18",
|
||||
"price": "$18",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"name": "test19",
|
||||
"price": "$19",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"name": "test20",
|
||||
"price": "$20",
|
||||
"column1": "c10",
|
||||
"column2": "c20",
|
||||
"column3": "c30",
|
||||
"column4": "c40"
|
||||
}
|
||||
]
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* cbpFWTabs.js v1.0.0
|
||||
* http://www.codrops.com
|
||||
*
|
||||
* Licensed under the MIT license.
|
||||
* http://www.opensource.org/licenses/mit-license.html
|
||||
*
|
||||
* Copyright 2014, Codrops
|
||||
* http://www.codrops.com
|
||||
*/
|
||||
;( function( window ) {
|
||||
|
||||
'use strict';
|
||||
|
||||
function extend( a, b ) {
|
||||
for( var key in b ) {
|
||||
if( b.hasOwnProperty( key ) ) {
|
||||
a[key] = b[key];
|
||||
}
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
function CBPFWTabs( el, options ) {
|
||||
this.el = el;
|
||||
this.options = extend( {}, this.options );
|
||||
extend( this.options, options );
|
||||
this._init();
|
||||
}
|
||||
|
||||
CBPFWTabs.prototype.options = {
|
||||
start : 0
|
||||
};
|
||||
|
||||
CBPFWTabs.prototype._init = function() {
|
||||
// tabs elems
|
||||
this.tabs = [].slice.call( this.el.querySelectorAll( 'nav > ul > li' ) );
|
||||
// content items
|
||||
this.items = [].slice.call( this.el.querySelectorAll( '.content-wrap > section' ) );
|
||||
// current index
|
||||
this.current = -1;
|
||||
// show current content item
|
||||
this._show();
|
||||
// init events
|
||||
this._initEvents();
|
||||
};
|
||||
|
||||
CBPFWTabs.prototype._initEvents = function() {
|
||||
var self = this;
|
||||
this.tabs.forEach( function( tab, idx ) {
|
||||
tab.addEventListener( 'click', function( ev ) {
|
||||
ev.preventDefault();
|
||||
self._show( idx );
|
||||
} );
|
||||
} );
|
||||
};
|
||||
|
||||
CBPFWTabs.prototype._show = function( idx ) {
|
||||
if( this.current >= 0 ) {
|
||||
this.tabs[ this.current ].className = this.items[ this.current ].className = '';
|
||||
}
|
||||
// change current
|
||||
this.current = idx != undefined ? idx : this.options.start >= 0 && this.options.start < this.items.length ? this.options.start : 0;
|
||||
this.tabs[ this.current ].className = 'tab-current';
|
||||
this.items[ this.current ].className = 'content-current';
|
||||
};
|
||||
|
||||
// add to global namespace
|
||||
window.CBPFWTabs = CBPFWTabs;
|
||||
|
||||
})( window );
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
$('.chat-left-inner > .chatonline').slimScroll({
|
||||
height: '100%',
|
||||
position: 'right',
|
||||
size: "0px",
|
||||
color: '#dcdcdc',
|
||||
|
||||
});
|
||||
$(function(){
|
||||
$(window).load(function(){ // On load
|
||||
$('.chat-list').css({'height':(($(window).height())-420)+'px'});
|
||||
});
|
||||
$(window).resize(function(){ // On resize
|
||||
$('.chat-list').css({'height':(($(window).height())-420)+'px'});
|
||||
});
|
||||
});
|
||||
|
||||
// this is for the left-aside-fix in content area with scroll
|
||||
|
||||
$(function() {
|
||||
$(window).load(function() { // On load
|
||||
$('.chat-left-inner').css({
|
||||
'height': (($(window).height()) - 240) + 'px'
|
||||
});
|
||||
});
|
||||
$(window).resize(function() { // On resize
|
||||
$('.chat-left-inner').css({
|
||||
'height': (($(window).height()) - 240) + 'px'
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(".open-panel").click(function() {
|
||||
$(".chat-left-aside").toggleClass("open-pnl");
|
||||
$(".open-panel i").toggleClass("ti-angle-left");
|
||||
});
|
||||
|
||||
+239
@@ -0,0 +1,239 @@
|
||||
/*jslint browser: true*/
|
||||
/*global $, jQuery, alert*/
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
"use strict";
|
||||
|
||||
var body = $("body");
|
||||
|
||||
$(function () {
|
||||
$(".preloader").fadeOut();
|
||||
$('#side-menu').metisMenu();
|
||||
});
|
||||
|
||||
/* ===== Open-Close Right Sidebar ===== */
|
||||
|
||||
$(".right-side-toggle").on("click", function () {
|
||||
$(".right-sidebar").slideDown(50).toggleClass("shw-rside");
|
||||
$(".fxhdr").on("click", function () {
|
||||
body.toggleClass("fix-header"); /* Fix Header JS */
|
||||
});
|
||||
$(".fxsdr").on("click", function () {
|
||||
body.toggleClass("fix-sidebar"); /* Fix Sidebar JS */
|
||||
});
|
||||
|
||||
/* ===== Service Panel JS ===== */
|
||||
|
||||
var fxhdr = $('.fxhdr');
|
||||
if (body.hasClass("fix-header")) {
|
||||
fxhdr.attr('checked', true);
|
||||
} else {
|
||||
fxhdr.attr('checked', false);
|
||||
}
|
||||
if (body.hasClass("fix-sidebar")) {
|
||||
fxhdr.attr('checked', true);
|
||||
} else {
|
||||
fxhdr.attr('checked', false);
|
||||
}
|
||||
});
|
||||
|
||||
/* ===========================================================
|
||||
Loads the correct sidebar on window load.
|
||||
collapses the sidebar on window resize.
|
||||
Sets the min-height of #page-wrapper to window size.
|
||||
=========================================================== */
|
||||
|
||||
$(function () {
|
||||
var set = function () {
|
||||
var topOffset = 60,
|
||||
width = (window.innerWidth > 0) ? window.innerWidth : this.screen.width,
|
||||
height = ((window.innerHeight > 0) ? window.innerHeight : this.screen.height) - 1;
|
||||
if (width < 768) {
|
||||
$('div.navbar-collapse').addClass('collapse');
|
||||
topOffset = 100; /* 2-row-menu */
|
||||
} else {
|
||||
$('div.navbar-collapse').removeClass('collapse');
|
||||
}
|
||||
|
||||
/* ===== This is for resizing window ===== */
|
||||
|
||||
if (width < 1170) {
|
||||
body.addClass('content-wrapper');
|
||||
$(".open-close i").removeClass('icon-arrow-left-circle');
|
||||
$(".sidebar-nav, .slimScrollDiv").css("overflow-x", "visible").parent().css("overflow", "visible");
|
||||
$(".logo span").hide();
|
||||
} else {
|
||||
body.removeClass('content-wrapper');
|
||||
$(".open-close i").addClass('icon-arrow-left-circle');
|
||||
$(".logo span").show();
|
||||
}
|
||||
|
||||
height = height - topOffset;
|
||||
if (height < 1) {
|
||||
height = 1;
|
||||
}
|
||||
if (height > topOffset) {
|
||||
$("#page-wrapper").css("min-height", (height) + "px");
|
||||
}
|
||||
},
|
||||
url = window.location,
|
||||
element = $('ul.nav a').filter(function () {
|
||||
return this.href === url || url.href.indexOf(this.href) === 0;
|
||||
}).addClass('active').parent().parent().addClass('in').parent();
|
||||
if (element.is('li')) {
|
||||
element.addClass('active');
|
||||
}
|
||||
$(window).ready(set);
|
||||
$(window).on("resize", set);
|
||||
});
|
||||
|
||||
/* ===================================================
|
||||
This is for click on open close button
|
||||
Sidebar open close
|
||||
=================================================== */
|
||||
|
||||
$(".open-close").on('click', function () {
|
||||
if ($("body").hasClass("content-wrapper")) {
|
||||
$("body").trigger("resize");
|
||||
$(".sidebar-nav, .slimScrollDiv").css("overflow", "hidden").parent().css("overflow", "visible");
|
||||
$("body").removeClass("content-wrapper");
|
||||
$(".open-close i").addClass("icon-arrow-left-circle");
|
||||
$(".logo span").show();
|
||||
} else {
|
||||
$("body").trigger("resize");
|
||||
$(".sidebar-nav, .slimScrollDiv").css("overflow-x", "visible").parent().css("overflow", "visible");
|
||||
$("body").addClass("content-wrapper");
|
||||
$(".open-close i").removeClass("icon-arrow-left-circle");
|
||||
$(".logo span").hide();
|
||||
}
|
||||
});
|
||||
|
||||
/* ===== Collapsible Panels JS ===== */
|
||||
|
||||
(function ($, window, document) {
|
||||
var panelSelector = '[data-perform="panel-collapse"]',
|
||||
panelRemover = '[data-perform="panel-dismiss"]';
|
||||
$(panelSelector).each(function () {
|
||||
var collapseOpts = {
|
||||
toggle: false
|
||||
},
|
||||
parent = $(this).closest('.panel'),
|
||||
wrapper = parent.find('.panel-wrapper'),
|
||||
child = $(this).children('i');
|
||||
if (!wrapper.length) {
|
||||
wrapper = parent.children('.panel-heading').nextAll().wrapAll('<div/>').parent().addClass('panel-wrapper');
|
||||
collapseOpts = {};
|
||||
}
|
||||
wrapper.collapse(collapseOpts).on('hide.bs.collapse', function () {
|
||||
child.removeClass('ti-minus').addClass('ti-plus');
|
||||
}).on('show.bs.collapse', function () {
|
||||
child.removeClass('ti-plus').addClass('ti-minus');
|
||||
});
|
||||
});
|
||||
|
||||
/* ===== Collapse Panels ===== */
|
||||
|
||||
$(document).on('click', panelSelector, function (e) {
|
||||
e.preventDefault();
|
||||
var parent = $(this).closest('.panel'),
|
||||
wrapper = parent.find('.panel-wrapper');
|
||||
wrapper.collapse('toggle');
|
||||
});
|
||||
|
||||
/* ===== Remove Panels ===== */
|
||||
|
||||
$(document).on('click', panelRemover, function (e) {
|
||||
e.preventDefault();
|
||||
var removeParent = $(this).closest('.panel');
|
||||
|
||||
function removeElement() {
|
||||
var col = removeParent.parent();
|
||||
removeParent.remove();
|
||||
col.filter(function () {
|
||||
return ($(this).is('[class*="col-"]') && $(this).children('*').length === 0);
|
||||
}).remove();
|
||||
}
|
||||
removeElement();
|
||||
});
|
||||
}(jQuery, window, document));
|
||||
|
||||
/* ===== Tooltip Initialization ===== */
|
||||
|
||||
$(function () {
|
||||
$('[data-toggle="tooltip"]').tooltip();
|
||||
});
|
||||
|
||||
/* ===== Popover Initialization ===== */
|
||||
|
||||
$(function () {
|
||||
$('[data-toggle="popover"]').popover();
|
||||
});
|
||||
|
||||
/* ===== Task Initialization ===== */
|
||||
|
||||
$(".list-task li label").on("click", function () {
|
||||
$(this).toggleClass("task-done");
|
||||
});
|
||||
$(".settings_box a").on("click", function () {
|
||||
$("ul.theme_color").toggleClass("theme_block");
|
||||
});
|
||||
|
||||
/* ===== Collepsible Toggle ===== */
|
||||
|
||||
$(".collapseble").on("click", function () {
|
||||
$(".collapseblebox").fadeToggle(350);
|
||||
});
|
||||
|
||||
/* ===== Sidebar ===== */
|
||||
|
||||
$('.slimscrollright').slimScroll({
|
||||
height: '100%',
|
||||
position: 'right',
|
||||
size: "5px",
|
||||
color: '#dcdcdc'
|
||||
});
|
||||
$('.slimscrollsidebar').slimScroll({
|
||||
height: '100%',
|
||||
position: 'right',
|
||||
size: "0px",
|
||||
color: '#dcdcdc'
|
||||
});
|
||||
$('.chat-list').slimScroll({
|
||||
height: '100%',
|
||||
position: 'right',
|
||||
size: "0px",
|
||||
color: '#dcdcdc'
|
||||
});
|
||||
|
||||
/* ===== Resize all elements ===== */
|
||||
|
||||
body.trigger("resize");
|
||||
|
||||
/* ===== Visited ul li ===== */
|
||||
|
||||
$('.visited li a').on("click", function (e) {
|
||||
$('.visited li').removeClass('active');
|
||||
var $parent = $(this).parent();
|
||||
if (!$parent.hasClass('active')) {
|
||||
$parent.addClass('active');
|
||||
}
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
/* ===== Login and Recover Password ===== */
|
||||
|
||||
$('#to-recover').on("click", function () {
|
||||
$("#loginform").slideUp();
|
||||
$("#recoverform").fadeIn();
|
||||
});
|
||||
|
||||
/* =================================================================
|
||||
Update 1.5
|
||||
this is for close icon when navigation open in mobile view
|
||||
================================================================= */
|
||||
|
||||
$(".navbar-toggle").on("click", function () {
|
||||
$(".navbar-toggle i").toggleClass("ti-menu").addClass("ti-close");
|
||||
});
|
||||
});
|
||||
+1
@@ -0,0 +1 @@
|
||||
$(document).ready(function(){"use strict";var e=$("body");$(function(){$(".preloader").fadeOut(),$("#side-menu").metisMenu()}),$(".right-side-toggle").on("click",function(){$(".right-sidebar").slideDown(50).toggleClass("shw-rside"),$(".fxhdr").on("click",function(){e.toggleClass("fix-header")}),$(".fxsdr").on("click",function(){e.toggleClass("fix-sidebar")});var i=$(".fxhdr");e.hasClass("fix-header")?i.attr("checked",!0):i.attr("checked",!1),e.hasClass("fix-sidebar")?i.attr("checked",!0):i.attr("checked",!1)}),$(function(){var i=function(){var i=60,s=window.innerWidth>0?window.innerWidth:this.screen.width,l=(window.innerHeight>0?window.innerHeight:this.screen.height)-1;768>s?($("div.navbar-collapse").addClass("collapse"),i=100):$("div.navbar-collapse").removeClass("collapse"),1170>s?(e.addClass("content-wrapper"),$(".open-close i").removeClass("icon-arrow-left-circle"),$(".sidebar-nav, .slimScrollDiv").css("overflow-x","visible").parent().css("overflow","visible"),$(".logo span").hide()):(e.removeClass("content-wrapper"),$(".open-close i").addClass("icon-arrow-left-circle"),$(".logo span").show()),l-=i,1>l&&(l=1),l>i&&$("#page-wrapper").css("min-height",l+"px")},s=window.location,l=$("ul.nav a").filter(function(){return this.href===s||0===s.href.indexOf(this.href)}).addClass("active").parent().parent().addClass("in").parent();l.is("li")&&l.addClass("active"),$(window).ready(i),$(window).on("resize",i)}),$(".open-close").on("click",function(){$("body").hasClass("content-wrapper")?($("body").trigger("resize"),$(".sidebar-nav, .slimScrollDiv").css("overflow","hidden").parent().css("overflow","visible"),$("body").removeClass("content-wrapper"),$(".open-close i").addClass("icon-arrow-left-circle"),$(".logo span").show()):($("body").trigger("resize"),$(".sidebar-nav, .slimScrollDiv").css("overflow-x","visible").parent().css("overflow","visible"),$("body").addClass("content-wrapper"),$(".open-close i").removeClass("icon-arrow-left-circle"),$(".logo span").hide())}),function(e,i,s){var l='[data-perform="panel-collapse"]',o='[data-perform="panel-dismiss"]';e(l).each(function(){var i={toggle:!1},s=e(this).closest(".panel"),l=s.find(".panel-wrapper"),o=e(this).children("i");l.length||(l=s.children(".panel-heading").nextAll().wrapAll("<div/>").parent().addClass("panel-wrapper"),i={}),l.collapse(i).on("hide.bs.collapse",function(){o.removeClass("ti-minus").addClass("ti-plus")}).on("show.bs.collapse",function(){o.removeClass("ti-plus").addClass("ti-minus")})}),e(s).on("click",l,function(i){i.preventDefault();var s=e(this).closest(".panel"),l=s.find(".panel-wrapper");l.collapse("toggle")}),e(s).on("click",o,function(i){function l(){var i=s.parent();s.remove(),i.filter(function(){return e(this).is('[class*="col-"]')&&0===e(this).children("*").length}).remove()}i.preventDefault();var s=e(this).closest(".panel");l()})}(jQuery,window,document),$(function(){$('[data-toggle="tooltip"]').tooltip()}),$(function(){$('[data-toggle="popover"]').popover()}),$(".list-task li label").on("click",function(){$(this).toggleClass("task-done")}),$(".settings_box a").on("click",function(){$("ul.theme_color").toggleClass("theme_block")}),$(".collapseble").on("click",function(){$(".collapseblebox").fadeToggle(350)}),$(".slimscrollright").slimScroll({height:"100%",position:"right",size:"5px",color:"#dcdcdc"}),$(".slimscrollsidebar").slimScroll({height:"100%",position:"right",size:"0px",color:"#dcdcdc"}),$(".chat-list").slimScroll({height:"100%",position:"right",size:"0px",color:"#dcdcdc"}),e.trigger("resize"),$(".visited li a").on("click",function(e){$(".visited li").removeClass("active");var i=$(this).parent();i.hasClass("active")||i.addClass("active"),e.preventDefault()}),$("#to-recover").on("click",function(){$("#loginform").slideUp(),$("#recoverform").fadeIn()}),$(".navbar-toggle").on("click",function(){$(".navbar-toggle i").toggleClass("ti-menu").addClass("ti-close")})});
|
||||
+145
@@ -0,0 +1,145 @@
|
||||
|
||||
|
||||
// Dashboard 1 Morris-chart
|
||||
Morris.Area({
|
||||
element: 'morris-area-chart2',
|
||||
data: [{
|
||||
period: '2010',
|
||||
OPD: 0,
|
||||
ICU: 0,
|
||||
|
||||
}, {
|
||||
period: '2011',
|
||||
OPD: 130,
|
||||
ICU: 100,
|
||||
|
||||
}, {
|
||||
period: '2012',
|
||||
OPD: 30,
|
||||
ICU: 60,
|
||||
|
||||
}, {
|
||||
period: '2013',
|
||||
OPD: 30,
|
||||
ICU: 200,
|
||||
|
||||
}, {
|
||||
period: '2014',
|
||||
OPD: 200,
|
||||
ICU: 150,
|
||||
|
||||
}, {
|
||||
period: '2015',
|
||||
OPD: 105,
|
||||
ICU: 90,
|
||||
|
||||
},
|
||||
{
|
||||
period: '2016',
|
||||
OPD: 250,
|
||||
ICU: 150,
|
||||
|
||||
}],
|
||||
xkey: 'period',
|
||||
ykeys: ['OPD', 'ICU'],
|
||||
labels: ['OPD $', 'ICU $'],
|
||||
pointSize: 0,
|
||||
fillOpacity: 0.4,
|
||||
pointStrokeColors: ['#b4becb', '#00c292'],
|
||||
behaveLikeLine: true,
|
||||
gridLineColor: '#e0e0e0',
|
||||
lineWidth: 0,
|
||||
smooth: false,
|
||||
hideHover: 'auto',
|
||||
lineColors: ['#b4becb', '#00c292'],
|
||||
resize: true
|
||||
|
||||
});
|
||||
Morris.Bar({
|
||||
element: 'morris-area-chart1',
|
||||
data: [{
|
||||
period: '2010',
|
||||
OPD: 40,
|
||||
ICU: 50,
|
||||
|
||||
}, {
|
||||
period: '2011',
|
||||
OPD: 130,
|
||||
ICU: 100,
|
||||
|
||||
}, {
|
||||
period: '2012',
|
||||
OPD: 30,
|
||||
ICU: 60,
|
||||
|
||||
}, {
|
||||
period: '2013',
|
||||
OPD: 30,
|
||||
ICU: 200,
|
||||
|
||||
}, {
|
||||
period: '2014',
|
||||
OPD: 200,
|
||||
ICU: 150,
|
||||
|
||||
}, {
|
||||
period: '2015',
|
||||
OPD: 105,
|
||||
ICU: 90,
|
||||
|
||||
},
|
||||
{
|
||||
period: '2016',
|
||||
OPD: 250,
|
||||
ICU: 150,
|
||||
|
||||
}],
|
||||
xkey: 'period',
|
||||
ykeys: ['OPD', 'ICU'],
|
||||
labels: ['OPD', 'ICU'],
|
||||
pointSize: 0,
|
||||
|
||||
pointStrokeColors: ['#469fb4', '#01c0c8'],
|
||||
barColors: ['#469fb4', '#01c0c8'],
|
||||
behaveLikeLine: true,
|
||||
gridLineColor: '#e0e0e0',
|
||||
lineWidth: 0,
|
||||
smooth: false,
|
||||
hideHover: 'auto',
|
||||
lineColors: ['#469fb4', '#01c0c8'],
|
||||
resize: true
|
||||
|
||||
});
|
||||
|
||||
|
||||
$("#sparkline8").sparkline([2, 4, 4, 6, 8, 5, 6, 4, 8, 6, 6, 2], {
|
||||
type: 'line',
|
||||
width: '100%',
|
||||
height: '130',
|
||||
lineColor: '#00c292',
|
||||
fillColor: 'rgba(0, 194, 146, 0.2)',
|
||||
maxSpotColor: '#00c292',
|
||||
highlightLineColor: 'rgba(0, 0, 0, 0.2)',
|
||||
highlightSpotColor: '#00c292'
|
||||
});
|
||||
$("#sparkline9").sparkline([2, 4, 8, 6, 8, 5, 6, 4, 8, 6, 6, 2], {
|
||||
type: 'line',
|
||||
width: '100%',
|
||||
height: '130',
|
||||
lineColor: '#03a9f3',
|
||||
fillColor: 'rgba(3, 169, 243, 0.2)',
|
||||
minSpotColor: '#03a9f3',
|
||||
maxSpotColor: '#03a9f3',
|
||||
highlightLineColor: 'rgba(0, 0, 0, 0.2)',
|
||||
highlightSpotColor: '#03a9f3'
|
||||
});
|
||||
$("#sparkline10").sparkline([2, 4, 4, 6, 8, 5, 6, 4, 8, 6, 6, 2], {
|
||||
type: 'line',
|
||||
width: '100%',
|
||||
height: '130',
|
||||
lineColor: '#fb9678',
|
||||
fillColor: 'rgba(251, 150, 120, 0.2)',
|
||||
maxSpotColor: '#fb9678',
|
||||
highlightLineColor: 'rgba(0, 0, 0, 0.2)',
|
||||
highlightSpotColor: '#fb9678'
|
||||
});
|
||||
+453
@@ -0,0 +1,453 @@
|
||||
// Real Time chart
|
||||
|
||||
|
||||
var data = [],
|
||||
totalPoints = 300;
|
||||
|
||||
function getRandomData() {
|
||||
|
||||
if (data.length > 0)
|
||||
data = data.slice(1);
|
||||
|
||||
// Do a random walk
|
||||
|
||||
while (data.length < totalPoints) {
|
||||
|
||||
var prev = data.length > 0 ? data[data.length - 1] : 50,
|
||||
y = prev + Math.random() * 10 - 5;
|
||||
|
||||
if (y < 0) {
|
||||
y = 0;
|
||||
} else if (y > 100) {
|
||||
y = 100;
|
||||
}
|
||||
|
||||
data.push(y);
|
||||
}
|
||||
|
||||
// Zip the generated y values with the x values
|
||||
|
||||
var res = [];
|
||||
for (var i = 0; i < data.length; ++i) {
|
||||
res.push([i, data[i]])
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
// Set up the control widget
|
||||
|
||||
var updateInterval = 30;
|
||||
$("#updateInterval").val(updateInterval).change(function () {
|
||||
var v = $(this).val();
|
||||
if (v && !isNaN(+v)) {
|
||||
updateInterval = +v;
|
||||
if (updateInterval < 1) {
|
||||
updateInterval = 1;
|
||||
} else if (updateInterval > 3000) {
|
||||
updateInterval = 3000;
|
||||
}
|
||||
$(this).val("" + updateInterval);
|
||||
}
|
||||
});
|
||||
|
||||
var plot = $.plot("#placeholder", [ getRandomData() ], {
|
||||
series: {
|
||||
shadowSize: 0 // Drawing is faster without shadows
|
||||
},
|
||||
yaxis: {
|
||||
min: 0,
|
||||
max: 100
|
||||
},
|
||||
xaxis: {
|
||||
show: false
|
||||
},
|
||||
colors: ["#fb9678"],
|
||||
grid: {
|
||||
color: "#AFAFAF",
|
||||
hoverable: true,
|
||||
borderWidth: 0,
|
||||
backgroundColor: '#FFF'
|
||||
},
|
||||
tooltip: true,
|
||||
tooltipOpts: {
|
||||
content: "Y: %y",
|
||||
defaultTheme: false
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
function update() {
|
||||
|
||||
plot.setData([getRandomData()]);
|
||||
|
||||
// Since the axes don't change, we don't need to call plot.setupGrid()
|
||||
|
||||
plot.draw();
|
||||
setTimeout(update, updateInterval);
|
||||
}
|
||||
|
||||
update();
|
||||
|
||||
//Flot Line Chart
|
||||
$(document).ready(function() {
|
||||
console.log("document ready");
|
||||
var offset = 0;
|
||||
plot();
|
||||
|
||||
function plot() {
|
||||
var sin = [],
|
||||
cos = [];
|
||||
for (var i = 0; i < 12; i += 0.2) {
|
||||
sin.push([i, Math.sin(i + offset)]);
|
||||
cos.push([i, Math.cos(i + offset)]);
|
||||
}
|
||||
|
||||
var options = {
|
||||
series: {
|
||||
lines: {
|
||||
show: true
|
||||
},
|
||||
points: {
|
||||
show: true
|
||||
}
|
||||
},
|
||||
|
||||
grid: {
|
||||
hoverable: true //IMPORTANT! this is needed for tooltip to work
|
||||
},
|
||||
yaxis: {
|
||||
min: -1.2,
|
||||
max: 1.2
|
||||
},
|
||||
colors: ["#fb9678", "#01c0c8"],
|
||||
grid: {
|
||||
color: "#AFAFAF",
|
||||
hoverable: true,
|
||||
borderWidth: 0,
|
||||
backgroundColor: '#FFF'
|
||||
},
|
||||
tooltip: true,
|
||||
tooltipOpts: {
|
||||
content: "'%s' of %x.1 is %y.4",
|
||||
shifts: {
|
||||
x: -60,
|
||||
y: 25
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var plotObj = $.plot($("#flot-line-chart"), [{
|
||||
data: sin,
|
||||
label: "sin(x)",
|
||||
|
||||
}, {
|
||||
data: cos,
|
||||
label: "cos(x)"
|
||||
}],
|
||||
options);
|
||||
}
|
||||
});
|
||||
//Flot Pie Chart
|
||||
$(function() {
|
||||
|
||||
var data = [{
|
||||
label: "Series 0",
|
||||
data: 10,
|
||||
color: "#4f5467",
|
||||
|
||||
}, {
|
||||
label: "Series 1",
|
||||
data: 1,
|
||||
color: "#00c292",
|
||||
}, {
|
||||
label: "Series 2",
|
||||
data: 3,
|
||||
color:"#01c0c8",
|
||||
}, {
|
||||
label: "Series 3",
|
||||
data: 1,
|
||||
color:"#fb9678",
|
||||
}];
|
||||
|
||||
var plotObj = $.plot($("#flot-pie-chart"), data, {
|
||||
series: {
|
||||
pie: {
|
||||
innerRadius: 0.5,
|
||||
show: true
|
||||
}
|
||||
},
|
||||
grid: {
|
||||
hoverable: true
|
||||
},
|
||||
color: null,
|
||||
tooltip: true,
|
||||
tooltipOpts: {
|
||||
content: "%p.0%, %s", // show percentages, rounding to 2 decimal places
|
||||
shifts: {
|
||||
x: 20,
|
||||
y: 0
|
||||
},
|
||||
defaultTheme: false
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
//Flot Moving Line Chart
|
||||
|
||||
$(function() {
|
||||
|
||||
var container = $("#flot-line-chart-moving");
|
||||
|
||||
// Determine how many data points to keep based on the placeholder's initial size;
|
||||
// this gives us a nice high-res plot while avoiding more than one point per pixel.
|
||||
|
||||
var maximum = container.outerWidth() / 2 || 300;
|
||||
|
||||
//
|
||||
|
||||
var data = [];
|
||||
|
||||
function getRandomData() {
|
||||
|
||||
if (data.length) {
|
||||
data = data.slice(1);
|
||||
}
|
||||
|
||||
while (data.length < maximum) {
|
||||
var previous = data.length ? data[data.length - 1] : 50;
|
||||
var y = previous + Math.random() * 10 - 5;
|
||||
data.push(y < 0 ? 0 : y > 100 ? 100 : y);
|
||||
}
|
||||
|
||||
// zip the generated y values with the x values
|
||||
|
||||
var res = [];
|
||||
for (var i = 0; i < data.length; ++i) {
|
||||
res.push([i, data[i]])
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
series = [{
|
||||
data: getRandomData(),
|
||||
|
||||
lines: {
|
||||
fill: true
|
||||
}
|
||||
}];
|
||||
|
||||
//
|
||||
|
||||
var plot = $.plot(container, series, {
|
||||
colors: ["#01c0c8"],
|
||||
grid: {
|
||||
borderWidth: 0,
|
||||
minBorderMargin: 20,
|
||||
labelMargin: 10,
|
||||
backgroundColor: {
|
||||
colors: ["#fff", "#fff"]
|
||||
},
|
||||
margin: {
|
||||
top: 8,
|
||||
bottom: 20,
|
||||
left: 20
|
||||
},
|
||||
|
||||
markings: function(axes) {
|
||||
var markings = [];
|
||||
var xaxis = axes.xaxis;
|
||||
for (var x = Math.floor(xaxis.min); x < xaxis.max; x += xaxis.tickSize * 1) {
|
||||
markings.push({
|
||||
xaxis: {
|
||||
from: x,
|
||||
to: x + xaxis.tickSize
|
||||
},
|
||||
color: "#fff"
|
||||
});
|
||||
}
|
||||
return markings;
|
||||
}
|
||||
},
|
||||
xaxis: {
|
||||
tickFormatter: function() {
|
||||
return "";
|
||||
}
|
||||
},
|
||||
yaxis: {
|
||||
min: 0,
|
||||
max: 110
|
||||
},
|
||||
legend: {
|
||||
show: true
|
||||
}
|
||||
});
|
||||
|
||||
// Update the random dataset at 25FPS for a smoothly-animating chart
|
||||
|
||||
setInterval(function updateRandom() {
|
||||
series[0].data = getRandomData();
|
||||
plot.setData(series);
|
||||
plot.draw();
|
||||
}, 40);
|
||||
|
||||
});
|
||||
|
||||
//Flot Bar Chart
|
||||
|
||||
$(function() {
|
||||
|
||||
var barOptions = {
|
||||
series: {
|
||||
bars: {
|
||||
show: true,
|
||||
barWidth: 43200000
|
||||
}
|
||||
},
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
timeformat: "%m/%d",
|
||||
minTickSize: [2, "day"]
|
||||
},
|
||||
grid: {
|
||||
hoverable: true
|
||||
},
|
||||
legend: {
|
||||
show: false
|
||||
},
|
||||
grid: {
|
||||
color: "#AFAFAF",
|
||||
hoverable: true,
|
||||
borderWidth: 0,
|
||||
backgroundColor: '#FFF'
|
||||
},
|
||||
tooltip: true,
|
||||
tooltipOpts: {
|
||||
content: "x: %x, y: %y"
|
||||
}
|
||||
};
|
||||
var barData = {
|
||||
label: "bar",
|
||||
color: "#fb9678",
|
||||
data: [
|
||||
[1354521600000, 1000],
|
||||
[1355040000000, 2000],
|
||||
[1355223600000, 3000],
|
||||
[1355306400000, 4000],
|
||||
[1355487300000, 5000],
|
||||
[1355571900000, 6000]
|
||||
]
|
||||
};
|
||||
$.plot($("#flot-bar-chart"), [barData], barOptions);
|
||||
|
||||
});
|
||||
// sales bar chart
|
||||
|
||||
$(function() {
|
||||
//some data
|
||||
var d1 = [];
|
||||
for (var i = 0; i <= 10; i += 1)
|
||||
d1.push([i, parseInt(Math.random() * 60)]);
|
||||
|
||||
var d2 = [];
|
||||
for (var i = 0; i <= 10; i += 1)
|
||||
d2.push([i, parseInt(Math.random() * 40)]);
|
||||
|
||||
var d3 = [];
|
||||
for (var i = 0; i <= 10; i += 1)
|
||||
d3.push([i, parseInt(Math.random() * 25)]);
|
||||
|
||||
var ds = new Array();
|
||||
|
||||
ds.push({
|
||||
label : "Data One",
|
||||
data : d1,
|
||||
bars : {
|
||||
order : 1
|
||||
}
|
||||
});
|
||||
ds.push({
|
||||
label : "Data Two",
|
||||
data : d2,
|
||||
bars : {
|
||||
order : 2
|
||||
}
|
||||
});
|
||||
ds.push({
|
||||
label : "Data Three",
|
||||
data : d3,
|
||||
bars : {
|
||||
order : 3
|
||||
}
|
||||
});
|
||||
|
||||
var stack = 0,
|
||||
bars = true,
|
||||
lines = true,
|
||||
steps = true;
|
||||
|
||||
var options = {
|
||||
bars : {
|
||||
show : true,
|
||||
barWidth : 0.2,
|
||||
fill : 1
|
||||
},
|
||||
grid : {
|
||||
show : true,
|
||||
aboveData : false,
|
||||
labelMargin : 5,
|
||||
axisMargin : 0,
|
||||
borderWidth : 1,
|
||||
minBorderMargin : 5,
|
||||
clickable : true,
|
||||
hoverable : true,
|
||||
autoHighlight : false,
|
||||
mouseActiveRadius : 20,
|
||||
borderColor : '#f5f5f5'
|
||||
},
|
||||
series : {
|
||||
stack : stack
|
||||
},
|
||||
legend : {
|
||||
position : "ne",
|
||||
margin : [0, 0],
|
||||
noColumns : 0,
|
||||
labelBoxBorderColor : null,
|
||||
labelFormatter : function(label, series) {
|
||||
// just add some space to labes
|
||||
return '' + label + ' ';
|
||||
},
|
||||
width : 30,
|
||||
height : 5
|
||||
},
|
||||
yaxis : {
|
||||
tickColor : '#f5f5f5',
|
||||
font : {
|
||||
color : '#bdbdbd'
|
||||
}
|
||||
},
|
||||
xaxis : {
|
||||
tickColor : '#f5f5f5',
|
||||
font : {
|
||||
color : '#bdbdbd'
|
||||
}
|
||||
},
|
||||
colors : ["#4F5467", "#01c0c8", "#fb9678"],
|
||||
tooltip : true, //activate tooltip
|
||||
tooltipOpts : {
|
||||
content : "%s : %y.0",
|
||||
shifts : {
|
||||
x : -30,
|
||||
y : -50
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$.plot($(".sales-bars-chart"), ds, options);
|
||||
});
|
||||
|
||||
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
|
||||
$(window).on('load', function() {
|
||||
|
||||
// Row Toggler
|
||||
// -----------------------------------------------------------------
|
||||
$('#demo-foo-row-toggler').footable();
|
||||
|
||||
// Accordion
|
||||
// -----------------------------------------------------------------
|
||||
$('#demo-foo-accordion').footable().on('footable_row_expanded', function(e) {
|
||||
$('#demo-foo-accordion tbody tr.footable-detail-show').not(e.row).each(function() {
|
||||
$('#demo-foo-accordion').data('footable').toggleDetail(this);
|
||||
});
|
||||
});
|
||||
|
||||
// Pagination
|
||||
// -----------------------------------------------------------------
|
||||
$('#demo-foo-pagination').footable();
|
||||
$('#demo-show-entries').change(function (e) {
|
||||
e.preventDefault();
|
||||
var pageSize = $(this).val();
|
||||
$('#demo-foo-pagination').data('page-size', pageSize);
|
||||
$('#demo-foo-pagination').trigger('footable_initialized');
|
||||
});
|
||||
|
||||
// Filtering
|
||||
// -----------------------------------------------------------------
|
||||
var filtering = $('#demo-foo-filtering');
|
||||
filtering.footable().on('footable_filtering', function (e) {
|
||||
var selected = $('#demo-foo-filter-status').find(':selected').val();
|
||||
e.filter += (e.filter && e.filter.length > 0) ? ' ' + selected : selected;
|
||||
e.clear = !e.filter;
|
||||
});
|
||||
|
||||
// Filter status
|
||||
$('#demo-foo-filter-status').change(function (e) {
|
||||
e.preventDefault();
|
||||
filtering.trigger('footable_filter', {filter: $(this).val()});
|
||||
});
|
||||
|
||||
// Search input
|
||||
$('#demo-foo-search').on('input', function (e) {
|
||||
e.preventDefault();
|
||||
filtering.trigger('footable_filter', {filter: $(this).val()});
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
// Search input
|
||||
$('#demo-input-search2').on('input', function (e) {
|
||||
e.preventDefault();
|
||||
addrow.trigger('footable_filter', {filter: $(this).val()});
|
||||
});
|
||||
|
||||
// Add & Remove Row
|
||||
var addrow = $('#demo-foo-addrow');
|
||||
addrow.footable().on('click', '.delete-row-btn', function() {
|
||||
|
||||
//get the footable object
|
||||
var footable = addrow.data('footable');
|
||||
|
||||
//get the row we are wanting to delete
|
||||
var row = $(this).parents('tr:first');
|
||||
|
||||
//delete the row
|
||||
footable.removeRow(row);
|
||||
});
|
||||
// Add Row Button
|
||||
$('#demo-btn-addrow').click(function() {
|
||||
|
||||
//get the footable object
|
||||
var footable = addrow.data('footable');
|
||||
|
||||
//build up the row we are wanting to add
|
||||
var newRow = '<tr><td>thome</td><td>Woldt</td><td>Airline Transport Pilot</td><td>3 Oct 2016</td><td><span class="label label-table label-success">Active</span></td><td><button type="button" class="btn btn-sm btn-icon btn-pure btn-outline delete-row-btn" data-toggle="tooltip" data-original-title="Delete"><i class="ti-close" aria-hidden="true"></i></button></td></tr>';
|
||||
|
||||
//add it
|
||||
footable.appendRow(newRow);
|
||||
});
|
||||
});
|
||||
+198
@@ -0,0 +1,198 @@
|
||||
/* ===========================================================
|
||||
* Bootstrap: fileinput.js v3.1.3
|
||||
* http://jasny.github.com/bootstrap/javascript/#fileinput
|
||||
* ===========================================================
|
||||
* Copyright 2012-2014 Arnold Daniels
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License")
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* ========================================================== */
|
||||
|
||||
+function ($) { "use strict";
|
||||
|
||||
var isIE = window.navigator.appName == 'Microsoft Internet Explorer'
|
||||
|
||||
// FILEUPLOAD PUBLIC CLASS DEFINITION
|
||||
// =================================
|
||||
|
||||
var Fileinput = function (element, options) {
|
||||
this.$element = $(element)
|
||||
|
||||
this.$input = this.$element.find(':file')
|
||||
if (this.$input.length === 0) return
|
||||
|
||||
this.name = this.$input.attr('name') || options.name
|
||||
|
||||
this.$hidden = this.$element.find('input[type=hidden][name="' + this.name + '"]')
|
||||
if (this.$hidden.length === 0) {
|
||||
this.$hidden = $('<input type="hidden">').insertBefore(this.$input)
|
||||
}
|
||||
|
||||
this.$preview = this.$element.find('.fileinput-preview')
|
||||
var height = this.$preview.css('height')
|
||||
if (this.$preview.css('display') !== 'inline' && height !== '0px' && height !== 'none') {
|
||||
this.$preview.css('line-height', height)
|
||||
}
|
||||
|
||||
this.original = {
|
||||
exists: this.$element.hasClass('fileinput-exists'),
|
||||
preview: this.$preview.html(),
|
||||
hiddenVal: this.$hidden.val()
|
||||
}
|
||||
|
||||
this.listen()
|
||||
}
|
||||
|
||||
Fileinput.prototype.listen = function() {
|
||||
this.$input.on('change.bs.fileinput', $.proxy(this.change, this))
|
||||
$(this.$input[0].form).on('reset.bs.fileinput', $.proxy(this.reset, this))
|
||||
|
||||
this.$element.find('[data-trigger="fileinput"]').on('click.bs.fileinput', $.proxy(this.trigger, this))
|
||||
this.$element.find('[data-dismiss="fileinput"]').on('click.bs.fileinput', $.proxy(this.clear, this))
|
||||
},
|
||||
|
||||
Fileinput.prototype.change = function(e) {
|
||||
var files = e.target.files === undefined ? (e.target && e.target.value ? [{ name: e.target.value.replace(/^.+\\/, '')}] : []) : e.target.files
|
||||
|
||||
e.stopPropagation()
|
||||
|
||||
if (files.length === 0) {
|
||||
this.clear()
|
||||
return
|
||||
}
|
||||
|
||||
this.$hidden.val('')
|
||||
this.$hidden.attr('name', '')
|
||||
this.$input.attr('name', this.name)
|
||||
|
||||
var file = files[0]
|
||||
|
||||
if (this.$preview.length > 0 && (typeof file.type !== "undefined" ? file.type.match(/^image\/(gif|png|jpeg)$/) : file.name.match(/\.(gif|png|jpe?g)$/i)) && typeof FileReader !== "undefined") {
|
||||
var reader = new FileReader()
|
||||
var preview = this.$preview
|
||||
var element = this.$element
|
||||
|
||||
reader.onload = function(re) {
|
||||
var $img = $('<img>')
|
||||
$img[0].src = re.target.result
|
||||
files[0].result = re.target.result
|
||||
|
||||
element.find('.fileinput-filename').text(file.name)
|
||||
|
||||
// if parent has max-height, using `(max-)height: 100%` on child doesn't take padding and border into account
|
||||
if (preview.css('max-height') != 'none') $img.css('max-height', parseInt(preview.css('max-height'), 10) - parseInt(preview.css('padding-top'), 10) - parseInt(preview.css('padding-bottom'), 10) - parseInt(preview.css('border-top'), 10) - parseInt(preview.css('border-bottom'), 10))
|
||||
|
||||
preview.html($img)
|
||||
element.addClass('fileinput-exists').removeClass('fileinput-new')
|
||||
|
||||
element.trigger('change.bs.fileinput', files)
|
||||
}
|
||||
|
||||
reader.readAsDataURL(file)
|
||||
} else {
|
||||
this.$element.find('.fileinput-filename').text(file.name)
|
||||
this.$preview.text(file.name)
|
||||
|
||||
this.$element.addClass('fileinput-exists').removeClass('fileinput-new')
|
||||
|
||||
this.$element.trigger('change.bs.fileinput')
|
||||
}
|
||||
},
|
||||
|
||||
Fileinput.prototype.clear = function(e) {
|
||||
if (e) e.preventDefault()
|
||||
|
||||
this.$hidden.val('')
|
||||
this.$hidden.attr('name', this.name)
|
||||
this.$input.attr('name', '')
|
||||
|
||||
//ie8+ doesn't support changing the value of input with type=file so clone instead
|
||||
if (isIE) {
|
||||
var inputClone = this.$input.clone(true);
|
||||
this.$input.after(inputClone);
|
||||
this.$input.remove();
|
||||
this.$input = inputClone;
|
||||
} else {
|
||||
this.$input.val('')
|
||||
}
|
||||
|
||||
this.$preview.html('')
|
||||
this.$element.find('.fileinput-filename').text('')
|
||||
this.$element.addClass('fileinput-new').removeClass('fileinput-exists')
|
||||
|
||||
if (e !== undefined) {
|
||||
this.$input.trigger('change')
|
||||
this.$element.trigger('clear.bs.fileinput')
|
||||
}
|
||||
},
|
||||
|
||||
Fileinput.prototype.reset = function() {
|
||||
this.clear()
|
||||
|
||||
this.$hidden.val(this.original.hiddenVal)
|
||||
this.$preview.html(this.original.preview)
|
||||
this.$element.find('.fileinput-filename').text('')
|
||||
|
||||
if (this.original.exists) this.$element.addClass('fileinput-exists').removeClass('fileinput-new')
|
||||
else this.$element.addClass('fileinput-new').removeClass('fileinput-exists')
|
||||
|
||||
this.$element.trigger('reset.bs.fileinput')
|
||||
},
|
||||
|
||||
Fileinput.prototype.trigger = function(e) {
|
||||
this.$input.trigger('click')
|
||||
e.preventDefault()
|
||||
}
|
||||
|
||||
|
||||
// FILEUPLOAD PLUGIN DEFINITION
|
||||
// ===========================
|
||||
|
||||
var old = $.fn.fileinput
|
||||
|
||||
$.fn.fileinput = function (options) {
|
||||
return this.each(function () {
|
||||
var $this = $(this),
|
||||
data = $this.data('bs.fileinput')
|
||||
if (!data) $this.data('bs.fileinput', (data = new Fileinput(this, options)))
|
||||
if (typeof options == 'string') data[options]()
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.fileinput.Constructor = Fileinput
|
||||
|
||||
|
||||
// FILEINPUT NO CONFLICT
|
||||
// ====================
|
||||
|
||||
$.fn.fileinput.noConflict = function () {
|
||||
$.fn.fileinput = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
// FILEUPLOAD DATA-API
|
||||
// ==================
|
||||
|
||||
$(document).on('click.fileinput.data-api', '[data-provides="fileinput"]', function (e) {
|
||||
var $this = $(this)
|
||||
if ($this.data('bs.fileinput')) return
|
||||
$this.fileinput($this.data())
|
||||
|
||||
var $target = $(e.target).closest('[data-dismiss="fileinput"],[data-trigger="fileinput"]');
|
||||
if ($target.length > 0) {
|
||||
e.preventDefault()
|
||||
$target.trigger('click.bs.fileinput')
|
||||
}
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){e.fn.extend({slimScroll:function(i){var o={width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},s=e.extend(o,i);return this.each(function(){function o(t){if(h){var t=t||window.event,i=0;t.wheelDelta&&(i=-t.wheelDelta/120),t.detail&&(i=t.detail/3);var o=t.target||t.srcTarget||t.srcElement;e(o).closest("."+s.wrapperClass).is(x.parent())&&r(i,!0),t.preventDefault&&!y&&t.preventDefault(),y||(t.returnValue=!1)}}function r(e,t,i){y=!1;var o=e,r=x.outerHeight()-R.outerHeight();if(t&&(o=parseInt(R.css("top"))+e*parseInt(s.wheelStep)/100*R.outerHeight(),o=Math.min(Math.max(o,0),r),o=e>0?Math.ceil(o):Math.floor(o),R.css({top:o+"px"})),v=parseInt(R.css("top"))/(x.outerHeight()-R.outerHeight()),o=v*(x[0].scrollHeight-x.outerHeight()),i){o=e;var a=o/x[0].scrollHeight*x.outerHeight();a=Math.min(Math.max(a,0),r),R.css({top:a+"px"})}x.scrollTop(o),x.trigger("slimscrolling",~~o),n(),c()}function a(e){window.addEventListener?(e.addEventListener("DOMMouseScroll",o,!1),e.addEventListener("mousewheel",o,!1)):document.attachEvent("onmousewheel",o)}function l(){f=Math.max(x.outerHeight()/x[0].scrollHeight*x.outerHeight(),m),R.css({height:f+"px"});var e=f==x.outerHeight()?"none":"block";R.css({display:e})}function n(){if(l(),clearTimeout(p),v==~~v){if(y=s.allowPageScroll,b!=v){var e=0==~~v?"top":"bottom";x.trigger("slimscroll",e)}}else y=!1;return b=v,f>=x.outerHeight()?void(y=!0):(R.stop(!0,!0).fadeIn("fast"),void(s.railVisible&&E.stop(!0,!0).fadeIn("fast")))}function c(){s.alwaysVisible||(p=setTimeout(function(){s.disableFadeOut&&h||u||d||(R.fadeOut("slow"),E.fadeOut("slow"))},1e3))}var h,u,d,p,g,f,v,b,w="<div></div>",m=30,y=!1,x=e(this);if(x.parent().hasClass(s.wrapperClass)){var C=x.scrollTop();if(R=x.closest("."+s.barClass),E=x.closest("."+s.railClass),l(),e.isPlainObject(i)){if("height"in i&&"auto"==i.height){x.parent().css("height","auto"),x.css("height","auto");var H=x.parent().parent().height();x.parent().css("height",H),x.css("height",H)}if("scrollTo"in i)C=parseInt(s.scrollTo);else if("scrollBy"in i)C+=parseInt(s.scrollBy);else if("destroy"in i)return R.remove(),E.remove(),void x.unwrap();r(C,!1,!0)}}else if(!(e.isPlainObject(i)&&"destroy"in i)){s.height="auto"==s.height?x.parent().height():s.height;var S=e(w).addClass(s.wrapperClass).css({position:"relative",overflow:"hidden",width:s.width,height:s.height});x.css({overflow:"hidden",width:s.width,height:s.height});var E=e(w).addClass(s.railClass).css({width:s.size,height:"100%",position:"absolute",top:0,display:s.alwaysVisible&&s.railVisible?"block":"none","border-radius":s.railBorderRadius,background:s.railColor,opacity:s.railOpacity,zIndex:90}),R=e(w).addClass(s.barClass).css({background:s.color,width:s.size,position:"absolute",top:0,opacity:s.opacity,display:s.alwaysVisible?"block":"none","border-radius":s.borderRadius,BorderRadius:s.borderRadius,MozBorderRadius:s.borderRadius,WebkitBorderRadius:s.borderRadius,zIndex:99}),D="right"==s.position?{right:s.distance}:{left:s.distance};E.css(D),R.css(D),x.wrap(S),x.parent().append(R),x.parent().append(E),s.railDraggable&&R.bind("mousedown",function(i){var o=e(document);return d=!0,t=parseFloat(R.css("top")),pageY=i.pageY,o.bind("mousemove.slimscroll",function(e){currTop=t+e.pageY-pageY,R.css("top",currTop),r(0,R.position().top,!1)}),o.bind("mouseup.slimscroll",function(e){d=!1,c(),o.unbind(".slimscroll")}),!1}).bind("selectstart.slimscroll",function(e){return e.stopPropagation(),e.preventDefault(),!1}),E.hover(function(){n()},function(){c()}),R.hover(function(){u=!0},function(){u=!1}),x.hover(function(){h=!0,n(),c()},function(){h=!1,c()}),x.bind("touchstart",function(e,t){e.originalEvent.touches.length&&(g=e.originalEvent.touches[0].pageY)}),x.bind("touchmove",function(e){if(y||e.originalEvent.preventDefault(),e.originalEvent.touches.length){var t=(g-e.originalEvent.touches[0].pageY)/s.touchScrollStep;r(t,!0),g=e.originalEvent.touches[0].pageY}}),l(),"bottom"===s.start?(R.css({top:x.outerHeight()-R.outerHeight()}),r(0,!0)):"top"!==s.start&&(r(e(s.start).position().top,null,!0),s.alwaysVisible||R.hide()),a(this)}}),this}}),e.fn.extend({slimscroll:e.fn.slimScroll})}(jQuery);
|
||||
+213
@@ -0,0 +1,213 @@
|
||||
! function(document, window, $) {
|
||||
"use strict";
|
||||
var Site = window.Site;
|
||||
$(document).ready(function($) {
|
||||
|
||||
}), jsGrid.setDefaults({
|
||||
tableClass: "jsgrid-table table table-striped table-hover"
|
||||
}), jsGrid.setDefaults("text", {
|
||||
_createTextBox: function() {
|
||||
return $("<input>").attr("type", "text").attr("class", "form-control input-sm")
|
||||
}
|
||||
}), jsGrid.setDefaults("number", {
|
||||
_createTextBox: function() {
|
||||
return $("<input>").attr("type", "number").attr("class", "form-control input-sm")
|
||||
}
|
||||
}), jsGrid.setDefaults("textarea", {
|
||||
_createTextBox: function() {
|
||||
return $("<input>").attr("type", "textarea").attr("class", "form-control")
|
||||
}
|
||||
}), jsGrid.setDefaults("control", {
|
||||
_createGridButton: function(cls, tooltip, clickHandler) {
|
||||
var grid = this._grid;
|
||||
return $("<button>").addClass(this.buttonClass).addClass(cls).attr({
|
||||
type: "button",
|
||||
title: tooltip
|
||||
}).on("click", function(e) {
|
||||
clickHandler(grid, e)
|
||||
})
|
||||
}
|
||||
}), jsGrid.setDefaults("select", {
|
||||
_createSelect: function() {
|
||||
var $result = $("<select>").attr("class", "form-control input-sm"),
|
||||
valueField = this.valueField,
|
||||
textField = this.textField,
|
||||
selectedIndex = this.selectedIndex;
|
||||
return $.each(this.items, function(index, item) {
|
||||
var value = valueField ? item[valueField] : index,
|
||||
text = textField ? item[textField] : item,
|
||||
$option = $("<option>").attr("value", value).text(text).appendTo($result);
|
||||
$option.prop("selected", selectedIndex === index)
|
||||
}), $result
|
||||
}
|
||||
}),
|
||||
function() {
|
||||
$("#basicgrid").jsGrid({
|
||||
height: "500px",
|
||||
width: "100%",
|
||||
filtering: !0,
|
||||
editing: !0,
|
||||
sorting: !0,
|
||||
paging: !0,
|
||||
autoload: !0,
|
||||
pageSize: 15,
|
||||
pageButtonCount: 5,
|
||||
deleteConfirm: "Do you really want to delete the client?",
|
||||
controller: db,
|
||||
fields: [{
|
||||
name: "Name",
|
||||
type: "text",
|
||||
width: 150
|
||||
}, {
|
||||
name: "Age",
|
||||
type: "number",
|
||||
width: 70
|
||||
}, {
|
||||
name: "Address",
|
||||
type: "text",
|
||||
width: 200
|
||||
}, {
|
||||
name: "Country",
|
||||
type: "select",
|
||||
items: db.countries,
|
||||
valueField: "Id",
|
||||
textField: "Name"
|
||||
}, {
|
||||
name: "Married",
|
||||
type: "checkbox",
|
||||
title: "Is Married",
|
||||
sorting: !1
|
||||
}, {
|
||||
type: "control"
|
||||
}]
|
||||
})
|
||||
}(),
|
||||
function() {
|
||||
$("#staticgrid").jsGrid({
|
||||
height: "500px",
|
||||
width: "100%",
|
||||
sorting: !0,
|
||||
paging: !0,
|
||||
data: db.clients,
|
||||
fields: [{
|
||||
name: "Name",
|
||||
type: "text",
|
||||
width: 150
|
||||
}, {
|
||||
name: "Age",
|
||||
type: "number",
|
||||
width: 70
|
||||
}, {
|
||||
name: "Address",
|
||||
type: "text",
|
||||
width: 200
|
||||
}, {
|
||||
name: "Country",
|
||||
type: "select",
|
||||
items: db.countries,
|
||||
valueField: "Id",
|
||||
textField: "Name"
|
||||
}, {
|
||||
name: "Married",
|
||||
type: "checkbox",
|
||||
title: "Is Married"
|
||||
}]
|
||||
})
|
||||
}(),
|
||||
|
||||
function() {
|
||||
$("#exampleSorting").jsGrid({
|
||||
height: "500px",
|
||||
width: "100%",
|
||||
autoload: !0,
|
||||
selecting: !1,
|
||||
controller: db,
|
||||
fields: [{
|
||||
name: "Name",
|
||||
type: "text",
|
||||
width: 150
|
||||
}, {
|
||||
name: "Age",
|
||||
type: "number",
|
||||
width: 50
|
||||
}, {
|
||||
name: "Address",
|
||||
type: "text",
|
||||
width: 200
|
||||
}, {
|
||||
name: "Country",
|
||||
type: "select",
|
||||
items: db.countries,
|
||||
valueField: "Id",
|
||||
textField: "Name"
|
||||
}, {
|
||||
name: "Married",
|
||||
type: "checkbox",
|
||||
title: "Is Married"
|
||||
}]
|
||||
}), $("#sortingField").on("change", function() {
|
||||
var field = $(this).val();
|
||||
$("#exampleSorting").jsGrid("sort", field)
|
||||
})
|
||||
}(),
|
||||
|
||||
function() {
|
||||
var MyDateField = function(config) {
|
||||
jsGrid.Field.call(this, config)
|
||||
};
|
||||
MyDateField.prototype = new jsGrid.Field({
|
||||
sorter: function(date1, date2) {
|
||||
return new Date(date1) - new Date(date2)
|
||||
},
|
||||
itemTemplate: function(value) {
|
||||
return new Date(value).toDateString()
|
||||
},
|
||||
insertTemplate: function() {
|
||||
if (!this.inserting) return "";
|
||||
var $result = this.insertControl = this._createTextBox();
|
||||
return $result
|
||||
},
|
||||
editTemplate: function(value) {
|
||||
if (!this.editing) return this.itemTemplate(value);
|
||||
var $result = this.editControl = this._createTextBox();
|
||||
return $result.val(value), $result
|
||||
},
|
||||
insertValue: function() {
|
||||
return this.insertControl.datepicker("getDate")
|
||||
},
|
||||
editValue: function() {
|
||||
return this.editControl.datepicker("getDate")
|
||||
},
|
||||
_createTextBox: function() {
|
||||
return $("<input>").attr("type", "text").addClass("form-control input-sm").datepicker({
|
||||
autoclose: !0
|
||||
})
|
||||
}
|
||||
}), jsGrid.fields.myDateField = MyDateField, $("#exampleCustomGridField").jsGrid({
|
||||
height: "500px",
|
||||
width: "100%",
|
||||
inserting: !0,
|
||||
editing: !0,
|
||||
sorting: !0,
|
||||
paging: !0,
|
||||
data: db.users,
|
||||
fields: [{
|
||||
name: "Account",
|
||||
width: 150,
|
||||
align: "center"
|
||||
}, {
|
||||
name: "Name",
|
||||
type: "text"
|
||||
}, {
|
||||
name: "RegisterDate",
|
||||
type: "myDateField",
|
||||
width: 100,
|
||||
align: "center"
|
||||
}, {
|
||||
type: "control",
|
||||
editButton: !1,
|
||||
modeSwitchButton: !1
|
||||
}]
|
||||
})
|
||||
}()
|
||||
}(document, window, jQuery);
|
||||
+7
File diff suppressed because one or more lines are too long
+257
@@ -0,0 +1,257 @@
|
||||
// Dashboard 1 Morris-chart
|
||||
|
||||
Morris.Area({
|
||||
element: 'morris-area-chart',
|
||||
data: [{
|
||||
period: '2010',
|
||||
iphone: 50,
|
||||
ipad: 80,
|
||||
itouch: 20
|
||||
}, {
|
||||
period: '2011',
|
||||
iphone: 130,
|
||||
ipad: 100,
|
||||
itouch: 80
|
||||
}, {
|
||||
period: '2012',
|
||||
iphone: 80,
|
||||
ipad: 60,
|
||||
itouch: 70
|
||||
}, {
|
||||
period: '2013',
|
||||
iphone: 70,
|
||||
ipad: 200,
|
||||
itouch: 140
|
||||
}, {
|
||||
period: '2014',
|
||||
iphone: 180,
|
||||
ipad: 150,
|
||||
itouch: 140
|
||||
}, {
|
||||
period: '2015',
|
||||
iphone: 105,
|
||||
ipad: 100,
|
||||
itouch: 80
|
||||
},
|
||||
{
|
||||
period: '2016',
|
||||
iphone: 250,
|
||||
ipad: 150,
|
||||
itouch: 200
|
||||
}],
|
||||
xkey: 'period',
|
||||
ykeys: ['iphone', 'ipad', 'itouch'],
|
||||
labels: ['iPhone', 'iPad', 'iPod Touch'],
|
||||
pointSize: 3,
|
||||
fillOpacity: 0,
|
||||
pointStrokeColors:['#00bfc7', '#fdc006', '#9675ce'],
|
||||
behaveLikeLine: true,
|
||||
gridLineColor: '#e0e0e0',
|
||||
lineWidth: 1,
|
||||
hideHover: 'auto',
|
||||
lineColors: ['#00bfc7', '#fdc006', '#9675ce'],
|
||||
resize: true
|
||||
|
||||
});
|
||||
|
||||
Morris.Area({
|
||||
element: 'morris-area-chart2',
|
||||
data: [{
|
||||
period: '2010',
|
||||
SiteA: 0,
|
||||
SiteB: 0,
|
||||
|
||||
}, {
|
||||
period: '2011',
|
||||
SiteA: 130,
|
||||
SiteB: 100,
|
||||
|
||||
}, {
|
||||
period: '2012',
|
||||
SiteA: 80,
|
||||
SiteB: 60,
|
||||
|
||||
}, {
|
||||
period: '2013',
|
||||
SiteA: 70,
|
||||
SiteB: 200,
|
||||
|
||||
}, {
|
||||
period: '2014',
|
||||
SiteA: 180,
|
||||
SiteB: 150,
|
||||
|
||||
}, {
|
||||
period: '2015',
|
||||
SiteA: 105,
|
||||
SiteB: 90,
|
||||
|
||||
},
|
||||
{
|
||||
period: '2016',
|
||||
SiteA: 250,
|
||||
SiteB: 150,
|
||||
|
||||
}],
|
||||
xkey: 'period',
|
||||
ykeys: ['SiteA', 'SiteB'],
|
||||
labels: ['Site A', 'Site B'],
|
||||
pointSize: 0,
|
||||
fillOpacity: 0.4,
|
||||
pointStrokeColors:['#b4becb', '#01c0c8'],
|
||||
behaveLikeLine: true,
|
||||
gridLineColor: '#e0e0e0',
|
||||
lineWidth: 0,
|
||||
smooth: false,
|
||||
hideHover: 'auto',
|
||||
lineColors: ['#b4becb', '#01c0c8'],
|
||||
resize: true
|
||||
|
||||
});
|
||||
|
||||
|
||||
// LINE CHART
|
||||
var line = new Morris.Line({
|
||||
element: 'morris-line-chart',
|
||||
resize: true,
|
||||
data: [
|
||||
{y: '2011 Q1', item1: 2666},
|
||||
{y: '2011 Q2', item1: 2778},
|
||||
{y: '2011 Q3', item1: 4912},
|
||||
{y: '2011 Q4', item1: 3767},
|
||||
{y: '2012 Q1', item1: 6810},
|
||||
{y: '2012 Q2', item1: 5670},
|
||||
{y: '2012 Q3', item1: 4820},
|
||||
{y: '2012 Q4', item1: 15073},
|
||||
{y: '2013 Q1', item1: 10687},
|
||||
{y: '2013 Q2', item1: 8432}
|
||||
],
|
||||
xkey: 'y',
|
||||
ykeys: ['item1'],
|
||||
labels: ['Item 1'],
|
||||
gridLineColor: '#eef0f2',
|
||||
lineColors: ['#a3a4a9'],
|
||||
lineWidth: 1,
|
||||
hideHover: 'auto'
|
||||
});
|
||||
// Morris donut chart
|
||||
|
||||
Morris.Donut({
|
||||
element: 'morris-donut-chart',
|
||||
data: [{
|
||||
label: "Download Sales",
|
||||
value: 12,
|
||||
|
||||
}, {
|
||||
label: "In-Store Sales",
|
||||
value: 30
|
||||
}, {
|
||||
label: "Mail-Order Sales",
|
||||
value: 20
|
||||
}],
|
||||
resize: true,
|
||||
colors:['#99d683', '#13dafe', '#6164c1']
|
||||
});
|
||||
|
||||
// Morris bar chart
|
||||
Morris.Bar({
|
||||
element: 'morris-bar-chart',
|
||||
data: [{
|
||||
y: '2006',
|
||||
a: 100,
|
||||
b: 90,
|
||||
c: 60
|
||||
}, {
|
||||
y: '2007',
|
||||
a: 75,
|
||||
b: 65,
|
||||
c: 40
|
||||
}, {
|
||||
y: '2008',
|
||||
a: 50,
|
||||
b: 40,
|
||||
c: 30
|
||||
}, {
|
||||
y: '2009',
|
||||
a: 75,
|
||||
b: 65,
|
||||
c: 40
|
||||
}, {
|
||||
y: '2010',
|
||||
a: 50,
|
||||
b: 40,
|
||||
c: 30
|
||||
}, {
|
||||
y: '2011',
|
||||
a: 75,
|
||||
b: 65,
|
||||
c: 40
|
||||
}, {
|
||||
y: '2012',
|
||||
a: 100,
|
||||
b: 90,
|
||||
c: 40
|
||||
}],
|
||||
xkey: 'y',
|
||||
ykeys: ['a', 'b', 'c'],
|
||||
labels: ['A', 'B', 'C'],
|
||||
barColors:['#b8edf0', '#b4c1d7', '#fcc9ba'],
|
||||
hideHover: 'auto',
|
||||
gridLineColor: '#eef0f2',
|
||||
resize: true
|
||||
});
|
||||
// Extra chart
|
||||
Morris.Area({
|
||||
element: 'extra-area-chart',
|
||||
data: [{
|
||||
period: '2010',
|
||||
iphone: 0,
|
||||
ipad: 0,
|
||||
itouch: 0
|
||||
}, {
|
||||
period: '2011',
|
||||
iphone: 50,
|
||||
ipad: 15,
|
||||
itouch: 5
|
||||
}, {
|
||||
period: '2012',
|
||||
iphone: 20,
|
||||
ipad: 50,
|
||||
itouch: 65
|
||||
}, {
|
||||
period: '2013',
|
||||
iphone: 60,
|
||||
ipad: 12,
|
||||
itouch: 7
|
||||
}, {
|
||||
period: '2014',
|
||||
iphone: 30,
|
||||
ipad: 20,
|
||||
itouch: 120
|
||||
}, {
|
||||
period: '2015',
|
||||
iphone: 25,
|
||||
ipad: 80,
|
||||
itouch: 40
|
||||
}, {
|
||||
period: '2016',
|
||||
iphone: 10,
|
||||
ipad: 10,
|
||||
itouch: 10
|
||||
}
|
||||
|
||||
|
||||
],
|
||||
lineColors: ['#fb9678', '#01c0c8', '#8698b7'],
|
||||
xkey: 'period',
|
||||
ykeys: ['iphone', 'ipad', 'itouch'],
|
||||
labels: ['Site A', 'Site B', 'Site C'],
|
||||
pointSize: 0,
|
||||
lineWidth: 0,
|
||||
resize:true,
|
||||
fillOpacity: 0.8,
|
||||
behaveLikeLine: true,
|
||||
gridLineColor: '#e0e0e0',
|
||||
hideHover: 'auto'
|
||||
|
||||
});
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
// Morris bar chart
|
||||
Morris.Bar({
|
||||
element: 'morris-bar-chart',
|
||||
data: [{
|
||||
y: '2006',
|
||||
Sale: 100,
|
||||
Rent: 90,
|
||||
c: 60
|
||||
}, {
|
||||
y: '2007',
|
||||
Sale: 75,
|
||||
Rent: 65,
|
||||
c: 40
|
||||
}, {
|
||||
y: '2008',
|
||||
Sale: 50,
|
||||
Rent: 40,
|
||||
c: 30
|
||||
}, {
|
||||
y: '2009',
|
||||
Sale: 75,
|
||||
Rent: 65,
|
||||
c: 40
|
||||
}, {
|
||||
y: '2010',
|
||||
Sale: 50,
|
||||
Rent: 40,
|
||||
c: 30
|
||||
}, {
|
||||
y: '2011',
|
||||
Sale: 75,
|
||||
Rent: 65,
|
||||
c: 40
|
||||
},{
|
||||
y: '2012',
|
||||
Sale: 75,
|
||||
Rent: 65,
|
||||
c: 40
|
||||
},{
|
||||
y: '2013',
|
||||
Sale: 100,
|
||||
Rent: 90,
|
||||
c: 40
|
||||
}],
|
||||
xkey: 'y',
|
||||
ykeys: ['Sale', 'Rent', 'c'],
|
||||
labels: ['For-sale', 'For-rent', 'All'],
|
||||
barColors:['#b8edf0', '#b4c1d7', '#fcc9ba'],
|
||||
hideHover: 'auto',
|
||||
|
||||
gridLineColor: '#eef0f2',
|
||||
resize: true
|
||||
});
|
||||
|
||||
// This is for the sparkline chart
|
||||
|
||||
var sparklineLogin = function() {
|
||||
|
||||
$('#sparkline2dash').sparkline([6, 10, 9, 11, 9, 10, 12], {
|
||||
type: 'bar',
|
||||
height: '154',
|
||||
barWidth: '4',
|
||||
resize: true,
|
||||
barSpacing: '10',
|
||||
barColor: '#25a6f7'
|
||||
});
|
||||
$('#sales1').sparkline([6, 10, 9, 11, 9, 10, 12], {
|
||||
type: 'bar',
|
||||
height: '154',
|
||||
barWidth: '4',
|
||||
resize: true,
|
||||
barSpacing: '10',
|
||||
barColor: '#fff'
|
||||
});
|
||||
|
||||
}
|
||||
var sparkResize;
|
||||
|
||||
$(window).resize(function(e) {
|
||||
clearTimeout(sparkResize);
|
||||
sparkResize = setTimeout(sparklineLogin, 500);
|
||||
});
|
||||
sparklineLogin();
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
$(document).ready(function() {
|
||||
$(".tst1").click(function(){
|
||||
$.toast({
|
||||
heading: 'Welcome to my Elite admin',
|
||||
text: 'Use the predefined ones, or specify a custom position object.',
|
||||
position: 'top-right',
|
||||
loaderBg:'#ff6849',
|
||||
icon: 'info',
|
||||
hideAfter: 3000,
|
||||
stack: 6
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(".tst2").click(function(){
|
||||
$.toast({
|
||||
heading: 'Welcome to my Elite admin',
|
||||
text: 'Use the predefined ones, or specify a custom position object.',
|
||||
position: 'top-right',
|
||||
loaderBg:'#ff6849',
|
||||
icon: 'warning',
|
||||
hideAfter: 3500,
|
||||
stack: 6
|
||||
});
|
||||
|
||||
});
|
||||
$(".tst3").click(function(){
|
||||
$.toast({
|
||||
heading: 'Welcome to my Elite admin',
|
||||
text: 'Use the predefined ones, or specify a custom position object.',
|
||||
position: 'top-right',
|
||||
loaderBg:'#ff6849',
|
||||
icon: 'success',
|
||||
hideAfter: 3500,
|
||||
stack: 6
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$(".tst4").click(function(){
|
||||
$.toast({
|
||||
heading: 'Welcome to my Elite admin',
|
||||
text: 'Use the predefined ones, or specify a custom position object.',
|
||||
position: 'top-right',
|
||||
loaderBg:'#ff6849',
|
||||
icon: 'error',
|
||||
hideAfter: 3500
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
+325
@@ -0,0 +1,325 @@
|
||||
/* ========================================================================
|
||||
* Bootstrap (plugin): validator.js v0.9.0
|
||||
* ========================================================================
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015 Cina Saffary.
|
||||
* Made by @1000hz in the style of Bootstrap 3 era @fat
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
* ======================================================================== */
|
||||
|
||||
|
||||
+function ($) {
|
||||
'use strict';
|
||||
|
||||
// VALIDATOR CLASS DEFINITION
|
||||
// ==========================
|
||||
|
||||
var Validator = function (element, options) {
|
||||
this.$element = $(element)
|
||||
this.options = options
|
||||
|
||||
options.errors = $.extend({}, Validator.DEFAULTS.errors, options.errors)
|
||||
|
||||
for (var custom in options.custom) {
|
||||
if (!options.errors[custom]) throw new Error('Missing default error message for custom validator: ' + custom)
|
||||
}
|
||||
|
||||
$.extend(Validator.VALIDATORS, options.custom)
|
||||
|
||||
this.$element.attr('novalidate', true) // disable automatic native validation
|
||||
this.toggleSubmit()
|
||||
|
||||
this.$element.on('input.bs.validator change.bs.validator focusout.bs.validator', $.proxy(this.validateInput, this))
|
||||
this.$element.on('submit.bs.validator', $.proxy(this.onSubmit, this))
|
||||
|
||||
this.$element.find('[data-match]').each(function () {
|
||||
var $this = $(this)
|
||||
var target = $this.data('match')
|
||||
|
||||
$(target).on('input.bs.validator', function (e) {
|
||||
$this.val() && $this.trigger('input.bs.validator')
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
Validator.INPUT_SELECTOR = ':input:not([type="submit"], button):enabled:visible'
|
||||
|
||||
Validator.DEFAULTS = {
|
||||
delay: 500,
|
||||
html: false,
|
||||
disable: true,
|
||||
custom: {},
|
||||
errors: {
|
||||
match: 'Does not match',
|
||||
minlength: 'Not long enough'
|
||||
},
|
||||
feedback: {
|
||||
success: 'glyphicon-ok',
|
||||
error: 'glyphicon-remove'
|
||||
}
|
||||
}
|
||||
|
||||
Validator.VALIDATORS = {
|
||||
'native': function ($el) {
|
||||
var el = $el[0]
|
||||
return el.checkValidity ? el.checkValidity() : true
|
||||
},
|
||||
'match': function ($el) {
|
||||
var target = $el.data('match')
|
||||
return !$el.val() || $el.val() === $(target).val()
|
||||
},
|
||||
'minlength': function ($el) {
|
||||
var minlength = $el.data('minlength')
|
||||
return !$el.val() || $el.val().length >= minlength
|
||||
}
|
||||
}
|
||||
|
||||
Validator.prototype.validateInput = function (e) {
|
||||
var $el = $(e.target)
|
||||
var prevErrors = $el.data('bs.validator.errors')
|
||||
var errors
|
||||
|
||||
if ($el.is('[type="radio"]')) $el = this.$element.find('input[name="' + $el.attr('name') + '"]')
|
||||
|
||||
this.$element.trigger(e = $.Event('validate.bs.validator', {relatedTarget: $el[0]}))
|
||||
|
||||
if (e.isDefaultPrevented()) return
|
||||
|
||||
var self = this
|
||||
|
||||
this.runValidators($el).done(function (errors) {
|
||||
$el.data('bs.validator.errors', errors)
|
||||
|
||||
errors.length ? self.showErrors($el) : self.clearErrors($el)
|
||||
|
||||
if (!prevErrors || errors.toString() !== prevErrors.toString()) {
|
||||
e = errors.length
|
||||
? $.Event('invalid.bs.validator', {relatedTarget: $el[0], detail: errors})
|
||||
: $.Event('valid.bs.validator', {relatedTarget: $el[0], detail: prevErrors})
|
||||
|
||||
self.$element.trigger(e)
|
||||
}
|
||||
|
||||
self.toggleSubmit()
|
||||
|
||||
self.$element.trigger($.Event('validated.bs.validator', {relatedTarget: $el[0]}))
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Validator.prototype.runValidators = function ($el) {
|
||||
var errors = []
|
||||
var deferred = $.Deferred()
|
||||
var options = this.options
|
||||
|
||||
$el.data('bs.validator.deferred') && $el.data('bs.validator.deferred').reject()
|
||||
$el.data('bs.validator.deferred', deferred)
|
||||
|
||||
function getErrorMessage(key) {
|
||||
return $el.data(key + '-error')
|
||||
|| $el.data('error')
|
||||
|| key == 'native' && $el[0].validationMessage
|
||||
|| options.errors[key]
|
||||
}
|
||||
|
||||
$.each(Validator.VALIDATORS, $.proxy(function (key, validator) {
|
||||
if (($el.data(key) || key == 'native') && !validator.call(this, $el)) {
|
||||
var error = getErrorMessage(key)
|
||||
!~errors.indexOf(error) && errors.push(error)
|
||||
}
|
||||
}, this))
|
||||
|
||||
if (!errors.length && $el.val() && $el.data('remote')) {
|
||||
this.defer($el, function () {
|
||||
var data = {}
|
||||
data[$el.attr('name')] = $el.val()
|
||||
$.get($el.data('remote'), data)
|
||||
.fail(function (jqXHR, textStatus, error) { errors.push(getErrorMessage('remote') || error) })
|
||||
.always(function () { deferred.resolve(errors)})
|
||||
})
|
||||
} else deferred.resolve(errors)
|
||||
|
||||
return deferred.promise()
|
||||
}
|
||||
|
||||
Validator.prototype.validate = function () {
|
||||
var delay = this.options.delay
|
||||
|
||||
this.options.delay = 0
|
||||
this.$element.find(Validator.INPUT_SELECTOR).trigger('input.bs.validator')
|
||||
this.options.delay = delay
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
Validator.prototype.showErrors = function ($el) {
|
||||
var method = this.options.html ? 'html' : 'text'
|
||||
|
||||
this.defer($el, function () {
|
||||
var $group = $el.closest('.form-group')
|
||||
var $block = $group.find('.help-block.with-errors')
|
||||
var $feedback = $group.find('.form-control-feedback')
|
||||
var errors = $el.data('bs.validator.errors')
|
||||
|
||||
if (!errors.length) return
|
||||
|
||||
errors = $('<ul/>')
|
||||
.addClass('list-unstyled')
|
||||
.append($.map(errors, function (error) { return $('<li/>')[method](error) }))
|
||||
|
||||
$block.data('bs.validator.originalContent') === undefined && $block.data('bs.validator.originalContent', $block.html())
|
||||
$block.empty().append(errors)
|
||||
$group.addClass('has-error')
|
||||
|
||||
$feedback.length
|
||||
&& $feedback.removeClass(this.options.feedback.success)
|
||||
&& $feedback.addClass(this.options.feedback.error)
|
||||
&& $group.removeClass('has-success')
|
||||
})
|
||||
}
|
||||
|
||||
Validator.prototype.clearErrors = function ($el) {
|
||||
var $group = $el.closest('.form-group')
|
||||
var $block = $group.find('.help-block.with-errors')
|
||||
var $feedback = $group.find('.form-control-feedback')
|
||||
|
||||
$block.html($block.data('bs.validator.originalContent'))
|
||||
$group.removeClass('has-error')
|
||||
|
||||
$feedback.length
|
||||
&& $feedback.removeClass(this.options.feedback.error)
|
||||
&& $feedback.addClass(this.options.feedback.success)
|
||||
&& $group.addClass('has-success')
|
||||
}
|
||||
|
||||
Validator.prototype.hasErrors = function () {
|
||||
function fieldErrors() {
|
||||
return !!($(this).data('bs.validator.errors') || []).length
|
||||
}
|
||||
|
||||
return !!this.$element.find(Validator.INPUT_SELECTOR).filter(fieldErrors).length
|
||||
}
|
||||
|
||||
Validator.prototype.isIncomplete = function () {
|
||||
function fieldIncomplete() {
|
||||
return this.type === 'checkbox' ? !this.checked :
|
||||
this.type === 'radio' ? !$('[name="' + this.name + '"]:checked').length :
|
||||
$.trim(this.value) === ''
|
||||
}
|
||||
|
||||
return !!this.$element.find(Validator.INPUT_SELECTOR).filter('[required]').filter(fieldIncomplete).length
|
||||
}
|
||||
|
||||
Validator.prototype.onSubmit = function (e) {
|
||||
this.validate()
|
||||
if (this.isIncomplete() || this.hasErrors()) e.preventDefault()
|
||||
}
|
||||
|
||||
Validator.prototype.toggleSubmit = function () {
|
||||
if(!this.options.disable) return
|
||||
|
||||
var $btn = $('button[type="submit"], input[type="submit"]')
|
||||
.filter('[form="' + this.$element.attr('id') + '"]')
|
||||
.add(this.$element.find('input[type="submit"], button[type="submit"]'))
|
||||
|
||||
$btn.toggleClass('disabled', this.isIncomplete() || this.hasErrors())
|
||||
}
|
||||
|
||||
Validator.prototype.defer = function ($el, callback) {
|
||||
callback = $.proxy(callback, this)
|
||||
if (!this.options.delay) return callback()
|
||||
window.clearTimeout($el.data('bs.validator.timeout'))
|
||||
$el.data('bs.validator.timeout', window.setTimeout(callback, this.options.delay))
|
||||
}
|
||||
|
||||
Validator.prototype.destroy = function () {
|
||||
this.$element
|
||||
.removeAttr('novalidate')
|
||||
.removeData('bs.validator')
|
||||
.off('.bs.validator')
|
||||
|
||||
this.$element.find(Validator.INPUT_SELECTOR)
|
||||
.off('.bs.validator')
|
||||
.removeData(['bs.validator.errors', 'bs.validator.deferred'])
|
||||
.each(function () {
|
||||
var $this = $(this)
|
||||
var timeout = $this.data('bs.validator.timeout')
|
||||
window.clearTimeout(timeout) && $this.removeData('bs.validator.timeout')
|
||||
})
|
||||
|
||||
this.$element.find('.help-block.with-errors').each(function () {
|
||||
var $this = $(this)
|
||||
var originalContent = $this.data('bs.validator.originalContent')
|
||||
|
||||
$this
|
||||
.removeData('bs.validator.originalContent')
|
||||
.html(originalContent)
|
||||
})
|
||||
|
||||
this.$element.find('input[type="submit"], button[type="submit"]').removeClass('disabled')
|
||||
|
||||
this.$element.find('.has-error').removeClass('has-error')
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
// VALIDATOR PLUGIN DEFINITION
|
||||
// ===========================
|
||||
|
||||
|
||||
function Plugin(option) {
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var options = $.extend({}, Validator.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
||||
var data = $this.data('bs.validator')
|
||||
|
||||
if (!data && option == 'destroy') return
|
||||
if (!data) $this.data('bs.validator', (data = new Validator(this, options)))
|
||||
if (typeof option == 'string') data[option]()
|
||||
})
|
||||
}
|
||||
|
||||
var old = $.fn.validator
|
||||
|
||||
$.fn.validator = Plugin
|
||||
$.fn.validator.Constructor = Validator
|
||||
|
||||
|
||||
// VALIDATOR NO CONFLICT
|
||||
// =====================
|
||||
|
||||
$.fn.validator.noConflict = function () {
|
||||
$.fn.validator = old
|
||||
return this
|
||||
}
|
||||
|
||||
|
||||
// VALIDATOR DATA-API
|
||||
// ==================
|
||||
|
||||
$(window).on('load', function () {
|
||||
$('form[data-toggle="validator"]').each(function () {
|
||||
var $form = $(this)
|
||||
Plugin.call($form, $form.data())
|
||||
})
|
||||
})
|
||||
|
||||
}(jQuery);
|
||||
+1
@@ -0,0 +1 @@
|
||||
!function(t){"use strict";function e(t){return null!==t&&t===t.window}function n(t){return e(t)?t:9===t.nodeType&&t.defaultView}function a(t){var e,a,i={top:0,left:0},o=t&&t.ownerDocument;return e=o.documentElement,"undefined"!=typeof t.getBoundingClientRect&&(i=t.getBoundingClientRect()),a=n(o),{top:i.top+a.pageYOffset-e.clientTop,left:i.left+a.pageXOffset-e.clientLeft}}function i(t){var e="";for(var n in t)t.hasOwnProperty(n)&&(e+=n+":"+t[n]+";");return e}function o(t){if(d.allowEvent(t)===!1)return null;for(var e=null,n=t.target||t.srcElement;null!==n.parentElement;){if(!(n instanceof SVGElement||-1===n.className.indexOf("waves-effect"))){e=n;break}if(n.classList.contains("waves-effect")){e=n;break}n=n.parentElement}return e}function r(e){var n=o(e);null!==n&&(c.show(e,n),"ontouchstart"in t&&(n.addEventListener("touchend",c.hide,!1),n.addEventListener("touchcancel",c.hide,!1)),n.addEventListener("mouseup",c.hide,!1),n.addEventListener("mouseleave",c.hide,!1))}var s=s||{},u=document.querySelectorAll.bind(document),c={duration:750,show:function(t,e){if(2===t.button)return!1;var n=e||this,o=document.createElement("div");o.className="waves-ripple",n.appendChild(o);var r=a(n),s=t.pageY-r.top,u=t.pageX-r.left,d="scale("+n.clientWidth/100*10+")";"touches"in t&&(s=t.touches[0].pageY-r.top,u=t.touches[0].pageX-r.left),o.setAttribute("data-hold",Date.now()),o.setAttribute("data-scale",d),o.setAttribute("data-x",u),o.setAttribute("data-y",s);var l={top:s+"px",left:u+"px"};o.className=o.className+" waves-notransition",o.setAttribute("style",i(l)),o.className=o.className.replace("waves-notransition",""),l["-webkit-transform"]=d,l["-moz-transform"]=d,l["-ms-transform"]=d,l["-o-transform"]=d,l.transform=d,l.opacity="1",l["-webkit-transition-duration"]=c.duration+"ms",l["-moz-transition-duration"]=c.duration+"ms",l["-o-transition-duration"]=c.duration+"ms",l["transition-duration"]=c.duration+"ms",l["-webkit-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",l["-moz-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",l["-o-transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",l["transition-timing-function"]="cubic-bezier(0.250, 0.460, 0.450, 0.940)",o.setAttribute("style",i(l))},hide:function(t){d.touchup(t);var e=this,n=(1.4*e.clientWidth,null),a=e.getElementsByClassName("waves-ripple");if(!(a.length>0))return!1;n=a[a.length-1];var o=n.getAttribute("data-x"),r=n.getAttribute("data-y"),s=n.getAttribute("data-scale"),u=Date.now()-Number(n.getAttribute("data-hold")),l=350-u;0>l&&(l=0),setTimeout(function(){var t={top:r+"px",left:o+"px",opacity:"0","-webkit-transition-duration":c.duration+"ms","-moz-transition-duration":c.duration+"ms","-o-transition-duration":c.duration+"ms","transition-duration":c.duration+"ms","-webkit-transform":s,"-moz-transform":s,"-ms-transform":s,"-o-transform":s,transform:s};n.setAttribute("style",i(t)),setTimeout(function(){try{e.removeChild(n)}catch(t){return!1}},c.duration)},l)},wrapInput:function(t){for(var e=0;e<t.length;e++){var n=t[e];if("input"===n.tagName.toLowerCase()){var a=n.parentNode;if("i"===a.tagName.toLowerCase()&&-1!==a.className.indexOf("waves-effect"))continue;var i=document.createElement("i");i.className=n.className+" waves-input-wrapper";var o=n.getAttribute("style");o||(o=""),i.setAttribute("style",o),n.className="waves-button-input",n.removeAttribute("style"),a.replaceChild(i,n),i.appendChild(n)}}}},d={touches:0,allowEvent:function(t){var e=!0;return"touchstart"===t.type?d.touches+=1:"touchend"===t.type||"touchcancel"===t.type?setTimeout(function(){d.touches>0&&(d.touches-=1)},500):"mousedown"===t.type&&d.touches>0&&(e=!1),e},touchup:function(t){d.allowEvent(t)}};s.displayEffect=function(e){e=e||{},"duration"in e&&(c.duration=e.duration),c.wrapInput(u(".waves-effect")),"ontouchstart"in t&&document.body.addEventListener("touchstart",r,!1),document.body.addEventListener("mousedown",r,!1)},s.attach=function(e){"input"===e.tagName.toLowerCase()&&(c.wrapInput([e]),e=e.parentElement),"ontouchstart"in t&&e.addEventListener("touchstart",r,!1),e.addEventListener("mousedown",r,!1)},t.Waves=s,document.addEventListener("DOMContentLoaded",function(){s.displayEffect()},!1)}(window);
|
||||
+236
@@ -0,0 +1,236 @@
|
||||
// This is for Vertical carousel
|
||||
|
||||
$('.vcarousel').carousel({
|
||||
interval: 3000
|
||||
})
|
||||
// This is for Morris-chart
|
||||
|
||||
Morris.Area({
|
||||
element: 'morris-area-chart',
|
||||
data: [{
|
||||
period: '2010',
|
||||
iphone: 50,
|
||||
ipad: 80,
|
||||
itouch: 20
|
||||
}, {
|
||||
period: '2011',
|
||||
iphone: 130,
|
||||
ipad: 100,
|
||||
itouch: 80
|
||||
}, {
|
||||
period: '2012',
|
||||
iphone: 80,
|
||||
ipad: 60,
|
||||
itouch: 70
|
||||
}, {
|
||||
period: '2013',
|
||||
iphone: 70,
|
||||
ipad: 200,
|
||||
itouch: 140
|
||||
}, {
|
||||
period: '2014',
|
||||
iphone: 180,
|
||||
ipad: 150,
|
||||
itouch: 140
|
||||
}, {
|
||||
period: '2015',
|
||||
iphone: 105,
|
||||
ipad: 100,
|
||||
itouch: 80
|
||||
},
|
||||
{
|
||||
period: '2016',
|
||||
iphone: 250,
|
||||
ipad: 150,
|
||||
itouch: 200
|
||||
}],
|
||||
xkey: 'period',
|
||||
ykeys: ['iphone', 'ipad', 'itouch'],
|
||||
labels: ['iPhone', 'iPad', 'iPod Touch'],
|
||||
pointSize: 3,
|
||||
fillOpacity: 0,
|
||||
pointStrokeColors:['#00bfc7', '#fdc006', '#9675ce'],
|
||||
behaveLikeLine: true,
|
||||
gridLineColor: '#e0e0e0',
|
||||
lineWidth: 3,
|
||||
hideHover: 'auto',
|
||||
lineColors: ['#00bfc7', '#fdc006', '#9675ce'],
|
||||
resize: true
|
||||
|
||||
});
|
||||
// This is for Morris-chart-2
|
||||
Morris.Area({
|
||||
element: 'morris-area-chart2',
|
||||
data: [{
|
||||
period: '2010',
|
||||
SiteA: 0,
|
||||
SiteB: 0,
|
||||
|
||||
}, {
|
||||
period: '2011',
|
||||
SiteA: 130,
|
||||
SiteB: 100,
|
||||
|
||||
}, {
|
||||
period: '2012',
|
||||
SiteA: 80,
|
||||
SiteB: 60,
|
||||
|
||||
}, {
|
||||
period: '2013',
|
||||
SiteA: 70,
|
||||
SiteB: 200,
|
||||
|
||||
}, {
|
||||
period: '2014',
|
||||
SiteA: 180,
|
||||
SiteB: 150,
|
||||
|
||||
}, {
|
||||
period: '2015',
|
||||
SiteA: 105,
|
||||
SiteB: 90,
|
||||
|
||||
},
|
||||
{
|
||||
period: '2016',
|
||||
SiteA: 250,
|
||||
SiteB: 150,
|
||||
|
||||
}],
|
||||
xkey: 'period',
|
||||
ykeys: ['SiteA', 'SiteB'],
|
||||
labels: ['Site A', 'Site B'],
|
||||
pointSize: 0,
|
||||
fillOpacity: 0.4,
|
||||
pointStrokeColors:['#b4becb', '#01c0c8'],
|
||||
behaveLikeLine: true,
|
||||
gridLineColor: '#e0e0e0',
|
||||
lineWidth: 0,
|
||||
smooth: false,
|
||||
hideHover: 'auto',
|
||||
lineColors: ['#b4becb', '#01c0c8'],
|
||||
resize: true
|
||||
|
||||
});
|
||||
|
||||
// This is for Counter
|
||||
$(".counter").counterUp({
|
||||
delay: 100,
|
||||
time: 1200
|
||||
});
|
||||
|
||||
// This is for Sparkline-chart
|
||||
|
||||
var sparklineLogin = function() {
|
||||
$("#sparkline1dash").sparkline([0, 23, 43, 35, 44, 45, 56, 37, 40, 45, 56, 7, 10], {
|
||||
type: 'line',
|
||||
width: '100%',
|
||||
height: '70',
|
||||
lineColor: '#fff',
|
||||
fillColor: 'transparent',
|
||||
spotColor: '#fff',
|
||||
minSpotColor: undefined,
|
||||
maxSpotColor: undefined,
|
||||
highlightSpotColor: undefined,
|
||||
highlightLineColor: undefined
|
||||
});
|
||||
$('#sparkline2dash').sparkline([10, 12, 9, 6, 10, 9, 11, 9, 10, 12, 9, 11, 9, 10, 12,], {
|
||||
type: 'bar',
|
||||
height: '70',
|
||||
barWidth: '5',
|
||||
resize: true,
|
||||
barSpacing: '10',
|
||||
barColor: '#fff'
|
||||
});
|
||||
$("#sparkline3dash").sparkline([0, 23, 43, 35, 44, 45, 56, 37, 40, 45, 56, 7, 10], {
|
||||
type: 'line',
|
||||
width: '100%',
|
||||
height: '70',
|
||||
lineColor: '#fff',
|
||||
fillColor: 'transparent',
|
||||
spotColor: '#fff',
|
||||
minSpotColor: undefined,
|
||||
maxSpotColor: undefined,
|
||||
highlightSpotColor: undefined,
|
||||
highlightLineColor: undefined
|
||||
});
|
||||
$('#sparkline4dash').sparkline([10, 12, 9, 6, 10, 9, 11, 9, 10, 12, 9, 11, 9, 10, 12,], {
|
||||
type: 'bar',
|
||||
height: '70',
|
||||
barWidth: '5',
|
||||
resize: true,
|
||||
barSpacing: '10',
|
||||
barColor: '#fff'
|
||||
});
|
||||
$('#sales1').sparkline([20, 40, 30], {
|
||||
type: 'pie',
|
||||
height: '100',
|
||||
resize: true,
|
||||
sliceColors: ['#808f8f', '#fecd36', '#f1f2f7']
|
||||
});
|
||||
$('#sales2').sparkline([6, 10, 9, 11, 9, 10, 12], {
|
||||
type: 'bar',
|
||||
height: '154',
|
||||
barWidth: '4',
|
||||
resize: true,
|
||||
barSpacing: '10',
|
||||
barColor: '#25a6f7'
|
||||
});
|
||||
$("#sparkline8").sparkline([2,4,4,6,8,5,6,4,8,6,6,2 ], {
|
||||
type: 'line',
|
||||
width: '100%',
|
||||
height: '50',
|
||||
lineColor: '#99d683',
|
||||
fillColor: '#99d683',
|
||||
maxSpotColor: '#99d683',
|
||||
highlightLineColor: 'rgba(0, 0, 0, 0.2)',
|
||||
highlightSpotColor: '#99d683'
|
||||
});
|
||||
$("#sparkline9").sparkline([0,2,8,6,8,5,6,4,8,6,6,2 ], {
|
||||
type: 'line',
|
||||
width: '100%',
|
||||
height: '50',
|
||||
lineColor: '#13dafe',
|
||||
fillColor: '#13dafe',
|
||||
minSpotColor:'#13dafe',
|
||||
maxSpotColor: '#13dafe',
|
||||
highlightLineColor: 'rgba(0, 0, 0, 0.2)',
|
||||
highlightSpotColor: '#13dafe'
|
||||
});
|
||||
$("#sparkline10").sparkline([2,4,4,6,8,5,6,4,8,6,6,2], {
|
||||
type: 'line',
|
||||
width: '100%',
|
||||
height: '50',
|
||||
lineColor: '#ffdb4a',
|
||||
fillColor: '#ffdb4a',
|
||||
maxSpotColor: '#ffdb4a',
|
||||
highlightLineColor: 'rgba(0, 0, 0, 0.2)',
|
||||
highlightSpotColor: '#ffdb4a'
|
||||
});
|
||||
|
||||
}
|
||||
var sparkResize;
|
||||
|
||||
$(window).resize(function(e) {
|
||||
clearTimeout(sparkResize);
|
||||
sparkResize = setTimeout(sparklineLogin, 100);
|
||||
});
|
||||
sparklineLogin();
|
||||
|
||||
var icons = new Skycons({"color": "#2b2b2b"}),
|
||||
list = [
|
||||
"clear-day", "clear-night", "partly-cloudy-day",
|
||||
"partly-cloudy-night", "cloudy", "rain", "sleet", "snow", "wind",
|
||||
"fog"
|
||||
],
|
||||
i;
|
||||
for(i = list.length; i--; ) {
|
||||
var weatherType = list[i],
|
||||
elements = document.getElementsByClassName( weatherType );
|
||||
for (e = elements.length; e--;){
|
||||
icons.set( elements[e], weatherType );
|
||||
}
|
||||
}
|
||||
icons.play();
|
||||
|
||||
Reference in New Issue
Block a user