Compare commits
43 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ef7d1e4cf | ||
|
|
b6515d528a | ||
|
|
149c20959b | ||
|
|
5677271d38 | ||
|
|
ac69a861ee | ||
|
|
cfa254e96f | ||
|
|
2715d7b111 | ||
|
|
6e4a3aeea0 | ||
|
|
5ad2be7757 | ||
|
|
d8ac55d6a3 | ||
|
|
1d900be948 | ||
|
|
35ba9268b6 | ||
|
|
bdf6cd6fd4 | ||
|
|
7737015bdc | ||
|
|
eb15ebc9d5 | ||
|
|
f31f32b317 | ||
|
|
e12d021779 | ||
|
|
3a999f72ce | ||
|
|
841ef63f20 | ||
|
|
3395b8b18b | ||
|
|
ce062a3533 | ||
|
|
4dc1189fa1 | ||
|
|
41b271f3fc | ||
|
|
aa2170285c | ||
|
|
d56557e274 | ||
|
|
024b276c20 | ||
|
|
854142ca16 | ||
|
|
67910e590e | ||
|
|
1027479da9 | ||
|
|
30b27596b2 | ||
|
|
90f829f420 | ||
|
|
ec3856d238 | ||
|
|
274063d472 | ||
|
|
b1f6042969 | ||
|
|
248cb48bbd | ||
|
|
9ee5a751a6 | ||
|
|
424eab60e3 | ||
|
|
58638459fd | ||
|
|
a3f0e2d580 | ||
|
|
1e58140233 | ||
|
|
2960616a69 | ||
|
|
27e0398db6 | ||
|
|
b2a34fdcd3 |
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bower_components/
|
||||
104
README.md
@@ -1,6 +1,102 @@
|
||||
AdminLTE
|
||||
========
|
||||
[](https://flattr.com/submit/auto?user_id=almasaeed2010&url=http://almsaeedstudio.com&title=AdminLTE&language=&tags=github&category=software) [](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=629XCUSXBHCBC "Donate")
|
||||
------------------------
|
||||
|
||||
Completely free admin control panel theme. Based on bootstrap 3.x.
|
||||
**AdminLTE** -- is a fully responsive admin template. Based on **Bootstrap 3** framework. Highly customizable and easy to use. Fits many screen resolutions from small mobile devices to large desktops. Check out the live preview now and see for yourself.
|
||||
|
||||
Visit http://www.almsaeedstudio.com/AdminLTE-pre for a preview.
|
||||
**Live Preview: http://almsaeedstudio.com/preview/**
|
||||
|
||||
Note: If the javascript in the preview does not work properly (specially IE users), please visit http://almsaeedstudio.com/AdminLTE (this could be because of the use of an iframe!)
|
||||
|
||||
Want More?
|
||||
-----------
|
||||
**Almsaeed studio just opened a new premium templates page. Hand picked to insure the best quality and the most affordable prices. Visit http://almsaeedstudio.com/premium for more information.**
|
||||
|
||||
|
||||

|
||||
|
||||
**AdminLTE** has been carefully coded with clear comments in all of its JS, LESS and HTML files. LESS has been used to increase code customizability.
|
||||
|
||||
Announcements:
|
||||
--------------
|
||||
- Check the change log at the bottom
|
||||
|
||||
Special Features:
|
||||
-----------------
|
||||
- **Fully responsive**
|
||||
- **Enhanced for printing**
|
||||
- **Sortable dashboard widgets**
|
||||
- **18 plugins and 3 custom plugins**
|
||||
- **Light weight and fast**
|
||||
- **Compatible with most major browsers**
|
||||
- **Full support for Glyphicons, Fontawesome and Ion icons**
|
||||
|
||||
Featured Pages:
|
||||
----------------
|
||||
- Dashboard
|
||||
- Mailbox
|
||||
- Calendar
|
||||
- Invoice
|
||||
- Lockscreen
|
||||
- Login
|
||||
- Register
|
||||
- 404 Error
|
||||
- 500 Error
|
||||
- Blank page
|
||||
|
||||
Featured Plugins:
|
||||
-----------------
|
||||
- Boostrap Slider
|
||||
- Ion slider
|
||||
- Bootstrap WYSIHTML5
|
||||
- CKEditor
|
||||
- Bootstrap Colorpicker
|
||||
- Bootstrap Date range Picker
|
||||
- Bootstrap Time Picker
|
||||
- Data Tables
|
||||
- Flot
|
||||
- Morris.js
|
||||
- Sparkilne
|
||||
- Full Calendar
|
||||
- iCheck
|
||||
- jQuery input mask
|
||||
- jQuery Knob
|
||||
- jVector Map
|
||||
- Slim Scroll
|
||||
- Pace
|
||||
- [Bootstrap Social Buttons](http://lipis.github.io/bootstrap-social/ "Bootstrap Social")
|
||||
|
||||
Browser Support:
|
||||
----------------
|
||||
- IE 9+
|
||||
- Firefox 5+
|
||||
- Chrome 14+
|
||||
- Safari 5+
|
||||
- Opera 11+
|
||||
|
||||
Change log:
|
||||
-----------
|
||||
ver 1.2:
|
||||
- Fixed the sidebar scroll issue when using the fixed layout.
|
||||
- Added [Bootstrap Social Buttons](http://lipis.github.io/bootstrap-social/ "Bootstrap Social") plugin.
|
||||
- Fixed RequireJS bug. Thanks to [StaticSphere](https://github.com/StaticSphere "github user").
|
||||
|
||||
ver 1.1:
|
||||
- Added new skin. class: .skin-black
|
||||
- Added [pace](http://github.hubspot.com/pace/docs/welcome/ "pace") plugin.
|
||||
|
||||
To Do List:
|
||||
-----------
|
||||
- More features
|
||||
- Ajax version
|
||||
- More skins
|
||||
- Documentation
|
||||
|
||||
Image Credits:
|
||||
--------------
|
||||
[pixeden](http://www.pixeden.com/psd-web-elements/flat-responsive-showcase-psd "")
|
||||
|
||||
[graphicsfuel](http://www.graphicsfuel.com/2013/02/13-high-resolution-blur-backgrounds/ "")
|
||||
|
||||
[ajaxload](http://www.ajaxload.info/ "")
|
||||
|
||||
[pickaface](http://pickaface.net/ "")
|
||||
|
||||
64
ajax/dashboard-boxrefresh-demo.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
sleep(1.2);
|
||||
?>
|
||||
<div class="pad">This data has been loaded via ajax using the custom boxResfresh plugin.</div>
|
||||
<small id="dummy-time" class="pad pull-right text-muted"></small>
|
||||
<small class="pull-right pad text-muted">Last update:</small>
|
||||
<div class="row">
|
||||
<div class="col-sm-7">
|
||||
<!-- bar chart -->
|
||||
<div class="chart" id="bar-chart" style="height: 250px;"></div>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<div class="pad">
|
||||
<!-- Progress bars -->
|
||||
<div class="clearfix">
|
||||
<span class="pull-left">Bandwidth</span>
|
||||
<small class="pull-right">10/200 GB</small>
|
||||
</div>
|
||||
<div class="progress xs">
|
||||
<div class="progress-bar progress-bar-green" style="width: 70%;"></div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix">
|
||||
<span class="pull-left">Transfered</span>
|
||||
<small class="pull-right">10 GB</small>
|
||||
</div>
|
||||
<div class="progress xs">
|
||||
<div class="progress-bar progress-bar-red" style="width: 70%;"></div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix">
|
||||
<span class="pull-left">Activity</span>
|
||||
<small class="pull-right">73%</small>
|
||||
</div>
|
||||
<div class="progress xs">
|
||||
<div class="progress-bar progress-bar-light-blue" style="width: 70%;"></div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix">
|
||||
<span class="pull-left">FTP</span>
|
||||
<small class="pull-right">30 GB</small>
|
||||
</div>
|
||||
<div class="progress xs">
|
||||
<div class="progress-bar progress-bar-aqua" style="width: 70%;"></div>
|
||||
</div>
|
||||
<!-- Buttons -->
|
||||
<p>
|
||||
<button class="btn btn-default btn-sm"><i class="fa fa-cloud-download"></i> Generate PDF</button>
|
||||
</p>
|
||||
</div><!-- /.pad -->
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row - inside box -->
|
||||
|
||||
<script type="text/javascript">
|
||||
var now = new Date();
|
||||
var strDateTime = [[AddZero(now.getDate()), AddZero(now.getMonth() + 1), now.getFullYear()].join("/"), [AddZero(now.getHours()), AddZero(now.getMinutes())].join(":"), now.getHours() >= 12 ? "PM" : "AM"].join(" ");
|
||||
|
||||
//Pad given value to the left with "0"
|
||||
function AddZero(num) {
|
||||
return (num >= 0 && num < 10) ? "0" + num : num + "";
|
||||
}
|
||||
var x = document.getElementById("dummy-time");
|
||||
x.innerHTML = strDateTime;
|
||||
</script>
|
||||
143
blank_page.html
@@ -1,143 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Template</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- bootstrap 3.0.2 -->
|
||||
<link href="css/bootstrap.min.css" rel="stylesheet" />
|
||||
<!-- font Awesome -->
|
||||
<link href="css/font-awesome.min.css" rel="stylesheet" />
|
||||
<!-- Theme style -->
|
||||
<link href="theme/theme.css" rel="stylesheet" />
|
||||
<!-- Google font Signika -->
|
||||
<link href='http://fonts.googleapis.com/css?family=Signika+Negative' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-theme bg-blue navbar-static-top" role="navigation">
|
||||
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="index.html"><span class="fa fa-shield"></span> AdminLTE</a>
|
||||
<a href="#" class='lte-menu-sm visible-xs navbar-brand'>
|
||||
<span class="fa fa-list"></span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-gears"></i></a>
|
||||
<ul class="dropdown-menu navbar-selector">
|
||||
<li role="presentation" class="dropdown-header font-primary noClick">Navbar Color</li>
|
||||
<li class="font-primary" data-color="bg-primary"><a href="#"><i class="fa fa-gear"></i> Primary</a></li>
|
||||
<li class="font-blue" data-color="bg-blue"><a href="#"><i class="fa fa-gear"></i> Blue <small class="text-muted">(default)</small></a></li>
|
||||
<li class="font-light-blue" data-color="bg-light-blue"><a href="#"><i class="fa fa-gear"></i> Light Blue</a></li>
|
||||
<li class="font-green" data-color="bg-green"><a href="#"><i class="fa fa-gear"></i> Green</a></li>
|
||||
<li class="font-yellow" data-color="bg-yellow"><a href="#"><i class="fa fa-gear"></i> Yellow</a></li>
|
||||
<li class="font-purple" data-color="bg-purple"><a href="#"><i class="fa fa-gear"></i> Purple</a></li>
|
||||
<li class="font-red" data-color="bg-red"><a href="#"><i class="fa fa-gear"></i> Red</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#"><i class="fa fa-bullhorn"></i></a></li>
|
||||
<li><a href="#"><i class="fa fa-envelope"></i></a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Friends</a></li>
|
||||
<li><a href="#">Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Privacy</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right">
|
||||
<div class="form-group">
|
||||
<input type="text" name="search" class="form-control" placeholder="..."/>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</nav>
|
||||
<div class="lte-main-content">
|
||||
<!-- side bar -->
|
||||
<div class="lte-sidebar col-md-2 col-sm-3 hidden-xs">
|
||||
<ul class="lte-sidebar-menu">
|
||||
<li class="active"><a href="index.html"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-bar-chart-o"></i> Charts<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="charts/flot.html"><i class="fa fa-bar-chart-o"></i> Flot</a></li>
|
||||
<li><a href="charts/jqplot.html"><i class="fa fa-bar-chart-o"></i> JQplot</a></li>
|
||||
<li><a href="charts/xcharts.html"><i class="fa fa-bar-chart-o"></i> xCharts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="ui.html"><i class="fa fa-tint"></i> User Interface </a></li>
|
||||
<!--<li><a href="widgets.html"><i class="fa fa-gear"></i> Widgets</a></li>-->
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Example Pages <i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="examples/invoice.html"><i class="fa fa-money"></i> Invoice</a></li>
|
||||
<li><a href="examples/login.html"><i class="fa fa-sign-in"></i> Login</a></li>
|
||||
<li><a href="examples/register.html"><i class="fa fa-lock"></i> Register</a></li>
|
||||
<li><a href="examples/blank_page.html"><i class="fa fa-paperclip"></i> Blank Page</a></li>
|
||||
<li><a href="examples/404.html"><i class="fa fa-unlink"></i> 404 Error Page</a></li>
|
||||
<li><a href="examples/500.html"><i class="fa fa-unlink"></i> 500 Error Page</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="forms.html"><i class="fa fa-edit"></i> Forms</a></li>
|
||||
<li><a href="typography.html"><i class="fa fa-text-width"></i> Typography</a></li>
|
||||
<li><a href="calendar.html"><i class="fa fa-calendar"></i> Calendar</a></li>
|
||||
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Multilevel Dropdown<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 1<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 2<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="#"><i class="fa fa-pagelines"></i> Level 3</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<!-- /.side-bar-->
|
||||
|
||||
<div class="lte-main-container col-md-10 col-sm-9">
|
||||
<!-- main content -->
|
||||
<div class="page-header">
|
||||
<i class="fa fa-paperclip"></i> Blank Page <small>example page</small>
|
||||
</div>
|
||||
<!-- /.page-header -->
|
||||
<!-- PUT CONTENT HERE -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./.lte-main-content -->
|
||||
<footer>
|
||||
Copyright © 2013 - <a>Preview</a> - <a>Purchase</a> - Built with <a target="blank" href="http://getbootstrap.com">Bootstrap 3</a>
|
||||
</footer>
|
||||
|
||||
|
||||
<!-- JQuery 1.10.2 -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<!-- Bootstrap -->
|
||||
<script src="js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<!-- LTE Tree -->
|
||||
<script src="js/lteTree.js" type="text/javascript"></script>
|
||||
<!-- LTE App -->
|
||||
<script src="js/lteApp.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
53
bower.json
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "admin-lte",
|
||||
"version": "1.2.1",
|
||||
"authors": [
|
||||
"Abdullah Almsaeed <support@almsaeedstudio.com>"
|
||||
],
|
||||
"description": "AdminLTE - Free Premium Admin control Panel Theme That Is Based On Bootstrap 3.x",
|
||||
"main": [],
|
||||
"keywords": [
|
||||
"bootstrap",
|
||||
"admin",
|
||||
"template",
|
||||
"twitter bootstrap"
|
||||
],
|
||||
"license": "MIT",
|
||||
"homepage": "http://almsaeedstudio.com/",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"bower_components"
|
||||
],
|
||||
"dependencies": {
|
||||
"bootstrap": ">=3.1.0",
|
||||
"font-awesome": ">=4.0.0",
|
||||
"iCheck": "~1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ionicons": ">=1.4.0",
|
||||
"seiyria-bootstrap-slider": ">=1.9.0",
|
||||
"bootstrap3-wysihtml5-bower": ">=0.2.10",
|
||||
"jquery-ui": ">=1.10.3",
|
||||
"ckeditor": ">=4.3.3",
|
||||
"mjolnic-bootstrap-colorpicker": "~2.0.0",
|
||||
"datatables": ">=1.9.4",
|
||||
"datatables-bootstrap3": "latest",
|
||||
"bootstrap-daterangepicker": "~1.3",
|
||||
"bootstrap3-datetimepicker": "~3.0",
|
||||
"flot": ">=0.8.3",
|
||||
"fullcalendar": "1.6.4",
|
||||
"jquery.inputmask": "~3.0.0",
|
||||
"ionslider": "https://github.com/IonDen/ion.rangeSlider.git#>=1.8.5",
|
||||
"jquery-knob": "~1.2.0",
|
||||
"bower-jvectormap": ">=1.2.2",
|
||||
"morrisjs": "~0.5.1",
|
||||
"slimScroll": "~1.3.0",
|
||||
"bootstrap-social": ">=4.2.0",
|
||||
"sparkline": "http://omnipotent.net/jquery.sparkline/2.1.2/jquery.sparkline.min.js"
|
||||
},
|
||||
"resolutions": {
|
||||
"jquery": ">= 1.9.0",
|
||||
"bootstrap": ">=3.1.0",
|
||||
"datatables": ">=1.9.4"
|
||||
}
|
||||
}
|
||||
176
calendar.html
@@ -1,176 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>AdminLTE - Calendar</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- bootstrap 3.0.2 -->
|
||||
<link href="css/bootstrap.min.css" rel="stylesheet" />
|
||||
<!-- font Awesome -->
|
||||
<link href="css/font-awesome.min.css" rel="stylesheet" />
|
||||
<!-- Theme style -->
|
||||
<link href="theme/theme.css" rel="stylesheet" />
|
||||
<!-- Full calendar stylesheet -->
|
||||
<link href="css/fullcalendar/fullcalendar.css" rel="stylesheet" />
|
||||
<!-- Google font Signika -->
|
||||
<link href='http://fonts.googleapis.com/css?family=Signika+Negative' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-theme bg-red navbar-static-top" role="navigation">
|
||||
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="index.html"><span class="fa fa-shield"></span> AdminLTE</a>
|
||||
<a href="#" class='lte-menu-sm visible-xs navbar-brand'>
|
||||
<span class="fa fa-list"></span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-gears"></i></a>
|
||||
<ul class="dropdown-menu navbar-selector">
|
||||
<li role="presentation" class="dropdown-header font-primary noClick">Navbar Color</li>
|
||||
<li class="font-primary" data-color="bg-primary"><a href="#"><i class="fa fa-gear"></i> Primary</a></li>
|
||||
<li class="font-blue" data-color="bg-blue"><a href="#"><i class="fa fa-gear"></i> Blue <small class="text-muted">(default)</small></a></li>
|
||||
<li class="font-light-blue" data-color="bg-light-blue"><a href="#"><i class="fa fa-gear"></i> Light Blue</a></li>
|
||||
<li class="font-green" data-color="bg-green"><a href="#"><i class="fa fa-gear"></i> Green</a></li>
|
||||
<li class="font-yellow" data-color="bg-yellow"><a href="#"><i class="fa fa-gear"></i> Yellow</a></li>
|
||||
<li class="font-purple" data-color="bg-purple"><a href="#"><i class="fa fa-gear"></i> Purple</a></li>
|
||||
<li class="font-red" data-color="bg-red"><a href="#"><i class="fa fa-gear"></i> Red</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#"><i class="fa fa-bullhorn"></i></a></li>
|
||||
<li><a href="#"><i class="fa fa-envelope"></i></a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Friends</a></li>
|
||||
<li><a href="#">Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Privacy</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right">
|
||||
<div class="form-group">
|
||||
<input type="text" name="search" class="form-control" placeholder="..."/>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</nav>
|
||||
<div class="lte-main-content">
|
||||
<!-- side bar -->
|
||||
<div class="lte-sidebar col-md-2 col-sm-3 hidden-xs">
|
||||
<ul class="lte-sidebar-menu">
|
||||
<li><a href="index.html"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-bar-chart-o"></i> Charts<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="charts/flot.html"><i class="fa fa-bar-chart-o"></i> Flot</a></li>
|
||||
<li><a href="charts/jqplot.html"><i class="fa fa-bar-chart-o"></i> JQplot</a></li>
|
||||
<li><a href="charts/xcharts.html"><i class="fa fa-bar-chart-o"></i> xCharts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="ui.html"><i class="fa fa-tint"></i> User Interface </a></li>
|
||||
<!--<li><a href="widgets.html"><i class="fa fa-gear"></i> Widgets</a></li>-->
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Example Pages <i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="examples/invoice.html"><i class="fa fa-money"></i> Invoice</a></li>
|
||||
<li><a href="examples/login.html"><i class="fa fa-sign-in"></i> Login</a></li>
|
||||
<li><a href="examples/register.html"><i class="fa fa-lock"></i> Register</a></li>
|
||||
<li><a href="examples/blank_page.html"><i class="fa fa-paperclip"></i> Blank Page</a></li>
|
||||
<li><a href="examples/404.html"><i class="fa fa-unlink"></i> 404 Error Page</a></li>
|
||||
<li><a href="examples/500.html"><i class="fa fa-unlink"></i> 500 Error Page</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="forms.html"><i class="fa fa-edit"></i> Forms</a></li>
|
||||
<li><a href="typography.html"><i class="fa fa-text-width"></i> Typography</a></li>
|
||||
<li class="active"><a href="calendar.html"><i class="fa fa-calendar"></i> Calendar</a></li>
|
||||
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Multilevel Dropdown<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 1<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 2<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="#"><i class="fa fa-pagelines"></i> Level 3</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<!-- /.side-bar-->
|
||||
|
||||
<div class="lte-main-container col-md-10 col-sm-9">
|
||||
<!-- main content -->
|
||||
<div class="page-header">
|
||||
<i class="fa fa-calendar"></i> Calendar <small>Full calendar</small>
|
||||
</div>
|
||||
<!-- /.page-header -->
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="col-xs-12">
|
||||
<!-- Full Calendar -->
|
||||
<div id='calendar'></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./.lte-main-content -->
|
||||
<footer>
|
||||
Copyright © 2013 - <a>Preview</a> - <a>Purchase</a> - Built with <a target="blank" href="http://getbootstrap.com">Bootstrap 3</a>
|
||||
</footer>
|
||||
|
||||
|
||||
<!-- JQuery 1.10.2 -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<!-- Bootstrap -->
|
||||
<script src="js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<!-- LTE Tree -->
|
||||
<script src="js/lteTree.js" type="text/javascript"></script>
|
||||
<!-- LTE App -->
|
||||
<script src="js/lteApp.js" type="text/javascript"></script>
|
||||
<!-- Full Calendar -->
|
||||
<script src="js/fullcalendar/fullcalendar.min.js" type="text/javascript"></script>
|
||||
<script>
|
||||
$(function() {
|
||||
$('#calendar').fullCalendar({
|
||||
events: [
|
||||
{
|
||||
title: 'event1',
|
||||
start: '2013-12-01'
|
||||
},
|
||||
{
|
||||
title: 'event2',
|
||||
start: '2013-12-05',
|
||||
end: '2013-12-07'
|
||||
},
|
||||
{
|
||||
title: 'event3',
|
||||
start: '2013-12-09 12:30:00',
|
||||
allDay: false // will make the time show
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
539
charts/flot.html
@@ -1,539 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>AdminLTE - Flot Charts</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- bootstrap 3.0.2 -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet" />
|
||||
<!-- font Awesome -->
|
||||
<link href="../css/font-awesome.min.css" rel="stylesheet" />
|
||||
<!-- Theme style -->
|
||||
<link href="../theme/theme.css" rel="stylesheet" />
|
||||
<!-- Google font Signika -->
|
||||
<link href='http://fonts.googleapis.com/css?family=Signika+Negative' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-theme bg-blue navbar-static-top" role="navigation">
|
||||
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../index.html"><span class="fa fa-shield"></span> AdminLTE</a>
|
||||
<a href="#" class='lte-menu-sm visible-xs navbar-brand'>
|
||||
<span class="fa fa-list"></span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-gears"></i></a>
|
||||
<ul class="dropdown-menu navbar-selector">
|
||||
<li role="presentation" class="dropdown-header font-primary noClick">Navbar Color</li>
|
||||
<li class="font-primary" data-color="bg-primary"><a href="#"><i class="fa fa-gear"></i> Primary</a></li>
|
||||
<li class="font-blue" data-color="bg-blue"><a href="#"><i class="fa fa-gear"></i> Blue <small class="text-muted">(default)</small></a></li>
|
||||
<li class="font-light-blue" data-color="bg-light-blue"><a href="#"><i class="fa fa-gear"></i> Light Blue</a></li>
|
||||
<li class="font-green" data-color="bg-green"><a href="#"><i class="fa fa-gear"></i> Green</a></li>
|
||||
<li class="font-yellow" data-color="bg-yellow"><a href="#"><i class="fa fa-gear"></i> Yellow</a></li>
|
||||
<li class="font-purple" data-color="bg-purple"><a href="#"><i class="fa fa-gear"></i> Purple</a></li>
|
||||
<li class="font-red" data-color="bg-red"><a href="#"><i class="fa fa-gear"></i> Red</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#"><i class="fa fa-bullhorn"></i></a></li>
|
||||
<li><a href="#"><i class="fa fa-envelope"></i></a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Friends</a></li>
|
||||
<li><a href="#">Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Privacy</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right">
|
||||
<div class="form-group">
|
||||
<input type="text" name="search" class="form-control" placeholder="..."/>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</nav>
|
||||
<div class="lte-main-content">
|
||||
<!-- side bar -->
|
||||
<div class="lte-sidebar col-md-2 col-sm-3 hidden-xs">
|
||||
<ul class="lte-sidebar-menu">
|
||||
<li><a href="../index.html"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li class="lte-tree active">
|
||||
<a href="#"><i class="fa fa-bar-chart-o"></i> Charts<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="active"><a href="../charts/flot.html"><i class="fa fa-bar-chart-o"></i> Flot</a></li>
|
||||
<li><a href="../charts/jqplot.html"><i class="fa fa-bar-chart-o"></i> JQplot</a></li>
|
||||
<li><a href="../charts/xcharts.html"><i class="fa fa-bar-chart-o"></i> xCharts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="../ui.html"><i class="fa fa-tint"></i> User Interface </a></li>
|
||||
<!--<li><a href="../widgets.html"><i class="fa fa-gear"></i> Widgets</a></li>-->
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Example Pages <i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="../examples/invoice.html"><i class="fa fa-money"></i> Invoice</a></li>
|
||||
<li><a href="../examples/login.html"><i class="fa fa-sign-in"></i> Login</a></li>
|
||||
<li><a href="../examples/register.html"><i class="fa fa-lock"></i> Register</a></li>
|
||||
<li><a href="../examples/blank_page.html"><i class="fa fa-paperclip"></i> Blank Page</a></li>
|
||||
<li><a href="../examples/404.html"><i class="fa fa-unlink"></i> 404 Error Page</a></li>
|
||||
<li><a href="../examples/500.html"><i class="fa fa-unlink"></i> 500 Error Page</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="../forms.html"><i class="fa fa-edit"></i> Forms</a></li>
|
||||
<li><a href="../typography.html"><i class="fa fa-text-width"></i> Typography</a></li>
|
||||
<li><a href="../calendar.html"><i class="fa fa-calendar"></i> Calendar</a></li>
|
||||
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Multilevel Dropdown<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 1<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 2<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="#"><i class="fa fa-pagelines"></i> Level 3</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<!-- /.side-bar-->
|
||||
|
||||
<div class="lte-main-container col-md-10 col-sm-9">
|
||||
<!-- main content -->
|
||||
<div class="page-header">
|
||||
<i class="fa fa-bar-chart-o"></i> Flot Charts <small>example page</small>
|
||||
</div>
|
||||
<!-- /.page-header -->
|
||||
<div class='lte-dashboard'>
|
||||
<div class='row'>
|
||||
<div class='col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Line Chart</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='line-chart1' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-sm-6 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Line Chart</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='line-chart2' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-sm-6 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Line Chart</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='line-chart3' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-md-4 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Pie Chart</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='pie-chart1' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-md-4 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Pie Chart - 2</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='pie-chart2' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-md-4 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Pie Chart - 3</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='pie-chart3' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-md-4 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Bar Chart</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='bar-chart1' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='col-md-4 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Bar Chart - 2</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='bar-chart2' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-md-4 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Bar Chart - 3</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='bar-chart3' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./.lte-main-content -->
|
||||
<footer>
|
||||
Copyright © 2013 - <a>Preview</a> - <a>Purchase</a> - Built with <a target="blank" href="http://getbootstrap.com">Bootstrap 3</a>
|
||||
</footer>
|
||||
|
||||
|
||||
<!-- JQuery 1.10.2 -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<!-- Bootstrap -->
|
||||
<script src="../js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<!-- LTE Tree -->
|
||||
<script src="../js/lteTree.js" type="text/javascript"></script>
|
||||
<!-- LTE App -->
|
||||
<script src="../js/lteApp.js" type="text/javascript"></script>
|
||||
<!-- flot -->
|
||||
<script src="../js/flot/jquery.flot.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="../js/flot/jquery.flot.categories.js"></script>
|
||||
<script type="text/javascript" src="../js/flot/jquery.flot.pie.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
|
||||
//Line chart 1
|
||||
var d1 = [];
|
||||
for (var i = 0; i < 14; i += 0.5) {
|
||||
d1.push([i, Math.sin(i)]);
|
||||
}
|
||||
|
||||
var d2 = [[0, 3], [4, 8], [8, 5], [9, 13]];
|
||||
|
||||
// A null signifies separate line segments
|
||||
|
||||
var d3 = [[0, 12], [7, 12], null, [7, 2.5], [12, 2.5]];
|
||||
|
||||
$.plot("#line-chart1", [d1, d2, d3]);
|
||||
|
||||
//Bar chart 1
|
||||
var data = [["January", 10], ["February", 8], ["March", 4]];
|
||||
|
||||
$.plot("#bar-chart1", [data], {
|
||||
series: {
|
||||
bars: {
|
||||
show: true,
|
||||
barWidth: 0.6,
|
||||
align: "center"
|
||||
}
|
||||
},
|
||||
xaxis: {
|
||||
mode: "categories",
|
||||
tickLength: 0
|
||||
}
|
||||
});
|
||||
|
||||
//Line chart 2
|
||||
var d1 = [];
|
||||
for (var i = 0; i < Math.PI * 2; i += 0.25) {
|
||||
d1.push([i, Math.sin(i)]);
|
||||
}
|
||||
|
||||
var d2 = [];
|
||||
for (var i = 0; i < Math.PI * 2; i += 0.25) {
|
||||
d2.push([i, Math.cos(i)]);
|
||||
}
|
||||
|
||||
var d3 = [];
|
||||
for (var i = 0; i < Math.PI * 2; i += 0.1) {
|
||||
d3.push([i, Math.tan(i)]);
|
||||
}
|
||||
|
||||
$.plot("#line-chart2", [
|
||||
{label: "sin(x)", data: d1},
|
||||
{label: "cos(x)", data: d2},
|
||||
{label: "tan(x)", data: d3}
|
||||
], {
|
||||
series: {
|
||||
lines: {show: true},
|
||||
points: {show: true}
|
||||
},
|
||||
xaxis: {
|
||||
ticks: [
|
||||
0, [Math.PI / 2, "\u03c0/2"], [Math.PI, "\u03c0"],
|
||||
[Math.PI * 3 / 2, "3\u03c0/2"], [Math.PI * 2, "2\u03c0"]
|
||||
]
|
||||
},
|
||||
yaxis: {
|
||||
ticks: 10,
|
||||
min: -2,
|
||||
max: 2,
|
||||
tickDecimals: 3
|
||||
},
|
||||
grid: {
|
||||
backgroundColor: {colors: ["#fff", "#eee"]},
|
||||
borderWidth: {
|
||||
top: 1,
|
||||
right: 1,
|
||||
bottom: 2,
|
||||
left: 2
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//bar chart 2
|
||||
var d1 = [];
|
||||
for (var i = 0; i < 20; ++i) {
|
||||
d1.push([i, Math.sin(i)]);
|
||||
}
|
||||
|
||||
var data = [{data: d1, label: "Pressure", color: "#333"}];
|
||||
|
||||
var markings = [
|
||||
{color: "#f6f6f6", yaxis: {from: 1}},
|
||||
{color: "#f6f6f6", yaxis: {to: -1}},
|
||||
{color: "#000", lineWidth: 1, xaxis: {from: 2, to: 2}},
|
||||
{color: "#000", lineWidth: 1, xaxis: {from: 8, to: 8}}
|
||||
];
|
||||
|
||||
var placeholder = $("#bar-chart2");
|
||||
|
||||
var plot = $.plot(placeholder, data, {
|
||||
bars: {show: true, barWidth: 0.5, fill: 0.9},
|
||||
xaxis: {ticks: [], autoscaleMargin: 0.02},
|
||||
yaxis: {min: -2, max: 2},
|
||||
grid: {markings: markings}
|
||||
});
|
||||
|
||||
var o = plot.pointOffset({x: 2, y: -1.2});
|
||||
|
||||
// Append it to the placeholder that Flot already uses for positioning
|
||||
|
||||
placeholder.append("<div style='position:absolute;left:" + (o.left + 4) + "px;top:" + o.top + "px;color:#666;font-size:smaller'>Warming up</div>");
|
||||
|
||||
o = plot.pointOffset({x: 8, y: -1.2});
|
||||
placeholder.append("<div style='position:absolute;left:" + (o.left + 4) + "px;top:" + o.top + "px;color:#666;font-size:smaller'>Actual measurements</div>");
|
||||
|
||||
// Draw a little arrow on top of the last label to demonstrate canvas
|
||||
// drawing
|
||||
|
||||
var ctx = plot.getCanvas().getContext("2d");
|
||||
ctx.beginPath();
|
||||
o.left += 4;
|
||||
ctx.moveTo(o.left, o.top);
|
||||
ctx.lineTo(o.left, o.top - 10);
|
||||
ctx.lineTo(o.left + 10, o.top - 5);
|
||||
ctx.lineTo(o.left, o.top);
|
||||
ctx.fillStyle = "#000";
|
||||
ctx.fill();
|
||||
function _sidebar_fix() {
|
||||
$(".lte-sidebar").css("min-height", ($(window).height() - ($("nav").outerHeight() + $("footer").outerHeight())) + "px");
|
||||
var height = $(document).height() - ($("nav").outerHeight() + $("footer").outerHeight());
|
||||
$(".lte-sidebar").css("min-height", height + "px");
|
||||
}
|
||||
|
||||
//Bar chart 3
|
||||
var d1 = [];
|
||||
for (var i = 0; i <= 3; i += 1) {
|
||||
d1.push([i, parseInt(Math.random() * 30)]);
|
||||
}
|
||||
|
||||
var d2 = [];
|
||||
for (var i = 0; i <= 3; i += 1) {
|
||||
d2.push([i, parseInt(Math.random() * 30)]);
|
||||
}
|
||||
|
||||
var d3 = [];
|
||||
for (var i = 0; i <= 3; i += 1) {
|
||||
d3.push([i, parseInt(Math.random() * 30)]);
|
||||
}
|
||||
|
||||
var stack = 0,
|
||||
bars = true,
|
||||
lines = false,
|
||||
steps = false;
|
||||
|
||||
|
||||
$.plot("#bar-chart3", [d1, d2, d3], {
|
||||
series: {
|
||||
stack: true,
|
||||
lines: {
|
||||
show: lines,
|
||||
fill: true,
|
||||
steps: false
|
||||
},
|
||||
bars: {
|
||||
show: bars,
|
||||
barWidth: 0.6
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//Line chart 3
|
||||
$.plot("#line-chart3", [d1, d2, d3], {
|
||||
series: {
|
||||
stack: true,
|
||||
lines: {
|
||||
show: true,
|
||||
fill: true,
|
||||
steps: false
|
||||
},
|
||||
bars: {
|
||||
show: false,
|
||||
barWidth: 0.6
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//Pie charts
|
||||
// Randomly Generated Data
|
||||
|
||||
var data = [],
|
||||
series = Math.floor(Math.random() * 6) + 3;
|
||||
|
||||
for (var i = 0; i < series; i++) {
|
||||
data[i] = {
|
||||
label: "Series" + (i + 1),
|
||||
data: Math.floor(Math.random() * 100) + 1
|
||||
}
|
||||
}
|
||||
$.plot("#pie-chart1", data, {
|
||||
series: {
|
||||
pie: {
|
||||
show: true
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//Donut
|
||||
$.plot("#pie-chart2", data, {
|
||||
series: {
|
||||
pie: {
|
||||
innerRadius: 0.5,
|
||||
show: true
|
||||
}
|
||||
}
|
||||
});
|
||||
function labelFormatter(label, series) {
|
||||
return "<div style='font-size:8pt; text-align:center; padding:2px; color:white;'>" + label + "<br/>" + Math.round(series.percent) + "%</div>";
|
||||
}
|
||||
//3d
|
||||
$.plot("#pie-chart3", data, {
|
||||
series: {
|
||||
pie: {
|
||||
show: true,
|
||||
radius: 1,
|
||||
tilt: 0.5,
|
||||
label: {
|
||||
show: true,
|
||||
radius: 1,
|
||||
formatter: labelFormatter,
|
||||
background: {
|
||||
opacity: 0.8
|
||||
}
|
||||
},
|
||||
combine: {
|
||||
color: "#999",
|
||||
threshold: 0.1
|
||||
}
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
show: false
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,718 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>AdminLTE - jQplot</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- bootstrap 3.0.2 -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet" />
|
||||
<!-- font Awesome -->
|
||||
<link href="../css/font-awesome.min.css" rel="stylesheet" />
|
||||
<!-- jqplot stylesheet -->
|
||||
<link href="../js/jqplot/jquery.jqplot.css" rel="stylesheet"/>
|
||||
<!-- Theme style -->
|
||||
<link href="../theme/theme.css" rel="stylesheet" />
|
||||
<!-- Google font Signika -->
|
||||
<link href='http://fonts.googleapis.com/css?family=Signika+Negative' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-theme bg-blue navbar-static-top" role="navigation">
|
||||
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../index.html"><span class="fa fa-shield"></span> AdminLTE</a>
|
||||
<a href="#" class='lte-menu-sm visible-xs navbar-brand'>
|
||||
<span class="fa fa-list"></span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-gears"></i></a>
|
||||
<ul class="dropdown-menu navbar-selector">
|
||||
<li role="presentation" class="dropdown-header font-primary noClick">Navbar Color</li>
|
||||
<li class="font-primary" data-color="bg-primary"><a href="#"><i class="fa fa-gear"></i> Primary</a></li>
|
||||
<li class="font-blue" data-color="bg-blue"><a href="#"><i class="fa fa-gear"></i> Blue <small class="text-muted">(default)</small></a></li>
|
||||
<li class="font-light-blue" data-color="bg-light-blue"><a href="#"><i class="fa fa-gear"></i> Light Blue</a></li>
|
||||
<li class="font-green" data-color="bg-green"><a href="#"><i class="fa fa-gear"></i> Green</a></li>
|
||||
<li class="font-yellow" data-color="bg-yellow"><a href="#"><i class="fa fa-gear"></i> Yellow</a></li>
|
||||
<li class="font-purple" data-color="bg-purple"><a href="#"><i class="fa fa-gear"></i> Purple</a></li>
|
||||
<li class="font-red" data-color="bg-red"><a href="#"><i class="fa fa-gear"></i> Red</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#"><i class="fa fa-bullhorn"></i></a></li>
|
||||
<li><a href="#"><i class="fa fa-envelope"></i></a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Friends</a></li>
|
||||
<li><a href="#">Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Privacy</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right">
|
||||
<div class="form-group">
|
||||
<input type="text" name="search" class="form-control" placeholder="..."/>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</nav>
|
||||
<div class="lte-main-content">
|
||||
<!-- side bar -->
|
||||
<div class="lte-sidebar col-md-2 col-sm-3 hidden-xs">
|
||||
<ul class="lte-sidebar-menu">
|
||||
<li><a href="../index.html"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li class="lte-tree active">
|
||||
<a href="#"><i class="fa fa-bar-chart-o"></i> Charts<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="../charts/flot.html"><i class="fa fa-bar-chart-o"></i> Flot</a></li>
|
||||
<li class="active"><a href="../charts/jqplot.html"><i class="fa fa-bar-chart-o"></i> JQplot</a></li>
|
||||
<li><a href="../charts/xcharts.html"><i class="fa fa-bar-chart-o"></i> xCharts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="../ui.html"><i class="fa fa-tint"></i> User Interface </a></li>
|
||||
<!--<li><a href="../widgets.html"><i class="fa fa-gear"></i> Widgets</a></li>-->
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Example Pages <i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="../examples/invoice.html"><i class="fa fa-money"></i> Invoice</a></li>
|
||||
<li><a href="../examples/login.html"><i class="fa fa-sign-in"></i> Login</a></li>
|
||||
<li><a href="../examples/register.html"><i class="fa fa-lock"></i> Register</a></li>
|
||||
<li><a href="../examples/blank_page.html"><i class="fa fa-paperclip"></i> Blank Page</a></li>
|
||||
<li><a href="../examples/404.html"><i class="fa fa-unlink"></i> 404 Error Page</a></li>
|
||||
<li><a href="../examples/500.html"><i class="fa fa-unlink"></i> 500 Error Page</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="../forms.html"><i class="fa fa-edit"></i> Forms</a></li>
|
||||
<li><a href="../typography.html"><i class="fa fa-text-width"></i> Typography</a></li>
|
||||
<li><a href="../calendar.html"><i class="fa fa-calendar"></i> Calendar</a></li>
|
||||
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Multilevel Dropdown<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 1<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 2<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="#"><i class="fa fa-pagelines"></i> Level 3</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<!-- /.side-bar-->
|
||||
|
||||
<div class="lte-main-container col-md-10 col-sm-9">
|
||||
<!-- main content -->
|
||||
<div class="page-header">
|
||||
<i class="fa fa-bar-chart-o"></i> Jqplot Charts <small>example page</small>
|
||||
</div>
|
||||
<!-- /.page-header -->
|
||||
<div class='lte-dashboard'>
|
||||
<div class='row'>
|
||||
<div class='col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Line Chart</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='chart1' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-sm-6 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Line Chart</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='chart2' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-sm-6 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Line Chart</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='chart3' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-md-4 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Pie Chart</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='pie-chart3' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-md-4 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Pie Chart - 2</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='pie-chart1' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-md-4 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Pie Chart - 3</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='pie-chart2' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-md-4 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Bar Chart</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='bar-chart1' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='col-md-4 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Bar Chart - 2</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='bar-chart2' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-md-4 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Bar Chart - 3</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='bar-chart3' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.lte-dashboard -->
|
||||
</div><!-- ./lte-main-container -->
|
||||
</div>
|
||||
<!-- ./.lte-main-content -->
|
||||
<footer>
|
||||
Copyright © 2013 - <a>Preview</a> - <a>Purchase</a> - Built with <a target="blank" href="http://getbootstrap.com">Bootstrap 3</a>
|
||||
</footer>
|
||||
|
||||
|
||||
<!-- JQuery 1.10.2 -> Important -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<!-- Bootstrap -> Important-->
|
||||
<script src="../js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<!-- LTE Tree -> Important -->
|
||||
<script src="../js/lteTree.js" type="text/javascript"></script>
|
||||
<!-- LTE App -->
|
||||
<script src="../js/lteApp.js" type="text/javascript"></script>
|
||||
<!-- jqplot -->
|
||||
<script src="../js/jqplot/jquery.jqplot.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="../js/jqplot/plugins/jqplot.dateAxisRenderer.min.js"></script>
|
||||
<script type="text/javascript" src="../js/jqplot/plugins/jqplot.logAxisRenderer.min.js"></script>
|
||||
<script type="text/javascript" src="../js/jqplot/plugins/jqplot.canvasTextRenderer.min.js"></script>
|
||||
<script type="text/javascript" src="../js/jqplot/plugins/jqplot.canvasAxisTickRenderer.min.js"></script>
|
||||
<script type="text/javascript" src="../js/jqplot/plugins/jqplot.canvasAxisLabelRenderer.min.js"></script>
|
||||
<script type="text/javascript" src="../js/jqplot/plugins/jqplot.highlighter.min.js"></script>
|
||||
<script type="text/javascript" src="../js/jqplot/plugins/jqplot.barRenderer.min.js"></script>
|
||||
<script type="text/javascript" src="../js/jqplot/plugins/jqplot.pieRenderer.min.js"></script>
|
||||
<script type="text/javascript" src="../js/jqplot/plugins/jqplot.donutRenderer.min.js"></script>
|
||||
<script type="text/javascript" src="../js/jqplot/plugins/jqplot.categoryAxisRenderer.min.js"></script>
|
||||
<script type="text/javascript" src="../js/jqplot/plugins/jqplot.pointLabels.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
|
||||
$.jqplot._noToImageButton = true;
|
||||
var currYear = [["2011-08-01", 796.01], ["2011-08-02", 510.5], ["2011-08-03", 527.8],
|
||||
["2011-08-05", 420.36], ["2011-08-06", 219.47], ["2011-08-07", 333.82], ["2011-08-08", 660.55],
|
||||
["2011-08-10", 521], ["2011-08-11", 660.68], ["2011-08-12", 928.65], ["2011-08-13", 864.26],
|
||||
["2011-08-15", 623.86], ["2011-08-16", 1300.05], ["2011-08-17", 972.25], ["2011-08-18", 661.98],
|
||||
["2011-08-20", 1546.23], ["2011-08-21", 593], ["2011-08-22", 560.25], ["2011-08-23", 857.8],
|
||||
["2011-08-25", 1256.14], ["2011-08-26", 1033.01], ["2011-08-27", 811.63], ["2011-08-28", 735.01],
|
||||
["2011-08-31", 1177], ["2011-09-01", 1023.66], ["2011-09-02", 1442.31], ["2011-09-03", 1299.24],
|
||||
["2011-09-09", 4118.48], ["2011-09-10", 1988.11], ["2011-09-11", 1485.89], ["2011-09-12", 2681.97],
|
||||
["2011-09-13", 1679.56], ["2011-09-14", 3538.43], ["2011-09-15", 3118.01], ["2011-09-16", 4198.97],
|
||||
["2011-09-17", 3020.44], ["2011-09-18", 3383.45], ["2011-09-19", 2148.91], ["2011-09-20", 3058.82],
|
||||
["2011-09-25", 2785.93], ["2011-09-26", 4329.7], ["2011-09-27", 3493.72], ["2011-09-28", 4440.55], ["2011-10-3", 6200.2]];
|
||||
var plot1 = $.jqplot("chart1", [currYear], {
|
||||
seriesColors: ["#0c5175"],
|
||||
highlighter: {
|
||||
show: true,
|
||||
sizeAdjust: 1,
|
||||
tooltipOffset: 9
|
||||
},
|
||||
grid: {
|
||||
background: 'rgba(57,57,57,0.0)',
|
||||
drawBorder: false,
|
||||
shadow: false,
|
||||
gridLineColor: '#eeeeee',
|
||||
gridLineWidth: 2
|
||||
},
|
||||
legend: {
|
||||
show: false,
|
||||
placement: 'inside'
|
||||
},
|
||||
seriesDefaults: {
|
||||
rendererOptions: {
|
||||
smooth: true,
|
||||
animation: {
|
||||
show: true
|
||||
}
|
||||
},
|
||||
showMarker: false
|
||||
},
|
||||
series: [
|
||||
{
|
||||
fill: false,
|
||||
label: '2012',
|
||||
shadow: false
|
||||
}
|
||||
],
|
||||
axesDefaults: {
|
||||
rendererOptions: {
|
||||
baselineWidth: 1.5,
|
||||
baselineColor: '#444444',
|
||||
drawBaseline: false
|
||||
}
|
||||
},
|
||||
axes: {
|
||||
xaxis: {
|
||||
renderer: $.jqplot.DateAxisRenderer,
|
||||
tickRenderer: $.jqplot.CanvasAxisTickRenderer,
|
||||
tickOptions: {
|
||||
formatString: "%b %e",
|
||||
angle: -30,
|
||||
textColor: '#444444'
|
||||
},
|
||||
min: "2011-08-01",
|
||||
max: "2011-09-30",
|
||||
tickInterval: "7 days",
|
||||
drawMajorGridlines: false
|
||||
},
|
||||
yaxis: {
|
||||
renderer: $.jqplot.LogAxisRenderer,
|
||||
pad: 0,
|
||||
rendererOptions: {
|
||||
minorTicks: 1
|
||||
},
|
||||
tickOptions: {
|
||||
formatString: "%'d",
|
||||
showMark: false
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
var s1 = [3200, 5633, 8921, 7842];
|
||||
var ticks = ['Jun', 'Jul', 'Aug', 'Sep'];
|
||||
var plot2 = $.jqplot('bar-chart1', [s1], {
|
||||
// Only animate if we're not using excanvas (not in IE 7 or IE 8)..
|
||||
animate: !$.jqplot.use_excanvas,
|
||||
grid: {
|
||||
background: 'rgba(57,57,57,0.0)',
|
||||
drawBorder: false,
|
||||
shadow: false,
|
||||
gridLineColor: '#ffffff',
|
||||
gridLineWidth: 2
|
||||
},
|
||||
seriesDefaults: {
|
||||
renderer: $.jqplot.BarRenderer,
|
||||
pointLabels: {show: true},
|
||||
shadow: false,
|
||||
color: "#52b9e9"
|
||||
},
|
||||
axes: {
|
||||
xaxis: {
|
||||
renderer: $.jqplot.CategoryAxisRenderer,
|
||||
ticks: ticks
|
||||
},
|
||||
yaxis: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
highlighter: {show: false}
|
||||
});
|
||||
var data = [
|
||||
['Heavy Industry', 12], ['Retail', 9], ['Light Industry', 14],
|
||||
['Out of home', 16], ['Commuting', 7], ['Orientation', 9]
|
||||
];
|
||||
var plot3 = jQuery.jqplot('pie-chart1', [data],
|
||||
{
|
||||
grid: {
|
||||
background: 'rgba(57,57,57,0.0)',
|
||||
drawBorder: false,
|
||||
shadow: false,
|
||||
gridLineColor: '#eeeeee',
|
||||
gridLineWidth: 2
|
||||
},
|
||||
seriesDefaults: {
|
||||
// Make this a pie chart.
|
||||
renderer: jQuery.jqplot.PieRenderer,
|
||||
rendererOptions: {
|
||||
// Put data labels on the pie slices.
|
||||
// By default, labels show the percentage of the slice.
|
||||
showDataLabels: true
|
||||
}
|
||||
},
|
||||
legend: {show: true, location: 'e'}
|
||||
}
|
||||
);
|
||||
|
||||
var data = [
|
||||
['Heavy Industry', 12], ['Retail', 9], ['Light Industry', 14],
|
||||
['Out of home', 16], ['Commuting', 7], ['Orientation', 9]
|
||||
];
|
||||
var plot4 = jQuery.jqplot('pie-chart2', [data],
|
||||
{
|
||||
grid: {
|
||||
background: 'rgba(57,57,57,0.0)',
|
||||
drawBorder: false,
|
||||
shadow: false,
|
||||
gridLineColor: '#eeeeee',
|
||||
gridLineWidth: 2
|
||||
},
|
||||
seriesDefaults: {
|
||||
renderer: jQuery.jqplot.PieRenderer,
|
||||
rendererOptions: {
|
||||
// Turn off filling of slices.
|
||||
fill: false,
|
||||
showDataLabels: true,
|
||||
// Add a margin to seperate the slices.
|
||||
sliceMargin: 4,
|
||||
// stroke the slices with a little thicker line.
|
||||
lineWidth: 5
|
||||
}
|
||||
},
|
||||
legend: {show: true, location: 'e'}
|
||||
}
|
||||
);
|
||||
|
||||
var current_nav_color = "bg-blue";
|
||||
$(".navbar-selector li").not(".noClick").click(function(e) {
|
||||
e.preventDefault();
|
||||
var bg = $(this).data("color");
|
||||
$(".navbar-theme").removeClass(current_nav_color).addClass(bg);
|
||||
current_nav_color = bg;
|
||||
});
|
||||
//Remove widget when clicking the times icon
|
||||
$(".box > .box-header > .box-tools > .off").click(function(e) {
|
||||
e.preventDefault();
|
||||
$(this).parents(".box").first().hide();
|
||||
});
|
||||
//LTE Tree
|
||||
$(".lte-tree").lteTree();
|
||||
|
||||
var s1 = [['a', 6], ['b', 8], ['c', 14], ['d', 20]];
|
||||
var s2 = [['a', 8], ['b', 12], ['c', 6], ['d', 9]];
|
||||
|
||||
var plot5 = $.jqplot('pie-chart3', [s1, s2], {
|
||||
grid: {
|
||||
background: 'rgba(57,57,57,0.0)',
|
||||
drawBorder: false,
|
||||
shadow: false,
|
||||
gridLineColor: '#eeeeee',
|
||||
gridLineWidth: 2
|
||||
},
|
||||
seriesDefaults: {
|
||||
// make this a donut chart.
|
||||
renderer: $.jqplot.DonutRenderer,
|
||||
rendererOptions: {
|
||||
// Donut's can be cut into slices like pies.
|
||||
sliceMargin: 3,
|
||||
// Pies and donuts can start at any arbitrary angle.
|
||||
startAngle: -90,
|
||||
showDataLabels: true,
|
||||
// By default, data labels show the percentage of the donut/pie.
|
||||
// You can show the data 'value' or data 'label' instead.
|
||||
dataLabels: 'value'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var s1 = [200, 600, 700, 1000];
|
||||
var s2 = [460, -210, 690, 820];
|
||||
var s3 = [-260, -440, 320, 200];
|
||||
// Can specify a custom tick Array.
|
||||
// Ticks should match up one for each y value (category) in the series.
|
||||
var ticks = ['May', 'June', 'July', 'August'];
|
||||
|
||||
var plot6 = $.jqplot('bar-chart2', [s1, s2, s3], {
|
||||
grid: {
|
||||
background: 'rgba(57,57,57,0.0)',
|
||||
drawBorder: false,
|
||||
shadow: false,
|
||||
gridLineColor: '#ffffff',
|
||||
gridLineWidth: 2
|
||||
},
|
||||
// The "seriesDefaults" option is an options object that will
|
||||
// be applied to all series in the chart.
|
||||
seriesDefaults: {
|
||||
renderer: $.jqplot.BarRenderer,
|
||||
rendererOptions: {fillToZero: true}
|
||||
},
|
||||
// Custom labels for the series are specified with the "label"
|
||||
// option on the series option. Here a series option object
|
||||
// is specified for each series.
|
||||
series: [
|
||||
{label: 'Hotel'},
|
||||
{label: 'Event Regristration'},
|
||||
{label: 'Airfare'}
|
||||
],
|
||||
// Show the legend and put it outside the grid, but inside the
|
||||
// plot container, shrinking the grid to accomodate the legend.
|
||||
// A value of "outside" would not shrink the grid and allow
|
||||
// the legend to overflow the container.
|
||||
legend: {
|
||||
show: false,
|
||||
placement: 'inside'
|
||||
},
|
||||
axes: {
|
||||
// Use a category axis on the x axis and use our custom ticks.
|
||||
xaxis: {
|
||||
renderer: $.jqplot.CategoryAxisRenderer,
|
||||
ticks: ticks
|
||||
},
|
||||
// Pad the y axis just a little so bars can get close to, but
|
||||
// not touch, the grid boundaries. 1.2 is the default padding.
|
||||
yaxis: {
|
||||
pad: 1.05,
|
||||
tickOptions: {formatString: '$%d'}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// For horizontal bar charts, x an y values must will be "flipped"
|
||||
// from their vertical bar counterpart.
|
||||
var plot7 = $.jqplot('bar-chart3', [
|
||||
[[2, 1], [4, 2], [6, 3], [3, 4]],
|
||||
[[5, 1], [1, 2], [3, 3], [4, 4]],
|
||||
[[4, 1], [7, 2], [1, 3], [2, 4]]], {
|
||||
grid: {
|
||||
background: 'rgba(57,57,57,0.0)',
|
||||
drawBorder: false,
|
||||
shadow: false,
|
||||
gridLineColor: '#ffffff',
|
||||
gridLineWidth: 2
|
||||
},
|
||||
seriesDefaults: {
|
||||
renderer: $.jqplot.BarRenderer,
|
||||
// Show point labels to the right ('e'ast) of each bar.
|
||||
// edgeTolerance of -15 allows labels flow outside the grid
|
||||
// up to 15 pixels. If they flow out more than that, they
|
||||
// will be hidden.
|
||||
pointLabels: {show: true, location: 'e', edgeTolerance: -15},
|
||||
// Rotate the bar shadow as if bar is lit from top right.
|
||||
shadowAngle: 135,
|
||||
// Here's where we tell the chart it is oriented horizontally.
|
||||
rendererOptions: {
|
||||
barDirection: 'horizontal'
|
||||
}
|
||||
},
|
||||
axes: {
|
||||
yaxis: {
|
||||
renderer: $.jqplot.CategoryAxisRenderer
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Some simple loops to build up data arrays.
|
||||
var cosPoints = [];
|
||||
for (var i = 0; i < 2 * Math.PI; i += 0.4) {
|
||||
cosPoints.push([i, Math.cos(i)]);
|
||||
}
|
||||
|
||||
var sinPoints = [];
|
||||
for (var i = 0; i < 2 * Math.PI; i += 0.4) {
|
||||
sinPoints.push([i, 2 * Math.sin(i - .8)]);
|
||||
}
|
||||
|
||||
var powPoints1 = [];
|
||||
for (var i = 0; i < 2 * Math.PI; i += 0.4) {
|
||||
powPoints1.push([i, 2.5 + Math.pow(i / 4, 2)]);
|
||||
}
|
||||
|
||||
var powPoints2 = [];
|
||||
for (var i = 0; i < 2 * Math.PI; i += 0.4) {
|
||||
powPoints2.push([i, -2.5 - Math.pow(i / 4, 2)]);
|
||||
}
|
||||
|
||||
var plot8 = $.jqplot('chart2', [cosPoints, sinPoints, powPoints1, powPoints2],
|
||||
{
|
||||
grid: {
|
||||
background: 'rgba(57,57,57,0.0)',
|
||||
drawBorder: false,
|
||||
shadow: false,
|
||||
gridLineColor: '#eeeeee',
|
||||
gridLineWidth: 2
|
||||
},
|
||||
title: 'Line Style Options',
|
||||
// Series options are specified as an array of objects, one object
|
||||
// for each series.
|
||||
series: [
|
||||
{
|
||||
// Change our line width and use a diamond shaped marker.
|
||||
lineWidth: 2,
|
||||
markerOptions: {style: 'dimaond'}
|
||||
},
|
||||
{
|
||||
// Don't show a line, just show markers.
|
||||
// Make the markers 7 pixels with an 'x' style
|
||||
showLine: false,
|
||||
markerOptions: {size: 7, style: "x"}
|
||||
},
|
||||
{
|
||||
// Use (open) circlular markers.
|
||||
markerOptions: {style: "circle"}
|
||||
},
|
||||
{
|
||||
// Use a thicker, 5 pixel line and 10 pixel
|
||||
// filled square markers.
|
||||
lineWidth: 5,
|
||||
markerOptions: {style: "filledSquare", size: 10}
|
||||
}
|
||||
],
|
||||
axes: {
|
||||
xaxis: {
|
||||
drawMajorGridlines: false
|
||||
},
|
||||
yaxis: {
|
||||
rendererOptions: {
|
||||
minorTicks: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
var plot9 = $.jqplot('chart3', [[3, 7, 9, 1, 4, 6, 8, 2, 5]], {
|
||||
grid: {
|
||||
background: 'rgba(57,57,57,0.0)',
|
||||
drawBorder: false,
|
||||
shadow: false,
|
||||
gridLineColor: '#eeeeee',
|
||||
gridLineWidth: 2
|
||||
},
|
||||
// Give the plot a title.
|
||||
title: 'Plot With Options',
|
||||
// You can specify options for all axes on the plot at once with
|
||||
// the axesDefaults object. Here, we're using a canvas renderer
|
||||
// to draw the axis label which allows rotated text.
|
||||
axesDefaults: {
|
||||
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
|
||||
},
|
||||
// An axes object holds options for all axes.
|
||||
// Allowable axes are xaxis, x2axis, yaxis, y2axis, y3axis, ...
|
||||
// Up to 9 y axes are supported.
|
||||
axes: {
|
||||
// options for each axis are specified in seperate option objects.
|
||||
xaxis: {
|
||||
label: "X Axis",
|
||||
// Turn off "padding". This will allow data point to lie on the
|
||||
// edges of the grid. Default padding is 1.2 and will keep all
|
||||
// points inside the bounds of the grid.
|
||||
pad: 0,
|
||||
drawMajorGridlines: false
|
||||
},
|
||||
yaxis: {
|
||||
rendererOptions: {
|
||||
minorTicks: 1
|
||||
},
|
||||
label: "Y Axis"
|
||||
}
|
||||
}
|
||||
});
|
||||
$(window).resize(function() {
|
||||
plot1.replot({resetAxes: true});
|
||||
plot2.replot({resetAxes: true});
|
||||
plot3.replot({resetAxes: true});
|
||||
plot4.replot({resetAxes: true});
|
||||
plot5.replot({resetAxes: true});
|
||||
plot6.replot({resetAxes: true});
|
||||
plot7.replot({resetAxes: true});
|
||||
plot8.replot({resetAxes: true});
|
||||
plot9.replot({resetAxes: true});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,389 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>AdminLTE - xCharts</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- bootstrap 3.0.2 -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet" />
|
||||
<!-- font Awesome -->
|
||||
<link href="../css/font-awesome.min.css" rel="stylesheet" />
|
||||
<!-- Theme style -->
|
||||
<link href="../js/xcharts/xcharts.min.css" rel="stylesheet" />
|
||||
<!-- Theme style -->
|
||||
<link href="../theme/theme.css" rel="stylesheet" />
|
||||
<!-- Google font Signika -->
|
||||
<link href='http://fonts.googleapis.com/css?family=Signika+Negative' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-theme bg-blue navbar-static-top" role="navigation">
|
||||
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../index.html"><span class="fa fa-shield"></span> AdminLTE</a>
|
||||
<a href="#" class='lte-menu-sm visible-xs navbar-brand'>
|
||||
<span class="fa fa-list"></span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-gears"></i></a>
|
||||
<ul class="dropdown-menu navbar-selector">
|
||||
<li role="presentation" class="dropdown-header font-primary noClick">Navbar Color</li>
|
||||
<li class="font-primary" data-color="bg-primary"><a href="#"><i class="fa fa-gear"></i> Primary</a></li>
|
||||
<li class="font-blue" data-color="bg-blue"><a href="#"><i class="fa fa-gear"></i> Blue <small class="text-muted">(default)</small></a></li>
|
||||
<li class="font-light-blue" data-color="bg-light-blue"><a href="#"><i class="fa fa-gear"></i> Light Blue</a></li>
|
||||
<li class="font-green" data-color="bg-green"><a href="#"><i class="fa fa-gear"></i> Green</a></li>
|
||||
<li class="font-yellow" data-color="bg-yellow"><a href="#"><i class="fa fa-gear"></i> Yellow</a></li>
|
||||
<li class="font-purple" data-color="bg-purple"><a href="#"><i class="fa fa-gear"></i> Purple</a></li>
|
||||
<li class="font-red" data-color="bg-red"><a href="#"><i class="fa fa-gear"></i> Red</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#"><i class="fa fa-bullhorn"></i></a></li>
|
||||
<li><a href="#"><i class="fa fa-envelope"></i></a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Friends</a></li>
|
||||
<li><a href="#">Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Privacy</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right">
|
||||
<div class="form-group">
|
||||
<input type="text" name="search" class="form-control" placeholder="..."/>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</nav>
|
||||
<div class="lte-main-content">
|
||||
<!-- side bar -->
|
||||
<div class="lte-sidebar col-md-2 col-sm-3 hidden-xs">
|
||||
<ul class="lte-sidebar-menu">
|
||||
<li><a href="../index.html"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li class="lte-tree active">
|
||||
<a href="#"><i class="fa fa-bar-chart-o"></i> Charts<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="../charts/flot.html"><i class="fa fa-bar-chart-o"></i> Flot</a></li>
|
||||
<li><a href="../charts/jqplot.html"><i class="fa fa-bar-chart-o"></i> JQplot</a></li>
|
||||
<li class="active"><a href="../charts/xcharts.html"><i class="fa fa-bar-chart-o"></i> xCharts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="../ui.html"><i class="fa fa-tint"></i> User Interface </a></li>
|
||||
<!--<li><a href="../widgets.html"><i class="fa fa-gear"></i> Widgets</a></li>-->
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Example Pages <i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="../examples/invoice.html"><i class="fa fa-money"></i> Invoice</a></li>
|
||||
<li><a href="../examples/login.html"><i class="fa fa-sign-in"></i> Login</a></li>
|
||||
<li><a href="../examples/register.html"><i class="fa fa-lock"></i> Register</a></li>
|
||||
<li><a href="../examples/blank_page.html"><i class="fa fa-paperclip"></i> Blank Page</a></li>
|
||||
<li><a href="../examples/404.html"><i class="fa fa-unlink"></i> 404 Error Page</a></li>
|
||||
<li><a href="../examples/500.html"><i class="fa fa-unlink"></i> 500 Error Page</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="../forms.html"><i class="fa fa-edit"></i> Forms</a></li>
|
||||
<li><a href="../typography.html"><i class="fa fa-text-width"></i> Typography</a></li>
|
||||
<li><a href="../calendar.html"><i class="fa fa-calendar"></i> Calendar</a></li>
|
||||
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Multilevel Dropdown<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 1<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 2<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="#"><i class="fa fa-pagelines"></i> Level 3</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<!-- /.side-bar-->
|
||||
|
||||
<div class="lte-main-container col-md-10 col-sm-9">
|
||||
<!-- main content -->
|
||||
<div class="page-header">
|
||||
<i class="fa fa-paperclip"></i> Blank Page <small>example page</small>
|
||||
</div>
|
||||
<!-- /.page-header -->
|
||||
<div class='lte-dashboard'>
|
||||
<div class='row'>
|
||||
<div class='col-md-6 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Line Chart</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='line-chart1' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-md-6 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Line Chart - 2</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='line-chart2' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-md-6 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Bar Chart</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='bar-chart1' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-md-6 col-sm-12'>
|
||||
<div class='box box-blue'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-bar-chart-o"></i> Bar Chart - 2</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<div id='bar-chart2' class='lte-chart'></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./.lte-main-content -->
|
||||
<footer>
|
||||
Copyright © 2013 - <a>Preview</a> - <a>Purchase</a> - Built with <a target="blank" href="http://getbootstrap.com">Bootstrap 3</a>
|
||||
</footer>
|
||||
|
||||
|
||||
<!-- JQuery 1.10.2 -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<!-- Bootstrap -->
|
||||
<script src="../js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<!-- LTE Tree -->
|
||||
<script src="../js/lteTree.js" type="text/javascript"></script>
|
||||
<!-- LTE App -->
|
||||
<script src="../js/lteApp.js" type="text/javascript"></script>
|
||||
<!-- xCharts -->
|
||||
<script src="http://d3js.org/d3.v3.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../js/xcharts/xcharts.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
|
||||
//Bar chart 1
|
||||
var data = {
|
||||
"xScale": "ordinal",
|
||||
"yScale": "linear",
|
||||
"main": [
|
||||
{
|
||||
"className": ".pizza",
|
||||
"data": [
|
||||
{
|
||||
"x": "Pepperoni",
|
||||
"y": 4
|
||||
},
|
||||
{
|
||||
"x": "Cheese",
|
||||
"y": 8
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
var myChart = new xChart('bar', data, '#bar-chart1');
|
||||
|
||||
//Bar chart 2
|
||||
var data = {
|
||||
"xScale": "ordinal",
|
||||
"yScale": "linear",
|
||||
"main": [
|
||||
{
|
||||
"className": ".pizza",
|
||||
"data": [
|
||||
{
|
||||
"x": "Pepperoni",
|
||||
"y": 4
|
||||
},
|
||||
{
|
||||
"x": "Cheese",
|
||||
"y": 8
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"className": ".pizza",
|
||||
"data": [
|
||||
{
|
||||
"x": "Pepperoni",
|
||||
"y": 6
|
||||
},
|
||||
{
|
||||
"x": "Cheese",
|
||||
"y": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
var myChart = new xChart('bar', data, '#bar-chart2');
|
||||
|
||||
var data = {
|
||||
"xScale": "time",
|
||||
"yScale": "linear",
|
||||
"type": "line",
|
||||
"main": [
|
||||
{
|
||||
"className": ".pizza",
|
||||
"data": [
|
||||
{
|
||||
"x": "2012-11-05",
|
||||
"y": 1
|
||||
},
|
||||
{
|
||||
"x": "2012-11-06",
|
||||
"y": 6
|
||||
},
|
||||
{
|
||||
"x": "2012-11-07",
|
||||
"y": 13
|
||||
},
|
||||
{
|
||||
"x": "2012-11-08",
|
||||
"y": -3
|
||||
},
|
||||
{
|
||||
"x": "2012-11-09",
|
||||
"y": -4
|
||||
},
|
||||
{
|
||||
"x": "2012-11-10",
|
||||
"y": 9
|
||||
},
|
||||
{
|
||||
"x": "2012-11-11",
|
||||
"y": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
var opts = {
|
||||
"dataFormatX": function(x) {
|
||||
return d3.time.format('%Y-%m-%d').parse(x);
|
||||
},
|
||||
"tickFormatX": function(x) {
|
||||
return d3.time.format('%A')(x);
|
||||
}
|
||||
};
|
||||
var myChart = new xChart('line', data, '#line-chart1', opts);
|
||||
|
||||
//Line chart 2
|
||||
var tt = document.createElement('div'),
|
||||
leftOffset = -(~~$('html').css('padding-left').replace('px', '') + ~~$('body').css('margin-left').replace('px', '')),
|
||||
topOffset = -32;
|
||||
tt.className = 'ex-tooltip';
|
||||
document.body.appendChild(tt);
|
||||
|
||||
var data = {
|
||||
"xScale": "time",
|
||||
"yScale": "linear",
|
||||
"main": [
|
||||
{
|
||||
"className": ".pizza",
|
||||
"data": [
|
||||
{
|
||||
"x": "2012-11-05",
|
||||
"y": 6
|
||||
},
|
||||
{
|
||||
"x": "2012-11-06",
|
||||
"y": 6
|
||||
},
|
||||
{
|
||||
"x": "2012-11-07",
|
||||
"y": 8
|
||||
},
|
||||
{
|
||||
"x": "2012-11-08",
|
||||
"y": 3
|
||||
},
|
||||
{
|
||||
"x": "2012-11-09",
|
||||
"y": 4
|
||||
},
|
||||
{
|
||||
"x": "2012-11-10",
|
||||
"y": 9
|
||||
},
|
||||
{
|
||||
"x": "2012-11-11",
|
||||
"y": 6
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
var opts = {
|
||||
"dataFormatX": function(x) {
|
||||
return d3.time.format('%Y-%m-%d').parse(x);
|
||||
},
|
||||
"tickFormatX": function(x) {
|
||||
return d3.time.format('%A')(x);
|
||||
},
|
||||
"mouseover": function(d, i) {
|
||||
var pos = $(this).offset();
|
||||
$(tt).text(d3.time.format('%A')(d.x) + ': ' + d.y)
|
||||
.css({top: topOffset + pos.top, left: pos.left + leftOffset})
|
||||
.show();
|
||||
},
|
||||
"mouseout": function(x) {
|
||||
$(tt).hide();
|
||||
}
|
||||
};
|
||||
var myChart = new xChart('line-dotted', data, '#line-chart2', opts);
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
2805
css/AdminLTE.css
Normal file
214
css/bootstrap-colorpicker.css
vendored
@@ -1,214 +0,0 @@
|
||||
/*!
|
||||
* Bootstrap Colorpicker
|
||||
* http://mjolnic.github.io/bootstrap-colorpicker/
|
||||
*
|
||||
* Originally written by (c) 2012 Stefan Petre
|
||||
* Licensed under the Apache License v2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
*
|
||||
*/
|
||||
|
||||
.colorpicker-saturation {
|
||||
float: left;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
cursor: crosshair;
|
||||
background-image: url("../img/bootstrap-colorpicker/saturation.png");
|
||||
}
|
||||
|
||||
.colorpicker-saturation i {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: block;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
margin: -4px 0 0 -4px;
|
||||
border: 1px solid #000;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.colorpicker-saturation i b {
|
||||
display: block;
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
border: 1px solid #fff;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.colorpicker-hue,
|
||||
.colorpicker-alpha {
|
||||
float: left;
|
||||
width: 15px;
|
||||
height: 100px;
|
||||
margin-bottom: 4px;
|
||||
margin-left: 4px;
|
||||
cursor: row-resize;
|
||||
}
|
||||
|
||||
.colorpicker-hue i,
|
||||
.colorpicker-alpha i {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
margin-top: -1px;
|
||||
background: #000;
|
||||
border-top: 1px solid #fff;
|
||||
}
|
||||
|
||||
.colorpicker-hue {
|
||||
background-image: url("../img/bootstrap-colorpicker/hue.png");
|
||||
}
|
||||
|
||||
.colorpicker-alpha {
|
||||
display: none;
|
||||
background-image: url("../img/bootstrap-colorpicker/alpha.png");
|
||||
}
|
||||
|
||||
.colorpicker {
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 2500;
|
||||
min-width: 130px;
|
||||
padding: 4px;
|
||||
margin-top: 1px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
*zoom: 1;
|
||||
}
|
||||
|
||||
.colorpicker:before,
|
||||
.colorpicker:after {
|
||||
display: table;
|
||||
line-height: 0;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.colorpicker:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.colorpicker:before {
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
left: 6px;
|
||||
display: inline-block;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid #ccc;
|
||||
border-left: 7px solid transparent;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.2);
|
||||
content: '';
|
||||
}
|
||||
|
||||
.colorpicker:after {
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
left: 7px;
|
||||
display: inline-block;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid #ffffff;
|
||||
border-left: 6px solid transparent;
|
||||
content: '';
|
||||
}
|
||||
|
||||
.colorpicker div {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.colorpicker.colorpicker-with-alpha {
|
||||
min-width: 140px;
|
||||
}
|
||||
|
||||
.colorpicker.colorpicker-with-alpha .colorpicker-alpha {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.colorpicker-color {
|
||||
height: 10px;
|
||||
margin-top: 5px;
|
||||
clear: both;
|
||||
background-image: url("../img/bootstrap-colorpicker/alpha.png");
|
||||
background-position: 0 100%;
|
||||
}
|
||||
|
||||
.colorpicker-color div {
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.colorpicker-element .input-group-addon i {
|
||||
display: block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.colorpicker.colorpicker-inline {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
float: none;
|
||||
}
|
||||
|
||||
.colorpicker.colorpicker-horizontal {
|
||||
width: 110px;
|
||||
height: auto;
|
||||
min-width: 110px;
|
||||
}
|
||||
|
||||
.colorpicker.colorpicker-horizontal .colorpicker-saturation {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.colorpicker.colorpicker-horizontal .colorpicker-color {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.colorpicker.colorpicker-horizontal .colorpicker-hue,
|
||||
.colorpicker.colorpicker-horizontal .colorpicker-alpha {
|
||||
float: left;
|
||||
width: 100px;
|
||||
height: 15px;
|
||||
margin-bottom: 4px;
|
||||
margin-left: 0;
|
||||
cursor: col-resize;
|
||||
}
|
||||
|
||||
.colorpicker.colorpicker-horizontal .colorpicker-hue i,
|
||||
.colorpicker.colorpicker-horizontal .colorpicker-alpha i {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: block;
|
||||
width: 1px;
|
||||
height: 15px;
|
||||
margin-top: 0;
|
||||
background: #ffffff;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.colorpicker.colorpicker-horizontal .colorpicker-hue {
|
||||
background-image: url("../img/bootstrap-colorpicker/hue-horizontal.png");
|
||||
}
|
||||
|
||||
.colorpicker.colorpicker-horizontal .colorpicker-alpha {
|
||||
background-image: url("../img/bootstrap-colorpicker/alpha-horizontal.png");
|
||||
}
|
||||
|
||||
.colorpicker.colorpicker-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.colorpicker.colorpicker-visible {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.colorpicker-inline.colorpicker-visible {
|
||||
display: inline-block;
|
||||
}
|
||||
9
css/bootstrap-colorpicker.min.css
vendored
@@ -1,9 +0,0 @@
|
||||
/*!
|
||||
* Bootstrap Colorpicker
|
||||
* http://mjolnic.github.io/bootstrap-colorpicker/
|
||||
*
|
||||
* Originally written by (c) 2012 Stefan Petre
|
||||
* Licensed under the Apache License v2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
*
|
||||
*/.colorpicker-saturation{float:left;width:100px;height:100px;cursor:crosshair;background-image:url("../img/bootstrap-colorpicker/saturation.png")}.colorpicker-saturation i{position:absolute;top:0;left:0;display:block;width:5px;height:5px;margin:-4px 0 0 -4px;border:1px solid #000;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.colorpicker-saturation i b{display:block;width:5px;height:5px;border:1px solid #fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.colorpicker-hue,.colorpicker-alpha{float:left;width:15px;height:100px;margin-bottom:4px;margin-left:4px;cursor:row-resize}.colorpicker-hue i,.colorpicker-alpha i{position:absolute;top:0;left:0;display:block;width:100%;height:1px;margin-top:-1px;background:#000;border-top:1px solid #fff}.colorpicker-hue{background-image:url("../img/bootstrap-colorpicker/hue.png")}.colorpicker-alpha{display:none;background-image:url("../img/bootstrap-colorpicker/alpha.png")}.colorpicker{top:0;left:0;z-index:2500;min-width:130px;padding:4px;margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1}.colorpicker:before,.colorpicker:after{display:table;line-height:0;content:""}.colorpicker:after{clear:both}.colorpicker:before{position:absolute;top:-7px;left:6px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.colorpicker:after{position:absolute;top:-6px;left:7px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.colorpicker div{position:relative}.colorpicker.colorpicker-with-alpha{min-width:140px}.colorpicker.colorpicker-with-alpha .colorpicker-alpha{display:block}.colorpicker-color{height:10px;margin-top:5px;clear:both;background-image:url("../img/bootstrap-colorpicker/alpha.png");background-position:0 100%}.colorpicker-color div{height:10px}.colorpicker-element .input-group-addon i{display:block;width:16px;height:16px;cursor:pointer}.colorpicker.colorpicker-inline{position:relative;display:inline-block;float:none}.colorpicker.colorpicker-horizontal{width:110px;height:auto;min-width:110px}.colorpicker.colorpicker-horizontal .colorpicker-saturation{margin-bottom:4px}.colorpicker.colorpicker-horizontal .colorpicker-color{width:100px}.colorpicker.colorpicker-horizontal .colorpicker-hue,.colorpicker.colorpicker-horizontal .colorpicker-alpha{float:left;width:100px;height:15px;margin-bottom:4px;margin-left:0;cursor:col-resize}.colorpicker.colorpicker-horizontal .colorpicker-hue i,.colorpicker.colorpicker-horizontal .colorpicker-alpha i{position:absolute;top:0;left:0;display:block;width:1px;height:15px;margin-top:0;background:#fff;border:0}.colorpicker.colorpicker-horizontal .colorpicker-hue{background-image:url("../img/bootstrap-colorpicker/hue-horizontal.png")}.colorpicker.colorpicker-horizontal .colorpicker-alpha{background-image:url("../img/bootstrap-colorpicker/alpha-horizontal.png")}.colorpicker.colorpicker-hidden{display:none}.colorpicker.colorpicker-visible{display:block}.colorpicker-inline.colorpicker-visible{display:inline-block}
|
||||
1
css/bootstrap-switch.css
vendored
@@ -1 +0,0 @@
|
||||
.has-switch{display:inline-block;cursor:pointer;border-radius:4px;border:1px solid;border-color:#ccc;position:relative;text-align:left;overflow:hidden;line-height:8px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;vertical-align:middle;min-width:100px}.has-switch.switch-mini{min-width:72px}.has-switch.switch-mini i.switch-mini-icons{height:1.2em;line-height:9px;vertical-align:text-top;text-align:center;transform:scale(0.6);margin-top:-1px;margin-bottom:-1px}.has-switch.switch-small{min-width:80px}.has-switch.switch-large{min-width:120px}.has-switch.deactivate{opacity:50;filter:alpha(opacity=5000);cursor:default!important}.has-switch.deactivate label,.has-switch.deactivate span{cursor:default!important}.has-switch>div{display:inline-block;width:150%;position:relative;top:0}.has-switch>div.switch-animate{-webkit-transition:left .5s;transition:left .5s}.has-switch>div.switch-off{left:-50%}.has-switch>div.switch-on{left:0}.has-switch input[type=radio],.has-switch input[type=checkbox]{display:none}.has-switch span,.has-switch label{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;position:relative;display:inline-block;height:100%;padding-bottom:4px;padding-top:4px;font-size:14px;line-height:20px}.has-switch span.switch-mini,.has-switch label.switch-mini{padding-bottom:4px;padding-top:4px;font-size:10px;line-height:9px}.has-switch span.switch-small,.has-switch label.switch-small{padding-bottom:3px;padding-top:3px;font-size:12px;line-height:18px}.has-switch span.switch-large,.has-switch label.switch-large{padding-bottom:9px;padding-top:9px;font-size:16px;line-height:normal}.has-switch label{text-align:center;margin-top:-1px;margin-bottom:-1px;z-index:100;width:34%;background:#fff}.has-switch label i{color:#000;text-shadow:0 1px 0 #fff;line-height:18px;pointer-events:none}.has-switch span{text-align:center;z-index:1;width:33%}.has-switch span.switch-left{color:red;border-bottom-left-radius:4px;border-top-left-radius:4px}.has-switch span.switch-right{color:#000;background:#eee}.has-switch span.switch-primary,.has-switch span.switch-left{color:#fff;background:#428bca}.has-switch span.switch-info{color:#fff;background:#5bc0de}.has-switch span.switch-success{color:#fff;background:#5cb85c}.has-switch span.switch-warning{background:#f0ad4e;color:#fff}.has-switch span.switch-danger{color:#fff;background:#d9534f}.has-switch span.switch-default{color:#000;background:#eee}
|
||||
459
css/bootstrap-theme.css
vendored
@@ -1,459 +0,0 @@
|
||||
/*!
|
||||
* Bootstrap v3.0.2 by @fat and @mdo
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
* Licensed under http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Designed and built with all the love in the world by @mdo and @fat.
|
||||
*/
|
||||
|
||||
.btn-default,
|
||||
.btn-primary,
|
||||
.btn-success,
|
||||
.btn-info,
|
||||
.btn-warning,
|
||||
.btn-danger {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.btn-default:active,
|
||||
.btn-primary:active,
|
||||
.btn-success:active,
|
||||
.btn-info:active,
|
||||
.btn-warning:active,
|
||||
.btn-danger:active,
|
||||
.btn-default.active,
|
||||
.btn-primary.active,
|
||||
.btn-success.active,
|
||||
.btn-info.active,
|
||||
.btn-warning.active,
|
||||
.btn-danger.active {
|
||||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||
}
|
||||
|
||||
.btn:active,
|
||||
.btn.active {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-default {
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#e0e0e0));
|
||||
background-image: -webkit-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);
|
||||
background-image: -moz-linear-gradient(top, #ffffff 0%, #e0e0e0 100%);
|
||||
background-image: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dbdbdb;
|
||||
border-color: #ccc;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
|
||||
.btn-default:hover,
|
||||
.btn-default:focus {
|
||||
background-color: #e0e0e0;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-default:active,
|
||||
.btn-default.active {
|
||||
background-color: #e0e0e0;
|
||||
border-color: #dbdbdb;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#2d6ca2));
|
||||
background-image: -webkit-linear-gradient(top, #428bca 0%, #2d6ca2 100%);
|
||||
background-image: -moz-linear-gradient(top, #428bca 0%, #2d6ca2 100%);
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #2d6ca2 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #2b669a;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff2d6ca2', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
|
||||
.btn-primary:hover,
|
||||
.btn-primary:focus {
|
||||
background-color: #2d6ca2;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-primary:active,
|
||||
.btn-primary.active {
|
||||
background-color: #2d6ca2;
|
||||
border-color: #2b669a;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5cb85c), to(#419641));
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||
background-image: -moz-linear-gradient(top, #5cb85c 0%, #419641 100%);
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #3e8f3e;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
|
||||
.btn-success:hover,
|
||||
.btn-success:focus {
|
||||
background-color: #419641;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-success:active,
|
||||
.btn-success.active {
|
||||
background-color: #419641;
|
||||
border-color: #3e8f3e;
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f0ad4e), to(#eb9316));
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||
background-image: -moz-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #e38d13;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
|
||||
.btn-warning:hover,
|
||||
.btn-warning:focus {
|
||||
background-color: #eb9316;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-warning:active,
|
||||
.btn-warning.active {
|
||||
background-color: #eb9316;
|
||||
border-color: #e38d13;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9534f), to(#c12e2a));
|
||||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||
background-image: -moz-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #b92c28;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
|
||||
.btn-danger:hover,
|
||||
.btn-danger:focus {
|
||||
background-color: #c12e2a;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-danger:active,
|
||||
.btn-danger.active {
|
||||
background-color: #c12e2a;
|
||||
border-color: #b92c28;
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5bc0de), to(#2aabd2));
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||
background-image: -moz-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #28a4c9;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
|
||||
.btn-info:hover,
|
||||
.btn-info:focus {
|
||||
background-color: #2aabd2;
|
||||
background-position: 0 -15px;
|
||||
}
|
||||
|
||||
.btn-info:active,
|
||||
.btn-info.active {
|
||||
background-color: #2aabd2;
|
||||
border-color: #28a4c9;
|
||||
}
|
||||
|
||||
.thumbnail,
|
||||
.img-thumbnail {
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.dropdown-menu > li > a:hover,
|
||||
.dropdown-menu > li > a:focus {
|
||||
background-color: #e8e8e8;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f5f5f5), to(#e8e8e8));
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -moz-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||
}
|
||||
|
||||
.dropdown-menu > .active > a,
|
||||
.dropdown-menu > .active > a:hover,
|
||||
.dropdown-menu > .active > a:focus {
|
||||
background-color: #357ebd;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#357ebd));
|
||||
background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);
|
||||
background-image: -moz-linear-gradient(top, #428bca 0%, #357ebd 100%);
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
|
||||
}
|
||||
|
||||
.navbar-default {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#f8f8f8));
|
||||
background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);
|
||||
background-image: -moz-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);
|
||||
background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-radius: 4px;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.navbar-default .navbar-nav > .active > a {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ebebeb), to(#f3f3f3));
|
||||
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%);
|
||||
background-image: -moz-linear-gradient(top, #ebebeb 0%, #f3f3f3 100%);
|
||||
background-image: linear-gradient(to bottom, #ebebeb 0%, #f3f3f3 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff3f3f3', GradientType=0);
|
||||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.navbar-brand,
|
||||
.navbar-nav > li > a {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
|
||||
.navbar-inverse {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#3c3c3c), to(#222222));
|
||||
background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222222 100%);
|
||||
background-image: -moz-linear-gradient(top, #3c3c3c 0%, #222222 100%);
|
||||
background-image: linear-gradient(to bottom, #3c3c3c 0%, #222222 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-nav > .active > a {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#222222), to(#282828));
|
||||
background-image: -webkit-linear-gradient(top, #222222 0%, #282828 100%);
|
||||
background-image: -moz-linear-gradient(top, #222222 0%, #282828 100%);
|
||||
background-image: linear-gradient(to bottom, #222222 0%, #282828 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff282828', GradientType=0);
|
||||
-webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);
|
||||
box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-brand,
|
||||
.navbar-inverse .navbar-nav > li > a {
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.navbar-static-top,
|
||||
.navbar-fixed-top,
|
||||
.navbar-fixed-bottom {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.alert {
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.alert-success {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#dff0d8), to(#c8e5bc));
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-image: -moz-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #b2dba1;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
|
||||
}
|
||||
|
||||
.alert-info {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9edf7), to(#b9def0));
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||
background-image: -moz-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #9acfea;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
|
||||
}
|
||||
|
||||
.alert-warning {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fcf8e3), to(#f8efc0));
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-image: -moz-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #f5e79e;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
|
||||
}
|
||||
|
||||
.alert-danger {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f2dede), to(#e7c3c3));
|
||||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||
background-image: -moz-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dca7a7;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
|
||||
}
|
||||
|
||||
.progress {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ebebeb), to(#f5f5f5));
|
||||
background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-image: -moz-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#3071a9));
|
||||
background-image: -webkit-linear-gradient(top, #428bca 0%, #3071a9 100%);
|
||||
background-image: -moz-linear-gradient(top, #428bca 0%, #3071a9 100%);
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #3071a9 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3071a9', GradientType=0);
|
||||
}
|
||||
|
||||
.progress-bar-success {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5cb85c), to(#449d44));
|
||||
background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||
background-image: -moz-linear-gradient(top, #5cb85c 0%, #449d44 100%);
|
||||
background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
|
||||
}
|
||||
|
||||
.progress-bar-info {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#5bc0de), to(#31b0d5));
|
||||
background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||
background-image: -moz-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
|
||||
background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
|
||||
}
|
||||
|
||||
.progress-bar-warning {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f0ad4e), to(#ec971f));
|
||||
background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||
background-image: -moz-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
|
||||
background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
|
||||
}
|
||||
|
||||
.progress-bar-danger {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9534f), to(#c9302c));
|
||||
background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||
background-image: -moz-linear-gradient(top, #d9534f 0%, #c9302c 100%);
|
||||
background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
|
||||
}
|
||||
|
||||
.list-group {
|
||||
border-radius: 4px;
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
|
||||
.list-group-item.active,
|
||||
.list-group-item.active:hover,
|
||||
.list-group-item.active:focus {
|
||||
text-shadow: 0 -1px 0 #3071a9;
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#3278b3));
|
||||
background-image: -webkit-linear-gradient(top, #428bca 0%, #3278b3 100%);
|
||||
background-image: -moz-linear-gradient(top, #428bca 0%, #3278b3 100%);
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #3278b3 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #3278b3;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff3278b3', GradientType=0);
|
||||
}
|
||||
|
||||
.panel {
|
||||
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.panel-default > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f5f5f5), to(#e8e8e8));
|
||||
background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: -moz-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
|
||||
}
|
||||
|
||||
.panel-primary > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#357ebd));
|
||||
background-image: -webkit-linear-gradient(top, #428bca 0%, #357ebd 100%);
|
||||
background-image: -moz-linear-gradient(top, #428bca 0%, #357ebd 100%);
|
||||
background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0);
|
||||
}
|
||||
|
||||
.panel-success > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#dff0d8), to(#d0e9c6));
|
||||
background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-image: -moz-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
|
||||
}
|
||||
|
||||
.panel-info > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#d9edf7), to(#c4e3f3));
|
||||
background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-image: -moz-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
|
||||
}
|
||||
|
||||
.panel-warning > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fcf8e3), to(#faf2cc));
|
||||
background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-image: -moz-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
|
||||
}
|
||||
|
||||
.panel-danger > .panel-heading {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#f2dede), to(#ebcccc));
|
||||
background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||
background-image: -moz-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
|
||||
background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
|
||||
}
|
||||
|
||||
.well {
|
||||
background-image: -webkit-gradient(linear, left 0%, left 100%, from(#e8e8e8), to(#f5f5f5));
|
||||
background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-image: -moz-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #dcdcdc;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
|
||||
-webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
9
css/bootstrap-theme.min.css
vendored
121
css/bootstrap-timepicker.css
vendored
@@ -1,121 +0,0 @@
|
||||
/*!
|
||||
* Timepicker Component for Twitter Bootstrap
|
||||
*
|
||||
* Copyright 2013 Joris de Wit
|
||||
*
|
||||
* Contributors https://github.com/jdewit/bootstrap-timepicker/graphs/contributors
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
.bootstrap-timepicker {
|
||||
position: relative;
|
||||
}
|
||||
.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu:before {
|
||||
left: auto;
|
||||
right: 12px;
|
||||
}
|
||||
.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu:after {
|
||||
left: auto;
|
||||
right: 13px;
|
||||
}
|
||||
.bootstrap-timepicker .add-on {
|
||||
cursor: pointer;
|
||||
}
|
||||
.bootstrap-timepicker .add-on i {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
.bootstrap-timepicker-widget.dropdown-menu {
|
||||
padding: 2px 3px 2px 2px;
|
||||
}
|
||||
.bootstrap-timepicker-widget.dropdown-menu.open {
|
||||
display: inline-block;
|
||||
}
|
||||
.bootstrap-timepicker-widget.dropdown-menu:before {
|
||||
border-bottom: 7px solid rgba(0, 0, 0, 0.2);
|
||||
border-left: 7px solid transparent;
|
||||
border-right: 7px solid transparent;
|
||||
content: "";
|
||||
display: inline-block;
|
||||
left: 9px;
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
}
|
||||
.bootstrap-timepicker-widget.dropdown-menu:after {
|
||||
border-bottom: 6px solid #FFFFFF;
|
||||
border-left: 6px solid transparent;
|
||||
border-right: 6px solid transparent;
|
||||
content: "";
|
||||
display: inline-block;
|
||||
left: 10px;
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
}
|
||||
.bootstrap-timepicker-widget a.btn,
|
||||
.bootstrap-timepicker-widget input {
|
||||
border-radius: 4px;
|
||||
}
|
||||
.bootstrap-timepicker-widget table {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
.bootstrap-timepicker-widget table td {
|
||||
text-align: center;
|
||||
height: 30px;
|
||||
margin: 0;
|
||||
padding: 2px;
|
||||
}
|
||||
.bootstrap-timepicker-widget table td:not(.separator) {
|
||||
min-width: 30px;
|
||||
}
|
||||
.bootstrap-timepicker-widget table td span {
|
||||
width: 100%;
|
||||
}
|
||||
.bootstrap-timepicker-widget table td a {
|
||||
border: 1px transparent solid;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 8px 0;
|
||||
outline: 0;
|
||||
color: #333;
|
||||
}
|
||||
.bootstrap-timepicker-widget table td a:hover {
|
||||
text-decoration: none;
|
||||
background-color: #eee;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
border-color: #ddd;
|
||||
}
|
||||
.bootstrap-timepicker-widget table td a i {
|
||||
margin-top: 2px;
|
||||
}
|
||||
.bootstrap-timepicker-widget table td input {
|
||||
width: 25px;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
}
|
||||
.bootstrap-timepicker-widget .modal-content {
|
||||
padding: 4px;
|
||||
}
|
||||
@media (min-width: 767px) {
|
||||
.bootstrap-timepicker-widget.modal {
|
||||
width: 200px;
|
||||
margin-left: -100px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.bootstrap-timepicker {
|
||||
width: 100%;
|
||||
}
|
||||
.bootstrap-timepicker .dropdown-menu {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
10
css/bootstrap-timepicker.min.css
vendored
@@ -1,10 +0,0 @@
|
||||
/*!
|
||||
* Timepicker Component for Twitter Bootstrap
|
||||
*
|
||||
* Copyright 2013 Joris de Wit
|
||||
*
|
||||
* Contributors https://github.com/jdewit/bootstrap-timepicker/graphs/contributors
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/.bootstrap-timepicker{position:relative}.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu{left:auto;right:0}.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu:before{left:auto;right:12px}.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu:after{left:auto;right:13px}.bootstrap-timepicker .add-on{cursor:pointer}.bootstrap-timepicker .add-on i{display:inline-block;width:16px;height:16px}.bootstrap-timepicker-widget.dropdown-menu{padding:2px 3px 2px 2px}.bootstrap-timepicker-widget.dropdown-menu.open{display:inline-block}.bootstrap-timepicker-widget.dropdown-menu:before{border-bottom:7px solid rgba(0,0,0,0.2);border-left:7px solid transparent;border-right:7px solid transparent;content:"";display:inline-block;left:9px;position:absolute;top:-7px}.bootstrap-timepicker-widget.dropdown-menu:after{border-bottom:6px solid #fff;border-left:6px solid transparent;border-right:6px solid transparent;content:"";display:inline-block;left:10px;position:absolute;top:-6px}.bootstrap-timepicker-widget a.btn,.bootstrap-timepicker-widget input{border-radius:4px}.bootstrap-timepicker-widget table{width:100%;margin:0}.bootstrap-timepicker-widget table td{text-align:center;height:30px;margin:0;padding:2px}.bootstrap-timepicker-widget table td:not(.separator){min-width:30px}.bootstrap-timepicker-widget table td span{width:100%}.bootstrap-timepicker-widget table td a{border:1px transparent solid;width:100%;display:inline-block;margin:0;padding:8px 0;outline:0;color:#333}.bootstrap-timepicker-widget table td a:hover{text-decoration:none;background-color:#eee;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;border-color:#ddd}.bootstrap-timepicker-widget table td a i{margin-top:2px}.bootstrap-timepicker-widget table td input{width:25px;margin:0;text-align:center}.bootstrap-timepicker-widget .modal-content{padding:4px}@media(min-width:767px){.bootstrap-timepicker-widget.modal{width:200px;margin-left:-100px}}@media(max-width:767px){.bootstrap-timepicker{width:100%}.bootstrap-timepicker .dropdown-menu{width:100%}}
|
||||
7098
css/bootstrap.css
vendored
9
css/bootstrap.min.css
vendored
102
css/bootstrap3-wysihtml5.css
vendored
@@ -1,102 +0,0 @@
|
||||
ul.wysihtml5-toolbar {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar::after {
|
||||
clear: both;
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar > li {
|
||||
float: left;
|
||||
display: list-item;
|
||||
list-style: none;
|
||||
margin: 0 5px 10px 0;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar a[data-wysihtml5-command=bold] {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar a[data-wysihtml5-command=italic] {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar a[data-wysihtml5-command=underline] {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar a.btn.wysihtml5-command-active {
|
||||
background-image: none;
|
||||
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
-moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
background-color: #E6E6E6;
|
||||
background-color: #D9D9D9;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
ul.wysihtml5-commands-disabled .dropdown-menu {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div.wysihtml5-colors {
|
||||
display:block;
|
||||
width: 50px;
|
||||
height: 20px;
|
||||
margin-top: 2px;
|
||||
margin-left: 5px;
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar a.wysihtml5-colors-title {
|
||||
padding-left: 70px;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="black"] {
|
||||
background: black !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="silver"] {
|
||||
background: silver !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="gray"] {
|
||||
background: gray !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="maroon"] {
|
||||
background: maroon !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="red"] {
|
||||
background: red !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="purple"] {
|
||||
background: purple !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="green"] {
|
||||
background: green !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="olive"] {
|
||||
background: olive !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="navy"] {
|
||||
background: navy !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="blue"] {
|
||||
background: blue !important;
|
||||
}
|
||||
|
||||
ul.wysihtml5-toolbar div[data-wysihtml5-command-value="orange"] {
|
||||
background: orange !important;
|
||||
}
|
||||
3
css/bootstrap3-wysihtml5.min.css
vendored
@@ -1,3 +0,0 @@
|
||||
/*! bootstrap3-wysihtml5-bower 2013-11-22 */
|
||||
|
||||
ul.wysihtml5-toolbar{margin:0;padding:0;display:block}ul.wysihtml5-toolbar::after{clear:both;display:table;content:""}ul.wysihtml5-toolbar>li{float:left;display:list-item;list-style:none;margin:0 5px 10px 0}ul.wysihtml5-toolbar a[data-wysihtml5-command=bold]{font-weight:700}ul.wysihtml5-toolbar a[data-wysihtml5-command=italic]{font-style:italic}ul.wysihtml5-toolbar a[data-wysihtml5-command=underline]{text-decoration:underline}ul.wysihtml5-toolbar a.btn.wysihtml5-command-active{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05);background-color:#E6E6E6;background-color:#D9D9D9;outline:0}ul.wysihtml5-commands-disabled .dropdown-menu{display:none!important}ul.wysihtml5-toolbar div.wysihtml5-colors{display:block;width:50px;height:20px;margin-top:2px;margin-left:5px;position:absolute;pointer-events:none}ul.wysihtml5-toolbar a.wysihtml5-colors-title{padding-left:70px}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=black]{background:#000!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=silver]{background:silver!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=gray]{background:gray!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=maroon]{background:maroon!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=red]{background:red!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=purple]{background:purple!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=green]{background:green!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=olive]{background:olive!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=navy]{background:navy!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=blue]{background:#00f!important}ul.wysihtml5-toolbar div[data-wysihtml5-command-value=orange]{background:orange!important}
|
||||
@@ -1,245 +0,0 @@
|
||||
/*!
|
||||
* Stylesheet for the Date Range Picker, for use with Bootstrap 3.x
|
||||
*
|
||||
* Copyright 2013 Dan Grossman ( http://www.dangrossman.info )
|
||||
* Licensed under the Apache License v2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Built for http://www.improvely.com
|
||||
*/
|
||||
|
||||
.daterangepicker.dropdown-menu {
|
||||
max-width: none;
|
||||
z-index: 3000;
|
||||
}
|
||||
|
||||
.daterangepicker.opensleft .ranges, .daterangepicker.opensleft .calendar {
|
||||
float: left;
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
.daterangepicker.opensright .ranges, .daterangepicker.opensright .calendar {
|
||||
float: right;
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges {
|
||||
width: 160px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges .range_inputs>div {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges .range_inputs>div:nth-child(2) {
|
||||
padding-left: 11px;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar {
|
||||
display: none;
|
||||
max-width: 270px;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar th, .daterangepicker .calendar td {
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
min-width: 32px;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges label {
|
||||
color: #333;
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
font-weight: normal;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
margin-bottom: 2px;
|
||||
text-shadow: #fff 1px 1px 0px;
|
||||
text-transform: uppercase;
|
||||
width: 74px;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges input {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges .input-mini {
|
||||
background-color: #eee;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
color: #555;
|
||||
display: block;
|
||||
font-size: 11px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
vertical-align: middle;
|
||||
margin: 0 0 10px 0;
|
||||
padding: 0 6px;
|
||||
width: 74px;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges li {
|
||||
font-size: 13px;
|
||||
background: #f5f5f5;
|
||||
border: 1px solid #f5f5f5;
|
||||
color: #08c;
|
||||
padding: 3px 12px;
|
||||
margin-bottom: 8px;
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.daterangepicker .ranges li.active, .daterangepicker .ranges li:hover {
|
||||
background: #08c;
|
||||
border: 1px solid #08c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-date {
|
||||
border: 1px solid #ddd;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.daterangepicker .calendar-time {
|
||||
text-align: center;
|
||||
margin: 8px auto 0 auto;
|
||||
line-height: 30px;
|
||||
}
|
||||
|
||||
.daterangepicker {
|
||||
position: absolute;
|
||||
background: #fff;
|
||||
top: 100px;
|
||||
left: 20px;
|
||||
padding: 4px;
|
||||
margin-top: 1px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.daterangepicker.opensleft:before {
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
right: 9px;
|
||||
display: inline-block;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid #ccc;
|
||||
border-left: 7px solid transparent;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.2);
|
||||
content: '';
|
||||
}
|
||||
|
||||
.daterangepicker.opensleft:after {
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
right: 10px;
|
||||
display: inline-block;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid #fff;
|
||||
border-left: 6px solid transparent;
|
||||
content: '';
|
||||
}
|
||||
|
||||
.daterangepicker.opensright:before {
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
left: 9px;
|
||||
display: inline-block;
|
||||
border-right: 7px solid transparent;
|
||||
border-bottom: 7px solid #ccc;
|
||||
border-left: 7px solid transparent;
|
||||
border-bottom-color: rgba(0, 0, 0, 0.2);
|
||||
content: '';
|
||||
}
|
||||
|
||||
.daterangepicker.opensright:after {
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
left: 10px;
|
||||
display: inline-block;
|
||||
border-right: 6px solid transparent;
|
||||
border-bottom: 6px solid #fff;
|
||||
border-left: 6px solid transparent;
|
||||
content: '';
|
||||
}
|
||||
|
||||
.daterangepicker table {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.daterangepicker td, .daterangepicker th {
|
||||
text-align: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.daterangepicker td.off {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.daterangepicker td.disabled {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.daterangepicker td.available:hover, .daterangepicker th.available:hover {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.daterangepicker td.in-range {
|
||||
background: #ebf4f8;
|
||||
-webkit-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.daterangepicker td.active, .daterangepicker td.active:hover {
|
||||
background-color: #357ebd;
|
||||
border-color: #3071a9;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.daterangepicker td.week, .daterangepicker th.week {
|
||||
font-size: 80%;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.daterangepicker select.monthselect, .daterangepicker select.yearselect {
|
||||
font-size: 12px;
|
||||
padding: 1px;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.daterangepicker select.monthselect {
|
||||
margin-right: 2%;
|
||||
width: 56%;
|
||||
}
|
||||
|
||||
.daterangepicker select.yearselect {
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
.daterangepicker select.hourselect, .daterangepicker select.minuteselect, .daterangepicker select.ampmselect {
|
||||
width: 50px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
/* Template-specific stuff
|
||||
*
|
||||
* Customizations just for the template; these are not necessary for anything
|
||||
* with disabling the responsiveness.
|
||||
*/
|
||||
|
||||
/* Account for fixed navbar */
|
||||
body {
|
||||
padding-top: 70px;
|
||||
padding-bottom: 30px;
|
||||
min-width: 970px;
|
||||
}
|
||||
|
||||
/* Finesse the page header spacing */
|
||||
.page-header {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.page-header .lead {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
|
||||
/* Non-responsive overrides
|
||||
*
|
||||
* Utilitze the following CSS to disable the responsive-ness of the container,
|
||||
* grid system, and navbar.
|
||||
*/
|
||||
|
||||
/* Reset the container */
|
||||
.container {
|
||||
max-width: none !important;
|
||||
min-width: 970px !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Demonstrate the grids */
|
||||
.col-xs-4 {
|
||||
padding-top: 15px;
|
||||
padding-bottom: 15px;
|
||||
background-color: #eee;
|
||||
border: 1px solid #ddd;
|
||||
background-color: rgba(86,61,124,.15);
|
||||
border: 1px solid rgba(86,61,124,.2);
|
||||
}
|
||||
|
||||
.container .navbar-header,
|
||||
.container .navbar-collapse {
|
||||
margin-right: 0;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* Always float the navbar header */
|
||||
.navbar-header {
|
||||
float: left;
|
||||
}
|
||||
|
||||
/* Undo the collapsing navbar */
|
||||
.navbar-collapse {
|
||||
display: block !important;
|
||||
height: auto !important;
|
||||
padding-bottom: 0;
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
.navbar-toggle {
|
||||
display: none;
|
||||
}
|
||||
.navbar-collapse {
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.navbar-brand {
|
||||
margin-left: -15px;
|
||||
}
|
||||
|
||||
/* Always apply the floated nav */
|
||||
.navbar-nav {
|
||||
float: left;
|
||||
margin: 0;
|
||||
}
|
||||
.navbar-nav > li {
|
||||
float: left;
|
||||
}
|
||||
.navbar-nav > li > a {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
/* Redeclare since we override the float above */
|
||||
.navbar-nav.navbar-right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
/* Undo custom dropdowns */
|
||||
.navbar .navbar-nav .open .dropdown-menu {
|
||||
position: absolute;
|
||||
float: left;
|
||||
background-color: #fff;
|
||||
border: 1px solid #cccccc;
|
||||
border: 1px solid rgba(0, 0, 0, 0.15);
|
||||
border-width: 0 1px 1px;
|
||||
border-radius: 0 0 4px 4px;
|
||||
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
|
||||
}
|
||||
.navbar-default .navbar-nav .open .dropdown-menu > li > a {
|
||||
color: #333;
|
||||
}
|
||||
.navbar .navbar-nav .open .dropdown-menu > li > a:hover,
|
||||
.navbar .navbar-nav .open .dropdown-menu > li > a:focus,
|
||||
.navbar .navbar-nav .open .dropdown-menu > .active > a,
|
||||
.navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
|
||||
.navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
|
||||
color: #fff !important;
|
||||
background-color: #428bca !important;
|
||||
}
|
||||
.navbar .navbar-nav .open .dropdown-menu > .disabled > a,
|
||||
.navbar .navbar-nav .open .dropdown-menu > .disabled > a:hover,
|
||||
.navbar .navbar-nav .open .dropdown-menu > .disabled > a:focus {
|
||||
color: #999 !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
1338
css/font-awesome.css
vendored
4
css/font-awesome.min.css
vendored
@@ -1,587 +0,0 @@
|
||||
/*!
|
||||
* FullCalendar v1.6.4 Stylesheet
|
||||
* Docs & License: http://arshaw.com/fullcalendar/
|
||||
* (c) 2013 Adam Shaw
|
||||
*/
|
||||
|
||||
|
||||
.fc {
|
||||
direction: ltr;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.fc table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
html .fc,
|
||||
.fc table {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.fc td,
|
||||
.fc th {
|
||||
padding: 0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Header
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
.fc-header td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.fc-header-left {
|
||||
width: 25%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.fc-header-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.fc-header-right {
|
||||
width: 25%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.fc-header-title {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.fc-header-title h2 {
|
||||
margin-top: 0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.fc .fc-header-space {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.fc-header .fc-button {
|
||||
margin-bottom: 1em;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/* buttons edges butting together */
|
||||
|
||||
.fc-header .fc-button {
|
||||
margin-right: -1px;
|
||||
}
|
||||
|
||||
.fc-header .fc-corner-right, /* non-theme */
|
||||
.fc-header .ui-corner-right { /* theme */
|
||||
margin-right: 0; /* back to normal */
|
||||
}
|
||||
|
||||
/* button layering (for border precedence) */
|
||||
|
||||
.fc-header .fc-state-hover,
|
||||
.fc-header .ui-state-hover {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.fc-header .fc-state-down {
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.fc-header .fc-state-active,
|
||||
.fc-header .ui-state-active {
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Content
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
.fc-content {
|
||||
clear: both;
|
||||
zoom: 1; /* for IE7, gives accurate coordinates for [un]freezeContentHeight */
|
||||
}
|
||||
|
||||
.fc-view {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Cell Styles
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
.fc-widget-header, /* <th>, usually */
|
||||
.fc-widget-content { /* <td>, usually */
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.fc-state-highlight { /* <td> today cell */ /* TODO: add .fc-today to <th> */
|
||||
background: #fcf8e3;
|
||||
}
|
||||
|
||||
.fc-cell-overlay { /* semi-transparent rectangle while dragging */
|
||||
background: #bce8f1;
|
||||
opacity: .3;
|
||||
filter: alpha(opacity=30); /* for IE */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Buttons
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
.fc-button {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding: 0 .6em;
|
||||
overflow: hidden;
|
||||
height: 1.9em;
|
||||
line-height: 1.9em;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.fc-state-default { /* non-theme */
|
||||
border: 1px solid;
|
||||
}
|
||||
|
||||
.fc-state-default.fc-corner-left { /* non-theme */
|
||||
border-top-left-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
|
||||
.fc-state-default.fc-corner-right { /* non-theme */
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
/*
|
||||
Our default prev/next buttons use HTML entities like ‹ › « »
|
||||
and we'll try to make them look good cross-browser.
|
||||
*/
|
||||
|
||||
.fc-text-arrow {
|
||||
margin: 0 .1em;
|
||||
font-size: 2em;
|
||||
font-family: "Courier New", Courier, monospace;
|
||||
vertical-align: baseline; /* for IE7 */
|
||||
}
|
||||
|
||||
.fc-button-prev .fc-text-arrow,
|
||||
.fc-button-next .fc-text-arrow { /* for ‹ › */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* icon (for jquery ui) */
|
||||
|
||||
.fc-button .fc-icon-wrap {
|
||||
position: relative;
|
||||
float: left;
|
||||
top: 50%;
|
||||
}
|
||||
|
||||
.fc-button .ui-icon {
|
||||
position: relative;
|
||||
float: left;
|
||||
margin-top: -50%;
|
||||
*margin-top: 0;
|
||||
*top: -50%;
|
||||
}
|
||||
|
||||
/*
|
||||
button states
|
||||
borrowed from twitter bootstrap (http://twitter.github.com/bootstrap/)
|
||||
*/
|
||||
|
||||
.fc-state-default {
|
||||
background-color: #f5f5f5;
|
||||
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
|
||||
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
|
||||
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
|
||||
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
|
||||
background-repeat: repeat-x;
|
||||
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
|
||||
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
||||
color: #333;
|
||||
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.fc-state-hover,
|
||||
.fc-state-down,
|
||||
.fc-state-active,
|
||||
.fc-state-disabled {
|
||||
color: #333333;
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
|
||||
.fc-state-hover {
|
||||
color: #333333;
|
||||
text-decoration: none;
|
||||
background-position: 0 -15px;
|
||||
-webkit-transition: background-position 0.1s linear;
|
||||
-moz-transition: background-position 0.1s linear;
|
||||
-o-transition: background-position 0.1s linear;
|
||||
transition: background-position 0.1s linear;
|
||||
}
|
||||
|
||||
.fc-state-down,
|
||||
.fc-state-active {
|
||||
background-color: #cccccc;
|
||||
background-image: none;
|
||||
outline: 0;
|
||||
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.fc-state-disabled {
|
||||
cursor: default;
|
||||
background-image: none;
|
||||
opacity: 0.65;
|
||||
filter: alpha(opacity=65);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Global Event Styles
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
.fc-event-container > * {
|
||||
z-index: 8;
|
||||
}
|
||||
|
||||
.fc-event-container > .ui-draggable-dragging,
|
||||
.fc-event-container > .ui-resizable-resizing {
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.fc-event {
|
||||
border: 1px solid #3a87ad; /* default BORDER color */
|
||||
background-color: #3a87ad; /* default BACKGROUND color */
|
||||
color: #fff; /* default TEXT color */
|
||||
font-size: .85em;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
a.fc-event {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a.fc-event,
|
||||
.fc-event-draggable {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.fc-rtl .fc-event {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.fc-event-inner {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fc-event-time,
|
||||
.fc-event-title {
|
||||
padding: 0 1px;
|
||||
}
|
||||
|
||||
.fc .ui-resizable-handle {
|
||||
display: block;
|
||||
position: absolute;
|
||||
z-index: 99999;
|
||||
overflow: hidden; /* hacky spaces (IE6/7) */
|
||||
font-size: 300%; /* */
|
||||
line-height: 50%; /* */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Horizontal Events
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
.fc-event-hori {
|
||||
border-width: 1px 0;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
.fc-ltr .fc-event-hori.fc-event-start,
|
||||
.fc-rtl .fc-event-hori.fc-event-end {
|
||||
border-left-width: 1px;
|
||||
border-top-left-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
}
|
||||
|
||||
.fc-ltr .fc-event-hori.fc-event-end,
|
||||
.fc-rtl .fc-event-hori.fc-event-start {
|
||||
border-right-width: 1px;
|
||||
border-top-right-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
/* resizable */
|
||||
|
||||
.fc-event-hori .ui-resizable-e {
|
||||
top: 0 !important; /* importants override pre jquery ui 1.7 styles */
|
||||
right: -3px !important;
|
||||
width: 7px !important;
|
||||
height: 100% !important;
|
||||
cursor: e-resize;
|
||||
}
|
||||
|
||||
.fc-event-hori .ui-resizable-w {
|
||||
top: 0 !important;
|
||||
left: -3px !important;
|
||||
width: 7px !important;
|
||||
height: 100% !important;
|
||||
cursor: w-resize;
|
||||
}
|
||||
|
||||
.fc-event-hori .ui-resizable-handle {
|
||||
_padding-bottom: 14px; /* IE6 had 0 height */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Reusable Separate-border Table
|
||||
------------------------------------------------------------*/
|
||||
|
||||
table.fc-border-separate {
|
||||
border-collapse: separate;
|
||||
}
|
||||
|
||||
.fc-border-separate th,
|
||||
.fc-border-separate td {
|
||||
border-width: 1px 0 0 1px;
|
||||
}
|
||||
|
||||
.fc-border-separate th.fc-last,
|
||||
.fc-border-separate td.fc-last {
|
||||
border-right-width: 1px;
|
||||
}
|
||||
|
||||
.fc-border-separate tr.fc-last th,
|
||||
.fc-border-separate tr.fc-last td {
|
||||
border-bottom-width: 1px;
|
||||
}
|
||||
|
||||
.fc-border-separate tbody tr.fc-first td,
|
||||
.fc-border-separate tbody tr.fc-first th {
|
||||
border-top-width: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Month View, Basic Week View, Basic Day View
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
.fc-grid th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.fc .fc-week-number {
|
||||
width: 22px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.fc .fc-week-number div {
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
.fc-grid .fc-day-number {
|
||||
float: right;
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
.fc-grid .fc-other-month .fc-day-number {
|
||||
opacity: 0.3;
|
||||
filter: alpha(opacity=30); /* for IE */
|
||||
/* opacity with small font can sometimes look too faded
|
||||
might want to set the 'color' property instead
|
||||
making day-numbers bold also fixes the problem */
|
||||
}
|
||||
|
||||
.fc-grid .fc-day-content {
|
||||
clear: both;
|
||||
padding: 2px 2px 1px; /* distance between events and day edges */
|
||||
}
|
||||
|
||||
/* event styles */
|
||||
|
||||
.fc-grid .fc-event-time {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* right-to-left */
|
||||
|
||||
.fc-rtl .fc-grid .fc-day-number {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.fc-rtl .fc-grid .fc-event-time {
|
||||
float: right;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Agenda Week View, Agenda Day View
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
.fc-agenda table {
|
||||
border-collapse: separate;
|
||||
}
|
||||
|
||||
.fc-agenda-days th {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.fc-agenda .fc-agenda-axis {
|
||||
width: 50px;
|
||||
padding: 0 4px;
|
||||
vertical-align: middle;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.fc-agenda .fc-week-number {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.fc-agenda .fc-day-content {
|
||||
padding: 2px 2px 1px;
|
||||
}
|
||||
|
||||
/* make axis border take precedence */
|
||||
|
||||
.fc-agenda-days .fc-agenda-axis {
|
||||
border-right-width: 1px;
|
||||
}
|
||||
|
||||
.fc-agenda-days .fc-col0 {
|
||||
border-left-width: 0;
|
||||
}
|
||||
|
||||
/* all-day area */
|
||||
|
||||
.fc-agenda-allday th {
|
||||
border-width: 0 1px;
|
||||
}
|
||||
|
||||
.fc-agenda-allday .fc-day-content {
|
||||
min-height: 34px; /* TODO: doesnt work well in quirksmode */
|
||||
_height: 34px;
|
||||
}
|
||||
|
||||
/* divider (between all-day and slots) */
|
||||
|
||||
.fc-agenda-divider-inner {
|
||||
height: 2px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fc-widget-header .fc-agenda-divider-inner {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
/* slot rows */
|
||||
|
||||
.fc-agenda-slots th {
|
||||
border-width: 1px 1px 0;
|
||||
}
|
||||
|
||||
.fc-agenda-slots td {
|
||||
border-width: 1px 0 0;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.fc-agenda-slots td div {
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.fc-agenda-slots tr.fc-slot0 th,
|
||||
.fc-agenda-slots tr.fc-slot0 td {
|
||||
border-top-width: 0;
|
||||
}
|
||||
|
||||
.fc-agenda-slots tr.fc-minor th,
|
||||
.fc-agenda-slots tr.fc-minor td {
|
||||
border-top-style: dotted;
|
||||
}
|
||||
|
||||
.fc-agenda-slots tr.fc-minor th.ui-widget-header {
|
||||
*border-top-style: solid; /* doesn't work with background in IE6/7 */
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Vertical Events
|
||||
------------------------------------------------------------------------*/
|
||||
|
||||
.fc-event-vert {
|
||||
border-width: 0 1px;
|
||||
}
|
||||
|
||||
.fc-event-vert.fc-event-start {
|
||||
border-top-width: 1px;
|
||||
border-top-left-radius: 3px;
|
||||
border-top-right-radius: 3px;
|
||||
}
|
||||
|
||||
.fc-event-vert.fc-event-end {
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-left-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
.fc-event-vert .fc-event-time {
|
||||
white-space: nowrap;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.fc-event-vert .fc-event-inner {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
opacity: .25;
|
||||
filter: alpha(opacity=25);
|
||||
}
|
||||
|
||||
.fc .ui-draggable-dragging .fc-event-bg, /* TODO: something nicer like .fc-opacity */
|
||||
.fc-select-helper .fc-event-bg {
|
||||
display: none\9; /* for IE6/7/8. nested opacity filters while dragging don't work */
|
||||
}
|
||||
|
||||
/* resizable */
|
||||
|
||||
.fc-event-vert .ui-resizable-s {
|
||||
bottom: 0 !important; /* importants override pre jquery ui 1.7 styles */
|
||||
width: 100% !important;
|
||||
height: 8px !important;
|
||||
overflow: hidden !important;
|
||||
line-height: 8px !important;
|
||||
font-size: 11px !important;
|
||||
font-family: monospace;
|
||||
text-align: center;
|
||||
cursor: s-resize;
|
||||
}
|
||||
|
||||
.fc-agenda .ui-resizable-resizing { /* TODO: better selector */
|
||||
_overflow: hidden;
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/*!
|
||||
* FullCalendar v1.6.4 Print Stylesheet
|
||||
* Docs & License: http://arshaw.com/fullcalendar/
|
||||
* (c) 2013 Adam Shaw
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include this stylesheet on your page to get a more printer-friendly calendar.
|
||||
* When including this stylesheet, use the media='print' attribute of the <link> tag.
|
||||
* Make sure to include this stylesheet IN ADDITION to the regular fullcalendar.css.
|
||||
*/
|
||||
|
||||
|
||||
/* Events
|
||||
-----------------------------------------------------*/
|
||||
|
||||
.fc-event {
|
||||
background: #fff !important;
|
||||
color: #000 !important;
|
||||
}
|
||||
|
||||
/* for vertical events */
|
||||
|
||||
.fc-event-bg {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.fc-event .ui-resizable-handle {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
|
||||
419
empty.html
Normal file
@@ -0,0 +1,419 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>AdminLTE | Dashboard</title>
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- bootstrap 3.0.2 -->
|
||||
<link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
|
||||
<!-- font Awesome -->
|
||||
<link href="bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
|
||||
<!-- Ionicons -->
|
||||
<link href="bower_components/ionicons/css/ionicons.min.css" rel="stylesheet" type="text/css" />
|
||||
<!-- Theme style -->
|
||||
<link href="css/AdminLTE.css" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body class="skin-blue">
|
||||
<!-- header logo: style can be found in header.less -->
|
||||
<header class="header">
|
||||
<a href="index.html" class="logo">
|
||||
<!-- Add the class icon to your logo image or logo icon to add the margining -->
|
||||
AdminLTE
|
||||
</a>
|
||||
<!-- Header Navbar: style can be found in header.less -->
|
||||
<nav class="navbar navbar-static-top" role="navigation">
|
||||
<!-- Sidebar toggle button-->
|
||||
<a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</a>
|
||||
<div class="navbar-right">
|
||||
<ul class="nav navbar-nav">
|
||||
<!-- Messages: style can be found in dropdown.less-->
|
||||
<li class="dropdown messages-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-envelope"></i>
|
||||
<span class="label label-success">4</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header">You have 4 messages</li>
|
||||
<li>
|
||||
<!-- inner menu: contains the actual data -->
|
||||
<ul class="menu">
|
||||
<li><!-- start message -->
|
||||
<a href="#">
|
||||
<div class="pull-left">
|
||||
<img src="img/avatar3.png" class="img-circle" alt="User Image"/>
|
||||
</div>
|
||||
<h4>
|
||||
Support Team
|
||||
<small><i class="fa fa-clock-o"></i> 5 mins</small>
|
||||
</h4>
|
||||
<p>Why not buy a new awesome theme?</p>
|
||||
</a>
|
||||
</li><!-- end message -->
|
||||
<li>
|
||||
<a href="#">
|
||||
<div class="pull-left">
|
||||
<img src="img/avatar2.png" class="img-circle" alt="user image"/>
|
||||
</div>
|
||||
<h4>
|
||||
AdminLTE Design Team
|
||||
<small><i class="fa fa-clock-o"></i> 2 hours</small>
|
||||
</h4>
|
||||
<p>Why not buy a new awesome theme?</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<div class="pull-left">
|
||||
<img src="img/avatar.png" class="img-circle" alt="user image"/>
|
||||
</div>
|
||||
<h4>
|
||||
Developers
|
||||
<small><i class="fa fa-clock-o"></i> Today</small>
|
||||
</h4>
|
||||
<p>Why not buy a new awesome theme?</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<div class="pull-left">
|
||||
<img src="img/avatar2.png" class="img-circle" alt="user image"/>
|
||||
</div>
|
||||
<h4>
|
||||
Sales Department
|
||||
<small><i class="fa fa-clock-o"></i> Yesterday</small>
|
||||
</h4>
|
||||
<p>Why not buy a new awesome theme?</p>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<div class="pull-left">
|
||||
<img src="img/avatar.png" class="img-circle" alt="user image"/>
|
||||
</div>
|
||||
<h4>
|
||||
Reviewers
|
||||
<small><i class="fa fa-clock-o"></i> 2 days</small>
|
||||
</h4>
|
||||
<p>Why not buy a new awesome theme?</p>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="footer"><a href="#">See All Messages</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- Notifications: style can be found in dropdown.less -->
|
||||
<li class="dropdown notifications-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-warning"></i>
|
||||
<span class="label label-warning">10</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header">You have 10 notifications</li>
|
||||
<li>
|
||||
<!-- inner menu: contains the actual data -->
|
||||
<ul class="menu">
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="ion ion-ios7-people info"></i> 5 new members joined today
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="fa fa-warning danger"></i> Very long description here that may not fit into the page and may cause design problems
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="fa fa-users warning"></i> 5 new members joined
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="ion ion-ios7-cart success"></i> 25 sales made
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">
|
||||
<i class="ion ion-ios7-person danger"></i> You changed your username
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="footer"><a href="#">View all</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- Tasks: style can be found in dropdown.less -->
|
||||
<li class="dropdown tasks-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-tasks"></i>
|
||||
<span class="label label-danger">9</span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="header">You have 9 tasks</li>
|
||||
<li>
|
||||
<!-- inner menu: contains the actual data -->
|
||||
<ul class="menu">
|
||||
<li><!-- Task item -->
|
||||
<a href="#">
|
||||
<h3>
|
||||
Design some buttons
|
||||
<small class="pull-right">20%</small>
|
||||
</h3>
|
||||
<div class="progress xs">
|
||||
<div class="progress-bar progress-bar-aqua" style="width: 20%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
|
||||
<span class="sr-only">20% Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li><!-- end task item -->
|
||||
<li><!-- Task item -->
|
||||
<a href="#">
|
||||
<h3>
|
||||
Create a nice theme
|
||||
<small class="pull-right">40%</small>
|
||||
</h3>
|
||||
<div class="progress xs">
|
||||
<div class="progress-bar progress-bar-green" style="width: 40%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
|
||||
<span class="sr-only">40% Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li><!-- end task item -->
|
||||
<li><!-- Task item -->
|
||||
<a href="#">
|
||||
<h3>
|
||||
Some task I need to do
|
||||
<small class="pull-right">60%</small>
|
||||
</h3>
|
||||
<div class="progress xs">
|
||||
<div class="progress-bar progress-bar-red" style="width: 60%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
|
||||
<span class="sr-only">60% Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li><!-- end task item -->
|
||||
<li><!-- Task item -->
|
||||
<a href="#">
|
||||
<h3>
|
||||
Make beautiful transitions
|
||||
<small class="pull-right">80%</small>
|
||||
</h3>
|
||||
<div class="progress xs">
|
||||
<div class="progress-bar progress-bar-yellow" style="width: 80%" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100">
|
||||
<span class="sr-only">80% Complete</span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li><!-- end task item -->
|
||||
</ul>
|
||||
</li>
|
||||
<li class="footer">
|
||||
<a href="#">View all tasks</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- User Account: style can be found in dropdown.less -->
|
||||
<li class="dropdown user user-menu">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="glyphicon glyphicon-user"></i>
|
||||
<span>Jane Doe <i class="caret"></i></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<!-- User image -->
|
||||
<li class="user-header bg-light-blue">
|
||||
<img src="img/avatar3.png" class="img-circle" alt="User Image" />
|
||||
<p>
|
||||
Jane Doe - Web Developer
|
||||
<small>Member since Nov. 2012</small>
|
||||
</p>
|
||||
</li>
|
||||
<!-- Menu Body -->
|
||||
<li class="user-body">
|
||||
<div class="col-xs-4 text-center">
|
||||
<a href="#">Followers</a>
|
||||
</div>
|
||||
<div class="col-xs-4 text-center">
|
||||
<a href="#">Sales</a>
|
||||
</div>
|
||||
<div class="col-xs-4 text-center">
|
||||
<a href="#">Friends</a>
|
||||
</div>
|
||||
</li>
|
||||
<!-- Menu Footer-->
|
||||
<li class="user-footer">
|
||||
<div class="pull-left">
|
||||
<a href="#" class="btn btn-default btn-flat">Profile</a>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a href="#" class="btn btn-default btn-flat">Sign out</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="wrapper row-offcanvas row-offcanvas-left">
|
||||
<!-- Left side column. contains the logo and sidebar -->
|
||||
<aside class="left-side sidebar-offcanvas">
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
<!-- Sidebar user panel -->
|
||||
<div class="user-panel">
|
||||
<div class="pull-left image">
|
||||
<img src="img/avatar3.png" class="img-circle" alt="User Image" />
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
<p>Hello, Jane</p>
|
||||
|
||||
<a href="#"><i class="fa fa-circle text-success"></i> Online</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- search form -->
|
||||
<form action="#" method="get" class="sidebar-form">
|
||||
<div class="input-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="Search..."/>
|
||||
<span class="input-group-btn">
|
||||
<button type='submit' name='seach' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
<!-- /.search form -->
|
||||
<!-- sidebar menu: : style can be found in sidebar.less -->
|
||||
<ul class="sidebar-menu">
|
||||
<li class="active">
|
||||
<a href="index.html">
|
||||
<i class="fa fa-dashboard"></i> <span>Dashboard</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="pages/widgets.html">
|
||||
<i class="fa fa-th"></i> <span>Widgets</span> <small class="badge pull-right bg-green">new</small>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-bar-chart-o"></i>
|
||||
<span>Charts</span>
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li><a href="pages/charts/morris.html"><i class="fa fa-angle-double-right"></i> Morris</a></li>
|
||||
<li><a href="pages/charts/flot.html"><i class="fa fa-angle-double-right"></i> Flot</a></li>
|
||||
<li><a href="pages/charts/inline.html"><i class="fa fa-angle-double-right"></i> Inline charts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-laptop"></i>
|
||||
<span>UI Elements</span>
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li><a href="pages/UI/general.html"><i class="fa fa-angle-double-right"></i> General</a></li>
|
||||
<li><a href="pages/UI/icons.html"><i class="fa fa-angle-double-right"></i> Icons</a></li>
|
||||
<li><a href="pages/UI/buttons.html"><i class="fa fa-angle-double-right"></i> Buttons</a></li>
|
||||
<li><a href="pages/UI/sliders.html"><i class="fa fa-angle-double-right"></i> Sliders</a></li>
|
||||
<li><a href="pages/UI/timeline.html"><i class="fa fa-angle-double-right"></i> Timeline</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-edit"></i> <span>Forms</span>
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li><a href="pages/forms/general.html"><i class="fa fa-angle-double-right"></i> General Elements</a></li>
|
||||
<li><a href="pages/forms/advanced.html"><i class="fa fa-angle-double-right"></i> Advanced Elements</a></li>
|
||||
<li><a href="pages/forms/editors.html"><i class="fa fa-angle-double-right"></i> Editors</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-table"></i> <span>Tables</span>
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li><a href="pages/tables/simple.html"><i class="fa fa-angle-double-right"></i> Simple tables</a></li>
|
||||
<li><a href="pages/tables/data.html"><i class="fa fa-angle-double-right"></i> Data tables</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="pages/calendar.html">
|
||||
<i class="fa fa-calendar"></i> <span>Calendar</span>
|
||||
<small class="badge pull-right bg-red">3</small>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="pages/mailbox.html">
|
||||
<i class="fa fa-envelope"></i> <span>Mailbox</span>
|
||||
<small class="badge pull-right bg-yellow">12</small>
|
||||
</a>
|
||||
</li>
|
||||
<li class="treeview">
|
||||
<a href="#">
|
||||
<i class="fa fa-folder"></i> <span>Examples</span>
|
||||
<i class="fa fa-angle-left pull-right"></i>
|
||||
</a>
|
||||
<ul class="treeview-menu">
|
||||
<li><a href="pages/examples/invoice.html"><i class="fa fa-angle-double-right"></i> Invoice</a></li>
|
||||
<li><a href="pages/examples/login.html"><i class="fa fa-angle-double-right"></i> Login</a></li>
|
||||
<li><a href="pages/examples/register.html"><i class="fa fa-angle-double-right"></i> Register</a></li>
|
||||
<li><a href="pages/examples/lockscreen.html"><i class="fa fa-angle-double-right"></i> Lockscreen</a></li>
|
||||
<li><a href="pages/examples/404.html"><i class="fa fa-angle-double-right"></i> 404 Error</a></li>
|
||||
<li><a href="pages/examples/500.html"><i class="fa fa-angle-double-right"></i> 500 Error</a></li>
|
||||
<li><a href="pages/examples/blank.html"><i class="fa fa-angle-double-right"></i> Blank Page</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<!-- /.sidebar -->
|
||||
</aside>
|
||||
|
||||
<!-- Right side column. Contains the navbar and content of the page -->
|
||||
<aside class="right-side">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Blank page
|
||||
<small>Control panel</small>
|
||||
</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
|
||||
<li class="active">Blank page</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<!-- Main content -->
|
||||
<section class="content">
|
||||
|
||||
|
||||
</section><!-- /.content -->
|
||||
</aside><!-- /.right-side -->
|
||||
</div><!-- ./wrapper -->
|
||||
|
||||
|
||||
<!-- jQuery 2.0.2 -->
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
|
||||
<!-- Bootstrap -->
|
||||
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="js/app.js" type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,41 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>AdminLTE - 404 Not Found</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- bootstrap 3.0.2 -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet" />
|
||||
<!-- font Awesome -->
|
||||
<link href="../css/font-awesome.min.css" rel="stylesheet" />
|
||||
<!-- Theme style -->
|
||||
<link href="../theme/theme.css" rel="stylesheet" />
|
||||
<!-- Google font Signika -->
|
||||
<link href='http://fonts.googleapis.com/css?family=Signika+Negative' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body class="bg-white">
|
||||
<div class="row-fluid">
|
||||
<div class="valign col-md-4 col-md-offset-4 col-sm-5 col-sm-offset-4 col-xs-12">
|
||||
<h1 class="text-center signika"><i class="fa fa-shield"></i> AdminLTE</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.col -->
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="col-md-4 col-md-offset-4 col-sm-5 col-sm-offset-4 col-xs-12">
|
||||
<h1 class="font-light-blue"><i class="fa fa-search"></i> 404 Oops!</h1>
|
||||
<h4>We are sorry about that! <br/><small>We don't seem to be able to find the page you requested.</small></h4>
|
||||
<form action="#" method="post">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon control"><i class="fa fa-search"></i></span>
|
||||
<input type="text" name="search" class="form-control" placeholder="Search for what you want..."/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-light-blue" type="button">Go!</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,42 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>AdminLTE - 500 Error</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- bootstrap 3.0.2 -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet" />
|
||||
<!-- font Awesome -->
|
||||
<link href="../css/font-awesome.min.css" rel="stylesheet" />
|
||||
<!-- Theme style -->
|
||||
<link href="../theme/theme.css" rel="stylesheet" />
|
||||
<!-- Google font Signika -->
|
||||
<link href='http://fonts.googleapis.com/css?family=Signika+Negative' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body class="bg-white">
|
||||
<div class="row-fluid">
|
||||
<div class="valign col-md-4 col-md-offset-4 col-sm-5 col-sm-offset-4 col-xs-12">
|
||||
<h1 class="text-center signika"><i class="fa fa-shield"></i> AdminLTE</h1>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="col-md-4 col-md-offset-4 col-sm-5 col-sm-offset-4 col-xs-12">
|
||||
<h1 class="font-light-blue"><i class="fa fa-wrench"></i> 500 Oops!</h1>
|
||||
<h4>This page is currently having problems!<br/>
|
||||
<small>We are working on it. We promise this won't happen again.</small></h4>
|
||||
<form action="#" method="post">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon control"><i class="fa fa-search"></i></span>
|
||||
<input type="text" name="search" class="form-control" placeholder="Try searching the website..."/>
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-light-blue" type="button">Go!</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,143 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>AdminLTE - Blank Page</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- bootstrap 3.0.2 -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet" />
|
||||
<!-- font Awesome -->
|
||||
<link href="../css/font-awesome.min.css" rel="stylesheet" />
|
||||
<!-- Theme style -->
|
||||
<link href="../theme/theme.css" rel="stylesheet" />
|
||||
<!-- Google font Signika -->
|
||||
<link href='http://fonts.googleapis.com/css?family=Signika+Negative' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-theme bg-blue navbar-static-top" role="navigation">
|
||||
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="../index.html"><span class="fa fa-shield"></span> AdminLTE</a>
|
||||
<a href="#" class='lte-menu-sm visible-xs navbar-brand'>
|
||||
<span class="fa fa-list"></span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-gears"></i></a>
|
||||
<ul class="dropdown-menu navbar-selector">
|
||||
<li role="presentation" class="dropdown-header font-primary noClick">Navbar Color</li>
|
||||
<li class="font-primary" data-color="bg-primary"><a href="#"><i class="fa fa-gear"></i> Primary</a></li>
|
||||
<li class="font-blue" data-color="bg-blue"><a href="#"><i class="fa fa-gear"></i> Blue <small class="text-muted">(default)</small></a></li>
|
||||
<li class="font-light-blue" data-color="bg-light-blue"><a href="#"><i class="fa fa-gear"></i> Light Blue</a></li>
|
||||
<li class="font-green" data-color="bg-green"><a href="#"><i class="fa fa-gear"></i> Green</a></li>
|
||||
<li class="font-yellow" data-color="bg-yellow"><a href="#"><i class="fa fa-gear"></i> Yellow</a></li>
|
||||
<li class="font-purple" data-color="bg-purple"><a href="#"><i class="fa fa-gear"></i> Purple</a></li>
|
||||
<li class="font-red" data-color="bg-red"><a href="#"><i class="fa fa-gear"></i> Red</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#"><i class="fa fa-bullhorn"></i></a></li>
|
||||
<li><a href="#"><i class="fa fa-envelope"></i></a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Friends</a></li>
|
||||
<li><a href="#">Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Privacy</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right">
|
||||
<div class="form-group">
|
||||
<input type="text" name="search" class="form-control" placeholder="..."/>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</nav>
|
||||
<div class="lte-main-content">
|
||||
<!-- side bar -->
|
||||
<div class="lte-sidebar col-md-2 col-sm-3 hidden-xs">
|
||||
<ul class="lte-sidebar-menu">
|
||||
<li><a href="../index.html"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-bar-chart-o"></i> Charts<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="../charts/flot.html"><i class="fa fa-bar-chart-o"></i> Flot</a></li>
|
||||
<li><a href="../charts/jqplot.html"><i class="fa fa-bar-chart-o"></i> JQplot</a></li>
|
||||
<li><a href="../charts/xcharts.html"><i class="fa fa-bar-chart-o"></i> xCharts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="../ui.html"><i class="fa fa-tint"></i> User Interface </a></li>
|
||||
<!--<li><a href="../widgets.html"><i class="fa fa-gear"></i> Widgets</a></li>-->
|
||||
<li class="lte-tree active">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Example Pages <i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="invoice.html"><i class="fa fa-money"></i> Invoice</a></li>
|
||||
<li><a href="login.html"><i class="fa fa-sign-in"></i> Login</a></li>
|
||||
<li><a href="register.html"><i class="fa fa-lock"></i> Register</a></li>
|
||||
<li class="active"><a href="blank_page.html"><i class="fa fa-paperclip"></i> Blank Page</a></li>
|
||||
<li><a href="404.html"><i class="fa fa-unlink"></i> 404 Error Page</a></li>
|
||||
<li><a href="500.html"><i class="fa fa-unlink"></i> 500 Error Page</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="../forms.html"><i class="fa fa-edit"></i> Forms</a></li>
|
||||
<li><a href="../typography.html"><i class="fa fa-text-width"></i> Typography</a></li>
|
||||
<li><a href="../calendar.html"><i class="fa fa-calendar"></i> Calendar</a></li>
|
||||
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Multilevel Dropdown<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 1<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 2<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="#"><i class="fa fa-pagelines"></i> Level 3</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<!-- /.side-bar-->
|
||||
|
||||
<div class="lte-main-container col-md-10 col-sm-9">
|
||||
<!-- main content -->
|
||||
<div class="page-header">
|
||||
<i class="fa fa-paperclip"></i> Blank Page <small>example page</small>
|
||||
</div>
|
||||
<!-- /.page-header -->
|
||||
<!-- CONTENT GOES HERE -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./.lte-main-content -->
|
||||
<footer>
|
||||
Copyright © 2013 - <a>Preview</a> - <a>Purchase</a> - Built with <a target="blank" href="http://getbootstrap.com">Bootstrap 3</a>
|
||||
</footer>
|
||||
|
||||
|
||||
<!-- JQuery 1.10.2 -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<!-- Bootstrap -->
|
||||
<script src="../js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<!-- LTE Tree -->
|
||||
<script src="../js/lteTree.js" type="text/javascript"></script>
|
||||
<!-- LTE App -->
|
||||
<script src="../js/lteApp.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,247 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>AdminLTE - Invoice Example</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- bootstrap 3.0.2 -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet" />
|
||||
<!-- font Awesome -->
|
||||
<link href="../css/font-awesome.min.css" rel="stylesheet" />
|
||||
<!-- Theme style -->
|
||||
<link href="../theme/theme.css" rel="stylesheet" />
|
||||
<!-- Google font Signika -->
|
||||
<link href='http://fonts.googleapis.com/css?family=Signika+Negative' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-theme bg-green navbar-static-top" role="navigation">
|
||||
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="index.html"><span class="fa fa-shield"></span> AdminLTE</a>
|
||||
<a href="#" class='lte-menu-sm visible-xs navbar-brand'>
|
||||
<span class="fa fa-list"></span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-gears"></i></a>
|
||||
<ul class="dropdown-menu navbar-selector">
|
||||
<li role="presentation" class="dropdown-header font-primary noClick">Navbar Color</li>
|
||||
<li class="font-primary" data-color="bg-primary"><a href="#"><i class="fa fa-gear"></i> Primary</a></li>
|
||||
<li class="font-blue" data-color="bg-blue"><a href="#"><i class="fa fa-gear"></i> Blue <small class="text-muted">(default)</small></a></li>
|
||||
<li class="font-light-blue" data-color="bg-light-blue"><a href="#"><i class="fa fa-gear"></i> Light Blue</a></li>
|
||||
<li class="font-green" data-color="bg-green"><a href="#"><i class="fa fa-gear"></i> Green</a></li>
|
||||
<li class="font-yellow" data-color="bg-yellow"><a href="#"><i class="fa fa-gear"></i> Yellow</a></li>
|
||||
<li class="font-purple" data-color="bg-purple"><a href="#"><i class="fa fa-gear"></i> Purple</a></li>
|
||||
<li class="font-red" data-color="bg-red"><a href="#"><i class="fa fa-gear"></i> Red</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#"><i class="fa fa-bullhorn"></i></a></li>
|
||||
<li><a href="#"><i class="fa fa-envelope"></i></a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Friends</a></li>
|
||||
<li><a href="#">Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Privacy</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right">
|
||||
<div class="form-group">
|
||||
<input type="text" name="search" class="form-control" placeholder="..."/>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</nav>
|
||||
<div class="lte-main-content">
|
||||
<!-- side bar -->
|
||||
<div class="lte-sidebar col-md-2 col-sm-3 hidden-xs">
|
||||
<ul class="lte-sidebar-menu">
|
||||
<li><a href="../index.html"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-bar-chart-o"></i> Charts<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="../charts/flot.html"><i class="fa fa-bar-chart-o"></i> Flot</a></li>
|
||||
<li><a href="../charts/jqplot.html"><i class="fa fa-bar-chart-o"></i> JQplot</a></li>
|
||||
<li><a href="../charts/xcharts.html"><i class="fa fa-bar-chart-o"></i> xCharts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="../ui.html"><i class="fa fa-tint"></i> User Interface </a></li>
|
||||
<!--<li><a href="../widgets.html"><i class="fa fa-gear"></i> Widgets</a></li>-->
|
||||
<li class="lte-tree active">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Example Pages <i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="active"><a href="invoice.html"><i class="fa fa-money"></i> Invoice</a></li>
|
||||
<li><a href="login.html"><i class="fa fa-sign-in"></i> Login</a></li>
|
||||
<li><a href="register.html"><i class="fa fa-lock"></i> Register</a></li>
|
||||
<li><a href="blank_page.html"><i class="fa fa-paperclip"></i> Blank Page</a></li>
|
||||
<li><a href="404.html"><i class="fa fa-unlink"></i> 404 Error Page</a></li>
|
||||
<li><a href="500.html"><i class="fa fa-unlink"></i> 500 Error Page</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="../forms.html"><i class="fa fa-edit"></i> Forms</a></li>
|
||||
<li><a href="../typography.html"><i class="fa fa-text-width"></i> Typography</a></li>
|
||||
<li><a href="../calendar.html"><i class="fa fa-calendar"></i> Calendar</a></li>
|
||||
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Multilevel Dropdown<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 1<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 2<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="#"><i class="fa fa-pagelines"></i> Level 3</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /.side-bar-->
|
||||
|
||||
<div class="lte-main-container col-md-10 col-sm-9">
|
||||
<!-- main content -->
|
||||
<div class="page-header">
|
||||
<i class="fa fa-money"></i> Invoice <small>#001300</small>
|
||||
<div class="pull-right">
|
||||
<button class="btn btn-default noPrint" id="print-btn"><i class="fa fa-print"></i> Print</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.page-header -->
|
||||
<div class="lte-dashboard">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="box box-default box-fixed-height">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><i class="fa fa-globe text-muted"></i> FROM</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<strong>John Doe</strong><br />
|
||||
123 Jump St.<br />
|
||||
Silicon Valley, CA<br />
|
||||
United States of America<br />
|
||||
Email: johndoe@email.com<br />
|
||||
Phone: (555)321-1234
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="box box-default box-fixed-height">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title"><i class="fa fa-globe text-muted"></i> TO</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<strong>John Doe</strong><br />
|
||||
123 Jump St.<br />
|
||||
Silicon Valley, CA<br />
|
||||
United States of America<br />
|
||||
Email: johndoe@email.com<br />
|
||||
Phone: (555)321-1234
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="box box-default box-fixed-height">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">INVOICE</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<h3>#001300</h3>
|
||||
<strong>Date:</strong> 12-12-2013<br/>
|
||||
<strong>Account:</strong> 6678-1194-3449-0998
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- row -->
|
||||
<div class="row">
|
||||
<div class="col-xs-12 table-responsive">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Item</th>
|
||||
<th>Quantity</th>
|
||||
<th>Unit Price</th>
|
||||
<th>Total</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>1</td>
|
||||
<td>Glasses</td>
|
||||
<td>3</td>
|
||||
<td>$100</td>
|
||||
<td>$300</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>2</td>
|
||||
<td>Mirror</td>
|
||||
<td>2</td>
|
||||
<td>$10</td>
|
||||
<td>$20</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>3</td>
|
||||
<td>Laptop</td>
|
||||
<td>3</td>
|
||||
<td>$2,000</td>
|
||||
<td>$6,000</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>4</td>
|
||||
<td>Cups</td>
|
||||
<td>13</td>
|
||||
<td>$10.50</td>
|
||||
<td>$136.50</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><!-- /.col -->
|
||||
<div class="col-xs-12">
|
||||
<div class="line"></div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<h3 class="text-right">Total: $6,456.50</h3>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div><!-- /.lte-dashboard -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./.lte-main-content -->
|
||||
<footer>
|
||||
Copyright © 2013 - <a>Preview</a> - <a>Purchase</a> - Built with <a target="blank" href="http://getbootstrap.com">Bootstrap 3</a>
|
||||
</footer>
|
||||
|
||||
|
||||
<!-- JQuery 1.10.2 -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<!-- Bootstrap -->
|
||||
<script src="../js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<!-- LTE Tree -->
|
||||
<script src="../js/lteTree.js" type="text/javascript"></script>
|
||||
<!-- LTE App -->
|
||||
<script src="../js/lteApp.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#print-btn").click(function(e) {
|
||||
e.preventDefault();
|
||||
window.print();
|
||||
});
|
||||
});
|
||||
current_nav_color = "bg-green";
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,62 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="bg-primary">
|
||||
<head>
|
||||
<title>AdminLTE - Login</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- bootstrap 3.0.2 -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet" />
|
||||
<!-- font Awesome -->
|
||||
<link href="../css/font-awesome.min.css" rel="stylesheet" />
|
||||
<!-- Theme style -->
|
||||
<link href="../theme/theme.css" rel="stylesheet" />
|
||||
<!-- Google font Signika -->
|
||||
<link href='http://fonts.googleapis.com/css?family=Signika+Negative' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body class="bg-primary">
|
||||
<div class="row-fluid">
|
||||
<div class="valign col-md-4 col-md-offset-4 col-sm-5 col-sm-offset-4 col-xs-12">
|
||||
<h1 class="text-center signika"><i class="fa fa-shield"></i> AdminLTE</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="col-md-4 col-md-offset-4 col-sm-5 col-sm-offset-4 col-xs-12">
|
||||
<div class="box box-light-blue">
|
||||
<div class="box-header">
|
||||
<div class="box-title signika">
|
||||
<b>Login to your account</b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body bg-white">
|
||||
<form action="#" method="post">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon control"><i class="fa fa-user"></i></span>
|
||||
<input type="text" name="username" class="form-control" placeholder="Email or Username"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon control"><i class="fa fa-lock"></i></span>
|
||||
<input type="password" name="password" class="form-control" placeholder="Password"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="checkbox" name="remember"/> Remember me
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn-block btn btn-light-blue">Login</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<p>
|
||||
<a href="#">Forgot your password?</a>
|
||||
</p>
|
||||
</div><!-- /.box-body -->
|
||||
</div><!-- /.box -->
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
|
||||
<div class="clearfix"></div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,69 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="bg-primary">
|
||||
<head>
|
||||
<title>AdminLTE - Register</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- bootstrap 3.0.2 -->
|
||||
<link href="../css/bootstrap.min.css" rel="stylesheet" />
|
||||
<!-- font Awesome -->
|
||||
<link href="../css/font-awesome.min.css" rel="stylesheet" />
|
||||
<!-- Theme style -->
|
||||
<link href="../theme/theme.css" rel="stylesheet" />
|
||||
<!-- Google font Signika -->
|
||||
<link href='http://fonts.googleapis.com/css?family=Signika+Negative' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body class="bg-primary">
|
||||
<div class="row-fluid">
|
||||
<div class="valign col-md-4 col-md-offset-4 col-sm-5 col-sm-offset-4 col-xs-12">
|
||||
<h1 class="text-center signika"><i class="fa fa-shield"></i> AdminLTE</h1>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="col-md-4 col-md-offset-4 col-sm-5 col-sm-offset-4 col-xs-12">
|
||||
<div class="box box-light-blue">
|
||||
<div class="box-header">
|
||||
<div class="box-title signika">
|
||||
<b>Register New Account</b>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body bg-white">
|
||||
<form action="#" method="post">
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon control"><i class="fa fa-user"></i></span>
|
||||
<input type="text" name="username" class="form-control" placeholder="Username"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon control"><i class="fa fa-envelope"></i></span>
|
||||
<input type="text" name="email" class="form-control" placeholder="Email"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon control"><i class="fa fa-lock"></i></span>
|
||||
<input type="password" name="password" class="form-control" placeholder="Password"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon control"><i class="fa fa-lock"></i></span>
|
||||
<input type="password" name="rePassword" class="form-control" placeholder="Retype Password"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="checkbox" name="remember"/> Log me in when registration is complete
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn-block btn btn-light-blue">Register</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
BIN
fonts/ionicons.eot
Normal file
1623
fonts/ionicons.svg
Normal file
|
After Width: | Height: | Size: 231 KiB |
BIN
fonts/ionicons.ttf
Normal file
BIN
fonts/ionicons.woff
Normal file
372
forms.html
@@ -1,372 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>AdminLTE - Forms</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
|
||||
<!-- bootstrap 3.0.2 -->
|
||||
<link href="css/bootstrap.min.css" rel="stylesheet" />
|
||||
<!-- font Awesome -->
|
||||
<link href="css/font-awesome.min.css" rel="stylesheet" />
|
||||
<!-- Theme style -->
|
||||
<link href="theme/theme.css" rel="stylesheet" />
|
||||
<!-- wysihtml5 stylesheet -->
|
||||
<link href="css/bootstrap3-wysihtml5.min.css" rel="stylesheet"/>
|
||||
<!-- Bootstrap Switch stylesheet -->
|
||||
<link href="css/bootstrap-switch.css" rel="stylesheet"/>
|
||||
<!-- Date Range Picker stylesheet -->
|
||||
<link href="css/daterangepicker-bs3.css" rel="stylesheet"/>
|
||||
<!-- Date Time Picker Stylesheet -->
|
||||
<link href="css/bootstrap-timepicker.min.css" rel="stylesheet"/>
|
||||
<!-- Date Time Picker Stylesheet -->
|
||||
<link href="css/bootstrap-colorpicker.min.css" rel="stylesheet"/>
|
||||
<!-- Google font Signika -->
|
||||
<link href='http://fonts.googleapis.com/css?family=Signika+Negative' rel='stylesheet' type='text/css'>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar navbar-theme bg-yellow navbar-static-top" role="navigation">
|
||||
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="#"><span class="fa fa-shield"></span> AdminLTE</a>
|
||||
<a href="#" class='lte-menu-sm visible-xs navbar-brand'>
|
||||
<span class="fa fa-list"></span>
|
||||
</a>
|
||||
</div>
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-gears"></i></a>
|
||||
<ul class="dropdown-menu navbar-selector">
|
||||
<li role="presentation" class="dropdown-header font-primary noClick">Navbar Color</li>
|
||||
<li class="font-primary" data-color="bg-primary"><a href="#"><i class="fa fa-gear"></i> Primary</a></li>
|
||||
<li class="font-blue" data-color="bg-blue"><a href="#"><i class="fa fa-gear"></i> Blue <small class="text-muted">(default)</small></a></li>
|
||||
<li class="font-light-blue" data-color="bg-light-blue"><a href="#"><i class="fa fa-gear"></i> Light Blue</a></li>
|
||||
<li class="font-green" data-color="bg-green"><a href="#"><i class="fa fa-gear"></i> Green</a></li>
|
||||
<li class="font-yellow" data-color="bg-yellow"><a href="#"><i class="fa fa-gear"></i> Yellow</a></li>
|
||||
<li class="font-purple" data-color="bg-purple"><a href="#"><i class="fa fa-gear"></i> Purple</a></li>
|
||||
<li class="font-red" data-color="bg-red"><a href="#"><i class="fa fa-gear"></i> Red</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#"><i class="fa fa-bullhorn"></i></a></li>
|
||||
<li><a href="#"><i class="fa fa-envelope"></i></a></li>
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Profile</a></li>
|
||||
<li><a href="#">Friends</a></li>
|
||||
<li><a href="#">Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="#">Privacy</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="navbar-form navbar-right">
|
||||
<div class="form-group">
|
||||
<input type="text" name="search" class="form-control" placeholder="..."/>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- /.navbar-collapse -->
|
||||
</nav>
|
||||
<div class="lte-main-content">
|
||||
<!-- side bar -->
|
||||
<div class="lte-sidebar col-md-2 col-sm-3 hidden-xs">
|
||||
<ul class="lte-sidebar-menu">
|
||||
<li><a href="index.html"><i class="fa fa-dashboard"></i> Dashboard</a></li>
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-bar-chart-o"></i> Charts<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="charts/flot.html"><i class="fa fa-bar-chart-o"></i> Flot</a></li>
|
||||
<li><a href="charts/jqplot.html"><i class="fa fa-bar-chart-o"></i> JQplot</a></li>
|
||||
<li><a href="charts/xcharts.html"><i class="fa fa-bar-chart-o"></i> xCharts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="ui.html"><i class="fa fa-tint"></i> User Interface </a></li>
|
||||
<!--<li><a href="widgets.html"><i class="fa fa-gear"></i> Widgets</a></li>-->
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Example Pages <i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="examples/invoice.html"><i class="fa fa-money"></i> Invoice</a></li>
|
||||
<li><a href="examples/login.html"><i class="fa fa-sign-in"></i> Login</a></li>
|
||||
<li><a href="examples/register.html"><i class="fa fa-lock"></i> Register</a></li>
|
||||
<li><a href="examples/blank_page.html"><i class="fa fa-paperclip"></i> Blank Page</a></li>
|
||||
<li><a href="examples/404.html"><i class="fa fa-unlink"></i> 404 Error Page</a></li>
|
||||
<li><a href="examples/500.html"><i class="fa fa-unlink"></i> 500 Error Page</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="active"><a href="forms.html"><i class="fa fa-edit"></i> Forms</a></li>
|
||||
<li><a href="typography.html"><i class="fa fa-text-width"></i> Typography</a></li>
|
||||
<li><a href="calendar.html"><i class="fa fa-calendar"></i> Calendar</a></li>
|
||||
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Multilevel Dropdown<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 1<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li class="lte-tree">
|
||||
<a href="#"><i class="fa fa-pagelines"></i> Level 2<i class="pull-right fa fa-angle-right"></i></a>
|
||||
<ul class="lte-tree-menu">
|
||||
<li><a href="#"><i class="fa fa-pagelines"></i> Level 3</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<!-- /.side-bar-->
|
||||
|
||||
<div class="lte-main-container col-md-10 col-sm-9">
|
||||
<!-- main content -->
|
||||
<div class="page-header">
|
||||
<i class="fa fa-edit"></i> Forms
|
||||
</div>
|
||||
<!-- /.page-header -->
|
||||
<div class="lte-dashboard">
|
||||
<div class="row">
|
||||
<div class='col-xs-12'>
|
||||
<div class='box box-yellow'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-edit"></i> WYSISWYG</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<textarea class="textarea" placeholder="Enter text ..." style="width: 100%; height: 300px; font-size: 14px; line-height: 18px; border: 1px solid #ddd;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
<div class="row">
|
||||
<div class='col-xs-12'>
|
||||
<div class='box box-yellow'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-edit"></i> Elements</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body'>
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label class="control-label">Date Range Picker Button</label>
|
||||
<div class="input-group">
|
||||
<button id="reportrange" class='btn btn-default'>
|
||||
<i class="fa fa-calendar"></i>
|
||||
<span>Date Range Picker</span> <b class="caret"></b>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- date picker input -->
|
||||
<div class="form-group">
|
||||
<label class="control-label">Date Range Picker Input</label>
|
||||
<div class="row">
|
||||
<div class="input-group col-sm-4">
|
||||
<span class="input-group-addon control"><i class="fa fa-calendar"></i></span>
|
||||
<input type="text" name="date" class="form-control" id="reservation" placeholder="Pick a date"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- time picker input -->
|
||||
<div class="form-group">
|
||||
<label class="control-label">Time Picker Input</label>
|
||||
<div class="row">
|
||||
<div class="input-group col-sm-4 bootstrap-timepicker">
|
||||
<span class="input-group-addon control"><i class="fa fa-clock-o"></i></span>
|
||||
<input type="text" name="time" class="form-control" id="timepicker1"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- color picker input -->
|
||||
<div class="form-group">
|
||||
<label class="control-label">Color Picker Input</label>
|
||||
<div class="row">
|
||||
<div class="input-group col-sm-4 bootstrap-timepicker">
|
||||
<span class="input-group-addon control"><i class="fa fa-tint"></i></span>
|
||||
<input type="text" name="color" class="form-control" id="colorPicker"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.row-->
|
||||
<div class="row">
|
||||
<div class='col-xs-12'>
|
||||
<div class='box box-yellow'>
|
||||
<div class='box-header'>
|
||||
<h3 class="box-title"><i class="fa fa-edit"></i> Switch</h3>
|
||||
<div class="box-tools">
|
||||
<i class="fa fa-gear"></i>
|
||||
<i class="fa fa-angle-down lte-hider"></i>
|
||||
<i class="off fa fa-times"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class='box-body table-responsive'>
|
||||
<h4>Sizes:</h4>
|
||||
<table class='table'>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="make-switch switch-large">
|
||||
<input type="checkbox" checked>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="make-switch">
|
||||
<input type="checkbox" checked>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="make-switch switch-small">
|
||||
<input type="checkbox" checked>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="make-switch switch-mini">
|
||||
<input type="checkbox" checked>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<div id="dimension-switch" class="make-switch">
|
||||
<input type="checkbox" checked>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h4>Colors:</h4>
|
||||
<table class='table'>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="make-switch" data-on="primary" data-off="info">
|
||||
<input type="checkbox" checked>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="make-switch" data-on="info" data-off="success">
|
||||
<input type="checkbox" checked>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="make-switch" data-on="success" data-off="warning">
|
||||
<input type="checkbox" checked>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="make-switch" data-on="warning" data-off="danger">
|
||||
<input type="checkbox" checked>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="make-switch" data-on="danger" data-off="default">
|
||||
<input type="checkbox" checked>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<div class="make-switch" data-on="default" data-off="primary">
|
||||
<input type="checkbox" checked>
|
||||
</div>
|
||||
</td>
|
||||
</table>
|
||||
<h4>Disabled:</h4>
|
||||
<table class='table'>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="make-switch">
|
||||
<input type="checkbox" checked disabled>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.row-->
|
||||
</div><!-- /.lte-dashboard -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- ./.lte-main-content -->
|
||||
<footer>
|
||||
Copyright © 2013 - <a>Preview</a> - <a>Purchase</a> - Built with <a target="blank" href="http://getbootstrap.com">Bootstrap 3</a>
|
||||
</footer>
|
||||
|
||||
|
||||
<!-- JQuery 1.10.2 -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
||||
<!-- Bootstrap -->
|
||||
<script src="js/bootstrap.min.js" type="text/javascript"></script>
|
||||
<!-- LTE Tree -->
|
||||
<script src="js/lteTree.js" type="text/javascript"></script>
|
||||
<!-- LTE App -->
|
||||
<script src="js/lteApp.js" type="text/javascript"></script>
|
||||
<!-- bootstrap WYSIWYG -->
|
||||
<script src="js/wysiwyg/bootstrap3-wysihtml5.all.min.js"></script>
|
||||
<!-- bootstrap Switch -->
|
||||
<script src="js/bootstrap-switch.js" type="text/javascript"></script>
|
||||
<!-- bootstrap Moment -->
|
||||
<script src="js/moment.js" type="text/javascript"></script>
|
||||
<!-- bootstrap Date Range Picker -->
|
||||
<script src="js/daterangepicker.js" type="text/javascript"></script>
|
||||
<!-- bootstrap time picker -->
|
||||
<script src="js/bootstrap-timepicker.js" type="text/javascript"></script>
|
||||
<!-- bootstrap color picker -->
|
||||
<script src="js/bootstrap-colorpicker.min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
//wysiwyg
|
||||
$('.textarea').wysihtml5();
|
||||
|
||||
//date picker
|
||||
$('#reportrange').daterangepicker(
|
||||
{
|
||||
ranges: {
|
||||
'Today': [moment(), moment()],
|
||||
'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],
|
||||
'Last 7 Days': [moment().subtract('days', 6), moment()],
|
||||
'Last 30 Days': [moment().subtract('days', 29), moment()],
|
||||
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
||||
'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
|
||||
},
|
||||
startDate: moment().subtract('days', 29),
|
||||
endDate: moment()
|
||||
},
|
||||
function(start, end) {
|
||||
$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
|
||||
}
|
||||
);
|
||||
|
||||
$('#reservation').daterangepicker();
|
||||
|
||||
//Time Picker
|
||||
$('#timepicker1').timepicker();
|
||||
|
||||
//Color Picker
|
||||
$('#colorPicker').colorpicker();
|
||||
});
|
||||
current_nav_color = "bg-yellow";
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
BIN
img/.DS_Store
vendored
Normal file
BIN
img/ajax-loader.gif
Normal file
|
After Width: | Height: | Size: 7.2 KiB |
BIN
img/ajax-loader1.gif
Normal file
|
After Width: | Height: | Size: 8.0 KiB |
BIN
img/avatar.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
img/avatar04.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
img/avatar2.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
img/avatar3.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
img/avatar5.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
img/blur-background04.jpg
Normal file
|
After Width: | Height: | Size: 393 KiB |
BIN
img/blur-background08.jpg
Normal file
|
After Width: | Height: | Size: 369 KiB |
BIN
img/blur-background09.jpg
Normal file
|
After Width: | Height: | Size: 382 KiB |
BIN
img/credit/american-express.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
img/credit/cirrus.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
img/credit/mastercard.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
img/credit/mestro.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
img/credit/paypal.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
img/credit/paypal2.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
img/credit/visa.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
img/icons.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
img/sprite-skin-flat.png
Normal file
|
After Width: | Height: | Size: 352 B |
BIN
img/sprite-skin-nice.png
Normal file
|
After Width: | Height: | Size: 1022 B |
BIN
img/user-bg.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
img/user.jpg
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
img/user2.jpg
Normal file
|
After Width: | Height: | Size: 23 KiB |
1636
index.html
949
js/bootstrap-colorpicker.js
vendored
@@ -1,949 +0,0 @@
|
||||
/*!
|
||||
* Bootstrap Colorpicker
|
||||
* http://mjolnic.github.io/bootstrap-colorpicker/
|
||||
*
|
||||
* Originally written by (c) 2012 Stefan Petre
|
||||
* Licensed under the Apache License v2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0.txt
|
||||
*
|
||||
* @todo Update DOCS
|
||||
*/
|
||||
(function($) {
|
||||
'use strict';
|
||||
|
||||
// Color object
|
||||
var Color = function(val) {
|
||||
this.value = {
|
||||
h: 0,
|
||||
s: 0,
|
||||
b: 0,
|
||||
a: 1
|
||||
};
|
||||
this.origFormat = null; // original string format
|
||||
if (val) {
|
||||
if (val.toLowerCase !== undefined) {
|
||||
this.setColor(val);
|
||||
} else if (val.h !== undefined) {
|
||||
this.value = val;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Color.prototype = {
|
||||
constructor: Color,
|
||||
_sanitizeNumber: function(val) {
|
||||
if (typeof val === 'number') {
|
||||
return val;
|
||||
}
|
||||
if (isNaN(val) || (val === null) || (val === '') || (val === undefined)) {
|
||||
return 1;
|
||||
}
|
||||
if (val.toLowerCase !== undefined) {
|
||||
return parseFloat(val);
|
||||
}
|
||||
return 1;
|
||||
},
|
||||
//parse a string to HSB
|
||||
setColor: function(strVal) {
|
||||
strVal = strVal.toLowerCase();
|
||||
this.value = this.stringToHSB(strVal) || {
|
||||
h: 0,
|
||||
s: 0,
|
||||
b: 0,
|
||||
a: 1
|
||||
};
|
||||
},
|
||||
stringToHSB: function(strVal) {
|
||||
strVal = strVal.toLowerCase();
|
||||
var that = this,
|
||||
result = false;
|
||||
$.each(this.stringParsers, function(i, parser) {
|
||||
var match = parser.re.exec(strVal),
|
||||
values = match && parser.parse.apply(that, [match]),
|
||||
format = parser.format || 'rgba';
|
||||
if (values) {
|
||||
if (format.match(/hsla?/)) {
|
||||
result = that.RGBtoHSB.apply(that, that.HSLtoRGB.apply(that, values));
|
||||
} else {
|
||||
result = that.RGBtoHSB.apply(that, values);
|
||||
}
|
||||
that.origFormat = format;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
return result;
|
||||
},
|
||||
setHue: function(h) {
|
||||
this.value.h = 1 - h;
|
||||
},
|
||||
setSaturation: function(s) {
|
||||
this.value.s = s;
|
||||
},
|
||||
setBrightness: function(b) {
|
||||
this.value.b = 1 - b;
|
||||
},
|
||||
setAlpha: function(a) {
|
||||
this.value.a = parseInt((1 - a) * 100, 10) / 100;
|
||||
},
|
||||
toRGB: function(h, s, v, a) {
|
||||
h = h || this.value.h;
|
||||
s = s || this.value.s;
|
||||
v = v || this.value.b;
|
||||
a = a || this.value.a;
|
||||
|
||||
var r, g, b, i, f, p, q, t;
|
||||
if (h && s === undefined && v === undefined) {
|
||||
s = h.s, v = h.v, h = h.h;
|
||||
}
|
||||
i = Math.floor(h * 6);
|
||||
f = h * 6 - i;
|
||||
p = v * (1 - s);
|
||||
q = v * (1 - f * s);
|
||||
t = v * (1 - (1 - f) * s);
|
||||
switch (i % 6) {
|
||||
case 0:
|
||||
r = v, g = t, b = p;
|
||||
break;
|
||||
case 1:
|
||||
r = q, g = v, b = p;
|
||||
break;
|
||||
case 2:
|
||||
r = p, g = v, b = t;
|
||||
break;
|
||||
case 3:
|
||||
r = p, g = q, b = v;
|
||||
break;
|
||||
case 4:
|
||||
r = t, g = p, b = v;
|
||||
break;
|
||||
case 5:
|
||||
r = v, g = p, b = q;
|
||||
break;
|
||||
}
|
||||
return {
|
||||
r: Math.floor(r * 255),
|
||||
g: Math.floor(g * 255),
|
||||
b: Math.floor(b * 255),
|
||||
a: a
|
||||
};
|
||||
},
|
||||
toHex: function(h, s, b, a) {
|
||||
var rgb = this.toRGB(h, s, b, a);
|
||||
return '#' + ((1 << 24) | (parseInt(rgb.r) << 16) | (parseInt(rgb.g) << 8) | parseInt(rgb.b)).toString(16).substr(1);
|
||||
},
|
||||
toHSL: function(h, s, b, a) {
|
||||
h = h || this.value.h;
|
||||
s = s || this.value.s;
|
||||
b = b || this.value.b;
|
||||
a = a || this.value.a;
|
||||
|
||||
var H = h,
|
||||
L = (2 - s) * b,
|
||||
S = s * b;
|
||||
if (L > 0 && L <= 1) {
|
||||
S /= L;
|
||||
} else {
|
||||
S /= 2 - L;
|
||||
}
|
||||
L /= 2;
|
||||
if (S > 1) {
|
||||
S = 1;
|
||||
}
|
||||
return {
|
||||
h: H,
|
||||
s: S,
|
||||
l: L,
|
||||
a: a
|
||||
};
|
||||
},
|
||||
RGBtoHSB: function(r, g, b, a) {
|
||||
r /= 255;
|
||||
g /= 255;
|
||||
b /= 255;
|
||||
|
||||
var H, S, V, C;
|
||||
V = Math.max(r, g, b);
|
||||
C = V - Math.min(r, g, b);
|
||||
H = (C === 0 ? null :
|
||||
V === r ? (g - b) / C :
|
||||
V === g ? (b - r) / C + 2 :
|
||||
(r - g) / C + 4
|
||||
);
|
||||
H = ((H + 360) % 6) * 60 / 360;
|
||||
S = C === 0 ? 0 : C / V;
|
||||
return {
|
||||
h: this._sanitizeNumber(H),
|
||||
s: S,
|
||||
b: V,
|
||||
a: this._sanitizeNumber(a)
|
||||
};
|
||||
},
|
||||
HueToRGB: function(p, q, h) {
|
||||
if (h < 0) {
|
||||
h += 1;
|
||||
} else if (h > 1) {
|
||||
h -= 1;
|
||||
}
|
||||
if ((h * 6) < 1) {
|
||||
return p + (q - p) * h * 6;
|
||||
} else if ((h * 2) < 1) {
|
||||
return q;
|
||||
} else if ((h * 3) < 2) {
|
||||
return p + (q - p) * ((2 / 3) - h) * 6;
|
||||
} else {
|
||||
return p;
|
||||
}
|
||||
},
|
||||
HSLtoRGB: function(h, s, l, a) {
|
||||
if (s < 0) {
|
||||
s = 0;
|
||||
}
|
||||
var q;
|
||||
if (l <= 0.5) {
|
||||
q = l * (1 + s);
|
||||
} else {
|
||||
q = l + s - (l * s);
|
||||
}
|
||||
|
||||
var p = 2 * l - q;
|
||||
|
||||
var tr = h + (1 / 3);
|
||||
var tg = h;
|
||||
var tb = h - (1 / 3);
|
||||
|
||||
var r = Math.round(this.HueToRGB(p, q, tr) * 255);
|
||||
var g = Math.round(this.HueToRGB(p, q, tg) * 255);
|
||||
var b = Math.round(this.HueToRGB(p, q, tb) * 255);
|
||||
return [r, g, b, this._sanitizeNumber(a)];
|
||||
},
|
||||
toString: function(format) {
|
||||
format = format || 'rgba';
|
||||
switch (format) {
|
||||
case 'rgb':
|
||||
{
|
||||
var rgb = this.toRGB();
|
||||
return 'rgb(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ')';
|
||||
}
|
||||
break;
|
||||
case 'rgba':
|
||||
{
|
||||
var rgb = this.toRGB();
|
||||
return 'rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ',' + rgb.a + ')';
|
||||
}
|
||||
break;
|
||||
case 'hsl':
|
||||
{
|
||||
var hsl = this.toHSL();
|
||||
return 'hsl(' + Math.round(hsl.h * 360) + ',' + Math.round(hsl.s * 100) + '%,' + Math.round(hsl.l * 100) + '%)';
|
||||
}
|
||||
break;
|
||||
case 'hsla':
|
||||
{
|
||||
var hsl = this.toHSL();
|
||||
return 'hsla(' + Math.round(hsl.h * 360) + ',' + Math.round(hsl.s * 100) + '%,' + Math.round(hsl.l * 100) + '%,' + hsl.a + ')';
|
||||
}
|
||||
break;
|
||||
case 'hex':
|
||||
{
|
||||
return this.toHex();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
// a set of RE's that can match strings and generate color tuples.
|
||||
// from John Resig color plugin
|
||||
// https://github.com/jquery/jquery-color/
|
||||
stringParsers: [{
|
||||
re: /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,
|
||||
format: 'hex',
|
||||
parse: function(execResult) {
|
||||
return [
|
||||
parseInt(execResult[1], 16),
|
||||
parseInt(execResult[2], 16),
|
||||
parseInt(execResult[3], 16),
|
||||
1
|
||||
];
|
||||
}
|
||||
}, {
|
||||
re: /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,
|
||||
format: 'hex',
|
||||
parse: function(execResult) {
|
||||
return [
|
||||
parseInt(execResult[1] + execResult[1], 16),
|
||||
parseInt(execResult[2] + execResult[2], 16),
|
||||
parseInt(execResult[3] + execResult[3], 16),
|
||||
1
|
||||
];
|
||||
}
|
||||
}, {
|
||||
re: /rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,
|
||||
format: 'rgb',
|
||||
parse: function(execResult) {
|
||||
return [
|
||||
execResult[1],
|
||||
execResult[2],
|
||||
execResult[3],
|
||||
1
|
||||
];
|
||||
}
|
||||
}, {
|
||||
re: /rgb\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,
|
||||
format: 'rgb',
|
||||
parse: function(execResult) {
|
||||
return [
|
||||
2.55 * execResult[1],
|
||||
2.55 * execResult[2],
|
||||
2.55 * execResult[3],
|
||||
1
|
||||
];
|
||||
}
|
||||
}, {
|
||||
re: /rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
|
||||
format: 'rgba',
|
||||
parse: function(execResult) {
|
||||
return [
|
||||
execResult[1],
|
||||
execResult[2],
|
||||
execResult[3],
|
||||
execResult[4]
|
||||
];
|
||||
}
|
||||
}, {
|
||||
re: /rgba\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
|
||||
format: 'rgba',
|
||||
parse: function(execResult) {
|
||||
return [
|
||||
2.55 * execResult[1],
|
||||
2.55 * execResult[2],
|
||||
2.55 * execResult[3],
|
||||
execResult[4]
|
||||
];
|
||||
}
|
||||
}, {
|
||||
re: /hsl\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*?\)/,
|
||||
format: 'hsl',
|
||||
parse: function(execResult) {
|
||||
return [
|
||||
execResult[1] / 360,
|
||||
execResult[2] / 100,
|
||||
execResult[3] / 100,
|
||||
execResult[4]
|
||||
];
|
||||
}
|
||||
}, {
|
||||
re: /hsla\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
|
||||
format: 'hsla',
|
||||
parse: function(execResult) {
|
||||
return [
|
||||
execResult[1] / 360,
|
||||
execResult[2] / 100,
|
||||
execResult[3] / 100,
|
||||
execResult[4]
|
||||
];
|
||||
}
|
||||
}, {
|
||||
//predefined color name
|
||||
re: /^([a-z]{3,})$/,
|
||||
format: 'alias',
|
||||
parse: function(execResult) {
|
||||
var hexval = this.colorNameToHex(execResult[0]) || '#000000';
|
||||
var match = this.stringParsers[0].re.exec(hexval),
|
||||
values = match && this.stringParsers[0].parse.apply(this, [match]);
|
||||
return values;
|
||||
}
|
||||
}],
|
||||
colorNameToHex: function(name) {
|
||||
// 140 predefined colors from the HTML Colors spec
|
||||
var colors = {
|
||||
"aliceblue": "#f0f8ff",
|
||||
"antiquewhite": "#faebd7",
|
||||
"aqua": "#00ffff",
|
||||
"aquamarine": "#7fffd4",
|
||||
"azure": "#f0ffff",
|
||||
"beige": "#f5f5dc",
|
||||
"bisque": "#ffe4c4",
|
||||
"black": "#000000",
|
||||
"blanchedalmond": "#ffebcd",
|
||||
"blue": "#0000ff",
|
||||
"blueviolet": "#8a2be2",
|
||||
"brown": "#a52a2a",
|
||||
"burlywood": "#deb887",
|
||||
"cadetblue": "#5f9ea0",
|
||||
"chartreuse": "#7fff00",
|
||||
"chocolate": "#d2691e",
|
||||
"coral": "#ff7f50",
|
||||
"cornflowerblue": "#6495ed",
|
||||
"cornsilk": "#fff8dc",
|
||||
"crimson": "#dc143c",
|
||||
"cyan": "#00ffff",
|
||||
"darkblue": "#00008b",
|
||||
"darkcyan": "#008b8b",
|
||||
"darkgoldenrod": "#b8860b",
|
||||
"darkgray": "#a9a9a9",
|
||||
"darkgreen": "#006400",
|
||||
"darkkhaki": "#bdb76b",
|
||||
"darkmagenta": "#8b008b",
|
||||
"darkolivegreen": "#556b2f",
|
||||
"darkorange": "#ff8c00",
|
||||
"darkorchid": "#9932cc",
|
||||
"darkred": "#8b0000",
|
||||
"darksalmon": "#e9967a",
|
||||
"darkseagreen": "#8fbc8f",
|
||||
"darkslateblue": "#483d8b",
|
||||
"darkslategray": "#2f4f4f",
|
||||
"darkturquoise": "#00ced1",
|
||||
"darkviolet": "#9400d3",
|
||||
"deeppink": "#ff1493",
|
||||
"deepskyblue": "#00bfff",
|
||||
"dimgray": "#696969",
|
||||
"dodgerblue": "#1e90ff",
|
||||
"firebrick": "#b22222",
|
||||
"floralwhite": "#fffaf0",
|
||||
"forestgreen": "#228b22",
|
||||
"fuchsia": "#ff00ff",
|
||||
"gainsboro": "#dcdcdc",
|
||||
"ghostwhite": "#f8f8ff",
|
||||
"gold": "#ffd700",
|
||||
"goldenrod": "#daa520",
|
||||
"gray": "#808080",
|
||||
"green": "#008000",
|
||||
"greenyellow": "#adff2f",
|
||||
"honeydew": "#f0fff0",
|
||||
"hotpink": "#ff69b4",
|
||||
"indianred ": "#cd5c5c",
|
||||
"indigo ": "#4b0082",
|
||||
"ivory": "#fffff0",
|
||||
"khaki": "#f0e68c",
|
||||
"lavender": "#e6e6fa",
|
||||
"lavenderblush": "#fff0f5",
|
||||
"lawngreen": "#7cfc00",
|
||||
"lemonchiffon": "#fffacd",
|
||||
"lightblue": "#add8e6",
|
||||
"lightcoral": "#f08080",
|
||||
"lightcyan": "#e0ffff",
|
||||
"lightgoldenrodyellow": "#fafad2",
|
||||
"lightgrey": "#d3d3d3",
|
||||
"lightgreen": "#90ee90",
|
||||
"lightpink": "#ffb6c1",
|
||||
"lightsalmon": "#ffa07a",
|
||||
"lightseagreen": "#20b2aa",
|
||||
"lightskyblue": "#87cefa",
|
||||
"lightslategray": "#778899",
|
||||
"lightsteelblue": "#b0c4de",
|
||||
"lightyellow": "#ffffe0",
|
||||
"lime": "#00ff00",
|
||||
"limegreen": "#32cd32",
|
||||
"linen": "#faf0e6",
|
||||
"magenta": "#ff00ff",
|
||||
"maroon": "#800000",
|
||||
"mediumaquamarine": "#66cdaa",
|
||||
"mediumblue": "#0000cd",
|
||||
"mediumorchid": "#ba55d3",
|
||||
"mediumpurple": "#9370d8",
|
||||
"mediumseagreen": "#3cb371",
|
||||
"mediumslateblue": "#7b68ee",
|
||||
"mediumspringgreen": "#00fa9a",
|
||||
"mediumturquoise": "#48d1cc",
|
||||
"mediumvioletred": "#c71585",
|
||||
"midnightblue": "#191970",
|
||||
"mintcream": "#f5fffa",
|
||||
"mistyrose": "#ffe4e1",
|
||||
"moccasin": "#ffe4b5",
|
||||
"navajowhite": "#ffdead",
|
||||
"navy": "#000080",
|
||||
"oldlace": "#fdf5e6",
|
||||
"olive": "#808000",
|
||||
"olivedrab": "#6b8e23",
|
||||
"orange": "#ffa500",
|
||||
"orangered": "#ff4500",
|
||||
"orchid": "#da70d6",
|
||||
"palegoldenrod": "#eee8aa",
|
||||
"palegreen": "#98fb98",
|
||||
"paleturquoise": "#afeeee",
|
||||
"palevioletred": "#d87093",
|
||||
"papayawhip": "#ffefd5",
|
||||
"peachpuff": "#ffdab9",
|
||||
"peru": "#cd853f",
|
||||
"pink": "#ffc0cb",
|
||||
"plum": "#dda0dd",
|
||||
"powderblue": "#b0e0e6",
|
||||
"purple": "#800080",
|
||||
"red": "#ff0000",
|
||||
"rosybrown": "#bc8f8f",
|
||||
"royalblue": "#4169e1",
|
||||
"saddlebrown": "#8b4513",
|
||||
"salmon": "#fa8072",
|
||||
"sandybrown": "#f4a460",
|
||||
"seagreen": "#2e8b57",
|
||||
"seashell": "#fff5ee",
|
||||
"sienna": "#a0522d",
|
||||
"silver": "#c0c0c0",
|
||||
"skyblue": "#87ceeb",
|
||||
"slateblue": "#6a5acd",
|
||||
"slategray": "#708090",
|
||||
"snow": "#fffafa",
|
||||
"springgreen": "#00ff7f",
|
||||
"steelblue": "#4682b4",
|
||||
"tan": "#d2b48c",
|
||||
"teal": "#008080",
|
||||
"thistle": "#d8bfd8",
|
||||
"tomato": "#ff6347",
|
||||
"turquoise": "#40e0d0",
|
||||
"violet": "#ee82ee",
|
||||
"wheat": "#f5deb3",
|
||||
"white": "#ffffff",
|
||||
"whitesmoke": "#f5f5f5",
|
||||
"yellow": "#ffff00",
|
||||
"yellowgreen": "#9acd32"
|
||||
};
|
||||
|
||||
if (typeof colors[name.toLowerCase()] !== 'undefined') {
|
||||
return colors[name.toLowerCase()];
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
var defaults = {
|
||||
horizontal: false, // horizontal mode layout ?
|
||||
inline: false, //forces to show the colorpicker as an inline element
|
||||
color: false, //forces a color
|
||||
format: false, //forces a format
|
||||
input: 'input', // children input selector
|
||||
container: false, // container selector
|
||||
component: '.add-on, .input-group-addon', // children component selector
|
||||
sliders: {
|
||||
saturation: {
|
||||
maxLeft: 100,
|
||||
maxTop: 100,
|
||||
callLeft: 'setSaturation',
|
||||
callTop: 'setBrightness'
|
||||
},
|
||||
hue: {
|
||||
maxLeft: 0,
|
||||
maxTop: 100,
|
||||
callLeft: false,
|
||||
callTop: 'setHue'
|
||||
},
|
||||
alpha: {
|
||||
maxLeft: 0,
|
||||
maxTop: 100,
|
||||
callLeft: false,
|
||||
callTop: 'setAlpha'
|
||||
}
|
||||
},
|
||||
slidersHorz: {
|
||||
saturation: {
|
||||
maxLeft: 100,
|
||||
maxTop: 100,
|
||||
callLeft: 'setSaturation',
|
||||
callTop: 'setBrightness'
|
||||
},
|
||||
hue: {
|
||||
maxLeft: 100,
|
||||
maxTop: 0,
|
||||
callLeft: 'setHue',
|
||||
callTop: false
|
||||
},
|
||||
alpha: {
|
||||
maxLeft: 100,
|
||||
maxTop: 0,
|
||||
callLeft: 'setAlpha',
|
||||
callTop: false
|
||||
}
|
||||
},
|
||||
template: '<div class="colorpicker dropdown-menu">' +
|
||||
'<div class="colorpicker-saturation"><i><b></b></i></div>' +
|
||||
'<div class="colorpicker-hue"><i></i></div>' +
|
||||
'<div class="colorpicker-alpha"><i></i></div>' +
|
||||
'<div class="colorpicker-color"><div /></div>' +
|
||||
'</div>'
|
||||
};
|
||||
|
||||
var Colorpicker = function(element, options) {
|
||||
this.element = $(element).addClass('colorpicker-element');
|
||||
this.options = $.extend({}, defaults, this.element.data(), options);
|
||||
this.component = this.options.component;
|
||||
this.component = (this.component !== false) ? this.element.find(this.component) : false;
|
||||
if (this.component && (this.component.length === 0)) {
|
||||
this.component = false;
|
||||
}
|
||||
this.container = (this.options.container === true) ? this.element : this.options.container;
|
||||
this.container = (this.container !== false) ? $(this.container) : false;
|
||||
|
||||
// Is the element an input? Should we search inside for any input?
|
||||
this.input = this.element.is('input') ? this.element : (this.options.input ?
|
||||
this.element.find(this.options.input) : false);
|
||||
if (this.input && (this.input.length === 0)) {
|
||||
this.input = false;
|
||||
}
|
||||
// Set HSB color
|
||||
this.color = new Color(this.options.color !== false ? this.options.color : this.getValue());
|
||||
this.format = this.options.format !== false ? this.options.format : this.color.origFormat;
|
||||
|
||||
// Setup picker
|
||||
this.picker = $(this.options.template);
|
||||
if (this.options.inline) {
|
||||
this.picker.addClass('colorpicker-inline colorpicker-visible');
|
||||
} else {
|
||||
this.picker.addClass('colorpicker-hidden');
|
||||
}
|
||||
if (this.options.horizontal) {
|
||||
this.picker.addClass('colorpicker-horizontal');
|
||||
}
|
||||
if (this.format === 'rgba' || this.format === 'hsla') {
|
||||
this.picker.addClass('colorpicker-with-alpha');
|
||||
}
|
||||
this.picker.on('mousedown.colorpicker', $.proxy(this.mousedown, this));
|
||||
this.picker.appendTo(this.container ? this.container : $('body'));
|
||||
|
||||
// Bind events
|
||||
if (this.input !== false) {
|
||||
this.input.on({
|
||||
'keyup.colorpicker': $.proxy(this.keyup, this)
|
||||
});
|
||||
if (this.component === false) {
|
||||
this.element.on({
|
||||
'focus.colorpicker': $.proxy(this.show, this)
|
||||
});
|
||||
}
|
||||
if (this.options.inline === false) {
|
||||
this.element.on({
|
||||
'focusout.colorpicker': $.proxy(this.hide, this)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (this.component !== false) {
|
||||
this.component.on({
|
||||
'click.colorpicker': $.proxy(this.show, this)
|
||||
});
|
||||
}
|
||||
|
||||
if ((this.input === false) && (this.component === false)) {
|
||||
this.element.on({
|
||||
'click.colorpicker': $.proxy(this.show, this)
|
||||
});
|
||||
}
|
||||
this.update();
|
||||
|
||||
$($.proxy(function() {
|
||||
this.element.trigger('create');
|
||||
}, this));
|
||||
};
|
||||
|
||||
Colorpicker.version = '2.0.0-beta';
|
||||
|
||||
Colorpicker.Color = Color;
|
||||
|
||||
Colorpicker.prototype = {
|
||||
constructor: Colorpicker,
|
||||
destroy: function() {
|
||||
this.picker.remove();
|
||||
this.element.removeData('colorpicker').off('.colorpicker');
|
||||
if (this.input !== false) {
|
||||
this.input.off('.colorpicker');
|
||||
}
|
||||
if (this.component !== false) {
|
||||
this.component.off('.colorpicker');
|
||||
}
|
||||
this.element.removeClass('colorpicker-element');
|
||||
this.element.trigger({
|
||||
type: 'destroy'
|
||||
});
|
||||
},
|
||||
reposition: function() {
|
||||
if (this.options.inline !== false) {
|
||||
return false;
|
||||
}
|
||||
var offset = this.component ? this.component.offset() : this.element.offset();
|
||||
this.picker.css({
|
||||
top: offset.top + (this.component ? this.component.outerHeight() : this.element.outerHeight()),
|
||||
left: offset.left
|
||||
});
|
||||
},
|
||||
show: function(e) {
|
||||
if (this.isDisabled()) {
|
||||
return false;
|
||||
}
|
||||
this.picker.addClass('colorpicker-visible').removeClass('colorpicker-hidden');
|
||||
this.reposition();
|
||||
$(window).on('resize.colorpicker', $.proxy(this.reposition, this));
|
||||
if (!this.hasInput() && e) {
|
||||
if (e.stopPropagation && e.preventDefault) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
if (this.options.inline === false) {
|
||||
$(window.document).on({
|
||||
'mousedown.colorpicker': $.proxy(this.hide, this)
|
||||
});
|
||||
}
|
||||
this.element.trigger({
|
||||
type: 'showPicker',
|
||||
color: this.color
|
||||
});
|
||||
},
|
||||
hide: function() {
|
||||
this.picker.addClass('colorpicker-hidden').removeClass('colorpicker-visible');
|
||||
$(window).off('resize.colorpicker', this.reposition);
|
||||
$(document).off({
|
||||
'mousedown.colorpicker': this.hide
|
||||
});
|
||||
this.update();
|
||||
this.element.trigger({
|
||||
type: 'hidePicker',
|
||||
color: this.color
|
||||
});
|
||||
},
|
||||
updateData: function(val) {
|
||||
val = val || this.color.toString(this.format);
|
||||
this.element.data('color', val);
|
||||
return val;
|
||||
},
|
||||
updateInput: function(val) {
|
||||
val = val || this.color.toString(this.format);
|
||||
if (this.input !== false) {
|
||||
this.input.prop('value', val);
|
||||
}
|
||||
return val;
|
||||
},
|
||||
updatePicker: function(val) {
|
||||
if (val !== undefined) {
|
||||
this.color = new Color(val);
|
||||
}
|
||||
var sl = (this.options.horizontal === false) ? this.options.sliders : this.options.slidersHorz;
|
||||
var icns = this.picker.find('i');
|
||||
if (icns.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (this.options.horizontal === false) {
|
||||
sl = this.options.sliders;
|
||||
icns.eq(1).css('top', sl.hue.maxTop * (1 - this.color.value.h)).end()
|
||||
.eq(2).css('top', sl.alpha.maxTop * (1 - this.color.value.a));
|
||||
} else {
|
||||
sl = this.options.slidersHorz;
|
||||
icns.eq(1).css('left', sl.hue.maxLeft * (1 - this.color.value.h)).end()
|
||||
.eq(2).css('left', sl.alpha.maxLeft * (1 - this.color.value.a));
|
||||
}
|
||||
icns.eq(0).css({
|
||||
'top': sl.saturation.maxTop - this.color.value.b * sl.saturation.maxTop,
|
||||
'left': this.color.value.s * sl.saturation.maxLeft
|
||||
});
|
||||
this.picker.find('.colorpicker-saturation').css('backgroundColor', this.color.toHex(this.color.value.h, 1, 1, 1));
|
||||
this.picker.find('.colorpicker-alpha').css('backgroundColor', this.color.toHex());
|
||||
this.picker.find('.colorpicker-color, .colorpicker-color div').css('backgroundColor', this.color.toString(this.format));
|
||||
return val;
|
||||
},
|
||||
updateComponent: function(val) {
|
||||
val = val || this.color.toString(this.format);
|
||||
if (this.component !== false) {
|
||||
var icn = this.component.find('i').eq(0);
|
||||
if (icn.length > 0) {
|
||||
icn.css({
|
||||
'backgroundColor': val
|
||||
});
|
||||
} else {
|
||||
this.component.css({
|
||||
'backgroundColor': val
|
||||
});
|
||||
}
|
||||
}
|
||||
return val;
|
||||
},
|
||||
update: function(force) {
|
||||
var val = this.updateComponent();
|
||||
if ((this.getValue(false) !== false) || (force === true)) {
|
||||
// Update input/data only if the current value is not blank
|
||||
this.updateInput(val);
|
||||
this.updateData(val);
|
||||
}
|
||||
this.updatePicker();
|
||||
return val;
|
||||
|
||||
},
|
||||
setValue: function(val) { // set color manually
|
||||
this.color = new Color(val);
|
||||
this.update();
|
||||
this.element.trigger({
|
||||
type: 'changeColor',
|
||||
color: this.color,
|
||||
value: val
|
||||
});
|
||||
},
|
||||
getValue: function(defaultValue) {
|
||||
defaultValue = (defaultValue === undefined) ? '#000000' : defaultValue;
|
||||
var val;
|
||||
if (this.hasInput()) {
|
||||
val = this.input.val();
|
||||
} else {
|
||||
val = this.element.data('color');
|
||||
}
|
||||
if ((val === undefined) || (val === '') || (val === null)) {
|
||||
// if not defined or empty, return default
|
||||
val = defaultValue;
|
||||
}
|
||||
return val;
|
||||
},
|
||||
hasInput: function() {
|
||||
return (this.input !== false);
|
||||
},
|
||||
isDisabled: function() {
|
||||
if (this.hasInput()) {
|
||||
return (this.input.prop('disabled') === true);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
disable: function() {
|
||||
if (this.hasInput()) {
|
||||
this.input.prop('disabled', true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
enable: function() {
|
||||
if (this.hasInput()) {
|
||||
this.input.prop('disabled', false);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
currentSlider: null,
|
||||
mousePointer: {
|
||||
left: 0,
|
||||
top: 0
|
||||
},
|
||||
mousedown: function(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
var target = $(e.target);
|
||||
|
||||
//detect the slider and set the limits and callbacks
|
||||
var zone = target.closest('div');
|
||||
var sl = this.options.horizontal ? this.options.slidersHorz : this.options.sliders;
|
||||
if (!zone.is('.colorpicker')) {
|
||||
if (zone.is('.colorpicker-saturation')) {
|
||||
this.currentSlider = $.extend({}, sl.saturation);
|
||||
} else if (zone.is('.colorpicker-hue')) {
|
||||
this.currentSlider = $.extend({}, sl.hue);
|
||||
} else if (zone.is('.colorpicker-alpha')) {
|
||||
this.currentSlider = $.extend({}, sl.alpha);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
var offset = zone.offset();
|
||||
//reference to guide's style
|
||||
this.currentSlider.guide = zone.find('i')[0].style;
|
||||
this.currentSlider.left = e.pageX - offset.left;
|
||||
this.currentSlider.top = e.pageY - offset.top;
|
||||
this.mousePointer = {
|
||||
left: e.pageX,
|
||||
top: e.pageY
|
||||
};
|
||||
//trigger mousemove to move the guide to the current position
|
||||
$(document).on({
|
||||
'mousemove.colorpicker': $.proxy(this.mousemove, this),
|
||||
'mouseup.colorpicker': $.proxy(this.mouseup, this)
|
||||
}).trigger('mousemove');
|
||||
}
|
||||
return false;
|
||||
},
|
||||
mousemove: function(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
var left = Math.max(
|
||||
0,
|
||||
Math.min(
|
||||
this.currentSlider.maxLeft,
|
||||
this.currentSlider.left + ((e.pageX || this.mousePointer.left) - this.mousePointer.left)
|
||||
)
|
||||
);
|
||||
var top = Math.max(
|
||||
0,
|
||||
Math.min(
|
||||
this.currentSlider.maxTop,
|
||||
this.currentSlider.top + ((e.pageY || this.mousePointer.top) - this.mousePointer.top)
|
||||
)
|
||||
);
|
||||
this.currentSlider.guide.left = left + 'px';
|
||||
this.currentSlider.guide.top = top + 'px';
|
||||
if (this.currentSlider.callLeft) {
|
||||
this.color[this.currentSlider.callLeft].call(this.color, left / 100);
|
||||
}
|
||||
if (this.currentSlider.callTop) {
|
||||
this.color[this.currentSlider.callTop].call(this.color, top / 100);
|
||||
}
|
||||
this.update(true);
|
||||
|
||||
this.element.trigger({
|
||||
type: 'changeColor',
|
||||
color: this.color
|
||||
});
|
||||
return false;
|
||||
},
|
||||
mouseup: function(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
$(document).off({
|
||||
'mousemove.colorpicker': this.mousemove,
|
||||
'mouseup.colorpicker': this.mouseup
|
||||
});
|
||||
return false;
|
||||
},
|
||||
keyup: function(e) {
|
||||
if ((e.keyCode === 38)) {
|
||||
if (this.color.value.a < 1) {
|
||||
this.color.value.a = Math.round((this.color.value.a + 0.01) * 100) / 100;
|
||||
}
|
||||
this.update(true);
|
||||
} else if ((e.keyCode === 40)) {
|
||||
if (this.color.value.a > 0) {
|
||||
this.color.value.a = Math.round((this.color.value.a - 0.01) * 100) / 100;
|
||||
}
|
||||
this.update(true);
|
||||
} else {
|
||||
var val = this.input.val();
|
||||
this.color = new Color(val);
|
||||
if (this.getValue(false) !== false) {
|
||||
this.updateData();
|
||||
this.updateComponent();
|
||||
this.updatePicker();
|
||||
}
|
||||
}
|
||||
this.element.trigger({
|
||||
type: 'changeColor',
|
||||
color: this.color,
|
||||
value: val
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$.colorpicker = Colorpicker;
|
||||
|
||||
$.fn.colorpicker = function(option) {
|
||||
return this.each(function() {
|
||||
var $this = $(this),
|
||||
inst = $this.data('colorpicker'),
|
||||
options = ((typeof option === 'object') ? option : {});
|
||||
if ((!inst) && (typeof option !== 'string')) {
|
||||
$this.data('colorpicker', new Colorpicker(this, options));
|
||||
} else {
|
||||
if (typeof option === 'string') {
|
||||
inst[option].apply(inst, Array.prototype.slice.call(arguments, 1));
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.colorpicker.constructor = Colorpicker;
|
||||
|
||||
})(window.jQuery);
|
||||
1
js/bootstrap-colorpicker.min.js
vendored
420
js/bootstrap-switch.js
vendored
@@ -1,420 +0,0 @@
|
||||
/*! ============================================================
|
||||
* bootstrap-switch v1.9.0 by Larentis Mattia @SpiritualGuru
|
||||
* http://www.larentis.eu/
|
||||
*
|
||||
* Enhanced for radiobuttons by Stein, Peter @BdMdesigN
|
||||
* http://www.bdmdesign.org/
|
||||
*
|
||||
* Project site:
|
||||
* http://www.larentis.eu/switch/
|
||||
* ============================================================
|
||||
* Licensed under the Apache License, Version 2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* ============================================================ */
|
||||
|
||||
!function ($) {
|
||||
"use strict";
|
||||
|
||||
$.fn.bootstrapSwitch = function (method) {
|
||||
var inputSelector = 'input[type!="hidden"]';
|
||||
var methods = {
|
||||
|
||||
init: function () {
|
||||
return this.each(function () {
|
||||
var $element = $(this),
|
||||
$div,
|
||||
$switchLeft,
|
||||
$switchRight,
|
||||
$label,
|
||||
$form = $element.closest('form'),
|
||||
myClasses = "",
|
||||
classes = $element.attr('class'),
|
||||
color,
|
||||
moving,
|
||||
onLabel = "ON",
|
||||
offLabel = "OFF",
|
||||
icon = false,
|
||||
textLabel = false;
|
||||
|
||||
$.each(['switch-mini', 'switch-small', 'switch-large'], function (i, el) {
|
||||
if (classes.indexOf(el) >= 0) {
|
||||
myClasses = el;
|
||||
}
|
||||
});
|
||||
|
||||
$element.addClass('has-switch');
|
||||
|
||||
if ($element.data('on') !== undefined) {
|
||||
color = "switch-" + $element.data('on');
|
||||
}
|
||||
|
||||
if ($element.data('on-label') !== undefined) {
|
||||
onLabel = $element.data('on-label');
|
||||
}
|
||||
|
||||
if ($element.data('off-label') !== undefined) {
|
||||
offLabel = $element.data('off-label');
|
||||
}
|
||||
|
||||
if ($element.data('label-icon') !== undefined) {
|
||||
icon = $element.data('label-icon');
|
||||
}
|
||||
|
||||
if ($element.data('text-label') !== undefined) {
|
||||
textLabel = $element.data('text-label');
|
||||
}
|
||||
|
||||
$switchLeft = $('<span>')
|
||||
.addClass("switch-left")
|
||||
.addClass(myClasses)
|
||||
.addClass(color)
|
||||
.html('' + onLabel + '');
|
||||
|
||||
color = '';
|
||||
if ($element.data('off') !== undefined) {
|
||||
color = "switch-" + $element.data('off');
|
||||
}
|
||||
|
||||
$switchRight = $('<span>')
|
||||
.addClass("switch-right")
|
||||
.addClass(myClasses)
|
||||
.addClass(color)
|
||||
.html('' + offLabel + '');
|
||||
|
||||
$label = $('<label>')
|
||||
.html(" ")
|
||||
.addClass(myClasses)
|
||||
.attr('for', $element.find(inputSelector).attr('id'));
|
||||
|
||||
if (icon) {
|
||||
$label.html('<i class="icon ' + icon + '"></i>');
|
||||
}
|
||||
|
||||
if (textLabel) {
|
||||
$label.html('' + textLabel + '');
|
||||
}
|
||||
|
||||
$div = $element.find(inputSelector).wrap($('<div>')).parent().data('animated', false);
|
||||
|
||||
if ($element.data('animated') !== false) {
|
||||
$div.addClass('switch-animate').data('animated', true);
|
||||
}
|
||||
|
||||
$div
|
||||
.append($switchLeft)
|
||||
.append($label)
|
||||
.append($switchRight);
|
||||
|
||||
$element.find('> div').addClass($element.find(inputSelector).is(':checked') ? 'switch-on' : 'switch-off');
|
||||
|
||||
if ($element.find(inputSelector).is(':disabled')) {
|
||||
$(this).addClass('deactivate');
|
||||
}
|
||||
|
||||
var changeStatus = function ($this) {
|
||||
if ($element.parent('label').is('.label-change-switch')) {
|
||||
|
||||
} else {
|
||||
$this.siblings('label').trigger('mousedown').trigger('mouseup').trigger('click');
|
||||
}
|
||||
};
|
||||
|
||||
$element.on('keydown', function (e) {
|
||||
if (e.keyCode === 32) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
changeStatus($(e.target).find('span:first'));
|
||||
}
|
||||
});
|
||||
|
||||
$switchLeft.on('click', function () {
|
||||
changeStatus($(this));
|
||||
});
|
||||
|
||||
$switchRight.on('click', function () {
|
||||
changeStatus($(this));
|
||||
});
|
||||
|
||||
$element.find(inputSelector).on('change', function (e, skipOnChange) {
|
||||
var $this = $(this),
|
||||
$element = $this.parent(),
|
||||
thisState = $this.is(':checked'),
|
||||
state = $element.is('.switch-off');
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
$element.css('left', '');
|
||||
|
||||
if (state === thisState) {
|
||||
if (thisState) {
|
||||
$element.removeClass('switch-off').addClass('switch-on');
|
||||
}
|
||||
else {
|
||||
$element.removeClass('switch-on').addClass('switch-off');
|
||||
}
|
||||
|
||||
if ($element.data('animated') !== false) {
|
||||
$element.addClass("switch-animate");
|
||||
}
|
||||
|
||||
if (typeof skipOnChange === 'boolean' && skipOnChange) {
|
||||
return;
|
||||
}
|
||||
|
||||
$element.parent().trigger('switch-change', {
|
||||
el: $this,
|
||||
value: thisState
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$element.find('label').on('mousedown touchstart', function (e) {
|
||||
var $this = $(this);
|
||||
moving = false;
|
||||
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
$this.closest('div').removeClass('switch-animate');
|
||||
|
||||
if ($this.closest('.has-switch').is('.deactivate')) {
|
||||
$this.unbind('click');
|
||||
} else if ($this.closest('.switch-on').parent().is('.radio-no-uncheck')) {
|
||||
$this.unbind('click');
|
||||
} else {
|
||||
$this.on('mousemove touchmove', function (e) {
|
||||
var $element = $(this).closest('.make-switch'),
|
||||
relativeX = (e.pageX || e.originalEvent.targetTouches[0].pageX) - $element.offset().left,
|
||||
percent = (relativeX / $element.width()) * 100,
|
||||
left = 25,
|
||||
right = 75;
|
||||
|
||||
moving = true;
|
||||
|
||||
if (percent < left) {
|
||||
percent = left;
|
||||
}
|
||||
else if (percent > right) {
|
||||
percent = right;
|
||||
}
|
||||
|
||||
$element.find('>div').css('left', (percent - right) + "%");
|
||||
});
|
||||
|
||||
$this.on('click touchend', function (e) {
|
||||
var $this = $(this),
|
||||
$myInputBox = $this.siblings('input');
|
||||
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
|
||||
$this.unbind('mouseleave');
|
||||
|
||||
if (moving) {
|
||||
$myInputBox.prop('checked', !(parseInt($this.parent().css('left'), 10) < -25));
|
||||
}
|
||||
else {
|
||||
$myInputBox.prop("checked", !$myInputBox.is(":checked"));
|
||||
}
|
||||
|
||||
moving = false;
|
||||
$myInputBox.trigger('change');
|
||||
});
|
||||
|
||||
$this.on('mouseleave', function (e) {
|
||||
var $this = $(this),
|
||||
$myInputBox = $this.siblings('input');
|
||||
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
|
||||
$this.unbind('mouseleave mousemove');
|
||||
$this.trigger('mouseup');
|
||||
|
||||
$myInputBox.prop('checked', ! (parseInt($this.parent().css('left'), 10) < -25)).trigger('change');
|
||||
});
|
||||
|
||||
$this.on('mouseup', function (e) {
|
||||
e.stopImmediatePropagation();
|
||||
e.preventDefault();
|
||||
|
||||
$(this).trigger('mouseleave');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
if ($form.data('bootstrapSwitch') !== 'injected') {
|
||||
$form.bind('reset', function () {
|
||||
setTimeout(function () {
|
||||
$form.find('.make-switch').each(function () {
|
||||
var $input = $(this).find(inputSelector);
|
||||
|
||||
$input.prop('checked', $input.is(':checked')).trigger('change');
|
||||
});
|
||||
}, 1);
|
||||
});
|
||||
$form.data('bootstrapSwitch', 'injected');
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
toggleActivation: function () {
|
||||
var $this = $(this);
|
||||
|
||||
$this.toggleClass('deactivate');
|
||||
$this.find(inputSelector).prop('disabled', $this.is('.deactivate'));
|
||||
},
|
||||
|
||||
isActive: function () {
|
||||
return !$(this).hasClass('deactivate');
|
||||
},
|
||||
|
||||
setActive: function (active) {
|
||||
var $this = $(this);
|
||||
|
||||
if (active) {
|
||||
$this.removeClass('deactivate');
|
||||
$this.find(inputSelector).removeAttr('disabled');
|
||||
}
|
||||
else {
|
||||
$this.addClass('deactivate');
|
||||
$this.find(inputSelector).attr('disabled', 'disabled');
|
||||
}
|
||||
},
|
||||
|
||||
toggleState: function (skipOnChange) {
|
||||
var $input = $(this).find(':checkbox');
|
||||
$input.prop('checked', !$input.is(':checked')).trigger('change', skipOnChange);
|
||||
},
|
||||
|
||||
toggleRadioState: function (skipOnChange) {
|
||||
var $radioinput = $(this).find(':radio');
|
||||
$radioinput.not(':checked').prop('checked', !$radioinput.is(':checked')).trigger('change', skipOnChange);
|
||||
},
|
||||
|
||||
toggleRadioStateAllowUncheck: function (uncheck, skipOnChange) {
|
||||
var $radioinput = $(this).find(':radio');
|
||||
|
||||
if (uncheck) {
|
||||
$radioinput.not(':checked').trigger('change', skipOnChange);
|
||||
}
|
||||
else {
|
||||
$radioinput.not(':checked').prop('checked', ! $radioinput.is(':checked')).trigger('change', skipOnChange);
|
||||
}
|
||||
},
|
||||
|
||||
setState: function (value, skipOnChange) {
|
||||
$(this).find(inputSelector).prop('checked', value).trigger('change', skipOnChange);
|
||||
},
|
||||
|
||||
setOnLabel: function (value) {
|
||||
var $switchLeft = $(this).find(".switch-left");
|
||||
|
||||
$switchLeft.html(value);
|
||||
},
|
||||
|
||||
setOffLabel: function (value) {
|
||||
var $switchRight = $(this).find(".switch-right");
|
||||
|
||||
$switchRight.html(value);
|
||||
},
|
||||
|
||||
setOnClass: function (value) {
|
||||
var $switchLeft = $(this).find(".switch-left"),
|
||||
color = '';
|
||||
|
||||
if (value !== undefined) {
|
||||
if ($(this).attr('data-on') !== undefined) {
|
||||
color = "switch-" + $(this).attr('data-on');
|
||||
}
|
||||
$switchLeft.removeClass(color);
|
||||
color = "switch-" + value;
|
||||
$switchLeft.addClass(color);
|
||||
}
|
||||
},
|
||||
|
||||
setOffClass: function (value) {
|
||||
var $switchRight = $(this).find(".switch-right"),
|
||||
color = '';
|
||||
|
||||
if (value !== undefined) {
|
||||
if ($(this).attr('data-off') !== undefined) {
|
||||
color = "switch-" + $(this).attr('data-off');
|
||||
}
|
||||
$switchRight.removeClass(color);
|
||||
color = "switch-" + value;
|
||||
$switchRight.addClass(color);
|
||||
}
|
||||
},
|
||||
|
||||
setAnimated: function (value) {
|
||||
var $element = $(this).find(inputSelector).parent();
|
||||
|
||||
if (value === undefined) {
|
||||
value = false;
|
||||
}
|
||||
|
||||
$element.data('animated', value);
|
||||
$element.attr('data-animated', value);
|
||||
$element[$element.data('animated') !== false ? 'addClass' : 'removeClass']("switch-animate");
|
||||
},
|
||||
|
||||
setSizeClass: function (value) {
|
||||
var $element = $(this);
|
||||
var $switchLeft = $element.find(".switch-left");
|
||||
var $switchRight = $element.find(".switch-right");
|
||||
var $label = $element.find("label");
|
||||
$.each(['switch-mini', 'switch-small', 'switch-large'], function (i, el) {
|
||||
if (el !== value) {
|
||||
$switchLeft.removeClass(el);
|
||||
$switchRight.removeClass(el);
|
||||
$label.removeClass(el);
|
||||
} else {
|
||||
$switchLeft.addClass(el);
|
||||
$switchRight.addClass(el);
|
||||
$label.addClass(el);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
status: function () {
|
||||
return $(this).find(inputSelector).is(':checked');
|
||||
},
|
||||
|
||||
destroy: function () {
|
||||
var $element = $(this),
|
||||
$div = $element.find('div'),
|
||||
$form = $element.closest('form'),
|
||||
$inputbox;
|
||||
|
||||
$div.find(':not(input)').remove();
|
||||
$inputbox = $div.children();
|
||||
$inputbox.unwrap().unwrap();
|
||||
$inputbox.unbind('change');
|
||||
|
||||
if ($form) {
|
||||
$form.unbind('reset');
|
||||
$form.removeData('bootstrapSwitch');
|
||||
}
|
||||
|
||||
return $inputbox;
|
||||
}
|
||||
};
|
||||
|
||||
if (methods[method]) {
|
||||
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
||||
}
|
||||
if (typeof method === 'object' || ! method) {
|
||||
return methods.init.apply(this, arguments);
|
||||
}
|
||||
|
||||
$.error('Method ' + method + ' does not exist!');
|
||||
};
|
||||
}(jQuery);
|
||||
|
||||
(function ($) {
|
||||
$(function () {
|
||||
$('.make-switch').bootstrapSwitch();
|
||||
});
|
||||
})(jQuery);
|
||||
903
js/bootstrap-timepicker.js
vendored
@@ -1,903 +0,0 @@
|
||||
//TODO: move arrow styles and button click code into configurable items, with defaults matching the existing code
|
||||
|
||||
/*!
|
||||
* Timepicker Component for Twitter Bootstrap
|
||||
*
|
||||
* Copyright 2013 Joris de Wit
|
||||
*
|
||||
* Contributors https://github.com/jdewit/bootstrap-timepicker/graphs/contributors
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
(function($, window, document, undefined) {
|
||||
'use strict';
|
||||
|
||||
// TIMEPICKER PUBLIC CLASS DEFINITION
|
||||
var Timepicker = function(element, options) {
|
||||
this.widget = '';
|
||||
this.$element = $(element);
|
||||
this.defaultTime = options.defaultTime;
|
||||
this.disableFocus = options.disableFocus;
|
||||
this.isOpen = options.isOpen;
|
||||
this.minuteStep = options.minuteStep;
|
||||
this.modalBackdrop = options.modalBackdrop;
|
||||
this.secondStep = options.secondStep;
|
||||
this.showInputs = options.showInputs;
|
||||
this.showMeridian = options.showMeridian;
|
||||
this.showSeconds = options.showSeconds;
|
||||
this.template = options.template;
|
||||
this.appendWidgetTo = options.appendWidgetTo;
|
||||
this.upArrowStyle = options.upArrowStyle;
|
||||
this.downArrowStyle = options.downArrowStyle;
|
||||
this.containerClass = options.containerClass;
|
||||
|
||||
this._init();
|
||||
};
|
||||
|
||||
Timepicker.prototype = {
|
||||
|
||||
constructor: Timepicker,
|
||||
|
||||
_init: function() {
|
||||
var self = this;
|
||||
|
||||
if (this.$element.parent().hasClass('input-append') || this.$element.parent().hasClass('input-prepend')) {
|
||||
if (this.$element.parent('.input-append, .input-prepend').find('.add-on').length) {
|
||||
this.$element.parent('.input-append, .input-prepend').find('.add-on').on({
|
||||
'click.timepicker': $.proxy(this.showWidget, this)
|
||||
});
|
||||
} else {
|
||||
this.$element.closest(this.containerClass).find('.add-on').on({
|
||||
'click.timepicker': $.proxy(this.showWidget, this)
|
||||
});
|
||||
}
|
||||
|
||||
this.$element.on({
|
||||
'focus.timepicker': $.proxy(this.highlightUnit, this),
|
||||
'click.timepicker': $.proxy(this.highlightUnit, this),
|
||||
'keydown.timepicker': $.proxy(this.elementKeydown, this),
|
||||
'blur.timepicker': $.proxy(this.blurElement, this)
|
||||
});
|
||||
} else {
|
||||
if (this.template) {
|
||||
this.$element.on({
|
||||
'focus.timepicker': $.proxy(this.showWidget, this),
|
||||
'click.timepicker': $.proxy(this.showWidget, this),
|
||||
'blur.timepicker': $.proxy(this.blurElement, this)
|
||||
});
|
||||
} else {
|
||||
this.$element.on({
|
||||
'focus.timepicker': $.proxy(this.highlightUnit, this),
|
||||
'click.timepicker': $.proxy(this.highlightUnit, this),
|
||||
'keydown.timepicker': $.proxy(this.elementKeydown, this),
|
||||
'blur.timepicker': $.proxy(this.blurElement, this)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (this.template !== false) {
|
||||
this.$widget = $(this.getTemplate()).prependTo(this.$element.parents(this.appendWidgetTo)).on('click', $.proxy(this.widgetClick, this));
|
||||
} else {
|
||||
this.$widget = false;
|
||||
}
|
||||
|
||||
if (this.showInputs && this.$widget !== false) {
|
||||
this.$widget.find('input').each(function() {
|
||||
$(this).on({
|
||||
'click.timepicker': function() { $(this).select(); },
|
||||
'keydown.timepicker': $.proxy(self.widgetKeydown, self)
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
this.setDefaultTime(this.defaultTime);
|
||||
},
|
||||
|
||||
blurElement: function() {
|
||||
this.highlightedUnit = undefined;
|
||||
this.updateFromElementVal();
|
||||
},
|
||||
|
||||
decrementHour: function() {
|
||||
if (this.showMeridian) {
|
||||
if (this.hour === 1) {
|
||||
this.hour = 12;
|
||||
} else if (this.hour === 12) {
|
||||
this.hour--;
|
||||
|
||||
return this.toggleMeridian();
|
||||
} else if (this.hour === 0) {
|
||||
this.hour = 11;
|
||||
|
||||
return this.toggleMeridian();
|
||||
} else {
|
||||
this.hour--;
|
||||
}
|
||||
} else {
|
||||
if (this.hour === 0) {
|
||||
this.hour = 23;
|
||||
} else {
|
||||
this.hour--;
|
||||
}
|
||||
}
|
||||
this.update();
|
||||
},
|
||||
|
||||
decrementMinute: function(step) {
|
||||
var newVal;
|
||||
|
||||
if (step) {
|
||||
newVal = this.minute - step;
|
||||
} else {
|
||||
newVal = this.minute - this.minuteStep;
|
||||
}
|
||||
|
||||
if (newVal < 0) {
|
||||
this.decrementHour();
|
||||
this.minute = newVal + 60;
|
||||
} else {
|
||||
this.minute = newVal;
|
||||
}
|
||||
this.update();
|
||||
},
|
||||
|
||||
decrementSecond: function() {
|
||||
var newVal = this.second - this.secondStep;
|
||||
|
||||
if (newVal < 0) {
|
||||
this.decrementMinute(true);
|
||||
this.second = newVal + 60;
|
||||
} else {
|
||||
this.second = newVal;
|
||||
}
|
||||
this.update();
|
||||
},
|
||||
|
||||
elementKeydown: function(e) {
|
||||
switch (e.keyCode) {
|
||||
case 9: //tab
|
||||
this.updateFromElementVal();
|
||||
|
||||
switch (this.highlightedUnit) {
|
||||
case 'hour':
|
||||
e.preventDefault();
|
||||
this.highlightNextUnit();
|
||||
break;
|
||||
case 'minute':
|
||||
if (this.showMeridian || this.showSeconds) {
|
||||
e.preventDefault();
|
||||
this.highlightNextUnit();
|
||||
}
|
||||
break;
|
||||
case 'second':
|
||||
if (this.showMeridian) {
|
||||
e.preventDefault();
|
||||
this.highlightNextUnit();
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 27: // escape
|
||||
this.updateFromElementVal();
|
||||
break;
|
||||
case 37: // left arrow
|
||||
e.preventDefault();
|
||||
this.highlightPrevUnit();
|
||||
this.updateFromElementVal();
|
||||
break;
|
||||
case 38: // up arrow
|
||||
e.preventDefault();
|
||||
switch (this.highlightedUnit) {
|
||||
case 'hour':
|
||||
this.incrementHour();
|
||||
this.highlightHour();
|
||||
break;
|
||||
case 'minute':
|
||||
this.incrementMinute();
|
||||
this.highlightMinute();
|
||||
break;
|
||||
case 'second':
|
||||
this.incrementSecond();
|
||||
this.highlightSecond();
|
||||
break;
|
||||
case 'meridian':
|
||||
this.toggleMeridian();
|
||||
this.highlightMeridian();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 39: // right arrow
|
||||
e.preventDefault();
|
||||
this.updateFromElementVal();
|
||||
this.highlightNextUnit();
|
||||
break;
|
||||
case 40: // down arrow
|
||||
e.preventDefault();
|
||||
switch (this.highlightedUnit) {
|
||||
case 'hour':
|
||||
this.decrementHour();
|
||||
this.highlightHour();
|
||||
break;
|
||||
case 'minute':
|
||||
this.decrementMinute();
|
||||
this.highlightMinute();
|
||||
break;
|
||||
case 'second':
|
||||
this.decrementSecond();
|
||||
this.highlightSecond();
|
||||
break;
|
||||
case 'meridian':
|
||||
this.toggleMeridian();
|
||||
this.highlightMeridian();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
formatTime: function(hour, minute, second, meridian) {
|
||||
hour = hour < 10 ? '0' + hour : hour;
|
||||
minute = minute < 10 ? '0' + minute : minute;
|
||||
second = second < 10 ? '0' + second : second;
|
||||
|
||||
return hour + ':' + minute + (this.showSeconds ? ':' + second : '') + (this.showMeridian ? ' ' + meridian : '');
|
||||
},
|
||||
|
||||
getCursorPosition: function() {
|
||||
var input = this.$element.get(0);
|
||||
|
||||
if ('selectionStart' in input) {// Standard-compliant browsers
|
||||
|
||||
return input.selectionStart;
|
||||
} else if (document.selection) {// IE fix
|
||||
input.focus();
|
||||
var sel = document.selection.createRange(),
|
||||
selLen = document.selection.createRange().text.length;
|
||||
|
||||
sel.moveStart('character', - input.value.length);
|
||||
|
||||
return sel.text.length - selLen;
|
||||
}
|
||||
},
|
||||
|
||||
getTemplate: function() {
|
||||
var template,
|
||||
hourTemplate,
|
||||
minuteTemplate,
|
||||
secondTemplate,
|
||||
meridianTemplate,
|
||||
templateContent;
|
||||
|
||||
if (this.showInputs) {
|
||||
hourTemplate = '<input type="text" name="hour" class="bootstrap-timepicker-hour form-control" maxlength="2"/>';
|
||||
minuteTemplate = '<input type="text" name="minute" class="bootstrap-timepicker-minute form-control" maxlength="2"/>';
|
||||
secondTemplate = '<input type="text" name="second" class="bootstrap-timepicker-second form-control" maxlength="2"/>';
|
||||
meridianTemplate = '<input type="text" name="meridian" class="bootstrap-timepicker-meridian form-control" maxlength="2"/>';
|
||||
} else {
|
||||
hourTemplate = '<span class="bootstrap-timepicker-hour"></span>';
|
||||
minuteTemplate = '<span class="bootstrap-timepicker-minute"></span>';
|
||||
secondTemplate = '<span class="bootstrap-timepicker-second"></span>';
|
||||
meridianTemplate = '<span class="bootstrap-timepicker-meridian"></span>';
|
||||
}
|
||||
|
||||
templateContent = '<table>'+
|
||||
'<tr>'+
|
||||
'<td><a href="#" data-action="incrementHour"><i class="' + this.upArrowStyle + '"></i></a></td>'+
|
||||
'<td class="separator"> </td>'+
|
||||
'<td><a href="#" data-action="incrementMinute"><i class="' + this.upArrowStyle + '"></i></a></td>'+
|
||||
(this.showSeconds ?
|
||||
'<td class="separator"> </td>'+
|
||||
'<td><a href="#" data-action="incrementSecond"><i class="' + this.upArrowStyle + '"></i></a></td>'
|
||||
: '') +
|
||||
(this.showMeridian ?
|
||||
'<td class="separator"> </td>'+
|
||||
'<td class="meridian-column"><a href="#" data-action="toggleMeridian"><i class="' + this.upArrowStyle + '"></i></a></td>'
|
||||
: '') +
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td>'+ hourTemplate +'</td> '+
|
||||
'<td class="separator">:</td>'+
|
||||
'<td>'+ minuteTemplate +'</td> '+
|
||||
(this.showSeconds ?
|
||||
'<td class="separator">:</td>'+
|
||||
'<td>'+ secondTemplate +'</td>'
|
||||
: '') +
|
||||
(this.showMeridian ?
|
||||
'<td class="separator"> </td>'+
|
||||
'<td>'+ meridianTemplate +'</td>'
|
||||
: '') +
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td><a href="#" data-action="decrementHour"><i class="' + this.downArrowStyle + '"></i></a></td>'+
|
||||
'<td class="separator"></td>'+
|
||||
'<td><a href="#" data-action="decrementMinute"><i class="' + this.downArrowStyle + '"></i></a></td>'+
|
||||
(this.showSeconds ?
|
||||
'<td class="separator"> </td>'+
|
||||
'<td><a href="#" data-action="decrementSecond"><i class="' + this.downArrowStyle + '"></i></a></td>'
|
||||
: '') +
|
||||
(this.showMeridian ?
|
||||
'<td class="separator"> </td>'+
|
||||
'<td><a href="#" data-action="toggleMeridian"><i class="' + this.downArrowStyle + '"></i></a></td>'
|
||||
: '') +
|
||||
'</tr>'+
|
||||
'</table>';
|
||||
|
||||
switch(this.template) {
|
||||
case 'modal':
|
||||
template = '<div class="bootstrap-timepicker-widget modal hide fade in" data-backdrop="'+ (this.modalBackdrop ? 'true' : 'false') +'">'+
|
||||
'<div class="modal-header">'+
|
||||
'<a href="#" class="close" data-dismiss="modal">×</a>'+
|
||||
'<h3>Pick a Time</h3>'+
|
||||
'</div>'+
|
||||
'<div class="modal-content">'+
|
||||
templateContent +
|
||||
'</div>'+
|
||||
'<div class="modal-footer">'+
|
||||
'<a href="#" class="btn btn-primary" data-dismiss="modal">OK</a>'+
|
||||
'</div>'+
|
||||
'</div>';
|
||||
break;
|
||||
case 'dropdown':
|
||||
template = '<div class="bootstrap-timepicker-widget dropdown-menu">'+ templateContent +'</div>';
|
||||
break;
|
||||
}
|
||||
|
||||
return template;
|
||||
},
|
||||
|
||||
getTime: function() {
|
||||
return this.formatTime(this.hour, this.minute, this.second, this.meridian);
|
||||
},
|
||||
|
||||
hideWidget: function() {
|
||||
if (this.isOpen === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.showInputs) {
|
||||
this.updateFromWidgetInputs();
|
||||
}
|
||||
|
||||
this.$element.trigger({
|
||||
'type': 'hide.timepicker',
|
||||
'time': {
|
||||
'value': this.getTime(),
|
||||
'hours': this.hour,
|
||||
'minutes': this.minute,
|
||||
'seconds': this.second,
|
||||
'meridian': this.meridian
|
||||
}
|
||||
});
|
||||
|
||||
if (this.template === 'modal' && this.$widget.modal) {
|
||||
this.$widget.modal('hide');
|
||||
} else {
|
||||
this.$widget.removeClass('open');
|
||||
}
|
||||
|
||||
$(document).off('mousedown.timepicker');
|
||||
|
||||
this.isOpen = false;
|
||||
},
|
||||
|
||||
highlightUnit: function() {
|
||||
this.position = this.getCursorPosition();
|
||||
if (this.position >= 0 && this.position <= 2) {
|
||||
this.highlightHour();
|
||||
} else if (this.position >= 3 && this.position <= 5) {
|
||||
this.highlightMinute();
|
||||
} else if (this.position >= 6 && this.position <= 8) {
|
||||
if (this.showSeconds) {
|
||||
this.highlightSecond();
|
||||
} else {
|
||||
this.highlightMeridian();
|
||||
}
|
||||
} else if (this.position >= 9 && this.position <= 11) {
|
||||
this.highlightMeridian();
|
||||
}
|
||||
},
|
||||
|
||||
highlightNextUnit: function() {
|
||||
switch (this.highlightedUnit) {
|
||||
case 'hour':
|
||||
this.highlightMinute();
|
||||
break;
|
||||
case 'minute':
|
||||
if (this.showSeconds) {
|
||||
this.highlightSecond();
|
||||
} else if (this.showMeridian){
|
||||
this.highlightMeridian();
|
||||
} else {
|
||||
this.highlightHour();
|
||||
}
|
||||
break;
|
||||
case 'second':
|
||||
if (this.showMeridian) {
|
||||
this.highlightMeridian();
|
||||
} else {
|
||||
this.highlightHour();
|
||||
}
|
||||
break;
|
||||
case 'meridian':
|
||||
this.highlightHour();
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
highlightPrevUnit: function() {
|
||||
switch (this.highlightedUnit) {
|
||||
case 'hour':
|
||||
this.highlightMeridian();
|
||||
break;
|
||||
case 'minute':
|
||||
this.highlightHour();
|
||||
break;
|
||||
case 'second':
|
||||
this.highlightMinute();
|
||||
break;
|
||||
case 'meridian':
|
||||
if (this.showSeconds) {
|
||||
this.highlightSecond();
|
||||
} else {
|
||||
this.highlightMinute();
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
highlightHour: function() {
|
||||
var $element = this.$element.get(0);
|
||||
|
||||
this.highlightedUnit = 'hour';
|
||||
|
||||
if ($element.setSelectionRange) {
|
||||
setTimeout(function() {
|
||||
$element.setSelectionRange(0,2);
|
||||
}, 0);
|
||||
}
|
||||
},
|
||||
|
||||
highlightMinute: function() {
|
||||
var $element = this.$element.get(0);
|
||||
|
||||
this.highlightedUnit = 'minute';
|
||||
|
||||
if ($element.setSelectionRange) {
|
||||
setTimeout(function() {
|
||||
$element.setSelectionRange(3,5);
|
||||
}, 0);
|
||||
}
|
||||
},
|
||||
|
||||
highlightSecond: function() {
|
||||
var $element = this.$element.get(0);
|
||||
|
||||
this.highlightedUnit = 'second';
|
||||
|
||||
if ($element.setSelectionRange) {
|
||||
setTimeout(function() {
|
||||
$element.setSelectionRange(6,8);
|
||||
}, 0);
|
||||
}
|
||||
},
|
||||
|
||||
highlightMeridian: function() {
|
||||
var $element = this.$element.get(0);
|
||||
|
||||
this.highlightedUnit = 'meridian';
|
||||
|
||||
if ($element.setSelectionRange) {
|
||||
if (this.showSeconds) {
|
||||
setTimeout(function() {
|
||||
$element.setSelectionRange(9,11);
|
||||
}, 0);
|
||||
} else {
|
||||
setTimeout(function() {
|
||||
$element.setSelectionRange(6,8);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
incrementHour: function() {
|
||||
if (this.showMeridian) {
|
||||
if (this.hour === 11) {
|
||||
this.hour++;
|
||||
return this.toggleMeridian();
|
||||
} else if (this.hour === 12) {
|
||||
this.hour = 0;
|
||||
}
|
||||
}
|
||||
if (this.hour === 23) {
|
||||
this.hour = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
this.hour++;
|
||||
this.update();
|
||||
},
|
||||
|
||||
incrementMinute: function(step) {
|
||||
var newVal;
|
||||
|
||||
if (step) {
|
||||
newVal = this.minute + step;
|
||||
} else {
|
||||
newVal = this.minute + this.minuteStep - (this.minute % this.minuteStep);
|
||||
}
|
||||
|
||||
if (newVal > 59) {
|
||||
this.incrementHour();
|
||||
this.minute = newVal - 60;
|
||||
} else {
|
||||
this.minute = newVal;
|
||||
}
|
||||
this.update();
|
||||
},
|
||||
|
||||
incrementSecond: function() {
|
||||
var newVal = this.second + this.secondStep - (this.second % this.secondStep);
|
||||
|
||||
if (newVal > 59) {
|
||||
this.incrementMinute(true);
|
||||
this.second = newVal - 60;
|
||||
} else {
|
||||
this.second = newVal;
|
||||
}
|
||||
this.update();
|
||||
},
|
||||
|
||||
remove: function() {
|
||||
$('document').off('.timepicker');
|
||||
if (this.$widget) {
|
||||
this.$widget.remove();
|
||||
}
|
||||
delete this.$element.data().timepicker;
|
||||
},
|
||||
|
||||
setDefaultTime: function(defaultTime){
|
||||
if (!this.$element.val()) {
|
||||
if (defaultTime === 'current') {
|
||||
var dTime = new Date(),
|
||||
hours = dTime.getHours(),
|
||||
minutes = Math.floor(dTime.getMinutes() / this.minuteStep) * this.minuteStep,
|
||||
seconds = Math.floor(dTime.getSeconds() / this.secondStep) * this.secondStep,
|
||||
meridian = 'AM';
|
||||
|
||||
if (this.showMeridian) {
|
||||
if (hours === 0) {
|
||||
hours = 12;
|
||||
} else if (hours >= 12) {
|
||||
if (hours > 12) {
|
||||
hours = hours - 12;
|
||||
}
|
||||
meridian = 'PM';
|
||||
} else {
|
||||
meridian = 'AM';
|
||||
}
|
||||
}
|
||||
|
||||
this.hour = hours;
|
||||
this.minute = minutes;
|
||||
this.second = seconds;
|
||||
this.meridian = meridian;
|
||||
|
||||
this.update();
|
||||
|
||||
} else if (defaultTime === false) {
|
||||
this.hour = 0;
|
||||
this.minute = 0;
|
||||
this.second = 0;
|
||||
this.meridian = 'AM';
|
||||
} else {
|
||||
this.setTime(defaultTime);
|
||||
}
|
||||
} else {
|
||||
this.updateFromElementVal();
|
||||
}
|
||||
},
|
||||
|
||||
setTime: function(time) {
|
||||
var arr,
|
||||
timeArray;
|
||||
|
||||
if (this.showMeridian) {
|
||||
arr = time.split(' ');
|
||||
timeArray = arr[0].split(':');
|
||||
this.meridian = arr[1];
|
||||
} else {
|
||||
timeArray = time.split(':');
|
||||
}
|
||||
|
||||
this.hour = parseInt(timeArray[0], 10);
|
||||
this.minute = parseInt(timeArray[1], 10);
|
||||
this.second = parseInt(timeArray[2], 10);
|
||||
|
||||
if (isNaN(this.hour)) {
|
||||
this.hour = 0;
|
||||
}
|
||||
if (isNaN(this.minute)) {
|
||||
this.minute = 0;
|
||||
}
|
||||
|
||||
if (this.showMeridian) {
|
||||
if (this.hour > 12) {
|
||||
this.hour = 12;
|
||||
} else if (this.hour < 1) {
|
||||
this.hour = 12;
|
||||
}
|
||||
|
||||
if (this.meridian === 'am' || this.meridian === 'a') {
|
||||
this.meridian = 'AM';
|
||||
} else if (this.meridian === 'pm' || this.meridian === 'p') {
|
||||
this.meridian = 'PM';
|
||||
}
|
||||
|
||||
if (this.meridian !== 'AM' && this.meridian !== 'PM') {
|
||||
this.meridian = 'AM';
|
||||
}
|
||||
} else {
|
||||
if (this.hour >= 24) {
|
||||
this.hour = 23;
|
||||
} else if (this.hour < 0) {
|
||||
this.hour = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.minute < 0) {
|
||||
this.minute = 0;
|
||||
} else if (this.minute >= 60) {
|
||||
this.minute = 59;
|
||||
}
|
||||
|
||||
if (this.showSeconds) {
|
||||
if (isNaN(this.second)) {
|
||||
this.second = 0;
|
||||
} else if (this.second < 0) {
|
||||
this.second = 0;
|
||||
} else if (this.second >= 60) {
|
||||
this.second = 59;
|
||||
}
|
||||
}
|
||||
|
||||
this.update();
|
||||
},
|
||||
|
||||
showWidget: function() {
|
||||
if (this.isOpen) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.$element.is(':disabled')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
$(document).on('mousedown.timepicker', function (e) {
|
||||
// Clicked outside the timepicker, hide it
|
||||
if ($(e.target).closest('.bootstrap-timepicker-widget').length === 0) {
|
||||
self.hideWidget();
|
||||
}
|
||||
});
|
||||
|
||||
this.$element.trigger({
|
||||
'type': 'show.timepicker',
|
||||
'time': {
|
||||
'value': this.getTime(),
|
||||
'hours': this.hour,
|
||||
'minutes': this.minute,
|
||||
'seconds': this.second,
|
||||
'meridian': this.meridian
|
||||
}
|
||||
});
|
||||
|
||||
if (this.disableFocus) {
|
||||
this.$element.blur();
|
||||
}
|
||||
|
||||
this.updateFromElementVal();
|
||||
|
||||
if (this.template === 'modal' && this.$widget.modal) {
|
||||
this.$widget.modal('show').on('hidden', $.proxy(this.hideWidget, this));
|
||||
} else {
|
||||
if (this.isOpen === false) {
|
||||
this.$widget.addClass('open');
|
||||
}
|
||||
}
|
||||
|
||||
this.isOpen = true;
|
||||
},
|
||||
|
||||
toggleMeridian: function() {
|
||||
this.meridian = this.meridian === 'AM' ? 'PM' : 'AM';
|
||||
this.update();
|
||||
},
|
||||
|
||||
update: function() {
|
||||
this.$element.trigger({
|
||||
'type': 'changeTime.timepicker',
|
||||
'time': {
|
||||
'value': this.getTime(),
|
||||
'hours': this.hour,
|
||||
'minutes': this.minute,
|
||||
'seconds': this.second,
|
||||
'meridian': this.meridian
|
||||
}
|
||||
});
|
||||
|
||||
this.updateElement();
|
||||
this.updateWidget();
|
||||
},
|
||||
|
||||
updateElement: function() {
|
||||
this.$element.val(this.getTime()).change();
|
||||
},
|
||||
|
||||
updateFromElementVal: function() {
|
||||
var val = this.$element.val();
|
||||
|
||||
if (val) {
|
||||
this.setTime(val);
|
||||
}
|
||||
},
|
||||
|
||||
updateWidget: function() {
|
||||
if (this.$widget === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
var hour = this.hour < 10 ? '0' + this.hour : this.hour,
|
||||
minute = this.minute < 10 ? '0' + this.minute : this.minute,
|
||||
second = this.second < 10 ? '0' + this.second : this.second;
|
||||
|
||||
if (this.showInputs) {
|
||||
this.$widget.find('input.bootstrap-timepicker-hour').val(hour);
|
||||
this.$widget.find('input.bootstrap-timepicker-minute').val(minute);
|
||||
|
||||
if (this.showSeconds) {
|
||||
this.$widget.find('input.bootstrap-timepicker-second').val(second);
|
||||
}
|
||||
if (this.showMeridian) {
|
||||
this.$widget.find('input.bootstrap-timepicker-meridian').val(this.meridian);
|
||||
}
|
||||
} else {
|
||||
this.$widget.find('span.bootstrap-timepicker-hour').text(hour);
|
||||
this.$widget.find('span.bootstrap-timepicker-minute').text(minute);
|
||||
|
||||
if (this.showSeconds) {
|
||||
this.$widget.find('span.bootstrap-timepicker-second').text(second);
|
||||
}
|
||||
if (this.showMeridian) {
|
||||
this.$widget.find('span.bootstrap-timepicker-meridian').text(this.meridian);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
updateFromWidgetInputs: function() {
|
||||
if (this.$widget === false) {
|
||||
return;
|
||||
}
|
||||
var time = $('input.bootstrap-timepicker-hour', this.$widget).val() + ':' +
|
||||
$('input.bootstrap-timepicker-minute', this.$widget).val() +
|
||||
(this.showSeconds ? ':' + $('input.bootstrap-timepicker-second', this.$widget).val() : '') +
|
||||
(this.showMeridian ? ' ' + $('input.bootstrap-timepicker-meridian', this.$widget).val() : '');
|
||||
|
||||
this.setTime(time);
|
||||
},
|
||||
|
||||
widgetClick: function(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
var action = $(e.target).closest('a').data('action');
|
||||
if (action) {
|
||||
this[action]();
|
||||
}
|
||||
},
|
||||
|
||||
widgetKeydown: function(e) {
|
||||
var $input = $(e.target).closest('input'),
|
||||
name = $input.attr('name');
|
||||
|
||||
switch (e.keyCode) {
|
||||
case 9: //tab
|
||||
if (this.showMeridian) {
|
||||
if (name === 'meridian') {
|
||||
return this.hideWidget();
|
||||
}
|
||||
} else {
|
||||
if (this.showSeconds) {
|
||||
if (name === 'second') {
|
||||
return this.hideWidget();
|
||||
}
|
||||
} else {
|
||||
if (name === 'minute') {
|
||||
return this.hideWidget();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.updateFromWidgetInputs();
|
||||
break;
|
||||
case 27: // escape
|
||||
this.hideWidget();
|
||||
break;
|
||||
case 38: // up arrow
|
||||
e.preventDefault();
|
||||
switch (name) {
|
||||
case 'hour':
|
||||
this.incrementHour();
|
||||
break;
|
||||
case 'minute':
|
||||
this.incrementMinute();
|
||||
break;
|
||||
case 'second':
|
||||
this.incrementSecond();
|
||||
break;
|
||||
case 'meridian':
|
||||
this.toggleMeridian();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 40: // down arrow
|
||||
e.preventDefault();
|
||||
switch (name) {
|
||||
case 'hour':
|
||||
this.decrementHour();
|
||||
break;
|
||||
case 'minute':
|
||||
this.decrementMinute();
|
||||
break;
|
||||
case 'second':
|
||||
this.decrementSecond();
|
||||
break;
|
||||
case 'meridian':
|
||||
this.toggleMeridian();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//TIMEPICKER PLUGIN DEFINITION
|
||||
$.fn.timepicker = function(option) {
|
||||
var args = Array.apply(null, arguments);
|
||||
args.shift();
|
||||
return this.each(function() {
|
||||
var $this = $(this),
|
||||
data = $this.data('timepicker'),
|
||||
options = typeof option === 'object' && option;
|
||||
|
||||
if (!data) {
|
||||
$this.data('timepicker', (data = new Timepicker(this, $.extend({}, $.fn.timepicker.defaults, options, $(this).data()))));
|
||||
}
|
||||
|
||||
if (typeof option === 'string') {
|
||||
data[option].apply(data, args);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.timepicker.defaults = {
|
||||
defaultTime: 'current',
|
||||
disableFocus: false,
|
||||
isOpen: false,
|
||||
minuteStep: 15,
|
||||
modalBackdrop: false,
|
||||
secondStep: 15,
|
||||
showSeconds: false,
|
||||
showInputs: true,
|
||||
showMeridian: true,
|
||||
template: 'dropdown',
|
||||
appendWidgetTo: '.bootstrap-timepicker',
|
||||
upArrowStyle: 'glyphicon glyphicon-chevron-up',
|
||||
downArrowStyle: 'glyphicon glyphicon-chevron-down',
|
||||
containerClass: 'bootstrap-timepicker'
|
||||
};
|
||||
|
||||
$.fn.timepicker.Constructor = Timepicker;
|
||||
|
||||
})(jQuery, window, document);
|
||||
5
js/bootstrap-timepicker.min.js
vendored
2002
js/bootstrap.js
vendored
9
js/bootstrap.min.js
vendored
306
js/dashboard.js
Normal file
@@ -0,0 +1,306 @@
|
||||
/*
|
||||
* Author: Abdullah A Almsaeed
|
||||
* Date: 4 Jan 2014
|
||||
* Description:
|
||||
* This is a demo file used only for the main dashboard (index.html)
|
||||
**/
|
||||
|
||||
$(function() {
|
||||
"use strict";
|
||||
|
||||
//Make the dashboard widgets sortable Using jquery UI
|
||||
$(".connectedSortable").sortable({
|
||||
placeholder: "sort-highlight",
|
||||
connectWith: ".connectedSortable",
|
||||
handle: ".box-header, .nav-tabs",
|
||||
forcePlaceholderSize: true,
|
||||
zIndex: 999999
|
||||
}).disableSelection();
|
||||
$(".box-header, .nav-tabs").css("cursor","move");
|
||||
//jQuery UI sortable for the todo list
|
||||
$(".todo-list").sortable({
|
||||
placeholder: "sort-highlight",
|
||||
handle: ".handle",
|
||||
forcePlaceholderSize: true,
|
||||
zIndex: 999999
|
||||
}).disableSelection();;
|
||||
|
||||
//bootstrap WYSIHTML5 - text editor
|
||||
$(".textarea").wysihtml5();
|
||||
|
||||
$('.daterange').daterangepicker(
|
||||
{
|
||||
ranges: {
|
||||
'Today': [moment(), moment()],
|
||||
'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],
|
||||
'Last 7 Days': [moment().subtract('days', 6), moment()],
|
||||
'Last 30 Days': [moment().subtract('days', 29), moment()],
|
||||
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
||||
'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
|
||||
},
|
||||
startDate: moment().subtract('days', 29),
|
||||
endDate: moment()
|
||||
},
|
||||
function(start, end) {
|
||||
alert("You chose: " + start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
|
||||
});
|
||||
|
||||
/* jQueryKnob */
|
||||
$(".knob").knob();
|
||||
|
||||
//jvectormap data
|
||||
var visitorsData = {
|
||||
"US": 398, //USA
|
||||
"SA": 400, //Saudi Arabia
|
||||
"CA": 1000, //Canada
|
||||
"DE": 500, //Germany
|
||||
"FR": 760, //France
|
||||
"CN": 300, //China
|
||||
"AU": 700, //Australia
|
||||
"BR": 600, //Brazil
|
||||
"IN": 800, //India
|
||||
"GB": 320, //Great Britain
|
||||
"RU": 3000 //Russia
|
||||
};
|
||||
//World map by jvectormap
|
||||
$('#world-map').vectorMap({
|
||||
map: 'world_mill_en',
|
||||
backgroundColor: "#fff",
|
||||
regionStyle: {
|
||||
initial: {
|
||||
fill: '#e4e4e4',
|
||||
"fill-opacity": 1,
|
||||
stroke: 'none',
|
||||
"stroke-width": 0,
|
||||
"stroke-opacity": 1
|
||||
}
|
||||
},
|
||||
series: {
|
||||
regions: [{
|
||||
values: visitorsData,
|
||||
scale: ["#3c8dbc", "#2D79A6"], //['#3E5E6B', '#A6BAC2'],
|
||||
normalizeFunction: 'polynomial'
|
||||
}]
|
||||
},
|
||||
onRegionLabelShow: function(e, el, code) {
|
||||
if (typeof visitorsData[code] != "undefined")
|
||||
el.html(el.html() + ': ' + visitorsData[code] + ' new visitors');
|
||||
}
|
||||
});
|
||||
|
||||
//Sparkline charts
|
||||
var myvalues = [15, 19, 20, -22, -33, 27, 31, 27, 19, 30, 21];
|
||||
$('#sparkline-1').sparkline(myvalues, {
|
||||
type: 'bar',
|
||||
barColor: '#00a65a',
|
||||
negBarColor: "#f56954",
|
||||
height: '20px'
|
||||
});
|
||||
myvalues = [15, 19, 20, 22, -2, -10, -7, 27, 19, 30, 21];
|
||||
$('#sparkline-2').sparkline(myvalues, {
|
||||
type: 'bar',
|
||||
barColor: '#00a65a',
|
||||
negBarColor: "#f56954",
|
||||
height: '20px'
|
||||
});
|
||||
myvalues = [15, -19, -20, 22, 33, 27, 31, 27, 19, 30, 21];
|
||||
$('#sparkline-3').sparkline(myvalues, {
|
||||
type: 'bar',
|
||||
barColor: '#00a65a',
|
||||
negBarColor: "#f56954",
|
||||
height: '20px'
|
||||
});
|
||||
myvalues = [15, 19, 20, 22, 33, -27, -31, 27, 19, 30, 21];
|
||||
$('#sparkline-4').sparkline(myvalues, {
|
||||
type: 'bar',
|
||||
barColor: '#00a65a',
|
||||
negBarColor: "#f56954",
|
||||
height: '20px'
|
||||
});
|
||||
myvalues = [15, 19, 20, 22, 33, 27, 31, -27, -19, 30, 21];
|
||||
$('#sparkline-5').sparkline(myvalues, {
|
||||
type: 'bar',
|
||||
barColor: '#00a65a',
|
||||
negBarColor: "#f56954",
|
||||
height: '20px'
|
||||
});
|
||||
myvalues = [15, 19, -20, 22, -13, 27, 31, 27, 19, 30, 21];
|
||||
$('#sparkline-6').sparkline(myvalues, {
|
||||
type: 'bar',
|
||||
barColor: '#00a65a',
|
||||
negBarColor: "#f56954",
|
||||
height: '20px'
|
||||
});
|
||||
|
||||
//Date for the calendar events (dummy data)
|
||||
var date = new Date();
|
||||
var d = date.getDate(),
|
||||
m = date.getMonth(),
|
||||
y = date.getFullYear();
|
||||
|
||||
//Calendar
|
||||
$('#calendar').fullCalendar({
|
||||
editable: true, //Enable drag and drop
|
||||
events: [
|
||||
{
|
||||
title: 'All Day Event',
|
||||
start: new Date(y, m, 1),
|
||||
backgroundColor: "#3c8dbc", //light-blue
|
||||
borderColor: "#3c8dbc" //light-blue
|
||||
},
|
||||
{
|
||||
title: 'Long Event',
|
||||
start: new Date(y, m, d - 5),
|
||||
end: new Date(y, m, d - 2),
|
||||
backgroundColor: "#f39c12", //yellow
|
||||
borderColor: "#f39c12" //yellow
|
||||
},
|
||||
{
|
||||
title: 'Meeting',
|
||||
start: new Date(y, m, d, 10, 30),
|
||||
allDay: false,
|
||||
backgroundColor: "#0073b7", //Blue
|
||||
borderColor: "#0073b7" //Blue
|
||||
},
|
||||
{
|
||||
title: 'Lunch',
|
||||
start: new Date(y, m, d, 12, 0),
|
||||
end: new Date(y, m, d, 14, 0),
|
||||
allDay: false,
|
||||
backgroundColor: "#00c0ef", //Info (aqua)
|
||||
borderColor: "#00c0ef" //Info (aqua)
|
||||
},
|
||||
{
|
||||
title: 'Birthday Party',
|
||||
start: new Date(y, m, d + 1, 19, 0),
|
||||
end: new Date(y, m, d + 1, 22, 30),
|
||||
allDay: false,
|
||||
backgroundColor: "#00a65a", //Success (green)
|
||||
borderColor: "#00a65a" //Success (green)
|
||||
},
|
||||
{
|
||||
title: 'Click for Google',
|
||||
start: new Date(y, m, 28),
|
||||
end: new Date(y, m, 29),
|
||||
url: 'http://google.com/',
|
||||
backgroundColor: "#f56954", //red
|
||||
borderColor: "#f56954" //red
|
||||
}
|
||||
],
|
||||
buttonText: {//This is to add icons to the visible buttons
|
||||
prev: "<span class='fa fa-caret-left'></span>",
|
||||
next: "<span class='fa fa-caret-right'></span>",
|
||||
today: 'today',
|
||||
month: 'month',
|
||||
week: 'week',
|
||||
day: 'day'
|
||||
},
|
||||
header: {
|
||||
left: 'title',
|
||||
center: '',
|
||||
right: 'prev,next'
|
||||
}
|
||||
});
|
||||
|
||||
//SLIMSCROLL FOR CHAT WIDGET
|
||||
$('#chat-box').slimScroll({
|
||||
height: '250px'
|
||||
});
|
||||
|
||||
/* Morris.js Charts */
|
||||
// Sales chart
|
||||
var area = new Morris.Area({
|
||||
element: 'revenue-chart',
|
||||
resize: true,
|
||||
data: [
|
||||
{y: '2011 Q1', item1: 2666, item2: 2666},
|
||||
{y: '2011 Q2', item1: 2778, item2: 2294},
|
||||
{y: '2011 Q3', item1: 4912, item2: 1969},
|
||||
{y: '2011 Q4', item1: 3767, item2: 3597},
|
||||
{y: '2012 Q1', item1: 6810, item2: 1914},
|
||||
{y: '2012 Q2', item1: 5670, item2: 4293},
|
||||
{y: '2012 Q3', item1: 4820, item2: 3795},
|
||||
{y: '2012 Q4', item1: 15073, item2: 5967},
|
||||
{y: '2013 Q1', item1: 10687, item2: 4460},
|
||||
{y: '2013 Q2', item1: 8432, item2: 5713}
|
||||
],
|
||||
xkey: 'y',
|
||||
ykeys: ['item1', 'item2'],
|
||||
labels: ['Item 1', 'Item 2'],
|
||||
lineColors: ['#a0d0e0', '#3c8dbc'],
|
||||
hideHover: 'auto'
|
||||
});
|
||||
//Donut Chart
|
||||
var donut = new Morris.Donut({
|
||||
element: 'sales-chart',
|
||||
resize: true,
|
||||
colors: ["#3c8dbc", "#f56954", "#00a65a"],
|
||||
data: [
|
||||
{label: "Download Sales", value: 12},
|
||||
{label: "In-Store Sales", value: 30},
|
||||
{label: "Mail-Order Sales", value: 20}
|
||||
],
|
||||
hideHover: 'auto'
|
||||
});
|
||||
//Bar chart
|
||||
var bar = new Morris.Bar({
|
||||
element: 'bar-chart',
|
||||
resize: true,
|
||||
data: [
|
||||
{y: '2006', a: 100, b: 90},
|
||||
{y: '2007', a: 75, b: 65},
|
||||
{y: '2008', a: 50, b: 40},
|
||||
{y: '2009', a: 75, b: 65},
|
||||
{y: '2010', a: 50, b: 40},
|
||||
{y: '2011', a: 75, b: 65},
|
||||
{y: '2012', a: 100, b: 90}
|
||||
],
|
||||
barColors: ['#00a65a', '#f56954'],
|
||||
xkey: 'y',
|
||||
ykeys: ['a', 'b'],
|
||||
labels: ['CPU', 'DISK'],
|
||||
hideHover: 'auto'
|
||||
});
|
||||
//Fix for charts under tabs
|
||||
$('.box ul.nav a').on('shown.bs.tab', function(e) {
|
||||
area.redraw();
|
||||
donut.redraw();
|
||||
});
|
||||
|
||||
|
||||
/* BOX REFRESH PLUGIN EXAMPLE (usage with morris charts) */
|
||||
$("#loading-example").boxRefresh({
|
||||
source: "ajax/dashboard-boxrefresh-demo.php",
|
||||
onLoadDone: function(box) {
|
||||
bar = new Morris.Bar({
|
||||
element: 'bar-chart',
|
||||
resize: true,
|
||||
data: [
|
||||
{y: '2006', a: 100, b: 90},
|
||||
{y: '2007', a: 75, b: 65},
|
||||
{y: '2008', a: 50, b: 40},
|
||||
{y: '2009', a: 75, b: 65},
|
||||
{y: '2010', a: 50, b: 40},
|
||||
{y: '2011', a: 75, b: 65},
|
||||
{y: '2012', a: 100, b: 90}
|
||||
],
|
||||
barColors: ['#00a65a', '#f56954'],
|
||||
xkey: 'y',
|
||||
ykeys: ['a', 'b'],
|
||||
labels: ['CPU', 'DISK'],
|
||||
hideHover: 'auto'
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
/* The todo list plugin */
|
||||
$(".todo-list").todolist({
|
||||
onCheck: function(ele) {
|
||||
//console.log("The element has been checked")
|
||||
},
|
||||
onUncheck: function(ele) {
|
||||
//console.log("The element has been unchecked")
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
@@ -1,876 +0,0 @@
|
||||
/**
|
||||
* @version: 1.2
|
||||
* @author: Dan Grossman http://www.dangrossman.info/
|
||||
* @date: 2013-07-25
|
||||
* @copyright: Copyright (c) 2012-2013 Dan Grossman. All rights reserved.
|
||||
* @license: Licensed under Apache License v2.0. See http://www.apache.org/licenses/LICENSE-2.0
|
||||
* @website: http://www.improvely.com/
|
||||
*/
|
||||
!function ($) {
|
||||
|
||||
var DateRangePicker = function (element, options, cb) {
|
||||
var hasOptions = typeof options == 'object';
|
||||
var localeObject;
|
||||
|
||||
//option defaults
|
||||
|
||||
this.startDate = moment().startOf('day');
|
||||
this.endDate = moment().startOf('day');
|
||||
this.minDate = false;
|
||||
this.maxDate = false;
|
||||
this.dateLimit = false;
|
||||
|
||||
this.showDropdowns = false;
|
||||
this.showWeekNumbers = false;
|
||||
this.timePicker = false;
|
||||
this.timePickerIncrement = 30;
|
||||
this.timePicker12Hour = true;
|
||||
this.ranges = {};
|
||||
this.opens = 'right';
|
||||
|
||||
this.buttonClasses = ['btn', 'btn-small'];
|
||||
this.applyClass = 'btn-success';
|
||||
this.cancelClass = 'btn-default';
|
||||
|
||||
this.format = 'MM/DD/YYYY';
|
||||
this.separator = ' - ';
|
||||
|
||||
this.locale = {
|
||||
applyLabel: 'Apply',
|
||||
cancelLabel: 'Cancel',
|
||||
fromLabel: 'From',
|
||||
toLabel: 'To',
|
||||
weekLabel: 'W',
|
||||
customRangeLabel: 'Custom Range',
|
||||
daysOfWeek: moment()._lang._weekdaysMin.slice(),
|
||||
monthNames: moment()._lang._monthsShort.slice(),
|
||||
firstDay: 0
|
||||
};
|
||||
|
||||
this.cb = function () { };
|
||||
|
||||
// by default, the daterangepicker element is placed at the bottom of HTML body
|
||||
this.parentEl = 'body';
|
||||
|
||||
//element that triggered the date range picker
|
||||
this.element = $(element);
|
||||
|
||||
if (this.element.hasClass('pull-right'))
|
||||
this.opens = 'left';
|
||||
|
||||
if (this.element.is('input')) {
|
||||
this.element.on({
|
||||
click: $.proxy(this.show, this),
|
||||
focus: $.proxy(this.show, this)
|
||||
});
|
||||
} else {
|
||||
this.element.on('click', $.proxy(this.show, this));
|
||||
}
|
||||
|
||||
localeObject = this.locale;
|
||||
|
||||
if (hasOptions) {
|
||||
if (typeof options.locale == 'object') {
|
||||
$.each(localeObject, function (property, value) {
|
||||
localeObject[property] = options.locale[property] || value;
|
||||
});
|
||||
}
|
||||
|
||||
if (options.applyClass) {
|
||||
this.applyClass = options.applyClass;
|
||||
}
|
||||
|
||||
if (options.cancelClass) {
|
||||
this.cancelClass = options.cancelClass;
|
||||
}
|
||||
}
|
||||
|
||||
var DRPTemplate = '<div class="daterangepicker dropdown-menu">' +
|
||||
'<div class="calendar left"></div>' +
|
||||
'<div class="calendar right"></div>' +
|
||||
'<div class="ranges">' +
|
||||
'<div class="range_inputs">' +
|
||||
'<div class="daterangepicker_start_input" style="float: left">' +
|
||||
'<label for="daterangepicker_start">' + this.locale.fromLabel + '</label>' +
|
||||
'<input class="input-mini" type="text" name="daterangepicker_start" value="" disabled="disabled" />' +
|
||||
'</div>' +
|
||||
'<div class="daterangepicker_end_input" style="float: left; padding-left: 11px">' +
|
||||
'<label for="daterangepicker_end">' + this.locale.toLabel + '</label>' +
|
||||
'<input class="input-mini" type="text" name="daterangepicker_end" value="" disabled="disabled" />' +
|
||||
'</div>' +
|
||||
'<button class="' + this.applyClass + ' applyBtn" disabled="disabled">' + this.locale.applyLabel + '</button> ' +
|
||||
'<button class="' + this.cancelClass + ' cancelBtn">' + this.locale.cancelLabel + '</button>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
this.parentEl = (hasOptions && options.parentEl && $(options.parentEl)) || $(this.parentEl);
|
||||
//the date range picker
|
||||
this.container = $(DRPTemplate).appendTo(this.parentEl);
|
||||
|
||||
if (hasOptions) {
|
||||
|
||||
if (typeof options.format == 'string')
|
||||
this.format = options.format;
|
||||
|
||||
if (typeof options.separator == 'string')
|
||||
this.separator = options.separator;
|
||||
|
||||
if (typeof options.startDate == 'string')
|
||||
this.startDate = moment(options.startDate, this.format);
|
||||
|
||||
if (typeof options.endDate == 'string')
|
||||
this.endDate = moment(options.endDate, this.format);
|
||||
|
||||
if (typeof options.minDate == 'string')
|
||||
this.minDate = moment(options.minDate, this.format);
|
||||
|
||||
if (typeof options.maxDate == 'string')
|
||||
this.maxDate = moment(options.maxDate, this.format);
|
||||
|
||||
if (typeof options.startDate == 'object')
|
||||
this.startDate = moment(options.startDate);
|
||||
|
||||
if (typeof options.endDate == 'object')
|
||||
this.endDate = moment(options.endDate);
|
||||
|
||||
if (typeof options.minDate == 'object')
|
||||
this.minDate = moment(options.minDate);
|
||||
|
||||
if (typeof options.maxDate == 'object')
|
||||
this.maxDate = moment(options.maxDate);
|
||||
|
||||
if (typeof options.ranges == 'object') {
|
||||
for (var range in options.ranges) {
|
||||
|
||||
var start = moment(options.ranges[range][0]);
|
||||
var end = moment(options.ranges[range][1]);
|
||||
|
||||
// If we have a min/max date set, bound this range
|
||||
// to it, but only if it would otherwise fall
|
||||
// outside of the min/max.
|
||||
if (this.minDate && start.isBefore(this.minDate))
|
||||
start = moment(this.minDate);
|
||||
|
||||
if (this.maxDate && end.isAfter(this.maxDate))
|
||||
end = moment(this.maxDate);
|
||||
|
||||
// If the end of the range is before the minimum (if min is set) OR
|
||||
// the start of the range is after the max (also if set) don't display this
|
||||
// range option.
|
||||
if ((this.minDate && end.isBefore(this.minDate)) || (this.maxDate && start.isAfter(this.maxDate))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
this.ranges[range] = [start, end];
|
||||
}
|
||||
|
||||
var list = '<ul>';
|
||||
for (var range in this.ranges) {
|
||||
list += '<li>' + range + '</li>';
|
||||
}
|
||||
list += '<li>' + this.locale.customRangeLabel + '</li>';
|
||||
list += '</ul>';
|
||||
this.container.find('.ranges').prepend(list);
|
||||
}
|
||||
|
||||
if (typeof options.dateLimit == 'object')
|
||||
this.dateLimit = options.dateLimit;
|
||||
|
||||
// update day names order to firstDay
|
||||
if (typeof options.locale == 'object') {
|
||||
|
||||
if (typeof options.locale.daysOfWeek == 'object') {
|
||||
|
||||
// Create a copy of daysOfWeek to avoid modification of original
|
||||
// options object for reusability in multiple daterangepicker instances
|
||||
this.locale.daysOfWeek = options.locale.daysOfWeek.slice();
|
||||
}
|
||||
|
||||
if (typeof options.locale.firstDay == 'number') {
|
||||
this.locale.firstDay = options.locale.firstDay;
|
||||
var iterator = options.locale.firstDay;
|
||||
while (iterator > 0) {
|
||||
this.locale.daysOfWeek.push(this.locale.daysOfWeek.shift());
|
||||
iterator--;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof options.opens == 'string')
|
||||
this.opens = options.opens;
|
||||
|
||||
if (typeof options.showWeekNumbers == 'boolean') {
|
||||
this.showWeekNumbers = options.showWeekNumbers;
|
||||
}
|
||||
|
||||
if (typeof options.buttonClasses == 'string') {
|
||||
this.buttonClasses = [options.buttonClasses];
|
||||
}
|
||||
|
||||
if (typeof options.buttonClasses == 'object') {
|
||||
this.buttonClasses = options.buttonClasses;
|
||||
}
|
||||
|
||||
if (typeof options.showDropdowns == 'boolean') {
|
||||
this.showDropdowns = options.showDropdowns;
|
||||
}
|
||||
|
||||
if (typeof options.timePicker == 'boolean') {
|
||||
this.timePicker = options.timePicker;
|
||||
}
|
||||
|
||||
if (typeof options.timePickerIncrement == 'number') {
|
||||
this.timePickerIncrement = options.timePickerIncrement;
|
||||
}
|
||||
|
||||
if (typeof options.timePicker12Hour == 'boolean') {
|
||||
this.timePicker12Hour = options.timePicker12Hour;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!this.timePicker) {
|
||||
this.startDate = this.startDate.startOf('day');
|
||||
this.endDate = this.endDate.startOf('day');
|
||||
}
|
||||
|
||||
//apply CSS classes to buttons
|
||||
var c = this.container;
|
||||
$.each(this.buttonClasses, function (idx, val) {
|
||||
c.find('button').addClass(val);
|
||||
});
|
||||
|
||||
if (this.opens == 'right') {
|
||||
//swap calendar positions
|
||||
var left = this.container.find('.calendar.left');
|
||||
var right = this.container.find('.calendar.right');
|
||||
left.removeClass('left').addClass('right');
|
||||
right.removeClass('right').addClass('left');
|
||||
}
|
||||
|
||||
if (typeof options == 'undefined' || typeof options.ranges == 'undefined') {
|
||||
this.container.find('.calendar').show();
|
||||
this.move();
|
||||
}
|
||||
|
||||
if (typeof cb == 'function')
|
||||
this.cb = cb;
|
||||
|
||||
this.container.addClass('opens' + this.opens);
|
||||
|
||||
//try parse date if in text input
|
||||
if (!hasOptions || (typeof options.startDate == 'undefined' && typeof options.endDate == 'undefined')) {
|
||||
if ($(this.element).is('input[type=text]')) {
|
||||
var val = $(this.element).val();
|
||||
var split = val.split(this.separator);
|
||||
var start, end;
|
||||
if (split.length == 2) {
|
||||
start = moment(split[0], this.format);
|
||||
end = moment(split[1], this.format);
|
||||
}
|
||||
if (start != null && end != null) {
|
||||
this.startDate = start;
|
||||
this.endDate = end;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//state
|
||||
this.oldStartDate = this.startDate.clone();
|
||||
this.oldEndDate = this.endDate.clone();
|
||||
|
||||
this.leftCalendar = {
|
||||
month: moment([this.startDate.year(), this.startDate.month(), 1, this.startDate.hour(), this.startDate.minute()]),
|
||||
calendar: []
|
||||
};
|
||||
|
||||
this.rightCalendar = {
|
||||
month: moment([this.endDate.year(), this.endDate.month(), 1, this.endDate.hour(), this.endDate.minute()]),
|
||||
calendar: []
|
||||
};
|
||||
|
||||
//event listeners
|
||||
this.container.on('mousedown', $.proxy(this.mousedown, this));
|
||||
|
||||
this.container.find('.calendar')
|
||||
.on('click', '.prev', $.proxy(this.clickPrev, this))
|
||||
.on('click', '.next', $.proxy(this.clickNext, this))
|
||||
.on('click', 'td.available', $.proxy(this.clickDate, this))
|
||||
.on('mouseenter', 'td.available', $.proxy(this.enterDate, this))
|
||||
.on('mouseleave', 'td.available', $.proxy(this.updateFormInputs, this))
|
||||
.on('change', 'select.yearselect', $.proxy(this.updateMonthYear, this))
|
||||
.on('change', 'select.monthselect', $.proxy(this.updateMonthYear, this))
|
||||
.on('change', 'select.hourselect,select.minuteselect,select.ampmselect', $.proxy(this.updateTime, this));
|
||||
|
||||
this.container.find('.ranges')
|
||||
.on('click', 'button.applyBtn', $.proxy(this.clickApply, this))
|
||||
.on('click', 'button.cancelBtn', $.proxy(this.clickCancel, this))
|
||||
.on('click', '.daterangepicker_start_input,.daterangepicker_end_input', $.proxy(this.showCalendars, this))
|
||||
.on('click', 'li', $.proxy(this.clickRange, this))
|
||||
.on('mouseenter', 'li', $.proxy(this.enterRange, this))
|
||||
.on('mouseleave', 'li', $.proxy(this.updateFormInputs, this));
|
||||
|
||||
this.element.on('keyup', $.proxy(this.updateFromControl, this));
|
||||
|
||||
this.updateView();
|
||||
this.updateCalendars();
|
||||
|
||||
};
|
||||
|
||||
DateRangePicker.prototype = {
|
||||
|
||||
constructor: DateRangePicker,
|
||||
|
||||
mousedown: function (e) {
|
||||
e.stopPropagation();
|
||||
},
|
||||
|
||||
updateView: function () {
|
||||
this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year());
|
||||
this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year());
|
||||
this.updateFormInputs();
|
||||
},
|
||||
|
||||
updateFormInputs: function () {
|
||||
this.container.find('input[name=daterangepicker_start]').val(this.startDate.format(this.format));
|
||||
this.container.find('input[name=daterangepicker_end]').val(this.endDate.format(this.format));
|
||||
|
||||
if (this.startDate.isSame(this.endDate) || this.startDate.isBefore(this.endDate)) {
|
||||
this.container.find('button.applyBtn').removeAttr('disabled');
|
||||
} else {
|
||||
this.container.find('button.applyBtn').attr('disabled', 'disabled');
|
||||
}
|
||||
},
|
||||
|
||||
updateFromControl: function () {
|
||||
if (!this.element.is('input')) return;
|
||||
if (!this.element.val().length) return;
|
||||
|
||||
var dateString = this.element.val().split(this.separator);
|
||||
var start = moment(dateString[0], this.format);
|
||||
var end = moment(dateString[1], this.format);
|
||||
|
||||
if (start == null || end == null) return;
|
||||
if (end.isBefore(start)) return;
|
||||
|
||||
this.oldStartDate = this.startDate.clone();
|
||||
this.oldEndDate = this.endDate.clone();
|
||||
|
||||
this.startDate = start;
|
||||
this.endDate = end;
|
||||
|
||||
if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate))
|
||||
this.notify();
|
||||
|
||||
this.updateCalendars();
|
||||
},
|
||||
|
||||
notify: function () {
|
||||
this.updateView();
|
||||
this.cb(this.startDate, this.endDate);
|
||||
},
|
||||
|
||||
move: function () {
|
||||
var parentOffset = {
|
||||
top: this.parentEl.offset().top - (this.parentEl.is('body') ? 0 : this.parentEl.scrollTop()),
|
||||
left: this.parentEl.offset().left - (this.parentEl.is('body') ? 0 : this.parentEl.scrollLeft())
|
||||
};
|
||||
if (this.opens == 'left') {
|
||||
this.container.css({
|
||||
top: this.element.offset().top + this.element.outerHeight() - parentOffset.top,
|
||||
right: $(window).width() - this.element.offset().left - this.element.outerWidth() - parentOffset.left,
|
||||
left: 'auto'
|
||||
});
|
||||
if (this.container.offset().left < 0) {
|
||||
this.container.css({
|
||||
right: 'auto',
|
||||
left: 9
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.container.css({
|
||||
top: this.element.offset().top + this.element.outerHeight() - parentOffset.top,
|
||||
left: this.element.offset().left - parentOffset.left,
|
||||
right: 'auto'
|
||||
});
|
||||
if (this.container.offset().left + this.container.outerWidth() > $(window).width()) {
|
||||
this.container.css({
|
||||
left: 'auto',
|
||||
right: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
show: function (e) {
|
||||
this.container.show();
|
||||
this.move();
|
||||
|
||||
if (e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
$(document).on('mousedown', $.proxy(this.hide, this));
|
||||
this.element.trigger('shown', {target: e.target, picker: this});
|
||||
},
|
||||
|
||||
hide: function (e) {
|
||||
this.container.hide();
|
||||
|
||||
if (!this.startDate.isSame(this.oldStartDate) || !this.endDate.isSame(this.oldEndDate))
|
||||
this.notify();
|
||||
|
||||
this.oldStartDate = this.startDate.clone();
|
||||
this.oldEndDate = this.endDate.clone();
|
||||
|
||||
$(document).off('mousedown', this.hide);
|
||||
this.element.trigger('hidden', { picker: this });
|
||||
},
|
||||
|
||||
enterRange: function (e) {
|
||||
var label = e.target.innerHTML;
|
||||
if (label == this.locale.customRangeLabel) {
|
||||
this.updateView();
|
||||
} else {
|
||||
var dates = this.ranges[label];
|
||||
this.container.find('input[name=daterangepicker_start]').val(dates[0].format(this.format));
|
||||
this.container.find('input[name=daterangepicker_end]').val(dates[1].format(this.format));
|
||||
}
|
||||
},
|
||||
|
||||
showCalendars: function() {
|
||||
this.container.find('.calendar').show();
|
||||
this.move();
|
||||
},
|
||||
|
||||
updateInputText: function() {
|
||||
if (this.element.is('input'))
|
||||
this.element.val(this.startDate.format(this.format) + this.separator + this.endDate.format(this.format));
|
||||
},
|
||||
|
||||
clickRange: function (e) {
|
||||
var label = e.target.innerHTML;
|
||||
if (label == this.locale.customRangeLabel) {
|
||||
this.showCalendars();
|
||||
} else {
|
||||
var dates = this.ranges[label];
|
||||
|
||||
this.startDate = dates[0];
|
||||
this.endDate = dates[1];
|
||||
|
||||
if (!this.timePicker) {
|
||||
this.startDate.startOf('day');
|
||||
this.endDate.startOf('day');
|
||||
}
|
||||
|
||||
this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year()).hour(this.startDate.hour()).minute(this.startDate.minute());
|
||||
this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year()).hour(this.endDate.hour()).minute(this.endDate.minute());
|
||||
this.updateCalendars();
|
||||
|
||||
this.updateInputText();
|
||||
|
||||
this.container.find('.calendar').hide();
|
||||
this.hide();
|
||||
}
|
||||
},
|
||||
|
||||
clickPrev: function (e) {
|
||||
var cal = $(e.target).parents('.calendar');
|
||||
if (cal.hasClass('left')) {
|
||||
this.leftCalendar.month.subtract('month', 1);
|
||||
} else {
|
||||
this.rightCalendar.month.subtract('month', 1);
|
||||
}
|
||||
this.updateCalendars();
|
||||
},
|
||||
|
||||
clickNext: function (e) {
|
||||
var cal = $(e.target).parents('.calendar');
|
||||
if (cal.hasClass('left')) {
|
||||
this.leftCalendar.month.add('month', 1);
|
||||
} else {
|
||||
this.rightCalendar.month.add('month', 1);
|
||||
}
|
||||
this.updateCalendars();
|
||||
},
|
||||
|
||||
enterDate: function (e) {
|
||||
|
||||
var title = $(e.target).attr('data-title');
|
||||
var row = title.substr(1, 1);
|
||||
var col = title.substr(3, 1);
|
||||
var cal = $(e.target).parents('.calendar');
|
||||
|
||||
if (cal.hasClass('left')) {
|
||||
this.container.find('input[name=daterangepicker_start]').val(this.leftCalendar.calendar[row][col].format(this.format));
|
||||
} else {
|
||||
this.container.find('input[name=daterangepicker_end]').val(this.rightCalendar.calendar[row][col].format(this.format));
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
clickDate: function (e) {
|
||||
var title = $(e.target).attr('data-title');
|
||||
var row = title.substr(1, 1);
|
||||
var col = title.substr(3, 1);
|
||||
var cal = $(e.target).parents('.calendar');
|
||||
|
||||
if (cal.hasClass('left')) {
|
||||
var startDate = this.leftCalendar.calendar[row][col];
|
||||
var endDate = this.endDate;
|
||||
if (typeof this.dateLimit == 'object') {
|
||||
var maxDate = moment(startDate).add(this.dateLimit).startOf('day');
|
||||
if (endDate.isAfter(maxDate)) {
|
||||
endDate = maxDate;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
var startDate = this.startDate;
|
||||
var endDate = this.rightCalendar.calendar[row][col];
|
||||
if (typeof this.dateLimit == 'object') {
|
||||
var minDate = moment(endDate).subtract(this.dateLimit).startOf('day');
|
||||
if (startDate.isBefore(minDate)) {
|
||||
startDate = minDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cal.find('td').removeClass('active');
|
||||
|
||||
if (startDate.isSame(endDate) || startDate.isBefore(endDate)) {
|
||||
$(e.target).addClass('active');
|
||||
this.startDate = startDate;
|
||||
this.endDate = endDate;
|
||||
} else if (startDate.isAfter(endDate)) {
|
||||
$(e.target).addClass('active');
|
||||
this.startDate = startDate;
|
||||
this.endDate = moment(startDate).add('day', 1).startOf('day');
|
||||
}
|
||||
|
||||
this.leftCalendar.month.month(this.startDate.month()).year(this.startDate.year());
|
||||
this.rightCalendar.month.month(this.endDate.month()).year(this.endDate.year());
|
||||
this.updateCalendars();
|
||||
},
|
||||
|
||||
clickApply: function (e) {
|
||||
this.updateInputText();
|
||||
this.hide();
|
||||
},
|
||||
|
||||
clickCancel: function (e) {
|
||||
this.startDate = this.oldStartDate;
|
||||
this.endDate = this.oldEndDate;
|
||||
this.updateView();
|
||||
this.updateCalendars();
|
||||
this.hide();
|
||||
},
|
||||
|
||||
updateMonthYear: function (e) {
|
||||
|
||||
var isLeft = $(e.target).closest('.calendar').hasClass('left');
|
||||
var cal = this.container.find('.calendar.left');
|
||||
if (!isLeft)
|
||||
cal = this.container.find('.calendar.right');
|
||||
|
||||
// Month must be Number for new moment versions
|
||||
var month = parseInt(cal.find('.monthselect').val(), 10);
|
||||
var year = cal.find('.yearselect').val();
|
||||
|
||||
if (isLeft) {
|
||||
this.leftCalendar.month.month(month).year(year);
|
||||
} else {
|
||||
this.rightCalendar.month.month(month).year(year);
|
||||
}
|
||||
|
||||
this.updateCalendars();
|
||||
|
||||
},
|
||||
|
||||
updateTime: function(e) {
|
||||
|
||||
var isLeft = $(e.target).closest('.calendar').hasClass('left');
|
||||
var cal = this.container.find('.calendar.left');
|
||||
if (!isLeft)
|
||||
cal = this.container.find('.calendar.right');
|
||||
|
||||
var hour = parseInt(cal.find('.hourselect').val());
|
||||
var minute = parseInt(cal.find('.minuteselect').val());
|
||||
|
||||
if (this.timePicker12Hour) {
|
||||
var ampm = cal.find('.ampmselect').val();
|
||||
if (ampm == 'PM' && hour < 12)
|
||||
hour += 12;
|
||||
if (ampm == 'AM' && hour == 12)
|
||||
hour = 0;
|
||||
}
|
||||
|
||||
if (isLeft) {
|
||||
var start = this.startDate.clone();
|
||||
start.hour(hour);
|
||||
start.minute(minute);
|
||||
this.startDate = start;
|
||||
this.leftCalendar.month.hour(hour).minute(minute);
|
||||
} else {
|
||||
var end = this.endDate.clone();
|
||||
end.hour(hour);
|
||||
end.minute(minute);
|
||||
this.endDate = end;
|
||||
this.rightCalendar.month.hour(hour).minute(minute);
|
||||
}
|
||||
|
||||
this.updateCalendars();
|
||||
|
||||
},
|
||||
|
||||
updateCalendars: function () {
|
||||
this.leftCalendar.calendar = this.buildCalendar(this.leftCalendar.month.month(), this.leftCalendar.month.year(), this.leftCalendar.month.hour(), this.leftCalendar.month.minute(), 'left');
|
||||
this.rightCalendar.calendar = this.buildCalendar(this.rightCalendar.month.month(), this.rightCalendar.month.year(), this.rightCalendar.month.hour(), this.rightCalendar.month.minute(), 'right');
|
||||
this.container.find('.calendar.left').html(this.renderCalendar(this.leftCalendar.calendar, this.startDate, this.minDate, this.maxDate));
|
||||
this.container.find('.calendar.right').html(this.renderCalendar(this.rightCalendar.calendar, this.endDate, this.startDate, this.maxDate));
|
||||
|
||||
this.container.find('.ranges li').removeClass('active');
|
||||
var customRange = true;
|
||||
var i = 0;
|
||||
for (var range in this.ranges) {
|
||||
if (this.timePicker) {
|
||||
if (this.startDate.isSame(this.ranges[range][0]) && this.endDate.isSame(this.ranges[range][1])) {
|
||||
customRange = false;
|
||||
this.container.find('.ranges li:eq(' + i + ')').addClass('active');
|
||||
}
|
||||
} else {
|
||||
//ignore times when comparing dates if time picker is not enabled
|
||||
if (this.startDate.format('YYYY-MM-DD') == this.ranges[range][0].format('YYYY-MM-DD') && this.endDate.format('YYYY-MM-DD') == this.ranges[range][1].format('YYYY-MM-DD')) {
|
||||
customRange = false;
|
||||
this.container.find('.ranges li:eq(' + i + ')').addClass('active');
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
if (customRange)
|
||||
this.container.find('.ranges li:last').addClass('active');
|
||||
},
|
||||
|
||||
buildCalendar: function (month, year, hour, minute, side) {
|
||||
|
||||
var firstDay = moment([year, month, 1]);
|
||||
var lastMonth = moment(firstDay).subtract('month', 1).month();
|
||||
var lastYear = moment(firstDay).subtract('month', 1).year();
|
||||
|
||||
var daysInLastMonth = moment([lastYear, lastMonth]).daysInMonth();
|
||||
|
||||
var dayOfWeek = firstDay.day();
|
||||
|
||||
//initialize a 6 rows x 7 columns array for the calendar
|
||||
var calendar = [];
|
||||
for (var i = 0; i < 6; i++) {
|
||||
calendar[i] = [];
|
||||
}
|
||||
|
||||
//populate the calendar with date objects
|
||||
var startDay = daysInLastMonth - dayOfWeek + this.locale.firstDay + 1;
|
||||
if (startDay > daysInLastMonth)
|
||||
startDay -= 7;
|
||||
|
||||
if (dayOfWeek == this.locale.firstDay)
|
||||
startDay = daysInLastMonth - 6;
|
||||
|
||||
var curDate = moment([lastYear, lastMonth, startDay, 12, minute]);
|
||||
for (var i = 0, col = 0, row = 0; i < 42; i++, col++, curDate = moment(curDate).add('hour', 24)) {
|
||||
if (i > 0 && col % 7 == 0) {
|
||||
col = 0;
|
||||
row++;
|
||||
}
|
||||
calendar[row][col] = curDate.clone().hour(hour);
|
||||
curDate.hour(12);
|
||||
}
|
||||
|
||||
return calendar;
|
||||
|
||||
},
|
||||
|
||||
renderDropdowns: function (selected, minDate, maxDate) {
|
||||
var currentMonth = selected.month();
|
||||
var monthHtml = '<select class="monthselect">';
|
||||
var inMinYear = false;
|
||||
var inMaxYear = false;
|
||||
|
||||
for (var m = 0; m < 12; m++) {
|
||||
if ((!inMinYear || m >= minDate.month()) && (!inMaxYear || m <= maxDate.month())) {
|
||||
monthHtml += "<option value='" + m + "'" +
|
||||
(m === currentMonth ? " selected='selected'" : "") +
|
||||
">" + this.locale.monthNames[m] + "</option>";
|
||||
}
|
||||
}
|
||||
monthHtml += "</select>";
|
||||
|
||||
var currentYear = selected.year();
|
||||
var maxYear = (maxDate && maxDate.year()) || (currentYear + 5);
|
||||
var minYear = (minDate && minDate.year()) || (currentYear - 50);
|
||||
var yearHtml = '<select class="yearselect">';
|
||||
|
||||
for (var y = minYear; y <= maxYear; y++) {
|
||||
yearHtml += '<option value="' + y + '"' +
|
||||
(y === currentYear ? ' selected="selected"' : '') +
|
||||
'>' + y + '</option>';
|
||||
}
|
||||
|
||||
yearHtml += '</select>';
|
||||
|
||||
return monthHtml + yearHtml;
|
||||
},
|
||||
|
||||
renderCalendar: function (calendar, selected, minDate, maxDate) {
|
||||
|
||||
var html = '<div class="calendar-date">';
|
||||
html += '<table class="table-condensed">';
|
||||
html += '<thead>';
|
||||
html += '<tr>';
|
||||
|
||||
// add empty cell for week number
|
||||
if (this.showWeekNumbers)
|
||||
html += '<th></th>';
|
||||
|
||||
if (!minDate || minDate.isBefore(calendar[1][1])) {
|
||||
html += '<th class="prev available"><i class="icon-arrow-left glyphicon glyphicon-arrow-left"></i></th>';
|
||||
} else {
|
||||
html += '<th></th>';
|
||||
}
|
||||
|
||||
var dateHtml = this.locale.monthNames[calendar[1][1].month()] + calendar[1][1].format(" YYYY");
|
||||
|
||||
if (this.showDropdowns) {
|
||||
dateHtml = this.renderDropdowns(calendar[1][1], minDate, maxDate);
|
||||
}
|
||||
|
||||
html += '<th colspan="5" style="width: auto">' + dateHtml + '</th>';
|
||||
if (!maxDate || maxDate.isAfter(calendar[1][1])) {
|
||||
html += '<th class="next available"><i class="icon-arrow-right glyphicon glyphicon-arrow-right"></i></th>';
|
||||
} else {
|
||||
html += '<th></th>';
|
||||
}
|
||||
|
||||
html += '</tr>';
|
||||
html += '<tr>';
|
||||
|
||||
// add week number label
|
||||
if (this.showWeekNumbers)
|
||||
html += '<th class="week">' + this.locale.weekLabel + '</th>';
|
||||
|
||||
$.each(this.locale.daysOfWeek, function (index, dayOfWeek) {
|
||||
html += '<th>' + dayOfWeek + '</th>';
|
||||
});
|
||||
|
||||
html += '</tr>';
|
||||
html += '</thead>';
|
||||
html += '<tbody>';
|
||||
|
||||
for (var row = 0; row < 6; row++) {
|
||||
html += '<tr>';
|
||||
|
||||
// add week number
|
||||
if (this.showWeekNumbers)
|
||||
html += '<td class="week">' + calendar[row][0].week() + '</td>';
|
||||
|
||||
for (var col = 0; col < 7; col++) {
|
||||
var cname = 'available ';
|
||||
cname += (calendar[row][col].month() == calendar[1][1].month()) ? '' : 'off';
|
||||
|
||||
if ((minDate && calendar[row][col].isBefore(minDate)) || (maxDate && calendar[row][col].isAfter(maxDate))) {
|
||||
cname = ' off disabled ';
|
||||
} else if (calendar[row][col].format('YYYY-MM-DD') == selected.format('YYYY-MM-DD')) {
|
||||
cname += ' active ';
|
||||
if (calendar[row][col].format('YYYY-MM-DD') == this.startDate.format('YYYY-MM-DD')) {
|
||||
cname += ' start-date ';
|
||||
}
|
||||
if (calendar[row][col].format('YYYY-MM-DD') == this.endDate.format('YYYY-MM-DD')) {
|
||||
cname += ' end-date ';
|
||||
}
|
||||
} else if (calendar[row][col] >= this.startDate && calendar[row][col] <= this.endDate) {
|
||||
cname += ' in-range ';
|
||||
if (calendar[row][col].isSame(this.startDate)) { cname += ' start-date '; }
|
||||
if (calendar[row][col].isSame(this.endDate)) { cname += ' end-date '; }
|
||||
}
|
||||
|
||||
var title = 'r' + row + 'c' + col;
|
||||
html += '<td class="' + cname.replace(/\s+/g, ' ').replace(/^\s?(.*?)\s?$/, '$1') + '" data-title="' + title + '">' + calendar[row][col].date() + '</td>';
|
||||
}
|
||||
html += '</tr>';
|
||||
}
|
||||
|
||||
html += '</tbody>';
|
||||
html += '</table>';
|
||||
html += '</div>';
|
||||
|
||||
if (this.timePicker) {
|
||||
|
||||
html += '<div class="calendar-time">';
|
||||
html += '<select class="hourselect">';
|
||||
var start = 0;
|
||||
var end = 23;
|
||||
var selected_hour = selected.hour();
|
||||
if (this.timePicker12Hour) {
|
||||
start = 1;
|
||||
end = 12;
|
||||
if (selected_hour >= 12)
|
||||
selected_hour -= 12;
|
||||
if (selected_hour == 0)
|
||||
selected_hour = 12;
|
||||
}
|
||||
|
||||
for (var i = start; i <= end; i++) {
|
||||
if (i == selected_hour) {
|
||||
html += '<option value="' + i + '" selected="selected">' + i + '</option>';
|
||||
} else {
|
||||
html += '<option value="' + i + '">' + i + '</option>';
|
||||
}
|
||||
}
|
||||
|
||||
html += '</select> : ';
|
||||
|
||||
html += '<select class="minuteselect">';
|
||||
|
||||
for (var i = 0; i < 60; i += this.timePickerIncrement) {
|
||||
var num = i;
|
||||
if (num < 10)
|
||||
num = '0' + num;
|
||||
if (i == selected.minute()) {
|
||||
html += '<option value="' + i + '" selected="selected">' + num + '</option>';
|
||||
} else {
|
||||
html += '<option value="' + i + '">' + num + '</option>';
|
||||
}
|
||||
}
|
||||
|
||||
html += '</select> ';
|
||||
|
||||
if (this.timePicker12Hour) {
|
||||
html += '<select class="ampmselect">';
|
||||
if (selected.hour() >= 12) {
|
||||
html += '<option value="AM">AM</option><option value="PM" selected="selected">PM</option>';
|
||||
} else {
|
||||
html += '<option value="AM" selected="selected">AM</option><option value="PM">PM</option>';
|
||||
}
|
||||
html += '</select>';
|
||||
}
|
||||
|
||||
html += '</div>';
|
||||
|
||||
}
|
||||
|
||||
return html;
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$.fn.daterangepicker = function (options, cb) {
|
||||
this.each(function () {
|
||||
var el = $(this);
|
||||
if (!el.data('daterangepicker'))
|
||||
el.data('daterangepicker', new DateRangePicker(el, options, cb));
|
||||
});
|
||||
return this;
|
||||
};
|
||||
|
||||
}(window.jQuery);
|
||||
81
js/demo.js
Normal file
@@ -0,0 +1,81 @@
|
||||
$(function() {
|
||||
/* For demo purposes */
|
||||
var demo = $("<div />").css({
|
||||
position: "fixed",
|
||||
top: "150px",
|
||||
right: "0",
|
||||
background: "rgba(0, 0, 0, 0.7)",
|
||||
"border-radius": "5px 0px 0px 5px",
|
||||
padding: "10px 15px",
|
||||
"font-size": "16px",
|
||||
"z-index": "999999",
|
||||
cursor: "pointer",
|
||||
color: "#ddd"
|
||||
}).html("<i class='fa fa-gear'></i>").addClass("no-print");
|
||||
|
||||
var demo_settings = $("<div />").css({
|
||||
"padding": "10px",
|
||||
position: "fixed",
|
||||
top: "130px",
|
||||
right: "-200px",
|
||||
background: "#fff",
|
||||
border: "3px solid rgba(0, 0, 0, 0.7)",
|
||||
"width": "200px",
|
||||
"z-index": "999999"
|
||||
}).addClass("no-print");
|
||||
demo_settings.append(
|
||||
"<h4 style='margin: 0 0 5px 0; border-bottom: 1px dashed #ddd; padding-bottom: 3px;'>Layout Options</h4>"
|
||||
+ "<div class='form-group no-margin'>"
|
||||
+ "<div class='.checkbox'>"
|
||||
+ "<label>"
|
||||
+ "<input type='checkbox' onchange='change_layout();'/> "
|
||||
+ "Fixed layout"
|
||||
+ "</label>"
|
||||
+ "</div>"
|
||||
+ "</div>"
|
||||
);
|
||||
demo_settings.append(
|
||||
"<h4 style='margin: 0 0 5px 0; border-bottom: 1px dashed #ddd; padding-bottom: 3px;'>Skins</h4>"
|
||||
+ "<div class='form-group no-margin'>"
|
||||
+ "<div class='.radio'>"
|
||||
+ "<label>"
|
||||
+ "<input name='skins' type='radio' onchange='change_skin(\"skin-black\");' /> "
|
||||
+ "Black"
|
||||
+ "</label>"
|
||||
+ "</div>"
|
||||
+ "</div>"
|
||||
|
||||
+ "<div class='form-group no-margin'>"
|
||||
+ "<div class='.radio'>"
|
||||
+ "<label>"
|
||||
+ "<input name='skins' type='radio' onchange='change_skin(\"skin-blue\");' checked='checked'/> "
|
||||
+ "Blue"
|
||||
+ "</label>"
|
||||
+ "</div>"
|
||||
+ "</div>"
|
||||
);
|
||||
|
||||
demo.click(function() {
|
||||
if (!$(this).hasClass("open")) {
|
||||
$(this).css("right", "200px");
|
||||
demo_settings.css("right", "0");
|
||||
$(this).addClass("open");
|
||||
} else {
|
||||
$(this).css("right", "0");
|
||||
demo_settings.css("right", "-200px");
|
||||
$(this).removeClass("open")
|
||||
}
|
||||
});
|
||||
|
||||
$("body").append(demo);
|
||||
$("body").append(demo_settings);
|
||||
});
|
||||
|
||||
function change_layout() {
|
||||
$("body").toggleClass("fixed");
|
||||
fix_sidebar();
|
||||
}
|
||||
function change_skin(cls) {
|
||||
$("body").removeClass("skin-blue skin-black");
|
||||
$("body").addClass(cls);
|
||||
}
|
||||
1498
js/flot/API.md
@@ -1,98 +0,0 @@
|
||||
## Contributing to Flot ##
|
||||
|
||||
We welcome all contributions, but following these guidelines results in less
|
||||
work for us, and a faster and better response.
|
||||
|
||||
### Issues ###
|
||||
|
||||
Issues are not a way to ask general questions about Flot. If you see unexpected
|
||||
behavior but are not 100% certain that it is a bug, please try posting to the
|
||||
[forum](http://groups.google.com/group/flot-graphs) first, and confirm that
|
||||
what you see is really a Flot problem before creating a new issue for it. When
|
||||
reporting a bug, please include a working demonstration of the problem, if
|
||||
possible, or at least a clear description of the options you're using and the
|
||||
environment (browser and version, jQuery version, other libraries) that you're
|
||||
running under.
|
||||
|
||||
If you have suggestions for new features, or changes to existing ones, we'd
|
||||
love to hear them! Please submit each suggestion as a separate new issue.
|
||||
|
||||
If you would like to work on an existing issue, please make sure it is not
|
||||
already assigned to someone else. If an issue is assigned to someone, that
|
||||
person has already started working on it. So, pick unassigned issues to prevent
|
||||
duplicated effort.
|
||||
|
||||
### Pull Requests ###
|
||||
|
||||
To make merging as easy as possible, please keep these rules in mind:
|
||||
|
||||
1. Submit new features or architectural changes to the *<version>-work*
|
||||
branch for the next major release. Submit bug fixes to the master branch.
|
||||
|
||||
2. Divide larger changes into a series of small, logical commits with
|
||||
descriptive messages.
|
||||
|
||||
3. Rebase, if necessary, before submitting your pull request, to reduce the
|
||||
work we need to do to merge it.
|
||||
|
||||
4. Format your code according to the style guidelines below.
|
||||
|
||||
### Flot Style Guidelines ###
|
||||
|
||||
Flot follows the [jQuery Core Style Guidelines](http://docs.jquery.com/JQuery_Core_Style_Guidelines),
|
||||
with the following updates and exceptions:
|
||||
|
||||
#### Spacing ####
|
||||
|
||||
Use four-space indents, no tabs. Do not add horizontal space around parameter
|
||||
lists, loop definitions, or array/object indices. For example:
|
||||
|
||||
```js
|
||||
for ( var i = 0; i < data.length; i++ ) { // This block is wrong!
|
||||
if ( data[ i ] > 1 ) {
|
||||
data[ i ] = 2;
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < data.length; i++) { // This block is correct!
|
||||
if (data[i] > 1) {
|
||||
data[i] = 2;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Comments ####
|
||||
|
||||
Use [jsDoc](http://usejsdoc.org) comments for all file and function headers.
|
||||
Use // for all inline and block comments, regardless of length.
|
||||
|
||||
All // comment blocks should have an empty line above *and* below them. For
|
||||
example:
|
||||
|
||||
```js
|
||||
var a = 5;
|
||||
|
||||
// We're going to loop here
|
||||
// TODO: Make this loop faster, better, stronger!
|
||||
|
||||
for (var x = 0; x < 10; x++) {}
|
||||
```
|
||||
|
||||
#### Wrapping ####
|
||||
|
||||
Block comments should be wrapped at 80 characters.
|
||||
|
||||
Code should attempt to wrap at 80 characters, but may run longer if wrapping
|
||||
would hurt readability more than having to scroll horizontally. This is a
|
||||
judgement call made on a situational basis.
|
||||
|
||||
Statements containing complex logic should not be wrapped arbitrarily if they
|
||||
do not exceed 80 characters. For example:
|
||||
|
||||
```js
|
||||
if (a == 1 && // This block is wrong!
|
||||
b == 2 &&
|
||||
c == 3) {}
|
||||
|
||||
if (a == 1 && b == 2 && c == 3) {} // This block is correct!
|
||||
```
|
||||
@@ -1,75 +0,0 @@
|
||||
## Frequently asked questions ##
|
||||
|
||||
#### How much data can Flot cope with? ####
|
||||
|
||||
Flot will happily draw everything you send to it so the answer
|
||||
depends on the browser. The excanvas emulation used for IE (built with
|
||||
VML) makes IE by far the slowest browser so be sure to test with that
|
||||
if IE users are in your target group (for large plots in IE, you can
|
||||
also check out Flashcanvas which may be faster).
|
||||
|
||||
1000 points is not a problem, but as soon as you start having more
|
||||
points than the pixel width, you should probably start thinking about
|
||||
downsampling/aggregation as this is near the resolution limit of the
|
||||
chart anyway. If you downsample server-side, you also save bandwidth.
|
||||
|
||||
|
||||
#### Flot isn't working when I'm using JSON data as source! ####
|
||||
|
||||
Actually, Flot loves JSON data, you just got the format wrong.
|
||||
Double check that you're not inputting strings instead of numbers,
|
||||
like [["0", "-2.13"], ["5", "4.3"]]. This is most common mistake, and
|
||||
the error might not show up immediately because Javascript can do some
|
||||
conversion automatically.
|
||||
|
||||
|
||||
#### Can I export the graph? ####
|
||||
|
||||
You can grab the image rendered by the canvas element used by Flot
|
||||
as a PNG or JPEG (remember to set a background). Note that it won't
|
||||
include anything not drawn in the canvas (such as the legend). And it
|
||||
doesn't work with excanvas which uses VML, but you could try
|
||||
Flashcanvas.
|
||||
|
||||
|
||||
#### The bars are all tiny in time mode? ####
|
||||
|
||||
It's not really possible to determine the bar width automatically.
|
||||
So you have to set the width with the barWidth option which is NOT in
|
||||
pixels, but in the units of the x axis (or the y axis for horizontal
|
||||
bars). For time mode that's milliseconds so the default value of 1
|
||||
makes the bars 1 millisecond wide.
|
||||
|
||||
|
||||
#### Can I use Flot with libraries like Mootools or Prototype? ####
|
||||
|
||||
Yes, Flot supports it out of the box and it's easy! Just use jQuery
|
||||
instead of $, e.g. call jQuery.plot instead of $.plot and use
|
||||
jQuery(something) instead of $(something). As a convenience, you can
|
||||
put in a DOM element for the graph placeholder where the examples and
|
||||
the API documentation are using jQuery objects.
|
||||
|
||||
Depending on how you include jQuery, you may have to add one line of
|
||||
code to prevent jQuery from overwriting functions from the other
|
||||
libraries, see the documentation in jQuery ("Using jQuery with other
|
||||
libraries") for details.
|
||||
|
||||
|
||||
#### Flot doesn't work with [insert name of Javascript UI framework]! ####
|
||||
|
||||
Flot is using standard HTML to make charts. If this is not working,
|
||||
it's probably because the framework you're using is doing something
|
||||
weird with the DOM or with the CSS that is interfering with Flot.
|
||||
|
||||
A common problem is that there's display:none on a container until the
|
||||
user does something. Many tab widgets work this way, and there's
|
||||
nothing wrong with it - you just can't call Flot inside a display:none
|
||||
container as explained in the README so you need to hold off the Flot
|
||||
call until the container is actually displayed (or use
|
||||
visibility:hidden instead of display:none or move the container
|
||||
off-screen).
|
||||
|
||||
If you find there's a specific thing we can do to Flot to help, feel
|
||||
free to submit a bug report. Otherwise, you're welcome to ask for help
|
||||
on the forum/mailing list, but please don't submit a bug report to
|
||||
Flot.
|
||||
@@ -1,22 +0,0 @@
|
||||
Copyright (c) 2007-2013 IOLA and Ole Laursen
|
||||
|
||||
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.
|
||||
@@ -1,12 +0,0 @@
|
||||
# Makefile for generating minified files
|
||||
|
||||
.PHONY: all
|
||||
|
||||
# we cheat and process all .js files instead of an exhaustive list
|
||||
all: $(patsubst %.js,%.min.js,$(filter-out %.min.js,$(wildcard *.js)))
|
||||
|
||||
%.min.js: %.js
|
||||
yui-compressor $< -o $@
|
||||
|
||||
test:
|
||||
./node_modules/.bin/jshint *jquery.flot.js
|
||||
978
js/flot/NEWS.md
@@ -1,978 +0,0 @@
|
||||
## Flot 0.8.2 ##
|
||||
|
||||
### Changes ###
|
||||
|
||||
- Added a plot.destroy method as a way to free memory when emptying the plot
|
||||
placeholder and then re-using it for some other purpose.
|
||||
(patch by Thodoris Greasidis, issue #1129, pull request #1130)
|
||||
|
||||
- Added a table of contents and PLUGINS link to the API documentation.
|
||||
(patches by Brian Peiris, pull requests #1064 and #1127)
|
||||
|
||||
- Added Ruby code examples for time conversion.
|
||||
(patch by Mike Połtyn, pull request #1182)
|
||||
|
||||
- Minor improvements to API.md and README.md.
|
||||
(patches by Patrik Ragnarsson, pull requests #1085 and #1086)
|
||||
|
||||
- Updated inlined jQuery Resize to the latest version to fix errors.
|
||||
(reported by Matthew Sabol and sloker, issues #997 ad #1081)
|
||||
|
||||
### Bug fixes ###
|
||||
|
||||
- Fixed an unexpected change in behavior that resulted in duplicate tick
|
||||
labels when using a plugin, like flot-tickrotor, that overrode tick labels.
|
||||
(patch by Mark Cote, pull request #1091)
|
||||
|
||||
- Fixed a regression from 0.7 where axis labels were given the wrong width,
|
||||
causing them to overlap at certain scales and ignore the labelWidth option.
|
||||
(patch by Benjamin Gram, pull request #1177)
|
||||
|
||||
- Fixed a bug where the second axis in an xaxes/yaxes array incorrectly had
|
||||
its 'innermost' property set to false or undefined, even if it was on the
|
||||
other side of the plot from the first axis. This resulted in the axis bar
|
||||
being visible when it shouldn't have been, which was especially obvious
|
||||
when the grid had a left/right border width of zero.
|
||||
(reported by Teq1, fix researched by ryleyb, issue #1056)
|
||||
|
||||
- Fixed an error when using a placeholder that has no font-size property.
|
||||
(patch by Craig Oldford, pull request #1135)
|
||||
|
||||
- Fixed a regression from 0.7 where nulls at the end of a series were ignored
|
||||
for purposes of determing the range of the x-axis.
|
||||
(reported by Munsifali Rashid, issue #1095)
|
||||
|
||||
- If a font size is provided, base the default lineHeight on that size rather
|
||||
that the font size of the plot placeholder, which may be very different.
|
||||
(reported by Daniel Hoffmann Bernardes, issue #1131, pull request #1199)
|
||||
|
||||
- Fix broken highlighting for right-aligned bars.
|
||||
(reported by BeWiBu and Mihai Stanciu, issues #975 and #1093, with further
|
||||
assistance by Eric Byers, pull request #1120)
|
||||
|
||||
- Prevent white circles from sometimes showing up inside of pie charts.
|
||||
(reported by Pierre Dubois and Jack Klink, issues #1128 and #1073)
|
||||
|
||||
- Label formatting no longer breaks when a page contains multiple pie charts.
|
||||
(reported by Brend Wanders, issue #1055)
|
||||
|
||||
- When using multiple axes on opposite sides of the plot, the innermost axis
|
||||
coming later in the list no longer has its bar drawn incorrectly.
|
||||
(reported by ryleyb, issue #1056)
|
||||
|
||||
- When removing series labels and redrawing the plot, the legend now updates
|
||||
correctly even when using an external container.
|
||||
(patch by Luis Silva, issue #1159, pull request #1160)
|
||||
|
||||
- The pie plugin no longer ignores the value of the left offset option.
|
||||
(reported by melanker, issue #1136)
|
||||
|
||||
- Fixed a regression from 0.7, where extra padding was added unnecessarily to
|
||||
sides of the plot where there was no last tick label.
|
||||
(reported by sknob001, issue #1048, pull request #1200)
|
||||
|
||||
- Fixed incorrect tooltip behavior in the interacting example.
|
||||
(patch by cleroux, issue #686, pull request #1074)
|
||||
|
||||
- Fixed an error in CSS color extraction with elements outside the DOM.
|
||||
(patch by execjosh, pull request #1084)
|
||||
|
||||
- Fixed :not selector error when using jQuery without Sizzle.
|
||||
(patch by Anthony Ryan, pull request #1180)
|
||||
|
||||
- Worked around a browser issue that caused bars to appear un-filled.
|
||||
(reported by irbian, issue #915)
|
||||
|
||||
## Flot 0.8.1 ##
|
||||
|
||||
### Bug fixes ###
|
||||
|
||||
- Fixed a regression in the time plugin, introduced in 0.8, that caused dates
|
||||
to align to the minute rather than to the highest appropriate unit. This
|
||||
caused many x-axes in 0.8 to have different ticks than they did in 0.7.
|
||||
(reported by Tom Sheppard, patch by Daniel Shapiro, issue #1017, pull
|
||||
request #1023)
|
||||
|
||||
- Fixed a regression in text rendering, introduced in 0.8, that caused axis
|
||||
labels with the same text as another label on the same axis to disappear.
|
||||
More generally, it's again possible to have the same text in two locations.
|
||||
(issue #1032)
|
||||
|
||||
- Fixed a regression in text rendering, introduced in 0.8, where axis labels
|
||||
were no longer assigned an explicit width, and their text could not wrap.
|
||||
(reported by sabregreen, issue #1019)
|
||||
|
||||
- Fixed a regression in the pie plugin, introduced in 0.8, that prevented it
|
||||
from accepting data in the format '[[x, y]]'.
|
||||
(patch by Nicolas Morel, pull request #1024)
|
||||
|
||||
- The 'zero' series option and 'autoscale' format option are no longer
|
||||
ignored when the series contains a null value.
|
||||
(reported by Daniel Shapiro, issue #1033)
|
||||
|
||||
- Avoid triggering the time-mode plugin exception when there are zero series.
|
||||
(reported by Daniel Rothig, patch by Mark Raymond, issue #1016)
|
||||
|
||||
- When a custom color palette has fewer colors than the default palette, Flot
|
||||
no longer fills out the colors with the remainder of the default.
|
||||
(patch by goorpy, issue #1031, pull request #1034)
|
||||
|
||||
- Fixed missing update for bar highlights after a zoom or other redraw.
|
||||
(reported by Paolo Valleri, issue #1030)
|
||||
|
||||
- Fixed compatibility with jQuery versions earlier than 1.7.
|
||||
(patch by Lee Willis, issue #1027, pull request #1027)
|
||||
|
||||
- The mouse wheel no longer scrolls the page when using the navigate plugin.
|
||||
(patch by vird, pull request #1020)
|
||||
|
||||
- Fixed missing semicolons in the core library.
|
||||
(reported by Michal Zglinski)
|
||||
|
||||
|
||||
## Flot 0.8.0 ##
|
||||
|
||||
### API changes ###
|
||||
|
||||
Support for time series has been moved into a plugin, jquery.flot.time.js.
|
||||
This results in less code if time series are not used. The functionality
|
||||
remains the same (plus timezone support, as described below); however, the
|
||||
plugin must be included if axis.mode is set to "time".
|
||||
|
||||
When the axis mode is "time", the axis option "timezone" can be set to null,
|
||||
"browser", or a particular timezone (e.g. "America/New_York") to control how
|
||||
the dates are displayed. If null, the dates are displayed as UTC. If
|
||||
"browser", the dates are displayed in the time zone of the user's browser.
|
||||
|
||||
Date/time formatting has changed and now follows a proper subset of the
|
||||
standard strftime specifiers, plus one nonstandard specifier for quarters.
|
||||
Additionally, if a strftime function is found in the Date object's prototype,
|
||||
it will be used instead of the built-in formatter.
|
||||
|
||||
Axis tick labels now use the class 'flot-tick-label' instead of 'tickLabel'.
|
||||
The text containers for each axis now use the classes 'flot-[x|y]-axis' and
|
||||
'flot-[x|y]#-axis' instead of '[x|y]Axis' and '[x|y]#Axis'. For compatibility
|
||||
with Flot 0.7 and earlier text will continue to use the old classes as well,
|
||||
but they are considered deprecated and will be removed in a future version.
|
||||
|
||||
In previous versions the axis 'color' option was used to set the color of tick
|
||||
marks and their label text. It now controls the color of the axis line, which
|
||||
previously could not be changed separately, and continues to act as a default
|
||||
for the tick-mark color. The color of tick label text is now set either by
|
||||
overriding the 'flot-tick-label' CSS rule or via the axis 'font' option.
|
||||
|
||||
A new plugin, jquery.flot.canvas.js, allows axis tick labels to be rendered
|
||||
directly to the canvas, rather than using HTML elements. This feature can be
|
||||
toggled with a simple option, making it easy to create interactive plots in the
|
||||
browser using HTML, then re-render them to canvas for export as an image.
|
||||
|
||||
The plugin tries to remain as faithful as possible to the original HTML render,
|
||||
and goes so far as to automatically extract styles from CSS, to avoid having to
|
||||
provide a separate set of styles when rendering to canvas. Due to limitations
|
||||
of the canvas text API, the plugin cannot reproduce certain features, including
|
||||
HTML markup embedded in labels, and advanced text styles such as 'em' units.
|
||||
|
||||
The plugin requires support for canvas text, which may not be present in some
|
||||
older browsers, even if they support the canvas tag itself. To use the plugin
|
||||
with these browsers try using a shim such as canvas-text or FlashCanvas.
|
||||
|
||||
The base and overlay canvas are now using the CSS classes "flot-base" and
|
||||
"flot-overlay" to prevent accidental clashes (issue 540).
|
||||
|
||||
### Changes ###
|
||||
|
||||
- Addition of nonstandard %q specifier to date/time formatting. (patch
|
||||
by risicle, issue 49)
|
||||
|
||||
- Date/time formatting follows proper subset of strftime specifiers, and
|
||||
support added for Date.prototype.strftime, if found. (patch by Mark Cote,
|
||||
issues 419 and 558)
|
||||
|
||||
- Fixed display of year ticks. (patch by Mark Cote, issue 195)
|
||||
|
||||
- Support for time series moved to plugin. (patch by Mark Cote)
|
||||
|
||||
- Display time series in different time zones. (patch by Knut Forkalsrud,
|
||||
issue 141)
|
||||
|
||||
- Added a canvas plugin to enable rendering axis tick labels to the canvas.
|
||||
(sponsored by YCharts.com, implementation by Ole Laursen and David Schnur)
|
||||
|
||||
- Support for setting the interval between redraws of the overlay canvas with
|
||||
redrawOverlayInterval. (suggested in issue 185)
|
||||
|
||||
- Support for multiple thresholds in thresholds plugin. (patch by Arnaud
|
||||
Bellec, issue 523)
|
||||
|
||||
- Support for plotting categories/textual data directly with new categories
|
||||
plugin.
|
||||
|
||||
- Tick generators now get the whole axis rather than just min/max.
|
||||
|
||||
- Added processOffset and drawBackground hooks. (suggested in issue 639)
|
||||
|
||||
- Added a grid "margin" option to set the space between the canvas edge and
|
||||
the grid.
|
||||
|
||||
- Prevent the pie example page from generating single-slice pies. (patch by
|
||||
Shane Reustle)
|
||||
|
||||
- In addition to "left" and "center", bars now recognize "right" as an
|
||||
alignment option. (patch by Michael Mayer, issue 520)
|
||||
|
||||
- Switched from toFixed to a much faster default tickFormatter. (patch by
|
||||
Clemens Stolle)
|
||||
|
||||
- Added to a more helpful error when using a time-mode axis without including
|
||||
the flot.time plugin. (patch by Yael Elmatad)
|
||||
|
||||
- Added a legend "sorted" option to control sorting of legend entries
|
||||
independent of their series order. (patch by Tom Cleaveland)
|
||||
|
||||
- Added a series "highlightColor" option to control the color of the
|
||||
translucent overlay that identifies the dataset when the mouse hovers over
|
||||
it. (patch by Eric Wendelin and Nate Abele, issues 168 and 299)
|
||||
|
||||
- Added a plugin jquery.flot.errorbars, with an accompanying example, that
|
||||
adds the ability to plot error bars, commonly used in many kinds of
|
||||
statistical data visualizations. (patch by Rui Pereira, issue 215)
|
||||
|
||||
- The legend now omits entries whose labelFormatter returns null. (patch by
|
||||
Tom Cleaveland, Christopher Lambert, and Simon Strandgaard)
|
||||
|
||||
- Added support for high pixel density (retina) displays, resulting in much
|
||||
crisper charts on such devices. (patch by Olivier Guerriat, additional
|
||||
fixes by Julien Thomas, maimairel, and Lau Bech Lauritzen)
|
||||
|
||||
- Added the ability to control pie shadow position and alpha via a new pie
|
||||
'shadow' option. (patch by Julien Thomas, pull request #78)
|
||||
|
||||
- Added the ability to set width and color for individual sides of the grid.
|
||||
(patch by Ara Anjargolian, additional fixes by Karl Swedberg, pull requests #855
|
||||
and #880)
|
||||
|
||||
- The selection plugin's getSelection now returns null when the selection
|
||||
has been cleared. (patch by Nick Campbell, pull request #852)
|
||||
|
||||
- Added a new option called 'zero' to bars and filled lines series, to control
|
||||
whether the y-axis minimum is scaled to fit the data or set to zero.
|
||||
(patch by David Schnur, issues #316, #529, and #856, pull request #911)
|
||||
|
||||
- The plot function is now also a jQuery chainable property.
|
||||
(patch by David Schnur, issues #734 and #816, pull request #953)
|
||||
|
||||
- When only a single pie slice is beneath the combine threshold it is no longer
|
||||
replaced by an 'other' slice. (suggested by Devin Bayer, issue #638)
|
||||
|
||||
- Added lineJoin and minSize options to the selection plugin to control the
|
||||
corner style and minimum size of the selection, respectively.
|
||||
(patch by Ruth Linehan, pull request #963)
|
||||
|
||||
### Bug fixes ###
|
||||
|
||||
- Fix problem with null values and pie plugin. (patch by gcruxifix,
|
||||
issue 500)
|
||||
|
||||
- Fix problem with threshold plugin and bars. (based on patch by
|
||||
kaarlenkaski, issue 348)
|
||||
|
||||
- Fix axis box calculations so the boxes include the outermost part of the
|
||||
labels too.
|
||||
|
||||
- Fix problem with event clicking and hovering in IE 8 by updating Excanvas
|
||||
and removing previous work-around. (test case by Ara Anjargolian)
|
||||
|
||||
- Fix issues with blurry 1px border when some measures aren't integer.
|
||||
(reported by Ara Anjargolian)
|
||||
|
||||
- Fix bug with formats in the data processor. (reported by Peter Hull,
|
||||
issue 534)
|
||||
|
||||
- Prevent i from being declared global in extractRange. (reported by
|
||||
Alexander Obukhov, issue 627)
|
||||
|
||||
- Throw errors in a more cross-browser-compatible manner. (patch by
|
||||
Eddie Kay)
|
||||
|
||||
- Prevent pie slice outlines from being drawn when the stroke width is zero.
|
||||
(reported by Chris Minett, issue 585)
|
||||
|
||||
- Updated the navigate plugin's inline copy of jquery.mousewheel to fix
|
||||
Webkit zoom problems. (reported by Hau Nguyen, issue 685)
|
||||
|
||||
- Axis labels no longer appear as decimals rather than integers in certain
|
||||
cases. (patch by Clemens Stolle, issue 541)
|
||||
|
||||
- Automatic color generation no longer produces only whites and blacks when
|
||||
there are many series. (patch by David Schnur and Tom Cleaveland)
|
||||
|
||||
- Fixed an error when custom tick labels weren't provided as strings. (patch
|
||||
by Shad Downey)
|
||||
|
||||
- Prevented the local insertSteps and fmt variables from becoming global.
|
||||
(first reported by Marc Bennewitz and Szymon Barglowski, patch by Nick
|
||||
Campbell, issues #825 and #831, pull request #851)
|
||||
|
||||
- Prevented several threshold plugin variables from becoming global. (patch
|
||||
by Lasse Dahl Ebert)
|
||||
|
||||
- Fixed various jQuery 1.8 compatibility issues. (issues #814 and #819,
|
||||
pull request #877)
|
||||
|
||||
- Pie charts with a slice equal to or approaching 100% of the pie no longer
|
||||
appear invisible. (patch by David Schnur, issues #444, #658, #726, #824
|
||||
and #850, pull request #879)
|
||||
|
||||
- Prevented several local variables from becoming global. (patch by aaa707)
|
||||
|
||||
- Ensure that the overlay and primary canvases remain aligned. (issue #670,
|
||||
pull request #901)
|
||||
|
||||
- Added support for jQuery 1.9 by removing and replacing uses of $.browser.
|
||||
(analysis and patch by Anthony Ryan, pull request #905)
|
||||
|
||||
- Pie charts no longer disappear when redrawn during a resize or update.
|
||||
(reported by Julien Bec, issue #656, pull request #910)
|
||||
|
||||
- Avoided floating-point precision errors when calculating pie percentages.
|
||||
(patch by James Ward, pull request #918)
|
||||
|
||||
- Fixed compatibility with jQuery 1.2.6, which has no 'mouseleave' shortcut.
|
||||
(reported by Bevan, original pull request #920, replaced by direct patch)
|
||||
|
||||
- Fixed sub-pixel rendering issues with crosshair and selection lines.
|
||||
(patches by alanayoub and Daniel Shapiro, pull requests #17 and #925)
|
||||
|
||||
- Fixed rendering issues when using the threshold plugin with several series.
|
||||
(patch by Ivan Novikov, pull request #934)
|
||||
|
||||
- Pie charts no longer disappear when redrawn after calling setData().
|
||||
(reported by zengge1984 and pareeohnos, issues #810 and #945)
|
||||
|
||||
- Added a work-around for the problem where points with a lineWidth of zero
|
||||
still showed up with a visible line. (reported by SalvoSav, issue #842,
|
||||
patch by Jamie Hamel-Smith, pull request #937)
|
||||
|
||||
- Pie charts now accept values in string form, like other plot types.
|
||||
(reported by laerdal.no, issue #534)
|
||||
|
||||
- Avoid rounding errors in the threshold plugin.
|
||||
(reported by jerikojerk, issue #895)
|
||||
|
||||
- Fixed an error when using the navigate plugin with jQuery 1.9.x or later.
|
||||
(reported by Paolo Valleri, issue #964)
|
||||
|
||||
- Fixed inconsistencies between the highlight and unhighlight functions.
|
||||
(reported by djamshed, issue #987)
|
||||
|
||||
- Fixed recalculation of tickSize and tickDecimals on calls to setupGrid.
|
||||
(patch by thecountofzero, pull request #861, issues #860, #1000)
|
||||
|
||||
|
||||
## Flot 0.7 ##
|
||||
|
||||
### API changes ###
|
||||
|
||||
Multiple axes support. Code using dual axes should be changed from using
|
||||
x2axis/y2axis in the options to using an array (although backwards-
|
||||
compatibility hooks are in place). For instance,
|
||||
|
||||
```js
|
||||
{
|
||||
xaxis: { ... }, x2axis: { ... },
|
||||
yaxis: { ... }, y2axis: { ... }
|
||||
}
|
||||
```
|
||||
|
||||
becomes
|
||||
|
||||
```js
|
||||
{
|
||||
xaxes: [ { ... }, { ... } ],
|
||||
yaxes: [ { ... }, { ... } ]
|
||||
}
|
||||
```
|
||||
|
||||
Note that if you're just using one axis, continue to use the xaxis/yaxis
|
||||
directly (it now sets the default settings for the arrays). Plugins touching
|
||||
the axes must be ported to take the extra axes into account, check the source
|
||||
to see some examples.
|
||||
|
||||
A related change is that the visibility of axes is now auto-detected. So if
|
||||
you were relying on an axis to show up even without any data in the chart, you
|
||||
now need to set the axis "show" option explicitly.
|
||||
|
||||
"tickColor" on the grid options is now deprecated in favour of a corresponding
|
||||
option on the axes, so:
|
||||
|
||||
```js
|
||||
{ grid: { tickColor: "#000" }}
|
||||
```
|
||||
|
||||
becomes
|
||||
|
||||
```js
|
||||
{ xaxis: { tickColor: "#000"}, yaxis: { tickColor: "#000"} }
|
||||
```
|
||||
|
||||
But if you just configure a base color Flot will now autogenerate a tick color
|
||||
by adding transparency. Backwards-compatibility hooks are in place.
|
||||
|
||||
Final note: now that IE 9 is coming out with canvas support, you may want to
|
||||
adapt the excanvas include to skip loading it in IE 9 (the examples have been
|
||||
adapted thanks to Ryley Breiddal). An alternative to excanvas using Flash has
|
||||
also surfaced, if your graphs are slow in IE, you may want to give it a spin:
|
||||
|
||||
http://code.google.com/p/flashcanvas/
|
||||
|
||||
### Changes ###
|
||||
|
||||
- Support for specifying a bottom for each point for line charts when filling
|
||||
them, this means that an arbitrary bottom can be used instead of just the x
|
||||
axis. (based on patches patiently provided by Roman V. Prikhodchenko)
|
||||
|
||||
- New fillbetween plugin that can compute a bottom for a series from another
|
||||
series, useful for filling areas between lines.
|
||||
|
||||
See new example percentiles.html for a use case.
|
||||
|
||||
- More predictable handling of gaps for the stacking plugin, now all
|
||||
undefined ranges are skipped.
|
||||
|
||||
- Stacking plugin can stack horizontal bar charts.
|
||||
|
||||
- Navigate plugin now redraws the plot while panning instead of only after
|
||||
the fact. (raised by lastthemy, issue 235)
|
||||
|
||||
Can be disabled by setting the pan.frameRate option to null.
|
||||
|
||||
- Date formatter now accepts %0m and %0d to get a zero-padded month or day.
|
||||
(issue raised by Maximillian Dornseif)
|
||||
|
||||
- Revamped internals to support an unlimited number of axes, not just dual.
|
||||
(sponsored by Flight Data Services, www.flightdataservices.com)
|
||||
|
||||
- New setting on axes, "tickLength", to control the size of ticks or turn
|
||||
them off without turning off the labels.
|
||||
|
||||
- Axis labels are now put in container divs with classes, for instance labels
|
||||
in the x axes can be reached via ".xAxis .tickLabel".
|
||||
|
||||
- Support for setting the color of an axis. (sponsored by Flight Data
|
||||
Services, www.flightdataservices.com)
|
||||
|
||||
- Tick color is now auto-generated as the base color with some transparency,
|
||||
unless you override it.
|
||||
|
||||
- Support for aligning ticks in the axes with "alignTicksWithAxis" to ensure
|
||||
that they appear next to each other rather than in between, at the expense
|
||||
of possibly awkward tick steps. (sponsored by Flight Data Services,
|
||||
www.flightdataservices.com)
|
||||
|
||||
- Support for customizing the point type through a callback when plotting
|
||||
points and new symbol plugin with some predefined point types. (sponsored
|
||||
by Utility Data Corporation)
|
||||
|
||||
- Resize plugin for automatically redrawing when the placeholder changes
|
||||
size, e.g. on window resizes. (sponsored by Novus Partners)
|
||||
|
||||
A resize() method has been added to plot object facilitate this.
|
||||
|
||||
- Support Infinity/-Infinity for plotting asymptotes by hacking it into
|
||||
+/-Number.MAX_VALUE. (reported by rabaea.mircea)
|
||||
|
||||
- Support for restricting navigate plugin to not pan/zoom an axis. (based on
|
||||
patch by kkaefer)
|
||||
|
||||
- Support for providing the drag cursor for the navigate plugin as an option.
|
||||
(based on patch by Kelly T. Moore)
|
||||
|
||||
- Options for controlling whether an axis is shown or not (suggestion by Timo
|
||||
Tuominen) and whether to reserve space for it even if it isn't shown.
|
||||
|
||||
- New attribute $.plot.version with the Flot version as a string.
|
||||
|
||||
- The version comment is now included in the minified jquery.flot.min.js.
|
||||
|
||||
- New options.grid.minBorderMargin for adjusting the minimum margin provided
|
||||
around the border (based on patch by corani, issue 188).
|
||||
|
||||
- Refactor replot behaviour so Flot tries to reuse the existing canvas,
|
||||
adding shutdown() methods to the plot. (based on patch by Ryley Breiddal,
|
||||
issue 269)
|
||||
|
||||
This prevents a memory leak in Chrome and hopefully makes replotting faster
|
||||
for those who are using $.plot instead of .setData()/.draw(). Also update
|
||||
jQuery to 1.5.1 to prevent IE leaks fixed in jQuery.
|
||||
|
||||
- New real-time line chart example.
|
||||
|
||||
- New hooks: drawSeries, shutdown.
|
||||
|
||||
### Bug fixes ###
|
||||
|
||||
- Fixed problem with findNearbyItem and bars on top of each other. (reported
|
||||
by ragingchikn, issue 242)
|
||||
|
||||
- Fixed problem with ticks and the border. (based on patch from
|
||||
ultimatehustler69, issue 236)
|
||||
|
||||
- Fixed problem with plugins adding options to the series objects.
|
||||
|
||||
- Fixed a problem introduced in 0.6 with specifying a gradient with:
|
||||
|
||||
```{brightness: x, opacity: y }```
|
||||
|
||||
- Don't use $.browser.msie, check for getContext on the created canvas element
|
||||
instead and try to use excanvas if it's not found.
|
||||
|
||||
Fixes IE 9 compatibility.
|
||||
|
||||
- highlight(s, index) was looking up the point in the original s.data instead
|
||||
of in the computed datapoints array, which breaks with plugins that modify
|
||||
the datapoints, such as the stacking plugin. (reported by curlypaul924,
|
||||
issue 316)
|
||||
|
||||
- More robust handling of axis from data passed in from getData(). (reported)
|
||||
by Morgan)
|
||||
|
||||
- Fixed problem with turning off bar outline. (fix by Jordi Castells,
|
||||
issue 253)
|
||||
|
||||
- Check the selection passed into setSelection in the selection
|
||||
plugin, to guard against errors when synchronizing plots (fix by Lau
|
||||
Bech Lauritzen).
|
||||
|
||||
- Fix bug in crosshair code with mouseout resetting the crosshair even
|
||||
if it is locked (fix by Lau Bech Lauritzen and Banko Adam).
|
||||
|
||||
- Fix bug with points plotting using line width from lines rather than
|
||||
points.
|
||||
|
||||
- Fix bug with passing non-array 0 data (for plugins that don't expect
|
||||
arrays, patch by vpapp1).
|
||||
|
||||
- Fix errors in JSON in examples so they work with jQuery 1.4.2
|
||||
(fix reported by honestbleeps, issue 357).
|
||||
|
||||
- Fix bug with tooltip in interacting.html, this makes the tooltip
|
||||
much smoother (fix by bdkahn). Fix related bug inside highlighting
|
||||
handler in Flot.
|
||||
|
||||
- Use closure trick to make inline colorhelpers plugin respect
|
||||
jQuery.noConflict(true), renaming the global jQuery object (reported
|
||||
by Nick Stielau).
|
||||
|
||||
- Listen for mouseleave events and fire a plothover event with empty
|
||||
item when it occurs to drop highlights when the mouse leaves the
|
||||
plot (reported by by outspirit).
|
||||
|
||||
- Fix bug with using aboveData with a background (reported by
|
||||
amitayd).
|
||||
|
||||
- Fix possible excanvas leak (report and suggested fix by tom9729).
|
||||
|
||||
- Fix bug with backwards compatibility for shadowSize = 0 (report and
|
||||
suggested fix by aspinak).
|
||||
|
||||
- Adapt examples to skip loading excanvas (fix by Ryley Breiddal).
|
||||
|
||||
- Fix bug that prevent a simple f(x) = -x transform from working
|
||||
correctly (fix by Mike, issue 263).
|
||||
|
||||
- Fix bug in restoring cursor in navigate plugin (reported by Matteo
|
||||
Gattanini, issue 395).
|
||||
|
||||
- Fix bug in picking items when transform/inverseTransform is in use
|
||||
(reported by Ofri Raviv, and patches and analysis by Jan and Tom
|
||||
Paton, issue 334 and 467).
|
||||
|
||||
- Fix problem with unaligned ticks and hover/click events caused by
|
||||
padding on the placeholder by hardcoding the placeholder padding to
|
||||
0 (reported by adityadineshsaxena, Matt Sommer, Daniel Atos and some
|
||||
other people, issue 301).
|
||||
|
||||
- Update colorhelpers plugin to avoid dying when trying to parse an
|
||||
invalid string (reported by cadavor, issue 483).
|
||||
|
||||
|
||||
|
||||
## Flot 0.6 ##
|
||||
|
||||
### API changes ###
|
||||
|
||||
Selection support has been moved to a plugin. Thus if you're passing
|
||||
selection: { mode: something }, you MUST include the file
|
||||
jquery.flot.selection.js after jquery.flot.js. This reduces the size of
|
||||
base Flot and makes it easier to customize the selection as well as
|
||||
improving code clarity. The change is based on a patch from andershol.
|
||||
|
||||
In the global options specified in the $.plot command, "lines", "points",
|
||||
"bars" and "shadowSize" have been moved to a sub-object called "series":
|
||||
|
||||
```js
|
||||
$.plot(placeholder, data, { lines: { show: true }})
|
||||
```
|
||||
|
||||
should be changed to
|
||||
|
||||
```js
|
||||
$.plot(placeholder, data, { series: { lines: { show: true }}})
|
||||
```
|
||||
|
||||
All future series-specific options will go into this sub-object to
|
||||
simplify plugin writing. Backward-compatibility code is in place, so
|
||||
old code should not break.
|
||||
|
||||
"plothover" no longer provides the original data point, but instead a
|
||||
normalized one, since there may be no corresponding original point.
|
||||
|
||||
Due to a bug in previous versions of jQuery, you now need at least
|
||||
jQuery 1.2.6. But if you can, try jQuery 1.3.2 as it got some improvements
|
||||
in event handling speed.
|
||||
|
||||
## Changes ##
|
||||
|
||||
- Added support for disabling interactivity for specific data series.
|
||||
(request from Ronald Schouten and Steve Upton)
|
||||
|
||||
- Flot now calls $() on the placeholder and optional legend container passed
|
||||
in so you can specify DOM elements or CSS expressions to make it easier to
|
||||
use Flot with libraries like Prototype or Mootools or through raw JSON from
|
||||
Ajax responses.
|
||||
|
||||
- A new "plotselecting" event is now emitted while the user is making a
|
||||
selection.
|
||||
|
||||
- The "plothover" event is now emitted immediately instead of at most 10
|
||||
times per second, you'll have to put in a setTimeout yourself if you're
|
||||
doing something really expensive on this event.
|
||||
|
||||
- The built-in date formatter can now be accessed as $.plot.formatDate(...)
|
||||
(suggestion by Matt Manela) and even replaced.
|
||||
|
||||
- Added "borderColor" option to the grid. (patches from Amaury Chamayou and
|
||||
Mike R. Williamson)
|
||||
|
||||
- Added support for gradient backgrounds for the grid. (based on patch from
|
||||
Amaury Chamayou, issue 90)
|
||||
|
||||
The "setting options" example provides a demonstration.
|
||||
|
||||
- Gradient bars. (suggestion by stefpet)
|
||||
|
||||
- Added a "plotunselected" event which is triggered when the selection is
|
||||
removed, see "selection" example. (suggestion by Meda Ugo)
|
||||
|
||||
- The option legend.margin can now specify horizontal and vertical margins
|
||||
independently. (suggestion by someone who's annoyed)
|
||||
|
||||
- Data passed into Flot is now copied to a new canonical format to enable
|
||||
further processing before it hits the drawing routines. As a side-effect,
|
||||
this should make Flot more robust in the face of bad data. (issue 112)
|
||||
|
||||
- Step-wise charting: line charts have a new option "steps" that when set to
|
||||
true connects the points with horizontal/vertical steps instead of diagonal
|
||||
lines.
|
||||
|
||||
- The legend labelFormatter now passes the series in addition to just the
|
||||
label. (suggestion by Vincent Lemeltier)
|
||||
|
||||
- Horizontal bars (based on patch by Jason LeBrun).
|
||||
|
||||
- Support for partial bars by specifying a third coordinate, i.e. they don't
|
||||
have to start from the axis. This can be used to make stacked bars.
|
||||
|
||||
- New option to disable the (grid.show).
|
||||
|
||||
- Added pointOffset method for converting a point in data space to an offset
|
||||
within the placeholder.
|
||||
|
||||
- Plugin system: register an init method in the $.flot.plugins array to get
|
||||
started, see PLUGINS.txt for details on how to write plugins (it's easy).
|
||||
There are also some extra methods to enable access to internal state.
|
||||
|
||||
- Hooks: you can register functions that are called while Flot is crunching
|
||||
the data and doing the plot. This can be used to modify Flot without
|
||||
changing the source, useful for writing plugins. Some hooks are defined,
|
||||
more are likely to come.
|
||||
|
||||
- Threshold plugin: you can set a threshold and a color, and the data points
|
||||
below that threshold will then get the color. Useful for marking data
|
||||
below 0, for instance.
|
||||
|
||||
- Stack plugin: you can specify a stack key for each series to have them
|
||||
summed. This is useful for drawing additive/cumulative graphs with bars and
|
||||
(currently unfilled) lines.
|
||||
|
||||
- Crosshairs plugin: trace the mouse position on the axes, enable with
|
||||
crosshair: { mode: "x"} (see the new tracking example for a use).
|
||||
|
||||
- Image plugin: plot prerendered images.
|
||||
|
||||
- Navigation plugin for panning and zooming a plot.
|
||||
|
||||
- More configurable grid.
|
||||
|
||||
- Axis transformation support, useful for non-linear plots, e.g. log axes and
|
||||
compressed time axes (like omitting weekends).
|
||||
|
||||
- Support for twelve-hour date formatting (patch by Forrest Aldridge).
|
||||
|
||||
- The color parsing code in Flot has been cleaned up and split out so it's
|
||||
now available as a separate jQuery plugin. It's included inline in the Flot
|
||||
source to make dependency managing easier. This also makes it really easy
|
||||
to use the color helpers in Flot plugins.
|
||||
|
||||
## Bug fixes ##
|
||||
|
||||
- Fixed two corner-case bugs when drawing filled curves. (report and analysis
|
||||
by Joshua Varner)
|
||||
|
||||
- Fix auto-adjustment code when setting min to 0 for an axis where the
|
||||
dataset is completely flat on that axis. (report by chovy)
|
||||
|
||||
- Fixed a bug with passing in data from getData to setData when the secondary
|
||||
axes are used. (reported by nperelman, issue 65)
|
||||
|
||||
- Fixed so that it is possible to turn lines off when no other chart type is
|
||||
shown (based on problem reported by Glenn Vanderburg), and fixed so that
|
||||
setting lineWidth to 0 also hides the shadow. (based on problem reported by
|
||||
Sergio Nunes)
|
||||
|
||||
- Updated mousemove position expression to the latest from jQuery. (reported
|
||||
by meyuchas)
|
||||
|
||||
- Use CSS borders instead of background in legend. (issues 25 and 45)
|
||||
|
||||
- Explicitly convert axis min/max to numbers.
|
||||
|
||||
- Fixed a bug with drawing marking lines with different colors. (reported by
|
||||
Khurram)
|
||||
|
||||
- Fixed a bug with returning y2 values in the selection event. (fix by
|
||||
exists, issue 75)
|
||||
|
||||
- Only set position relative on placeholder if it hasn't already a position
|
||||
different from static. (reported by kyberneticist, issue 95)
|
||||
|
||||
- Don't round markings to prevent sub-pixel problems. (reported by
|
||||
Dan Lipsitt)
|
||||
|
||||
- Make the grid border act similarly to a regular CSS border, i.e. prevent
|
||||
it from overlapping the plot itself. This also fixes a problem with anti-
|
||||
aliasing when the width is 1 pixel. (reported by Anthony Ettinger)
|
||||
|
||||
- Imported version 3 of excanvas and fixed two issues with the newer version.
|
||||
Hopefully, this will make Flot work with IE8. (nudge by Fabien Menager,
|
||||
further analysis by Booink, issue 133)
|
||||
|
||||
- Changed the shadow code for lines to hopefully look a bit better with
|
||||
vertical lines.
|
||||
|
||||
- Round tick positions to avoid possible problems with fractions. (suggestion
|
||||
by Fred, issue 130)
|
||||
|
||||
- Made the heuristic for determining how many ticks to aim for a bit smarter.
|
||||
|
||||
- Fix for uneven axis margins (report and patch by Paul Kienzle) and snapping
|
||||
to ticks. (report and patch by lifthrasiir)
|
||||
|
||||
- Fixed bug with slicing in findNearbyItems. (patch by zollman)
|
||||
|
||||
- Make heuristic for x axis label widths more dynamic. (patch by
|
||||
rickinhethuis)
|
||||
|
||||
- Make sure points on top take precedence when finding nearby points when
|
||||
hovering. (reported by didroe, issue 224)
|
||||
|
||||
|
||||
|
||||
## Flot 0.5 ##
|
||||
|
||||
Timestamps are now in UTC. Also "selected" event -> becomes "plotselected"
|
||||
with new data, the parameters for setSelection are now different (but
|
||||
backwards compatibility hooks are in place), coloredAreas becomes markings
|
||||
with a new interface (but backwards compatibility hooks are in place).
|
||||
|
||||
### API changes ###
|
||||
|
||||
Timestamps in time mode are now displayed according to UTC instead of the time
|
||||
zone of the visitor. This affects the way the timestamps should be input;
|
||||
you'll probably have to offset the timestamps according to your local time
|
||||
zone. It also affects any custom date handling code (which basically now
|
||||
should use the equivalent UTC date mehods, e.g. .setUTCMonth() instead of
|
||||
.setMonth().
|
||||
|
||||
Markings, previously coloredAreas, are now specified as ranges on the axes,
|
||||
like ```{ xaxis: { from: 0, to: 10 }}```. Furthermore with markings you can
|
||||
now draw horizontal/vertical lines by setting from and to to the same
|
||||
coordinate. (idea from line support patch by by Ryan Funduk)
|
||||
|
||||
Interactivity: added a new "plothover" event and this and the "plotclick"
|
||||
event now returns the closest data item (based on patch by /david, patch by
|
||||
Mark Byers for bar support). See the revamped "interacting with the data"
|
||||
example for some hints on what you can do.
|
||||
|
||||
Highlighting: you can now highlight points and datapoints are autohighlighted
|
||||
when you hover over them (if hovering is turned on).
|
||||
|
||||
Support for dual axis has been added (based on patch by someone who's annoyed
|
||||
and /david). For each data series you can specify which axes it belongs to,
|
||||
and there are two more axes, x2axis and y2axis, to customize. This affects the
|
||||
"selected" event which has been renamed to "plotselected" and spews out
|
||||
```{ xaxis: { from: -10, to: 20 } ... },``` setSelection in which the
|
||||
parameters are on a new form (backwards compatible hooks are in place so old
|
||||
code shouldn't break) and markings (formerly coloredAreas).
|
||||
|
||||
## Changes ##
|
||||
|
||||
- Added support for specifying the size of tick labels (axis.labelWidth,
|
||||
axis.labelHeight). Useful for specifying a max label size to keep multiple
|
||||
plots aligned.
|
||||
|
||||
- The "fill" option can now be a number that specifies the opacity of the
|
||||
fill.
|
||||
|
||||
- You can now specify a coordinate as null (like [2, null]) and Flot will
|
||||
take the other coordinate into account when scaling the axes. (based on
|
||||
patch by joebno)
|
||||
|
||||
- New option for bars "align". Set it to "center" to center the bars on the
|
||||
value they represent.
|
||||
|
||||
- setSelection now takes a second parameter which you can use to prevent the
|
||||
method from firing the "plotselected" handler.
|
||||
|
||||
- Improved the handling of axis auto-scaling with bars.
|
||||
|
||||
## Bug fixes ##
|
||||
|
||||
- Fixed a bug in calculating spacing around the plot. (reported by
|
||||
timothytoe)
|
||||
|
||||
- Fixed a bug in finding max values for all-negative data sets.
|
||||
|
||||
- Prevent the possibility of eternal looping in tick calculations.
|
||||
|
||||
- Fixed a bug when borderWidth is set to 0. (reported by Rob/sanchothefat)
|
||||
|
||||
- Fixed a bug with drawing bars extending below 0. (reported by James Hewitt,
|
||||
patch by Ryan Funduk).
|
||||
|
||||
- Fixed a bug with line widths of bars. (reported by MikeM)
|
||||
|
||||
- Fixed a bug with 'nw' and 'sw' legend positions.
|
||||
|
||||
- Fixed a bug with multi-line x-axis tick labels. (reported by Luca Ciano,
|
||||
IE-fix help by Savage Zhang)
|
||||
|
||||
- Using the "container" option in legend now overwrites the container element
|
||||
instead of just appending to it, fixing the infinite legend bug. (reported
|
||||
by several people, fix by Brad Dewey)
|
||||
|
||||
|
||||
|
||||
## Flot 0.4 ##
|
||||
|
||||
### API changes ###
|
||||
|
||||
Deprecated axis.noTicks in favor of just specifying the number as axis.ticks.
|
||||
So ```xaxis: { noTicks: 10 }``` becomes ```xaxis: { ticks: 10 }```.
|
||||
|
||||
Time series support. Specify axis.mode: "time", put in Javascript timestamps
|
||||
as data, and Flot will automatically spit out sensible ticks. Take a look at
|
||||
the two new examples. The format can be customized with axis.timeformat and
|
||||
axis.monthNames, or if that fails with axis.tickFormatter.
|
||||
|
||||
Support for colored background areas via grid.coloredAreas. Specify an array
|
||||
of { x1, y1, x2, y2 } objects or a function that returns these given
|
||||
{ xmin, xmax, ymin, ymax }.
|
||||
|
||||
More members on the plot object (report by Chris Davies and others).
|
||||
"getData" for inspecting the assigned settings on data series (e.g. color) and
|
||||
"setData", "setupGrid" and "draw" for updating the contents without a total
|
||||
replot.
|
||||
|
||||
The default number of ticks to aim for is now dependent on the size of the
|
||||
plot in pixels. Support for customizing tick interval sizes directly with
|
||||
axis.minTickSize and axis.tickSize.
|
||||
|
||||
Cleaned up the automatic axis scaling algorithm and fixed how it interacts
|
||||
with ticks. Also fixed a couple of tick-related corner case bugs (one reported
|
||||
by mainstreetmark, another reported by timothytoe).
|
||||
|
||||
The option axis.tickFormatter now takes a function with two parameters, the
|
||||
second parameter is an optional object with information about the axis. It has
|
||||
min, max, tickDecimals, tickSize.
|
||||
|
||||
## Changes ##
|
||||
|
||||
- Added support for segmented lines. (based on patch from Michael MacDonald)
|
||||
|
||||
- Added support for ignoring null and bad values. (suggestion from Nick
|
||||
Konidaris and joshwaihi)
|
||||
|
||||
- Added support for changing the border width. (thanks to joebno and safoo)
|
||||
|
||||
- Label colors can be changed via CSS by selecting the tickLabel class.
|
||||
|
||||
## Bug fixes ##
|
||||
|
||||
- Fixed a bug in handling single-item bar series. (reported by Emil Filipov)
|
||||
|
||||
- Fixed erratic behaviour when interacting with the plot with IE 7. (reported
|
||||
by Lau Bech Lauritzen).
|
||||
|
||||
- Prevent IE/Safari text selection when selecting stuff on the canvas.
|
||||
|
||||
|
||||
|
||||
## Flot 0.3 ##
|
||||
|
||||
This is mostly a quick-fix release because jquery.js wasn't included in the
|
||||
previous zip/tarball.
|
||||
|
||||
## Changes ##
|
||||
|
||||
- Include jquery.js in the zip/tarball.
|
||||
|
||||
- Support clicking on the plot. Turn it on with grid: { clickable: true },
|
||||
then you get a "plotclick" event on the graph placeholder with the position
|
||||
in units of the plot.
|
||||
|
||||
## Bug fixes ##
|
||||
|
||||
- Fixed a bug in dealing with data where min = max. (thanks to Michael
|
||||
Messinides)
|
||||
|
||||
|
||||
|
||||
## Flot 0.2 ##
|
||||
|
||||
The API should now be fully documented.
|
||||
|
||||
### API changes ###
|
||||
|
||||
Moved labelMargin option to grid from x/yaxis.
|
||||
|
||||
## Changes ##
|
||||
|
||||
- Added support for putting a background behind the default legend. The
|
||||
default is the partly transparent background color. Added backgroundColor
|
||||
and backgroundOpacity to the legend options to control this.
|
||||
|
||||
- The ticks options can now be a callback function that takes one parameter,
|
||||
an object with the attributes min and max. The function should return a
|
||||
ticks array.
|
||||
|
||||
- Added labelFormatter option in legend, useful for turning the legend
|
||||
labels into links.
|
||||
|
||||
- Reduced the size of the code. (patch by Guy Fraser)
|
||||
|
||||
|
||||
|
||||
## Flot 0.1 ##
|
||||
|
||||
First public release.
|
||||
@@ -1,143 +0,0 @@
|
||||
## Writing plugins ##
|
||||
|
||||
All you need to do to make a new plugin is creating an init function
|
||||
and a set of options (if needed), stuffing it into an object and
|
||||
putting it in the $.plot.plugins array. For example:
|
||||
|
||||
```js
|
||||
function myCoolPluginInit(plot) {
|
||||
plot.coolstring = "Hello!";
|
||||
};
|
||||
|
||||
$.plot.plugins.push({ init: myCoolPluginInit, options: { ... } });
|
||||
|
||||
// if $.plot is called, it will return a plot object with the
|
||||
// attribute "coolstring"
|
||||
```
|
||||
|
||||
Now, given that the plugin might run in many different places, it's
|
||||
a good idea to avoid leaking names. The usual trick here is wrap the
|
||||
above lines in an anonymous function which is called immediately, like
|
||||
this: (function () { inner code ... })(). To make it even more robust
|
||||
in case $ is not bound to jQuery but some other Javascript library, we
|
||||
can write it as
|
||||
|
||||
```js
|
||||
(function ($) {
|
||||
// plugin definition
|
||||
// ...
|
||||
})(jQuery);
|
||||
```
|
||||
|
||||
There's a complete example below, but you should also check out the
|
||||
plugins bundled with Flot.
|
||||
|
||||
|
||||
## Complete example ##
|
||||
|
||||
Here is a simple debug plugin which alerts each of the series in the
|
||||
plot. It has a single option that control whether it is enabled and
|
||||
how much info to output:
|
||||
|
||||
```js
|
||||
(function ($) {
|
||||
function init(plot) {
|
||||
var debugLevel = 1;
|
||||
|
||||
function checkDebugEnabled(plot, options) {
|
||||
if (options.debug) {
|
||||
debugLevel = options.debug;
|
||||
plot.hooks.processDatapoints.push(alertSeries);
|
||||
}
|
||||
}
|
||||
|
||||
function alertSeries(plot, series, datapoints) {
|
||||
var msg = "series " + series.label;
|
||||
if (debugLevel > 1) {
|
||||
msg += " with " + series.data.length + " points";
|
||||
alert(msg);
|
||||
}
|
||||
}
|
||||
|
||||
plot.hooks.processOptions.push(checkDebugEnabled);
|
||||
}
|
||||
|
||||
var options = { debug: 0 };
|
||||
|
||||
$.plot.plugins.push({
|
||||
init: init,
|
||||
options: options,
|
||||
name: "simpledebug",
|
||||
version: "0.1"
|
||||
});
|
||||
})(jQuery);
|
||||
```
|
||||
|
||||
We also define "name" and "version". It's not used by Flot, but might
|
||||
be helpful for other plugins in resolving dependencies.
|
||||
|
||||
Put the above in a file named "jquery.flot.debug.js", include it in an
|
||||
HTML page and then it can be used with:
|
||||
|
||||
```js
|
||||
$.plot($("#placeholder"), [...], { debug: 2 });
|
||||
```
|
||||
|
||||
This simple plugin illustrates a couple of points:
|
||||
|
||||
- It uses the anonymous function trick to avoid name pollution.
|
||||
- It can be enabled/disabled through an option.
|
||||
- Variables in the init function can be used to store plot-specific
|
||||
state between the hooks.
|
||||
|
||||
The two last points are important because there may be multiple plots
|
||||
on the same page, and you'd want to make sure they are not mixed up.
|
||||
|
||||
|
||||
## Shutting down a plugin ##
|
||||
|
||||
Each plot object has a shutdown hook which is run when plot.shutdown()
|
||||
is called. This usually mostly happens in case another plot is made on
|
||||
top of an existing one.
|
||||
|
||||
The purpose of the hook is to give you a chance to unbind any event
|
||||
handlers you've registered and remove any extra DOM things you've
|
||||
inserted.
|
||||
|
||||
The problem with event handlers is that you can have registered a
|
||||
handler which is run in some point in the future, e.g. with
|
||||
setTimeout(). Meanwhile, the plot may have been shutdown and removed,
|
||||
but because your event handler is still referencing it, it can't be
|
||||
garbage collected yet, and worse, if your handler eventually runs, it
|
||||
may overwrite stuff on a completely different plot.
|
||||
|
||||
|
||||
## Some hints on the options ##
|
||||
|
||||
Plugins should always support appropriate options to enable/disable
|
||||
them because the plugin user may have several plots on the same page
|
||||
where only one should use the plugin. In most cases it's probably a
|
||||
good idea if the plugin is turned off rather than on per default, just
|
||||
like most of the powerful features in Flot.
|
||||
|
||||
If the plugin needs options that are specific to each series, like the
|
||||
points or lines options in core Flot, you can put them in "series" in
|
||||
the options object, e.g.
|
||||
|
||||
```js
|
||||
var options = {
|
||||
series: {
|
||||
downsample: {
|
||||
algorithm: null,
|
||||
maxpoints: 1000
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Then they will be copied by Flot into each series, providing default
|
||||
values in case none are specified.
|
||||
|
||||
Think hard and long about naming the options. These names are going to
|
||||
be public API, and code is going to depend on them if the plugin is
|
||||
successful.
|
||||
@@ -1,110 +0,0 @@
|
||||
# Flot [](https://travis-ci.org/flot/flot)
|
||||
|
||||
## About ##
|
||||
|
||||
Flot is a Javascript plotting library for jQuery.
|
||||
Read more at the website: <http://www.flotcharts.org/>
|
||||
|
||||
Take a look at the the examples in examples/index.html; they should give a good
|
||||
impression of what Flot can do, and the source code of the examples is probably
|
||||
the fastest way to learn how to use Flot.
|
||||
|
||||
|
||||
## Installation ##
|
||||
|
||||
Just include the Javascript file after you've included jQuery.
|
||||
|
||||
Generally, all browsers that support the HTML5 canvas tag are
|
||||
supported.
|
||||
|
||||
For support for Internet Explorer < 9, you can use [Excanvas]
|
||||
[excanvas], a canvas emulator; this is used in the examples bundled
|
||||
with Flot. You just include the excanvas script like this:
|
||||
|
||||
```html
|
||||
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="excanvas.min.js"></script><![endif]-->
|
||||
```
|
||||
|
||||
If it's not working on your development IE 6.0, check that it has
|
||||
support for VML which Excanvas is relying on. It appears that some
|
||||
stripped down versions used for test environments on virtual machines
|
||||
lack the VML support.
|
||||
|
||||
You can also try using [Flashcanvas][flashcanvas], which uses Flash to
|
||||
do the emulation. Although Flash can be a bit slower to load than VML,
|
||||
if you've got a lot of points, the Flash version can be much faster
|
||||
overall. Flot contains some wrapper code for activating Excanvas which
|
||||
Flashcanvas is compatible with.
|
||||
|
||||
You need at least jQuery 1.2.6, but try at least 1.3.2 for interactive
|
||||
charts because of performance improvements in event handling.
|
||||
|
||||
|
||||
## Basic usage ##
|
||||
|
||||
Create a placeholder div to put the graph in:
|
||||
|
||||
```html
|
||||
<div id="placeholder"></div>
|
||||
```
|
||||
|
||||
You need to set the width and height of this div, otherwise the plot
|
||||
library doesn't know how to scale the graph. You can do it inline like
|
||||
this:
|
||||
|
||||
```html
|
||||
<div id="placeholder" style="width:600px;height:300px"></div>
|
||||
```
|
||||
|
||||
You can also do it with an external stylesheet. Make sure that the
|
||||
placeholder isn't within something with a display:none CSS property -
|
||||
in that case, Flot has trouble measuring label dimensions which
|
||||
results in garbled looks and might have trouble measuring the
|
||||
placeholder dimensions which is fatal (it'll throw an exception).
|
||||
|
||||
Then when the div is ready in the DOM, which is usually on document
|
||||
ready, run the plot function:
|
||||
|
||||
```js
|
||||
$.plot($("#placeholder"), data, options);
|
||||
```
|
||||
|
||||
Here, data is an array of data series and options is an object with
|
||||
settings if you want to customize the plot. Take a look at the
|
||||
examples for some ideas of what to put in or look at the
|
||||
[API reference](API.md). Here's a quick example that'll draw a line
|
||||
from (0, 0) to (1, 1):
|
||||
|
||||
```js
|
||||
$.plot($("#placeholder"), [ [[0, 0], [1, 1]] ], { yaxis: { max: 1 } });
|
||||
```
|
||||
|
||||
The plot function immediately draws the chart and then returns a plot
|
||||
object with a couple of methods.
|
||||
|
||||
|
||||
## What's with the name? ##
|
||||
|
||||
First: it's pronounced with a short o, like "plot". Not like "flawed".
|
||||
|
||||
So "Flot" rhymes with "plot".
|
||||
|
||||
And if you look up "flot" in a Danish-to-English dictionary, some of
|
||||
the words that come up are "good-looking", "attractive", "stylish",
|
||||
"smart", "impressive", "extravagant". One of the main goals with Flot
|
||||
is pretty looks.
|
||||
|
||||
|
||||
## Notes about the examples ##
|
||||
|
||||
In order to have a useful, functional example of time-series plots using time
|
||||
zones, date.js from [timezone-js][timezone-js] (released under the Apache 2.0
|
||||
license) and the [Olson][olson] time zone database (released to the public
|
||||
domain) have been included in the examples directory. They are used in
|
||||
examples/axes-time-zones/index.html.
|
||||
|
||||
|
||||
[excanvas]: http://code.google.com/p/explorercanvas/
|
||||
[flashcanvas]: http://code.google.com/p/flashcanvas/
|
||||
[timezone-js]: https://github.com/mde/timezone-js
|
||||
[olson]: http://ftp.iana.org/time-zones
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "Europe (EU27)",
|
||||
"data": [[1999, 3.0], [2000, 3.9]]
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "Europe (EU27)",
|
||||
"data": [[1999, 3.0], [2000, 3.9], [2001, 2.0], [2002, 1.2]]
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "Europe (EU27)",
|
||||
"data": [[1999, 3.0], [2000, 3.9], [2001, 2.0], [2002, 1.2], [2003, 1.3], [2004, 2.5]]
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "Europe (EU27)",
|
||||
"data": [[1999, 3.0], [2000, 3.9], [2001, 2.0], [2002, 1.2], [2003, 1.3], [2004, 2.5], [2005, 2.0], [2006, 3.1]]
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "Europe (EU27)",
|
||||
"data": [[1999, 3.0], [2000, 3.9], [2001, 2.0], [2002, 1.2], [2003, 1.3], [2004, 2.5], [2005, 2.0], [2006, 3.1], [2007, 2.9], [2008, 0.9]]
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "Europe (EU27)",
|
||||
"data": [[1999, 3.0], [2000, 3.9], [2001, 2.0], [2002, 1.2], [2003, 1.3], [2004, 2.5], [2005, 2.0], [2006, 3.1], [2007, 2.9], [2008, 0.9]]
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "Japan",
|
||||
"data": [[1999, -0.1], [2000, 2.9], [2001, 0.2], [2002, 0.3], [2003, 1.4], [2004, 2.7], [2005, 1.9], [2006, 2.0], [2007, 2.3], [2008, -0.7]]
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"label": "USA",
|
||||
"data": [[1999, 4.4], [2000, 3.7], [2001, 0.8], [2002, 1.6], [2003, 2.5], [2004, 3.6], [2005, 2.9], [2006, 2.8], [2007, 2.0], [2008, 1.1]]
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Flot Examples: AJAX</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css">
|
||||
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../../excanvas.min.js"></script><![endif]-->
|
||||
<script language="javascript" type="text/javascript" src="../../jquery.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="../../jquery.flot.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
|
||||
var options = {
|
||||
lines: {
|
||||
show: true
|
||||
},
|
||||
points: {
|
||||
show: true
|
||||
},
|
||||
xaxis: {
|
||||
tickDecimals: 0,
|
||||
tickSize: 1
|
||||
}
|
||||
};
|
||||
|
||||
var data = [];
|
||||
|
||||
$.plot("#placeholder", data, options);
|
||||
|
||||
// Fetch one series, adding to what we already have
|
||||
|
||||
var alreadyFetched = {};
|
||||
|
||||
$("button.fetchSeries").click(function () {
|
||||
|
||||
var button = $(this);
|
||||
|
||||
// Find the URL in the link right next to us, then fetch the data
|
||||
|
||||
var dataurl = button.siblings("a").attr("href");
|
||||
|
||||
function onDataReceived(series) {
|
||||
|
||||
// Extract the first coordinate pair; jQuery has parsed it, so
|
||||
// the data is now just an ordinary JavaScript object
|
||||
|
||||
var firstcoordinate = "(" + series.data[0][0] + ", " + series.data[0][1] + ")";
|
||||
button.siblings("span").text("Fetched " + series.label + ", first point: " + firstcoordinate);
|
||||
|
||||
// Push the new data onto our existing data array
|
||||
|
||||
if (!alreadyFetched[series.label]) {
|
||||
alreadyFetched[series.label] = true;
|
||||
data.push(series);
|
||||
}
|
||||
|
||||
$.plot("#placeholder", data, options);
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: dataurl,
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
success: onDataReceived
|
||||
});
|
||||
});
|
||||
|
||||
// Initiate a recurring data update
|
||||
|
||||
$("button.dataUpdate").click(function () {
|
||||
|
||||
data = [];
|
||||
alreadyFetched = {};
|
||||
|
||||
$.plot("#placeholder", data, options);
|
||||
|
||||
var iteration = 0;
|
||||
|
||||
function fetchData() {
|
||||
|
||||
++iteration;
|
||||
|
||||
function onDataReceived(series) {
|
||||
|
||||
// Load all the data in one pass; if we only got partial
|
||||
// data we could merge it with what we already have.
|
||||
|
||||
data = [ series ];
|
||||
$.plot("#placeholder", data, options);
|
||||
}
|
||||
|
||||
// Normally we call the same URL - a script connected to a
|
||||
// database - but in this case we only have static example
|
||||
// files, so we need to modify the URL.
|
||||
|
||||
$.ajax({
|
||||
url: "data-eu-gdp-growth-" + iteration + ".json",
|
||||
type: "GET",
|
||||
dataType: "json",
|
||||
success: onDataReceived
|
||||
});
|
||||
|
||||
if (iteration < 5) {
|
||||
setTimeout(fetchData, 1000);
|
||||
} else {
|
||||
data = [];
|
||||
alreadyFetched = {};
|
||||
}
|
||||
}
|
||||
|
||||
setTimeout(fetchData, 1000);
|
||||
});
|
||||
|
||||
// Load the first series by default, so we don't have an empty plot
|
||||
|
||||
$("button.fetchSeries:first").click();
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="header">
|
||||
<h2>AJAX</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>Example of loading data dynamically with AJAX. Percentage change in GDP (source: <a href="http://epp.eurostat.ec.europa.eu/tgm/table.do?tab=table&init=1&plugin=1&language=en&pcode=tsieb020">Eurostat</a>). Click the buttons below:</p>
|
||||
|
||||
<p>The data is fetched over HTTP, in this case directly from text files. Usually the URL would point to some web server handler (e.g. a PHP page or Java/.NET/Python/Ruby on Rails handler) that extracts it from a database and serializes it to JSON.</p>
|
||||
|
||||
<p>
|
||||
<button class="fetchSeries">First dataset</button>
|
||||
[ <a href="data-eu-gdp-growth.json">see data</a> ]
|
||||
<span></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button class="fetchSeries">Second dataset</button>
|
||||
[ <a href="data-japan-gdp-growth.json">see data</a> ]
|
||||
<span></span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button class="fetchSeries">Third dataset</button>
|
||||
[ <a href="data-usa-gdp-growth.json">see data</a> ]
|
||||
<span></span>
|
||||
</p>
|
||||
|
||||
<p>If you combine AJAX with setTimeout, you can poll the server for new data.</p>
|
||||
|
||||
<p>
|
||||
<button class="dataUpdate">Poll for data</button>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Copyright © 2007 - 2013 IOLA and Ole Laursen
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,87 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Flot Examples: Adding Annotations</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css">
|
||||
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../../excanvas.min.js"></script><![endif]-->
|
||||
<script language="javascript" type="text/javascript" src="../../jquery.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="../../jquery.flot.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
|
||||
var d1 = [];
|
||||
for (var i = 0; i < 20; ++i) {
|
||||
d1.push([i, Math.sin(i)]);
|
||||
}
|
||||
|
||||
var data = [{ data: d1, label: "Pressure", color: "#333" }];
|
||||
|
||||
var markings = [
|
||||
{ color: "#f6f6f6", yaxis: { from: 1 } },
|
||||
{ color: "#f6f6f6", yaxis: { to: -1 } },
|
||||
{ color: "#000", lineWidth: 1, xaxis: { from: 2, to: 2 } },
|
||||
{ color: "#000", lineWidth: 1, xaxis: { from: 8, to: 8 } }
|
||||
];
|
||||
|
||||
var placeholder = $("#placeholder");
|
||||
|
||||
var plot = $.plot(placeholder, data, {
|
||||
bars: { show: true, barWidth: 0.5, fill: 0.9 },
|
||||
xaxis: { ticks: [], autoscaleMargin: 0.02 },
|
||||
yaxis: { min: -2, max: 2 },
|
||||
grid: { markings: markings }
|
||||
});
|
||||
|
||||
var o = plot.pointOffset({ x: 2, y: -1.2});
|
||||
|
||||
// Append it to the placeholder that Flot already uses for positioning
|
||||
|
||||
placeholder.append("<div style='position:absolute;left:" + (o.left + 4) + "px;top:" + o.top + "px;color:#666;font-size:smaller'>Warming up</div>");
|
||||
|
||||
o = plot.pointOffset({ x: 8, y: -1.2});
|
||||
placeholder.append("<div style='position:absolute;left:" + (o.left + 4) + "px;top:" + o.top + "px;color:#666;font-size:smaller'>Actual measurements</div>");
|
||||
|
||||
// Draw a little arrow on top of the last label to demonstrate canvas
|
||||
// drawing
|
||||
|
||||
var ctx = plot.getCanvas().getContext("2d");
|
||||
ctx.beginPath();
|
||||
o.left += 4;
|
||||
ctx.moveTo(o.left, o.top);
|
||||
ctx.lineTo(o.left, o.top - 10);
|
||||
ctx.lineTo(o.left + 10, o.top - 5);
|
||||
ctx.lineTo(o.left, o.top);
|
||||
ctx.fillStyle = "#000";
|
||||
ctx.fill();
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="header">
|
||||
<h2>Adding Annotations</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>Flot has support for simple background decorations such as lines and rectangles. They can be useful for marking up certain areas. You can easily add any HTML you need with standard DOM manipulation, e.g. for labels. For drawing custom shapes there is also direct access to the canvas.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Copyright © 2007 - 2013 IOLA and Ole Laursen
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,97 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Flot Examples: Interacting with axes</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css">
|
||||
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../../excanvas.min.js"></script><![endif]-->
|
||||
<script language="javascript" type="text/javascript" src="../../jquery.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="../../jquery.flot.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
|
||||
function generate(start, end, fn) {
|
||||
var res = [];
|
||||
for (var i = 0; i <= 100; ++i) {
|
||||
var x = start + i / 100 * (end - start);
|
||||
res.push([x, fn(x)]);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
var data = [
|
||||
{ data: generate(0, 10, function (x) { return Math.sqrt(x);}), xaxis: 1, yaxis:1 },
|
||||
{ data: generate(0, 10, function (x) { return Math.sin(x);}), xaxis: 1, yaxis:2 },
|
||||
{ data: generate(0, 10, function (x) { return Math.cos(x);}), xaxis: 1, yaxis:3 },
|
||||
{ data: generate(2, 10, function (x) { return Math.tan(x);}), xaxis: 2, yaxis: 4 }
|
||||
];
|
||||
|
||||
var plot = $.plot("#placeholder", data, {
|
||||
xaxes: [
|
||||
{ position: 'bottom' },
|
||||
{ position: 'top'}
|
||||
],
|
||||
yaxes: [
|
||||
{ position: 'left' },
|
||||
{ position: 'left' },
|
||||
{ position: 'right' },
|
||||
{ position: 'left' }
|
||||
]
|
||||
});
|
||||
|
||||
// Create a div for each axis
|
||||
|
||||
$.each(plot.getAxes(), function (i, axis) {
|
||||
if (!axis.show)
|
||||
return;
|
||||
|
||||
var box = axis.box;
|
||||
|
||||
$("<div class='axisTarget' style='position:absolute; left:" + box.left + "px; top:" + box.top + "px; width:" + box.width + "px; height:" + box.height + "px'></div>")
|
||||
.data("axis.direction", axis.direction)
|
||||
.data("axis.n", axis.n)
|
||||
.css({ backgroundColor: "#f00", opacity: 0, cursor: "pointer" })
|
||||
.appendTo(plot.getPlaceholder())
|
||||
.hover(
|
||||
function () { $(this).css({ opacity: 0.10 }) },
|
||||
function () { $(this).css({ opacity: 0 }) }
|
||||
)
|
||||
.click(function () {
|
||||
$("#click").text("You clicked the " + axis.direction + axis.n + "axis!")
|
||||
});
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="header">
|
||||
<h2>Interacting with axes</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<div class="demo-container">
|
||||
<div id="placeholder" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<p>With multiple axes, you sometimes need to interact with them. A simple way to do this is to draw the plot, deduce the axis placements and insert a couple of divs on top to catch events.</p>
|
||||
|
||||
<p>Try clicking an axis.</p>
|
||||
|
||||
<p id="click"></p>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Copyright © 2007 - 2013 IOLA and Ole Laursen
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,893 +0,0 @@
|
||||
// -----
|
||||
// The `timezoneJS.Date` object gives you full-blown timezone support, independent from the timezone set on the end-user's machine running the browser. It uses the Olson zoneinfo files for its timezone data.
|
||||
//
|
||||
// The constructor function and setter methods use proxy JavaScript Date objects behind the scenes, so you can use strings like '10/22/2006' with the constructor. You also get the same sensible wraparound behavior with numeric parameters (like setting a value of 14 for the month wraps around to the next March).
|
||||
//
|
||||
// The other significant difference from the built-in JavaScript Date is that `timezoneJS.Date` also has named properties that store the values of year, month, date, etc., so it can be directly serialized to JSON and used for data transfer.
|
||||
|
||||
/*
|
||||
* Copyright 2010 Matthew Eernisse (mde@fleegix.org)
|
||||
* and Open Source Applications Foundation
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Credits: Ideas included from incomplete JS implementation of Olson
|
||||
* parser, "XMLDAte" by Philippe Goetz (philippe.goetz@wanadoo.fr)
|
||||
*
|
||||
* Contributions:
|
||||
* Jan Niehusmann
|
||||
* Ricky Romero
|
||||
* Preston Hunt (prestonhunt@gmail.com)
|
||||
* Dov. B Katz (dov.katz@morganstanley.com)
|
||||
* Peter Bergström (pbergstr@mac.com)
|
||||
* Long Ho
|
||||
*/
|
||||
(function () {
|
||||
// Standard initialization stuff to make sure the library is
|
||||
// usable on both client and server (node) side.
|
||||
|
||||
var root = this;
|
||||
|
||||
var timezoneJS;
|
||||
if (typeof exports !== 'undefined') {
|
||||
timezoneJS = exports;
|
||||
} else {
|
||||
timezoneJS = root.timezoneJS = {};
|
||||
}
|
||||
|
||||
timezoneJS.VERSION = '1.0.0';
|
||||
|
||||
// Grab the ajax library from global context.
|
||||
// This can be jQuery, Zepto or fleegix.
|
||||
// You can also specify your own transport mechanism by declaring
|
||||
// `timezoneJS.timezone.transport` to a `function`. More details will follow
|
||||
var $ = root.$ || root.jQuery || root.Zepto
|
||||
, fleegix = root.fleegix
|
||||
// Declare constant list of days and months. Unfortunately this doesn't leave room for i18n due to the Olson data being in English itself
|
||||
, DAYS = timezoneJS.Days = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
||||
, MONTHS = timezoneJS.Months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
||||
, SHORT_MONTHS = {}
|
||||
, SHORT_DAYS = {}
|
||||
, EXACT_DATE_TIME = {}
|
||||
, TZ_REGEXP = new RegExp('^[a-zA-Z]+/');
|
||||
|
||||
//`{ "Jan": 0, "Feb": 1, "Mar": 2, "Apr": 3, "May": 4, "Jun": 5, "Jul": 6, "Aug": 7, "Sep": 8, "Oct": 9, "Nov": 10, "Dec": 11 }`
|
||||
for (var i = 0; i < MONTHS.length; i++) {
|
||||
SHORT_MONTHS[MONTHS[i].substr(0, 3)] = i;
|
||||
}
|
||||
|
||||
//`{ "Sun": 0, "Mon": 1, "Tue": 2, "Wed": 3, "Thu": 4, "Fri": 5, "Sat": 6 }`
|
||||
for (i = 0; i < DAYS.length; i++) {
|
||||
SHORT_DAYS[DAYS[i].substr(0, 3)] = i;
|
||||
}
|
||||
|
||||
|
||||
//Handle array indexOf in IE
|
||||
if (!Array.prototype.indexOf) {
|
||||
Array.prototype.indexOf = function (el) {
|
||||
for (var i = 0; i < this.length; i++ ) {
|
||||
if (el === this[i]) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Format a number to the length = digits. For ex:
|
||||
//
|
||||
// `_fixWidth(2, 2) = '02'`
|
||||
//
|
||||
// `_fixWidth(1998, 2) = '98'`
|
||||
//
|
||||
// This is used to pad numbers in converting date to string in ISO standard.
|
||||
var _fixWidth = function (number, digits) {
|
||||
if (typeof number !== "number") { throw "not a number: " + number; }
|
||||
var s = number.toString();
|
||||
if (number.length > digits) {
|
||||
return number.substr(number.length - digits, number.length);
|
||||
}
|
||||
while (s.length < digits) {
|
||||
s = '0' + s;
|
||||
}
|
||||
return s;
|
||||
};
|
||||
|
||||
// Abstraction layer for different transport layers, including fleegix/jQuery/Zepto
|
||||
//
|
||||
// Object `opts` include
|
||||
//
|
||||
// - `url`: url to ajax query
|
||||
//
|
||||
// - `async`: true for asynchronous, false otherwise. If false, return value will be response from URL. This is true by default
|
||||
//
|
||||
// - `success`: success callback function
|
||||
//
|
||||
// - `error`: error callback function
|
||||
// Returns response from URL if async is false, otherwise the AJAX request object itself
|
||||
var _transport = function (opts) {
|
||||
if ((!fleegix || typeof fleegix.xhr === 'undefined') && (!$ || typeof $.ajax === 'undefined')) {
|
||||
throw new Error('Please use the Fleegix.js XHR module, jQuery ajax, Zepto ajax, or define your own transport mechanism for downloading zone files.');
|
||||
}
|
||||
if (!opts) return;
|
||||
if (!opts.url) throw new Error ('URL must be specified');
|
||||
if (!('async' in opts)) opts.async = true;
|
||||
if (!opts.async) {
|
||||
return fleegix && fleegix.xhr
|
||||
? fleegix.xhr.doReq({ url: opts.url, async: false })
|
||||
: $.ajax({ url : opts.url, async : false }).responseText;
|
||||
}
|
||||
return fleegix && fleegix.xhr
|
||||
? fleegix.xhr.send({
|
||||
url : opts.url,
|
||||
method : 'get',
|
||||
handleSuccess : opts.success,
|
||||
handleErr : opts.error
|
||||
})
|
||||
: $.ajax({
|
||||
url : opts.url,
|
||||
dataType: 'text',
|
||||
method : 'GET',
|
||||
error : opts.error,
|
||||
success : opts.success
|
||||
});
|
||||
};
|
||||
|
||||
// Constructor, which is similar to that of the native Date object itself
|
||||
timezoneJS.Date = function () {
|
||||
var args = Array.prototype.slice.apply(arguments)
|
||||
, dt = null
|
||||
, tz = null
|
||||
, arr = [];
|
||||
|
||||
|
||||
//We support several different constructors, including all the ones from `Date` object
|
||||
// with a timezone string at the end.
|
||||
//
|
||||
//- `[tz]`: Returns object with time in `tz` specified.
|
||||
//
|
||||
// - `utcMillis`, `[tz]`: Return object with UTC time = `utcMillis`, in `tz`.
|
||||
//
|
||||
// - `Date`, `[tz]`: Returns object with UTC time = `Date.getTime()`, in `tz`.
|
||||
//
|
||||
// - `year, month, [date,] [hours,] [minutes,] [seconds,] [millis,] [tz]: Same as `Date` object
|
||||
// with tz.
|
||||
//
|
||||
// - `Array`: Can be any combo of the above.
|
||||
//
|
||||
//If 1st argument is an array, we can use it as a list of arguments itself
|
||||
if (Object.prototype.toString.call(args[0]) === '[object Array]') {
|
||||
args = args[0];
|
||||
}
|
||||
if (typeof args[args.length - 1] === 'string' && TZ_REGEXP.test(args[args.length - 1])) {
|
||||
tz = args.pop();
|
||||
}
|
||||
switch (args.length) {
|
||||
case 0:
|
||||
dt = new Date();
|
||||
break;
|
||||
case 1:
|
||||
dt = new Date(args[0]);
|
||||
break;
|
||||
default:
|
||||
for (var i = 0; i < 7; i++) {
|
||||
arr[i] = args[i] || 0;
|
||||
}
|
||||
dt = new Date(arr[0], arr[1], arr[2], arr[3], arr[4], arr[5], arr[6]);
|
||||
break;
|
||||
}
|
||||
|
||||
this._useCache = false;
|
||||
this._tzInfo = {};
|
||||
this._day = 0;
|
||||
this.year = 0;
|
||||
this.month = 0;
|
||||
this.date = 0;
|
||||
this.hours = 0;
|
||||
this.minutes = 0;
|
||||
this.seconds = 0;
|
||||
this.milliseconds = 0;
|
||||
this.timezone = tz || null;
|
||||
//Tricky part:
|
||||
// For the cases where there are 1/2 arguments: `timezoneJS.Date(millis, [tz])` and `timezoneJS.Date(Date, [tz])`. The
|
||||
// Date `dt` created should be in UTC. Thus the way I detect such cases is to determine if `arr` is not populated & `tz`
|
||||
// is specified. Because if `tz` is not specified, `dt` can be in local time.
|
||||
if (arr.length) {
|
||||
this.setFromDateObjProxy(dt);
|
||||
} else {
|
||||
this.setFromTimeProxy(dt.getTime(), tz);
|
||||
}
|
||||
};
|
||||
|
||||
// Implements most of the native Date object
|
||||
timezoneJS.Date.prototype = {
|
||||
getDate: function () { return this.date; },
|
||||
getDay: function () { return this._day; },
|
||||
getFullYear: function () { return this.year; },
|
||||
getMonth: function () { return this.month; },
|
||||
getYear: function () { return this.year; },
|
||||
getHours: function () { return this.hours; },
|
||||
getMilliseconds: function () { return this.milliseconds; },
|
||||
getMinutes: function () { return this.minutes; },
|
||||
getSeconds: function () { return this.seconds; },
|
||||
getUTCDate: function () { return this.getUTCDateProxy().getUTCDate(); },
|
||||
getUTCDay: function () { return this.getUTCDateProxy().getUTCDay(); },
|
||||
getUTCFullYear: function () { return this.getUTCDateProxy().getUTCFullYear(); },
|
||||
getUTCHours: function () { return this.getUTCDateProxy().getUTCHours(); },
|
||||
getUTCMilliseconds: function () { return this.getUTCDateProxy().getUTCMilliseconds(); },
|
||||
getUTCMinutes: function () { return this.getUTCDateProxy().getUTCMinutes(); },
|
||||
getUTCMonth: function () { return this.getUTCDateProxy().getUTCMonth(); },
|
||||
getUTCSeconds: function () { return this.getUTCDateProxy().getUTCSeconds(); },
|
||||
// Time adjusted to user-specified timezone
|
||||
getTime: function () {
|
||||
return this._timeProxy + (this.getTimezoneOffset() * 60 * 1000);
|
||||
},
|
||||
getTimezone: function () { return this.timezone; },
|
||||
getTimezoneOffset: function () { return this.getTimezoneInfo().tzOffset; },
|
||||
getTimezoneAbbreviation: function () { return this.getTimezoneInfo().tzAbbr; },
|
||||
getTimezoneInfo: function () {
|
||||
if (this._useCache) return this._tzInfo;
|
||||
var res;
|
||||
// If timezone is specified, get the correct timezone info based on the Date given
|
||||
if (this.timezone) {
|
||||
res = this.timezone === 'Etc/UTC' || this.timezone === 'Etc/GMT'
|
||||
? { tzOffset: 0, tzAbbr: 'UTC' }
|
||||
: timezoneJS.timezone.getTzInfo(this._timeProxy, this.timezone);
|
||||
}
|
||||
// If no timezone was specified, use the local browser offset
|
||||
else {
|
||||
res = { tzOffset: this.getLocalOffset(), tzAbbr: null };
|
||||
}
|
||||
this._tzInfo = res;
|
||||
this._useCache = true;
|
||||
return res
|
||||
},
|
||||
getUTCDateProxy: function () {
|
||||
var dt = new Date(this._timeProxy);
|
||||
dt.setUTCMinutes(dt.getUTCMinutes() + this.getTimezoneOffset());
|
||||
return dt;
|
||||
},
|
||||
setDate: function (n) { this.setAttribute('date', n); },
|
||||
setFullYear: function (n) { this.setAttribute('year', n); },
|
||||
setMonth: function (n) { this.setAttribute('month', n); },
|
||||
setYear: function (n) { this.setUTCAttribute('year', n); },
|
||||
setHours: function (n) { this.setAttribute('hours', n); },
|
||||
setMilliseconds: function (n) { this.setAttribute('milliseconds', n); },
|
||||
setMinutes: function (n) { this.setAttribute('minutes', n); },
|
||||
setSeconds: function (n) { this.setAttribute('seconds', n); },
|
||||
setTime: function (n) {
|
||||
if (isNaN(n)) { throw new Error('Units must be a number.'); }
|
||||
this.setFromTimeProxy(n, this.timezone);
|
||||
},
|
||||
setUTCDate: function (n) { this.setUTCAttribute('date', n); },
|
||||
setUTCFullYear: function (n) { this.setUTCAttribute('year', n); },
|
||||
setUTCHours: function (n) { this.setUTCAttribute('hours', n); },
|
||||
setUTCMilliseconds: function (n) { this.setUTCAttribute('milliseconds', n); },
|
||||
setUTCMinutes: function (n) { this.setUTCAttribute('minutes', n); },
|
||||
setUTCMonth: function (n) { this.setUTCAttribute('month', n); },
|
||||
setUTCSeconds: function (n) { this.setUTCAttribute('seconds', n); },
|
||||
setFromDateObjProxy: function (dt) {
|
||||
this.year = dt.getFullYear();
|
||||
this.month = dt.getMonth();
|
||||
this.date = dt.getDate();
|
||||
this.hours = dt.getHours();
|
||||
this.minutes = dt.getMinutes();
|
||||
this.seconds = dt.getSeconds();
|
||||
this.milliseconds = dt.getMilliseconds();
|
||||
this._day = dt.getDay();
|
||||
this._dateProxy = dt;
|
||||
this._timeProxy = Date.UTC(this.year, this.month, this.date, this.hours, this.minutes, this.seconds, this.milliseconds);
|
||||
this._useCache = false;
|
||||
},
|
||||
setFromTimeProxy: function (utcMillis, tz) {
|
||||
var dt = new Date(utcMillis);
|
||||
var tzOffset;
|
||||
tzOffset = tz ? timezoneJS.timezone.getTzInfo(dt, tz).tzOffset : dt.getTimezoneOffset();
|
||||
dt.setTime(utcMillis + (dt.getTimezoneOffset() - tzOffset) * 60000);
|
||||
this.setFromDateObjProxy(dt);
|
||||
},
|
||||
setAttribute: function (unit, n) {
|
||||
if (isNaN(n)) { throw new Error('Units must be a number.'); }
|
||||
var dt = this._dateProxy;
|
||||
var meth = unit === 'year' ? 'FullYear' : unit.substr(0, 1).toUpperCase() + unit.substr(1);
|
||||
dt['set' + meth](n);
|
||||
this.setFromDateObjProxy(dt);
|
||||
},
|
||||
setUTCAttribute: function (unit, n) {
|
||||
if (isNaN(n)) { throw new Error('Units must be a number.'); }
|
||||
var meth = unit === 'year' ? 'FullYear' : unit.substr(0, 1).toUpperCase() + unit.substr(1);
|
||||
var dt = this.getUTCDateProxy();
|
||||
dt['setUTC' + meth](n);
|
||||
dt.setUTCMinutes(dt.getUTCMinutes() - this.getTimezoneOffset());
|
||||
this.setFromTimeProxy(dt.getTime() + this.getTimezoneOffset() * 60000, this.timezone);
|
||||
},
|
||||
setTimezone: function (tz) {
|
||||
var previousOffset = this.getTimezoneInfo().tzOffset;
|
||||
this.timezone = tz;
|
||||
this._useCache = false;
|
||||
// Set UTC minutes offsets by the delta of the two timezones
|
||||
this.setUTCMinutes(this.getUTCMinutes() - this.getTimezoneInfo().tzOffset + previousOffset);
|
||||
},
|
||||
removeTimezone: function () {
|
||||
this.timezone = null;
|
||||
this._useCache = false;
|
||||
},
|
||||
valueOf: function () { return this.getTime(); },
|
||||
clone: function () {
|
||||
return this.timezone ? new timezoneJS.Date(this.getTime(), this.timezone) : new timezoneJS.Date(this.getTime());
|
||||
},
|
||||
toGMTString: function () { return this.toString('EEE, dd MMM yyyy HH:mm:ss Z', 'Etc/GMT'); },
|
||||
toLocaleString: function () {},
|
||||
toLocaleDateString: function () {},
|
||||
toLocaleTimeString: function () {},
|
||||
toSource: function () {},
|
||||
toISOString: function () { return this.toString('yyyy-MM-ddTHH:mm:ss.SSS', 'Etc/UTC') + 'Z'; },
|
||||
toJSON: function () { return this.toISOString(); },
|
||||
// Allows different format following ISO8601 format:
|
||||
toString: function (format, tz) {
|
||||
// Default format is the same as toISOString
|
||||
if (!format) format = 'yyyy-MM-dd HH:mm:ss';
|
||||
var result = format;
|
||||
var tzInfo = tz ? timezoneJS.timezone.getTzInfo(this.getTime(), tz) : this.getTimezoneInfo();
|
||||
var _this = this;
|
||||
// If timezone is specified, get a clone of the current Date object and modify it
|
||||
if (tz) {
|
||||
_this = this.clone();
|
||||
_this.setTimezone(tz);
|
||||
}
|
||||
var hours = _this.getHours();
|
||||
return result
|
||||
// fix the same characters in Month names
|
||||
.replace(/a+/g, function () { return 'k'; })
|
||||
// `y`: year
|
||||
.replace(/y+/g, function (token) { return _fixWidth(_this.getFullYear(), token.length); })
|
||||
// `d`: date
|
||||
.replace(/d+/g, function (token) { return _fixWidth(_this.getDate(), token.length); })
|
||||
// `m`: minute
|
||||
.replace(/m+/g, function (token) { return _fixWidth(_this.getMinutes(), token.length); })
|
||||
// `s`: second
|
||||
.replace(/s+/g, function (token) { return _fixWidth(_this.getSeconds(), token.length); })
|
||||
// `S`: millisecond
|
||||
.replace(/S+/g, function (token) { return _fixWidth(_this.getMilliseconds(), token.length); })
|
||||
// `M`: month. Note: `MM` will be the numeric representation (e.g February is 02) but `MMM` will be text representation (e.g February is Feb)
|
||||
.replace(/M+/g, function (token) {
|
||||
var _month = _this.getMonth(),
|
||||
_len = token.length;
|
||||
if (_len > 3) {
|
||||
return timezoneJS.Months[_month];
|
||||
} else if (_len > 2) {
|
||||
return timezoneJS.Months[_month].substring(0, _len);
|
||||
}
|
||||
return _fixWidth(_month + 1, _len);
|
||||
})
|
||||
// `k`: AM/PM
|
||||
.replace(/k+/g, function () {
|
||||
if (hours >= 12) {
|
||||
if (hours > 12) {
|
||||
hours -= 12;
|
||||
}
|
||||
return 'PM';
|
||||
}
|
||||
return 'AM';
|
||||
})
|
||||
// `H`: hour
|
||||
.replace(/H+/g, function (token) { return _fixWidth(hours, token.length); })
|
||||
// `E`: day
|
||||
.replace(/E+/g, function (token) { return DAYS[_this.getDay()].substring(0, token.length); })
|
||||
// `Z`: timezone abbreviation
|
||||
.replace(/Z+/gi, function () { return tzInfo.tzAbbr; });
|
||||
},
|
||||
toUTCString: function () { return this.toGMTString(); },
|
||||
civilToJulianDayNumber: function (y, m, d) {
|
||||
var a;
|
||||
// Adjust for zero-based JS-style array
|
||||
m++;
|
||||
if (m > 12) {
|
||||
a = parseInt(m/12, 10);
|
||||
m = m % 12;
|
||||
y += a;
|
||||
}
|
||||
if (m <= 2) {
|
||||
y -= 1;
|
||||
m += 12;
|
||||
}
|
||||
a = Math.floor(y / 100);
|
||||
var b = 2 - a + Math.floor(a / 4)
|
||||
, jDt = Math.floor(365.25 * (y + 4716)) + Math.floor(30.6001 * (m + 1)) + d + b - 1524;
|
||||
return jDt;
|
||||
},
|
||||
getLocalOffset: function () {
|
||||
return this._dateProxy.getTimezoneOffset();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
timezoneJS.timezone = new function () {
|
||||
var _this = this
|
||||
, regionMap = {'Etc':'etcetera','EST':'northamerica','MST':'northamerica','HST':'northamerica','EST5EDT':'northamerica','CST6CDT':'northamerica','MST7MDT':'northamerica','PST8PDT':'northamerica','America':'northamerica','Pacific':'australasia','Atlantic':'europe','Africa':'africa','Indian':'africa','Antarctica':'antarctica','Asia':'asia','Australia':'australasia','Europe':'europe','WET':'europe','CET':'europe','MET':'europe','EET':'europe'}
|
||||
, regionExceptions = {'Pacific/Honolulu':'northamerica','Atlantic/Bermuda':'northamerica','Atlantic/Cape_Verde':'africa','Atlantic/St_Helena':'africa','Indian/Kerguelen':'antarctica','Indian/Chagos':'asia','Indian/Maldives':'asia','Indian/Christmas':'australasia','Indian/Cocos':'australasia','America/Danmarkshavn':'europe','America/Scoresbysund':'europe','America/Godthab':'europe','America/Thule':'europe','Asia/Yekaterinburg':'europe','Asia/Omsk':'europe','Asia/Novosibirsk':'europe','Asia/Krasnoyarsk':'europe','Asia/Irkutsk':'europe','Asia/Yakutsk':'europe','Asia/Vladivostok':'europe','Asia/Sakhalin':'europe','Asia/Magadan':'europe','Asia/Kamchatka':'europe','Asia/Anadyr':'europe','Africa/Ceuta':'europe','America/Argentina/Buenos_Aires':'southamerica','America/Argentina/Cordoba':'southamerica','America/Argentina/Tucuman':'southamerica','America/Argentina/La_Rioja':'southamerica','America/Argentina/San_Juan':'southamerica','America/Argentina/Jujuy':'southamerica','America/Argentina/Catamarca':'southamerica','America/Argentina/Mendoza':'southamerica','America/Argentina/Rio_Gallegos':'southamerica','America/Argentina/Ushuaia':'southamerica','America/Aruba':'southamerica','America/La_Paz':'southamerica','America/Noronha':'southamerica','America/Belem':'southamerica','America/Fortaleza':'southamerica','America/Recife':'southamerica','America/Araguaina':'southamerica','America/Maceio':'southamerica','America/Bahia':'southamerica','America/Sao_Paulo':'southamerica','America/Campo_Grande':'southamerica','America/Cuiaba':'southamerica','America/Porto_Velho':'southamerica','America/Boa_Vista':'southamerica','America/Manaus':'southamerica','America/Eirunepe':'southamerica','America/Rio_Branco':'southamerica','America/Santiago':'southamerica','Pacific/Easter':'southamerica','America/Bogota':'southamerica','America/Curacao':'southamerica','America/Guayaquil':'southamerica','Pacific/Galapagos':'southamerica','Atlantic/Stanley':'southamerica','America/Cayenne':'southamerica','America/Guyana':'southamerica','America/Asuncion':'southamerica','America/Lima':'southamerica','Atlantic/South_Georgia':'southamerica','America/Paramaribo':'southamerica','America/Port_of_Spain':'southamerica','America/Montevideo':'southamerica','America/Caracas':'southamerica'};
|
||||
function invalidTZError(t) { throw new Error('Timezone "' + t + '" is either incorrect, or not loaded in the timezone registry.'); }
|
||||
function builtInLoadZoneFile(fileName, opts) {
|
||||
var url = _this.zoneFileBasePath + '/' + fileName;
|
||||
return !opts || !opts.async
|
||||
? _this.parseZones(_this.transport({ url : url, async : false }))
|
||||
: _this.transport({
|
||||
async: true,
|
||||
url : url,
|
||||
success : function (str) {
|
||||
if (_this.parseZones(str) && typeof opts.callback === 'function') {
|
||||
opts.callback();
|
||||
}
|
||||
return true;
|
||||
},
|
||||
error : function () {
|
||||
throw new Error('Error retrieving "' + url + '" zoneinfo files');
|
||||
}
|
||||
});
|
||||
}
|
||||
function getRegionForTimezone(tz) {
|
||||
var exc = regionExceptions[tz]
|
||||
, reg
|
||||
, ret;
|
||||
if (exc) return exc;
|
||||
reg = tz.split('/')[0];
|
||||
ret = regionMap[reg];
|
||||
// If there's nothing listed in the main regions for this TZ, check the 'backward' links
|
||||
if (ret) return ret;
|
||||
var link = _this.zones[tz];
|
||||
if (typeof link === 'string') {
|
||||
return getRegionForTimezone(link);
|
||||
}
|
||||
// Backward-compat file hasn't loaded yet, try looking in there
|
||||
if (!_this.loadedZones.backward) {
|
||||
// This is for obvious legacy zones (e.g., Iceland) that don't even have a prefix like "America/" that look like normal zones
|
||||
_this.loadZoneFile('backward');
|
||||
return getRegionForTimezone(tz);
|
||||
}
|
||||
invalidTZError(tz);
|
||||
}
|
||||
function parseTimeString(str) {
|
||||
var pat = /(\d+)(?::0*(\d*))?(?::0*(\d*))?([wsugz])?$/;
|
||||
var hms = str.match(pat);
|
||||
hms[1] = parseInt(hms[1], 10);
|
||||
hms[2] = hms[2] ? parseInt(hms[2], 10) : 0;
|
||||
hms[3] = hms[3] ? parseInt(hms[3], 10) : 0;
|
||||
|
||||
return hms;
|
||||
}
|
||||
function processZone(z) {
|
||||
if (!z[3]) { return; }
|
||||
var yea = parseInt(z[3], 10);
|
||||
var mon = 11;
|
||||
var dat = 31;
|
||||
if (z[4]) {
|
||||
mon = SHORT_MONTHS[z[4].substr(0, 3)];
|
||||
dat = parseInt(z[5], 10) || 1;
|
||||
}
|
||||
var string = z[6] ? z[6] : '00:00:00'
|
||||
, t = parseTimeString(string);
|
||||
return [yea, mon, dat, t[1], t[2], t[3]];
|
||||
}
|
||||
function getZone(dt, tz) {
|
||||
var utcMillis = typeof dt === 'number' ? dt : new Date(dt).getTime();
|
||||
var t = tz;
|
||||
var zoneList = _this.zones[t];
|
||||
// Follow links to get to an actual zone
|
||||
while (typeof zoneList === "string") {
|
||||
t = zoneList;
|
||||
zoneList = _this.zones[t];
|
||||
}
|
||||
if (!zoneList) {
|
||||
// Backward-compat file hasn't loaded yet, try looking in there
|
||||
if (!_this.loadedZones.backward) {
|
||||
//This is for backward entries like "America/Fort_Wayne" that
|
||||
// getRegionForTimezone *thinks* it has a region file and zone
|
||||
// for (e.g., America => 'northamerica'), but in reality it's a
|
||||
// legacy zone we need the backward file for.
|
||||
_this.loadZoneFile('backward');
|
||||
return getZone(dt, tz);
|
||||
}
|
||||
invalidTZError(t);
|
||||
}
|
||||
if (zoneList.length === 0) {
|
||||
throw new Error('No Zone found for "' + tz + '" on ' + dt);
|
||||
}
|
||||
//Do backwards lookup since most use cases deal with newer dates.
|
||||
for (var i = zoneList.length - 1; i >= 0; i--) {
|
||||
var z = zoneList[i];
|
||||
if (z[3] && utcMillis > z[3]) break;
|
||||
}
|
||||
return zoneList[i+1];
|
||||
}
|
||||
function getBasicOffset(time) {
|
||||
var off = parseTimeString(time)
|
||||
, adj = time.indexOf('-') === 0 ? -1 : 1;
|
||||
off = adj * (((off[1] * 60 + off[2]) * 60 + off[3]) * 1000);
|
||||
return off/60/1000;
|
||||
}
|
||||
|
||||
//if isUTC is true, date is given in UTC, otherwise it's given
|
||||
// in local time (ie. date.getUTC*() returns local time components)
|
||||
function getRule(dt, zone, isUTC) {
|
||||
var date = typeof dt === 'number' ? new Date(dt) : dt;
|
||||
var ruleset = zone[1];
|
||||
var basicOffset = zone[0];
|
||||
|
||||
//Convert a date to UTC. Depending on the 'type' parameter, the date
|
||||
// parameter may be:
|
||||
//
|
||||
// - `u`, `g`, `z`: already UTC (no adjustment).
|
||||
//
|
||||
// - `s`: standard time (adjust for time zone offset but not for DST)
|
||||
//
|
||||
// - `w`: wall clock time (adjust for both time zone and DST offset).
|
||||
//
|
||||
// DST adjustment is done using the rule given as third argument.
|
||||
var convertDateToUTC = function (date, type, rule) {
|
||||
var offset = 0;
|
||||
|
||||
if (type === 'u' || type === 'g' || type === 'z') { // UTC
|
||||
offset = 0;
|
||||
} else if (type === 's') { // Standard Time
|
||||
offset = basicOffset;
|
||||
} else if (type === 'w' || !type) { // Wall Clock Time
|
||||
offset = getAdjustedOffset(basicOffset, rule);
|
||||
} else {
|
||||
throw("unknown type " + type);
|
||||
}
|
||||
offset *= 60 * 1000; // to millis
|
||||
|
||||
return new Date(date.getTime() + offset);
|
||||
};
|
||||
|
||||
//Step 1: Find applicable rules for this year.
|
||||
//
|
||||
//Step 2: Sort the rules by effective date.
|
||||
//
|
||||
//Step 3: Check requested date to see if a rule has yet taken effect this year. If not,
|
||||
//
|
||||
//Step 4: Get the rules for the previous year. If there isn't an applicable rule for last year, then
|
||||
// there probably is no current time offset since they seem to explicitly turn off the offset
|
||||
// when someone stops observing DST.
|
||||
//
|
||||
// FIXME if this is not the case and we'll walk all the way back (ugh).
|
||||
//
|
||||
//Step 5: Sort the rules by effective date.
|
||||
//Step 6: Apply the most recent rule before the current time.
|
||||
var convertRuleToExactDateAndTime = function (yearAndRule, prevRule) {
|
||||
var year = yearAndRule[0]
|
||||
, rule = yearAndRule[1];
|
||||
// Assume that the rule applies to the year of the given date.
|
||||
|
||||
var hms = rule[5];
|
||||
var effectiveDate;
|
||||
|
||||
if (!EXACT_DATE_TIME[year])
|
||||
EXACT_DATE_TIME[year] = {};
|
||||
|
||||
// Result for given parameters is already stored
|
||||
if (EXACT_DATE_TIME[year][rule])
|
||||
effectiveDate = EXACT_DATE_TIME[year][rule];
|
||||
else {
|
||||
//If we have a specific date, use that!
|
||||
if (!isNaN(rule[4])) {
|
||||
effectiveDate = new Date(Date.UTC(year, SHORT_MONTHS[rule[3]], rule[4], hms[1], hms[2], hms[3], 0));
|
||||
}
|
||||
//Let's hunt for the date.
|
||||
else {
|
||||
var targetDay
|
||||
, operator;
|
||||
//Example: `lastThu`
|
||||
if (rule[4].substr(0, 4) === "last") {
|
||||
// Start at the last day of the month and work backward.
|
||||
effectiveDate = new Date(Date.UTC(year, SHORT_MONTHS[rule[3]] + 1, 1, hms[1] - 24, hms[2], hms[3], 0));
|
||||
targetDay = SHORT_DAYS[rule[4].substr(4, 3)];
|
||||
operator = "<=";
|
||||
}
|
||||
//Example: `Sun>=15`
|
||||
else {
|
||||
//Start at the specified date.
|
||||
effectiveDate = new Date(Date.UTC(year, SHORT_MONTHS[rule[3]], rule[4].substr(5), hms[1], hms[2], hms[3], 0));
|
||||
targetDay = SHORT_DAYS[rule[4].substr(0, 3)];
|
||||
operator = rule[4].substr(3, 2);
|
||||
}
|
||||
var ourDay = effectiveDate.getUTCDay();
|
||||
//Go forwards.
|
||||
if (operator === ">=") {
|
||||
effectiveDate.setUTCDate(effectiveDate.getUTCDate() + (targetDay - ourDay + ((targetDay < ourDay) ? 7 : 0)));
|
||||
}
|
||||
//Go backwards. Looking for the last of a certain day, or operator is "<=" (less likely).
|
||||
else {
|
||||
effectiveDate.setUTCDate(effectiveDate.getUTCDate() + (targetDay - ourDay - ((targetDay > ourDay) ? 7 : 0)));
|
||||
}
|
||||
}
|
||||
EXACT_DATE_TIME[year][rule] = effectiveDate;
|
||||
}
|
||||
|
||||
|
||||
//If previous rule is given, correct for the fact that the starting time of the current
|
||||
// rule may be specified in local time.
|
||||
if (prevRule) {
|
||||
effectiveDate = convertDateToUTC(effectiveDate, hms[4], prevRule);
|
||||
}
|
||||
return effectiveDate;
|
||||
};
|
||||
|
||||
var findApplicableRules = function (year, ruleset) {
|
||||
var applicableRules = [];
|
||||
for (var i = 0; ruleset && i < ruleset.length; i++) {
|
||||
//Exclude future rules.
|
||||
if (ruleset[i][0] <= year &&
|
||||
(
|
||||
// Date is in a set range.
|
||||
ruleset[i][1] >= year ||
|
||||
// Date is in an "only" year.
|
||||
(ruleset[i][0] === year && ruleset[i][1] === "only") ||
|
||||
//We're in a range from the start year to infinity.
|
||||
ruleset[i][1] === "max"
|
||||
)
|
||||
) {
|
||||
//It's completely okay to have any number of matches here.
|
||||
// Normally we should only see two, but that doesn't preclude other numbers of matches.
|
||||
// These matches are applicable to this year.
|
||||
applicableRules.push([year, ruleset[i]]);
|
||||
}
|
||||
}
|
||||
return applicableRules;
|
||||
};
|
||||
|
||||
var compareDates = function (a, b, prev) {
|
||||
var year, rule;
|
||||
if (a.constructor !== Date) {
|
||||
year = a[0];
|
||||
rule = a[1];
|
||||
a = (!prev && EXACT_DATE_TIME[year] && EXACT_DATE_TIME[year][rule])
|
||||
? EXACT_DATE_TIME[year][rule]
|
||||
: convertRuleToExactDateAndTime(a, prev);
|
||||
} else if (prev) {
|
||||
a = convertDateToUTC(a, isUTC ? 'u' : 'w', prev);
|
||||
}
|
||||
if (b.constructor !== Date) {
|
||||
year = b[0];
|
||||
rule = b[1];
|
||||
b = (!prev && EXACT_DATE_TIME[year] && EXACT_DATE_TIME[year][rule]) ? EXACT_DATE_TIME[year][rule]
|
||||
: convertRuleToExactDateAndTime(b, prev);
|
||||
} else if (prev) {
|
||||
b = convertDateToUTC(b, isUTC ? 'u' : 'w', prev);
|
||||
}
|
||||
a = Number(a);
|
||||
b = Number(b);
|
||||
return a - b;
|
||||
};
|
||||
|
||||
var year = date.getUTCFullYear();
|
||||
var applicableRules;
|
||||
|
||||
applicableRules = findApplicableRules(year, _this.rules[ruleset]);
|
||||
applicableRules.push(date);
|
||||
//While sorting, the time zone in which the rule starting time is specified
|
||||
// is ignored. This is ok as long as the timespan between two DST changes is
|
||||
// larger than the DST offset, which is probably always true.
|
||||
// As the given date may indeed be close to a DST change, it may get sorted
|
||||
// to a wrong position (off by one), which is corrected below.
|
||||
applicableRules.sort(compareDates);
|
||||
|
||||
//If there are not enough past DST rules...
|
||||
if (applicableRules.indexOf(date) < 2) {
|
||||
applicableRules = applicableRules.concat(findApplicableRules(year-1, _this.rules[ruleset]));
|
||||
applicableRules.sort(compareDates);
|
||||
}
|
||||
var pinpoint = applicableRules.indexOf(date);
|
||||
if (pinpoint > 1 && compareDates(date, applicableRules[pinpoint-1], applicableRules[pinpoint-2][1]) < 0) {
|
||||
//The previous rule does not really apply, take the one before that.
|
||||
return applicableRules[pinpoint - 2][1];
|
||||
} else if (pinpoint > 0 && pinpoint < applicableRules.length - 1 && compareDates(date, applicableRules[pinpoint+1], applicableRules[pinpoint-1][1]) > 0) {
|
||||
|
||||
//The next rule does already apply, take that one.
|
||||
return applicableRules[pinpoint + 1][1];
|
||||
} else if (pinpoint === 0) {
|
||||
//No applicable rule found in this and in previous year.
|
||||
return null;
|
||||
}
|
||||
return applicableRules[pinpoint - 1][1];
|
||||
}
|
||||
function getAdjustedOffset(off, rule) {
|
||||
return -Math.ceil(rule[6] - off);
|
||||
}
|
||||
function getAbbreviation(zone, rule) {
|
||||
var res;
|
||||
var base = zone[2];
|
||||
if (base.indexOf('%s') > -1) {
|
||||
var repl;
|
||||
if (rule) {
|
||||
repl = rule[7] === '-' ? '' : rule[7];
|
||||
}
|
||||
//FIXME: Right now just falling back to Standard --
|
||||
// apparently ought to use the last valid rule,
|
||||
// although in practice that always ought to be Standard
|
||||
else {
|
||||
repl = 'S';
|
||||
}
|
||||
res = base.replace('%s', repl);
|
||||
}
|
||||
else if (base.indexOf('/') > -1) {
|
||||
//Chose one of two alternative strings.
|
||||
res = base.split("/", 2)[rule[6] ? 1 : 0];
|
||||
} else {
|
||||
res = base;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
this.zoneFileBasePath;
|
||||
this.zoneFiles = ['africa', 'antarctica', 'asia', 'australasia', 'backward', 'etcetera', 'europe', 'northamerica', 'pacificnew', 'southamerica'];
|
||||
this.loadingSchemes = {
|
||||
PRELOAD_ALL: 'preloadAll',
|
||||
LAZY_LOAD: 'lazyLoad',
|
||||
MANUAL_LOAD: 'manualLoad'
|
||||
};
|
||||
this.loadingScheme = this.loadingSchemes.LAZY_LOAD;
|
||||
this.loadedZones = {};
|
||||
this.zones = {};
|
||||
this.rules = {};
|
||||
|
||||
this.init = function (o) {
|
||||
var opts = { async: true }
|
||||
, def = this.defaultZoneFile = this.loadingScheme === this.loadingSchemes.PRELOAD_ALL
|
||||
? this.zoneFiles
|
||||
: 'northamerica'
|
||||
, done = 0
|
||||
, callbackFn;
|
||||
//Override default with any passed-in opts
|
||||
for (var p in o) {
|
||||
opts[p] = o[p];
|
||||
}
|
||||
if (typeof def === 'string') {
|
||||
return this.loadZoneFile(def, opts);
|
||||
}
|
||||
//Wraps callback function in another one that makes
|
||||
// sure all files have been loaded.
|
||||
callbackFn = opts.callback;
|
||||
opts.callback = function () {
|
||||
done++;
|
||||
(done === def.length) && typeof callbackFn === 'function' && callbackFn();
|
||||
};
|
||||
for (var i = 0; i < def.length; i++) {
|
||||
this.loadZoneFile(def[i], opts);
|
||||
}
|
||||
};
|
||||
|
||||
//Get the zone files via XHR -- if the sync flag
|
||||
// is set to true, it's being called by the lazy-loading
|
||||
// mechanism, so the result needs to be returned inline.
|
||||
this.loadZoneFile = function (fileName, opts) {
|
||||
if (typeof this.zoneFileBasePath === 'undefined') {
|
||||
throw new Error('Please define a base path to your zone file directory -- timezoneJS.timezone.zoneFileBasePath.');
|
||||
}
|
||||
//Ignore already loaded zones.
|
||||
if (this.loadedZones[fileName]) {
|
||||
return;
|
||||
}
|
||||
this.loadedZones[fileName] = true;
|
||||
return builtInLoadZoneFile(fileName, opts);
|
||||
};
|
||||
this.loadZoneJSONData = function (url, sync) {
|
||||
var processData = function (data) {
|
||||
data = eval('('+ data +')');
|
||||
for (var z in data.zones) {
|
||||
_this.zones[z] = data.zones[z];
|
||||
}
|
||||
for (var r in data.rules) {
|
||||
_this.rules[r] = data.rules[r];
|
||||
}
|
||||
};
|
||||
return sync
|
||||
? processData(_this.transport({ url : url, async : false }))
|
||||
: _this.transport({ url : url, success : processData });
|
||||
};
|
||||
this.loadZoneDataFromObject = function (data) {
|
||||
if (!data) { return; }
|
||||
for (var z in data.zones) {
|
||||
_this.zones[z] = data.zones[z];
|
||||
}
|
||||
for (var r in data.rules) {
|
||||
_this.rules[r] = data.rules[r];
|
||||
}
|
||||
};
|
||||
this.getAllZones = function () {
|
||||
var arr = [];
|
||||
for (var z in this.zones) { arr.push(z); }
|
||||
return arr.sort();
|
||||
};
|
||||
this.parseZones = function (str) {
|
||||
var lines = str.split('\n')
|
||||
, arr = []
|
||||
, chunk = ''
|
||||
, l
|
||||
, zone = null
|
||||
, rule = null;
|
||||
for (var i = 0; i < lines.length; i++) {
|
||||
l = lines[i];
|
||||
if (l.match(/^\s/)) {
|
||||
l = "Zone " + zone + l;
|
||||
}
|
||||
l = l.split("#")[0];
|
||||
if (l.length > 3) {
|
||||
arr = l.split(/\s+/);
|
||||
chunk = arr.shift();
|
||||
//Ignore Leap.
|
||||
switch (chunk) {
|
||||
case 'Zone':
|
||||
zone = arr.shift();
|
||||
if (!_this.zones[zone]) {
|
||||
_this.zones[zone] = [];
|
||||
}
|
||||
if (arr.length < 3) break;
|
||||
//Process zone right here and replace 3rd element with the processed array.
|
||||
arr.splice(3, arr.length, processZone(arr));
|
||||
if (arr[3]) arr[3] = Date.UTC.apply(null, arr[3]);
|
||||
arr[0] = -getBasicOffset(arr[0]);
|
||||
_this.zones[zone].push(arr);
|
||||
break;
|
||||
case 'Rule':
|
||||
rule = arr.shift();
|
||||
if (!_this.rules[rule]) {
|
||||
_this.rules[rule] = [];
|
||||
}
|
||||
//Parse int FROM year and TO year
|
||||
arr[0] = parseInt(arr[0], 10);
|
||||
arr[1] = parseInt(arr[1], 10) || arr[1];
|
||||
//Parse time string AT
|
||||
arr[5] = parseTimeString(arr[5]);
|
||||
//Parse offset SAVE
|
||||
arr[6] = getBasicOffset(arr[6]);
|
||||
_this.rules[rule].push(arr);
|
||||
break;
|
||||
case 'Link':
|
||||
//No zones for these should already exist.
|
||||
if (_this.zones[arr[1]]) {
|
||||
throw new Error('Error with Link ' + arr[1] + '. Cannot create link of a preexisted zone.');
|
||||
}
|
||||
//Create the link.
|
||||
_this.zones[arr[1]] = arr[0];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
//Expose transport mechanism and allow overwrite.
|
||||
this.transport = _transport;
|
||||
this.getTzInfo = function (dt, tz, isUTC) {
|
||||
//Lazy-load any zones not yet loaded.
|
||||
if (this.loadingScheme === this.loadingSchemes.LAZY_LOAD) {
|
||||
//Get the correct region for the zone.
|
||||
var zoneFile = getRegionForTimezone(tz);
|
||||
if (!zoneFile) {
|
||||
throw new Error('Not a valid timezone ID.');
|
||||
}
|
||||
if (!this.loadedZones[zoneFile]) {
|
||||
//Get the file and parse it -- use synchronous XHR.
|
||||
this.loadZoneFile(zoneFile);
|
||||
}
|
||||
}
|
||||
var z = getZone(dt, tz);
|
||||
var off = z[0];
|
||||
//See if the offset needs adjustment.
|
||||
var rule = getRule(dt, z, isUTC);
|
||||
if (rule) {
|
||||
off = getAdjustedOffset(off, rule);
|
||||
}
|
||||
var abbr = getAbbreviation(z, rule);
|
||||
return { tzOffset: off, tzAbbr: abbr };
|
||||
};
|
||||
};
|
||||
}).call(this);
|
||||
@@ -1,114 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Flot Examples: Time zones</title>
|
||||
<link href="../examples.css" rel="stylesheet" type="text/css">
|
||||
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../../excanvas.min.js"></script><![endif]-->
|
||||
<script language="javascript" type="text/javascript" src="../../jquery.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="../../jquery.flot.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="../../jquery.flot.time.js"></script>
|
||||
<script language="javascript" type="text/javascript" src="date.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
|
||||
timezoneJS.timezone.zoneFileBasePath = "tz";
|
||||
timezoneJS.timezone.defaultZoneFile = [];
|
||||
timezoneJS.timezone.init({async: false});
|
||||
|
||||
var d = [
|
||||
[Date.UTC(2011, 2, 12, 14, 0, 0), 28],
|
||||
[Date.UTC(2011, 2, 12, 15, 0, 0), 27],
|
||||
[Date.UTC(2011, 2, 12, 16, 0, 0), 25],
|
||||
[Date.UTC(2011, 2, 12, 17, 0, 0), 19],
|
||||
[Date.UTC(2011, 2, 12, 18, 0, 0), 16],
|
||||
[Date.UTC(2011, 2, 12, 19, 0, 0), 14],
|
||||
[Date.UTC(2011, 2, 12, 20, 0, 0), 11],
|
||||
[Date.UTC(2011, 2, 12, 21, 0, 0), 9],
|
||||
[Date.UTC(2011, 2, 12, 22, 0, 0), 7.5],
|
||||
[Date.UTC(2011, 2, 12, 23, 0, 0), 6],
|
||||
[Date.UTC(2011, 2, 13, 0, 0, 0), 5],
|
||||
[Date.UTC(2011, 2, 13, 1, 0, 0), 6],
|
||||
[Date.UTC(2011, 2, 13, 2, 0, 0), 7.5],
|
||||
[Date.UTC(2011, 2, 13, 3, 0, 0), 9],
|
||||
[Date.UTC(2011, 2, 13, 4, 0, 0), 11],
|
||||
[Date.UTC(2011, 2, 13, 5, 0, 0), 14],
|
||||
[Date.UTC(2011, 2, 13, 6, 0, 0), 16],
|
||||
[Date.UTC(2011, 2, 13, 7, 0, 0), 19],
|
||||
[Date.UTC(2011, 2, 13, 8, 0, 0), 25],
|
||||
[Date.UTC(2011, 2, 13, 9, 0, 0), 27],
|
||||
[Date.UTC(2011, 2, 13, 10, 0, 0), 28],
|
||||
[Date.UTC(2011, 2, 13, 11, 0, 0), 29],
|
||||
[Date.UTC(2011, 2, 13, 12, 0, 0), 29.5],
|
||||
[Date.UTC(2011, 2, 13, 13, 0, 0), 29],
|
||||
[Date.UTC(2011, 2, 13, 14, 0, 0), 28],
|
||||
[Date.UTC(2011, 2, 13, 15, 0, 0), 27],
|
||||
[Date.UTC(2011, 2, 13, 16, 0, 0), 25],
|
||||
[Date.UTC(2011, 2, 13, 17, 0, 0), 19],
|
||||
[Date.UTC(2011, 2, 13, 18, 0, 0), 16],
|
||||
[Date.UTC(2011, 2, 13, 19, 0, 0), 14],
|
||||
[Date.UTC(2011, 2, 13, 20, 0, 0), 11],
|
||||
[Date.UTC(2011, 2, 13, 21, 0, 0), 9],
|
||||
[Date.UTC(2011, 2, 13, 22, 0, 0), 7.5],
|
||||
[Date.UTC(2011, 2, 13, 23, 0, 0), 6]
|
||||
];
|
||||
|
||||
var plot = $.plot("#placeholderUTC", [d], {
|
||||
xaxis: {
|
||||
mode: "time"
|
||||
}
|
||||
});
|
||||
|
||||
var plot = $.plot("#placeholderLocal", [d], {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
timezone: "browser"
|
||||
}
|
||||
});
|
||||
|
||||
var plot = $.plot("#placeholderChicago", [d], {
|
||||
xaxis: {
|
||||
mode: "time",
|
||||
timezone: "America/Chicago"
|
||||
}
|
||||
});
|
||||
|
||||
// Add the Flot version string to the footer
|
||||
|
||||
$("#footer").prepend("Flot " + $.plot.version + " – ");
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="header">
|
||||
<h2>Time zones</h2>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<h3>UTC</h3>
|
||||
<div class="demo-container" style="height: 300px;">
|
||||
<div id="placeholderUTC" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<h3>Browser</h3>
|
||||
<div class="demo-container" style="height: 300px;">
|
||||
<div id="placeholderLocal" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
<h3>Chicago</h3>
|
||||
<div class="demo-container" style="height: 300px;">
|
||||
<div id="placeholderChicago" class="demo-placeholder"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
Copyright © 2007 - 2013 IOLA and Ole Laursen
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,413 +0,0 @@
|
||||
# <pre>
|
||||
# This file is in the public domain, so clarified as of
|
||||
# 2009-05-17 by Arthur David Olson.
|
||||
|
||||
# From Paul Eggert (1999-11-15):
|
||||
# To keep things manageable, we list only locations occupied year-round; see
|
||||
# <a href="http://www.comnap.aq/comnap/comnap.nsf/P/Stations/">
|
||||
# COMNAP - Stations and Bases
|
||||
# </a>
|
||||
# and
|
||||
# <a href="http://www.spri.cam.ac.uk/bob/periant.htm">
|
||||
# Summary of the Peri-Antarctic Islands (1998-07-23)
|
||||
# </a>
|
||||
# for information.
|
||||
# Unless otherwise specified, we have no time zone information.
|
||||
#
|
||||
# Except for the French entries,
|
||||
# I made up all time zone abbreviations mentioned here; corrections welcome!
|
||||
# FORMAT is `zzz' and GMTOFF is 0 for locations while uninhabited.
|
||||
|
||||
# These rules are stolen from the `southamerica' file.
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule ArgAQ 1964 1966 - Mar 1 0:00 0 -
|
||||
Rule ArgAQ 1964 1966 - Oct 15 0:00 1:00 S
|
||||
Rule ArgAQ 1967 only - Apr 2 0:00 0 -
|
||||
Rule ArgAQ 1967 1968 - Oct Sun>=1 0:00 1:00 S
|
||||
Rule ArgAQ 1968 1969 - Apr Sun>=1 0:00 0 -
|
||||
Rule ArgAQ 1974 only - Jan 23 0:00 1:00 S
|
||||
Rule ArgAQ 1974 only - May 1 0:00 0 -
|
||||
Rule ChileAQ 1972 1986 - Mar Sun>=9 3:00u 0 -
|
||||
Rule ChileAQ 1974 1987 - Oct Sun>=9 4:00u 1:00 S
|
||||
Rule ChileAQ 1987 only - Apr 12 3:00u 0 -
|
||||
Rule ChileAQ 1988 1989 - Mar Sun>=9 3:00u 0 -
|
||||
Rule ChileAQ 1988 only - Oct Sun>=1 4:00u 1:00 S
|
||||
Rule ChileAQ 1989 only - Oct Sun>=9 4:00u 1:00 S
|
||||
Rule ChileAQ 1990 only - Mar 18 3:00u 0 -
|
||||
Rule ChileAQ 1990 only - Sep 16 4:00u 1:00 S
|
||||
Rule ChileAQ 1991 1996 - Mar Sun>=9 3:00u 0 -
|
||||
Rule ChileAQ 1991 1997 - Oct Sun>=9 4:00u 1:00 S
|
||||
Rule ChileAQ 1997 only - Mar 30 3:00u 0 -
|
||||
Rule ChileAQ 1998 only - Mar Sun>=9 3:00u 0 -
|
||||
Rule ChileAQ 1998 only - Sep 27 4:00u 1:00 S
|
||||
Rule ChileAQ 1999 only - Apr 4 3:00u 0 -
|
||||
Rule ChileAQ 1999 2010 - Oct Sun>=9 4:00u 1:00 S
|
||||
Rule ChileAQ 2000 2007 - Mar Sun>=9 3:00u 0 -
|
||||
# N.B.: the end of March 29 in Chile is March 30 in Universal time,
|
||||
# which is used below in specifying the transition.
|
||||
Rule ChileAQ 2008 only - Mar 30 3:00u 0 -
|
||||
Rule ChileAQ 2009 only - Mar Sun>=9 3:00u 0 -
|
||||
Rule ChileAQ 2010 only - Apr Sun>=1 3:00u 0 -
|
||||
Rule ChileAQ 2011 only - May Sun>=2 3:00u 0 -
|
||||
Rule ChileAQ 2011 only - Aug Sun>=16 4:00u 1:00 S
|
||||
Rule ChileAQ 2012 only - Apr Sun>=23 3:00u 0 -
|
||||
Rule ChileAQ 2012 only - Sep Sun>=2 4:00u 1:00 S
|
||||
Rule ChileAQ 2013 max - Mar Sun>=9 3:00u 0 -
|
||||
Rule ChileAQ 2013 max - Oct Sun>=9 4:00u 1:00 S
|
||||
|
||||
# These rules are stolen from the `australasia' file.
|
||||
Rule AusAQ 1917 only - Jan 1 0:01 1:00 -
|
||||
Rule AusAQ 1917 only - Mar 25 2:00 0 -
|
||||
Rule AusAQ 1942 only - Jan 1 2:00 1:00 -
|
||||
Rule AusAQ 1942 only - Mar 29 2:00 0 -
|
||||
Rule AusAQ 1942 only - Sep 27 2:00 1:00 -
|
||||
Rule AusAQ 1943 1944 - Mar lastSun 2:00 0 -
|
||||
Rule AusAQ 1943 only - Oct 3 2:00 1:00 -
|
||||
Rule ATAQ 1967 only - Oct Sun>=1 2:00s 1:00 -
|
||||
Rule ATAQ 1968 only - Mar lastSun 2:00s 0 -
|
||||
Rule ATAQ 1968 1985 - Oct lastSun 2:00s 1:00 -
|
||||
Rule ATAQ 1969 1971 - Mar Sun>=8 2:00s 0 -
|
||||
Rule ATAQ 1972 only - Feb lastSun 2:00s 0 -
|
||||
Rule ATAQ 1973 1981 - Mar Sun>=1 2:00s 0 -
|
||||
Rule ATAQ 1982 1983 - Mar lastSun 2:00s 0 -
|
||||
Rule ATAQ 1984 1986 - Mar Sun>=1 2:00s 0 -
|
||||
Rule ATAQ 1986 only - Oct Sun>=15 2:00s 1:00 -
|
||||
Rule ATAQ 1987 1990 - Mar Sun>=15 2:00s 0 -
|
||||
Rule ATAQ 1987 only - Oct Sun>=22 2:00s 1:00 -
|
||||
Rule ATAQ 1988 1990 - Oct lastSun 2:00s 1:00 -
|
||||
Rule ATAQ 1991 1999 - Oct Sun>=1 2:00s 1:00 -
|
||||
Rule ATAQ 1991 2005 - Mar lastSun 2:00s 0 -
|
||||
Rule ATAQ 2000 only - Aug lastSun 2:00s 1:00 -
|
||||
Rule ATAQ 2001 max - Oct Sun>=1 2:00s 1:00 -
|
||||
Rule ATAQ 2006 only - Apr Sun>=1 2:00s 0 -
|
||||
Rule ATAQ 2007 only - Mar lastSun 2:00s 0 -
|
||||
Rule ATAQ 2008 max - Apr Sun>=1 2:00s 0 -
|
||||
|
||||
# Argentina - year-round bases
|
||||
# Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05
|
||||
# Esperanza, San Martin Land, -6323-05659, since 1952-12-17
|
||||
# Jubany, Potter Peninsula, King George Island, -6414-0602320, since 1982-01
|
||||
# Marambio, Seymour I, -6414-05637, since 1969-10-29
|
||||
# Orcadas, Laurie I, -6016-04444, since 1904-02-22
|
||||
# San Martin, Debenham I, -6807-06708, since 1951-03-21
|
||||
# (except 1960-03 / 1976-03-21)
|
||||
|
||||
# Australia - territories
|
||||
# Heard Island, McDonald Islands (uninhabited)
|
||||
# previously sealers and scientific personnel wintered
|
||||
# <a href="http://web.archive.org/web/20021204222245/http://www.dstc.qut.edu.au/DST/marg/daylight.html">
|
||||
# Margaret Turner reports
|
||||
# </a> (1999-09-30) that they're UTC+5, with no DST;
|
||||
# presumably this is when they have visitors.
|
||||
#
|
||||
# year-round bases
|
||||
# Casey, Bailey Peninsula, -6617+11032, since 1969
|
||||
# Davis, Vestfold Hills, -6835+07759, since 1957-01-13
|
||||
# (except 1964-11 - 1969-02)
|
||||
# Mawson, Holme Bay, -6736+06253, since 1954-02-13
|
||||
|
||||
# From Steffen Thorsen (2009-03-11):
|
||||
# Three Australian stations in Antarctica have changed their time zone:
|
||||
# Casey moved from UTC+8 to UTC+11
|
||||
# Davis moved from UTC+7 to UTC+5
|
||||
# Mawson moved from UTC+6 to UTC+5
|
||||
# The changes occurred on 2009-10-18 at 02:00 (local times).
|
||||
#
|
||||
# Government source: (Australian Antarctic Division)
|
||||
# <a href="http://www.aad.gov.au/default.asp?casid=37079">
|
||||
# http://www.aad.gov.au/default.asp?casid=37079
|
||||
# </a>
|
||||
#
|
||||
# We have more background information here:
|
||||
# <a href="http://www.timeanddate.com/news/time/antarctica-new-times.html">
|
||||
# http://www.timeanddate.com/news/time/antarctica-new-times.html
|
||||
# </a>
|
||||
|
||||
# From Steffen Thorsen (2010-03-10):
|
||||
# We got these changes from the Australian Antarctic Division:
|
||||
# - Macquarie Island will stay on UTC+11 for winter and therefore not
|
||||
# switch back from daylight savings time when other parts of Australia do
|
||||
# on 4 April.
|
||||
#
|
||||
# - Casey station reverted to its normal time of UTC+8 on 5 March 2010.
|
||||
# The change to UTC+11 is being considered as a regular summer thing but
|
||||
# has not been decided yet.
|
||||
#
|
||||
# - Davis station will revert to its normal time of UTC+7 at 10 March 2010
|
||||
# 20:00 UTC.
|
||||
#
|
||||
# - Mawson station stays on UTC+5.
|
||||
#
|
||||
# In addition to the Rule changes for Casey/Davis, it means that Macquarie
|
||||
# will no longer be like Hobart and will have to have its own Zone created.
|
||||
#
|
||||
# Background:
|
||||
# <a href="http://www.timeanddate.com/news/time/antartica-time-changes-2010.html">
|
||||
# http://www.timeanddate.com/news/time/antartica-time-changes-2010.html
|
||||
# </a>
|
||||
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/Casey 0 - zzz 1969
|
||||
8:00 - WST 2009 Oct 18 2:00
|
||||
# Western (Aus) Standard Time
|
||||
11:00 - CAST 2010 Mar 5 2:00
|
||||
# Casey Time
|
||||
8:00 - WST 2011 Oct 28 2:00
|
||||
11:00 - CAST 2012 Feb 21 17:00u
|
||||
8:00 - WST
|
||||
Zone Antarctica/Davis 0 - zzz 1957 Jan 13
|
||||
7:00 - DAVT 1964 Nov # Davis Time
|
||||
0 - zzz 1969 Feb
|
||||
7:00 - DAVT 2009 Oct 18 2:00
|
||||
5:00 - DAVT 2010 Mar 10 20:00u
|
||||
7:00 - DAVT 2011 Oct 28 2:00
|
||||
5:00 - DAVT 2012 Feb 21 20:00u
|
||||
7:00 - DAVT
|
||||
Zone Antarctica/Mawson 0 - zzz 1954 Feb 13
|
||||
6:00 - MAWT 2009 Oct 18 2:00
|
||||
# Mawson Time
|
||||
5:00 - MAWT
|
||||
Zone Antarctica/Macquarie 0 - zzz 1911
|
||||
10:00 - EST 1916 Oct 1 2:00
|
||||
10:00 1:00 EST 1917 Feb
|
||||
10:00 AusAQ EST 1967
|
||||
10:00 ATAQ EST 2010 Apr 4 3:00
|
||||
11:00 - MIST # Macquarie Island Time
|
||||
# References:
|
||||
# <a href="http://www.antdiv.gov.au/aad/exop/sfo/casey/casey_aws.html">
|
||||
# Casey Weather (1998-02-26)
|
||||
# </a>
|
||||
# <a href="http://www.antdiv.gov.au/aad/exop/sfo/davis/video.html">
|
||||
# Davis Station, Antarctica (1998-02-26)
|
||||
# </a>
|
||||
# <a href="http://www.antdiv.gov.au/aad/exop/sfo/mawson/video.html">
|
||||
# Mawson Station, Antarctica (1998-02-25)
|
||||
# </a>
|
||||
|
||||
# Brazil - year-round base
|
||||
# Comandante Ferraz, King George Island, -6205+05824, since 1983/4
|
||||
|
||||
# Chile - year-round bases and towns
|
||||
# Escudero, South Shetland Is, -621157-0585735, since 1994
|
||||
# Presidente Eduadro Frei, King George Island, -6214-05848, since 1969-03-07
|
||||
# General Bernardo O'Higgins, Antarctic Peninsula, -6319-05704, since 1948-02
|
||||
# Capitan Arturo Prat, -6230-05941
|
||||
# Villa Las Estrellas (a town), around the Frei base, since 1984-04-09
|
||||
# These locations have always used Santiago time; use TZ='America/Santiago'.
|
||||
|
||||
# China - year-round bases
|
||||
# Great Wall, King George Island, -6213-05858, since 1985-02-20
|
||||
# Zhongshan, Larsemann Hills, Prydz Bay, -6922+07623, since 1989-02-26
|
||||
|
||||
# France - year-round bases
|
||||
#
|
||||
# From Antoine Leca (1997-01-20):
|
||||
# Time data are from Nicole Pailleau at the IFRTP
|
||||
# (French Institute for Polar Research and Technology).
|
||||
# She confirms that French Southern Territories and Terre Adelie bases
|
||||
# don't observe daylight saving time, even if Terre Adelie supplies came
|
||||
# from Tasmania.
|
||||
#
|
||||
# French Southern Territories with year-round inhabitants
|
||||
#
|
||||
# Martin-de-Vivies Base, Amsterdam Island, -374105+0773155, since 1950
|
||||
# Alfred-Faure Base, Crozet Islands, -462551+0515152, since 1964
|
||||
# Port-aux-Francais, Kerguelen Islands, -492110+0701303, since 1951;
|
||||
# whaling & sealing station operated 1908/1914, 1920/1929, and 1951/1956
|
||||
#
|
||||
# St Paul Island - near Amsterdam, uninhabited
|
||||
# fishing stations operated variously 1819/1931
|
||||
#
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Indian/Kerguelen 0 - zzz 1950 # Port-aux-Francais
|
||||
5:00 - TFT # ISO code TF Time
|
||||
#
|
||||
# year-round base in the main continent
|
||||
# Dumont-d'Urville, Ile des Petrels, -6640+14001, since 1956-11
|
||||
#
|
||||
# Another base at Port-Martin, 50km east, began operation in 1947.
|
||||
# It was destroyed by fire on 1952-01-14.
|
||||
#
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/DumontDUrville 0 - zzz 1947
|
||||
10:00 - PMT 1952 Jan 14 # Port-Martin Time
|
||||
0 - zzz 1956 Nov
|
||||
10:00 - DDUT # Dumont-d'Urville Time
|
||||
# Reference:
|
||||
# <a href="http://en.wikipedia.org/wiki/Dumont_d'Urville_Station">
|
||||
# Dumont d'Urville Station (2005-12-05)
|
||||
# </a>
|
||||
|
||||
# Germany - year-round base
|
||||
# Georg von Neumayer, -7039-00815
|
||||
|
||||
# India - year-round base
|
||||
# Dakshin Gangotri, -7005+01200
|
||||
|
||||
# Japan - year-round bases
|
||||
# Dome Fuji, -7719+03942
|
||||
# Syowa, -690022+0393524
|
||||
#
|
||||
# From Hideyuki Suzuki (1999-02-06):
|
||||
# In all Japanese stations, +0300 is used as the standard time.
|
||||
#
|
||||
# Syowa station, which is the first antarctic station of Japan,
|
||||
# was established on 1957-01-29. Since Syowa station is still the main
|
||||
# station of Japan, it's appropriate for the principal location.
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/Syowa 0 - zzz 1957 Jan 29
|
||||
3:00 - SYOT # Syowa Time
|
||||
# See:
|
||||
# <a href="http://www.nipr.ac.jp/english/ara01.html">
|
||||
# NIPR Antarctic Research Activities (1999-08-17)
|
||||
# </a>
|
||||
|
||||
# S Korea - year-round base
|
||||
# King Sejong, King George Island, -6213-05847, since 1988
|
||||
|
||||
# New Zealand - claims
|
||||
# Balleny Islands (never inhabited)
|
||||
# Scott Island (never inhabited)
|
||||
#
|
||||
# year-round base
|
||||
# Scott, Ross Island, since 1957-01, is like Antarctica/McMurdo.
|
||||
#
|
||||
# These rules for New Zealand are stolen from the `australasia' file.
|
||||
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
|
||||
Rule NZAQ 1974 only - Nov 3 2:00s 1:00 D
|
||||
Rule NZAQ 1975 1988 - Oct lastSun 2:00s 1:00 D
|
||||
Rule NZAQ 1989 only - Oct 8 2:00s 1:00 D
|
||||
Rule NZAQ 1990 2006 - Oct Sun>=1 2:00s 1:00 D
|
||||
Rule NZAQ 1975 only - Feb 23 2:00s 0 S
|
||||
Rule NZAQ 1976 1989 - Mar Sun>=1 2:00s 0 S
|
||||
Rule NZAQ 1990 2007 - Mar Sun>=15 2:00s 0 S
|
||||
Rule NZAQ 2007 max - Sep lastSun 2:00s 1:00 D
|
||||
Rule NZAQ 2008 max - Apr Sun>=1 2:00s 0 S
|
||||
|
||||
# Norway - territories
|
||||
# Bouvet (never inhabited)
|
||||
#
|
||||
# claims
|
||||
# Peter I Island (never inhabited)
|
||||
|
||||
# Poland - year-round base
|
||||
# Arctowski, King George Island, -620945-0582745, since 1977
|
||||
|
||||
# Russia - year-round bases
|
||||
# Bellingshausen, King George Island, -621159-0585337, since 1968-02-22
|
||||
# Mirny, Davis coast, -6633+09301, since 1956-02
|
||||
# Molodezhnaya, Alasheyev Bay, -6740+04551,
|
||||
# year-round from 1962-02 to 1999-07-01
|
||||
# Novolazarevskaya, Queen Maud Land, -7046+01150,
|
||||
# year-round from 1960/61 to 1992
|
||||
|
||||
# Vostok, since 1957-12-16, temporarily closed 1994-02/1994-11
|
||||
# <a href="http://quest.arc.nasa.gov/antarctica/QA/computers/Directions,Time,ZIP">
|
||||
# From Craig Mundell (1994-12-15)</a>:
|
||||
# Vostok, which is one of the Russian stations, is set on the same
|
||||
# time as Moscow, Russia.
|
||||
#
|
||||
# From Lee Hotz (2001-03-08):
|
||||
# I queried the folks at Columbia who spent the summer at Vostok and this is
|
||||
# what they had to say about time there:
|
||||
# ``in the US Camp (East Camp) we have been on New Zealand (McMurdo)
|
||||
# time, which is 12 hours ahead of GMT. The Russian Station Vostok was
|
||||
# 6 hours behind that (although only 2 miles away, i.e. 6 hours ahead
|
||||
# of GMT). This is a time zone I think two hours east of Moscow. The
|
||||
# natural time zone is in between the two: 8 hours ahead of GMT.''
|
||||
#
|
||||
# From Paul Eggert (2001-05-04):
|
||||
# This seems to be hopelessly confusing, so I asked Lee Hotz about it
|
||||
# in person. He said that some Antartic locations set their local
|
||||
# time so that noon is the warmest part of the day, and that this
|
||||
# changes during the year and does not necessarily correspond to mean
|
||||
# solar noon. So the Vostok time might have been whatever the clocks
|
||||
# happened to be during their visit. So we still don't really know what time
|
||||
# it is at Vostok. But we'll guess UTC+6.
|
||||
#
|
||||
Zone Antarctica/Vostok 0 - zzz 1957 Dec 16
|
||||
6:00 - VOST # Vostok time
|
||||
|
||||
# S Africa - year-round bases
|
||||
# Marion Island, -4653+03752
|
||||
# Sanae, -7141-00250
|
||||
|
||||
# UK
|
||||
#
|
||||
# British Antarctic Territories (BAT) claims
|
||||
# South Orkney Islands
|
||||
# scientific station from 1903
|
||||
# whaling station at Signy I 1920/1926
|
||||
# South Shetland Islands
|
||||
#
|
||||
# year-round bases
|
||||
# Bird Island, South Georgia, -5400-03803, since 1983
|
||||
# Deception Island, -6259-06034, whaling station 1912/1931,
|
||||
# scientific station 1943/1967,
|
||||
# previously sealers and a scientific expedition wintered by accident,
|
||||
# and a garrison was deployed briefly
|
||||
# Halley, Coates Land, -7535-02604, since 1956-01-06
|
||||
# Halley is on a moving ice shelf and is periodically relocated
|
||||
# so that it is never more than 10km from its nominal location.
|
||||
# Rothera, Adelaide Island, -6734-6808, since 1976-12-01
|
||||
#
|
||||
# From Paul Eggert (2002-10-22)
|
||||
# <http://webexhibits.org/daylightsaving/g.html> says Rothera is -03 all year.
|
||||
#
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/Rothera 0 - zzz 1976 Dec 1
|
||||
-3:00 - ROTT # Rothera time
|
||||
|
||||
# Uruguay - year round base
|
||||
# Artigas, King George Island, -621104-0585107
|
||||
|
||||
# USA - year-round bases
|
||||
#
|
||||
# Palmer, Anvers Island, since 1965 (moved 2 miles in 1968)
|
||||
#
|
||||
# From Ethan Dicks (1996-10-06):
|
||||
# It keeps the same time as Punta Arenas, Chile, because, just like us
|
||||
# and the South Pole, that's the other end of their supply line....
|
||||
# I verified with someone who was there that since 1980,
|
||||
# Palmer has followed Chile. Prior to that, before the Falklands War,
|
||||
# Palmer used to be supplied from Argentina.
|
||||
#
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/Palmer 0 - zzz 1965
|
||||
-4:00 ArgAQ AR%sT 1969 Oct 5
|
||||
-3:00 ArgAQ AR%sT 1982 May
|
||||
-4:00 ChileAQ CL%sT
|
||||
#
|
||||
#
|
||||
# McMurdo, Ross Island, since 1955-12
|
||||
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
|
||||
Zone Antarctica/McMurdo 0 - zzz 1956
|
||||
12:00 NZAQ NZ%sT
|
||||
#
|
||||
# Amundsen-Scott, South Pole, continuously occupied since 1956-11-20
|
||||
#
|
||||
# From Paul Eggert (1996-09-03):
|
||||
# Normally it wouldn't have a separate entry, since it's like the
|
||||
# larger Antarctica/McMurdo since 1970, but it's too famous to omit.
|
||||
#
|
||||
# From Chris Carrier (1996-06-27):
|
||||
# Siple, the first commander of the South Pole station,
|
||||
# stated that he would have liked to have kept GMT at the station,
|
||||
# but that he found it more convenient to keep GMT+12
|
||||
# as supplies for the station were coming from McMurdo Sound,
|
||||
# which was on GMT+12 because New Zealand was on GMT+12 all year
|
||||
# at that time (1957). (Source: Siple's book 90 degrees SOUTH.)
|
||||
#
|
||||
# From Susan Smith
|
||||
# http://www.cybertours.com/whs/pole10.html
|
||||
# (1995-11-13 16:24:56 +1300, no longer available):
|
||||
# We use the same time as McMurdo does.
|
||||
# And they use the same time as Christchurch, NZ does....
|
||||
# One last quirk about South Pole time.
|
||||
# All the electric clocks are usually wrong.
|
||||
# Something about the generators running at 60.1hertz or something
|
||||
# makes all of the clocks run fast. So every couple of days,
|
||||
# we have to go around and set them back 5 minutes or so.
|
||||
# Maybe if we let them run fast all of the time, we'd get to leave here sooner!!
|
||||
#
|
||||
Link Antarctica/McMurdo Antarctica/South_Pole
|
||||