Browse Source

removed unused assets

all-modes
pbca26 8 years ago
parent
commit
7399c05db6
  1. 93
      assets/global/js/components/alertify-js.js
  2. 81
      assets/global/js/components/animsition.js
  3. 6
      assets/global/js/components/animsition.min.js
  4. 6
      assets/global/js/components/asprogress.min.js
  5. 23
      assets/global/js/components/asscrollable.js
  6. 6
      assets/global/js/components/asscrollable.min.js
  7. 47
      assets/global/js/components/bootbox.js
  8. 32
      assets/global/js/components/buttons.js
  9. 6
      assets/global/js/components/jquery-labelauty.min.js
  10. 6
      assets/global/js/components/jquery-placeholder.min.js
  11. 42
      assets/global/js/components/ladda-bootstrap.js
  12. 6
      assets/global/js/components/nprogress.min.js
  13. 6
      assets/global/js/components/panel.min.js
  14. 25
      assets/global/js/components/slidepanel.js
  15. 6
      assets/global/js/components/slidepanel.min.js
  16. 22
      assets/global/js/components/switchery.js
  17. 6
      assets/global/js/components/switchery.min.js
  18. 94
      assets/global/js/components/tabs.js
  19. 6
      assets/global/js/components/tabs.min.js
  20. 39
      assets/global/js/components/toastr.js
  21. 6
      assets/global/js/components/toastr.min.js
  22. 302
      assets/global/js/configs/config-colors.js
  23. 6
      assets/global/js/configs/config-colors.min.js
  24. 290
      assets/global/js/core.js
  25. 6
      assets/global/js/core.min.js

93
assets/global/js/components/alertify-js.js

@ -1,93 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("alertify", {
mode: "api",
defaults: {
type: "alert",
delay: 5000,
theme: 'bootstrap'
},
api: function() {
if (typeof alertify === "undefined") return;
var defaults = $.components.getDefaults("alertify");
$(document).on('click.site.alertify', '[data-plugin="alertify"]', function() {
var $this = $(this),
options = $.extend(true, {}, defaults, $this.data());
if (options.labelOk) {
options.okBtn = options.labelOk;
}
if (options.labelCancel) {
options.cancelBtn = options.labelCancel;
}
if (typeof options.delay !== 'undefined') {
alertify.delay(options.delay);
}
if (typeof options.theme !== 'undefined') {
alertify.theme(options.theme);
}
if (typeof options.cancelBtn !== 'undefined') {
alertify.cancelBtn(options.cancelBtn);
}
if (typeof options.okBtn !== 'undefined') {
alertify.okBtn(options.okBtn);
}
if (typeof options.placeholder !== 'undefined') {
alertify.delay(options.placeholder);
}
if (typeof options.defaultValue !== 'undefined') {
alertify.delay(options.defaultValue);
}
if (typeof options.maxLogItems !== 'undefined') {
alertify.delay(options.maxLogItems);
}
if (typeof options.closeLogOnClick !== 'undefined') {
alertify.delay(options.closeLogOnClick);
}
switch (options.type) {
case "alert":
alertify.alert(options.alertMessage);
break;
case "confirm":
alertify.confirm(options.confirmTitle, function() {
alertify.success(options.successMessage);
}, function() {
alertify.error(options.errorMessage);
});
break;
case "prompt":
alertify.prompt(options.promptTitle, function(str, ev) {
var message = options.successMessage.replace('%s', str);
alertify.success(message);
}, function(ev) {
alertify.error(options.errorMessage);
});
break;
case "log":
alertify.log(options.logMessage);
break;
case "success":
alertify.success(options.successMessage);
break;
case "error":
alertify.error(options.errorMessage);
break;
}
});
}
});

81
assets/global/js/components/animsition.js

@ -1,81 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("animsition", {
mode: "manual",
defaults: {
inClass: 'fade-in',
outClass: 'fade-out',
inDuration: 800,
outDuration: 500,
linkElement: '.animsition-link',
loading: true,
loadingParentElement: "body",
loadingClass: "loader",
loadingType: "default",
timeout: false,
timeoutCountdown: 5000,
onLoadEvent: true,
browser: ['animation-duration', '-webkit-animation-duration'],
overlay: false,
// random: true,
overlayClass: 'animsition-overlay-slide',
overlayParentElement: "body",
inDefaults: [
'fade-in',
'fade-in-up-sm', 'fade-in-up', 'fade-in-up-lg',
'fade-in-down-sm', 'fade-in-down', 'fade-in-down-lg',
'fade-in-left-sm', 'fade-in-left', 'fade-in-left-lg',
'fade-in-right-sm', 'fade-in-right', 'fade-in-right-lg',
// 'overlay-slide-in-top', 'overlay-slide-in-bottom', 'overlay-slide-in-left', 'overlay-slide-in-right',
'zoom-in-sm', 'zoom-in', 'zoom-in-lg'
],
outDefaults: [
'fade-out',
'fade-out-up-sm', 'fade-out-up', 'fade-out-up-lg',
'fade-out-down-sm', 'fade-out-down', 'fade-out-down-lg',
'fade-out-left-sm', 'fade-out-left', 'fade-out-left-lg',
'fade-out-right-sm', 'fade-out-right', 'fade-out-right-lg',
// 'overlay-slide-out-top', 'overlay-slide-out-bottom', 'overlay-slide-out-left', 'overlay-slide-out-right'
'zoom-out-sm', 'zoom-out', 'zoom-out-lg'
]
},
init: function(context, callback) {
var options = $.components.getDefaults("animsition");
if (options.random) {
var li = options.inDefaults.length,
lo = options.outDefaults.length;
var ni = parseInt(li * Math.random(), 0),
no = parseInt(lo * Math.random(), 0);
options.inClass = options.inDefaults[ni];
options.outClass = options.outDefaults[no];
}
var $this = $(".animsition", context);
$this.animsition(options);
$("." + options.loadingClass).addClass('loader-' + options.loadingType);
if ($this.animsition('supportCheck', options)) {
if ($.isFunction(callback)) {
$this.one('animsition.end', function() {
callback.call();
});
}
return true;
} else {
if ($.isFunction(callback)) {
callback.call();
}
return false;
}
}
});

6
assets/global/js/components/animsition.min.js

@ -1,6 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("animsition",{mode:"manual",defaults:{inClass:"fade-in",outClass:"fade-out",inDuration:800,outDuration:500,linkElement:".animsition-link",loading:!0,loadingParentElement:"body",loadingClass:"loader",loadingType:"default",timeout:!1,timeoutCountdown:5e3,onLoadEvent:!0,browser:["animation-duration","-webkit-animation-duration"],overlay:!1,overlayClass:"animsition-overlay-slide",overlayParentElement:"body",inDefaults:["fade-in","fade-in-up-sm","fade-in-up","fade-in-up-lg","fade-in-down-sm","fade-in-down","fade-in-down-lg","fade-in-left-sm","fade-in-left","fade-in-left-lg","fade-in-right-sm","fade-in-right","fade-in-right-lg","zoom-in-sm","zoom-in","zoom-in-lg"],outDefaults:["fade-out","fade-out-up-sm","fade-out-up","fade-out-up-lg","fade-out-down-sm","fade-out-down","fade-out-down-lg","fade-out-left-sm","fade-out-left","fade-out-left-lg","fade-out-right-sm","fade-out-right","fade-out-right-lg","zoom-out-sm","zoom-out","zoom-out-lg"]},init:function(context,callback){var options=$.components.getDefaults("animsition");if(options.random){var li=options.inDefaults.length,lo=options.outDefaults.length,ni=parseInt(li*Math.random(),0),no=parseInt(lo*Math.random(),0);options.inClass=options.inDefaults[ni],options.outClass=options.outDefaults[no]}var $this=$(".animsition",context);return $this.animsition(options),$("."+options.loadingClass).addClass("loader-"+options.loadingType),$this.animsition("supportCheck",options)?($.isFunction(callback)&&$this.one("animsition.end",function(){callback.call()}),!0):($.isFunction(callback)&&callback.call(),!1)}});

6
assets/global/js/components/asprogress.min.js

@ -1,6 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("progress",{mode:"init",defaults:{bootstrap:!0,onUpdate:function(n){var per=(n-this.min)/(this.max-this.min);.5>per?this.$target.addClass("progress-bar-success").removeClass("progress-bar-warning progress-bar-danger"):per>=.5&&.8>per?this.$target.addClass("progress-bar-warning").removeClass("progress-bar-success progress-bar-danger"):this.$target.addClass("progress-bar-danger").removeClass("progress-bar-success progress-bar-warning")},labelCallback:function(n){var label,labelType=this.$element.data("labeltype");if("percentage"===labelType){var percentage=this.getPercentage(n);label=percentage+"%"}else if("steps"===labelType){var total=this.$element.data("totalsteps");total||(total=10);var step=Math.round(total*(n-this.min)/(this.max-this.min));label=step+" / "+total}else label=n;return this.$element.parent().hasClass("contextual-progress")&&this.$element.parent().find(".progress-label").html(label),label}},init:function(context){if($.fn.asProgress){var defaults=$.components.getDefaults("progress");$('[data-plugin="progress"]',context).each(function(){var $this=$(this),options=$this.data();options=$.extend({},defaults,options),$this.asProgress(options)})}}});

23
assets/global/js/components/asscrollable.js

@ -1,23 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("scrollable", {
mode: "init",
defaults: {
namespace: "scrollable",
contentSelector: "> [data-role='content']",
containerSelector: "> [data-role='container']"
},
init: function(context) {
if (!$.fn.asScrollable) return;
var defaults = $.components.getDefaults("scrollable");
$('[data-plugin="scrollable"]', context).each(function() {
var options = $.extend({}, defaults, $(this).data());
$(this).asScrollable(options);
});
}
});

6
assets/global/js/components/asscrollable.min.js

@ -1,6 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("scrollable",{mode:"init",defaults:{namespace:"scrollable",contentSelector:"> [data-role='content']",containerSelector:"> [data-role='container']"},init:function(context){if($.fn.asScrollable){var defaults=$.components.getDefaults("scrollable");$('[data-plugin="scrollable"]',context).each(function(){var options=$.extend({},defaults,$(this).data());$(this).asScrollable(options)})}}});

47
assets/global/js/components/bootbox.js

@ -1,47 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("bootbox", {
mode: "api",
defaults: {
message: ""
},
api: function() {
if (typeof bootbox === "undefined") return;
var defaults = $.components.getDefaults("bootbox");
$(document).on('click.site.bootbox', '[data-plugin="bootbox"]', function() {
var $btn = $(this);
var options = $btn.data();
options = $.extend(true, {}, defaults, options);
if (options.classname) {
options.className = options.classname;
}
if (typeof options.callback === "string" && $.isFunction(window[options.callback])) {
options.callback = window[options.callback];
}
if (options.type) {
switch (options.type) {
case "alert":
bootbox.alert(options);
break;
case "confirm":
bootbox.confirm(options);
break;
case "prompt":
bootbox.prompt(options);
break;
default:
bootbox.dialog(options);
}
} else {
bootbox.dialog(options);
}
});
}
});

