public function RenderImpl() { TextInput::RenderImpl(); // $url = $this->owner->getURLNode() . "::" . $this->id . "&ajax=true"; $js = "\$('#{$this->id}').datepicker( {dateFormat : 'yy-m-d' });"; WebApplication::$app->getResponse()->addJavaScript($js, true); }
public function RenderImpl() { \Zippy\Html\Form\TextInput::RenderImpl(); // $url = $this->owner->getURLNode() . "::" . $this->id . "&ajax=true"; $js = "\$('#{$this->id}').datetimepicker( { format : 'yyyy-mm-dd',fontAwesome:true });"; if ($this->event != null) { $formid = $this->getFormOwner()->id; if ($this->event->isajax == false) { $url = $this->owner->getURLNode() . '::' . $this->id; $url = substr($url, 2 + strpos($url, 'q=')); $this->setAttribute("onchange", "javascript:{ \$('#" . $formid . "_q').attr('value','" . $url . "');\$('#" . $formid . "').submit();}"); $js = "\$('#{$this->id}').datetimepicker( {format : 'yyyy-mm-dd',fontAwesome:true}).on('changeDate', function() { \n \$('#" . $formid . "_q').attr('value','" . $url . "');\$('#" . $formid . "').submit()\n } } ));"; } else { $url = $this->owner->getURLNode() . "::" . $this->id; $url = substr($url, 2 + strpos($url, 'q=')); $_BASEURL = WebApplication::$app->getResponse()->getHostUrl(); $js = "\$('#{$this->id}').datetimepicker( {format : 'yyyy-mm-dd',fontAwesome:true}).on('changeDate', function() { \n \$('#" . $formid . "_q').attr('value','" . $url . "'); submitForm('{$formid}','{$_BASEURL}/?ajax=true')\n } } );"; } } WebApplication::$app->getResponse()->addJavaScript($js, true); }
public function RenderImpl() { TextInput::RenderImpl(); // $url = $this->owner->getURLNode() . "::" . $this->id . "&ajax=true"; $js = "\$('#{$this->id}').pickatime( {format : 'HH:i',interval:5 });"; if ($this->event != null) { $formid = $this->getFormOwner()->id; if ($this->event->isajax == false) { $url = $this->owner->getURLNode() . '::' . $this->id; $url = substr($url, 2 + strpos($url, 'q=')); $this->setAttribute("onchange", "javascript:{ \$('#" . $formid . "_q').attr('value','" . $url . "');\$('#" . $formid . "').submit();}"); $js = "\$('#{$this->id}').pickatime( {format : 'HH:i' ,onSet: function() { \n \$('#" . $formid . "_q').attr('value','" . $url . "');\$('#" . $formid . "').submit()\n } } );"; } else { $url = $this->owner->getURLNode() . "::" . $this->id; $url = substr($url, 2 + strpos($url, 'q=')); $_BASEURL = WebApplication::$app->getResponse()->getHostUrl(); $js = "\$('#{$this->id}').dtpicker( {dateFormat : 'yy-m-d' ,onSelect: function() { \n \$('#" . $formid . "_q').attr('value','" . $url . "'); submitForm('{$formid}','{$_BASEURL}/?ajax=true')\n } } );"; } } WebApplication::$app->getResponse()->addJavaScript($js, true); }
public function RenderImpl() { TextInput::RenderImpl(); $onchange = "null"; if ($this->event2 != null) { $formid = $this->getFormOwner()->id; if ($this->event2->isajax == false) { $url = $this->owner->getURLNode() . '::' . $this->id; $url = substr($url, 2 + strpos($url, 'q=')); $onchange = "function(){ \$('#" . $formid . "_q').attr('value','" . $url . "');\$('#" . $formid . "').submit();}"; } else { $url = $this->owner->getURLNode() . "::" . $this->id; $url = substr($url, 2 + strpos($url, 'q=')); $_BASEURL = WebApplication::$app->getResponse()->getHostUrl(); $onchange = "function() { \$('#" . $formid . "_q').attr('value','" . $url . "'); submitForm('{$formid}','{$_BASEURL}/?ajax=true'); }"; } } $url = $this->owner->getURLNode() . "::" . $this->id . "&ajax=true"; $js = "\n \$('#{$this->id}').z_autocomplete('{$url}',{minChars:{$this->minChars},timeout:{$this->timeout},onchange: {$onchange} }); "; $this->setAttribute("data-key", $this->key); $this->setAttribute("autocomplete", 'off'); WebApplication::$app->getResponse()->addJavaScript($js, true); }