Skip to content
This repository has been archived by the owner on Feb 4, 2022. It is now read-only.

De-couple helpers from template #78

Merged
merged 7 commits into from
May 4, 2016
Merged

De-couple helpers from template #78

merged 7 commits into from
May 4, 2016

Conversation

johanjanssens
Copy link
Member

resolve #77

- Add 'url' config option to pass a HttpUrl object to the helper used to calculate the url for each page
- Set the url for each page using the url object and offset and limit
- Rename link() to page()

BREAKING! The paginator link() method has been renamed to page() and the paginator now has a 'url' config option that needs to be used to create the url for each page. To migrate your code all template calls to the paginator should include array('url' => route());
- Add 'url' config option to sort() helper method to pass an HttpUrl object to the helper used to calculate the sort url
- Set the url for sorting based on the config options

BREAKING! The grid.sort helper now has a 'url' config option that needs to be used to create the url for sorting. To migrate your code all template calls to the grid.sort should include array('url' => route());
- Refactor the keepalive helper method to use jQuery and default to window.location.url
- Add a 'url' config option to set a custom url to call
- Use head requests and do not use cache
@johanjanssens johanjanssens added this to the 3.0.0-beta.2 milestone May 3, 2016
@johanjanssens
Copy link
Member Author

@ercanozkaya Can you review please ?

}
window.addEvent('domready', function() { Kodekit.keepalive.periodical('" . $refresh . "'); });
</script>";
(function keepalive(){
Copy link
Contributor

Choose a reason for hiding this comment

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

to make it use setInterval:

(function($) {
    var refresh = 123123123;
    setInterval(function() {
        $.ajax();
    }, refresh*1000);
})(kQuery);```

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed and tested. Anything else ?

@johanjanssens johanjanssens merged commit 5fec4cc into master May 4, 2016
@johanjanssens johanjanssens deleted the feature/77-helper branch May 4, 2016 11:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

De-couple helpers from template
2 participants