From ffb392617895095b824a35150e620a68920f9260 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 11 Dec 2016 15:46:54 -0500 Subject: Replace Chosen jQuery plugin by custom UI component --- app/Template/group/associate.php | 6 +++++- app/Template/header/board_selector.php | 26 +++++++++++++------------- app/Template/project_user_overview/sidebar.php | 21 ++++++++++++--------- 3 files changed, 30 insertions(+), 23 deletions(-) (limited to 'app/Template') diff --git a/app/Template/group/associate.php b/app/Template/group/associate.php index 87787568..24edd133 100644 --- a/app/Template/group/associate.php +++ b/app/Template/group/associate.php @@ -9,7 +9,11 @@ form->hidden('group_id', $values) ?> form->label(t('User'), 'user_id') ?> - form->select('user_id', $users, $values, $errors, array('required'), 'chosen-select') ?> + app->component('select-dropdown-autocomplete', array( + 'name' => 'user_id', + 'items' => $users, + 'defaultValue' => isset($values['user_id']) ? $values['user_id'] : null, + )) ?>
diff --git a/app/Template/header/board_selector.php b/app/Template/header/board_selector.php index b42d47f9..6f87b0d1 100644 --- a/app/Template/header/board_selector.php +++ b/app/Template/header/board_selector.php @@ -1,13 +1,13 @@ - +app->component('select-dropdown-autocomplete', array( + 'name' => 'boardId', + 'placeholder' => t('Display another project'), + 'items' => $board_selector, + 'redirect' => array( + 'regex' => 'PROJECT_ID', + 'url' => $this->url->to('BoardViewController', 'show', array('project_id' => 'PROJECT_ID')), + ), + 'onFocus' => array( + 'board.selector.open', + ) +)) ?> + diff --git a/app/Template/project_user_overview/sidebar.php b/app/Template/project_user_overview/sidebar.php index ccbf9cab..493f4cbf 100644 --- a/app/Template/project_user_overview/sidebar.php +++ b/app/Template/project_user_overview/sidebar.php @@ -1,14 +1,17 @@