first commit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
/*=========================================================================================
|
||||
File Name: basic-inputs.js
|
||||
Description: Input field js for label type
|
||||
----------------------------------------------------------------------------------------
|
||||
Item Name: Vuexy - Vuejs, HTML & Laravel Admin Dashboard Template
|
||||
Author: Pixinvent
|
||||
Author URL: hhttp://www.themeforest.net/user/pixinvent
|
||||
==========================================================================================*/
|
||||
|
||||
(function(window, document, $) {
|
||||
'use strict';
|
||||
var $html = $('html');
|
||||
|
||||
//label Positions
|
||||
$(".labelUp").labelinplace();
|
||||
$(".labelDown").labelinplace({
|
||||
labelPosition: "down"
|
||||
});
|
||||
|
||||
// Label Icons
|
||||
$(".labelIcon").labelinplace({
|
||||
labelArrowRight: ' <i class="icon-hand-o-right"></i> ',
|
||||
labelArrowDown: ' <i class="icon-hand-o-down"></i> ',
|
||||
labelArrowUp: ' <i class="icon-hand-o-up"></i> '
|
||||
});
|
||||
|
||||
// Icons After Label
|
||||
$(".labelIconAfter").labelinplace({
|
||||
labelArrowRight: ' <i class="icon-caret-right"></i> ',
|
||||
labelArrowDown: ' <i class="icon-caret-down"></i> ',
|
||||
labelArrowUp: ' <i class="icon-caret-up"></i> ',
|
||||
labelIconPosition: "after",
|
||||
inputAttr: "id"
|
||||
});
|
||||
|
||||
})(window, document, jQuery);
|
||||
@@ -0,0 +1 @@
|
||||
!function(l){"use strict";l("html");l(".labelUp").labelinplace(),l(".labelDown").labelinplace({labelPosition:"down"}),l(".labelIcon").labelinplace({labelArrowRight:' <i class="icon-hand-o-right"></i> ',labelArrowDown:' <i class="icon-hand-o-down"></i> ',labelArrowUp:' <i class="icon-hand-o-up"></i> '}),l(".labelIconAfter").labelinplace({labelArrowRight:' <i class="icon-caret-right"></i> ',labelArrowDown:' <i class="icon-caret-down"></i> ',labelArrowUp:' <i class="icon-caret-up"></i> ',labelIconPosition:"after",inputAttr:"id"})}((window,document,jQuery));
|
||||
@@ -0,0 +1,68 @@
|
||||
/*=========================================================================================
|
||||
File Name: form-maxlength.js
|
||||
Description: Bootstrap-Maxlength uses a Twitter Bootstrap label to show a visual
|
||||
feedback to the user about the maximum length of the field where the user is
|
||||
inserting text. Uses the HTML5 attribute "maxlength" to work.
|
||||
----------------------------------------------------------------------------------------
|
||||
Item Name: Vuexy - Vuejs, HTML & Laravel Admin Dashboard Template
|
||||
Author: Pixinvent
|
||||
Author URL: hhttp://www.themeforest.net/user/pixinvent
|
||||
==========================================================================================*/
|
||||
(function (window, document, $) {
|
||||
'use strict';
|
||||
|
||||
var $danger = "#ea5455";
|
||||
var $primary = "#7367f0";
|
||||
var $textcolor = "#4e5154";
|
||||
|
||||
$(".char-textarea").on("keyup", function (event) {
|
||||
checkTextAreaMaxLength(this, event);
|
||||
// to later change text color in dark layout
|
||||
$(this).addClass("active")
|
||||
});
|
||||
|
||||
/*
|
||||
Checks the MaxLength of the Textarea
|
||||
-----------------------------------------------------
|
||||
@prerequisite: textBox = textarea dom element
|
||||
e = textarea event
|
||||
length = Max length of characters
|
||||
*/
|
||||
function checkTextAreaMaxLength(textBox, e) {
|
||||
|
||||
var maxLength = parseInt($(textBox).data("length"));
|
||||
|
||||
|
||||
if (!checkSpecialKeys(e)) {
|
||||
if (textBox.value.length < maxLength - 1) textBox.value = textBox.value.substring(0, maxLength);
|
||||
}
|
||||
$(".char-count").html(textBox.value.length);
|
||||
|
||||
if (textBox.value.length > maxLength) {
|
||||
$(".counter-value").css("background-color", $danger);
|
||||
$(".char-textarea").css("color", $danger);
|
||||
// to change text color after limit is maxedout out
|
||||
$(".char-textarea").addClass("max-limit")
|
||||
}
|
||||
else {
|
||||
$(".counter-value").css("background-color", $primary);
|
||||
$(".char-textarea").css("color", $textcolor);
|
||||
$(".char-textarea").removeClass("max-limit")
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
Checks if the keyCode pressed is inside special chars
|
||||
-------------------------------------------------------
|
||||
@prerequisite: e = e.keyCode object for the key pressed
|
||||
*/
|
||||
function checkSpecialKeys(e) {
|
||||
if (e.keyCode != 8 && e.keyCode != 46 && e.keyCode != 37 && e.keyCode != 38 && e.keyCode != 39 && e.keyCode != 40)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
})(window, document, jQuery);
|
||||
@@ -0,0 +1 @@
|
||||
!function(r){"use strict";var o="#ea5455";r(".char-textarea").on("keyup",function(e){!function(e,a){var t=parseInt(r(e).data("length"));(function(e){return 8==e.keyCode||46==e.keyCode||37==e.keyCode||38==e.keyCode||39==e.keyCode||40==e.keyCode})(a)||e.value.length<t-1&&(e.value=e.value.substring(0,t));r(".char-count").html(e.value.length),e.value.length>t?(r(".counter-value").css("background-color",o),r(".char-textarea").css("color",o),r(".char-textarea").addClass("max-limit")):(r(".counter-value").css("background-color","#7367f0"),r(".char-textarea").css("color","#4e5154"),r(".char-textarea").removeClass("max-limit"))}(this,e),r(this).addClass("active")})}((window,document,jQuery));
|
||||
@@ -0,0 +1,23 @@
|
||||
/*=========================================================================================
|
||||
File Name: form-tooltip-valid.js
|
||||
Description: form tooltip validation etc..
|
||||
----------------------------------------------------------------------------------------
|
||||
Item Name: Vuexy - Vuejs, HTML & Laravel Admin Dashboard Template
|
||||
Author: Pixinvent
|
||||
Author URL: hhttp://www.themeforest.net/user/pixinvent
|
||||
==========================================================================================*/
|
||||
(function(window, document, $) {
|
||||
'use strict';
|
||||
|
||||
// Fetch all the forms we want to apply custom Bootstrap validation styles to
|
||||
// Loop over them and prevent submission
|
||||
$("button").click(function () {
|
||||
var form = $(".needs-validation");
|
||||
if (form[0].checkValidity() === false) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
form.addClass('was-validated');
|
||||
});
|
||||
|
||||
})(window, document, jQuery);
|
||||
@@ -0,0 +1 @@
|
||||
!function(e){"use strict";e("button").click(function(){var t=e(".needs-validation");!1===t[0].checkValidity()&&(event.preventDefault(),event.stopPropagation()),t.addClass("was-validated")})}((window,document,jQuery));
|
||||
@@ -0,0 +1,76 @@
|
||||
/*=========================================================================================
|
||||
File Name: input-groups.js
|
||||
Description: Input Groups js
|
||||
----------------------------------------------------------------------------------------
|
||||
Item Name: Vuexy - Vuejs, HTML & Laravel Admin Dashboard Template
|
||||
Author: PIXINVENT
|
||||
Author URL: http://www.themeforest.net/user/pixinvent
|
||||
==========================================================================================*/
|
||||
|
||||
(function (window, document, $) {
|
||||
'use strict';
|
||||
var $html = $('html');
|
||||
|
||||
// Default Spin
|
||||
$(".touchspin").TouchSpin({
|
||||
buttondown_class: "btn btn-primary",
|
||||
buttonup_class: "btn btn-primary",
|
||||
});
|
||||
|
||||
// Icon Change
|
||||
$(".touchspin-icon").TouchSpin({
|
||||
buttondown_txt: '<i class="feather icon-chevron-down"></i>',
|
||||
buttonup_txt: '<i class="feather icon-chevron-up"></i>'
|
||||
});
|
||||
|
||||
// Min - Max
|
||||
|
||||
var touchspinValue = $(".touchspin-min-max"),
|
||||
counterMin = 15,
|
||||
counterMax = 21;
|
||||
if (touchspinValue.length > 0) {
|
||||
touchspinValue.TouchSpin({
|
||||
min: counterMin,
|
||||
max: counterMax
|
||||
}).on('touchspin.on.startdownspin', function () {
|
||||
var $this = $(this);
|
||||
$('.bootstrap-touchspin-up').removeClass("disabled-max-min");
|
||||
if ($this.val() == counterMin) {
|
||||
$(this).siblings().find('.bootstrap-touchspin-down').addClass("disabled-max-min");
|
||||
}
|
||||
}).on('touchspin.on.startupspin', function () {
|
||||
var $this = $(this);
|
||||
$('.bootstrap-touchspin-down').removeClass("disabled-max-min");
|
||||
if ($this.val() == counterMax) {
|
||||
$(this).siblings().find('.bootstrap-touchspin-up').addClass("disabled-max-min");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// Step
|
||||
$(".touchspin-step").TouchSpin({
|
||||
step: 5
|
||||
});
|
||||
|
||||
// Color Options
|
||||
$(".touchspin-color").each(function (index) {
|
||||
var down = "btn btn-primary",
|
||||
up = "btn btn-primary",
|
||||
$this = $(this);
|
||||
if ($this.data('bts-button-down-class')) {
|
||||
down = $this.data('bts-button-down-class');
|
||||
}
|
||||
if ($this.data('bts-button-up-class')) {
|
||||
up = $this.data('bts-button-up-class');
|
||||
}
|
||||
$this.TouchSpin({
|
||||
mousewheel: false,
|
||||
buttondown_class: down,
|
||||
buttonup_class: up,
|
||||
buttondown_txt: '<i class="feather icon-minus"></i>',
|
||||
buttonup_txt: '<i class="feather icon-plus"></i>'
|
||||
});
|
||||
});
|
||||
|
||||
})(window, document, jQuery);
|
||||
@@ -0,0 +1 @@
|
||||
!function(i){"use strict";i("html");i(".touchspin").TouchSpin({buttondown_class:"btn btn-primary",buttonup_class:"btn btn-primary"}),i(".touchspin-icon").TouchSpin({buttondown_txt:'<i class="feather icon-chevron-down"></i>',buttonup_txt:'<i class="feather icon-chevron-up"></i>'});var t=i(".touchspin-min-max");0<t.length&&t.TouchSpin({min:15,max:21}).on("touchspin.on.startdownspin",function(){var t=i(this);i(".bootstrap-touchspin-up").removeClass("disabled-max-min"),15==t.val()&&i(this).siblings().find(".bootstrap-touchspin-down").addClass("disabled-max-min")}).on("touchspin.on.startupspin",function(){var t=i(this);i(".bootstrap-touchspin-down").removeClass("disabled-max-min"),21==t.val()&&i(this).siblings().find(".bootstrap-touchspin-up").addClass("disabled-max-min")}),i(".touchspin-step").TouchSpin({step:5}),i(".touchspin-color").each(function(t){var n="btn btn-primary",s="btn btn-primary",o=i(this);o.data("bts-button-down-class")&&(n=o.data("bts-button-down-class")),o.data("bts-button-up-class")&&(s=o.data("bts-button-up-class")),o.TouchSpin({mousewheel:!1,buttondown_class:n,buttonup_class:s,buttondown_txt:'<i class="feather icon-minus"></i>',buttonup_txt:'<i class="feather icon-plus"></i>'})})}((window,document,jQuery));
|
||||
@@ -0,0 +1,279 @@
|
||||
/*=========================================================================================
|
||||
File Name: form-select2.js
|
||||
Description: Select2 is a jQuery-based replacement for select boxes.
|
||||
It supports searching, remote data sets, and pagination of results.
|
||||
----------------------------------------------------------------------------------------
|
||||
Item Name: Vuexy - Vuejs, HTML & Laravel Admin Dashboard Template
|
||||
Author: Pixinvent
|
||||
Author URL: hhttp://www.themeforest.net/user/pixinvent
|
||||
==========================================================================================*/
|
||||
(function(window, document, $) {
|
||||
'use strict';
|
||||
|
||||
// Basic Select2 select
|
||||
$(".select2").select2({
|
||||
// the following code is used to disable x-scrollbar when click in select input and
|
||||
// take 100% width in responsive also
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%'
|
||||
});
|
||||
|
||||
// Select With Icon
|
||||
$(".select2-icons").select2({
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%',
|
||||
minimumResultsForSearch: Infinity,
|
||||
templateResult: iconFormat,
|
||||
templateSelection: iconFormat,
|
||||
escapeMarkup: function(es) { return es; }
|
||||
});
|
||||
|
||||
// Format icon
|
||||
function iconFormat(icon) {
|
||||
var originalOption = icon.element;
|
||||
if (!icon.id) { return icon.text; }
|
||||
var $icon = "<i class='" + $(icon.element).data('icon') + "'></i>" + icon.text;
|
||||
|
||||
return $icon;
|
||||
}
|
||||
|
||||
|
||||
// Limiting the number of selections
|
||||
$(".max-length").select2({
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%',
|
||||
maximumSelectionLength: 2,
|
||||
placeholder: "Select maximum 2 items"
|
||||
});
|
||||
|
||||
|
||||
// Programmatic access
|
||||
var $select = $(".js-example-programmatic").select2({
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%'
|
||||
});
|
||||
var $selectMulti = $(".js-example-programmatic-multi").select2();
|
||||
$selectMulti.select2({
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%',
|
||||
placeholder: "Programmatic Events"
|
||||
});
|
||||
$(".js-programmatic-set-val").on("click", function () { $select.val("CA").trigger("change"); });
|
||||
|
||||
$(".js-programmatic-open").on("click", function () { $select.select2("open"); });
|
||||
$(".js-programmatic-close").on("click", function () { $select.select2("close"); });
|
||||
|
||||
$(".js-programmatic-init").on("click", function () { $select.select2(); });
|
||||
$(".js-programmatic-destroy").on("click", function () { $select.select2("destroy"); });
|
||||
|
||||
$(".js-programmatic-multi-set-val").on("click", function () { $selectMulti.val(["CA", "AL"]).trigger("change"); });
|
||||
$(".js-programmatic-multi-clear").on("click", function () { $selectMulti.val(null).trigger("change"); });
|
||||
|
||||
// Loading array data
|
||||
var data = [
|
||||
{ id: 0, text: 'enhancement' },
|
||||
{ id: 1, text: 'bug' },
|
||||
{ id: 2, text: 'duplicate' },
|
||||
{ id: 3, text: 'invalid' },
|
||||
{ id: 4, text: 'wontfix' }
|
||||
];
|
||||
|
||||
$(".select2-data-array").select2({
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%',
|
||||
data: data
|
||||
});
|
||||
|
||||
// Loading remote data
|
||||
$(".select2-data-ajax").select2({
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%',
|
||||
ajax: {
|
||||
url: "https://api.github.com/search/repositories",
|
||||
dataType: 'json',
|
||||
delay: 250,
|
||||
data: function (params) {
|
||||
return {
|
||||
q: params.term, // search term
|
||||
page: params.page
|
||||
};
|
||||
},
|
||||
processResults: function (data, params) {
|
||||
// parse the results into the format expected by Select2
|
||||
// since we are using custom formatting functions we do not need to
|
||||
// alter the remote JSON data, except to indicate that infinite
|
||||
// scrolling can be used
|
||||
params.page = params.page || 1;
|
||||
|
||||
return {
|
||||
results: data.items,
|
||||
pagination: {
|
||||
more: (params.page * 30) < data.total_count
|
||||
}
|
||||
};
|
||||
},
|
||||
cache: true
|
||||
},
|
||||
placeholder: 'Search for a repository',
|
||||
escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
|
||||
minimumInputLength: 1,
|
||||
templateResult: formatRepo,
|
||||
templateSelection: formatRepoSelection
|
||||
});
|
||||
|
||||
function formatRepo (repo) {
|
||||
if (repo.loading) return repo.text;
|
||||
|
||||
var markup = "<div class='select2-result-repository clearfix'>" +
|
||||
"<div class='select2-result-repository__avatar'><img src='" + repo.owner.avatar_url + "' /></div>" +
|
||||
"<div class='select2-result-repository__meta'>" +
|
||||
"<div class='select2-result-repository__title'>" + repo.full_name + "</div>";
|
||||
|
||||
if (repo.description) {
|
||||
markup += "<div class='select2-result-repository__description'>" + repo.description + "</div>";
|
||||
}
|
||||
|
||||
markup += "<div class='select2-result-repository__statistics'>" +
|
||||
"<div class='select2-result-repository__forks'><i class='icon-code-fork mr-0'></i> " + repo.forks_count + " Forks</div>" +
|
||||
"<div class='select2-result-repository__stargazers'><i class='icon-star5 mr-0'></i> " + repo.stargazers_count + " Stars</div>" +
|
||||
"<div class='select2-result-repository__watchers'><i class='icon-eye mr-0'></i> " + repo.watchers_count + " Watchers</div>" +
|
||||
"</div>" +
|
||||
"</div></div>";
|
||||
|
||||
return markup;
|
||||
}
|
||||
|
||||
function formatRepoSelection (repo) {
|
||||
return repo.full_name || repo.text;
|
||||
}
|
||||
|
||||
|
||||
// Customizing how results are matched
|
||||
function matchStart (term, text) {
|
||||
if (text.toUpperCase().indexOf(term.toUpperCase()) === 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
$.fn.select2.amd.require(['select2/compat/matcher'], function (oldMatcher) {
|
||||
$(".select2-customize-result").select2({
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%',
|
||||
placeholder: "Search by 'r'",
|
||||
matcher: oldMatcher(matchStart)
|
||||
});
|
||||
});
|
||||
|
||||
// Theme support
|
||||
$(".select2-theme").select2({
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%',
|
||||
placeholder: "Classic Theme",
|
||||
theme: "classic"
|
||||
});
|
||||
|
||||
|
||||
// Sizing options
|
||||
|
||||
// Large
|
||||
$('.select2-size-lg').select2({
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%',
|
||||
containerCssClass: 'select-lg'
|
||||
});
|
||||
|
||||
// Small
|
||||
$('.select2-size-sm').select2({
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%',
|
||||
containerCssClass: 'select-sm'
|
||||
});
|
||||
|
||||
// Color Options
|
||||
|
||||
// Background Color
|
||||
$('.select2-bg').each(function(i, obj) {
|
||||
var variation = "",
|
||||
textVariation = "",
|
||||
textColor = "";
|
||||
var color = $(this).data('bgcolor');
|
||||
variation = $(this).data('bgcolor-variation');
|
||||
textVariation = $(this).data('text-variation');
|
||||
textColor = $(this).data('text-color');
|
||||
if(textVariation !== ""){
|
||||
textVariation = " "+textVariation;
|
||||
}
|
||||
if(variation !== ""){
|
||||
variation = " bg-"+variation;
|
||||
}
|
||||
var className = "bg-"+color + variation + " " + textColor + textVariation + " border-"+color + ' border-darken-2 ';
|
||||
|
||||
$(this).select2({
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%',
|
||||
containerCssClass: className
|
||||
});
|
||||
});
|
||||
|
||||
// Border Color
|
||||
$('.select2-border').each(function(i, obj) {
|
||||
var variation = "",
|
||||
textVariation = "",
|
||||
textColor = "";
|
||||
var color = $(this).data('border-color');
|
||||
textVariation = $(this).data('text-variation');
|
||||
variation = $(this).data('border-variation');
|
||||
textColor = $(this).data('text-color');
|
||||
if(textVariation !== ""){
|
||||
textVariation = " "+textVariation;
|
||||
}
|
||||
if(variation !== ""){
|
||||
variation = " border-"+variation;
|
||||
}
|
||||
|
||||
var className = "border-"+color + " " +variation + " " + textColor + textVariation;
|
||||
|
||||
$(this).select2({
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%',
|
||||
containerCssClass: className
|
||||
});
|
||||
});
|
||||
|
||||
// Full Background Color
|
||||
$('.select2-full-bg').each(function(i, obj) {
|
||||
var variation = "",
|
||||
textVariation = "",
|
||||
textColor = "";
|
||||
var color = $(this).data('bgcolor');
|
||||
variation = $(this).data('bgcolor-variation');
|
||||
textVariation = $(this).data('text-variation');
|
||||
textColor = $(this).data('text-color');
|
||||
if(variation !== ""){
|
||||
variation = " bg-"+variation;
|
||||
}
|
||||
if(textVariation !== ""){
|
||||
textVariation = " "+textVariation;
|
||||
}
|
||||
var className = "bg-"+color + variation + " " + textColor + textVariation + " border-"+color + ' border-darken-2 ';
|
||||
|
||||
$(this).select2({
|
||||
dropdownAutoWidth: true,
|
||||
width: '100%',
|
||||
containerCssClass: className,
|
||||
dropdownCssClass: className
|
||||
});
|
||||
});
|
||||
|
||||
$('select[data-text-color]').each(function(i, obj) {
|
||||
var text = $(this).data('text-color'),textVariation;
|
||||
textVariation = $(this).data('text-variation');
|
||||
if(textVariation !== ""){
|
||||
textVariation = " "+textVariation;
|
||||
}
|
||||
$(this).next(".select2").find(".select2-selection__rendered").addClass(text+textVariation);
|
||||
});
|
||||
|
||||
})(window, document, jQuery);
|
||||
@@ -0,0 +1 @@
|
||||
!function(o){"use strict";function t(t){t.element;return t.id?"<i class='"+o(t.element).data("icon")+"'></i>"+t.text:t.text}o(".select2").select2({dropdownAutoWidth:!0,width:"100%"}),o(".select2-icons").select2({dropdownAutoWidth:!0,width:"100%",minimumResultsForSearch:1/0,templateResult:t,templateSelection:t,escapeMarkup:function(t){return t}}),o(".max-length").select2({dropdownAutoWidth:!0,width:"100%",maximumSelectionLength:2,placeholder:"Select maximum 2 items"});var e=o(".js-example-programmatic").select2({dropdownAutoWidth:!0,width:"100%"}),s=o(".js-example-programmatic-multi").select2();s.select2({dropdownAutoWidth:!0,width:"100%",placeholder:"Programmatic Events"}),o(".js-programmatic-set-val").on("click",function(){e.val("CA").trigger("change")}),o(".js-programmatic-open").on("click",function(){e.select2("open")}),o(".js-programmatic-close").on("click",function(){e.select2("close")}),o(".js-programmatic-init").on("click",function(){e.select2()}),o(".js-programmatic-destroy").on("click",function(){e.select2("destroy")}),o(".js-programmatic-multi-set-val").on("click",function(){s.val(["CA","AL"]).trigger("change")}),o(".js-programmatic-multi-clear").on("click",function(){s.val(null).trigger("change")});function i(t,e){return 0===e.toUpperCase().indexOf(t.toUpperCase())}o(".select2-data-array").select2({dropdownAutoWidth:!0,width:"100%",data:[{id:0,text:"enhancement"},{id:1,text:"bug"},{id:2,text:"duplicate"},{id:3,text:"invalid"},{id:4,text:"wontfix"}]}),o(".select2-data-ajax").select2({dropdownAutoWidth:!0,width:"100%",ajax:{url:"https://api.github.com/search/repositories",dataType:"json",delay:250,data:function(t){return{q:t.term,page:t.page}},processResults:function(t,e){return e.page=e.page||1,{results:t.items,pagination:{more:30*e.page<t.total_count}}},cache:!0},placeholder:"Search for a repository",escapeMarkup:function(t){return t},minimumInputLength:1,templateResult:function(t){if(t.loading)return t.text;var e="<div class='select2-result-repository clearfix'><div class='select2-result-repository__avatar'><img src='"+t.owner.avatar_url+"' /></div><div class='select2-result-repository__meta'><div class='select2-result-repository__title'>"+t.full_name+"</div>";t.description&&(e+="<div class='select2-result-repository__description'>"+t.description+"</div>");return e+="<div class='select2-result-repository__statistics'><div class='select2-result-repository__forks'><i class='icon-code-fork mr-0'></i> "+t.forks_count+" Forks</div><div class='select2-result-repository__stargazers'><i class='icon-star5 mr-0'></i> "+t.stargazers_count+" Stars</div><div class='select2-result-repository__watchers'><i class='icon-eye mr-0'></i> "+t.watchers_count+" Watchers</div></div></div></div>"},templateSelection:function(t){return t.full_name||t.text}}),o.fn.select2.amd.require(["select2/compat/matcher"],function(t){o(".select2-customize-result").select2({dropdownAutoWidth:!0,width:"100%",placeholder:"Search by 'r'",matcher:t(i)})}),o(".select2-theme").select2({dropdownAutoWidth:!0,width:"100%",placeholder:"Classic Theme",theme:"classic"}),o(".select2-size-lg").select2({dropdownAutoWidth:!0,width:"100%",containerCssClass:"select-lg"}),o(".select2-size-sm").select2({dropdownAutoWidth:!0,width:"100%",containerCssClass:"select-sm"}),o(".select2-bg").each(function(t,e){var s="",i="",r=o(this).data("bgcolor");s=o(this).data("bgcolor-variation"),""!==(i=o(this).data("text-variation"))&&(i=" "+i),""!==s&&(s=" bg-"+s);var a="bg-"+r+s+" "+o(this).data("text-color")+i+" border-"+r+" border-darken-2 ";o(this).select2({dropdownAutoWidth:!0,width:"100%",containerCssClass:a})}),o(".select2-border").each(function(t,e){var s="",i="",r=o(this).data("border-color");""!==(i=o(this).data("text-variation"))&&(i=" "+i),""!==(s=o(this).data("border-variation"))&&(s=" border-"+s);var a="border-"+r+" "+s+" "+o(this).data("text-color")+i;o(this).select2({dropdownAutoWidth:!0,width:"100%",containerCssClass:a})}),o(".select2-full-bg").each(function(t,e){var s="",i="",r=o(this).data("bgcolor");""!==(s=o(this).data("bgcolor-variation"))&&(s=" bg-"+s),""!==(i=o(this).data("text-variation"))&&(i=" "+i);var a="bg-"+r+s+" "+o(this).data("text-color")+i+" border-"+r+" border-darken-2 ";o(this).select2({dropdownAutoWidth:!0,width:"100%",containerCssClass:a,dropdownCssClass:a})}),o("select[data-text-color]").each(function(t,e){var s,i=o(this).data("text-color");""!==(s=o(this).data("text-variation"))&&(s=" "+s),o(this).next(".select2").find(".select2-selection__rendered").addClass(i+s)})}((window,document,jQuery));
|
||||
@@ -0,0 +1,16 @@
|
||||
/*=========================================================================================
|
||||
File Name: form-validation.js
|
||||
Description: jquery bootsreap validation js
|
||||
----------------------------------------------------------------------------------------
|
||||
Item Name: Vuexy - Vuejs, HTML & Laravel Admin Dashboard Template
|
||||
Author: PIXINVENT
|
||||
Author URL: http://www.themeforest.net/user/pixinvent
|
||||
==========================================================================================*/
|
||||
|
||||
(function(window, document, $) {
|
||||
'use strict';
|
||||
|
||||
// Input, Select, Textarea validations except submit button
|
||||
$("input,select,textarea").not("[type=submit]").jqBootstrapValidation();
|
||||
|
||||
})(window, document, jQuery);
|
||||
@@ -0,0 +1 @@
|
||||
!function(){"use strict";jQuery("input,select,textarea").not("[type=submit]").jqBootstrapValidation()}((window,document));
|
||||
@@ -0,0 +1,94 @@
|
||||
/*=========================================================================================
|
||||
File Name: wizard-steps.js
|
||||
Description: wizard steps page specific js
|
||||
----------------------------------------------------------------------------------------
|
||||
Item Name: Vuexy - Vuejs, HTML & Laravel Admin Dashboard Template
|
||||
Author: PIXINVENT
|
||||
Author URL: http://www.themeforest.net/user/pixinvent
|
||||
==========================================================================================*/
|
||||
|
||||
// Wizard tabs with numbers setup
|
||||
$(".number-tab-steps").steps({
|
||||
headerTag: "h6",
|
||||
bodyTag: "fieldset",
|
||||
transitionEffect: "fade",
|
||||
titleTemplate: '<span class="step">#index#</span> #title#',
|
||||
labels: {
|
||||
finish: 'Submit'
|
||||
},
|
||||
onFinished: function (event, currentIndex) {
|
||||
alert("Form submitted.");
|
||||
}
|
||||
});
|
||||
|
||||
// Wizard tabs with icons setup
|
||||
$(".icons-tab-steps").steps({
|
||||
headerTag: "h6",
|
||||
bodyTag: "fieldset",
|
||||
transitionEffect: "fade",
|
||||
titleTemplate: '<span class="step">#index#</span> #title#',
|
||||
labels: {
|
||||
finish: 'Submit'
|
||||
},
|
||||
onFinished: function (event, currentIndex) {
|
||||
alert("Form submitted.");
|
||||
}
|
||||
});
|
||||
|
||||
// Validate steps wizard
|
||||
|
||||
// Show form
|
||||
var form = $(".steps-validation").show();
|
||||
|
||||
$(".steps-validation").steps({
|
||||
headerTag: "h6",
|
||||
bodyTag: "fieldset",
|
||||
transitionEffect: "fade",
|
||||
titleTemplate: '<span class="step">#index#</span> #title#',
|
||||
labels: {
|
||||
finish: 'Submit'
|
||||
},
|
||||
onStepChanging: function (event, currentIndex, newIndex) {
|
||||
// Allways allow previous action even if the current form is not valid!
|
||||
if (currentIndex > newIndex) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Needed in some cases if the user went back (clean up)
|
||||
if (currentIndex < newIndex) {
|
||||
// To remove error styles
|
||||
form.find(".body:eq(" + newIndex + ") label.error").remove();
|
||||
form.find(".body:eq(" + newIndex + ") .error").removeClass("error");
|
||||
}
|
||||
form.validate().settings.ignore = ":disabled,:hidden";
|
||||
return form.valid();
|
||||
},
|
||||
onFinishing: function (event, currentIndex) {
|
||||
form.validate().settings.ignore = ":disabled";
|
||||
return form.valid();
|
||||
},
|
||||
onFinished: function (event, currentIndex) {
|
||||
alert("Submitted!");
|
||||
}
|
||||
});
|
||||
|
||||
// Initialize validation
|
||||
$(".steps-validation").validate({
|
||||
ignore: 'input[type=hidden]', // ignore hidden fields
|
||||
errorClass: 'danger',
|
||||
successClass: 'success',
|
||||
highlight: function (element, errorClass) {
|
||||
$(element).removeClass(errorClass);
|
||||
},
|
||||
unhighlight: function (element, errorClass) {
|
||||
$(element).removeClass(errorClass);
|
||||
},
|
||||
errorPlacement: function (error, element) {
|
||||
error.insertAfter(element);
|
||||
},
|
||||
rules: {
|
||||
email: {
|
||||
email: true
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
$(".number-tab-steps").steps({headerTag:"h6",bodyTag:"fieldset",transitionEffect:"fade",titleTemplate:'<span class="step">#index#</span> #title#',labels:{finish:"Submit"},onFinished:function(e,t){alert("Form submitted.")}}),$(".icons-tab-steps").steps({headerTag:"h6",bodyTag:"fieldset",transitionEffect:"fade",titleTemplate:'<span class="step">#index#</span> #title#',labels:{finish:"Submit"},onFinished:function(e,t){alert("Form submitted.")}});var form=$(".steps-validation").show();$(".steps-validation").steps({headerTag:"h6",bodyTag:"fieldset",transitionEffect:"fade",titleTemplate:'<span class="step">#index#</span> #title#',labels:{finish:"Submit"},onStepChanging:function(e,t,i){return i<t||(t<i&&(form.find(".body:eq("+i+") label.error").remove(),form.find(".body:eq("+i+") .error").removeClass("error")),form.validate().settings.ignore=":disabled,:hidden",form.valid())},onFinishing:function(e,t){return form.validate().settings.ignore=":disabled",form.valid()},onFinished:function(e,t){alert("Submitted!")}}),$(".steps-validation").validate({ignore:"input[type=hidden]",errorClass:"danger",successClass:"success",highlight:function(e,t){$(e).removeClass(t)},unhighlight:function(e,t){$(e).removeClass(t)},errorPlacement:function(e,t){e.insertAfter(t)},rules:{email:{email:!0}}});
|
||||
Reference in New Issue
Block a user