当前位置: 首页>>代码示例>>PHP>>正文


PHP plgFabrik_Element::formJavascriptClass方法代码示例

本文整理汇总了PHP中plgFabrik_Element::formJavascriptClass方法的典型用法代码示例。如果您正苦于以下问题:PHP plgFabrik_Element::formJavascriptClass方法的具体用法?PHP plgFabrik_Element::formJavascriptClass怎么用?PHP plgFabrik_Element::formJavascriptClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在plgFabrik_Element的用法示例。


在下文中一共展示了plgFabrik_Element::formJavascriptClass方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: formJavascriptClass

	/**
	 * load the javascript class that manages interaction with the form element
	 * should only be called once
	 * @return string javascript class file
	 */

	function formJavascriptClass(&$srcs)
	{
		static $jsloaded;
		if (!isset($jsloaded)) {
			$document = JFactory::getDocument();
			$params = $this->getParams();

			$document->addScript("http://www.openlayers.org/api/OpenLayers.js");
			parent::formJavascriptClass($srcs);
			FabrikHelperHTML::script('components/com_fabrik/libs/openlayers/openlayers_ext.js', true);

			if ($params->get('fb_osm_virtualearthlayers')) {
				$document->addScript('http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1');
			}

			if ($params->get('fb_osm_gmlayers')) {
				$src = "http://maps.google.com/maps?file=api&v=2&key=" . $params->get('fb_osm_gm_key');
				$document->addScript($src);
			}

			if ($params->get('fb_osm_yahoolayers')) {
				$yahooid = $params->get('fb_yahoo_key');
				$document->addScript('http://api.maps.yahoo.com/ajaxymap?v=3.8&appid='.$yahooid);
			}

			$document->addScript('http://www.openstreetmap.org/openlayers/OpenStreetMap.js');
			$jsloaded = true;
		}

	}
开发者ID:Jobar87,项目名称:fabrik,代码行数:36,代码来源:openstreetmap.php

示例2: formJavascriptClass

 /**
  * load the javascript class that manages interaction with the form element
  * should only be called once
  * @return string javascript class file
  */
 function formJavascriptClass(&$srcs)
 {
     $src = "http://maps.google.com/maps/api/js?sensor=" . $this->getParams()->get('fb_gm_sensor', 'false');
     $src .= "&callback=googlemapload";
     parent::formJavascriptClass($srcs, $src);
     parent::formJavascriptClass($srcs);
 }
开发者ID:nine007,项目名称:fabrik,代码行数:12,代码来源:googlemap.php

示例3: formJavascriptClass

 /**
  * load the javascript class that manages interaction with the form element
  * should only be called once
  * @return string javascript class file
  */
 function formJavascriptClass(&$srcs)
 {
     plgFabrik_Element::formJavascriptClass($srcs, 'plugins/fabrik_element/databasejoin/databasejoin.js');
     parent::formJavascriptClass($srcs);
 }
开发者ID:juliano-hallac,项目名称:fabrik,代码行数:10,代码来源:user.php

示例4: formJavascriptClass

 /**
  * @param array already loaded plugin scripts
  * load the javascript class that manages interaction with the form element
  * should only be called once
  * @since 3.0
  */
 function formJavascriptClass(&$srcs)
 {
     plgFabrik_Element::formJavascriptClass($srcs, 'media/com_fabrik/js/window.js');
     parent::formJavascriptClass($srcs);
 }
开发者ID:nine007,项目名称:fabrik,代码行数:11,代码来源:databasejoin.php

示例5: formJavascriptClass

 public function formJavascriptClass(&$srcs, $script = '')
 {
     plgFabrik_Element::formJavascriptClass($srcs, 'plugins/fabrik_element/usergroup/usergroup.js');
     parent::formJavascriptClass($srcs, $script);
 }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:5,代码来源:usergroup.php

示例6: formJavascriptClass

	/**
	 * load the javascript class that manages interaction with the form element
	 * should only be called once
	 * @return string javascript class file
	 */

	function formJavascriptClass(&$srcs)
	{
		// @FIXME the js paths are not right for fabrik3
		$params = $this->getParams();
		$document = JFactory::getDocument();
		$params = $this->getParams();
		$slideshow_type = $params->get('slideshow_type', 1);
		$src = COM_FABRIK_LIVESITE.DS.'components'.DS.'com_fabrik'.DS.'plugins'.DS.'element'.DS.'fabrikslideshow'.DS.'lib'.DS.'slideshow2'.DS.'js'.DS.'slideshow.js';
		$document->addScript($src);
		switch ($slideshow_type) {
			case 1:
				break;
			case 2:
				$src = COM_FABRIK_LIVESITE.DS.'components'.DS.'com_fabrik'.DS.'plugins'.DS.'element'.DS.'fabrikslideshow'.DS.'lib'.DS.'slideshow2'.DS.'js'.DS.'slideshow.kenburns.js';
				$document->addScript($src);
				break;
			case 3:
				$src = COM_FABRIK_LIVESITE.DS.'components'.DS.'com_fabrik'.DS.'plugins'.DS.'element'.DS.'fabrikslideshow'.DS.'lib'.DS.'slideshow2'.DS.'js'.DS.'slideshow.push.js';
				$document->addScript($src);
				break;
			case 4:
				$src = COM_FABRIK_LIVESITE.DS.'components'.DS.'com_fabrik'.DS.'plugins'.DS.'element'.DS.'fabrikslideshow'.DS.'lib'.DS.'slideshow2'.DS.'js'.DS.'slideshow.fold.js';
				$document->addScript($src);
				break;
			default:
				break;
		}
		JHTML::stylesheet('slideshow.css', 'components'.DS.'com_fabrik'.DS.'plugins'.DS.'element'.DS.'fabrikslideshow'.DS.'lib'.DS.'slideshow2'.DS.'css'.DS);
		parent::formJavascriptClass($srcs);
	}
开发者ID:Jobar87,项目名称:fabrik,代码行数:36,代码来源:slideshow.php

示例7: formJavascriptClass

 /**
  * get the class to manage the form element
  * if a plugin class requires to load another elements class (eg user for dbjoin then it should
  * call FabrikModelElement::formJavascriptClass('plugins/fabrik_element/databasejoin/databasejoin.js', true);
  * to ensure that the file is loaded only once
  *
  * @param   array   &$srcs   scripts previously loaded (load order is important as we are loading via head.js
  * and in ie these load async. So if you this class extends another you need to insert its location in $srcs above the
  * current file
  * @param   string  $script  script to load once class has loaded
  *
  * @return void
  */
 public function formJavascriptClass(&$srcs, $script = '')
 {
     $files = array('media/com_fabrik/js/element.js', 'media/com_fabrik/js/elementlist.js');
     foreach ($files as $file) {
         if (!in_array($file, $srcs)) {
             $srcs[] = $file;
         }
     }
     parent::formJavascriptClass($srcs, $script);
 }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:23,代码来源:elementlist.php

示例8: formJavascriptClass

 /**
  * Get the class to manage the form element
  *
  * @param   array   &$srcs   scripts previously loaded (load order is important as we are loading via head.js
  * and in ie these load async. So if you this class extends another you need to insert its location in $srcs above the
  * current file
  * @param   string  $script  script to load once class has loaded
  *
  * @return void
  */
 public function formJavascriptClass(&$srcs, $script = '')
 {
     /**
      * $$$ hugh - adding js.new folder to make it easier to test new plupload git releases
      * I just copy new stuff into js.new, and un-comment one of these as appropriate
      */
     $js_dir = 'js';
     // $js_dir = 'js.new';
     $params = $this->getParams();
     if ($params->get('ajax_upload')) {
         $prefix = JDEBUG ? '' : '.min';
         $runtimes = $params->get('ajax_runtime', 'html5');
         $folder = 'plugins/fabrik_element/fileupload/lib/plupload/';
         parent::formJavascriptClass($srcs, $folder . $js_dir . '/plupload' . $prefix . '.js');
         if (strstr($runtimes, 'html5')) {
             parent::formJavascriptClass($srcs, $folder . $js_dir . '/plupload.html5' . $prefix . '.js');
         }
         if (strstr($runtimes, 'html4')) {
             parent::formJavascriptClass($srcs, $folder . $js_dir . '/plupload.html4' . $prefix . '.js');
         }
         if (strstr($runtimes, 'gears')) {
             parent::formJavascriptClass($srcs, $folder . $js_dir . '/gears_init.js');
             parent::formJavascriptClass($srcs, $folder . $js_dir . '/plupload.gears' . $prefix . '.js');
         }
         if (strstr($runtimes, 'flash')) {
             parent::formJavascriptClass($srcs, $folder . $js_dir . '/plupload.flash' . $prefix . '.js');
         }
         if (strstr($runtimes, 'silverlight')) {
             parent::formJavascriptClass($srcs, $folder . $js_dir . '/plupload.silverlight' . $prefix . '.js');
         }
         if (strstr($runtimes, 'browserplus')) {
             parent::formJavascriptClass($srcs, $folder . $js_dir . '/plupload.browserplus' . $prefix . '.js');
         }
     }
     parent::formJavascriptClass($srcs, $script);
     static $elementclasses;
     if (!isset($elementclasses)) {
         $elementclasses = array();
     }
     // Load up the default scipt
     if ($script == '') {
         $script = 'plugins/fabrik_element/' . $this->getElement()->plugin . '/' . $this->getElement()->plugin . '.js';
     }
     if (empty($elementclasses[$script])) {
         $srcs[] = $script;
         $elementclasses[$script] = 1;
     }
     // $$$ hugh - added this, and some logic in the view, so we will get called on a per-element basis
     return false;
 }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:60,代码来源:fileupload.php

示例9: formJavascriptClass

 /**
  * @param array of scripts previously loaded (load order is important as we are loading via head.js
  * and in ie these load async. So if you this class extends another you need to insert its location in $srcs above the
  * current file
  *
  * get the class to manage the form element
  * if a plugin class requires to load another elements class (eg user for dbjoin then it should
  * call FabrikModelElement::formJavascriptClass('plugins/fabrik_element/databasejoin/databasejoin.js', true);
  * to ensure that the file is loaded only once
  */
 function formJavascriptClass(&$srcs, $script = '')
 {
     $params = $this->getParams();
     if ($params->get('ajax_upload')) {
         $prefix = JDEBUG ? '' : '.min';
         $runtimes = $params->get('ajax_runtime', 'html5');
         parent::formJavascriptClass($srcs, 'plugins/fabrik_element/fileupload/lib/plupload/js/plupload' . $prefix . '.js');
         if (strstr($runtimes, 'html5')) {
             parent::formJavascriptClass($srcs, 'plugins/fabrik_element/fileupload/lib/plupload/js/plupload.html5' . $prefix . '.js');
         }
         if (strstr($runtimes, 'html4')) {
             parent::formJavascriptClass($srcs, 'plugins/fabrik_element/fileupload/lib/plupload/js/plupload.html4' . $prefix . '.js');
         }
         if (strstr($runtimes, 'gears')) {
             parent::formJavascriptClass($srcs, 'plugins/fabrik_element/fileupload/lib/plupload/js/gears_init.js');
             parent::formJavascriptClass($srcs, 'plugins/fabrik_element/fileupload/lib/plupload/js/plupload.gears' . $prefix . '.js');
         }
         if (strstr($runtimes, 'flash')) {
             parent::formJavascriptClass($srcs, 'plugins/fabrik_element/fileupload/lib/plupload/js/plupload.flash' . $prefix . '.js');
         }
         if (strstr($runtimes, 'silverlight')) {
             parent::formJavascriptClass($srcs, 'plugins/fabrik_element/fileupload/lib/plupload/js/plupload.silverlight' . $prefix . '.js');
         }
         if (strstr($runtimes, 'browserplus')) {
             parent::formJavascriptClass($srcs, 'plugins/fabrik_element/fileupload/lib/plupload/js/plupload.browserplus' . $prefix . '.js');
         }
     }
     parent::formJavascriptClass($srcs, $script);
     static $elementclasses;
     if (!isset($elementclasses)) {
         $elementclasses = array();
     }
     //load up the default scipt
     if ($script == '') {
         $script = 'plugins/fabrik_element/' . $this->getElement()->plugin . '/' . $this->getElement()->plugin . '.js';
     }
     if (empty($elementclasses[$script])) {
         $srcs[] = $script;
         $elementclasses[$script] = 1;
     }
 }
开发者ID:romuland,项目名称:khparts,代码行数:51,代码来源:fileupload.php

示例10: formJavascriptClass

 /**
  * load the javascript class that manages interaction with the form element
  * should only be called once
  * @return string javascript class file
  */
 function formJavascriptClass(&$srcs)
 {
     parent::formJavascriptClass($srcs);
 }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:9,代码来源:kaltura.php

