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

UI reloading feature. #51

Closed
romaninsh opened this issue Feb 23, 2017 · 4 comments
Closed

UI reloading feature. #51

romaninsh opened this issue Feb 23, 2017 · 4 comments

Comments

@romaninsh
Copy link
Member

We require ability to create JS action from inside PHP that will re-load a component.

@DarkSide666
Copy link
Member

Isn't it $view->js()->reload()?

@romaninsh
Copy link
Member Author

exactly.

@romaninsh romaninsh added this to the 1.1 - More components milestone Mar 5, 2017
@romaninsh
Copy link
Member Author

In a past version of ATK we used this: https://github.com/atk4/atk4/blob/develop/public/atk4/js/ui.atk4_loader.js

but the code is very dirty and 7 year old. We need a modern solution. Requirements would be:

  • replace indicated element with a new
  • display loader (https://semantic-ui.com/elements/loader.html) while request is in progress
  • get new content from server
  • content will include element with same ID as we are reloading
  • content may want to execute JS code on load to initialize some other components present in the loaded code (e.g. drop-down or time picker)
  • content may want to set some events (e.g. if you click OK button)
  • events associated with the OLD content or OLD main element should be dropped.

romaninsh added a commit that referenced this issue Mar 12, 2017
DarkSide666 pushed a commit that referenced this issue Mar 19, 2017
* Implement basic reloading for #51

* Apply fixes from StyleCI

* Add functionality in order to reload in-place

* Apply fixes from StyleCI

* Include <script> when calling reload call-back.

* Implement beforeRender and beforeOutput hooks.

* Implemented $app->terminate(output)

* cleanup $app->add(), although i think perhaps we should remove this??

* track application execution state.

* Add comments and constructor for CallBack (supports defaults)

* Add documentation for callbacks.

* add documentation for app into index.

* Add CallbackLater which is not executed immediatelly.

* Refactor jsReload to use callbackLater - more reliable.

* Add test-suite for callbacks.

* Add documentation for Reloading.

* Apply fixes from StyleCI

* add field->jsInput() method + docs

* Added really cool demo with counter containers.

* Apply fixes from StyleCI

* remove stopPropagation and preventDefault from default events

* fix test to reflect our update with the propagation

* proper comment

* minor improvements

* even though we are not displaying this, shouldn't use 'hello world' there.
DarkSide666 pushed a commit that referenced this issue Mar 20, 2017
* Implement basic reloading for #51

* Apply fixes from StyleCI

* Add functionality in order to reload in-place

* Apply fixes from StyleCI

* Include <script> when calling reload call-back.

* Implement beforeRender and beforeOutput hooks.

* Implemented $app->terminate(output)

* cleanup $app->add(), although i think perhaps we should remove this??

* track application execution state.

* Add comments and constructor for CallBack (supports defaults)

* Add documentation for callbacks.

* add documentation for app into index.

* Add CallbackLater which is not executed immediatelly.

* Refactor jsReload to use callbackLater - more reliable.

* Add test-suite for callbacks.

* Add documentation for Reloading.

* Apply fixes from StyleCI

* add field->jsInput() method + docs

* Added really cool demo with counter containers.

* Apply fixes from StyleCI

* remove stopPropagation and preventDefault from default events

* fix test to reflect our update with the propagation

* Allow callback to pass argument.

* Implemented VirtualPage

* added trigger for modal dialogs

* added demo page.

* Apply fixes from StyleCI

* Add link to new demo.

* add VirtualPage::set() so that we can move code to callback

* be more reasonable with random data amount.

* pass VirtualPage object instead of URL for sexy syntax.

* Add another example with clickable table columns.

* imply ability to click on table with mouse pointer.

* Apply fixes from StyleCI

* Fix timezone warning. Update version to 1.1

* Apply fixes from StyleCI
@romaninsh
Copy link
Member Author

Follow up is #75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants