mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-19 07:08:48 +08:00
Revert "Update turbolinks and fix repository table init [SCI-2251]"
This commit is contained in:
parent
784a4723cc
commit
145f49de2d
9 changed files with 25 additions and 32 deletions
3
Gemfile
3
Gemfile
|
|
@ -30,6 +30,7 @@ gem 'bootstrap3-datetimepicker-rails', '~> 4.15.35'
|
||||||
gem 'bootstrap-select-rails', '~> 1.6.3'
|
gem 'bootstrap-select-rails', '~> 1.6.3'
|
||||||
gem 'uglifier', '>= 1.3.0'
|
gem 'uglifier', '>= 1.3.0'
|
||||||
# jQuery & plugins
|
# jQuery & plugins
|
||||||
|
gem 'jquery-turbolinks'
|
||||||
gem 'jquery-rails'
|
gem 'jquery-rails'
|
||||||
gem 'jquery-ui-rails'
|
gem 'jquery-ui-rails'
|
||||||
gem 'jquery-scrollto-rails',
|
gem 'jquery-scrollto-rails',
|
||||||
|
|
@ -41,7 +42,7 @@ gem 'spinjs-rails'
|
||||||
gem 'autosize-rails' # jQuery autosize plugin
|
gem 'autosize-rails' # jQuery autosize plugin
|
||||||
|
|
||||||
gem 'underscore-rails'
|
gem 'underscore-rails'
|
||||||
gem 'turbolinks', '~> 5.0.1'
|
gem 'turbolinks', '~> 2.0'
|
||||||
gem 'sdoc', '~> 0.4.0', group: :doc
|
gem 'sdoc', '~> 0.4.0', group: :doc
|
||||||
gem 'bcrypt', '~> 3.1.10'
|
gem 'bcrypt', '~> 3.1.10'
|
||||||
gem 'logging', '~> 2.0.0'
|
gem 'logging', '~> 2.0.0'
|
||||||
|
|
|
||||||
16
Gemfile.lock
16
Gemfile.lock
|
|
@ -1,11 +1,10 @@
|
||||||
GIT
|
GIT
|
||||||
remote: https://github.com/biosistemika/canaid
|
remote: https://github.com/biosistemika/canaid
|
||||||
revision: 943ae9b9801819fd2513f6ab9e1143ad8de523ce
|
revision: f2000c19b75e66ea929a44cb0575262b7f5fc13e
|
||||||
branch: master
|
branch: master
|
||||||
specs:
|
specs:
|
||||||
canaid (1.0.2)
|
canaid (1.0.1)
|
||||||
devise (>= 3.4.1)
|
devise (>= 3.4.1)
|
||||||
docile (>= 1.1.0)
|
|
||||||
rails (>= 4)
|
rails (>= 4)
|
||||||
|
|
||||||
GIT
|
GIT
|
||||||
|
|
@ -243,6 +242,9 @@ GEM
|
||||||
rails-dom-testing (>= 1, < 3)
|
rails-dom-testing (>= 1, < 3)
|
||||||
railties (>= 4.2.0)
|
railties (>= 4.2.0)
|
||||||
thor (>= 0.14, < 2.0)
|
thor (>= 0.14, < 2.0)
|
||||||
|
jquery-turbolinks (2.1.0)
|
||||||
|
railties (>= 3.1.0)
|
||||||
|
turbolinks
|
||||||
jquery-ui-rails (6.0.1)
|
jquery-ui-rails (6.0.1)
|
||||||
railties (>= 3.2.16)
|
railties (>= 3.2.16)
|
||||||
js_cookie_rails (2.1.4)
|
js_cookie_rails (2.1.4)
|
||||||
|
|
@ -489,9 +491,8 @@ GEM
|
||||||
tilt (2.0.8)
|
tilt (2.0.8)
|
||||||
tinymce-rails (4.6.7)
|
tinymce-rails (4.6.7)
|
||||||
railties (>= 3.1.1)
|
railties (>= 3.1.1)
|
||||||
turbolinks (5.0.1)
|
turbolinks (2.5.4)
|
||||||
turbolinks-source (~> 5)
|
coffee-rails
|
||||||
turbolinks-source (5.1.0)
|
|
||||||
tzinfo (1.2.4)
|
tzinfo (1.2.4)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
uglifier (4.1.4)
|
uglifier (4.1.4)
|
||||||
|
|
@ -561,6 +562,7 @@ DEPENDENCIES
|
||||||
jbuilder
|
jbuilder
|
||||||
jquery-rails
|
jquery-rails
|
||||||
jquery-scrollto-rails!
|
jquery-scrollto-rails!
|
||||||
|
jquery-turbolinks
|
||||||
jquery-ui-rails
|
jquery-ui-rails
|
||||||
js_cookie_rails
|
js_cookie_rails
|
||||||
json_matchers
|
json_matchers
|
||||||
|
|
@ -607,7 +609,7 @@ DEPENDENCIES
|
||||||
spinjs-rails
|
spinjs-rails
|
||||||
starscope
|
starscope
|
||||||
tinymce-rails (~> 4.6.4)
|
tinymce-rails (~> 4.6.4)
|
||||||
turbolinks (~> 5.0.1)
|
turbolinks (~> 2.0)
|
||||||
tzinfo-data
|
tzinfo-data
|
||||||
uglifier (>= 1.3.0)
|
uglifier (>= 1.3.0)
|
||||||
underscore-rails
|
underscore-rails
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
|
// jquery.turbolinks MUST IMMEDIATELY FOLLOW jquery inclusion
|
||||||
// turbolinks MUST BE THE LAST inclusion
|
// turbolinks MUST BE THE LAST inclusion
|
||||||
//= require jquery
|
//= require jquery
|
||||||
|
//= require jquery.turbolinks
|
||||||
//= require jquery_ujs
|
//= require jquery_ujs
|
||||||
//= require jquery.remotipart
|
//= require jquery.remotipart
|
||||||
//= require jquery.mousewheel.min
|
//= require jquery.mousewheel.min
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// initialze repository datatable
|
// initialze repository datatable
|
||||||
RepositoryDatatable.destroy();
|
$(document).ready(function() {
|
||||||
|
RepositoryDatatable.destroy()
|
||||||
RepositoryDatatable.init($('#content').attr('data-repo-id'));
|
RepositoryDatatable.init($('#content').attr('data-repo-id'));
|
||||||
onClickToggleAssignedRecords();
|
onClickToggleAssignedRecords();
|
||||||
|
});
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ var RepositoryDatatable = (function(global) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var TABLE_ID = '';
|
var TABLE_ID = '';
|
||||||
var TABLE;
|
var TABLE = {};
|
||||||
|
|
||||||
// Extend datatables API with searchable options
|
// Extend datatables API with searchable options
|
||||||
// (http://stackoverflow.com/questions/39912395/datatables-dynamically-set-columns-searchable)
|
// (http://stackoverflow.com/questions/39912395/datatables-dynamically-set-columns-searchable)
|
||||||
|
|
@ -1405,10 +1405,7 @@ var RepositoryDatatable = (function(global) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function destroy() {
|
function destroy() {
|
||||||
if (TABLE !== null) {
|
TABLE = {};
|
||||||
TABLE.destroy();
|
|
||||||
TABLE = null;
|
|
||||||
}
|
|
||||||
TABLE_ID = '';
|
TABLE_ID = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,10 +13,6 @@
|
||||||
<%= favicon_link_tag "favicon-48.png", type: "image/png", size: "48x48" %>
|
<%= favicon_link_tag "favicon-48.png", type: "image/png", size: "48x48" %>
|
||||||
|
|
||||||
<%= csrf_meta_tags %>
|
<%= csrf_meta_tags %>
|
||||||
|
|
||||||
<% if content_for?(:head) %>
|
|
||||||
<%= yield(:head) %>
|
|
||||||
<% end %>
|
|
||||||
</head>
|
</head>
|
||||||
<body
|
<body
|
||||||
class="<%= yield :body_class %>"
|
class="<%= yield :body_class %>"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,3 @@
|
||||||
<% content_for :head do %>
|
|
||||||
<meta name="turbolinks-cache-control" content="no-cache">
|
|
||||||
<% end %>
|
|
||||||
<% provide(:head_title, t("my_modules.repository.head_title",
|
<% provide(:head_title, t("my_modules.repository.head_title",
|
||||||
project: h(@project.name),
|
project: h(@project.name),
|
||||||
module: h(@my_module.name),
|
module: h(@my_module.name),
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,3 @@
|
||||||
<% content_for :head do %>
|
|
||||||
<meta name="turbolinks-cache-control" content="no-cache">
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<% provide(:head_title, t("repositories.index.head_title")) %>
|
<% provide(:head_title, t("repositories.index.head_title")) %>
|
||||||
|
|
||||||
<% if current_team %>
|
<% if current_team %>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
<%= form_for(resource,
|
<%= form_for(resource,
|
||||||
as: resource_name,
|
as: resource_name,
|
||||||
url: registration_path(resource_name),
|
url: registration_path(resource_name),
|
||||||
html: { method: :put, "data-for" => "avatar", 'data-turbolinks' => false, id: 'user-avatar-field' }) do |f| %>
|
html: { method: :put, "data-for" => "avatar", id: 'user-avatar-field' }) do |f| %>
|
||||||
<%= hidden_field_tag "user[change_avatar]", "true" %>
|
<%= hidden_field_tag "user[change_avatar]", "true" %>
|
||||||
<div data-part="view">
|
<div data-part="view">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
@ -60,7 +60,7 @@
|
||||||
as: resource_name,
|
as: resource_name,
|
||||||
url: registration_path(resource_name, format: :json),
|
url: registration_path(resource_name, format: :json),
|
||||||
remote: true,
|
remote: true,
|
||||||
html: { method: :put, "data-for" => "full_name", 'data-turbolinks' => false, class: 'settings-page-full-name', id: 'user-full_name-field' }) do |f| %>
|
html: { method: :put, "data-for" => "full_name", class: 'settings-page-full-name', id: 'user-full_name-field' }) do |f| %>
|
||||||
<div data-part="view">
|
<div data-part="view">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.label t("users.registrations.edit.name_label") %>
|
<%= f.label t("users.registrations.edit.name_label") %>
|
||||||
|
|
@ -91,7 +91,7 @@
|
||||||
as: resource_name,
|
as: resource_name,
|
||||||
url: registration_path(resource_name, format: :json),
|
url: registration_path(resource_name, format: :json),
|
||||||
remote: true,
|
remote: true,
|
||||||
html: { method: :put, "data-for" => "initials", 'data-turbolinks' => false, class: 'settings-page-initials', id: 'user-initials-field' }) do |f| %>
|
html: { method: :put, "data-for" => "initials", class: 'settings-page-initials', id: 'user-initials-field' }) do |f| %>
|
||||||
<div data-part="view">
|
<div data-part="view">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.label t("users.registrations.edit.initials_label") %>
|
<%= f.label t("users.registrations.edit.initials_label") %>
|
||||||
|
|
@ -122,7 +122,7 @@
|
||||||
as: resource_name,
|
as: resource_name,
|
||||||
url: registration_path(resource_name, format: :json),
|
url: registration_path(resource_name, format: :json),
|
||||||
remote: true,
|
remote: true,
|
||||||
html: { method: :put, "data-for" => "email", 'data-turbolinks' => false, class: 'settings-page-email', id: 'user-email-field' }) do |f| %>
|
html: { method: :put, "data-for" => "email", class: 'settings-page-email', id: 'user-email-field' }) do |f| %>
|
||||||
<div data-part="view">
|
<div data-part="view">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<%= f.label t("users.registrations.edit.email_label") %>
|
<%= f.label t("users.registrations.edit.email_label") %>
|
||||||
|
|
@ -163,7 +163,7 @@
|
||||||
as: resource_name,
|
as: resource_name,
|
||||||
url: registration_path(resource_name, format: :json),
|
url: registration_path(resource_name, format: :json),
|
||||||
remote: true,
|
remote: true,
|
||||||
html: { method: :put, "data-for" => "password", 'data-turbolinks' => false, class: 'settings-page-change-password', id: 'user-password-field' }) do |f| %>
|
html: { method: :put, "data-for" => "password", class: 'settings-page-change-password', id: 'user-password-field' }) do |f| %>
|
||||||
<%= hidden_field_tag "user[change_password]", "true" %>
|
<%= hidden_field_tag "user[change_password]", "true" %>
|
||||||
<div data-part="view">
|
<div data-part="view">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue