F-002 fix: Remove secrets and externalize config
This commit is contained in:
184
project/web/index/new/inc/footer.php
Normal file
184
project/web/index/new/inc/footer.php
Normal file
@@ -0,0 +1,184 @@
|
||||
<!-- SCRIPTS JS
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
|
||||
<!-- EDITOR CKEDITOR
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
|
||||
<script src="https://code.jquery.com/jquery.min.js"></script>
|
||||
<script src="https://cdn.ckeditor.com/ckeditor5/22.0.0/classic/ckeditor.js"></script>
|
||||
|
||||
<script>
|
||||
ClassicEditor
|
||||
.create( document.querySelector( '#editor' ) )
|
||||
.then( editor => {
|
||||
console.log( editor );
|
||||
} )
|
||||
.catch( error => {
|
||||
console.error( error );
|
||||
} );
|
||||
</script>
|
||||
|
||||
<!-- SEO URL
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<script src="./js/slugify.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('#slug,#slug-span').slugify('#slug-source');
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- CONVIERTE TEXTO A MAYÚSCULAS
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
|
||||
<script>
|
||||
$(".text-uppercase").keyup(function () {
|
||||
this.value = this.value.toLocaleUpperCase();
|
||||
this.value = this.value.replace(/['"]+/g, '');
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- CONVIERTE TEXTO A MINÚSCULAS
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<script>
|
||||
$(".text-lowercase").keyup(function () {
|
||||
this.value = this.value.toLocaleLowerCase();
|
||||
this.value = this.value.replace(/['"]+/g, '');
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- AJAX - REFRESCA LISTA DE MARCAS
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
<script>
|
||||
function refreshBrand()
|
||||
{
|
||||
$.ajax({
|
||||
url: './inc/marcas.php',
|
||||
type: 'post',
|
||||
success: function(data) {
|
||||
$('.newbrand').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- VENTANA MODAL CREAR NUEVA MARCA
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
|
||||
<script>
|
||||
// GET THE MODAL
|
||||
var modal = document.getElementById("marcanueva");
|
||||
|
||||
// GET THE BUTTON THAT OPENS THE MODAL
|
||||
var btn = document.getElementById("newbrand");
|
||||
|
||||
// GET THE <SPAN> ELEMENT THAT CLOSES THE MODAL
|
||||
var span = document.getElementsByClassName("close")[0];
|
||||
|
||||
// WHEN THE USER CLICKS THE BUTTON, OPEN THE MODAL
|
||||
btn.onclick = function() {
|
||||
modal.style.display = "block";
|
||||
}
|
||||
|
||||
// WHEN THE USER CLICKS ON <SPAN> (X), CLOSE THE MODAL
|
||||
span.onclick = function() {
|
||||
modal.style.display = "none";
|
||||
}
|
||||
|
||||
// WHEN THE USER CLICKS ANYWHERE OUTSIDE OF THE MODAL, CLOSE IT
|
||||
window.onclick = function(event) {
|
||||
if (event.target == modal) {
|
||||
modal.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
// WHEN THE USER CLICKS THE BUTTON <GUARDAR>, CLOSE THE MODAL
|
||||
function cerrarModal(idModal) {
|
||||
var idModal = idModal;
|
||||
var modala = document.getElementById(idModal);
|
||||
modala.style.display = "none";
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- AJAX - CREAR NUEVA MARCA
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
|
||||
<script>
|
||||
function createBrand()
|
||||
{
|
||||
var nombreMarca= $("#nombreMarca").val();
|
||||
|
||||
$.ajax({
|
||||
url: './inc/newmarca.php',
|
||||
type: 'post',
|
||||
data: "nombreMarca=" + nombreMarca,
|
||||
beforeSend: function(){
|
||||
$('#guardarMarca').hide();
|
||||
$('#loading').show();
|
||||
},
|
||||
complete: function(){
|
||||
$('#loading').hide();
|
||||
$('#guardarMarca').show();
|
||||
cerrarModal('marcanueva');
|
||||
},
|
||||
success: function(data) {
|
||||
refreshBrand();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- ENTER - STOP SUBMITTING FORM
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
|
||||
<script>
|
||||
document.getElementById("newproduct").onkeypress = function(e) {
|
||||
var key = e.charCode || e.keyCode || 0;
|
||||
if (key == 13) {
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- INPUT 'DATE' PARA SAFARI
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/webshim/1.12.4/extras/modernizr-custom.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/webshim/1.12.4/polyfiller.js"></script>
|
||||
|
||||
<script>
|
||||
webshims.setOptions('waitReady', false);
|
||||
webshims.setOptions('forms-ext', {type: 'date'});
|
||||
webshims.setOptions('forms-ext', {type: 'time'});
|
||||
webshims.polyfill('forms forms-ext');
|
||||
</script>
|
||||
|
||||
<script>
|
||||
function setLink() {
|
||||
var nameValue = document.getElementById("slug-source").value;
|
||||
var brandSelect = document.getElementById("marca");
|
||||
var brandValue = brandSelect.options[brandSelect.selectedIndex].text;
|
||||
var url = "./describe.php?name=" + encodeURIComponent(nameValue) + " " + encodeURIComponent(brandValue);
|
||||
document.getElementById("ia_link").href = url;
|
||||
}
|
||||
|
||||
function validateSelect() {
|
||||
var brandSelect = document.getElementById("marca");
|
||||
var ia_link = document.getElementById("ia_link");
|
||||
if (brandSelect.value) {
|
||||
ia_link.style.display = "block";
|
||||
var element = document.getElementById("url_div");
|
||||
element.className = "ten columns";
|
||||
} else {
|
||||
ia_link.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<!-- FIN SCRIPTS JS
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user