Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove outdated css / update expression editor toolbar styling #12998

Merged
merged 2 commits into from
Dec 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions app/assets/stylesheets/template.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
html { padding: 0 0 /*25*/px 0; /* create area for notification */}
legend { display: none;}
textarea { width: 98.5%; border: 1px solid #d1d1d1; padding: 7px; line-height: 1.5em}

fieldset {
Expand All @@ -9,8 +7,6 @@ fieldset {
border:1px solid #e9e8e8;
}

nobr { white-space: nowrap;}

/*Centering for Hovered VMs*/
#outer { position: absolute;top: 50%;left: 0;overflow: visible;width: 100%;height: 1px;}
#inner {position: absolute;/*** height / 2 ***/ top: -50px;left: 50%;margin-left: -50px;width: 100px;height: 100px; /*** width / 2 ***/}
Expand Down Expand Up @@ -45,18 +41,6 @@ nobr { white-space: nowrap;}
text-shadow: #000 2px 2px 0;
}

/************ Tabs ************/

ul.searchtoolbar { margin: 0;padding: 2px 0 0 5px; width:100%;height: 30px;}
.searchtoolbar li { margin-right: 7px;padding: 0 4px 1px 4px; height:22px; width: 30px;float: left;display: inline;border: 1px solid #7e7e7e;}
.searchtoolbar li:hover { background: #aeaeae;}
.searchtoolbar li img.dimmed { background: none;}

/* Automate Specific */
.checkall { padding: 0 0 7px 7px;} /*styling for automate (Check All) */

/* End Automate Specific */

/************ Hover Buttons ************/
.rollover img, input.rollover { display:block;}
.rollover img:hover, img.rollover:hover, input.rollover:hover, i.rollover:hover { background:#e4e4e4;}
Expand All @@ -70,8 +54,6 @@ img.tiny { margin: 0; padding: 0;width:20px;height:20px; border: 0; vertical-ali
.quadicon { position:relative;float:left;padding: 0 1px 1px 0;width: 72px; height: 80px;color: #e3e4e4;text-transform: none;}
.quadicon:hover{ padding: 1px 0 0 1px;}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the checkall class still being used by automate hamls? Is see that class in

app/views/miq_ae_class/_class_instances.html.haml
app/views/miq_ae_class/_class_methods.html.haml
app/views/miq_ae_class/_ns_details.html.haml
app/views/miq_ae_class/_ns_list.html.haml

Copy link
Contributor Author

@epwinchell epwinchell Dec 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mzazrivec It looks like it is used by the JS. I tested those screens, the styling isn't needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@epwinchell I see, never mind then.

div.panecontent .flobj { margin-left: 40px;}

.flobj { position: absolute;z-index: auto;width: 72px;}
.flobj p { margin: 5px 0 0 0;padding: 0;color: #e3e4e4;vertical-align: middle;text-align:center;text-transform: none;text-shadow: 0 0 3px #000;font: normal 16px OpenSansSemibold,Arial,Helvetica,sans-serif !important;}
.a72 { padding: 3px 0 0 5px; width: 28px; height: 28px;font-size: 1.3em;line-height: 1.8em;}
Expand Down
174 changes: 87 additions & 87 deletions app/views/layouts/_exp_editor.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,102 +7,102 @@
= javascript_tag("ManageIQ.expEditor.second.title = '#{@edit[@expkey][:val2][:title]}';")

#exp_editor_div
%fieldset{:style => "width: auto; padding-left: 6px; padding-top: 6px"}
%ul.searchtoolbar
- if @edit[@expkey].history.idx > 0
%li
= link_to(image_tag(image_path('toolbars/undo.png'),
:alt => _('Undo the last change')),
{:action => 'exp_button',
:pressed => 'undo'},
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
:remote => true,
"data-method" => :post,
:title => _('Undo the last change'))
- else
%li.dimmed
= image_tag(image_path('toolbars/undo.png'))
%fieldset
.toolbar-pf-actions
.form-group
- if @edit[@expkey].history.idx > 0
%button.btn.btn-default
= link_to(image_tag(image_path('toolbars/undo.png'),
:alt => _('Undo the last change')),
{:action => 'exp_button',
:pressed => 'undo'},
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
:remote => true,
"data-method" => :post,
:title => _('Undo the last change'))
- else
%button.btn.btn-default.disabled
= image_tag(image_path('toolbars/undo.png'))

- if @edit[@expkey].history.idx < @edit[@expkey].history.array.length - 1
%li
= link_to(image_tag(image_path('toolbars/redo.png'),
:alt => _('Re-apply the previous change')),
{:action => 'exp_button',
:pressed => 'redo'},
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
:remote => true,
"data-method" => :post,
:title => _('Re-apply the previous change'))
- else
%li.dimmed
= image_tag(image_path('toolbars/redo.png'))
- if @edit[@expkey].history.idx < @edit[@expkey].history.array.length - 1
%button
= link_to(image_tag(image_path('toolbars/redo.png'),
:alt => _('Re-apply the previous change')),
{:action => 'exp_button',
:pressed => 'redo'},
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
:remote => true,
"data-method" => :post,
:title => _('Re-apply the previous change'))
- else
%button.btn.btn-default.disabled
= image_tag(image_path('toolbars/redo.png'))

%span#exp_buttons_off
- %w(and or not discard).each do |image|
%button.btn.btn-default.disabled
= image_tag(image_path("toolbars/#{image}.png"))

%span#exp_buttons_off
- %w(and or not discard).each do |image|
%li.dimmed
= image_tag(image_path("toolbars/#{image}.png"))
%span#exp_buttons_not{:style => "display: none"}
- [[_("AND with a new expression element"), 'and', 'and'],
[_("OR with a new expression element"), 'or', 'or'],
["", 'not', ''],
[_("Remove this expression element"), 'discard', 'remove']].each do |title, image, pressed|
- if title.empty?
%button.btn.btn-default.disabled
= link_to(image_tag(image_path("toolbars/#{image}.png")))
- else
%button.btn.btn-default
= link_to(image_tag(image_path("toolbars/#{image}.png"),
:alt => title),
{:action => "exp_button",
:pressed => pressed},
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
:remote => true,
"data-method" => :post,
:title => title)

%span#exp_buttons_not{:style => "display: none"}
- [[_("AND with a new expression element"), 'and', 'and'],
[_("OR with a new expression element"), 'or', 'or'],
["", 'not', ''],
[_("Remove this expression element"), 'discard', 'remove']].each do |title, image, pressed|
- if title.empty?
%li.dimmed
= link_to(image_tag(image_path("toolbars/#{image}.png")))
- else
%li
= link_to(image_tag(image_path("toolbars/#{image}.png"),
:alt => title),
{:action => "exp_button",
:pressed => pressed},
%span#exp_buttons_on{:style => "display: none"}
- [[_("AND with a new expression element"), 'and', 'and'],
[_("OR with a new expression element"), 'or', 'or'],
[_("Wrap this expression element with a NOT"), 'not', 'not'],
[_("Remove this expression element"), 'discard', 'remove']].each do |title, image, pressed|
%button.btn.btn-default
= link_to(image_tag(image_path("toolbars/#{image}.png"), :alt => title), {:action => 'exp_button', :pressed => pressed},
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
:remote => true,
"data-method" => :post,
:title => title)

%span#exp_buttons_on{:style => "display: none"}
- [[_("AND with a new expression element"), 'and', 'and'],
[_("OR with a new expression element"), 'or', 'or'],
[_("Wrap this expression element with a NOT"), 'not', 'not'],
[_("Remove this expression element"), 'discard', 'remove']].each do |title, image, pressed|
%li
= link_to(image_tag(image_path("toolbars/#{image}.png"), :alt => title), {:action => 'exp_button', :pressed => pressed},
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
:remote => true,
"data-method" => :post,
:title => title)

%div{:style => "padding: 10px"}
- @edit[@expkey][:exp_table].each do |token|
- if ! %w(AND OR ( ) ???).include?([token].flatten.first)
= link_to(token.first,
{:action => 'exp_token_pressed',
:token => token.last},
:style => "color: black",
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
:remote => true,
"data-method" => :post,
:id => "exp_#{token.last}")
- elsif [token].flatten.first == "???"
= link_to(token.first,
{:action => 'exp_token_pressed',
:token => token.last},
:style => "color: black; background-color: yellow",
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
:remote => true,
"data-method" => :post,
:id => "exp_#{token.last}")
- else
%font{:color => "red"}
%b
= token
- @edit[@expkey][:exp_table].each do |token|
- if ! %w(AND OR ( ) ???).include?([token].flatten.first)
= link_to(token.first,
{:action => 'exp_token_pressed',
:token => token.last},
:style => "color: black",
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
:remote => true,
"data-method" => :post,
:id => "exp_#{token.last}")
- elsif [token].flatten.first == "???"
= link_to(token.first,
{:action => 'exp_token_pressed',
:token => token.last},
:style => "color: black; background-color: yellow",
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
:remote => true,
"data-method" => :post,
:id => "exp_#{token.last}")
- else
%font{:color => "red"}
%b
= token

- if @edit[@expkey][:exp_token]
= render(:partial => 'layouts/exp_atom/editor')
107 changes: 54 additions & 53 deletions app/views/layouts/exp_atom/_editor.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -20,62 +20,63 @@
- unless MiqExpression.miq_adv_search_lists(exp_model, :exp_available_finds).length > 0
- exptypes -= [[_(EXP_FIND_TYPE[0]), EXP_FIND_TYPE[1]]]
#exp_atom_editor_div
%fieldset{:style => "width:auto; padding-left: 6px; padding-top: 6px;"}
%ul.searchtoolbar
%li
- t = _('Commit expression element changes')
= link_to(image_tag(image_path('toolbars/commit.png'), :alt => t),
{:action => 'exp_button', :pressed => 'commit'},
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
:remote => true,
"data-method" => :post,
:title => t)
%li
- t = _("Discard expression element changes")
= link_to(image_tag(image_path('toolbars/discard.png'), :alt => t),
{:action => 'exp_button', :pressed => 'discard'},
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
:remote => true,
"data-method" => :post,
:title => t)
%div{:style => "padding: 10px;"}
- if @edit[@expkey][:exp_key] == "NOT"
%font{:color => "black"}
= _('NOT')
%fieldset
.toolbar-pf-actions
.form-group
%button
- t = _('Commit expression element changes')
= link_to(image_tag(image_path('toolbars/commit.png'), :alt => t),
{:action => 'exp_button', :pressed => 'commit'},
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
:remote => true,
"data-method" => :post,
:title => t)
%button
- t = _("Discard expression element changes")
= link_to(image_tag(image_path('toolbars/discard.png'), :alt => t),
{:action => 'exp_button', :pressed => 'discard'},
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
:remote => true,
"data-method" => :post,
:title => t)

- if @edit[@expkey][:exp_key] == "NOT"
%font{:color => "black"}
= _('NOT')
- else
- opts = ["<#{_('Choose')}>"]
- case exp_model
- when 'Vm'
- opts += exptypes + VM_EXP_TYPES.map { |x| [_(x[0]), x[1]] }
- when 'AuditEvent'
- opts += [[_('Field'), 'field']]
- when '_display_filter_'
- unless @edit[@expkey][:exp_available_fields].empty?
- opts.push([_('Field'), 'field'])
- unless @edit[@expkey][:exp_available_tags] && @edit[@expkey][:exp_available_tags].empty? || exp_available_tags(exp_model, @edit[@expkey][:use_mytags]).empty?
- opts.push([_('Tag'), 'tag'])
- else
- opts = ["<#{_('Choose')}>"]
- case exp_model
- when 'Vm'
- opts += exptypes + VM_EXP_TYPES.map { |x| [_(x[0]), x[1]] }
- when 'AuditEvent'
- opts += [[_('Field'), 'field']]
- when '_display_filter_'
- unless @edit[@expkey][:exp_available_fields].empty?
- opts.push([_('Field'), 'field'])
- unless @edit[@expkey][:exp_available_tags] && @edit[@expkey][:exp_available_tags].empty? || exp_available_tags(exp_model, @edit[@expkey][:use_mytags]).empty?
- opts.push([_('Tag'), 'tag'])
- else
- opts += exptypes
- opts += exptypes

= select_tag('chosen_typ', options_for_select(opts, @edit[@expkey][:exp_typ]),
:multiple => false,
:class => 'selectpicker',
'data-miq_sparkle_on' => true,
'data-miq_sparkle_off' => true,
'data-miq_observe' => {:url => url}.to_json)
= select_tag('chosen_typ', options_for_select(opts, @edit[@expkey][:exp_typ]),
:multiple => false,
:class => 'selectpicker',
'data-miq_sparkle_on' => true,
'data-miq_sparkle_off' => true,
'data-miq_observe' => {:url => url}.to_json)

%br
- if @edit[@expkey][:exp_typ]
= render :partial => "layouts/exp_atom/edit_#{@edit[@expkey][:exp_typ]}", :locals => {:exp_model => exp_model}
- if qs_show_user_input_checkbox?
= check_box_tag("user_input", "1", @edit[@expkey][:exp_value] == :user_input,
:style => "width: 20px",
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
"data-miq_observe_checkbox" => {:url => url}.to_json)
= _('User will input the value')
%br
- if @edit[@expkey][:exp_typ]
= render :partial => "layouts/exp_atom/edit_#{@edit[@expkey][:exp_typ]}", :locals => {:exp_model => exp_model}
- if qs_show_user_input_checkbox?
= check_box_tag("user_input", "1", @edit[@expkey][:exp_value] == :user_input,
:style => "width: 20px",
"data-miq_sparkle_on" => true,
"data-miq_sparkle_off" => true,
"data-miq_observe_checkbox" => {:url => url}.to_json)
= _('User will input the value')
%script{:type => "text/javascript"}
-# Set the expression value prefill images and hover text
miqExpressionPrefill(ManageIQ.expEditor, true);
Expand Down