-
Notifications
You must be signed in to change notification settings - Fork 710
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for 'dropdown' controls in JSDialog
- Implemented `JSDialog.Dropdown` handler function to manage dropdown controls. - Updated `JSDialogBuilder` to register the new dropdown handler. - Modified color picker dropdown JSON to include `noDefaultKeyboardNavigation: true`. - Removed redundant code handling dropdowns elsewhere. Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com> Change-Id: Idbcc5b2ac878cc71b3066b781eca062bc0b0aba8
- Loading branch information
1 parent
2b8bb6c
commit dc930ff
Showing
4 changed files
with
32 additions
and
9 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* -*- js-indent-level: 8 -*- */ | ||
/* | ||
* Copyright the Collabora Online contributors. | ||
* | ||
* SPDX-License-Identifier: MPL-2.0 | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
|
||
/* | ||
* JSDialog.DropDown - build dropdown container with dynamic list | ||
*/ | ||
|
||
declare var JSDialog: any; | ||
|
||
JSDialog.Dropdown = function ( | ||
parentContainer: HTMLElement, | ||
data: any, | ||
builder: any, | ||
) { | ||
builder.build(parentContainer, data.children, data.vertical === true); | ||
|
||
if (!data.noDefaultKeyboardNavigation) | ||
JSDialog.KeyboardListNavigation(parentContainer); | ||
return false; | ||
}; |