示例11: formJavascriptClass

 /**
  * @param array of scripts previously loaded (load order is important as we are loading via head.js
  * and in ie these load async. So if you this class extends another you need to insert its location in $srcs above the
  * current file
  *
  * get the class to manage the form element
  * if a plugin class requires to load another elements class (eg user for dbjoin then it should
  * call FabrikModelElement::formJavascriptClass('plugins/fabrik_element/databasejoin/databasejoin.js', true);
  * to ensure that the file is loaded only once
  */
 function formJavascriptClass(&$srcs, $script = '')
 {
     //whilst link isnt really an element list we can use its js AddNewEvent method
     $elementList = 'media/com_fabrik/js/elementlist.js';
     if (!in_array($elementList, $srcs)) {
         $srcs[] = $elementList;
     }
     parent::formJavascriptClass($srcs, $script);
 }
开发者ID:rhotog,项目名称:fabrik,代码行数:19,代码来源:link.php

示例12: formJavascriptClass

 /**
  * load the javascript class that manages interaction with the form element
  * should only be called once
  * @return string javascript class file
  */
 function formJavascriptClass(&$srcs)
 {
     FabrikHelperHTML::script('media/com_fabrik/js/swfobject.js', false);
     parent::formJavascriptClass($srcs);
 }
开发者ID:juliano-hallac,项目名称:fabrik,代码行数:10,代码来源:kaltura.php

示例13: formJavascriptClass

 /**
  * get the class to manage the form element
  * if a plugin class requires to load another elements class (eg user for dbjoin then it should
  * call FabrikModelElement::formJavascriptClass('plugins/fabrik_element/databasejoin/databasejoin.js', true);
  * to ensure that the file is loaded only once
  *
  * @param   array   &$srcs   scripts previously loaded (load order is important as we are loading via head.js
  * and in ie these load async. So if you this class extends another you need to insert its location in $srcs above the
  * current file
  * @param   string  $script  script to load once class has loaded
  *
  * @return void
  */
 function formJavascriptClass(&$srcs, $script = '')
 {
     plgFabrik_Element::formJavascriptClass($srcs, 'plugins/fabrik_element/youtube/youtube.js');
     parent::formJavascriptClass($srcs);
 }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:18,代码来源:youtube.php

示例14: formJavascriptClass

 /**
  * get the class to manage the form element
  * if a plugin class requires to load another elements class (eg user for dbjoin then it should
  * call FabrikModelElement::formJavascriptClass('plugins/fabrik_element/databasejoin/databasejoin.js', true);
  * to ensure that the file is loaded only once
  *
  * @param   array   &$srcs   scripts previously loaded (load order is important as we are loading via head.js
  * and in ie these load async. So if you this class extends another you need to insert its location in $srcs above the
  * current file
  * @param   string  $script  script to load once class has loaded
  *
  * @return void
  */
 public function formJavascriptClass(&$srcs, $script = '')
 {
     $prefix = JDEBUG ? '' : '-min';
     $params = $this->getParams();
     if ($params->get('date_advanced', '0') == '1') {
         if (empty($prefix)) {
             parent::formJavascriptClass($srcs, 'media/com_fabrik/js/lib/datejs/date' . $prefix . '.js');
             parent::formJavascriptClass($srcs, 'media/com_fabrik/js/lib/datejs/core' . $prefix . '.js');
             parent::formJavascriptClass($srcs, 'media/com_fabrik/js/lib/datejs/parser' . $prefix . '.js');
             parent::formJavascriptClass($srcs, 'media/com_fabrik/js/lib/datejs/extras' . $prefix . '.js');
         } else {
             parent::formJavascriptClass($srcs, 'media/com_fabrik/js/lib/datejs/date.js');
             parent::formJavascriptClass($srcs, 'media/com_fabrik/js/lib/datejs/core.js');
             parent::formJavascriptClass($srcs, 'media/com_fabrik/js/lib/datejs/parser.js');
             parent::formJavascriptClass($srcs, 'media/com_fabrik/js/lib/datejs/extras.js');
         }
     }
     parent::formJavascriptClass($srcs);
     // Return false, as we need to be called on per-element (not per-plugin) basis
     return false;
 }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:34,代码来源:date.php


注:本文中的plgFabrik_Element::formJavascriptClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。