-
Notifications
You must be signed in to change notification settings - Fork 106
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 atk4 namespace #201
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- add possibility to simply use html in jsModal, not only Json; - redesign plugin implementation via a plugin base class - add possibility to create plugin method call - plugin creation properly done - move addParam as an helper function.
# Conflicts: # js/src/atk4-semantic-ui.js # js/src/plugins/createModal.js
…re/js-modal-rev # Conflicts: # js/src/atk4-semantic-ui.js # js/src/plugins/createModal.js
Plugin.js : needed to pass option to main function. Because calling the plugin twice with different option on the same element was not working since old option was still set in element. Other plugin file: Need to adjust main function to accept options spinner.js: add a function in order to remove spinner from element. When calling the reloadView more than once on the same element the element was growing because of spinner content not remove. reloadView: adjust plugin to remove spinner on element being reload.
Put jQuery plugin in their own namespace. This will help avoid name collision in future with other jquery plugin.
This allow to run atk service in any environment without $ var conflict. Fix api service error display when coming from js service. - the isServiceError need to be set to true for alert to show.
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PullRequest is replacing previous PR194. PR194 should then be closed in order to use this one.
You would need to recompile javascript code using web pack for this PR to work correctly.
Javascript
atk Namespace
Add namespace to all atk jQuery plugin and helper function. Plugin should now be called using atk prior to the plugin name like below.
Folder structure
Better structure the javascript file by making them more modular. The folder structure is as follow
jQuery plugin enhancement
Better handling of jQuery plugin creation via plugin.js. Also now handle direct plugin function call using $('element').plugin('functionToCall', [param]) type syntax.
Service class
Two new service classes, ApiService and ModalService, for managing api or modal throughout the app.
In future, service could be add for other semantic-ui module like form, tab etc, in future.
PHP
Modal.php
Add Modal class in order to allow modal use within a page. Modal extend regular View but can also use CallBack to add content to it.
As a regular view:
using callback:
see modal2.php demos.