Executes the code $js
@param string $js Code to execute
@param boolean $immediatly delayed if false
@return String
491387
public function exec($js, $immediatly=false) {
		$script=$this->js->_exec($js, $immediatly);
		return $script;
	}
268799
public function run(JsUtils $js){
		parent::run($js);
		if(isset($this->close)){
			$js->execOn("click", "#".$this->identifier." .close", "$(this).closest('.message').transition('fade')");
		}
	}
365437
public function waitForCondition($jsCondition, $timeout = 60)
	{
		$i = 0;
		do
		{
			sleep(1);
		} while (
			!($result = $this->execute(array('script' => 'return ' . $jsCondition, 'args' => array())))
			&& $i++ < $timeout
		);
		return $result;
	}
320648
public function run(JsUtils $js) {
		if($this->content instanceof BaseHtml){
			$this->content->run($js);
		}
		$this->_bsComponent=$js->bootstrap()->modal("#".$this->identifier, array (
				"show" => $this->showOnStartup
		));
		if ($this->draggable)
			$this->_bsComponent->setDraggable(true);
		$this->_bsComponent->setBackdrop($this->backdrop);
		$this->addEventsOnRun($js);
		return $this->_bsComponent;
	}
235698
public function run(JsUtils $js) {
		if ($this->_collapsable) {
			$this->_bsComponent=$js->bootstrap()->collapse("#lnk-".$this->identifier);
			$this->_bsComponent->setCollapsed("#collapse-".$this->identifier);
			if ($this->_showOnStartup===true) {
				$this->_bsComponent->show();
			}
		}
		return $this->_bsComponent;
	}
919226
public function _genericCallElement($jQueryCall,$to='this', $element, $immediatly=false) {
		$to=$this->_prep_element($to);
		$element=$this->_prep_element($element);
		$str="$({$to}).{$jQueryCall}({$element});";
		if ($immediatly)
			$this->jquery_code_for_compile[]=$str;
			return $str;
	}
726655
public function _output($array_js='') {
		if (!is_array($array_js)) {
			$array_js=array (
					$array_js
			);
		}

		foreach ( $array_js as $js ) {
			$this->jquery_code_for_compile[]="\t$js\n";
		}
	}
496840
public function addJavaScript($js, $docready = false)
    {

        if ($docready === true) {
            $this->JSrenderDocReady .= ( $js . "\n");
        } else {
            $this->JSrender .= ( $js . "\n");
        }
    }
1374328
public function run(JsUtils $js){
		parent::run($js);
		return $js->semantic()->sticky("#".$this->identifier,$this->_params);
	}
9098
public function send($js)
    {
        $this->_output_bypass = true;
        $this->sse->send($js);
        $this->_output_bypass = false;

        return $this;
    }
911315
public function _genericCallElement($jQueryCall,$to='this', $element, $immediatly=false) {
		$to=Javascript::prep_element($to);
		$element=Javascript::prep_element($element);
		$str="$({$to}).{$jQueryCall}({$element});";
		if ($immediatly)
			$this->jquery_code_for_compile[]=$str;
		return $str;
	}
648770
public function run(JsUtils $js) {
		$this->_bsComponent=$js->bootstrap()->collapse("#".$this->element->getIdentifier());
		$this->addEventsOnRun($js);
		return $this->_bsComponent;
	}
53078
final public static function jsiumio(array $params)
    {
        return ("<script type='text/javascript' src='".FEnv::get("host.web.components")."libs/iumio-framework/js/".
            ((isset($params['name']))? $params['name'].".".((isset($params['min']) && $params['min'] == "yes")?
                    "min"."." : "") : "")."js'></script>");
    }
1312144
public function compile(JsUtils $js=NULL, &$view=NULL) {
		$this->content=array();
		if(isset($this->default)){
			$default=new HtmlOption("", $this->default);
			$this->content[]=$default;
		}
		foreach ($this->options as $option){
			$this->content[]=$option;
		}
		return parent::compile($js, $view);
	}
127558
public function prepend($to, $element, $immediatly=false) {
		return $this->_genericCallElement('prepend',$to, $element, $immediatly);
	}
698033
public function compile(JsUtils $js=NULL, &$view=NULL) {
		if ($this->closeable&&$this->button==="") {
			$this->addCloseButton();
		}
		return parent::compile($js, $view);
	}
842442
public function run(JsUtils $js) {
		if($this->propertyContains("class", "simple")===false){
			if(isset($this->_bsComponent)===false)
				$this->_bsComponent=$js->semantic()->dropdown("#".$this->identifier,$this->_params);
			$this->addEventsOnRun($js);
			return $this->_bsComponent;
		}
	}