<commit_before><?php
/**
 * Get the required html/js/css for the content manager.
 *
 * Contains the view helper to add he required html/js/css for the content manager.  Must be included in all
 * layouts for the CMS to work correctly.
 *
 * PHP version 5.3
 *
 * LICENSE: No License yet
 *
 * @category  Reliv
 * @package   Common\View\Helper
 * @author    <NAME> <<EMAIL>>
 * @copyright 2012 Reliv International
 * @license   License.txt New BSD License
 * @version   GIT: <git_id>
 * @link      http://ci.reliv.com/confluence
 */

namespace Rcm\View\Helper;

use \Zend\View\Helper\AbstractHelper;

/**
 * Get the required html/js/css for the content manager.
 *
 * Contains the view helper to add he required html/js/css for the content manager.  Must be included in all
 * layouts for the CMS to work correctly.
 *
 * @category  Reliv
 * @package   Common\View\Helper
 * @author    <NAME> <<EMAIL>>
 * @copyright 2012 Reliv International
 * @license   License.txt New BSD License
 * @version   Release: 1.0
 * @link      http://ci.reliv.com/confluence
 *
 */
class RcmViewInit extends AbstractHelper
{
    /**
     * Function called when using $this->view->getRcmRequired().  Will
     * call method getRequired.  See method getRequired
     * for more info
     *
     * @return self
     */
    public function __invoke()
    {
        return $this->init();
    }

    public function init()
    {
        /** @var \Zend\View\Renderer\PhpRenderer $renderer */
        $renderer = $this->getView();
        $renderer->rcmTop = '';
        $renderer->rcmBottom = '';
        $renderer->containers = array();

        $this->setHead($renderer);
        $this->initPlugins($renderer);

        if ($renderer->adminIsLoggedIn) {
            $this->getRequiredAdmin($renderer);
        }

        return $this;
    }

    public function getBodyTop() {
        return $this->bodyTop;
    }

    public function getBodyBottom() {
        return $this->bodyBottom;
    }

    protected function getRequiredAdmin(\Zend\View\Renderer\PhpRenderer $renderer)
    {
        $this->setAdminHead($renderer);
        $this->getAdminInitScript($renderer);
        $this->getAdminTopBody($renderer);
        $this->getAdminBottomBody($renderer);
    }

    protected function setHead(\Zend\View\Renderer\PhpRenderer $renderer)
    {
        $this->setMeta($renderer);
        $this->setJs($renderer);
        $this->setCss($renderer);
    }

    protected function setMeta(\Zend\View\Renderer\PhpRenderer $renderer)
    {

        $renderer->headMeta()->appendName('description', $renderer->metaDesc);

        $renderer->headMeta()->appendName('keywords', $renderer->metaKeys);
    }

    protected function setJs(\Zend\View\Renderer\PhpRenderer $renderer)
    {
        // HTML5 shim, for IE6-8 support of HTML elements
        $renderer->headScript()->appendFile(
            $renderer->basePath() . '/js/html5.js', 'text/javascript',
            array('conditional' => 'lt IE 9',)
        );

        $renderer->headScript()->appendFile(
            $renderer->basePath() . '/modules/rcm/vendor/jquery/js/jquery-1.8.2.js', 'text/javascript'
        );

        $renderer->headScript()->appendFile(
            $renderer->basePath() . '/modules/rcm/vendor/jquery/js/jquery-ui-1.9.1.custom.min.js', 'text/javascript'
        );

        $renderer->headScript()->appendFile(
            $renderer->basePath() . '/modules/rcm/vendor/jquery-block-ui/jquery.blockUI.js', 'text/javascript'
        );

        $script = '$.blockUI.defaults = { baseZ: 2000 };';

        $renderer->headScript()->appendScript($script,'text/javascript');


    }

    protected function setCss(\Zend\View\Renderer\PhpRenderer $renderer)
    {
        $renderer->headLink()->appendStylesheet(
            $renderer->basePath() . '/modules/rcm/vendor/jquery/css/smoothness/jquery-ui-1.9.1.custom.css'
        );
    }

