-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/js reloading #66
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK. Just few comments and questions.
docs/field.rst
Outdated
JavaScript on Input | ||
------------------- | ||
|
||
.. php:meth:: jsInput() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description of jsInput() arguments
jsInput($when = null, $action = null)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added arguments.
* | ||
* $field->jsInput(true)->val(123); | ||
*/ | ||
public function jsInput($when = null, $action = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not add this in FormField/Generic?
Currently it will not work for FormField/Checkbox for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because it's jsInput, so only relevant for "Input" type fields. Fields that are not based on "input" will have something else.
src/jsCallback.php
Outdated
echo json_encode(['success'=>true, 'message'=>'Hello World', 'eval'=>$ajaxec]); | ||
$this->app->run_called = true; // prevent shutdown function from triggering. | ||
exit; | ||
$this->app->terminate(json_encode(['success'=>true, 'message'=>'Hello World', 'eval'=>$ajaxec])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still don't get why we need that message=>'Hello World'
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed.
New action that reloads a specific view: