/**
  * Render supporting javascript to try and help it work with MIGX etc
  */
 public function includeScriptAssets()
 {
     $vers = $this->modx->getVersionData();
     if ($vers['major_version'] >= 3) {
         $this->modx->regClientCSS($this->options['assetsUrl'] . 'mgr/css/imageplus.css');
     } else {
         $this->modx->regClientCSS($this->options['assetsUrl'] . 'mgr/css/imageplus-22.css');
     }
     $this->modx->regClientCSS($this->options['assetsUrl'] . 'mgr/css/jquery/jquery.jcrop.min.css');
     $this->modx->regClientStartupScript($this->options['assetsUrl'] . 'mgr/js/imageplus.js');
     $this->modx->regClientStartupScript($this->options['assetsUrl'] . 'mgr/js/imageplus.panel.input.js');
     $this->modx->regClientStartupScript($this->options['assetsUrl'] . 'mgr/js/imageplus.window.editor.js');
     $this->modx->regClientStartupScript($this->options['assetsUrl'] . 'mgr/js/imageplus.migx_renderer.js');
     $this->modx->regClientStartupScript($this->options['assetsUrl'] . 'mgr/js/tools/JSON2.js');
     $this->modx->regClientStartupScript($this->options['assetsUrl'] . 'mgr/js/jquery/jquery.min.js');
     $this->modx->regClientStartupScript($this->options['assetsUrl'] . 'mgr/js/jquery/jquery.jcrop.min.js');
     $this->modx->regClientStartupScript($this->options['assetsUrl'] . 'mgr/js/imageplus.jquery.imagecrop.js');
     $this->modx->regClientStartupHTMLBlock('<script type="text/javascript">' . ' ImagePlus.config = ' . json_encode($this->options) . ';' . ' var $jIP = jQuery.noConflict();' . '</script>');
 }
Exemple #2
0
 /**
  * @param $html
  */
 public function regClientStartupHTMLBlock($html)
 {
     $this->modx->regClientStartupHTMLBlock($html);
 }
 /**
  * Register the client scripts
  */
 public function regClientScripts()
 {
     $this->modx->regClientStartupHTMLBlock('<script type="text/javascript">' . 'var ToggleTVSet = {"options": ' . json_encode(array('debug' => $this->getOption('debug'), 'toggletvs' => $this->getOption('toggletvs'))) . '};' . '</script>');
     $this->modx->regClientStartupScript($this->options['assetsUrl'] . 'mgr/js/toggletvset.js?v=v' . $this->version);
 }