-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1376 from epwinchell/responsive_selector
make textarea based item selector responsive
- Loading branch information
Showing
13 changed files
with
608 additions
and
724 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,55 @@ | ||
#column_lists | ||
- url = url_for_only_path(:action => 'st_catalog_form_field_changed', :id => (@edit[:rec_id] || "new")) | ||
%table.form#formtest{:width => "100%"} | ||
%tr | ||
%td.widthed{:align => "left"}= _('Unassigned:') | ||
%td | ||
%td{:align => "left"}= _('Selected:') | ||
%tr | ||
%td{:align => "right", :valign => "top"} | ||
= select_tag("available_fields[]", | ||
options_for_select(@edit[:new][:available_fields]), | ||
:multiple => true, | ||
:style => "width: 450px", | ||
:size => 8, | ||
:id => "available_fields") | ||
%td.text-center{:width => "40"} | ||
.btn-group-vertical | ||
- if @edit[:new][:available_fields].length == 0 | ||
%button.btn.btn-default.disabled | ||
%i.fa.fa-angle-right.fa-lg | ||
- else | ||
- t = _("Move Selected buttons right") | ||
%button.btn.btn-default{:title => t, | ||
"data-submit" => 'column_lists', | ||
"data-miq_sparkle_on" => true, | ||
:remote => true, | ||
"data-method" => :post, | ||
'data-click_url' => {:url => "#{url}?button=right"}.to_json} | ||
%i.fa.fa-angle-right.fa-lg | ||
.col-md-5 | ||
= _('Unassigned:') | ||
= select_tag("available_fields[]", | ||
options_for_select(@edit[:new][:available_fields]), | ||
:multiple => true, | ||
:class => "form-control", | ||
:style => "overflow-x: scroll;", | ||
:size => 8, | ||
:id => "available_fields") | ||
|
||
- if @edit[:new][:fields].length == 0 | ||
%button.btn.btn-default.disabled | ||
%i.fa.fa-angle-left.fa-lg | ||
- else | ||
- t = _("Move Selected buttons left") | ||
%button.btn.btn-default{:title => t, | ||
"data-submit" => 'column_lists', | ||
"data-miq_sparkle_on" => true, | ||
:remote => true, | ||
"data-method" => :post, | ||
'data-click_url' => {:url => "#{url}?button=left"}.to_json} | ||
%i.fa.fa-angle-left.fa-lg | ||
.col-md-1{:style => "padding: 10px"} | ||
.spacer | ||
.spacer | ||
- if @edit[:new][:available_fields].length == 0 | ||
%button.btn.btn-default.btn-block.disabled | ||
%i.fa.fa-angle-right.fa-lg.hidden-xs.hidden-sm | ||
%i.fa.fa-angle-right.fa-lg.fa-rotate-90.hidden-md.hidden-lg | ||
- else | ||
- t = _("Move Selected buttons right") | ||
%button.btn.btn-default.btn-block{:title => t, | ||
"data-submit" => 'column_lists', | ||
"data-miq_sparkle_on" => true, | ||
:remote => true, | ||
"data-method" => :post, | ||
'data-click_url' => {:url => "#{url}?button=right"}.to_json} | ||
%i.fa.fa-angle-right.fa-lg.hidden-xs.hidden-sm | ||
%i.fa.fa-angle-right.fa-lg.fa-rotate-90.hidden-md.hidden-lg | ||
|
||
- if @edit[:new][:fields].length == 0 | ||
%button.btn.btn-default.btn-block.disabled | ||
%i.fa.fa-angle-left.fa-lg.hidden-xs.hidden-sm | ||
%i.fa.fa-angle-left.fa-lg.fa-rotate-90.hidden-md.hidden-lg | ||
- else | ||
- t = _("Move Selected buttons left") | ||
%button.btn.btn-default.btn-block{:title => t, | ||
"data-submit" => 'column_lists', | ||
"data-miq_sparkle_on" => true, | ||
:remote => true, | ||
"data-method" => :post, | ||
'data-click_url' => {:url => "#{url}?button=left"}.to_json} | ||
%i.fa.fa-angle-left.fa-lg.hidden-xs.hidden-sm | ||
%i.fa.fa-angle-left.fa-lg.fa-rotate-90.hidden-md.hidden-lg | ||
.spacer | ||
|
||
|
||
%td{:align => "left", :valign => "top"} | ||
= select_tag("selected_fields[]", | ||
options_for_select(@edit[:new][:fields], @selected), | ||
:multiple => true, | ||
:style => "width: 450px", | ||
:size => 8, | ||
:id => "selected_fields") | ||
.col-md-5 | ||
= _('Selected:') | ||
= select_tag("selected_fields[]", | ||
options_for_select(@edit[:new][:fields], @selected), | ||
:multiple => true, | ||
:class => "form-control", | ||
:style => "overflow-x: scroll;", | ||
:size => 8, | ||
:id => "selected_fields") |
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 |
---|---|---|
@@ -1,25 +1,17 @@ | ||
= render :partial => "layouts/flash_msg" | ||
#domains_list | ||
%table#formtest.form{:width => '50%'} | ||
%tr | ||
%td.widthed{:align => "left"}= _("Domains:") | ||
%td | ||
%tr | ||
%td{:align => "left", :valign => "top"} | ||
= select_tag('seq_fields[]', | ||
options_for_select(@edit[:new][:domain_order], @selected), | ||
:multiple => true, :style => "width: 450px", :size => 20, :id => "seq_fields") | ||
%td{:width => "30", :align => "left", :valign => "middle"} | ||
= link_image_if(:cond => (@edit[:new][:domain_order].length < 2), | ||
:image => image_path('toolbars/up.png'), | ||
:opts_true => {:class => "dimmed small"}, | ||
:opts_false => {:class => "rollover small", :alt => t = _("Move selected fields up")}, | ||
:link => {:action => 'priority_form_field_changed', :button => 'up', :id => "priority__edit"}, | ||
:opts_link => {:remote => true, 'data-method' => :post, "data-submit" => "domains_list", :title => t}) | ||
= link_image_if(:cond => (@edit[:new][:domain_order].length < 2), | ||
:image => image_path('toolbars/down.png'), | ||
:opts_true => {:class => "dimmed small"}, | ||
:opts_false => {:class => "rollover small", :alt => (t = _("Move selected fields down"))}, | ||
:link => {:action => 'priority_form_field_changed', :button => 'down', :id => "priority__edit"}, | ||
:opts_link => {:remote => true, 'data-method' => :post, "data-submit" => "domains_list", :title => t}) | ||
#div.note= _('* Select one or more consecutive groups to move up or down.') | ||
.row | ||
.col-md-7.col-sm-10.col-xs-10 | ||
= _("Domains:") | ||
= select_tag('seq_fields[]', | ||
options_for_select(@edit[:new][:domain_order], @selected), | ||
:multiple => true, :class => "form-control", :style => "overflow-x: scroll;", :size => 20, :id => "seq_fields") | ||
%small= _('* Select one or more consecutive groups to move up or down.') | ||
|
||
- button_params = @edit[:new][:domain_order].length >= 2 ? [[_("Move selected fields up"), 'domains_list', 'up', 'fa-angle-up'], | ||
[_("Move selected fields down"), 'domains_list', 'down', 'fa-angle-down']] : [] | ||
= render :partial => "shared/views/seq_selector_buttons", | ||
:locals => {:fields_count => @edit[:new][:domain_order].length, | ||
:button_params => button_params, | ||
:button_action => 'priority_form_field_changed', | ||
:id => 'priority__edit'} |
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 |
---|---|---|
@@ -1,39 +1,20 @@ | ||
= render :partial => "layouts/flash_msg" | ||
#column_lists | ||
%p | ||
%table#formtest.form{:width => '50%'} | ||
%tr | ||
%td.widthed{:align => "left"}= _('Class Schema Sequencing:') | ||
%td | ||
%tr | ||
%td{:align => "left", :valign => "top"} | ||
= select_tag('seq_fields[]', | ||
options_for_select(@edit[:new][:fields_list], @selected), | ||
:multiple => true, :style => "width: 450px", :size => 20, :id => "seq_fields") | ||
%td{:width => "30", :align => "left", :valign => "middle"} | ||
= link_image_if(:cond => (@edit[:new][:fields].length < 2), | ||
:image => image_path('toolbars/up.png'), | ||
:opts_true => {:class => "dimmed small"}, | ||
:opts_false => {:class => "rollover small", :alt => (t = _("Move selected fields up"))}, | ||
:link => {:action => 'fields_seq_field_changed', :button => 'up', :id => "seq"}, | ||
:opts_link => {:title => t, | ||
"data-miq_sparkle_on" => true, | ||
"data-miq_sparkle_off" => true, | ||
"data-submit" => 'column_lists', | ||
"data-method" => :post, | ||
:remote => true}) | ||
= link_image_if(:cond => (@edit[:new][:fields].length < 2), | ||
:image => image_path('toolbars/down.png'), | ||
:opts_true => {:class => "dimmed small"}, | ||
:opts_false => {:class => "rollover small", :alt => (t = _("Move selected fields down"))}, | ||
:link => {:action => 'fields_seq_field_changed', :button => 'down', :id => "seq"}, | ||
:opts_link => {:title => t, | ||
"data-miq_sparkle_on" => true, | ||
"data-miq_sparkle_off" => true, | ||
"data-submit" => 'column_lists', | ||
"data-method" => :post, | ||
:remote => true}) | ||
.note= _('* Select one or more consecutive fields to move up or down.') | ||
.col-md-7.col-sm-10.col-xs-10 | ||
= _('Class Schema Sequencing:') | ||
= select_tag('seq_fields[]', | ||
options_for_select(@edit[:new][:fields_list], @selected), | ||
:multiple => true, :class => "form-control", :style => "overflow-x: scroll;", :size => 20, :id => "seq_fields") | ||
%small= _('* Select one or more consecutive fields to move up or down.') | ||
|
||
- button_params = @edit[:new][:fields].length >= 2 ? [[_("Move selected fields up"), 'column_lists', 'up', 'fa-angle-up'], | ||
[_("Move selected fields down"), 'column_lists', 'down', 'fa-angle-down']] : [] | ||
= render :partial => "shared/views/seq_selector_buttons", | ||
:locals => {:fields_count => @edit[:new][:fields].length, | ||
:button_params => button_params, | ||
:button_action => 'fields_seq_field_changed', | ||
:id => 'seq'} | ||
|
||
:javascript | ||
// disable any other tabs on screen when in edit | ||
miq_tabs_disable_inactive('#ae_tabs'); |
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
Oops, something went wrong.