mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-08 22:24:23 +08:00
Fix migration issues
This commit is contained in:
parent
aa2dab2014
commit
7d60eb5572
7 changed files with 30 additions and 64 deletions
|
@ -273,7 +273,8 @@ function initTagsSelector() {
|
|||
colorField: 'color',
|
||||
closeOnSelect: true,
|
||||
dynamicCreation: true,
|
||||
dynamicCreationDelimiter: ','
|
||||
dynamicCreationDelimiter: ',',
|
||||
withoutArrow: true
|
||||
}).on('select2:select', (e) => {
|
||||
var params = e.params.data;
|
||||
var newTag = null;
|
||||
|
|
|
@ -11,7 +11,7 @@ $.fn.extend({
|
|||
if (this.next().find('.select2-selection').length > 0) return this;
|
||||
templateSelection = (state, parent) => {
|
||||
if (config.colorField !== undefined) {
|
||||
parent.css('background',state[config.colorField] || state.element.dataset[config.colorField])
|
||||
parent.css('background', state[config.colorField] || state.element.dataset[config.colorField]);
|
||||
}
|
||||
return $('<span class="select2-block-body" data-select-id="' + state.id + '">'
|
||||
+ (config.customSelection !== undefined ? config.customSelection(state) : state.text)
|
||||
|
@ -42,7 +42,9 @@ $.fn.extend({
|
|||
|
||||
// Placeholder fix for ajax fields
|
||||
if (config.ajax) {
|
||||
select2.next().find('.select2-search__field').css('width', 'auto');
|
||||
setTimeout(() => {
|
||||
select2.next().find('.select2-search__field').css('width', 'auto');
|
||||
}, 0);
|
||||
}
|
||||
|
||||
// Check that group select correctly
|
||||
|
@ -152,18 +154,18 @@ $.fn.extend({
|
|||
|
||||
|
||||
// unlimited size
|
||||
var select2 = this.select2({
|
||||
select2 = this.select2({
|
||||
closeOnSelect: config.closeOnSelect || false,
|
||||
multiple: true,
|
||||
ajax: config.ajax,
|
||||
templateSelection: templateSelection,
|
||||
tags: config.dynamicCreation || true,
|
||||
tokenSeparators: config.dynamicCreationDelimiter || [',', ' '],
|
||||
tokenSeparators: config.dynamicCreationDelimiter || [',', ' ']
|
||||
});
|
||||
// Add dynamic size
|
||||
// Add dynamic size
|
||||
select2.next().css('width', '100%');
|
||||
|
||||
// unlimited size
|
||||
// unlimited size
|
||||
if (config.unlimitedSize) {
|
||||
this[0].dataset.unlimitedSize = true;
|
||||
select2.next().find('.select2-selection').css('max-height', 'none');
|
||||
|
@ -171,9 +173,10 @@ $.fn.extend({
|
|||
}
|
||||
|
||||
// Create arrow
|
||||
$('<div class="select2-arrow"><span class="caret"></span></div>').appendTo(select2.next())
|
||||
.click(() => select2.next().find('.select2-selection').click());
|
||||
|
||||
if (!(config.withoutArrow)) {
|
||||
$('<div class="select2-arrow"><span class="caret"></span></div>').appendTo(select2.next())
|
||||
.click(() => select2.next().find('.select2-selection').click());
|
||||
}
|
||||
// select all check
|
||||
this[0].dataset.singleDisplay = config.singleDisplay || false;
|
||||
if (this[0].dataset.selectAll === 'true') {
|
||||
|
|
|
@ -193,6 +193,21 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.select2-container--disabled{
|
||||
cursor:pointer;
|
||||
.select2-selection{
|
||||
border:1px solid transparent;
|
||||
background: transparent;
|
||||
cursor:pointer;
|
||||
&:hover{
|
||||
border:1px solid $color-gainsboro;
|
||||
}
|
||||
.select2-selection__choice {
|
||||
cursor:pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
|
@ -224,19 +239,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.select2-container--disabled{
|
||||
cursor:pointer;
|
||||
.select2-selection{
|
||||
border:1px solid transparent;
|
||||
background: transparent;
|
||||
cursor:pointer;
|
||||
&:hover{
|
||||
border:1px solid $color-gainsboro;
|
||||
}
|
||||
.select2-selection__choice {
|
||||
cursor:pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -170,6 +170,7 @@ class MyModulesController < ApplicationController
|
|||
if saved
|
||||
if description_changed
|
||||
log_activity(:change_module_description)
|
||||
TinyMceAsset.update_images(@my_module, params[:tiny_mce_images])
|
||||
end
|
||||
|
||||
if due_date_changes
|
||||
|
@ -187,9 +188,6 @@ class MyModulesController < ApplicationController
|
|||
# rubocop:enable Metrics/BlockNesting
|
||||
log_activity(type_of, @my_module, message_items)
|
||||
end
|
||||
|
||||
if saved and description_changed then
|
||||
TinyMceAsset.update_images(@my_module, params[:tiny_mce_images])
|
||||
end
|
||||
end
|
||||
respond_to do |format|
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'zip'
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
<<<<<<< HEAD
|
||||
<% provide :head_title, t('nav.label.activities') %>
|
||||
|
||||
<div class="global-activities-container container-flex">
|
||||
|
@ -37,36 +36,3 @@
|
|||
</script>
|
||||
<%= javascript_include_tag 'global_activities/index.js' %>
|
||||
<%= javascript_include_tag 'global_activities/side_pane.js' %>
|
||||
=======
|
||||
<div class="global-activities__container">
|
||||
<br>
|
||||
<div class="global-activities__top">
|
||||
<h2 class="global-activiteis__title">Global activities</h2>
|
||||
</div>
|
||||
|
||||
<div class="global-activities__main">
|
||||
<div class="global-activities__top-actions">
|
||||
<span><i class="fas fa-caret-square-down"></i> Expand All</span>
|
||||
|
||||
<span><i class="fas fa-caret-square-up"></i> Colapse All</span>
|
||||
</div>
|
||||
<div class="global-activities__search-container">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" placeholder="Search..." aria-describedby="basic-addon1">
|
||||
<span class="input-group-addon" id="basic-addon1">
|
||||
<i class="fas fa-search"></i>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="global-activities_activities-list">
|
||||
<h2>list of activities</h2>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="global-activities__side">
|
||||
<%= render "team_selection" %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
>>>>>>> features/note-section
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
|
||||
ActiveRecord::Schema.define(version: 20190410110605) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
|
|
Loading…
Add table
Reference in a new issue