    protected function setAdminHead(\Zend\View\Renderer\PhpRenderer $renderer)
    {
        $this->setAdminMeta($renderer);
        $this->setAdminJs($renderer);<commit_msg>Updated BlockUi Z-Indexing<commit_after><?php
/**
 * Get the required html/js/css for the content manager.
 *
 * Contains the view helper to add he required html/js/css for the content manager.  Must be included in all
 * layouts for the CMS to work correctly.
 *
 * PHP version 5.3
 *
 * LICENSE: No License yet
 *
 * @category  Reliv
 * @package   Common\View\Helper
 * @author    <NAME> <<EMAIL>>
 * @copyright 2012 Reliv International
 * @license   License.txt New BSD License
 * @version   GIT: <git_id>
 * @link      http://ci.reliv.com/confluence
 */

namespace Rcm\View\Helper;

use \Zend\View\Helper\AbstractHelper;

/**
 * Get the required html/js/css for the content manager.
 *
 * Contains the view helper to add he required html/js/css for the content manager.  Must be included in all
 * layouts for the CMS to work correctly.
 *
 * @category  Reliv
 * @package   Common\View\Helper
 * @author    <NAME> <<EMAIL>>
 * @copyright 2012 Reliv International
 * @license   License.txt New BSD License
 * @version   Release: 1.0
 * @link      http://ci.reliv.com/confluence
 *
 */
class RcmViewInit extends AbstractHelper
{
    /**
     * Function called when using $this->view->getRcmRequired().  Will
     * call method getRequired.  See method getRequired
     * for more info
     *
     * @return self
     */
    public function __invoke()
    {
        return $this->init();
    }

    public function init()
    {
        /** @var \Zend\View\Renderer\PhpRenderer $renderer */
        $renderer = $this->getView();
        $renderer->rcmTop = '';
        $renderer->rcmBottom = '';
        $renderer->containers = array();

        $this->setHead($renderer);
        $this->initPlugins($renderer);

        if ($renderer->adminIsLoggedIn) {
            $this->getRequiredAdmin($renderer);
        }

        return $this;
    }

    public function getBodyTop() {
        return $this->bodyTop;
    }

    public function getBodyBottom() {
        return $this->bodyBottom;
    }

    protected function getRequiredAdmin(\Zend\View\Renderer\PhpRenderer $renderer)
    {
        $this->setAdminHead($renderer);
        $this->getAdminInitScript($renderer);
        $this->getAdminTopBody($renderer);
        $this->getAdminBottomBody($renderer);
    }

    protected function setHead(\Zend\View\Renderer\PhpRenderer $renderer)
    {
        $this->setMeta($renderer);
        $this->setJs($renderer);
        $this->setCss($renderer);
    }

    protected function setMeta(\Zend\View\Renderer\PhpRenderer $renderer)
    {

        $renderer->headMeta()->appendName('description', $renderer->metaDesc);

        $renderer->headMeta()->appendName('keywords', $renderer->metaKeys);
    }

    protected function setJs(\Zend\View\Renderer\PhpRenderer $renderer)
    {
        // HTML5 shim, for IE6-8 support of HTML elements
        $renderer->headScript()->appendFile(
            $renderer->basePath() . '/js/html5.js', 'text/javascript',
            array('conditional' => 'lt IE 9',)
        );

        $renderer->headScript()->appendFile(
            $renderer->basePath() . '/modules/rcm/vendor/jquery/js/jquery-1.8.2.js', 'text/javascript'
        );

        $renderer->headScript()->appendFile(
            $renderer->basePath() . '/modules/rcm/vendor/jquery/js/jquery-ui-1.9.1.custom.min.js', 'text/javascript'
        );

        $renderer->headScript()->appendFile(
            $renderer->basePath() . '/modules/rcm/vendor/jquery-block-ui/jquery.blockUI.js', 'text/javascript'
        );

        $script = '$.blockUI.defaults.baseZ = 2000;';

        $renderer->headScript()->appendScript($script,'text/javascript');


    }

    protected function setCss(\Zend\View\Renderer\PhpRenderer $renderer)
    {
        $renderer->headLink()->appendStylesheet(
            $renderer->basePath() . '/modules/rcm/vendor/jquery/css/smoothness/jquery-ui-1.9.1.custom.css'
        );
    }

    protected function setAdminHead(\Zend\View\Renderer\PhpRenderer $renderer)
    {
        $this->setAdminMeta($renderer);
        $this->setAdminJs($renderer);
{'fraction_non_alphanumeric': 0.14319133218419108, 'fraction_numerical': 0.007387343018960847, 'mean_word_length': 2.5974313551815764, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 109, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1063152', 'n_tokens_mistral': 2460, 'n_tokens_neox': 2451, 'n_words': 496}