Skip to content
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

Merged
merged 28 commits into from
Mar 19, 2017
Merged

Feature/js reloading #66

merged 28 commits into from
Mar 19, 2017

Conversation

romaninsh
Copy link
Member

New action that reloads a specific view:

$button->js('click', new \atk4\ui\jsReload($table));

Copy link
Member

@DarkSide666 DarkSide666 left a 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()
Copy link
Member

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)

Copy link
Member Author

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)
Copy link
Member

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.

Copy link
Member Author

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.

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]));
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed.

@DarkSide666 DarkSide666 merged commit cbdb51b into develop Mar 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants