Back to PhocacartRenderAdminjs class

Method moveSystemMessageFromJoomlaToPhoca

public static
moveSystemMessageFromJoomlaToPhoca
()

Method moveSystemMessageFromJoomlaToPhoca - Source code

/* Really not nice way to move the system messages from bootstrap2 (Joomla) to bootstrap3 (Phoca)
 * Don't add it phocacart.js as it should be run only in some views, not everywhere
 */
public static function moveSystemMessageFromJoomlaToPhoca()
{
    $s = array();
    //$s[] = 'document.getElementById("system-message-container").style.display = "none";';
    $s[] = 'jQuery(document).ready(function() {';
    //$s[] = '   jQuery("#system-message-container").removeClass("j-toggle-main");';
    $s[] = '   jQuery("#system-message-container").css("display", "none");';
    $s[] = '   var phSystemMsg = jQuery("#system-message-container").html();';
    $s[] = '   jQuery("#ph-system-message-container").html(phSystemMsg);';
    $s[] = '});';
    Factory::getDocument()->addScriptDeclaration(implode("\n", $s));
}