You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-11Lines changed: 46 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ There are three main parts of the roundup-classhelper component:
35
35
***Select/Info Table Section**: This section displays the search results or a list of available items. If a search section is present, it will show the items matching the search criteria. If no search section is available, it will display all available items. This section may include pagination controls to navigate through large datasets. Additionally, it may have a checkbox for selecting items if the `<roundup-classhelper>` is associated with a form field. However, if there is no associated form field (i.e., "info mode"), this section will act as an information box without selection capabilities.
***Accumulator/Submit Section**: This section shows the items selected by the user from the Select/Info Table Section. It serves as an accumulator, allowing users to review and confirm their selections before submitting or updating the associated form field. If the `<roundup-classhelper>` is in "info mode" (without an associated form field), this section may be absent, as there are no items to accumulate or submit.
@@ -49,11 +49,16 @@ The `<roundup-classhelper>` is designed to be fully accessible and navigable usi
49
49
***Search Section**: If present, users can type their search query directly into the search input field using the keyboard.
50
50
51
51
***Select/Info Table Section**:
52
-
* Users can navigate through the list of items using the Up and Down arrow keys.
53
-
* To select/deselect an item, users can press the Space key when an item is focused.
54
-
* If pagination controls are present, users can navigate to the next or previous page using the appropriate links or buttons, which should be accessible via the Tab key.
55
-
52
+
* Users can navigate through the list of items using the `Up` and `Down` arrow keys.
53
+
* To select/deselect an item, users can press the `Space` key when an item is focused.
54
+
* If pagination controls are present, users can navigate to the `next` or `previous` page using the appropriate links or buttons, which should be accessible via the `Tab` key.
55
+
* Users can also use the `<` and `>` keys to focus on the `Prev` and `Next` buttons for navigating to the previous and next pages, respectively.
56
56
57
+
***Accumulator/Submit Section**:
58
+
* Users can navigate to the `Apply` or `Cancel` buttons using the `Tab` key.
59
+
* To submit or cancel the selected values, users can press the `Enter` key when the respective button is focused.
60
+
* Users can navigate to `Submit` button, by pressing `Shift + Enter` from anywhere.
61
+
Enter push makes the thing happen
57
62
58
63
### Mouse Usage
59
64
In addition to keyboard navigation, the `<roundup-classhelper>` component can be used with a mouse or other pointing device:
@@ -142,16 +147,46 @@ In addition to keyboard navigation, the `<roundup-classhelper>` component can be
142
147
* In case of errors, the component will display relevant messages to the user.(component will notify the user)
143
148
* For further debugging, users can open the browser console and inspect the results.
144
149
145
-
# Roles - Interfaces.py
150
+
146
151
147
152
#### Refreshing `classhelper.css`
148
-
In case of issues with the `<roundup-classhelper>` component, you can try refreshing the classhelper.css file by following these steps:
149
-
* Open the `<roundup-classhelper>` popup window.
150
-
* Press `Ctrl+Shift+R` (or `Cmd+Shift+R` on Mac) to perform a hard refresh of the page.
153
+
In case of issues with the `<roundup-classhelper>` component, you can try refreshing the `classhelper.css` file by following these steps:
154
+
* Open your Roundup issue tracker in a web browser.
155
+
* In the address bar, append `@@file/classhelper.css` to the end of your Roundup URL. For example, if your Roundup URL is `http://example.com/tracker`, the URL you should visit would be `http://example.com/tracker/@@file/classhelper.css`
156
+
* This will open the `classhelper.css` file in your browser.
157
+
* To perform a hard refresh of the page, which forces the browser to reload the file and associated resources from the server, press `Ctrl+Shift+R` (on Windows and Linux) or `Cmd+Shift+R` (on macOS).
158
+
159
+
This will force the browser to reload the classhelper.css file and any other associated resources, potentially resolving any issues caused by cached or outdated files.
160
+
161
+
## Adding Roles
162
+
* If you want to enable the display of roles in the `<roundup-classhelper>` component, you'll need to have an `interfaces.py` file with the following code:
163
+
164
+
```python
165
+
from roundup.rest import Routing, RestfulInstance, _data_decorator
166
+
167
+
class RestfulInstance:
168
+
169
+
@Routing.route("/roles", 'GET')
170
+
@_data_decorator
171
+
def get_roles(self, input):
172
+
"""Return all defined roles. The User class property
for rolename in list(self.db.security.role.keys())]}
178
+
```
151
179
152
-
This will force the browser to reload the classhelper.js file and any other associated resources, potentially resolving any issues caused by cached or outdated files.
180
+
By including this code in the `interfaces.py` file, you enable the `<roundup-classhelper>` component to handle roles effectively, allowing users to search, filter, and select roles within the component.
153
181
182
+
# Installing and Setup
183
+
Copy the following files into your Roundup instance `html` directory:
0 commit comments