.
This commit is contained in:
51
WebRoot/js/ie-emulation-modes-warning.js
Normal file
51
WebRoot/js/ie-emulation-modes-warning.js
Normal file
@@ -0,0 +1,51 @@
|
||||
// NOTICE!! DO NOT USE ANY OF THIS JAVASCRIPT
|
||||
// IT'S JUST JUNK FOR OUR DOCS!
|
||||
// ++++++++++++++++++++++++++++++++++++++++++
|
||||
/*!
|
||||
* Copyright 2014-2015 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Creative Commons Attribution 3.0 Unported License. For
|
||||
* details, see https://creativecommons.org/licenses/by/3.0/.
|
||||
*/
|
||||
// Intended to prevent false-positive bug reports about Bootstrap not working properly in old versions of IE due to folks testing using IE's unreliable emulation modes.
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
function emulatedIEMajorVersion() {
|
||||
var groups = /MSIE ([0-9.]+)/.exec(window.navigator.userAgent)
|
||||
if (groups === null) {
|
||||
return null
|
||||
}
|
||||
var ieVersionNum = parseInt(groups[1], 10)
|
||||
var ieMajorVersion = Math.floor(ieVersionNum)
|
||||
return ieMajorVersion
|
||||
}
|
||||
|
||||
function actualNonEmulatedIEMajorVersion() {
|
||||
// Detects the actual version of IE in use, even if it's in an older-IE emulation mode.
|
||||
// IE JavaScript conditional compilation docs: https://msdn.microsoft.com/library/121hztk3%28v=vs.94%29.aspx
|
||||
// @cc_on docs: https://msdn.microsoft.com/library/8ka90k2e%28v=vs.94%29.aspx
|
||||
var jscriptVersion = new Function('/*@cc_on return @_jscript_version; @*/')() // jshint ignore:line
|
||||
if (jscriptVersion === undefined) {
|
||||
return 11 // IE11+ not in emulation mode
|
||||
}
|
||||
if (jscriptVersion < 9) {
|
||||
return 8 // IE8 (or lower; haven't tested on IE<8)
|
||||
}
|
||||
return jscriptVersion // IE9 or IE10 in any mode, or IE11 in non-IE11 mode
|
||||
}
|
||||
|
||||
var ua = window.navigator.userAgent
|
||||
if (ua.indexOf('Opera') > -1 || ua.indexOf('Presto') > -1) {
|
||||
return // Opera, which might pretend to be IE
|
||||
}
|
||||
var emulated = emulatedIEMajorVersion()
|
||||
if (emulated === null) {
|
||||
return // Not IE
|
||||
}
|
||||
var nonEmulated = actualNonEmulatedIEMajorVersion()
|
||||
|
||||
if (emulated !== nonEmulated) {
|
||||
window.alert('WARNING: You appear to be using IE' + nonEmulated + ' in IE' + emulated + ' emulation mode.\nIE emulation modes can behave significantly differently from ACTUAL older versions of IE.\nPLEASE DON\'T FILE BOOTSTRAP BUGS based on testing in IE emulation modes!')
|
||||
}
|
||||
})();
|
||||
23
WebRoot/js/ie10-viewport-bug-workaround.js
Normal file
23
WebRoot/js/ie10-viewport-bug-workaround.js
Normal file
@@ -0,0 +1,23 @@
|
||||
/*!
|
||||
* IE10 viewport hack for Surface/desktop Windows 8 bug
|
||||
* Copyright 2014-2015 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
// See the Getting Started docs for more information:
|
||||
// http://getbootstrap.com/getting-started/#support-ie10-width
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
|
||||
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
|
||||
var msViewportStyle = document.createElement('style')
|
||||
msViewportStyle.appendChild(
|
||||
document.createTextNode(
|
||||
'@-ms-viewport{width:auto!important}'
|
||||
)
|
||||
)
|
||||
document.querySelector('head').appendChild(msViewportStyle)
|
||||
}
|
||||
|
||||
})();
|
||||
301
WebRoot/js/inspinia.js
Normal file
301
WebRoot/js/inspinia.js
Normal file
@@ -0,0 +1,301 @@
|
||||
/*
|
||||
*
|
||||
* INSPINIA - Responsive Admin Theme
|
||||
* version 2.4
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
|
||||
// Add body-small class if window less than 768px
|
||||
if ($(this).width() < 769) {
|
||||
$('body').addClass('body-small')
|
||||
} else {
|
||||
$('body').removeClass('body-small')
|
||||
}
|
||||
|
||||
// MetsiMenu
|
||||
$('#side-menu').metisMenu();
|
||||
|
||||
// Collapse ibox function
|
||||
$('.collapse-link').click(function () {
|
||||
var ibox = $(this).closest('div.ibox');
|
||||
var button = $(this).find('i');
|
||||
var content = ibox.find('div.ibox-content');
|
||||
content.slideToggle(200);
|
||||
button.toggleClass('fa-chevron-up').toggleClass('fa-chevron-down');
|
||||
ibox.toggleClass('').toggleClass('border-bottom');
|
||||
setTimeout(function () {
|
||||
ibox.resize();
|
||||
ibox.find('[id^=map-]').resize();
|
||||
}, 50);
|
||||
});
|
||||
|
||||
// Close ibox function
|
||||
$('.close-link').click(function () {
|
||||
var content = $(this).closest('div.ibox');
|
||||
content.remove();
|
||||
});
|
||||
|
||||
// Fullscreen ibox function
|
||||
$('.fullscreen-link').click(function () {
|
||||
var ibox = $(this).closest('div.ibox');
|
||||
var button = $(this).find('i');
|
||||
$('body').toggleClass('fullscreen-ibox-mode');
|
||||
button.toggleClass('fa-expand').toggleClass('fa-compress');
|
||||
ibox.toggleClass('fullscreen');
|
||||
setTimeout(function () {
|
||||
$(window).trigger('resize');
|
||||
}, 100);
|
||||
});
|
||||
|
||||
// Close menu in canvas mode
|
||||
$('.close-canvas-menu').click(function () {
|
||||
$("body").toggleClass("mini-navbar");
|
||||
SmoothlyMenu();
|
||||
});
|
||||
|
||||
// Run menu of canvas
|
||||
$('body.canvas-menu .sidebar-collapse').slimScroll({
|
||||
height: '100%',
|
||||
railOpacity: 0.9
|
||||
});
|
||||
|
||||
// Open close right sidebar
|
||||
$('.right-sidebar-toggle').click(function () {
|
||||
$('#right-sidebar').toggleClass('sidebar-open');
|
||||
});
|
||||
|
||||
// Initialize slimscroll for right sidebar
|
||||
$('.sidebar-container').slimScroll({
|
||||
height: '100%',
|
||||
railOpacity: 0.4,
|
||||
wheelStep: 10
|
||||
});
|
||||
|
||||
// Open close small chat
|
||||
$('.open-small-chat').click(function () {
|
||||
$(this).children().toggleClass('fa-comments').toggleClass('fa-remove');
|
||||
$('.small-chat-box').toggleClass('active');
|
||||
});
|
||||
|
||||
// Initialize slimscroll for small chat
|
||||
$('.small-chat-box .content').slimScroll({
|
||||
height: '234px',
|
||||
railOpacity: 0.4
|
||||
});
|
||||
|
||||
// Small todo handler
|
||||
$('.check-link').click(function () {
|
||||
var button = $(this).find('i');
|
||||
var label = $(this).next('span');
|
||||
button.toggleClass('fa-check-square').toggleClass('fa-square-o');
|
||||
label.toggleClass('todo-completed');
|
||||
return false;
|
||||
});
|
||||
|
||||
// Append config box / Only for demo purpose
|
||||
// Uncomment on server mode to enable XHR calls
|
||||
$.get("skin-config.html", function (data) {
|
||||
if (!$('body').hasClass('no-skin-config'))
|
||||
$('body').append(data);
|
||||
});
|
||||
|
||||
// Minimalize menu
|
||||
$('.navbar-minimalize').click(function () {
|
||||
$("body").toggleClass("mini-navbar");
|
||||
SmoothlyMenu();
|
||||
|
||||
});
|
||||
|
||||
// Tooltips demo
|
||||
$('.tooltip-demo').tooltip({
|
||||
selector: "[data-toggle=tooltip]",
|
||||
container: "body"
|
||||
});
|
||||
|
||||
// Move modal to body
|
||||
// Fix Bootstrap backdrop issu with animation.css
|
||||
$('.modal').appendTo("body");
|
||||
|
||||
// Full height of sidebar
|
||||
function fix_height() {
|
||||
var heightWithoutNavbar = $("body > #wrapper").height() - 61;
|
||||
$(".sidebard-panel").css("min-height", heightWithoutNavbar + "px");
|
||||
|
||||
var navbarHeigh = $('nav.navbar-default').height();
|
||||
var wrapperHeigh = $('#page-wrapper').height();
|
||||
|
||||
if (navbarHeigh > wrapperHeigh) {
|
||||
$('#page-wrapper').css("min-height", navbarHeigh + "px");
|
||||
}
|
||||
|
||||
if (navbarHeigh < wrapperHeigh) {
|
||||
$('#page-wrapper').css("min-height", $(window).height() + "px");
|
||||
}
|
||||
|
||||
if ($('body').hasClass('fixed-nav')) {
|
||||
if (navbarHeigh > wrapperHeigh) {
|
||||
$('#page-wrapper').css("min-height", navbarHeigh - 60 + "px");
|
||||
} else {
|
||||
$('#page-wrapper').css("min-height", $(window).height() - 60 + "px");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fix_height();
|
||||
|
||||
// Fixed Sidebar
|
||||
$(window).bind("load", function () {
|
||||
if ($("body").hasClass('fixed-sidebar')) {
|
||||
$('.sidebar-collapse').slimScroll({
|
||||
height: '100%',
|
||||
railOpacity: 0.9
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Move right sidebar top after scroll
|
||||
$(window).scroll(function () {
|
||||
if ($(window).scrollTop() > 0 && !$('body').hasClass('fixed-nav')) {
|
||||
$('#right-sidebar').addClass('sidebar-top');
|
||||
} else {
|
||||
$('#right-sidebar').removeClass('sidebar-top');
|
||||
}
|
||||
});
|
||||
|
||||
$(window).bind("load resize scroll", function () {
|
||||
if (!$("body").hasClass('body-small')) {
|
||||
fix_height();
|
||||
}
|
||||
});
|
||||
|
||||
$("[data-toggle=popover]")
|
||||
.popover();
|
||||
|
||||
// Add slimscroll to element
|
||||
$('.full-height-scroll').slimscroll({
|
||||
height: '100%'
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
// Minimalize menu when screen is less than 768px
|
||||
$(window).bind("resize", function () {
|
||||
if ($(this).width() < 769) {
|
||||
$('body').addClass('body-small')
|
||||
} else {
|
||||
$('body').removeClass('body-small')
|
||||
}
|
||||
});
|
||||
|
||||
// Local Storage functions
|
||||
// Set proper body class and plugins based on user configuration
|
||||
$(document).ready(function () {
|
||||
if (localStorageSupport) {
|
||||
|
||||
var collapse = localStorage.getItem("collapse_menu");
|
||||
var fixedsidebar = localStorage.getItem("fixedsidebar");
|
||||
var fixednavbar = localStorage.getItem("fixednavbar");
|
||||
var boxedlayout = localStorage.getItem("boxedlayout");
|
||||
var fixedfooter = localStorage.getItem("fixedfooter");
|
||||
|
||||
var body = $('body');
|
||||
|
||||
if (fixedsidebar == 'on') {
|
||||
body.addClass('fixed-sidebar');
|
||||
$('.sidebar-collapse').slimScroll({
|
||||
height: '100%',
|
||||
railOpacity: 0.9
|
||||
});
|
||||
}
|
||||
|
||||
if (collapse == 'on') {
|
||||
if (body.hasClass('fixed-sidebar')) {
|
||||
if (!body.hasClass('body-small')) {
|
||||
body.addClass('mini-navbar');
|
||||
}
|
||||
} else {
|
||||
if (!body.hasClass('body-small')) {
|
||||
body.addClass('mini-navbar');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (fixednavbar == 'on') {
|
||||
$(".navbar-static-top").removeClass('navbar-static-top').addClass('navbar-fixed-top');
|
||||
body.addClass('fixed-nav');
|
||||
}
|
||||
|
||||
if (boxedlayout == 'on') {
|
||||
body.addClass('boxed-layout');
|
||||
}
|
||||
|
||||
if (fixedfooter == 'on') {
|
||||
$(".footer").addClass('fixed');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// check if browser support HTML5 local storage
|
||||
function localStorageSupport() {
|
||||
return (('localStorage' in window) && window['localStorage'] !== null)
|
||||
}
|
||||
|
||||
// For demo purpose - animation css script
|
||||
function animationHover(element, animation) {
|
||||
element = $(element);
|
||||
element.hover(
|
||||
function () {
|
||||
element.addClass('animated ' + animation);
|
||||
},
|
||||
function () {
|
||||
//wait for animation to finish before removing classes
|
||||
window.setTimeout(function () {
|
||||
element.removeClass('animated ' + animation);
|
||||
}, 2000);
|
||||
});
|
||||
}
|
||||
|
||||
function SmoothlyMenu() {
|
||||
if (!$('body').hasClass('mini-navbar') || $('body').hasClass('body-small')) {
|
||||
// Hide menu in order to smoothly turn on when maximize menu
|
||||
$('#side-menu').hide();
|
||||
// For smoothly turn on menu
|
||||
setTimeout(
|
||||
function () {
|
||||
$('#side-menu').fadeIn(400);
|
||||
}, 200);
|
||||
} else if ($('body').hasClass('fixed-sidebar')) {
|
||||
$('#side-menu').hide();
|
||||
setTimeout(
|
||||
function () {
|
||||
$('#side-menu').fadeIn(400);
|
||||
}, 100);
|
||||
} else {
|
||||
// Remove all inline style from jquery fadeIn function to reset menu state
|
||||
$('#side-menu').removeAttr('style');
|
||||
}
|
||||
}
|
||||
|
||||
// Dragable panels
|
||||
function WinMove() {
|
||||
var element = "[class*=col]";
|
||||
var handle = ".ibox-title";
|
||||
var connect = "[class*=col]";
|
||||
$(element).sortable(
|
||||
{
|
||||
handle: handle,
|
||||
connectWith: connect,
|
||||
tolerance: 'pointer',
|
||||
forcePlaceholderSize: true,
|
||||
opacity: 0.8
|
||||
})
|
||||
.disableSelection();
|
||||
}
|
||||
|
||||
|
||||
4
WebRoot/js/jquery-2.1.1.js
vendored
Normal file
4
WebRoot/js/jquery-2.1.1.js
vendored
Normal file
File diff suppressed because one or more lines are too long
11
WebRoot/js/plugins/iCheck/icheck.min.js
vendored
Normal file
11
WebRoot/js/plugins/iCheck/icheck.min.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
/*! iCheck v1.0.2 by Damir Sultanov, http://git.io/arlzeA, MIT Licensed */
|
||||
(function(f){function A(a,b,d){var c=a[0],g=/er/.test(d)?_indeterminate:/bl/.test(d)?n:k,e=d==_update?{checked:c[k],disabled:c[n],indeterminate:"true"==a.attr(_indeterminate)||"false"==a.attr(_determinate)}:c[g];if(/^(ch|di|in)/.test(d)&&!e)x(a,g);else if(/^(un|en|de)/.test(d)&&e)q(a,g);else if(d==_update)for(var f in e)e[f]?x(a,f,!0):q(a,f,!0);else if(!b||"toggle"==d){if(!b)a[_callback]("ifClicked");e?c[_type]!==r&&q(a,g):x(a,g)}}function x(a,b,d){var c=a[0],g=a.parent(),e=b==k,u=b==_indeterminate,
|
||||
v=b==n,s=u?_determinate:e?y:"enabled",F=l(a,s+t(c[_type])),B=l(a,b+t(c[_type]));if(!0!==c[b]){if(!d&&b==k&&c[_type]==r&&c.name){var w=a.closest("form"),p='input[name="'+c.name+'"]',p=w.length?w.find(p):f(p);p.each(function(){this!==c&&f(this).data(m)&&q(f(this),b)})}u?(c[b]=!0,c[k]&&q(a,k,"force")):(d||(c[b]=!0),e&&c[_indeterminate]&&q(a,_indeterminate,!1));D(a,e,b,d)}c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"default");g[_add](B||l(a,b)||"");g.attr("role")&&!u&&g.attr("aria-"+(v?n:k),"true");
|
||||
g[_remove](F||l(a,s)||"")}function q(a,b,d){var c=a[0],g=a.parent(),e=b==k,f=b==_indeterminate,m=b==n,s=f?_determinate:e?y:"enabled",q=l(a,s+t(c[_type])),r=l(a,b+t(c[_type]));if(!1!==c[b]){if(f||!d||"force"==d)c[b]=!1;D(a,e,s,d)}!c[n]&&l(a,_cursor,!0)&&g.find("."+C).css(_cursor,"pointer");g[_remove](r||l(a,b)||"");g.attr("role")&&!f&&g.attr("aria-"+(m?n:k),"false");g[_add](q||l(a,s)||"")}function E(a,b){if(a.data(m)){a.parent().html(a.attr("style",a.data(m).s||""));if(b)a[_callback](b);a.off(".i").unwrap();
|
||||
f(_label+'[for="'+a[0].id+'"]').add(a.closest(_label)).off(".i")}}function l(a,b,f){if(a.data(m))return a.data(m).o[b+(f?"":"Class")]}function t(a){return a.charAt(0).toUpperCase()+a.slice(1)}function D(a,b,f,c){if(!c){if(b)a[_callback]("ifToggled");a[_callback]("ifChanged")[_callback]("if"+t(f))}}var m="iCheck",C=m+"-helper",r="radio",k="checked",y="un"+k,n="disabled";_determinate="determinate";_indeterminate="in"+_determinate;_update="update";_type="type";_click="click";_touch="touchbegin.i touchend.i";
|
||||
_add="addClass";_remove="removeClass";_callback="trigger";_label="label";_cursor="cursor";_mobile=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent);f.fn[m]=function(a,b){var d='input[type="checkbox"], input[type="'+r+'"]',c=f(),g=function(a){a.each(function(){var a=f(this);c=a.is(d)?c.add(a):c.add(a.find(d))})};if(/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(a))return a=a.toLowerCase(),g(this),c.each(function(){var c=
|
||||
f(this);"destroy"==a?E(c,"ifDestroyed"):A(c,!0,a);f.isFunction(b)&&b()});if("object"!=typeof a&&a)return this;var e=f.extend({checkedClass:k,disabledClass:n,indeterminateClass:_indeterminate,labelHover:!0},a),l=e.handle,v=e.hoverClass||"hover",s=e.focusClass||"focus",t=e.activeClass||"active",B=!!e.labelHover,w=e.labelHoverClass||"hover",p=(""+e.increaseArea).replace("%","")|0;if("checkbox"==l||l==r)d='input[type="'+l+'"]';-50>p&&(p=-50);g(this);return c.each(function(){var a=f(this);E(a);var c=this,
|
||||
b=c.id,g=-p+"%",d=100+2*p+"%",d={position:"absolute",top:g,left:g,display:"block",width:d,height:d,margin:0,padding:0,background:"#fff",border:0,opacity:0},g=_mobile?{position:"absolute",visibility:"hidden"}:p?d:{position:"absolute",opacity:0},l="checkbox"==c[_type]?e.checkboxClass||"icheckbox":e.radioClass||"i"+r,z=f(_label+'[for="'+b+'"]').add(a.closest(_label)),u=!!e.aria,y=m+"-"+Math.random().toString(36).substr(2,6),h='<div class="'+l+'" '+(u?'role="'+c[_type]+'" ':"");u&&z.each(function(){h+=
|
||||
'aria-labelledby="';this.id?h+=this.id:(this.id=y,h+=y);h+='"'});h=a.wrap(h+"/>")[_callback]("ifCreated").parent().append(e.insert);d=f('<ins class="'+C+'"/>').css(d).appendTo(h);a.data(m,{o:e,s:a.attr("style")}).css(g);e.inheritClass&&h[_add](c.className||"");e.inheritID&&b&&h.attr("id",m+"-"+b);"static"==h.css("position")&&h.css("position","relative");A(a,!0,_update);if(z.length)z.on(_click+".i mouseover.i mouseout.i "+_touch,function(b){var d=b[_type],e=f(this);if(!c[n]){if(d==_click){if(f(b.target).is("a"))return;
|
||||
A(a,!1,!0)}else B&&(/ut|nd/.test(d)?(h[_remove](v),e[_remove](w)):(h[_add](v),e[_add](w)));if(_mobile)b.stopPropagation();else return!1}});a.on(_click+".i focus.i blur.i keyup.i keydown.i keypress.i",function(b){var d=b[_type];b=b.keyCode;if(d==_click)return!1;if("keydown"==d&&32==b)return c[_type]==r&&c[k]||(c[k]?q(a,k):x(a,k)),!1;if("keyup"==d&&c[_type]==r)!c[k]&&x(a,k);else if(/us|ur/.test(d))h["blur"==d?_remove:_add](s)});d.on(_click+" mousedown mouseup mouseover mouseout "+_touch,function(b){var d=
|
||||
b[_type],e=/wn|up/.test(d)?t:v;if(!c[n]){if(d==_click)A(a,!1,!0);else{if(/wn|er|in/.test(d))h[_add](e);else h[_remove](e+" "+t);if(z.length&&B&&e==v)z[/ut|nd/.test(d)?_remove:_add](w)}if(_mobile)b.stopPropagation();else return!1}})})}})(window.jQuery||window.Zepto);
|
||||
2
WebRoot/js/plugins/pace/pace.min.js
vendored
Normal file
2
WebRoot/js/plugins/pace/pace.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user