示例#1
0
文件: yesno.php 项目: rhotog/fabrik
 /**
  * @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 = '')
 {
     $elementList = 'media/com_fabrik/js/elementlist.js';
     if (!in_array($elementList, $srcs)) {
         $srcs[] = $elementList;
     }
     $elementList = 'plugins/fabrik_element/radiobutton/radiobutton.js';
     if (!in_array($elementList, $srcs)) {
         $srcs[] = $elementList;
     }
     parent::formJavascriptClass($srcs, $script);
 }