32
assets/global/js/components/buttons.js

@ -1,32 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("buttons", {
mode: "api",
defaults: {},
api: function() {
$(document).on('click.site.loading', '[data-loading-text]', function() {
var $btn = $(this),
text = $btn.text(),
i = 20,
loadingText = $btn.data('loadingText');
$btn.text(loadingText + '(' + i + ')').css('opacity', '.6');
var timeout = setInterval(function() {
$btn.text(loadingText + '(' + (--i) + ')');
if (i === 0) {
clearInterval(timeout);
$btn.text(text).css('opacity', '1');
}
}, 1000);
});
$(document).on('click.site.morebutton', '[data-more]', function() {
var $target = $($(this).data('more'));
$target.toggleClass('show');
});
}
});

6
assets/global/js/components/jquery-labelauty.min.js

@ -1,6 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("labelauty",{mode:"default",defaults:{same_width:!0}});

6
assets/global/js/components/jquery-placeholder.min.js

@ -1,6 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("placeholder",{mode:"init",init:function(context){$.fn.placeholder&&$("input, textarea",context).placeholder()}});

42
assets/global/js/components/ladda-bootstrap.js

@ -1,42 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("ladda", {
mode: "init",
defaults: {
timeout: 2000
},
init: function() {
if (typeof Ladda === "undefined") return;
var defaults = $.components.getDefaults("ladda");
Ladda.bind('[data-plugin="ladda"]', defaults);
}
});
$.components.register("laddaProgress", {
mode: "init",
defaults: {
init: function(instance) {
var progress = 0;
var interval = setInterval(function() {
progress = Math.min(progress + Math.random() * 0.1, 1);
instance.setProgress(progress);
if (progress === 1) {
instance.stop();
clearInterval(interval);
}
}, 200);
}
},
init: function() {
if (typeof Ladda === 'undefined') return;
var defaults = $.components.getDefaults("laddaProgress");
// Bind progress buttons and simulate loading progress
Ladda.bind('[data-plugin="laddaProgress"]', defaults);
}
});

6
assets/global/js/components/nprogress.min.js

@ -1,6 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("nprogress",{mode:"init",defaults:{minimum:.15,trickleRate:.07,trickleSpeed:360,showSpinner:!1,template:'<div class="bar" role="bar"></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'},init:function(){if("undefined"!=typeof NProgress){var defaults=$.components.getDefaults("nprogress");NProgress.configure(defaults)}}});

6
assets/global/js/components/panel.min.js

@ -1,6 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("panel",{api:function(){$(document).on("click.site.panel",'[data-toggle="panel-fullscreen"]',function(e){e.preventDefault();var $this=$(this),$panel=$this.closest(".panel"),api=$panel.data("panel-api");api.toggleFullscreen()}),$(document).on("click.site.panel",'[data-toggle="panel-collapse"]',function(e){e.preventDefault();var $this=$(this),$panel=$this.closest(".panel"),api=$panel.data("panel-api");api.toggleContent()}),$(document).on("click.site.panel",'[data-toggle="panel-close"]',function(e){e.preventDefault();var $this=$(this),$panel=$this.closest(".panel"),api=$panel.data("panel-api");api.close()}),$(document).on("click.site.panel",'[data-toggle="panel-refresh"]',function(e){e.preventDefault();var $this=$(this),$panel=$this.closest(".panel"),api=$panel.data("panel-api"),callback=$this.data("loadCallback");$.isFunction(window[callback])?api.load(window[callback]):api.load()})},init:function(context){$(".panel",context).each(function(){var $loading,$this=$(this),isFullscreen=!1,isClose=!1,isCollapse=!1,isLoading=!1,$fullscreen=$this.find('[data-toggle="panel-fullscreen"]'),$collapse=$this.find('[data-toggle="panel-collapse"]'),self=this;$this.hasClass("is-collapse")&&(isCollapse=!0);var api={load:function(callback){var type=$this.data("load-type");type||(type="blue-only"),$loading=$('<div class="panel-loading"><div class="loader-wrapper active"><div class="loader-layer loader-'+type+'"><div class="loader-circle-left"><div class="circle"></div></div><div class="loader-circle-gap"></div><div class="loader-circle-right"><div class="circle"></div></div></div></div></div>'),$loading.appendTo($this),$this.addClass("is-loading"),$this.trigger("loading.uikit.panel"),isLoading=!0,$.isFunction(callback)&&callback.call(self,this.done)},done:function(){isLoading===!0&&($loading.remove(),$this.removeClass("is-loading"),$this.trigger("loading.done.uikit.panel"))},toggleContent:function(){isCollapse?this.showContent():this.hideContent()},showContent:function(){isCollapse!==!1&&($this.removeClass("is-collapse"),$collapse.hasClass("md-plus")&&$collapse.removeClass("md-plus").addClass("md-minus"),$this.trigger("shown.uikit.panel"),isCollapse=!1)},hideContent:function(){isCollapse!==!0&&($this.addClass("is-collapse"),$collapse.hasClass("md-minus")&&$collapse.removeClass("md-minus").addClass("md-plus"),$this.trigger("hidden.uikit.panel"),isCollapse=!0)},toggleFullscreen:function(){isFullscreen?this.leaveFullscreen():this.enterFullscreen()},enterFullscreen:function(){isFullscreen!==!0&&($this.addClass("is-fullscreen"),$fullscreen.hasClass("md-fullscreen")&&$fullscreen.removeClass("md-fullscreen").addClass("md-fullscreen-exit"),$this.trigger("enter.fullscreen.uikit.panel"),isFullscreen=!0)},leaveFullscreen:function(){isFullscreen!==!1&&($this.removeClass("is-fullscreen"),$fullscreen.hasClass("md-fullscreen-exit")&&$fullscreen.removeClass("md-fullscreen-exit").addClass("md-fullscreen"),$this.trigger("leave.fullscreen.uikit.panel"),isFullscreen=!1)},toggle:function(){isClose?this.open():this.close()},open:function(){isClose!==!1&&($this.removeClass("is-close"),$this.trigger("open.uikit.panel"),isClose=!1)},close:function(){isClose!==!0&&($this.addClass("is-close"),$this.trigger("close.uikit.panel"),isClose=!0)}};$this.data("panel-api",api)})}});

25
assets/global/js/components/slidepanel.js

@ -1,25 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("slidePanel", {
mode: "manual",
defaults: {
closeSelector: '.slidePanel-close',
mouseDragHandler: '.slidePanel-handler',
loading: {
template: function(options) {
return '<div class="' + options.classes.loading + '">' +
'<div class="loader loader-default"></div>' +
'</div>';
},
showCallback: function(options) {
this.$el.addClass(options.classes.loading + '-show');
},
hideCallback: function(options) {
this.$el.removeClass(options.classes.loading + '-show');
}
}
}
});

6
assets/global/js/components/slidepanel.min.js

@ -1,6 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("slidePanel",{mode:"manual",defaults:{closeSelector:".slidePanel-close",mouseDragHandler:".slidePanel-handler",loading:{template:function(options){return'<div class="'+options.classes.loading+'"><div class="loader loader-default"></div></div>'},showCallback:function(options){this.$el.addClass(options.classes.loading+"-show")},hideCallback:function(options){this.$el.removeClass(options.classes.loading+"-show")}}}});

22
assets/global/js/components/switchery.js

@ -1,22 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("switchery", {
mode: "init",
defaults: {
color: $.colors("primary", 600)
},
init: function(context) {
if (typeof Switchery === "undefined") return;
var defaults = $.components.getDefaults("switchery");
$('[data-plugin="switchery"]', context).each(function() {
var options = $.extend({}, defaults, $(this).data());
new Switchery(this, options);
});
}
});

6
assets/global/js/components/switchery.min.js

@ -1,6 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("switchery",{mode:"init",defaults:{color:$.colors("primary",600)},init:function(context){if("undefined"!=typeof Switchery){var defaults=$.components.getDefaults("switchery");$('[data-plugin="switchery"]',context).each(function(){var options=$.extend({},defaults,$(this).data());new Switchery(this,options)})}}});

94
assets/global/js/components/tabs.js

@ -1,94 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("verticalTab", {
mode: "init",
init: function(context) {
if (!$.fn.matchHeight) return;
$('.nav-tabs-vertical', context).each(function() {
$(this).children().matchHeight();
});
}
});
$.components.register("horizontalTab", {
mode: "init",
init: function(context) {
if (!$.fn.responsiveHorizontalTabs) return;
$('.nav-tabs-horizontal', context).responsiveHorizontalTabs();
}
});
$.components.register("navTabsLine", {
mode: "init",
defaults: {
speed: '0.5s, 1s',
animate: 'cubic-bezier(0.4, 0, 0.2, 1), cubic-bezier(0.4, 0, 0.2, 1)',
tpl: function() {
return '<li class="nav-tabs-autoline"></li>';
}
},
init: function(context) {
var defaults = $.components.getDefaults('navTabsLine');
$('.nav-tabs-line', context).each(function() {
var $this = $(this);
var options = $.extend({}, defaults, $this.data());
var $parent = $this.parent();
var $active = $this.find('.active');
var $autoLineTpl = $(options.tpl()).css({
"-webkit-transition-duration": options.speed,
"transition-duration": options.speed,
"-webkit-transition-timing-function": options.animate,
"transition-timing-function": options.animate
});
$autoLineTpl.appendTo($this);
var horizontalLine = function($this) {
var left = $this.position().left;
var lineWidth = $this.outerWidth();
$autoLineTpl.css({
"left": left,
"width": lineWidth
});
};
var verticalLine = function($this) {
var top = $this.position().top;
var lineHeight = $this.outerHeight();
$autoLineTpl.css({
"top": top,
"height": lineHeight
});
};
var change = function($this) {
if ($parent.hasClass('nav-tabs-vertical')) {
verticalLine($this);
} else {
horizontalLine($this);
}
};
$this.on('shown.bs.tab', 'a[data-toggle="tab"]', function() {
var $li = $(this).parent(),
$ul = $li.parent();
if ($ul.hasClass('dropdown-menu')) {
change($ul.parent());
} else {
change($(this).parent());
}
});
change($active);
});
}
});

6
assets/global/js/components/tabs.min.js

