Updating adminlte assets

parent 88f7963c
* text=auto
* text eol=lf
*.png binary
*.gif binary
This source diff could not be displayed because it is too large. You can view the blob instead.
;(function ( $, window, document, undefined ) {
var pluginName = "Gmapify",
defaults = {
};
// The actual plugin constructor
function Gmapify ( element, options ) {
this.element = element;
this.settings = $.extend( {}, defaults, options );
this._defaults = defaults;
this.map = '';
this.lat = '';
this.lng = '';
this.styles = [{"featureType":"water","stylers":[{"color":"#19a0d8"}]},{"featureType":"administrative","elementType":"labels.text.stroke","stylers":[{"color":"#ffffff"},{"weight":6}]},{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#e85113"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#efe9e4"},{"lightness":-40}]},{"featureType":"road.arterial","elementType":"geometry.stroke","stylers":[{"color":"#efe9e4"},{"lightness":-20}]},{"featureType":"road","elementType":"labels.text.stroke","stylers":[{"lightness":100}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"lightness":-100}]},{"featureType":"road.highway","elementType":"labels.icon"},{"featureType":"landscape","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"landscape","stylers":[{"lightness":20},{"color":"#efe9e4"}]},{"featureType":"landscape.man_made","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels.text.stroke","stylers":[{"lightness":100}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"lightness":-100}]},{"featureType":"poi","elementType":"labels.text.fill","stylers":[{"hue":"#11ff00"}]},{"featureType":"poi","elementType":"labels.text.stroke","stylers":[{"lightness":100}]},{"featureType":"poi","elementType":"labels.icon","stylers":[{"hue":"#4cff00"},{"saturation":58}]},{"featureType":"poi","elementType":"geometry","stylers":[{"visibility":"on"},{"color":"#f0e4d3"}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#efe9e4"},{"lightness":-25}]},{"featureType":"road.arterial","elementType":"geometry.fill","stylers":[{"color":"#efe9e4"},{"lightness":-10}]},{"featureType":"poi","elementType":"labels","stylers":[{"visibility":"simplified"}]}];
this._name = pluginName;
this.init();
}
// Avoid Gmapify.prototype conflicts
$.extend(Gmapify.prototype, {
createMap: function () {
this.map = new GMaps({
div: this.element,
lat: this.lat,
lng: this.lng,
styles: this.styles,
height: '400px'
});
},
initCoordiates: function () {
this.lat = $(this.element).data('latitude');
this.lng = $(this.element).data('longitude');
},
addMarkerOnMap: function () {
this.map.addMarker({
lat: this.lat,
lng: this.lng,
title: 'Location center'
});
},
init: function () {
this.initCoordiates();
this.createMap();
this.addMarkerOnMap();
}
});
$.fn[ pluginName ] = function ( options ) {
this.each(function() {
if ( !$.data( this, "plugin_" + pluginName ) ) {
$.data( this, "plugin_" + pluginName, new Gmapify( this, options ) );
}
});
return this;
};
})( jQuery, window, document );
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/*
* Author: Abdullah A Almsaeed
* Date: 4 Jan 2014
* Description:
* This is a demo file used only for the main dashboard (index.html)
**/
$(function() {
"use strict";
//Make the dashboard widgets sortable Using jquery UI
$(".connectedSortable").sortable({
placeholder: "sort-highlight",
connectWith: ".connectedSortable",
handle: ".box-header, .nav-tabs",
forcePlaceholderSize: true,
zIndex: 999999
}).disableSelection();
$(".box-header, .nav-tabs").css("cursor","move");
//jQuery UI sortable for the todo list
$(".todo-list").sortable({
placeholder: "sort-highlight",
handle: ".handle",
forcePlaceholderSize: true,
zIndex: 999999
}).disableSelection();;
//bootstrap WYSIHTML5 - text editor
$(".textarea").wysihtml5();
$('.daterange').daterangepicker(
{
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],
'Last 7 Days': [moment().subtract('days', 6), moment()],
'Last 30 Days': [moment().subtract('days', 29), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
},
startDate: moment().subtract('days', 29),
endDate: moment()
},
function(start, end) {
alert("You chose: " + start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
});
/* jQueryKnob */
$(".knob").knob();
//jvectormap data
var visitorsData = {
"US": 398, //USA
"SA": 400, //Saudi Arabia
"CA": 1000, //Canada
"DE": 500, //Germany
"FR": 760, //France
"CN": 300, //China
"AU": 700, //Australia
"BR": 600, //Brazil
"IN": 800, //India
"GB": 320, //Great Britain
"RU": 3000 //Russia
};
//World map by jvectormap
$('#world-map').vectorMap({
map: 'world_mill_en',
backgroundColor: "#fff",
regionStyle: {
initial: {
fill: '#e4e4e4',
"fill-opacity": 1,
stroke: 'none',
"stroke-width": 0,
"stroke-opacity": 1
}
},
series: {
regions: [{
values: visitorsData,
scale: ["#3c8dbc", "#2D79A6"], //['#3E5E6B', '#A6BAC2'],
normalizeFunction: 'polynomial'
}]
},
onRegionLabelShow: function(e, el, code) {
if (typeof visitorsData[code] != "undefined")
el.html(el.html() + ': ' + visitorsData[code] + ' new visitors');
}
});
//Sparkline charts
var myvalues = [15, 19, 20, -22, -33, 27, 31, 27, 19, 30, 21];
$('#sparkline-1').sparkline(myvalues, {
type: 'bar',
barColor: '#00a65a',
negBarColor: "#f56954",
height: '20px'
});
myvalues = [15, 19, 20, 22, -2, -10, -7, 27, 19, 30, 21];
$('#sparkline-2').sparkline(myvalues, {
type: 'bar',
barColor: '#00a65a',
negBarColor: "#f56954",
height: '20px'
});
myvalues = [15, -19, -20, 22, 33, 27, 31, 27, 19, 30, 21];
$('#sparkline-3').sparkline(myvalues, {
type: 'bar',
barColor: '#00a65a',
negBarColor: "#f56954",
height: '20px'
});
myvalues = [15, 19, 20, 22, 33, -27, -31, 27, 19, 30, 21];
$('#sparkline-4').sparkline(myvalues, {
type: 'bar',
barColor: '#00a65a',
negBarColor: "#f56954",
height: '20px'
});
myvalues = [15, 19, 20, 22, 33, 27, 31, -27, -19, 30, 21];
$('#sparkline-5').sparkline(myvalues, {
type: 'bar',
barColor: '#00a65a',
negBarColor: "#f56954",
height: '20px'
});
myvalues = [15, 19, -20, 22, -13, 27, 31, 27, 19, 30, 21];
$('#sparkline-6').sparkline(myvalues, {
type: 'bar',
barColor: '#00a65a',
negBarColor: "#f56954",
height: '20px'
});
//Date for the calendar events (dummy data)
var date = new Date();
var d = date.getDate(),
m = date.getMonth(),
y = date.getFullYear();
//Calendar
$('#calendar').fullCalendar({
editable: true, //Enable drag and drop
events: [
{
title: 'All Day Event',
start: new Date(y, m, 1),
backgroundColor: "#3c8dbc", //primary
borderColor: "#3c8dbc" //primary
},
{
title: 'Long Event',
start: new Date(y, m, d - 5),
end: new Date(y, m, d - 2),
backgroundColor: "#f39c12", //yellow
borderColor: "#f39c12" //yellow
},
{
title: 'Meeting',
start: new Date(y, m, d, 10, 30),
allDay: false,
backgroundColor: "#0073b7", //Blue
borderColor: "#0073b7" //Blue
},
{
title: 'Lunch',
start: new Date(y, m, d, 12, 0),
end: new Date(y, m, d, 14, 0),
allDay: false,
backgroundColor: "#00c0ef", //Info (aqua)
borderColor: "#00c0ef" //Info (aqua)
},
{
title: 'Birthday Party',
start: new Date(y, m, d + 1, 19, 0),
end: new Date(y, m, d + 1, 22, 30),
allDay: false,
backgroundColor: "#00a65a", //Success (green)
borderColor: "#00a65a" //Success (green)
},
{
title: 'Click for Google',
start: new Date(y, m, 28),
end: new Date(y, m, 29),
url: 'http://google.com/',
backgroundColor: "#f56954", //red
borderColor: "#f56954" //red
}
],
buttonText: {//This is to add icons to the visible buttons
prev: "<span class='fa fa-caret-left'></span>",
next: "<span class='fa fa-caret-right'></span>",
today: 'today',
month: 'month',
week: 'week',
day: 'day'
},
header: {
left: 'title',
center: '',
right: 'prev,next'
}
});
//SLIMSCROLL FOR CHAT WIDGET
$('#chat-box').slimScroll({
height: '250px'
});
/* Morris.js Charts */
// Sales chart
var area = new Morris.Area({
element: 'revenue-chart',
resize: true,
data: [
{y: '2011 Q1', item1: 2666, item2: 2666},
{y: '2011 Q2', item1: 2778, item2: 2294},
{y: '2011 Q3', item1: 4912, item2: 1969},
{y: '2011 Q4', item1: 3767, item2: 3597},
{y: '2012 Q1', item1: 6810, item2: 1914},
{y: '2012 Q2', item1: 5670, item2: 4293},
{y: '2012 Q3', item1: 4820, item2: 3795},
{y: '2012 Q4', item1: 15073, item2: 5967},
{y: '2013 Q1', item1: 10687, item2: 4460},
{y: '2013 Q2', item1: 8432, item2: 5713}
],
xkey: 'y',
ykeys: ['item1', 'item2'],
labels: ['Item 1', 'Item 2'],
lineColors: ['#a0d0e0', '#3c8dbc'],
hideHover: 'auto'
});
//Donut Chart
var donut = new Morris.Donut({
element: 'sales-chart',
resize: true,
colors: ["#3c8dbc", "#f56954", "#00a65a"],
data: [
{label: "Download Sales", value: 12},
{label: "In-Store Sales", value: 30},
{label: "Mail-Order Sales", value: 20}
],
hideHover: 'auto'
});
//Bar chart
var bar = new Morris.Bar({
element: 'bar-chart',
resize: true,
data: [
{y: '2006', a: 100, b: 90},
{y: '2007', a: 75, b: 65},
{y: '2008', a: 50, b: 40},
{y: '2009', a: 75, b: 65},
{y: '2010', a: 50, b: 40},
{y: '2011', a: 75, b: 65},
{y: '2012', a: 100, b: 90}
],
barColors: ['#00a65a', '#f56954'],
xkey: 'y',
ykeys: ['a', 'b'],
labels: ['CPU', 'DISK'],
hideHover: 'auto'
});
//Fix for charts under tabs
$('.box ul.nav a').on('shown.bs.tab', function(e) {
area.redraw();
donut.redraw();
});
/* BOX REFRESH PLUGIN EXAMPLE (usage with morris charts) */
$("#loading-example").boxRefresh({
source: "ajax/dashboard-boxrefresh-demo.php",
onLoadDone: function(box) {
bar = new Morris.Bar({
element: 'bar-chart',
resize: true,
data: [
{y: '2006', a: 100, b: 90},
{y: '2007', a: 75, b: 65},
{y: '2008', a: 50, b: 40},
{y: '2009', a: 75, b: 65},
{y: '2010', a: 50, b: 40},
{y: '2011', a: 75, b: 65},
{y: '2012', a: 100, b: 90}
],
barColors: ['#00a65a', '#f56954'],
xkey: 'y',
ykeys: ['a', 'b'],
labels: ['CPU', 'DISK'],
hideHover: 'auto'
});
}
});
/* The todo list plugin */
$(".todo-list").todolist({
onCheck: function(ele) {
//console.log("The element has been checked")
},
onUncheck: function(ele) {
//console.log("The element has been unchecked")
}
});
});
$(function() {
/* For demo purposes */
var demo = $("<div />").css({
position: "fixed",
top: "150px",
right: "0",
background: "rgba(0, 0, 0, 0.7)",
"border-radius": "5px 0px 0px 5px",
padding: "10px 15px",
"font-size": "16px",
"z-index": "999999",
cursor: "pointer",
color: "#ddd"
}).html("<i class='fa fa-gear'></i>").addClass("no-print");
var demo_settings = $("<div />").css({
"padding": "10px",
position: "fixed",
top: "130px",
right: "-200px",
background: "#fff",
border: "3px solid rgba(0, 0, 0, 0.7)",
"width": "200px",
"z-index": "999999"
}).addClass("no-print");
demo_settings.append(
"<h4 style='margin: 0 0 5px 0; border-bottom: 1px dashed #ddd; padding-bottom: 3px;'>Layout Options</h4>"
+ "<div class='form-group no-margin'>"
+ "<div class='.checkbox'>"
+ "<label>"
+ "<input type='checkbox' onchange='change_layout();'/> "
+ "Fixed layout"
+ "</label>"
+ "</div>"
+ "</div>"
);
demo_settings.append(
"<h4 style='margin: 0 0 5px 0; border-bottom: 1px dashed #ddd; padding-bottom: 3px;'>Skins</h4>"
+ "<div class='form-group no-margin'>"
+ "<div class='.radio'>"
+ "<label>"
+ "<input name='skins' type='radio' onchange='change_skin(\"skin-black\");' /> "
+ "Black"
+ "</label>"
+ "</div>"
+ "</div>"
+ "<div class='form-group no-margin'>"
+ "<div class='.radio'>"
+ "<label>"
+ "<input name='skins' type='radio' onchange='change_skin(\"skin-blue\");' checked='checked'/> "
+ "Blue"
+ "</label>"
+ "</div>"
+ "</div>"
);
demo.click(function() {
if (!$(this).hasClass("open")) {
$(this).css("right", "200px");
demo_settings.css("right", "0");
$(this).addClass("open");
} else {
$(this).css("right", "0");
demo_settings.css("right", "-200px");
$(this).removeClass("open")
}
});
$("body").append(demo);
$("body").append(demo_settings);
});
function change_layout() {
$("body").toggleClass("fixed");
fix_sidebar();
}
function change_skin(cls) {
$("body").removeClass("skin-blue skin-black");
$("body").addClass(cls);
}
{
"/assets/js/asgardcms.js": "/assets/js/asgardcms.js",
"/assets/css/asgard.css": "/assets/css/asgard.css",
"/assets/css/asgardcms.css": "/assets/css/asgardcms.css",
"/assets/js/main.js": "/assets/js/main.js",
"/assets/vendor/animate.css": "/assets/vendor/animate.css",
"/assets/vendor/datatables.net": "/assets/vendor/datatables.net",
"/assets/vendor/datatables.net-bs": "/assets/vendor/datatables.net-bs"
......
require('./bootstrap');
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import VueRouter from 'vue-router'
import ElementUI from 'element-ui'
import DataTables from 'vue-data-tables'
import VueEvents from 'vue-events'
import locale from 'element-ui/lib/locale/lang/en'
import VueSimplemde from 'vue-simplemde'
Vue.use(ElementUI, { locale });
Vue.use(DataTables, { locale });
Vue.use(VueI18n);
Vue.use(VueRouter);
Vue.use(require('vue-shortkey'), { prevent: ['input', 'textarea'] });
Vue.use(VueEvents);
Vue.use(VueSimplemde);
require('./mixins');
Vue.component('ckeditor', require('../../../../../Modules/Core/Assets/js/components/CkEditor.vue'));
Vue.component('DeleteButton', require('../../../../../Modules/Core/Assets/js/components/DeleteComponent.vue'));
Vue.component('TagsInput', require('../../../../../Modules/Tag/Assets/js/components/TagInput.vue'));
Vue.component('SingleMedia', require('../../../../../Modules/Media/Assets/js/components/SingleMedia.vue'));
Vue.component('MediaManager', require('../../../../../Modules/Media/Assets/js/components/MediaManager.vue'));
import PageRoutes from '../../../../../Modules/Page/Assets/js/PageRoutes';
import MediaRoutes from '../../../../../Modules/Media/Assets/js/MediaRoutes';
const currentLocale = window.AsgardCMS.currentLocale;
const adminPrefix = window.AsgardCMS.adminPrefix;
const router = new VueRouter({
mode: 'history',
base: makeBaseUrl(),
routes : [
...PageRoutes,
...MediaRoutes,
],
});
function makeBaseUrl() {
if (window.AsgardCMS.hideDefaultLocaleInURL == 1) {
return adminPrefix;
}
return `${currentLocale}/${adminPrefix}`;
}
let messages = {
[currentLocale]: window.AsgardCMS.translations,
};
const i18n = new VueI18n({
locale: currentLocale,
messages,
});
const app = new Vue({
el: '#app',
router,
i18n,
});
window.axios.interceptors.response.use(null, function(error) {
if (error.response === undefined) {
console.log(error);
return;
}
if (error.response.status === 403) {
app.$notify.error({
title: app.$t('core.unauthorized'),
message: app.$t('core.unauthorized-access'),
});
window.location = route('dashboard.index');
}
if (error.response.status === 401) {
app.$notify.error({
title: app.$t('core.unauthenticated'),
message: app.$t('core.unauthenticated-message'),
});
window.location = route('login');
}
return Promise.reject(error);
});
window._ = require('lodash');
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
* for JavaScript based Bootstrap features such as modals and tabs. This
* code may be modified to fit the specific needs of your application.
*/
// try {
// window.$ = window.jQuery = require('jquery');
//
// require('bootstrap-sass');
// } catch (e) {}
/**
* We'll load the axios HTTP library which allows us to easily issue requests
* to our Laravel back-end. This library automatically handles sending the
* CSRF token as a header based on the value of the "XSRF" token cookie.
*/
window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
/**
* Next we will register the CSRF Token as a common header with Axios so that
* all outgoing HTTP requests automatically have it attached. This is just
* a simple convenience so we don't have to attach every token manually.
*/
let token = document.head.querySelector('meta[name="csrf-token"]');
if (token) {
window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
} else {
console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
}
let userApiToken = document.head.querySelector('meta[name="user-api-token"]');
if (userApiToken) {
window.axios.defaults.headers.common['Authorization'] = 'Bearer ' + userApiToken.content;
} else {
console.error('User API token not found in a meta tag.');
}
let currentLocale = document.head.querySelector('meta[name="current-locale"]');
if (currentLocale) {
window.AsgardCMS.currentLocale = currentLocale.content;
} else {
console.error('Current locale token not found in a meta tag.');
}
/**
* Echo exposes an expressive API for subscribing to channels and listening
* for events that are broadcast by Laravel. Echo and event broadcasting
* allows your team to easily build robust real-time web applications.
*/
// import Echo from 'laravel-echo'
// window.Pusher = require('pusher-js');
// window.Echo = new Echo({
// broadcaster: 'pusher',
// key: 'your-pusher-key'
// });
import Vue from 'vue'
import TranslationHelper from '../../../../../Modules/Core/Assets/js/mixins/TranslationHelper';
Vue.mixin(TranslationHelper);
// Body
$body-bg: #f5f8fa;
// Borders
$laravel-border-color: darken($body-bg, 10%);
$list-group-border: $laravel-border-color;
$navbar-default-border: $laravel-border-color;
$panel-default-border: $laravel-border-color;
$panel-inner-border: $laravel-border-color;
// Brands
$brand-primary: #3097D1;
$brand-info: #8eb4cb;
$brand-success: #2ab27b;
$brand-warning: #cbb956;
$brand-danger: #bf5329;
// Typography
$icon-font-path: "~bootstrap-sass/assets/fonts/bootstrap/";
$font-family-sans-serif: "Raleway", sans-serif;
$font-size-base: 14px;
$line-height-base: 1.6;
$text-color: #636b6f;
// Navbar
$navbar-default-bg: #fff;
// Buttons
$btn-default-color: $text-color;
// Inputs
$input-border: lighten($text-color, 40%);
$input-border-focus: lighten($brand-primary, 25%);
$input-color-placeholder: lighten($text-color, 30%);
// Panels
$panel-default-heading-bg: #fff;
// Element UI
@import "../../../node_modules/element-ui/lib/theme-default/index.css";
$fa-css-prefix: el-icon-fa;
@import "../../../node_modules/font-awesome/scss/font-awesome";
[class^="el-icon-fa"], [class*=" el-icon-fa"] {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome!important;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
};
......@@ -6,13 +6,19 @@ const themeInfo = require('./theme.json');
/**
* Compile less
*/
mix.less('resources/assets/less/asgard.less', 'assets/css/asgard.css')
mix.less('resources/assets/less/asgard.less', 'assets/css/asgard.css');
/**
* Copy scripts
*/
mix.copy('resources/assets/js', 'assets/js');
mix.copy('resources/assets/js/main.js', 'assets/js/main.js');
/**
* Compile js and scss
*/
mix.js('resources/assets/js/asgardcms.js', 'assets/js/asgardcms.js')
.sass('resources/assets/scss/asgardcms.scss', 'assets/css/asgardcms.css');
/**
* Copy node module
......@@ -38,4 +44,4 @@ mix.webpackConfig({
plugins: [
new WebpackShellPlugin({onBuildEnd:['php ../../artisan stylist:publish ' + themeInfo.name]})
]
});
\ No newline at end of file
});
......@@ -94733,7 +94733,7 @@ var render = function() {
"on-success": _vm.handleSuccess,
"show-file-list": false,
"http-request": _vm.uploadFile,
multiple: "true"
multiple: true
}
},
[
This source diff could not be displayed because it is too large. You can view the blob instead.
;(function ( $, window, document, undefined ) {
var pluginName = "Gmapify",
defaults = {
};
// The actual plugin constructor
function Gmapify ( element, options ) {
this.element = element;
this.settings = $.extend( {}, defaults, options );
this._defaults = defaults;
this.map = '';
this.lat = '';
this.lng = '';
this.styles = [{"featureType":"water","stylers":[{"color":"#19a0d8"}]},{"featureType":"administrative","elementType":"labels.text.stroke","stylers":[{"color":"#ffffff"},{"weight":6}]},{"featureType":"administrative","elementType":"labels.text.fill","stylers":[{"color":"#e85113"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"color":"#efe9e4"},{"lightness":-40}]},{"featureType":"road.arterial","elementType":"geometry.stroke","stylers":[{"color":"#efe9e4"},{"lightness":-20}]},{"featureType":"road","elementType":"labels.text.stroke","stylers":[{"lightness":100}]},{"featureType":"road","elementType":"labels.text.fill","stylers":[{"lightness":-100}]},{"featureType":"road.highway","elementType":"labels.icon"},{"featureType":"landscape","elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"landscape","stylers":[{"lightness":20},{"color":"#efe9e4"}]},{"featureType":"landscape.man_made","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"labels.text.stroke","stylers":[{"lightness":100}]},{"featureType":"water","elementType":"labels.text.fill","stylers":[{"lightness":-100}]},{"featureType":"poi","elementType":"labels.text.fill","stylers":[{"hue":"#11ff00"}]},{"featureType":"poi","elementType":"labels.text.stroke","stylers":[{"lightness":100}]},{"featureType":"poi","elementType":"labels.icon","stylers":[{"hue":"#4cff00"},{"saturation":58}]},{"featureType":"poi","elementType":"geometry","stylers":[{"visibility":"on"},{"color":"#f0e4d3"}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#efe9e4"},{"lightness":-25}]},{"featureType":"road.arterial","elementType":"geometry.fill","stylers":[{"color":"#efe9e4"},{"lightness":-10}]},{"featureType":"poi","elementType":"labels","stylers":[{"visibility":"simplified"}]}];
this._name = pluginName;
this.init();
}
// Avoid Gmapify.prototype conflicts
$.extend(Gmapify.prototype, {
createMap: function () {
this.map = new GMaps({
div: this.element,
lat: this.lat,
lng: this.lng,
styles: this.styles,
height: '400px'
});
},
initCoordiates: function () {
this.lat = $(this.element).data('latitude');
this.lng = $(this.element).data('longitude');
},
addMarkerOnMap: function () {
this.map.addMarker({
lat: this.lat,
lng: this.lng,
title: 'Location center'
});
},
init: function () {
this.initCoordiates();
this.createMap();
this.addMarkerOnMap();
}
});
$.fn[ pluginName ] = function ( options ) {
this.each(function() {
if ( !$.data( this, "plugin_" + pluginName ) ) {
$.data( this, "plugin_" + pluginName, new Gmapify( this, options ) );
}
});
return this;
};
})( jQuery, window, document );
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
/*
* Author: Abdullah A Almsaeed
* Date: 4 Jan 2014
* Description:
* This is a demo file used only for the main dashboard (index.html)
**/
$(function() {
"use strict";
//Make the dashboard widgets sortable Using jquery UI
$(".connectedSortable").sortable({
placeholder: "sort-highlight",
connectWith: ".connectedSortable",
handle: ".box-header, .nav-tabs",
forcePlaceholderSize: true,
zIndex: 999999
}).disableSelection();
$(".box-header, .nav-tabs").css("cursor","move");
//jQuery UI sortable for the todo list
$(".todo-list").sortable({
placeholder: "sort-highlight",
handle: ".handle",
forcePlaceholderSize: true,
zIndex: 999999
}).disableSelection();;
//bootstrap WYSIHTML5 - text editor
$(".textarea").wysihtml5();
$('.daterange').daterangepicker(
{
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],
'Last 7 Days': [moment().subtract('days', 6), moment()],
'Last 30 Days': [moment().subtract('days', 29), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
},
startDate: moment().subtract('days', 29),
endDate: moment()
},
function(start, end) {
alert("You chose: " + start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
});
/* jQueryKnob */
$(".knob").knob();
//jvectormap data
var visitorsData = {
"US": 398, //USA
"SA": 400, //Saudi Arabia
"CA": 1000, //Canada
"DE": 500, //Germany
"FR": 760, //France
"CN": 300, //China
"AU": 700, //Australia
"BR": 600, //Brazil
"IN": 800, //India
"GB": 320, //Great Britain
"RU": 3000 //Russia
};
//World map by jvectormap
$('#world-map').vectorMap({
map: 'world_mill_en',
backgroundColor: "#fff",
regionStyle: {
initial: {
fill: '#e4e4e4',
"fill-opacity": 1,
stroke: 'none',
"stroke-width": 0,
"stroke-opacity": 1
}
},
series: {
regions: [{
values: visitorsData,
scale: ["#3c8dbc", "#2D79A6"], //['#3E5E6B', '#A6BAC2'],
normalizeFunction: 'polynomial'
}]
},
onRegionLabelShow: function(e, el, code) {
if (typeof visitorsData[code] != "undefined")
el.html(el.html() + ': ' + visitorsData[code] + ' new visitors');
}
});
//Sparkline charts
var myvalues = [15, 19, 20, -22, -33, 27, 31, 27, 19, 30, 21];
$('#sparkline-1').sparkline(myvalues, {
type: 'bar',
barColor: '#00a65a',
negBarColor: "#f56954",
height: '20px'
});
myvalues = [15, 19, 20, 22, -2, -10, -7, 27, 19, 30, 21];
$('#sparkline-2').sparkline(myvalues, {
type: 'bar',
barColor: '#00a65a',
negBarColor: "#f56954",
height: '20px'
});
myvalues = [15, -19, -20, 22, 33, 27, 31, 27, 19, 30, 21];
$('#sparkline-3').sparkline(myvalues, {
type: 'bar',
barColor: '#00a65a',
negBarColor: "#f56954",
height: '20px'
});
myvalues = [15, 19, 20, 22, 33, -27, -31, 27, 19, 30, 21];
$('#sparkline-4').sparkline(myvalues, {
type: 'bar',
barColor: '#00a65a',
negBarColor: "#f56954",
height: '20px'
});
myvalues = [15, 19, 20, 22, 33, 27, 31, -27, -19, 30, 21];
$('#sparkline-5').sparkline(myvalues, {
type: 'bar',
barColor: '#00a65a',
negBarColor: "#f56954",
height: '20px'
});
myvalues = [15, 19, -20, 22, -13, 27, 31, 27, 19, 30, 21];
$('#sparkline-6').sparkline(myvalues, {
type: 'bar',
barColor: '#00a65a',
negBarColor: "#f56954",
height: '20px'
});
//Date for the calendar events (dummy data)
var date = new Date();
var d = date.getDate(),
m = date.getMonth(),
y = date.getFullYear();
//Calendar
$('#calendar').fullCalendar({
editable: true, //Enable drag and drop
events: [
{
title: 'All Day Event',
start: new Date(y, m, 1),
backgroundColor: "#3c8dbc", //primary
borderColor: "#3c8dbc" //primary
},
{
title: 'Long Event',
start: new Date(y, m, d - 5),
end: new Date(y, m, d - 2),
backgroundColor: "#f39c12", //yellow
borderColor: "#f39c12" //yellow
},
{
title: 'Meeting',
start: new Date(y, m, d, 10, 30),
allDay: false,
backgroundColor: "#0073b7", //Blue
borderColor: "#0073b7" //Blue
},
{
title: 'Lunch',
start: new Date(y, m, d, 12, 0),
end: new Date(y, m, d, 14, 0),
allDay: false,
backgroundColor: "#00c0ef", //Info (aqua)
borderColor: "#00c0ef" //Info (aqua)
},
{
title: 'Birthday Party',
start: new Date(y, m, d + 1, 19, 0),
end: new Date(y, m, d + 1, 22, 30),
allDay: false,
backgroundColor: "#00a65a", //Success (green)
borderColor: "#00a65a" //Success (green)
},
{
title: 'Click for Google',
start: new Date(y, m, 28),
end: new Date(y, m, 29),
url: 'http://google.com/',
backgroundColor: "#f56954", //red
borderColor: "#f56954" //red
}
],
buttonText: {//This is to add icons to the visible buttons
prev: "<span class='fa fa-caret-left'></span>",
next: "<span class='fa fa-caret-right'></span>",
today: 'today',
month: 'month',
week: 'week',
day: 'day'
},
header: {
left: 'title',
center: '',
right: 'prev,next'
}
});
//SLIMSCROLL FOR CHAT WIDGET
$('#chat-box').slimScroll({
height: '250px'
});
/* Morris.js Charts */
// Sales chart
var area = new Morris.Area({
element: 'revenue-chart',
resize: true,
data: [
{y: '2011 Q1', item1: 2666, item2: 2666},
{y: '2011 Q2', item1: 2778, item2: 2294},
{y: '2011 Q3', item1: 4912, item2: 1969},
{y: '2011 Q4', item1: 3767, item2: 3597},
{y: '2012 Q1', item1: 6810, item2: 1914},
{y: '2012 Q2', item1: 5670, item2: 4293},
{y: '2012 Q3', item1: 4820, item2: 3795},
{y: '2012 Q4', item1: 15073, item2: 5967},
{y: '2013 Q1', item1: 10687, item2: 4460},
{y: '2013 Q2', item1: 8432, item2: 5713}
],
xkey: 'y',
ykeys: ['item1', 'item2'],
labels: ['Item 1', 'Item 2'],
lineColors: ['#a0d0e0', '#3c8dbc'],
hideHover: 'auto'
});
//Donut Chart
var donut = new Morris.Donut({
element: 'sales-chart',
resize: true,
colors: ["#3c8dbc", "#f56954", "#00a65a"],
data: [
{label: "Download Sales", value: 12},
{label: "In-Store Sales", value: 30},
{label: "Mail-Order Sales", value: 20}
],
hideHover: 'auto'
});
//Bar chart
var bar = new Morris.Bar({
element: 'bar-chart',
resize: true,
data: [
{y: '2006', a: 100, b: 90},
{y: '2007', a: 75, b: 65},
{y: '2008', a: 50, b: 40},
{y: '2009', a: 75, b: 65},
{y: '2010', a: 50, b: 40},
{y: '2011', a: 75, b: 65},
{y: '2012', a: 100, b: 90}
],
barColors: ['#00a65a', '#f56954'],
xkey: 'y',
ykeys: ['a', 'b'],
labels: ['CPU', 'DISK'],
hideHover: 'auto'
});
//Fix for charts under tabs
$('.box ul.nav a').on('shown.bs.tab', function(e) {
area.redraw();
donut.redraw();
});
/* BOX REFRESH PLUGIN EXAMPLE (usage with morris charts) */
$("#loading-example").boxRefresh({
source: "ajax/dashboard-boxrefresh-demo.php",
onLoadDone: function(box) {
bar = new Morris.Bar({
element: 'bar-chart',
resize: true,
data: [
{y: '2006', a: 100, b: 90},
{y: '2007', a: 75, b: 65},
{y: '2008', a: 50, b: 40},
{y: '2009', a: 75, b: 65},
{y: '2010', a: 50, b: 40},
{y: '2011', a: 75, b: 65},
{y: '2012', a: 100, b: 90}
],
barColors: ['#00a65a', '#f56954'],
xkey: 'y',
ykeys: ['a', 'b'],
labels: ['CPU', 'DISK'],
hideHover: 'auto'
});
}
});
/* The todo list plugin */
$(".todo-list").todolist({
onCheck: function(ele) {
//console.log("The element has been checked")
},
onUncheck: function(ele) {
//console.log("The element has been unchecked")
}
});
});
$(function() {
/* For demo purposes */
var demo = $("<div />").css({
position: "fixed",
top: "150px",
right: "0",
background: "rgba(0, 0, 0, 0.7)",
"border-radius": "5px 0px 0px 5px",
padding: "10px 15px",
"font-size": "16px",
"z-index": "999999",
cursor: "pointer",
color: "#ddd"
}).html("<i class='fa fa-gear'></i>").addClass("no-print");
var demo_settings = $("<div />").css({
"padding": "10px",
position: "fixed",
top: "130px",
right: "-200px",
background: "#fff",
border: "3px solid rgba(0, 0, 0, 0.7)",
"width": "200px",
"z-index": "999999"
}).addClass("no-print");
demo_settings.append(
"<h4 style='margin: 0 0 5px 0; border-bottom: 1px dashed #ddd; padding-bottom: 3px;'>Layout Options</h4>"
+ "<div class='form-group no-margin'>"
+ "<div class='.checkbox'>"
+ "<label>"
+ "<input type='checkbox' onchange='change_layout();'/> "
+ "Fixed layout"
+ "</label>"
+ "</div>"
+ "</div>"
);
demo_settings.append(
"<h4 style='margin: 0 0 5px 0; border-bottom: 1px dashed #ddd; padding-bottom: 3px;'>Skins</h4>"
+ "<div class='form-group no-margin'>"
+ "<div class='.radio'>"
+ "<label>"
+ "<input name='skins' type='radio' onchange='change_skin(\"skin-black\");' /> "
+ "Black"
+ "</label>"
+ "</div>"
+ "</div>"
+ "<div class='form-group no-margin'>"
+ "<div class='.radio'>"
+ "<label>"
+ "<input name='skins' type='radio' onchange='change_skin(\"skin-blue\");' checked='checked'/> "
+ "Blue"
+ "</label>"
+ "</div>"
+ "</div>"
);
demo.click(function() {
if (!$(this).hasClass("open")) {
$(this).css("right", "200px");
demo_settings.css("right", "0");
$(this).addClass("open");
} else {
$(this).css("right", "0");
demo_settings.css("right", "-200px");
$(this).removeClass("open")
}
});
$("body").append(demo);
$("body").append(demo_settings);
});
function change_layout() {
$("body").toggleClass("fixed");
fix_sidebar();
}
function change_skin(cls) {
$("body").removeClass("skin-blue skin-black");
$("body").addClass(cls);
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment