Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

HTML
<script type="text/javascript">
AJS.toInit(function() {
    // Interceptar específicamente las llamadas a cargar_region
    var originalAjax = AJS.$.ajax;
    
    AJS.$.ajax = function(options) {
        if (typeof options === 'string') {
            options = { url: options };
        }
        
        // Corregir específicamente las URLs de ofertas_trabajo
        if (options.url && options.url.includes('pm.portalminero.com/ofertas_trabajo')) {
            if (options.url.indexOf('http://') === 0) {
                options.url = options.url.replace('http://', 'https://');
                console.log('Mixed content corregido:', options.url);
            }
        }
        
        return originalAjax.apply(this, arguments);
    };
    
    // También verificar jQuery global si existe
    if (window.jQuery && window.jQuery !== AJS.$) {
        var originalJQueryAjax = window.jQuery.ajax;
        window.jQuery.ajax = function(options) {
            if (typeof options === 'string') {
                options = { url: options };
            }
            if (options.url && options.url.includes('pm.portalminero.com/ofertas_trabajo')) {
                if (options.url.indexOf('http://') === 0) {
                    options.url = options.url.replace('http://', 'https://');
                }
            }
            return originalJQueryAjax.apply(this, arguments);
        };
    }
});
</script>
 
<style>
/* CSS que se hereda al popup */
@media screen and (max-width: 768px) {
    .form_login label {
        width: 100px !important;
        font-size: 12px !important;
        color: #2a5f97 !important;
        font-weight: bold !important;
        left: -100px !important;
        position: relative !important;
    }
}

/* Forzar CSS en cualquier popup hijo */
* .form_login label {
    width: 100px !important;
    font-size: 12px !important;
    color: #2a5f97 !important;
    font-weight: bold !important;
    left: -100px !important;
    position: relative !important;
}
</style>