@ -1,6 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("verticalTab",{mode:"init",init:function(context){$.fn.matchHeight&&$(".nav-tabs-vertical",context).each(function(){$(this).children().matchHeight()})}}),$.components.register("horizontalTab",{mode:"init",init:function(context){$.fn.responsiveHorizontalTabs&&$(".nav-tabs-horizontal",context).responsiveHorizontalTabs()}}),$.components.register("navTabsLine",{mode:"init",defaults:{speed:"0.5s, 1s",animate:"cubic-bezier(0.4, 0, 0.2, 1), cubic-bezier(0.4, 0, 0.2, 1)",tpl:function(){return'<li class="nav-tabs-autoline"></li>'}},init:function(context){var defaults=$.components.getDefaults("navTabsLine");$(".nav-tabs-line",context).each(function(){var $this=$(this),options=$.extend({},defaults,$this.data()),$parent=$this.parent(),$active=$this.find(".active"),$autoLineTpl=$(options.tpl()).css({"-webkit-transition-duration":options.speed,"transition-duration":options.speed,"-webkit-transition-timing-function":options.animate,"transition-timing-function":options.animate});$autoLineTpl.appendTo($this);var horizontalLine=function($this){var left=$this.position().left,lineWidth=$this.outerWidth();$autoLineTpl.css({left:left,width:lineWidth})},verticalLine=function($this){var top=$this.position().top,lineHeight=$this.outerHeight();$autoLineTpl.css({top:top,height:lineHeight})},change=function($this){$parent.hasClass("nav-tabs-vertical")?verticalLine($this):horizontalLine($this)};$this.on("shown.bs.tab",'a[data-toggle="tab"]',function(){var $li=$(this).parent(),$ul=$li.parent();change($ul.hasClass("dropdown-menu")?$ul.parent():$(this).parent())}),change($active)})}});

39
assets/global/js/components/toastr.js

@ -1,39 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("toastr", {
mode: "api",
api: function() {
if (typeof toastr === "undefined") return;
var defaults = $.components.getDefaults("toastr");
$(document).on('click.site.toastr', '[data-plugin="toastr"]', function(e) {
e.preventDefault();
var $this = $(this);
var options = $.extend(true, {}, defaults, $this.data());
var message = options.message || '';
var type = options.type || "info";
var title = options.title || undefined;
switch (type) {
case "success":
toastr.success(message, title, options);
break;
case "warning":
toastr.warning(message, title, options);
break;
case "error":
toastr.error(message, title, options);
break;
case "info":
toastr.info(message, title, options);
break;
default:
toastr.info(message, title, options);
}
});
}
});

6
assets/global/js/components/toastr.min.js

@ -1,6 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
$.components.register("toastr",{mode:"api",api:function(){if("undefined"!=typeof toastr){var defaults=$.components.getDefaults("toastr");$(document).on("click.site.toastr",'[data-plugin="toastr"]',function(e){e.preventDefault();var $this=$(this),options=$.extend(!0,{},defaults,$this.data()),message=options.message||"",type=options.type||"info",title=options.title||void 0;switch(type){case"success":toastr.success(message,title,options);break;case"warning":toastr.warning(message,title,options);break;case"error":toastr.error(message,title,options);break;case"info":toastr.info(message,title,options);break;default:toastr.info(message,title,options)}})}}});

302
assets/global/js/configs/config-colors.js

