Browse Source

update

master
Satinder Grewal 9 years ago
parent
commit
c3e5d74e7a
  1. 28
      assets/pages/scripts/coming-soon.js
  2. 1
      assets/pages/scripts/coming-soon.min.js
  3. 46
      assets/pages/scripts/components-bootstrap-maxlength.js
  4. 1
      assets/pages/scripts/components-bootstrap-maxlength.min.js
  5. 26
      assets/pages/scripts/components-bootstrap-select-splitter.js
  6. 1
      assets/pages/scripts/components-bootstrap-select-splitter.min.js
  7. 23
      assets/pages/scripts/components-bootstrap-select.js
  8. 1
      assets/pages/scripts/components-bootstrap-select.min.js
  9. 32
      assets/pages/scripts/components-bootstrap-switch.js
  10. 1
      assets/pages/scripts/components-bootstrap-switch.min.js
  11. 96
      assets/pages/scripts/components-bootstrap-tagsinput.js
  12. 1
      assets/pages/scripts/components-bootstrap-tagsinput.min.js
  13. 76
      assets/pages/scripts/components-bootstrap-touchspin.js
  14. 1
      assets/pages/scripts/components-bootstrap-touchspin.min.js
  15. 64
      assets/pages/scripts/components-code-editors.js
  16. 1
      assets/pages/scripts/components-code-editors.min.js
  17. 56
      assets/pages/scripts/components-color-pickers.js
  18. 1
      assets/pages/scripts/components-color-pickers.min.js
  19. 61
      assets/pages/scripts/components-context-menu.js
  20. 1
      assets/pages/scripts/components-context-menu.min.js
  21. 245
      assets/pages/scripts/components-date-time-pickers.js
  22. 1
      assets/pages/scripts/components-date-time-pickers.min.js
  23. 263
      assets/pages/scripts/components-dropdowns.js
  24. 1
      assets/pages/scripts/components-dropdowns.min.js
  25. 34
      assets/pages/scripts/components-editors.js
  26. 1
      assets/pages/scripts/components-editors.min.js
  27. 586
      assets/pages/scripts/components-form-tools-2.js
  28. 1
      assets/pages/scripts/components-form-tools-2.min.js
  29. 202
      assets/pages/scripts/components-form-tools.js
  30. 1
      assets/pages/scripts/components-form-tools.min.js
  31. 150
      assets/pages/scripts/components-ion-sliders.js
  32. 1
      assets/pages/scripts/components-ion-sliders.min.js
  33. 27
      assets/pages/scripts/components-knob-dials.js
  34. 1
      assets/pages/scripts/components-knob-dials.min.js
  35. 263
      assets/pages/scripts/components-multi-select.js
  36. 1
      assets/pages/scripts/components-multi-select.min.js
  37. 308
      assets/pages/scripts/components-nouisliders.js
  38. 1
      assets/pages/scripts/components-nouisliders.min.js
  39. 127
      assets/pages/scripts/components-select2.js
  40. 1
      assets/pages/scripts/components-select2.min.js
  41. 276
      assets/pages/scripts/components-typeahead.js
  42. 1
      assets/pages/scripts/components-typeahead.min.js
  43. 32
      assets/pages/scripts/contact.js
  44. 1
      assets/pages/scripts/contact.min.js
  45. 36
      assets/pages/scripts/custom.js
  46. 1
      assets/pages/scripts/custom.min.js
  47. 1395
      assets/pages/scripts/dashboard.js
  48. 1
      assets/pages/scripts/dashboard.min.js
  49. 41
      assets/pages/scripts/form-dropzone.js
  50. 1
      assets/pages/scripts/form-dropzone.min.js
  51. 571
      assets/pages/scripts/form-editable.js
  52. 1
      assets/pages/scripts/form-editable.min.js
  53. 61
      assets/pages/scripts/form-fileupload.js
  54. 1
      assets/pages/scripts/form-fileupload.min.js
  55. 59
      assets/pages/scripts/form-icheck.js
  56. 1
      assets/pages/scripts/form-icheck.min.js
  57. 531
      assets/pages/scripts/form-image-crop.js
  58. 1
      assets/pages/scripts/form-image-crop.min.js
  59. 66
      assets/pages/scripts/form-input-mask.js
  60. 1
      assets/pages/scripts/form-input-mask.min.js
  61. 16
      assets/pages/scripts/form-samples.js
  62. 1
      assets/pages/scripts/form-samples.min.js
  63. 391
      assets/pages/scripts/form-validation-md.js
  64. 1
      assets/pages/scripts/form-validation-md.min.js
  65. 338
      assets/pages/scripts/form-validation.js
  66. 1
      assets/pages/scripts/form-validation.min.js
  67. 260
      assets/pages/scripts/form-wizard.js
  68. 1
      assets/pages/scripts/form-wizard.min.js
  69. 333
      assets/pages/scripts/inbox.js
  70. 1
      assets/pages/scripts/inbox.min.js
  71. 18
      assets/pages/scripts/jquery-gantt.js
  72. 1
      assets/pages/scripts/jquery-gantt.min.js
  73. 24
      assets/pages/scripts/lock-2.js
  74. 1
      assets/pages/scripts/lock-2.min.js
  75. 14
      assets/pages/scripts/lock.js
  76. 1
      assets/pages/scripts/lock.min.js
  77. 2
      assets/pages/scripts/login.js
  78. 30
      assets/pages/scripts/portlet-ajax.js
  79. 1
      assets/pages/scripts/portlet-ajax.min.js
  80. 38
      assets/pages/scripts/portlet-draggable.js
  81. 1
      assets/pages/scripts/portlet-draggable.min.js
  82. 65
      assets/pages/scripts/profile.js
  83. 1
      assets/pages/scripts/profile.min.js
  84. 19
      assets/pages/scripts/search.js
  85. 1
      assets/pages/scripts/search.min.js
  86. 233
      assets/pages/scripts/table-bootstrap-master.js
  87. 1
      assets/pages/scripts/table-bootstrap-master.min.js
  88. 60
      assets/pages/scripts/table-bootstrap.js
  89. 1
      assets/pages/scripts/table-bootstrap.min.js
  90. 101
      assets/pages/scripts/table-datatables-ajax.js
  91. 1
      assets/pages/scripts/table-datatables-ajax.min.js
  92. 323
      assets/pages/scripts/table-datatables-buttons.js
  93. 1
      assets/pages/scripts/table-datatables-buttons.min.js
  94. 142
      assets/pages/scripts/table-datatables-colreorder.js
  95. 1
      assets/pages/scripts/table-datatables-colreorder.min.js
  96. 178
      assets/pages/scripts/table-datatables-editable.js
  97. 1
      assets/pages/scripts/table-datatables-editable.min.js
  98. 139
      assets/pages/scripts/table-datatables-fixedheader.js
  99. 1
      assets/pages/scripts/table-datatables-fixedheader.min.js
  100. 418
      assets/pages/scripts/table-datatables-managed.js

28
assets/pages/scripts/coming-soon.js

@ -1,28 +0,0 @@
var ComingSoon = function () {
return {
//main function to initiate the module
init: function () {
var austDay = new Date();
austDay = new Date(austDay.getFullYear() + 1, 1 - 1, 26);
$('#defaultCountdown').countdown({until: austDay});
$('#year').text(austDay.getFullYear());
$.backstretch([
"../assets/pages/media/bg/1.jpg",
"../assets/pages/media/bg/2.jpg",
"../assets/pages/media/bg/3.jpg",
"../assets/pages/media/bg/4.jpg"
], {
fade: 1000,
duration: 10000
});
}
};
}();
jQuery(document).ready(function() {
ComingSoon.init();
});

1
assets/pages/scripts/coming-soon.min.js

@ -1 +0,0 @@
var ComingSoon=function(){return{init:function(){var e=new Date;e=new Date(e.getFullYear()+1,0,26),$("#defaultCountdown").countdown({until:e}),$("#year").text(e.getFullYear()),$.backstretch(["../assets/pages/media/bg/1.jpg","../assets/pages/media/bg/2.jpg","../assets/pages/media/bg/3.jpg","../assets/pages/media/bg/4.jpg"],{fade:1e3,duration:1e4})}}}();jQuery(document).ready(function(){ComingSoon.init()});

46
assets/pages/scripts/components-bootstrap-maxlength.js

@ -1,46 +0,0 @@
var ComponentsBootstrapMaxlength = function () {
var handleBootstrapMaxlength = function() {
$('#maxlength_defaultconfig').maxlength({
limitReachedClass: "label label-danger",
})
$('#maxlength_thresholdconfig').maxlength({
limitReachedClass: "label label-danger",
threshold: 20
});
$('#maxlength_alloptions').maxlength({
alwaysShow: true,
warningClass: "label label-success",
limitReachedClass: "label label-danger",
separator: ' out of ',
preText: 'You typed ',
postText: ' chars available.',
validate: true
});
$('#maxlength_textarea').maxlength({
limitReachedClass: "label label-danger",
alwaysShow: true
});
$('#maxlength_placement').maxlength({
limitReachedClass: "label label-danger",
alwaysShow: true,
placement: App.isRTL() ? 'top-right' : 'top-left'
});
}
return {
//main function to initiate the module
init: function () {
handleBootstrapMaxlength();
}
};
}();
jQuery(document).ready(function() {
ComponentsBootstrapMaxlength.init();
});

1
assets/pages/scripts/components-bootstrap-maxlength.min.js

@ -1 +0,0 @@
var ComponentsBootstrapMaxlength=function(){var a=function(){$("#maxlength_defaultconfig").maxlength({limitReachedClass:"label label-danger"}),$("#maxlength_thresholdconfig").maxlength({limitReachedClass:"label label-danger",threshold:20}),$("#maxlength_alloptions").maxlength({alwaysShow:!0,warningClass:"label label-success",limitReachedClass:"label label-danger",separator:" out of ",preText:"You typed ",postText:" chars available.",validate:!0}),$("#maxlength_textarea").maxlength({limitReachedClass:"label label-danger",alwaysShow:!0}),$("#maxlength_placement").maxlength({limitReachedClass:"label label-danger",alwaysShow:!0,placement:App.isRTL()?"top-right":"top-left"})};return{init:function(){a()}}}();jQuery(document).ready(function(){ComponentsBootstrapMaxlength.init()});

26
assets/pages/scripts/components-bootstrap-select-splitter.js

@ -1,26 +0,0 @@
var ComponentsBootstrapSelectSplitter = function() {
var selectSplitter = function() {
$('#select_selectsplitter1').selectsplitter({
selectSize: 4
});
$('#select_selectsplitter2').selectsplitter({
selectSize: 6
});
$('#select_selectsplitter3').selectsplitter({
selectSize: 5
});
}
return {
//main function to initiate the module
init: function() {
selectSplitter();
}
};
}();
jQuery(document).ready(function() {
ComponentsBootstrapSelectSplitter.init();
});

1
assets/pages/scripts/components-bootstrap-select-splitter.min.js

@ -1 +0,0 @@
var ComponentsBootstrapSelectSplitter=function(){var e=function(){$("#select_selectsplitter1").selectsplitter({selectSize:4}),$("#select_selectsplitter2").selectsplitter({selectSize:6}),$("#select_selectsplitter3").selectsplitter({selectSize:5})};return{init:function(){e()}}}();jQuery(document).ready(function(){ComponentsBootstrapSelectSplitter.init()});

23
assets/pages/scripts/components-bootstrap-select.js

@ -1,23 +0,0 @@
var ComponentsBootstrapSelect = function () {
var handleBootstrapSelect = function() {
$('.bs-select').selectpicker({
iconBase: 'fa',
tickIcon: 'fa-check'
});
}
return {
//main function to initiate the module
init: function () {
handleBootstrapSelect();
}
};
}();
if (App.isAngularJsApp() === false) {
jQuery(document).ready(function() {
ComponentsBootstrapSelect.init();
});
}

1
assets/pages/scripts/components-bootstrap-select.min.js

@ -1 +0,0 @@
var ComponentsBootstrapSelect=function(){var n=function(){$(".bs-select").selectpicker({iconBase:"fa",tickIcon:"fa-check"})};return{init:function(){n()}}}();App.isAngularJsApp()===!1&&jQuery(document).ready(function(){ComponentsBootstrapSelect.init()});

32
assets/pages/scripts/components-bootstrap-switch.js

@ -1,32 +0,0 @@
var ComponentsBootstrapSwitch = function () {
var handleBootstrapSwitch = function() {
$('.switch-radio1').on('switch-change', function () {
$('.switch-radio1').bootstrapSwitch('toggleRadioState');
});
// or
$('.switch-radio1').on('switch-change', function () {
$('.switch-radio1').bootstrapSwitch('toggleRadioStateAllowUncheck');
});
// or
$('.switch-radio1').on('switch-change', function () {
$('.switch-radio1').bootstrapSwitch('toggleRadioStateAllowUncheck', false);
});
}
return {
//main function to initiate the module
init: function () {
handleBootstrapSwitch();
}
};
}();
jQuery(document).ready(function() {
ComponentsBootstrapSwitch.init();
});

1
assets/pages/scripts/components-bootstrap-switch.min.js

@ -1 +0,0 @@
var ComponentsBootstrapSwitch=function(){var t=function(){$(".switch-radio1").on("switch-change",function(){$(".switch-radio1").bootstrapSwitch("toggleRadioState")}),$(".switch-radio1").on("switch-change",function(){$(".switch-radio1").bootstrapSwitch("toggleRadioStateAllowUncheck")}),$(".switch-radio1").on("switch-change",function(){$(".switch-radio1").bootstrapSwitch("toggleRadioStateAllowUncheck",!1)})};return{init:function(){t()}}}();jQuery(document).ready(function(){ComponentsBootstrapSwitch.init()});

96
assets/pages/scripts/components-bootstrap-tagsinput.js

@ -1,96 +0,0 @@
var ComponentsBootstrapTagsinput = function() {
var handleDemo1 = function() {
var elt = $('#object_tagsinput');
elt.tagsinput({
itemValue: 'value',
itemText: 'text',
});
$('#object_tagsinput_add').on('click', function(){
elt.tagsinput('add', {
"value": $('#object_tagsinput_value').val(),
"text": $('#object_tagsinput_city').val(),
"continent": $('#object_tagsinput_continent').val()
});
});
elt.tagsinput('add', { "value": 1 , "text": "Amsterdam" , "continent": "Europe" });
elt.tagsinput('add', { "value": 4 , "text": "Washington" , "continent": "America" });
elt.tagsinput('add', { "value": 7 , "text": "Sydney" , "continent": "Australia" });
elt.tagsinput('add', { "value": 10, "text": "Beijing" , "continent": "Asia" });
elt.tagsinput('add', { "value": 13, "text": "Cairo" , "continent": "Africa" });
}
var handleDemo2 = function() {
var elt = $('#state_tagsinput');
elt.tagsinput({
tagClass: function(item) {
switch (item.continent) {
case 'Europe':
return 'label label-primary';
case 'America':
return 'label label-danger label-important';
case 'Australia':
return 'label label-success';
case 'Africa':
return 'label label-default';
case 'Asia':
return 'label label-warning';
}
},
itemValue: 'value',
itemText: 'text'
});
$('#state_tagsinput_add').on('click', function(){
elt.tagsinput('add', {
"value": $('#state_tagsinput_value').val(),
"text": $('#state_tagsinput_city').val(),
"continent": $('#state_tagsinput_continent').val()
});
});
elt.tagsinput('add', {
"value": 1,
"text": "Amsterdam",
"continent": "Europe"
});
elt.tagsinput('add', {
"value": 4,
"text": "Washington",
"continent": "America"
});
elt.tagsinput('add', {
"value": 7,
"text": "Sydney",
"continent": "Australia"
});
elt.tagsinput('add', {
"value": 10,
"text": "Beijing",
"continent": "Asia"
});
elt.tagsinput('add', {
"value": 13,
"text": "Cairo",
"continent": "Africa"
});
}
return {
//main function to initiate the module
init: function() {
handleDemo1();
handleDemo2();
}
};
}();
jQuery(document).ready(function() {
ComponentsBootstrapTagsinput.init();
});

1
assets/pages/scripts/components-bootstrap-tagsinput.min.js

@ -1 +0,0 @@
var ComponentsBootstrapTagsinput=function(){var t=function(){var t=$("#object_tagsinput");t.tagsinput({itemValue:"value",itemText:"text"}),$("#object_tagsinput_add").on("click",function(){t.tagsinput("add",{value:$("#object_tagsinput_value").val(),text:$("#object_tagsinput_city").val(),continent:$("#object_tagsinput_continent").val()})}),t.tagsinput("add",{value:1,text:"Amsterdam",continent:"Europe"}),t.tagsinput("add",{value:4,text:"Washington",continent:"America"}),t.tagsinput("add",{value:7,text:"Sydney",continent:"Australia"}),t.tagsinput("add",{value:10,text:"Beijing",continent:"Asia"}),t.tagsinput("add",{value:13,text:"Cairo",continent:"Africa"})},a=function(){var t=$("#state_tagsinput");t.tagsinput({tagClass:function(t){switch(t.continent){case"Europe":return"label label-primary";case"America":return"label label-danger label-important";case"Australia":return"label label-success";case"Africa":return"label label-default";case"Asia":return"label label-warning"}},itemValue:"value",itemText:"text"}),$("#state_tagsinput_add").on("click",function(){t.tagsinput("add",{value:$("#state_tagsinput_value").val(),text:$("#state_tagsinput_city").val(),continent:$("#state_tagsinput_continent").val()})}),t.tagsinput("add",{value:1,text:"Amsterdam",continent:"Europe"}),t.tagsinput("add",{value:4,text:"Washington",continent:"America"}),t.tagsinput("add",{value:7,text:"Sydney",continent:"Australia"}),t.tagsinput("add",{value:10,text:"Beijing",continent:"Asia"}),t.tagsinput("add",{value:13,text:"Cairo",continent:"Africa"})};return{init:function(){t(),a()}}}();jQuery(document).ready(function(){ComponentsBootstrapTagsinput.init()});

76
assets/pages/scripts/components-bootstrap-touchspin.js

@ -1,76 +0,0 @@
var ComponentsBootstrapTouchSpin = function() {
var handleDemo = function() {
$("#touchspin_1").TouchSpin({
min: 0,
max: 100,
step: 0.1,
decimals: 2,
boostat: 5,
maxboostedstep: 10,
postfix: '%'
});
$("#touchspin_2").TouchSpin({
min: -1000000000,
max: 1000000000,
stepinterval: 50,
maxboostedstep: 10000000,
prefix: '$'
});
$("#touchspin_3").TouchSpin({
verticalbuttons: true
});
$("#touchspin_4").TouchSpin({
verticalbuttons: true,
verticalupclass: 'glyphicon glyphicon-plus',
verticaldownclass: 'glyphicon glyphicon-minus'
});
$("#touchspin_5").TouchSpin();
$("#touchspin_6").TouchSpin({
initval: 40
});
$("#touchspin_7").TouchSpin({
initval: 40
});
$("#touchspin_8").TouchSpin({
postfix: "a button",
postfix_extraclass: "btn red"
});
$("#touchspin_9").TouchSpin({
postfix: "a button",
postfix_extraclass: "btn green"
});
$("#touchspin_10").TouchSpin({
prefix: "pre",
postfix: "post"
});
$("#touchspin_11").TouchSpin({
buttondown_class: "btn blue",
buttonup_class: "btn red"
});
}
return {
//main function to initiate the module
init: function() {
handleDemo();
}
};
}();
jQuery(document).ready(function() {
ComponentsBootstrapTouchSpin.init();
});

1
assets/pages/scripts/components-bootstrap-touchspin.min.js

@ -1 +0,0 @@
var ComponentsBootstrapTouchSpin=function(){var t=function(){$("#touchspin_1").TouchSpin({min:0,max:100,step:.1,decimals:2,boostat:5,maxboostedstep:10,postfix:"%"}),$("#touchspin_2").TouchSpin({min:-1e9,max:1e9,stepinterval:50,maxboostedstep:1e7,prefix:"$"}),$("#touchspin_3").TouchSpin({verticalbuttons:!0}),$("#touchspin_4").TouchSpin({verticalbuttons:!0,verticalupclass:"glyphicon glyphicon-plus",verticaldownclass:"glyphicon glyphicon-minus"}),$("#touchspin_5").TouchSpin(),$("#touchspin_6").TouchSpin({initval:40}),$("#touchspin_7").TouchSpin({initval:40}),$("#touchspin_8").TouchSpin({postfix:"a button",postfix_extraclass:"btn red"}),$("#touchspin_9").TouchSpin({postfix:"a button",postfix_extraclass:"btn green"}),$("#touchspin_10").TouchSpin({prefix:"pre",postfix:"post"}),$("#touchspin_11").TouchSpin({buttondown_class:"btn blue",buttonup_class:"btn red"})};return{init:function(){t()}}}();jQuery(document).ready(function(){ComponentsBootstrapTouchSpin.init()});

64
assets/pages/scripts/components-code-editors.js

@ -1,64 +0,0 @@
var ComponentsCodeEditors = function () {
var handleDemo1 = function () {
var myTextArea = document.getElementById('code_editor_demo_1');
var myCodeMirror = CodeMirror.fromTextArea(myTextArea, {
lineNumbers: true,
matchBrackets: true,
styleActiveLine: true,
theme:"ambiance",
mode: 'javascript'
});
}
var handleDemo2 = function () {
var myTextArea = document.getElementById('code_editor_demo_2');
var myCodeMirror = CodeMirror.fromTextArea(myTextArea, {
lineNumbers: true,
matchBrackets: true,
styleActiveLine: true,
theme:"material",
mode: 'css'
});
}
var handleDemo3 = function () {
var myTextArea = document.getElementById('code_editor_demo_3');
var myCodeMirror = CodeMirror.fromTextArea(myTextArea, {
lineNumbers: true,
matchBrackets: true,
styleActiveLine: true,
theme:"neat",
mode: 'javascript',
readOnly: true
});
}
var handleDemo4 = function () {
var myTextArea = document.getElementById('code_editor_demo_4');
var myCodeMirror = CodeMirror.fromTextArea(myTextArea, {
lineNumbers: true,
matchBrackets: true,
styleActiveLine: true,
theme:"neo",
mode: 'css',
readOnly: true
});
}
return {
//main function to initiate the module
init: function () {
handleDemo1();
handleDemo2();
handleDemo3();
handleDemo4();
}
};
}();
jQuery(document).ready(function() {
ComponentsCodeEditors.init();
});

1
assets/pages/scripts/components-code-editors.min.js

@ -1 +0,0 @@
var ComponentsCodeEditors=function(){var e=function(){var e=document.getElementById("code_editor_demo_1");CodeMirror.fromTextArea(e,{lineNumbers:!0,matchBrackets:!0,styleActiveLine:!0,theme:"ambiance",mode:"javascript"})},t=function(){var e=document.getElementById("code_editor_demo_2");CodeMirror.fromTextArea(e,{lineNumbers:!0,matchBrackets:!0,styleActiveLine:!0,theme:"material",mode:"css"})},o=function(){var e=document.getElementById("code_editor_demo_3");CodeMirror.fromTextArea(e,{lineNumbers:!0,matchBrackets:!0,styleActiveLine:!0,theme:"neat",mode:"javascript",readOnly:!0})},r=function(){var e=document.getElementById("code_editor_demo_4");CodeMirror.fromTextArea(e,{lineNumbers:!0,matchBrackets:!0,styleActiveLine:!0,theme:"neo",mode:"css",readOnly:!0})};return{init:function(){e(),t(),o(),r()}}}();jQuery(document).ready(function(){ComponentsCodeEditors.init()});

56
assets/pages/scripts/components-color-pickers.js

@ -1,56 +0,0 @@
var ComponentsColorPickers = function() {
var handleColorPicker = function () {
if (!jQuery().colorpicker) {
return;
}
$('.colorpicker-default').colorpicker({
format: 'hex'
});
$('.colorpicker-rgba').colorpicker();
}
var handleMiniColors = function() {
$('.demo').each(function() {
//
// Dear reader, it's actually very easy to initialize MiniColors. For example:
//
// $(selector).minicolors();
//
// The way I've done it below is just for the demo, so don't get confused
// by it. Also, data- attributes aren't supported at this time...they're
// only used for this demo.
//
$(this).minicolors({
control: $(this).attr('data-control') || 'hue',
defaultValue: $(this).attr('data-defaultValue') || '',
inline: $(this).attr('data-inline') === 'true',
letterCase: $(this).attr('data-letterCase') || 'lowercase',
opacity: $(this).attr('data-opacity'),
position: $(this).attr('data-position') || 'bottom left',
change: function(hex, opacity) {
if (!hex) return;
if (opacity) hex += ', ' + opacity;
if (typeof console === 'object') {
console.log(hex);
}
},
theme: 'bootstrap'
});
});
}
return {
//main function to initiate the module
init: function() {
handleMiniColors();
handleColorPicker();
}
};
}();
jQuery(document).ready(function() {
ComponentsColorPickers.init();
});

1
assets/pages/scripts/components-color-pickers.min.js

@ -1 +0,0 @@
var ComponentsColorPickers=function(){var t=function(){jQuery().colorpicker&&($(".colorpicker-default").colorpicker({format:"hex"}),$(".colorpicker-rgba").colorpicker())},o=function(){$(".demo").each(function(){$(this).minicolors({control:$(this).attr("data-control")||"hue",defaultValue:$(this).attr("data-defaultValue")||"",inline:"true"===$(this).attr("data-inline"),letterCase:$(this).attr("data-letterCase")||"lowercase",opacity:$(this).attr("data-opacity"),position:$(this).attr("data-position")||"bottom left",change:function(t,o){t&&(o&&(t+=", "+o),"object"==typeof console&&console.log(t))},theme:"bootstrap"})})};return{init:function(){o(),t()}}}();jQuery(document).ready(function(){ComponentsColorPickers.init()});

61
assets/pages/scripts/components-context-menu.js

@ -1,61 +0,0 @@
var ComponentsContextMenu = function () {
var demo2 = function() {
$('#main').contextmenu({
target: '#context-menu2',
before: function (e) {
// This function is optional.
// Here we use it to stop the event if the user clicks a span
e.preventDefault();
if (e.target.tagName == 'SPAN') {
e.preventDefault();
this.closemenu();
return false;
}
//this.getMenu().find("li").eq(2).find('a').html("Dynamically changed!");
return true;
}
});
}
var demo3 = function() {
// Demo 3
$('#context2').contextmenu({
target: '#context-menu2',
onItem: function (context, e) {
alert($(e.target).text());
}
});
$('#context-menu2').on('show.bs.context', function (e) {
console.log('before show event');
});
$('#context-menu2').on('shown.bs.context', function (e) {
console.log('after show event');
});
$('#context-menu2').on('hide.bs.context', function (e) {
console.log('before hide event');
});
$('#context-menu2').on('hidden.bs.context', function (e) {
console.log('after hide event');
});
}
return {
//main function to initiate the module
init: function () {
demo2();
demo3();
}
};
}();
jQuery(document).ready(function() {
ComponentsContextMenu.init();
});

1
assets/pages/scripts/components-context-menu.min.js

@ -1 +0,0 @@
var ComponentsContextMenu=function(){var n=function(){$("#main").contextmenu({target:"#context-menu2",before:function(n){return n.preventDefault(),"SPAN"==n.target.tagName?(n.preventDefault(),this.closemenu(),!1):!0}})},e=function(){$("#context2").contextmenu({target:"#context-menu2",onItem:function(n,e){alert($(e.target).text())}}),$("#context-menu2").on("show.bs.context",function(n){console.log("before show event")}),$("#context-menu2").on("shown.bs.context",function(n){console.log("after show event")}),$("#context-menu2").on("hide.bs.context",function(n){console.log("before hide event")}),$("#context-menu2").on("hidden.bs.context",function(n){console.log("after hide event")})};return{init:function(){n(),e()}}}();jQuery(document).ready(function(){ComponentsContextMenu.init()});

245
assets/pages/scripts/components-date-time-pickers.js

@ -1,245 +0,0 @@
var ComponentsDateTimePickers = function () {
var handleDatePickers = function () {
if (jQuery().datepicker) {
$('.date-picker').datepicker({
rtl: App.isRTL(),
orientation: "left",
autoclose: true
});
//$('body').removeClass("modal-open"); // fix bug when inline picker is used in modal
}
/* Workaround to restrict daterange past date select: http://stackoverflow.com/questions/11933173/how-to-restrict-the-selectable-date-ranges-in-bootstrap-datepicker */
// Workaround to fix datepicker position on window scroll
$( document ).scroll(function(){
$('#form_modal2 .date-picker').datepicker('place'); //#modal is the id of the modal
});
}
var handleTimePickers = function () {
if (jQuery().timepicker) {
$('.timepicker-default').timepicker({
autoclose: true,
showSeconds: true,
minuteStep: 1
});
$('.timepicker-no-seconds').timepicker({
autoclose: true,
minuteStep: 5
});
$('.timepicker-24').timepicker({
autoclose: true,
minuteStep: 5,
showSeconds: false,
showMeridian: false
});
// handle input group button click
$('.timepicker').parent('.input-group').on('click', '.input-group-btn', function(e){
e.preventDefault();
$(this).parent('.input-group').find('.timepicker').timepicker('showWidget');
});
// Workaround to fix timepicker position on window scroll
$( document ).scroll(function(){
$('#form_modal4 .timepicker-default, #form_modal4 .timepicker-no-seconds, #form_modal4 .timepicker-24').timepicker('place'); //#modal is the id of the modal
});
}
}
var handleDateRangePickers = function () {
if (!jQuery().daterangepicker) {
return;
}
$('#defaultrange').daterangepicker({
opens: (App.isRTL() ? 'left' : 'right'),
format: 'MM/DD/YYYY',
separator: ' to ',
startDate: moment().subtract('days', 29),
endDate: moment(),
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],
'Last 7 Days': [moment().subtract('days', 6), moment()],
'Last 30 Days': [moment().subtract('days', 29), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
},
minDate: '01/01/2012',
maxDate: '12/31/2018',
},
function (start, end) {
$('#defaultrange input').val(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
}
);
$('#defaultrange_modal').daterangepicker({
opens: (App.isRTL() ? 'left' : 'right'),
format: 'MM/DD/YYYY',
separator: ' to ',
startDate: moment().subtract('days', 29),
endDate: moment(),
minDate: '01/01/2012',
maxDate: '12/31/2018',
},
function (start, end) {
$('#defaultrange_modal input').val(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
}
);
// this is very important fix when daterangepicker is used in modal. in modal when daterange picker is opened and mouse clicked anywhere bootstrap modal removes the modal-open class from the body element.
// so the below code will fix this issue.
$('#defaultrange_modal').on('click', function(){
if ($('#daterangepicker_modal').is(":visible") && $('body').hasClass("modal-open") == false) {
$('body').addClass("modal-open");
}
});
$('#reportrange').daterangepicker({
opens: (App.isRTL() ? 'left' : 'right'),
startDate: moment().subtract('days', 29),
endDate: moment(),
//minDate: '01/01/2012',
//maxDate: '12/31/2014',
dateLimit: {
days: 60
},
showDropdowns: true,
showWeekNumbers: true,
timePicker: false,
timePickerIncrement: 1,
timePicker12Hour: true,
ranges: {
'Today': [moment(), moment()],
'Yesterday': [moment().subtract('days', 1), moment().subtract('days', 1)],
'Last 7 Days': [moment().subtract('days', 6), moment()],
'Last 30 Days': [moment().subtract('days', 29), moment()],
'This Month': [moment().startOf('month'), moment().endOf('month')],
'Last Month': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
},
buttonClasses: ['btn'],
applyClass: 'green',
cancelClass: 'default',
format: 'MM/DD/YYYY',
separator: ' to ',
locale: {
applyLabel: 'Apply',
fromLabel: 'From',
toLabel: 'To',
customRangeLabel: 'Custom Range',
daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
firstDay: 1
}
},
function (start, end) {
$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
}
);
//Set the initial state of the picker label
$('#reportrange span').html(moment().subtract('days', 29).format('MMMM D, YYYY') + ' - ' + moment().format('MMMM D, YYYY'));
}
var handleDatetimePicker = function () {
if (!jQuery().datetimepicker) {
return;
}
$(".form_datetime").datetimepicker({
autoclose: true,
isRTL: App.isRTL(),
format: "dd MM yyyy - hh:ii",
pickerPosition: (App.isRTL() ? "bottom-right" : "bottom-left")
});
$(".form_advance_datetime").datetimepicker({
isRTL: App.isRTL(),
format: "dd MM yyyy - hh:ii",
autoclose: true,
todayBtn: true,
startDate: "2013-02-14 10:00",
pickerPosition: (App.isRTL() ? "bottom-right" : "bottom-left"),
minuteStep: 10
});
$(".form_meridian_datetime").datetimepicker({
isRTL: App.isRTL(),
format: "dd MM yyyy - HH:ii P",
showMeridian: true,
autoclose: true,
pickerPosition: (App.isRTL() ? "bottom-right" : "bottom-left"),
todayBtn: true
});
$('body').removeClass("modal-open"); // fix bug when inline picker is used in modal
// Workaround to fix datetimepicker position on window scroll
$( document ).scroll(function(){
$('#form_modal1 .form_datetime, #form_modal1 .form_advance_datetime, #form_modal1 .form_meridian_datetime').datetimepicker('place'); //#modal is the id of the modal
});
}
var handleClockfaceTimePickers = function () {
if (!jQuery().clockface) {
return;
}
$('.clockface_1').clockface();
$('#clockface_2').clockface({
format: 'HH:mm',
trigger: 'manual'
});
$('#clockface_2_toggle').click(function (e) {
e.stopPropagation();
$('#clockface_2').clockface('toggle');
});
$('#clockface_2_modal').clockface({
format: 'HH:mm',
trigger: 'manual'
});
$('#clockface_2_modal_toggle').click(function (e) {
e.stopPropagation();
$('#clockface_2_modal').clockface('toggle');
});
$('.clockface_3').clockface({
format: 'H:mm'
}).clockface('show', '14:30');
// Workaround to fix clockface position on window scroll
$( document ).scroll(function(){
$('#form_modal5 .clockface_1, #form_modal5 #clockface_2_modal').clockface('place'); //#modal is the id of the modal
});
}
return {
//main function to initiate the module
init: function () {
handleDatePickers();
handleTimePickers();
handleDatetimePicker();
handleDateRangePickers();
handleClockfaceTimePickers();
}
};
}();
if (App.isAngularJsApp() === false) {
jQuery(document).ready(function() {
ComponentsDateTimePickers.init();
});
}

1
assets/pages/scripts/components-date-time-pickers.min.js

@ -1 +0,0 @@
var ComponentsDateTimePickers=function(){var t=function(){jQuery().datepicker&&$(".date-picker").datepicker({rtl:App.isRTL(),orientation:"left",autoclose:!0}),$(document).scroll(function(){$("#form_modal2 .date-picker").datepicker("place")})},e=function(){jQuery().timepicker&&($(".timepicker-default").timepicker({autoclose:!0,showSeconds:!0,minuteStep:1}),$(".timepicker-no-seconds").timepicker({autoclose:!0,minuteStep:5}),$(".timepicker-24").timepicker({autoclose:!0,minuteStep:5,showSeconds:!1,showMeridian:!1}),$(".timepicker").parent(".input-group").on("click",".input-group-btn",function(t){t.preventDefault(),$(this).parent(".input-group").find(".timepicker").timepicker("showWidget")}),$(document).scroll(function(){$("#form_modal4 .timepicker-default, #form_modal4 .timepicker-no-seconds, #form_modal4 .timepicker-24").timepicker("place")}))},o=function(){jQuery().daterangepicker&&($("#defaultrange").daterangepicker({opens:App.isRTL()?"left":"right",format:"MM/DD/YYYY",separator:" to ",startDate:moment().subtract("days",29),endDate:moment(),ranges:{Today:[moment(),moment()],Yesterday:[moment().subtract("days",1),moment().subtract("days",1)],"Last 7 Days":[moment().subtract("days",6),moment()],"Last 30 Days":[moment().subtract("days",29),moment()],"This Month":[moment().startOf("month"),moment().endOf("month")],"Last Month":[moment().subtract("month",1).startOf("month"),moment().subtract("month",1).endOf("month")]},minDate:"01/01/2012",maxDate:"12/31/2018"},function(t,e){$("#defaultrange input").val(t.format("MMMM D, YYYY")+" - "+e.format("MMMM D, YYYY"))}),$("#defaultrange_modal").daterangepicker({opens:App.isRTL()?"left":"right",format:"MM/DD/YYYY",separator:" to ",startDate:moment().subtract("days",29),endDate:moment(),minDate:"01/01/2012",maxDate:"12/31/2018"},function(t,e){$("#defaultrange_modal input").val(t.format("MMMM D, YYYY")+" - "+e.format("MMMM D, YYYY"))}),$("#defaultrange_modal").on("click",function(){$("#daterangepicker_modal").is(":visible")&&0==$("body").hasClass("modal-open")&&$("body").addClass("modal-open")}),$("#reportrange").daterangepicker({opens:App.isRTL()?"left":"right",startDate:moment().subtract("days",29),endDate:moment(),dateLimit:{days:60},showDropdowns:!0,showWeekNumbers:!0,timePicker:!1,timePickerIncrement:1,timePicker12Hour:!0,ranges:{Today:[moment(),moment()],Yesterday:[moment().subtract("days",1),moment().subtract("days",1)],"Last 7 Days":[moment().subtract("days",6),moment()],"Last 30 Days":[moment().subtract("days",29),moment()],"This Month":[moment().startOf("month"),moment().endOf("month")],"Last Month":[moment().subtract("month",1).startOf("month"),moment().subtract("month",1).endOf("month")]},buttonClasses:["btn"],applyClass:"green",cancelClass:"default",format:"MM/DD/YYYY",separator:" to ",locale:{applyLabel:"Apply",fromLabel:"From",toLabel:"To",customRangeLabel:"Custom Range",daysOfWeek:["Su","Mo","Tu","We","Th","Fr","Sa"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],firstDay:1}},function(t,e){$("#reportrange span").html(t.format("MMMM D, YYYY")+" - "+e.format("MMMM D, YYYY"))}),$("#reportrange span").html(moment().subtract("days",29).format("MMMM D, YYYY")+" - "+moment().format("MMMM D, YYYY")))},a=function(){jQuery().datetimepicker&&($(".form_datetime").datetimepicker({autoclose:!0,isRTL:App.isRTL(),format:"dd MM yyyy - hh:ii",pickerPosition:App.isRTL()?"bottom-right":"bottom-left"}),$(".form_advance_datetime").datetimepicker({isRTL:App.isRTL(),format:"dd MM yyyy - hh:ii",autoclose:!0,todayBtn:!0,startDate:"2013-02-14 10:00",pickerPosition:App.isRTL()?"bottom-right":"bottom-left",minuteStep:10}),$(".form_meridian_datetime").datetimepicker({isRTL:App.isRTL(),format:"dd MM yyyy - HH:ii P",showMeridian:!0,autoclose:!0,pickerPosition:App.isRTL()?"bottom-right":"bottom-left",todayBtn:!0}),$("body").removeClass("modal-open"),$(document).scroll(function(){$("#form_modal1 .form_datetime, #form_modal1 .form_advance_datetime, #form_modal1 .form_meridian_datetime").datetimepicker("place")}))},m=function(){jQuery().clockface&&($(".clockface_1").clockface(),$("#clockface_2").clockface({format:"HH:mm",trigger:"manual"}),$("#clockface_2_toggle").click(function(t){t.stopPropagation(),$("#clockface_2").clockface("toggle")}),$("#clockface_2_modal").clockface({format:"HH:mm",trigger:"manual"}),$("#clockface_2_modal_toggle").click(function(t){t.stopPropagation(),$("#clockface_2_modal").clockface("toggle")}),$(".clockface_3").clockface({format:"H:mm"}).clockface("show","14:30"),$(document).scroll(function(){$("#form_modal5 .clockface_1, #form_modal5 #clockface_2_modal").clockface("place")}))};return{init:function(){t(),e(),a(),o(),m()}}}();App.isAngularJsApp()===!1&&jQuery(document).ready(function(){ComponentsDateTimePickers.init()});

263
assets/pages/scripts/components-dropdowns.js

@ -1,263 +0,0 @@
var ComponentsDropdowns = function () {
var handleSelect2 = function () {
$('#select2_sample1').select2({
placeholder: "Select an option",
allowClear: true
});
$('#select2_sample2').select2({
placeholder: "Select a State",
allowClear: true
});
$("#select2_sample3").select2({
placeholder: "Select...",
allowClear: true,
minimumInputLength: 1,
query: function (query) {
var data = {
results: []
}, i, j, s;
for (i = 1; i < 5; i++) {
s = "";
for (j = 0; j < i; j++) {
s = s + query.term;
}
data.results.push({
id: query.term + i,
text: s
});
}
query.callback(data);
}
});
function format(state) {
if (!state.id) return state.text; // optgroup
return "<img class='flag' src='" + App.getGlobalImgPath() + "flags/" + state.id.toLowerCase() + ".png'/>&nbsp;&nbsp;" + state.text;
}
$("#select2_sample4").select2({
placeholder: "Select a Country",
allowClear: true,
formatResult: format,
formatSelection: format,
escapeMarkup: function (m) {
return m;
}
});
$("#select2_sample5").select2({
tags: ["red", "green", "blue", "yellow", "pink"]
});
function movieFormatResult(movie) {
var markup = "<table class='movie-result'><tr>";
if (movie.posters !== undefined && movie.posters.thumbnail !== undefined) {
markup += "<td valign='top'><img src='" + movie.posters.thumbnail + "'/></td>";
}
markup += "<td valign='top'><h5>" + movie.title + "</h5>";
if (movie.critics_consensus !== undefined) {
markup += "<div class='movie-synopsis'>" + movie.critics_consensus + "</div>";
} else if (movie.synopsis !== undefined) {
markup += "<div class='movie-synopsis'>" + movie.synopsis + "</div>";
}
markup += "</td></tr></table>"
return markup;
}
function movieFormatSelection(movie) {
return movie.title;
}
$("#select2_sample6").select2({
placeholder: "Search for a movie",
minimumInputLength: 1,
ajax: { // instead of writing the function to execute the request we use Select2's convenient helper
url: "http://api.rottentomatoes.com/api/public/v1.0/movies.json",
dataType: 'jsonp',
data: function (term, page) {
return {
q: term, // search term
page_limit: 10,
apikey: "ju6z9mjyajq2djue3gbvv26t" // please do not use so this example keeps working
};
},
results: function (data, page) { // parse the results into the format expected by Select2.
// since we are using custom formatting functions we do not need to alter remote JSON data
return {
results: data.movies
};
}
},
initSelection: function (element, callback) {
// the input tag has a value attribute preloaded that points to a preselected movie's id
// this function resolves that id attribute to an object that select2 can render
// using its formatResult renderer - that way the movie name is shown preselected
var id = $(element).val();
if (id !== "") {
$.ajax("http://api.rottentomatoes.com/api/public/v1.0/movies/" + id + ".json", {
data: {
apikey: "ju6z9mjyajq2djue3gbvv26t"
},
dataType: "jsonp"
}).done(function (data) {
callback(data);
});
}
},
formatResult: movieFormatResult, // omitted for brevity, see the source of this page
formatSelection: movieFormatSelection, // omitted for brevity, see the source of this page
dropdownCssClass: "bigdrop", // apply css that makes the dropdown taller
escapeMarkup: function (m) {
return m;
} // we do not want to escape markup since we are displaying html in results
});
}
var handleSelect2Modal = function () {
$('#select2_sample_modal_1').select2({
placeholder: "Select an option",
allowClear: true
});
$('#select2_sample_modal_2').select2({
placeholder: "Select a State",
allowClear: true
});
$("#select2_sample_modal_3").select2({
allowClear: true,
minimumInputLength: 1,
query: function (query) {
var data = {
results: []
}, i, j, s;
for (i = 1; i < 5; i++) {
s = "";
for (j = 0; j < i; j++) {
s = s + query.term;
}
data.results.push({
id: query.term + i,
text: s
});
}
query.callback(data);
}
});
function format(state) {
if (!state.id) return state.text; // optgroup
return "<img class='flag' src='" + App.getGlobalImgPath() + "flags/" + state.id.toLowerCase() + ".png'/>&nbsp;&nbsp;" + state.text;
}
$("#select2_sample_modal_4").select2({
allowClear: true,
formatResult: format,
formatSelection: format,
escapeMarkup: function (m) {
return m;
}
});
$("#select2_sample_modal_5").select2({
tags: ["red", "green", "blue", "yellow", "pink"]
});
function movieFormatResult(movie) {
var markup = "<table class='movie-result'><tr>";
if (movie.posters !== undefined && movie.posters.thumbnail !== undefined) {
markup += "<td valign='top'><img src='" + movie.posters.thumbnail + "'/></td>";
}
markup += "<td valign='top'><h5>" + movie.title + "</h5>";
if (movie.critics_consensus !== undefined) {
markup += "<div class='movie-synopsis'>" + movie.critics_consensus + "</div>";
} else if (movie.synopsis !== undefined) {
markup += "<div class='movie-synopsis'>" + movie.synopsis + "</div>";
}
markup += "</td></tr></table>"
return markup;
}
function movieFormatSelection(movie) {
return movie.title;
}
$("#select2_sample_modal_6").select2({
placeholder: "Search for a movie",
minimumInputLength: 1,
ajax: { // instead of writing the function to execute the request we use Select2's convenient helper
url: "http://api.rottentomatoes.com/api/public/v1.0/movies.json",
dataType: 'jsonp',
data: function (term, page) {
return {
q: term, // search term
page_limit: 10,
apikey: "ju6z9mjyajq2djue3gbvv26t" // please do not use so this example keeps working
};
},
results: function (data, page) { // parse the results into the format expected by Select2.
// since we are using custom formatting functions we do not need to alter remote JSON data
return {
results: data.movies
};
}
},
initSelection: function (element, callback) {
// the input tag has a value attribute preloaded that points to a preselected movie's id
// this function resolves that id attribute to an object that select2 can render
// using its formatResult renderer - that way the movie name is shown preselected
var id = $(element).val();
if (id !== "") {
$.ajax("http://api.rottentomatoes.com/api/public/v1.0/movies/" + id + ".json", {
data: {
apikey: "ju6z9mjyajq2djue3gbvv26t"
},
dataType: "jsonp"
}).done(function (data) {
callback(data);
});
}
},
formatResult: movieFormatResult, // omitted for brevity, see the source of this page
formatSelection: movieFormatSelection, // omitted for brevity, see the source of this page
dropdownCssClass: "bigdrop", // apply css that makes the dropdown taller
escapeMarkup: function (m) {
return m;
} // we do not want to escape markup since we are displaying html in results
});
}
var handleBootstrapSelect = function() {
$('.bs-select').selectpicker({
iconBase: 'fa',
tickIcon: 'fa-check'
});
}
var handleMultiSelect = function () {
$('#my_multi_select1').multiSelect();
$('#my_multi_select2').multiSelect({
selectableOptgroup: true
});
}
return {
//main function to initiate the module
init: function () {
handleSelect2();
handleSelect2Modal();
handleMultiSelect();
handleBootstrapSelect();
}
};
}();
jQuery(document).ready(function() {
ComponentsDropdowns.init();
});

1
assets/pages/scripts/components-dropdowns.min.js

@ -1 +0,0 @@
var ComponentsDropdowns=function(){var e=function(){function e(e){return e.id?"<img class='flag' src='"+App.getGlobalImgPath()+"flags/"+e.id.toLowerCase()+".png'/>&nbsp;&nbsp;"+e.text:e.text}function t(e){var t="<table class='movie-result'><tr>";return void 0!==e.posters&&void 0!==e.posters.thumbnail&&(t+="<td valign='top'><img src='"+e.posters.thumbnail+"'/></td>"),t+="<td valign='top'><h5>"+e.title+"</h5>",void 0!==e.critics_consensus?t+="<div class='movie-synopsis'>"+e.critics_consensus+"</div>":void 0!==e.synopsis&&(t+="<div class='movie-synopsis'>"+e.synopsis+"</div>"),t+="</td></tr></table>"}function s(e){return e.title}$("#select2_sample1").select2({placeholder:"Select an option",allowClear:!0}),$("#select2_sample2").select2({placeholder:"Select a State",allowClear:!0}),$("#select2_sample3").select2({placeholder:"Select...",allowClear:!0,minimumInputLength:1,query:function(e){var t,s,l,o={results:[]};for(t=1;5>t;t++){for(l="",s=0;t>s;s++)l+=e.term;o.results.push({id:e.term+t,text:l})}e.callback(o)}}),$("#select2_sample4").select2({placeholder:"Select a Country",allowClear:!0,formatResult:e,formatSelection:e,escapeMarkup:function(e){return e}}),$("#select2_sample5").select2({tags:["red","green","blue","yellow","pink"]}),$("#select2_sample6").select2({placeholder:"Search for a movie",minimumInputLength:1,ajax:{url:"http://api.rottentomatoes.com/api/public/v1.0/movies.json",dataType:"jsonp",data:function(e,t){return{q:e,page_limit:10,apikey:"ju6z9mjyajq2djue3gbvv26t"}},results:function(e,t){return{results:e.movies}}},initSelection:function(e,t){var s=$(e).val();""!==s&&$.ajax("http://api.rottentomatoes.com/api/public/v1.0/movies/"+s+".json",{data:{apikey:"ju6z9mjyajq2djue3gbvv26t"},dataType:"jsonp"}).done(function(e){t(e)})},formatResult:t,formatSelection:s,dropdownCssClass:"bigdrop",escapeMarkup:function(e){return e}})},t=function(){function e(e){return e.id?"<img class='flag' src='"+App.getGlobalImgPath()+"flags/"+e.id.toLowerCase()+".png'/>&nbsp;&nbsp;"+e.text:e.text}function t(e){var t="<table class='movie-result'><tr>";return void 0!==e.posters&&void 0!==e.posters.thumbnail&&(t+="<td valign='top'><img src='"+e.posters.thumbnail+"'/></td>"),t+="<td valign='top'><h5>"+e.title+"</h5>",void 0!==e.critics_consensus?t+="<div class='movie-synopsis'>"+e.critics_consensus+"</div>":void 0!==e.synopsis&&(t+="<div class='movie-synopsis'>"+e.synopsis+"</div>"),t+="</td></tr></table>"}function s(e){return e.title}$("#select2_sample_modal_1").select2({placeholder:"Select an option",allowClear:!0}),$("#select2_sample_modal_2").select2({placeholder:"Select a State",allowClear:!0}),$("#select2_sample_modal_3").select2({allowClear:!0,minimumInputLength:1,query:function(e){var t,s,l,o={results:[]};for(t=1;5>t;t++){for(l="",s=0;t>s;s++)l+=e.term;o.results.push({id:e.term+t,text:l})}e.callback(o)}}),$("#select2_sample_modal_4").select2({allowClear:!0,formatResult:e,formatSelection:e,escapeMarkup:function(e){return e}}),$("#select2_sample_modal_5").select2({tags:["red","green","blue","yellow","pink"]}),$("#select2_sample_modal_6").select2({placeholder:"Search for a movie",minimumInputLength:1,ajax:{url:"http://api.rottentomatoes.com/api/public/v1.0/movies.json",dataType:"jsonp",data:function(e,t){return{q:e,page_limit:10,apikey:"ju6z9mjyajq2djue3gbvv26t"}},results:function(e,t){return{results:e.movies}}},initSelection:function(e,t){var s=$(e).val();""!==s&&$.ajax("http://api.rottentomatoes.com/api/public/v1.0/movies/"+s+".json",{data:{apikey:"ju6z9mjyajq2djue3gbvv26t"},dataType:"jsonp"}).done(function(e){t(e)})},formatResult:t,formatSelection:s,dropdownCssClass:"bigdrop",escapeMarkup:function(e){return e}})},s=function(){$(".bs-select").selectpicker({iconBase:"fa",tickIcon:"fa-check"})},l=function(){$("#my_multi_select1").multiSelect(),$("#my_multi_select2").multiSelect({selectableOptgroup:!0})};return{init:function(){e(),t(),l(),s()}}}();jQuery(document).ready(function(){ComponentsDropdowns.init()});

34
assets/pages/scripts/components-editors.js

@ -1,34 +0,0 @@
var ComponentsEditors = function () {
var handleWysihtml5 = function () {
if (!jQuery().wysihtml5) {
return;
}
if ($('.wysihtml5').size() > 0) {
$('.wysihtml5').wysihtml5({
"stylesheets": ["../assets/global/plugins/bootstrap-wysihtml5/wysiwyg-color.css"]
});
}
}
var handleSummernote = function () {
$('#summernote_1').summernote({height: 300});
//API:
//var sHTML = $('#summernote_1').code(); // get code
//$('#summernote_1').destroy(); // destroy
}
return {
//main function to initiate the module
init: function () {
handleWysihtml5();
handleSummernote();
}
};
}();
jQuery(document).ready(function() {
ComponentsEditors.init();
});

1
assets/pages/scripts/components-editors.min.js

@ -1 +0,0 @@
var ComponentsEditors=function(){var t=function(){jQuery().wysihtml5&&$(".wysihtml5").size()>0&&$(".wysihtml5").wysihtml5({stylesheets:["../assets/global/plugins/bootstrap-wysihtml5/wysiwyg-color.css"]})},s=function(){$("#summernote_1").summernote({height:300})};return{init:function(){t(),s()}}}();jQuery(document).ready(function(){ComponentsEditors.init()});

586
assets/pages/scripts/components-form-tools-2.js

@ -1,586 +0,0 @@
var ComponentsFormTools = function () {
var handleTwitterTypeahead = function() {
// Example #1
// instantiate the bloodhound suggestion engine
var numbers = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.num); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
local: [
{ num: 'metronic' },
{ num: 'keenthemes' },
{ num: 'metronic theme' },
{ num: 'metronic template' },
{ num: 'keenthemes team' }
]
});
// initialize the bloodhound suggestion engine
numbers.initialize();
// instantiate the typeahead UI
if (App.isRTL()) {
$('#typeahead_example_1').attr("dir", "rtl");
}
$('#typeahead_example_1').typeahead(null, {
displayKey: 'num',
hint: (App.isRTL() ? false : true),
source: numbers.ttAdapter()
});
// Example #2
var countries = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.name); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
limit: 10,
prefetch: {
url: '../demo/typeahead_countries.json',
filter: function(list) {
return $.map(list, function(country) { return { name: country }; });
}
}
});
countries.initialize();
if (App.isRTL()) {
$('#typeahead_example_2').attr("dir", "rtl");
}
$('#typeahead_example_2').typeahead(null, {
name: 'typeahead_example_2',
displayKey: 'name',
hint: (App.isRTL() ? false : true),
source: countries.ttAdapter()
});
// Example #3
var custom = new Bloodhound({
datumTokenizer: function(d) { return d.tokens; },
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: '../demo/typeahead_custom.php?query=%QUERY'
});
custom.initialize();
if (App.isRTL()) {
$('#typeahead_example_3').attr("dir", "rtl");
}
$('#typeahead_example_3').typeahead(null, {
name: 'datypeahead_example_3',
displayKey: 'value',
source: custom.ttAdapter(),
hint: (App.isRTL() ? false : true),
templates: {
suggestion: Handlebars.compile([
'<div class="media">',
'<div class="pull-left">',
'<div class="media-object">',
'<img src="{{img}}" width="50" height="50"/>',
'</div>',
'</div>',
'<div class="media-body">',
'<h4 class="media-heading">{{value}}</h4>',
'<p>{{desc}}</p>',
'</div>',
'</div>',
].join(''))
}
});
// Example #4
var nba = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.team); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
prefetch: '../demo/typeahead_nba.json'
});
var nhl = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.team); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
prefetch: '../demo/typeahead_nhl.json'
});
nba.initialize();
nhl.initialize();
if (App.isRTL()) {
$('#typeahead_example_4').attr("dir", "rtl");
}
$('#typeahead_example_4').typeahead({
hint: (App.isRTL() ? false : true),
highlight: true
},
{
name: 'nba',
displayKey: 'team',
source: nba.ttAdapter(),
templates: {
header: '<h3>NBA Teams</h3>'
}
},
{
name: 'nhl',
displayKey: 'team',
source: nhl.ttAdapter(),
templates: {
header: '<h3>NHL Teams</h3>'
}
});
}
var handleTwitterTypeaheadModal = function() {
// Example #1
// instantiate the bloodhound suggestion engine
var numbers = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.num); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
local: [
{ num: 'metronic' },
{ num: 'keenthemes' },
{ num: 'metronic theme' },
{ num: 'metronic template' },
{ num: 'keenthemes team' }
]
});
// initialize the bloodhound suggestion engine
numbers.initialize();
// instantiate the typeahead UI
if (App.isRTL()) {
$('#typeahead_example_modal_1').attr("dir", "rtl");
}
$('#typeahead_example_modal_1').typeahead(null, {
displayKey: 'num',
hint: (App.isRTL() ? false : true),
source: numbers.ttAdapter()
});
// Example #2
var countries = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.name); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
limit: 10,
prefetch: {
url: '../demo/typeahead_countries.json',
filter: function(list) {
return $.map(list, function(country) { return { name: country }; });
}
}
});
countries.initialize();
if (App.isRTL()) {
$('#typeahead_example_modal_2').attr("dir", "rtl");
}
$('#typeahead_example_modal_2').typeahead(null, {
name: 'typeahead_example_modal_2',
displayKey: 'name',
hint: (App.isRTL() ? false : true),
source: countries.ttAdapter()
});
// Example #3
var custom = new Bloodhound({
datumTokenizer: function(d) { return d.tokens; },
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: '../demo/typeahead_custom.php?query=%QUERY'
});
custom.initialize();
if (App.isRTL()) {
$('#typeahead_example_modal_3').attr("dir", "rtl");
}
$('#typeahead_example_modal_3').typeahead(null, {
name: 'datypeahead_example_modal_3',
displayKey: 'value',
hint: (App.isRTL() ? false : true),
source: custom.ttAdapter(),
templates: {
suggestion: Handlebars.compile([
'<div class="media">',
'<div class="pull-left">',
'<div class="media-object">',
'<img src="{{img}}" width="50" height="50"/>',
'</div>',
'</div>',
'<div class="media-body">',
'<h4 class="media-heading">{{value}}</h4>',
'<p>{{desc}}</p>',
'</div>',
'</div>',
].join(''))
}
});
// Example #4
var nba = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.team); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
limit: 3,
prefetch: '../demo/typeahead_nba.json'
});
var nhl = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.team); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
limit: 3,
prefetch: '../demo/typeahead_nhl.json'
});
nba.initialize();
nhl.initialize();
$('#typeahead_example_modal_4').typeahead({
hint: (App.isRTL() ? false : true),
highlight: true
},
{
name: 'nba',
displayKey: 'team',
source: nba.ttAdapter(),
templates: {
header: '<h3>NBA Teams</h3>'
}
},
{
name: 'nhl',
displayKey: 'team',
source: nhl.ttAdapter(),
templates: {
header: '<h3>NHL Teams</h3>'
}
});
}
var handleBootstrapSwitch = function() {
$('.switch-radio1').on('switch-change', function () {
$('.switch-radio1').bootstrapSwitch('toggleRadioState');
});
// or
$('.switch-radio1').on('switch-change', function () {
$('.switch-radio1').bootstrapSwitch('toggleRadioStateAllowUncheck');
});
// or
$('.switch-radio1').on('switch-change', function () {
$('.switch-radio1').bootstrapSwitch('toggleRadioStateAllowUncheck', false);
});
}
var handleBootstrapTouchSpin = function() {
$("#touchspin_demo1").TouchSpin({
buttondown_class: 'btn green',
buttonup_class: 'btn green',
min: -1000000000,
max: 1000000000,
stepinterval: 50,
maxboostedstep: 10000000,
prefix: '$'
});
$("#touchspin_demo2").TouchSpin({
buttondown_class: 'btn blue',
buttonup_class: 'btn blue',
min: 0,
max: 100,
step: 0.1,
decimals: 2,
boostat: 5,
maxboostedstep: 10,
postfix: '%'
});
$("#touchspin_demo3").TouchSpin({
buttondown_class: 'btn green',
buttonup_class: 'btn green',
prefix: "$",
postfix: "%"
});
}
var handleBootstrapMaxlength = function() {
$('#maxlength_defaultconfig').maxlength({
limitReachedClass: "label label-danger",
})
$('#maxlength_thresholdconfig').maxlength({
limitReachedClass: "label label-danger",
threshold: 20
});
$('#maxlength_alloptions').maxlength({
alwaysShow: true,
warningClass: "label label-success",
limitReachedClass: "label label-danger",
separator: ' out of ',
preText: 'You typed ',
postText: ' chars available.',
validate: true
});
$('#maxlength_textarea').maxlength({
limitReachedClass: "label label-danger",
alwaysShow: true
});
$('#maxlength_placement').maxlength({
limitReachedClass: "label label-danger",
alwaysShow: true,
placement: App.isRTL() ? 'top-right' : 'top-left'
});
}
var handleSpinners = function () {
$('#spinner1').spinner();
$('#spinner2').spinner({disabled: true});
$('#spinner3').spinner({value:0, min: 0, max: 10});
$('#spinner4').spinner({value:0, step: 5, min: 0, max: 200});
}
var handleTagsInput = function () {
if (!jQuery().tagsInput) {
return;
}
$('#tags_1').tagsInput({
width: 'auto',
'onAddTag': function () {
//alert(1);
},
});
$('#tags_2').tagsInput({
width: 300
});
}
var handleInputMasks = function () {
$("#mask_date").inputmask("d/m/y", {
autoUnmask: true
}); //direct mask
$("#mask_date1").inputmask("d/m/y", {
"placeholder": "*"
}); //change the placeholder
$("#mask_date2").inputmask("d/m/y", {
"placeholder": "dd/mm/yyyy"
}); //multi-char placeholder
$("#mask_phone").inputmask("mask", {
"mask": "(999) 999-9999"
}); //specifying fn & options
$("#mask_tin").inputmask({
"mask": "99-9999999",
placeholder: "" // remove underscores from the input mask
}); //specifying options only
$("#mask_number").inputmask({
"mask": "9",
"repeat": 10,
"greedy": false
}); // ~ mask "9" or mask "99" or ... mask "9999999999"
$("#mask_decimal").inputmask('decimal', {
rightAlignNumerics: false
}); //disables the right alignment of the decimal input
$("#mask_currency").inputmask('€ 999.999.999,99', {
numericInput: true
}); //123456 => € ___.__1.234,56
$("#mask_currency2").inputmask('€ 999,999,999.99', {
numericInput: true,
rightAlignNumerics: false,
greedy: false
}); //123456 => € ___.__1.234,56
$("#mask_ssn").inputmask("999-99-9999", {
placeholder: " ",
clearMaskOnLostFocus: true
}); //default
}
var handleIPAddressInput = function () {
$('#input_ipv4').ipAddress();
$('#input_ipv6').ipAddress({
v: 6
});
}
var handlePasswordStrengthChecker = function () {
var initialized = false;
var input = $("#password_strength");
input.keydown(function () {
if (initialized === false) {
// set base options
input.pwstrength({
raisePower: 1.4,
minChar: 8,
verdicts: ["Weak", "Normal", "Medium", "Strong", "Very Strong"],
scores: [17, 26, 40, 50, 60]
});
// add your own rule to calculate the password strength
input.pwstrength("addRule", "demoRule", function (options, word, score) {
return word.match(/[a-z].[0-9]/) && score;
}, 10, true);
// set as initialized
initialized = true;
}
});
}
var handleUsernameAvailabilityChecker1 = function () {
var input = $("#username1_input");
$("#username1_checker").click(function (e) {
var pop = $(this);
if (input.val() === "") {
input.closest('.form-group').removeClass('has-success').addClass('has-error');
pop.popover('destroy');
pop.popover({
'placement': (App.isRTL() ? 'left' : 'right'),
'html': true,
'container': 'body',
'content': 'Please enter a username to check its availability.',
});
// add error class to the popover
pop.data('bs.popover').tip().addClass('error');
// set last poped popover to be closed on click(see App.js => handlePopovers function)
App.setLastPopedPopover(pop);
pop.popover('show');
e.stopPropagation(); // prevent closing the popover
return;
}
var btn = $(this);
btn.attr('disabled', true);
input.attr("readonly", true).
attr("disabled", true).
addClass("spinner");
$.post('../demo/username_checker.php', {
username: input.val()
}, function (res) {
btn.attr('disabled', false);
input.attr("readonly", false).
attr("disabled", false).
removeClass("spinner");
if (res.status == 'OK') {
input.closest('.form-group').removeClass('has-error').addClass('has-success');
pop.popover('destroy');
pop.popover({
'html': true,
'placement': (App.isRTL() ? 'left' : 'right'),
'container': 'body',
'content': res.message,
});
pop.popover('show');
pop.data('bs.popover').tip().removeClass('error').addClass('success');
} else {
input.closest('.form-group').removeClass('has-success').addClass('has-error');
pop.popover('destroy');
pop.popover({
'html': true,
'placement': (App.isRTL() ? 'left' : 'right'),
'container': 'body',
'content': res.message,
});
pop.popover('show');
pop.data('bs.popover').tip().removeClass('success').addClass('error');
App.setLastPopedPopover(pop);
}
}, 'json');
});
}
var handleUsernameAvailabilityChecker2 = function () {
$("#username2_input").change(function () {
var input = $(this);
if (input.val() === "") {
input.closest('.form-group').removeClass('has-error').removeClass('has-success');
$('.fa-check, fa-warning', input.closest('.form-group')).remove();
return;
}
input.attr("readonly", true).
attr("disabled", true).
addClass("spinner");
$.post('../demo/username_checker.php', {
username: input.val()
}, function (res) {
input.attr("readonly", false).
attr("disabled", false).
removeClass("spinner");
// change popover font color based on the result
if (res.status == 'OK') {
input.closest('.form-group').removeClass('has-error').addClass('has-success');
$('.fa-warning', input.closest('.form-group')).remove();
input.before('<i class="fa fa-check"></i>');
input.data('bs.popover').tip().removeClass('error').addClass('success');
} else {
input.closest('.form-group').removeClass('has-success').addClass('has-error');
$('.fa-check', input.closest('.form-group')).remove();
input.before('<i class="fa fa-warning"></i>');
input.popover('destroy');
input.popover({
'html': true,
'placement': (App.isRTL() ? 'left' : 'right'),
'container': 'body',
'content': res.message,
});
input.popover('show');
input.data('bs.popover').tip().removeClass('success').addClass('error');
App.setLastPopedPopover(input);
}
}, 'json');
});
}
return {
//main function to initiate the module
init: function () {
handleTwitterTypeahead();
handleTwitterTypeaheadModal();
handleBootstrapSwitch();
handleBootstrapTouchSpin();
handleBootstrapMaxlength();
handleSpinners();
handleTagsInput();
handleInputMasks();
handleIPAddressInput();
handlePasswordStrengthChecker();
handleUsernameAvailabilityChecker1();
handleUsernameAvailabilityChecker2();
}
};
}();

1
assets/pages/scripts/components-form-tools-2.min.js

File diff suppressed because one or more lines are too long

202
assets/pages/scripts/components-form-tools.js

@ -1,202 +0,0 @@
var ComponentsFormTools = function () {
var handleBootstrapMaxlength = function() {
$('#maxlength_defaultconfig').maxlength({
limitReachedClass: "label label-danger",
})
$('#maxlength_thresholdconfig').maxlength({
limitReachedClass: "label label-danger",
threshold: 20
});
$('#maxlength_alloptions').maxlength({
alwaysShow: true,
warningClass: "label label-success",
limitReachedClass: "label label-danger",
separator: ' out of ',
preText: 'You typed ',
postText: ' chars available.',
validate: true
});
$('#maxlength_textarea').maxlength({
limitReachedClass: "label label-danger",
alwaysShow: true
});
$('#maxlength_placement').maxlength({
limitReachedClass: "label label-danger",
alwaysShow: true,
placement: App.isRTL() ? 'top-right' : 'top-left'
});
}
var handlePasswordStrengthChecker = function () {
var initialized = false;
var input = $("#password_strength");
input.keydown(function () {
if (initialized === false) {
// set base options
input.pwstrength({
raisePower: 1.4,
minChar: 8,
verdicts: ["Weak", "Normal", "Medium", "Strong", "Very Strong"],
scores: [17, 26, 40, 50, 60]
});
// add your own rule to calculate the password strength
input.pwstrength("addRule", "demoRule", function (options, word, score) {
return word.match(/[a-z].[0-9]/) && score;
}, 10, true);
// set as initialized
initialized = true;
}
});
}
var handleUsernameAvailabilityChecker1 = function () {
var input = $("#username1_input");
$("#username1_checker").click(function (e) {
var pop = $(this);
if (input.val() === "") {
input.closest('.form-group').removeClass('has-success').addClass('has-error');
pop.popover('destroy');
pop.popover({
'placement': (App.isRTL() ? 'left' : 'right'),
'html': true,
'container': 'body',
'content': 'Please enter a username to check its availability.',
});
// add error class to the popover
pop.data('bs.popover').tip().addClass('error');
// set last poped popover to be closed on click(see App.js => handlePopovers function)
App.setLastPopedPopover(pop);
pop.popover('show');
e.stopPropagation(); // prevent closing the popover
return;
}
var btn = $(this);
btn.attr('disabled', true);
input.attr("readonly", true).
attr("disabled", true).
addClass("spinner");
$.post('../demo/username_checker.php', {
username: input.val()
}, function (res) {
btn.attr('disabled', false);
input.attr("readonly", false).
attr("disabled", false).
removeClass("spinner");
if (res.status == 'OK') {
input.closest('.form-group').removeClass('has-error').addClass('has-success');
pop.popover('destroy');
pop.popover({
'html': true,
'placement': (App.isRTL() ? 'left' : 'right'),
'container': 'body',
'content': res.message,
});
pop.popover('show');
pop.data('bs.popover').tip().removeClass('error').addClass('success');
} else {
input.closest('.form-group').removeClass('has-success').addClass('has-error');
pop.popover('destroy');
pop.popover({
'html': true,
'placement': (App.isRTL() ? 'left' : 'right'),
'container': 'body',
'content': res.message,
});
pop.popover('show');
pop.data('bs.popover').tip().removeClass('success').addClass('error');
App.setLastPopedPopover(pop);
}
}, 'json');
});
}
var handleUsernameAvailabilityChecker2 = function () {
$("#username2_input").change(function () {
var input = $(this);
if (input.val() === "") {
input.closest('.form-group').removeClass('has-error').removeClass('has-success');
$('.fa-check, fa-warning', input.closest('.form-group')).remove();
return;
}
input.attr("readonly", true).
attr("disabled", true).
addClass("spinner");
$.post('../demo/username_checker.php', {
username: input.val()
}, function (res) {
input.attr("readonly", false).
attr("disabled", false).
removeClass("spinner");
// change popover font color based on the result
if (res.status == 'OK') {
input.closest('.form-group').removeClass('has-error').addClass('has-success');
$('.fa-warning', input.closest('.form-group')).remove();
input.before('<i class="fa fa-check"></i>');
input.data('bs.popover').tip().removeClass('error').addClass('success');
} else {
input.closest('.form-group').removeClass('has-success').addClass('has-error');
$('.fa-check', input.closest('.form-group')).remove();
input.before('<i class="fa fa-warning"></i>');
input.popover('destroy');
input.popover({
'html': true,
'placement': (App.isRTL() ? 'left' : 'right'),
'container': 'body',
'content': res.message,
});
input.popover('show');
input.data('bs.popover').tip().removeClass('success').addClass('error');
App.setLastPopedPopover(input);
}
}, 'json');
});
}
return {
//main function to initiate the module
init: function () {
handleBootstrapMaxlength();
handlePasswordStrengthChecker();
handleUsernameAvailabilityChecker1();
handleUsernameAvailabilityChecker2();
}
};
}();
if (App.isAngularJsApp() === false) {
jQuery(document).ready(function() {
ComponentsFormTools.init(); // init metronic core componets
});
}

1
assets/pages/scripts/components-form-tools.min.js

@ -1 +0,0 @@
var ComponentsFormTools=function(){var e=function(){$("#maxlength_defaultconfig").maxlength({limitReachedClass:"label label-danger"}),$("#maxlength_thresholdconfig").maxlength({limitReachedClass:"label label-danger",threshold:20}),$("#maxlength_alloptions").maxlength({alwaysShow:!0,warningClass:"label label-success",limitReachedClass:"label label-danger",separator:" out of ",preText:"You typed ",postText:" chars available.",validate:!0}),$("#maxlength_textarea").maxlength({limitReachedClass:"label label-danger",alwaysShow:!0}),$("#maxlength_placement").maxlength({limitReachedClass:"label label-danger",alwaysShow:!0,placement:App.isRTL()?"top-right":"top-left"})},s=function(){var e=!1,s=$("#password_strength");s.keydown(function(){e===!1&&(s.pwstrength({raisePower:1.4,minChar:8,verdicts:["Weak","Normal","Medium","Strong","Very Strong"],scores:[17,26,40,50,60]}),s.pwstrength("addRule","demoRule",function(e,s,a){return s.match(/[a-z].[0-9]/)&&a},10,!0),e=!0)})},a=function(){var e=$("#username1_input");$("#username1_checker").click(function(s){var a=$(this);if(""===e.val())return e.closest(".form-group").removeClass("has-success").addClass("has-error"),a.popover("destroy"),a.popover({placement:App.isRTL()?"left":"right",html:!0,container:"body",content:"Please enter a username to check its availability."}),a.data("bs.popover").tip().addClass("error"),App.setLastPopedPopover(a),a.popover("show"),void s.stopPropagation();var o=$(this);o.attr("disabled",!0),e.attr("readonly",!0).attr("disabled",!0).addClass("spinner"),$.post("../demo/username_checker.php",{username:e.val()},function(s){o.attr("disabled",!1),e.attr("readonly",!1).attr("disabled",!1).removeClass("spinner"),"OK"==s.status?(e.closest(".form-group").removeClass("has-error").addClass("has-success"),a.popover("destroy"),a.popover({html:!0,placement:App.isRTL()?"left":"right",container:"body",content:s.message}),a.popover("show"),a.data("bs.popover").tip().removeClass("error").addClass("success")):(e.closest(".form-group").removeClass("has-success").addClass("has-error"),a.popover("destroy"),a.popover({html:!0,placement:App.isRTL()?"left":"right",container:"body",content:s.message}),a.popover("show"),a.data("bs.popover").tip().removeClass("success").addClass("error"),App.setLastPopedPopover(a))},"json")})},o=function(){$("#username2_input").change(function(){var e=$(this);return""===e.val()?(e.closest(".form-group").removeClass("has-error").removeClass("has-success"),void $(".fa-check, fa-warning",e.closest(".form-group")).remove()):(e.attr("readonly",!0).attr("disabled",!0).addClass("spinner"),void $.post("../demo/username_checker.php",{username:e.val()},function(s){e.attr("readonly",!1).attr("disabled",!1).removeClass("spinner"),"OK"==s.status?(e.closest(".form-group").removeClass("has-error").addClass("has-success"),$(".fa-warning",e.closest(".form-group")).remove(),e.before('<i class="fa fa-check"></i>'),e.data("bs.popover").tip().removeClass("error").addClass("success")):(e.closest(".form-group").removeClass("has-success").addClass("has-error"),$(".fa-check",e.closest(".form-group")).remove(),e.before('<i class="fa fa-warning"></i>'),e.popover("destroy"),e.popover({html:!0,placement:App.isRTL()?"left":"right",container:"body",content:s.message}),e.popover("show"),e.data("bs.popover").tip().removeClass("success").addClass("error"),App.setLastPopedPopover(e))},"json"))})};return{init:function(){e(),s(),a(),o()}}}();App.isAngularJsApp()===!1&&jQuery(document).ready(function(){ComponentsFormTools.init()});

150
assets/pages/scripts/components-ion-sliders.js

@ -1,150 +0,0 @@
var ComponentsIonSliders = function() {
var handleBasicDemo = function() {
// demo 1
$("#range_1").ionRangeSlider();
// demo 2
$("#range_2").ionRangeSlider({
min: 100,
max: 1000,
from: 550
});
// demo 3
$("#range_3").ionRangeSlider({
type: "double",
grid: true,
min: 0,
max: 1000,
from: 200,
to: 800,
prefix: "$"
});
// demo 4
$("#range_4").ionRangeSlider({
type: "double",
grid: true,
min: -1000,
max: 1000,
from: -500,
to: 500
});
// demo 5
$("#range_5").ionRangeSlider({
type: "double",
grid: true,
from: 1,
to: 5,
values: [0, 10, 100, 1000, 10000, 100000, 1000000]
});
// demo 6
$("#range_6").ionRangeSlider({
grid: true,
from: 5,
values: [
"zero", "one",
"two", "three",
"four", "five",
"six", "seven",
"eight", "nine",
"ten"
]
});
// demo 7
$("#range_7").ionRangeSlider({
grid: true,
from: 3,
values: [
"January", "February", "March",
"April", "May", "June",
"July", "August", "September",
"October", "November", "December"
]
});
// demo 8
$("#range_8").ionRangeSlider({
type: "double",
min: 100,
max: 200,
from: 145,
to: 155,
prefix: "Weight: ",
postfix: " million pounds",
decorate_both: true
});
// demo 9
$("#range_9").ionRangeSlider({
type: "double",
min: 100,
max: 200,
from: 148,
to: 152,
prefix: "Weight: ",
postfix: " million pounds",
values_separator: " → "
});
}
var handleAdvancedDemo = function() {
$("#range_10").ionRangeSlider({
type: "double",
min: 0,
max: 100,
from: 30,
to: 70,
from_fixed: true
});
$("#range_11").ionRangeSlider({
min: 0,
max: 100,
from: 30,
from_min: 10,
from_max: 50
});
$("#range_12").ionRangeSlider({
type: "double",
min: 0,
max: 100,
from: 20,
from_min: 10,
from_max: 30,
from_shadow: true,
to: 80,
to_min: 70,
to_max: 90,
to_shadow: true,
grid: true,
grid_num: 10
});
$("#range_13").ionRangeSlider({
min: 0,
max: 100,
from: 30,
disable: true
});
}
return {
//main function to initiate the module
init: function() {
handleBasicDemo();
handleAdvancedDemo();
}
};
}();
jQuery(document).ready(function() {
ComponentsIonSliders.init();
});

1
assets/pages/scripts/components-ion-sliders.min.js

@ -1 +0,0 @@
var ComponentsIonSliders=function(){var e=function(){$("#range_1").ionRangeSlider(),$("#range_2").ionRangeSlider({min:100,max:1e3,from:550}),$("#range_3").ionRangeSlider({type:"double",grid:!0,min:0,max:1e3,from:200,to:800,prefix:"$"}),$("#range_4").ionRangeSlider({type:"double",grid:!0,min:-1e3,max:1e3,from:-500,to:500}),$("#range_5").ionRangeSlider({type:"double",grid:!0,from:1,to:5,values:[0,10,100,1e3,1e4,1e5,1e6]}),$("#range_6").ionRangeSlider({grid:!0,from:5,values:["zero","one","two","three","four","five","six","seven","eight","nine","ten"]}),$("#range_7").ionRangeSlider({grid:!0,from:3,values:["January","February","March","April","May","June","July","August","September","October","November","December"]}),$("#range_8").ionRangeSlider({type:"double",min:100,max:200,from:145,to:155,prefix:"Weight: ",postfix:" million pounds",decorate_both:!0}),$("#range_9").ionRangeSlider({type:"double",min:100,max:200,from:148,to:152,prefix:"Weight: ",postfix:" million pounds",values_separator:" → "})},n=function(){$("#range_10").ionRangeSlider({type:"double",min:0,max:100,from:30,to:70,from_fixed:!0}),$("#range_11").ionRangeSlider({min:0,max:100,from:30,from_min:10,from_max:50}),$("#range_12").ionRangeSlider({type:"double",min:0,max:100,from:20,from_min:10,from_max:30,from_shadow:!0,to:80,to_min:70,to_max:90,to_shadow:!0,grid:!0,grid_num:10}),$("#range_13").ionRangeSlider({min:0,max:100,from:30,disable:!0})};return{init:function(){e(),n()}}}();jQuery(document).ready(function(){ComponentsIonSliders.init()});

27
assets/pages/scripts/components-knob-dials.js

@ -1,27 +0,0 @@
var ComponentsKnobDials = function () {
return {
//main function to initiate the module
init: function () {
//knob does not support ie8 so skip it
if (!jQuery().knob || App.isIE8()) {
return;
}
// general knob
$(".knob").knob({
'dynamicDraw': true,
'thickness': 0.2,
'tickColorizeValues': true,
'skin': 'tron'
});
}
};
}();
jQuery(document).ready(function() {
ComponentsKnobDials.init();
});

1
assets/pages/scripts/components-knob-dials.min.js

@ -1 +0,0 @@
var ComponentsKnobDials=function(){return{init:function(){jQuery().knob&&!App.isIE8()&&$(".knob").knob({dynamicDraw:!0,thickness:.2,tickColorizeValues:!0,skin:"tron"})}}}();jQuery(document).ready(function(){ComponentsKnobDials.init()});

263
assets/pages/scripts/components-multi-select.js

@ -1,263 +0,0 @@
var ComponentsDropdowns = function () {
var handleSelect2 = function () {
$('#select2_sample1').select2({
placeholder: "Select an option",
allowClear: true
});
$('#select2_sample2').select2({
placeholder: "Select a State",
allowClear: true
});
$("#select2_sample3").select2({
placeholder: "Select...",
allowClear: true,
minimumInputLength: 1,
query: function (query) {
var data = {
results: []
}, i, j, s;
for (i = 1; i < 5; i++) {
s = "";
for (j = 0; j < i; j++) {
s = s + query.term;
}
data.results.push({
id: query.term + i,
text: s
});
}
query.callback(data);
}
});
function format(state) {
if (!state.id) return state.text; // optgroup
return "<img class='flag' src='" + App.getGlobalImgPath() + "flags/" + state.id.toLowerCase() + ".png'/>&nbsp;&nbsp;" + state.text;
}
$("#select2_sample4").select2({
placeholder: "Select a Country",
allowClear: true,
formatResult: format,
formatSelection: format,
escapeMarkup: function (m) {
return m;
}
});
$("#select2_sample5").select2({
tags: ["red", "green", "blue", "yellow", "pink"]
});
function movieFormatResult(movie) {
var markup = "<table class='movie-result'><tr>";
if (movie.posters !== undefined && movie.posters.thumbnail !== undefined) {
markup += "<td valign='top'><img src='" + movie.posters.thumbnail + "'/></td>";
}
markup += "<td valign='top'><h5>" + movie.title + "</h5>";
if (movie.critics_consensus !== undefined) {
markup += "<div class='movie-synopsis'>" + movie.critics_consensus + "</div>";
} else if (movie.synopsis !== undefined) {
markup += "<div class='movie-synopsis'>" + movie.synopsis + "</div>";
}
markup += "</td></tr></table>"
return markup;
}
function movieFormatSelection(movie) {
return movie.title;
}
$("#select2_sample6").select2({
placeholder: "Search for a movie",
minimumInputLength: 1,
ajax: { // instead of writing the function to execute the request we use Select2's convenient helper
url: "http://api.rottentomatoes.com/api/public/v1.0/movies.json",
dataType: 'jsonp',
data: function (term, page) {
return {
q: term, // search term
page_limit: 10,
apikey: "ju6z9mjyajq2djue3gbvv26t" // please do not use so this example keeps working
};
},
results: function (data, page) { // parse the results into the format expected by Select2.
// since we are using custom formatting functions we do not need to alter remote JSON data
return {
results: data.movies
};
}
},
initSelection: function (element, callback) {
// the input tag has a value attribute preloaded that points to a preselected movie's id
// this function resolves that id attribute to an object that select2 can render
// using its formatResult renderer - that way the movie name is shown preselected
var id = $(element).val();
if (id !== "") {
$.ajax("http://api.rottentomatoes.com/api/public/v1.0/movies/" + id + ".json", {
data: {
apikey: "ju6z9mjyajq2djue3gbvv26t"
},
dataType: "jsonp"
}).done(function (data) {
callback(data);
});
}
},
formatResult: movieFormatResult, // omitted for brevity, see the source of this page
formatSelection: movieFormatSelection, // omitted for brevity, see the source of this page
dropdownCssClass: "bigdrop", // apply css that makes the dropdown taller
escapeMarkup: function (m) {
return m;
} // we do not want to escape markup since we are displaying html in results
});
}
var handleSelect2Modal = function () {
$('#select2_sample_modal_1').select2({
placeholder: "Select an option",
allowClear: true
});
$('#select2_sample_modal_2').select2({
placeholder: "Select a State",
allowClear: true
});
$("#select2_sample_modal_3").select2({
allowClear: true,
minimumInputLength: 1,
query: function (query) {
var data = {
results: []
}, i, j, s;
for (i = 1; i < 5; i++) {
s = "";
for (j = 0; j < i; j++) {
s = s + query.term;
}
data.results.push({
id: query.term + i,
text: s
});
}
query.callback(data);
}
});
function format(state) {
if (!state.id) return state.text; // optgroup
return "<img class='flag' src='" + App.getGlobalImgPath() + "flags/" + state.id.toLowerCase() + ".png'/>&nbsp;&nbsp;" + state.text;
}
$("#select2_sample_modal_4").select2({
allowClear: true,
formatResult: format,
formatSelection: format,
escapeMarkup: function (m) {
return m;
}
});
$("#select2_sample_modal_5").select2({
tags: ["red", "green", "blue", "yellow", "pink"]
});
function movieFormatResult(movie) {
var markup = "<table class='movie-result'><tr>";
if (movie.posters !== undefined && movie.posters.thumbnail !== undefined) {
markup += "<td valign='top'><img src='" + movie.posters.thumbnail + "'/></td>";
}
markup += "<td valign='top'><h5>" + movie.title + "</h5>";
if (movie.critics_consensus !== undefined) {
markup += "<div class='movie-synopsis'>" + movie.critics_consensus + "</div>";
} else if (movie.synopsis !== undefined) {
markup += "<div class='movie-synopsis'>" + movie.synopsis + "</div>";
}
markup += "</td></tr></table>"
return markup;
}
function movieFormatSelection(movie) {
return movie.title;
}
$("#select2_sample_modal_6").select2({
placeholder: "Search for a movie",
minimumInputLength: 1,
ajax: { // instead of writing the function to execute the request we use Select2's convenient helper
url: "http://api.rottentomatoes.com/api/public/v1.0/movies.json",
dataType: 'jsonp',
data: function (term, page) {
return {
q: term, // search term
page_limit: 10,
apikey: "ju6z9mjyajq2djue3gbvv26t" // please do not use so this example keeps working
};
},
results: function (data, page) { // parse the results into the format expected by Select2.
// since we are using custom formatting functions we do not need to alter remote JSON data
return {
results: data.movies
};
}
},
initSelection: function (element, callback) {
// the input tag has a value attribute preloaded that points to a preselected movie's id
// this function resolves that id attribute to an object that select2 can render
// using its formatResult renderer - that way the movie name is shown preselected
var id = $(element).val();
if (id !== "") {
$.ajax("http://api.rottentomatoes.com/api/public/v1.0/movies/" + id + ".json", {
data: {
apikey: "ju6z9mjyajq2djue3gbvv26t"
},
dataType: "jsonp"
}).done(function (data) {
callback(data);
});
}
},
formatResult: movieFormatResult, // omitted for brevity, see the source of this page
formatSelection: movieFormatSelection, // omitted for brevity, see the source of this page
dropdownCssClass: "bigdrop", // apply css that makes the dropdown taller
escapeMarkup: function (m) {
return m;
} // we do not want to escape markup since we are displaying html in results
});
}
var handleBootstrapSelect = function() {
$('.bs-select').selectpicker({
iconBase: 'fa',
tickIcon: 'fa-check'
});
}
var handleMultiSelect = function () {
$('#my_multi_select1').multiSelect();
$('#my_multi_select2').multiSelect({
selectableOptgroup: true
});
}
return {
//main function to initiate the module
init: function () {
handleSelect2();
handleSelect2Modal();
handleMultiSelect();
handleBootstrapSelect();
}
};
}();
jQuery(document).ready(function() {
ComponentsDropdowns.init();
});

1
assets/pages/scripts/components-multi-select.min.js

@ -1 +0,0 @@
var ComponentsDropdowns=function(){var e=function(){function e(e){return e.id?"<img class='flag' src='"+App.getGlobalImgPath()+"flags/"+e.id.toLowerCase()+".png'/>&nbsp;&nbsp;"+e.text:e.text}function t(e){var t="<table class='movie-result'><tr>";return void 0!==e.posters&&void 0!==e.posters.thumbnail&&(t+="<td valign='top'><img src='"+e.posters.thumbnail+"'/></td>"),t+="<td valign='top'><h5>"+e.title+"</h5>",void 0!==e.critics_consensus?t+="<div class='movie-synopsis'>"+e.critics_consensus+"</div>":void 0!==e.synopsis&&(t+="<div class='movie-synopsis'>"+e.synopsis+"</div>"),t+="</td></tr></table>"}function s(e){return e.title}$("#select2_sample1").select2({placeholder:"Select an option",allowClear:!0}),$("#select2_sample2").select2({placeholder:"Select a State",allowClear:!0}),$("#select2_sample3").select2({placeholder:"Select...",allowClear:!0,minimumInputLength:1,query:function(e){var t,s,l,o={results:[]};for(t=1;5>t;t++){for(l="",s=0;t>s;s++)l+=e.term;o.results.push({id:e.term+t,text:l})}e.callback(o)}}),$("#select2_sample4").select2({placeholder:"Select a Country",allowClear:!0,formatResult:e,formatSelection:e,escapeMarkup:function(e){return e}}),$("#select2_sample5").select2({tags:["red","green","blue","yellow","pink"]}),$("#select2_sample6").select2({placeholder:"Search for a movie",minimumInputLength:1,ajax:{url:"http://api.rottentomatoes.com/api/public/v1.0/movies.json",dataType:"jsonp",data:function(e,t){return{q:e,page_limit:10,apikey:"ju6z9mjyajq2djue3gbvv26t"}},results:function(e,t){return{results:e.movies}}},initSelection:function(e,t){var s=$(e).val();""!==s&&$.ajax("http://api.rottentomatoes.com/api/public/v1.0/movies/"+s+".json",{data:{apikey:"ju6z9mjyajq2djue3gbvv26t"},dataType:"jsonp"}).done(function(e){t(e)})},formatResult:t,formatSelection:s,dropdownCssClass:"bigdrop",escapeMarkup:function(e){return e}})},t=function(){function e(e){return e.id?"<img class='flag' src='"+App.getGlobalImgPath()+"flags/"+e.id.toLowerCase()+".png'/>&nbsp;&nbsp;"+e.text:e.text}function t(e){var t="<table class='movie-result'><tr>";return void 0!==e.posters&&void 0!==e.posters.thumbnail&&(t+="<td valign='top'><img src='"+e.posters.thumbnail+"'/></td>"),t+="<td valign='top'><h5>"+e.title+"</h5>",void 0!==e.critics_consensus?t+="<div class='movie-synopsis'>"+e.critics_consensus+"</div>":void 0!==e.synopsis&&(t+="<div class='movie-synopsis'>"+e.synopsis+"</div>"),t+="</td></tr></table>"}function s(e){return e.title}$("#select2_sample_modal_1").select2({placeholder:"Select an option",allowClear:!0}),$("#select2_sample_modal_2").select2({placeholder:"Select a State",allowClear:!0}),$("#select2_sample_modal_3").select2({allowClear:!0,minimumInputLength:1,query:function(e){var t,s,l,o={results:[]};for(t=1;5>t;t++){for(l="",s=0;t>s;s++)l+=e.term;o.results.push({id:e.term+t,text:l})}e.callback(o)}}),$("#select2_sample_modal_4").select2({allowClear:!0,formatResult:e,formatSelection:e,escapeMarkup:function(e){return e}}),$("#select2_sample_modal_5").select2({tags:["red","green","blue","yellow","pink"]}),$("#select2_sample_modal_6").select2({placeholder:"Search for a movie",minimumInputLength:1,ajax:{url:"http://api.rottentomatoes.com/api/public/v1.0/movies.json",dataType:"jsonp",data:function(e,t){return{q:e,page_limit:10,apikey:"ju6z9mjyajq2djue3gbvv26t"}},results:function(e,t){return{results:e.movies}}},initSelection:function(e,t){var s=$(e).val();""!==s&&$.ajax("http://api.rottentomatoes.com/api/public/v1.0/movies/"+s+".json",{data:{apikey:"ju6z9mjyajq2djue3gbvv26t"},dataType:"jsonp"}).done(function(e){t(e)})},formatResult:t,formatSelection:s,dropdownCssClass:"bigdrop",escapeMarkup:function(e){return e}})},s=function(){$(".bs-select").selectpicker({iconBase:"fa",tickIcon:"fa-check"})},l=function(){$("#my_multi_select1").multiSelect(),$("#my_multi_select2").multiSelect({selectableOptgroup:!0})};return{init:function(){e(),t(),l(),s()}}}();jQuery(document).ready(function(){ComponentsDropdowns.init()});

308
assets/pages/scripts/components-nouisliders.js

@ -1,308 +0,0 @@
var ComponentsNoUiSliders = function() {
var demo2 = function() {
var connectSlider = document.getElementById('demo2');
noUiSlider.create(connectSlider, {
start: [20],
connect: false,
range: {
'min': 0,
'max': 100
}
});
}
var demo3 = function() {
var connectSlider = document.getElementById('demo3');
noUiSlider.create(connectSlider, {
start: [20, 80],
connect: false,
range: {
'min': 0,
'max': 100
}
});
var connectBar = document.createElement('div'),
connectBase = connectSlider.getElementsByClassName('noUi-base')[0],
connectHandles = connectSlider.getElementsByClassName('noUi-origin');
// Give the bar a class for styling and add it to the slider.
connectBar.className += 'connect';
connectBase.appendChild(connectBar);
connectSlider.noUiSlider.on('update', function( values, handle ) {
// Pick left for the first handle, right for the second.
var side = handle ? 'right' : 'left',
// Get the handle position and trim the '%' sign.
offset = (connectHandles[handle].style.left).slice(0, - 1);
// Right offset is 100% - left offset
if ( handle === 1 ) {
offset = 100 - offset;
}
connectBar.style[side] = offset + '%';
});
}
var demo4 = function() {
//** init the select
var select = document.getElementById('demo4_select');
// Append the option elements
for ( var i = -20; i <= 40; i++ ) {
var option = document.createElement("option");
option.text = i;
option.value = i;
select.appendChild(option);
}
//** init the slider
var html5Slider = document.getElementById('demo4');
noUiSlider.create(html5Slider, {
start: [ 10, 30 ],
connect: true,
range: {
'min': -20,
'max': 40
}
});
//** init the input
var inputNumber = document.getElementById('demo4_input');
html5Slider.noUiSlider.on('update', function( values, handle ) {
var value = values[handle];
if ( handle ) {
inputNumber.value = value;
} else {
select.value = Math.round(value);
}
});
select.addEventListener('change', function(){
html5Slider.noUiSlider.set([this.value, null]);
});
inputNumber.addEventListener('change', function(){
html5Slider.noUiSlider.set([null, this.value]);
});
}
var demo5 = function() {
var nonLinearSlider = document.getElementById('demo5');
noUiSlider.create(nonLinearSlider, {
connect: true,
behaviour: 'tap',
start: [ 500, 4000 ],
range: {
// Starting at 500, step the value by 500,
// until 4000 is reached. From there, step by 1000.
'min': [ 0 ],
'10%': [ 500, 500 ],
'50%': [ 4000, 1000 ],
'max': [ 10000 ]
}
});
// Write the CSS 'left' value to a span.
function leftValue ( handle ) {
return handle.parentElement.style.left;
}
var lowerValue = document.getElementById('demo5_lower-value'),
upperValue = document.getElementById('demo5_upper-value'),
handles = nonLinearSlider.getElementsByClassName('noUi-handle');
// Display the slider value and how far the handle moved
// from the left edge of the slider.
nonLinearSlider.noUiSlider.on('update', function ( values, handle ) {
if ( !handle ) {
lowerValue.innerHTML = values[handle] + ', ' + leftValue(handles[handle]);
} else {
upperValue.innerHTML = values[handle] + ', ' + leftValue(handles[handle]);
}
});
}
var demo6 = function() {
// Store the locked state and slider values.
var lockedState = false,
lockedSlider = false,
lockedValues = [60, 80],
slider1 = document.getElementById('demo6_slider1'),
slider2 = document.getElementById('demo6_slider2'),
lockButton = document.getElementById('demo6_lockbutton'),
slider1Value = document.getElementById('demo6_slider1-span'),
slider2Value = document.getElementById('demo6_slider2-span');
// When the button is clicked, the locked
// state is inverted.
lockButton.addEventListener('click', function(){
lockedState = !lockedState;
this.textContent = lockedState ? 'unlock' : 'lock';
});
function crossUpdate ( value, slider ) {
// If the sliders aren't interlocked, don't
// cross-update.
if ( !lockedState ) return;
// Select whether to increase or decrease
// the other slider value.
var a = slider1 === slider ? 0 : 1, b = a ? 0 : 1;
// Offset the slider value.
value -= lockedValues[b] - lockedValues[a];
// Set the value
slider.noUiSlider.set(value);
}
noUiSlider.create(slider1, {
start: 60,
// Disable animation on value-setting,
// so the sliders respond immediately.
animate: false,
range: {
min: 50,
max: 100
}
});
noUiSlider.create(slider2, {
start: 80,
animate: false,
range: {
min: 50,
max: 100
}
});
slider1.noUiSlider.on('update', function( values, handle ){
slider1Value.innerHTML = values[handle];
});
slider2.noUiSlider.on('update', function( values, handle ){
slider2Value.innerHTML = values[handle];
});
function setLockedValues ( ) {
lockedValues = [
Number(slider1.noUiSlider.get()),
Number(slider2.noUiSlider.get())
];
}
slider1.noUiSlider.on('change', setLockedValues);
slider2.noUiSlider.on('change', setLockedValues);
// The value will be send to the other slider,
// using a custom function as the serialization
// method. The function uses the global 'lockedState'
// variable to decide whether the other slider is updated.
slider1.noUiSlider.on('slide', function( values, handle ){
crossUpdate(values[handle], slider2);
});
slider2.noUiSlider.on('slide', function( values, handle ){
crossUpdate(values[handle], slider1);
});
}
var demo7 = function() {
var softSlider = document.getElementById('demo7');
noUiSlider.create(softSlider, {
start: 50,
range: {
min: 0,
max: 100
},
pips: {
mode: 'values',
values: [20, 80],
density: 4
}
});
softSlider.noUiSlider.on('change', function ( values, handle ) {
if ( values[handle] < 20 ) {
softSlider.noUiSlider.set(20);
} else if ( values[handle] > 80 ) {
softSlider.noUiSlider.set(80);
}
});
}
var demo8 = function() {
var tooltipSlider = document.getElementById('demo8');
noUiSlider.create(tooltipSlider, {
start: [40, 50],
connect: true,
range: {
'min': 30,
'30%': 40,
'max': 50
}
});
var tipHandles = tooltipSlider.getElementsByClassName('noUi-handle'),
tooltips = [];
// Add divs to the slider handles.
for ( var i = 0; i < tipHandles.length; i++ ){
tooltips[i] = document.createElement('div');
tipHandles[i].appendChild(tooltips[i]);
}
// Add a class for styling
tooltips[1].className += 'noUi-tooltip';
// Add additional markup
tooltips[1].innerHTML = '<strong>Value: </strong><span></span>';
// Replace the tooltip reference with the span we just added
tooltips[1] = tooltips[1].getElementsByTagName('span')[0];
// Add a class for styling
tooltips[0].className += 'noUi-tooltip';
// Add additional markup
tooltips[0].innerHTML = '<strong>Value: </strong><span></span>';
// Replace the tooltip reference with the span we just added
tooltips[0] = tooltips[0].getElementsByTagName('span')[0];
// When the slider changes, write the value to the tooltips.
tooltipSlider.noUiSlider.on('update', function( values, handle ){
tooltips[handle].innerHTML = values[handle];
});
}
return {
//main function to initiate the module
init: function() {
demo2();
demo3();
demo4();
demo5();
demo6();
demo7();
demo8();
}
};
}();
jQuery(document).ready(function() {
ComponentsNoUiSliders.init();
});

1
assets/pages/scripts/components-nouisliders.min.js

@ -1 +0,0 @@
var ComponentsNoUiSliders=function(){var e=function(){var e=document.getElementById("demo2");noUiSlider.create(e,{start:[20],connect:!1,range:{min:0,max:100}})},n=function(){var e=document.getElementById("demo3");noUiSlider.create(e,{start:[20,80],connect:!1,range:{min:0,max:100}});var n=document.createElement("div"),t=e.getElementsByClassName("noUi-base")[0],i=e.getElementsByClassName("noUi-origin");n.className+="connect",t.appendChild(n),e.noUiSlider.on("update",function(e,t){var o=t?"right":"left",a=i[t].style.left.slice(0,-1);1===t&&(a=100-a),n.style[o]=a+"%"})},t=function(){for(var e=document.getElementById("demo4_select"),n=-20;40>=n;n++){var t=document.createElement("option");t.text=n,t.value=n,e.appendChild(t)}var i=document.getElementById("demo4");noUiSlider.create(i,{start:[10,30],connect:!0,range:{min:-20,max:40}});var o=document.getElementById("demo4_input");i.noUiSlider.on("update",function(n,t){var i=n[t];t?o.value=i:e.value=Math.round(i)}),e.addEventListener("change",function(){i.noUiSlider.set([this.value,null])}),o.addEventListener("change",function(){i.noUiSlider.set([null,this.value])})},i=function(){function e(e){return e.parentElement.style.left}var n=document.getElementById("demo5");noUiSlider.create(n,{connect:!0,behaviour:"tap",start:[500,4e3],range:{min:[0],"10%":[500,500],"50%":[4e3,1e3],max:[1e4]}});var t=document.getElementById("demo5_lower-value"),i=document.getElementById("demo5_upper-value"),o=n.getElementsByClassName("noUi-handle");n.noUiSlider.on("update",function(n,a){a?i.innerHTML=n[a]+", "+e(o[a]):t.innerHTML=n[a]+", "+e(o[a])})},o=function(){function e(e,n){if(t){var a=o===n?0:1,d=a?0:1;e-=i[d]-i[a],n.noUiSlider.set(e)}}function n(){i=[Number(o.noUiSlider.get()),Number(a.noUiSlider.get())]}var t=!1,i=[60,80],o=document.getElementById("demo6_slider1"),a=document.getElementById("demo6_slider2"),d=document.getElementById("demo6_lockbutton"),r=document.getElementById("demo6_slider1-span"),l=document.getElementById("demo6_slider2-span");d.addEventListener("click",function(){t=!t,this.textContent=t?"unlock":"lock"}),noUiSlider.create(o,{start:60,animate:!1,range:{min:50,max:100}}),noUiSlider.create(a,{start:80,animate:!1,range:{min:50,max:100}}),o.noUiSlider.on("update",function(e,n){r.innerHTML=e[n]}),a.noUiSlider.on("update",function(e,n){l.innerHTML=e[n]}),o.noUiSlider.on("change",n),a.noUiSlider.on("change",n),o.noUiSlider.on("slide",function(n,t){e(n[t],a)}),a.noUiSlider.on("slide",function(n,t){e(n[t],o)})},a=function(){var e=document.getElementById("demo7");noUiSlider.create(e,{start:50,range:{min:0,max:100},pips:{mode:"values",values:[20,80],density:4}}),e.noUiSlider.on("change",function(n,t){n[t]<20?e.noUiSlider.set(20):n[t]>80&&e.noUiSlider.set(80)})},d=function(){var e=document.getElementById("demo8");noUiSlider.create(e,{start:[40,50],connect:!0,range:{min:30,"30%":40,max:50}});for(var n=e.getElementsByClassName("noUi-handle"),t=[],i=0;i<n.length;i++)t[i]=document.createElement("div"),n[i].appendChild(t[i]);t[1].className+="noUi-tooltip",t[1].innerHTML="<strong>Value: </strong><span></span>",t[1]=t[1].getElementsByTagName("span")[0],t[0].className+="noUi-tooltip",t[0].innerHTML="<strong>Value: </strong><span></span>",t[0]=t[0].getElementsByTagName("span")[0],e.noUiSlider.on("update",function(e,n){t[n].innerHTML=e[n]})};return{init:function(){e(),n(),t(),i(),o(),a(),d()}}}();jQuery(document).ready(function(){ComponentsNoUiSliders.init()});

127
assets/pages/scripts/components-select2.js

@ -1,127 +0,0 @@
var ComponentsSelect2 = function() {
var handleDemo = function() {
// Set the "bootstrap" theme as the default theme for all Select2
// widgets.
//
// @see https://github.com/select2/select2/issues/2927
$.fn.select2.defaults.set("theme", "bootstrap");
var placeholder = "Select a State";
$(".select2, .select2-multiple").select2({
placeholder: placeholder,
width: null
});
$(".select2-allow-clear").select2({
allowClear: true,
placeholder: placeholder,
width: null
});
// @see https://select2.github.io/examples.html#data-ajax
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'><span class='glyphicon glyphicon-flash'></span> " + repo.forks_count + " Forks</div>" +
"<div class='select2-result-repository__stargazers'><span class='glyphicon glyphicon-star'></span> " + repo.stargazers_count + " Stars</div>" +
"<div class='select2-result-repository__watchers'><span class='glyphicon glyphicon-eye-open'></span> " + repo.watchers_count + " Watchers</div>" +
"</div>" +
"</div></div>";
return markup;
}
function formatRepoSelection(repo) {
return repo.full_name || repo.text;
}
$(".js-data-example-ajax").select2({
width: "off",
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, page) {
// 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
return {
results: data.items
};
},
cache: true
},
escapeMarkup: function(markup) {
return markup;
}, // let our custom formatter work
minimumInputLength: 1,
templateResult: formatRepo,
templateSelection: formatRepoSelection
});
$("button[data-select2-open]").click(function() {
$("#" + $(this).data("select2-open")).select2("open");
});
$(":checkbox").on("click", function() {
$(this).parent().nextAll("select").prop("disabled", !this.checked);
});
// copy Bootstrap validation states to Select2 dropdown
//
// add .has-waring, .has-error, .has-succes to the Select2 dropdown
// (was #select2-drop in Select2 v3.x, in Select2 v4 can be selected via
// body > .select2-container) if _any_ of the opened Select2's parents
// has one of these forementioned classes (YUCK! ;-))
$(".select2, .select2-multiple, .select2-allow-clear, .js-data-example-ajax").on("select2:open", function() {
if ($(this).parents("[class*='has-']").length) {
var classNames = $(this).parents("[class*='has-']")[0].className.split(/\s+/);
for (var i = 0; i < classNames.length; ++i) {
if (classNames[i].match("has-")) {
$("body > .select2-container").addClass(classNames[i]);
}
}
}
});
$(".js-btn-set-scaling-classes").on("click", function() {
$("#select2-multiple-input-sm, #select2-single-input-sm").next(".select2-container--bootstrap").addClass("input-sm");
$("#select2-multiple-input-lg, #select2-single-input-lg").next(".select2-container--bootstrap").addClass("input-lg");
$(this).removeClass("btn-primary btn-outline").prop("disabled", true);
});
}
return {
//main function to initiate the module
init: function() {
handleDemo();
}
};
}();
if (App.isAngularJsApp() === false) {
jQuery(document).ready(function() {
ComponentsSelect2.init();
});
}

1
assets/pages/scripts/components-select2.min.js

@ -1 +0,0 @@
var ComponentsSelect2=function(){var e=function(){function e(e){if(e.loading)return e.text;var t="<div class='select2-result-repository clearfix'><div class='select2-result-repository__avatar'><img src='"+e.owner.avatar_url+"' /></div><div class='select2-result-repository__meta'><div class='select2-result-repository__title'>"+e.full_name+"</div>";return e.description&&(t+="<div class='select2-result-repository__description'>"+e.description+"</div>"),t+="<div class='select2-result-repository__statistics'><div class='select2-result-repository__forks'><span class='glyphicon glyphicon-flash'></span> "+e.forks_count+" Forks</div><div class='select2-result-repository__stargazers'><span class='glyphicon glyphicon-star'></span> "+e.stargazers_count+" Stars</div><div class='select2-result-repository__watchers'><span class='glyphicon glyphicon-eye-open'></span> "+e.watchers_count+" Watchers</div></div></div></div>"}function t(e){return e.full_name||e.text}$.fn.select2.defaults.set("theme","bootstrap");var s="Select a State";$(".select2, .select2-multiple").select2({placeholder:s,width:null}),$(".select2-allow-clear").select2({allowClear:!0,placeholder:s,width:null}),$(".js-data-example-ajax").select2({width:"off",ajax:{url:"https://api.github.com/search/repositories",dataType:"json",delay:250,data:function(e){return{q:e.term,page:e.page}},processResults:function(e,t){return{results:e.items}},cache:!0},escapeMarkup:function(e){return e},minimumInputLength:1,templateResult:e,templateSelection:t}),$("button[data-select2-open]").click(function(){$("#"+$(this).data("select2-open")).select2("open")}),$(":checkbox").on("click",function(){$(this).parent().nextAll("select").prop("disabled",!this.checked)}),$(".select2, .select2-multiple, .select2-allow-clear, .js-data-example-ajax").on("select2:open",function(){if($(this).parents("[class*='has-']").length)for(var e=$(this).parents("[class*='has-']")[0].className.split(/\s+/),t=0;t<e.length;++t)e[t].match("has-")&&$("body > .select2-container").addClass(e[t])}),$(".js-btn-set-scaling-classes").on("click",function(){$("#select2-multiple-input-sm, #select2-single-input-sm").next(".select2-container--bootstrap").addClass("input-sm"),$("#select2-multiple-input-lg, #select2-single-input-lg").next(".select2-container--bootstrap").addClass("input-lg"),$(this).removeClass("btn-primary btn-outline").prop("disabled",!0)})};return{init:function(){e()}}}();App.isAngularJsApp()===!1&&jQuery(document).ready(function(){ComponentsSelect2.init()});

276
assets/pages/scripts/components-typeahead.js

@ -1,276 +0,0 @@
var ComponentsTypeahead = function () {
var handleTwitterTypeahead = function() {
// Example #1
// instantiate the bloodhound suggestion engine
var numbers = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.num); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
local: [
{ num: 'metronic' },
{ num: 'keenthemes' },
{ num: 'metronic theme' },
{ num: 'metronic template' },
{ num: 'keenthemes team' }
]
});
// initialize the bloodhound suggestion engine
numbers.initialize();
// instantiate the typeahead UI
if (App.isRTL()) {
$('#typeahead_example_1').attr("dir", "rtl");
}
$('#typeahead_example_1').typeahead(null, {
displayKey: 'num',
hint: (App.isRTL() ? false : true),
source: numbers.ttAdapter()
});
// Example #2
var countries = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.name); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
limit: 10,
prefetch: {
url: '../demo/typeahead_countries.json',
filter: function(list) {
return $.map(list, function(country) { return { name: country }; });
}
}
});
countries.initialize();
if (App.isRTL()) {
$('#typeahead_example_2').attr("dir", "rtl");
}
$('#typeahead_example_2').typeahead(null, {
name: 'typeahead_example_2',
displayKey: 'name',
hint: (App.isRTL() ? false : true),
source: countries.ttAdapter()
});
// Example #3
var custom = new Bloodhound({
datumTokenizer: function(d) { return d.tokens; },
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: '../demo/typeahead_custom.php?query=%QUERY'
});
custom.initialize();
if (App.isRTL()) {
$('#typeahead_example_3').attr("dir", "rtl");
}
$('#typeahead_example_3').typeahead(null, {
name: 'datypeahead_example_3',
displayKey: 'value',
source: custom.ttAdapter(),
hint: (App.isRTL() ? false : true),
templates: {
suggestion: Handlebars.compile([
'<div class="media">',
'<div class="pull-left">',
'<div class="media-object">',
'<img src="{{img}}" width="50" height="50"/>',
'</div>',
'</div>',
'<div class="media-body">',
'<h4 class="media-heading">{{value}}</h4>',
'<p>{{desc}}</p>',
'</div>',
'</div>',
].join(''))
}
});
// Example #4
var nba = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.team); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
prefetch: '../demo/typeahead_nba.json'
});
var nhl = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.team); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
prefetch: '../demo/typeahead_nhl.json'
});
nba.initialize();
nhl.initialize();
if (App.isRTL()) {
$('#typeahead_example_4').attr("dir", "rtl");
}
$('#typeahead_example_4').typeahead({
hint: (App.isRTL() ? false : true),
highlight: true
},
{
name: 'nba',
displayKey: 'team',
source: nba.ttAdapter(),
templates: {
header: '<h3>NBA Teams</h3>'
}
},
{
name: 'nhl',
displayKey: 'team',
source: nhl.ttAdapter(),
templates: {
header: '<h3>NHL Teams</h3>'
}
});
}
var handleTwitterTypeaheadModal = function() {
// Example #1
// instantiate the bloodhound suggestion engine
var numbers = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.num); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
local: [
{ num: 'metronic' },
{ num: 'keenthemes' },
{ num: 'metronic theme' },
{ num: 'metronic template' },
{ num: 'keenthemes team' }
]
});
// initialize the bloodhound suggestion engine
numbers.initialize();
// instantiate the typeahead UI
if (App.isRTL()) {
$('#typeahead_example_modal_1').attr("dir", "rtl");
}
$('#typeahead_example_modal_1').typeahead(null, {
displayKey: 'num',
hint: (App.isRTL() ? false : true),
source: numbers.ttAdapter()
});
// Example #2
var countries = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.name); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
limit: 10,
prefetch: {
url: '../demo/typeahead_countries.json',
filter: function(list) {
return $.map(list, function(country) { return { name: country }; });
}
}
});
countries.initialize();
if (App.isRTL()) {
$('#typeahead_example_modal_2').attr("dir", "rtl");
}
$('#typeahead_example_modal_2').typeahead(null, {
name: 'typeahead_example_modal_2',
displayKey: 'name',
hint: (App.isRTL() ? false : true),
source: countries.ttAdapter()
});
// Example #3
var custom = new Bloodhound({
datumTokenizer: function(d) { return d.tokens; },
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: '../demo/typeahead_custom.php?query=%QUERY'
});
custom.initialize();
if (App.isRTL()) {
$('#typeahead_example_modal_3').attr("dir", "rtl");
}
$('#typeahead_example_modal_3').typeahead(null, {
name: 'datypeahead_example_modal_3',
displayKey: 'value',
hint: (App.isRTL() ? false : true),
source: custom.ttAdapter(),
templates: {
suggestion: Handlebars.compile([
'<div class="media">',
'<div class="pull-left">',
'<div class="media-object">',
'<img src="{{img}}" width="50" height="50"/>',
'</div>',
'</div>',
'<div class="media-body">',
'<h4 class="media-heading">{{value}}</h4>',
'<p>{{desc}}</p>',
'</div>',
'</div>',
].join(''))
}
});
// Example #4
var nba = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.team); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
limit: 3,
prefetch: '../demo/typeahead_nba.json'
});
var nhl = new Bloodhound({
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.team); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
limit: 3,
prefetch: '../demo/typeahead_nhl.json'
});
nba.initialize();
nhl.initialize();
$('#typeahead_example_modal_4').typeahead({
hint: (App.isRTL() ? false : true),
highlight: true
},
{
name: 'nba',
displayKey: 'team',
source: nba.ttAdapter(),
templates: {
header: '<h3>NBA Teams</h3>'
}
},
{
name: 'nhl',
displayKey: 'team',
source: nhl.ttAdapter(),
templates: {
header: '<h3>NHL Teams</h3>'
}
});
}
return {
//main function to initiate the module
init: function () {
handleTwitterTypeahead();
handleTwitterTypeaheadModal();
}
};
}();
jQuery(document).ready(function() {
ComponentsTypeahead.init();
});

1
assets/pages/scripts/components-typeahead.min.js

@ -1 +0,0 @@
var ComponentsTypeahead=function(){var e=function(){var e=new Bloodhound({datumTokenizer:function(e){return Bloodhound.tokenizers.whitespace(e.num)},queryTokenizer:Bloodhound.tokenizers.whitespace,local:[{num:"metronic"},{num:"keenthemes"},{num:"metronic theme"},{num:"metronic template"},{num:"keenthemes team"}]});e.initialize(),App.isRTL()&&$("#typeahead_example_1").attr("dir","rtl"),$("#typeahead_example_1").typeahead(null,{displayKey:"num",hint:!App.isRTL(),source:e.ttAdapter()});var t=new Bloodhound({datumTokenizer:function(e){return Bloodhound.tokenizers.whitespace(e.name)},queryTokenizer:Bloodhound.tokenizers.whitespace,limit:10,prefetch:{url:"../demo/typeahead_countries.json",filter:function(e){return $.map(e,function(e){return{name:e}})}}});t.initialize(),App.isRTL()&&$("#typeahead_example_2").attr("dir","rtl"),$("#typeahead_example_2").typeahead(null,{name:"typeahead_example_2",displayKey:"name",hint:!App.isRTL(),source:t.ttAdapter()});var a=new Bloodhound({datumTokenizer:function(e){return e.tokens},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:"../demo/typeahead_custom.php?query=%QUERY"});a.initialize(),App.isRTL()&&$("#typeahead_example_3").attr("dir","rtl"),$("#typeahead_example_3").typeahead(null,{name:"datypeahead_example_3",displayKey:"value",source:a.ttAdapter(),hint:!App.isRTL(),templates:{suggestion:Handlebars.compile(['<div class="media">','<div class="pull-left">','<div class="media-object">','<img src="{{img}}" width="50" height="50"/>',"</div>","</div>",'<div class="media-body">','<h4 class="media-heading">{{value}}</h4>',"<p>{{desc}}</p>","</div>","</div>"].join(""))}});var n=new Bloodhound({datumTokenizer:function(e){return Bloodhound.tokenizers.whitespace(e.team)},queryTokenizer:Bloodhound.tokenizers.whitespace,prefetch:"../demo/typeahead_nba.json"}),i=new Bloodhound({datumTokenizer:function(e){return Bloodhound.tokenizers.whitespace(e.team)},queryTokenizer:Bloodhound.tokenizers.whitespace,prefetch:"../demo/typeahead_nhl.json"});n.initialize(),i.initialize(),App.isRTL()&&$("#typeahead_example_4").attr("dir","rtl"),$("#typeahead_example_4").typeahead({hint:!App.isRTL(),highlight:!0},{name:"nba",displayKey:"team",source:n.ttAdapter(),templates:{header:"<h3>NBA Teams</h3>"}},{name:"nhl",displayKey:"team",source:i.ttAdapter(),templates:{header:"<h3>NHL Teams</h3>"}})},t=function(){var e=new Bloodhound({datumTokenizer:function(e){return Bloodhound.tokenizers.whitespace(e.num)},queryTokenizer:Bloodhound.tokenizers.whitespace,local:[{num:"metronic"},{num:"keenthemes"},{num:"metronic theme"},{num:"metronic template"},{num:"keenthemes team"}]});e.initialize(),App.isRTL()&&$("#typeahead_example_modal_1").attr("dir","rtl"),$("#typeahead_example_modal_1").typeahead(null,{displayKey:"num",hint:!App.isRTL(),source:e.ttAdapter()});var t=new Bloodhound({datumTokenizer:function(e){return Bloodhound.tokenizers.whitespace(e.name)},queryTokenizer:Bloodhound.tokenizers.whitespace,limit:10,prefetch:{url:"../demo/typeahead_countries.json",filter:function(e){return $.map(e,function(e){return{name:e}})}}});t.initialize(),App.isRTL()&&$("#typeahead_example_modal_2").attr("dir","rtl"),$("#typeahead_example_modal_2").typeahead(null,{name:"typeahead_example_modal_2",displayKey:"name",hint:!App.isRTL(),source:t.ttAdapter()});var a=new Bloodhound({datumTokenizer:function(e){return e.tokens},queryTokenizer:Bloodhound.tokenizers.whitespace,remote:"../demo/typeahead_custom.php?query=%QUERY"});a.initialize(),App.isRTL()&&$("#typeahead_example_modal_3").attr("dir","rtl"),$("#typeahead_example_modal_3").typeahead(null,{name:"datypeahead_example_modal_3",displayKey:"value",hint:!App.isRTL(),source:a.ttAdapter(),templates:{suggestion:Handlebars.compile(['<div class="media">','<div class="pull-left">','<div class="media-object">','<img src="{{img}}" width="50" height="50"/>',"</div>","</div>",'<div class="media-body">','<h4 class="media-heading">{{value}}</h4>',"<p>{{desc}}</p>","</div>","</div>"].join(""))}});var n=new Bloodhound({datumTokenizer:function(e){return Bloodhound.tokenizers.whitespace(e.team)},queryTokenizer:Bloodhound.tokenizers.whitespace,limit:3,prefetch:"../demo/typeahead_nba.json"}),i=new Bloodhound({datumTokenizer:function(e){return Bloodhound.tokenizers.whitespace(e.team)},queryTokenizer:Bloodhound.tokenizers.whitespace,limit:3,prefetch:"../demo/typeahead_nhl.json"});n.initialize(),i.initialize(),$("#typeahead_example_modal_4").typeahead({hint:!App.isRTL(),highlight:!0},{name:"nba",displayKey:"team",source:n.ttAdapter(),templates:{header:"<h3>NBA Teams</h3>"}},{name:"nhl",displayKey:"team",source:i.ttAdapter(),templates:{header:"<h3>NHL Teams</h3>"}})};return{init:function(){e(),t()}}}();jQuery(document).ready(function(){ComponentsTypeahead.init()});

32
assets/pages/scripts/contact.js

@ -1,32 +0,0 @@
var Contact = function () {
return {
//main function to initiate the module
init: function () {
var map;
$(document).ready(function(){
map = new GMaps({
div: '#gmapbg',
lat: -13.004333,
lng: -38.494333
});
var marker = map.addMarker({
lat: -13.004333,
lng: -38.494333,
title: 'Loop, Inc.',
infoWindow: {
content: "<b>Metronic, Inc.</b> 795 Park Ave, Suite 120<br>San Francisco, CA 94107"
}
});
marker.infoWindow.open(map, marker);
});
}
};
}();
jQuery(document).ready(function() {
Contact.init();
});

1
assets/pages/scripts/contact.min.js

@ -1 +0,0 @@
var Contact=function(){return{init:function(){var n;$(document).ready(function(){n=new GMaps({div:"#gmapbg",lat:-13.004333,lng:-38.494333});var t=n.addMarker({lat:-13.004333,lng:-38.494333,title:"Loop, Inc.",infoWindow:{content:"<b>Metronic, Inc.</b> 795 Park Ave, Suite 120<br>San Francisco, CA 94107"}});t.infoWindow.open(n,t)})}}}();jQuery(document).ready(function(){Contact.init()});

36
assets/pages/scripts/custom.js

@ -1,36 +0,0 @@
/**
Custom module for you to write your own javascript functions
**/
var Custom = function () {
// private functions & variables
var myFunc = function(text) {
alert(text);
}
// public functions
return {
//main function
init: function () {
//initialize here something.
},
//some helper function
doSomeStuff: function () {
myFunc();
}
};
}();
jQuery(document).ready(function() {
Custom.init();
});
/***
Usage
***/
//Custom.doSomeStuff();

1
assets/pages/scripts/custom.min.js

@ -1 +0,0 @@
var Custom=function(){var n=function(n){alert(n)};return{init:function(){},doSomeStuff:function(){n()}}}();jQuery(document).ready(function(){Custom.init()});

1395
assets/pages/scripts/dashboard.js

File diff suppressed because it is too large

1
assets/pages/scripts/dashboard.min.js

File diff suppressed because one or more lines are too long

41
assets/pages/scripts/form-dropzone.js

@ -1,41 +0,0 @@
var FormDropzone = function () {
return {
//main function to initiate the module
init: function () {
Dropzone.options.myDropzone = {
dictDefaultMessage: "",
init: function() {
this.on("addedfile", function(file) {
// Create the remove button
var removeButton = Dropzone.createElement("<a href='javascript:;'' class='btn red btn-sm btn-block'>Remove</a>");
// Capture the Dropzone instance as closure.
var _this = this;
// Listen to the click event
removeButton.addEventListener("click", function(e) {
// Make sure the button click doesn't submit the form:
e.preventDefault();
e.stopPropagation();
// Remove the file preview.
_this.removeFile(file);
// If you want to the delete the file on the server as well,
// you can do the AJAX request here.
});
// Add the button to the file preview element.
file.previewElement.appendChild(removeButton);
});
}
}
}
};
}();
jQuery(document).ready(function() {
FormDropzone.init();
});

1
assets/pages/scripts/form-dropzone.min.js

@ -1 +0,0 @@
var FormDropzone=function(){return{init:function(){Dropzone.options.myDropzone={dictDefaultMessage:"",init:function(){this.on("addedfile",function(e){var n=Dropzone.createElement("<a href='javascript:;'' class='btn red btn-sm btn-block'>Remove</a>"),t=this;n.addEventListener("click",function(n){n.preventDefault(),n.stopPropagation(),t.removeFile(e)}),e.previewElement.appendChild(n)})}}}}}();jQuery(document).ready(function(){FormDropzone.init()});

571
assets/pages/scripts/form-editable.js

