ds_media_library 0.3.1 → 0.4.0

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
  SHA1:
3
- metadata.gz: 0c61d33577a94f56900e2456819ce1d5e9c5cde6
4
- data.tar.gz: cd2eba1a46f9ab6f431ed0f9fa77c3beec1e017b
3
+ metadata.gz: 08e8e9c3cc846e24f62ccbcbe842e73097651869
4
+ data.tar.gz: cf45e915c6f8919887bb2b9e48f7afb717e8a0cf
5
5
  SHA512:
6
- metadata.gz: 59e8332e25dfcd2f178782b51befd0bbe472a4dbd84a6155cfc367f3a17e9e6c635719ee94dd58aff3c23483cb799de76d9dac2e3c1510c399f6acee07fcfb4d
7
- data.tar.gz: 172c4263ef43a512ee448bbcc885811db0a3e15c85a077e3f062d9606095c2e009d5c8edb8b5ef046888a6773a4bb39c89ff96b2acb4f9e5783cbf681fbece50
6
+ metadata.gz: 25ed42f1e044501f68aaad34d25f23011124639cacb3179d14be350f0dce6e18abbb0d622da0adc888491b8fe907d41ae808578c6f7b2fcb3bbb787aed6bc9fc
7
+ data.tar.gz: 2df9907a4b0fa46de097ddb69d4fa7a3a17016ea4178b811c59e7d75727282bc4a201c026c0bb8e41e28f3d05107d26046b18bda5024ec1b1c4710bf9716bcff
@@ -81,8 +81,11 @@ $ ->
81
81
  $tree.find(folderSelector).prop checked: true
82
82
 
83
83
  $tree.find(resourceSelector).each ->
84
- labelText = $(this).find("label").text().toLowerCase()
85
- isFound = labelText.indexOf(term) != -1
84
+ searchText = $(this).attr("data-dsml-search-text").toLowerCase()
85
+ isFound = searchText.indexOf(term) != -1
86
+ console.log searchText
87
+ console.log term
88
+ console.log isFound
86
89
  $(this).toggle isFound
87
90
 
88
91
  $tree.find(folderSelector).each ->
@@ -1,4 +1,4 @@
1
- li.dsml-resource class=("hidden" if resource.hidden?)
1
+ li.dsml-resource class=("hidden" if resource.hidden?) data-dsml-search-text=resource.original_file_name
2
2
  .dsml-media-container
3
3
  label.dsml-expand-label
4
4
  input.dsml-modal-input.media-choice name="ds_media_library" type=helper.field_type value=resource.id checked=helper.ids.include?(resource.id) data=resource.attributes
@@ -1,4 +1,4 @@
1
- li.dsml-resource class=("hidden" if resource.hidden?)
1
+ li.dsml-resource class=("hidden" if resource.hidden?) data-dsml-search-text=resource.original_file_name
2
2
  .dsml-media-container
3
3
  input.dsml-move-input type="checkbox" name="resource_ids[]" id="media-#{resource.id}" value=resource.id
4
4
  label.dsml-expand-label for="media-#{resource.id}"
@@ -1,3 +1,3 @@
1
1
  module DSMediaLibrary
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ds_media_library
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel