summaryrefslogtreecommitdiffstats
path: root/install/ui/src/freeipa/widget.js
Commit message (Collapse)AuthorAgeFilesLines
* webui: hide non-readable fieldsPetr Vobornik2014-09-111-0/+16
| | | | | | | | | | | | hide widgets if associated field had received attribute level rights without 'r' right. Explicit rights are required to avoid hiding of special widgets which are not associated with any LDAP attribute. https://fedorahosted.org/freeipa/ticket/4402 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: hide empty fields and sectionsPetr Vobornik2014-09-111-10/+81
| | | | | | | | | | Hide widgets without a value. Must be explicitly turned on. In widget by `hidden_if_empty` flag. Or globally by `hide_empty_widgets` flag. Global hiding can be individually turned off by `ignore_empty_hiding` flag. https://fedorahosted.org/freeipa/ticket/4402 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: widget initializationPetr Vobornik2014-09-111-0/+9
| | | | | | | | | | | | - used `ctor_init` instead of `init` to avoid name collision with existing logic - `ctor_init` is called right after widget instantiation. Basically support better inheritance for the old class system which doesn't have proper contructors https://fedorahosted.org/freeipa/ticket/4402 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: better value-change reportingPetr Vobornik2014-09-111-23/+19
| | | | | | | | | - widget save() save method should try to always return value even if read only - report value-change event with actual value to allow processing of the value https://fedorahosted.org/freeipa/ticket/4402 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: do not show login error when switching back from otp sync screenPetr Vobornik2014-09-081-4/+23
| | | | | | | | Errors should reflect only a result of last operation. https://fedorahosted.org/freeipa/ticket/4470 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: fix group type paddingPetr Vobornik2014-08-211-1/+1
| | | | Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: sshkey widget - usability fixesPetr Vobornik2014-08-211-3/+13
| | | | | | | | - save one click by opening edit dialog right after adding new row - add margin between fingerprint and "show/edit" button - fix honoring of writable/read-only flags upon row creation Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: tooltip supportPetr Vobornik2014-08-211-0/+48
| | | | | | | | | Allow to set 'tooltip' attribute in spec. It displays info icon with Bootstrap's tooltip near field's label. https://fedorahosted.org/freeipa/ticket/4471 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: rename tooltip to titlePetr Vobornik2014-08-211-9/+9
| | | | | | | | | - use title for input's elements 'title' attribute - tooltip for Bootstrap's tooltip component https://fedorahosted.org/freeipa/ticket/4471 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: replace action_buttons with action_widgetPetr Vobornik2014-07-281-29/+26
| | | | | | | | | | Simplify code base by reuse of 'disable' feature of button_widget. All occurrences of action-button which were disabled/enabled were replaced by button-widget. https://fedorahosted.org/freeipa/ticket/4258 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: fix disabled state of service's PAC typePetr Vobornik2014-07-211-31/+47
| | | | | | | | | | | Nested options (MS-PAC and PAD) of service's PAC type should be disabled if no value is supplied (default value is "Inherited from server configuration"). That was not the case - regression. This patch fixes it and along with it simplifies the update method of option_widget_base to be more comprehensible. Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: fix selection of empty value in a select widgetPetr Vobornik2014-07-211-1/+1
| | | | | | | | | | Little regression - select widget could not handle empty or no array as an input value. It broke 'undo' operation in Permissions' 'Type' attribute while switching between '' and some value. Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: fix add of input group classPetr Vobornik2014-07-211-1/+4
| | | | | | | | | | The input-group class was added based on visibility of child elements. This failed when it had to be determined *before* displaying the widget. Now it's added if the buttons are not hidden by `display: none` CSS rule. Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: reflect readonly statePetr Vobornik2014-07-211-27/+110
| | | | | | | | | | | Separate update of read-only state from update of value. It should be possible to switch from read-only UI to editable UI without value change. https://fedorahosted.org/freeipa/ticket/4254 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: option_widget_base: sort optionsPetr Vobornik2014-07-211-2/+17
| | | | | | https://fedorahosted.org/freeipa/ticket/4253 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: optimize (re)creation of option widgetPetr Vobornik2014-07-211-11/+14
| | | | | | | | | | | | | | There is a case where attributes widget can contain > 1000 items. It's about 3000 nodes. It's slow in jQuery. Simple move to dojo speeds it up (is closer to native calls) while maintaining developer friendliness. Now the biggest lag is in browser's render. It's probably not worth developer time to optimize that. https://fedorahosted.org/freeipa/ticket/4253 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: improve usability of attributes widgetPetr Vobornik2014-07-211-1/+0
| | | | | | | | | | | | | | | Attributes widget layour was changed from tiny table which allowed to display only few options to a checkbox list with multiple columns (depends on container). Check all attributes option was removed to force the user to read through the attributes which he selects. Initial version authored by: Adam Misnyovszki https://fedorahosted.org/freeipa/ticket/4253 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: display messages contained in API responsesPetr Vobornik2014-07-071-2/+8
| | | | | | | | API responses can contain warnings in "messages" array. This patch also adds support for displaying multiple notifications at the same time in order to show the message and a status of finished operation. Reviewed-By: Petr Spacek <pspacek@redhat.com>
* webui: focus invalid widget on validation errorPetr Vobornik2014-07-011-0/+22
| | | | | Reviewed-By: Fraser Tweedale <ftweedal@redhat.com> Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: fix required error notification in multivalued widgetPetr Vobornik2014-07-011-4/+3
| | | | | Reviewed-By: Fraser Tweedale <ftweedal@redhat.com> Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: layer for standalone pages which use WebUI frameworkPetr Vobornik2014-06-301-3/+4
| | | | | | | | | | Current compiled Web UI layer (app.js) contains every FreeIPA plugin and not just the UI framework. It's not possible to start just a simple facet. This commit creates a basis for a layer (core.js) which contains only framework code and not entity related code. Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: extract rpc value from object envelopePetr Vobornik2014-06-271-4/+12
| | | | | | | | adapt Web UI to a newer style of encapsulation object data https://fedorahosted.org/freeipa/ticket/4394 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: placeholder attribute support in textbox and textareaPetr Vobornik2014-06-261-0/+8
| | | | Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: add parent link to widgets in ContainerMixinPetr Vobornik2014-06-231-0/+1
| | | | | | | | Standard facets sets `facet` attribute to widgets. This one adds similar, more generic `parent` attribute which should be used for going through the hierarchy up to top. Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: fix SSH Key widget updatePetr Vobornik2014-06-121-1/+2
| | | | | | Update widget status text on update. Reviewed-By: Nathaniel McCallum <npmccallum@redhat.com>
* webui: fix regression: enabled gid field on group addPetr Vobornik2014-06-111-0/+2
| | | | | | | | | | | | GID field should be enabled by default since the default group is posix. Was caused by option_widget_base not properly reporting value change while selecting the default value. It has to be notified with delay otherwise the event is consumed by FieldBinder. https://fedorahosted.org/freeipa/ticket/4325 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: use propert alerts in header notification areaPetr Vobornik2014-06-101-1/+1
| | | | Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: use normal buttons instead of link buttons in multivalued widgetPetr Vobornik2014-06-101-4/+3
| | | | Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: change control buttons to normal buttonsPetr Vobornik2014-06-101-0/+10
| | | | | | | | Now buttons have normal button appearance instead of link button. Partially fixes: https://fedorahosted.org/freeipa/ticket/4258 since the disabling is done through button's disabled attribute. Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: use BS alerts in validation_summary_widgetPetr Vobornik2014-06-101-44/+143
| | | | Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: do not show empty table footerPetr Vobornik2014-06-101-2/+12
| | | | Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: improve paginationPetr Vobornik2014-06-101-32/+93
| | | | | | | | pagination now support: - styles updated to PatternFly + DataTables - added 'First' and 'Last' button Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: activity indicatorsPetr Vobornik2014-06-101-12/+44
| | | | | | | https://fedorahosted.org/freeipa/ticket/4177 https://fedorahosted.org/freeipa/ticket/4255 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: add space between action buttons's icon and textPetr Vobornik2014-06-101-2/+5
| | | | Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: allow multiple base section layoutsPetr Vobornik2014-06-101-26/+34
| | | | | | i.e. one for details facet and other for dialogs Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: display undo and multivalued delete buttons in input-groupPetr Vobornik2014-06-101-26/+79
| | | | Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: adjust styles to PatternFlyPetr Vobornik2014-06-101-15/+20
| | | | | | | side effect partially fixes: https://fedorahosted.org/freeipa/ticket/3435 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: remove column sizing in tables, use PF stylesPetr Vobornik2014-06-101-97/+56
| | | | | | | | | https://fedorahosted.org/freeipa/ticket/4136 usage of .table-striped class also fixes: https://fedorahosted.org/freeipa/ticket/3050 Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: remove unused collapsible feature from sectionPetr Vobornik2014-06-101-29/+5
| | | | Reviewed-By: Endi Sukma Dewata <edewata@redhat.com>
* webui: fix switching between multiple_choice_section choicesPetr Vobornik2014-05-051-3/+4
| | | | | | | | | | | | | - required indicators are not present for all sections except the last - validation has wrong color for the same sections There was only one layout for all choices. Layout should not be reused because `create` method will reset layout's rows therefore it worked properly only for the last choice. https://fedorahosted.org/freeipa/ticket/4327 Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
* webui: fix combobox styles to work with selenium testingPetr Vobornik2014-04-151-4/+4
| | | | | | https://fedorahosted.org/freeipa/ticket/3903 Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
* webui: validation summary widgetPetr Vobornik2014-04-151-0/+86
| | | | | | | | A widget which aggregates warnings and errors and shows them on one place. https://fedorahosted.org/freeipa/ticket/3903 Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
* webui: activity widgetPetr Vobornik2014-04-151-2/+88
| | | | | | | | | | | | A widget for showing ongoing activity. Displays a text with changing dots. It listens to `network-activity-start` and `network-activity-end` topics. https://fedorahosted.org/freeipa/ticket/3903 Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
* webui: change widget updated event into value change eventPetr Vobornik2014-04-031-34/+32
| | | | | | | | | | This change allow us to use proper two way binding between a field and a widget. In previous implementation field was not changed if something changed the value of a widget in 'update'. Now listeners are notified when the widget value is changed by: calling 'update', 'set_value' or by user change. Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
* webui: replace widget's hidden property with visiblePetr Vobornik2014-04-031-10/+32
| | | | | | | Hidden was used only in ACI. There is no reason to have two properties which are negations of each other. Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
* webui: field and widget binding refactoringPetr Vobornik2014-04-031-93/+293
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a Web UI wide change. Fields and Widgets binding was refactored to enable proper two-way binding between them. This should allow to have one source of truth (field) for multiple consumers - widgets or something else. One of the goal is to have fields and widget implementations independent on each other. So that one could use a widget without field or use one field for multiple widgets, etc.. Basically a fields logic was split into separate components: - adapters - parsers & formatters - binder Adapters - extract data from data source (FreeIPA RPC command result) - prepares them for commands. Parsers - parse extracted data to format expected by field - parse widget value to format expected by field Formatters - format field value to format suitable for widgets - format field value to format suitable for adapter Binder - is a communication bridge between field and widget - listens to field's and widget's events and call appropriate methods Some side benefits: - better validation reporting in multivalued widget Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
* webui: replace IPA.command usage with rpc.commandPetr Vobornik2014-03-271-3/+4
| | | | | | | Replace all IPA.command, IPA.batch_command and IPA.concurrent_command usages by equivalents from rpc module. Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>
* webui: change permissions UI to v2Petr Vobornik2014-03-201-10/+14
| | | | | | | | | | | | | | reflect ipalib permission changes in Web UI. - http://www.freeipa.org/page/V4/Permissions_V2 - http://www.freeipa.org/page/V4/Anonymous_and_All_permissions - http://www.freeipa.org/page/V4/Managed_Read_permissions - http://www.freeipa.org/page/V4/Multivalued_target_filters_in_permissions https://fedorahosted.org/freeipa/ticket/4079 Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com> Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* webui: reflect enabled state in child widgets of a multivalued widgetPetr Vobornik2014-03-201-6/+33
| | | | | | | | | | | Child widgets are disabled when main widget is disabled. Also main widget won't show "add" button. prerequisite for: https://fedorahosted.org/freeipa/ticket/4079 Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com> Reviewed-By: Petr Viktorin <pviktori@redhat.com>
* webui-css: improve radio,checkbox keyboard support and colorPetr Vobornik2014-03-201-5/+14
| | | | | | | | | | | | | checkboxes and radio buttons: - do not change color on hover when disabled - are focusable and checkable be keyboard again. This uses a little trick where the real checkbox is hidden under the artificial checkbox. That way it has the same position and therefore it works even in containers with overflow set. https://fedorahosted.org/freeipa/ticket/4217 Reviewed-By: Adam Misnyovszki <amisnyov@redhat.com>