Prechádzať zdrojové kódy

Update bootstrap to 4.2 and fix js dropdown error

https://github.com/twbs/bootstrap/issues/27903
Chris Oliver 5 rokov pred
rodič
commit
faed499191
2 zmenil súbory, kde vykonal 4 pridanie a 4 odobranie
  1. 2 2
      app/views/shared/_navbar.html.erb
  2. 2 2
      template.rb

+ 2 - 2
app/views/shared/_navbar.html.erb

@@ -28,10 +28,10 @@
          </li>
 
           <li class="nav-item dropdown">
-            <%= link_to "#", id: "navbar-dropdown", class: "nav-link dropdown-toggle", data: { toggle: "dropdown" }, aria: { haspopup: true, expanded: false } do %>
+            <%= link_to "#", id: "navbar-dropdown", class: "nav-link dropdown-toggle", data: { target: "nav-account-dropdown", toggle: "dropdown" }, aria: { haspopup: true, expanded: false } do %>
               <%= image_tag gravatar_image_url(current_user.email, size: 40), height: 20, width: 20, class: "rounded" %>
             <% end %>
-            <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbar-dropdown">
+            <div id="nav-account-dropdown" class="dropdown-menu dropdown-menu-right" aria-labelledby="navbar-dropdown">
               <% if current_user.admin? %>
                 <%= link_to "Admin Area", admin_root_path, class: "dropdown-item" %>
               <% end %>

+ 2 - 2
template.rb

@@ -27,12 +27,12 @@ end
 
 def add_gems
   gem 'administrate', '~> 0.10.0'
-  gem 'bootstrap', '~> 4.1', '>= 4.1.1'
+  gem 'bootstrap', '~> 4.2', '>= 4.2.1'
   gem 'data-confirm-modal', '~> 1.6', '>= 1.6.2'
   gem 'devise', '~> 4.4', '>= 4.4.3'
   gem 'devise-bootstrapped', github: 'excid3/devise-bootstrapped', branch: 'bootstrap4'
   gem 'devise_masquerade', '~> 0.6.2'
-  gem 'font-awesome-sass', '~> 5.5', '>= 5.5.0.1'  
+  gem 'font-awesome-sass', '~> 5.5', '>= 5.5.0.1'
   gem 'foreman', '~> 0.84.0'
   gem 'friendly_id', '~> 5.2', '>= 5.2.4'
   gem 'gravatar_image_tag', github: 'mdeering/gravatar_image_tag'