diff --git a/web/assetic/admin_lte_calendar_css_fullcalendar_1.css b/web/assetic/admin_lte_calendar_css_fullcalendar_1.css deleted file mode 100644 index b89b05970f..0000000000 --- a/web/assetic/admin_lte_calendar_css_fullcalendar_1.css +++ /dev/null @@ -1,617 +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, /* , usually */ -.fc-widget-content { /* , usually */ - border: 1px solid #ddd; -} - -.fc-state-highlight { /* today cell */ /* TODO: add .fc-today to */ - background: #fcf8e3; -} - -.fc-cell-overlay { /* semi-transparent rectangle while dragging */ - background: #bce8f1; - opacity: .3; - filter: alpha(opacity=30); /* for IE */ -} - - - -/* Buttons -------------------------------------------------------------------------*/ - -.fc-button { - display: inline-block; - padding: 4px 9px; - margin-bottom: 0; - font-size: 12px; - font-weight: normal; - line-height: 1.428571429; - text-align: center; - white-space: nowrap; - vertical-align: middle; - cursor: pointer; - background-image: none; - border: 1px solid transparent; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - -o-user-select: none; - user-select: none; -} - -.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-button.fc-state-default { - border: 1px solid #d9dadc; - border-bottom-color: #d3d5d7; - border-bottom-width: 2px; - margin-left: 0px!important; - background: #fafafa; - color: #666; -} - - -.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; -} - -/* Custom calendar */ -.external-event { - margin: 10px 0; - padding: 3px 5px; - border-radius: 2px; - cursor: pointer; - font-weight: 600; - display: inline-block; - margin: 0 5px 5px 0; -} \ No newline at end of file diff --git a/web/assetic/admin_lte_css_AdminLTE_7 b/web/assetic/admin_lte_css_AdminLTE_7 deleted file mode 100644 index 2fc7b1dd2b..0000000000 --- a/web/assetic/admin_lte_css_AdminLTE_7 +++ /dev/null @@ -1,3404 +0,0 @@ -@import url(//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,300italic,400italic,600italic); - -@import url(//fonts.googleapis.com/css?family=Kaushan+Script); -/*! - * AdminLTE v1.2 - * Author: AlmsaeedStudio.com - * License: Open source - MIT - * Please visit http://opensource.org/licenses/MIT for more information -!*/ -/* - Core: General style ----------------------------- -*/ -html, -body { - overflow-x: hidden!important; - font-family: 'Source Sans Pro', sans-serif; - -webkit-font-smoothing: antialiased; - min-height: 100%; - background: #f9f9f9; -} -a { - color: #3c8dbc; -} -a:hover, -a:active, -a:focus { - outline: none; - text-decoration: none; - color: #72afd2; -} -/* Layouts */ -.wrapper { - min-height: 100%; -} -.wrapper:before, -.wrapper:after { - display: table; - content: " "; -} -.wrapper:after { - clear: both; -} -/* Header */ -body > .header { - position: absolute; - top: 0; - left: 0; - right: 0; - z-index: 1030; -} -/* Define 2 column template */ -.right-side, -.left-side { - min-height: 100%; - display: block; -} -/*right side - contins main content*/ -.right-side { - background-color: #f9f9f9; - margin-left: 220px; -} -/*left side - contains sidebar*/ -.left-side { - position: absolute; - width: 220px; - top: 0; -} -@media screen and (min-width: 992px) { - .left-side { - top: 50px; - } - /*Right side strech mode*/ - .right-side.strech { - margin-left: 0; - } - .right-side.strech > .content-header { - margin-top: 0px; - } - /* Left side collapse */ - .left-side.collapse-left { - left: -220px; - } -} -/*Give content full width on xs screens*/ -@media screen and (max-width: 992px) { - .right-side { - margin-left: 0; - } -} -/* - By default the layout is not fixed but if you add the class .fixed to the body element - the sidebar and the navbar will automatically become poisitioned fixed -*/ -body.fixed > .header, -body.fixed .left-side, -body.fixed .navbar { - position: fixed; -} -body.fixed > .header { - top: 0; - right: 0; - left: 0; -} -body.fixed .navbar { - left: 0; - right: 0; -} -body.fixed .wrapper { - margin-top: 50px; -} -/* Content */ -.content { - padding: 20px 15px; - background: #f9f9f9; -} -/* Utility */ -/* H1 - H6 font */ -h1, -h2, -h3, -h4, -h5, -h6, -.h1, -.h2, -.h3, -.h4, -.h5, -.h6 { - font-family: 'Source Sans Pro', sans-serif; -} -/* Page Header */ -.page-header { - margin: 10px 0 20px 0; - font-size: 22px; -} -.page-header > small { - color: #666; - display: block; - margin-top: 5px; -} -/* All images should be responsive */ -img { - max-width: 100%important; -} -.sort-highlight { - background: #f4f4f4; - border: 1px dashed #ddd; - margin-bottom: 10px; -} -/* 10px padding and margins */ -.pad { - padding: 10px; -} -.margin { - margin: 10px; -} -/* Display inline */ -.inline { - display: inline; - width: auto; -} -/* Background colors */ -.bg-red, -.bg-yellow, -.bg-aqua, -.bg-blue, -.bg-light-blue, -.bg-green, -.bg-navy, -.bg-teal, -.bg-olive, -.bg-lime, -.bg-orange, -.bg-fuchsia, -.bg-purple, -.bg-maroon, -.bg-black { - color: #f9f9f9 !important; -} -.bg-gray { - background-color: #eaeaec !important; -} -.bg-black { - background-color: #222222 !important; -} -.bg-red { - background-color: #f56954 !important; -} -.bg-yellow { - background-color: #f39c12 !important; -} -.bg-aqua { - background-color: #00c0ef !important; -} -.bg-blue { - background-color: #0073b7 !important; -} -.bg-light-blue { - background-color: #3c8dbc !important; -} -.bg-green { - background-color: #00a65a !important; -} -.bg-navy { - background-color: #001f3f !important; -} -.bg-teal { - background-color: #39cccc !important; -} -.bg-olive { - background-color: #3d9970 !important; -} -.bg-lime { - background-color: #01ff70 !important; -} -.bg-orange { - background-color: #ff851b !important; -} -.bg-fuchsia { - background-color: #f012be !important; -} -.bg-purple { - background-color: #932ab6 !important; -} -.bg-maroon { - background-color: #85144b !important; -} -/* Text colors */ -.text-red { - color: #f56954 !important; -} -.text-yellow { - color: #f39c12 !important; -} -.text-aqua { - color: #00c0ef !important; -} -.text-blue { - color: #0073b7 !important; -} -.text-light-blue { - color: #3c8dbc !important; -} -.text-green { - color: #00a65a !important; -} -.text-navy { - color: #001f3f !important; -} -.text-teal { - color: #39cccc !important; -} -.text-olive { - color: #3d9970 !important; -} -.text-lime { - color: #01ff70 !important; -} -.text-orange { - color: #ff851b !important; -} -.text-fuchsia { - color: #f012be !important; -} -.text-purple { - color: #932ab6 !important; -} -.text-maroon { - color: #85144b !important; -} -/*Hide elements by display none only*/ -.hide { - display: none !important; -} -/* Remove borders */ -.no-border { - border: 0px !important; -} -/* Remove padding */ -.no-padding { - padding: 0px !important; -} -/* Remove margins */ -.no-margin { - margin: 0px !important; -} -/* Remove box shadow */ -.no-shadow { - box-shadow: none!important; -} -/* Don't display when printing */ -@media print { - .no-print { - display: none; - } - .left-side, - .header, - .content-header { - display: none; - } - .right-side { - margin: 0; - } -} -/* Remove border radius */ -.flat { - -webkit-border-radius: 0 !important; - -moz-border-radius: 0 !important; - border-radius: 0 !important; -} -/* Change the color of the striped tables */ -.table-striped > tbody > tr:nth-child(odd) > td, -.table-striped > tbody > tr:nth-child(odd) > th { - background-color: #f3f4f5; -} -/* .text-center in tables */ -table.text-center td, -table.text-center th { - text-align: center; -} -/* _fix for sparkline tooltip */ -.jqstooltip { - padding: 5px!important; - width: auto!important; - height: auto!important; -} -/* - Components: navbar, logo and content header -------------------------------------------------- -*/ -body > .header { - position: relative; - max-height: 100px; - z-index: 1030; -} -body > .header .navbar { - height: 50px; - margin-bottom: 0; - margin-left: 220px; -} -body > .header .navbar .sidebar-toggle { - float: left; - padding: 9px 5px; - margin-top: 8px; - margin-right: 0; - margin-bottom: 8px; - margin-left: 5px; - background-color: transparent; - background-image: none; - border: 1px solid transparent; - -webkit-border-radius: 0 !important; - -moz-border-radius: 0 !important; - border-radius: 0 !important; -} -body > .header .navbar .sidebar-toggle:hover .icon-bar { - background: #f6f6f6; -} -body > .header .navbar .sidebar-toggle .icon-bar { - display: block; - width: 22px; - height: 2px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -body > .header .navbar .sidebar-toggle .icon-bar + .icon-bar { - margin-top: 4px; -} -body > .header .navbar .nav > li.user > a { - font-weight: bold; -} -body > .header .navbar .nav > li.user > a > .fa, -body > .header .navbar .nav > li.user > a > .glyphicon, -body > .header .navbar .nav > li.user > a > .ion { - margin-right: 5px; -} -body > .header .navbar .nav > li > a > .label { - -webkit-border-radius: 50%; - -moz-border-radius: 50%; - border-radius: 50%; - position: absolute; - top: 7px; - right: 2px; - font-size: 10px; - font-weight: normal; - width: 15px; - height: 15px; - line-height: 1.0em; - text-align: center; - padding: 2px; -} -body > .header .navbar .nav > li > a:hover > .label { - top: 3px; -} -body > .header .logo { - float: left; - font-size: 20px; - line-height: 50px; - text-align: center; - padding: 0 10px; - width: 220px; - font-family: 'Kaushan Script', cursive; - font-weight: 500; - height: 50px; - display: block; -} -body > .header .logo .icon { - margin-right: 10px; -} -.right-side > .content-header { - position: relative; - padding: 15px 15px 10px 20px; -} -.right-side > .content-header > h1 { - margin: 0; - font-size: 24px; -} -.right-side > .content-header > h1 > small { - font-size: 15px; - display: inline-block; - padding-left: 4px; - font-weight: 300; -} -.right-side > .content-header > .breadcrumb { - float: right; - background: transparent; - margin-top: 0px; - margin-bottom: 0; - font-size: 12px; - padding: 7px 5px; - position: absolute; - top: 15px; - right: 10px; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.right-side > .content-header > .breadcrumb > li > a { - color: #444; - text-decoration: none; -} -.right-side > .content-header > .breadcrumb > li > a > .fa, -.right-side > .content-header > .breadcrumb > li > a > .glyphicon, -.right-side > .content-header > .breadcrumb > li > a > .ion { - margin-right: 5px; -} -.right-side > .content-header > .breadcrumb > li + li:before { - content: '>\00a0'; -} -@media screen and (max-width: 767px) { - .right-side > .content-header > .breadcrumb { - position: relative; - margin-top: 5px; - top: 0; - right: 0; - float: none; - background: #efefef; - } -} -@media (max-width: 767px) { - .navbar .navbar-nav > li { - float: left; - } - .navbar-nav { - margin: 0; - float: left; - } - .navbar-nav > li > a { - padding-top: 15px; - padding-bottom: 15px; - line-height: 20px; - } - .navbar .navbar-right { - float: right; - } -} -@media screen and (max-width: 560px) { - body > .header { - position: relative; - } - body > .header .logo, - body > .header .navbar { - width: 100%; - float: none; - position: relative!important; - } - body > .header .navbar { - margin: 0; - } - body.fixed > .header { - position: fixed; - } - body.fixed > .wrapper, - body.fixed .sidebar-offcanvas { - margin-top: 100px!important; - } -} -/* - Component: Sidebar --------------------------- -*/ -.sidebar { - margin-bottom: 5px; -} -.sidebar .sidebar-form input:focus { - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - border-color: transparent!important; -} -.sidebar .sidebar-menu { - list-style: none; - margin: 0; - padding: 0; -} -.sidebar .sidebar-menu > li { - margin: 0; - padding: 0; -} -.sidebar .sidebar-menu > li > a { - padding: 12px 5px 12px 15px; - display: block; -} -.sidebar .sidebar-menu > li > a > .fa, -.sidebar .sidebar-menu > li > a > .glyphicon, -.sidebar .sidebar-menu > li > a > .ion { - width: 20px; -} -.sidebar .sidebar-menu .treeview-menu { - display: none; - list-style: none; - padding: 0; - margin: 0; -} -.sidebar .sidebar-menu .treeview-menu > li { - margin: 0; -} -.sidebar .sidebar-menu .treeview-menu > li > a { - padding: 5px 5px 5px 15px; - display: block; - font-size: 14px; - margin: 0px 0px; -} -.sidebar .sidebar-menu .treeview-menu > li > a > .fa, -.sidebar .sidebar-menu .treeview-menu > li > a > .glyphicon, -.sidebar .sidebar-menu .treeview-menu > li > a > .ion { - width: 20px; -} -.user-panel { - padding: 10px; -} -.user-panel:before, -.user-panel:after { - display: table; - content: " "; -} -.user-panel:after { - clear: both; -} -.user-panel > .image > img { - width: 45px; - height: 45px; -} -.user-panel > .info { - font-weight: 600; - padding: 5px 5px 5px 15px; - font-size: 14px; - line-height: 1; -} -.user-panel > .info > p { - margin-bottom: 9px; -} -.user-panel > .info > a { - text-decoration: none; - padding-right: 5px; - margin-top: 3px; - font-size: 11px; - font-weight: normal; -} -.user-panel > .info > a > .fa, -.user-panel > .info > a > .ion, -.user-panel > .info > a > .glyphicon { - margin-right: 3px; -} -/* - * Off Canvas - * -------------------------------------------------- - * Gives us the push menu effect - */ -@media screen and (max-width: 992px) { - .relative { - position: relative; - } - .row-offcanvas-right .sidebar-offcanvas { - right: -220px; - } - .row-offcanvas-left .sidebar-offcanvas { - left: -220px; - } - .row-offcanvas-right.active { - right: 220px; - } - .row-offcanvas-left.active { - left: 220px; - } - .sidebar-offcanvas { - left: 0; - } - body.fixed .sidebar-offcanvas { - margin-top: 50px; - left: -220px; - } - body.fixed .row-offcanvas-left.active .navbar { - left: 220px !important; - right: 0; - } - body.fixed .row-offcanvas-left.active .sidebar-offcanvas { - left: 0px; - } -} -/* - Dropdown menus ----------------------------- -*/ -/*Dropdowns in general*/ -.dropdown-menu { - -webkit-box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1); - -moz-box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1); - box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1); - z-index: 2300; -} -.dropdown-menu > li > a > .glyphicon, -.dropdown-menu > li > a > .fa, -.dropdown-menu > li > a > .ion { - margin-right: 10px; -} -.dropdown-menu > li > a:hover { - background-color: #3c8dbc; - color: #f9f9f9; -} -/*Drodown in navbars*/ -.skin-blue .navbar .dropdown-menu > li > a { - color: #444444; -} -/* - Navbar custom dropdown menu ------------------------------------- -*/ -.navbar-nav > .notifications-menu > .dropdown-menu, -.navbar-nav > .messages-menu > .dropdown-menu, -.navbar-nav > .tasks-menu > .dropdown-menu { - width: 280px; - padding: 0 0 0 0!important; - margin: 0!important; - top: 100%; - border: 1px solid #dfdfdf; - -webkit-border-radius: 4px !important; - -moz-border-radius: 4px !important; - border-radius: 4px !important; -} -.navbar-nav > .notifications-menu > .dropdown-menu > li.header, -.navbar-nav > .messages-menu > .dropdown-menu > li.header, -.navbar-nav > .tasks-menu > .dropdown-menu > li.header { - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -moz-border-radius-topleft: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - background-color: #ffffff; - padding: 7px 10px; - border-bottom: 1px solid #f4f4f4; - color: #444444; - font-size: 14px; -} -.navbar-nav > .notifications-menu > .dropdown-menu > li.header:after, -.navbar-nav > .messages-menu > .dropdown-menu > li.header:after, -.navbar-nav > .tasks-menu > .dropdown-menu > li.header:after { - bottom: 100%; - left: 92%; - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; - pointer-events: none; - border-color: rgba(255, 255, 255, 0); - border-bottom-color: #ffffff; - border-width: 7px; - margin-left: -7px; -} -.navbar-nav > .notifications-menu > .dropdown-menu > li.footer > a, -.navbar-nav > .messages-menu > .dropdown-menu > li.footer > a, -.navbar-nav > .tasks-menu > .dropdown-menu > li.footer > a { - -webkit-border-top-left-radius: 0px; - -webkit-border-top-right-radius: 0px; - -webkit-border-bottom-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -moz-border-radius-topleft: 0px; - -moz-border-radius-topright: 0px; - -moz-border-radius-bottomright: 4px; - -moz-border-radius-bottomleft: 4px; - border-top-left-radius: 0px; - border-top-right-radius: 0px; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; - font-size: 12px; - background-color: #f4f4f4; - padding: 7px 10px; - border-bottom: 1px solid #eeeeee; - color: #444444; - text-align: center; -} -.navbar-nav > .notifications-menu > .dropdown-menu > li.footer > a:hover, -.navbar-nav > .messages-menu > .dropdown-menu > li.footer > a:hover, -.navbar-nav > .tasks-menu > .dropdown-menu > li.footer > a:hover { - background: #f4f4f4; - text-decoration: none; - font-weight: normal; -} -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu, -.navbar-nav > .messages-menu > .dropdown-menu > li .menu, -.navbar-nav > .tasks-menu > .dropdown-menu > li .menu { - margin: 0; - padding: 0; - list-style: none; - overflow-x: hidden; -} -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a, -.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a, -.navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a { - display: block; - white-space: nowrap; - /* Prevent text from breaking */ - - border-bottom: 1px solid #f4f4f4; -} -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a:hover, -.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:hover, -.navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a:hover { - background: #f6f6f6; - text-decoration: none; -} -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a { - font-size: 12px; - color: #444444; -} -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .glyphicon, -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .fa, -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .ion { - font-size: 20px; - width: 50px; - text-align: center; - padding: 15px 0px; - margin-right: 5px; - /* Default background and font colors */ - - background: #00c0ef; - color: #f9f9f9; - /* Fallback for browsers that doesn't support rgba */ - - color: rgba(255, 255, 255, 0.7); -} -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .glyphicon.danger, -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .fa.danger, -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .ion.danger { - background: #f56954; -} -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .glyphicon.warning, -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .fa.warning, -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .ion.warning { - background: #f39c12; -} -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .glyphicon.success, -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .fa.success, -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .ion.success { - background: #00a65a; -} -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .glyphicon.info, -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .fa.info, -.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .ion.info { - background: #00c0ef; -} -.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a { - margin: 0px; - line-height: 20px; - padding: 10px 5px 10px 5px; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > div > img { - margin: auto 10px auto auto; - width: 40px; - height: 40px; - border: 1px solid #dddddd; -} -.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > h4 { - padding: 0; - margin: 0 0 0 45px; - color: #444444; - font-size: 15px; -} -.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > h4 > small { - color: #999999; - font-size: 10px; - float: right; -} -.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > p { - margin: 0 0 0 45px; - font-size: 12px; - color: #888888; -} -.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:before, -.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:after { - display: table; - content: " "; -} -.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:after { - clear: both; -} -.navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a { - padding: 10px; -} -.navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a > h3 { - font-size: 14px; - padding: 0; - margin: 0 0 10px 0; - color: #666666; -} -.navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a > .progress { - padding: 0; - margin: 0; -} -.navbar-nav > .user-menu > .dropdown-menu { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - padding: 1px 0 0 0; - border-top-width: 0; - width: 280px; -} -.navbar-nav > .user-menu > .dropdown-menu:after { - bottom: 100%; - right: 10px; - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; - pointer-events: none; - border-color: rgba(255, 255, 255, 0); - border-bottom-color: #ffffff; - border-width: 10px; - margin-left: -10px; -} -.navbar-nav > .user-menu > .dropdown-menu > li.user-header { - height: 175px; - padding: 10px; - background: #3c8dbc; - text-align: center; -} -.navbar-nav > .user-menu > .dropdown-menu > li.user-header > img { - z-index: 5; - height: 90px; - width: 90px; - border: 8px solid; - border-color: transparent; - border-color: rgba(255, 255, 255, 0.2); -} -.navbar-nav > .user-menu > .dropdown-menu > li.user-header > p { - z-index: 5; - color: #f9f9f9; - color: rgba(255, 255, 255, 0.8); - font-size: 17px; - text-shadow: 2px 2px 3px #333333; - margin-top: 10px; -} -.navbar-nav > .user-menu > .dropdown-menu > li.user-header > p > small { - display: block; - font-size: 12px; -} -.navbar-nav > .user-menu > .dropdown-menu > li.user-body { - padding: 15px; - border-bottom: 1px solid #f4f4f4; - border-top: 1px solid #dddddd; -} -.navbar-nav > .user-menu > .dropdown-menu > li.user-body:before, -.navbar-nav > .user-menu > .dropdown-menu > li.user-body:after { - display: table; - content: " "; -} -.navbar-nav > .user-menu > .dropdown-menu > li.user-body:after { - clear: both; -} -.navbar-nav > .user-menu > .dropdown-menu > li.user-body > div > a { - color: #0073b7; -} -.navbar-nav > .user-menu > .dropdown-menu > li.user-footer { - background-color: #f9f9f9; - padding: 10px; -} -.navbar-nav > .user-menu > .dropdown-menu > li.user-footer:before, -.navbar-nav > .user-menu > .dropdown-menu > li.user-footer:after { - display: table; - content: " "; -} -.navbar-nav > .user-menu > .dropdown-menu > li.user-footer:after { - clear: both; -} -.navbar-nav > .user-menu > .dropdown-menu > li.user-footer .btn-default { - color: #666666; -} -/* Add fade animation to dropdown menus */ -.open > .dropdown-menu { - animation-name: fadeAnimation; - animation-duration: .7s; - animation-iteration-count: 1; - animation-timing-function: ease; - animation-fill-mode: forwards; - -webkit-animation-name: fadeAnimation; - -webkit-animation-duration: .7s; - -webkit-animation-iteration-count: 1; - -webkit-animation-timing-function: ease; - -webkit-animation-fill-mode: forwards; - -moz-animation-name: fadeAnimation; - -moz-animation-duration: .7s; - -moz-animation-iteration-count: 1; - -moz-animation-timing-function: ease; - -moz-animation-fill-mode: forwards; -} -@keyframes fadeAnimation { - from { - opacity: 0; - top: 120%; - } - to { - opacity: 1; - top: 100%; - } -} -@-webkit-keyframes fadeAnimation { - from { - opacity: 0; - top: 120%; - } - to { - opacity: 1; - top: 100%; - } -} -/* Fix dropdown menu for small screens to display correctly on small screens */ -@media screen and (max-width: 767px) { - .navbar-nav > .notifications-menu > .dropdown-menu, - .navbar-nav > .user-menu > .dropdown-menu, - .navbar-nav > .tasks-menu > .dropdown-menu, - .navbar-nav > .messages-menu > .dropdown-menu { - position: absolute; - top: 100%; - right: 0; - left: auto; - border-right: 1px solid #dddddd; - border-bottom: 1px solid #dddddd; - border-left: 1px solid #dddddd; - background: #ffffff; - } -} -/* Fix menu positions on xs screens to appear correctly and fully */ -@media screen and (max-width: 480px) { - .navbar-nav > .notifications-menu > .dropdown-menu > li.header, - .navbar-nav > .tasks-menu > .dropdown-menu > li.header, - .navbar-nav > .messages-menu > .dropdown-menu > li.header { - /* Remove arrow from the top */ - } - .navbar-nav > .notifications-menu > .dropdown-menu > li.header:after, - .navbar-nav > .tasks-menu > .dropdown-menu > li.header:after, - .navbar-nav > .messages-menu > .dropdown-menu > li.header:after { - border-width: 0px!important; - } - .navbar-nav > .tasks-menu > .dropdown-menu { - position: absolute; - right: -120px; - left: auto; - } - .navbar-nav > .notifications-menu > .dropdown-menu { - position: absolute; - right: -170px; - left: auto; - } - .navbar-nav > .messages-menu > .dropdown-menu { - position: absolute; - right: -210px; - left: auto; - } -} -/* - All form elements including input, select, textarea etc. ------------------------------------------------------------------ -*/ -.form-control { - -webkit-border-radius: 0px !important; - -moz-border-radius: 0px !important; - border-radius: 0px !important; - box-shadow: none; -} -.form-control:focus { - border-color: #3c8dbc !important; - box-shadow: none; -} -.form-group.has-success label { - color: #00a65a; -} -.form-group.has-success .form-control { - border-color: #00a65a !important; - box-shadow: none; -} -.form-group.has-warning label { - color: #f39c12; -} -.form-group.has-warning .form-control { - border-color: #f39c12 !important; - box-shadow: none; -} -.form-group.has-error label { - color: #f56954; -} -.form-group.has-error .form-control { - border-color: #f56954 !important; - box-shadow: none; -} -/* Input group */ -.input-group .input-group-addon { - border-radius: 0; - background-color: #f4f4f4; -} -/* button groups */ -.btn-group-vertical .btn.btn-flat:first-of-type, -.btn-group-vertical .btn.btn-flat:last-of-type { - border-radius: 0; -} -/* Checkbox and radio inputs */ -.checkbox, -.radio { - padding-left: 0; -} -/* - Compenent: Progress bars --------------------------------- -*/ -/* size variation */ -.progress.sm { - height: 10px; -} -.progress.xs { - height: 7px; -} -/* Vertical bars */ -.progress.vertical { - position: relative; - width: 30px; - height: 200px; - display: inline-block; - margin-right: 10px; -} -.progress.vertical > .progress-bar { - width: 100%!important; - position: absolute; - bottom: 0; -} -.progress.vertical.sm { - width: 20px; -} -.progress.vertical.xs { - width: 10px; -} -/* Remove margins from progress bars when put in a table */ -.table tr > td .progress { - margin: 0; -} -.progress-bar-light-blue, -.progress-bar-primary { - background-color: #3c8dbc; -} -.progress-striped .progress-bar-light-blue, -.progress-striped .progress-bar-primary { - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-bar-green, -.progress-bar-success { - background-color: #00a65a; -} -.progress-striped .progress-bar-green, -.progress-striped .progress-bar-success { - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-bar-aqua, -.progress-bar-info { - background-color: #00c0ef; -} -.progress-striped .progress-bar-aqua, -.progress-striped .progress-bar-info { - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-bar-yellow, -.progress-bar-warning { - background-color: #f39c12; -} -.progress-striped .progress-bar-yellow, -.progress-striped .progress-bar-warning { - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -.progress-bar-red, -.progress-bar-danger { - background-color: #f56954; -} -.progress-striped .progress-bar-red, -.progress-striped .progress-bar-danger { - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} -/* - Component: Small boxes -*/ -.small-box { - position: relative; - display: block; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - margin-bottom: 15px; -} -.small-box > .inner { - padding: 10px; -} -.small-box > .small-box-footer { - position: relative; - text-align: center; - padding: 3px 0; - color: #fff; - color: rgba(255, 255, 255, 0.8); - display: block; - z-index: 10; - background: rgba(0, 0, 0, 0.1); - text-decoration: none; -} -.small-box > .small-box-footer:hover { - color: #fff; - background: rgba(0, 0, 0, 0.15); -} -.small-box h3 { - font-size: 38px; - font-weight: bold; - margin: 0 0 10px 0; - white-space: nowrap; - padding: 0; -} -.small-box p { - font-size: 15px; -} -.small-box p > small { - display: block; - color: #f9f9f9; - font-size: 13px; - margin-top: 5px; -} -.small-box h3, -.small-box p { - z-index: 5px; -} -.small-box .icon { - position: absolute; - top: auto; - bottom: 5px; - right: 5px; - z-index: 0; - font-size: 90px; - color: rgba(0, 0, 0, 0.15); -} -.small-box:hover { - text-decoration: none; - color: #f9f9f9; -} -.small-box:hover .icon { - animation-name: tansformAnimation; - animation-duration: .5s; - animation-iteration-count: 1; - animation-timing-function: ease; - animation-fill-mode: forwards; - -webkit-animation-name: tansformAnimation; - -webkit-animation-duration: .5s; - -webkit-animation-iteration-count: 1; - -webkit-animation-timing-function: ease; - -webkit-animation-fill-mode: forwards; - -moz-animation-name: tansformAnimation; - -moz-animation-duration: .5s; - -moz-animation-iteration-count: 1; - -moz-animation-timing-function: ease; - -moz-animation-fill-mode: forwards; -} -@keyframes tansformAnimation { - from { - font-size: 90px; - } - to { - font-size: 100px; - } -} -@-webkit-keyframes tansformAnimation { - from { - font-size: 90px; - } - to { - font-size: 100px; - } -} -@media screen and (max-width: 480px) { - .small-box { - text-align: center; - } - .small-box .icon { - display: none; - } - .small-box p { - font-size: 12px; - } -} -/* - component: Boxes -------------------------- -*/ -.box { - position: relative; - background: #ffffff; - border-top: 2px solid #c1c1c1; - margin-bottom: 20px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - width: 100%; - box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); -} -.box.box-primary { - border-top-color: #3c8dbc; -} -.box.box-info { - border-top-color: #00c0ef; -} -.box.box-danger { - border-top-color: #f56954; -} -.box.box-warning { - border-top-color: #f39c12; -} -.box.box-success { - border-top-color: #00a65a; -} -.box.height-control .box-body { - max-height: 300px; - overflow: auto; -} -.box .box-header { - position: relative; - -webkit-border-top-left-radius: 3px; - -webkit-border-top-right-radius: 3px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -moz-border-radius-topleft: 3px; - -moz-border-radius-topright: 3px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - border-top-left-radius: 3px; - border-top-right-radius: 3px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - border-bottom: 0px solid #f4f4f4; - color: #444; - padding-bottom: 10px; -} -.box .box-header:before, -.box .box-header:after { - display: table; - content: " "; -} -.box .box-header:after { - clear: both; -} -.box .box-header > .fa, -.box .box-header > .glyphicon, -.box .box-header > .ion, -.box .box-header .box-title { - display: inline-block; - padding: 10px 0px 10px 10px; - margin: 0; - font-size: 20px; - font-weight: 400; - float: left; - cursor: default; -} -.box .box-header a:not(.btn) { - color: #444; -} -.box .box-header > .box-tools { - padding: 5px 10px 5px 5px; -} -.box .box-body { - padding: 10px; - -webkit-border-top-left-radius: 0; - -webkit-border-top-right-radius: 0; - -webkit-border-bottom-right-radius: 3px; - -webkit-border-bottom-left-radius: 3px; - -moz-border-radius-topleft: 0; - -moz-border-radius-topright: 0; - -moz-border-radius-bottomright: 3px; - -moz-border-radius-bottomleft: 3px; - border-top-left-radius: 0; - border-top-right-radius: 0; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.box .box-body > table, -.box .box-body > .table { - margin-bottom: 0; -} -.box .box-body.chart-responsive { - width: 100%; - overflow: hidden; -} -.box .box-body > .chart { - position: relative; - overflow: hidden; - width: 100%; -} -.box .box-body > .chart svg, -.box .box-body > .chart canvas { - width: 100%!important; -} -.box .box-body .fc { - margin-top: 5px; -} -.box .box-body .fc-header-title h2 { - font-size: 15px; - line-height: 1.6em; - color: #666; - margin-left: 10px; -} -.box .box-body .fc-header-right { - padding-right: 10px; -} -.box .box-body .fc-header-left { - padding-left: 10px; -} -.box .box-body .fc-widget-header { - background: #fafafa; - box-shadow: inset 0px -3px 1px rgba(0, 0, 0, 0.02); -} -.box .box-body .fc-grid { - width: 100%; - border: 0; -} -.box .box-body .fc-widget-header:first-of-type, -.box .box-body .fc-widget-content:first-of-type { - border-left: 0; - border-right: 0; -} -.box .box-body .fc-widget-header:last-of-type, -.box .box-body .fc-widget-content:last-of-type { - border-right: 0; -} -.box .box-body .table { - margin-bottom: 0; -} -.box .box-body .full-width-chart { - margin: -19px; -} -.box .box-body.no-padding .full-width-chart { - margin: -9px; -} -.box .box-footer { - border-top: 1px solid #f4f4f4; - -webkit-border-top-left-radius: 0; - -webkit-border-top-right-radius: 0; - -webkit-border-bottom-right-radius: 3px; - -webkit-border-bottom-left-radius: 3px; - -moz-border-radius-topleft: 0; - -moz-border-radius-topright: 0; - -moz-border-radius-bottomright: 3px; - -moz-border-radius-bottomleft: 3px; - border-top-left-radius: 0; - border-top-right-radius: 0; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; - padding: 10px; - background-color: #ffffff; -} -.box.box-solid { - border-top: 0px; -} -.box.box-solid > .box-header { - padding-bottom: 0px!important; -} -.box.box-solid > .box-header .btn.btn-default { - background: transparent; -} -.box.box-solid.box-primary > .box-header { - color: #fff; - background: #3c8dbc; - background-color: #3c8dbc; -} -.box.box-solid.box-primary > .box-header a { - color: #444; -} -.box.box-solid.box-info > .box-header { - color: #fff; - background: #00c0ef; - background-color: #00c0ef; -} -.box.box-solid.box-info > .box-header a { - color: #444; -} -.box.box-solid.box-danger > .box-header { - color: #fff; - background: #f56954; - background-color: #f56954; -} -.box.box-solid.box-danger > .box-header a { - color: #444; -} -.box.box-solid.box-warning > .box-header { - color: #fff; - background: #f39c12; - background-color: #f39c12; -} -.box.box-solid.box-warning > .box-header a { - color: #444; -} -.box.box-solid.box-success > .box-header { - color: #fff; - background: #00a65a; - background-color: #00a65a; -} -.box.box-solid.box-success > .box-header a { - color: #444; -} -.box.box-solid > .box-header > .box-tools > .btn { - border: 0; - box-shadow: none; -} -.box.box-solid.collapsed-box .box-header { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; -} -.box.box-solid[class*='bg'] > .box-header { - color: #fff; -} -.box .box-group > .box { - margin-bottom: 5px; -} -.box .knob-label { - text-align: center; - color: #333; - font-weight: 100; - font-size: 12px; - margin-bottom: 0.3em; -} -.box .todo-list { - margin: 0; - padding: 0px 0px; - list-style: none; -} -.box .todo-list > li { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - padding: 10px; - background: #f3f4f5; - margin-bottom: 2px; - border-left: 2px solid #e6e7e8; - color: #444; -} -.box .todo-list > li:last-of-type { - margin-bottom: 0; -} -.box .todo-list > li.danger { - border-left-color: #f56954; -} -.box .todo-list > li.warning { - border-left-color: #f39c12; -} -.box .todo-list > li.info { - border-left-color: #00c0ef; -} -.box .todo-list > li.success { - border-left-color: #00a65a; -} -.box .todo-list > li.primary { - border-left-color: #3c8dbc; -} -.box .todo-list > li > input[type='checkbox'] { - margin: 0 10px 0 5px; -} -.box .todo-list > li .text { - display: inline-block; - margin-left: 5px; - font-weight: 600; -} -.box .todo-list > li .label { - margin-left: 10px; - font-size: 9px; -} -.box .todo-list > li .tools { - display: none; - float: right; - color: #f56954; -} -.box .todo-list > li .tools > .fa, -.box .todo-list > li .tools > .glyphicon, -.box .todo-list > li .tools > .ion { - margin-right: 5px; - cursor: pointer; -} -.box .todo-list > li:hover .tools { - display: inline-block; -} -.box .todo-list > li.done { - color: #999; -} -.box .todo-list > li.done .text { - text-decoration: line-through; - font-weight: 500; -} -.box .todo-list > li.done .label { - background: #eaeaec !important; -} -.box .todo-list .handle { - display: inline-block; - cursor: move; - margin: 0 5px; -} -.box .chat { - padding: 5px 20px 5px 10px; -} -.box .chat .item { - margin-bottom: 10px; -} -.box .chat .item:before, -.box .chat .item:after { - display: table; - content: " "; -} -.box .chat .item:after { - clear: both; -} -.box .chat .item > img { - width: 40px; - height: 40px; - border: 2px solid transparent; - -webkit-border-radius: 50% !important; - -moz-border-radius: 50% !important; - border-radius: 50% !important; -} -.box .chat .item > img.online { - border: 2px solid #00a65a; -} -.box .chat .item > img.offline { - border: 2px solid #f56954; -} -.box .chat .item > .message { - margin-left: 55px; - margin-top: -40px; -} -.box .chat .item > .message > .name { - display: block; - font-weight: 600; -} -.box .chat .item > .attachment { - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - background: #f0f0f0; - margin-left: 65px; - margin-right: 15px; - padding: 10px; -} -.box .chat .item > .attachment > h4 { - margin: 0 0 5px 0; - font-weight: 600; - font-size: 14px; -} -.box .chat .item > .attachment > p, -.box .chat .item > .attachment > .filename { - font-weight: 600; - font-size: 13px; - font-style: italic; - margin: 0; -} -.box .chat .item > .attachment:before, -.box .chat .item > .attachment:after { - display: table; - content: " "; -} -.box .chat .item > .attachment:after { - clear: both; -} -.box > .overlay, -.box > .loading-img { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; -} -.box > .overlay { - z-index: 1010; - background: rgba(255, 255, 255, 0.7); -} -.box > .overlay.dark { - background: rgba(0, 0, 0, 0.5); -} -.box > .loading-img { - z-index: 1020; - background: transparent url('../img/ajax-loader1.gif') 50% 50% no-repeat; -} -/* -Component: timeline --------------------- -*/ -.timeline { - margin: 0 0 30px 0; - padding: 0; - list-style: none; -} -.timeline:before { - content: ''; - position: absolute; - top: 0px; - bottom: 0; - width: 5px; - background: #ddd; - left: 45px; - border: 1px solid #eee; - margin: 0; - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; -} -.timeline > li { - position: relative; - margin-right: 10px; - margin-bottom: 15px; -} -.timeline > li:before, -.timeline > li:after { - display: table; - content: " "; -} -.timeline > li:after { - clear: both; -} -.timeline > li > .timeline-item { - margin-top: 10px; - border: 0px solid #dfdfdf; - background: #fff; - color: #555; - margin-left: 60px; - margin-right: 15px; - padding: 5px; - position: relative; - box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); -} -.timeline > li > .timeline-item > .time { - color: #999; - float: right; - margin: 2px 0 0 0; -} -.timeline > li > .timeline-item > .timeline-header { - margin: 0; - color: #555; - border-bottom: 1px solid #f4f4f4; - padding: 5px; - font-size: 16px; - line-height: 1.1; -} -.timeline > li > .timeline-item > .timeline-header > a { - font-weight: 600; -} -.timeline > li > .timeline-item > .timeline-body, -.timeline > li > .timeline-item > .timeline-footer { - padding: 10px; -} -.timeline > li.time-label > span { - font-weight: 600; - padding: 5px; - display: inline-block; - background-color: #fff; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.5); - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; -} -.timeline > li > .fa, -.timeline > li > .glyphicon, -.timeline > li > .ion { - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); - width: 30px; - height: 30px; - font-size: 15px; - line-height: 30px; - position: absolute; - color: #666; - background: #eee; - border-radius: 50%; - text-align: center; - left: 18px; - top: 0; -} -/* - Component: Buttons -------------------------- -*/ -.btn { - font-weight: 500; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - border: 1px solid transparent; - -webkit-box-shadow: inset 0px -2px 0px 0px rgba(0, 0, 0, 0.09); - -moz-box-shadow: inset 0px -2px 0px 0px rgba(0, 0, 0, 0.09); - box-shadow: inset 0px -1px 0px 0px rgba(0, 0, 0, 0.09); -} -.btn.btn-default { - background-color: #fafafa; - color: #666; - border-color: #ddd; - border-bottom-color: #ddd; -} -.btn.btn-default:hover, -.btn.btn-default:active, -.btn.btn-default.hover { - background-color: #f4f4f4!important; -} -.btn.btn-default.btn-flat { - border-bottom-color: #d9dadc; -} -.btn.btn-primary { - background-color: #3c8dbc; - border-color: #367fa9; -} -.btn.btn-primary:hover, -.btn.btn-primary:active, -.btn.btn-primary.hover { - background-color: #367fa9; -} -.btn.btn-success { - background-color: #00a65a; - border-color: #008d4c; -} -.btn.btn-success:hover, -.btn.btn-success:active, -.btn.btn-success.hover { - background-color: #008d4c; -} -.btn.btn-info { - background-color: #00c0ef; - border-color: #00acd6; -} -.btn.btn-info:hover, -.btn.btn-info:active, -.btn.btn-info.hover { - background-color: #00acd6; -} -.btn.btn-danger { - background-color: #f56954; - border-color: #f4543c; -} -.btn.btn-danger:hover, -.btn.btn-danger:active, -.btn.btn-danger.hover { - background-color: #f4543c; -} -.btn.btn-warning { - background-color: #f39c12; - border-color: #e08e0b; -} -.btn.btn-warning:hover, -.btn.btn-warning:active, -.btn.btn-warning.hover { - background-color: #e08e0b; -} -.btn.btn-flat { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - border-width: 1px; -} -.btn:active { - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - -moz-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:focus { - outline: none; -} -.btn.btn-file { - position: relative; - width: 120px; - height: 35px; - overflow: hidden; -} -.btn.btn-file > input[type='file'] { - display: block !important; - width: 100% !important; - height: 35px !important; - opacity: 0 !important; - position: absolute; - top: -10px; - cursor: pointer; -} -.btn.btn-app { - position: relative; - padding: 15px 5px; - margin: 0 0 10px 10px; - min-width: 80px; - height: 60px; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - text-align: center; - color: #666; - border: 1px solid #ddd; - background-color: #fafafa; - font-size: 12px; -} -.btn.btn-app > .fa, -.btn.btn-app > .glyphicon, -.btn.btn-app > .ion { - font-size: 20px; - display: block; -} -.btn.btn-app:hover { - background: #f4f4f4; - color: #444; - border-color: #aaa; -} -.btn.btn-app:active, -.btn.btn-app:focus { - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - -moz-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.btn-app > .badge { - position: absolute; - top: -3px; - right: -10px; - font-size: 10px; - font-weight: 400; -} -.btn.btn-social-old { - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; - opacity: 0.9; - padding: 0; -} -.btn.btn-social-old > .fa { - padding: 10px 0; - width: 40px; -} -.btn.btn-social-old > .fa + span { - border-left: 1px solid rgba(255, 255, 255, 0.3); -} -.btn.btn-social-old span { - padding: 10px; -} -.btn.btn-social-old:hover { - opacity: 1; -} -.btn.btn-circle { - width: 30px; - height: 30px; - line-height: 30px; - padding: 0; - -webkit-border-radius: 50%; - -moz-border-radius: 50%; - border-radius: 50%; -} -/* - Component: callout ------------------------- -*/ -.callout { - margin: 0 0 20px 0; - padding: 15px 30px 15px 15px; - border-left: 5px solid #eee; -} -.callout h4 { - margin-top: 0; -} -.callout p:last-child { - margin-bottom: 0; -} -.callout code, -.callout .highlight { - background-color: #fff; -} -.callout.callout-danger { - background-color: #fcf2f2; - border-color: #dFb5b4; -} -.callout.callout-warning { - background-color: #fefbed; - border-color: #f1e7bc; -} -.callout.callout-info { - background-color: #f0f7fd; - border-color: #d0e3f0; -} -.callout.callout-danger h4 { - color: #B94A48; -} -.callout.callout-warning h4 { - color: #C09853; -} -.callout.callout-info h4 { - color: #3A87AD; -} -/* - Component: alert ------------------------- -*/ -.alert { - padding-left: 30px; - margin-left: 15px; - position: relative; -} -.alert > .fa, -.alert > .glyphicon { - position: absolute; - left: -15px; - top: -15px; - width: 35px; - height: 35px; - -webkit-border-radius: 50%; - -moz-border-radius: 50%; - border-radius: 50%; - line-height: 35px; - text-align: center; - background: inherit; - border: inherit; -} -/* - Component: Navs -*/ -/* NAV PILLS */ -.nav.nav-pills > li > a { - border-top: 3px solid transparent; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - color: #444; -} -.nav.nav-pills > li > a > .fa, -.nav.nav-pills > li > a > .glyphicon, -.nav.nav-pills > li > a > .ion { - margin-right: 5px; -} -.nav.nav-pills > li.active > a, -.nav.nav-pills > li.active > a:hover { - background-color: #f6f6f6; - border-top-color: #3c8dbc; - color: #444; -} -.nav.nav-pills > li.active > a { - font-weight: 600; -} -.nav.nav-pills > li > a:hover { - background-color: #f6f6f6; -} -.nav.nav-pills.nav-stacked > li > a { - border-top: 0; - border-left: 3px solid transparent; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - color: #444; -} -.nav.nav-pills.nav-stacked > li.active > a, -.nav.nav-pills.nav-stacked > li.active > a:hover { - background-color: #f6f6f6; - border-left-color: #3c8dbc; - color: #444; -} -.nav.nav-pills.nav-stacked > li.header { - border-bottom: 1px solid #ddd; - color: #777; - margin-bottom: 10px; - padding: 5px 10px; - text-transform: uppercase; -} -/* NAV TABS */ -.nav-tabs-custom { - margin-bottom: 20px; - background: #fff; - box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1); -} -.nav-tabs-custom > .nav-tabs { - margin: 0; - border-bottom-color: #f4f4f4; -} -.nav-tabs-custom > .nav-tabs > li { - border-top: 3px solid transparent; - margin-bottom: -2px; - margin-right: 5px; -} -.nav-tabs-custom > .nav-tabs > li > a { - -webkit-border-radius: 0 !important; - -moz-border-radius: 0 !important; - border-radius: 0 !important; -} -.nav-tabs-custom > .nav-tabs > li > a, -.nav-tabs-custom > .nav-tabs > li > a:hover { - background: transparent; - margin: 0; -} -.nav-tabs-custom > .nav-tabs > li:not(.active) > a:hover, -.nav-tabs-custom > .nav-tabs > li:not(.active) > a:focus, -.nav-tabs-custom > .nav-tabs > li:not(.active) > a:active { - border-color: transparent; -} -.nav-tabs-custom > .nav-tabs > li.active { - border-top-color: #3c8dbc; -} -.nav-tabs-custom > .nav-tabs > li.active > a, -.nav-tabs-custom > .nav-tabs > li.active:hover > a { - background-color: #fff; -} -.nav-tabs-custom > .nav-tabs > li.active > a { - border-top: 0; - border-left-color: #f4f4f4; - border-right-color: #f4f4f4; -} -.nav-tabs-custom > .nav-tabs > li:first-of-type { - margin-left: 0px; -} -.nav-tabs-custom > .nav-tabs > li:first-of-type.active > a { - border-left-width: 0; -} -.nav-tabs-custom > .nav-tabs.pull-right { - float: none!important; -} -.nav-tabs-custom > .nav-tabs.pull-right > li { - float: right; -} -.nav-tabs-custom > .nav-tabs.pull-right > li:first-of-type { - margin-right: 0px; -} -.nav-tabs-custom > .nav-tabs.pull-right > li:first-of-type.active > a { - border-left-width: 1px; - border-right-width: 0px; -} -.nav-tabs-custom > .nav-tabs > li.header { - font-weight: 400; - line-height: 35px; - padding: 0 10px; - font-size: 20px; - color: #444; - cursor: default; -} -.nav-tabs-custom > .nav-tabs > li.header > .fa, -.nav-tabs-custom > .nav-tabs > li.header > .glyphicon, -.nav-tabs-custom > .nav-tabs > li.header > .ion { - margin-right: 10px; -} -.nav-tabs-custom > .tab-content { - background: #fff; - padding: 10px; -} -/* PAGINATION */ -.pagination > li > a { - background: #fafafa; - color: #666; - -webkit-box-shadow: inset 0px -2px 0px 0px rgba(0, 0, 0, 0.09); - -moz-box-shadow: inset 0px -2px 0px 0px rgba(0, 0, 0, 0.09); - box-shadow: inset 0px -1px 0px 0px rgba(0, 0, 0, 0.09); -} -.pagination > li:first-of-type a, -.pagination > li:last-of-type a { - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; -} -/* - Component: Mailbox -*/ -.mailbox .table-mailbox { - border-left: 1px solid #ddd; - border-right: 1px solid #ddd; - border-bottom: 1px solid #ddd; -} -.mailbox .table-mailbox tr.unread > td { - background-color: rgba(0, 0, 0, 0.05); - color: #000; - font-weight: 600; -} -.mailbox .table-mailbox tr > td > .fa.fa-star, -.mailbox .table-mailbox tr > td > .fa.fa-star-o, -.mailbox .table-mailbox tr > td > .glyphicon.glyphicon-star, -.mailbox .table-mailbox tr > td > .glyphicon.glyphicon-star-empty { - color: #f39c12; - cursor: pointer; -} -.mailbox .table-mailbox tr > td.small-col { - width: 30px; -} -.mailbox .table-mailbox tr > td.name { - width: 150px; - font-weight: 600; -} -.mailbox .table-mailbox tr > td.time { - text-align: right; - width: 100px; -} -.mailbox .table-mailbox tr > td { - white-space: nowrap; -} -.mailbox .table-mailbox tr > td > a { - color: #444; -} -@media screen and (max-width: 767px) { - .mailbox .nav-stacked > li:not(.header) { - float: left; - width: 50%; - } - .mailbox .nav-stacked > li:not(.header).header { - border: 0!important; - } - .mailbox .search-form { - margin-top: 10px; - } -} -/* - Page: locked screen -*/ -/* ADD THIS CLASS TO THE TAG */ -.lockscreen { - background: url(../img/blur-background09.jpg) repeat center center fixed; - -webkit-background-size: cover; - -moz-background-size: cover; - -o-background-size: cover; - background-size: cover; -} -/* Remove the background from the body element */ -.lockscreen > body { - background: transparent; -} -/* We will put the dynamically generated digital clock here */ -.lockscreen .headline { - color: #fff; - text-shadow: 1px 3px 5px rgba(0, 0, 0, 0.5); - font-weight: 300; - -webkit-font-smoothing: antialiased !important; - opacity: 0.8; - margin: 10px 0 30px 0; - font-size: 90px; -} -@media screen and (max-width: 480px) { - .lockscreen .headline { - font-size: 60px; - margin-bottom: 40px; - } -} -/* User name [optional] */ -.lockscreen .lockscreen-name { - text-align: center; - font-weight: 600; - font-size: 16px; -} -/* Will contain the image and the sign in form */ -.lockscreen-item { - padding: 0; - background: #fff; - position: relative; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - margin: 10px auto; - width: 290px; -} -.lockscreen-item:before, -.lockscreen-item:after { - display: table; - content: " "; -} -.lockscreen-item:after { - clear: both; -} -/* User image */ -.lockscreen-item > .lockscreen-image { - position: absolute; - left: -10px; - top: -30px; - background: #fff; - padding: 10px; - -webkit-border-radius: 50%; - -moz-border-radius: 50%; - border-radius: 50%; - z-index: 10; -} -.lockscreen-item > .lockscreen-image > img { - width: 70px; - height: 70px; - -webkit-border-radius: 50%; - -moz-border-radius: 50%; - border-radius: 50%; -} -/* Contains the password input and the login button */ -.lockscreen-item > .lockscreen-credentials { - margin-left: 80px; -} -.lockscreen-item > .lockscreen-credentials input { - border: 0 !important; -} -.lockscreen-item > .lockscreen-credentials .btn { - background-color: #fff; - border: 0; -} -/* Extra to give the user an option to navigate the website [optional]*/ -.lockscreen-link { - margin-top: 30px; - text-align: center; -} -/* - Page: register and login -*/ -.form-box { - width: 360px; - margin: 90px auto 0 auto; -} -.form-box .header { - -webkit-border-top-left-radius: 4px; - -webkit-border-top-right-radius: 4px; - -webkit-border-bottom-right-radius: 0; - -webkit-border-bottom-left-radius: 0; - -moz-border-radius-topleft: 4px; - -moz-border-radius-topright: 4px; - -moz-border-radius-bottomright: 0; - -moz-border-radius-bottomleft: 0; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; - background: #3d9970; - box-shadow: inset 0px -3px 0px rgba(0, 0, 0, 0.2); - padding: 20px 10px; - text-align: center; - font-size: 26px; - font-weight: 300; - color: #fff; -} -.form-box .body, -.form-box .footer { - padding: 10px 20px; - background: #fff; - color: #444; -} -.form-box .body > .form-group, -.form-box .footer > .form-group { - margin-top: 20px; -} -.form-box .body > .form-group > input, -.form-box .footer > .form-group > input { - border: #fff; -} -.form-box .body > .btn, -.form-box .footer > .btn { - margin-bottom: 10px; -} -.form-box .footer { - -webkit-border-top-left-radius: 0; - -webkit-border-top-right-radius: 0; - -webkit-border-bottom-right-radius: 4px; - -webkit-border-bottom-left-radius: 4px; - -moz-border-radius-topleft: 0; - -moz-border-radius-topright: 0; - -moz-border-radius-bottomright: 4px; - -moz-border-radius-bottomleft: 4px; - border-top-left-radius: 0; - border-top-right-radius: 0; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; -} -@media (max-width: 767px) { - .form-box { - width: 90%; - } -} -/* - Page: 404 and 500 error pages ------------------------------------- -*/ -.error-page { - width: 600px; - margin: 20px auto 0 auto; -} -@media screen and (max-width: 767px) { - .error-page { - width: 100%; - } -} -.error-page > .headline { - float: left; - font-size: 100px; - font-weight: 300; -} -@media screen and (max-width: 767px) { - .error-page > .headline { - float: none; - text-align: center; - } -} -.error-page > .error-content { - margin-left: 190px; - display: block; -} -@media screen and (max-width: 767px) { - .error-page > .error-content { - margin-left: 0; - } -} -.error-page > .error-content > h3 { - font-weight: 300; - font-size: 25px; -} -@media screen and (max-width: 767px) { - .error-page > .error-content > h3 { - text-align: center; - } -} -.error-page:before, -.error-page:after { - display: table; - content: " "; -} -.error-page:after { - clear: both; -} -/* - Page: Invoice -*/ -.invoice { - position: relative; - width: 90%; - margin: 10px auto; - background: #fff; - border: 1px solid #f4f4f4; -} -.invoice-title { - margin-top: 0; -} -/* Enhancement for printing */ -@media print { - .invoice { - width: 100%; - border: 0; - margin: 0; - padding: 0; - } - .invoice-col { - float: left; - width: 33.3333333%; - } - .table-responsive { - overflow: auto; - } - .table-responsive > .table tr th, - .table-responsive > .table tr td { - white-space: normal!important; - } -} -/* - Skins - ----- -*/ -/* - Skin Blue - --------- -*/ -/* skin-blue navbar */ -.skin-blue .navbar { - background-color: #3c8dbc; -} -.skin-blue .navbar .nav a { - color: rgba(255, 255, 255, 0.8); -} -.skin-blue .navbar .nav > li > a:hover, -.skin-blue .navbar .nav > li > a:active, -.skin-blue .navbar .nav > li > a:focus, -.skin-blue .navbar .nav .open > a, -.skin-blue .navbar .nav .open > a:hover, -.skin-blue .navbar .nav .open > a:focus { - background: rgba(0, 0, 0, 0.1); - color: #f6f6f6; -} -.skin-blue .navbar .navbar-right > .nav { - margin-right: 10px; -} -.skin-blue .navbar .sidebar-toggle .icon-bar { - background: rgba(255, 255, 255, 0.8); -} -.skin-blue .navbar .sidebar-toggle:hover .icon-bar { - background: #f6f6f6 !important; -} -/* skin-blue logo */ -.skin-blue .logo { - background-color: #367fa9; - color: #f9f9f9; -} -.skin-blue .logo > a { - color: #f9f9f9; -} -.skin-blue .logo:hover { - background: #357ca5; -} -/* skin-blue content header */ -.skin-blue .right-side > .content-header { - background: #fbfbfb; - box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1); -} -/* Skin-blue user panel */ -.skin-blue .user-panel > .image > img { - border: 1px solid #dfdfdf; -} -.skin-blue .user-panel > .info, -.skin-blue .user-panel > .info > a { - color: #555555; -} -/* skin-blue sidebar */ -.skin-blue .sidebar { - border-bottom: 1px solid #fff; -} -.skin-blue .sidebar > .sidebar-menu > li { - border-top: 1px solid #fff; - border-bottom: 1px solid #dbdbdb; -} -.skin-blue .sidebar > .sidebar-menu > li:first-of-type { - border-top: 1px solid #dbdbdb; -} -.skin-blue .sidebar > .sidebar-menu > li:first-of-type > a { - border-top: 1px solid #fff; -} -.skin-blue .sidebar > .sidebar-menu > li > a { - margin-right: 1px; -} -.skin-blue .sidebar > .sidebar-menu > li > a:hover, -.skin-blue .sidebar > .sidebar-menu > li.active > a { - color: #222; - background: #f9f9f9; -} -.skin-blue .sidebar > .sidebar-menu > li > .treeview-menu { - margin: 0 1px; - background: #f9f9f9; -} -.skin-blue .left-side { - background: #f4f4f4; - -webkit-box-shadow: inset -3px 0px 8px -4px rgba(0, 0, 0, 0.1); - -moz-box-shadow: inset -3px 0px 8px -4px rgba(0, 0, 0, 0.1); - box-shadow: inset -3px 0px 8px -4px rgba(0, 0, 0, 0.07); -} -.skin-blue .sidebar a { - color: #555555; -} -.skin-blue .sidebar a:hover { - text-decoration: none; -} -.skin-blue .treeview-menu > li > a { - color: #777; -} -.skin-blue .treeview-menu > li.active > a, -.skin-blue .treeview-menu > li > a:hover { - color: #111; -} -.skin-blue .sidebar-form { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - border: 1px solid #dbdbdb; - margin: 10px 10px; -} -.skin-blue .sidebar-form input[type="text"], -.skin-blue .sidebar-form .btn { - box-shadow: none; - background-color: #fafafa; - border: 1px solid #fafafa; - height: 35px; -} -.skin-blue .sidebar-form input[type="text"] { - color: #666; - -webkit-border-top-left-radius: 2px !important; - -webkit-border-top-right-radius: 0 !important; - -webkit-border-bottom-right-radius: 0 !important; - -webkit-border-bottom-left-radius: 2px !important; - -moz-border-radius-topleft: 2px !important; - -moz-border-radius-topright: 0 !important; - -moz-border-radius-bottomright: 0 !important; - -moz-border-radius-bottomleft: 2px !important; - border-top-left-radius: 2px !important; - border-top-right-radius: 0 !important; - border-bottom-right-radius: 0 !important; - border-bottom-left-radius: 2px !important; -} -.skin-blue .sidebar-form input[type="text"]:focus, -.skin-blue .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #fff; - color: #666; -} -.skin-blue .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left-color: #fff; -} -.skin-blue .sidebar-form .btn { - color: #999; - -webkit-border-top-left-radius: 0 !important; - -webkit-border-top-right-radius: 2px !important; - -webkit-border-bottom-right-radius: 2px !important; - -webkit-border-bottom-left-radius: 0 !important; - -moz-border-radius-topleft: 0 !important; - -moz-border-radius-topright: 2px !important; - -moz-border-radius-bottomright: 2px !important; - -moz-border-radius-bottomleft: 0 !important; - border-top-left-radius: 0 !important; - border-top-right-radius: 2px !important; - border-bottom-right-radius: 2px !important; - border-bottom-left-radius: 0 !important; -} -/* - Skin Black - -------- -*/ -/* skin-black navbar */ -.skin-black .navbar { - background-color: #ffffff; - border-bottom: 1px solid #eee; -} -.skin-black .navbar .nav a { - color: #333333; -} -.skin-black .navbar .nav > li > a:hover, -.skin-black .navbar .nav > li > a:active, -.skin-black .navbar .nav > li > a:focus, -.skin-black .navbar .nav .open > a, -.skin-black .navbar .nav .open > a:hover, -.skin-black .navbar .nav .open > a:focus { - background: #ffffff; - color: #999999; -} -.skin-black .navbar .navbar-right > .nav { - margin-right: 10px; -} -.skin-black .navbar .sidebar-toggle .icon-bar { - background: #333333; -} -.skin-black .navbar .sidebar-toggle:hover .icon-bar { - background: #999999 !important; -} -/* skin-black logo */ -.skin-black .logo { - background-color: #333333; - color: #f9f9f9; -} -.skin-black .logo > a { - color: #f9f9f9; -} -.skin-black .logo:hover { - background: #303030; -} -/* skin-black content header */ -.skin-black .right-side > .content-header { - background: transparent; - box-shadow: none; -} -/* Skin-red user panel */ -.skin-black .user-panel > .image > img { - border: 1px solid #444; -} -.skin-black .user-panel > .info, -.skin-black .user-panel > .info > a { - color: #eee; -} -/* skin-black sidebar */ -.skin-black .sidebar { - border-bottom: 1px solid #333; -} -.skin-black .sidebar > .sidebar-menu > li { - border-top: 1px solid #333; - border-bottom: 0px solid #444; -} -.skin-black .sidebar > .sidebar-menu > li:first-of-type { - border-top: 1px solid #444; -} -.skin-black .sidebar > .sidebar-menu > li:first-of-type > a { - border-top: 0px solid #333; -} -.skin-black .sidebar > .sidebar-menu > li > a { - margin-right: 1px; -} -.skin-black .sidebar > .sidebar-menu > li > a:hover, -.skin-black .sidebar > .sidebar-menu > li.active > a { - color: #f6f6f6; - background: #444; -} -.skin-black .sidebar > .sidebar-menu > li > .treeview-menu { - margin: 0 1px; - background: #444; -} -.skin-black .left-side { - background: #333; -} -.skin-black .sidebar a { - color: #eee; -} -.skin-black .sidebar a:hover { - text-decoration: none; -} -.skin-black .treeview-menu > li > a { - color: #ccc; -} -.skin-black .treeview-menu > li.active > a, -.skin-black .treeview-menu > li > a:hover { - color: #fff; -} -.skin-black .sidebar-form { - -webkit-border-radius: 2px; - -moz-border-radius: 2px; - border-radius: 2px; - border: 0px solid #555; - margin: 10px 10px; -} -.skin-black .sidebar-form input[type="text"], -.skin-black .sidebar-form .btn { - box-shadow: none; - background-color: rgba(255, 255, 255, 0.1); - border: 0 solid rgba(255, 255, 255, 0.1); - height: 35px; - outline: none; -} -.skin-black .sidebar-form input[type="text"] { - color: #666; - -webkit-border-top-left-radius: 2px !important; - -webkit-border-top-right-radius: 0 !important; - -webkit-border-bottom-right-radius: 0 !important; - -webkit-border-bottom-left-radius: 2px !important; - -moz-border-radius-topleft: 2px !important; - -moz-border-radius-topright: 0 !important; - -moz-border-radius-bottomright: 0 !important; - -moz-border-radius-bottomleft: 2px !important; - border-top-left-radius: 2px !important; - border-top-right-radius: 0 !important; - border-bottom-right-radius: 0 !important; - border-bottom-left-radius: 2px !important; -} -.skin-black .sidebar-form input[type="text"]:focus, -.skin-black .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - background-color: #444; - border: 0; -} -.skin-black .sidebar-form input[type="text"]:focus + .input-group-btn .btn { - border-left: 0; -} -.skin-black .sidebar-form .btn { - color: #999; - -webkit-border-top-left-radius: 0 !important; - -webkit-border-top-right-radius: 2px !important; - -webkit-border-bottom-right-radius: 2px !important; - -webkit-border-bottom-left-radius: 0 !important; - -moz-border-radius-topleft: 0 !important; - -moz-border-radius-topright: 2px !important; - -moz-border-radius-bottomright: 2px !important; - -moz-border-radius-bottomleft: 0 !important; - border-top-left-radius: 0 !important; - border-top-right-radius: 2px !important; - border-bottom-right-radius: 2px !important; - border-bottom-left-radius: 0 !important; - border-left: 0; -} -/*! - * iCheck v1.0.1, http://git.io/arlzeA - * ================================= - * Powerful jQuery and Zepto plugin for checkboxes and radio buttons customization - * - * (c) 2013 Damir Sultanov, http://fronteed.com - * MIT Licensed - */ -/* iCheck plugin Minimal skin, black ------------------------------------ */ -.icheckbox_minimal, -.iradio_minimal { - display: inline-block; - *display: inline; - vertical-align: middle; - margin: 0; - padding: 0; - width: 18px; - height: 18px; - background: rgba(255, 255, 255, 0.7) url(iCheck/minimal/minimal.png) no-repeat; - border: none; - cursor: pointer; -} -.icheckbox_minimal { - background-position: 0 0; -} -.icheckbox_minimal.hover { - background-position: -20px 0; -} -.icheckbox_minimal.checked { - background-position: -40px 0; -} -.icheckbox_minimal.disabled { - background-position: -60px 0; - cursor: default; -} -.icheckbox_minimal.checked.disabled { - background-position: -80px 0; -} -.iradio_minimal { - background-position: -100px 0; -} -.iradio_minimal.hover { - background-position: -120px 0; -} -.iradio_minimal.checked { - background-position: -140px 0; -} -.iradio_minimal.disabled { - background-position: -160px 0; - cursor: default; -} -.iradio_minimal.checked.disabled { - background-position: -180px 0; -} -/* Retina support */ -@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (-moz-min-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 3/2), only screen and (min-device-pixel-ratio: 1.5) { - .icheckbox_minimal, - .iradio_minimal { - background-image: url('iCheck/minimal/minimal@2x.png'); - -webkit-background-size: 200px 20px; - background-size: 200px 20px; - } -} -.pace .pace-progress { - background: #00c0ef; - position: fixed; - z-index: 2000; - top: 0; - left: 0; - height: 2px; - -webkit-transition: width 1s; - -moz-transition: width 1s; - -o-transition: width 1s; - transition: width 1s; -} -.pace-inactive { - display: none; -} -/* - * Social Buttons for Bootstrap - * - * Copyright 2013-2014 Panayiotis Lipiridis - * Licensed under the MIT License - * - * https://github.com/lipis/bootstrap-social - * - * Note: this file has been altered to work correctly with AdminLTE - */ -.btn-social { - position: relative; - padding-left: 44px !important; - text-align: left; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.btn-social :first-child { - position: absolute; - left: 0; - top: 0; - bottom: 0; - width: 32px !important; - line-height: 34px !important; - font-size: 1.6em!important; - text-align: center; - border-right: 1px solid rgba(0, 0, 0, 0.2); -} -.btn-social.btn-lg { - padding-left: 60px !important; -} -.btn-social.btn-lg :first-child { - line-height: 45px; - width: 45px; - font-size: 1.8em; -} -.btn-social.btn-sm { - padding-left: 38px !important; -} -.btn-social.btn-sm :first-child { - line-height: 28px; - width: 28px; - font-size: 1.4em; -} -.btn-social.btn-xs { - padding-left: 30px !important; -} -.btn-social.btn-xs :first-child { - line-height: 20px; - width: 20px; - font-size: 1.2em; -} -.btn-social-icon { - position: relative; - padding-left: 44px !important; - text-align: left; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - height: 34px; - width: 34px; - padding: 0; -} -.btn-social-icon :first-child { - position: absolute; - left: 0; - top: 0; - bottom: 0; - width: 32px !important; - line-height: 34px !important; - font-size: 1.6em!important; - text-align: center; - border-right: 1px solid rgba(0, 0, 0, 0.2); -} -.btn-social-icon.btn-lg { - padding-left: 60px !important; -} -.btn-social-icon.btn-lg :first-child { - line-height: 45px; - width: 45px; - font-size: 1.8em; -} -.btn-social-icon.btn-sm { - padding-left: 38px !important; -} -.btn-social-icon.btn-sm :first-child { - line-height: 28px; - width: 28px; - font-size: 1.4em; -} -.btn-social-icon.btn-xs { - padding-left: 30px !important; -} -.btn-social-icon.btn-xs :first-child { - line-height: 20px; - width: 20px; - font-size: 1.2em; -} -.btn-social-icon :first-child { - border: none; - text-align: center; - width: 100%!important; -} -.btn-social-icon.btn-lg { - height: 45px; - width: 45px; - padding-left: 0; - padding-right: 0; -} -.btn-social-icon.btn-sm { - height: 30px; - width: 30px; - padding-left: 0; - padding-right: 0; -} -.btn-social-icon.btn-xs { - height: 22px; - width: 22px; - padding-left: 0; - padding-right: 0; -} -.btn-bitbucket { - color: #ffffff; - background-color: #205081; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-bitbucket:hover, -.btn-bitbucket:focus, -.btn-bitbucket:active, -.btn-bitbucket.active, -.open .dropdown-toggle.btn-bitbucket { - color: #ffffff; - background-color: #183c60; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-bitbucket:active, -.btn-bitbucket.active, -.open .dropdown-toggle.btn-bitbucket { - background-image: none; -} -.btn-bitbucket.disabled, -.btn-bitbucket[disabled], -fieldset[disabled] .btn-bitbucket, -.btn-bitbucket.disabled:hover, -.btn-bitbucket[disabled]:hover, -fieldset[disabled] .btn-bitbucket:hover, -.btn-bitbucket.disabled:focus, -.btn-bitbucket[disabled]:focus, -fieldset[disabled] .btn-bitbucket:focus, -.btn-bitbucket.disabled:active, -.btn-bitbucket[disabled]:active, -fieldset[disabled] .btn-bitbucket:active, -.btn-bitbucket.disabled.active, -.btn-bitbucket[disabled].active, -fieldset[disabled] .btn-bitbucket.active { - background-color: #205081; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-bitbucket .badge { - color: #205081; - background-color: #ffffff; -} -.btn-dropbox { - color: #ffffff; - background-color: #1087dd; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-dropbox:hover, -.btn-dropbox:focus, -.btn-dropbox:active, -.btn-dropbox.active, -.open .dropdown-toggle.btn-dropbox { - color: #ffffff; - background-color: #0d70b7; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-dropbox:active, -.btn-dropbox.active, -.open .dropdown-toggle.btn-dropbox { - background-image: none; -} -.btn-dropbox.disabled, -.btn-dropbox[disabled], -fieldset[disabled] .btn-dropbox, -.btn-dropbox.disabled:hover, -.btn-dropbox[disabled]:hover, -fieldset[disabled] .btn-dropbox:hover, -.btn-dropbox.disabled:focus, -.btn-dropbox[disabled]:focus, -fieldset[disabled] .btn-dropbox:focus, -.btn-dropbox.disabled:active, -.btn-dropbox[disabled]:active, -fieldset[disabled] .btn-dropbox:active, -.btn-dropbox.disabled.active, -.btn-dropbox[disabled].active, -fieldset[disabled] .btn-dropbox.active { - background-color: #1087dd; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-dropbox .badge { - color: #1087dd; - background-color: #ffffff; -} -.btn-facebook { - color: #ffffff; - background-color: #3b5998; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-facebook:hover, -.btn-facebook:focus, -.btn-facebook:active, -.btn-facebook.active, -.open .dropdown-toggle.btn-facebook { - color: #ffffff; - background-color: #30487b; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-facebook:active, -.btn-facebook.active, -.open .dropdown-toggle.btn-facebook { - background-image: none; -} -.btn-facebook.disabled, -.btn-facebook[disabled], -fieldset[disabled] .btn-facebook, -.btn-facebook.disabled:hover, -.btn-facebook[disabled]:hover, -fieldset[disabled] .btn-facebook:hover, -.btn-facebook.disabled:focus, -.btn-facebook[disabled]:focus, -fieldset[disabled] .btn-facebook:focus, -.btn-facebook.disabled:active, -.btn-facebook[disabled]:active, -fieldset[disabled] .btn-facebook:active, -.btn-facebook.disabled.active, -.btn-facebook[disabled].active, -fieldset[disabled] .btn-facebook.active { - background-color: #3b5998; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-facebook .badge { - color: #3b5998; - background-color: #ffffff; -} -.btn-flickr { - color: #ffffff; - background-color: #ff0084; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-flickr:hover, -.btn-flickr:focus, -.btn-flickr:active, -.btn-flickr.active, -.open .dropdown-toggle.btn-flickr { - color: #ffffff; - background-color: #d6006f; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-flickr:active, -.btn-flickr.active, -.open .dropdown-toggle.btn-flickr { - background-image: none; -} -.btn-flickr.disabled, -.btn-flickr[disabled], -fieldset[disabled] .btn-flickr, -.btn-flickr.disabled:hover, -.btn-flickr[disabled]:hover, -fieldset[disabled] .btn-flickr:hover, -.btn-flickr.disabled:focus, -.btn-flickr[disabled]:focus, -fieldset[disabled] .btn-flickr:focus, -.btn-flickr.disabled:active, -.btn-flickr[disabled]:active, -fieldset[disabled] .btn-flickr:active, -.btn-flickr.disabled.active, -.btn-flickr[disabled].active, -fieldset[disabled] .btn-flickr.active { - background-color: #ff0084; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-flickr .badge { - color: #ff0084; - background-color: #ffffff; -} -.btn-foursquare { - color: #ffffff; - background-color: #0072b1; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-foursquare:hover, -.btn-foursquare:focus, -.btn-foursquare:active, -.btn-foursquare.active, -.open .dropdown-toggle.btn-foursquare { - color: #ffffff; - background-color: #005888; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-foursquare:active, -.btn-foursquare.active, -.open .dropdown-toggle.btn-foursquare { - background-image: none; -} -.btn-foursquare.disabled, -.btn-foursquare[disabled], -fieldset[disabled] .btn-foursquare, -.btn-foursquare.disabled:hover, -.btn-foursquare[disabled]:hover, -fieldset[disabled] .btn-foursquare:hover, -.btn-foursquare.disabled:focus, -.btn-foursquare[disabled]:focus, -fieldset[disabled] .btn-foursquare:focus, -.btn-foursquare.disabled:active, -.btn-foursquare[disabled]:active, -fieldset[disabled] .btn-foursquare:active, -.btn-foursquare.disabled.active, -.btn-foursquare[disabled].active, -fieldset[disabled] .btn-foursquare.active { - background-color: #0072b1; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-foursquare .badge { - color: #0072b1; - background-color: #ffffff; -} -.btn-github { - color: #ffffff; - background-color: #444444; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-github:hover, -.btn-github:focus, -.btn-github:active, -.btn-github.active, -.open .dropdown-toggle.btn-github { - color: #ffffff; - background-color: #303030; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-github:active, -.btn-github.active, -.open .dropdown-toggle.btn-github { - background-image: none; -} -.btn-github.disabled, -.btn-github[disabled], -fieldset[disabled] .btn-github, -.btn-github.disabled:hover, -.btn-github[disabled]:hover, -fieldset[disabled] .btn-github:hover, -.btn-github.disabled:focus, -.btn-github[disabled]:focus, -fieldset[disabled] .btn-github:focus, -.btn-github.disabled:active, -.btn-github[disabled]:active, -fieldset[disabled] .btn-github:active, -.btn-github.disabled.active, -.btn-github[disabled].active, -fieldset[disabled] .btn-github.active { - background-color: #444444; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-github .badge { - color: #444444; - background-color: #ffffff; -} -.btn-google-plus { - color: #ffffff; - background-color: #dd4b39; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-google-plus:hover, -.btn-google-plus:focus, -.btn-google-plus:active, -.btn-google-plus.active, -.open .dropdown-toggle.btn-google-plus { - color: #ffffff; - background-color: #ca3523; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-google-plus:active, -.btn-google-plus.active, -.open .dropdown-toggle.btn-google-plus { - background-image: none; -} -.btn-google-plus.disabled, -.btn-google-plus[disabled], -fieldset[disabled] .btn-google-plus, -.btn-google-plus.disabled:hover, -.btn-google-plus[disabled]:hover, -fieldset[disabled] .btn-google-plus:hover, -.btn-google-plus.disabled:focus, -.btn-google-plus[disabled]:focus, -fieldset[disabled] .btn-google-plus:focus, -.btn-google-plus.disabled:active, -.btn-google-plus[disabled]:active, -fieldset[disabled] .btn-google-plus:active, -.btn-google-plus.disabled.active, -.btn-google-plus[disabled].active, -fieldset[disabled] .btn-google-plus.active { - background-color: #dd4b39; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-google-plus .badge { - color: #dd4b39; - background-color: #ffffff; -} -.btn-instagram { - color: #ffffff; - background-color: #3f729b; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-instagram:hover, -.btn-instagram:focus, -.btn-instagram:active, -.btn-instagram.active, -.open .dropdown-toggle.btn-instagram { - color: #ffffff; - background-color: #335d7e; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-instagram:active, -.btn-instagram.active, -.open .dropdown-toggle.btn-instagram { - background-image: none; -} -.btn-instagram.disabled, -.btn-instagram[disabled], -fieldset[disabled] .btn-instagram, -.btn-instagram.disabled:hover, -.btn-instagram[disabled]:hover, -fieldset[disabled] .btn-instagram:hover, -.btn-instagram.disabled:focus, -.btn-instagram[disabled]:focus, -fieldset[disabled] .btn-instagram:focus, -.btn-instagram.disabled:active, -.btn-instagram[disabled]:active, -fieldset[disabled] .btn-instagram:active, -.btn-instagram.disabled.active, -.btn-instagram[disabled].active, -fieldset[disabled] .btn-instagram.active { - background-color: #3f729b; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-instagram .badge { - color: #3f729b; - background-color: #ffffff; -} -.btn-linkedin { - color: #ffffff; - background-color: #007bb6; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-linkedin:hover, -.btn-linkedin:focus, -.btn-linkedin:active, -.btn-linkedin.active, -.open .dropdown-toggle.btn-linkedin { - color: #ffffff; - background-color: #005f8d; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-linkedin:active, -.btn-linkedin.active, -.open .dropdown-toggle.btn-linkedin { - background-image: none; -} -.btn-linkedin.disabled, -.btn-linkedin[disabled], -fieldset[disabled] .btn-linkedin, -.btn-linkedin.disabled:hover, -.btn-linkedin[disabled]:hover, -fieldset[disabled] .btn-linkedin:hover, -.btn-linkedin.disabled:focus, -.btn-linkedin[disabled]:focus, -fieldset[disabled] .btn-linkedin:focus, -.btn-linkedin.disabled:active, -.btn-linkedin[disabled]:active, -fieldset[disabled] .btn-linkedin:active, -.btn-linkedin.disabled.active, -.btn-linkedin[disabled].active, -fieldset[disabled] .btn-linkedin.active { - background-color: #007bb6; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-linkedin .badge { - color: #007bb6; - background-color: #ffffff; -} -.btn-tumblr { - color: #ffffff; - background-color: #2c4762; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-tumblr:hover, -.btn-tumblr:focus, -.btn-tumblr:active, -.btn-tumblr.active, -.open .dropdown-toggle.btn-tumblr { - color: #ffffff; - background-color: #1f3346; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-tumblr:active, -.btn-tumblr.active, -.open .dropdown-toggle.btn-tumblr { - background-image: none; -} -.btn-tumblr.disabled, -.btn-tumblr[disabled], -fieldset[disabled] .btn-tumblr, -.btn-tumblr.disabled:hover, -.btn-tumblr[disabled]:hover, -fieldset[disabled] .btn-tumblr:hover, -.btn-tumblr.disabled:focus, -.btn-tumblr[disabled]:focus, -fieldset[disabled] .btn-tumblr:focus, -.btn-tumblr.disabled:active, -.btn-tumblr[disabled]:active, -fieldset[disabled] .btn-tumblr:active, -.btn-tumblr.disabled.active, -.btn-tumblr[disabled].active, -fieldset[disabled] .btn-tumblr.active { - background-color: #2c4762; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-tumblr .badge { - color: #2c4762; - background-color: #ffffff; -} -.btn-twitter { - color: #ffffff; - background-color: #55acee; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-twitter:hover, -.btn-twitter:focus, -.btn-twitter:active, -.btn-twitter.active, -.open .dropdown-toggle.btn-twitter { - color: #ffffff; - background-color: #309aea; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-twitter:active, -.btn-twitter.active, -.open .dropdown-toggle.btn-twitter { - background-image: none; -} -.btn-twitter.disabled, -.btn-twitter[disabled], -fieldset[disabled] .btn-twitter, -.btn-twitter.disabled:hover, -.btn-twitter[disabled]:hover, -fieldset[disabled] .btn-twitter:hover, -.btn-twitter.disabled:focus, -.btn-twitter[disabled]:focus, -fieldset[disabled] .btn-twitter:focus, -.btn-twitter.disabled:active, -.btn-twitter[disabled]:active, -fieldset[disabled] .btn-twitter:active, -.btn-twitter.disabled.active, -.btn-twitter[disabled].active, -fieldset[disabled] .btn-twitter.active { - background-color: #55acee; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-twitter .badge { - color: #55acee; - background-color: #ffffff; -} -.btn-vk { - color: #ffffff; - background-color: #587ea3; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-vk:hover, -.btn-vk:focus, -.btn-vk:active, -.btn-vk.active, -.open .dropdown-toggle.btn-vk { - color: #ffffff; - background-color: #4a6a89; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-vk:active, -.btn-vk.active, -.open .dropdown-toggle.btn-vk { - background-image: none; -} -.btn-vk.disabled, -.btn-vk[disabled], -fieldset[disabled] .btn-vk, -.btn-vk.disabled:hover, -.btn-vk[disabled]:hover, -fieldset[disabled] .btn-vk:hover, -.btn-vk.disabled:focus, -.btn-vk[disabled]:focus, -fieldset[disabled] .btn-vk:focus, -.btn-vk.disabled:active, -.btn-vk[disabled]:active, -fieldset[disabled] .btn-vk:active, -.btn-vk.disabled.active, -.btn-vk[disabled].active, -fieldset[disabled] .btn-vk.active { - background-color: #587ea3; - border-color: rgba(0, 0, 0, 0.2); -} -.btn-vk .badge { - color: #587ea3; - background-color: #ffffff; -} diff --git a/web/assetic/admin_lte_css_fontawesome-webfont_8 b/web/assetic/admin_lte_css_fontawesome-webfont_8 deleted file mode 100644 index 7c79c6a6bc..0000000000 Binary files a/web/assetic/admin_lte_css_fontawesome-webfont_8 and /dev/null differ diff --git a/web/assetic/admin_lte_css_jquery-ui-1.10.3.custom_1 b/web/assetic/admin_lte_css_jquery-ui-1.10.3.custom_1 deleted file mode 100644 index b42e18ef75..0000000000 --- a/web/assetic/admin_lte_css_jquery-ui-1.10.3.custom_1 +++ /dev/null @@ -1,1178 +0,0 @@ -/*! jQuery UI - v1.10.3 - 2014-01-11 -* http://jqueryui.com -* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css -* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=%23e6e7e8&bgTextureHeader=flat&bgImgOpacityHeader=100&borderColorHeader=%23ddd&fcHeader=%23222222&iconColorHeader=%23222222&bgColorContent=%23ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=%23ddd&fcContent=%23222222&iconColorContent=%23222222&bgColorDefault=%23e6e6e6&bgTextureDefault=flat&bgImgOpacityDefault=75&borderColorDefault=%23ddd&fcDefault=%23555555&iconColorDefault=%23888888&bgColorHover=%23dadada&bgTextureHover=flat&bgImgOpacityHover=75&borderColorHover=%23999999&fcHover=%23212121&iconColorHover=%23454545&bgColorActive=%23ffffff&bgTextureActive=flat&bgImgOpacityActive=65&borderColorActive=%23aaaaaa&fcActive=%23212121&iconColorActive=%23454545&bgColorHighlight=%23f39c12&bgTextureHighlight=flat&bgImgOpacityHighlight=55&borderColorHighlight=%23f39c12&fcHighlight=%23f9f9f9&iconColorHighlight=%23ffffff&bgColorError=%23f56954&bgTextureError=flat&bgImgOpacityError=100&borderColorError=%23f56954&fcError=%23f9f9f9&iconColorError=%23ffffff&bgColorOverlay=%23aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=%23aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px -* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { - display: none; -} -.ui-helper-hidden-accessible { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; -} -.ui-helper-reset { - margin: 0; - padding: 0; - border: 0; - outline: 0; - line-height: 1.3; - text-decoration: none; - font-size: 100%; - list-style: none; -} -.ui-helper-clearfix:before, -.ui-helper-clearfix:after { - content: ""; - display: table; - border-collapse: collapse; -} -.ui-helper-clearfix:after { - clear: both; -} -.ui-helper-clearfix { - min-height: 0; /* support: IE7 */ -} -.ui-helper-zfix { - width: 100%; - height: 100%; - top: 0; - left: 0; - position: absolute; - opacity: 0; - filter:Alpha(Opacity=0); -} - -.ui-front { - z-index: 100; -} - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { - cursor: default !important; -} - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { - display: block; - text-indent: -99999px; - overflow: hidden; - background-repeat: no-repeat; -} - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; -} -.ui-resizable { - position: relative; -} -.ui-resizable-handle { - position: absolute; - font-size: 0.1px; - display: block; -} -.ui-resizable-disabled .ui-resizable-handle, -.ui-resizable-autohide .ui-resizable-handle { - display: none; -} -.ui-resizable-n { - cursor: n-resize; - height: 7px; - width: 100%; - top: -5px; - left: 0; -} -.ui-resizable-s { - cursor: s-resize; - height: 7px; - width: 100%; - bottom: -5px; - left: 0; -} -.ui-resizable-e { - cursor: e-resize; - width: 7px; - right: -5px; - top: 0; - height: 100%; -} -.ui-resizable-w { - cursor: w-resize; - width: 7px; - left: -5px; - top: 0; - height: 100%; -} -.ui-resizable-se { - cursor: se-resize; - width: 12px; - height: 12px; - right: 1px; - bottom: 1px; -} -.ui-resizable-sw { - cursor: sw-resize; - width: 9px; - height: 9px; - left: -5px; - bottom: -5px; -} -.ui-resizable-nw { - cursor: nw-resize; - width: 9px; - height: 9px; - left: -5px; - top: -5px; -} -.ui-resizable-ne { - cursor: ne-resize; - width: 9px; - height: 9px; - right: -5px; - top: -5px; -} -.ui-selectable-helper { - position: absolute; - z-index: 100; - border: 1px dotted black; -} -.ui-accordion .ui-accordion-header { - display: block; - cursor: pointer; - position: relative; - margin-top: 2px; - padding: 5px; - min-height: 0; /* support: IE7 */ -} -.ui-accordion .ui-accordion-icons { - padding-left: 2.2em; -} -.ui-accordion .ui-accordion-noicons { - padding-left: .7em; -} -.ui-accordion .ui-accordion-icons .ui-accordion-icons { - padding-left: 2.2em; -} -.ui-accordion .ui-accordion-header .ui-accordion-header-icon { - position: absolute; - left: .5em; - top: 50%; - margin-top: -8px; -} -.ui-accordion .ui-accordion-content { - padding: 10px; - border-top: 0; - overflow: auto; -} -.ui-autocomplete { - position: absolute; - top: 0; - left: 0; - cursor: default; -} -.ui-button { - display: inline-block; - position: relative; - padding: 0; - line-height: normal; - margin-right: .1em; - cursor: pointer; - vertical-align: middle; - text-align: center; - overflow: visible; /* removes extra width in IE */ -} -.ui-button, -.ui-button:link, -.ui-button:visited, -.ui-button:hover, -.ui-button:active { - text-decoration: none; -} -/* to make room for the icon, a width needs to be set here */ -.ui-button-icon-only { - width: 2.2em; -} -/* button elements seem to need a little more width */ -button.ui-button-icon-only { - width: 2.4em; -} -.ui-button-icons-only { - width: 3.4em; -} -button.ui-button-icons-only { - width: 3.7em; -} - -/* button text element */ -.ui-button .ui-button-text { - display: block; - line-height: normal; -} -.ui-button-text-only .ui-button-text { - padding: .4em 1em; -} -.ui-button-icon-only .ui-button-text, -.ui-button-icons-only .ui-button-text { - padding: .4em; - text-indent: -9999999px; -} -.ui-button-text-icon-primary .ui-button-text, -.ui-button-text-icons .ui-button-text { - padding: .4em 1em .4em 2.1em; -} -.ui-button-text-icon-secondary .ui-button-text, -.ui-button-text-icons .ui-button-text { - padding: .4em 2.1em .4em 1em; -} -.ui-button-text-icons .ui-button-text { - padding-left: 2.1em; - padding-right: 2.1em; -} -/* no icon support for input elements, provide padding by default */ -input.ui-button { - padding: .4em 1em; -} - -/* button icon element(s) */ -.ui-button-icon-only .ui-icon, -.ui-button-text-icon-primary .ui-icon, -.ui-button-text-icon-secondary .ui-icon, -.ui-button-text-icons .ui-icon, -.ui-button-icons-only .ui-icon { - position: absolute; - top: 50%; - margin-top: -8px; -} -.ui-button-icon-only .ui-icon { - left: 50%; - margin-left: -8px; -} -.ui-button-text-icon-primary .ui-button-icon-primary, -.ui-button-text-icons .ui-button-icon-primary, -.ui-button-icons-only .ui-button-icon-primary { - left: .5em; -} -.ui-button-text-icon-secondary .ui-button-icon-secondary, -.ui-button-text-icons .ui-button-icon-secondary, -.ui-button-icons-only .ui-button-icon-secondary { - right: .5em; -} - -/* button sets */ -.ui-buttonset { - margin-right: 7px; -} -.ui-buttonset .ui-button { - margin-left: 0; - margin-right: -.3em; -} - -/* workarounds */ -/* reset extra padding in Firefox, see h5bp.com/l */ -input.ui-button::-moz-focus-inner, -button.ui-button::-moz-focus-inner { - border: 0; - padding: 0; -} -.ui-datepicker { - width: 17em; - padding: .2em .2em 0; - display: none; -} -.ui-datepicker .ui-datepicker-header { - position: relative; - padding: .2em 0; -} -.ui-datepicker .ui-datepicker-prev, -.ui-datepicker .ui-datepicker-next { - position: absolute; - top: 2px; - width: 1.8em; - height: 1.8em; -} -.ui-datepicker .ui-datepicker-prev-hover, -.ui-datepicker .ui-datepicker-next-hover { - top: 1px; -} -.ui-datepicker .ui-datepicker-prev { - left: 2px; -} -.ui-datepicker .ui-datepicker-next { - right: 2px; -} -.ui-datepicker .ui-datepicker-prev-hover { - left: 1px; -} -.ui-datepicker .ui-datepicker-next-hover { - right: 1px; -} -.ui-datepicker .ui-datepicker-prev span, -.ui-datepicker .ui-datepicker-next span { - display: block; - position: absolute; - left: 50%; - margin-left: -8px; - top: 50%; - margin-top: -8px; -} -.ui-datepicker .ui-datepicker-title { - margin: 0 2.3em; - line-height: 1.8em; - text-align: center; -} -.ui-datepicker .ui-datepicker-title select { - font-size: 16px; - margin: 1px 0; -} -.ui-datepicker select.ui-datepicker-month-year { - width: 100%; -} -.ui-datepicker select.ui-datepicker-month, -.ui-datepicker select.ui-datepicker-year { - width: 49%; -} -.ui-datepicker table { - width: 100%; - font-size: 13px; - border-collapse: collapse; - margin: 0 0 .4em; -} -.ui-datepicker th { - padding: 5px; - text-align: center; - font-weight: bold; - border: 0; -} -.ui-datepicker td { - border: 0; - padding: 1px; -} -.ui-datepicker td span, -.ui-datepicker td a { - display: block; - padding: .2em; - text-align: right; - text-decoration: none; -} -.ui-datepicker .ui-datepicker-buttonpane { - background-image: none; - margin: .7em 0 0 0; - padding: 0 .2em; - border-left: 0; - border-right: 0; - border-bottom: 0; -} -.ui-datepicker .ui-datepicker-buttonpane button { - float: right; - margin: .5em .2em .4em; - cursor: pointer; - padding: .2em .6em .3em .6em; - width: auto; - overflow: visible; -} -.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { - float: left; -} - -/* with multiple calendars */ -.ui-datepicker.ui-datepicker-multi { - width: auto; -} -.ui-datepicker-multi .ui-datepicker-group { - float: left; -} -.ui-datepicker-multi .ui-datepicker-group table { - width: 95%; - margin: 0 auto .4em; -} -.ui-datepicker-multi-2 .ui-datepicker-group { - width: 50%; -} -.ui-datepicker-multi-3 .ui-datepicker-group { - width: 33.3%; -} -.ui-datepicker-multi-4 .ui-datepicker-group { - width: 25%; -} -.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, -.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { - border-left-width: 0; -} -.ui-datepicker-multi .ui-datepicker-buttonpane { - clear: left; -} -.ui-datepicker-row-break { - clear: both; - width: 100%; - font-size: 0; -} - -/* RTL support */ -.ui-datepicker-rtl { - direction: rtl; -} -.ui-datepicker-rtl .ui-datepicker-prev { - right: 2px; - left: auto; -} -.ui-datepicker-rtl .ui-datepicker-next { - left: 2px; - right: auto; -} -.ui-datepicker-rtl .ui-datepicker-prev:hover { - right: 1px; - left: auto; -} -.ui-datepicker-rtl .ui-datepicker-next:hover { - left: 1px; - right: auto; -} -.ui-datepicker-rtl .ui-datepicker-buttonpane { - clear: right; -} -.ui-datepicker-rtl .ui-datepicker-buttonpane button { - float: left; -} -.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, -.ui-datepicker-rtl .ui-datepicker-group { - float: right; -} -.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, -.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { - border-right-width: 0; - border-left-width: 1px; -} -.ui-dialog { - position: absolute; - top: 0; - left: 0; - padding: .2em; - outline: 0; -} -.ui-dialog .ui-dialog-titlebar { - padding: .4em 1em; - position: relative; -} -.ui-dialog .ui-dialog-title { - float: left; - margin: .1em 0; - white-space: nowrap; - width: 90%; - overflow: hidden; - text-overflow: ellipsis; -} -.ui-dialog .ui-dialog-titlebar-close { - position: absolute; - right: .3em; - top: 50%; - width: 21px; - margin: -10px 0 0 0; - padding: 1px; - height: 20px; -} -.ui-dialog .ui-dialog-content { - position: relative; - border: 0; - padding: .5em 1em; - background: none; - overflow: auto; -} -.ui-dialog .ui-dialog-buttonpane { - text-align: left; - border-width: 1px 0 0 0; - background-image: none; - margin-top: .5em; - padding: .3em 1em .5em .4em; -} -.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { - float: right; -} -.ui-dialog .ui-dialog-buttonpane button { - margin: .5em .4em .5em 0; - cursor: pointer; -} -.ui-dialog .ui-resizable-se { - width: 12px; - height: 12px; - right: -5px; - bottom: -5px; - background-position: 16px 16px; -} -.ui-draggable .ui-dialog-titlebar { - cursor: move; -} -.ui-menu { - list-style: none; - padding: 2px; - margin: 0; - display: block; - outline: none; -} -.ui-menu .ui-menu { - margin-top: -3px; - position: absolute; -} -.ui-menu .ui-menu-item { - margin: 0; - padding: 0; - width: 100%; - /* support: IE10, see #8844 */ - list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7); -} -.ui-menu .ui-menu-divider { - margin: 5px -2px 5px -2px; - height: 0; - font-size: 0; - line-height: 0; - border-width: 1px 0 0 0; -} -.ui-menu .ui-menu-item a { - text-decoration: none; - display: block; - padding: 2px .4em; - line-height: 1.5; - min-height: 0; /* support: IE7 */ - font-weight: normal; -} -.ui-menu .ui-menu-item a.ui-state-focus, -.ui-menu .ui-menu-item a.ui-state-active { - font-weight: normal; - margin: -1px; -} - -.ui-menu .ui-state-disabled { - font-weight: normal; - margin: .4em 0 .2em; - line-height: 1.5; -} -.ui-menu .ui-state-disabled a { - cursor: default; -} - -/* icon support */ -.ui-menu-icons { - position: relative; -} -.ui-menu-icons .ui-menu-item a { - position: relative; - padding-left: 2em; -} - -/* left-aligned */ -.ui-menu .ui-icon { - position: absolute; - top: .2em; - left: .2em; -} - -/* right-aligned */ -.ui-menu .ui-menu-icon { - position: static; - float: right; -} -.ui-progressbar { - height: 2em; - text-align: left; - overflow: hidden; -} -.ui-progressbar .ui-progressbar-value { - margin: -1px; - height: 100%; -} -.ui-progressbar .ui-progressbar-overlay { - background: url("images/animated-overlay.gif"); - height: 100%; - filter: alpha(opacity=25); - opacity: 0.25; -} -.ui-progressbar-indeterminate .ui-progressbar-value { - background-image: none; -} -.ui-slider { - position: relative; - text-align: left; -} -.ui-slider .ui-slider-handle { - position: absolute; - z-index: 2; - width: 1.2em; - height: 1.2em; - cursor: default; -} -.ui-slider .ui-slider-range { - position: absolute; - z-index: 1; - font-size: .7em; - display: block; - border: 0; - background-position: 0 0; -} - -/* For IE8 - See #6727 */ -.ui-slider.ui-state-disabled .ui-slider-handle, -.ui-slider.ui-state-disabled .ui-slider-range { - filter: inherit; -} - -.ui-slider-horizontal { - height: .8em; -} -.ui-slider-horizontal .ui-slider-handle { - top: -.3em; - margin-left: -.6em; -} -.ui-slider-horizontal .ui-slider-range { - top: 0; - height: 100%; -} -.ui-slider-horizontal .ui-slider-range-min { - left: 0; -} -.ui-slider-horizontal .ui-slider-range-max { - right: 0; -} - -.ui-slider-vertical { - width: .8em; - height: 100px; -} -.ui-slider-vertical .ui-slider-handle { - left: -.3em; - margin-left: 0; - margin-bottom: -.6em; -} -.ui-slider-vertical .ui-slider-range { - left: 0; - width: 100%; -} -.ui-slider-vertical .ui-slider-range-min { - bottom: 0; -} -.ui-slider-vertical .ui-slider-range-max { - top: 0; -} -.ui-spinner { - position: relative; - display: inline-block; - overflow: hidden; - padding: 0; - vertical-align: middle; -} -.ui-spinner-input { - border: none; - background: none; - color: inherit; - padding: 0; - margin: .2em 0; - vertical-align: middle; - margin-left: .4em; - margin-right: 22px; -} -.ui-spinner-button { - width: 16px; - height: 50%; - font-size: .5em; - padding: 0; - margin: 0; - text-align: center; - position: absolute; - cursor: default; - display: block; - overflow: hidden; - right: 0; -} -/* more specificity required here to overide default borders */ -.ui-spinner a.ui-spinner-button { - border-top: none; - border-bottom: none; - border-right: none; -} -/* vertical centre icon */ -.ui-spinner .ui-icon { - position: absolute; - margin-top: -8px; - top: 50%; - left: 0; -} -.ui-spinner-up { - top: 0; -} -.ui-spinner-down { - bottom: 0; -} - -/* TR overrides */ -.ui-spinner .ui-icon-triangle-1-s { - /* need to fix icons sprite */ - background-position: -65px -16px; -} -.ui-tabs { - position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ - padding: .2em; -} -.ui-tabs .ui-tabs-nav { - margin: 0; - padding: .2em .2em 0; -} -.ui-tabs .ui-tabs-nav li { - list-style: none; - float: left; - position: relative; - top: 0; - margin: 1px .2em 0 0; - border-bottom-width: 0; - padding: 0; - white-space: nowrap; -} -.ui-tabs .ui-tabs-nav li a { - float: left; - padding: .5em 1em; - text-decoration: none; -} -.ui-tabs .ui-tabs-nav li.ui-tabs-active { - margin-bottom: -1px; - padding-bottom: 1px; -} -.ui-tabs .ui-tabs-nav li.ui-tabs-active a, -.ui-tabs .ui-tabs-nav li.ui-state-disabled a, -.ui-tabs .ui-tabs-nav li.ui-tabs-loading a { - cursor: text; -} -.ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ -.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { - cursor: pointer; -} -.ui-tabs .ui-tabs-panel { - display: block; - border-width: 0; - padding: 1em 1.4em; - background: none; -} -.ui-tooltip { - padding: 8px; - position: absolute; - z-index: 9999; - max-width: 300px; - -webkit-box-shadow: 0 0 5px #aaa; - box-shadow: 0 0 5px #aaa; -} -body .ui-tooltip { - border-width: 2px; -} - -/* Component containers -----------------------------------*/ -.ui-widget { - font-family: 'Source Sans Pro', sans-serif; - font-size: 14px; -} -.ui-widget .ui-widget { - font-size: 14px; -} -.ui-widget input, -.ui-widget select, -.ui-widget textarea, -.ui-widget button { - font-family: 'Source Sans Pro', sans-serif; - font-size: 14px; -} -.ui-widget-content { - border: 1px solid #ddd; - background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; - color: #222222; - font-size: 14px!important; -} -.ui-widget-content a { - color: #222222; -} -.ui-widget-header { - border: 1px solid #ddd; - background: #e6e7e8 url(images/ui-bg_flat_100_e6e7e8_40x100.png) 50% 50% repeat-x; - color: #222222; - font-weight: bold; -} -.ui-widget-header a { - color: #222222; -} - -/* Interaction states -----------------------------------*/ -.ui-state-default, -.ui-widget-content .ui-state-default, -.ui-widget-header .ui-state-default { - border: 1px solid #ddd; - background: #e6e6e6 url(images/ui-bg_flat_75_e6e6e6_40x100.png) 50% 50% repeat-x; - font-weight: normal; - color: #555555; -} -.ui-state-default a, -.ui-state-default a:link, -.ui-state-default a:visited { - color: #555555; - text-decoration: none; -} -.ui-state-hover, -.ui-widget-content .ui-state-hover, -.ui-widget-header .ui-state-hover, -.ui-state-focus, -.ui-widget-content .ui-state-focus, -.ui-widget-header .ui-state-focus { - border: 1px solid #999999; - background: #dadada url(images/ui-bg_flat_75_dadada_40x100.png) 50% 50% repeat-x; - font-weight: normal; - color: #212121; -} -.ui-state-hover a, -.ui-state-hover a:hover, -.ui-state-hover a:link, -.ui-state-hover a:visited { - color: #212121; - text-decoration: none; -} -.ui-state-active, -.ui-widget-content .ui-state-active, -.ui-widget-header .ui-state-active { - border: 1px solid #aaaaaa; - background: #ffffff url(images/ui-bg_flat_65_ffffff_40x100.png) 50% 50% repeat-x; - font-weight: normal; - color: #212121; -} -.ui-state-active a, -.ui-state-active a:link, -.ui-state-active a:visited { - color: #212121; - text-decoration: none; -} - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, -.ui-widget-content .ui-state-highlight, -.ui-widget-header .ui-state-highlight { - border: 1px solid #f39c12; - background: #f39c12 url(images/ui-bg_flat_55_f39c12_40x100.png) 50% 50% repeat-x; - color: #f9f9f9; -} -.ui-state-highlight a, -.ui-widget-content .ui-state-highlight a, -.ui-widget-header .ui-state-highlight a { - color: #f9f9f9; -} -.ui-state-error, -.ui-widget-content .ui-state-error, -.ui-widget-header .ui-state-error { - border: 1px solid #f56954; - background: #f56954 url(images/ui-bg_flat_100_f56954_40x100.png) 50% 50% repeat-x; - color: #f9f9f9; -} -.ui-state-error a, -.ui-widget-content .ui-state-error a, -.ui-widget-header .ui-state-error a { - color: #f9f9f9; -} -.ui-state-error-text, -.ui-widget-content .ui-state-error-text, -.ui-widget-header .ui-state-error-text { - color: #f9f9f9; -} -.ui-priority-primary, -.ui-widget-content .ui-priority-primary, -.ui-widget-header .ui-priority-primary { - font-weight: bold; -} -.ui-priority-secondary, -.ui-widget-content .ui-priority-secondary, -.ui-widget-header .ui-priority-secondary { - opacity: .7; - filter:Alpha(Opacity=70); - font-weight: normal; -} -.ui-state-disabled, -.ui-widget-content .ui-state-disabled, -.ui-widget-header .ui-state-disabled { - opacity: .35; - filter:Alpha(Opacity=35); - background-image: none; -} -.ui-state-disabled .ui-icon { - filter:Alpha(Opacity=35); /* For IE8 - See #6059 */ -} - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { - width: 16px; - height: 16px; -} -.ui-icon, -.ui-widget-content .ui-icon { - background-image: url(images/ui-icons_222222_256x240.png); -} -.ui-widget-header .ui-icon { - background-image: url(images/ui-icons_222222_256x240.png); -} -.ui-state-default .ui-icon { - background-image: url(images/ui-icons_888888_256x240.png); -} -.ui-state-hover .ui-icon, -.ui-state-focus .ui-icon { - background-image: url(images/ui-icons_454545_256x240.png); -} -.ui-state-active .ui-icon { - background-image: url(images/ui-icons_454545_256x240.png); -} -.ui-state-highlight .ui-icon { - background-image: url(images/ui-icons_ffffff_256x240.png); -} -.ui-state-error .ui-icon, -.ui-state-error-text .ui-icon { - background-image: url(images/ui-icons_ffffff_256x240.png); -} - -/* positioning */ -.ui-icon-blank { background-position: 16px 16px; } -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-on { background-position: -96px -144px; } -.ui-icon-radio-off { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-all, -.ui-corner-top, -.ui-corner-left, -.ui-corner-tl { - border-top-left-radius: 4px; -} -.ui-corner-all, -.ui-corner-top, -.ui-corner-right, -.ui-corner-tr { - border-top-right-radius: 4px; -} -.ui-corner-all, -.ui-corner-bottom, -.ui-corner-left, -.ui-corner-bl { - border-bottom-left-radius: 4px; -} -.ui-corner-all, -.ui-corner-bottom, -.ui-corner-right, -.ui-corner-br { - border-bottom-right-radius: 4px; -} - -/* Overlays */ -.ui-widget-overlay { - background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; - opacity: .3; - filter: Alpha(Opacity=30); -} -.ui-widget-shadow { - margin: -8px 0 0 -8px; - padding: 8px; - background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; - opacity: .3; - filter: Alpha(Opacity=30); - border-radius: 8px; -} diff --git a/web/assetic/admin_lte_flot_part_1_jquery.flot.threshold_31 b/web/assetic/admin_lte_flot_part_1_jquery.flot.threshold_31 deleted file mode 100644 index 2f6e63594b..0000000000 --- a/web/assetic/admin_lte_flot_part_1_jquery.flot.threshold_31 +++ /dev/null @@ -1,142 +0,0 @@ -/* Flot plugin for thresholding data. - -Copyright (c) 2007-2013 IOLA and Ole Laursen. -Licensed under the MIT license. - -The plugin supports these options: - - series: { - threshold: { - below: number - color: colorspec - } - } - -It can also be applied to a single series, like this: - - $.plot( $("#placeholder"), [{ - data: [ ... ], - threshold: { ... } - }]) - -An array can be passed for multiple thresholding, like this: - - threshold: [{ - below: number1 - color: color1 - },{ - below: number2 - color: color2 - }] - -These multiple threshold objects can be passed in any order since they are -sorted by the processing function. - -The data points below "below" are drawn with the specified color. This makes -it easy to mark points below 0, e.g. for budget data. - -Internally, the plugin works by splitting the data into two series, above and -below the threshold. The extra series below the threshold will have its label -cleared and the special "originSeries" attribute set to the original series. -You may need to check for this in hover events. - -*/ - -(function ($) { - var options = { - series: { threshold: null } // or { below: number, color: color spec} - }; - - function init(plot) { - function thresholdData(plot, s, datapoints, below, color) { - var ps = datapoints.pointsize, i, x, y, p, prevp, - thresholded = $.extend({}, s); // note: shallow copy - - thresholded.datapoints = { points: [], pointsize: ps, format: datapoints.format }; - thresholded.label = null; - thresholded.color = color; - thresholded.threshold = null; - thresholded.originSeries = s; - thresholded.data = []; - - var origpoints = datapoints.points, - addCrossingPoints = s.lines.show; - - var threspoints = []; - var newpoints = []; - var m; - - for (i = 0; i < origpoints.length; i += ps) { - x = origpoints[i]; - y = origpoints[i + 1]; - - prevp = p; - if (y < below) - p = threspoints; - else - p = newpoints; - - if (addCrossingPoints && prevp != p && x != null - && i > 0 && origpoints[i - ps] != null) { - var interx = x + (below - y) * (x - origpoints[i - ps]) / (y - origpoints[i - ps + 1]); - prevp.push(interx); - prevp.push(below); - for (m = 2; m < ps; ++m) - prevp.push(origpoints[i + m]); - - p.push(null); // start new segment - p.push(null); - for (m = 2; m < ps; ++m) - p.push(origpoints[i + m]); - p.push(interx); - p.push(below); - for (m = 2; m < ps; ++m) - p.push(origpoints[i + m]); - } - - p.push(x); - p.push(y); - for (m = 2; m < ps; ++m) - p.push(origpoints[i + m]); - } - - datapoints.points = newpoints; - thresholded.datapoints.points = threspoints; - - if (thresholded.datapoints.points.length > 0) { - var origIndex = $.inArray(s, plot.getData()); - // Insert newly-generated series right after original one (to prevent it from becoming top-most) - plot.getData().splice(origIndex + 1, 0, thresholded); - } - - // FIXME: there are probably some edge cases left in bars - } - - function processThresholds(plot, s, datapoints) { - if (!s.threshold) - return; - - if (s.threshold instanceof Array) { - s.threshold.sort(function(a, b) { - return a.below - b.below; - }); - - $(s.threshold).each(function(i, th) { - thresholdData(plot, s, datapoints, th.below, th.color); - }); - } - else { - thresholdData(plot, s, datapoints, s.threshold.below, s.threshold.color); - } - } - - plot.hooks.processDatapoints.push(processThresholds); - } - - $.plot.plugins.push({ - init: init, - options: options, - name: 'threshold', - version: '1.2' - }); -})(jQuery); diff --git a/web/assetic/admin_lte_flot_part_1_jquery.flot_17 b/web/assetic/admin_lte_flot_part_1_jquery.flot_17 deleted file mode 100644 index 965e78efe7..0000000000 --- a/web/assetic/admin_lte_flot_part_1_jquery.flot_17 +++ /dev/null @@ -1,3137 +0,0 @@ -/* Javascript plotting library for jQuery, version 0.8.2. - -Copyright (c) 2007-2013 IOLA and Ole Laursen. -Licensed under the MIT license. - -*/ - -// first an inline dependency, jquery.colorhelpers.js, we inline it here -// for convenience - -/* Plugin for jQuery for working with colors. - * - * Version 1.1. - * - * Inspiration from jQuery color animation plugin by John Resig. - * - * Released under the MIT license by Ole Laursen, October 2009. - * - * Examples: - * - * $.color.parse("#fff").scale('rgb', 0.25).add('a', -0.5).toString() - * var c = $.color.extract($("#mydiv"), 'background-color'); - * console.log(c.r, c.g, c.b, c.a); - * $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)" - * - * Note that .scale() and .add() return the same modified object - * instead of making a new one. - * - * V. 1.1: Fix error handling so e.g. parsing an empty string does - * produce a color rather than just crashing. - */ -(function($){$.color={};$.color.make=function(r,g,b,a){var o={};o.r=r||0;o.g=g||0;o.b=b||0;o.a=a!=null?a:1;o.add=function(c,d){for(var i=0;i=1){return"rgb("+[o.r,o.g,o.b].join(",")+")"}else{return"rgba("+[o.r,o.g,o.b,o.a].join(",")+")"}};o.normalize=function(){function clamp(min,value,max){return valuemax?max:value}o.r=clamp(0,parseInt(o.r),255);o.g=clamp(0,parseInt(o.g),255);o.b=clamp(0,parseInt(o.b),255);o.a=clamp(0,o.a,1);return o};o.clone=function(){return $.color.make(o.r,o.b,o.g,o.a)};return o.normalize()};$.color.extract=function(elem,css){var c;do{c=elem.css(css).toLowerCase();if(c!=""&&c!="transparent")break;elem=elem.parent()}while(elem.length&&!$.nodeName(elem.get(0),"body"));if(c=="rgba(0, 0, 0, 0)")c="transparent";return $.color.parse(c)};$.color.parse=function(str){var res,m=$.color.make;if(res=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10));if(res=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseInt(res[1],10),parseInt(res[2],10),parseInt(res[3],10),parseFloat(res[4]));if(res=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55);if(res=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(str))return m(parseFloat(res[1])*2.55,parseFloat(res[2])*2.55,parseFloat(res[3])*2.55,parseFloat(res[4]));if(res=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(str))return m(parseInt(res[1],16),parseInt(res[2],16),parseInt(res[3],16));if(res=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(str))return m(parseInt(res[1]+res[1],16),parseInt(res[2]+res[2],16),parseInt(res[3]+res[3],16));var name=$.trim(str).toLowerCase();if(name=="transparent")return m(255,255,255,0);else{res=lookupColors[name]||[0,0,0];return m(res[0],res[1],res[2])}};var lookupColors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery); - -// the actual Flot code -(function($) { - - // Cache the prototype hasOwnProperty for faster access - - var hasOwnProperty = Object.prototype.hasOwnProperty; - - /////////////////////////////////////////////////////////////////////////// - // The Canvas object is a wrapper around an HTML5 tag. - // - // @constructor - // @param {string} cls List of classes to apply to the canvas. - // @param {element} container Element onto which to append the canvas. - // - // Requiring a container is a little iffy, but unfortunately canvas - // operations don't work unless the canvas is attached to the DOM. - - function Canvas(cls, container) { - - var element = container.children("." + cls)[0]; - - if (element == null) { - - element = document.createElement("canvas"); - element.className = cls; - - $(element).css({ direction: "ltr", position: "absolute", left: 0, top: 0 }) - .appendTo(container); - - // If HTML5 Canvas isn't available, fall back to [Ex|Flash]canvas - - if (!element.getContext) { - if (window.G_vmlCanvasManager) { - element = window.G_vmlCanvasManager.initElement(element); - } else { - throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode."); - } - } - } - - this.element = element; - - var context = this.context = element.getContext("2d"); - - // Determine the screen's ratio of physical to device-independent - // pixels. This is the ratio between the canvas width that the browser - // advertises and the number of pixels actually present in that space. - - // The iPhone 4, for example, has a device-independent width of 320px, - // but its screen is actually 640px wide. It therefore has a pixel - // ratio of 2, while most normal devices have a ratio of 1. - - var devicePixelRatio = window.devicePixelRatio || 1, - backingStoreRatio = - context.webkitBackingStorePixelRatio || - context.mozBackingStorePixelRatio || - context.msBackingStorePixelRatio || - context.oBackingStorePixelRatio || - context.backingStorePixelRatio || 1; - - this.pixelRatio = devicePixelRatio / backingStoreRatio; - - // Size the canvas to match the internal dimensions of its container - - this.resize(container.width(), container.height()); - - // Collection of HTML div layers for text overlaid onto the canvas - - this.textContainer = null; - this.text = {}; - - // Cache of text fragments and metrics, so we can avoid expensively - // re-calculating them when the plot is re-rendered in a loop. - - this._textCache = {}; - } - - // Resizes the canvas to the given dimensions. - // - // @param {number} width New width of the canvas, in pixels. - // @param {number} width New height of the canvas, in pixels. - - Canvas.prototype.resize = function(width, height) { - - if (width <= 0 || height <= 0) { - throw new Error("Invalid dimensions for plot, width = " + width + ", height = " + height); - } - - var element = this.element, - context = this.context, - pixelRatio = this.pixelRatio; - - // Resize the canvas, increasing its density based on the display's - // pixel ratio; basically giving it more pixels without increasing the - // size of its element, to take advantage of the fact that retina - // displays have that many more pixels in the same advertised space. - - // Resizing should reset the state (excanvas seems to be buggy though) - - if (this.width != width) { - element.width = width * pixelRatio; - element.style.width = width + "px"; - this.width = width; - } - - if (this.height != height) { - element.height = height * pixelRatio; - element.style.height = height + "px"; - this.height = height; - } - - // Save the context, so we can reset in case we get replotted. The - // restore ensure that we're really back at the initial state, and - // should be safe even if we haven't saved the initial state yet. - - context.restore(); - context.save(); - - // Scale the coordinate space to match the display density; so even though we - // may have twice as many pixels, we still want lines and other drawing to - // appear at the same size; the extra pixels will just make them crisper. - - context.scale(pixelRatio, pixelRatio); - }; - - // Clears the entire canvas area, not including any overlaid HTML text - - Canvas.prototype.clear = function() { - this.context.clearRect(0, 0, this.width, this.height); - }; - - // Finishes rendering the canvas, including managing the text overlay. - - Canvas.prototype.render = function() { - - var cache = this._textCache; - - // For each text layer, add elements marked as active that haven't - // already been rendered, and remove those that are no longer active. - - for (var layerKey in cache) { - if (hasOwnProperty.call(cache, layerKey)) { - - var layer = this.getTextLayer(layerKey), - layerCache = cache[layerKey]; - - layer.hide(); - - for (var styleKey in layerCache) { - if (hasOwnProperty.call(layerCache, styleKey)) { - var styleCache = layerCache[styleKey]; - for (var key in styleCache) { - if (hasOwnProperty.call(styleCache, key)) { - - var positions = styleCache[key].positions; - - for (var i = 0, position; position = positions[i]; i++) { - if (position.active) { - if (!position.rendered) { - layer.append(position.element); - position.rendered = true; - } - } else { - positions.splice(i--, 1); - if (position.rendered) { - position.element.detach(); - } - } - } - - if (positions.length == 0) { - delete styleCache[key]; - } - } - } - } - } - - layer.show(); - } - } - }; - - // Creates (if necessary) and returns the text overlay container. - // - // @param {string} classes String of space-separated CSS classes used to - // uniquely identify the text layer. - // @return {object} The jQuery-wrapped text-layer div. - - Canvas.prototype.getTextLayer = function(classes) { - - var layer = this.text[classes]; - - // Create the text layer if it doesn't exist - - if (layer == null) { - - // Create the text layer container, if it doesn't exist - - if (this.textContainer == null) { - this.textContainer = $("
") - .css({ - position: "absolute", - top: 0, - left: 0, - bottom: 0, - right: 0, - 'font-size': "smaller", - color: "#545454" - }) - .insertAfter(this.element); - } - - layer = this.text[classes] = $("
") - .addClass(classes) - .css({ - position: "absolute", - top: 0, - left: 0, - bottom: 0, - right: 0 - }) - .appendTo(this.textContainer); - } - - return layer; - }; - - // Creates (if necessary) and returns a text info object. - // - // The object looks like this: - // - // { - // width: Width of the text's wrapper div. - // height: Height of the text's wrapper div. - // element: The jQuery-wrapped HTML div containing the text. - // positions: Array of positions at which this text is drawn. - // } - // - // The positions array contains objects that look like this: - // - // { - // active: Flag indicating whether the text should be visible. - // rendered: Flag indicating whether the text is currently visible. - // element: The jQuery-wrapped HTML div containing the text. - // x: X coordinate at which to draw the text. - // y: Y coordinate at which to draw the text. - // } - // - // Each position after the first receives a clone of the original element. - // - // The idea is that that the width, height, and general 'identity' of the - // text is constant no matter where it is placed; the placements are a - // secondary property. - // - // Canvas maintains a cache of recently-used text info objects; getTextInfo - // either returns the cached element or creates a new entry. - // - // @param {string} layer A string of space-separated CSS classes uniquely - // identifying the layer containing this text. - // @param {string} text Text string to retrieve info for. - // @param {(string|object)=} font Either a string of space-separated CSS - // classes or a font-spec object, defining the text's font and style. - // @param {number=} angle Angle at which to rotate the text, in degrees. - // Angle is currently unused, it will be implemented in the future. - // @param {number=} width Maximum width of the text before it wraps. - // @return {object} a text info object. - - Canvas.prototype.getTextInfo = function(layer, text, font, angle, width) { - - var textStyle, layerCache, styleCache, info; - - // Cast the value to a string, in case we were given a number or such - - text = "" + text; - - // If the font is a font-spec object, generate a CSS font definition - - if (typeof font === "object") { - textStyle = font.style + " " + font.variant + " " + font.weight + " " + font.size + "px/" + font.lineHeight + "px " + font.family; - } else { - textStyle = font; - } - - // Retrieve (or create) the cache for the text's layer and styles - - layerCache = this._textCache[layer]; - - if (layerCache == null) { - layerCache = this._textCache[layer] = {}; - } - - styleCache = layerCache[textStyle]; - - if (styleCache == null) { - styleCache = layerCache[textStyle] = {}; - } - - info = styleCache[text]; - - // If we can't find a matching element in our cache, create a new one - - if (info == null) { - - var element = $("
").html(text) - .css({ - position: "absolute", - 'max-width': width, - top: -9999 - }) - .appendTo(this.getTextLayer(layer)); - - if (typeof font === "object") { - element.css({ - font: textStyle, - color: font.color - }); - } else if (typeof font === "string") { - element.addClass(font); - } - - info = styleCache[text] = { - width: element.outerWidth(true), - height: element.outerHeight(true), - element: element, - positions: [] - }; - - element.detach(); - } - - return info; - }; - - // Adds a text string to the canvas text overlay. - // - // The text isn't drawn immediately; it is marked as rendering, which will - // result in its addition to the canvas on the next render pass. - // - // @param {string} layer A string of space-separated CSS classes uniquely - // identifying the layer containing this text. - // @param {number} x X coordinate at which to draw the text. - // @param {number} y Y coordinate at which to draw the text. - // @param {string} text Text string to draw. - // @param {(string|object)=} font Either a string of space-separated CSS - // classes or a font-spec object, defining the text's font and style. - // @param {number=} angle Angle at which to rotate the text, in degrees. - // Angle is currently unused, it will be implemented in the future. - // @param {number=} width Maximum width of the text before it wraps. - // @param {string=} halign Horizontal alignment of the text; either "left", - // "center" or "right". - // @param {string=} valign Vertical alignment of the text; either "top", - // "middle" or "bottom". - - Canvas.prototype.addText = function(layer, x, y, text, font, angle, width, halign, valign) { - - var info = this.getTextInfo(layer, text, font, angle, width), - positions = info.positions; - - // Tweak the div's position to match the text's alignment - - if (halign == "center") { - x -= info.width / 2; - } else if (halign == "right") { - x -= info.width; - } - - if (valign == "middle") { - y -= info.height / 2; - } else if (valign == "bottom") { - y -= info.height; - } - - // Determine whether this text already exists at this position. - // If so, mark it for inclusion in the next render pass. - - for (var i = 0, position; position = positions[i]; i++) { - if (position.x == x && position.y == y) { - position.active = true; - return; - } - } - - // If the text doesn't exist at this position, create a new entry - - // For the very first position we'll re-use the original element, - // while for subsequent ones we'll clone it. - - position = { - active: true, - rendered: false, - element: positions.length ? info.element.clone() : info.element, - x: x, - y: y - }; - - positions.push(position); - - // Move the element to its final position within the container - - position.element.css({ - top: Math.round(y), - left: Math.round(x), - 'text-align': halign // In case the text wraps - }); - }; - - // Removes one or more text strings from the canvas text overlay. - // - // If no parameters are given, all text within the layer is removed. - // - // Note that the text is not immediately removed; it is simply marked as - // inactive, which will result in its removal on the next render pass. - // This avoids the performance penalty for 'clear and redraw' behavior, - // where we potentially get rid of all text on a layer, but will likely - // add back most or all of it later, as when redrawing axes, for example. - // - // @param {string} layer A string of space-separated CSS classes uniquely - // identifying the layer containing this text. - // @param {number=} x X coordinate of the text. - // @param {number=} y Y coordinate of the text. - // @param {string=} text Text string to remove. - // @param {(string|object)=} font Either a string of space-separated CSS - // classes or a font-spec object, defining the text's font and style. - // @param {number=} angle Angle at which the text is rotated, in degrees. - // Angle is currently unused, it will be implemented in the future. - - Canvas.prototype.removeText = function(layer, x, y, text, font, angle) { - if (text == null) { - var layerCache = this._textCache[layer]; - if (layerCache != null) { - for (var styleKey in layerCache) { - if (hasOwnProperty.call(layerCache, styleKey)) { - var styleCache = layerCache[styleKey]; - for (var key in styleCache) { - if (hasOwnProperty.call(styleCache, key)) { - var positions = styleCache[key].positions; - for (var i = 0, position; position = positions[i]; i++) { - position.active = false; - } - } - } - } - } - } - } else { - var positions = this.getTextInfo(layer, text, font, angle).positions; - for (var i = 0, position; position = positions[i]; i++) { - if (position.x == x && position.y == y) { - position.active = false; - } - } - } - }; - - /////////////////////////////////////////////////////////////////////////// - // The top-level container for the entire plot. - - function Plot(placeholder, data_, options_, plugins) { - // data is on the form: - // [ series1, series2 ... ] - // where series is either just the data as [ [x1, y1], [x2, y2], ... ] - // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... } - - var series = [], - options = { - // the color theme used for graphs - colors: ["#edc240", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"], - legend: { - show: true, - noColumns: 1, // number of colums in legend table - labelFormatter: null, // fn: string -> string - labelBoxBorderColor: "#ccc", // border color for the little label boxes - container: null, // container (as jQuery object) to put legend in, null means default on top of graph - position: "ne", // position of default legend container within plot - margin: 5, // distance from grid edge to default legend container within plot - backgroundColor: null, // null means auto-detect - backgroundOpacity: 0.85, // set to 0 to avoid background - sorted: null // default to no legend sorting - }, - xaxis: { - show: null, // null = auto-detect, true = always, false = never - position: "bottom", // or "top" - mode: null, // null or "time" - font: null, // null (derived from CSS in placeholder) or object like { size: 11, lineHeight: 13, style: "italic", weight: "bold", family: "sans-serif", variant: "small-caps" } - color: null, // base color, labels, ticks - tickColor: null, // possibly different color of ticks, e.g. "rgba(0,0,0,0.15)" - transform: null, // null or f: number -> number to transform axis - inverseTransform: null, // if transform is set, this should be the inverse function - min: null, // min. value to show, null means set automatically - max: null, // max. value to show, null means set automatically - autoscaleMargin: null, // margin in % to add if auto-setting min/max - ticks: null, // either [1, 3] or [[1, "a"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks - tickFormatter: null, // fn: number -> string - labelWidth: null, // size of tick labels in pixels - labelHeight: null, - reserveSpace: null, // whether to reserve space even if axis isn't shown - tickLength: null, // size in pixels of ticks, or "full" for whole line - alignTicksWithAxis: null, // axis number or null for no sync - tickDecimals: null, // no. of decimals, null means auto - tickSize: null, // number or [number, "unit"] - minTickSize: null // number or [number, "unit"] - }, - yaxis: { - autoscaleMargin: 0.02, - position: "left" // or "right" - }, - xaxes: [], - yaxes: [], - series: { - points: { - show: false, - radius: 3, - lineWidth: 2, // in pixels - fill: true, - fillColor: "#ffffff", - symbol: "circle" // or callback - }, - lines: { - // we don't put in show: false so we can see - // whether lines were actively disabled - lineWidth: 2, // in pixels - fill: false, - fillColor: null, - steps: false - // Omit 'zero', so we can later default its value to - // match that of the 'fill' option. - }, - bars: { - show: false, - lineWidth: 2, // in pixels - barWidth: 1, // in units of the x axis - fill: true, - fillColor: null, - align: "left", // "left", "right", or "center" - horizontal: false, - zero: true - }, - shadowSize: 3, - highlightColor: null - }, - grid: { - show: true, - aboveData: false, - color: "#545454", // primary color used for outline and labels - backgroundColor: null, // null for transparent, else color - borderColor: null, // set if different from the grid color - tickColor: null, // color for the ticks, e.g. "rgba(0,0,0,0.15)" - margin: 0, // distance from the canvas edge to the grid - labelMargin: 5, // in pixels - axisMargin: 8, // in pixels - borderWidth: 2, // in pixels - minBorderMargin: null, // in pixels, null means taken from points radius - markings: null, // array of ranges or fn: axes -> array of ranges - markingsColor: "#f4f4f4", - markingsLineWidth: 2, - // interactive stuff - clickable: false, - hoverable: false, - autoHighlight: true, // highlight in case mouse is near - mouseActiveRadius: 10 // how far the mouse can be away to activate an item - }, - interaction: { - redrawOverlayInterval: 1000/60 // time between updates, -1 means in same flow - }, - hooks: {} - }, - surface = null, // the canvas for the plot itself - overlay = null, // canvas for interactive stuff on top of plot - eventHolder = null, // jQuery object that events should be bound to - ctx = null, octx = null, - xaxes = [], yaxes = [], - plotOffset = { left: 0, right: 0, top: 0, bottom: 0}, - plotWidth = 0, plotHeight = 0, - hooks = { - processOptions: [], - processRawData: [], - processDatapoints: [], - processOffset: [], - drawBackground: [], - drawSeries: [], - draw: [], - bindEvents: [], - drawOverlay: [], - shutdown: [] - }, - plot = this; - - // public functions - plot.setData = setData; - plot.setupGrid = setupGrid; - plot.draw = draw; - plot.getPlaceholder = function() { return placeholder; }; - plot.getCanvas = function() { return surface.element; }; - plot.getPlotOffset = function() { return plotOffset; }; - plot.width = function () { return plotWidth; }; - plot.height = function () { return plotHeight; }; - plot.offset = function () { - var o = eventHolder.offset(); - o.left += plotOffset.left; - o.top += plotOffset.top; - return o; - }; - plot.getData = function () { return series; }; - plot.getAxes = function () { - var res = {}, i; - $.each(xaxes.concat(yaxes), function (_, axis) { - if (axis) - res[axis.direction + (axis.n != 1 ? axis.n : "") + "axis"] = axis; - }); - return res; - }; - plot.getXAxes = function () { return xaxes; }; - plot.getYAxes = function () { return yaxes; }; - plot.c2p = canvasToAxisCoords; - plot.p2c = axisToCanvasCoords; - plot.getOptions = function () { return options; }; - plot.highlight = highlight; - plot.unhighlight = unhighlight; - plot.triggerRedrawOverlay = triggerRedrawOverlay; - plot.pointOffset = function(point) { - return { - left: parseInt(xaxes[axisNumber(point, "x") - 1].p2c(+point.x) + plotOffset.left, 10), - top: parseInt(yaxes[axisNumber(point, "y") - 1].p2c(+point.y) + plotOffset.top, 10) - }; - }; - plot.shutdown = shutdown; - plot.destroy = function () { - shutdown(); - placeholder.removeData("plot").empty(); - - series = []; - options = null; - surface = null; - overlay = null; - eventHolder = null; - ctx = null; - octx = null; - xaxes = []; - yaxes = []; - hooks = null; - highlights = []; - plot = null; - }; - plot.resize = function () { - var width = placeholder.width(), - height = placeholder.height(); - surface.resize(width, height); - overlay.resize(width, height); - }; - - // public attributes - plot.hooks = hooks; - - // initialize - initPlugins(plot); - parseOptions(options_); - setupCanvases(); - setData(data_); - setupGrid(); - draw(); - bindEvents(); - - - function executeHooks(hook, args) { - args = [plot].concat(args); - for (var i = 0; i < hook.length; ++i) - hook[i].apply(this, args); - } - - function initPlugins() { - - // References to key classes, allowing plugins to modify them - - var classes = { - Canvas: Canvas - }; - - for (var i = 0; i < plugins.length; ++i) { - var p = plugins[i]; - p.init(plot, classes); - if (p.options) - $.extend(true, options, p.options); - } - } - - function parseOptions(opts) { - - $.extend(true, options, opts); - - // $.extend merges arrays, rather than replacing them. When less - // colors are provided than the size of the default palette, we - // end up with those colors plus the remaining defaults, which is - // not expected behavior; avoid it by replacing them here. - - if (opts && opts.colors) { - options.colors = opts.colors; - } - - if (options.xaxis.color == null) - options.xaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString(); - if (options.yaxis.color == null) - options.yaxis.color = $.color.parse(options.grid.color).scale('a', 0.22).toString(); - - if (options.xaxis.tickColor == null) // grid.tickColor for back-compatibility - options.xaxis.tickColor = options.grid.tickColor || options.xaxis.color; - if (options.yaxis.tickColor == null) // grid.tickColor for back-compatibility - options.yaxis.tickColor = options.grid.tickColor || options.yaxis.color; - - if (options.grid.borderColor == null) - options.grid.borderColor = options.grid.color; - if (options.grid.tickColor == null) - options.grid.tickColor = $.color.parse(options.grid.color).scale('a', 0.22).toString(); - - // Fill in defaults for axis options, including any unspecified - // font-spec fields, if a font-spec was provided. - - // If no x/y axis options were provided, create one of each anyway, - // since the rest of the code assumes that they exist. - - var i, axisOptions, axisCount, - fontSize = placeholder.css("font-size"), - fontSizeDefault = fontSize ? +fontSize.replace("px", "") : 13, - fontDefaults = { - style: placeholder.css("font-style"), - size: Math.round(0.8 * fontSizeDefault), - variant: placeholder.css("font-variant"), - weight: placeholder.css("font-weight"), - family: placeholder.css("font-family") - }; - - axisCount = options.xaxes.length || 1; - for (i = 0; i < axisCount; ++i) { - - axisOptions = options.xaxes[i]; - if (axisOptions && !axisOptions.tickColor) { - axisOptions.tickColor = axisOptions.color; - } - - axisOptions = $.extend(true, {}, options.xaxis, axisOptions); - options.xaxes[i] = axisOptions; - - if (axisOptions.font) { - axisOptions.font = $.extend({}, fontDefaults, axisOptions.font); - if (!axisOptions.font.color) { - axisOptions.font.color = axisOptions.color; - } - if (!axisOptions.font.lineHeight) { - axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15); - } - } - } - - axisCount = options.yaxes.length || 1; - for (i = 0; i < axisCount; ++i) { - - axisOptions = options.yaxes[i]; - if (axisOptions && !axisOptions.tickColor) { - axisOptions.tickColor = axisOptions.color; - } - - axisOptions = $.extend(true, {}, options.yaxis, axisOptions); - options.yaxes[i] = axisOptions; - - if (axisOptions.font) { - axisOptions.font = $.extend({}, fontDefaults, axisOptions.font); - if (!axisOptions.font.color) { - axisOptions.font.color = axisOptions.color; - } - if (!axisOptions.font.lineHeight) { - axisOptions.font.lineHeight = Math.round(axisOptions.font.size * 1.15); - } - } - } - - // backwards compatibility, to be removed in future - if (options.xaxis.noTicks && options.xaxis.ticks == null) - options.xaxis.ticks = options.xaxis.noTicks; - if (options.yaxis.noTicks && options.yaxis.ticks == null) - options.yaxis.ticks = options.yaxis.noTicks; - if (options.x2axis) { - options.xaxes[1] = $.extend(true, {}, options.xaxis, options.x2axis); - options.xaxes[1].position = "top"; - } - if (options.y2axis) { - options.yaxes[1] = $.extend(true, {}, options.yaxis, options.y2axis); - options.yaxes[1].position = "right"; - } - if (options.grid.coloredAreas) - options.grid.markings = options.grid.coloredAreas; - if (options.grid.coloredAreasColor) - options.grid.markingsColor = options.grid.coloredAreasColor; - if (options.lines) - $.extend(true, options.series.lines, options.lines); - if (options.points) - $.extend(true, options.series.points, options.points); - if (options.bars) - $.extend(true, options.series.bars, options.bars); - if (options.shadowSize != null) - options.series.shadowSize = options.shadowSize; - if (options.highlightColor != null) - options.series.highlightColor = options.highlightColor; - - // save options on axes for future reference - for (i = 0; i < options.xaxes.length; ++i) - getOrCreateAxis(xaxes, i + 1).options = options.xaxes[i]; - for (i = 0; i < options.yaxes.length; ++i) - getOrCreateAxis(yaxes, i + 1).options = options.yaxes[i]; - - // add hooks from options - for (var n in hooks) - if (options.hooks[n] && options.hooks[n].length) - hooks[n] = hooks[n].concat(options.hooks[n]); - - executeHooks(hooks.processOptions, [options]); - } - - function setData(d) { - series = parseData(d); - fillInSeriesOptions(); - processData(); - } - - function parseData(d) { - var res = []; - for (var i = 0; i < d.length; ++i) { - var s = $.extend(true, {}, options.series); - - if (d[i].data != null) { - s.data = d[i].data; // move the data instead of deep-copy - delete d[i].data; - - $.extend(true, s, d[i]); - - d[i].data = s.data; - } - else - s.data = d[i]; - res.push(s); - } - - return res; - } - - function axisNumber(obj, coord) { - var a = obj[coord + "axis"]; - if (typeof a == "object") // if we got a real axis, extract number - a = a.n; - if (typeof a != "number") - a = 1; // default to first axis - return a; - } - - function allAxes() { - // return flat array without annoying null entries - return $.grep(xaxes.concat(yaxes), function (a) { return a; }); - } - - function canvasToAxisCoords(pos) { - // return an object with x/y corresponding to all used axes - var res = {}, i, axis; - for (i = 0; i < xaxes.length; ++i) { - axis = xaxes[i]; - if (axis && axis.used) - res["x" + axis.n] = axis.c2p(pos.left); - } - - for (i = 0; i < yaxes.length; ++i) { - axis = yaxes[i]; - if (axis && axis.used) - res["y" + axis.n] = axis.c2p(pos.top); - } - - if (res.x1 !== undefined) - res.x = res.x1; - if (res.y1 !== undefined) - res.y = res.y1; - - return res; - } - - function axisToCanvasCoords(pos) { - // get canvas coords from the first pair of x/y found in pos - var res = {}, i, axis, key; - - for (i = 0; i < xaxes.length; ++i) { - axis = xaxes[i]; - if (axis && axis.used) { - key = "x" + axis.n; - if (pos[key] == null && axis.n == 1) - key = "x"; - - if (pos[key] != null) { - res.left = axis.p2c(pos[key]); - break; - } - } - } - - for (i = 0; i < yaxes.length; ++i) { - axis = yaxes[i]; - if (axis && axis.used) { - key = "y" + axis.n; - if (pos[key] == null && axis.n == 1) - key = "y"; - - if (pos[key] != null) { - res.top = axis.p2c(pos[key]); - break; - } - } - } - - return res; - } - - function getOrCreateAxis(axes, number) { - if (!axes[number - 1]) - axes[number - 1] = { - n: number, // save the number for future reference - direction: axes == xaxes ? "x" : "y", - options: $.extend(true, {}, axes == xaxes ? options.xaxis : options.yaxis) - }; - - return axes[number - 1]; - } - - function fillInSeriesOptions() { - - var neededColors = series.length, maxIndex = -1, i; - - // Subtract the number of series that already have fixed colors or - // color indexes from the number that we still need to generate. - - for (i = 0; i < series.length; ++i) { - var sc = series[i].color; - if (sc != null) { - neededColors--; - if (typeof sc == "number" && sc > maxIndex) { - maxIndex = sc; - } - } - } - - // If any of the series have fixed color indexes, then we need to - // generate at least as many colors as the highest index. - - if (neededColors <= maxIndex) { - neededColors = maxIndex + 1; - } - - // Generate all the colors, using first the option colors and then - // variations on those colors once they're exhausted. - - var c, colors = [], colorPool = options.colors, - colorPoolSize = colorPool.length, variation = 0; - - for (i = 0; i < neededColors; i++) { - - c = $.color.parse(colorPool[i % colorPoolSize] || "#666"); - - // Each time we exhaust the colors in the pool we adjust - // a scaling factor used to produce more variations on - // those colors. The factor alternates negative/positive - // to produce lighter/darker colors. - - // Reset the variation after every few cycles, or else - // it will end up producing only white or black colors. - - if (i % colorPoolSize == 0 && i) { - if (variation >= 0) { - if (variation < 0.5) { - variation = -variation - 0.2; - } else variation = 0; - } else variation = -variation; - } - - colors[i] = c.scale('rgb', 1 + variation); - } - - // Finalize the series options, filling in their colors - - var colori = 0, s; - for (i = 0; i < series.length; ++i) { - s = series[i]; - - // assign colors - if (s.color == null) { - s.color = colors[colori].toString(); - ++colori; - } - else if (typeof s.color == "number") - s.color = colors[s.color].toString(); - - // turn on lines automatically in case nothing is set - if (s.lines.show == null) { - var v, show = true; - for (v in s) - if (s[v] && s[v].show) { - show = false; - break; - } - if (show) - s.lines.show = true; - } - - // If nothing was provided for lines.zero, default it to match - // lines.fill, since areas by default should extend to zero. - - if (s.lines.zero == null) { - s.lines.zero = !!s.lines.fill; - } - - // setup axes - s.xaxis = getOrCreateAxis(xaxes, axisNumber(s, "x")); - s.yaxis = getOrCreateAxis(yaxes, axisNumber(s, "y")); - } - } - - function processData() { - var topSentry = Number.POSITIVE_INFINITY, - bottomSentry = Number.NEGATIVE_INFINITY, - fakeInfinity = Number.MAX_VALUE, - i, j, k, m, length, - s, points, ps, x, y, axis, val, f, p, - data, format; - - function updateAxis(axis, min, max) { - if (min < axis.datamin && min != -fakeInfinity) - axis.datamin = min; - if (max > axis.datamax && max != fakeInfinity) - axis.datamax = max; - } - - $.each(allAxes(), function (_, axis) { - // init axis - axis.datamin = topSentry; - axis.datamax = bottomSentry; - axis.used = false; - }); - - for (i = 0; i < series.length; ++i) { - s = series[i]; - s.datapoints = { points: [] }; - - executeHooks(hooks.processRawData, [ s, s.data, s.datapoints ]); - } - - // first pass: clean and copy data - for (i = 0; i < series.length; ++i) { - s = series[i]; - - data = s.data; - format = s.datapoints.format; - - if (!format) { - format = []; - // find out how to copy - format.push({ x: true, number: true, required: true }); - format.push({ y: true, number: true, required: true }); - - if (s.bars.show || (s.lines.show && s.lines.fill)) { - var autoscale = !!((s.bars.show && s.bars.zero) || (s.lines.show && s.lines.zero)); - format.push({ y: true, number: true, required: false, defaultValue: 0, autoscale: autoscale }); - if (s.bars.horizontal) { - delete format[format.length - 1].y; - format[format.length - 1].x = true; - } - } - - s.datapoints.format = format; - } - - if (s.datapoints.pointsize != null) - continue; // already filled in - - s.datapoints.pointsize = format.length; - - ps = s.datapoints.pointsize; - points = s.datapoints.points; - - var insertSteps = s.lines.show && s.lines.steps; - s.xaxis.used = s.yaxis.used = true; - - for (j = k = 0; j < data.length; ++j, k += ps) { - p = data[j]; - - var nullify = p == null; - if (!nullify) { - for (m = 0; m < ps; ++m) { - val = p[m]; - f = format[m]; - - if (f) { - if (f.number && val != null) { - val = +val; // convert to number - if (isNaN(val)) - val = null; - else if (val == Infinity) - val = fakeInfinity; - else if (val == -Infinity) - val = -fakeInfinity; - } - - if (val == null) { - if (f.required) - nullify = true; - - if (f.defaultValue != null) - val = f.defaultValue; - } - } - - points[k + m] = val; - } - } - - if (nullify) { - for (m = 0; m < ps; ++m) { - val = points[k + m]; - if (val != null) { - f = format[m]; - // extract min/max info - if (f.autoscale !== false) { - if (f.x) { - updateAxis(s.xaxis, val, val); - } - if (f.y) { - updateAxis(s.yaxis, val, val); - } - } - } - points[k + m] = null; - } - } - else { - // a little bit of line specific stuff that - // perhaps shouldn't be here, but lacking - // better means... - if (insertSteps && k > 0 - && points[k - ps] != null - && points[k - ps] != points[k] - && points[k - ps + 1] != points[k + 1]) { - // copy the point to make room for a middle point - for (m = 0; m < ps; ++m) - points[k + ps + m] = points[k + m]; - - // middle point has same y - points[k + 1] = points[k - ps + 1]; - - // we've added a point, better reflect that - k += ps; - } - } - } - } - - // give the hooks a chance to run - for (i = 0; i < series.length; ++i) { - s = series[i]; - - executeHooks(hooks.processDatapoints, [ s, s.datapoints]); - } - - // second pass: find datamax/datamin for auto-scaling - for (i = 0; i < series.length; ++i) { - s = series[i]; - points = s.datapoints.points; - ps = s.datapoints.pointsize; - format = s.datapoints.format; - - var xmin = topSentry, ymin = topSentry, - xmax = bottomSentry, ymax = bottomSentry; - - for (j = 0; j < points.length; j += ps) { - if (points[j] == null) - continue; - - for (m = 0; m < ps; ++m) { - val = points[j + m]; - f = format[m]; - if (!f || f.autoscale === false || val == fakeInfinity || val == -fakeInfinity) - continue; - - if (f.x) { - if (val < xmin) - xmin = val; - if (val > xmax) - xmax = val; - } - if (f.y) { - if (val < ymin) - ymin = val; - if (val > ymax) - ymax = val; - } - } - } - - if (s.bars.show) { - // make sure we got room for the bar on the dancing floor - var delta; - - switch (s.bars.align) { - case "left": - delta = 0; - break; - case "right": - delta = -s.bars.barWidth; - break; - default: - delta = -s.bars.barWidth / 2; - } - - if (s.bars.horizontal) { - ymin += delta; - ymax += delta + s.bars.barWidth; - } - else { - xmin += delta; - xmax += delta + s.bars.barWidth; - } - } - - updateAxis(s.xaxis, xmin, xmax); - updateAxis(s.yaxis, ymin, ymax); - } - - $.each(allAxes(), function (_, axis) { - if (axis.datamin == topSentry) - axis.datamin = null; - if (axis.datamax == bottomSentry) - axis.datamax = null; - }); - } - - function setupCanvases() { - - // Make sure the placeholder is clear of everything except canvases - // from a previous plot in this container that we'll try to re-use. - - placeholder.css("padding", 0) // padding messes up the positioning - .children().filter(function(){ - return !$(this).hasClass("flot-overlay") && !$(this).hasClass('flot-base'); - }).remove(); - - if (placeholder.css("position") == 'static') - placeholder.css("position", "relative"); // for positioning labels and overlay - - surface = new Canvas("flot-base", placeholder); - overlay = new Canvas("flot-overlay", placeholder); // overlay canvas for interactive features - - ctx = surface.context; - octx = overlay.context; - - // define which element we're listening for events on - eventHolder = $(overlay.element).unbind(); - - // If we're re-using a plot object, shut down the old one - - var existing = placeholder.data("plot"); - - if (existing) { - existing.shutdown(); - overlay.clear(); - } - - // save in case we get replotted - placeholder.data("plot", plot); - } - - function bindEvents() { - // bind events - if (options.grid.hoverable) { - eventHolder.mousemove(onMouseMove); - - // Use bind, rather than .mouseleave, because we officially - // still support jQuery 1.2.6, which doesn't define a shortcut - // for mouseenter or mouseleave. This was a bug/oversight that - // was fixed somewhere around 1.3.x. We can return to using - // .mouseleave when we drop support for 1.2.6. - - eventHolder.bind("mouseleave", onMouseLeave); - } - - if (options.grid.clickable) - eventHolder.click(onClick); - - executeHooks(hooks.bindEvents, [eventHolder]); - } - - function shutdown() { - if (redrawTimeout) - clearTimeout(redrawTimeout); - - eventHolder.unbind("mousemove", onMouseMove); - eventHolder.unbind("mouseleave", onMouseLeave); - eventHolder.unbind("click", onClick); - - executeHooks(hooks.shutdown, [eventHolder]); - } - - function setTransformationHelpers(axis) { - // set helper functions on the axis, assumes plot area - // has been computed already - - function identity(x) { return x; } - - var s, m, t = axis.options.transform || identity, - it = axis.options.inverseTransform; - - // precompute how much the axis is scaling a point - // in canvas space - if (axis.direction == "x") { - s = axis.scale = plotWidth / Math.abs(t(axis.max) - t(axis.min)); - m = Math.min(t(axis.max), t(axis.min)); - } - else { - s = axis.scale = plotHeight / Math.abs(t(axis.max) - t(axis.min)); - s = -s; - m = Math.max(t(axis.max), t(axis.min)); - } - - // data point to canvas coordinate - if (t == identity) // slight optimization - axis.p2c = function (p) { return (p - m) * s; }; - else - axis.p2c = function (p) { return (t(p) - m) * s; }; - // canvas coordinate to data point - if (!it) - axis.c2p = function (c) { return m + c / s; }; - else - axis.c2p = function (c) { return it(m + c / s); }; - } - - function measureTickLabels(axis) { - - var opts = axis.options, - ticks = axis.ticks || [], - labelWidth = opts.labelWidth || 0, - labelHeight = opts.labelHeight || 0, - maxWidth = labelWidth || (axis.direction == "x" ? Math.floor(surface.width / (ticks.length || 1)) : null), - legacyStyles = axis.direction + "Axis " + axis.direction + axis.n + "Axis", - layer = "flot-" + axis.direction + "-axis flot-" + axis.direction + axis.n + "-axis " + legacyStyles, - font = opts.font || "flot-tick-label tickLabel"; - - for (var i = 0; i < ticks.length; ++i) { - - var t = ticks[i]; - - if (!t.label) - continue; - - var info = surface.getTextInfo(layer, t.label, font, null, maxWidth); - - labelWidth = Math.max(labelWidth, info.width); - labelHeight = Math.max(labelHeight, info.height); - } - - axis.labelWidth = opts.labelWidth || labelWidth; - axis.labelHeight = opts.labelHeight || labelHeight; - } - - function allocateAxisBoxFirstPhase(axis) { - // find the bounding box of the axis by looking at label - // widths/heights and ticks, make room by diminishing the - // plotOffset; this first phase only looks at one - // dimension per axis, the other dimension depends on the - // other axes so will have to wait - - var lw = axis.labelWidth, - lh = axis.labelHeight, - pos = axis.options.position, - isXAxis = axis.direction === "x", - tickLength = axis.options.tickLength, - axisMargin = options.grid.axisMargin, - padding = options.grid.labelMargin, - innermost = true, - outermost = true, - first = true, - found = false; - - // Determine the axis's position in its direction and on its side - - $.each(isXAxis ? xaxes : yaxes, function(i, a) { - if (a && a.reserveSpace) { - if (a === axis) { - found = true; - } else if (a.options.position === pos) { - if (found) { - outermost = false; - } else { - innermost = false; - } - } - if (!found) { - first = false; - } - } - }); - - // The outermost axis on each side has no margin - - if (outermost) { - axisMargin = 0; - } - - // The ticks for the first axis in each direction stretch across - - if (tickLength == null) { - tickLength = first ? "full" : 5; - } - - if (!isNaN(+tickLength)) - padding += +tickLength; - - if (isXAxis) { - lh += padding; - - if (pos == "bottom") { - plotOffset.bottom += lh + axisMargin; - axis.box = { top: surface.height - plotOffset.bottom, height: lh }; - } - else { - axis.box = { top: plotOffset.top + axisMargin, height: lh }; - plotOffset.top += lh + axisMargin; - } - } - else { - lw += padding; - - if (pos == "left") { - axis.box = { left: plotOffset.left + axisMargin, width: lw }; - plotOffset.left += lw + axisMargin; - } - else { - plotOffset.right += lw + axisMargin; - axis.box = { left: surface.width - plotOffset.right, width: lw }; - } - } - - // save for future reference - axis.position = pos; - axis.tickLength = tickLength; - axis.box.padding = padding; - axis.innermost = innermost; - } - - function allocateAxisBoxSecondPhase(axis) { - // now that all axis boxes have been placed in one - // dimension, we can set the remaining dimension coordinates - if (axis.direction == "x") { - axis.box.left = plotOffset.left - axis.labelWidth / 2; - axis.box.width = surface.width - plotOffset.left - plotOffset.right + axis.labelWidth; - } - else { - axis.box.top = plotOffset.top - axis.labelHeight / 2; - axis.box.height = surface.height - plotOffset.bottom - plotOffset.top + axis.labelHeight; - } - } - - function adjustLayoutForThingsStickingOut() { - // possibly adjust plot offset to ensure everything stays - // inside the canvas and isn't clipped off - - var minMargin = options.grid.minBorderMargin, - axis, i; - - // check stuff from the plot (FIXME: this should just read - // a value from the series, otherwise it's impossible to - // customize) - if (minMargin == null) { - minMargin = 0; - for (i = 0; i < series.length; ++i) - minMargin = Math.max(minMargin, 2 * (series[i].points.radius + series[i].points.lineWidth/2)); - } - - var margins = { - left: minMargin, - right: minMargin, - top: minMargin, - bottom: minMargin - }; - - // check axis labels, note we don't check the actual - // labels but instead use the overall width/height to not - // jump as much around with replots - $.each(allAxes(), function (_, axis) { - if (axis.reserveSpace && axis.ticks && axis.ticks.length) { - var lastTick = axis.ticks[axis.ticks.length - 1]; - if (axis.direction === "x") { - margins.left = Math.max(margins.left, axis.labelWidth / 2); - if (lastTick.v <= axis.max) { - margins.right = Math.max(margins.right, axis.labelWidth / 2); - } - } else { - margins.bottom = Math.max(margins.bottom, axis.labelHeight / 2); - if (lastTick.v <= axis.max) { - margins.top = Math.max(margins.top, axis.labelHeight / 2); - } - } - } - }); - - plotOffset.left = Math.ceil(Math.max(margins.left, plotOffset.left)); - plotOffset.right = Math.ceil(Math.max(margins.right, plotOffset.right)); - plotOffset.top = Math.ceil(Math.max(margins.top, plotOffset.top)); - plotOffset.bottom = Math.ceil(Math.max(margins.bottom, plotOffset.bottom)); - } - - function setupGrid() { - var i, axes = allAxes(), showGrid = options.grid.show; - - // Initialize the plot's offset from the edge of the canvas - - for (var a in plotOffset) { - var margin = options.grid.margin || 0; - plotOffset[a] = typeof margin == "number" ? margin : margin[a] || 0; - } - - executeHooks(hooks.processOffset, [plotOffset]); - - // If the grid is visible, add its border width to the offset - - for (var a in plotOffset) { - if(typeof(options.grid.borderWidth) == "object") { - plotOffset[a] += showGrid ? options.grid.borderWidth[a] : 0; - } - else { - plotOffset[a] += showGrid ? options.grid.borderWidth : 0; - } - } - - // init axes - $.each(axes, function (_, axis) { - axis.show = axis.options.show; - if (axis.show == null) - axis.show = axis.used; // by default an axis is visible if it's got data - - axis.reserveSpace = axis.show || axis.options.reserveSpace; - - setRange(axis); - }); - - if (showGrid) { - - var allocatedAxes = $.grep(axes, function (axis) { return axis.reserveSpace; }); - - $.each(allocatedAxes, function (_, axis) { - // make the ticks - setupTickGeneration(axis); - setTicks(axis); - snapRangeToTicks(axis, axis.ticks); - // find labelWidth/Height for axis - measureTickLabels(axis); - }); - - // with all dimensions calculated, we can compute the - // axis bounding boxes, start from the outside - // (reverse order) - for (i = allocatedAxes.length - 1; i >= 0; --i) - allocateAxisBoxFirstPhase(allocatedAxes[i]); - - // make sure we've got enough space for things that - // might stick out - adjustLayoutForThingsStickingOut(); - - $.each(allocatedAxes, function (_, axis) { - allocateAxisBoxSecondPhase(axis); - }); - } - - plotWidth = surface.width - plotOffset.left - plotOffset.right; - plotHeight = surface.height - plotOffset.bottom - plotOffset.top; - - // now we got the proper plot dimensions, we can compute the scaling - $.each(axes, function (_, axis) { - setTransformationHelpers(axis); - }); - - if (showGrid) { - drawAxisLabels(); - } - - insertLegend(); - } - - function setRange(axis) { - var opts = axis.options, - min = +(opts.min != null ? opts.min : axis.datamin), - max = +(opts.max != null ? opts.max : axis.datamax), - delta = max - min; - - if (delta == 0.0) { - // degenerate case - var widen = max == 0 ? 1 : 0.01; - - if (opts.min == null) - min -= widen; - // always widen max if we couldn't widen min to ensure we - // don't fall into min == max which doesn't work - if (opts.max == null || opts.min != null) - max += widen; - } - else { - // consider autoscaling - var margin = opts.autoscaleMargin; - if (margin != null) { - if (opts.min == null) { - min -= delta * margin; - // make sure we don't go below zero if all values - // are positive - if (min < 0 && axis.datamin != null && axis.datamin >= 0) - min = 0; - } - if (opts.max == null) { - max += delta * margin; - if (max > 0 && axis.datamax != null && axis.datamax <= 0) - max = 0; - } - } - } - axis.min = min; - axis.max = max; - } - - function setupTickGeneration(axis) { - var opts = axis.options; - - // estimate number of ticks - var noTicks; - if (typeof opts.ticks == "number" && opts.ticks > 0) - noTicks = opts.ticks; - else - // heuristic based on the model a*sqrt(x) fitted to - // some data points that seemed reasonable - noTicks = 0.3 * Math.sqrt(axis.direction == "x" ? surface.width : surface.height); - - var delta = (axis.max - axis.min) / noTicks, - dec = -Math.floor(Math.log(delta) / Math.LN10), - maxDec = opts.tickDecimals; - - if (maxDec != null && dec > maxDec) { - dec = maxDec; - } - - var magn = Math.pow(10, -dec), - norm = delta / magn, // norm is between 1.0 and 10.0 - size; - - if (norm < 1.5) { - size = 1; - } else if (norm < 3) { - size = 2; - // special case for 2.5, requires an extra decimal - if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) { - size = 2.5; - ++dec; - } - } else if (norm < 7.5) { - size = 5; - } else { - size = 10; - } - - size *= magn; - - if (opts.minTickSize != null && size < opts.minTickSize) { - size = opts.minTickSize; - } - - axis.delta = delta; - axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec); - axis.tickSize = opts.tickSize || size; - - // Time mode was moved to a plug-in in 0.8, but since so many people use this - // we'll add an especially friendly make sure they remembered to include it. - - if (opts.mode == "time" && !axis.tickGenerator) { - throw new Error("Time mode requires the flot.time plugin."); - } - - // Flot supports base-10 axes; any other mode else is handled by a plug-in, - // like flot.time.js. - - if (!axis.tickGenerator) { - - axis.tickGenerator = function (axis) { - - var ticks = [], - start = floorInBase(axis.min, axis.tickSize), - i = 0, - v = Number.NaN, - prev; - - do { - prev = v; - v = start + i * axis.tickSize; - ticks.push(v); - ++i; - } while (v < axis.max && v != prev); - return ticks; - }; - - axis.tickFormatter = function (value, axis) { - - var factor = axis.tickDecimals ? Math.pow(10, axis.tickDecimals) : 1; - var formatted = "" + Math.round(value * factor) / factor; - - // If tickDecimals was specified, ensure that we have exactly that - // much precision; otherwise default to the value's own precision. - - if (axis.tickDecimals != null) { - var decimal = formatted.indexOf("."); - var precision = decimal == -1 ? 0 : formatted.length - decimal - 1; - if (precision < axis.tickDecimals) { - return (precision ? formatted : formatted + ".") + ("" + factor).substr(1, axis.tickDecimals - precision); - } - } - - return formatted; - }; - } - - if ($.isFunction(opts.tickFormatter)) - axis.tickFormatter = function (v, axis) { return "" + opts.tickFormatter(v, axis); }; - - if (opts.alignTicksWithAxis != null) { - var otherAxis = (axis.direction == "x" ? xaxes : yaxes)[opts.alignTicksWithAxis - 1]; - if (otherAxis && otherAxis.used && otherAxis != axis) { - // consider snapping min/max to outermost nice ticks - var niceTicks = axis.tickGenerator(axis); - if (niceTicks.length > 0) { - if (opts.min == null) - axis.min = Math.min(axis.min, niceTicks[0]); - if (opts.max == null && niceTicks.length > 1) - axis.max = Math.max(axis.max, niceTicks[niceTicks.length - 1]); - } - - axis.tickGenerator = function (axis) { - // copy ticks, scaled to this axis - var ticks = [], v, i; - for (i = 0; i < otherAxis.ticks.length; ++i) { - v = (otherAxis.ticks[i].v - otherAxis.min) / (otherAxis.max - otherAxis.min); - v = axis.min + v * (axis.max - axis.min); - ticks.push(v); - } - return ticks; - }; - - // we might need an extra decimal since forced - // ticks don't necessarily fit naturally - if (!axis.mode && opts.tickDecimals == null) { - var extraDec = Math.max(0, -Math.floor(Math.log(axis.delta) / Math.LN10) + 1), - ts = axis.tickGenerator(axis); - - // only proceed if the tick interval rounded - // with an extra decimal doesn't give us a - // zero at end - if (!(ts.length > 1 && /\..*0$/.test((ts[1] - ts[0]).toFixed(extraDec)))) - axis.tickDecimals = extraDec; - } - } - } - } - - function setTicks(axis) { - var oticks = axis.options.ticks, ticks = []; - if (oticks == null || (typeof oticks == "number" && oticks > 0)) - ticks = axis.tickGenerator(axis); - else if (oticks) { - if ($.isFunction(oticks)) - // generate the ticks - ticks = oticks(axis); - else - ticks = oticks; - } - - // clean up/labelify the supplied ticks, copy them over - var i, v; - axis.ticks = []; - for (i = 0; i < ticks.length; ++i) { - var label = null; - var t = ticks[i]; - if (typeof t == "object") { - v = +t[0]; - if (t.length > 1) - label = t[1]; - } - else - v = +t; - if (label == null) - label = axis.tickFormatter(v, axis); - if (!isNaN(v)) - axis.ticks.push({ v: v, label: label }); - } - } - - function snapRangeToTicks(axis, ticks) { - if (axis.options.autoscaleMargin && ticks.length > 0) { - // snap to ticks - if (axis.options.min == null) - axis.min = Math.min(axis.min, ticks[0].v); - if (axis.options.max == null && ticks.length > 1) - axis.max = Math.max(axis.max, ticks[ticks.length - 1].v); - } - } - - function draw() { - - surface.clear(); - - executeHooks(hooks.drawBackground, [ctx]); - - var grid = options.grid; - - // draw background, if any - if (grid.show && grid.backgroundColor) - drawBackground(); - - if (grid.show && !grid.aboveData) { - drawGrid(); - } - - for (var i = 0; i < series.length; ++i) { - executeHooks(hooks.drawSeries, [ctx, series[i]]); - drawSeries(series[i]); - } - - executeHooks(hooks.draw, [ctx]); - - if (grid.show && grid.aboveData) { - drawGrid(); - } - - surface.render(); - - // A draw implies that either the axes or data have changed, so we - // should probably update the overlay highlights as well. - - triggerRedrawOverlay(); - } - - function extractRange(ranges, coord) { - var axis, from, to, key, axes = allAxes(); - - for (var i = 0; i < axes.length; ++i) { - axis = axes[i]; - if (axis.direction == coord) { - key = coord + axis.n + "axis"; - if (!ranges[key] && axis.n == 1) - key = coord + "axis"; // support x1axis as xaxis - if (ranges[key]) { - from = ranges[key].from; - to = ranges[key].to; - break; - } - } - } - - // backwards-compat stuff - to be removed in future - if (!ranges[key]) { - axis = coord == "x" ? xaxes[0] : yaxes[0]; - from = ranges[coord + "1"]; - to = ranges[coord + "2"]; - } - - // auto-reverse as an added bonus - if (from != null && to != null && from > to) { - var tmp = from; - from = to; - to = tmp; - } - - return { from: from, to: to, axis: axis }; - } - - function drawBackground() { - ctx.save(); - ctx.translate(plotOffset.left, plotOffset.top); - - ctx.fillStyle = getColorOrGradient(options.grid.backgroundColor, plotHeight, 0, "rgba(255, 255, 255, 0)"); - ctx.fillRect(0, 0, plotWidth, plotHeight); - ctx.restore(); - } - - function drawGrid() { - var i, axes, bw, bc; - - ctx.save(); - ctx.translate(plotOffset.left, plotOffset.top); - - // draw markings - var markings = options.grid.markings; - if (markings) { - if ($.isFunction(markings)) { - axes = plot.getAxes(); - // xmin etc. is backwards compatibility, to be - // removed in the future - axes.xmin = axes.xaxis.min; - axes.xmax = axes.xaxis.max; - axes.ymin = axes.yaxis.min; - axes.ymax = axes.yaxis.max; - - markings = markings(axes); - } - - for (i = 0; i < markings.length; ++i) { - var m = markings[i], - xrange = extractRange(m, "x"), - yrange = extractRange(m, "y"); - - // fill in missing - if (xrange.from == null) - xrange.from = xrange.axis.min; - if (xrange.to == null) - xrange.to = xrange.axis.max; - if (yrange.from == null) - yrange.from = yrange.axis.min; - if (yrange.to == null) - yrange.to = yrange.axis.max; - - // clip - if (xrange.to < xrange.axis.min || xrange.from > xrange.axis.max || - yrange.to < yrange.axis.min || yrange.from > yrange.axis.max) - continue; - - xrange.from = Math.max(xrange.from, xrange.axis.min); - xrange.to = Math.min(xrange.to, xrange.axis.max); - yrange.from = Math.max(yrange.from, yrange.axis.min); - yrange.to = Math.min(yrange.to, yrange.axis.max); - - if (xrange.from == xrange.to && yrange.from == yrange.to) - continue; - - // then draw - xrange.from = xrange.axis.p2c(xrange.from); - xrange.to = xrange.axis.p2c(xrange.to); - yrange.from = yrange.axis.p2c(yrange.from); - yrange.to = yrange.axis.p2c(yrange.to); - - if (xrange.from == xrange.to || yrange.from == yrange.to) { - // draw line - ctx.beginPath(); - ctx.strokeStyle = m.color || options.grid.markingsColor; - ctx.lineWidth = m.lineWidth || options.grid.markingsLineWidth; - ctx.moveTo(xrange.from, yrange.from); - ctx.lineTo(xrange.to, yrange.to); - ctx.stroke(); - } - else { - // fill area - ctx.fillStyle = m.color || options.grid.markingsColor; - ctx.fillRect(xrange.from, yrange.to, - xrange.to - xrange.from, - yrange.from - yrange.to); - } - } - } - - // draw the ticks - axes = allAxes(); - bw = options.grid.borderWidth; - - for (var j = 0; j < axes.length; ++j) { - var axis = axes[j], box = axis.box, - t = axis.tickLength, x, y, xoff, yoff; - if (!axis.show || axis.ticks.length == 0) - continue; - - ctx.lineWidth = 1; - - // find the edges - if (axis.direction == "x") { - x = 0; - if (t == "full") - y = (axis.position == "top" ? 0 : plotHeight); - else - y = box.top - plotOffset.top + (axis.position == "top" ? box.height : 0); - } - else { - y = 0; - if (t == "full") - x = (axis.position == "left" ? 0 : plotWidth); - else - x = box.left - plotOffset.left + (axis.position == "left" ? box.width : 0); - } - - // draw tick bar - if (!axis.innermost) { - ctx.strokeStyle = axis.options.color; - ctx.beginPath(); - xoff = yoff = 0; - if (axis.direction == "x") - xoff = plotWidth + 1; - else - yoff = plotHeight + 1; - - if (ctx.lineWidth == 1) { - if (axis.direction == "x") { - y = Math.floor(y) + 0.5; - } else { - x = Math.floor(x) + 0.5; - } - } - - ctx.moveTo(x, y); - ctx.lineTo(x + xoff, y + yoff); - ctx.stroke(); - } - - // draw ticks - - ctx.strokeStyle = axis.options.tickColor; - - ctx.beginPath(); - for (i = 0; i < axis.ticks.length; ++i) { - var v = axis.ticks[i].v; - - xoff = yoff = 0; - - if (isNaN(v) || v < axis.min || v > axis.max - // skip those lying on the axes if we got a border - || (t == "full" - && ((typeof bw == "object" && bw[axis.position] > 0) || bw > 0) - && (v == axis.min || v == axis.max))) - continue; - - if (axis.direction == "x") { - x = axis.p2c(v); - yoff = t == "full" ? -plotHeight : t; - - if (axis.position == "top") - yoff = -yoff; - } - else { - y = axis.p2c(v); - xoff = t == "full" ? -plotWidth : t; - - if (axis.position == "left") - xoff = -xoff; - } - - if (ctx.lineWidth == 1) { - if (axis.direction == "x") - x = Math.floor(x) + 0.5; - else - y = Math.floor(y) + 0.5; - } - - ctx.moveTo(x, y); - ctx.lineTo(x + xoff, y + yoff); - } - - ctx.stroke(); - } - - - // draw border - if (bw) { - // If either borderWidth or borderColor is an object, then draw the border - // line by line instead of as one rectangle - bc = options.grid.borderColor; - if(typeof bw == "object" || typeof bc == "object") { - if (typeof bw !== "object") { - bw = {top: bw, right: bw, bottom: bw, left: bw}; - } - if (typeof bc !== "object") { - bc = {top: bc, right: bc, bottom: bc, left: bc}; - } - - if (bw.top > 0) { - ctx.strokeStyle = bc.top; - ctx.lineWidth = bw.top; - ctx.beginPath(); - ctx.moveTo(0 - bw.left, 0 - bw.top/2); - ctx.lineTo(plotWidth, 0 - bw.top/2); - ctx.stroke(); - } - - if (bw.right > 0) { - ctx.strokeStyle = bc.right; - ctx.lineWidth = bw.right; - ctx.beginPath(); - ctx.moveTo(plotWidth + bw.right / 2, 0 - bw.top); - ctx.lineTo(plotWidth + bw.right / 2, plotHeight); - ctx.stroke(); - } - - if (bw.bottom > 0) { - ctx.strokeStyle = bc.bottom; - ctx.lineWidth = bw.bottom; - ctx.beginPath(); - ctx.moveTo(plotWidth + bw.right, plotHeight + bw.bottom / 2); - ctx.lineTo(0, plotHeight + bw.bottom / 2); - ctx.stroke(); - } - - if (bw.left > 0) { - ctx.strokeStyle = bc.left; - ctx.lineWidth = bw.left; - ctx.beginPath(); - ctx.moveTo(0 - bw.left/2, plotHeight + bw.bottom); - ctx.lineTo(0- bw.left/2, 0); - ctx.stroke(); - } - } - else { - ctx.lineWidth = bw; - ctx.strokeStyle = options.grid.borderColor; - ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw); - } - } - - ctx.restore(); - } - - function drawAxisLabels() { - - $.each(allAxes(), function (_, axis) { - var box = axis.box, - legacyStyles = axis.direction + "Axis " + axis.direction + axis.n + "Axis", - layer = "flot-" + axis.direction + "-axis flot-" + axis.direction + axis.n + "-axis " + legacyStyles, - font = axis.options.font || "flot-tick-label tickLabel", - tick, x, y, halign, valign; - - // Remove text before checking for axis.show and ticks.length; - // otherwise plugins, like flot-tickrotor, that draw their own - // tick labels will end up with both theirs and the defaults. - - surface.removeText(layer); - - if (!axis.show || axis.ticks.length == 0) - return; - - for (var i = 0; i < axis.ticks.length; ++i) { - - tick = axis.ticks[i]; - if (!tick.label || tick.v < axis.min || tick.v > axis.max) - continue; - - if (axis.direction == "x") { - halign = "center"; - x = plotOffset.left + axis.p2c(tick.v); - if (axis.position == "bottom") { - y = box.top + box.padding; - } else { - y = box.top + box.height - box.padding; - valign = "bottom"; - } - } else { - valign = "middle"; - y = plotOffset.top + axis.p2c(tick.v); - if (axis.position == "left") { - x = box.left + box.width - box.padding; - halign = "right"; - } else { - x = box.left + box.padding; - } - } - - surface.addText(layer, x, y, tick.label, font, null, null, halign, valign); - } - }); - } - - function drawSeries(series) { - if (series.lines.show) - drawSeriesLines(series); - if (series.bars.show) - drawSeriesBars(series); - if (series.points.show) - drawSeriesPoints(series); - } - - function drawSeriesLines(series) { - function plotLine(datapoints, xoffset, yoffset, axisx, axisy) { - var points = datapoints.points, - ps = datapoints.pointsize, - prevx = null, prevy = null; - - ctx.beginPath(); - for (var i = ps; i < points.length; i += ps) { - var x1 = points[i - ps], y1 = points[i - ps + 1], - x2 = points[i], y2 = points[i + 1]; - - if (x1 == null || x2 == null) - continue; - - // clip with ymin - if (y1 <= y2 && y1 < axisy.min) { - if (y2 < axisy.min) - continue; // line segment is outside - // compute new intersection point - x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1; - y1 = axisy.min; - } - else if (y2 <= y1 && y2 < axisy.min) { - if (y1 < axisy.min) - continue; - x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1; - y2 = axisy.min; - } - - // clip with ymax - if (y1 >= y2 && y1 > axisy.max) { - if (y2 > axisy.max) - continue; - x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1; - y1 = axisy.max; - } - else if (y2 >= y1 && y2 > axisy.max) { - if (y1 > axisy.max) - continue; - x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1; - y2 = axisy.max; - } - - // clip with xmin - if (x1 <= x2 && x1 < axisx.min) { - if (x2 < axisx.min) - continue; - y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1; - x1 = axisx.min; - } - else if (x2 <= x1 && x2 < axisx.min) { - if (x1 < axisx.min) - continue; - y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1; - x2 = axisx.min; - } - - // clip with xmax - if (x1 >= x2 && x1 > axisx.max) { - if (x2 > axisx.max) - continue; - y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1; - x1 = axisx.max; - } - else if (x2 >= x1 && x2 > axisx.max) { - if (x1 > axisx.max) - continue; - y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1; - x2 = axisx.max; - } - - if (x1 != prevx || y1 != prevy) - ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset); - - prevx = x2; - prevy = y2; - ctx.lineTo(axisx.p2c(x2) + xoffset, axisy.p2c(y2) + yoffset); - } - ctx.stroke(); - } - - function plotLineArea(datapoints, axisx, axisy) { - var points = datapoints.points, - ps = datapoints.pointsize, - bottom = Math.min(Math.max(0, axisy.min), axisy.max), - i = 0, top, areaOpen = false, - ypos = 1, segmentStart = 0, segmentEnd = 0; - - // we process each segment in two turns, first forward - // direction to sketch out top, then once we hit the - // end we go backwards to sketch the bottom - while (true) { - if (ps > 0 && i > points.length + ps) - break; - - i += ps; // ps is negative if going backwards - - var x1 = points[i - ps], - y1 = points[i - ps + ypos], - x2 = points[i], y2 = points[i + ypos]; - - if (areaOpen) { - if (ps > 0 && x1 != null && x2 == null) { - // at turning point - segmentEnd = i; - ps = -ps; - ypos = 2; - continue; - } - - if (ps < 0 && i == segmentStart + ps) { - // done with the reverse sweep - ctx.fill(); - areaOpen = false; - ps = -ps; - ypos = 1; - i = segmentStart = segmentEnd + ps; - continue; - } - } - - if (x1 == null || x2 == null) - continue; - - // clip x values - - // clip with xmin - if (x1 <= x2 && x1 < axisx.min) { - if (x2 < axisx.min) - continue; - y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1; - x1 = axisx.min; - } - else if (x2 <= x1 && x2 < axisx.min) { - if (x1 < axisx.min) - continue; - y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1; - x2 = axisx.min; - } - - // clip with xmax - if (x1 >= x2 && x1 > axisx.max) { - if (x2 > axisx.max) - continue; - y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1; - x1 = axisx.max; - } - else if (x2 >= x1 && x2 > axisx.max) { - if (x1 > axisx.max) - continue; - y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1; - x2 = axisx.max; - } - - if (!areaOpen) { - // open area - ctx.beginPath(); - ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom)); - areaOpen = true; - } - - // now first check the case where both is outside - if (y1 >= axisy.max && y2 >= axisy.max) { - ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max)); - ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.max)); - continue; - } - else if (y1 <= axisy.min && y2 <= axisy.min) { - ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min)); - ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min)); - continue; - } - - // else it's a bit more complicated, there might - // be a flat maxed out rectangle first, then a - // triangular cutout or reverse; to find these - // keep track of the current x values - var x1old = x1, x2old = x2; - - // clip the y values, without shortcutting, we - // go through all cases in turn - - // clip with ymin - if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) { - x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1; - y1 = axisy.min; - } - else if (y2 <= y1 && y2 < axisy.min && y1 >= axisy.min) { - x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1; - y2 = axisy.min; - } - - // clip with ymax - if (y1 >= y2 && y1 > axisy.max && y2 <= axisy.max) { - x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1; - y1 = axisy.max; - } - else if (y2 >= y1 && y2 > axisy.max && y1 <= axisy.max) { - x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1; - y2 = axisy.max; - } - - // if the x value was changed we got a rectangle - // to fill - if (x1 != x1old) { - ctx.lineTo(axisx.p2c(x1old), axisy.p2c(y1)); - // it goes to (x1, y1), but we fill that below - } - - // fill triangular section, this sometimes result - // in redundant points if (x1, y1) hasn't changed - // from previous line to, but we just ignore that - ctx.lineTo(axisx.p2c(x1), axisy.p2c(y1)); - ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2)); - - // fill the other rectangle if it's there - if (x2 != x2old) { - ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2)); - ctx.lineTo(axisx.p2c(x2old), axisy.p2c(y2)); - } - } - } - - ctx.save(); - ctx.translate(plotOffset.left, plotOffset.top); - ctx.lineJoin = "round"; - - var lw = series.lines.lineWidth, - sw = series.shadowSize; - // FIXME: consider another form of shadow when filling is turned on - if (lw > 0 && sw > 0) { - // draw shadow as a thick and thin line with transparency - ctx.lineWidth = sw; - ctx.strokeStyle = "rgba(0,0,0,0.1)"; - // position shadow at angle from the mid of line - var angle = Math.PI/18; - plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2), series.xaxis, series.yaxis); - ctx.lineWidth = sw/2; - plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4), series.xaxis, series.yaxis); - } - - ctx.lineWidth = lw; - ctx.strokeStyle = series.color; - var fillStyle = getFillStyle(series.lines, series.color, 0, plotHeight); - if (fillStyle) { - ctx.fillStyle = fillStyle; - plotLineArea(series.datapoints, series.xaxis, series.yaxis); - } - - if (lw > 0) - plotLine(series.datapoints, 0, 0, series.xaxis, series.yaxis); - ctx.restore(); - } - - function drawSeriesPoints(series) { - function plotPoints(datapoints, radius, fillStyle, offset, shadow, axisx, axisy, symbol) { - var points = datapoints.points, ps = datapoints.pointsize; - - for (var i = 0; i < points.length; i += ps) { - var x = points[i], y = points[i + 1]; - if (x == null || x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max) - continue; - - ctx.beginPath(); - x = axisx.p2c(x); - y = axisy.p2c(y) + offset; - if (symbol == "circle") - ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false); - else - symbol(ctx, x, y, radius, shadow); - ctx.closePath(); - - if (fillStyle) { - ctx.fillStyle = fillStyle; - ctx.fill(); - } - ctx.stroke(); - } - } - - ctx.save(); - ctx.translate(plotOffset.left, plotOffset.top); - - var lw = series.points.lineWidth, - sw = series.shadowSize, - radius = series.points.radius, - symbol = series.points.symbol; - - // If the user sets the line width to 0, we change it to a very - // small value. A line width of 0 seems to force the default of 1. - // Doing the conditional here allows the shadow setting to still be - // optional even with a lineWidth of 0. - - if( lw == 0 ) - lw = 0.0001; - - if (lw > 0 && sw > 0) { - // draw shadow in two steps - var w = sw / 2; - ctx.lineWidth = w; - ctx.strokeStyle = "rgba(0,0,0,0.1)"; - plotPoints(series.datapoints, radius, null, w + w/2, true, - series.xaxis, series.yaxis, symbol); - - ctx.strokeStyle = "rgba(0,0,0,0.2)"; - plotPoints(series.datapoints, radius, null, w/2, true, - series.xaxis, series.yaxis, symbol); - } - - ctx.lineWidth = lw; - ctx.strokeStyle = series.color; - plotPoints(series.datapoints, radius, - getFillStyle(series.points, series.color), 0, false, - series.xaxis, series.yaxis, symbol); - ctx.restore(); - } - - function drawBar(x, y, b, barLeft, barRight, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) { - var left, right, bottom, top, - drawLeft, drawRight, drawTop, drawBottom, - tmp; - - // in horizontal mode, we start the bar from the left - // instead of from the bottom so it appears to be - // horizontal rather than vertical - if (horizontal) { - drawBottom = drawRight = drawTop = true; - drawLeft = false; - left = b; - right = x; - top = y + barLeft; - bottom = y + barRight; - - // account for negative bars - if (right < left) { - tmp = right; - right = left; - left = tmp; - drawLeft = true; - drawRight = false; - } - } - else { - drawLeft = drawRight = drawTop = true; - drawBottom = false; - left = x + barLeft; - right = x + barRight; - bottom = b; - top = y; - - // account for negative bars - if (top < bottom) { - tmp = top; - top = bottom; - bottom = tmp; - drawBottom = true; - drawTop = false; - } - } - - // clip - if (right < axisx.min || left > axisx.max || - top < axisy.min || bottom > axisy.max) - return; - - if (left < axisx.min) { - left = axisx.min; - drawLeft = false; - } - - if (right > axisx.max) { - right = axisx.max; - drawRight = false; - } - - if (bottom < axisy.min) { - bottom = axisy.min; - drawBottom = false; - } - - if (top > axisy.max) { - top = axisy.max; - drawTop = false; - } - - left = axisx.p2c(left); - bottom = axisy.p2c(bottom); - right = axisx.p2c(right); - top = axisy.p2c(top); - - // fill the bar - if (fillStyleCallback) { - c.fillStyle = fillStyleCallback(bottom, top); - c.fillRect(left, top, right - left, bottom - top) - } - - // draw outline - if (lineWidth > 0 && (drawLeft || drawRight || drawTop || drawBottom)) { - c.beginPath(); - - // FIXME: inline moveTo is buggy with excanvas - c.moveTo(left, bottom); - if (drawLeft) - c.lineTo(left, top); - else - c.moveTo(left, top); - if (drawTop) - c.lineTo(right, top); - else - c.moveTo(right, top); - if (drawRight) - c.lineTo(right, bottom); - else - c.moveTo(right, bottom); - if (drawBottom) - c.lineTo(left, bottom); - else - c.moveTo(left, bottom); - c.stroke(); - } - } - - function drawSeriesBars(series) { - function plotBars(datapoints, barLeft, barRight, fillStyleCallback, axisx, axisy) { - var points = datapoints.points, ps = datapoints.pointsize; - - for (var i = 0; i < points.length; i += ps) { - if (points[i] == null) - continue; - drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth); - } - } - - ctx.save(); - ctx.translate(plotOffset.left, plotOffset.top); - - // FIXME: figure out a way to add shadows (for instance along the right edge) - ctx.lineWidth = series.bars.lineWidth; - ctx.strokeStyle = series.color; - - var barLeft; - - switch (series.bars.align) { - case "left": - barLeft = 0; - break; - case "right": - barLeft = -series.bars.barWidth; - break; - default: - barLeft = -series.bars.barWidth / 2; - } - - var fillStyleCallback = series.bars.fill ? function (bottom, top) { return getFillStyle(series.bars, series.color, bottom, top); } : null; - plotBars(series.datapoints, barLeft, barLeft + series.bars.barWidth, fillStyleCallback, series.xaxis, series.yaxis); - ctx.restore(); - } - - function getFillStyle(filloptions, seriesColor, bottom, top) { - var fill = filloptions.fill; - if (!fill) - return null; - - if (filloptions.fillColor) - return getColorOrGradient(filloptions.fillColor, bottom, top, seriesColor); - - var c = $.color.parse(seriesColor); - c.a = typeof fill == "number" ? fill : 0.4; - c.normalize(); - return c.toString(); - } - - function insertLegend() { - - if (options.legend.container != null) { - $(options.legend.container).html(""); - } else { - placeholder.find(".legend").remove(); - } - - if (!options.legend.show) { - return; - } - - var fragments = [], entries = [], rowStarted = false, - lf = options.legend.labelFormatter, s, label; - - // Build a list of legend entries, with each having a label and a color - - for (var i = 0; i < series.length; ++i) { - s = series[i]; - if (s.label) { - label = lf ? lf(s.label, s) : s.label; - if (label) { - entries.push({ - label: label, - color: s.color - }); - } - } - } - - // Sort the legend using either the default or a custom comparator - - if (options.legend.sorted) { - if ($.isFunction(options.legend.sorted)) { - entries.sort(options.legend.sorted); - } else if (options.legend.sorted == "reverse") { - entries.reverse(); - } else { - var ascending = options.legend.sorted != "descending"; - entries.sort(function(a, b) { - return a.label == b.label ? 0 : ( - (a.label < b.label) != ascending ? 1 : -1 // Logical XOR - ); - }); - } - } - - // Generate markup for the list of entries, in their final order - - for (var i = 0; i < entries.length; ++i) { - - var entry = entries[i]; - - if (i % options.legend.noColumns == 0) { - if (rowStarted) - fragments.push(''); - fragments.push(''); - rowStarted = true; - } - - fragments.push( - '
' + - '' + entry.label + '' - ); - } - - if (rowStarted) - fragments.push(''); - - if (fragments.length == 0) - return; - - var table = '' + fragments.join("") + '
'; - if (options.legend.container != null) - $(options.legend.container).html(table); - else { - var pos = "", - p = options.legend.position, - m = options.legend.margin; - if (m[0] == null) - m = [m, m]; - if (p.charAt(0) == "n") - pos += 'top:' + (m[1] + plotOffset.top) + 'px;'; - else if (p.charAt(0) == "s") - pos += 'bottom:' + (m[1] + plotOffset.bottom) + 'px;'; - if (p.charAt(1) == "e") - pos += 'right:' + (m[0] + plotOffset.right) + 'px;'; - else if (p.charAt(1) == "w") - pos += 'left:' + (m[0] + plotOffset.left) + 'px;'; - var legend = $('
' + table.replace('style="', 'style="position:absolute;' + pos +';') + '
').appendTo(placeholder); - if (options.legend.backgroundOpacity != 0.0) { - // put in the transparent background - // separately to avoid blended labels and - // label boxes - var c = options.legend.backgroundColor; - if (c == null) { - c = options.grid.backgroundColor; - if (c && typeof c == "string") - c = $.color.parse(c); - else - c = $.color.extract(legend, 'background-color'); - c.a = 1; - c = c.toString(); - } - var div = legend.children(); - $('
').prependTo(legend).css('opacity', options.legend.backgroundOpacity); - } - } - } - - - // interactive features - - var highlights = [], - redrawTimeout = null; - - // returns the data item the mouse is over, or null if none is found - function findNearbyItem(mouseX, mouseY, seriesFilter) { - var maxDistance = options.grid.mouseActiveRadius, - smallestDistance = maxDistance * maxDistance + 1, - item = null, foundPoint = false, i, j, ps; - - for (i = series.length - 1; i >= 0; --i) { - if (!seriesFilter(series[i])) - continue; - - var s = series[i], - axisx = s.xaxis, - axisy = s.yaxis, - points = s.datapoints.points, - mx = axisx.c2p(mouseX), // precompute some stuff to make the loop faster - my = axisy.c2p(mouseY), - maxx = maxDistance / axisx.scale, - maxy = maxDistance / axisy.scale; - - ps = s.datapoints.pointsize; - // with inverse transforms, we can't use the maxx/maxy - // optimization, sadly - if (axisx.options.inverseTransform) - maxx = Number.MAX_VALUE; - if (axisy.options.inverseTransform) - maxy = Number.MAX_VALUE; - - if (s.lines.show || s.points.show) { - for (j = 0; j < points.length; j += ps) { - var x = points[j], y = points[j + 1]; - if (x == null) - continue; - - // For points and lines, the cursor must be within a - // certain distance to the data point - if (x - mx > maxx || x - mx < -maxx || - y - my > maxy || y - my < -maxy) - continue; - - // We have to calculate distances in pixels, not in - // data units, because the scales of the axes may be different - var dx = Math.abs(axisx.p2c(x) - mouseX), - dy = Math.abs(axisy.p2c(y) - mouseY), - dist = dx * dx + dy * dy; // we save the sqrt - - // use <= to ensure last point takes precedence - // (last generally means on top of) - if (dist < smallestDistance) { - smallestDistance = dist; - item = [i, j / ps]; - } - } - } - - if (s.bars.show && !item) { // no other point can be nearby - - var barLeft, barRight; - - switch (s.bars.align) { - case "left": - barLeft = 0; - break; - case "right": - barLeft = -s.bars.barWidth; - break; - default: - barLeft = -s.bars.barWidth / 2; - } - - barRight = barLeft + s.bars.barWidth; - - for (j = 0; j < points.length; j += ps) { - var x = points[j], y = points[j + 1], b = points[j + 2]; - if (x == null) - continue; - - // for a bar graph, the cursor must be inside the bar - if (series[i].bars.horizontal ? - (mx <= Math.max(b, x) && mx >= Math.min(b, x) && - my >= y + barLeft && my <= y + barRight) : - (mx >= x + barLeft && mx <= x + barRight && - my >= Math.min(b, y) && my <= Math.max(b, y))) - item = [i, j / ps]; - } - } - } - - if (item) { - i = item[0]; - j = item[1]; - ps = series[i].datapoints.pointsize; - - return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps), - dataIndex: j, - series: series[i], - seriesIndex: i }; - } - - return null; - } - - function onMouseMove(e) { - if (options.grid.hoverable) - triggerClickHoverEvent("plothover", e, - function (s) { return s["hoverable"] != false; }); - } - - function onMouseLeave(e) { - if (options.grid.hoverable) - triggerClickHoverEvent("plothover", e, - function (s) { return false; }); - } - - function onClick(e) { - triggerClickHoverEvent("plotclick", e, - function (s) { return s["clickable"] != false; }); - } - - // trigger click or hover event (they send the same parameters - // so we share their code) - function triggerClickHoverEvent(eventname, event, seriesFilter) { - var offset = eventHolder.offset(), - canvasX = event.pageX - offset.left - plotOffset.left, - canvasY = event.pageY - offset.top - plotOffset.top, - pos = canvasToAxisCoords({ left: canvasX, top: canvasY }); - - pos.pageX = event.pageX; - pos.pageY = event.pageY; - - var item = findNearbyItem(canvasX, canvasY, seriesFilter); - - if (item) { - // fill in mouse pos for any listeners out there - item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left, 10); - item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top, 10); - } - - if (options.grid.autoHighlight) { - // clear auto-highlights - for (var i = 0; i < highlights.length; ++i) { - var h = highlights[i]; - if (h.auto == eventname && - !(item && h.series == item.series && - h.point[0] == item.datapoint[0] && - h.point[1] == item.datapoint[1])) - unhighlight(h.series, h.point); - } - - if (item) - highlight(item.series, item.datapoint, eventname); - } - - placeholder.trigger(eventname, [ pos, item ]); - } - - function triggerRedrawOverlay() { - var t = options.interaction.redrawOverlayInterval; - if (t == -1) { // skip event queue - drawOverlay(); - return; - } - - if (!redrawTimeout) - redrawTimeout = setTimeout(drawOverlay, t); - } - - function drawOverlay() { - redrawTimeout = null; - - // draw highlights - octx.save(); - overlay.clear(); - octx.translate(plotOffset.left, plotOffset.top); - - var i, hi; - for (i = 0; i < highlights.length; ++i) { - hi = highlights[i]; - - if (hi.series.bars.show) - drawBarHighlight(hi.series, hi.point); - else - drawPointHighlight(hi.series, hi.point); - } - octx.restore(); - - executeHooks(hooks.drawOverlay, [octx]); - } - - function highlight(s, point, auto) { - if (typeof s == "number") - s = series[s]; - - if (typeof point == "number") { - var ps = s.datapoints.pointsize; - point = s.datapoints.points.slice(ps * point, ps * (point + 1)); - } - - var i = indexOfHighlight(s, point); - if (i == -1) { - highlights.push({ series: s, point: point, auto: auto }); - - triggerRedrawOverlay(); - } - else if (!auto) - highlights[i].auto = false; - } - - function unhighlight(s, point) { - if (s == null && point == null) { - highlights = []; - triggerRedrawOverlay(); - return; - } - - if (typeof s == "number") - s = series[s]; - - if (typeof point == "number") { - var ps = s.datapoints.pointsize; - point = s.datapoints.points.slice(ps * point, ps * (point + 1)); - } - - var i = indexOfHighlight(s, point); - if (i != -1) { - highlights.splice(i, 1); - - triggerRedrawOverlay(); - } - } - - function indexOfHighlight(s, p) { - for (var i = 0; i < highlights.length; ++i) { - var h = highlights[i]; - if (h.series == s && h.point[0] == p[0] - && h.point[1] == p[1]) - return i; - } - return -1; - } - - function drawPointHighlight(series, point) { - var x = point[0], y = point[1], - axisx = series.xaxis, axisy = series.yaxis, - highlightColor = (typeof series.highlightColor === "string") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString(); - - if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max) - return; - - var pointRadius = series.points.radius + series.points.lineWidth / 2; - octx.lineWidth = pointRadius; - octx.strokeStyle = highlightColor; - var radius = 1.5 * pointRadius; - x = axisx.p2c(x); - y = axisy.p2c(y); - - octx.beginPath(); - if (series.points.symbol == "circle") - octx.arc(x, y, radius, 0, 2 * Math.PI, false); - else - series.points.symbol(octx, x, y, radius, false); - octx.closePath(); - octx.stroke(); - } - - function drawBarHighlight(series, point) { - var highlightColor = (typeof series.highlightColor === "string") ? series.highlightColor : $.color.parse(series.color).scale('a', 0.5).toString(), - fillStyle = highlightColor, - barLeft; - - switch (series.bars.align) { - case "left": - barLeft = 0; - break; - case "right": - barLeft = -series.bars.barWidth; - break; - default: - barLeft = -series.bars.barWidth / 2; - } - - octx.lineWidth = series.bars.lineWidth; - octx.strokeStyle = highlightColor; - - drawBar(point[0], point[1], point[2] || 0, barLeft, barLeft + series.bars.barWidth, - function () { return fillStyle; }, series.xaxis, series.yaxis, octx, series.bars.horizontal, series.bars.lineWidth); - } - - function getColorOrGradient(spec, bottom, top, defaultColor) { - if (typeof spec == "string") - return spec; - else { - // assume this is a gradient spec; IE currently only - // supports a simple vertical gradient properly, so that's - // what we support too - var gradient = ctx.createLinearGradient(0, top, 0, bottom); - - for (var i = 0, l = spec.colors.length; i < l; ++i) { - var c = spec.colors[i]; - if (typeof c != "string") { - var co = $.color.parse(defaultColor); - if (c.brightness != null) - co = co.scale('rgb', c.brightness); - if (c.opacity != null) - co.a *= c.opacity; - c = co.toString(); - } - gradient.addColorStop(i / (l - 1), c); - } - - return gradient; - } - } - } - - // Add the plot function to the top level of the jQuery object - - $.plot = function(placeholder, data, options) { - //var t0 = new Date(); - var plot = new Plot($(placeholder), data, options, $.plot.plugins); - //(window.console ? console.log : alert)("time used (msecs): " + ((new Date()).getTime() - t0.getTime())); - return plot; - }; - - $.plot.version = "0.8.2"; - - $.plot.plugins = []; - - // Also add the plot function as a chainable property - - $.fn.plot = function(data, options) { - return this.each(function() { - $.plot(this, data, options); - }); - }; - - // round to nearby lower multiple of base - function floorInBase(n, base) { - return base * Math.floor(n / base); - } - -})(jQuery); diff --git a/web/assetic/admin_lte_forms_js_jquery.inputmask_4.js b/web/assetic/admin_lte_forms_js_jquery.inputmask_4.js deleted file mode 100644 index cfbbfaa61e..0000000000 --- a/web/assetic/admin_lte_forms_js_jquery.inputmask_4.js +++ /dev/null @@ -1,1632 +0,0 @@ -/** -* @license Input Mask plugin for jquery -* http://github.com/RobinHerbots/jquery.inputmask -* Copyright (c) 2010 - 2014 Robin Herbots -* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php) -* Version: 0.0.0 -*/ - -(function ($) { - if ($.fn.inputmask === undefined) { - //helper functions - function isInputEventSupported(eventName) { - var el = document.createElement('input'), - eventName = 'on' + eventName, - isSupported = (eventName in el); - if (!isSupported) { - el.setAttribute(eventName, 'return;'); - isSupported = typeof el[eventName] == 'function'; - } - el = null; - return isSupported; - } - function resolveAlias(aliasStr, options, opts) { - var aliasDefinition = opts.aliases[aliasStr]; - if (aliasDefinition) { - if (aliasDefinition.alias) resolveAlias(aliasDefinition.alias, undefined, opts); //alias is another alias - $.extend(true, opts, aliasDefinition); //merge alias definition in the options - $.extend(true, opts, options); //reapply extra given options - return true; - } - return false; - } - function generateMaskSets(opts) { - var ms = []; - var genmasks = []; //used to keep track of the masks that where processed, to avoid duplicates - function getMaskTemplate(mask) { - if (opts.numericInput) { - mask = mask.split('').reverse().join(''); - } - var escaped = false, outCount = 0, greedy = opts.greedy, repeat = opts.repeat; - if (repeat == "*") greedy = false; - //if (greedy == true && opts.placeholder == "") opts.placeholder = " "; - if (mask.length == 1 && greedy == false && repeat != 0) { opts.placeholder = ""; } //hide placeholder with single non-greedy mask - var singleMask = $.map(mask.split(""), function (element, index) { - var outElem = []; - if (element == opts.escapeChar) { - escaped = true; - } - else if ((element != opts.optionalmarker.start && element != opts.optionalmarker.end) || escaped) { - var maskdef = opts.definitions[element]; - if (maskdef && !escaped) { - for (var i = 0; i < maskdef.cardinality; i++) { - outElem.push(opts.placeholder.charAt((outCount + i) % opts.placeholder.length)); - } - } else { - outElem.push(element); - escaped = false; - } - outCount += outElem.length; - return outElem; - } - }); - - //allocate repetitions - var repeatedMask = singleMask.slice(); - for (var i = 1; i < repeat && greedy; i++) { - repeatedMask = repeatedMask.concat(singleMask.slice()); - } - - return { "mask": repeatedMask, "repeat": repeat, "greedy": greedy }; - } - //test definition => {fn: RegExp/function, cardinality: int, optionality: bool, newBlockMarker: bool, offset: int, casing: null/upper/lower, def: definitionSymbol} - function getTestingChain(mask) { - if (opts.numericInput) { - mask = mask.split('').reverse().join(''); - } - var isOptional = false, escaped = false; - var newBlockMarker = false; //indicates wheter the begin/ending of a block should be indicated - - return $.map(mask.split(""), function (element, index) { - var outElem = []; - - if (element == opts.escapeChar) { - escaped = true; - } else if (element == opts.optionalmarker.start && !escaped) { - isOptional = true; - newBlockMarker = true; - } - else if (element == opts.optionalmarker.end && !escaped) { - isOptional = false; - newBlockMarker = true; - } - else { - var maskdef = opts.definitions[element]; - if (maskdef && !escaped) { - var prevalidators = maskdef["prevalidator"], prevalidatorsL = prevalidators ? prevalidators.length : 0; - for (var i = 1; i < maskdef.cardinality; i++) { - var prevalidator = prevalidatorsL >= i ? prevalidators[i - 1] : [], validator = prevalidator["validator"], cardinality = prevalidator["cardinality"]; - outElem.push({ fn: validator ? typeof validator == 'string' ? new RegExp(validator) : new function () { this.test = validator; } : new RegExp("."), cardinality: cardinality ? cardinality : 1, optionality: isOptional, newBlockMarker: isOptional == true ? newBlockMarker : false, offset: 0, casing: maskdef["casing"], def: maskdef["definitionSymbol"] || element }); - if (isOptional == true) //reset newBlockMarker - newBlockMarker = false; - } - outElem.push({ fn: maskdef.validator ? typeof maskdef.validator == 'string' ? new RegExp(maskdef.validator) : new function () { this.test = maskdef.validator; } : new RegExp("."), cardinality: maskdef.cardinality, optionality: isOptional, newBlockMarker: newBlockMarker, offset: 0, casing: maskdef["casing"], def: maskdef["definitionSymbol"] || element }); - } else { - outElem.push({ fn: null, cardinality: 0, optionality: isOptional, newBlockMarker: newBlockMarker, offset: 0, casing: null, def: element }); - escaped = false; - } - //reset newBlockMarker - newBlockMarker = false; - return outElem; - } - }); - } - function markOptional(maskPart) { //needed for the clearOptionalTail functionality - return opts.optionalmarker.start + maskPart + opts.optionalmarker.end; - } - function splitFirstOptionalEndPart(maskPart) { - var optionalStartMarkers = 0, optionalEndMarkers = 0, mpl = maskPart.length; - for (var i = 0; i < mpl; i++) { - if (maskPart.charAt(i) == opts.optionalmarker.start) { - optionalStartMarkers++; - } - if (maskPart.charAt(i) == opts.optionalmarker.end) { - optionalEndMarkers++; - } - if (optionalStartMarkers > 0 && optionalStartMarkers == optionalEndMarkers) - break; - } - var maskParts = [maskPart.substring(0, i)]; - if (i < mpl) { - maskParts.push(maskPart.substring(i + 1, mpl)); - } - return maskParts; - } - function splitFirstOptionalStartPart(maskPart) { - var mpl = maskPart.length; - for (var i = 0; i < mpl; i++) { - if (maskPart.charAt(i) == opts.optionalmarker.start) { - break; - } - } - var maskParts = [maskPart.substring(0, i)]; - if (i < mpl) { - maskParts.push(maskPart.substring(i + 1, mpl)); - } - return maskParts; - } - function generateMask(maskPrefix, maskPart, metadata) { - var maskParts = splitFirstOptionalEndPart(maskPart); - var newMask, maskTemplate; - - var masks = splitFirstOptionalStartPart(maskParts[0]); - if (masks.length > 1) { - newMask = maskPrefix + masks[0] + markOptional(masks[1]) + (maskParts.length > 1 ? maskParts[1] : ""); - if ($.inArray(newMask, genmasks) == -1 && newMask != "") { - genmasks.push(newMask); - maskTemplate = getMaskTemplate(newMask); - ms.push({ - "mask": newMask, - "_buffer": maskTemplate["mask"], - "buffer": maskTemplate["mask"].slice(), - "tests": getTestingChain(newMask), - "lastValidPosition": -1, - "greedy": maskTemplate["greedy"], - "repeat": maskTemplate["repeat"], - "metadata": metadata - }); - } - newMask = maskPrefix + masks[0] + (maskParts.length > 1 ? maskParts[1] : ""); - if ($.inArray(newMask, genmasks) == -1 && newMask != "") { - genmasks.push(newMask); - maskTemplate = getMaskTemplate(newMask); - ms.push({ - "mask": newMask, - "_buffer": maskTemplate["mask"], - "buffer": maskTemplate["mask"].slice(), - "tests": getTestingChain(newMask), - "lastValidPosition": -1, - "greedy": maskTemplate["greedy"], - "repeat": maskTemplate["repeat"], - "metadata": metadata - }); - } - if (splitFirstOptionalStartPart(masks[1]).length > 1) { //optional contains another optional - generateMask(maskPrefix + masks[0], masks[1] + maskParts[1], metadata); - } - if (maskParts.length > 1 && splitFirstOptionalStartPart(maskParts[1]).length > 1) { - generateMask(maskPrefix + masks[0] + markOptional(masks[1]), maskParts[1], metadata); - generateMask(maskPrefix + masks[0], maskParts[1], metadata); - } - } - else { - newMask = maskPrefix + maskParts; - if ($.inArray(newMask, genmasks) == -1 && newMask != "") { - genmasks.push(newMask); - maskTemplate = getMaskTemplate(newMask); - ms.push({ - "mask": newMask, - "_buffer": maskTemplate["mask"], - "buffer": maskTemplate["mask"].slice(), - "tests": getTestingChain(newMask), - "lastValidPosition": -1, - "greedy": maskTemplate["greedy"], - "repeat": maskTemplate["repeat"], - "metadata": metadata - }); - } - } - - } - - if ($.isFunction(opts.mask)) { //allow mask to be a preprocessing fn - should return a valid mask - opts.mask = opts.mask.call(this, opts); - } - if ($.isArray(opts.mask)) { - $.each(opts.mask, function (ndx, msk) { - if (msk["mask"] != undefined) { - generateMask("", msk["mask"].toString(), msk); - } else - generateMask("", msk.toString()); - }); - } else generateMask("", opts.mask.toString()); - - return opts.greedy ? ms : ms.sort(function (a, b) { return a["mask"].length - b["mask"].length; }); - } - - var msie10 = navigator.userAgent.match(new RegExp("msie 10", "i")) !== null, - iphone = navigator.userAgent.match(new RegExp("iphone", "i")) !== null, - android = navigator.userAgent.match(new RegExp("android.*safari.*", "i")) !== null, - androidchrome = navigator.userAgent.match(new RegExp("android.*chrome.*", "i")) !== null, - pasteEvent = isInputEventSupported('paste') ? 'paste' : isInputEventSupported('input') ? 'input' : "propertychange"; - - - //masking scope - //actionObj definition see below - function maskScope(masksets, activeMasksetIndex, opts, actionObj) { - var isRTL = false, - valueOnFocus = getActiveBuffer().join(''), - $el, chromeValueOnInput, - skipKeyPressEvent = false, //Safari 5.1.x - modal dialog fires keypress twice workaround - skipInputEvent = false, //skip when triggered from within inputmask - ignorable = false; - - - //maskset helperfunctions - - function getActiveMaskSet() { - return masksets[activeMasksetIndex]; - } - - function getActiveTests() { - return getActiveMaskSet()['tests']; - } - - function getActiveBufferTemplate() { - return getActiveMaskSet()['_buffer']; - } - - function getActiveBuffer() { - return getActiveMaskSet()['buffer']; - } - - function isValid(pos, c, strict) { //strict true ~ no correction or autofill - strict = strict === true; //always set a value to strict to prevent possible strange behavior in the extensions - - function _isValid(position, activeMaskset, c, strict) { - var testPos = determineTestPosition(position), loopend = c ? 1 : 0, chrs = '', buffer = activeMaskset["buffer"]; - for (var i = activeMaskset['tests'][testPos].cardinality; i > loopend; i--) { - chrs += getBufferElement(buffer, testPos - (i - 1)); - } - - if (c) { - chrs += c; - } - - //return is false or a json object => { pos: ??, c: ??} or true - return activeMaskset['tests'][testPos].fn != null ? - activeMaskset['tests'][testPos].fn.test(chrs, buffer, position, strict, opts) - : (c == getBufferElement(activeMaskset['_buffer'], position, true) || c == opts.skipOptionalPartCharacter) ? - { "refresh": true, c: getBufferElement(activeMaskset['_buffer'], position, true), pos: position } - : false; - } - - function PostProcessResults(maskForwards, results) { - var hasValidActual = false; - $.each(results, function (ndx, rslt) { - hasValidActual = $.inArray(rslt["activeMasksetIndex"], maskForwards) == -1 && rslt["result"] !== false; - if (hasValidActual) return false; - }); - if (hasValidActual) { //strip maskforwards - results = $.map(results, function (rslt, ndx) { - if ($.inArray(rslt["activeMasksetIndex"], maskForwards) == -1) { - return rslt; - } else { - masksets[rslt["activeMasksetIndex"]]["lastValidPosition"] = actualLVP; - } - }); - } else { //keep maskforwards with the least forward - var lowestPos = -1, lowestIndex = -1, rsltValid; - $.each(results, function (ndx, rslt) { - if ($.inArray(rslt["activeMasksetIndex"], maskForwards) != -1 && rslt["result"] !== false & (lowestPos == -1 || lowestPos > rslt["result"]["pos"])) { - lowestPos = rslt["result"]["pos"]; - lowestIndex = rslt["activeMasksetIndex"]; - } - }); - results = $.map(results, function (rslt, ndx) { - if ($.inArray(rslt["activeMasksetIndex"], maskForwards) != -1) { - if (rslt["result"]["pos"] == lowestPos) { - return rslt; - } else if (rslt["result"] !== false) { - for (var i = pos; i < lowestPos; i++) { - rsltValid = _isValid(i, masksets[rslt["activeMasksetIndex"]], masksets[lowestIndex]["buffer"][i], true); - if (rsltValid === false) { - masksets[rslt["activeMasksetIndex"]]["lastValidPosition"] = lowestPos - 1; - break; - } else { - setBufferElement(masksets[rslt["activeMasksetIndex"]]["buffer"], i, masksets[lowestIndex]["buffer"][i], true); - masksets[rslt["activeMasksetIndex"]]["lastValidPosition"] = i; - } - } - //also check check for the lowestpos with the new input - rsltValid = _isValid(lowestPos, masksets[rslt["activeMasksetIndex"]], c, true); - if (rsltValid !== false) { - setBufferElement(masksets[rslt["activeMasksetIndex"]]["buffer"], lowestPos, c, true); - masksets[rslt["activeMasksetIndex"]]["lastValidPosition"] = lowestPos; - } - //console.log("ndx " + rslt["activeMasksetIndex"] + " validate " + masksets[rslt["activeMasksetIndex"]]["buffer"].join('') + " lv " + masksets[rslt["activeMasksetIndex"]]['lastValidPosition']); - return rslt; - } - } - }); - } - return results; - } - - if (strict) { - var result = _isValid(pos, getActiveMaskSet(), c, strict); //only check validity in current mask when validating strict - if (result === true) { - result = { "pos": pos }; //always take a possible corrected maskposition into account - } - return result; - } - - var results = [], result = false, currentActiveMasksetIndex = activeMasksetIndex, - actualBuffer = getActiveBuffer().slice(), actualLVP = getActiveMaskSet()["lastValidPosition"], - actualPrevious = seekPrevious(pos), - maskForwards = []; - $.each(masksets, function (index, value) { - if (typeof (value) == "object") { - activeMasksetIndex = index; - - var maskPos = pos; - var lvp = getActiveMaskSet()['lastValidPosition'], - rsltValid; - if (lvp == actualLVP) { - if ((maskPos - actualLVP) > 1) { - for (var i = lvp == -1 ? 0 : lvp; i < maskPos; i++) { - rsltValid = _isValid(i, getActiveMaskSet(), actualBuffer[i], true); - if (rsltValid === false) { - break; - } else { - setBufferElement(getActiveBuffer(), i, actualBuffer[i], true); - if (rsltValid === true) { - rsltValid = { "pos": i }; //always take a possible corrected maskposition into account - } - var newValidPosition = rsltValid.pos || i; - if (getActiveMaskSet()['lastValidPosition'] < newValidPosition) - getActiveMaskSet()['lastValidPosition'] = newValidPosition; //set new position from isValid - } - } - } - //does the input match on a further position? - if (!isMask(maskPos) && !_isValid(maskPos, getActiveMaskSet(), c, strict)) { - var maxForward = seekNext(maskPos) - maskPos; - for (var fw = 0; fw < maxForward; fw++) { - if (_isValid(++maskPos, getActiveMaskSet(), c, strict) !== false) - break; - } - maskForwards.push(activeMasksetIndex); - //console.log('maskforward ' + activeMasksetIndex + " pos " + pos + " maskPos " + maskPos); - } - } - - if (getActiveMaskSet()['lastValidPosition'] >= actualLVP || activeMasksetIndex == currentActiveMasksetIndex) { - if (maskPos >= 0 && maskPos < getMaskLength()) { - result = _isValid(maskPos, getActiveMaskSet(), c, strict); - if (result !== false) { - if (result === true) { - result = { "pos": maskPos }; //always take a possible corrected maskposition into account - } - var newValidPosition = result.pos || maskPos; - if (getActiveMaskSet()['lastValidPosition'] < newValidPosition) - getActiveMaskSet()['lastValidPosition'] = newValidPosition; //set new position from isValid - } - //console.log("pos " + pos + " ndx " + activeMasksetIndex + " validate " + getActiveBuffer().join('') + " lv " + getActiveMaskSet()['lastValidPosition']); - results.push({ "activeMasksetIndex": index, "result": result }); - } - } - } - }); - activeMasksetIndex = currentActiveMasksetIndex; //reset activeMasksetIndex - - return PostProcessResults(maskForwards, results); //return results of the multiple mask validations - } - - function determineActiveMasksetIndex() { - var currentMasksetIndex = activeMasksetIndex, - highestValid = { "activeMasksetIndex": 0, "lastValidPosition": -1, "next": -1 }; - $.each(masksets, function (index, value) { - if (typeof (value) == "object") { - activeMasksetIndex = index; - if (getActiveMaskSet()['lastValidPosition'] > highestValid['lastValidPosition']) { - highestValid["activeMasksetIndex"] = index; - highestValid["lastValidPosition"] = getActiveMaskSet()['lastValidPosition']; - highestValid["next"] = seekNext(getActiveMaskSet()['lastValidPosition']); - } else if (getActiveMaskSet()['lastValidPosition'] == highestValid['lastValidPosition'] && - (highestValid['next'] == -1 || highestValid['next'] > seekNext(getActiveMaskSet()['lastValidPosition']))) { - highestValid["activeMasksetIndex"] = index; - highestValid["lastValidPosition"] = getActiveMaskSet()['lastValidPosition']; - highestValid["next"] = seekNext(getActiveMaskSet()['lastValidPosition']); - } - } - }); - - activeMasksetIndex = highestValid["lastValidPosition"] != -1 && masksets[currentMasksetIndex]["lastValidPosition"] == highestValid["lastValidPosition"] ? currentMasksetIndex : highestValid["activeMasksetIndex"]; - if (currentMasksetIndex != activeMasksetIndex) { - clearBuffer(getActiveBuffer(), seekNext(highestValid["lastValidPosition"]), getMaskLength()); - getActiveMaskSet()["writeOutBuffer"] = true; - } - $el.data('_inputmask')['activeMasksetIndex'] = activeMasksetIndex; //store the activeMasksetIndex - } - - function isMask(pos) { - var testPos = determineTestPosition(pos); - var test = getActiveTests()[testPos]; - - return test != undefined ? test.fn : false; - } - - function determineTestPosition(pos) { - return pos % getActiveTests().length; - } - - function getMaskLength() { - return opts.getMaskLength(getActiveBufferTemplate(), getActiveMaskSet()['greedy'], getActiveMaskSet()['repeat'], getActiveBuffer(), opts); - } - - //pos: from position - - function seekNext(pos) { - var maskL = getMaskLength(); - if (pos >= maskL) return maskL; - var position = pos; - while (++position < maskL && !isMask(position)) { - } - return position; - } - - //pos: from position - - function seekPrevious(pos) { - var position = pos; - if (position <= 0) return 0; - - while (--position > 0 && !isMask(position)) { - } - ; - return position; - } - - function setBufferElement(buffer, position, element, autoPrepare) { - if (autoPrepare) position = prepareBuffer(buffer, position); - - var test = getActiveTests()[determineTestPosition(position)]; - var elem = element; - if (elem != undefined && test != undefined) { - switch (test.casing) { - case "upper": - elem = element.toUpperCase(); - break; - case "lower": - elem = element.toLowerCase(); - break; - } - } - - buffer[position] = elem; - } - - function getBufferElement(buffer, position, autoPrepare) { - if (autoPrepare) position = prepareBuffer(buffer, position); - return buffer[position]; - } - - //needed to handle the non-greedy mask repetitions - - function prepareBuffer(buffer, position) { - var j; - while (buffer[position] == undefined && buffer.length < getMaskLength()) { - j = 0; - while (getActiveBufferTemplate()[j] !== undefined) { //add a new buffer - buffer.push(getActiveBufferTemplate()[j++]); - } - } - - return position; - } - - function writeBuffer(input, buffer, caretPos) { - input._valueSet(buffer.join('')); - if (caretPos != undefined) { - caret(input, caretPos); - } - } - - function clearBuffer(buffer, start, end, stripNomasks) { - for (var i = start, maskL = getMaskLength() ; i < end && i < maskL; i++) { - if (stripNomasks === true) { - if (!isMask(i)) - setBufferElement(buffer, i, ""); - } else - setBufferElement(buffer, i, getBufferElement(getActiveBufferTemplate().slice(), i, true)); - } - } - - function setReTargetPlaceHolder(buffer, pos) { - var testPos = determineTestPosition(pos); - setBufferElement(buffer, pos, getBufferElement(getActiveBufferTemplate(), testPos)); - } - - function getPlaceHolder(pos) { - return opts.placeholder.charAt(pos % opts.placeholder.length); - } - - function checkVal(input, writeOut, strict, nptvl, intelliCheck) { - var inputValue = nptvl != undefined ? nptvl.slice() : truncateInput(input._valueGet()).split(''); - - $.each(masksets, function (ndx, ms) { - if (typeof (ms) == "object") { - ms["buffer"] = ms["_buffer"].slice(); - ms["lastValidPosition"] = -1; - ms["p"] = -1; - } - }); - if (strict !== true) activeMasksetIndex = 0; - if (writeOut) input._valueSet(""); //initial clear - var ml = getMaskLength(); - $.each(inputValue, function (ndx, charCode) { - if (intelliCheck === true) { - var p = getActiveMaskSet()["p"], lvp = p == -1 ? p : seekPrevious(p), - pos = lvp == -1 ? ndx : seekNext(lvp); - if ($.inArray(charCode, getActiveBufferTemplate().slice(lvp + 1, pos)) == -1) { - keypressEvent.call(input, undefined, true, charCode.charCodeAt(0), writeOut, strict, ndx); - } - } else { - keypressEvent.call(input, undefined, true, charCode.charCodeAt(0), writeOut, strict, ndx); - } - }); - - if (strict === true && getActiveMaskSet()["p"] != -1) { - getActiveMaskSet()["lastValidPosition"] = seekPrevious(getActiveMaskSet()["p"]); - } - } - - function escapeRegex(str) { - return $.inputmask.escapeRegex.call(this, str); - } - - function truncateInput(inputValue) { - return inputValue.replace(new RegExp("(" + escapeRegex(getActiveBufferTemplate().join('')) + ")*$"), ""); - } - - function clearOptionalTail(input) { - var buffer = getActiveBuffer(), tmpBuffer = buffer.slice(), testPos, pos; - for (var pos = tmpBuffer.length - 1; pos >= 0; pos--) { - var testPos = determineTestPosition(pos); - if (getActiveTests()[testPos].optionality) { - if (!isMask(pos) || !isValid(pos, buffer[pos], true)) - tmpBuffer.pop(); - else break; - } else break; - } - writeBuffer(input, tmpBuffer); - } - - function unmaskedvalue($input, skipDatepickerCheck) { - if (getActiveTests() && (skipDatepickerCheck === true || !$input.hasClass('hasDatepicker'))) { - //checkVal(input, false, true); - var umValue = $.map(getActiveBuffer(), function (element, index) { - return isMask(index) && isValid(index, element, true) ? element : null; - }); - var unmaskedValue = (isRTL ? umValue.reverse() : umValue).join(''); - return opts.onUnMask != undefined ? opts.onUnMask.call(this, getActiveBuffer().join(''), unmaskedValue) : unmaskedValue; - } else { - return $input[0]._valueGet(); - } - } - - function TranslatePosition(pos) { - if (isRTL && typeof pos == 'number' && (!opts.greedy || opts.placeholder != "")) { - var bffrLght = getActiveBuffer().length; - pos = bffrLght - pos; - } - return pos; - } - - function caret(input, begin, end) { - var npt = input.jquery && input.length > 0 ? input[0] : input, range; - if (typeof begin == 'number') { - begin = TranslatePosition(begin); - end = TranslatePosition(end); - if (!$(input).is(':visible')) { - return; - } - end = (typeof end == 'number') ? end : begin; - npt.scrollLeft = npt.scrollWidth; - if (opts.insertMode == false && begin == end) end++; //set visualization for insert/overwrite mode - if (npt.setSelectionRange) { - npt.selectionStart = begin; - npt.selectionEnd = android ? begin : end; - - } else if (npt.createTextRange) { - range = npt.createTextRange(); - range.collapse(true); - range.moveEnd('character', end); - range.moveStart('character', begin); - range.select(); - } - } else { - if (!$(input).is(':visible')) { - return { "begin": 0, "end": 0 }; - } - if (npt.setSelectionRange) { - begin = npt.selectionStart; - end = npt.selectionEnd; - } else if (document.selection && document.selection.createRange) { - range = document.selection.createRange(); - begin = 0 - range.duplicate().moveStart('character', -100000); - end = begin + range.text.length; - } - begin = TranslatePosition(begin); - end = TranslatePosition(end); - return { "begin": begin, "end": end }; - } - } - - function isComplete(buffer) { //return true / false / undefined (repeat *) - if (opts.repeat == "*") return undefined; - var complete = false, highestValidPosition = 0, currentActiveMasksetIndex = activeMasksetIndex; - $.each(masksets, function (ndx, ms) { - if (typeof (ms) == "object") { - activeMasksetIndex = ndx; - var aml = seekPrevious(getMaskLength()); - if (ms["lastValidPosition"] >= highestValidPosition && ms["lastValidPosition"] == aml) { - var msComplete = true; - for (var i = 0; i <= aml; i++) { - var mask = isMask(i), testPos = determineTestPosition(i); - if ((mask && (buffer[i] == undefined || buffer[i] == getPlaceHolder(i))) || (!mask && buffer[i] != getActiveBufferTemplate()[testPos])) { - msComplete = false; - break; - } - } - complete = complete || msComplete; - if (complete) //break loop - return false; - } - highestValidPosition = ms["lastValidPosition"]; - } - }); - activeMasksetIndex = currentActiveMasksetIndex; //reset activeMaskset - return complete; - } - - function isSelection(begin, end) { - return isRTL ? (begin - end) > 1 || ((begin - end) == 1 && opts.insertMode) : - (end - begin) > 1 || ((end - begin) == 1 && opts.insertMode); - } - - - //private functions - function installEventRuler(npt) { - var events = $._data(npt).events; - - $.each(events, function (eventType, eventHandlers) { - $.each(eventHandlers, function (ndx, eventHandler) { - if (eventHandler.namespace == "inputmask") { - if (eventHandler.type != "setvalue") { - var handler = eventHandler.handler; - eventHandler.handler = function (e) { - if (this.readOnly || this.disabled) - e.preventDefault; - else - return handler.apply(this, arguments); - }; - } - } - }); - }); - } - - function patchValueProperty(npt) { - var valueProperty; - if (Object.getOwnPropertyDescriptor) - valueProperty = Object.getOwnPropertyDescriptor(npt, "value"); - if (valueProperty && valueProperty.get) { - if (!npt._valueGet) { - var valueGet = valueProperty.get; - var valueSet = valueProperty.set; - npt._valueGet = function () { - return isRTL ? valueGet.call(this).split('').reverse().join('') : valueGet.call(this); - }; - npt._valueSet = function (value) { - valueSet.call(this, isRTL ? value.split('').reverse().join('') : value); - }; - - Object.defineProperty(npt, "value", { - get: function () { - var $self = $(this), inputData = $(this).data('_inputmask'), masksets = inputData['masksets'], - activeMasksetIndex = inputData['activeMasksetIndex']; - return inputData && inputData['opts'].autoUnmask ? $self.inputmask('unmaskedvalue') : valueGet.call(this) != masksets[activeMasksetIndex]['_buffer'].join('') ? valueGet.call(this) : ''; - }, - set: function (value) { - valueSet.call(this, value); - $(this).triggerHandler('setvalue.inputmask'); - } - }); - } - } else if (document.__lookupGetter__ && npt.__lookupGetter__("value")) { - if (!npt._valueGet) { - var valueGet = npt.__lookupGetter__("value"); - var valueSet = npt.__lookupSetter__("value"); - npt._valueGet = function () { - return isRTL ? valueGet.call(this).split('').reverse().join('') : valueGet.call(this); - }; - npt._valueSet = function (value) { - valueSet.call(this, isRTL ? value.split('').reverse().join('') : value); - }; - - npt.__defineGetter__("value", function () { - var $self = $(this), inputData = $(this).data('_inputmask'), masksets = inputData['masksets'], - activeMasksetIndex = inputData['activeMasksetIndex']; - return inputData && inputData['opts'].autoUnmask ? $self.inputmask('unmaskedvalue') : valueGet.call(this) != masksets[activeMasksetIndex]['_buffer'].join('') ? valueGet.call(this) : ''; - }); - npt.__defineSetter__("value", function (value) { - valueSet.call(this, value); - $(this).triggerHandler('setvalue.inputmask'); - }); - } - } else { - if (!npt._valueGet) { - npt._valueGet = function () { return isRTL ? this.value.split('').reverse().join('') : this.value; }; - npt._valueSet = function (value) { this.value = isRTL ? value.split('').reverse().join('') : value; }; - } - if ($.valHooks.text == undefined || $.valHooks.text.inputmaskpatch != true) { - var valueGet = $.valHooks.text && $.valHooks.text.get ? $.valHooks.text.get : function (elem) { return elem.value; }; - var valueSet = $.valHooks.text && $.valHooks.text.set ? $.valHooks.text.set : function (elem, value) { - elem.value = value; - return elem; - }; - - jQuery.extend($.valHooks, { - text: { - get: function (elem) { - var $elem = $(elem); - if ($elem.data('_inputmask')) { - if ($elem.data('_inputmask')['opts'].autoUnmask) - return $elem.inputmask('unmaskedvalue'); - else { - var result = valueGet(elem), - inputData = $elem.data('_inputmask'), masksets = inputData['masksets'], - activeMasksetIndex = inputData['activeMasksetIndex']; - return result != masksets[activeMasksetIndex]['_buffer'].join('') ? result : ''; - } - } else return valueGet(elem); - }, - set: function (elem, value) { - var $elem = $(elem); - var result = valueSet(elem, value); - if ($elem.data('_inputmask')) $elem.triggerHandler('setvalue.inputmask'); - return result; - }, - inputmaskpatch: true - } - }); - } - } - } - - //shift chars to left from start to end and put c at end position if defined - - function shiftL(start, end, c, maskJumps) { - var buffer = getActiveBuffer(); - if (maskJumps !== false) //jumping over nonmask position - while (!isMask(start) && start - 1 >= 0) start--; - for (var i = start; i < end && i < getMaskLength() ; i++) { - if (isMask(i)) { - setReTargetPlaceHolder(buffer, i); - var j = seekNext(i); - var p = getBufferElement(buffer, j); - if (p != getPlaceHolder(j)) { - if (j < getMaskLength() && isValid(i, p, true) !== false && getActiveTests()[determineTestPosition(i)].def == getActiveTests()[determineTestPosition(j)].def) { - setBufferElement(buffer, i, p, true); - } else { - if (isMask(i)) - break; - } - } - } else { - setReTargetPlaceHolder(buffer, i); - } - } - if (c != undefined) - setBufferElement(buffer, seekPrevious(end), c); - - if (getActiveMaskSet()["greedy"] == false) { - var trbuffer = truncateInput(buffer.join('')).split(''); - buffer.length = trbuffer.length; - for (var i = 0, bl = buffer.length; i < bl; i++) { - buffer[i] = trbuffer[i]; - } - if (buffer.length == 0) getActiveMaskSet()["buffer"] = getActiveBufferTemplate().slice(); - } - return start; //return the used start position - } - - function shiftR(start, end, c) { - var buffer = getActiveBuffer(); - if (getBufferElement(buffer, start, true) != getPlaceHolder(start)) { - for (var i = seekPrevious(end) ; i > start && i >= 0; i--) { - if (isMask(i)) { - var j = seekPrevious(i); - var t = getBufferElement(buffer, j); - if (t != getPlaceHolder(j)) { - if (isValid(j, t, true) !== false && getActiveTests()[determineTestPosition(i)].def == getActiveTests()[determineTestPosition(j)].def) { - setBufferElement(buffer, i, t, true); - setReTargetPlaceHolder(buffer, j); - } //else break; - } - } else - setReTargetPlaceHolder(buffer, i); - } - } - if (c != undefined && getBufferElement(buffer, start) == getPlaceHolder(start)) - setBufferElement(buffer, start, c); - var lengthBefore = buffer.length; - if (getActiveMaskSet()["greedy"] == false) { - var trbuffer = truncateInput(buffer.join('')).split(''); - buffer.length = trbuffer.length; - for (var i = 0, bl = buffer.length; i < bl; i++) { - buffer[i] = trbuffer[i]; - } - if (buffer.length == 0) getActiveMaskSet()["buffer"] = getActiveBufferTemplate().slice(); - } - return end - (lengthBefore - buffer.length); //return new start position - } - - ; - - - function HandleRemove(input, k, pos) { - if (opts.numericInput || isRTL) { - switch (k) { - case opts.keyCode.BACKSPACE: - k = opts.keyCode.DELETE; - break; - case opts.keyCode.DELETE: - k = opts.keyCode.BACKSPACE; - break; - } - if (isRTL) { - var pend = pos.end; - pos.end = pos.begin; - pos.begin = pend; - } - } - - var isSelection = true; - if (pos.begin == pos.end) { - var posBegin = k == opts.keyCode.BACKSPACE ? pos.begin - 1 : pos.begin; - if (opts.isNumeric && opts.radixPoint != "" && getActiveBuffer()[posBegin] == opts.radixPoint) { - pos.begin = (getActiveBuffer().length - 1 == posBegin) /* radixPoint is latest? delete it */ ? pos.begin : k == opts.keyCode.BACKSPACE ? posBegin : seekNext(posBegin); - pos.end = pos.begin; - } - isSelection = false; - if (k == opts.keyCode.BACKSPACE) - pos.begin--; - else if (k == opts.keyCode.DELETE) - pos.end++; - } else if (pos.end - pos.begin == 1 && !opts.insertMode) { - isSelection = false; - if (k == opts.keyCode.BACKSPACE) - pos.begin--; - } - - clearBuffer(getActiveBuffer(), pos.begin, pos.end); - - var ml = getMaskLength(); - if (opts.greedy == false) { - shiftL(pos.begin, ml, undefined, !isRTL && (k == opts.keyCode.BACKSPACE && !isSelection)); - } else { - var newpos = pos.begin; - for (var i = pos.begin; i < pos.end; i++) { //seeknext to skip placeholders at start in selection - if (isMask(i) || !isSelection) - newpos = shiftL(pos.begin, ml, undefined, !isRTL && (k == opts.keyCode.BACKSPACE && !isSelection)); - } - if (!isSelection) pos.begin = newpos; - } - var firstMaskPos = seekNext(-1); - clearBuffer(getActiveBuffer(), pos.begin, pos.end, true); - checkVal(input, false, masksets[1] == undefined || firstMaskPos >= pos.end, getActiveBuffer()); - if (getActiveMaskSet()['lastValidPosition'] < firstMaskPos) { - getActiveMaskSet()["lastValidPosition"] = -1; - getActiveMaskSet()["p"] = firstMaskPos; - } else { - getActiveMaskSet()["p"] = pos.begin; - } - } - - function keydownEvent(e) { - //Safari 5.1.x - modal dialog fires keypress twice workaround - skipKeyPressEvent = false; - var input = this, $input = $(input), k = e.keyCode, pos = caret(input); - - //backspace, delete, and escape get special treatment - if (k == opts.keyCode.BACKSPACE || k == opts.keyCode.DELETE || (iphone && k == 127) || e.ctrlKey && k == 88) { //backspace/delete - e.preventDefault(); //stop default action but allow propagation - if (k == 88) valueOnFocus = getActiveBuffer().join(''); - HandleRemove(input, k, pos); - determineActiveMasksetIndex(); - writeBuffer(input, getActiveBuffer(), getActiveMaskSet()["p"]); - if (input._valueGet() == getActiveBufferTemplate().join('')) - $input.trigger('cleared'); - - if (opts.showTooltip) { //update tooltip - $input.prop("title", getActiveMaskSet()["mask"]); - } - } else if (k == opts.keyCode.END || k == opts.keyCode.PAGE_DOWN) { //when END or PAGE_DOWN pressed set position at lastmatch - setTimeout(function () { - var caretPos = seekNext(getActiveMaskSet()["lastValidPosition"]); - if (!opts.insertMode && caretPos == getMaskLength() && !e.shiftKey) caretPos--; - caret(input, e.shiftKey ? pos.begin : caretPos, caretPos); - }, 0); - } else if ((k == opts.keyCode.HOME && !e.shiftKey) || k == opts.keyCode.PAGE_UP) { //Home or page_up - caret(input, 0, e.shiftKey ? pos.begin : 0); - } else if (k == opts.keyCode.ESCAPE || (k == 90 && e.ctrlKey)) { //escape && undo - checkVal(input, true, false, valueOnFocus.split('')); - $input.click(); - } else if (k == opts.keyCode.INSERT && !(e.shiftKey || e.ctrlKey)) { //insert - opts.insertMode = !opts.insertMode; - caret(input, !opts.insertMode && pos.begin == getMaskLength() ? pos.begin - 1 : pos.begin); - } else if (opts.insertMode == false && !e.shiftKey) { - if (k == opts.keyCode.RIGHT) { - setTimeout(function () { - var caretPos = caret(input); - caret(input, caretPos.begin); - }, 0); - } else if (k == opts.keyCode.LEFT) { - setTimeout(function () { - var caretPos = caret(input); - caret(input, caretPos.begin - 1); - }, 0); - } - } - - var currentCaretPos = caret(input); - if (opts.onKeyDown.call(this, e, getActiveBuffer(), opts) === true) //extra stuff to execute on keydown - caret(input, currentCaretPos.begin, currentCaretPos.end); - ignorable = $.inArray(k, opts.ignorables) != -1; - } - - - function keypressEvent(e, checkval, k, writeOut, strict, ndx) { - //Safari 5.1.x - modal dialog fires keypress twice workaround - if (k == undefined && skipKeyPressEvent) return false; - skipKeyPressEvent = true; - - var input = this, $input = $(input); - - e = e || window.event; - var k = checkval ? k : (e.which || e.charCode || e.keyCode); - - if (checkval !== true && (!(e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || ignorable))) { - return true; - } else { - if (k) { - //special treat the decimal separator - if (checkval !== true && k == 46 && e.shiftKey == false && opts.radixPoint == ",") k = 44; - - var pos, results, result, c = String.fromCharCode(k); - if (checkval) { - var pcaret = strict ? ndx : getActiveMaskSet()["lastValidPosition"] + 1; - pos = { begin: pcaret, end: pcaret }; - } else { - pos = caret(input); - } - - //should we clear a possible selection?? - var isSlctn = isSelection(pos.begin, pos.end), redetermineLVP = false, - initialIndex = activeMasksetIndex; - if (isSlctn) { - activeMasksetIndex = initialIndex; - $.each(masksets, function (ndx, lmnt) { //init undobuffer for recovery when not valid - if (typeof (lmnt) == "object") { - activeMasksetIndex = ndx; - getActiveMaskSet()["undoBuffer"] = getActiveBuffer().join(''); - } - }); - HandleRemove(input, opts.keyCode.DELETE, pos); - if (!opts.insertMode) { //preserve some space - $.each(masksets, function (ndx, lmnt) { - if (typeof (lmnt) == "object") { - activeMasksetIndex = ndx; - shiftR(pos.begin, getMaskLength()); - getActiveMaskSet()["lastValidPosition"] = seekNext(getActiveMaskSet()["lastValidPosition"]); - } - }); - } - activeMasksetIndex = initialIndex; //restore index - } - - var radixPosition = getActiveBuffer().join('').indexOf(opts.radixPoint); - if (opts.isNumeric && checkval !== true && radixPosition != -1) { - if (opts.greedy && pos.begin <= radixPosition) { - pos.begin = seekPrevious(pos.begin); - pos.end = pos.begin; - } else if (c == opts.radixPoint) { - pos.begin = radixPosition; - pos.end = pos.begin; - } - } - - - var p = pos.begin; - results = isValid(p, c, strict); - if (strict === true) results = [{ "activeMasksetIndex": activeMasksetIndex, "result": results }]; - var minimalForwardPosition = -1; - $.each(results, function (index, result) { - activeMasksetIndex = result["activeMasksetIndex"]; - getActiveMaskSet()["writeOutBuffer"] = true; - var np = result["result"]; - if (np !== false) { - var refresh = false, buffer = getActiveBuffer(); - if (np !== true) { - refresh = np["refresh"]; //only rewrite buffer from isValid - p = np.pos != undefined ? np.pos : p; //set new position from isValid - c = np.c != undefined ? np.c : c; //set new char from isValid - } - if (refresh !== true) { - if (opts.insertMode == true) { - var lastUnmaskedPosition = getMaskLength(); - var bfrClone = buffer.slice(); - while (getBufferElement(bfrClone, lastUnmaskedPosition, true) != getPlaceHolder(lastUnmaskedPosition) && lastUnmaskedPosition >= p) { - lastUnmaskedPosition = lastUnmaskedPosition == 0 ? -1 : seekPrevious(lastUnmaskedPosition); - } - if (lastUnmaskedPosition >= p) { - shiftR(p, getMaskLength(), c); - //shift the lvp if needed - var lvp = getActiveMaskSet()["lastValidPosition"], nlvp = seekNext(lvp); - if (nlvp != getMaskLength() && lvp >= p && (getBufferElement(getActiveBuffer(), nlvp, true) != getPlaceHolder(nlvp))) { - getActiveMaskSet()["lastValidPosition"] = nlvp; - } - } else getActiveMaskSet()["writeOutBuffer"] = false; - } else setBufferElement(buffer, p, c, true); - if (minimalForwardPosition == -1 || minimalForwardPosition > seekNext(p)) { - minimalForwardPosition = seekNext(p); - } - } else if (!strict) { - var nextPos = p < getMaskLength() ? p + 1 : p; - if (minimalForwardPosition == -1 || minimalForwardPosition > nextPos) { - minimalForwardPosition = nextPos; - } - } - if (minimalForwardPosition > getActiveMaskSet()["p"]) - getActiveMaskSet()["p"] = minimalForwardPosition; //needed for checkval strict - } - }); - - if (strict !== true) { - activeMasksetIndex = initialIndex; - determineActiveMasksetIndex(); - } - if (writeOut !== false) { - $.each(results, function (ndx, rslt) { - if (rslt["activeMasksetIndex"] == activeMasksetIndex) { - result = rslt; - return false; - } - }); - if (result != undefined) { - var self = this; - setTimeout(function () { opts.onKeyValidation.call(self, result["result"], opts); }, 0); - if (getActiveMaskSet()["writeOutBuffer"] && result["result"] !== false) { - var buffer = getActiveBuffer(); - - var newCaretPosition; - if (checkval) { - newCaretPosition = undefined; - } else if (opts.numericInput) { - if (p > radixPosition) { - newCaretPosition = seekPrevious(minimalForwardPosition); - } else if (c == opts.radixPoint) { - newCaretPosition = minimalForwardPosition - 1; - } else newCaretPosition = seekPrevious(minimalForwardPosition - 1); - } else { - newCaretPosition = minimalForwardPosition; - } - - writeBuffer(input, buffer, newCaretPosition); - if (checkval !== true) { - setTimeout(function () { //timeout needed for IE - if (isComplete(buffer) === true) - $input.trigger("complete"); - skipInputEvent = true; - $input.trigger("input"); - }, 0); - } - } else if (isSlctn) { - getActiveMaskSet()["buffer"] = getActiveMaskSet()["undoBuffer"].split(''); - } - } - } - - if (opts.showTooltip) { //update tooltip - $input.prop("title", getActiveMaskSet()["mask"]); - } - - //needed for IE8 and below - if (e) e.preventDefault ? e.preventDefault() : e.returnValue = false; - } - } - } - - function keyupEvent(e) { - var $input = $(this), input = this, k = e.keyCode, buffer = getActiveBuffer(); - - if (androidchrome && k == opts.keyCode.BACKSPACE) { - if (chromeValueOnInput == input._valueGet()) - keydownEvent.call(this, e); - } - - opts.onKeyUp.call(this, e, buffer, opts); //extra stuff to execute on keyup - if (k == opts.keyCode.TAB && opts.showMaskOnFocus) { - if ($input.hasClass('focus.inputmask') && input._valueGet().length == 0) { - buffer = getActiveBufferTemplate().slice(); - writeBuffer(input, buffer); - caret(input, 0); - valueOnFocus = getActiveBuffer().join(''); - } else { - writeBuffer(input, buffer); - if (buffer.join('') == getActiveBufferTemplate().join('') && $.inArray(opts.radixPoint, buffer) != -1) { - caret(input, TranslatePosition(0)); - $input.click(); - } else - caret(input, TranslatePosition(0), TranslatePosition(getMaskLength())); - } - } - } - - function inputEvent(e) { - if (skipInputEvent === true) { - skipInputEvent = false; - return true; - } - var input = this, $input = $(input); - - chromeValueOnInput = getActiveBuffer().join(''); - checkVal(input, false, false); - writeBuffer(input, getActiveBuffer()); - if (isComplete(getActiveBuffer()) === true) - $input.trigger("complete"); - $input.click(); - } - - function mask(el) { - $el = $(el); - if ($el.is(":input")) { - //store tests & original buffer in the input element - used to get the unmasked value - $el.data('_inputmask', { - 'masksets': masksets, - 'activeMasksetIndex': activeMasksetIndex, - 'opts': opts, - 'isRTL': false - }); - - //show tooltip - if (opts.showTooltip) { - $el.prop("title", getActiveMaskSet()["mask"]); - } - - //correct greedy setting if needed - getActiveMaskSet()['greedy'] = getActiveMaskSet()['greedy'] ? getActiveMaskSet()['greedy'] : getActiveMaskSet()['repeat'] == 0; - - //handle maxlength attribute - if ($el.attr("maxLength") != null) //only when the attribute is set - { - var maxLength = $el.prop('maxLength'); - if (maxLength > -1) { //handle *-repeat - $.each(masksets, function (ndx, ms) { - if (typeof (ms) == "object") { - if (ms["repeat"] == "*") { - ms["repeat"] = maxLength; - } - } - }); - } - if (getMaskLength() >= maxLength && maxLength > -1) { //FF sets no defined max length to -1 - if (maxLength < getActiveBufferTemplate().length) getActiveBufferTemplate().length = maxLength; - if (getActiveMaskSet()['greedy'] == false) { - getActiveMaskSet()['repeat'] = Math.round(maxLength / getActiveBufferTemplate().length); - } - $el.prop('maxLength', getMaskLength() * 2); - } - } - - patchValueProperty(el); - - if (opts.numericInput) opts.isNumeric = opts.numericInput; - if (el.dir == "rtl" || (opts.numericInput && opts.rightAlignNumerics) || (opts.isNumeric && opts.rightAlignNumerics)) - $el.css("text-align", "right"); - - if (el.dir == "rtl" || opts.numericInput) { - el.dir = "ltr"; - $el.removeAttr("dir"); - var inputData = $el.data('_inputmask'); - inputData['isRTL'] = true; - $el.data('_inputmask', inputData); - isRTL = true; - } - - //unbind all events - to make sure that no other mask will interfere when re-masking - $el.unbind(".inputmask"); - $el.removeClass('focus.inputmask'); - //bind events - $el.closest('form').bind("submit", function () { //trigger change on submit if any - if (valueOnFocus != getActiveBuffer().join('')) { - $el.change(); - } - }).bind('reset', function () { - setTimeout(function () { - $el.trigger("setvalue"); - }, 0); - }); - $el.bind("mouseenter.inputmask", function () { - var $input = $(this), input = this; - if (!$input.hasClass('focus.inputmask') && opts.showMaskOnHover) { - if (input._valueGet() != getActiveBuffer().join('')) { - writeBuffer(input, getActiveBuffer()); - } - } - }).bind("blur.inputmask", function () { - var $input = $(this), input = this, nptValue = input._valueGet(), buffer = getActiveBuffer(); - $input.removeClass('focus.inputmask'); - if (valueOnFocus != getActiveBuffer().join('')) { - $input.change(); - } - if (opts.clearMaskOnLostFocus && nptValue != '') { - if (nptValue == getActiveBufferTemplate().join('')) - input._valueSet(''); - else { //clearout optional tail of the mask - clearOptionalTail(input); - } - } - if (isComplete(buffer) === false) { - $input.trigger("incomplete"); - if (opts.clearIncomplete) { - $.each(masksets, function (ndx, ms) { - if (typeof (ms) == "object") { - ms["buffer"] = ms["_buffer"].slice(); - ms["lastValidPosition"] = -1; - } - }); - activeMasksetIndex = 0; - if (opts.clearMaskOnLostFocus) - input._valueSet(''); - else { - buffer = getActiveBufferTemplate().slice(); - writeBuffer(input, buffer); - } - } - } - }).bind("focus.inputmask", function () { - var $input = $(this), input = this, nptValue = input._valueGet(); - if (opts.showMaskOnFocus && !$input.hasClass('focus.inputmask') && (!opts.showMaskOnHover || (opts.showMaskOnHover && nptValue == ''))) { - if (input._valueGet() != getActiveBuffer().join('')) { - writeBuffer(input, getActiveBuffer(), seekNext(getActiveMaskSet()["lastValidPosition"])); - } - } - $input.addClass('focus.inputmask'); - valueOnFocus = getActiveBuffer().join(''); - }).bind("mouseleave.inputmask", function () { - var $input = $(this), input = this; - if (opts.clearMaskOnLostFocus) { - if (!$input.hasClass('focus.inputmask') && input._valueGet() != $input.attr("placeholder")) { - if (input._valueGet() == getActiveBufferTemplate().join('') || input._valueGet() == '') - input._valueSet(''); - else { //clearout optional tail of the mask - clearOptionalTail(input); - } - } - } - }).bind("click.inputmask", function () { - var input = this; - setTimeout(function () { - var selectedCaret = caret(input), buffer = getActiveBuffer(); - if (selectedCaret.begin == selectedCaret.end) { - var clickPosition = isRTL ? TranslatePosition(selectedCaret.begin) : selectedCaret.begin, - lvp = getActiveMaskSet()["lastValidPosition"], - lastPosition; - if (opts.isNumeric) { - lastPosition = opts.skipRadixDance === false && opts.radixPoint != "" && $.inArray(opts.radixPoint, buffer) != -1 ? - (opts.numericInput ? seekNext($.inArray(opts.radixPoint, buffer)) : $.inArray(opts.radixPoint, buffer)) : - seekNext(lvp); - } else { - lastPosition = seekNext(lvp); - } - if (clickPosition < lastPosition) { - if (isMask(clickPosition)) - caret(input, clickPosition); - else caret(input, seekNext(clickPosition)); - } else - caret(input, lastPosition); - } - }, 0); - }).bind('dblclick.inputmask', function () { - var input = this; - setTimeout(function () { - caret(input, 0, seekNext(getActiveMaskSet()["lastValidPosition"])); - }, 0); - }).bind(pasteEvent + ".inputmask dragdrop.inputmask drop.inputmask", function (e) { - if (skipInputEvent === true) { - skipInputEvent = false; - return true; - } - var input = this, $input = $(input); - - //paste event for IE8 and lower I guess ;-) - if (e.type == "propertychange" && input._valueGet().length <= getMaskLength()) { - return true; - } - setTimeout(function () { - var pasteValue = opts.onBeforePaste != undefined ? opts.onBeforePaste.call(this, input._valueGet()) : input._valueGet(); - checkVal(input, true, false, pasteValue.split(''), true); - if (isComplete(getActiveBuffer()) === true) - $input.trigger("complete"); - $input.click(); - }, 0); - }).bind('setvalue.inputmask', function () { - var input = this; - checkVal(input, true); - valueOnFocus = getActiveBuffer().join(''); - if (input._valueGet() == getActiveBufferTemplate().join('')) - input._valueSet(''); - }).bind('complete.inputmask', opts.oncomplete - ).bind('incomplete.inputmask', opts.onincomplete - ).bind('cleared.inputmask', opts.oncleared - ).bind("keyup.inputmask", keyupEvent); - - if (androidchrome) { - $el.bind("input.inputmask", inputEvent); - } else { - $el.bind("keydown.inputmask", keydownEvent - ).bind("keypress.inputmask", keypressEvent); - } - - if (msie10) - $el.bind("input.inputmask", inputEvent); - - //apply mask - checkVal(el, true, false); - valueOnFocus = getActiveBuffer().join(''); - // Wrap document.activeElement in a try/catch block since IE9 throw "Unspecified error" if document.activeElement is undefined when we are in an IFrame. - var activeElement; - try { - activeElement = document.activeElement; - } catch (e) { - } - if (activeElement === el) { //position the caret when in focus - $el.addClass('focus.inputmask'); - caret(el, seekNext(getActiveMaskSet()["lastValidPosition"])); - } else if (opts.clearMaskOnLostFocus) { - if (getActiveBuffer().join('') == getActiveBufferTemplate().join('')) { - el._valueSet(''); - } else { - clearOptionalTail(el); - } - } else { - writeBuffer(el, getActiveBuffer()); - } - - installEventRuler(el); - } - } - - //action object - if (actionObj != undefined) { - switch (actionObj["action"]) { - case "isComplete": - return isComplete(actionObj["buffer"]); - case "unmaskedvalue": - isRTL = actionObj["$input"].data('_inputmask')['isRTL']; - return unmaskedvalue(actionObj["$input"], actionObj["skipDatepickerCheck"]); - case "mask": - mask(actionObj["el"]); - break; - case "format": - $el = $({}); - $el.data('_inputmask', { - 'masksets': masksets, - 'activeMasksetIndex': activeMasksetIndex, - 'opts': opts, - 'isRTL': opts.numericInput - }); - if (opts.numericInput) { - opts.isNumeric = opts.numericInput; - isRTL = true; - } - - checkVal($el, false, false, actionObj["value"].split(''), true); - return getActiveBuffer().join(''); - } - } - }; - - $.inputmask = { - //options default - defaults: { - placeholder: "_", - optionalmarker: { start: "[", end: "]" }, - quantifiermarker: { start: "{", end: "}" }, - groupmarker: { start: "(", end: ")" }, - escapeChar: "\\", - mask: null, - oncomplete: $.noop, //executes when the mask is complete - onincomplete: $.noop, //executes when the mask is incomplete and focus is lost - oncleared: $.noop, //executes when the mask is cleared - repeat: 0, //repetitions of the mask: * ~ forever, otherwise specify an integer - greedy: true, //true: allocated buffer for the mask and repetitions - false: allocate only if needed - autoUnmask: false, //automatically unmask when retrieving the value with $.fn.val or value if the browser supports __lookupGetter__ or getOwnPropertyDescriptor - clearMaskOnLostFocus: true, - insertMode: true, //insert the input or overwrite the input - clearIncomplete: false, //clear the incomplete input on blur - aliases: {}, //aliases definitions => see jquery.inputmask.extensions.js - onKeyUp: $.noop, //override to implement autocomplete on certain keys for example - onKeyDown: $.noop, //override to implement autocomplete on certain keys for example - onBeforePaste: undefined, //executes before masking the pasted value to allow preprocessing of the pasted value. args => pastedValue => return processedValue - onUnMask: undefined, //executes after unmasking to allow postprocessing of the unmaskedvalue. args => maskedValue, unmaskedValue - showMaskOnFocus: true, //show the mask-placeholder when the input has focus - showMaskOnHover: true, //show the mask-placeholder when hovering the empty input - onKeyValidation: $.noop, //executes on every key-press with the result of isValid. Params: result, opts - skipOptionalPartCharacter: " ", //a character which can be used to skip an optional part of a mask - showTooltip: false, //show the activemask as tooltip - numericInput: false, //numericInput input direction style (input shifts to the left while holding the caret position) - //numeric basic properties - isNumeric: false, //enable numeric features - radixPoint: "", //".", // | "," - skipRadixDance: false, //disable radixpoint caret positioning - rightAlignNumerics: true, //align numerics to the right - //numeric basic properties - definitions: { - '9': { - validator: "[0-9]", - cardinality: 1 - }, - 'a': { - validator: "[A-Za-z\u0410-\u044F\u0401\u0451]", - cardinality: 1 - }, - '*': { - validator: "[A-Za-z\u0410-\u044F\u0401\u04510-9]", - cardinality: 1 - } - }, - keyCode: { - ALT: 18, BACKSPACE: 8, CAPS_LOCK: 20, COMMA: 188, COMMAND: 91, COMMAND_LEFT: 91, COMMAND_RIGHT: 93, CONTROL: 17, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, INSERT: 45, LEFT: 37, MENU: 93, NUMPAD_ADD: 107, NUMPAD_DECIMAL: 110, NUMPAD_DIVIDE: 111, NUMPAD_ENTER: 108, - NUMPAD_MULTIPLY: 106, NUMPAD_SUBTRACT: 109, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SHIFT: 16, SPACE: 32, TAB: 9, UP: 38, WINDOWS: 91 - }, - //specify keycodes which should not be considered in the keypress event, otherwise the preventDefault will stop their default behavior especially in FF - ignorables: [8, 9, 13, 19, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123], - getMaskLength: function (buffer, greedy, repeat, currentBuffer, opts) { - var calculatedLength = buffer.length; - if (!greedy) { - if (repeat == "*") { - calculatedLength = currentBuffer.length + 1; - } else if (repeat > 1) { - calculatedLength += (buffer.length * (repeat - 1)); - } - } - return calculatedLength; - } - }, - escapeRegex: function (str) { - var specials = ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\']; - return str.replace(new RegExp('(\\' + specials.join('|\\') + ')', 'gim'), '\\$1'); - }, - format: function (value, options) { - var opts = $.extend(true, {}, $.inputmask.defaults, options); - resolveAlias(opts.alias, options, opts); - return maskScope(generateMaskSets(opts), 0, opts, { "action": "format", "value": value }); - } - }; - - $.fn.inputmask = function (fn, options) { - var opts = $.extend(true, {}, $.inputmask.defaults, options), - masksets, - activeMasksetIndex = 0; - - if (typeof fn === "string") { - switch (fn) { - case "mask": - //resolve possible aliases given by options - resolveAlias(opts.alias, options, opts); - masksets = generateMaskSets(opts); - if (masksets.length == 0) { return this; } - - return this.each(function () { - maskScope($.extend(true, {}, masksets), 0, opts, { "action": "mask", "el": this }); - }); - case "unmaskedvalue": - var $input = $(this), input = this; - if ($input.data('_inputmask')) { - masksets = $input.data('_inputmask')['masksets']; - activeMasksetIndex = $input.data('_inputmask')['activeMasksetIndex']; - opts = $input.data('_inputmask')['opts']; - return maskScope(masksets, activeMasksetIndex, opts, { "action": "unmaskedvalue", "$input": $input }); - } else return $input.val(); - case "remove": - return this.each(function () { - var $input = $(this), input = this; - if ($input.data('_inputmask')) { - masksets = $input.data('_inputmask')['masksets']; - activeMasksetIndex = $input.data('_inputmask')['activeMasksetIndex']; - opts = $input.data('_inputmask')['opts']; - //writeout the unmaskedvalue - input._valueSet(maskScope(masksets, activeMasksetIndex, opts, { "action": "unmaskedvalue", "$input": $input, "skipDatepickerCheck": true })); - //clear data - $input.removeData('_inputmask'); - //unbind all events - $input.unbind(".inputmask"); - $input.removeClass('focus.inputmask'); - //restore the value property - var valueProperty; - if (Object.getOwnPropertyDescriptor) - valueProperty = Object.getOwnPropertyDescriptor(input, "value"); - if (valueProperty && valueProperty.get) { - if (input._valueGet) { - Object.defineProperty(input, "value", { - get: input._valueGet, - set: input._valueSet - }); - } - } else if (document.__lookupGetter__ && input.__lookupGetter__("value")) { - if (input._valueGet) { - input.__defineGetter__("value", input._valueGet); - input.__defineSetter__("value", input._valueSet); - } - } - try { //try catch needed for IE7 as it does not supports deleting fns - delete input._valueGet; - delete input._valueSet; - } catch (e) { - input._valueGet = undefined; - input._valueSet = undefined; - - } - } - }); - break; - case "getemptymask": //return the default (empty) mask value, usefull for setting the default value in validation - if (this.data('_inputmask')) { - masksets = this.data('_inputmask')['masksets']; - activeMasksetIndex = this.data('_inputmask')['activeMasksetIndex']; - return masksets[activeMasksetIndex]['_buffer'].join(''); - } - else return ""; - case "hasMaskedValue": //check wheter the returned value is masked or not; currently only works reliable when using jquery.val fn to retrieve the value - return this.data('_inputmask') ? !this.data('_inputmask')['opts'].autoUnmask : false; - case "isComplete": - masksets = this.data('_inputmask')['masksets']; - activeMasksetIndex = this.data('_inputmask')['activeMasksetIndex']; - opts = this.data('_inputmask')['opts']; - return maskScope(masksets, activeMasksetIndex, opts, { "action": "isComplete", "buffer": this[0]._valueGet().split('') }); - case "getmetadata": //return mask metadata if exists - if (this.data('_inputmask')) { - masksets = this.data('_inputmask')['masksets']; - activeMasksetIndex = this.data('_inputmask')['activeMasksetIndex']; - return masksets[activeMasksetIndex]['metadata']; - } - else return undefined; - default: - //check if the fn is an alias - if (!resolveAlias(fn, options, opts)) { - //maybe fn is a mask so we try - //set mask - opts.mask = fn; - } - masksets = generateMaskSets(opts); - if (masksets.length == 0) { return this; } - return this.each(function () { - maskScope($.extend(true, {}, masksets), activeMasksetIndex, opts, { "action": "mask", "el": this }); - }); - - break; - } - } else if (typeof fn == "object") { - opts = $.extend(true, {}, $.inputmask.defaults, fn); - - resolveAlias(opts.alias, fn, opts); //resolve aliases - masksets = generateMaskSets(opts); - if (masksets.length == 0) { return this; } - return this.each(function () { - maskScope($.extend(true, {}, masksets), activeMasksetIndex, opts, { "action": "mask", "el": this }); - }); - } else if (fn == undefined) { - //look for data-inputmask atribute - the attribute should only contain optipns - return this.each(function () { - var attrOptions = $(this).attr("data-inputmask"); - if (attrOptions && attrOptions != "") { - try { - attrOptions = attrOptions.replace(new RegExp("'", "g"), '"'); - var dataoptions = $.parseJSON("{" + attrOptions + "}"); - $.extend(true, dataoptions, options); - opts = $.extend(true, {}, $.inputmask.defaults, dataoptions); - resolveAlias(opts.alias, dataoptions, opts); - opts.alias = undefined; - $(this).inputmask(opts); - } catch (ex) { } //need a more relax parseJSON - } - }); - } - }; - } -})(jQuery); diff --git a/web/assetic/admin_lte_js.js b/web/assetic/admin_lte_js.js deleted file mode 100644 index 3df739baac..0000000000 --- a/web/assetic/admin_lte_js.js +++ /dev/null @@ -1,13923 +0,0 @@ -/* ========================================================= - * bootstrap-slider.js v2.0.0 - * http://www.eyecon.ro/bootstrap-slider - * ========================================================= - * Copyright 2012 Stefan Petre - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================= */ - -!function( $ ) { - - var Slider = function(element, options) { - this.element = $(element); - this.picker = $('
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
'+ - '
') - .insertBefore(this.element) - .append(this.element); - this.id = this.element.data('slider-id')||options.id; - if (this.id) { - this.picker[0].id = this.id; - } - - if (typeof Modernizr !== 'undefined' && Modernizr.touch) { - this.touchCapable = true; - } - - var tooltip = this.element.data('slider-tooltip')||options.tooltip; - - this.tooltip = this.picker.find('.tooltip'); - this.tooltipInner = this.tooltip.find('div.tooltip-inner'); - - this.orientation = this.element.data('slider-orientation')||options.orientation; - switch(this.orientation) { - case 'vertical': - this.picker.addClass('slider-vertical'); - this.stylePos = 'top'; - this.mousePos = 'pageY'; - this.sizePos = 'offsetHeight'; - this.tooltip.addClass('right')[0].style.left = '100%'; - break; - default: - this.picker - .addClass('slider-horizontal') - .css('width', this.element.outerWidth()); - this.orientation = 'horizontal'; - this.stylePos = 'left'; - this.mousePos = 'pageX'; - this.sizePos = 'offsetWidth'; - this.tooltip.addClass('top')[0].style.top = -this.tooltip.outerHeight() - 14 + 'px'; - break; - } - - this.min = this.element.data('slider-min')||options.min; - this.max = this.element.data('slider-max')||options.max; - this.step = this.element.data('slider-step')||options.step; - this.value = this.element.data('slider-value')||options.value; - if (this.value[1]) { - this.range = true; - } - - this.selection = this.element.data('slider-selection')||options.selection; - this.selectionEl = this.picker.find('.slider-selection'); - if (this.selection === 'none') { - this.selectionEl.addClass('hide'); - } - this.selectionElStyle = this.selectionEl[0].style; - - - this.handle1 = this.picker.find('.slider-handle:first'); - this.handle1Stype = this.handle1[0].style; - this.handle2 = this.picker.find('.slider-handle:last'); - this.handle2Stype = this.handle2[0].style; - - var handle = this.element.data('slider-handle')||options.handle; - switch(handle) { - case 'round': - this.handle1.addClass('round'); - this.handle2.addClass('round'); - break - case 'triangle': - this.handle1.addClass('triangle'); - this.handle2.addClass('triangle'); - break - } - - if (this.range) { - this.value[0] = Math.max(this.min, Math.min(this.max, this.value[0])); - this.value[1] = Math.max(this.min, Math.min(this.max, this.value[1])); - } else { - this.value = [ Math.max(this.min, Math.min(this.max, this.value))]; - this.handle2.addClass('hide'); - if (this.selection == 'after') { - this.value[1] = this.max; - } else { - this.value[1] = this.min; - } - } - this.diff = this.max - this.min; - this.percentage = [ - (this.value[0]-this.min)*100/this.diff, - (this.value[1]-this.min)*100/this.diff, - this.step*100/this.diff - ]; - - this.offset = this.picker.offset(); - this.size = this.picker[0][this.sizePos]; - - this.formater = options.formater; - - this.layout(); - - if (this.touchCapable) { - // Touch: Bind touch events: - this.picker.on({ - touchstart: $.proxy(this.mousedown, this) - }); - } else { - this.picker.on({ - mousedown: $.proxy(this.mousedown, this) - }); - } - - if (tooltip === 'show') { - this.picker.on({ - mouseenter: $.proxy(this.showTooltip, this), - mouseleave: $.proxy(this.hideTooltip, this) - }); - } else { - this.tooltip.addClass('hide'); - } - }; - - Slider.prototype = { - constructor: Slider, - - over: false, - inDrag: false, - - showTooltip: function(){ - this.tooltip.addClass('in'); - //var left = Math.round(this.percent*this.width); - //this.tooltip.css('left', left - this.tooltip.outerWidth()/2); - this.over = true; - }, - - hideTooltip: function(){ - if (this.inDrag === false) { - this.tooltip.removeClass('in'); - } - this.over = false; - }, - - layout: function(){ - this.handle1Stype[this.stylePos] = this.percentage[0]+'%'; - this.handle2Stype[this.stylePos] = this.percentage[1]+'%'; - if (this.orientation == 'vertical') { - this.selectionElStyle.top = Math.min(this.percentage[0], this.percentage[1]) +'%'; - this.selectionElStyle.height = Math.abs(this.percentage[0] - this.percentage[1]) +'%'; - } else { - this.selectionElStyle.left = Math.min(this.percentage[0], this.percentage[1]) +'%'; - this.selectionElStyle.width = Math.abs(this.percentage[0] - this.percentage[1]) +'%'; - } - if (this.range) { - this.tooltipInner.text( - this.formater(this.value[0]) + - ' : ' + - this.formater(this.value[1]) - ); - this.tooltip[0].style[this.stylePos] = this.size * (this.percentage[0] + (this.percentage[1] - this.percentage[0])/2)/100 - (this.orientation === 'vertical' ? this.tooltip.outerHeight()/2 : this.tooltip.outerWidth()/2) +'px'; - } else { - this.tooltipInner.text( - this.formater(this.value[0]) - ); - this.tooltip[0].style[this.stylePos] = this.size * this.percentage[0]/100 - (this.orientation === 'vertical' ? this.tooltip.outerHeight()/2 : this.tooltip.outerWidth()/2) +'px'; - } - }, - - mousedown: function(ev) { - - // Touch: Get the original event: - if (this.touchCapable && ev.type === 'touchstart') { - ev = ev.originalEvent; - } - - this.offset = this.picker.offset(); - this.size = this.picker[0][this.sizePos]; - - var percentage = this.getPercentage(ev); - - if (this.range) { - var diff1 = Math.abs(this.percentage[0] - percentage); - var diff2 = Math.abs(this.percentage[1] - percentage); - this.dragged = (diff1 < diff2) ? 0 : 1; - } else { - this.dragged = 0; - } - - this.percentage[this.dragged] = percentage; - this.layout(); - - if (this.touchCapable) { - // Touch: Bind touch events: - $(document).on({ - touchmove: $.proxy(this.mousemove, this), - touchend: $.proxy(this.mouseup, this) - }); - } else { - $(document).on({ - mousemove: $.proxy(this.mousemove, this), - mouseup: $.proxy(this.mouseup, this) - }); - } - - this.inDrag = true; - var val = this.calculateValue(); - this.element.trigger({ - type: 'slideStart', - value: val - }).trigger({ - type: 'slide', - value: val - }); - return false; - }, - - mousemove: function(ev) { - - // Touch: Get the original event: - if (this.touchCapable && ev.type === 'touchmove') { - ev = ev.originalEvent; - } - - var percentage = this.getPercentage(ev); - if (this.range) { - if (this.dragged === 0 && this.percentage[1] < percentage) { - this.percentage[0] = this.percentage[1]; - this.dragged = 1; - } else if (this.dragged === 1 && this.percentage[0] > percentage) { - this.percentage[1] = this.percentage[0]; - this.dragged = 0; - } - } - this.percentage[this.dragged] = percentage; - this.layout(); - var val = this.calculateValue(); - this.element - .trigger({ - type: 'slide', - value: val - }) - .data('value', val) - .prop('value', val); - return false; - }, - - mouseup: function(ev) { - if (this.touchCapable) { - // Touch: Bind touch events: - $(document).off({ - touchmove: this.mousemove, - touchend: this.mouseup - }); - } else { - $(document).off({ - mousemove: this.mousemove, - mouseup: this.mouseup - }); - } - - this.inDrag = false; - if (this.over == false) { - this.hideTooltip(); - } - this.element; - var val = this.calculateValue(); - this.element - .trigger({ - type: 'slideStop', - value: val - }) - .data('value', val) - .prop('value', val); - return false; - }, - - calculateValue: function() { - var val; - if (this.range) { - val = [ - (this.min + Math.round((this.diff * this.percentage[0]/100)/this.step)*this.step), - (this.min + Math.round((this.diff * this.percentage[1]/100)/this.step)*this.step) - ]; - this.value = val; - } else { - val = (this.min + Math.round((this.diff * this.percentage[0]/100)/this.step)*this.step); - this.value = [val, this.value[1]]; - } - return val; - }, - - getPercentage: function(ev) { - if (this.touchCapable) { - ev = ev.touches[0]; - } - var percentage = (ev[this.mousePos] - this.offset[this.stylePos])*100/this.size; - percentage = Math.round(percentage/this.percentage[2])*this.percentage[2]; - return Math.max(0, Math.min(100, percentage)); - }, - - getValue: function() { - if (this.range) { - return this.value; - } - return this.value[0]; - }, - - setValue: function(val) { - this.value = val; - - if (this.range) { - this.value[0] = Math.max(this.min, Math.min(this.max, this.value[0])); - this.value[1] = Math.max(this.min, Math.min(this.max, this.value[1])); - } else { - this.value = [ Math.max(this.min, Math.min(this.max, this.value))]; - this.handle2.addClass('hide'); - if (this.selection == 'after') { - this.value[1] = this.max; - } else { - this.value[1] = this.min; - } - } - this.diff = this.max - this.min; - this.percentage = [ - (this.value[0]-this.min)*100/this.diff, - (this.value[1]-this.min)*100/this.diff, - this.step*100/this.diff - ]; - this.layout(); - } - }; - - $.fn.slider = function ( option, val ) { - return this.each(function () { - var $this = $(this), - data = $this.data('slider'), - options = typeof option === 'object' && option; - if (!data) { - $this.data('slider', (data = new Slider(this, $.extend({}, $.fn.slider.defaults,options)))); - } - if (typeof option == 'string') { - data[option](val); - } - }) - }; - - $.fn.slider.defaults = { - min: 0, - max: 10, - step: 1, - orientation: 'horizontal', - value: 5, - selection: 'before', - tooltip: 'show', - handle: 'round', - formater: function(value) { - return value; - } - }; - - $.fn.slider.Constructor = Slider; - -}( window.jQuery ); -/** - * @summary DataTables - * @description Paginate, search and sort HTML tables - * @version 1.9.4 - * @file jquery.dataTables.js - * @author Allan Jardine (www.sprymedia.co.uk) - * @contact www.sprymedia.co.uk/contact - * - * @copyright Copyright 2008-2012 Allan Jardine, all rights reserved. - * - * This source file is free software, under either the GPL v2 license or a - * BSD style license, available at: - * http://datatables.net/license_gpl2 - * http://datatables.net/license_bsd - * - * This source file is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the license files for details. - * - * For details please refer to: http://www.datatables.net - */ - -/*jslint evil: true, undef: true, browser: true */ -/*globals $, jQuery,define,_fnExternApiFunc,_fnInitialise,_fnInitComplete,_fnLanguageCompat,_fnAddColumn,_fnColumnOptions,_fnAddData,_fnCreateTr,_fnGatherData,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnServerParams,_fnAddOptionsHtml,_fnFeatureHtmlTable,_fnScrollDraw,_fnAdjustColumnSizing,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnBuildSearchArray,_fnBuildSearchRow,_fnFilterCreateSearch,_fnDataToSearch,_fnSort,_fnSortAttachListener,_fnSortingClasses,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnFeatureHtmlLength,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnNodeToDataIndex,_fnVisbleColumns,_fnCalculateEnd,_fnConvertToWidth,_fnCalculateColumnWidths,_fnScrollingWidthAdjust,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnDetectType,_fnSettingsFromNode,_fnGetDataMaster,_fnGetTrNodes,_fnGetTdNodes,_fnEscapeRegex,_fnDeleteIndex,_fnReOrderIndex,_fnColumnOrdering,_fnLog,_fnClearTable,_fnSaveState,_fnLoadState,_fnCreateCookie,_fnReadCookie,_fnDetectHeader,_fnGetUniqueThs,_fnScrollBarWidth,_fnApplyToChildren,_fnMap,_fnGetRowData,_fnGetCellData,_fnSetCellData,_fnGetObjectDataFn,_fnSetObjectDataFn,_fnApplyColumnDefs,_fnBindAction,_fnCallbackReg,_fnCallbackFire,_fnJsonString,_fnRender,_fnNodeToColumnIndex,_fnInfoMacros,_fnBrowserDetect,_fnGetColumns*/ - -(/** @lends */function( window, document, undefined ) { - -(function( factory ) { - "use strict"; - - // Define as an AMD module if possible - if ( typeof define === 'function' && define.amd ) - { - define( ['jquery'], factory ); - } - /* Define using browser globals otherwise - * Prevent multiple instantiations if the script is loaded twice - */ - else if ( jQuery && !jQuery.fn.dataTable ) - { - factory( jQuery ); - } -} -(/** @lends */function( $ ) { - "use strict"; - /** - * DataTables is a plug-in for the jQuery Javascript library. It is a - * highly flexible tool, based upon the foundations of progressive - * enhancement, which will add advanced interaction controls to any - * HTML table. For a full list of features please refer to - * DataTables.net. - * - * Note that the DataTable object is not a global variable but is - * aliased to jQuery.fn.DataTable and jQuery.fn.dataTable through which - * it may be accessed. - * - * @class - * @param {object} [oInit={}] Configuration object for DataTables. Options - * are defined by {@link DataTable.defaults} - * @requires jQuery 1.3+ - * - * @example - * // Basic initialisation - * $(document).ready( function { - * $('#example').dataTable(); - * } ); - * - * @example - * // Initialisation with configuration options - in this case, disable - * // pagination and sorting. - * $(document).ready( function { - * $('#example').dataTable( { - * "bPaginate": false, - * "bSort": false - * } ); - * } ); - */ - var DataTable = function( oInit ) - { - - - /** - * Add a column to the list used for the table with default values - * @param {object} oSettings dataTables settings object - * @param {node} nTh The th element for this column - * @memberof DataTable#oApi - */ - function _fnAddColumn( oSettings, nTh ) - { - var oDefaults = DataTable.defaults.columns; - var iCol = oSettings.aoColumns.length; - var oCol = $.extend( {}, DataTable.models.oColumn, oDefaults, { - "sSortingClass": oSettings.oClasses.sSortable, - "sSortingClassJUI": oSettings.oClasses.sSortJUI, - "nTh": nTh ? nTh : document.createElement('th'), - "sTitle": oDefaults.sTitle ? oDefaults.sTitle : nTh ? nTh.innerHTML : '', - "aDataSort": oDefaults.aDataSort ? oDefaults.aDataSort : [iCol], - "mData": oDefaults.mData ? oDefaults.oDefaults : iCol - } ); - oSettings.aoColumns.push( oCol ); - - /* Add a column specific filter */ - if ( oSettings.aoPreSearchCols[ iCol ] === undefined || oSettings.aoPreSearchCols[ iCol ] === null ) - { - oSettings.aoPreSearchCols[ iCol ] = $.extend( {}, DataTable.models.oSearch ); - } - else - { - var oPre = oSettings.aoPreSearchCols[ iCol ]; - - /* Don't require that the user must specify bRegex, bSmart or bCaseInsensitive */ - if ( oPre.bRegex === undefined ) - { - oPre.bRegex = true; - } - - if ( oPre.bSmart === undefined ) - { - oPre.bSmart = true; - } - - if ( oPre.bCaseInsensitive === undefined ) - { - oPre.bCaseInsensitive = true; - } - } - - /* Use the column options function to initialise classes etc */ - _fnColumnOptions( oSettings, iCol, null ); - } - - - /** - * Apply options for a column - * @param {object} oSettings dataTables settings object - * @param {int} iCol column index to consider - * @param {object} oOptions object with sType, bVisible and bSearchable etc - * @memberof DataTable#oApi - */ - function _fnColumnOptions( oSettings, iCol, oOptions ) - { - var oCol = oSettings.aoColumns[ iCol ]; - - /* User specified column options */ - if ( oOptions !== undefined && oOptions !== null ) - { - /* Backwards compatibility for mDataProp */ - if ( oOptions.mDataProp && !oOptions.mData ) - { - oOptions.mData = oOptions.mDataProp; - } - - if ( oOptions.sType !== undefined ) - { - oCol.sType = oOptions.sType; - oCol._bAutoType = false; - } - - $.extend( oCol, oOptions ); - _fnMap( oCol, oOptions, "sWidth", "sWidthOrig" ); - - /* iDataSort to be applied (backwards compatibility), but aDataSort will take - * priority if defined - */ - if ( oOptions.iDataSort !== undefined ) - { - oCol.aDataSort = [ oOptions.iDataSort ]; - } - _fnMap( oCol, oOptions, "aDataSort" ); - } - - /* Cache the data get and set functions for speed */ - var mRender = oCol.mRender ? _fnGetObjectDataFn( oCol.mRender ) : null; - var mData = _fnGetObjectDataFn( oCol.mData ); - - oCol.fnGetData = function (oData, sSpecific) { - var innerData = mData( oData, sSpecific ); - - if ( oCol.mRender && (sSpecific && sSpecific !== '') ) - { - return mRender( innerData, sSpecific, oData ); - } - return innerData; - }; - oCol.fnSetData = _fnSetObjectDataFn( oCol.mData ); - - /* Feature sorting overrides column specific when off */ - if ( !oSettings.oFeatures.bSort ) - { - oCol.bSortable = false; - } - - /* Check that the class assignment is correct for sorting */ - if ( !oCol.bSortable || - ($.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) == -1) ) - { - oCol.sSortingClass = oSettings.oClasses.sSortableNone; - oCol.sSortingClassJUI = ""; - } - else if ( $.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) == -1 ) - { - oCol.sSortingClass = oSettings.oClasses.sSortable; - oCol.sSortingClassJUI = oSettings.oClasses.sSortJUI; - } - else if ( $.inArray('asc', oCol.asSorting) != -1 && $.inArray('desc', oCol.asSorting) == -1 ) - { - oCol.sSortingClass = oSettings.oClasses.sSortableAsc; - oCol.sSortingClassJUI = oSettings.oClasses.sSortJUIAscAllowed; - } - else if ( $.inArray('asc', oCol.asSorting) == -1 && $.inArray('desc', oCol.asSorting) != -1 ) - { - oCol.sSortingClass = oSettings.oClasses.sSortableDesc; - oCol.sSortingClassJUI = oSettings.oClasses.sSortJUIDescAllowed; - } - } - - - /** - * Adjust the table column widths for new data. Note: you would probably want to - * do a redraw after calling this function! - * @param {object} oSettings dataTables settings object - * @memberof DataTable#oApi - */ - function _fnAdjustColumnSizing ( oSettings ) - { - /* Not interested in doing column width calculation if auto-width is disabled */ - if ( oSettings.oFeatures.bAutoWidth === false ) - { - return false; - } - - _fnCalculateColumnWidths( oSettings ); - for ( var i=0 , iLen=oSettings.aoColumns.length ; i