@ -1,571 +0,0 @@
var FormEditable = function() {
$.mockjaxSettings.responseTime = 500;
var log = function(settings, response) {
var s = [],
str;
s.push(settings.type.toUpperCase() + ' url = "' + settings.url + '"');
for (var a in settings.data) {
if (settings.data[a] && typeof settings.data[a] === 'object') {
str = [];
for (var j in settings.data[a]) {
str.push(j + ': "' + settings.data[a][j] + '"');
}
str = '{ ' + str.join(', ') + ' }';
} else {
str = '"' + settings.data[a] + '"';
}
s.push(a + ' = ' + str);
}
s.push('RESPONSE: status = ' + response.status);
if (response.responseText) {
if ($.isArray(response.responseText)) {
s.push('[');
$.each(response.responseText, function(i, v) {
s.push('{value: ' + v.value + ', text: "' + v.text + '"}');
});
s.push(']');
} else {
s.push($.trim(response.responseText));
}
}
s.push('--------------------------------------\n');
$('#console').val(s.join('\n') + $('#console').val());
}
var initAjaxMock = function() {
//ajax mocks
$.mockjax({
url: '/post',
response: function(settings) {
log(settings, this);
}
});
$.mockjax({
url: '/error',
status: 400,
statusText: 'Bad Request',
response: function(settings) {
this.responseText = 'Please input correct value';
log(settings, this);
}
});
$.mockjax({
url: '/status',
status: 500,
response: function(settings) {
this.responseText = 'Internal Server Error';
log(settings, this);
}
});
$.mockjax({
url: '/groups',
response: function(settings) {
this.responseText = [{
value: 0,
text: 'Guest'
}, {
value: 1,
text: 'Service'
}, {
value: 2,
text: 'Customer'
}, {
value: 3,
text: 'Operator'
}, {
value: 4,
text: 'Support'
}, {
value: 5,
text: 'Admin'
}];
log(settings, this);
}
});
}
var initEditables = function() {
//set editable mode based on URL parameter
if (App.getURLParameter('mode') == 'inline') {
$.fn.editable.defaults.mode = 'inline';
$('#inline').attr("checked", true);
} else {
$('#inline').attr("checked", false);
}
//global settings
$.fn.editable.defaults.inputclass = 'form-control';
$.fn.editable.defaults.url = '/post';
//editables element samples
$('#username').editable({
url: '/post',
type: 'text',
pk: 1,
name: 'username',
title: 'Enter username'
});
$('#firstname').editable({
validate: function(value) {
if ($.trim(value) == '') return 'This field is required';
}
});
$('#sex').editable({
prepend: "not selected",
inputclass: 'form-control',
source: [{
value: 1,
text: 'Male'
}, {
value: 2,
text: 'Female'
}],
display: function(value, sourceData) {
var colors = {
"": "gray",
1: "green",
2: "blue"
},
elem = $.grep(sourceData, function(o) {
return o.value == value;
});
if (elem.length) {
$(this).text(elem[0].text).css("color", colors[value]);
} else {
$(this).empty();
}
}
});
$('#status').editable();
$('#group').editable({
showbuttons: false
});
$('#vacation').editable({
rtl: App.isRTL()
});
$('#dob').editable({
inputclass: 'form-control',
});
$('#event').editable({
placement: (App.isRTL() ? 'left' : 'right'),
combodate: {
firstItem: 'name'
}
});
$('#meeting_start').editable({
format: 'yyyy-mm-dd hh:ii',
viewformat: 'dd/mm/yyyy hh:ii',
validate: function(v) {
if (v && v.getDate() == 10) return 'Day cant be 10!';
},
datetimepicker: {
rtl: App.isRTL(),
todayBtn: 'linked',
weekStart: 1
}
});
$('#comments').editable({
showbuttons: 'bottom'
});
$('#note').editable({
showbuttons: (App.isRTL() ? 'left' : 'right')
});
$('#pencil').click(function(e) {
e.stopPropagation();
e.preventDefault();
$('#note').editable('toggle');
});
$('#state').editable({
source: ["Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Dakota", "North Carolina", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"]
});
$('#fruits').editable({
pk: 1,
limit: 3,
source: [{
value: 1,
text: 'banana'
}, {
value: 2,
text: 'peach'
}, {
value: 3,
text: 'apple'
}, {
value: 4,
text: 'watermelon'
}, {
value: 5,
text: 'orange'
}]
});
$('#fruits').on('shown', function(e, reason) {
App.initUniform();
});
$('#tags').editable({
inputclass: 'form-control input-medium',
select2: {
tags: ['html', 'javascript', 'css', 'ajax'],
tokenSeparators: [",", " "]
}
});
var countries = [];
$.each({
"BD": "Bangladesh",
"BE": "Belgium",
"BF": "Burkina Faso",
"BG": "Bulgaria",
"BA": "Bosnia and Herzegovina",
"BB": "Barbados",
"WF": "Wallis and Futuna",
"BL": "Saint Bartelemey",
"BM": "Bermuda",
"BN": "Brunei Darussalam",
"BO": "Bolivia",
"BH": "Bahrain",
"BI": "Burundi",
"BJ": "Benin",
"BT": "Bhutan",
"JM": "Jamaica",
"BV": "Bouvet Island",
"BW": "Botswana",
"WS": "Samoa",
"BR": "Brazil",
"BS": "Bahamas",
"JE": "Jersey",
"BY": "Belarus",
"O1": "Other Country",
"LV": "Latvia",
"RW": "Rwanda",
"RS": "Serbia",
"TL": "Timor-Leste",
"RE": "Reunion",
"LU": "Luxembourg",
"TJ": "Tajikistan",
"RO": "Romania",
"PG": "Papua New Guinea",
"GW": "Guinea-Bissau",
"GU": "Guam",
"GT": "Guatemala",
"GS": "South Georgia and the South Sandwich Islands",
"GR": "Greece",
"GQ": "Equatorial Guinea",
"GP": "Guadeloupe",
"JP": "Japan",
"GY": "Guyana",
"GG": "Guernsey",
"GF": "French Guiana",
"GE": "Georgia",
"GD": "Grenada",
"GB": "United Kingdom",
"GA": "Gabon",
"SV": "El Salvador",
"GN": "Guinea",
"GM": "Gambia",
"GL": "Greenland",
"GI": "Gibraltar",
"GH": "Ghana",
"OM": "Oman",
"TN": "Tunisia",
"JO": "Jordan",
"HR": "Croatia",
"HT": "Haiti",
"HU": "Hungary",
"HK": "Hong Kong",
"HN": "Honduras",
"HM": "Heard Island and McDonald Islands",
"VE": "Venezuela",
"PR": "Puerto Rico",
"PS": "Palestinian Territory",
"PW": "Palau",
"PT": "Portugal",
"SJ": "Svalbard and Jan Mayen",
"PY": "Paraguay",
"IQ": "Iraq",
"PA": "Panama",
"PF": "French Polynesia",
"BZ": "Belize",
"PE": "Peru",
"PK": "Pakistan",
"PH": "Philippines",
"PN": "Pitcairn",
"TM": "Turkmenistan",
"PL": "Poland",
"PM": "Saint Pierre and Miquelon",
"ZM": "Zambia",
"EH": "Western Sahara",
"RU": "Russian Federation",
"EE": "Estonia",
"EG": "Egypt",
"TK": "Tokelau",
"ZA": "South Africa",
"EC": "Ecuador",
"IT": "Italy",
"VN": "Vietnam",
"SB": "Solomon Islands",
"EU": "Europe",
"ET": "Ethiopia",
"SO": "Somalia",
"ZW": "Zimbabwe",
"SA": "Saudi Arabia",
"ES": "Spain",
"ER": "Eritrea",
"ME": "Montenegro",
"MD": "Moldova, Republic of",
"MG": "Madagascar",
"MF": "Saint Martin",
"MA": "Morocco",
"MC": "Monaco",
"UZ": "Uzbekistan",
"MM": "Myanmar",
"ML": "Mali",
"MO": "Macao",
"MN": "Mongolia",
"MH": "Marshall Islands",
"MK": "Macedonia",
"MU": "Mauritius",
"MT": "Malta",
"MW": "Malawi",
"MV": "Maldives",
"MQ": "Martinique",
"MP": "Northern Mariana Islands",
"MS": "Montserrat",
"MR": "Mauritania",
"IM": "Isle of Man",
"UG": "Uganda",
"TZ": "Tanzania, United Republic of",
"MY": "Malaysia",
"MX": "Mexico",
"IL": "Israel",
"FR": "France",
"IO": "British Indian Ocean Territory",
"FX": "France, Metropolitan",
"SH": "Saint Helena",
"FI": "Finland",
"FJ": "Fiji",
"FK": "Falkland Islands (Malvinas)",
"FM": "Micronesia, Federated States of",
"FO": "Faroe Islands",
"NI": "Nicaragua",
"NL": "Netherlands",
"NO": "Norway",
"NA": "Namibia",
"VU": "Vanuatu",
"NC": "New Caledonia",
"NE": "Niger",
"NF": "Norfolk Island",
"NG": "Nigeria",
"NZ": "New Zealand",
"NP": "Nepal",
"NR": "Nauru",
"NU": "Niue",
"CK": "Cook Islands",
"CI": "Cote d'Ivoire",
"CH": "Switzerland",
"CO": "Colombia",
"CN": "China",
"CM": "Cameroon",
"CL": "Chile",
"CC": "Cocos (Keeling) Islands",
"CA": "Canada",
"CG": "Congo",
"CF": "Central African Republic",
"CD": "Congo, The Democratic Republic of the",
"CZ": "Czech Republic",
"CY": "Cyprus",
"CX": "Christmas Island",
"CR": "Costa Rica",
"CV": "Cape Verde",
"CU": "Cuba",
"SZ": "Swaziland",
"SY": "Syrian Arab Republic",
"KG": "Kyrgyzstan",
"KE": "Kenya",
"SR": "Suriname",
"KI": "Kiribati",
"KH": "Cambodia",
"KN": "Saint Kitts and Nevis",
"KM": "Comoros",
"ST": "Sao Tome and Principe",
"SK": "Slovakia",
"KR": "Korea, Republic of",
"SI": "Slovenia",
"KP": "Korea, Democratic People's Republic of",
"KW": "Kuwait",
"SN": "Senegal",
"SM": "San Marino",
"SL": "Sierra Leone",
"SC": "Seychelles",
"KZ": "Kazakhstan",
"KY": "Cayman Islands",
"SG": "Singapore",
"SE": "Sweden",
"SD": "Sudan",
"DO": "Dominican Republic",
"DM": "Dominica",
"DJ": "Djibouti",
"DK": "Denmark",
"VG": "Virgin Islands, British",
"DE": "Germany",
"YE": "Yemen",
"DZ": "Algeria",
"US": "United States",
"UY": "Uruguay",
"YT": "Mayotte",
"UM": "United States Minor Outlying Islands",
"LB": "Lebanon",
"LC": "Saint Lucia",
"LA": "Lao People's Democratic Republic",
"TV": "Tuvalu",
"TW": "Taiwan",
"TT": "Trinidad and Tobago",
"TR": "Turkey",
"LK": "Sri Lanka",
"LI": "Liechtenstein",
"A1": "Anonymous Proxy",
"TO": "Tonga",
"LT": "Lithuania",
"A2": "Satellite Provider",
"LR": "Liberia",
"LS": "Lesotho",
"TH": "Thailand",
"TF": "French Southern Territories",
"TG": "Togo",
"TD": "Chad",
"TC": "Turks and Caicos Islands",
"LY": "Libyan Arab Jamahiriya",
"VA": "Holy See (Vatican City State)",
"VC": "Saint Vincent and the Grenadines",
"AE": "United Arab Emirates",
"AD": "Andorra",
"AG": "Antigua and Barbuda",
"AF": "Afghanistan",
"AI": "Anguilla",
"VI": "Virgin Islands, U.S.",
"IS": "Iceland",
"IR": "Iran, Islamic Republic of",
"AM": "Armenia",
"AL": "Albania",
"AO": "Angola",
"AN": "Netherlands Antilles",
"AQ": "Antarctica",
"AP": "Asia/Pacific Region",
"AS": "American Samoa",
"AR": "Argentina",
"AU": "Australia",
"AT": "Austria",
"AW": "Aruba",
"IN": "India",
"AX": "Aland Islands",
"AZ": "Azerbaijan",
"IE": "Ireland",
"ID": "Indonesia",
"UA": "Ukraine",
"QA": "Qatar",
"MZ": "Mozambique"
}, function(k, v) {
countries.push({
id: k,
text: v
});
});
$('#country').editable({
inputclass: 'form-control input-medium',
source: countries
});
$('#address').editable({
url: '/post',
value: {
city: "San Francisco",
street: "Valencia",
building: "#24"
},
validate: function(value) {
if (value.city == '') return 'city is required!';
},
display: function(value) {
if (!value) {
$(this).empty();
return;
}
var html = '<b>' + $('<div>').text(value.city).html() + '</b>, ' + $('<div>').text(value.street).html() + ' st., bld. ' + $('<div>').text(value.building).html();
$(this).html(html);
}
});
}
return {
//main function to initiate the module
init: function() {
// inii ajax simulation
initAjaxMock();
// init editable elements
initEditables();
// init editable toggler
$('#enable').click(function() {
$('#user .editable').editable('toggleDisabled');
});
// init
$('#inline').on('change', function(e) {
if ($(this).is(':checked')) {
window.location.href = 'form_editable.html?mode=inline';
} else {
window.location.href = 'form_editable.html';
}
});
// handle editable elements on hidden event fired
$('#user .editable').on('hidden', function(e, reason) {
if (reason === 'save' || reason === 'nochange') {
var $next = $(this).closest('tr').next().find('.editable');
if ($('#autoopen').is(':checked')) {
setTimeout(function() {
$next.editable('show');
}, 300);
} else {
$next.focus();
}
}
});
}
};
}();
jQuery(document).ready(function() {
FormEditable.init();
});

1
assets/pages/scripts/form-editable.min.js

File diff suppressed because one or more lines are too long

61
assets/pages/scripts/form-fileupload.js

@ -1,61 +0,0 @@
var FormFileUpload = function () {
return {
//main function to initiate the module
init: function () {
// Initialize the jQuery File Upload widget:
$('#fileupload').fileupload({
disableImageResize: false,
autoUpload: false,
disableImageResize: /Android(?!.*Chrome)|Opera/.test(window.navigator.userAgent),
maxFileSize: 5000000,
acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
// Uncomment the following to send cross-domain cookies:
//xhrFields: {withCredentials: true},
});
// Enable iframe cross-domain access via redirect option:
$('#fileupload').fileupload(
'option',
'redirect',
window.location.href.replace(
/\/[^\/]*$/,
'/cors/result.html?%s'
)
);
// Upload server status check for browsers with CORS support:
if ($.support.cors) {
$.ajax({
type: 'HEAD'
}).fail(function () {
$('<div class="alert alert-danger"/>')
.text('Upload server currently unavailable - ' +
new Date())
.appendTo('#fileupload');
});
}
// Load & display existing files:
$('#fileupload').addClass('fileupload-processing');
$.ajax({
// Uncomment the following to send cross-domain cookies:
//xhrFields: {withCredentials: true},
url: $('#fileupload').attr("action"),
dataType: 'json',
context: $('#fileupload')[0]
}).always(function () {
$(this).removeClass('fileupload-processing');
}).done(function (result) {
$(this).fileupload('option', 'done')
.call(this, $.Event('done'), {result: result});
});
}
};
}();
jQuery(document).ready(function() {
FormFileUpload.init();
});

1
assets/pages/scripts/form-fileupload.min.js

@ -1 +0,0 @@
var FormFileUpload=function(){return{init:function(){$("#fileupload").fileupload({disableImageResize:!1,autoUpload:!1,disableImageResize:/Android(?!.*Chrome)|Opera/.test(window.navigator.userAgent),maxFileSize:5e6,acceptFileTypes:/(\.|\/)(gif|jpe?g|png)$/i}),$("#fileupload").fileupload("option","redirect",window.location.href.replace(/\/[^\/]*$/,"/cors/result.html?%s")),$.support.cors&&$.ajax({type:"HEAD"}).fail(function(){$('<div class="alert alert-danger"/>').text("Upload server currently unavailable - "+new Date).appendTo("#fileupload")}),$("#fileupload").addClass("fileupload-processing"),$.ajax({url:$("#fileupload").attr("action"),dataType:"json",context:$("#fileupload")[0]}).always(function(){$(this).removeClass("fileupload-processing")}).done(function(e){$(this).fileupload("option","done").call(this,$.Event("done"),{result:e})})}}}();jQuery(document).ready(function(){FormFileUpload.init()});

59
assets/pages/scripts/form-icheck.js

@ -1,59 +0,0 @@
var FormiCheck = function () {
return {
//main function to initiate the module
init: function () {
$('.icheck-colors li').click(function() {
var self = $(this);
if (!self.hasClass('active')) {
self.siblings().removeClass('active');
var skin = self.closest('.skin'),
color = self.attr('class') ? '-' + self.attr('class') : '',
colorTmp = skin.data('color') ? '-' + skin.data('color') : '-grey',
colorTmp = (colorTmp === '-black' ? '' : colorTmp);
checkbox_default = 'icheckbox_minimal',
radio_default = 'iradio_minimal',
checkbox = 'icheckbox_minimal' + colorTmp,
radio = 'iradio_minimal' + colorTmp;
if (skin.hasClass('skin-square')) {
checkbox_default = 'icheckbox_square';
radio_default = 'iradio_square';
checkbox = 'icheckbox_square' + colorTmp;
radio = 'iradio_square' + colorTmp;
};
if (skin.hasClass('skin-flat')) {
checkbox_default = 'icheckbox_flat';
radio_default = 'iradio_flat';
checkbox = 'icheckbox_flat' + colorTmp;
radio = 'iradio_flat' + colorTmp;
};
if (skin.hasClass('skin-line')) {
checkbox_default = 'icheckbox_line';
radio_default = 'iradio_line';
checkbox = 'icheckbox_line' + colorTmp;
radio = 'iradio_line' + colorTmp;
};
skin.find('.icheck').each(function() {
var element = $(this).hasClass('state') ? $(this) : $(this).parent();
var element_class = element.attr('class').replace(checkbox, checkbox_default + color).replace(radio, radio_default + color);
element.attr('class', element_class);
});
skin.data('color', self.attr('class') ? self.attr('class') : 'black');
self.addClass('active');
};
});
}
};
}();
jQuery(document).ready(function() {
FormiCheck.init();
});

1
assets/pages/scripts/form-icheck.min.js

@ -1 +0,0 @@
var FormiCheck=function(){return{init:function(){$(".icheck-colors li").click(function(){var a=$(this);if(!a.hasClass("active")){a.siblings().removeClass("active");var i=a.closest(".skin"),c=a.attr("class")?"-"+a.attr("class"):"",e=i.data("color")?"-"+i.data("color"):"-grey",e="-black"===e?"":e;checkbox_default="icheckbox_minimal",radio_default="iradio_minimal",checkbox="icheckbox_minimal"+e,radio="iradio_minimal"+e,i.hasClass("skin-square")&&(checkbox_default="icheckbox_square",radio_default="iradio_square",checkbox="icheckbox_square"+e,radio="iradio_square"+e),i.hasClass("skin-flat")&&(checkbox_default="icheckbox_flat",radio_default="iradio_flat",checkbox="icheckbox_flat"+e,radio="iradio_flat"+e),i.hasClass("skin-line")&&(checkbox_default="icheckbox_line",radio_default="iradio_line",checkbox="icheckbox_line"+e,radio="iradio_line"+e),i.find(".icheck").each(function(){var a=$(this).hasClass("state")?$(this):$(this).parent(),i=a.attr("class").replace(checkbox,checkbox_default+c).replace(radio,radio_default+c);a.attr("class",i)}),i.data("color",a.attr("class")?a.attr("class"):"black"),a.addClass("active")}})}}}();jQuery(document).ready(function(){FormiCheck.init()});

531
assets/pages/scripts/form-image-crop.js

@ -1,531 +0,0 @@
var FormImageCrop = function () {
var demo1 = function() {
$('#demo1').Jcrop();
}
var demo2 = function() {
var jcrop_api;
$('#demo2').Jcrop({
onChange: showCoords,
onSelect: showCoords,
onRelease: clearCoords
},function(){
jcrop_api = this;
});
$('#coords').on('change','input',function(e){
var x1 = $('#x1').val(),
x2 = $('#x2').val(),
y1 = $('#y1').val(),
y2 = $('#y2').val();
jcrop_api.setSelect([x1,y1,x2,y2]);
});
// Simple event handler, called from onChange and onSelect
// event handlers, as per the Jcrop invocation above
function showCoords(c)
{
$('#x1').val(c.x);
$('#y1').val(c.y);
$('#x2').val(c.x2);
$('#y2').val(c.y2);
$('#w').val(c.w);
$('#h').val(c.h);
};
function clearCoords()
{
$('#coords input').val('');
};
}
var demo3 = function() {
// Create variables (in this scope) to hold the API and image size
var jcrop_api,
boundx,
boundy,
// Grab some information about the preview pane
$preview = $('#preview-pane'),
$pcnt = $('#preview-pane .preview-container'),
$pimg = $('#preview-pane .preview-container img'),
xsize = $pcnt.width(),
ysize = $pcnt.height();
console.log('init',[xsize,ysize]);
$('#demo3').Jcrop({
onChange: updatePreview,
onSelect: updatePreview,
aspectRatio: xsize / ysize
},function(){
// Use the API to get the real image size
var bounds = this.getBounds();
boundx = bounds[0];
boundy = bounds[1];
// Store the API in the jcrop_api variable
jcrop_api = this;
// Move the preview into the jcrop container for css positioning
$preview.appendTo(jcrop_api.ui.holder);
});
function updatePreview(c)
{
if (parseInt(c.w) > 0)
{
var rx = xsize / c.w;
var ry = ysize / c.h;
$pimg.css({
width: Math.round(rx * boundx) + 'px',
height: Math.round(ry * boundy) + 'px',
marginLeft: '-' + Math.round(rx * c.x) + 'px',
marginTop: '-' + Math.round(ry * c.y) + 'px'
});
}
};
}
var demo4 = function() {
var jcrop_api;
$('#demo4').Jcrop({
bgFade: true,
bgOpacity: .2,
setSelect: [ 60, 70, 540, 330 ]
},function(){
jcrop_api = this;
});
$('#fadetog').change(function(){
jcrop_api.setOptions({
bgFade: this.checked
});
}).attr('checked', true);
App.updateUniform('#fadetog');
$('#shadetog').change(function(){
if (this.checked) $('#shadetxt').slideDown();
else $('#shadetxt').slideUp();
jcrop_api.setOptions({
shade: this.checked
});
}).attr('checked', false);
// Define page sections
var sections = {
bgc_buttons: 'Change bgColor',
bgo_buttons: 'Change bgOpacity',
anim_buttons: 'Animate Selection'
};
// Define animation buttons
var ac = {
anim1: [217,122,382,284],
anim2: [20,20,580,380],
anim3: [24,24,176,376],
anim4: [347,165,550,355],
anim5: [136,55,472,183]
};
// Define bgOpacity buttons
var bgo = {
Low: .2,
Mid: .5,
High: .8,
Full: 1
};
// Define bgColor buttons
var bgc = {
R: '#900',
B: '#4BB6F0',
Y: '#F0B207',
G: '#46B81C',
W: 'white',
K: 'black'
};
// Create fieldset targets for buttons
for(i in sections)
insertSection(i,sections[i]);
function create_btn(c) {
var $o = $('<button />').addClass('btn small');
if (c) $o.append(c);
return $o;
}
var a_count = 1;
// Create animation buttons
for(i in ac) {
$('#anim_buttons .btn-group')
.append(
create_btn(a_count++).click(animHandler(ac[i])),
' '
);
}
$('#anim_buttons .btn-group').append(
create_btn('Bye!').click(function(e){
$(e.target).addClass('active');
jcrop_api.animateTo(
[300,200,300,200],
function(){
this.release();
$(e.target).closest('.btn-group').find('.active').removeClass('active');
}
);
return false;
})
);
// Create bgOpacity buttons
for(i in bgo) {
$('#bgo_buttons .btn-group').append(
create_btn(i).click(setoptHandler('bgOpacity',bgo[i])),
' '
);
}
// Create bgColor buttons
for(i in bgc) {
$('#bgc_buttons .btn-group').append(
create_btn(i).css({
background: bgc[i],
color: ((i == 'K') || (i == 'R'))?'white':'black'
}).click(setoptHandler('bgColor',bgc[i])), ' '
);
}
// Function to insert named sections into interface
function insertSection(k,v) {
$('#interface').prepend(
$('<fieldset></fieldset>').attr('id',k).append(
$('<h4></h4>').append(v),
'<div class="btn-toolbar"><div class="btn-group"></div></div>'
)
);
};
// Handler for option-setting buttons
function setoptHandler(k,v) {
return function(e) {
$(e.target).closest('.btn-group').find('.active').removeClass('active');
$(e.target).addClass('active');
var opt = { };
opt[k] = v;
jcrop_api.setOptions(opt);
return false;
};
};
// Handler for animation buttons
function animHandler(v) {
return function(e) {
$(e.target).addClass('active');
jcrop_api.animateTo(v,function(){
$(e.target).closest('.btn-group').find('.active').removeClass('active');
});
return false;
};
};
$('#bgo_buttons .btn:first,#bgc_buttons .btn:last').addClass('active');
$('#interface').show();
}
var demo5 = function() {
// The variable jcrop_api will hold a reference to the
// Jcrop API once Jcrop is instantiated.
var jcrop_api;
// In this example, since Jcrop may be attached or detached
// at the whim of the user, I've wrapped the call into a function
initJcrop();
// The function is pretty simple
function initJcrop()//{{{
{
// Hide any interface elements that require Jcrop
// (This is for the local user interface portion.)
$('.requiresjcrop').hide();
// Invoke Jcrop in typical fashion
$('#demo5').Jcrop({
onRelease: releaseCheck
},function(){
jcrop_api = this;
jcrop_api.animateTo([100,100,400,300]);
// Setup and dipslay the interface for "enabled"
$('#can_click,#can_move,#can_size').attr('checked','checked');
App.updateUniform('#can_click,#can_move,#can_size');
$('#ar_lock,#size_lock,#bg_swap').attr('checked',false);
App.updateUniform('#ar_lock,#size_lock,#bg_swap');
$('.requiresjcrop').show();
});
};
//}}}
// Use the API to find cropping dimensions
// Then generate a random selection
// This function is used by setSelect and animateTo buttons
// Mainly for demonstration purposes
function getRandom() {
var dim = jcrop_api.getBounds();
return [
Math.round(Math.random() * dim[0]),
Math.round(Math.random() * dim[1]),
Math.round(Math.random() * dim[0]),
Math.round(Math.random() * dim[1])
];
};
// This function is bound to the onRelease handler...
// In certain circumstances (such as if you set minSize
// and aspectRatio together), you can inadvertently lose
// the selection. This callback re-enables creating selections
// in such a case. Although the need to do this is based on a
// buggy behavior, it's recommended that you in some way trap
// the onRelease callback if you use allowSelect: false
function releaseCheck()
{
jcrop_api.setOptions({ allowSelect: true });
$('#can_click').attr('checked',false);
App.updateUniform('#can_click');
};
// Attach interface buttons
// This may appear to be a lot of code but it's simple stuff
$('#setSelect').click(function(e) {
// Sets a random selection
jcrop_api.setSelect(getRandom());
});
$('#animateTo').click(function(e) {
// Animates to a random selection
jcrop_api.animateTo(getRandom());
});
$('#release').click(function(e) {
// Release method clears the selection
jcrop_api.release();
});
$('#disable').click(function(e) {
// Disable Jcrop instance
jcrop_api.disable();
// Update the interface to reflect disabled state
$('#enable').show();
$('.requiresjcrop').hide();
});
$('#enable').click(function(e) {
// Re-enable Jcrop instance
jcrop_api.enable();
// Update the interface to reflect enabled state
$('#enable').hide();
$('.requiresjcrop').show();
});
$('#rehook').click(function(e) {
// This button is visible when Jcrop has been destroyed
// It performs the re-attachment and updates the UI
$('#rehook,#enable').hide();
initJcrop();
$('#unhook,.requiresjcrop').show();
return false;
});
$('#unhook').click(function(e) {
// Destroy Jcrop widget, restore original state
jcrop_api.destroy();
// Update the interface to reflect un-attached state
$('#unhook,#enable,.requiresjcrop').hide();
$('#rehook').show();
return false;
});
// Hook up the three image-swapping buttons
$('#img1').click(function(e) {
$(this).addClass('active').closest('.btn-group')
.find('button.active').not(this).removeClass('active');
jcrop_api.setImage('../../assets/global/plugins/jcrop/demos/demo_files/sago.jpg');
jcrop_api.setOptions({ bgOpacity: .6 });
return false;
});
$('#img2').click(function(e) {
$(this).addClass('active').closest('.btn-group')
.find('button.active').not(this).removeClass('active');
jcrop_api.setImage('../../assets/global/plugins/jcrop/demos/demo_files/pool.jpg');
jcrop_api.setOptions({ bgOpacity: .6 });
return false;
});
$('#img3').click(function(e) {
$(this).addClass('active').closest('.btn-group')
.find('button.active').not(this).removeClass('active');
jcrop_api.setImage('../../assets/global/plugins/jcrop/demos/demo_files/sago.jpg',function(){
this.setOptions({
bgOpacity: 1,
outerImage: '../../assets/global/plugins/jcrop/demos/demo_files/sagomod.jpg'
});
this.animateTo(getRandom());
});
return false;
});
// The checkboxes simply set options based on it's checked value
// Options are changed by passing a new options object
// Also, to prevent strange behavior, they are initially checked
// This matches the default initial state of Jcrop
$('#can_click').change(function(e) {
jcrop_api.setOptions({ allowSelect: !!this.checked });
jcrop_api.focus();
});
$('#can_move').change(function(e) {
jcrop_api.setOptions({ allowMove: !!this.checked });
jcrop_api.focus();
});
$('#can_size').change(function(e) {
jcrop_api.setOptions({ allowResize: !!this.checked });
jcrop_api.focus();
});
$('#ar_lock').change(function(e) {
jcrop_api.setOptions(this.checked?
{ aspectRatio: 4/3 }: { aspectRatio: 0 });
jcrop_api.focus();
});
$('#size_lock').change(function(e) {
jcrop_api.setOptions(this.checked? {
minSize: [ 80, 80 ],
maxSize: [ 350, 350 ]
}: {
minSize: [ 0, 0 ],
maxSize: [ 0, 0 ]
});
jcrop_api.focus();
});
}
var demo6 = function() {
var api;
$('#demo6').Jcrop({
// start off with jcrop-light class
bgOpacity: 0.5,
bgColor: 'white',
addClass: 'jcrop-light'
},function(){
api = this;
api.setSelect([130,65,130+350,65+285]);
api.setOptions({ bgFade: true });
api.ui.selection.addClass('jcrop-selection');
});
$('#buttonbar').on('click','button',function(e){
var $t = $(this), $g = $t.closest('.btn-group');
$g.find('button.active').removeClass('active');
$t.addClass('active');
$g.find('[data-setclass]').each(function(){
var $th = $(this), c = $th.data('setclass'),
a = $th.hasClass('active');
if (a) {
api.ui.holder.addClass(c);
switch(c){
case 'jcrop-light':
api.setOptions({ bgColor: 'white', bgOpacity: 0.5 });
break;
case 'jcrop-dark':
api.setOptions({ bgColor: 'black', bgOpacity: 0.4 });
break;
case 'jcrop-normal':
api.setOptions({
bgColor: $.Jcrop.defaults.bgColor,
bgOpacity: $.Jcrop.defaults.bgOpacity
});
break;
}
}
else api.ui.holder.removeClass(c);
});
});
}
var demo7 = function() {
// I did JSON.stringify(jcrop_api.tellSelect()) on a crop I liked:
var c = {"x":13,"y":7,"x2":487,"y2":107,"w":474,"h":100};
$('#demo7').Jcrop({
bgFade: true,
setSelect: [c.x,c.y,c.x2,c.y2]
});
}
var demo8 = function() {
$('#demo8').Jcrop({
aspectRatio: 1,
onSelect: updateCoords
});
function updateCoords(c)
{
$('#crop_x').val(c.x);
$('#crop_y').val(c.y);
$('#crop_w').val(c.w);
$('#crop_h').val(c.h);
};
$('#demo8_form').submit(function(){
if (parseInt($('#crop_w').val())) return true;
alert('Please select a crop region then press submit.');
return false;
});
}
var handleResponsive = function() {
if ($(window).width() <= 1024 && $(window).width() >= 678) {
$('.responsive-1024').each(function(){
$(this).attr("data-class", $(this).attr("class"));
$(this).attr("class", 'responsive-1024 col-md-12');
});
} else {
$('.responsive-1024').each(function(){
if ($(this).attr("data-class")) {
$(this).attr("class", $(this).attr("data-class"));
$(this).removeAttr("data-class");
}
});
}
}
return {
//main function to initiate the module
init: function () {
if (!jQuery().Jcrop) {;
return;
}
App.addResizeHandler(handleResponsive);
handleResponsive();
demo1();
demo2();
demo3();
demo4();
demo5();
demo6();
demo7();
demo8();
}
};
}();
jQuery(document).ready(function() {
FormImageCrop.init();
});

1
assets/pages/scripts/form-image-crop.min.js

File diff suppressed because one or more lines are too long

66
assets/pages/scripts/form-input-mask.js

@ -1,66 +0,0 @@
var FormInputMask = function () {
var handleInputMasks = function () {
$("#mask_date").inputmask("d/m/y", {
autoUnmask: true
}); //direct mask
$("#mask_date1").inputmask("d/m/y", {
"placeholder": "*"
}); //change the placeholder
$("#mask_date2").inputmask("d/m/y", {
"placeholder": "dd/mm/yyyy"
}); //multi-char placeholder
$("#mask_phone").inputmask("mask", {
"mask": "(999) 999-9999"
}); //specifying fn & options
$("#mask_tin").inputmask({
"mask": "99-9999999",
placeholder: "" // remove underscores from the input mask
}); //specifying options only
$("#mask_number").inputmask({
"mask": "9",
"repeat": 10,
"greedy": false
}); // ~ mask "9" or mask "99" or ... mask "9999999999"
$("#mask_decimal").inputmask('decimal', {
rightAlignNumerics: false
}); //disables the right alignment of the decimal input
$("#mask_currency").inputmask('€ 999.999.999,99', {
numericInput: true
}); //123456 => € ___.__1.234,56
$("#mask_currency2").inputmask('€ 999,999,999.99', {
numericInput: true,
rightAlignNumerics: false,
greedy: false
}); //123456 => € ___.__1.234,56
$("#mask_ssn").inputmask("999-99-9999", {
placeholder: " ",
clearMaskOnLostFocus: true
}); //default
}
var handleIPAddressInput = function () {
$('#input_ipv4').ipAddress();
$('#input_ipv6').ipAddress({
v: 6
});
}
return {
//main function to initiate the module
init: function () {
handleInputMasks();
handleIPAddressInput();
}
};
}();
if (App.isAngularJsApp() === false) {
jQuery(document).ready(function() {
FormInputMask.init(); // init metronic core componets
});
}

1
assets/pages/scripts/form-input-mask.min.js

@ -1 +0,0 @@
var FormInputMask=function(){var a=function(){$("#mask_date").inputmask("d/m/y",{autoUnmask:!0}),$("#mask_date1").inputmask("d/m/y",{placeholder:"*"}),$("#mask_date2").inputmask("d/m/y",{placeholder:"dd/mm/yyyy"}),$("#mask_phone").inputmask("mask",{mask:"(999) 999-9999"}),$("#mask_tin").inputmask({mask:"99-9999999",placeholder:""}),$("#mask_number").inputmask({mask:"9",repeat:10,greedy:!1}),$("#mask_decimal").inputmask("decimal",{rightAlignNumerics:!1}),$("#mask_currency").inputmask("€ 999.999.999,99",{numericInput:!0}),$("#mask_currency2").inputmask("€ 999,999,999.99",{numericInput:!0,rightAlignNumerics:!1,greedy:!1}),$("#mask_ssn").inputmask("999-99-9999",{placeholder:" ",clearMaskOnLostFocus:!0})},n=function(){$("#input_ipv4").ipAddress(),$("#input_ipv6").ipAddress({v:6})};return{init:function(){a(),n()}}}();App.isAngularJsApp()===!1&&jQuery(document).ready(function(){FormInputMask.init()});

16
assets/pages/scripts/form-samples.js

@ -1,16 +0,0 @@
var FormSamples = function () {
return {
//main function to initiate the module
init: function () {
}
};
}();
jQuery(document).ready(function() {
FormSamples.init();
});

1
assets/pages/scripts/form-samples.min.js

@ -1 +0,0 @@
var FormSamples=function(){return{init:function(){}}}();jQuery(document).ready(function(){FormSamples.init()});

391
assets/pages/scripts/form-validation-md.js

@ -1,391 +0,0 @@
var FormValidationMd = function() {
var handleValidation1 = function() {
// for more info visit the official plugin documentation:
// http://docs.jquery.com/Plugins/Validation
var form1 = $('#form_sample_1');
var error1 = $('.alert-danger', form1);
var success1 = $('.alert-success', form1);
form1.validate({
errorElement: 'span', //default input error message container
errorClass: 'help-block help-block-error', // default input error message class
focusInvalid: false, // do not focus the last invalid input
ignore: "", // validate all fields including form hidden input
messages: {
payment: {
maxlength: jQuery.validator.format("Max {0} items allowed for selection"),
minlength: jQuery.validator.format("At least {0} items must be selected")
},
'checkboxes1[]': {
required: 'Please check some options',
minlength: jQuery.validator.format("At least {0} items must be selected"),
},
'checkboxes2[]': {
required: 'Please check some options',
minlength: jQuery.validator.format("At least {0} items must be selected"),
}
},
rules: {
name: {
minlength: 2,
required: true
},
email: {
required: true,
email: true
},
email2: {
required: true,
email: true
},
url: {
required: true,
url: true
},
url2: {
required: true,
url: true
},
number: {
required: true,
number: true
},
number2: {
required: true,
number: true
},
digits: {
required: true,
digits: true
},
creditcard: {
required: true,
creditcard: true
},
delivery: {
required: true
},
payment: {
required: true,
minlength: 2,
maxlength: 4
},
memo: {
required: true,
minlength: 10,
maxlength: 40
},
'checkboxes1[]': {
required: true,
minlength: 2,
},
'checkboxes2[]': {
required: true,
minlength: 3,
},
radio1: {
required: true
},
radio2: {
required: true
}
},
invalidHandler: function(event, validator) { //display error alert on form submit
success1.hide();
error1.show();
App.scrollTo(error1, -200);
},
errorPlacement: function(error, element) {
if (element.is(':checkbox')) {
error.insertAfter(element.closest(".md-checkbox-list, .md-checkbox-inline, .checkbox-list, .checkbox-inline"));
} else if (element.is(':radio')) {
error.insertAfter(element.closest(".md-radio-list, .md-radio-inline, .radio-list,.radio-inline"));
} else {
error.insertAfter(element); // for other inputs, just perform default behavior
}
},
highlight: function(element) { // hightlight error inputs
$(element)
.closest('.form-group').addClass('has-error'); // set error class to the control group
},
unhighlight: function(element) { // revert the change done by hightlight
$(element)
.closest('.form-group').removeClass('has-error'); // set error class to the control group
},
success: function(label) {
label
.closest('.form-group').removeClass('has-error'); // set success class to the control group
},
submitHandler: function(form) {
success1.show();
error1.hide();
}
});
}
var handleValidation2 = function() {
// for more info visit the official plugin documentation:
// http://docs.jquery.com/Plugins/Validation
var form1 = $('#form_sample_2');
var error1 = $('.alert-danger', form1);
var success1 = $('.alert-success', form1);
form1.validate({
errorElement: 'span', //default input error message container
errorClass: 'help-block help-block-error', // default input error message class
focusInvalid: false, // do not focus the last invalid input
ignore: "", // validate all fields including form hidden input
messages: {
payment: {
maxlength: jQuery.validator.format("Max {0} items allowed for selection"),
minlength: jQuery.validator.format("At least {0} items must be selected")
},
'checkboxes1[]': {
required: 'Please check some options',
minlength: jQuery.validator.format("At least {0} items must be selected"),
},
'checkboxes2[]': {
required: 'Please check some options',
minlength: jQuery.validator.format("At least {0} items must be selected"),
}
},
rules: {
name: {
minlength: 2,
required: true
},
email: {
required: true,
email: true
},
email2: {
required: true,
email: true
},
url: {
required: true,
url: true
},
url2: {
required: true,
url: true
},
number: {
required: true,
number: true
},
number2: {
required: true,
number: true
},
digits: {
required: true,
digits: true
},
creditcard: {
required: true,
creditcard: true
},
delivery: {
required: true
},
payment: {
required: true,
minlength: 2,
maxlength: 4
},
memo: {
required: true,
minlength: 10,
maxlength: 40
},
'checkboxes1[]': {
required: true,
minlength: 2,
},
'checkboxes2[]': {
required: true,
minlength: 3,
},
radio1: {
required: true
},
radio2: {
required: true
}
},
invalidHandler: function(event, validator) { //display error alert on form submit
success1.hide();
error1.show();
App.scrollTo(error1, -200);
},
errorPlacement: function(error, element) {
if (element.is(':checkbox')) {
error.insertAfter(element.closest(".md-checkbox-list, .md-checkbox-inline, .checkbox-list, .checkbox-inline"));
} else if (element.is(':radio')) {
error.insertAfter(element.closest(".md-radio-list, .md-radio-inline, .radio-list,.radio-inline"));
} else {
error.insertAfter(element); // for other inputs, just perform default behavior
}
},
highlight: function(element) { // hightlight error inputs
$(element)
.closest('.form-group').addClass('has-error'); // set error class to the control group
},
unhighlight: function(element) { // revert the change done by hightlight
$(element)
.closest('.form-group').removeClass('has-error'); // set error class to the control group
},
success: function(label) {
label
.closest('.form-group').removeClass('has-error'); // set success class to the control group
},
submitHandler: function(form) {
success1.show();
error1.hide();
}
});
}
var handleValidation3 = function() {
// for more info visit the official plugin documentation:
// http://docs.jquery.com/Plugins/Validation
var form1 = $('#form_sample_3');
var error1 = $('.alert-danger', form1);
var success1 = $('.alert-success', form1);
form1.validate({
errorElement: 'span', //default input error message container
errorClass: 'help-block help-block-error', // default input error message class
focusInvalid: false, // do not focus the last invalid input
ignore: "", // validate all fields including form hidden input
messages: {
payment: {
maxlength: jQuery.validator.format("Max {0} items allowed for selection"),
minlength: jQuery.validator.format("At least {0} items must be selected")
},
'checkboxes1[]': {
required: 'Please check some options',
minlength: jQuery.validator.format("At least {0} items must be selected"),
},
'checkboxes2[]': {
required: 'Please check some options',
minlength: jQuery.validator.format("At least {0} items must be selected"),
}
},
rules: {
name: {
minlength: 2,
required: true
},
email: {
required: true,
email: true
},
email2: {
required: true,
email: true
},
url: {
required: true,
url: true
},
url2: {
required: true,
url: true
},
number: {
required: true,
number: true
},
number2: {
required: true,
number: true
},
digits: {
required: true,
digits: true
},
creditcard: {
required: true,
creditcard: true
},
delivery: {
required: true
},
payment: {
required: true,
minlength: 2,
maxlength: 4
},
memo: {
required: true,
minlength: 10,
maxlength: 40
}
},
invalidHandler: function(event, validator) { //display error alert on form submit
success1.hide();
error1.show();
App.scrollTo(error1, -200);
},
errorPlacement: function(error, element) {
if (element.is(':checkbox')) {
error.insertAfter(element.closest(".md-checkbox-list, .md-checkbox-inline, .checkbox-list, .checkbox-inline"));
} else if (element.is(':radio')) {
error.insertAfter(element.closest(".md-radio-list, .md-radio-inline, .radio-list,.radio-inline"));
} else {
error.insertAfter(element); // for other inputs, just perform default behavior
}
},
highlight: function(element) { // hightlight error inputs
$(element)
.closest('.form-group').addClass('has-error'); // set error class to the control group
},
unhighlight: function(element) { // revert the change done by hightlight
$(element)
.closest('.form-group').removeClass('has-error'); // set error class to the control group
},
success: function(label) {
label
.closest('.form-group').removeClass('has-error'); // set success class to the control group
},
submitHandler: function(form) {
success1.show();
error1.hide();
}
});
}
return {
//main function to initiate the module
init: function() {
handleValidation1();
handleValidation2();
handleValidation3();
}
};
}();
jQuery(document).ready(function() {
FormValidationMd.init();
});

1
assets/pages/scripts/form-validation-md.min.js

File diff suppressed because one or more lines are too long

338
assets/pages/scripts/form-validation.js

@ -1,338 +0,0 @@
var FormValidation = function () {
// basic validation
var handleValidation1 = function() {
// for more info visit the official plugin documentation:
// http://docs.jquery.com/Plugins/Validation
var form1 = $('#form_sample_1');
var error1 = $('.alert-danger', form1);
var success1 = $('.alert-success', form1);
form1.validate({
errorElement: 'span', //default input error message container
errorClass: 'help-block help-block-error', // default input error message class
focusInvalid: false, // do not focus the last invalid input
ignore: "", // validate all fields including form hidden input
messages: {
select_multi: {
maxlength: jQuery.validator.format("Max {0} items allowed for selection"),
minlength: jQuery.validator.format("At least {0} items must be selected")
}
},
rules: {
name: {
minlength: 2,
required: true
},
email: {
required: true,
email: true
},
url: {
required: true,
url: true
},
number: {
required: true,
number: true
},
digits: {
required: true,
digits: true
},
creditcard: {
required: true,
creditcard: true
},
occupation: {
minlength: 5,
},
select: {
required: true
},
select_multi: {
required: true,
minlength: 1,
maxlength: 3
}
},
invalidHandler: function (event, validator) { //display error alert on form submit
success1.hide();
error1.show();
App.scrollTo(error1, -200);
},
highlight: function (element) { // hightlight error inputs
$(element)
.closest('.form-group').addClass('has-error'); // set error class to the control group
},
unhighlight: function (element) { // revert the change done by hightlight
$(element)
.closest('.form-group').removeClass('has-error'); // set error class to the control group
},
success: function (label) {
label
.closest('.form-group').removeClass('has-error'); // set success class to the control group
},
submitHandler: function (form) {
success1.show();
error1.hide();
}
});
}
// validation using icons
var handleValidation2 = function() {
// for more info visit the official plugin documentation:
// http://docs.jquery.com/Plugins/Validation
var form2 = $('#form_sample_2');
var error2 = $('.alert-danger', form2);
var success2 = $('.alert-success', form2);
form2.validate({
errorElement: 'span', //default input error message container
errorClass: 'help-block help-block-error', // default input error message class
focusInvalid: false, // do not focus the last invalid input
ignore: "", // validate all fields including form hidden input
rules: {
name: {
minlength: 2,
required: true
},
email: {
required: true,
email: true
},
email: {
required: true,
email: true
},
url: {
required: true,
url: true
},
number: {
required: true,
number: true
},
digits: {
required: true,
digits: true
},
creditcard: {
required: true,
creditcard: true
},
},
invalidHandler: function (event, validator) { //display error alert on form submit
success2.hide();
error2.show();
App.scrollTo(error2, -200);
},
errorPlacement: function (error, element) { // render error placement for each input type
var icon = $(element).parent('.input-icon').children('i');
icon.removeClass('fa-check').addClass("fa-warning");
icon.attr("data-original-title", error.text()).tooltip({'container': 'body'});
},
highlight: function (element) { // hightlight error inputs
$(element)
.closest('.form-group').removeClass("has-success").addClass('has-error'); // set error class to the control group
},
unhighlight: function (element) { // revert the change done by hightlight
},
success: function (label, element) {
var icon = $(element).parent('.input-icon').children('i');
$(element).closest('.form-group').removeClass('has-error').addClass('has-success'); // set success class to the control group
icon.removeClass("fa-warning").addClass("fa-check");
},
submitHandler: function (form) {
success2.show();
error2.hide();
form[0].submit(); // submit the form
}
});
}
// advance validation
var handleValidation3 = function() {
// for more info visit the official plugin documentation:
// http://docs.jquery.com/Plugins/Validation
var form3 = $('#form_sample_3');
var error3 = $('.alert-danger', form3);
var success3 = $('.alert-success', form3);
//IMPORTANT: update CKEDITOR textarea with actual content before submit
form3.on('submit', function() {
for(var instanceName in CKEDITOR.instances) {
CKEDITOR.instances[instanceName].updateElement();
}
})
form3.validate({
errorElement: 'span', //default input error message container
errorClass: 'help-block help-block-error', // default input error message class
focusInvalid: false, // do not focus the last invalid input
ignore: "", // validate all fields including form hidden input
rules: {
name: {
minlength: 2,
required: true
},
email: {
required: true,
email: true
},
options1: {
required: true
},
options2: {
required: true
},
select2tags: {
required: true
},
datepicker: {
required: true
},
occupation: {
minlength: 5,
},
membership: {
required: true
},
service: {
required: true,
minlength: 2
},
markdown: {
required: true
},
editor1: {
required: true
},
editor2: {
required: true
}
},
messages: { // custom messages for radio buttons and checkboxes
membership: {
required: "Please select a Membership type"
},
service: {
required: "Please select at least 2 types of Service",
minlength: jQuery.validator.format("Please select at least {0} types of Service")
}
},
errorPlacement: function (error, element) { // render error placement for each input type
if (element.parent(".input-group").size() > 0) {
error.insertAfter(element.parent(".input-group"));
} else if (element.attr("data-error-container")) {
error.appendTo(element.attr("data-error-container"));
} else if (element.parents('.radio-list').size() > 0) {
error.appendTo(element.parents('.radio-list').attr("data-error-container"));
} else if (element.parents('.radio-inline').size() > 0) {
error.appendTo(element.parents('.radio-inline').attr("data-error-container"));
} else if (element.parents('.checkbox-list').size() > 0) {
error.appendTo(element.parents('.checkbox-list').attr("data-error-container"));
} else if (element.parents('.checkbox-inline').size() > 0) {
error.appendTo(element.parents('.checkbox-inline').attr("data-error-container"));
} else {
error.insertAfter(element); // for other inputs, just perform default behavior
}
},
invalidHandler: function (event, validator) { //display error alert on form submit
success3.hide();
error3.show();
App.scrollTo(error3, -200);
},
highlight: function (element) { // hightlight error inputs
$(element)
.closest('.form-group').addClass('has-error'); // set error class to the control group
},
unhighlight: function (element) { // revert the change done by hightlight
$(element)
.closest('.form-group').removeClass('has-error'); // set error class to the control group
},
success: function (label) {
label
.closest('.form-group').removeClass('has-error'); // set success class to the control group
},
submitHandler: function (form) {
success3.show();
error3.hide();
form[0].submit(); // submit the form
}
});
//apply validation on select2 dropdown value change, this only needed for chosen dropdown integration.
$('.select2me', form3).change(function () {
form3.validate().element($(this)); //revalidate the chosen dropdown value and show error or success message for the input
});
//initialize datepicker
$('.date-picker').datepicker({
rtl: App.isRTL(),
autoclose: true
});
$('.date-picker .form-control').change(function() {
form3.validate().element($(this)); //revalidate the chosen dropdown value and show error or success message for the input
})
}
var handleWysihtml5 = function() {
if (!jQuery().wysihtml5) {
return;
}
if ($('.wysihtml5').size() > 0) {
$('.wysihtml5').wysihtml5({
"stylesheets": ["../assets/global/plugins/bootstrap-wysihtml5/wysiwyg-color.css"]
});
}
}
return {
//main function to initiate the module
init: function () {
handleWysihtml5();
handleValidation1();
handleValidation2();
handleValidation3();
}
};
}();
jQuery(document).ready(function() {
FormValidation.init();
});

1
assets/pages/scripts/form-validation.min.js

@ -1 +0,0 @@
var FormValidation=function(){var e=function(){var e=$("#form_sample_1"),r=$(".alert-danger",e),i=$(".alert-success",e);e.validate({errorElement:"span",errorClass:"help-block help-block-error",focusInvalid:!1,ignore:"",messages:{select_multi:{maxlength:jQuery.validator.format("Max {0} items allowed for selection"),minlength:jQuery.validator.format("At least {0} items must be selected")}},rules:{name:{minlength:2,required:!0},email:{required:!0,email:!0},url:{required:!0,url:!0},number:{required:!0,number:!0},digits:{required:!0,digits:!0},creditcard:{required:!0,creditcard:!0},occupation:{minlength:5},select:{required:!0},select_multi:{required:!0,minlength:1,maxlength:3}},invalidHandler:function(e,t){i.hide(),r.show(),App.scrollTo(r,-200)},highlight:function(e){$(e).closest(".form-group").addClass("has-error")},unhighlight:function(e){$(e).closest(".form-group").removeClass("has-error")},success:function(e){e.closest(".form-group").removeClass("has-error")},submitHandler:function(e){i.show(),r.hide()}})},r=function(){var e=$("#form_sample_2"),r=$(".alert-danger",e),i=$(".alert-success",e);e.validate({errorElement:"span",errorClass:"help-block help-block-error",focusInvalid:!1,ignore:"",rules:{name:{minlength:2,required:!0},email:{required:!0,email:!0},email:{required:!0,email:!0},url:{required:!0,url:!0},number:{required:!0,number:!0},digits:{required:!0,digits:!0},creditcard:{required:!0,creditcard:!0}},invalidHandler:function(e,t){i.hide(),r.show(),App.scrollTo(r,-200)},errorPlacement:function(e,r){var i=$(r).parent(".input-icon").children("i");i.removeClass("fa-check").addClass("fa-warning"),i.attr("data-original-title",e.text()).tooltip({container:"body"})},highlight:function(e){$(e).closest(".form-group").removeClass("has-success").addClass("has-error")},unhighlight:function(e){},success:function(e,r){var i=$(r).parent(".input-icon").children("i");$(r).closest(".form-group").removeClass("has-error").addClass("has-success"),i.removeClass("fa-warning").addClass("fa-check")},submitHandler:function(e){i.show(),r.hide(),e[0].submit()}})},i=function(){var e=$("#form_sample_3"),r=$(".alert-danger",e),i=$(".alert-success",e);e.on("submit",function(){for(var e in CKEDITOR.instances)CKEDITOR.instances[e].updateElement()}),e.validate({errorElement:"span",errorClass:"help-block help-block-error",focusInvalid:!1,ignore:"",rules:{name:{minlength:2,required:!0},email:{required:!0,email:!0},options1:{required:!0},options2:{required:!0},select2tags:{required:!0},datepicker:{required:!0},occupation:{minlength:5},membership:{required:!0},service:{required:!0,minlength:2},markdown:{required:!0},editor1:{required:!0},editor2:{required:!0}},messages:{membership:{required:"Please select a Membership type"},service:{required:"Please select at least 2 types of Service",minlength:jQuery.validator.format("Please select at least {0} types of Service")}},errorPlacement:function(e,r){r.parent(".input-group").size()>0?e.insertAfter(r.parent(".input-group")):r.attr("data-error-container")?e.appendTo(r.attr("data-error-container")):r.parents(".radio-list").size()>0?e.appendTo(r.parents(".radio-list").attr("data-error-container")):r.parents(".radio-inline").size()>0?e.appendTo(r.parents(".radio-inline").attr("data-error-container")):r.parents(".checkbox-list").size()>0?e.appendTo(r.parents(".checkbox-list").attr("data-error-container")):r.parents(".checkbox-inline").size()>0?e.appendTo(r.parents(".checkbox-inline").attr("data-error-container")):e.insertAfter(r)},invalidHandler:function(e,t){i.hide(),r.show(),App.scrollTo(r,-200)},highlight:function(e){$(e).closest(".form-group").addClass("has-error")},unhighlight:function(e){$(e).closest(".form-group").removeClass("has-error")},success:function(e){e.closest(".form-group").removeClass("has-error")},submitHandler:function(e){i.show(),r.hide(),e[0].submit()}}),$(".select2me",e).change(function(){e.validate().element($(this))}),$(".date-picker").datepicker({rtl:App.isRTL(),autoclose:!0}),$(".date-picker .form-control").change(function(){e.validate().element($(this))})},t=function(){jQuery().wysihtml5&&$(".wysihtml5").size()>0&&$(".wysihtml5").wysihtml5({stylesheets:["../assets/global/plugins/bootstrap-wysihtml5/wysiwyg-color.css"]})};return{init:function(){t(),e(),r(),i()}}}();jQuery(document).ready(function(){FormValidation.init()});

260
assets/pages/scripts/form-wizard.js

@ -1,260 +0,0 @@
var FormWizard = function () {
return {
//main function to initiate the module
init: function () {
if (!jQuery().bootstrapWizard) {
return;
}
function format(state) {
if (!state.id) return state.text; // optgroup
return "<img class='flag' src='../../assets/global/img/flags/" + state.id.toLowerCase() + ".png'/>&nbsp;&nbsp;" + state.text;
}
$("#country_list").select2({
placeholder: "Select",
allowClear: true,
formatResult: format,
width: 'auto',
formatSelection: format,
escapeMarkup: function (m) {
return m;
}
});
var form = $('#submit_form');
var error = $('.alert-danger', form);
var success = $('.alert-success', form);
form.validate({
doNotHideMessage: true, //this option enables to show the error/success messages on tab switch.
errorElement: 'span', //default input error message container
errorClass: 'help-block help-block-error', // default input error message class
focusInvalid: false, // do not focus the last invalid input
rules: {
//account
username: {
minlength: 5,
required: true
},
password: {
minlength: 5,
required: true
},
rpassword: {
minlength: 5,
required: true,
equalTo: "#submit_form_password"
},
//profile
fullname: {
required: true
},
email: {
required: true,
email: true
},
phone: {
required: true
},
gender: {
required: true
},
address: {
required: true
},
city: {
required: true
},
country: {
required: true
},
//payment
card_name: {
required: true
},
card_number: {
minlength: 16,
maxlength: 16,
required: true
},
card_cvc: {
digits: true,
required: true,
minlength: 3,
maxlength: 4
},
card_expiry_date: {
required: true
},
'payment[]': {
required: true,
minlength: 1
}
},
messages: { // custom messages for radio buttons and checkboxes
'payment[]': {
required: "Please select at least one option",
minlength: jQuery.validator.format("Please select at least one option")
}
},
errorPlacement: function (error, element) { // render error placement for each input type
if (element.attr("name") == "gender") { // for uniform radio buttons, insert the after the given container
error.insertAfter("#form_gender_error");
} else if (element.attr("name") == "payment[]") { // for uniform checkboxes, insert the after the given container
error.insertAfter("#form_payment_error");
} else {
error.insertAfter(element); // for other inputs, just perform default behavior
}
},
invalidHandler: function (event, validator) { //display error alert on form submit
success.hide();
error.show();
App.scrollTo(error, -200);
},
highlight: function (element) { // hightlight error inputs
$(element)
.closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group
},
unhighlight: function (element) { // revert the change done by hightlight
$(element)
.closest('.form-group').removeClass('has-error'); // set error class to the control group
},
success: function (label) {
if (label.attr("for") == "gender" || label.attr("for") == "payment[]") { // for checkboxes and radio buttons, no need to show OK icon
label
.closest('.form-group').removeClass('has-error').addClass('has-success');
label.remove(); // remove error label here
} else { // display success icon for other inputs
label
.addClass('valid') // mark the current input as valid and display OK icon
.closest('.form-group').removeClass('has-error').addClass('has-success'); // set success class to the control group
}
},
submitHandler: function (form) {
success.show();
error.hide();
//add here some ajax code to submit your form or just call form.submit() if you want to submit the form without ajax
}
});
var displayConfirm = function() {
$('#tab4 .form-control-static', form).each(function(){
var input = $('[name="'+$(this).attr("data-display")+'"]', form);
if (input.is(":radio")) {
input = $('[name="'+$(this).attr("data-display")+'"]:checked', form);
}
if (input.is(":text") || input.is("textarea")) {
$(this).html(input.val());
} else if (input.is("select")) {
$(this).html(input.find('option:selected').text());
} else if (input.is(":radio") && input.is(":checked")) {
$(this).html(input.attr("data-title"));
} else if ($(this).attr("data-display") == 'payment[]') {
var payment = [];
$('[name="payment[]"]:checked', form).each(function(){
payment.push($(this).attr('data-title'));
});
$(this).html(payment.join("<br>"));
}
});
}
var handleTitle = function(tab, navigation, index) {
var total = navigation.find('li').length;
var current = index + 1;
// set wizard title
$('.step-title', $('#form_wizard_1')).text('Step ' + (index + 1) + ' of ' + total);
// set done steps
jQuery('li', $('#form_wizard_1')).removeClass("done");
var li_list = navigation.find('li');
for (var i = 0; i < index; i++) {
jQuery(li_list[i]).addClass("done");
}
if (current == 1) {
$('#form_wizard_1').find('.button-previous').hide();
} else {
$('#form_wizard_1').find('.button-previous').show();
}
if (current >= total) {
$('#form_wizard_1').find('.button-next').hide();
$('#form_wizard_1').find('.button-submit').show();
displayConfirm();
} else {
$('#form_wizard_1').find('.button-next').show();
$('#form_wizard_1').find('.button-submit').hide();
}
App.scrollTo($('.page-title'));
}
// default form wizard
$('#form_wizard_1').bootstrapWizard({
'nextSelector': '.button-next',
'previousSelector': '.button-previous',
onTabClick: function (tab, navigation, index, clickedIndex) {
return false;
success.hide();
error.hide();
if (form.valid() == false) {
return false;
}
handleTitle(tab, navigation, clickedIndex);
},
onNext: function (tab, navigation, index) {
success.hide();
error.hide();
if (form.valid() == false) {
return false;
}
handleTitle(tab, navigation, index);
},
onPrevious: function (tab, navigation, index) {
success.hide();
error.hide();
handleTitle(tab, navigation, index);
},
onTabShow: function (tab, navigation, index) {
var total = navigation.find('li').length;
var current = index + 1;
var $percent = (current / total) * 100;
$('#form_wizard_1').find('.progress-bar').css({
width: $percent + '%'
});
}
});
$('#form_wizard_1').find('.button-previous').hide();
$('#form_wizard_1 .button-submit').click(function () {
alert('Finished! Hope you like it :)');
}).hide();
//apply validation on select2 dropdown value change, this only needed for chosen dropdown integration.
$('#country_list', form).change(function () {
form.validate().element($(this)); //revalidate the chosen dropdown value and show error or success message for the input
});
}
};
}();
jQuery(document).ready(function() {
FormWizard.init();
});

1
assets/pages/scripts/form-wizard.min.js

@ -1 +0,0 @@
var FormWizard=function(){return{init:function(){function e(e){return e.id?"<img class='flag' src='../../assets/global/img/flags/"+e.id.toLowerCase()+".png'/>&nbsp;&nbsp;"+e.text:e.text}if(jQuery().bootstrapWizard){$("#country_list").select2({placeholder:"Select",allowClear:!0,formatResult:e,width:"auto",formatSelection:e,escapeMarkup:function(e){return e}});var r=$("#submit_form"),t=$(".alert-danger",r),i=$(".alert-success",r);r.validate({doNotHideMessage:!0,errorElement:"span",errorClass:"help-block help-block-error",focusInvalid:!1,rules:{username:{minlength:5,required:!0},password:{minlength:5,required:!0},rpassword:{minlength:5,required:!0,equalTo:"#submit_form_password"},fullname:{required:!0},email:{required:!0,email:!0},phone:{required:!0},gender:{required:!0},address:{required:!0},city:{required:!0},country:{required:!0},card_name:{required:!0},card_number:{minlength:16,maxlength:16,required:!0},card_cvc:{digits:!0,required:!0,minlength:3,maxlength:4},card_expiry_date:{required:!0},"payment[]":{required:!0,minlength:1}},messages:{"payment[]":{required:"Please select at least one option",minlength:jQuery.validator.format("Please select at least one option")}},errorPlacement:function(e,r){"gender"==r.attr("name")?e.insertAfter("#form_gender_error"):"payment[]"==r.attr("name")?e.insertAfter("#form_payment_error"):e.insertAfter(r)},invalidHandler:function(e,r){i.hide(),t.show(),App.scrollTo(t,-200)},highlight:function(e){$(e).closest(".form-group").removeClass("has-success").addClass("has-error")},unhighlight:function(e){$(e).closest(".form-group").removeClass("has-error")},success:function(e){"gender"==e.attr("for")||"payment[]"==e.attr("for")?(e.closest(".form-group").removeClass("has-error").addClass("has-success"),e.remove()):e.addClass("valid").closest(".form-group").removeClass("has-error").addClass("has-success")},submitHandler:function(e){i.show(),t.hide()}});var a=function(){$("#tab4 .form-control-static",r).each(function(){var e=$('[name="'+$(this).attr("data-display")+'"]',r);if(e.is(":radio")&&(e=$('[name="'+$(this).attr("data-display")+'"]:checked',r)),e.is(":text")||e.is("textarea"))$(this).html(e.val());else if(e.is("select"))$(this).html(e.find("option:selected").text());else if(e.is(":radio")&&e.is(":checked"))$(this).html(e.attr("data-title"));else if("payment[]"==$(this).attr("data-display")){var t=[];$('[name="payment[]"]:checked',r).each(function(){t.push($(this).attr("data-title"))}),$(this).html(t.join("<br>"))}})},o=function(e,r,t){var i=r.find("li").length,o=t+1;$(".step-title",$("#form_wizard_1")).text("Step "+(t+1)+" of "+i),jQuery("li",$("#form_wizard_1")).removeClass("done");for(var n=r.find("li"),s=0;t>s;s++)jQuery(n[s]).addClass("done");1==o?$("#form_wizard_1").find(".button-previous").hide():$("#form_wizard_1").find(".button-previous").show(),o>=i?($("#form_wizard_1").find(".button-next").hide(),$("#form_wizard_1").find(".button-submit").show(),a()):($("#form_wizard_1").find(".button-next").show(),$("#form_wizard_1").find(".button-submit").hide()),App.scrollTo($(".page-title"))};$("#form_wizard_1").bootstrapWizard({nextSelector:".button-next",previousSelector:".button-previous",onTabClick:function(e,r,t,i){return!1},onNext:function(e,a,n){return i.hide(),t.hide(),0==r.valid()?!1:void o(e,a,n)},onPrevious:function(e,r,a){i.hide(),t.hide(),o(e,r,a)},onTabShow:function(e,r,t){var i=r.find("li").length,a=t+1,o=a/i*100;$("#form_wizard_1").find(".progress-bar").css({width:o+"%"})}}),$("#form_wizard_1").find(".button-previous").hide(),$("#form_wizard_1 .button-submit").click(function(){alert("Finished! Hope you like it :)")}).hide(),$("#country_list",r).change(function(){r.validate().element($(this))})}}}}();jQuery(document).ready(function(){FormWizard.init()});

333
assets/pages/scripts/inbox.js

@ -1,333 +0,0 @@
var AppInbox = function () {
var content = $('.inbox-content');
var loading = $('.inbox-loading');
var listListing = '';
var loadInbox = function (el, name) {
var url = 'app_inbox_inbox.html';
var title = $('.inbox-nav > li.' + name + ' a').attr('data-title');
listListing = name;
loading.show();
content.html('');
toggleButton(el);
$.ajax({
type: "GET",
cache: false,
url: url,
dataType: "html",
success: function(res)
{
toggleButton(el);
$('.inbox-nav > li.active').removeClass('active');
$('.inbox-nav > li.' + name).addClass('active');
$('.inbox-header > h1').text(title);
loading.hide();
content.html(res);
if (Layout.fixContentHeight) {
Layout.fixContentHeight();
}
},
error: function(xhr, ajaxOptions, thrownError)
{
toggleButton(el);
},
async: false
});
// handle group checkbox:
jQuery('body').on('change', '.mail-group-checkbox', function () {
var set = jQuery('.mail-checkbox');
var checked = jQuery(this).is(":checked");
jQuery(set).each(function () {
$(this).attr("checked", checked);
});
});
}
var loadMessage = function (el, name, resetMenu) {
var url = 'app_inbox_view.html';
loading.show();
content.html('');
toggleButton(el);
var message_id = el.parent('tr').attr("data-messageid");
$.ajax({
type: "GET",
cache: false,
url: url,
dataType: "html",
data: {'message_id': message_id},
success: function(res)
{
toggleButton(el);
if (resetMenu) {
$('.inbox-nav > li.active').removeClass('active');
}
$('.inbox-header > h1').text('View Message');
loading.hide();
content.html(res);
Layout.fixContentHeight();
},
error: function(xhr, ajaxOptions, thrownError)
{
toggleButton(el);
},
async: false
});
}
var initWysihtml5 = function () {
$('.inbox-wysihtml5').wysihtml5({
"stylesheets": ["../assets/global/plugins/bootstrap-wysihtml5/wysiwyg-color.css"]
});
}
var initFileupload = function () {
$('#fileupload').fileupload({
// Uncomment the following to send cross-domain cookies:
//xhrFields: {withCredentials: true},
url: '../assets/global/plugins/jquery-file-upload/server/php/',
autoUpload: true
});
// Upload server status check for browsers with CORS support:
if ($.support.cors) {
$.ajax({
url: '../assets/global/plugins/jquery-file-upload/server/php/',
type: 'HEAD'
}).fail(function () {
$('<span class="alert alert-error"/>')
.text('Upload server currently unavailable - ' +
new Date())
.appendTo('#fileupload');
});
}
}
var loadCompose = function (el) {
var url = 'app_inbox_compose.html';
loading.show();
content.html('');
toggleButton(el);
// load the form via ajax
$.ajax({
type: "GET",
cache: false,
url: url,
dataType: "html",
success: function(res)
{
toggleButton(el);
$('.inbox-nav > li.active').removeClass('active');
$('.inbox-header > h1').text('Compose');
loading.hide();
content.html(res);
initFileupload();
initWysihtml5();
$('.inbox-wysihtml5').focus();
Layout.fixContentHeight();
App.initUniform();
},
error: function(xhr, ajaxOptions, thrownError)
{
toggleButton(el);
},
async: false
});
}
var loadReply = function (el) {
var messageid = $(el).attr("data-messageid");
var url = 'app_inbox_reply.html&messageid=' + messageid;
loading.show();
content.html('');
toggleButton(el);
// load the form via ajax
$.ajax({
type: "GET",
cache: false,
url: url,
dataType: "html",
success: function(res)
{
toggleButton(el);
$('.inbox-nav > li.active').removeClass('active');
$('.inbox-header > h1').text('Reply');
loading.hide();
content.html(res);
$('[name="message"]').val($('#reply_email_content_body').html());
handleCCInput(); // init "CC" input field
initFileupload();
initWysihtml5();
Layout.fixContentHeight();
App.initUniform();
},
error: function(xhr, ajaxOptions, thrownError)
{
toggleButton(el);
},
async: false
});
}
var loadSearchResults = function (el) {
var url = 'app_inbox_inbox.html';
loading.show();
content.html('');
toggleButton(el);
$.ajax({
type: "GET",
cache: false,
url: url,
dataType: "html",
success: function(res)
{
toggleButton(el);
$('.inbox-nav > li.active').removeClass('active');
$('.inbox-header > h1').text('Search');
loading.hide();
content.html(res);
Layout.fixContentHeight();
App.initUniform();
},
error: function(xhr, ajaxOptions, thrownError)
{
toggleButton(el);
},
async: false
});
}
var handleCCInput = function () {
var the = $('.inbox-compose .mail-to .inbox-cc');
var input = $('.inbox-compose .input-cc');
the.hide();
input.show();
$('.close', input).click(function () {
input.hide();
the.show();
});
}
var handleBCCInput = function () {
var the = $('.inbox-compose .mail-to .inbox-bcc');
var input = $('.inbox-compose .input-bcc');
the.hide();
input.show();
$('.close', input).click(function () {
input.hide();
the.show();
});
}
var toggleButton = function(el) {
if (typeof el == 'undefined') {
return;
}
if (el.attr("disabled")) {
el.attr("disabled", false);
} else {
el.attr("disabled", true);
}
}
return {
//main function to initiate the module
init: function () {
// handle compose btn click
$('.inbox').on('click', '.compose-btn a', function () {
loadCompose($(this));
});
// handle discard btn
$('.inbox').on('click', '.inbox-discard-btn', function(e) {
e.preventDefault();
loadInbox($(this), listListing);
});
// handle reply and forward button click
$('.inbox').on('click', '.reply-btn', function () {
loadReply($(this));
});
// handle view message
$('.inbox-content').on('click', '.view-message', function () {
loadMessage($(this));
});
// handle inbox listing
$('.inbox-nav > li.inbox > a').click(function () {
loadInbox($(this), 'inbox');
});
// handle sent listing
$('.inbox-nav > li.sent > a').click(function () {
loadInbox($(this), 'sent');
});
// handle draft listing
$('.inbox-nav > li.draft > a').click(function () {
loadInbox($(this), 'draft');
});
// handle trash listing
$('.inbox-nav > li.trash > a').click(function () {
loadInbox($(this), 'trash');
});
//handle compose/reply cc input toggle
$('.inbox-content').on('click', '.mail-to .inbox-cc', function () {
handleCCInput();
});
//handle compose/reply bcc input toggle
$('.inbox-content').on('click', '.mail-to .inbox-bcc', function () {
handleBCCInput();
});
//handle loading content based on URL parameter
if (App.getURLParameter("a") === "view") {
loadMessage();
} else if (App.getURLParameter("a") === "compose") {
loadCompose();
} else {
$('.inbox-nav > li.inbox > a').click();
}
}
};
}();
jQuery(document).ready(function() {
AppInbox.init();
});

1
assets/pages/scripts/inbox.min.js

@ -1 +0,0 @@
var AppInbox=function(){var i=$(".inbox-content"),t=$(".inbox-loading"),n="",e=function(e,o){var a="app_inbox_inbox.html",c=$(".inbox-nav > li."+o+" a").attr("data-title");n=o,t.show(),i.html(""),h(e),$.ajax({type:"GET",cache:!1,url:a,dataType:"html",success:function(n){h(e),$(".inbox-nav > li.active").removeClass("active"),$(".inbox-nav > li."+o).addClass("active"),$(".inbox-header > h1").text(c),t.hide(),i.html(n),Layout.fixContentHeight&&Layout.fixContentHeight()},error:function(i,t,n){h(e)},async:!1}),jQuery("body").on("change",".mail-group-checkbox",function(){var i=jQuery(".mail-checkbox"),t=jQuery(this).is(":checked");jQuery(i).each(function(){$(this).attr("checked",t)})})},o=function(n,e,o){var a="app_inbox_view.html";t.show(),i.html(""),h(n);var c=n.parent("tr").attr("data-messageid");$.ajax({type:"GET",cache:!1,url:a,dataType:"html",data:{message_id:c},success:function(e){h(n),o&&$(".inbox-nav > li.active").removeClass("active"),$(".inbox-header > h1").text("View Message"),t.hide(),i.html(e),Layout.fixContentHeight()},error:function(i,t,e){h(n)},async:!1})},a=function(){$(".inbox-wysihtml5").wysihtml5({stylesheets:["../assets/global/plugins/bootstrap-wysihtml5/wysiwyg-color.css"]})},c=function(){$("#fileupload").fileupload({url:"../assets/global/plugins/jquery-file-upload/server/php/",autoUpload:!0}),$.support.cors&&$.ajax({url:"../assets/global/plugins/jquery-file-upload/server/php/",type:"HEAD"}).fail(function(){$('<span class="alert alert-error"/>').text("Upload server currently unavailable - "+new Date).appendTo("#fileupload")})},s=function(n){var e="app_inbox_compose.html";t.show(),i.html(""),h(n),$.ajax({type:"GET",cache:!1,url:e,dataType:"html",success:function(e){h(n),$(".inbox-nav > li.active").removeClass("active"),$(".inbox-header > h1").text("Compose"),t.hide(),i.html(e),c(),a(),$(".inbox-wysihtml5").focus(),Layout.fixContentHeight(),App.initUniform()},error:function(i,t,e){h(n)},async:!1})},l=function(n){var e=$(n).attr("data-messageid"),o="app_inbox_reply.html&messageid="+e;t.show(),i.html(""),h(n),$.ajax({type:"GET",cache:!1,url:o,dataType:"html",success:function(e){h(n),$(".inbox-nav > li.active").removeClass("active"),$(".inbox-header > h1").text("Reply"),t.hide(),i.html(e),$('[name="message"]').val($("#reply_email_content_body").html()),r(),c(),a(),Layout.fixContentHeight(),App.initUniform()},error:function(i,t,e){h(n)},async:!1})},r=function(){var i=$(".inbox-compose .mail-to .inbox-cc"),t=$(".inbox-compose .input-cc");i.hide(),t.show(),$(".close",t).click(function(){t.hide(),i.show()})},u=function(){var i=$(".inbox-compose .mail-to .inbox-bcc"),t=$(".inbox-compose .input-bcc");i.hide(),t.show(),$(".close",t).click(function(){t.hide(),i.show()})},h=function(i){"undefined"!=typeof i&&(i.attr("disabled")?i.attr("disabled",!1):i.attr("disabled",!0))};return{init:function(){$(".inbox").on("click",".compose-btn a",function(){s($(this))}),$(".inbox").on("click",".inbox-discard-btn",function(i){i.preventDefault(),e($(this),n)}),$(".inbox").on("click",".reply-btn",function(){l($(this))}),$(".inbox-content").on("click",".view-message",function(){o($(this))}),$(".inbox-nav > li.inbox > a").click(function(){e($(this),"inbox")}),$(".inbox-nav > li.sent > a").click(function(){e($(this),"sent")}),$(".inbox-nav > li.draft > a").click(function(){e($(this),"draft")}),$(".inbox-nav > li.trash > a").click(function(){e($(this),"trash")}),$(".inbox-content").on("click",".mail-to .inbox-cc",function(){r()}),$(".inbox-content").on("click",".mail-to .inbox-bcc",function(){u()}),"view"===App.getURLParameter("a")?o():"compose"===App.getURLParameter("a")?s():$(".inbox-nav > li.inbox > a").click()}}}();jQuery(document).ready(function(){AppInbox.init()});

18
assets/pages/scripts/jquery-gantt.js

@ -1,18 +0,0 @@
var jgantt = function () {
return {
init: function () {
var gantt_data = [
{ "name": " Step A ","desc": "&rarr; Step B" ,"values": [{"id": "b0", "from": "/Date(1320182000000)/", "to": "/Date(1320301600000)/", "desc": "Id: 0<br/>Name: Step A", "label": " Step A", "customClass": "ganttRed", "dep": "b1"}]}
];
$(".jgantt").gantt({source: gantt_data, navigate: 'scroll', scale: 'days', maxScale: 'weeks', minScale: 'hours'});
}
};
}();
jQuery(document).ready(function() {
jgantt.init();
});

1
assets/pages/scripts/jquery-gantt.min.js

@ -1 +0,0 @@
var jgantt=function(){return{init:function(){var t=[{name:" Step A ",desc:"&rarr; Step B",values:[{id:"b0",from:"/Date(1320182000000)/",to:"/Date(1320301600000)/",desc:"Id: 0<br/>Name: Step A",label:" Step A",customClass:"ganttRed",dep:"b1"}]}];$(".jgantt").gantt({source:t,navigate:"scroll",scale:"days",maxScale:"weeks",minScale:"hours"})}}}();jQuery(document).ready(function(){jgantt.init()});

24
assets/pages/scripts/lock-2.js

@ -1,24 +0,0 @@
var Lock = function () {
return {
//main function to initiate the module
init: function () {
$.backstretch([
"../assets/pages/media/bg/1.jpg",
"../assets/pages/media/bg/2.jpg",
"../assets/pages/media/bg/3.jpg",
"../assets/pages/media/bg/4.jpg"
], {
fade: 1000,
duration: 8000
});
}
};
}();
jQuery(document).ready(function() {
Lock.init();
});

1
assets/pages/scripts/lock-2.min.js

@ -1 +0,0 @@
var Lock=function(){return{init:function(){$.backstretch(["../assets/pages/media/bg/1.jpg","../assets/pages/media/bg/2.jpg","../assets/pages/media/bg/3.jpg","../assets/pages/media/bg/4.jpg"],{fade:1e3,duration:8e3})}}}();jQuery(document).ready(function(){Lock.init()});

14
assets/pages/scripts/lock.js

@ -1,14 +0,0 @@
var Lock = function () {
return {
//main function to initiate the module
init: function () {
}
};
}();
jQuery(document).ready(function() {
Lock.init();
});

1
assets/pages/scripts/lock.min.js

@ -1 +0,0 @@
var Lock=function(){return{init:function(){}}}();jQuery(document).ready(function(){Lock.init()});

2
assets/pages/scripts/login.js

@ -66,7 +66,7 @@ var Login = function() {
swal("Success", "Login Successfully.", "success");
NProgress.done();
$('#login-section').fadeOut('slow');
$('#login-section').hide();
$('body').removeClass( " login" ).addClass( "page-sidebar-closed-hide-logo page-container-bg-solid page-header-fixed" );
$('#wallet-section').fadeIn();
// Populate IP Info

30
assets/pages/scripts/portlet-ajax.js

@ -1,30 +0,0 @@
var PortletAjax = function () {
var handlePortletAjax = function () {
//custom portlet reload handler
$('#my_portlet .portlet-title a.reload').click(function(e){
e.preventDefault(); // prevent default event
e.stopPropagation(); // stop event handling here(cancel the default reload handler)
// do here some custom work:
App.alert({
'type': 'danger',
'icon': 'warning',
'message': 'Custom reload handler!',
'container': $('#my_portlet .portlet-body')
});
})
}
return {
//main function to initiate the module
init: function () {
handlePortletAjax();
}
};
}();
jQuery(document).ready(function() {
PortletAjax.init();
});

1
assets/pages/scripts/portlet-ajax.min.js

@ -1 +0,0 @@
var PortletAjax=function(){var t=function(){$("#my_portlet .portlet-title a.reload").click(function(t){t.preventDefault(),t.stopPropagation(),App.alert({type:"danger",icon:"warning",message:"Custom reload handler!",container:$("#my_portlet .portlet-body")})})};return{init:function(){t()}}}();jQuery(document).ready(function(){PortletAjax.init()});

38
assets/pages/scripts/portlet-draggable.js

@ -1,38 +0,0 @@
var PortletDraggable = function () {
return {
//main function to initiate the module
init: function () {
if (!jQuery().sortable) {
return;
}
$("#sortable_portlets").sortable({
connectWith: ".portlet",
items: ".portlet",
opacity: 0.8,
handle : '.portlet-title',
coneHelperSize: true,
placeholder: 'portlet-sortable-placeholder',
forcePlaceholderSize: true,
tolerance: "pointer",
helper: "clone",
tolerance: "pointer",
forcePlaceholderSize: !0,
helper: "clone",
cancel: ".portlet-sortable-empty, .portlet-fullscreen", // cancel dragging if portlet is in fullscreen mode
revert: 250, // animation in milliseconds
update: function(b, c) {
if (c.item.prev().hasClass("portlet-sortable-empty")) {
c.item.prev().before(c.item);
}
}
});
}
};
}();
jQuery(document).ready(function() {
PortletDraggable.init();
});

1
assets/pages/scripts/portlet-draggable.min.js

@ -1 +0,0 @@
var PortletDraggable=function(){return{init:function(){jQuery().sortable&&$("#sortable_portlets").sortable({connectWith:".portlet",items:".portlet",opacity:.8,handle:".portlet-title",coneHelperSize:!0,placeholder:"portlet-sortable-placeholder",forcePlaceholderSize:!0,tolerance:"pointer",helper:"clone",tolerance:"pointer",forcePlaceholderSize:!0,helper:"clone",cancel:".portlet-sortable-empty, .portlet-fullscreen",revert:250,update:function(e,t){t.item.prev().hasClass("portlet-sortable-empty")&&t.item.prev().before(t.item)}})}}}();jQuery(document).ready(function(){PortletDraggable.init()});

65
assets/pages/scripts/profile.js

@ -1,65 +0,0 @@
var Profile = function() {
var dashboardMainChart = null;
return {
//main function
init: function() {
Profile.initMiniCharts();
},
initMiniCharts: function() {
// IE8 Fix: function.bind polyfill
if (App.isIE8() && !Function.prototype.bind) {
Function.prototype.bind = function(oThis) {
if (typeof this !== "function") {
// closest thing possible to the ECMAScript 5 internal IsCallable function
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
}
var aArgs = Array.prototype.slice.call(arguments, 1),
fToBind = this,
fNOP = function() {},
fBound = function() {
return fToBind.apply(this instanceof fNOP && oThis ? this : oThis,
aArgs.concat(Array.prototype.slice.call(arguments)));
};
fNOP.prototype = this.prototype;
fBound.prototype = new fNOP();
return fBound;
};
}
$("#sparkline_bar").sparkline([8, 9, 10, 11, 10, 10, 12, 10, 10, 11, 9, 12, 11], {
type: 'bar',
width: '100',
barWidth: 6,
height: '45',
barColor: '#F36A5B',
negBarColor: '#e02222'
});
$("#sparkline_bar2").sparkline([9, 11, 12, 13, 12, 13, 10, 14, 13, 11, 11, 12, 11], {
type: 'bar',
width: '100',
barWidth: 6,
height: '45',
barColor: '#5C9BD1',
negBarColor: '#e02222'
});
}
};
}();
if (App.isAngularJsApp() === false) {
jQuery(document).ready(function() {
Profile.init();
});
}

1
assets/pages/scripts/profile.min.js

@ -1 +0,0 @@
var Profile=function(){return{init:function(){Profile.initMiniCharts()},initMiniCharts:function(){App.isIE8()&&!Function.prototype.bind&&(Function.prototype.bind=function(t){if("function"!=typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var i=Array.prototype.slice.call(arguments,1),r=this,n=function(){},o=function(){return r.apply(this instanceof n&&t?this:t,i.concat(Array.prototype.slice.call(arguments)))};return n.prototype=this.prototype,o.prototype=new n,o}),$("#sparkline_bar").sparkline([8,9,10,11,10,10,12,10,10,11,9,12,11],{type:"bar",width:"100",barWidth:6,height:"45",barColor:"#F36A5B",negBarColor:"#e02222"}),$("#sparkline_bar2").sparkline([9,11,12,13,12,13,10,14,13,11,11,12,11],{type:"bar",width:"100",barWidth:6,height:"45",barColor:"#5C9BD1",negBarColor:"#e02222"})}}}();App.isAngularJsApp()===!1&&jQuery(document).ready(function(){Profile.init()});

19
assets/pages/scripts/search.js

@ -1,19 +0,0 @@
var Search = function () {
return {
//main function to initiate the module
init: function () {
$('.date-picker').datepicker({
rtl: App.isRTL(),
orientation: "left",
autoclose: true
});
}
};
}();
jQuery(document).ready(function() {
Search.init();
})

1
assets/pages/scripts/search.min.js

@ -1 +0,0 @@
var Search=function(){return{init:function(){$(".date-picker").datepicker({rtl:App.isRTL(),orientation:"left",autoclose:!0})}}}();jQuery(document).ready(function(){Search.init()});

233
assets/pages/scripts/table-bootstrap-master.js

@ -1,233 +0,0 @@
var $table = $('#table'),
$remove = $('#remove'),
selections = [];
function initTable() {
$table.bootstrapTable({
height: getHeight(),
columns: [
[
{
field: 'state',
checkbox: true,
rowspan: 2,
align: 'center',
valign: 'middle'
}, {
title: 'Item ID',
field: 'id',
rowspan: 2,
align: 'center',
valign: 'middle',
sortable: true,
footerFormatter: totalTextFormatter
}, {
title: 'Item Detail',
colspan: 3,
align: 'center'
}
],
[
{
field: 'name',
title: 'Item Name',
sortable: true,
editable: true,
footerFormatter: totalNameFormatter,
align: 'center'
}, {
field: 'price',
title: 'Item Price',
sortable: true,
align: 'center',
editable: {
type: 'text',
title: 'Item Price',
validate: function (value) {
value = $.trim(value);
if (!value) {
return 'This field is required';
}
if (!/^$/.test(value)) {
return 'This field needs to start width $.'
}
var data = $table.bootstrapTable('getData'),
index = $(this).parents('tr').data('index');
console.log(data[index]);
return '';
}
},
footerFormatter: totalPriceFormatter
}, {
field: 'operate',
title: 'Item Operate',
align: 'center',
events: operateEvents,
formatter: operateFormatter
}
]
]
});
// sometimes footer render error.
setTimeout(function () {
$table.bootstrapTable('resetView');
}, 200);
$table.on('check.bs.table uncheck.bs.table ' +
'check-all.bs.table uncheck-all.bs.table', function () {
$remove.prop('disabled', !$table.bootstrapTable('getSelections').length);
// save your data, here just save the current page
selections = getIdSelections();
// push or splice the selections if you want to save all data selections
});
$table.on('expand-row.bs.table', function (e, index, row, $detail) {
if (index % 2 == 1) {
$detail.html('Loading from ajax request...');
$.get('LICENSE', function (res) {
$detail.html(res.replace(/\n/g, '<br>'));
});
}
});
$table.on('all.bs.table', function (e, name, args) {
console.log(name, args);
});
$remove.click(function () {
var ids = getIdSelections();
$table.bootstrapTable('remove', {
field: 'id',
values: ids
});
$remove.prop('disabled', true);
});
$(window).resize(function () {
$table.bootstrapTable('resetView', {
height: getHeight()
});
});
}
function getIdSelections() {
return $.map($table.bootstrapTable('getSelections'), function (row) {
return row.id
});
}
function responseHandler(res) {
$.each(res.rows, function (i, row) {
row.state = $.inArray(row.id, selections) !== -1;
});
return res;
}
function detailFormatter(index, row) {
var html = [];
$.each(row, function (key, value) {
html.push('<p><b>' + key + ':</b> ' + value + '</p>');
});
return html.join('');
}
function operateFormatter(value, row, index) {
return [
'<a class="like" href="javascript:void(0)" title="Like">',
'<i class="glyphicon glyphicon-heart"></i>',
'</a> ',
'<a class="remove" href="javascript:void(0)" title="Remove">',
'<i class="glyphicon glyphicon-remove"></i>',
'</a>'
].join('');
}
window.operateEvents = {
'click .like': function (e, value, row, index) {
alert('You click like action, row: ' + JSON.stringify(row));
},
'click .remove': function (e, value, row, index) {
$table.bootstrapTable('remove', {
field: 'id',
values: [row.id]
});
}
};
function totalTextFormatter(data) {
return 'Total';
}
function totalNameFormatter(data) {
return data.length;
}
function totalPriceFormatter(data) {
var total = 0;
$.each(data, function (i, row) {
total += +(row.price.substring(1));
});
return '$' + total;
}
function getHeight() {
return $(window).height() - $('h1').outerHeight(true);
}
$(function () {
var scripts = [
location.search.substring(1) || 'assets/bootstrap-table/src/bootstrap-table.js',
'assets/bootstrap-table/src/extensions/export/bootstrap-table-export.js',
'http://rawgit.com/hhurz/tableExport.jquery.plugin/master/tableExport.js',
'assets/bootstrap-table/src/extensions/editable/bootstrap-table-editable.js',
'http://rawgit.com/vitalets/x-editable/master/dist/bootstrap3-editable/js/bootstrap-editable.js'
],
eachSeries = function (arr, iterator, callback) {
callback = callback || function () {};
if (!arr.length) {
return callback();
}
var completed = 0;
var iterate = function () {
iterator(arr[completed], function (err) {
if (err) {
callback(err);
callback = function () {};
}
else {
completed += 1;
if (completed >= arr.length) {
callback(null);
}
else {
iterate();
}
}
});
};
iterate();
};
eachSeries(scripts, getScript, initTable);
});
function getScript(url, callback) {
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.src = url;
var done = false;
// Attach handlers for all browsers
script.onload = script.onreadystatechange = function() {
if (!done && (!this.readyState ||
this.readyState == 'loaded' || this.readyState == 'complete')) {
done = true;
if (callback)
callback();
// Handle memory leak in IE
script.onload = script.onreadystatechange = null;
}
};
head.appendChild(script);
// We handle everything using the script element injection
return undefined;
}

1
assets/pages/scripts/table-bootstrap-master.min.js

@ -1 +0,0 @@
function initTable(){$table.bootstrapTable({height:getHeight(),columns:[[{field:"state",checkbox:!0,rowspan:2,align:"center",valign:"middle"},{title:"Item ID",field:"id",rowspan:2,align:"center",valign:"middle",sortable:!0,footerFormatter:totalTextFormatter},{title:"Item Detail",colspan:3,align:"center"}],[{field:"name",title:"Item Name",sortable:!0,editable:!0,footerFormatter:totalNameFormatter,align:"center"},{field:"price",title:"Item Price",sortable:!0,align:"center",editable:{type:"text",title:"Item Price",validate:function(t){if(t=$.trim(t),!t)return"This field is required";if(!/^$/.test(t))return"This field needs to start width $.";var e=$table.bootstrapTable("getData"),a=$(this).parents("tr").data("index");return console.log(e[a]),""}},footerFormatter:totalPriceFormatter},{field:"operate",title:"Item Operate",align:"center",events:operateEvents,formatter:operateFormatter}]]}),setTimeout(function(){$table.bootstrapTable("resetView")},200),$table.on("check.bs.table uncheck.bs.table check-all.bs.table uncheck-all.bs.table",function(){$remove.prop("disabled",!$table.bootstrapTable("getSelections").length),selections=getIdSelections()}),$table.on("expand-row.bs.table",function(t,e,a,o){e%2==1&&(o.html("Loading from ajax request..."),$.get("LICENSE",function(t){o.html(t.replace(/\n/g,"<br>"))}))}),$table.on("all.bs.table",function(t,e,a){console.log(e,a)}),$remove.click(function(){var t=getIdSelections();$table.bootstrapTable("remove",{field:"id",values:t}),$remove.prop("disabled",!0)}),$(window).resize(function(){$table.bootstrapTable("resetView",{height:getHeight()})})}function getIdSelections(){return $.map($table.bootstrapTable("getSelections"),function(t){return t.id})}function responseHandler(t){return $.each(t.rows,function(t,e){e.state=-1!==$.inArray(e.id,selections)}),t}function detailFormatter(t,e){var a=[];return $.each(e,function(t,e){a.push("<p><b>"+t+":</b> "+e+"</p>")}),a.join("")}function operateFormatter(t,e,a){return['<a class="like" href="javascript:void(0)" title="Like">','<i class="glyphicon glyphicon-heart"></i>',"</a> ",'<a class="remove" href="javascript:void(0)" title="Remove">','<i class="glyphicon glyphicon-remove"></i>',"</a>"].join("")}function totalTextFormatter(t){return"Total"}function totalNameFormatter(t){return t.length}function totalPriceFormatter(t){var e=0;return $.each(t,function(t,a){e+=+a.price.substring(1)}),"$"+e}function getHeight(){return $(window).height()-$("h1").outerHeight(!0)}function getScript(t,e){var a=document.getElementsByTagName("head")[0],o=document.createElement("script");o.src=t;var r=!1;o.onload=o.onreadystatechange=function(){r||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(r=!0,e&&e(),o.onload=o.onreadystatechange=null)},a.appendChild(o)}var $table=$("#table"),$remove=$("#remove"),selections=[];window.operateEvents={"click .like":function(t,e,a,o){alert("You click like action, row: "+JSON.stringify(a))},"click .remove":function(t,e,a,o){$table.bootstrapTable("remove",{field:"id",values:[a.id]})}},$(function(){var t=[location.search.substring(1)||"assets/bootstrap-table/src/bootstrap-table.js","assets/bootstrap-table/src/extensions/export/bootstrap-table-export.js","http://rawgit.com/hhurz/tableExport.jquery.plugin/master/tableExport.js","assets/bootstrap-table/src/extensions/editable/bootstrap-table-editable.js","http://rawgit.com/vitalets/x-editable/master/dist/bootstrap3-editable/js/bootstrap-editable.js"],e=function(t,e,a){if(a=a||function(){},!t.length)return a();var o=0,r=function(){e(t[o],function(e){e?(a(e),a=function(){}):(o+=1,o>=t.length?a(null):r())})};r()};e(t,getScript,initTable)});

60
assets/pages/scripts/table-bootstrap.js

@ -1,60 +0,0 @@
var BootstrapTable = function () {
var TableTransform = function () {
var $table_transform = $('#table-transform');
$('#transform').click(function () {
$table_transform.bootstrapTable();
});
$('#destroy').click(function () {
$table_transform.bootstrapTable('destroy');
});
}
var TableStyle = function () {
var $table_style = $('#table-style');
// $table_style.bootstrapTable();
$('#hover, #striped, #condensed').click(function () {
var classes = 'table';
if ($('#hover').prop('checked')) {
classes += ' table-hover';
}
if ($('#condensed').prop('checked')) {
classes += ' table-condensed';
}
$('#table-style').bootstrapTable('destroy')
.bootstrapTable({
classes: classes,
striped: $('#striped').prop('checked')
});
});
function rowStyle(row, index) {
var bs_classes = ['active', 'success', 'info', 'warning', 'danger'];
if (index % 2 === 0 && index / 2 < bs_classes.length) {
return {
classes: bs_classes[index / 2]
};
}
return {};
}
}
return {
//main function to initiate the module
init: function () {
TableTransform();
TableStyle();
}
};
}();
jQuery(document).ready(function() {
BootstrapTable.init();
});

1
assets/pages/scripts/table-bootstrap.min.js

@ -1 +0,0 @@
var BootstrapTable=function(){var e=function(){var e=$("#table-transform");$("#transform").click(function(){e.bootstrapTable()}),$("#destroy").click(function(){e.bootstrapTable("destroy")})},t=function(){$("#table-style");$("#hover, #striped, #condensed").click(function(){var e="table";$("#hover").prop("checked")&&(e+=" table-hover"),$("#condensed").prop("checked")&&(e+=" table-condensed"),$("#table-style").bootstrapTable("destroy").bootstrapTable({classes:e,striped:$("#striped").prop("checked")})})};return{init:function(){e(),t()}}}();jQuery(document).ready(function(){BootstrapTable.init()});

101
assets/pages/scripts/table-datatables-ajax.js

@ -1,101 +0,0 @@
var TableDatatablesAjax = function () {
var initPickers = function () {
//init date pickers
$('.date-picker').datepicker({
rtl: App.isRTL(),
autoclose: true
});
}
var handleRecords = function () {
var grid = new Datatable();
grid.init({
src: $("#datatable_ajax"),
onSuccess: function (grid, response) {
// grid: grid object
// response: json object of server side ajax response
// execute some code after table records loaded
},
onError: function (grid) {
// execute some code on network or other general error
},
onDataLoad: function(grid) {
// execute some code on ajax data load
},
loadingMessage: 'Loading...',
dataTable: { // here you can define a typical datatable settings from http://datatables.net/usage/options
// Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
// setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/scripts/datatable.js).
// So when dropdowns used the scrollable div should be removed.
//"dom": "<'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'<'table-group-actions pull-right'>>r>t<'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>>",
"bStateSave": true, // save datatable state(pagination, sort, etc) in cookie.
"lengthMenu": [
[10, 20, 50, 100, 150, -1],
[10, 20, 50, 100, 150, "All"] // change per page values here
],
"pageLength": 10, // default record count per page
"ajax": {
"url": "../demo/table_ajax.php", // ajax source
},
"order": [
[1, "asc"]
]// set first column as a default sort by asc
}
});
// handle group actionsubmit button click
grid.getTableWrapper().on('click', '.table-group-action-submit', function (e) {
e.preventDefault();
var action = $(".table-group-action-input", grid.getTableWrapper());
if (action.val() != "" && grid.getSelectedRowsCount() > 0) {
grid.setAjaxParam("customActionType", "group_action");
grid.setAjaxParam("customActionName", action.val());
grid.setAjaxParam("id", grid.getSelectedRows());
grid.getDataTable().ajax.reload();
grid.clearAjaxParams();
} else if (action.val() == "") {
App.alert({
type: 'danger',
icon: 'warning',
message: 'Please select an action',
container: grid.getTableWrapper(),
place: 'prepend'
});
} else if (grid.getSelectedRowsCount() === 0) {
App.alert({
type: 'danger',
icon: 'warning',
message: 'No record selected',
container: grid.getTableWrapper(),
place: 'prepend'
});
}
});
//grid.setAjaxParam("customActionType", "group_action");
//grid.getDataTable().ajax.reload();
//grid.clearAjaxParams();
}
return {
//main function to initiate the module
init: function () {
initPickers();
handleRecords();
}
};
}();
jQuery(document).ready(function() {
TableDatatablesAjax.init();
});

1
assets/pages/scripts/table-datatables-ajax.min.js

@ -1 +0,0 @@
var TableDatatablesAjax=function(){var a=function(){$(".date-picker").datepicker({rtl:App.isRTL(),autoclose:!0})},e=function(){var a=new Datatable;a.init({src:$("#datatable_ajax"),onSuccess:function(a,e){},onError:function(a){},onDataLoad:function(a){},loadingMessage:"Loading...",dataTable:{bStateSave:!0,lengthMenu:[[10,20,50,100,150,-1],[10,20,50,100,150,"All"]],pageLength:10,ajax:{url:"../demo/table_ajax.php"},order:[[1,"asc"]]}}),a.getTableWrapper().on("click",".table-group-action-submit",function(e){e.preventDefault();var t=$(".table-group-action-input",a.getTableWrapper());""!=t.val()&&a.getSelectedRowsCount()>0?(a.setAjaxParam("customActionType","group_action"),a.setAjaxParam("customActionName",t.val()),a.setAjaxParam("id",a.getSelectedRows()),a.getDataTable().ajax.reload(),a.clearAjaxParams()):""==t.val()?App.alert({type:"danger",icon:"warning",message:"Please select an action",container:a.getTableWrapper(),place:"prepend"}):0===a.getSelectedRowsCount()&&App.alert({type:"danger",icon:"warning",message:"No record selected",container:a.getTableWrapper(),place:"prepend"})})};return{init:function(){a(),e()}}}();jQuery(document).ready(function(){TableDatatablesAjax.init()});

323
assets/pages/scripts/table-datatables-buttons.js

@ -1,323 +0,0 @@
var TableDatatablesButtons = function () {
var initTable1 = function () {
var table = $('#sample_1');
var oTable = table.dataTable({
// Internationalisation. For more info refer to http://datatables.net/manual/i18n
"language": {
"aria": {
"sortAscending": ": activate to sort column ascending",
"sortDescending": ": activate to sort column descending"
},
"emptyTable": "No data available in table",
"info": "Showing _START_ to _END_ of _TOTAL_ entries",
"infoEmpty": "No entries found",
"infoFiltered": "(filtered1 from _MAX_ total entries)",
"lengthMenu": "_MENU_ entries",
"search": "Search:",
"zeroRecords": "No matching records found"
},
// Or you can use remote translation file
//"language": {
// url: '//cdn.datatables.net/plug-ins/3cfcc339e89/i18n/Portuguese.json'
//},
buttons: [
{ extend: 'print', className: 'btn dark btn-outline' },
{ extend: 'copy', className: 'btn red btn-outline' },
{ extend: 'pdf', className: 'btn green btn-outline' },
{ extend: 'excel', className: 'btn yellow btn-outline ' },
{ extend: 'csv', className: 'btn purple btn-outline ' },
{ extend: 'colvis', className: 'btn dark btn-outline', text: 'Columns'}
],
// setup responsive extension: http://datatables.net/extensions/responsive/
responsive: true,
//"ordering": false, disable column ordering
//"paging": false, disable pagination
"order": [
[0, 'asc']
],
"lengthMenu": [
[5, 10, 15, 20, -1],
[5, 10, 15, 20, "All"] // change per page values here
],
// set the initial value
"pageLength": 10,
"dom": "<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>", // horizobtal scrollable datatable
// Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
// setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js).
// So when dropdowns used the scrollable div should be removed.
//"dom": "<'row' <'col-md-12'T>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r>t<'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>",
});
}
var initTable2 = function () {
var table = $('#sample_2');
var oTable = table.dataTable({
// Internationalisation. For more info refer to http://datatables.net/manual/i18n
"language": {
"aria": {
"sortAscending": ": activate to sort column ascending",
"sortDescending": ": activate to sort column descending"
},
"emptyTable": "No data available in table",
"info": "Showing _START_ to _END_ of _TOTAL_ entries",
"infoEmpty": "No entries found",
"infoFiltered": "(filtered1 from _MAX_ total entries)",
"lengthMenu": "_MENU_ entries",
"search": "Search:",
"zeroRecords": "No matching records found"
},
// Or you can use remote translation file
//"language": {
// url: '//cdn.datatables.net/plug-ins/3cfcc339e89/i18n/Portuguese.json'
//},
buttons: [
{ extend: 'print', className: 'btn default' },
{ extend: 'copy', className: 'btn default' },
{ extend: 'pdf', className: 'btn default' },
{ extend: 'excel', className: 'btn default' },
{ extend: 'csv', className: 'btn default' },
{
text: 'Reload',
className: 'btn default',
action: function ( e, dt, node, config ) {
//dt.ajax.reload();
alert('Custom Button');
}
}
],
"order": [
[0, 'asc']
],
"lengthMenu": [
[5, 10, 15, 20, -1],
[5, 10, 15, 20, "All"] // change per page values here
],
// set the initial value
"pageLength": 10,
"dom": "<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>", // horizobtal scrollable datatable
// Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
// setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js).
// So when dropdowns used the scrollable div should be removed.
//"dom": "<'row' <'col-md-12'T>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r>t<'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>",
});
}
var initTable3 = function () {
var table = $('#sample_3');
var oTable = table.dataTable({
// Internationalisation. For more info refer to http://datatables.net/manual/i18n
"language": {
"aria": {
"sortAscending": ": activate to sort column ascending",
"sortDescending": ": activate to sort column descending"
},
"emptyTable": "No data available in table",
"info": "Showing _START_ to _END_ of _TOTAL_ entries",
"infoEmpty": "No entries found",
"infoFiltered": "(filtered1 from _MAX_ total entries)",
"lengthMenu": "_MENU_ entries",
"search": "Search:",
"zeroRecords": "No matching records found"
},
// Or you can use remote translation file
//"language": {
// url: '//cdn.datatables.net/plug-ins/3cfcc339e89/i18n/Portuguese.json'
//},
buttons: [
{ extend: 'print', className: 'btn dark btn-outline' },
{ extend: 'copy', className: 'btn red btn-outline' },
{ extend: 'pdf', className: 'btn green btn-outline' },
{ extend: 'excel', className: 'btn yellow btn-outline ' },
{ extend: 'csv', className: 'btn purple btn-outline ' },
{ extend: 'colvis', className: 'btn dark btn-outline', text: 'Columns'}
],
// setup responsive extension: http://datatables.net/extensions/responsive/
responsive: true,
//"ordering": false, disable column ordering
//"paging": false, disable pagination
"order": [
[0, 'asc']
],
"lengthMenu": [
[5, 10, 15, 20, -1],
[5, 10, 15, 20, "All"] // change per page values here
],
// set the initial value
"pageLength": 10,
//"dom": "<'row' <'col-md-12'>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>", // horizobtal scrollable datatable
// Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
// setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js).
// So when dropdowns used the scrollable div should be removed.
//"dom": "<'row' <'col-md-12'T>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r>t<'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>",
});
// handle datatable custom tools
$('#sample_3_tools > li > a.tool-action').on('click', function() {
var action = $(this).attr('data-action');
oTable.DataTable().button(action).trigger();
});
}
var initAjaxDatatables = function () {
//init date pickers
$('.date-picker').datepicker({
rtl: App.isRTL(),
autoclose: true
});
var grid = new Datatable();
grid.init({
src: $("#datatable_ajax"),
onSuccess: function (grid, response) {
// grid: grid object
// response: json object of server side ajax response
// execute some code after table records loaded
},
onError: function (grid) {
// execute some code on network or other general error
},
onDataLoad: function(grid) {
// execute some code on ajax data load
},
loadingMessage: 'Loading...',
dataTable: { // here you can define a typical datatable settings from http://datatables.net/usage/options
// Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
// setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/scripts/datatable.js).
// So when dropdowns used the scrollable div should be removed.
//"dom": "<'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'<'table-group-actions pull-right'>>r>t<'row'<'col-md-8 col-sm-12'pli><'col-md-4 col-sm-12'>>",
"bStateSave": true, // save datatable state(pagination, sort, etc) in cookie.
"lengthMenu": [
[10, 20, 50, 100, 150, -1],
[10, 20, 50, 100, 150, "All"] // change per page values here
],
"pageLength": 10, // default record count per page
"ajax": {
"url": "../demo/table_ajax.php", // ajax source
},
"order": [
[1, "asc"]
],// set first column as a default sort by asc
// Or you can use remote translation file
//"language": {
// url: '//cdn.datatables.net/plug-ins/3cfcc339e89/i18n/Portuguese.json'
//},
buttons: [
{ extend: 'print', className: 'btn default' },
{ extend: 'copy', className: 'btn default' },
{ extend: 'pdf', className: 'btn default' },
{ extend: 'excel', className: 'btn default' },
{ extend: 'csv', className: 'btn default' },
{
text: 'Reload',
className: 'btn default',
action: function ( e, dt, node, config ) {
dt.ajax.reload();
alert('Datatable reloaded!');
}
}
],
}
});
// handle group actionsubmit button click
grid.getTableWrapper().on('click', '.table-group-action-submit', function (e) {
e.preventDefault();
var action = $(".table-group-action-input", grid.getTableWrapper());
if (action.val() != "" && grid.getSelectedRowsCount() > 0) {
grid.setAjaxParam("customActionType", "group_action");
grid.setAjaxParam("customActionName", action.val());
grid.setAjaxParam("id", grid.getSelectedRows());
grid.getDataTable().ajax.reload();
grid.clearAjaxParams();
} else if (action.val() == "") {
App.alert({
type: 'danger',
icon: 'warning',
message: 'Please select an action',
container: grid.getTableWrapper(),
place: 'prepend'
});
} else if (grid.getSelectedRowsCount() === 0) {
App.alert({
type: 'danger',
icon: 'warning',
message: 'No record selected',
container: grid.getTableWrapper(),
place: 'prepend'
});
}
});
//grid.setAjaxParam("customActionType", "group_action");
//grid.getDataTable().ajax.reload();
//grid.clearAjaxParams();
// handle datatable custom tools
$('#datatable_ajax_tools > li > a.tool-action').on('click', function() {
var action = $(this).attr('data-action');
grid.getDataTable().button(action).trigger();
});
}
return {
//main function to initiate the module
init: function () {
if (!jQuery().dataTable) {
return;
}
initTable1();
initTable2();
initTable3();
initAjaxDatatables();
}
};
}();
jQuery(document).ready(function() {
TableDatatablesButtons.init();
});

1
assets/pages/scripts/table-datatables-buttons.min.js

@ -1 +0,0 @@
var TableDatatablesButtons=function(){var e=function(){var e=$("#sample_1");e.dataTable({language:{aria:{sortAscending:": activate to sort column ascending",sortDescending:": activate to sort column descending"},emptyTable:"No data available in table",info:"Showing _START_ to _END_ of _TOTAL_ entries",infoEmpty:"No entries found",infoFiltered:"(filtered1 from _MAX_ total entries)",lengthMenu:"_MENU_ entries",search:"Search:",zeroRecords:"No matching records found"},buttons:[{extend:"print",className:"btn dark btn-outline"},{extend:"copy",className:"btn red btn-outline"},{extend:"pdf",className:"btn green btn-outline"},{extend:"excel",className:"btn yellow btn-outline "},{extend:"csv",className:"btn purple btn-outline "},{extend:"colvis",className:"btn dark btn-outline",text:"Columns"}],responsive:!0,order:[[0,"asc"]],lengthMenu:[[5,10,15,20,-1],[5,10,15,20,"All"]],pageLength:10,dom:"<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>"})},t=function(){var e=$("#sample_2");e.dataTable({language:{aria:{sortAscending:": activate to sort column ascending",sortDescending:": activate to sort column descending"},emptyTable:"No data available in table",info:"Showing _START_ to _END_ of _TOTAL_ entries",infoEmpty:"No entries found",infoFiltered:"(filtered1 from _MAX_ total entries)",lengthMenu:"_MENU_ entries",search:"Search:",zeroRecords:"No matching records found"},buttons:[{extend:"print",className:"btn default"},{extend:"copy",className:"btn default"},{extend:"pdf",className:"btn default"},{extend:"excel",className:"btn default"},{extend:"csv",className:"btn default"},{text:"Reload",className:"btn default",action:function(e,t,a,n){alert("Custom Button")}}],order:[[0,"asc"]],lengthMenu:[[5,10,15,20,-1],[5,10,15,20,"All"]],pageLength:10,dom:"<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>"})},a=function(){var e=$("#sample_3"),t=e.dataTable({language:{aria:{sortAscending:": activate to sort column ascending",sortDescending:": activate to sort column descending"},emptyTable:"No data available in table",info:"Showing _START_ to _END_ of _TOTAL_ entries",infoEmpty:"No entries found",infoFiltered:"(filtered1 from _MAX_ total entries)",lengthMenu:"_MENU_ entries",search:"Search:",zeroRecords:"No matching records found"},buttons:[{extend:"print",className:"btn dark btn-outline"},{extend:"copy",className:"btn red btn-outline"},{extend:"pdf",className:"btn green btn-outline"},{extend:"excel",className:"btn yellow btn-outline "},{extend:"csv",className:"btn purple btn-outline "},{extend:"colvis",className:"btn dark btn-outline",text:"Columns"}],responsive:!0,order:[[0,"asc"]],lengthMenu:[[5,10,15,20,-1],[5,10,15,20,"All"]],pageLength:10});$("#sample_3_tools > li > a.tool-action").on("click",function(){var e=$(this).attr("data-action");t.DataTable().button(e).trigger()})},n=function(){$(".date-picker").datepicker({rtl:App.isRTL(),autoclose:!0});var e=new Datatable;e.init({src:$("#datatable_ajax"),onSuccess:function(e,t){},onError:function(e){},onDataLoad:function(e){},loadingMessage:"Loading...",dataTable:{bStateSave:!0,lengthMenu:[[10,20,50,100,150,-1],[10,20,50,100,150,"All"]],pageLength:10,ajax:{url:"../demo/table_ajax.php"},order:[[1,"asc"]],buttons:[{extend:"print",className:"btn default"},{extend:"copy",className:"btn default"},{extend:"pdf",className:"btn default"},{extend:"excel",className:"btn default"},{extend:"csv",className:"btn default"},{text:"Reload",className:"btn default",action:function(e,t,a,n){t.ajax.reload(),alert("Datatable reloaded!")}}]}}),e.getTableWrapper().on("click",".table-group-action-submit",function(t){t.preventDefault();var a=$(".table-group-action-input",e.getTableWrapper());""!=a.val()&&e.getSelectedRowsCount()>0?(e.setAjaxParam("customActionType","group_action"),e.setAjaxParam("customActionName",a.val()),e.setAjaxParam("id",e.getSelectedRows()),e.getDataTable().ajax.reload(),e.clearAjaxParams()):""==a.val()?App.alert({type:"danger",icon:"warning",message:"Please select an action",container:e.getTableWrapper(),place:"prepend"}):0===e.getSelectedRowsCount()&&App.alert({type:"danger",icon:"warning",message:"No record selected",container:e.getTableWrapper(),place:"prepend"})}),$("#datatable_ajax_tools > li > a.tool-action").on("click",function(){var t=$(this).attr("data-action");e.getDataTable().button(t).trigger()})};return{init:function(){jQuery().dataTable&&(e(),t(),a(),n())}}}();jQuery(document).ready(function(){TableDatatablesButtons.init()});

142
assets/pages/scripts/table-datatables-colreorder.js

@ -1,142 +0,0 @@
var TableDatatablesColreorder = function () {
var initTable1 = function () {
var table = $('#sample_1');
var oTable = table.dataTable({
// Internationalisation. For more info refer to http://datatables.net/manual/i18n
"language": {
"aria": {
"sortAscending": ": activate to sort column ascending",
"sortDescending": ": activate to sort column descending"
},
"emptyTable": "No data available in table",
"info": "Showing _START_ to _END_ of _TOTAL_ entries",
"infoEmpty": "No entries found",
"infoFiltered": "(filtered1 from _MAX_ total entries)",
"lengthMenu": "_MENU_ entries",
"search": "Search:",
"zeroRecords": "No matching records found"
},
// Or you can use remote translation file
//"language": {
// url: '//cdn.datatables.net/plug-ins/3cfcc339e89/i18n/Portuguese.json'
//},
// setup buttons extentension: http://datatables.net/extensions/buttons/
buttons: [
{ extend: 'print', className: 'btn dark btn-outline' },
{ extend: 'pdf', className: 'btn green btn-outline' },
{ extend: 'csv', className: 'btn purple btn-outline ' }
],
// setup responsive extension: http://datatables.net/extensions/responsive/
responsive: true,
// setup colreorder extension: http://datatables.net/extensions/colreorder/
colReorder: {
reorderCallback: function () {
console.log( 'callback' );
}
},
"order": [
[0, 'asc']
],
"lengthMenu": [
[5, 10, 15, 20, -1],
[5, 10, 15, 20, "All"] // change per page values here
],
// set the initial value
"pageLength": 10,
"dom": "<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>", // horizobtal scrollable datatable
// Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
// setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js).
// So when dropdowns used the scrollable div should be removed.
//"dom": "<'row' <'col-md-12'T>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r>t<'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>",
});
}
var initTable2 = function () {
var table = $('#sample_2');
var oTable = table.dataTable({
// Internationalisation. For more info refer to http://datatables.net/manual/i18n
"language": {
"aria": {
"sortAscending": ": activate to sort column ascending",
"sortDescending": ": activate to sort column descending"
},
"emptyTable": "No data available in table",
"info": "Showing _START_ to _END_ of _TOTAL_ entries",
"infoEmpty": "No entries found",
"infoFiltered": "(filtered1 from _MAX_ total entries)",
"lengthMenu": "_MENU_ entries",
"search": "Search:",
"zeroRecords": "No matching records found"
},
// Or you can use remote translation file
//"language": {
// url: '//cdn.datatables.net/plug-ins/3cfcc339e89/i18n/Portuguese.json'
//},
buttons: [
{ extend: 'print', className: 'btn default' },
{ extend: 'pdf', className: 'btn default' },
{ extend: 'csv', className: 'btn default' }
],
// setup colreorder extension: http://datatables.net/extensions/colreorder/
colReorder: {
reorderCallback: function () {
console.log( 'callback' );
}
},
"order": [
[0, 'asc']
],
"lengthMenu": [
[5, 10, 15, 20, -1],
[5, 10, 15, 20, "All"] // change per page values here
],
// set the initial value
"pageLength": 10,
"dom": "<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>", // horizobtal scrollable datatable
// Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
// setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js).
// So when dropdowns used the scrollable div should be removed.
//"dom": "<'row' <'col-md-12'T>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r>t<'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>",
});
}
return {
//main function to initiate the module
init: function () {
if (!jQuery().dataTable) {
return;
}
initTable1();
initTable2();
}
};
}();
jQuery(document).ready(function() {
TableDatatablesColreorder.init();
});

1
assets/pages/scripts/table-datatables-colreorder.min.js

@ -1 +0,0 @@
var TableDatatablesColreorder=function(){var e=function(){var e=$("#sample_1");e.dataTable({language:{aria:{sortAscending:": activate to sort column ascending",sortDescending:": activate to sort column descending"},emptyTable:"No data available in table",info:"Showing _START_ to _END_ of _TOTAL_ entries",infoEmpty:"No entries found",infoFiltered:"(filtered1 from _MAX_ total entries)",lengthMenu:"_MENU_ entries",search:"Search:",zeroRecords:"No matching records found"},buttons:[{extend:"print",className:"btn dark btn-outline"},{extend:"pdf",className:"btn green btn-outline"},{extend:"csv",className:"btn purple btn-outline "}],responsive:!0,colReorder:{reorderCallback:function(){console.log("callback")}},order:[[0,"asc"]],lengthMenu:[[5,10,15,20,-1],[5,10,15,20,"All"]],pageLength:10,dom:"<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>"})},o=function(){var e=$("#sample_2");e.dataTable({language:{aria:{sortAscending:": activate to sort column ascending",sortDescending:": activate to sort column descending"},emptyTable:"No data available in table",info:"Showing _START_ to _END_ of _TOTAL_ entries",infoEmpty:"No entries found",infoFiltered:"(filtered1 from _MAX_ total entries)",lengthMenu:"_MENU_ entries",search:"Search:",zeroRecords:"No matching records found"},buttons:[{extend:"print",className:"btn default"},{extend:"pdf",className:"btn default"},{extend:"csv",className:"btn default"}],colReorder:{reorderCallback:function(){console.log("callback")}},order:[[0,"asc"]],lengthMenu:[[5,10,15,20,-1],[5,10,15,20,"All"]],pageLength:10,dom:"<'row' <'col-md-12'B>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r><'table-scrollable't><'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>"})};return{init:function(){jQuery().dataTable&&(e(),o())}}}();jQuery(document).ready(function(){TableDatatablesColreorder.init()});

178
assets/pages/scripts/table-datatables-editable.js

@ -1,178 +0,0 @@
var TableDatatablesEditable = function () {
var handleTable = function () {
function restoreRow(oTable, nRow) {
var aData = oTable.fnGetData(nRow);
var jqTds = $('>td', nRow);
for (var i = 0, iLen = jqTds.length; i < iLen; i++) {
oTable.fnUpdate(aData[i], nRow, i, false);
}
oTable.fnDraw();
}
function editRow(oTable, nRow) {
var aData = oTable.fnGetData(nRow);
var jqTds = $('>td', nRow);
jqTds[0].innerHTML = '<input type="text" class="form-control input-small" value="' + aData[0] + '">';
jqTds[1].innerHTML = '<input type="text" class="form-control input-small" value="' + aData[1] + '">';
jqTds[2].innerHTML = '<input type="text" class="form-control input-small" value="' + aData[2] + '">';
jqTds[3].innerHTML = '<input type="text" class="form-control input-small" value="' + aData[3] + '">';
jqTds[4].innerHTML = '<a class="edit" href="">Save</a>';
jqTds[5].innerHTML = '<a class="cancel" href="">Cancel</a>';
}
function saveRow(oTable, nRow) {
var jqInputs = $('input', nRow);
oTable.fnUpdate(jqInputs[0].value, nRow, 0, false);
oTable.fnUpdate(jqInputs[1].value, nRow, 1, false);
oTable.fnUpdate(jqInputs[2].value, nRow, 2, false);
oTable.fnUpdate(jqInputs[3].value, nRow, 3, false);
oTable.fnUpdate('<a class="edit" href="">Edit</a>', nRow, 4, false);
oTable.fnUpdate('<a class="delete" href="">Delete</a>', nRow, 5, false);
oTable.fnDraw();
}
function cancelEditRow(oTable, nRow) {
var jqInputs = $('input', nRow);
oTable.fnUpdate(jqInputs[0].value, nRow, 0, false);
oTable.fnUpdate(jqInputs[1].value, nRow, 1, false);
oTable.fnUpdate(jqInputs[2].value, nRow, 2, false);
oTable.fnUpdate(jqInputs[3].value, nRow, 3, false);
oTable.fnUpdate('<a class="edit" href="">Edit</a>', nRow, 4, false);
oTable.fnDraw();
}
var table = $('#sample_editable_1');
var oTable = table.dataTable({
// Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
// setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js).
// So when dropdowns used the scrollable div should be removed.
//"dom": "<'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r>t<'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>",
"lengthMenu": [
[5, 15, 20, -1],
[5, 15, 20, "All"] // change per page values here
],
// Or you can use remote translation file
//"language": {
// url: '//cdn.datatables.net/plug-ins/3cfcc339e89/i18n/Portuguese.json'
//},
// set the initial value
"pageLength": 5,
"language": {
"lengthMenu": " _MENU_ records"
},
"columnDefs": [{ // set default column settings
'orderable': true,
'targets': [0]
}, {
"searchable": true,
"targets": [0]
}],
"order": [
[0, "asc"]
] // set first column as a default sort by asc
});
var tableWrapper = $("#sample_editable_1_wrapper");
var nEditing = null;
var nNew = false;
$('#sample_editable_1_new').click(function (e) {
e.preventDefault();
if (nNew && nEditing) {
if (confirm("Previose row not saved. Do you want to save it ?")) {
saveRow(oTable, nEditing); // save
$(nEditing).find("td:first").html("Untitled");
nEditing = null;
nNew = false;
} else {
oTable.fnDeleteRow(nEditing); // cancel
nEditing = null;
nNew = false;
return;
}
}
var aiNew = oTable.fnAddData(['', '', '', '', '', '']);
var nRow = oTable.fnGetNodes(aiNew[0]);
editRow(oTable, nRow);
nEditing = nRow;
nNew = true;
});
table.on('click', '.delete', function (e) {
e.preventDefault();
if (confirm("Are you sure to delete this row ?") == false) {
return;
}
var nRow = $(this).parents('tr')[0];
oTable.fnDeleteRow(nRow);
alert("Deleted! Do not forget to do some ajax to sync with backend :)");
});
table.on('click', '.cancel', function (e) {
e.preventDefault();
if (nNew) {
oTable.fnDeleteRow(nEditing);
nEditing = null;
nNew = false;
} else {
restoreRow(oTable, nEditing);
nEditing = null;
}
});
table.on('click', '.edit', function (e) {
e.preventDefault();
nNew = false;
/* Get the row as a parent of the link that was clicked on */
var nRow = $(this).parents('tr')[0];
if (nEditing !== null && nEditing != nRow) {
/* Currently editing - but not this row - restore the old before continuing to edit mode */
restoreRow(oTable, nEditing);
editRow(oTable, nRow);
nEditing = nRow;
} else if (nEditing == nRow && this.innerHTML == "Save") {
/* Editing this row and want to save it */
saveRow(oTable, nEditing);
nEditing = null;
alert("Updated! Do not forget to do some ajax to sync with backend :)");
} else {
/* No edit in progress - let's start one */
editRow(oTable, nRow);
nEditing = nRow;
}
});
}
return {
//main function to initiate the module
init: function () {
handleTable();
}
};
}();
jQuery(document).ready(function() {
TableDatatablesEditable.init();
});

1
assets/pages/scripts/table-datatables-editable.min.js

@ -1 +0,0 @@
var TableDatatablesEditable=function(){var e=function(){function e(e,t){for(var n=e.fnGetData(t),a=$(">td",t),l=0,r=a.length;r>l;l++)e.fnUpdate(n[l],t,l,!1);e.fnDraw()}function t(e,t){var n=e.fnGetData(t),a=$(">td",t);a[0].innerHTML='<input type="text" class="form-control input-small" value="'+n[0]+'">',a[1].innerHTML='<input type="text" class="form-control input-small" value="'+n[1]+'">',a[2].innerHTML='<input type="text" class="form-control input-small" value="'+n[2]+'">',a[3].innerHTML='<input type="text" class="form-control input-small" value="'+n[3]+'">',a[4].innerHTML='<a class="edit" href="">Save</a>',a[5].innerHTML='<a class="cancel" href="">Cancel</a>'}function n(e,t){var n=$("input",t);e.fnUpdate(n[0].value,t,0,!1),e.fnUpdate(n[1].value,t,1,!1),e.fnUpdate(n[2].value,t,2,!1),e.fnUpdate(n[3].value,t,3,!1),e.fnUpdate('<a class="edit" href="">Edit</a>',t,4,!1),e.fnUpdate('<a class="delete" href="">Delete</a>',t,5,!1),e.fnDraw()}var a=$("#sample_editable_1"),l=a.dataTable({lengthMenu:[[5,15,20,-1],[5,15,20,"All"]],pageLength:5,language:{lengthMenu:" _MENU_ records"},columnDefs:[{orderable:!0,targets:[0]},{searchable:!0,targets:[0]}],order:[[0,"asc"]]}),r=($("#sample_editable_1_wrapper"),null),o=!1;$("#sample_editable_1_new").click(function(e){if(e.preventDefault(),o&&r){if(!confirm("Previose row not saved. Do you want to save it ?"))return l.fnDeleteRow(r),r=null,void(o=!1);n(l,r),$(r).find("td:first").html("Untitled"),r=null,o=!1}var a=l.fnAddData(["","","","","",""]),i=l.fnGetNodes(a[0]);t(l,i),r=i,o=!0}),a.on("click",".delete",function(e){if(e.preventDefault(),0!=confirm("Are you sure to delete this row ?")){var t=$(this).parents("tr")[0];l.fnDeleteRow(t),alert("Deleted! Do not forget to do some ajax to sync with backend :)")}}),a.on("click",".cancel",function(t){t.preventDefault(),o?(l.fnDeleteRow(r),r=null,o=!1):(e(l,r),r=null)}),a.on("click",".edit",function(a){a.preventDefault(),o=!1;var i=$(this).parents("tr")[0];null!==r&&r!=i?(e(l,r),t(l,i),r=i):r==i&&"Save"==this.innerHTML?(n(l,r),r=null,alert("Updated! Do not forget to do some ajax to sync with backend :)")):(t(l,i),r=i)})};return{init:function(){e()}}}();jQuery(document).ready(function(){TableDatatablesEditable.init()});

139
assets/pages/scripts/table-datatables-fixedheader.js

@ -1,139 +0,0 @@
var TableDatatablesFixedHeader = function () {
var initTable1 = function () {
var table = $('#sample_1');
var fixedHeaderOffset = 0;
if (App.getViewPort().width < App.getResponsiveBreakpoint('md')) {
if ($('.page-header').hasClass('page-header-fixed-mobile')) {
fixedHeaderOffset = $('.page-header').outerHeight(true);
}
} else if ($('.page-header').hasClass('navbar-fixed-top')) {
fixedHeaderOffset = $('.page-header').outerHeight(true);
}
var oTable = table.dataTable({
// Internationalisation. For more info refer to http://datatables.net/manual/i18n
"language": {
"aria": {
"sortAscending": ": activate to sort column ascending",
"sortDescending": ": activate to sort column descending"
},
"emptyTable": "No data available in table",
"info": "Showing _START_ to _END_ of _TOTAL_ entries",
"infoEmpty": "No entries found",
"infoFiltered": "(filtered1 from _MAX_ total entries)",
"lengthMenu": "_MENU_ entries",
"search": "Search:",
"zeroRecords": "No matching records found"
},
// Or you can use remote translation file
//"language": {
// url: '//cdn.datatables.net/plug-ins/3cfcc339e89/i18n/Portuguese.json'
//},
// setup rowreorder extension: http://datatables.net/extensions/fixedheader/
fixedHeader: {
header: true,
headerOffset: fixedHeaderOffset
},
"order": [
[0, 'asc']
],
"lengthMenu": [
[5, 10, 15, 20, -1],
[5, 10, 15, 20, "All"] // change per page values here
],
// set the initial value
"pageLength": 20,
// Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
// setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js).
// So when dropdowns used the scrollable div should be removed.
//"dom": "<'row' <'col-md-12'T>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r>t<'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>",
});
}
var initTable2 = function () {
var table = $('#sample_2');
var fixedHeaderOffset = 0;
if (App.getViewPort().width < App.getResponsiveBreakpoint('md')) {
if ($('.page-header').hasClass('page-header-fixed-mobile')) {
fixedHeaderOffset = $('.page-header').outerHeight(true);
}
} else if ($('.page-header').hasClass('navbar-fixed-top')) {
fixedHeaderOffset = $('.page-header').outerHeight(true);
}
var oTable = table.dataTable({
// Internationalisation. For more info refer to http://datatables.net/manual/i18n
"language": {
"aria": {
"sortAscending": ": activate to sort column ascending",
"sortDescending": ": activate to sort column descending"
},
"emptyTable": "No data available in table",
"info": "Showing _START_ to _END_ of _TOTAL_ entries",
"infoEmpty": "No entries found",
"infoFiltered": "(filtered1 from _MAX_ total entries)",
"lengthMenu": "_MENU_ entries",
"search": "Search:",
"zeroRecords": "No matching records found"
},
// Or you can use remote translation file
//"language": {
// url: '//cdn.datatables.net/plug-ins/3cfcc339e89/i18n/Portuguese.json'
//},
// setup rowreorder extension: http://datatables.net/extensions/fixedheader/
fixedHeader: {
header: true,
footer: true,
headerOffset: fixedHeaderOffset
},
"order": [
[0, 'asc']
],
"lengthMenu": [
[5, 10, 15, 30, -1],
[5, 10, 15, 30, "All"] // change per page values here
],
// set the initial value
"pageLength": 30,
// Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
// setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js).
// So when dropdowns used the scrollable div should be removed.
//"dom": "<'row' <'col-md-12'T>><'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r>t<'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>",
});
}
return {
//main function to initiate the module
init: function () {
if (!jQuery().dataTable) {
return;
}
initTable1();
initTable2();
}
};
}();
jQuery(document).ready(function() {
TableDatatablesFixedHeader.init();
});

1
assets/pages/scripts/table-datatables-fixedheader.min.js

@ -1 +0,0 @@
var TableDatatablesFixedHeader=function(){var e=function(){var e=$("#sample_1"),a=0;App.getViewPort().width<App.getResponsiveBreakpoint("md")?$(".page-header").hasClass("page-header-fixed-mobile")&&(a=$(".page-header").outerHeight(!0)):$(".page-header").hasClass("navbar-fixed-top")&&(a=$(".page-header").outerHeight(!0));e.dataTable({language:{aria:{sortAscending:": activate to sort column ascending",sortDescending:": activate to sort column descending"},emptyTable:"No data available in table",info:"Showing _START_ to _END_ of _TOTAL_ entries",infoEmpty:"No entries found",infoFiltered:"(filtered1 from _MAX_ total entries)",lengthMenu:"_MENU_ entries",search:"Search:",zeroRecords:"No matching records found"},fixedHeader:{header:!0,headerOffset:a},order:[[0,"asc"]],lengthMenu:[[5,10,15,20,-1],[5,10,15,20,"All"]],pageLength:20})},a=function(){var e=$("#sample_2"),a=0;App.getViewPort().width<App.getResponsiveBreakpoint("md")?$(".page-header").hasClass("page-header-fixed-mobile")&&(a=$(".page-header").outerHeight(!0)):$(".page-header").hasClass("navbar-fixed-top")&&(a=$(".page-header").outerHeight(!0));e.dataTable({language:{aria:{sortAscending:": activate to sort column ascending",sortDescending:": activate to sort column descending"},emptyTable:"No data available in table",info:"Showing _START_ to _END_ of _TOTAL_ entries",infoEmpty:"No entries found",infoFiltered:"(filtered1 from _MAX_ total entries)",lengthMenu:"_MENU_ entries",search:"Search:",zeroRecords:"No matching records found"},fixedHeader:{header:!0,footer:!0,headerOffset:a},order:[[0,"asc"]],lengthMenu:[[5,10,15,30,-1],[5,10,15,30,"All"]],pageLength:30})};return{init:function(){jQuery().dataTable&&(e(),a())}}}();jQuery(document).ready(function(){TableDatatablesFixedHeader.init()});

418
assets/pages/scripts/table-datatables-managed.js

@ -1,418 +0,0 @@
var TableDatatablesManaged = function () {
var initTable1 = function () {
var table = $('#sample_1');
// begin first table
table.dataTable({
// Internationalisation. For more info refer to http://datatables.net/manual/i18n
"language": {
"aria": {
"sortAscending": ": activate to sort column ascending",
"sortDescending": ": activate to sort column descending"
},
"emptyTable": "No data available in table",
"info": "Showing _START_ to _END_ of _TOTAL_ records",
"infoEmpty": "No records found",
"infoFiltered": "(filtered1 from _MAX_ total records)",
"lengthMenu": "Show _MENU_",
"search": "Search:",
"zeroRecords": "No matching records found",
"paginate": {
"previous":"Prev",
"next": "Next",
"last": "Last",
"first": "First"
}
},
// Or you can use remote translation file
//"language": {
// url: '//cdn.datatables.net/plug-ins/3cfcc339e89/i18n/Portuguese.json'
//},
// Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
// setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js).
// So when dropdowns used the scrollable div should be removed.
//"dom": "<'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r>t<'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>",
"bStateSave": true, // save datatable state(pagination, sort, etc) in cookie.
"columnDefs": [ {
"targets": 0,
"orderable": false,
"searchable": false
}],
"lengthMenu": [
[5, 15, 20, -1],
[5, 15, 20, "All"] // change per page values here
],
// set the initial value
"pageLength": 5,
"pagingType": "bootstrap_full_number",
"columnDefs": [{ // set default column settings
'orderable': false,
'targets': [0]
}, {
"searchable": false,
"targets": [0]
}],
"order": [
[1, "asc"]
] // set first column as a default sort by asc
});
var tableWrapper = jQuery('#sample_1_wrapper');
table.find('.group-checkable').change(function () {
var set = jQuery(this).attr("data-set");
var checked = jQuery(this).is(":checked");
jQuery(set).each(function () {
if (checked) {
$(this).prop("checked", true);
$(this).parents('tr').addClass("active");
} else {
$(this).prop("checked", false);
$(this).parents('tr').removeClass("active");
}
});
});
table.on('change', 'tbody tr .checkboxes', function () {
$(this).parents('tr').toggleClass("active");
});
}
var initTable2 = function () {
var table = $('#sample_2');
table.dataTable({
// Internationalisation. For more info refer to http://datatables.net/manual/i18n
"language": {
"aria": {
"sortAscending": ": activate to sort column ascending",
"sortDescending": ": activate to sort column descending"
},
"emptyTable": "No data available in table",
"info": "Showing _START_ to _END_ of _TOTAL_ records",
"infoEmpty": "No records found",
"infoFiltered": "(filtered1 from _MAX_ total records)",
"lengthMenu": "Show _MENU_",
"search": "Search:",
"zeroRecords": "No matching records found",
"paginate": {
"previous":"Prev",
"next": "Next",
"last": "Last",
"first": "First"
}
},
// Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
// setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js).
// So when dropdowns used the scrollable div should be removed.
//"dom": "<'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r>t<'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>",
"bStateSave": true, // save datatable state(pagination, sort, etc) in cookie.
"pagingType": "bootstrap_extended",
"lengthMenu": [
[5, 15, 20, -1],
[5, 15, 20, "All"] // change per page values here
],
// set the initial value
"pageLength": 5,
"columnDefs": [{ // set default column settings
'orderable': false,
'targets': [0]
}, {
"searchable": false,
"targets": [0]
}],
"order": [
[1, "asc"]
] // set first column as a default sort by asc
});
var tableWrapper = jQuery('#sample_2_wrapper');
table.find('.group-checkable').change(function () {
var set = jQuery(this).attr("data-set");
var checked = jQuery(this).is(":checked");
jQuery(set).each(function () {
if (checked) {
$(this).prop("checked", true);
} else {
$(this).prop("checked", false);
}
});
});
}
var initTable3 = function () {
var table = $('#sample_3');
// begin: third table
table.dataTable({
// Internationalisation. For more info refer to http://datatables.net/manual/i18n
"language": {
"aria": {
"sortAscending": ": activate to sort column ascending",
"sortDescending": ": activate to sort column descending"
},
"emptyTable": "No data available in table",
"info": "Showing _START_ to _END_ of _TOTAL_ records",
"infoEmpty": "No records found",
"infoFiltered": "(filtered1 from _MAX_ total records)",
"lengthMenu": "Show _MENU_",
"search": "Search:",
"zeroRecords": "No matching records found",
"paginate": {
"previous":"Prev",
"next": "Next",
"last": "Last",
"first": "First"
}
},
// Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
// setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js).
// So when dropdowns used the scrollable div should be removed.
//"dom": "<'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r>t<'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>",
"bStateSave": true, // save datatable state(pagination, sort, etc) in cookie.
"lengthMenu": [
[6, 15, 20, -1],
[6, 15, 20, "All"] // change per page values here
],
// set the initial value
"pageLength": 6,
"columnDefs": [{ // set default column settings
'orderable': false,
'targets': [0]
}, {
"searchable": false,
"targets": [0]
}],
"order": [
[1, "asc"]
] // set first column as a default sort by asc
});
var tableWrapper = jQuery('#sample_3_wrapper');
table.find('.group-checkable').change(function () {
var set = jQuery(this).attr("data-set");
var checked = jQuery(this).is(":checked");
jQuery(set).each(function () {
if (checked) {
$(this).prop("checked", true);
} else {
$(this).prop("checked", false);
}
});
});
}
var initTable4 = function () {
var table = $('#sample_4');
// begin: third table
table.dataTable({
// Internationalisation. For more info refer to http://datatables.net/manual/i18n
"language": {
"aria": {
"sortAscending": ": activate to sort column ascending",
"sortDescending": ": activate to sort column descending"
},
"emptyTable": "No data available in table",
"info": "Showing _START_ to _END_ of _TOTAL_ records",
"infoEmpty": "No records found",
"infoFiltered": "(filtered1 from _MAX_ total records)",
"lengthMenu": "Show _MENU_",
"search": "Search:",
"zeroRecords": "No matching records found",
"paginate": {
"previous":"Prev",
"next": "Next",
"last": "Last",
"first": "First"
}
},
// Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
// setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js).
// So when dropdowns used the scrollable div should be removed.
//"dom": "<'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r>t<'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>",
"bStateSave": true, // save datatable state(pagination, sort, etc) in cookie.
"lengthMenu": [
[6, 15, 20, -1],
[6, 15, 20, "All"] // change per page values here
],
// set the initial value
"pageLength": 6,
"columnDefs": [{ // set default column settings
'orderable': false,
'targets': [0]
}, {
"searchable": false,
"targets": [0]
}],
"order": [
[1, "asc"]
] // set first column as a default sort by asc
});
var tableWrapper = jQuery('#sample_4_wrapper');
table.find('.group-checkable').change(function () {
var set = jQuery(this).attr("data-set");
var checked = jQuery(this).is(":checked");
jQuery(set).each(function () {
if (checked) {
$(this).prop("checked", true);
} else {
$(this).prop("checked", false);
}
});
});
}
var initTable5 = function () {
var table = $('#sample_5');
// begin: third table
table.dataTable({
// Internationalisation. For more info refer to http://datatables.net/manual/i18n
"language": {
"aria": {
"sortAscending": ": activate to sort column ascending",
"sortDescending": ": activate to sort column descending"
},
"emptyTable": "No data available in table",
"info": "Showing _START_ to _END_ of _TOTAL_ records",
"infoEmpty": "No records found",
"infoFiltered": "(filtered1 from _MAX_ total records)",
"lengthMenu": "Show _MENU_",
"search": "Search:",
"zeroRecords": "No matching records found",
"paginate": {
"previous":"Prev",
"next": "Next",
"last": "Last",
"first": "First"
}
},
"footerCallback": function ( row, data, start, end, display ) {
var api = this.api(), data;
// Remove the formatting to get integer data for summation
var intVal = function ( i ) {
return typeof i === 'string' ?
i.replace(/[\$,]/g, '')*1 :
typeof i === 'number' ?
i : 0;
};
// Total over all pages
total = api
.column( 3 )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
// Total over this page
pageTotal = api
.column( 3, { page: 'current'} )
.data()
.reduce( function (a, b) {
return intVal(a) + intVal(b);
}, 0 );
// Update footer
$( api.column( 3 ).footer() ).html(
'$'+pageTotal +' ( $'+ total +' total)'
);
},
// Uncomment below line("dom" parameter) to fix the dropdown overflow issue in the datatable cells. The default datatable layout
// setup uses scrollable div(table-scrollable) with overflow:auto to enable vertical scroll(see: assets/global/plugins/datatables/plugins/bootstrap/dataTables.bootstrap.js).
// So when dropdowns used the scrollable div should be removed.
//"dom": "<'row'<'col-md-6 col-sm-12'l><'col-md-6 col-sm-12'f>r>t<'row'<'col-md-5 col-sm-12'i><'col-md-7 col-sm-12'p>>",
"bStateSave": true, // save datatable state(pagination, sort, etc) in cookie.
"lengthMenu": [
[6, 15, 20, -1],
[6, 15, 20, "All"] // change per page values here
],
// set the initial value
"pageLength": 6,
"columnDefs": [{ // set default column settings
'orderable': false,
'targets': [0]
}, {
"searchable": false,
"targets": [0]
}],
"order": [
[1, "asc"]
] // set first column as a default sort by asc
});
var tableWrapper = jQuery('#sample_5_wrapper');
table.find('.group-checkable').change(function () {
var set = jQuery(this).attr("data-set");
var checked = jQuery(this).is(":checked");
jQuery(set).each(function () {
if (checked) {
$(this).prop("checked", true);
} else {
$(this).prop("checked", false);
}
});
});
}
return {
//main function to initiate the module
init: function () {
if (!jQuery().dataTable) {
return;
}
initTable1();
initTable2();
initTable3();
initTable4();
initTable5();
}
};
}();
if (App.isAngularJsApp() === false) {
jQuery(document).ready(function() {
TableDatatablesManaged.init();
});
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save