@ -1,302 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
(function(window, document, $) {
"use strict";
$.configs.colors = {
"red": {
"50": "#ffebee",
"100": "#ffcdd2",
"200": "#ef9a9a",
"300": "#e57373",
"400": "#ef5350",
"500": "#f44336",
"600": "#e53935",
"700": "#d32f2f",
"800": "#c62828",
"900": "#b71c1c",
"a100": "#ff8a80",
"a200": "#ff5252",
"a300": "#ff1744",
"a400": "#d50000"
},
"pink": {
"50": "#fce4ec",
"100": "#f8bbd0",
"200": "#f48fb1",
"300": "#f06292",
"400": "#ec407a",
"500": "#e91e63",
"600": "#d81b60",
"700": "#c2185b",
"800": "#ad1457",
"900": "#880e4f",
"a100": "#ff80ab",
"a200": "#ff4081",
"a300": "#f50057",
"a400": "#c51162"
},
"purple": {
"50": "#f3e5f5",
"100": "#e1bee7",
"200": "#ce93d8",
"300": "#ba68c8",
"400": "#ab47bc",
"500": "#9c27b0",
"600": "#8e24aa",
"700": "#7b1fa2",
"800": "#6a1b9a",
"900": "#4a148c",
"a100": "#ea80fc",
"a200": "#e040fb",
"a300": "#d500f9",
"a400": "#aa00ff"
},
"deep-purple": {
"50": "#ede7f6",
"100": "#d1c4e9",
"200": "#b39ddb",
"300": "#9575cd",
"400": "#7e57c2",
"500": "#673ab7",
"600": "#5e35b1",
"700": "#512da8",
"800": "#4527a0",
"900": "#311b92",
"a100": "#b388ff",
"a200": "#7c4dff",
"a300": "#651fff",
"a400": "#6200ea"
},
"indigo": {
"50": "#e8eaf6",
"100": "#c5cae9",
"200": "#9fa8da",
"300": "#7986cb",
"400": "#5c6bc0",
"500": "#3f51b5",
"600": "#3949ab",
"700": "#303f9f",
"800": "#283593",
"900": "#1a237e",
"a100": "#8c9eff",
"a200": "#536dfe",
"a300": "#3d5afe",
"a400": "#304ffe"
},
"blue": {
"50": "#e3f2fd",
"100": "#bbdefb",
"200": "#90caf9",
"300": "#64b5f6",
"400": "#42a5f5",
"500": "#2196f3",
"600": "#1e88e5",
"700": "#1976d2",
"800": "#1565c0",
"900": "#0d47a1",
"a100": "#82b1ff",
"a200": "#448aff",
"a300": "#2979ff",
"a400": "#2962ff"
},
"light-blue": {
"50": "#e1f5fe",
"100": "#b3e5fc",
"200": "#81d4fa",
"300": "#4fc3f7",
"400": "#29b6f6",
"500": "#03a9f4",
"600": "#039be5",
"700": "#0288d1",
"800": "#0277bd",
"900": "#01579b",
"a100": "#80d8ff",
"a200": "#40c4ff",
"a300": "#00b0ff",
"a400": "#0091ea"
},
"cyan": {
"50": "#e0f7fa",
"100": "#b2ebf2",
"200": "#80deea",
"300": "#4dd0e1",
"400": "#26c6da",
"500": "#00bcd4",
"600": "#00acc1",
"700": "#0097a7",
"800": "#00838f",
"900": "#006064",
"a100": "#84ffff",
"a200": "#18ffff",
"a300": "#00e5ff",
"a400": "#00b8d4"
},
"teal": {
"50": "#e0f2f1",
"100": "#b2dfdb",
"200": "#80cbc4",
"300": "#4db6ac",
"400": "#26a69a",
"500": "#009688",
"600": "#00897b",
"700": "#00796b",
"800": "#00695c",
"900": "#004d40",
"a100": "#a7ffeb",
"a200": "#64ffda",
"a300": "#1de9b6",
"a400": "#00bfa5"
},
"green": {
"50": "#e8f5e9",
"100": "#c8e6c9",
"200": "#a5d6a7",
"300": "#81c784",
"400": "#66bb6a",
"500": "#4caf50",
"600": "#43a047",
"700": "#388e3c",
"800": "#2e7d32",
"900": "#1b5e20",
"a100": "#b9f6ca",
"a200": "#69f0ae",
"a300": "#00e676",
"a400": "#00c853"
},
"light-green": {
"50": "#f1f8e9",
"100": "#dcedc8",
"200": "#c5e1a5",
"300": "#aed581",
"400": "#9ccc65",
"500": "#8bc34a",
"600": "#7cb342",
"700": "#689f38",
"800": "#558b2f",
"900": "#33691e",
"a100": "#ccff90",
"a200": "#b2ff59",
"a300": "#76ff03",
"a400": "#64dd17"
},
"lime": {
"50": "#f9fbe7",
"100": "#f0f4c3",
"200": "#e6ee9c",
"300": "#dce775",
"400": "#d4e157",
"500": "#cddc39",
"600": "#c0ca33",
"700": "#afb42b",
"800": "#9e9d24",
"900": "#827717",
"a100": "#f4ff81",
"a200": "#eeff41",
"a300": "#c6ff00",
"a400": "#aeea00"
},
"yellow": {
"50": "#fffde7",
"100": "#fff9c4",
"200": "#fff59d",
"300": "#fff176",
"400": "#ffee58",
"500": "#ffeb3b",
"600": "#fdd835",
"700": "#fbc02d",
"800": "#f9a825",
"900": "#f57f17",
"a100": "#ffff8d",
"a200": "#ffff00",
"a300": "#ffea00",
"a400": "#ffd600"
},
"amber": {
"50": "#fff8e1",
"100": "#ffecb3",
"200": "#ffe082",
"300": "#ffd54f",
"400": "#ffca28",
"500": "#ffc107",
"600": "#ffb300",
"700": "#ffa000",
"800": "#ff8f00",
"900": "#ff6f00",
"a100": "#ffe57f",
"a200": "#ffd740",
"a300": "#ffc400",
"a400": "#ffab00"
},
"orange": {
"50": "#fff3e0",
"100": "#ffe0b2",
"200": "#ffcc80",
"300": "#ffb74d",
"400": "#ffa726",
"500": "#ff9800",
"600": "#fb8c00",
"700": "#f57c00",
"800": "#ef6c00",
"900": "#e65100",
"a100": "#ffd180",
"a200": "#ffab40",
"a300": "#ff9100",
"a400": "#ff6d00"
},
"deep-orange": {
"50": "#fbe9e7",
"100": "#ffccbc",
"200": "#ffab91",
"300": "#ff8a65",
"400": "#ff7043",
"500": "#ff5722",
"600": "#f4511e",
"700": "#e64a19",
"800": "#d84315",
"900": "#bf360c",
"a100": "#ff9e80",
"a200": "#ff6e40",
"a300": "#ff3d00",
"a400": "#dd2c00"
},
"brown": {
"50": "#efebe9",
"100": "#d7ccc8",
"200": "#bcaaa4",
"300": "#a1887f",
"400": "#8d6e63",
"500": "#795548",
"600": "#6d4c41",
"700": "#5d4037",
"800": "#4e342e",
"900": "#3e2723"
},
"grey": {
"50": "#fafafa",
"100": "#f5f5f5",
"200": "#eeeeee",
"300": "#e0e0e0",
"400": "#bdbdbd",
"500": "#9e9e9e",
"600": "#757575",
"700": "#616161",
"800": "#424242",
"900": "#212121"
},
"blue-grey": {
"50": "#eceff1",
"100": "#cfd8dc",
"200": "#b0bec5",
"300": "#90a4ae",
"400": "#78909c",
"500": "#607d8b",
"600": "#546e7a",
"700": "#455a64",
"800": "#37474f",
"900": "#263238"
}
};
})(window, document, $);

6
assets/global/js/configs/config-colors.min.js

@ -1,6 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
!function(window,document,$){"use strict";$.configs.colors={red:{50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",a100:"#ff8a80",a200:"#ff5252",a300:"#ff1744",a400:"#d50000"},pink:{50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",a100:"#ff80ab",a200:"#ff4081",a300:"#f50057",a400:"#c51162"},purple:{50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",a100:"#ea80fc",a200:"#e040fb",a300:"#d500f9",a400:"#aa00ff"},"deep-purple":{50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",a100:"#b388ff",a200:"#7c4dff",a300:"#651fff",a400:"#6200ea"},indigo:{50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",a100:"#8c9eff",a200:"#536dfe",a300:"#3d5afe",a400:"#304ffe"},blue:{50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",a100:"#82b1ff",a200:"#448aff",a300:"#2979ff",a400:"#2962ff"},"light-blue":{50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",a100:"#80d8ff",a200:"#40c4ff",a300:"#00b0ff",a400:"#0091ea"},cyan:{50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",a100:"#84ffff",a200:"#18ffff",a300:"#00e5ff",a400:"#00b8d4"},teal:{50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",a100:"#a7ffeb",a200:"#64ffda",a300:"#1de9b6",a400:"#00bfa5"},green:{50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",a100:"#b9f6ca",a200:"#69f0ae",a300:"#00e676",a400:"#00c853"},"light-green":{50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",a100:"#ccff90",a200:"#b2ff59",a300:"#76ff03",a400:"#64dd17"},lime:{50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",a100:"#f4ff81",a200:"#eeff41",a300:"#c6ff00",a400:"#aeea00"},yellow:{50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",a100:"#ffff8d",a200:"#ffff00",a300:"#ffea00",a400:"#ffd600"},amber:{50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",a100:"#ffe57f",a200:"#ffd740",a300:"#ffc400",a400:"#ffab00"},orange:{50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",a100:"#ffd180",a200:"#ffab40",a300:"#ff9100",a400:"#ff6d00"},"deep-orange":{50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",a100:"#ff9e80",a200:"#ff6e40",a300:"#ff3d00",a400:"#dd2c00"},brown:{50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723"},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121"},"blue-grey":{50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238"}}}(window,document,$);

290
assets/global/js/core.js

@ -1,290 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
(function(window, document, $) {
'use strict';
var $doc = $(document);
// Site
// ====
$.site = $.site || {};
$.extend($.site, {
_queue: {
prepare: [],
run: [],
complete: []
},
run: function() {
var self = this;
this.dequeue('prepare', function() {
self.trigger('before.run', self);
});
this.dequeue('run', function() {
self.dequeue('complete', function() {
self.trigger('after.run', self);
});
});
},
dequeue: function(name, done) {
var self = this,
queue = this.getQueue(name),
fn = queue.shift(),
next = function() {
self.dequeue(name, done);
};
if (fn) {
fn.call(this, next);
} else if ($.isFunction(done)) {
done.call(this);
}
},
getQueue: function(name) {
if (!$.isArray(this._queue[name])) {
this._queue[name] = [];
}
return this._queue[name];
},
extend: function(obj) {
$.each(this._queue, function(name, queue) {
if ($.isFunction(obj[name])) {
queue.push(obj[name]);
delete obj[name];
}
});
$.extend(this, obj);
return this;
},
trigger: function(name, data, $el) {
if (typeof name === 'undefined') return;
if (typeof $el === 'undefined') $el = $doc;
$el.trigger(name + '.site', data);
},
throttle: function(func, wait) {
var _now = Date.now || function() {
return new Date().getTime();
};
var context, args, result;
var timeout = null;
var previous = 0;
var later = function() {
previous = _now();
timeout = null;
result = func.apply(context, args);
context = args = null;
};
return function() {
var now = _now();
var remaining = wait - (now - previous);
context = this;
args = arguments;
if (remaining <= 0) {
clearTimeout(timeout);
timeout = null;
previous = now;
result = func.apply(context, args);
context = args = null;
} else if (!timeout) {
timeout = setTimeout(later, remaining);
}
return result;
};
},
resize: function() {
if (document.createEvent) {
var ev = document.createEvent('Event');
ev.initEvent('resize', true, true);
window.dispatchEvent(ev);
} else {
element = document.documentElement;
var event = document.createEventObject();
element.fireEvent("onresize", event);
}
}
});
// Configs
// =======
$.configs = $.configs || {};
$.extend($.configs, {
data: {},
get: function(name) {
var callback = function(data, name) {
return data[name];
}
var data = this.data;
for (var i = 0; i < arguments.length; i++) {
name = arguments[i];
data = callback(data, name);
}
return data;
},
set: function(name, value) {
this.data[name] = value;
},
extend: function(name, options) {
var value = this.get(name);
return $.extend(true, value, options);
}
});
// Colors
// ======
$.colors = function(name, level) {
if (name === 'primary') {
name = $.configs.get('site', 'primaryColor');
if (!name) {
name = 'red';
}
}
if (typeof $.configs.colors === 'undefined') {
return null;
}
if (typeof $.configs.colors[name] !== 'undefined') {
if (level && typeof $.configs.colors[name][level] !== 'undefined') {
return $.configs.colors[name][level];
}
if (typeof level === 'undefined') {
return $.configs.colors[name];
}
}
return null;
};
// Components
// ==========
$.components = $.components || {};
$.extend($.components, {
_components: {},
register: function(name, obj) {
this._components[name] = obj;
},
init: function(name, context, args) {
var self = this;
if (typeof name === 'undefined') {
$.each(this._components, function(name) {
self.init(name);
});
} else {
context = context || document;
args = args || [];
var obj = this.get(name);
if (obj) {
switch (obj.mode) {
case 'default':
return this._initDefault(name, context);
case 'init':
return this._initComponent(name, obj, context, args);
case 'api':
return this._initApi(name, obj, args);
default:
this._initApi(name, obj, context, args);
this._initComponent(name, obj, context, args);
return;
}
}
}
},
/* init alternative, but only or init mode */
call: function(name, context) {
var args = Array.prototype.slice.call(arguments, 2);
var obj = this.get(name);
context = context || document;
return this._initComponent(name, obj, context, args);
},
_initDefault: function(name, context) {
if (!$.fn[name]) return;
var defaults = this.getDefaults(name);
$('[data-plugin=' + name + ']', context).each(function() {
var $this = $(this),
options = $.extend(true, {}, defaults, $this.data());
$this[name](options);
});
},
_initComponent: function(name, obj, context, args) {
if ($.isFunction(obj.init)) {
obj.init.apply(obj, [context].concat(args));
}
},
_initApi: function(name, obj, args) {
if (typeof obj.apiCalled === 'undefined' && $.isFunction(obj.api)) {
obj.api.apply(obj, args);
obj.apiCalled = true;
}
},
getDefaults: function(name) {
var component = this.get(name);
if (component && typeof component.defaults !== "undefined") {
return component.defaults;
} else {
return {};
}
},
get: function(name, property) {
if (typeof this._components[name] !== "undefined") {
if (typeof property !== "undefined") {
return this._components[name][property];
} else {
return this._components[name];
}
} else {
console.warn('component:' + component + ' script is not loaded.');
return undefined;
}
}
});
})(window, document, jQuery);

6
assets/global/js/core.min.js

@ -1,6 +0,0 @@
/*!
* remark (http://getbootstrapadmin.com/remark)
* Copyright 2016 amazingsurge
* Licensed under the Themeforest Standard Licenses
*/
!function(window,document,$){"use strict";var $doc=$(document);$.site=$.site||{},$.extend($.site,{_queue:{prepare:[],run:[],complete:[]},run:function(){var self=this;this.dequeue("prepare",function(){self.trigger("before.run",self)}),this.dequeue("run",function(){self.dequeue("complete",function(){self.trigger("after.run",self)})})},dequeue:function(name,done){var self=this,queue=this.getQueue(name),fn=queue.shift(),next=function(){self.dequeue(name,done)};fn?fn.call(this,next):$.isFunction(done)&&done.call(this)},getQueue:function(name){return $.isArray(this._queue[name])||(this._queue[name]=[]),this._queue[name]},extend:function(obj){return $.each(this._queue,function(name,queue){$.isFunction(obj[name])&&(queue.push(obj[name]),delete obj[name])}),$.extend(this,obj),this},trigger:function(name,data,$el){"undefined"!=typeof name&&("undefined"==typeof $el&&($el=$doc),$el.trigger(name+".site",data))},throttle:function(func,wait){var context,args,result,_now=Date.now||function(){return(new Date).getTime()},timeout=null,previous=0,later=function(){previous=_now(),timeout=null,result=func.apply(context,args),context=args=null};return function(){var now=_now(),remaining=wait-(now-previous);return context=this,args=arguments,0>=remaining?(clearTimeout(timeout),timeout=null,previous=now,result=func.apply(context,args),context=args=null):timeout||(timeout=setTimeout(later,remaining)),result}},resize:function(){if(document.createEvent){var ev=document.createEvent("Event");ev.initEvent("resize",!0,!0),window.dispatchEvent(ev)}else{element=document.documentElement;var event=document.createEventObject();element.fireEvent("onresize",event)}}}),$.configs=$.configs||{},$.extend($.configs,{data:{},get:function(name){for(var callback=function(data,name){return data[name]},data=this.data,i=0;i<arguments.length;i++)name=arguments[i],data=callback(data,name);return data},set:function(name,value){this.data[name]=value},extend:function(name,options){var value=this.get(name);return $.extend(!0,value,options)}}),$.colors=function(name,level){if("primary"===name&&(name=$.configs.get("site","primaryColor"),name||(name="red")),"undefined"==typeof $.configs.colors)return null;if("undefined"!=typeof $.configs.colors[name]){if(level&&"undefined"!=typeof $.configs.colors[name][level])return $.configs.colors[name][level];if("undefined"==typeof level)return $.configs.colors[name]}return null},$.components=$.components||{},$.extend($.components,{_components:{},register:function(name,obj){this._components[name]=obj},init:function(name,context,args){var self=this;if("undefined"==typeof name)$.each(this._components,function(name){self.init(name)});else{context=context||document,args=args||[];var obj=this.get(name);if(obj)switch(obj.mode){case"default":return this._initDefault(name,context);case"init":return this._initComponent(name,obj,context,args);case"api":return this._initApi(name,obj,args);default:return this._initApi(name,obj,context,args),void this._initComponent(name,obj,context,args)}}},call:function(name,context){var args=Array.prototype.slice.call(arguments,2),obj=this.get(name);return context=context||document,this._initComponent(name,obj,context,args)},_initDefault:function(name,context){if($.fn[name]){var defaults=this.getDefaults(name);$("[data-plugin="+name+"]",context).each(function(){var $this=$(this),options=$.extend(!0,{},defaults,$this.data());$this[name](options)})}},_initComponent:function(name,obj,context,args){$.isFunction(obj.init)&&obj.init.apply(obj,[context].concat(args))},_initApi:function(name,obj,args){"undefined"==typeof obj.apiCalled&&$.isFunction(obj.api)&&(obj.api.apply(obj,args),obj.apiCalled=!0)},getDefaults:function(name){var component=this.get(name);return component&&"undefined"!=typeof component.defaults?component.defaults:{}},get:function(name,property){return"undefined"!=typeof this._components[name]?"undefined"!=typeof property?this._components[name][property]:this._components[name]:void 0}})}(window,document,jQuery);
Loading…
Cancel
Save