提交 96bd8913 编写于 作者: N Nicolae Gabriel

* Me

- Finalized all of the functions in custom.js ( all of them are
independent ) and working with no errors.
上级 743a5544
......@@ -3199,6 +3199,9 @@ ul.project_files li a i {
.form-group .btn {
margin-bottom: -6px;
}
.input-group-btn .btn { margin-bottom:0; }
/*!
* bootstrap-vertical-tabs - v1.2.1
* https://dbtek.github.io/bootstrap-vertical-tabs
......@@ -4166,7 +4169,7 @@ ul.notifications {
/* CSS3 Checkbox */
/*
.checkbox-input { display:block;position:relative; }
.checkbox-input:before { display:block;content:"";position:absolute;top:2px;left:0;height:20px;width:20px;background:red;border-radius:3px; }
......@@ -4187,8 +4190,7 @@ ul.notifications {
}
/* CSS3 Checkbox - end */
/*
/*
.checkbox { display: block;position:relative;cursor:pointer; }
......@@ -4215,6 +4217,6 @@ table thead .checkbox { margin-top:-7px;margin-top:-21px; }
table thead .checkbox.radio { margin-top:-7px;margin-top:-21px; }
*/
.daterangepicker.xdisplay { width:228px; }
/**
* Resize function without multiple trigger
*
* Usage:
* $(window).smartresize(function(){
* // code here
* });
*/
(function($,sr){
// debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
var debounce = function (func, threshold, execAsap) {
var timeout;
return function debounced () {
var obj = this, args = arguments;
function delayed () {
if (!execAsap)
func.apply(obj, args);
timeout = null;
}
if (timeout)
clearTimeout(timeout);
else if (execAsap)
func.apply(obj, args);
timeout = setTimeout(delayed, threshold || 100);
};
};
// smartresize
jQuery.fn[sr] = function(fn){ return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };
})(jQuery,'smartresize');
/**
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
var CURRENT_URL = window.location.href.split('#')[0].split('?')[0],
$BODY = $('body'),
$MENU_TOGGLE = $('#menu_toggle'),
$SIDEBAR_MENU = $('#sidebar-menu'),
$SIDEBAR_FOOTER = $('.sidebar-footer'),
$LEFT_COL = $('.left_col'),
$RIGHT_COL = $('.right_col'),
$NAV_MENU = $('.nav_menu'),
$FOOTER = $('footer');
// Sidebar
$(document).ready(function() {
// TODO: This is some kind of easy fix, maybe we can improve this
var setContentHeight = function () {
// reset height
$RIGHT_COL.css('min-height', $(window).height());
var bodyHeight = $BODY.outerHeight(),
footerHeight = $BODY.hasClass('footer_fixed') ? -10 : $FOOTER.height(),
leftColHeight = $LEFT_COL.eq(1).height() + $SIDEBAR_FOOTER.height(),
contentHeight = bodyHeight < leftColHeight ? leftColHeight : bodyHeight;
// normalize content
contentHeight -= $NAV_MENU.height() + footerHeight;
$RIGHT_COL.css('min-height', contentHeight);
};
$SIDEBAR_MENU.find('a').on('click', function(ev) {
var $li = $(this).parent();
if ($li.is('.active')) {
$li.removeClass('active active-sm');
$('ul:first', $li).slideUp(function() {
setContentHeight();
});
} else {
// prevent closing menu if we are on child menu
if (!$li.parent().is('.child_menu')) {
$SIDEBAR_MENU.find('li').removeClass('active active-sm');
$SIDEBAR_MENU.find('li ul').slideUp();
}
$li.addClass('active');
$('ul:first', $li).slideDown(function() {
setContentHeight();
});
}
});
// toggle small or large menu
$MENU_TOGGLE.on('click', function() {
if ($BODY.hasClass('nav-md')) {
$SIDEBAR_MENU.find('li.active ul').hide();
$SIDEBAR_MENU.find('li.active').addClass('active-sm').removeClass('active');
} else {
$SIDEBAR_MENU.find('li.active-sm ul').show();
$SIDEBAR_MENU.find('li.active-sm').addClass('active').removeClass('active-sm');
}
$BODY.toggleClass('nav-md nav-sm');
setContentHeight();
});
// check active menu
$SIDEBAR_MENU.find('a[href="' + CURRENT_URL + '"]').parent('li').addClass('current-page');
$SIDEBAR_MENU.find('a').filter(function () {
return this.href == CURRENT_URL;
}).parent('li').addClass('current-page').parents('ul').slideDown(function() {
setContentHeight();
}).parent().addClass('active');
// recompute content when resizing
$(window).smartresize(function(){
setContentHeight();
});
setContentHeight();
// fixed sidebar
if ($.fn.mCustomScrollbar) {
$('.menu_fixed').mCustomScrollbar({
autoHideScrollbar: true,
theme: 'minimal',
mouseWheel:{ preventDefault: true }
});
}
});
// /Sidebar
// Panel toolbox
$(document).ready(function() {
$('.collapse-link').on('click', function() {
var $BOX_PANEL = $(this).closest('.x_panel'),
$ICON = $(this).find('i'),
$BOX_CONTENT = $BOX_PANEL.find('.x_content');
// fix for some div with hardcoded fix class
if ($BOX_PANEL.attr('style')) {
$BOX_CONTENT.slideToggle(200, function(){
$BOX_PANEL.removeAttr('style');
});
} else {
$BOX_CONTENT.slideToggle(200);
$BOX_PANEL.css('height', 'auto');
}
$ICON.toggleClass('fa-chevron-up fa-chevron-down');
});
$('.close-link').click(function () {
var $BOX_PANEL = $(this).closest('.x_panel');
$BOX_PANEL.remove();
});
});
// /Panel toolbox
// Tooltip
$(document).ready(function() {
$('[data-toggle="tooltip"]').tooltip({
container: 'body'
});
});
// /Tooltip
// Progressbar
if ($(".progress .progress-bar")[0]) {
$('.progress .progress-bar').progressbar();
}
// /Progressbar
// Switchery
$(document).ready(function() {
if ($(".js-switch")[0]) {
var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
elems.forEach(function (html) {
var switchery = new Switchery(html, {
color: '#26B99A'
});
});
}
});
// /Switchery
// iCheck
$(document).ready(function() {
if ($("input.flat")[0]) {
$(document).ready(function () {
$('input.flat').iCheck({
checkboxClass: 'icheckbox_flat-green',
radioClass: 'iradio_flat-green'
});
});
}
});
// /iCheck
// Table
$('table input').on('ifChecked', function () {
checkState = '';
$(this).parent().parent().parent().addClass('selected');
countChecked();
});
$('table input').on('ifUnchecked', function () {
checkState = '';
$(this).parent().parent().parent().removeClass('selected');
countChecked();
});
var checkState = '';
$('.bulk_action input').on('ifChecked', function () {
checkState = '';
$(this).parent().parent().parent().addClass('selected');
countChecked();
});
$('.bulk_action input').on('ifUnchecked', function () {
checkState = '';
$(this).parent().parent().parent().removeClass('selected');
countChecked();
});
$('.bulk_action input#check-all').on('ifChecked', function () {
checkState = 'all';
countChecked();
});
$('.bulk_action input#check-all').on('ifUnchecked', function () {
checkState = 'none';
countChecked();
});
function countChecked() {
if (checkState === 'all') {
$(".bulk_action input[name='table_records']").iCheck('check');
}
if (checkState === 'none') {
$(".bulk_action input[name='table_records']").iCheck('uncheck');
}
var checkCount = $(".bulk_action input[name='table_records']:checked").length;
if (checkCount) {
$('.column-title').hide();
$('.bulk-actions').show();
$('.action-cnt').html(checkCount + ' Records Selected');
} else {
$('.column-title').show();
$('.bulk-actions').hide();
}
}
// Accordion
$(document).ready(function() {
$(".expand").on("click", function () {
$(this).next().slideToggle(200);
$expand = $(this).find(">:first-child");
if ($expand.text() == "+") {
$expand.text("-");
} else {
$expand.text("+");
}
});
});
// NProgress
if (typeof NProgress != 'undefined') {
$(document).ready(function () {
NProgress.start();
});
$(window).load(function () {
NProgress.done();
});
}
function countChecked(){"all"===checkState&&$(".bulk_action .checkbox input[name='table_records']").iCheck("check"),"none"===checkState&&$(".bulk_action .checkbox input[name='table_records']").iCheck("uncheck");var e=$(".bulk_action .checkbox input[name='table_records']:checked").length;e?($(".column-title").hide(),$(".bulk-actions").show(),$(".action-cnt").html(e+" Records Selected")):($(".column-title").show(),$(".bulk-actions").hide())}!function(e,t){var n=function(e,t,n){var i;return function(){function c(){n||e.apply(a,o),i=null}var a=this,o=arguments;i?clearTimeout(i):n&&e.apply(a,o),i=setTimeout(c,t||100)}};jQuery.fn[t]=function(e){return e?this.bind("resize",n(e)):this.trigger(t)}}(jQuery,"smartresize");var CURRENT_URL=window.location.href.split("#")[0].split("?")[0],$BODY=$("body"),$MENU_TOGGLE=$("#menu_toggle"),$SIDEBAR_MENU=$("#sidebar-menu"),$SIDEBAR_FOOTER=$(".sidebar-footer"),$LEFT_COL=$(".left_col"),$RIGHT_COL=$(".right_col"),$NAV_MENU=$(".nav_menu"),$FOOTER=$("footer");$(document).ready(function(){var e=function(){$RIGHT_COL.css("min-height",$(window).height());var e=$BODY.outerHeight(),t=$BODY.hasClass("footer_fixed")?-10:$FOOTER.height(),n=$LEFT_COL.eq(1).height()+$SIDEBAR_FOOTER.height(),i=n>e?n:e;i-=$NAV_MENU.height()+t,$RIGHT_COL.css("min-height",i)};$SIDEBAR_MENU.find("a").on("click",function(t){var n=$(this).parent();n.is(".active")?(n.removeClass("active active-sm"),$("ul:first",n).slideUp(function(){e()})):(n.parent().is(".child_menu")||($SIDEBAR_MENU.find("li").removeClass("active active-sm"),$SIDEBAR_MENU.find("li ul").slideUp()),n.addClass("active"),$("ul:first",n).slideDown(function(){e()}))}),$MENU_TOGGLE.on("click",function(){$BODY.hasClass("nav-md")?($SIDEBAR_MENU.find("li.active ul").hide(),$SIDEBAR_MENU.find("li.active").addClass("active-sm").removeClass("active")):($SIDEBAR_MENU.find("li.active-sm ul").show(),$SIDEBAR_MENU.find("li.active-sm").addClass("active").removeClass("active-sm")),$BODY.toggleClass("nav-md nav-sm"),e()}),$SIDEBAR_MENU.find('a[href="'+CURRENT_URL+'"]').parent("li").addClass("current-page"),$SIDEBAR_MENU.find("a").filter(function(){return this.href==CURRENT_URL}).parent("li").addClass("current-page").parents("ul").slideDown(function(){e()}).parent().addClass("active"),$(window).smartresize(function(){e()}),e(),$.fn.mCustomScrollbar&&$(".menu_fixed").mCustomScrollbar({autoHideScrollbar:!0,theme:"minimal",mouseWheel:{preventDefault:!0}})}),$(document).ready(function(){$(".collapse-link").on("click",function(){var e=$(this).closest(".x_panel"),t=$(this).find("i"),n=e.find(".x_content");e.attr("style")?n.slideToggle(200,function(){e.removeAttr("style")}):(n.slideToggle(200),e.css("height","auto")),t.toggleClass("fa-chevron-up fa-chevron-down")}),$(".close-link").click(function(){var e=$(this).closest(".x_panel");e.remove()})}),$(document).ready(function(){$('[data-toggle="tooltip"]').tooltip({container:"body"})}),$(".progress .progress-bar")[0]&&$(".progress .progress-bar").progressbar(),$(document).ready(function(){if($(".js-switch")[0]){var e=Array.prototype.slice.call(document.querySelectorAll(".js-switch"));e.forEach(function(e){new Switchery(e,{color:"#26B99A"})})}}),/*$(document).ready(function(){$(".checkbox input")[0]&&$(document).ready(function(){$(".checkbox input").iCheck({checkboxClass:"icheckbox_flat-green",radioClass:"iradio_flat-green"})})}),*/$("table .checkbox input").on("ifChecked",function(){checkState="",$(this).parent().parent().parent().addClass("selected"),countChecked()}),$("table .checkbox input").on("ifUnchecked",function(){checkState="",$(this).parent().parent().parent().removeClass("selected"),countChecked()});var checkState="";$(".bulk_action .checkbox input").on("ifChecked",function(){checkState="",$(this).parent().parent().parent().addClass("selected"),countChecked()}),$(".bulk_action .checkbox input").on("ifUnchecked",function(){checkState="",$(this).parent().parent().parent().removeClass("selected"),countChecked()}),$(".bulk_action .checkbox input#check-all").on("ifChecked",function(){checkState="all",countChecked()}),$(".bulk_action .checkbox input#check-all").on("ifUnchecked",function(){checkState="none",countChecked()}),$(document).ready(function(){$(".expand").on("click",function(){$(this).next().slideToggle(200),$expand=$(this).find(">:first-child"),"+"==$expand.text()?$expand.text("-"):$expand.text("+")})}),"undefined"!=typeof NProgress&&($(document).ready(function(){NProgress.start()}),$(window).load(function(){NProgress.done()}));
\ No newline at end of file
/**
* Resize function without multiple trigger
*
* Usage:
* $(window).smartresize(function(){
* // code here
* });
*/
(function($,sr){
// debouncing function from John Hann
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
var debounce = function (func, threshold, execAsap) {
var timeout;
return function debounced () {
var obj = this, args = arguments;
function delayed () {
if (!execAsap)
func.apply(obj, args);
timeout = null;
}
if (timeout)
clearTimeout(timeout);
else if (execAsap)
func.apply(obj, args);
timeout = setTimeout(delayed, threshold || 100);
};
};
// smartresize
jQuery.fn[sr] = function(fn){ return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };
})(jQuery,'smartresize');
/**
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
var CURRENT_URL = window.location.href.split('#')[0].split('?')[0],
$BODY = $('body'),
$MENU_TOGGLE = $('#menu_toggle'),
$SIDEBAR_MENU = $('#sidebar-menu'),
$SIDEBAR_FOOTER = $('.sidebar-footer'),
$LEFT_COL = $('.left_col'),
$RIGHT_COL = $('.right_col'),
$NAV_MENU = $('.nav_menu'),
$FOOTER = $('footer');
// Sidebar
$(document).ready(function() {
// TODO: This is some kind of easy fix, maybe we can improve this
var setContentHeight = function () {
// reset height
$RIGHT_COL.css('min-height', $(window).height());
var bodyHeight = $BODY.outerHeight(),
footerHeight = $BODY.hasClass('footer_fixed') ? -10 : $FOOTER.height(),
leftColHeight = $LEFT_COL.eq(1).height() + $SIDEBAR_FOOTER.height(),
contentHeight = bodyHeight < leftColHeight ? leftColHeight : bodyHeight;
// normalize content
contentHeight -= $NAV_MENU.height() + footerHeight;
$RIGHT_COL.css('min-height', contentHeight);
};
$SIDEBAR_MENU.find('a').on('click', function(ev) {
var $li = $(this).parent();
if ($li.is('.active')) {
$li.removeClass('active active-sm');
$('ul:first', $li).slideUp(function() {
setContentHeight();
});
} else {
// prevent closing menu if we are on child menu
if (!$li.parent().is('.child_menu')) {
$SIDEBAR_MENU.find('li').removeClass('active active-sm');
$SIDEBAR_MENU.find('li ul').slideUp();
}
$li.addClass('active');
$('ul:first', $li).slideDown(function() {
setContentHeight();
});
}
});
// toggle small or large menu
$MENU_TOGGLE.on('click', function() {
if ($BODY.hasClass('nav-md')) {
$SIDEBAR_MENU.find('li.active ul').hide();
$SIDEBAR_MENU.find('li.active').addClass('active-sm').removeClass('active');
} else {
$SIDEBAR_MENU.find('li.active-sm ul').show();
$SIDEBAR_MENU.find('li.active-sm').addClass('active').removeClass('active-sm');
}
$BODY.toggleClass('nav-md nav-sm');
setContentHeight();
});
// check active menu
$SIDEBAR_MENU.find('a[href="' + CURRENT_URL + '"]').parent('li').addClass('current-page');
$SIDEBAR_MENU.find('a').filter(function () {
return this.href == CURRENT_URL;
}).parent('li').addClass('current-page').parents('ul').slideDown(function() {
setContentHeight();
}).parent().addClass('active');
// recompute content when resizing
$(window).smartresize(function(){
setContentHeight();
});
setContentHeight();
// fixed sidebar
if ($.fn.mCustomScrollbar) {
$('.menu_fixed').mCustomScrollbar({
autoHideScrollbar: true,
theme: 'minimal',
mouseWheel:{ preventDefault: true }
});
}
});
// /Sidebar
// Panel toolbox
$(document).ready(function() {
$('.collapse-link').on('click', function() {
var $BOX_PANEL = $(this).closest('.x_panel'),
$ICON = $(this).find('i'),
$BOX_CONTENT = $BOX_PANEL.find('.x_content');
// fix for some div with hardcoded fix class
if ($BOX_PANEL.attr('style')) {
$BOX_CONTENT.slideToggle(200, function(){
$BOX_PANEL.removeAttr('style');
});
} else {
$BOX_CONTENT.slideToggle(200);
$BOX_PANEL.css('height', 'auto');
}
$ICON.toggleClass('fa-chevron-up fa-chevron-down');
});
$('.close-link').click(function () {
var $BOX_PANEL = $(this).closest('.x_panel');
$BOX_PANEL.remove();
});
});
// /Panel toolbox
// Tooltip
$(document).ready(function() {
$('[data-toggle="tooltip"]').tooltip({
container: 'body'
});
});
// /Tooltip
// Progressbar
if ($(".progress .progress-bar")[0]) {
$('.progress .progress-bar').progressbar();
}
// /Progressbar
// Switchery
$(document).ready(function() {
if ($(".js-switch")[0]) {
var elems = Array.prototype.slice.call(document.querySelectorAll('.js-switch'));
elems.forEach(function (html) {
var switchery = new Switchery(html, {
color: '#26B99A'
});
});
}
});
// /Switchery
/*
// iCheck
$(document).ready(function() {
if ($(".checkbox input")[0]) {
$(document).ready(function () {
$('.checkbox input').iCheck({
checkboxClass: 'icheckbox_flat-green',
radioClass: 'iradio_flat-green'
});
});
}
});
// /iCheck
*/
// Table
/*
$('table .checkbox-action').on('ifChecked', function () {
checkState = '';
$(this).parent().parent().parent().addClass('selected');
countChecked();
});
$('table .checkbox-action').on('ifUnchecked', function () {
checkState = '';
$(this).parent().parent().parent().removeClass('selected');
countChecked();
});
var checkState = '';
$('.bulk_action .checkbox-action').on('ifChecked', function () {
checkState = '';
$(this).parent().parent().parent().addClass('selected');
countChecked();
});
$('.bulk_action .checkbox-action').on('ifUnchecked', function () {
checkState = '';
$(this).parent().parent().parent().removeClass('selected');
countChecked();
});
$('.bulk_action .checkbox-action#check-all').on('ifChecked', function () {
checkState = 'all';
countChecked();
});
$('.bulk_action .checkbox-action#check-all').on('ifUnchecked', function () {
checkState = 'none';
countChecked();
});
function countChecked() {
if (checkState === 'all') {
$(".bulk_action .checkbox-action[name='table_records']").iCheck('check');
}
if (checkState === 'none') {
$(".bulk_action .checkbox-action[name='table_records']").iCheck('uncheck');
}
var checkCount = $(".bulk_action .checkbox-action[name='table_records']:checked").length;
if (checkCount) {
$('.column-title').hide();
$('.bulk-actions').show();
$('.action-cnt').html(checkCount + ' Records Selected');
} else {
$('.column-title').show();
$('.bulk-actions').hide();
}
}
*/
// Accordion
$(document).ready(function() {
$(".expand").on("click", function () {
$(this).next().slideToggle(200);
$expand = $(this).find(">:first-child");
if ($expand.text() == "+") {
$expand.text("-");
} else {
$expand.text("+");
}
});
});
// NProgress
if (typeof NProgress != 'undefined') {
$(document).ready(function () {
NProgress.start();
});
$(window).load(function () {
NProgress.done();
});
}
此差异已折叠。
此差异已折叠。
......@@ -424,105 +424,5 @@
<!-- Custom Theme Scripts -->
<script src="../build/js/new-custom2.js"></script>
<!-- FullCalendar -->
<script>
$(window).load(function() {
var date = new Date(),
d = date.getDate(),
m = date.getMonth(),
y = date.getFullYear(),
started,
categoryClass;
var calendar = $('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
selectable: true,
selectHelper: true,
select: function(start, end, allDay) {
$('#fc_create').click();
started = start;
ended = end;
$(".antosubmit").on("click", function() {
var title = $("#title").val();
if (end) {
ended = end;
}
categoryClass = $("#event_type").val();
if (title) {
calendar.fullCalendar('renderEvent', {
title: title,
start: started,
end: end,
allDay: allDay
},
true // make the event "stick"
);
}
$('#title').val('');
calendar.fullCalendar('unselect');
$('.antoclose').click();
return false;
});
},
eventClick: function(calEvent, jsEvent, view) {
$('#fc_edit').click();
$('#title2').val(calEvent.title);
categoryClass = $("#event_type").val();
$(".antosubmit2").on("click", function() {
calEvent.title = $("#title2").val();
calendar.fullCalendar('updateEvent', calEvent);
$('.antoclose2').click();
});
calendar.fullCalendar('unselect');
},
editable: true,
events: [{
title: 'All Day Event',
start: new Date(y, m, 1)
}, {
title: 'Long Event',
start: new Date(y, m, d - 5),
end: new Date(y, m, d - 2)
}, {
title: 'Meeting',
start: new Date(y, m, d, 10, 30),
allDay: false
}, {
title: 'Lunch',
start: new Date(y, m, d + 14, 12, 0),
end: new Date(y, m, d, 14, 0),
allDay: false
}, {
title: 'Birthday Party',
start: new Date(y, m, d + 1, 19, 0),
end: new Date(y, m, d + 1, 22, 30),
allDay: false
}, {
title: 'Click for Google',
start: new Date(y, m, 28),
end: new Date(y, m, 29),
url: 'http://google.com/'
}]
});
});
</script>
<!-- /FullCalendar -->
</body>
</html>
\ No newline at end of file
......@@ -482,204 +482,6 @@
<!-- Custom Theme Scripts -->
<script src="../build/js/new-custom2.js"></script>
<!-- Chart.js -->
<script>
Chart.defaults.global.legend = {
enabled: false
};
// Line chart
var ctx = document.getElementById("lineChart");
var lineChart = new Chart(ctx, {
type: 'line',
data: {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [{
label: "My First dataset",
backgroundColor: "rgba(38, 185, 154, 0.31)",
borderColor: "rgba(38, 185, 154, 0.7)",
pointBorderColor: "rgba(38, 185, 154, 0.7)",
pointBackgroundColor: "rgba(38, 185, 154, 0.7)",
pointHoverBackgroundColor: "#fff",
pointHoverBorderColor: "rgba(220,220,220,1)",
pointBorderWidth: 1,
data: [31, 74, 6, 39, 20, 85, 7]
}, {
label: "My Second dataset",
backgroundColor: "rgba(3, 88, 106, 0.3)",
borderColor: "rgba(3, 88, 106, 0.70)",
pointBorderColor: "rgba(3, 88, 106, 0.70)",
pointBackgroundColor: "rgba(3, 88, 106, 0.70)",
pointHoverBackgroundColor: "#fff",
pointHoverBorderColor: "rgba(151,187,205,1)",
pointBorderWidth: 1,
data: [82, 23, 66, 9, 99, 4, 2]
}]
},
});
// Bar chart
var ctx = document.getElementById("mybarChart");
var mybarChart = new Chart(ctx, {
type: 'bar',
data: {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [{
label: '# of Votes',
backgroundColor: "#26B99A",
data: [51, 30, 40, 28, 92, 50, 45]
}, {
label: '# of Votes',
backgroundColor: "#03586A",
data: [41, 56, 25, 48, 72, 34, 12]
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});
// Doughnut chart
var ctx = document.getElementById("canvasDoughnut");
var data = {
labels: [
"Dark Grey",
"Purple Color",
"Gray Color",
"Green Color",
"Blue Color"
],
datasets: [{
data: [120, 50, 140, 180, 100],
backgroundColor: [
"#455C73",
"#9B59B6",
"#BDC3C7",
"#26B99A",
"#3498DB"
],
hoverBackgroundColor: [
"#34495E",
"#B370CF",
"#CFD4D8",
"#36CAAB",
"#49A9EA"
]
}]
};
var canvasDoughnut = new Chart(ctx, {
type: 'doughnut',
tooltipFillColor: "rgba(51, 51, 51, 0.55)",
data: data
});
// Radar chart
var ctx = document.getElementById("canvasRadar");
var data = {
labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],
datasets: [{
label: "My First dataset",
backgroundColor: "rgba(3, 88, 106, 0.2)",
borderColor: "rgba(3, 88, 106, 0.80)",
pointBorderColor: "rgba(3, 88, 106, 0.80)",
pointBackgroundColor: "rgba(3, 88, 106, 0.80)",
pointHoverBackgroundColor: "#fff",
pointHoverBorderColor: "rgba(220,220,220,1)",
data: [65, 59, 90, 81, 56, 55, 40]
}, {
label: "My Second dataset",
backgroundColor: "rgba(38, 185, 154, 0.2)",
borderColor: "rgba(38, 185, 154, 0.85)",
pointColor: "rgba(38, 185, 154, 0.85)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(151,187,205,1)",
data: [28, 48, 40, 19, 96, 27, 100]
}]
};
var canvasRadar = new Chart(ctx, {
type: 'radar',
data: data,
});
// Pie chart
var ctx = document.getElementById("pieChart");
var data = {
datasets: [{
data: [120, 50, 140, 180, 100],
backgroundColor: [
"#455C73",
"#9B59B6",
"#BDC3C7",
"#26B99A",
"#3498DB"
],
label: 'My dataset' // for legend
}],
labels: [
"Dark Gray",
"Purple",
"Gray",
"Green",
"Blue"
]
};
var pieChart = new Chart(ctx, {
data: data,
type: 'pie',
otpions: {
legend: false
}
});
// PolarArea chart
var ctx = document.getElementById("polarArea");
var data = {
datasets: [{
data: [120, 50, 140, 180, 100],
backgroundColor: [
"#455C73",
"#9B59B6",
"#BDC3C7",
"#26B99A",
"#3498DB"
],
label: 'My dataset'
}],
labels: [
"Dark Gray",
"Purple",
"Gray",
"Green",
"Blue"
]
};
var polarArea = new Chart(ctx, {
data: data,
type: 'polarArea',
options: {
scale: {
ticks: {
beginAtZero: true
}
}
}
});
</script>
<!-- Chart.js -->
</body>
</html>
\ No newline at end of file
......@@ -481,203 +481,5 @@
<!-- Custom Theme Scripts -->
<script src="../build/js/new-custom2.js"></script>
<!-- Chart.js -->
<script>
Chart.defaults.global.legend = {
enabled: false
};
// Line chart
var ctx = document.getElementById("lineChart");
var lineChart = new Chart(ctx, {
type: 'line',
data: {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [{
label: "My First dataset",
backgroundColor: "rgba(38, 185, 154, 0.31)",
borderColor: "rgba(38, 185, 154, 0.7)",
pointBorderColor: "rgba(38, 185, 154, 0.7)",
pointBackgroundColor: "rgba(38, 185, 154, 0.7)",
pointHoverBackgroundColor: "#fff",
pointHoverBorderColor: "rgba(220,220,220,1)",
pointBorderWidth: 1,
data: [31, 74, 6, 39, 20, 85, 7]
}, {
label: "My Second dataset",
backgroundColor: "rgba(3, 88, 106, 0.3)",
borderColor: "rgba(3, 88, 106, 0.70)",
pointBorderColor: "rgba(3, 88, 106, 0.70)",
pointBackgroundColor: "rgba(3, 88, 106, 0.70)",
pointHoverBackgroundColor: "#fff",
pointHoverBorderColor: "rgba(151,187,205,1)",
pointBorderWidth: 1,
data: [82, 23, 66, 9, 99, 4, 2]
}]
},
});
// Bar chart
var ctx = document.getElementById("mybarChart");
var mybarChart = new Chart(ctx, {
type: 'bar',
data: {
labels: ["January", "February", "March", "April", "May", "June", "July"],
datasets: [{
label: '# of Votes',
backgroundColor: "#26B99A",
data: [51, 30, 40, 28, 92, 50, 45]
}, {
label: '# of Votes',
backgroundColor: "#03586A",
data: [41, 56, 25, 48, 72, 34, 12]
}]
},
options: {
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}]
}
}
});
// Doughnut chart
var ctx = document.getElementById("canvasDoughnut");
var data = {
labels: [
"Dark Grey",
"Purple Color",
"Gray Color",
"Green Color",
"Blue Color"
],
datasets: [{
data: [120, 50, 140, 180, 100],
backgroundColor: [
"#455C73",
"#9B59B6",
"#BDC3C7",
"#26B99A",
"#3498DB"
],
hoverBackgroundColor: [
"#34495E",
"#B370CF",
"#CFD4D8",
"#36CAAB",
"#49A9EA"
]
}]
};
var canvasDoughnut = new Chart(ctx, {
type: 'doughnut',
tooltipFillColor: "rgba(51, 51, 51, 0.55)",
data: data
});
// Radar chart
var ctx = document.getElementById("canvasRadar");
var data = {
labels: ["Eating", "Drinking", "Sleeping", "Designing", "Coding", "Cycling", "Running"],
datasets: [{
label: "My First dataset",
backgroundColor: "rgba(3, 88, 106, 0.2)",
borderColor: "rgba(3, 88, 106, 0.80)",
pointBorderColor: "rgba(3, 88, 106, 0.80)",
pointBackgroundColor: "rgba(3, 88, 106, 0.80)",
pointHoverBackgroundColor: "#fff",
pointHoverBorderColor: "rgba(220,220,220,1)",
data: [65, 59, 90, 81, 56, 55, 40]
}, {
label: "My Second dataset",
backgroundColor: "rgba(38, 185, 154, 0.2)",
borderColor: "rgba(38, 185, 154, 0.85)",
pointColor: "rgba(38, 185, 154, 0.85)",
pointStrokeColor: "#fff",
pointHighlightFill: "#fff",
pointHighlightStroke: "rgba(151,187,205,1)",
data: [28, 48, 40, 19, 96, 27, 100]
}]
};
var canvasRadar = new Chart(ctx, {
type: 'radar',
data: data,
});
// Pie chart
var ctx = document.getElementById("pieChart");
var data = {
datasets: [{
data: [120, 50, 140, 180, 100],
backgroundColor: [
"#455C73",
"#9B59B6",
"#BDC3C7",
"#26B99A",
"#3498DB"
],
label: 'My dataset' // for legend
}],
labels: [
"Dark Gray",
"Purple",
"Gray",
"Green",
"Blue"
]
};
var pieChart = new Chart(ctx, {
data: data,
type: 'pie',
otpions: {
legend: false
}
});
// PolarArea chart
var ctx = document.getElementById("polarArea");
var data = {
datasets: [{
data: [120, 50, 140, 180, 100],
backgroundColor: [
"#455C73",
"#9B59B6",
"#BDC3C7",
"#26B99A",
"#3498DB"
],
label: 'My dataset' // for legend
}],
labels: [
"Dark Gray",
"Purple",
"Gray",
"Green",
"Blue"
]
};
var polarArea = new Chart(ctx, {
data: data,
type: 'polarArea',
options: {
scale: {
ticks: {
beginAtZero: true
}
}
}
});
</script>
<!-- /Chart.js -->
</body>
</html>
\ No newline at end of file
此差异已折叠。
......@@ -1362,218 +1362,6 @@
<script src="../vendors/starrr/dist/starrr.js"></script>
<!-- Custom Theme Scripts -->
<script src="../build/js/new-custom2.js"></script>
<!-- bootstrap-daterangepicker -->
<script>
$(document).ready(function() {
$('#birthday').daterangepicker({
singleDatePicker: true,
calender_style: "picker_4"
}, function(start, end, label) {
console.log(start.toISOString(), end.toISOString(), label);
});
});
</script>
<!-- /bootstrap-daterangepicker -->
<!-- bootstrap-wysiwyg -->
<script>
$(document).ready(function() {
function initToolbarBootstrapBindings() {
var fonts = ['Serif', 'Sans', 'Arial', 'Arial Black', 'Courier',
'Courier New', 'Comic Sans MS', 'Helvetica', 'Impact', 'Lucida Grande', 'Lucida Sans', 'Tahoma', 'Times',
'Times New Roman', 'Verdana'
],
fontTarget = $('[title=Font]').siblings('.dropdown-menu');
$.each(fonts, function(idx, fontName) {
fontTarget.append($('<li><a data-edit="fontName ' + fontName + '" style="font-family:\'' + fontName + '\'">' + fontName + '</a></li>'));
});
$('a[title]').tooltip({
container: 'body'
});
$('.dropdown-menu input').click(function() {
return false;
})
.change(function() {
$(this).parent('.dropdown-menu').siblings('.dropdown-toggle').dropdown('toggle');
})
.keydown('esc', function() {
this.value = '';
$(this).change();
});
$('[data-role=magic-overlay]').each(function() {
var overlay = $(this),
target = $(overlay.data('target'));
overlay.css('opacity', 0).css('position', 'absolute').offset(target.offset()).width(target.outerWidth()).height(target.outerHeight());
});
if ("onwebkitspeechchange" in document.createElement("input")) {
var editorOffset = $('#editor').offset();
$('.voiceBtn').css('position', 'absolute').offset({
top: editorOffset.top,
left: editorOffset.left + $('#editor').innerWidth() - 35
});
} else {
$('.voiceBtn').hide();
}
}
function showErrorAlert(reason, detail) {
var msg = '';
if (reason === 'unsupported-file-type') {
msg = "Unsupported format " + detail;
} else {
console.log("error uploading file", reason, detail);
}
$('<div class="alert"> <button type="button" class="close" data-dismiss="alert">&times;</button>' +
'<strong>File upload error</strong> ' + msg + ' </div>').prependTo('#alerts');
}
initToolbarBootstrapBindings();
$('#editor').wysiwyg({
fileUploadError: showErrorAlert
});
window.prettyPrint;
prettyPrint();
});
</script>
<!-- /bootstrap-wysiwyg -->
<!-- Select2 -->
<script>
$(document).ready(function() {
$(".select2_single").select2({
placeholder: "Select a state",
allowClear: true
});
$(".select2_group").select2({});
$(".select2_multiple").select2({
maximumSelectionLength: 4,
placeholder: "With Max Selection limit 4",
allowClear: true
});
});
</script>
<!-- /Select2 -->
<!-- jQuery Tags Input -->
<script>
function onAddTag(tag) {
alert("Added a tag: " + tag);
}
function onRemoveTag(tag) {
alert("Removed a tag: " + tag);
}
function onChangeTag(input, tag) {
alert("Changed a tag: " + tag);
}
$(document).ready(function() {
$('#tags_1').tagsInput({
width: 'auto'
});
});
</script>
<!-- /jQuery Tags Input -->
<!-- Parsley -->
<script>
$(document).ready(function() {
$.listen('parsley:field:validate', function() {
validateFront();
});
$('#demo-form .btn').on('click', function() {
$('#demo-form').parsley().validate();
validateFront();
});
var validateFront = function() {
if (true === $('#demo-form').parsley().isValid()) {
$('.bs-callout-info').removeClass('hidden');
$('.bs-callout-warning').addClass('hidden');
} else {
$('.bs-callout-info').addClass('hidden');
$('.bs-callout-warning').removeClass('hidden');
}
};
});
$(document).ready(function() {
$.listen('parsley:field:validate', function() {
validateFront();
});
$('#demo-form2 .btn').on('click', function() {
$('#demo-form2').parsley().validate();
validateFront();
});
var validateFront = function() {
if (true === $('#demo-form2').parsley().isValid()) {
$('.bs-callout-info').removeClass('hidden');
$('.bs-callout-warning').addClass('hidden');
} else {
$('.bs-callout-info').addClass('hidden');
$('.bs-callout-warning').removeClass('hidden');
}
};
});
try {
hljs.initHighlightingOnLoad();
} catch (err) {}
</script>
<!-- /Parsley -->
<!-- Autosize -->
<script>
$(document).ready(function() {
autosize($('.resizable_textarea'));
});
</script>
<!-- /Autosize -->
<!-- jQuery autocomplete -->
<script>
$(document).ready(function() {
var countries = { AD:"Andorra",A2:"Andorra Test",AE:"United Arab Emirates",AF:"Afghanistan",AG:"Antigua and Barbuda",AI:"Anguilla",AL:"Albania",AM:"Armenia",AN:"Netherlands Antilles",AO:"Angola",AQ:"Antarctica",AR:"Argentina",AS:"American Samoa",AT:"Austria",AU:"Australia",AW:"Aruba",AX:"Åland Islands",AZ:"Azerbaijan",BA:"Bosnia and Herzegovina",BB:"Barbados",BD:"Bangladesh",BE:"Belgium",BF:"Burkina Faso",BG:"Bulgaria",BH:"Bahrain",BI:"Burundi",BJ:"Benin",BL:"Saint Barthélemy",BM:"Bermuda",BN:"Brunei",BO:"Bolivia",BQ:"British Antarctic Territory",BR:"Brazil",BS:"Bahamas",BT:"Bhutan",BV:"Bouvet Island",BW:"Botswana",BY:"Belarus",BZ:"Belize",CA:"Canada",CC:"Cocos [Keeling] Islands",CD:"Congo - Kinshasa",CF:"Central African Republic",CG:"Congo - Brazzaville",CH:"Switzerland",CI:"Côte d’Ivoire",CK:"Cook Islands",CL:"Chile",CM:"Cameroon",CN:"China",CO:"Colombia",CR:"Costa Rica",CS:"Serbia and Montenegro",CT:"Canton and Enderbury Islands",CU:"Cuba",CV:"Cape Verde",CX:"Christmas Island",CY:"Cyprus",CZ:"Czech Republic",DD:"East Germany",DE:"Germany",DJ:"Djibouti",DK:"Denmark",DM:"Dominica",DO:"Dominican Republic",DZ:"Algeria",EC:"Ecuador",EE:"Estonia",EG:"Egypt",EH:"Western Sahara",ER:"Eritrea",ES:"Spain",ET:"Ethiopia",FI:"Finland",FJ:"Fiji",FK:"Falkland Islands",FM:"Micronesia",FO:"Faroe Islands",FQ:"French Southern and Antarctic Territories",FR:"France",FX:"Metropolitan France",GA:"Gabon",GB:"United Kingdom",GD:"Grenada",GE:"Georgia",GF:"French Guiana",GG:"Guernsey",GH:"Ghana",GI:"Gibraltar",GL:"Greenland",GM:"Gambia",GN:"Guinea",GP:"Guadeloupe",GQ:"Equatorial Guinea",GR:"Greece",GS:"South Georgia and the South Sandwich Islands",GT:"Guatemala",GU:"Guam",GW:"Guinea-Bissau",GY:"Guyana",HK:"Hong Kong SAR China",HM:"Heard Island and McDonald Islands",HN:"Honduras",HR:"Croatia",HT:"Haiti",HU:"Hungary",ID:"Indonesia",IE:"Ireland",IL:"Israel",IM:"Isle of Man",IN:"India",IO:"British Indian Ocean Territory",IQ:"Iraq",IR:"Iran",IS:"Iceland",IT:"Italy",JE:"Jersey",JM:"Jamaica",JO:"Jordan",JP:"Japan",JT:"Johnston Island",KE:"Kenya",KG:"Kyrgyzstan",KH:"Cambodia",KI:"Kiribati",KM:"Comoros",KN:"Saint Kitts and Nevis",KP:"North Korea",KR:"South Korea",KW:"Kuwait",KY:"Cayman Islands",KZ:"Kazakhstan",LA:"Laos",LB:"Lebanon",LC:"Saint Lucia",LI:"Liechtenstein",LK:"Sri Lanka",LR:"Liberia",LS:"Lesotho",LT:"Lithuania",LU:"Luxembourg",LV:"Latvia",LY:"Libya",MA:"Morocco",MC:"Monaco",MD:"Moldova",ME:"Montenegro",MF:"Saint Martin",MG:"Madagascar",MH:"Marshall Islands",MI:"Midway Islands",MK:"Macedonia",ML:"Mali",MM:"Myanmar [Burma]",MN:"Mongolia",MO:"Macau SAR China",MP:"Northern Mariana Islands",MQ:"Martinique",MR:"Mauritania",MS:"Montserrat",MT:"Malta",MU:"Mauritius",MV:"Maldives",MW:"Malawi",MX:"Mexico",MY:"Malaysia",MZ:"Mozambique",NA:"Namibia",NC:"New Caledonia",NE:"Niger",NF:"Norfolk Island",NG:"Nigeria",NI:"Nicaragua",NL:"Netherlands",NO:"Norway",NP:"Nepal",NQ:"Dronning Maud Land",NR:"Nauru",NT:"Neutral Zone",NU:"Niue",NZ:"New Zealand",OM:"Oman",PA:"Panama",PC:"Pacific Islands Trust Territory",PE:"Peru",PF:"French Polynesia",PG:"Papua New Guinea",PH:"Philippines",PK:"Pakistan",PL:"Poland",PM:"Saint Pierre and Miquelon",PN:"Pitcairn Islands",PR:"Puerto Rico",PS:"Palestinian Territories",PT:"Portugal",PU:"U.S. Miscellaneous Pacific Islands",PW:"Palau",PY:"Paraguay",PZ:"Panama Canal Zone",QA:"Qatar",RE:"Réunion",RO:"Romania",RS:"Serbia",RU:"Russia",RW:"Rwanda",SA:"Saudi Arabia",SB:"Solomon Islands",SC:"Seychelles",SD:"Sudan",SE:"Sweden",SG:"Singapore",SH:"Saint Helena",SI:"Slovenia",SJ:"Svalbard and Jan Mayen",SK:"Slovakia",SL:"Sierra Leone",SM:"San Marino",SN:"Senegal",SO:"Somalia",SR:"Suriname",ST:"São Tomé and Príncipe",SU:"Union of Soviet Socialist Republics",SV:"El Salvador",SY:"Syria",SZ:"Swaziland",TC:"Turks and Caicos Islands",TD:"Chad",TF:"French Southern Territories",TG:"Togo",TH:"Thailand",TJ:"Tajikistan",TK:"Tokelau",TL:"Timor-Leste",TM:"Turkmenistan",TN:"Tunisia",TO:"Tonga",TR:"Turkey",TT:"Trinidad and Tobago",TV:"Tuvalu",TW:"Taiwan",TZ:"Tanzania",UA:"Ukraine",UG:"Uganda",UM:"U.S. Minor Outlying Islands",US:"United States",UY:"Uruguay",UZ:"Uzbekistan",VA:"Vatican City",VC:"Saint Vincent and the Grenadines",VD:"North Vietnam",VE:"Venezuela",VG:"British Virgin Islands",VI:"U.S. Virgin Islands",VN:"Vietnam",VU:"Vanuatu",WF:"Wallis and Futuna",WK:"Wake Island",WS:"Samoa",YD:"People's Democratic Republic of Yemen",YE:"Yemen",YT:"Mayotte",ZA:"South Africa",ZM:"Zambia",ZW:"Zimbabwe",ZZ:"Unknown or Invalid Region" };
var countriesArray = $.map(countries, function(value, key) {
return {
value: value,
data: key
};
});
// initialize autocomplete with custom appendTo
$('#autocomplete-custom-append').autocomplete({
lookup: countriesArray
});
});
</script>
<!-- /jQuery autocomplete -->
<!-- Starrr -->
<script>
$(document).ready(function() {
$(".stars").starrr();
$('.stars-existing').starrr({
rating: 4
});
$('.stars').on('starrr:change', function (e, value) {
$('.stars-count').html(value);
});
$('.stars-existing').on('starrr:change', function (e, value) {
$('.stars-count-existing').html(value);
});
});
</script>
<!-- /Starrr -->
</body>
</html>
此差异已折叠。
......@@ -425,37 +425,5 @@
<!-- Custom Theme Scripts -->
<script src="../build/js/new-custom2.js"></script>
<!-- validator -->
<script>
// initialize the validator function
validator.message.date = 'not a real date';
// validate a field on "blur" event, a 'select' on 'change' event & a '.reuired' classed multifield on 'keyup':
$('form')
.on('blur', 'input[required], input.optional, select.required', validator.checkField)
.on('change', 'select.required', validator.checkField)
.on('keypress', 'input[required][pattern]', validator.keypress);
$('.multi.required').on('keyup blur', 'input', function() {
validator.checkField.apply($(this).siblings().last()[0]);
});
$('form').submit(function(e) {
e.preventDefault();
var submit = true;
// evaluate the form using generic validaing
if (!validator.checkAll($(this))) {
submit = false;
}
if (submit)
this.submit();
return false;
});
</script>
<!-- /validator -->
</body>
</html>
\ No newline at end of file
......@@ -599,21 +599,6 @@
<!-- Custom Theme Scripts -->
<script src="../build/js/new-custom2.js"></script>
<!-- jQuery Smart Wizard -->
<script>
$(document).ready(function() {
$('#wizard').smartWizard();
$('#wizard_verticle').smartWizard({
transitionEffect: 'slide'
});
$('.buttonNext').addClass('btn btn-success');
$('.buttonPrevious').addClass('btn btn-primary');
$('.buttonFinish').addClass('btn btn-default');
});
</script>
<!-- /jQuery Smart Wizard -->
</body>
</html>
\ No newline at end of file
......@@ -1656,87 +1656,6 @@
<!-- Custom Theme Scripts -->
<script src="../build/js/new-custom2.js"></script>
<!-- PNotify -->
<script>
$(document).ready(function() {
new PNotify({
title: "PNotify",
type: "info",
text: "Welcome. Try hovering over me. You can click things behind me, because I'm non-blocking.",
nonblock: {
nonblock: true
},
addclass: 'dark',
styling: 'bootstrap3',
hide: false,
before_close: function(PNotify) {
PNotify.update({
title: PNotify.options.title + " - Enjoy your Stay",
before_close: null
});
PNotify.queueRemove();
return false;
}
});
});
</script>
<!-- /PNotify -->
<!-- Custom Notification -->
<script>
$(document).ready(function() {
var cnt = 10;
TabbedNotification = function(options) {
var message = "<div id='ntf" + cnt + "' class='text alert-" + options.type + "' style='display:none'><h2><i class='fa fa-bell'></i> " + options.title +
"</h2><div class='close'><a href='javascript:;' class='notification_close'><i class='fa fa-close'></i></a></div><p>" + options.text + "</p></div>";
if (!document.getElementById('custom_notifications')) {
alert('doesnt exists');
} else {
$('#custom_notifications ul.notifications').append("<li><a id='ntlink" + cnt + "' class='alert-" + options.type + "' href='#ntf" + cnt + "'><i class='fa fa-bell animated shake'></i></a></li>");
$('#custom_notifications #notif-group').append(message);
cnt++;
CustomTabs(options);
}
};
CustomTabs = function(options) {
$('.tabbed_notifications > div').hide();
$('.tabbed_notifications > div:first-of-type').show();
$('#custom_notifications').removeClass('dsp_none');
$('.notifications a').click(function(e) {
e.preventDefault();
var $this = $(this),
tabbed_notifications = '#' + $this.parents('.notifications').data('tabbed_notifications'),
others = $this.closest('li').siblings().children('a'),
target = $this.attr('href');
others.removeClass('active');
$this.addClass('active');
$(tabbed_notifications).children('div').hide();
$(target).show();
});
};
CustomTabs();
var tabid = idname = '';
$(document).on('click', '.notification_close', function(e) {
idname = $(this).parent().parent().attr("id");
tabid = idname.substr(-2);
$('#ntf' + tabid).remove();
$('#ntlink' + tabid).parent().remove();
$('.notifications a').first().addClass('active');
$('#notif-group div').first().css('display', 'block');
});
});
</script>
<!-- /Custom Notification -->
</body>
</html>
\ No newline at end of file
......@@ -638,79 +638,5 @@
<!-- Custom Theme Scripts -->
<script src="../build/js/new-custom2.js"></script>
<!-- bootstrap-wysiwyg -->
<script>
$(document).ready(function() {
function initToolbarBootstrapBindings() {
var fonts = ['Serif', 'Sans', 'Arial', 'Arial Black', 'Courier',
'Courier New', 'Comic Sans MS', 'Helvetica', 'Impact', 'Lucida Grande', 'Lucida Sans', 'Tahoma', 'Times',
'Times New Roman', 'Verdana'
],
fontTarget = $('[title=Font]').siblings('.dropdown-menu');
$.each(fonts, function(idx, fontName) {
fontTarget.append($('<li><a data-edit="fontName ' + fontName + '" style="font-family:\'' + fontName + '\'">' + fontName + '</a></li>'));
});
$('a[title]').tooltip({
container: 'body'
});
$('.dropdown-menu input').click(function() {
return false;
})
.change(function() {
$(this).parent('.dropdown-menu').siblings('.dropdown-toggle').dropdown('toggle');
})
.keydown('esc', function() {
this.value = '';
$(this).change();
});
$('[data-role=magic-overlay]').each(function() {
var overlay = $(this),
target = $(overlay.data('target'));
overlay.css('opacity', 0).css('position', 'absolute').offset(target.offset()).width(target.outerWidth()).height(target.outerHeight());
});
if ("onwebkitspeechchange" in document.createElement("input")) {
var editorOffset = $('#editor').offset();
$('.voiceBtn').css('position', 'absolute').offset({
top: editorOffset.top,
left: editorOffset.left + $('#editor').innerWidth() - 35
});
} else {
$('.voiceBtn').hide();
}
}
function showErrorAlert(reason, detail) {
var msg = '';
if (reason === 'unsupported-file-type') {
msg = "Unsupported format " + detail;
} else {
console.log("error uploading file", reason, detail);
}
$('<div class="alert"> <button type="button" class="close" data-dismiss="alert">&times;</button>' +
'<strong>File upload error</strong> ' + msg + ' </div>').prependTo('#alerts');
}
initToolbarBootstrapBindings();
$('#editor').wysiwyg({
fileUploadError: showErrorAlert
});
prettyPrint();
});
</script>
<!-- /bootstrap-wysiwyg -->
<!-- compose -->
<script>
$('#compose, .compose-close').click(function(){
$('.compose').slideToggle();
});
</script>>
<!-- /compose -->
</body>
</html>
\ No newline at end of file
......@@ -328,10 +328,7 @@
</div>
<div class="col-md-9 col-sm-9 col-xs-12">
<div id="placeholder33x" <!--style="height: 260px; display: none"--> class="demo-placeholder"></div>
<div style="width: 100%;">
<div id="canvas_dahs" class="demo-placeholder" style="width: 100%; height:270px;"></div>
</div>
<div id="chart_plot_01" class="demo-placeholder"></div>
</div>
<div class="col-md-3 col-sm-3 col-xs-12 bg-white">
<div class="x_title">
......@@ -617,13 +614,13 @@
</ul>
<div class="sidebar-widget">
<h4>Profile Completion</h4>
<canvas width="150" height="80" id="foo" class="" style="width: 160px; height: 100px;"></canvas>
<div class="goal-wrapper">
<span class="gauge-value pull-left">$</span>
<span id="gauge-text" class="gauge-value pull-left">3,200</span>
<span id="goal-text" class="goal-value pull-right">$5,000</span>
</div>
<h4>Profile Completion</h4>
<canvas width="150" height="80" id="chart_gauge_01" class="" style="width: 160px; height: 100px;"></canvas>
<div class="goal-wrapper">
<span id="gauge-text" class="gauge-value pull-left">0</span>
<span class="gauge-value pull-left">%</span>
<span id="goal-text" class="goal-value pull-right">100%</span>
</div>
</div>
</div>
</div>
......
......@@ -321,7 +321,7 @@
<div class="x_content">
<div class="col-md-9 col-sm-12 col-xs-12">
<div class="demo-container" style="height:280px">
<div id="placeholder33x" style="width: 100%; height:270px;" class="demo-placeholder"></div>
<div id="chart_plot_02" class="demo-placeholder"></div>
</div>
<div class="tiles">
<div class="col-md-4 tile">
......@@ -767,81 +767,5 @@
<!-- Custom Theme Scripts -->
<script src="../build/js/new-custom2.js"></script>
<!-- bootstrap-daterangepicker -->
<!--
<script type="text/javascript">
$(document).ready(function() {
var cb = function(start, end, label) {
console.log(start.toISOString(), end.toISOString(), label);
$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
};
var optionSet1 = {
startDate: moment().subtract(29, 'days'),
endDate: moment(),
minDate: '01/01/2012',
maxDate: '12/31/2015',
dateLimit: {
days: 60
},
showDropdowns: true,
showWeekNumbers: true,
timePicker: false,
timePickerIncrement: 1,
timePicker12Hour: true,
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
},
opens: 'left',
buttonClasses: ['btn btn-default'],
applyClass: 'btn-small btn-primary',
cancelClass: 'btn-small',
format: 'MM/DD/YYYY',
separator: ' to ',
locale: {
applyLabel: 'Submit',
cancelLabel: 'Clear',
fromLabel: 'From',
toLabel: 'To',
customRangeLabel: 'Custom',
daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
firstDay: 1
}
};
$('#reportrange span').html(moment().subtract(29, 'days').format('MMMM D, YYYY') + ' - ' + moment().format('MMMM D, YYYY'));
$('#reportrange').daterangepicker(optionSet1, cb);
$('#reportrange').on('show.daterangepicker', function() {
console.log("show event fired");
});
$('#reportrange').on('hide.daterangepicker', function() {
console.log("hide event fired");
});
$('#reportrange').on('apply.daterangepicker', function(ev, picker) {
console.log("apply event fired, start/end dates are " + picker.startDate.format('MMMM D, YYYY') + " to " + picker.endDate.format('MMMM D, YYYY'));
});
$('#reportrange').on('cancel.daterangepicker', function(ev, picker) {
console.log("cancel event fired");
});
$('#options1').click(function() {
$('#reportrange').data('daterangepicker').setOptions(optionSet1, cb);
});
$('#options2').click(function() {
$('#reportrange').data('daterangepicker').setOptions(optionSet2, cb);
});
$('#destroy').click(function() {
$('#reportrange').data('daterangepicker').remove();
});
});
</script>
-->
<!-- /bootstrap-daterangepicker -->
</body>
</html>
\ No newline at end of file
......@@ -277,14 +277,14 @@
<div class="col-md-3 col-sm-3 col-xs-6 tile">
<span>Total Sessions</span>
<h2>231,809</h2>
<span class="sparkline_two" style="height: 160px;">
<span class="sparkline_one" style="height: 160px;">
<canvas width="200" height="60" style="display: inline-block; vertical-align: top; width: 94px; height: 30px;"></canvas>
</span>
</div>
<div class="col-md-3 col-sm-3 col-xs-6 tile">
<span>Total Revenue</span>
<h2>$ 231,809</h2>
<span class="sparkline_two" style="height: 160px;">
<span class="sparkline_one" style="height: 160px;">
<canvas width="200" height="60" style="display: inline-block; vertical-align: top; width: 94px; height: 30px;"></canvas>
</span>
</div>
......@@ -298,7 +298,7 @@
<div class="col-md-3 col-sm-3 col-xs-6 tile">
<span>Total Sessions</span>
<h2>231,809</h2>
<span class="sparkline_two" style="height: 160px;">
<span class="sparkline_one" style="height: 160px;">
<canvas width="200" height="60" style="display: inline-block; vertical-align: top; width: 94px; height: 30px;"></canvas>
</span>
</div>
......@@ -322,7 +322,7 @@
</div>
<div class="x_content">
<div class="demo-container" style="height:250px">
<div id="placeholder3xx3" class="demo-placeholder" style="width: 100%; height:250px;"></div>
<div id="chart_plot_03" class="demo-placeholder"></div>
</div>
</div>
</div>
......@@ -553,9 +553,9 @@
<div class="sidebar-widget">
<h4>Profile Completion</h4>
<canvas width="150" height="80" id="foo" class="" style="width: 160px; height: 100px;"></canvas>
<canvas width="150" height="80" id="chart_gauge_01" class="" style="width: 160px; height: 100px;"></canvas>
<div class="goal-wrapper">
<span id="gauge-text" class="gauge-value pull-left">0</span>
<span id="gauge-text" class="gauge-value gauge-chart pull-left">0</span>
<span class="gauge-value pull-left">%</span>
<span id="goal-text" class="goal-value pull-right">100%</span>
</div>
......@@ -817,7 +817,7 @@
<div class="sidebar-widget">
<h4>Goal</h4>
<canvas width="150" height="80" id="foo2" class="" style="width: 160px; height: 100px;"></canvas>
<canvas width="150" height="80" id="chart_gauge_02" class="" style="width: 160px; height: 100px;"></canvas>
<div class="goal-wrapper">
<span class="gauge-value pull-left">$</span>
<span id="gauge-text2" class="gauge-value pull-left">3,200</span>
......@@ -883,66 +883,7 @@
<!-- Custom Theme Scripts -->
<script src="../build/js/new-custom2.js"></script>
<!-- Flot -->
<script>
$(document).ready(function() {
//random data
var d1 = [
[0, 1],
[1, 9],
[2, 6],
[3, 10],
[4, 5],
[5, 17],
[6, 6],
[7, 10],
[8, 7],
[9, 11],
[10, 35],
[11, 9],
[12, 12],
[13, 5],
[14, 3],
[15, 4],
[16, 9]
];
//flot options
var options = {
series: {
curvedLines: {
apply: true,
active: true,
monotonicFit: true
}
},
colors: ["#26B99A"],
grid: {
borderWidth: {
top: 0,
right: 0,
bottom: 1,
left: 1
},
borderColor: {
bottom: "#7F8790",
left: "#7F8790"
}
}
};
var plot = $.plot($("#placeholder3xx3"), [{
label: "Registrations",
data: d1,
lines: {
fillColor: "rgba(150, 202, 89, 0.12)"
}, //#96CA59 rgba(150, 202, 89, 0.42)
points: {
fillColor: "#fff"
}
}], options);
});
</script>
<!-- /Flot -->
<!-- jQuery Sparklines -->
<script>
......@@ -1139,41 +1080,6 @@
icons.play();
</script>
<!-- /Skycons -->
<!-- gauge.js -->
<script>
var opts = {
lines: 12,
angle: 0,
lineWidth: 0.4,
pointer: {
length: 0.75,
strokeWidth: 0.042,
color: '#1D212A'
},
limitMax: 'false',
colorStart: '#1ABC9C',
colorStop: '#1ABC9C',
strokeColor: '#F0F3F3',
generateGradient: true
};
var target = document.getElementById('foo'),
gauge = new Gauge(target).setOptions(opts);
gauge.maxValue = 100;
gauge.animationSpeed = 32;
gauge.set(80);
gauge.setTextField(document.getElementById("gauge-text"));
var target = document.getElementById('foo2'),
gauge = new Gauge(target).setOptions(opts);
gauge.maxValue = 5000;
gauge.animationSpeed = 32;
gauge.set(4200);
gauge.setTextField(document.getElementById("gauge-text2"));
</script>
<!-- /gauge.js -->
</body>
</html>
\ No newline at end of file
......@@ -372,7 +372,7 @@
<div class="clearfix"></div>
</div>
<div class="x_content2">
<div id="graphx" style="width:100%; height:300px;"></div>
<div id="graphx" style="width:100%; height:300px;" ></div>
</div>
</div>
</div>
......@@ -495,135 +495,5 @@
<!-- Custom Theme Scripts -->
<script src="../build/js/new-custom2.js"></script>
<!-- morris.js -->
<script>
$(document).ready(function() {
Morris.Bar({
element: 'graph_bar',
data: [
{device: 'iPhone 4', geekbench: 380},
{device: 'iPhone 4S', geekbench: 655},
{device: 'iPhone 3GS', geekbench: 275},
{device: 'iPhone 5', geekbench: 1571},
{device: 'iPhone 5S', geekbench: 655},
{device: 'iPhone 6', geekbench: 2154},
{device: 'iPhone 6 Plus', geekbench: 1144},
{device: 'iPhone 6S', geekbench: 2371},
{device: 'iPhone 6S Plus', geekbench: 1471},
{device: 'Other', geekbench: 1371}
],
xkey: 'device',
ykeys: ['geekbench'],
labels: ['Geekbench'],
barRatio: 0.4,
barColors: ['#26B99A', '#34495E', '#ACADAC', '#3498DB'],
xLabelAngle: 35,
hideHover: 'auto',
resize: true
});
Morris.Bar({
element: 'graph_bar_group',
data: [
{"period": "2016-10-01", "licensed": 807, "sorned": 660},
{"period": "2016-09-30", "licensed": 1251, "sorned": 729},
{"period": "2016-09-29", "licensed": 1769, "sorned": 1018},
{"period": "2016-09-20", "licensed": 2246, "sorned": 1461},
{"period": "2016-09-19", "licensed": 2657, "sorned": 1967},
{"period": "2016-09-18", "licensed": 3148, "sorned": 2627},
{"period": "2016-09-17", "licensed": 3471, "sorned": 3740},
{"period": "2016-09-16", "licensed": 2871, "sorned": 2216},
{"period": "2016-09-15", "licensed": 2401, "sorned": 1656},
{"period": "2016-09-10", "licensed": 2115, "sorned": 1022}
],
xkey: 'period',
barColors: ['#26B99A', '#34495E', '#ACADAC', '#3498DB'],
ykeys: ['licensed', 'sorned'],
labels: ['Licensed', 'SORN'],
hideHover: 'auto',
xLabelAngle: 60,
resize: true
});
Morris.Bar({
element: 'graphx',
data: [
{x: '2015 Q1', y: 2, z: 3, a: 4},
{x: '2015 Q2', y: 3, z: 5, a: 6},
{x: '2015 Q3', y: 4, z: 3, a: 2},
{x: '2015 Q4', y: 2, z: 4, a: 5}
],
xkey: 'x',
ykeys: ['y', 'z', 'a'],
barColors: ['#26B99A', '#34495E', '#ACADAC', '#3498DB'],
hideHover: 'auto',
labels: ['Y', 'Z', 'A'],
resize: true
}).on('click', function (i, row) {
console.log(i, row);
});
Morris.Area({
element: 'graph_area',
data: [
{period: '2014 Q1', iphone: 2666, ipad: null, itouch: 2647},
{period: '2014 Q2', iphone: 2778, ipad: 2294, itouch: 2441},
{period: '2014 Q3', iphone: 4912, ipad: 1969, itouch: 2501},
{period: '2014 Q4', iphone: 3767, ipad: 3597, itouch: 5689},
{period: '2015 Q1', iphone: 6810, ipad: 1914, itouch: 2293},
{period: '2015 Q2', iphone: 5670, ipad: 4293, itouch: 1881},
{period: '2015 Q3', iphone: 4820, ipad: 3795, itouch: 1588},
{period: '2015 Q4', iphone: 15073, ipad: 5967, itouch: 5175},
{period: '2016 Q1', iphone: 10687, ipad: 4460, itouch: 2028},
{period: '2016 Q2', iphone: 8432, ipad: 5713, itouch: 1791}
],
xkey: 'period',
ykeys: ['iphone', 'ipad', 'itouch'],
lineColors: ['#26B99A', '#34495E', '#ACADAC', '#3498DB'],
labels: ['iPhone', 'iPad', 'iPod Touch'],
pointSize: 2,
hideHover: 'auto',
resize: true
});
Morris.Donut({
element: 'graph_donut',
data: [
{label: 'Jam', value: 25},
{label: 'Frosted', value: 40},
{label: 'Custard', value: 25},
{label: 'Sugar', value: 10}
],
colors: ['#26B99A', '#34495E', '#ACADAC', '#3498DB'],
formatter: function (y) {
return y + "%";
},
resize: true
});
Morris.Line({
element: 'graph_line',
xkey: 'year',
ykeys: ['value'],
labels: ['Value'],
hideHover: 'auto',
lineColors: ['#26B99A', '#34495E', '#ACADAC', '#3498DB'],
data: [
{year: '2012', value: 20},
{year: '2013', value: 10},
{year: '2014', value: 5},
{year: '2015', value: 5},
{year: '2016', value: 20}
],
resize: true
});
$MENU_TOGGLE.on('click', function() {
$(window).resize();
});
});
</script>
<!-- /morris.js -->
</body>
</html>
\ No newline at end of file
......@@ -457,143 +457,6 @@
<!-- Custom Theme Scripts -->
<script src="../build/js/new-custom2.js"></script>
<!-- JQVMap -->
<script>
$(document).ready(function(){
$('#usa_map').vectorMap({
map: 'usa_en',
backgroundColor: null,
color: '#ffffff',
hoverOpacity: 0.7,
selectedColor: '#666666',
enableZoom: true,
showTooltip: true,
values: sample_data,
scaleColors: ['#E6F2F0', '#149B7E'],
normalizeFunction: 'polynomial'
});
$('#world-map-gdp').vectorMap({
map: 'world_en',
backgroundColor: null,
color: '#ffffff',
hoverOpacity: 0.7,
selectedColor: '#666666',
enableZoom: true,
showTooltip: true,
values: sample_data,
scaleColors: ['#E6F2F0', '#149B7E'],
normalizeFunction: 'polynomial'
});
});
</script>
<!-- /JQVMap -->
<!-- easy-pie-chart -->
<script>
$(document).ready(function() {
$('.chart').easyPieChart({
easing: 'easeOutElastic',
delay: 3000,
barColor: '#26B99A',
trackColor: '#fff',
scaleColor: false,
lineWidth: 20,
trackWidth: 16,
lineCap: 'butt',
onStep: function(from, to, percent) {
$(this.el).find('.percent').text(Math.round(percent));
}
});
var chart = window.chart = $('.chart').data('easyPieChart');
$('.js_update').on('click', function() {
chart.update(Math.random() * 200 - 100);
});
//hover and retain popover when on popover content
var originalLeave = $.fn.popover.Constructor.prototype.leave;
$.fn.popover.Constructor.prototype.leave = function(obj) {
var self = obj instanceof this.constructor ?
obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type);
var container, timeout;
originalLeave.call(this, obj);
if (obj.currentTarget) {
container = $(obj.currentTarget).siblings('.popover');
timeout = self.timeout;
container.one('mouseenter', function() {
//We entered the actual popover – call off the dogs
clearTimeout(timeout);
//Let's monitor popover content instead
container.one('mouseleave', function() {
$.fn.popover.Constructor.prototype.leave.call(self, self);
});
});
}
};
$('body').popover({
selector: '[data-popover]',
trigger: 'click hover',
delay: {
show: 50,
hide: 400
}
});
});
</script>
<!-- easy-pie-chart -->
<!-- jQuery Sparklines -->
<script>
$(document).ready(function() {
$(".sparkline_bar").sparkline([2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 5, 6, 4, 5, 6, 3, 5], {
type: 'bar',
colorMap: {
'7': '#a1a1a1'
},
barColor: '#26B99A'
});
$(".sparkline_area").sparkline([5, 6, 7, 9, 9, 5, 3, 2, 2, 4, 6, 7], {
type: 'line',
lineColor: '#26B99A',
fillColor: '#26B99A',
spotColor: '#4578a0',
minSpotColor: '#728fb2',
maxSpotColor: '#6d93c4',
highlightSpotColor: '#ef5179',
highlightLineColor: '#8ba8bf',
spotRadius: 2.5,
width: 85
});
$(".sparkline_line").sparkline([2, 4, 3, 4, 5, 4, 5, 4, 3, 4, 5, 6, 4, 5, 6, 3, 5], {
type: 'line',
lineColor: '#26B99A',
fillColor: '#ffffff',
width: 85,
spotColor: '#34495E',
minSpotColor: '#34495E'
});
$(".sparkline_pie").sparkline([1, 1, 2, 1], {
type: 'pie',
sliceColors: ['#26B99A', '#ccc', '#75BCDD', '#D66DE2']
});
$(".sparkline_discreet").sparkline([4, 6, 7, 7, 4, 3, 2, 1, 4, 4, 2, 4, 3, 7, 8, 9, 7, 6, 4, 3], {
type: 'discrete',
barWidth: 3,
lineColor: '#26B99A',
width: '85',
});
});
</script>
<!-- /jQuery Sparklines -->
</body>
</html>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册