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

Overlay + Tab Support? #38

Open
Maeggi opened this issue Sep 3, 2016 · 3 comments
Open

Overlay + Tab Support? #38

Maeggi opened this issue Sep 3, 2016 · 3 comments

Comments

@Maeggi
Copy link

Maeggi commented Sep 3, 2016

Cjax is a great Ajax Framework 👍
But, i miss a Tab-Tool or Demo :)
Have any a Idea for Overlay + Tab?

Thanks

@ajaxboy
Copy link
Owner

ajaxboy commented Sep 3, 2016

Hi Maeggi, no problem!, be sure to give it a star? :)

Me and @HallofFamer were actually discussing a plugin for tabs.

There is not tab function right now, but it is extremely easy to create one.

Cjax plugin system lets you import js/css, etc , so basically what you would need to do is find online a tool you like or tab demo online, and convert it into Cjax. I know it sounds hard, but it quite simple. Mostly everything is already done for you, if you look at files inside the plugin directory.

If you take a look the plugins directory (cjax/plugins/), open up - for example - autocomplete/autocomplete.js
spin/spin.js , pagination/pagination.js , etc,

you'll notice that they share many things in common, some of them actually integrate 3rd party tools, import dependency files, etc.

So just take a 3rd party tabs tool and integrate it as a plugin.

All you need to do is import+usage, for this, create plugin call it whatever you want to call it , say you name it tabs as in cjax/plugins/tabs/tabs.js.
Just copy of of the other existing plugins, rename everything to tabs, change the imports to reflect the actual file(s) that your wish to import, and done.

Now, all you have to do is change the main function tabs().

Add there code that the tabs use to initiate, and you are done, you can now call it with Cjax and pass parameters.

$ajax->tabs();

Let me know if this is something you can jump into, or if you may need assistance.

@ajaxboy
Copy link
Owner

ajaxboy commented Sep 3, 2016

ahh I had overlooked that you meant tabs within the overlay.....

Umm, there is not built-in tabs within the Overlays, and if there was - they would work not only for the overlay, they would work everywhere...

If you follow the previous instructions, you can further add things to the overall this way:

Using the new callback methods, the overlay supports new callback method 'overlayPop':

Example:
$ajax->on('overlayPop', $ajax->run_something_after_overlay_was_created());

@Maeggi
Copy link
Author

Maeggi commented Sep 3, 2016

Thank You...
I check this 👍

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

No branches or pull requests

2 participants