fixed turbolinks/ready issue
This commit is contained in:
@ -15,7 +15,9 @@ function revealPassword($src){
|
||||
$src.removeClass('fa-lock').addClass('fa-unlock');
|
||||
}
|
||||
|
||||
$(function(){
|
||||
// Use this instead of typical $().ready
|
||||
// because turbolinks.
|
||||
document.addEventListener("turbolinks:load", function() {
|
||||
$("[data-id=passwd]").on("ajax:success", "a", function(e, data){
|
||||
getPassword($(e.target).parent(), data.hash);
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
<p id="notice"><%= notice %></p>
|
||||
|
||||
<h1>Accounts</h1>
|
||||
<h1>FTP Accounts</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
|
@ -4,13 +4,16 @@
|
||||
<title>FtpManager</title>
|
||||
<%= csrf_meta_tags %>
|
||||
|
||||
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
||||
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
||||
<%= stylesheet_link_tag('application', media: 'all', 'data-turbolinks-track' => 'reload') %>
|
||||
<%= javascript_include_tag('application', 'data-turbolinks-track' => 'reload') %>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<header>
|
||||
<p>Welcome <%= session[:name] %></p>
|
||||
<p>
|
||||
Welcome <%= session[:name] %>
|
||||
<% #= "(admin)" if session[:admin] == true %>
|
||||
</p>
|
||||
</header>
|
||||
<%= yield %>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user