'.$item['label'].'
', 37 | '{icon}' => '' . $item['icon'] . ' ', 38 | '{dropdownicon}' => $this->dropdownIcon, 39 | '{class}' => empty($item['items']) ? '' : 'tree-toggle' 40 | ] : [ 41 | '{url}' => Url::to($item['url']), 42 | '{label}' => ''.$item['label'].'
', 43 | '{icon}' => null, 44 | '{dropdownicon}' => $this->dropdownIcon, 45 | '{class}' => empty($item['items']) ? '' : 'tree-toggle' 46 | ]; 47 | return strtr($template, $replace); 48 | } 49 | /** 50 | * Recursively renders the menu items (without the container tag). 51 | * @param array $items the menu items to be rendered recursively 52 | * @return string the rendering result 53 | */ 54 | protected function renderItems($items) 55 | { 56 | $n = count($items); 57 | $lines = []; 58 | foreach ($items as $i => $item) { 59 | $options = array_merge($this->itemOptions, ArrayHelper::getValue($item, 'options', [])); 60 | $tag = ArrayHelper::remove($options, 'tag', 'li'); 61 | $class = []; 62 | if ($item['active']) { 63 | $class[] = $this->activeCssClass; 64 | } 65 | if ($i === 0 && $this->firstItemCssClass !== null) { 66 | $class[] = $this->firstItemCssClass; 67 | } 68 | if ($i === $n - 1 && $this->lastItemCssClass !== null) { 69 | $class[] = $this->lastItemCssClass; 70 | } 71 | if (!empty($class)) { 72 | if (empty($options['class'])) { 73 | $options['class'] = implode(' ', $class); 74 | } else { 75 | $options['class'] .= ' ' . implode(' ', $class); 76 | } 77 | }else{ 78 | $options['class'] = ''; 79 | } 80 | $menu = $this->renderItem($item); 81 | if (!empty($item['items'])) { 82 | $menu .= strtr($this->submenuTemplate, [ 83 | '{show}' => $item['active'] ? "style='display: block'" : "style='display: none'", 84 | '{items}' => $this->renderItems($item['items']), 85 | ]); 86 | } 87 | $lines[] = Html::tag($tag, $menu, $options); 88 | } 89 | return implode("\n", $lines); 90 | } 91 | /** 92 | * @inheritdoc 93 | */ 94 | protected function normalizeItems($items, &$active) 95 | { 96 | foreach ($items as $i => $item) { 97 | if (isset($item['visible']) && !$item['visible']) { 98 | unset($items[$i]); 99 | continue; 100 | } 101 | if (!isset($item['label'])) { 102 | $item['label'] = ''; 103 | } 104 | $encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabels; 105 | $items[$i]['label'] = $encodeLabel ? Html::encode($item['label']) : $item['label']; 106 | $items[$i]['icon'] = isset($item['icon']) ? $item['icon'] : ''; 107 | $hasActiveChild = false; 108 | if (isset($item['items'])) { 109 | $items[$i]['items'] = $this->normalizeItems($item['items'], $hasActiveChild); 110 | if (empty($items[$i]['items']) && $this->hideEmptyItems) { 111 | unset($items[$i]['items']); 112 | if (!isset($item['url'])) { 113 | unset($items[$i]); 114 | continue; 115 | } 116 | } 117 | } 118 | if (!isset($item['active'])) { 119 | if ($this->activateParents && $hasActiveChild || $this->activateItems && $this->isItemActive($item)) { 120 | $active = $items[$i]['active'] = true; 121 | } else { 122 | $items[$i]['active'] = false; 123 | } 124 | } elseif ($item['active']) { 125 | $active = true; 126 | } 127 | } 128 | return array_values($items); 129 | } 130 | /** 131 | * Checks whether a menu item is active. 132 | * This is done by checking if [[route]] and [[params]] match that specified in the `url` option of the menu item. 133 | * When the `url` option of a menu item is specified in terms of an array, its first element is treated 134 | * as the route for the item and the rest of the elements are the associated parameters. 135 | * Only when its route and parameters match [[route]] and [[params]], respectively, will a menu item 136 | * be considered active. 137 | * @param array $item the menu item to be checked 138 | * @return boolean whether the menu item is active 139 | */ 140 | protected function isItemActive($item) 141 | { 142 | if (isset($item['url']) && is_array($item['url']) && isset($item['url'][0])) { 143 | $route = $item['url'][0]; 144 | if ($route[0] !== '/' && Yii::$app->controller) { 145 | $route = Yii::$app->controller->module->getUniqueId() . '/' . $route; 146 | } 147 | $arrayRoute = explode('/', ltrim($route, '/')); 148 | $arrayThisRoute = explode('/', $this->route); 149 | if ($arrayRoute[0] !== $arrayThisRoute[0]) { 150 | return false; 151 | } 152 | if (isset($arrayRoute[1]) && $arrayRoute[1] !== $arrayThisRoute[1]) { 153 | return false; 154 | } 155 | if (isset($arrayRoute[2]) && $arrayRoute[2] !== $arrayThisRoute[2]) { 156 | return false; 157 | } 158 | unset($item['url']['#']); 159 | if (count($item['url']) > 1) { 160 | foreach (array_splice($item['url'], 1) as $name => $value) { 161 | if ($value !== null && (!isset($this->params[$name]) || $this->params[$name] != $value)) { 162 | return false; 163 | } 164 | } 165 | } 166 | return true; 167 | } 168 | return false; 169 | } 170 | } 171 | -------------------------------------------------------------------------------- /assets/sass/md/_navbars.scss: -------------------------------------------------------------------------------- 1 | // This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten. 2 | 3 | .navbar { 4 | // background-color: $brand-primary; 5 | border: 0; 6 | border-radius: $border-radius-base; 7 | // @include shadow-big-navbar(); 8 | 9 | border-bottom: 1px solid #ededf3; 10 | @extend .animation-transition-fast; 11 | 12 | padding: 10px 0; 13 | 14 | .navbar-brand { 15 | position: relative; 16 | height: 50px; 17 | line-height: 30px; 18 | color: inherit; 19 | padding: 10px 15px; 20 | 21 | &:hover, 22 | &:focus { 23 | color: inherit; 24 | background-color: transparent; 25 | } 26 | } 27 | 28 | .notification{ 29 | position: absolute; 30 | top: 5px; 31 | border: 1px solid #FFF; 32 | right: 10px; 33 | font-size: 9px; 34 | background: #f44336; 35 | color: #FFFFFF; 36 | min-width: 20px; 37 | padding: 0px 5px; 38 | height: 20px; 39 | border-radius: 10px; 40 | text-align: center; 41 | line-height: 19px; 42 | vertical-align: middle; 43 | display: block; 44 | } 45 | 46 | 47 | 48 | .navbar-text { 49 | color: inherit; 50 | margin-top: 15px; 51 | margin-bottom: 15px; 52 | } 53 | 54 | .navbar-nav { 55 | > li > a { 56 | color: inherit; 57 | padding-top: 15px; 58 | padding-bottom: 15px; 59 | 60 | font-weight: $font-weight-default; 61 | font-size: $mdb-btn-font-size-base; 62 | text-transform: uppercase; 63 | 64 | border-radius: $border-radius-base; 65 | 66 | &:hover, 67 | &:focus { 68 | color: inherit; 69 | background-color: transparent; 70 | } 71 | 72 | 73 | .material-icons, 74 | .fa{ 75 | font-size: 20px; 76 | } 77 | 78 | &.btn:not(.btn-just-icon){ 79 | .fa{ 80 | position: relative; 81 | top: 2px; 82 | margin-top: -4px; 83 | margin-right: 4px; 84 | } 85 | } 86 | } 87 | 88 | > li > .dropdown-menu{ 89 | margin-top: -20px; 90 | } 91 | 92 | > li.open > .dropdown-menu{ 93 | margin-top: 0; 94 | } 95 | 96 | > .active > a { 97 | &, 98 | &:hover, 99 | &:focus { 100 | color: inherit; 101 | background-color: rgba(255, 255, 255, 0.1); 102 | } 103 | } 104 | > .disabled > a { 105 | &, 106 | &:hover, 107 | &:focus { 108 | color: inherit; 109 | background-color: transparent; 110 | opacity: 0.9; 111 | } 112 | } 113 | .profile-photo{ 114 | padding: 0 5px 0; 115 | .profile-photo-small{ 116 | height: 40px; 117 | width: 40px; 118 | } 119 | } 120 | 121 | } 122 | 123 | // Darken the responsive nav toggle 124 | .navbar-toggle { 125 | border: 0; 126 | &:hover, 127 | &:focus { 128 | background-color: transparent; 129 | } 130 | .icon-bar { 131 | background-color: inherit; 132 | border: 1px solid; 133 | } 134 | } 135 | 136 | .navbar-default .navbar-toggle, 137 | .navbar-inverse .navbar-toggle { 138 | border-color: transparent; 139 | } 140 | 141 | .navbar-collapse, 142 | .navbar-form { 143 | border-top: none; 144 | box-shadow: none; 145 | } 146 | 147 | // Dropdowns 148 | .navbar-nav { 149 | > .open > a { 150 | &, 151 | &:hover, 152 | &:focus { 153 | background-color: transparent; 154 | color: inherit; 155 | } 156 | } 157 | 158 | @media (max-width: $grid-float-breakpoint-max) { 159 | .navbar-text { 160 | color: inherit; 161 | margin-top: 15px; 162 | margin-bottom: 15px; 163 | } 164 | 165 | // Dropdowns get custom display 166 | .open .dropdown-menu { 167 | > .dropdown-header { 168 | border: 0; 169 | color: inherit; 170 | } 171 | .divider { 172 | border-bottom: 1px solid; 173 | opacity: 0.08; 174 | } 175 | > li > a { 176 | color: inherit; 177 | &:hover, 178 | &:focus { 179 | color: inherit; 180 | background-color: transparent; 181 | } 182 | } 183 | > .active > a { 184 | &, 185 | &:hover, 186 | &:focus { 187 | color: inherit; 188 | background-color: transparent; 189 | } 190 | } 191 | > .disabled > a { 192 | &, 193 | &:hover, 194 | &:focus { 195 | color: inherit; 196 | background-color: transparent; 197 | } 198 | } 199 | } 200 | } 201 | } 202 | 203 | &.navbar-default{ 204 | .logo-container .brand{ 205 | color: $gray; 206 | } 207 | } 208 | 209 | .navbar-link { 210 | color: inherit; 211 | &:hover { 212 | color: inherit; 213 | } 214 | } 215 | 216 | .btn{ 217 | margin-top: 0; 218 | margin-bottom: 0; 219 | } 220 | .btn-link { 221 | color: inherit; 222 | &:hover, 223 | &:focus { 224 | color: inherit; 225 | } 226 | &[disabled], 227 | fieldset[disabled] & { 228 | &:hover, 229 | &:focus { 230 | color: inherit; 231 | } 232 | } 233 | } 234 | 235 | .navbar-form { 236 | margin: 4px 0 0; 237 | .form-group { 238 | margin: 0; 239 | padding: 0; 240 | 241 | .material-input:before, 242 | &.is-focused .material-input:after { 243 | background-color: inherit; 244 | } 245 | } 246 | 247 | .form-group .form-control, 248 | .form-control { 249 | border-color: inherit; 250 | color: inherit; 251 | padding: 0; 252 | margin: 0; 253 | 254 | // re-normalize inputs in a navbar the size of standard bootstrap since our normal inputs are larger by spec than bootstrap 255 | //--- 256 | //height: $mdb-input-height-base; 257 | $bs-line-height-base: 1.428571429 !default; 258 | $bs-line-height-computed: floor(($font-size-base * $bs-line-height-base)) !default; // ~20px 259 | height: ($bs-line-height-computed + 8px); 260 | font-size: $font-size-base; 261 | line-height: $bs-line-height-base; 262 | //--- 263 | } 264 | } 265 | 266 | // SASS conversion note: please mirror any content change in _mixins-shared.scss navbar-variations-content 267 | @include navbar-variations(unquote(".navbar"), unquote(""), $brand-primary); 268 | 269 | 270 | &-inverse { 271 | background-color: $indigo; 272 | } 273 | 274 | &.navbar-transparent{ 275 | background-color: transparent; 276 | box-shadow: none; 277 | border-bottom: 0; 278 | 279 | .logo-container .brand{ 280 | color: $white-color; 281 | } 282 | } 283 | &-fixed-top{ 284 | border-radius: 0; 285 | } 286 | @media (max-width: $screen-md-max) { 287 | 288 | .navbar-brand { 289 | height: 50px; 290 | padding: 10px 15px; 291 | } 292 | /* 293 | .navbar-form { 294 | margin-top: 10px; 295 | } 296 | */ 297 | 298 | .navbar-nav > li > a { 299 | padding-top: 15px; 300 | padding-bottom: 15px; 301 | } 302 | } 303 | 304 | .alert{ 305 | border-radius: 0; 306 | left: 0; 307 | position: absolute; 308 | right: 0; 309 | top: 85px; 310 | width: 100%; 311 | z-index: 3; 312 | transition: all 0.3s; 313 | } 314 | 315 | } 316 | 317 | .nav-align-center{ 318 | text-align: center; 319 | 320 | .nav-pills{ 321 | display: inline-block; 322 | } 323 | } 324 | .navbar-absolute{ 325 | position: absolute; 326 | width: 100%; 327 | padding-top: 10px; 328 | z-index: 1029; 329 | } 330 | -------------------------------------------------------------------------------- /assets/js/material.min.js: -------------------------------------------------------------------------------- 1 | !function(t){function o(t){return"undefined"==typeof t.which?!0:"number"==typeof t.which&&t.which>0?!t.ctrlKey&&!t.metaKey&&!t.altKey&&8!=t.which&&9!=t.which&&13!=t.which&&16!=t.which&&17!=t.which&&20!=t.which&&27!=t.which:!1}function i(o){var i=t(o);i.prop("disabled")||i.closest(".form-group").addClass("is-focused")}function n(o){o.closest("label").hover(function(){var o=t(this).find("input");o.prop("disabled")||i(o)},function(){e(t(this).find("input"))})}function e(o){t(o).closest(".form-group").removeClass("is-focused")}t.expr[":"].notmdproc=function(o){return t(o).data("mdproc")?!1:!0},t.material={options:{validate:!0,input:!0,ripples:!0,checkbox:!0,togglebutton:!0,radio:!0,arrive:!0,autofill:!1,withRipples:[".btn:not(.btn-link)",".card-image",".navbar a:not(.withoutripple)",".footer a:not(.withoutripple)",".dropdown-menu a",".nav-tabs a:not(.withoutripple)",".withripple",".pagination li:not(.active):not(.disabled) a:not(.withoutripple)"].join(","),inputElements:"input.form-control, textarea.form-control, select.form-control",checkboxElements:".checkbox > label > input[type=checkbox]",togglebuttonElements:".togglebutton > label > input[type=checkbox]",radioElements:".radio > label > input[type=radio]"},checkbox:function(o){var i=t(o?o:this.options.checkboxElements).filter(":notmdproc").data("mdproc",!0).after("");n(i)},togglebutton:function(o){var i=t(o?o:this.options.togglebuttonElements).filter(":notmdproc").data("mdproc",!0).after("");n(i)},radio:function(o){var i=t(o?o:this.options.radioElements).filter(":notmdproc").data("mdproc",!0).after("");n(i)},input:function(o){t(o?o:this.options.inputElements).filter(":notmdproc").data("mdproc",!0).each(function(){var o=t(this),i=o.closest(".form-group");0===i.length&&(o.wrap(""),i=o.closest(".form-group")),o.attr("data-hint")&&(o.after(""+o.attr("data-hint")+"
"),o.removeAttr("data-hint"));var n={"input-lg":"form-group-lg","input-sm":"form-group-sm"};if(t.each(n,function(t,n){o.hasClass(t)&&(o.removeClass(t),i.addClass(n))}),o.hasClass("floating-label")){var e=o.attr("placeholder");o.attr("placeholder",null).removeClass("floating-label");var a=o.attr("id"),r="";a&&(r="for='"+a+"'"),i.addClass("label-floating"),o.after("")}(null===o.val()||"undefined"==o.val()||""===o.val())&&i.addClass("is-empty"),i.append(""),i.find("input[type=file]").length>0&&i.addClass("is-fileinput")})},attachInputEventHandlers:function(){var n=this.options.validate;t(document).on("change",".checkbox input[type=checkbox]",function(){t(this).blur()}).on("keydown paste",".form-control",function(i){o(i)&&t(this).closest(".form-group").removeClass("is-empty")}).on("keyup change",".form-control",function(){var o=t(this),i=o.closest(".form-group"),e="undefined"==typeof o[0].checkValidity||o[0].checkValidity();""===o.val()?i.addClass("is-empty"):i.removeClass("is-empty"),n&&(e?i.removeClass("has-error"):i.addClass("has-error"))}).on("focus",".form-control, .form-group.is-fileinput",function(){i(this)}).on("blur",".form-control, .form-group.is-fileinput",function(){e(this)}).on("change",".form-group input",function(){var o=t(this);if("file"!=o.attr("type")){var i=o.closest(".form-group"),n=o.val();n?i.removeClass("is-empty"):i.addClass("is-empty")}}).on("change",".form-group.is-fileinput input[type='file']",function(){var o=t(this),i=o.closest(".form-group"),n="";t.each(this.files,function(t,o){n+=o.name+", "}),n=n.substring(0,n.length-2),n?i.removeClass("is-empty"):i.addClass("is-empty"),i.find("input.form-control[readonly]").val(n)})},ripples:function(o){t(o?o:this.options.withRipples).ripples()},autofill:function(){var o=setInterval(function(){t("input[type!=checkbox]").each(function(){var o=t(this);o.val()&&o.val()!==o.attr("value")&&o.trigger("change")})},100);setTimeout(function(){clearInterval(o)},1e4)},attachAutofillEventHandlers:function(){var o;t(document).on("focus","input",function(){var i=t(this).parents("form").find("input").not("[type=file]");o=setInterval(function(){i.each(function(){var o=t(this);o.val()!==o.attr("value")&&o.trigger("change")})},100)}).on("blur",".form-group input",function(){clearInterval(o)})},init:function(o){this.options=t.extend({},this.options,o);var i=t(document);t.fn.ripples&&this.options.ripples&&this.ripples(),this.options.input&&(this.input(),this.attachInputEventHandlers()),this.options.checkbox&&this.checkbox(),this.options.togglebutton&&this.togglebutton(),this.options.radio&&this.radio(),this.options.autofill&&(this.autofill(),this.attachAutofillEventHandlers()),document.arrive&&this.options.arrive&&(t.fn.ripples&&this.options.ripples&&i.arrive(this.options.withRipples,function(){t.material.ripples(t(this))}),this.options.input&&i.arrive(this.options.inputElements,function(){t.material.input(t(this))}),this.options.checkbox&&i.arrive(this.options.checkboxElements,function(){t.material.checkbox(t(this))}),this.options.radio&&i.arrive(this.options.radioElements,function(){t.material.radio(t(this))}),this.options.togglebutton&&i.arrive(this.options.togglebuttonElements,function(){t.material.togglebutton(t(this))}))}}}(jQuery),function(t,o,i,n){"use strict";function e(o,i){r=this,this.element=t(o),this.options=t.extend({},s,i),this._defaults=s,this._name=a,this.init()}var a="ripples",r=null,s={};e.prototype.init=function(){var i=this.element;i.on("mousedown touchstart",function(n){if(!r.isTouch()||"mousedown"!==n.type){i.find(".ripple-container").length||i.append('');var e=i.children(".ripple-container"),a=r.getRelY(e,n),s=r.getRelX(e,n);if(a||s){var l=r.getRipplesColor(i),p=t("");p.addClass("ripple").css({left:s,top:a,"background-color":l}),e.append(p),function(){return o.getComputedStyle(p[0]).opacity}(),r.rippleOn(i,p),setTimeout(function(){r.rippleEnd(p)},500),i.on("mouseup mouseleave touchend",function(){p.data("mousedown","off"),"off"===p.data("animating")&&r.rippleOut(p)})}}})},e.prototype.getNewSize=function(t,o){return Math.max(t.outerWidth(),t.outerHeight())/o.outerWidth()*2.5},e.prototype.getRelX=function(t,o){var i=t.offset();return r.isTouch()?(o=o.originalEvent,1===o.touches.length?o.touches[0].pageX-i.left:!1):o.pageX-i.left},e.prototype.getRelY=function(t,o){var i=t.offset();return r.isTouch()?(o=o.originalEvent,1===o.touches.length?o.touches[0].pageY-i.top:!1):o.pageY-i.top},e.prototype.getRipplesColor=function(t){var i=t.data("ripple-color")?t.data("ripple-color"):o.getComputedStyle(t[0]).color;return i},e.prototype.hasTransitionSupport=function(){var t=i.body||i.documentElement,o=t.style,e=o.transition!==n||o.WebkitTransition!==n||o.MozTransition!==n||o.MsTransition!==n||o.OTransition!==n;return e},e.prototype.isTouch=function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},e.prototype.rippleEnd=function(t){t.data("animating","off"),"off"===t.data("mousedown")&&r.rippleOut(t)},e.prototype.rippleOut=function(t){t.off(),r.hasTransitionSupport()?t.addClass("ripple-out"):t.animate({opacity:0},100,function(){t.trigger("transitionend")}),t.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){t.remove()})},e.prototype.rippleOn=function(t,o){var i=r.getNewSize(t,o);r.hasTransitionSupport()?o.css({"-ms-transform":"scale("+i+")","-moz-transform":"scale("+i+")","-webkit-transform":"scale("+i+")",transform:"scale("+i+")"}).addClass("ripple-on").data("animating","on").data("mousedown","on"):o.animate({width:2*Math.max(t.outerWidth(),t.outerHeight()),height:2*Math.max(t.outerWidth(),t.outerHeight()),"margin-left":-1*Math.max(t.outerWidth(),t.outerHeight()),"margin-top":-1*Math.max(t.outerWidth(),t.outerHeight()),opacity:.2},500,function(){o.trigger("transitionend")})},t.fn.ripples=function(o){return this.each(function(){t.data(this,"plugin_"+a)||t.data(this,"plugin_"+a,new e(this,o))})}}(jQuery,window,document); 2 | -------------------------------------------------------------------------------- /assets/js/demo.js: -------------------------------------------------------------------------------- 1 | type = ['','info','success','warning','danger']; 2 | 3 | 4 | demo = { 5 | initPickColor: function(){ 6 | $('.pick-class-label').click(function(){ 7 | var new_class = $(this).attr('new-class'); 8 | var old_class = $('#display-buttons').attr('data-class'); 9 | var display_div = $('#display-buttons'); 10 | if(display_div.length) { 11 | var display_buttons = display_div.find('.btn'); 12 | display_buttons.removeClass(old_class); 13 | display_buttons.addClass(new_class); 14 | display_div.attr('data-class', new_class); 15 | } 16 | }); 17 | }, 18 | 19 | initFormExtendedDatetimepickers: function(){ 20 | $('.datetimepicker').datetimepicker({ 21 | icons: { 22 | time: "fa fa-clock-o", 23 | date: "fa fa-calendar", 24 | up: "fa fa-chevron-up", 25 | down: "fa fa-chevron-down", 26 | previous: 'fa fa-chevron-left', 27 | next: 'fa fa-chevron-right', 28 | today: 'fa fa-screenshot', 29 | clear: 'fa fa-trash', 30 | close: 'fa fa-remove' 31 | } 32 | }); 33 | }, 34 | 35 | initDocumentationCharts: function(){ 36 | /* ----------========== Daily Sales Chart initialization For Documentation ==========---------- */ 37 | 38 | dataDailySalesChart = { 39 | labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'], 40 | series: [ 41 | [12, 17, 7, 17, 23, 18, 38] 42 | ] 43 | }; 44 | 45 | optionsDailySalesChart = { 46 | lineSmooth: Chartist.Interpolation.cardinal({ 47 | tension: 0 48 | }), 49 | low: 0, 50 | high: 50, // creative tim: we recommend you to set the high sa the biggest value + something for a better look 51 | chartPadding: { top: 0, right: 0, bottom: 0, left: 0}, 52 | } 53 | 54 | var dailySalesChart = new Chartist.Line('#dailySalesChart', dataDailySalesChart, optionsDailySalesChart); 55 | 56 | md.startAnimationForLineChart(dailySalesChart); 57 | }, 58 | 59 | initDashboardPageCharts: function(){ 60 | 61 | /* ----------========== Daily Sales Chart initialization ==========---------- */ 62 | 63 | dataDailySalesChart = { 64 | labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'], 65 | series: [ 66 | [12, 17, 7, 17, 23, 18, 38] 67 | ] 68 | }; 69 | 70 | optionsDailySalesChart = { 71 | lineSmooth: Chartist.Interpolation.cardinal({ 72 | tension: 0 73 | }), 74 | low: 0, 75 | high: 50, // creative tim: we recommend you to set the high sa the biggest value + something for a better look 76 | chartPadding: { top: 0, right: 0, bottom: 0, left: 0}, 77 | } 78 | 79 | var dailySalesChart = new Chartist.Line('#dailySalesChart', dataDailySalesChart, optionsDailySalesChart); 80 | 81 | md.startAnimationForLineChart(dailySalesChart); 82 | 83 | 84 | 85 | /* ----------========== Completed Tasks Chart initialization ==========---------- */ 86 | 87 | dataCompletedTasksChart = { 88 | labels: ['12am', '3pm', '6pm', '9pm', '12pm', '3am', '6am', '9am'], 89 | series: [ 90 | [230, 750, 450, 300, 280, 240, 200, 190] 91 | ] 92 | }; 93 | 94 | optionsCompletedTasksChart = { 95 | lineSmooth: Chartist.Interpolation.cardinal({ 96 | tension: 0 97 | }), 98 | low: 0, 99 | high: 1000, // creative tim: we recommend you to set the high sa the biggest value + something for a better look 100 | chartPadding: { top: 0, right: 0, bottom: 0, left: 0} 101 | } 102 | 103 | var completedTasksChart = new Chartist.Line('#completedTasksChart', dataCompletedTasksChart, optionsCompletedTasksChart); 104 | 105 | // start animation for the Completed Tasks Chart - Line Chart 106 | md.startAnimationForLineChart(completedTasksChart); 107 | 108 | 109 | 110 | /* ----------========== Emails Subscription Chart initialization ==========---------- */ 111 | 112 | var dataEmailsSubscriptionChart = { 113 | labels: ['Jan', 'Feb', 'Mar', 'Apr', 'Mai', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], 114 | series: [ 115 | [542, 443, 320, 780, 553, 453, 326, 434, 568, 610, 756, 895] 116 | 117 | ] 118 | }; 119 | var optionsEmailsSubscriptionChart = { 120 | axisX: { 121 | showGrid: false 122 | }, 123 | low: 0, 124 | high: 1000, 125 | chartPadding: { top: 0, right: 5, bottom: 0, left: 0} 126 | }; 127 | var responsiveOptions = [ 128 | ['screen and (max-width: 640px)', { 129 | seriesBarDistance: 5, 130 | axisX: { 131 | labelInterpolationFnc: function (value) { 132 | return value[0]; 133 | } 134 | } 135 | }] 136 | ]; 137 | var emailsSubscriptionChart = Chartist.Bar('#emailsSubscriptionChart', dataEmailsSubscriptionChart, optionsEmailsSubscriptionChart, responsiveOptions); 138 | 139 | //start animation for the Emails Subscription Chart 140 | md.startAnimationForBarChart(emailsSubscriptionChart); 141 | 142 | }, 143 | 144 | initGoogleMaps: function(){ 145 | var myLatlng = new google.maps.LatLng(40.748817, -73.985428); 146 | var mapOptions = { 147 | zoom: 13, 148 | center: myLatlng, 149 | scrollwheel: false, //we disable de scroll over the map, it is a really annoing when you scroll through page 150 | styles: [{"featureType":"water","stylers":[{"saturation":43},{"lightness":-11},{"hue":"#0088ff"}]},{"featureType":"road","elementType":"geometry.fill","stylers":[{"hue":"#ff0000"},{"saturation":-100},{"lightness":99}]},{"featureType":"road","elementType":"geometry.stroke","stylers":[{"color":"#808080"},{"lightness":54}]},{"featureType":"landscape.man_made","elementType":"geometry.fill","stylers":[{"color":"#ece2d9"}]},{"featureType":"poi.park","elementType":"geometry.fill","stylers":[{"color":"#ccdca1"}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"color":"#767676"}]},{"featureType":"road","elementType":"labels.text.stroke","stylers":[{"color":"#ffffff"}]},{"featureType":"poi","stylers":[{"visibility":"off"}]},{"featureType":"landscape.natural","elementType":"geometry.fill","stylers":[{"visibility":"on"},{"color":"#b8cb93"}]},{"featureType":"poi.park","stylers":[{"visibility":"on"}]},{"featureType":"poi.sports_complex","stylers":[{"visibility":"on"}]},{"featureType":"poi.medical","stylers":[{"visibility":"on"}]},{"featureType":"poi.business","stylers":[{"visibility":"simplified"}]}] 151 | 152 | } 153 | var map = new google.maps.Map(document.getElementById("map"), mapOptions); 154 | 155 | var marker = new google.maps.Marker({ 156 | position: myLatlng, 157 | title:"Hello World!" 158 | }); 159 | 160 | // To add the marker to the map, call setMap(); 161 | marker.setMap(map); 162 | }, 163 | 164 | showNotification: function(from, align){ 165 | color = Math.floor((Math.random() * 4) + 1); 166 | 167 | $.notify({ 168 | icon: "notifications", 169 | message: "Welcome to Material Dashboard - a beautiful freebie for every web developer." 170 | 171 | },{ 172 | type: type[color], 173 | timer: 4000, 174 | placement: { 175 | from: from, 176 | align: align 177 | } 178 | }); 179 | } 180 | 181 | 182 | 183 | } 184 | -------------------------------------------------------------------------------- /assets/sass/md/_inputs-size.scss: -------------------------------------------------------------------------------- 1 | // This file has been autogenerated by grunt task lessToSass. Any changes will be overwritten. 2 | 3 | // 4 | // Forms - sizing - material - mirrors bootstrap/forms.less with custom sizing 5 | // 6 | // LEAVE THIS IDENTICAL TO THE BOOTSTRAP FILE - DO NOT CUSTOMIZE HERE. 7 | // 8 | // NOTE: this is intentionally kept structurally _identical_ to the bootstrap/forms.less file to make it easier 9 | // to identify differences in sizing approaches to form inputs. 10 | // -------------------------------------------------- 11 | 12 | legend { 13 | margin-bottom: $mdb-input-line-height-computed; 14 | font-size: ($mdb-input-font-size-base * 1.5); 15 | } 16 | 17 | // Adjust output element 18 | output { 19 | padding-top: ($mdb-input-padding-base-vertical + 1); 20 | font-size: $mdb-input-font-size-base; 21 | line-height: $mdb-input-line-height-base; 22 | } 23 | 24 | .form-control { 25 | height: $mdb-input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border) 26 | padding: $mdb-input-padding-base-vertical $mdb-input-padding-base-horizontal; 27 | font-size: $mdb-input-font-size-base; 28 | line-height: $mdb-input-line-height-base; 29 | } 30 | 31 | // Special styles for iOS temporal inputs 32 | // 33 | // In Mobile Safari, setting `display: block` on temporal inputs causes the 34 | // text within the input to become vertically misaligned. As a workaround, we 35 | // set a pixel line-height that matches the given height of the input, but only 36 | // for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848 37 | // 38 | // Note that as of 8.3, iOS doesn't support `datetime` or `week`. 39 | 40 | @media screen and (-webkit-min-device-pixel-ratio: 0) { 41 | input[type="date"], 42 | input[type="time"], 43 | input[type="datetime-local"], 44 | input[type="month"] { 45 | &.form-control { 46 | line-height: $mdb-input-height-base; 47 | } 48 | 49 | &.input-sm, 50 | .input-group-sm & { 51 | line-height: $mdb-input-height-small; 52 | } 53 | 54 | &.input-lg, 55 | .input-group-lg & { 56 | line-height: $mdb-input-height-large; 57 | } 58 | } 59 | } 60 | 61 | .radio, 62 | .checkbox { 63 | 64 | label { 65 | min-height: $mdb-input-line-height-computed; // Ensure the input doesn't jump when there is no text 66 | } 67 | } 68 | 69 | 70 | // Static form control text 71 | // 72 | // Apply class to a `p` element to make any string of text align with labels in 73 | // a horizontal form layout. 74 | 75 | .form-control-static { 76 | // Size it appropriately next to real form controls 77 | padding-top: ($mdb-input-padding-base-vertical + 1); 78 | padding-bottom: ($mdb-input-padding-base-vertical + 1); 79 | min-height: ($mdb-input-line-height-computed + $mdb-input-font-size-base); 80 | } 81 | 82 | 83 | // Form control sizing 84 | // 85 | // Relative text size, padding, and border-radii changes for form controls. For 86 | // horizontal sizing, wrap controls in the predefined grid classes. `