wco_models 3.1.0.138 → 3.1.0.140

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3e838e33a3e54f52b163f095b863a44012af2ec7513051ac26fe82c3e4f3c37
4
- data.tar.gz: 1d7c48e6a9436c5ac3bf025e0f7141d22ce8c1a4ba277106f98b71d7dba297b5
3
+ metadata.gz: aa9e988a7e44625ce410a082ccf9055608a690320c5d2e5d4fe86a3d95284a5d
4
+ data.tar.gz: ab13367e43002f64bac72f54c668a2dfcbcc9296359c651273c6c0c8fd645564
5
5
  SHA512:
6
- metadata.gz: d03a59c7062ca8a790cbadbafafb24222031ed8be426241a591b17c1efc5e3b36fe23487bccd13b12da7641ae79b694f6cea56ca28ddb597e6d7903b0f3d9710
7
- data.tar.gz: 73fd509ce62de787ff5134a9ff541a7c97e3ade7dcc5a77147280ac0e56c1be176ef1dd05f4668dad7f266d28380cb088a2d2da31b1956f8754576b3f9995306
6
+ metadata.gz: 24ee85d5971e231eb4607794fe7d75d7f1780f310bbfc15e6e0888888edc88dcdf0b593cf4d6dfdc461e5ed845c6bd27bbd5042127fa6a1c4202b11e28d5d61f
7
+ data.tar.gz: effca0d00789c5649feed0ac7e3313adab6e0f904cd167eb42916e3417c2e87e5814f0e199c2f88433c6851e86a7561d7ab95052bdb7f67f8dd54305427666f9
@@ -63,6 +63,25 @@ if ($(".tinymce").length > 0) {
63
63
  $(".tinymce").summernote()
64
64
  }
65
65
 
66
+ /*
67
+ * select_all
68
+ * _vp_ 2023-02-28
69
+ **/
70
+ $("input[type='checkbox'].i-sel").change((ev) => {
71
+ $( $(".n-selected")[0] ).html( $("input[type='checkbox'].i-sel:checked").length )
72
+ })
73
+ $("input#select_all[type='checkbox']").change((e) => {
74
+ const count = $("input[type='checkbox'].i-sel:checked").length
75
+ const new_state = count ? false : true // all will be checked?
76
+
77
+ $(".select-all input[type='checkbox']").prop('checked', new_state)
78
+
79
+ $( $("input[type='checkbox'].i-sel") ).each( i => {
80
+ $( $("input[type='checkbox'].i-sel")[i] ).prop('checked', new_state)
81
+ })
82
+
83
+ $( $(".n-selected")[0] ).html( $("input[type='checkbox'].i-sel:checked").length )
84
+ })
66
85
 
67
86
 
68
87
 
@@ -0,0 +1,5 @@
1
+
2
+ .d-flex
3
+ .label Select All
4
+ = check_box_tag :select_all
5
+ .n-selected -
@@ -28,25 +28,27 @@
28
28
  - if galleries.respond_to? :total_pages
29
29
  = paginate galleries, :param_name => :galleries_page, :views_prefix => 'wco'
30
30
 
31
- .row
32
- - galleries.each do |g|
33
- .col-sm-12.col-md-6
34
- .Card
35
- %h5
36
- = check_box_tag 'gallery_ids[]', g.id
37
- = link_to '[~]', edit_gallery_path( g )
38
- = link_to g.name, gallery_path(g.slug)
39
- (#{g.photos.length})
40
- = render 'meta', item: g
41
- - if g.photos.length == 0
42
- No Photos
43
- - else
44
- .d-flex.flex-wrap.photos-thumbs
45
- - g.photos.limit( @current_profile.show_n_thumbs ).each do |photo|
46
- = link_to image_tag(photo.photo.url(:thumb), :alt => ''), gallery_path(g.slug)
47
-
48
- - if galleries.respond_to? :total_pages
49
- = paginate galleries, :param_name => :galleries_page, :views_prefix => 'wco'
31
+ = render '/wco/select_all'
32
+
33
+ .row
34
+ - galleries.each do |g|
35
+ .col-sm-12.col-md-6
36
+ .Card
37
+ %h5
38
+ = check_box_tag 'gallery_ids[]', g.id, nil, { class: 'i-sel' }
39
+ = link_to '[~]', edit_gallery_path( g )
40
+ = link_to g.name, gallery_path(g.slug)
41
+ (#{g.photos.length})
42
+ = render 'meta', item: g
43
+ - if g.photos.length == 0
44
+ No Photos
45
+ - else
46
+ .d-flex.flex-wrap.photos-thumbs
47
+ - g.photos.limit( @current_profile.show_n_thumbs ).each do |photo|
48
+ = link_to image_tag(photo.photo.url(:thumb), :alt => ''), gallery_path(g.slug)
49
+
50
+ - if galleries.respond_to? :total_pages
51
+ = paginate galleries, :param_name => :galleries_page, :views_prefix => 'wco'
50
52
 
51
53
  - else
52
54
  .p No Galleries
@@ -4,7 +4,7 @@
4
4
  %h5 Tag `#{@tag.slug}`
5
5
 
6
6
  %ul
7
- - if wco_email
7
+ - if defined? wco_email
8
8
  %li.d-flex
9
9
  <b>Conversations (#{@tag.conversations.length}):&nbsp;</b>
10
10
  - if @tag.conversations.present?
@@ -3,9 +3,7 @@
3
3
  %table.bordered.data-table
4
4
  %thead
5
5
  %th.select-all.nosort
6
- .a
7
- = check_box_tag :select_all
8
- .n-selected -
6
+ = render '/wco/select_all'
9
7
  %th.leads leads
10
8
  %th.subject subject, preview
11
9
  %th.tags Tags
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.138
4
+ version: 3.1.0.140
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
@@ -482,6 +482,7 @@ files:
482
482
  - app/views/wco/_main_header.haml
483
483
  - app/views/wco/_paginate.haml
484
484
  - app/views/wco/_search.haml
485
+ - app/views/wco/_select_all.haml
485
486
  - app/views/wco/api/leads/index_hash.jbuilder
486
487
  - app/views/wco/application/_auth_widget.haml
487
488
  - app/views/wco/application/_debug.haml