update gems and add sortable func

This commit is contained in:
Zoker 2019-01-19 20:12:36 +08:00
parent 8a3d991612
commit 15e09a0e69
6 changed files with 134 additions and 105 deletions

View File

@ -38,59 +38,59 @@ GEM
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
annotate (2.7.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
annotate (2.7.2)
activerecord (>= 3.2, < 6.0)
rake (>= 10.4, < 12.0)
rake (>= 10.4, < 13.0)
arel (7.1.4)
bcrypt (3.1.11)
binding_of_caller (0.7.2)
binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1)
builder (3.2.2)
byebug (9.0.6)
coderay (1.1.1)
coffee-rails (4.2.1)
builder (3.2.3)
byebug (10.0.0)
coderay (1.1.2)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.2.x)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
concurrent-ruby (1.0.2)
database_cleaner (1.5.3)
debug_inspector (0.0.2)
devise (4.2.0)
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5)
crass (1.0.3)
database_cleaner (1.6.2)
debug_inspector (0.0.3)
devise (4.4.1)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 5.1)
railties (>= 4.1.0, < 5.2)
responders
warden (~> 1.2.3)
diff-lcs (1.2.5)
diff-lcs (1.3)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
erubis (2.7.0)
eventmachine (1.2.0.1)
eventmachine (1.2.5)
execjs (2.7.0)
factory_girl (4.7.0)
factory_girl (4.9.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.7.0)
factory_girl (~> 4.7.0)
factory_girl_rails (4.9.0)
factory_girl (~> 4.9.0)
railties (>= 3.0.0)
ffi (1.9.14)
ffi (1.9.21)
formatador (0.2.5)
globalid (0.3.7)
activesupport (>= 4.1.0)
gon (6.1.0)
globalid (0.4.1)
activesupport (>= 4.2.0)
gon (6.2.0)
actionpack (>= 3.0)
json
multi_json
request_store (>= 1.0)
guard (2.14.0)
guard (2.14.2)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (~> 1.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
@ -102,67 +102,66 @@ GEM
guard (~> 2.8)
guard-compat (~> 1.0)
multi_json (~> 1.8)
haml (4.0.7)
haml (5.0.4)
temple (>= 0.8.0)
tilt
haml-rails (0.9.0)
haml-rails (1.0.0)
actionpack (>= 4.0.1)
activesupport (>= 4.0.1)
haml (>= 4.0.6, < 5.0)
haml (>= 4.0.6, < 6.0)
html2haml (>= 1.0.1)
railties (>= 4.0.1)
html2haml (2.0.0)
html2haml (2.2.0)
erubis (~> 2.7.0)
haml (~> 4.0.0)
nokogiri (~> 1.6.0)
haml (>= 4.0, < 6)
nokogiri (>= 1.6.0)
ruby_parser (~> 3.5)
http_parser.rb (0.6.0)
i18n (0.7.0)
jbuilder (2.6.0)
activesupport (>= 3.0.0, < 5.1)
multi_json (~> 1.2)
jquery-rails (4.2.1)
i18n (0.9.3)
concurrent-ruby (~> 1.0)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
jquery-rails (4.3.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.0.2)
launchy (2.4.3)
addressable (~> 2.3)
letter_opener (1.4.1)
letter_opener (1.6.0)
launchy (~> 2.2)
libv8 (3.16.14.15)
libv8 (3.16.14.19)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.0.3)
loofah (2.1.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.0.10)
mail (2.6.4)
mime-types (>= 1.16, < 4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.9.1)
multi_json (1.12.1)
mysql2 (0.4.5)
lumberjack (1.0.12)
mail (2.7.0)
mini_mime (>= 0.1.1)
method_source (0.9.0)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.11.3)
multi_json (1.13.1)
mysql2 (0.4.10)
nenv (0.3.0)
nio4r (1.2.1)
nokogiri (1.6.8.1)
mini_portile2 (~> 2.1.0)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
notiffany (0.1.1)
nenv (~> 0.1)
shellany (~> 0.0)
orm_adapter (0.5.0)
pry (0.10.4)
pry (0.11.3)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
public_suffix (2.0.4)
puma (3.6.0)
rack (2.0.1)
rack-mini-profiler (0.10.1)
method_source (~> 0.9.0)
public_suffix (3.0.1)
puma (3.11.2)
rack (2.0.4)
rack-mini-profiler (0.10.7)
rack (>= 1.2.0)
rack-test (0.6.3)
rack (>= 1.0)
@ -178,9 +177,9 @@ GEM
bundler (>= 1.3.0, < 2.0)
railties (= 5.0.0)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.1)
activesupport (>= 4.2.0, < 6.0)
nokogiri (~> 1.6.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (5.0.0)
@ -189,73 +188,79 @@ GEM
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (11.3.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
rake (12.3.0)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
ref (2.0.0)
request_store (1.3.1)
responders (2.3.0)
railties (>= 4.2.0, < 5.1)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
request_store (1.4.0)
rack (>= 1.4)
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
rspec-core (3.7.1)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-rails (3.5.2)
rspec-support (~> 3.7.0)
rspec-rails (3.7.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.1)
ruby_dep (1.5.0)
ruby_parser (3.8.3)
sexp_processor (~> 4.1)
sass (3.4.22)
sass-rails (5.0.6)
ruby_parser (3.10.1)
sexp_processor (~> 4.9)
sass (3.5.5)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.0.7)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sexp_processor (4.7.0)
sexp_processor (4.10.0)
shellany (0.0.1)
slop (3.6.0)
spring (2.0.0)
spring (2.0.2)
activesupport (>= 4.2)
sprockets (3.7.0)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
temple (0.8.0)
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.5)
tzinfo (1.2.2)
thor (0.20.0)
thread_safe (0.3.6)
tilt (2.0.8)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (3.0.3)
uglifier (4.1.5)
execjs (>= 0.3.0, < 3)
warden (1.2.6)
warden (1.2.7)
rack (>= 1.0)
web-console (2.3.0)
activemodel (>= 4.0)
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
websocket-driver (0.6.4)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
websocket-extensions (0.1.3)
PLATFORMS
ruby

File diff suppressed because one or more lines are too long

View File

@ -17,6 +17,7 @@
//= require bootstrap-notify.min
//= require vue.min
//= require vue-resource.min
//= require Sortable.min
//= require plans
//= require lists
//= require tasks

View File

@ -2,6 +2,7 @@
.row#plans-list
%template{'v-for' => 'plan in filterData'}
.col-md-3
%span.hidden.plan-sort{':sort' => 'plan.id'}
%a{':href' => 'plan.path'}
.bs-callout{':class' => 'plan.color_tag_class'}
%h4
@ -103,3 +104,8 @@
}
}
})
var el = document.getElementById('plans-list');
Sortable.create(el, {
handle: '.bs-callout',
animation: 150
});

View File

@ -1,5 +1,5 @@
json.array!(@plans) do |plan|
json.extract! plan, :title, :description, :color_tag
json.extract! plan, :title, :description, :color_tag, :id
json.color_tag_class color_tag_class('bs-callout-', plan.color_tag)
json.path plan_path(plan)
end

View File

@ -126,6 +126,21 @@
var data = this.plan.lists
var filterArray = []
var filterStr = this.colorFilter
this.$nextTick(function () {
var el = document.getElementById('list-content');
Sortable.create(el, {
handle: '.panel-heading',
animation: 150
});
var task = $('.panel-body');
$(task).each(function (i,e) {
Sortable.create(e, {
animation: 150,
handle: '.task-field',
group: 'tasks'
});
})
})
if ( filterStr == ''){
return data
}else{