Exemplo n.º 1
0
 /**
  * Load the javascript class that manages plugin interaction
  * should only be called once
  *
  * @return  string  Javascript class file
  */
 public function loadJavascriptClass()
 {
     $params = $this->getParams();
     $opts = array();
     $opts['container'] = 'radius_search_place_container';
     // Increase z-index with advanced class
     $opts['menuclass'] = 'auto-complete-container advanced';
     if ($params->get('myloc', 1) == 1) {
         $ext = FabrikHelperHTML::isDebug() ? '.js' : '-min.js';
         FabrikHelperHTML::script('media/com_fabrik/js/lib/geo-location/geo' . $ext);
     }
     parent::loadJavascriptClass();
 }
Exemplo n.º 2
0
 /**
  * Load the javascript class that manages plugin interaction
  * should only be called once
  *
  * @return  string  Javascript class file
  */
 public function loadJavascriptClass()
 {
     $params = $this->getParams();
     $model = $this->getModel();
     $mapElement = $this->getMapElement();
     if (!is_object($mapElement)) {
         throw new RuntimeException('Radius search plug-in active but map element unpublished');
         return;
     }
     $opts = array();
     $opts['container'] = 'radius_search_place_container';
     // Increase z-index with advanced class
     $opts['menuclass'] = 'auto-complete-container advanced';
     $formId = $model->getFormModel()->get('id');
     if ($params->get('place', 1) == 1) {
         $el = $this->getPlaceElement();
         FabrikHelperHTML::autoComplete("radius_search_place{$this->renderOrder}", $el->getElement()->id, $formId, $el->getElement()->plugin, $opts);
     }
     if ($params->get('myloc', 1) == 1) {
         $ext = FabrikHelperHTML::isDebug() ? '.js' : '-min.js';
         FabrikHelperHTML::script('media/com_fabrik/js/lib/geo-location/geo' . $ext);
     }
     parent::loadJavascriptClass();
 }