mirror of https://github.com/ColorlibHQ/AdminLTE
fix js warnings in pages
parent
a2d25ca035
commit
ac94d081d4
|
@ -1077,7 +1077,7 @@
|
|||
}
|
||||
|
||||
// This will get the first returned node in the jQuery collection.
|
||||
var areaChart = new Chart(areaChartCanvas, {
|
||||
new Chart(areaChartCanvas, {
|
||||
type: 'line',
|
||||
data: areaChartData,
|
||||
options: areaChartOptions
|
||||
|
@ -1126,7 +1126,7 @@
|
|||
}
|
||||
//Create pie or douhnut chart
|
||||
// You can switch between pie and douhnut using the method below.
|
||||
var donutChart = new Chart(donutChartCanvas, {
|
||||
new Chart(donutChartCanvas, {
|
||||
type: 'doughnut',
|
||||
data: donutData,
|
||||
options: donutOptions
|
||||
|
@ -1144,7 +1144,7 @@
|
|||
}
|
||||
//Create pie or douhnut chart
|
||||
// You can switch between pie and douhnut using the method below.
|
||||
var pieChart = new Chart(pieChartCanvas, {
|
||||
new Chart(pieChartCanvas, {
|
||||
type: 'pie',
|
||||
data: pieData,
|
||||
options: pieOptions
|
||||
|
@ -1166,7 +1166,7 @@
|
|||
datasetFill : false
|
||||
}
|
||||
|
||||
var barChart = new Chart(barChartCanvas, {
|
||||
new Chart(barChartCanvas, {
|
||||
type: 'bar',
|
||||
data: barChartData,
|
||||
options: barChartOptions
|
||||
|
@ -1191,7 +1191,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
var stackedBarChart = new Chart(stackedBarChartCanvas, {
|
||||
new Chart(stackedBarChartCanvas, {
|
||||
type: 'bar',
|
||||
data: stackedBarChartData,
|
||||
options: stackedBarChartOptions
|
||||
|
|
|
@ -1730,26 +1730,26 @@
|
|||
|
||||
$('.my-colorpicker2').on('colorpickerChange', function(event) {
|
||||
$('.my-colorpicker2 .fa-square').css('color', event.color.toString());
|
||||
});
|
||||
})
|
||||
|
||||
$("input[data-bootstrap-switch]").each(function(){
|
||||
$(this).bootstrapSwitch('state', $(this).prop('checked'));
|
||||
});
|
||||
})
|
||||
|
||||
})
|
||||
// BS-Stepper Init
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
window.stepper = new Stepper(document.querySelector('.bs-stepper'))
|
||||
});
|
||||
})
|
||||
|
||||
// DropzoneJS Demo Code Start
|
||||
Dropzone.autoDiscover = false;
|
||||
Dropzone.autoDiscover = false
|
||||
|
||||
// Get the template HTML and remove it from the doumenthe template HTML and remove it from the doument
|
||||
var previewNode = document.querySelector("#template");
|
||||
previewNode.id = "";
|
||||
var previewTemplate = previewNode.parentNode.innerHTML;
|
||||
previewNode.parentNode.removeChild(previewNode);
|
||||
var previewNode = document.querySelector("#template")
|
||||
previewNode.id = ""
|
||||
var previewTemplate = previewNode.parentNode.innerHTML
|
||||
previewNode.parentNode.removeChild(previewNode)
|
||||
|
||||
var myDropzone = new Dropzone(document.body, { // Make the whole body a dropzone
|
||||
url: "/target-url", // Set the url
|
||||
|
@ -1760,39 +1760,39 @@
|
|||
autoQueue: false, // Make sure the files aren't queued until manually added
|
||||
previewsContainer: "#previews", // Define the container to display the previews
|
||||
clickable: ".fileinput-button" // Define the element that should be used as click trigger to select files.
|
||||
});
|
||||
})
|
||||
|
||||
myDropzone.on("addedfile", function(file) {
|
||||
// Hookup the start button
|
||||
file.previewElement.querySelector(".start").onclick = function() { myDropzone.enqueueFile(file); };
|
||||
});
|
||||
file.previewElement.querySelector(".start").onclick = function() { myDropzone.enqueueFile(file) }
|
||||
})
|
||||
|
||||
// Update the total progress bar
|
||||
myDropzone.on("totaluploadprogress", function(progress) {
|
||||
document.querySelector("#total-progress .progress-bar").style.width = progress + "%";
|
||||
});
|
||||
document.querySelector("#total-progress .progress-bar").style.width = progress + "%"
|
||||
})
|
||||
|
||||
myDropzone.on("sending", function(file) {
|
||||
// Show the total progress bar when upload starts
|
||||
document.querySelector("#total-progress").style.opacity = "1";
|
||||
document.querySelector("#total-progress").style.opacity = "1"
|
||||
// And disable the start button
|
||||
file.previewElement.querySelector(".start").setAttribute("disabled", "disabled");
|
||||
});
|
||||
file.previewElement.querySelector(".start").setAttribute("disabled", "disabled")
|
||||
})
|
||||
|
||||
// Hide the total progress bar when nothing's uploading anymore
|
||||
myDropzone.on("queuecomplete", function(progress) {
|
||||
document.querySelector("#total-progress").style.opacity = "0";
|
||||
});
|
||||
document.querySelector("#total-progress").style.opacity = "0"
|
||||
})
|
||||
|
||||
// Setup the buttons for all transfers
|
||||
// The "add files" button doesn't need to be setup because the config
|
||||
// `clickable` has already been specified.
|
||||
document.querySelector("#actions .start").onclick = function() {
|
||||
myDropzone.enqueueFiles(myDropzone.getFilesWithStatus(Dropzone.ADDED));
|
||||
};
|
||||
myDropzone.enqueueFiles(myDropzone.getFilesWithStatus(Dropzone.ADDED))
|
||||
}
|
||||
document.querySelector("#actions .cancel").onclick = function() {
|
||||
myDropzone.removeAllFiles(true);
|
||||
};
|
||||
myDropzone.removeAllFiles(true)
|
||||
}
|
||||
// DropzoneJS Demo Code End
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue