summaryrefslogtreecommitdiffstats
path: root/install/static/webui.js
Commit message (Collapse)AuthorAgeFilesLines
* Refactoring navigation.js.Endi S. Dewata2010-10-011-13/+9
| | | | | | | | | | | | | | | | | | | | | The navigation.js has been modified to make it more abstract, i.e. unaware of entity facets. The nav_update_tabs() has been modified such that it activates and updates the tabs based on the current state stored in the URL. The facets are now handled in entity.js. The ipa_entity_setup() has been modified to update the facets based on the current state and cached state. The navigation.js also has been modified to be more class-like. The nav_create() has been modified to store the tab configuration and the tab container in internal variables nav_tabs_lists and nav_container. The nav_update_tabs() now can be called without any parameters. Functions nav_push_state(), nav_get_state(), and nav_remove_state() have been added to wrap BBQ API. This is to allow unit tests to replace them with mockup functions to remove dependency on BBQ.
* Added error handler for ipa_cmd().Endi S. Dewata2010-09-291-58/+9
| | | | | | | | | | | | | | | | | | | | | | | The ipa_cmd() has been modified such that when an error occurs a dialog box will appear showing the error message with 2 buttons: Retry and Cancel. If Retry is clicked, it will attempt to execute the same operation again. If Cancel is clicked, the operation will be canceled and the control is returned to the caller. New unit tests have been added to test ipa_cmd() on successfull and unsuccessfull cases. The associate.js, details.js, entity.js, search.js, and webui.js have been modified to display the error message inside the page. This behavior can be changed in the future (e.g. redirect to error page). The navigation.js and webui.js have been modified to render only the visible tabs. This improves the performance and reduce hidden errors. The navigation unit test has been modified to reflect this behavior. Some variables/functions also have been renamed for consistency.
* tab objectsAdam Young2010-09-291-23/+27
| | | | | | | | | | Convert the tab lists to arrays of objects with four potential fields: tab[0] -> tab.name tab[1] -> tab.label tab[2] -> tab.setup or tab.children Added unit tests for nav_setup and nav_select_tab
* Fixed tab selection on page reload.Endi S. Dewata2010-09-281-9/+9
| | | | | | | | | | | | | | | jQuery tabs by default will display the first tab, so reloading a page or opening a page from bookmark may not show the active tab correctly. The nav_select_tabs() has been added to get the list of active tabs from the hash values in the URL and then activate the appropriate tabs. It will be called during page initialization and whenever the hash values change. The navigation.js and webui.js has been cleaned up to better utilize jQuery API. jQuery selectors are used to create DOM objects that can be used by subsequent codes. Tab selection handler is now added to the tabs object instead of anchors. The change event no longer needs to be triggered manually.
* I18N for webAdam Young2010-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Performing I18N completely on the server, to leverage the existing gettext architecture. Also, the browser does not have access to the Language header. Added the additional po files for a set of required languages conflict with install/static/ipa.js was resolved. Note that the addition of the .po files in this patch is necessary. In order to get Transifex support, we need to update the LINGUAS file with the languages for which we want support. If we don't add the .po files in, they get automatically generated by the rpmbuild process. Our implementation of gettext has a bug in it (It might be F13 thing) where the the Plurals line is not getting correctly transformed, which causes a build failure. However, since the RPM would have the .po files anyway, we should revision control the ones we have, even if they are empty. Fixed the Bug reporting url to the original value. Corrected the Chartype encoding for UK
* Whoami linkAdam Young2010-09-241-2/+7
| | | | | | | | | The 'logged in as' message in the header into an active hypoerlink that loads the details page for the current user. Also fixed a bug where, when reloading, the search page would fail due to scl being undefined. Fixed a typo replaced {'user-facet':'details', 'pkey':whoami_pkey},2); with {'user-facet':'details', 'user-pkey':whoami_pkey},2);
* Test framework for Web UI.Endi Sukma Dewata2010-09-241-2/+11
| | | | | | | | | | | | | | Test framework for Web UI has been created using qUnit. The test files are located in install/static/test. The main page is index.html which contains links to all test suites (xxx_tests.html). The test cases are stored in xxx_tests.js. All test suites can be executed at once using all_tests.html. The test data is stored in data folder. This patch includes test suites for ipa.js and entity.js. Some variables and functions in ipa.js have been modified to accomodate testing (e.g. JSON URL, error handler, synchronous operation). The sampledata has been moved to test/data. The develop.js and webui.js also have been modified accordingly.
* self-serviceAdam Young2010-09-231-17/+31
| | | | | | | Selects the site map based on the presence or absense of rolegroups for the current user. If the user has no rolegroups, UI defaults to the Details page for that user. Corrected to leave two levels of tabs
* rolegroups to config tabAdam Young2010-09-211-2/+3
|
* Rolegroups tab.Adam Young2010-09-201-0/+1
| | | | | | | | | The Makefile.am and index.xhtml has been modified to include rolegroup.js. The webui.js has been modified to register the rolegroup tab. The rolegroup.js defines the rolegroup's search, add, and details pages. Sample data for some rolegroup operations have been added.
* Restoring Services tab.Endi Sukma Dewata2010-09-171-0/+1
| | | | | | | | | | | | | The add.js has been modified to support adding new entry with dynamically generated pkey. The index.xhtml has been modified to include service.js. The service.js has been modified to use the new API to define the search, add, and details fields. Callbacks are used to add quick links and generate pkey dynamically. The webui.js has been modified to add the Services tab.
* Big webUI patch.Pavel Zuna2010-09-171-0/+124
Quick summary: - use jQuery UI and jQuery BBQ libraries - code restructuring The patch has so many changes they can't be listed here. Many parts of the code have been rewritten from scrach. See freeipa-devel mailing list: webUI code restructuring [wall of text, diagrams, ... you've been warned!] 2010-09-07