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

JS refactor #308

Merged
merged 18 commits into from Jul 13, 2016

Conversation

Projects
None yet
2 participants
@mfairchild365
Copy link
Contributor

mfairchild365 commented Jul 5, 2016

This removes references to WDN.jQuery() and improves JS where possible. I also found some bugs along the way which I fixed. There is further room to improve the JS, but this a good start.

@@ -5,7 +5,7 @@ class UNL_MediaHub_Developers_Search
public $uri = "search/{query}";
public $exampleURI = "search/idk";

This comment has been minimized.

@spennythug

spennythug Jul 5, 2016

Contributor

It was funnier this way.

@@ -0,0 +1,13 @@
require(['jquery'], function($){
WDN.initializePlugin('modal', [function() {

This comment has been minimized.

@spennythug

spennythug Jul 5, 2016

Contributor

I think you can use require to initialize this plugin too. That might be more consistent.

This comment has been minimized.

@mfairchild365

mfairchild365 Jul 5, 2016

Contributor

Good idea! I took this straight from the examples without much thought. I will see if I can streamline it.

This comment has been minimized.

@spennythug

spennythug Jul 5, 2016

Contributor

I contributed real feedback!!!

I think this is how you can do it:
require(['jquery','modal'], function($,modal){ modal.initialize(); // colorbox stuff });

@mfairchild365 mfairchild365 merged commit 70185ca into unl:4.0_template Jul 13, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment