Skip to content

Commit

Permalink
fix add button for all tabs within wiki sidebar
Browse files Browse the repository at this point in the history
Fixes: CNVS-34356

test plan:
- as an admin/teacher
- navigate to an existing course... click the edit button
- within the "insert content"... within the right sidebar
- under the "each tab" the add button should now be updated
  from the ugly green add button to the udpated icons
  example: https://screencast.com/t/1GUBUn6RpKJS

Change-Id: I736042dbfdcb46ad95750e3444fc38b5bb9d05b0
Reviewed-on: https://gerrit.instructure.com/99550
Tested-by: Jenkins
Reviewed-by: Stephen Jensen <[email protected]>
QA-Review: Dan Sasaki
Product-Review: Kyle Follett <[email protected]>
  • Loading branch information
pamhiett committed Jan 17, 2017
1 parent 3ba89fc commit c83cb91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions app/views/shared/_wiki_sidebar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<% end %>
</ul>
<% if can_do(@wiki_sidebar_data[:wiki], @current_user, :create_page) %>
<%= link_to t('links.new_page', "Link to a New Page"), "#", :id => 'new_page_link', :class => "add" %>
<%= link_to t('links.new_page', "Link to a New Page"), "#", :id => 'new_page_link', :class => "icon-add" %>
<form id="new_page_drop_down" style="display:none; margin: 5px;">
<div class="row-fluid">
<label for="new_page_name"><%= t('new_page_name', %{What would you like to call the new page?}) %></label><br />
Expand Down Expand Up @@ -197,7 +197,7 @@
</div>
</div>
<% if can_do(@context, @current_user, :manage_files) %>
<div><a href="#" class="upload_new_file_link add" style="padding-top:2px;"><%= t('links.upload_file', %{Upload a new file}) %></a></div>
<div><a href="#" class="upload_new_file_link icon-add" style="padding-top:2px;"><%= t('links.upload_file', %{Upload a new file}) %></a></div>
<%= form_for :attachment, :url => context_url(@context, :context_files_url), :html => {:id => "sidebar_upload_file_form", :style => "display: none;", :multipart => true, :class => "sidebar_upload_file_form"} do |f| %>
<input type="hidden" name="return_to" value="<%= request.url %>"/>
<%= f.file_field :uploaded_data, :class => "file_name", :size => 20 %>
Expand Down Expand Up @@ -228,7 +228,7 @@
<div aria-atomic="true" id="editor_tabs_4">
<%= t('images_tab', %{Click any image to embed the image in the page.}) %>
<% if can_do(@context, @current_user, :manage_files) %>
<a href="#" aria-label="<%= t('aria_label.image_form_collapsed', 'Click to toggle the upload a new image form (collapsed)') %>" class="upload_new_image_link add" style="padding-top:2px;"><%= t('links.upload_image', %{Upload a new image}) %></a>
<a href="#" aria-label="<%= t('aria_label.image_form_collapsed', 'Click to toggle the upload a new image form (collapsed)') %>" class="upload_new_image_link icon-add" style="padding-top:2px;"><%= t('links.upload_image', %{Upload a new image}) %></a>
<% end %>
<% if can_do(@context, @current_user, :manage_files) %>
<%= form_for :attachment, :url => context_url(@context, :context_files_url), :html => {:id => "sidebar_upload_image_form", :style => "display: none;", :multipart => true} do |f| %>
Expand Down
4 changes: 2 additions & 2 deletions public/javascripts/wikiSidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ define([

UsageRights.render('#usage-rights');

$editor_tabs.find("#pages_accordion a.add").click(function(event){
$editor_tabs.find('#pages_accordion a.icon-add').click(function (event) {
event.preventDefault();
$editor_tabs.find('#new_page_drop_down').slideToggle("fast", function() {
$(this).find(":text:visible:first").focus().select();
$(this).find(':text:visible:first').focus().select();
});
});

Expand Down

0 comments on commit c83cb91

Please sign in to comment.