rails_admin_image_manager 0.1.30 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5b4ff73b9cf6a919fa9f32ed9cff0ddb797b1674
4
- data.tar.gz: 6a0401d13546ae486b919de4ce176ea73e7053bc
3
+ metadata.gz: ee9129acf1a19b6210466f93a1ce96ee1900ef41
4
+ data.tar.gz: 74e5bb07383cbbf41c2fae75df13e703c71535cd
5
5
  SHA512:
6
- metadata.gz: 94ba5dcd1c5dccd3f9255f7ba48163a9e5ddc6bc101e63cfa95112a5a8cdf06a39139a8496dda16d5b218e3a1b7cef22ff9a276747b93271cc7d8143a7a7e29b
7
- data.tar.gz: ed621c7946fbe0fc3609b1383ad3f668c647261ceace74fcb75ec596886a446229f77b2eb89d97bb08f378e38f03ae7238738193cc30ff7c76ffd954c5c78851
6
+ metadata.gz: 4a82ac7d16520a43e1633e2e57cbb5e17888eded35a27af6e44ee9f6e4fb482f3e7962ab9aa9a5f3e5b28726c0902eff08d8994ad5ebae59840bf6d1d88e6182
7
+ data.tar.gz: aafc2847d725f1d3f3ef8232da360dac0df055fc77f12b219077a3699008bea14e8e23ed407722a416d6089b01a99816129f9e66930fbfdd9b328bbf7b6ab51c
@@ -16107,7 +16107,7 @@
16107
16107
 
16108
16108
 
16109
16109
  // module
16110
- exports.push([module.id, "\n.search-autocomplete__selected-tag {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n margin: 3px;\n position: relative;\n cursor: pointer;\n}\n.search-autocomplete__selected-tag:first-of-type {\n margin-left: 0;\n}\n.search-autocomplete__input {\n position: relative;\n}\n.search-autocomplete {\n width: 100%;\n position: relative;\n}\n.search-autocomplete__tags-list {\n position: absolute;\n top: 100%;\n width: 100%;\n z-index: 100;\n background-color: white;\n box-shadow: 0 5px 8px rgba(0, 0, 0, 0.1);\n}\n.search-autocomplete__tag {\n display: block;\n padding: 5px;\n transition: all 200ms linear;\n cursor: pointer;\n}\n.search-autocomplete__tag:hover {\n background-color: #ededed;\n}\n.search-autocomplete__tag.active {\n background-color: #5c90d2;\n color: white;\n}\n", ""]);
16110
+ exports.push([module.id, "\n.search-autocomplete__selected-tag {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n margin: 3px;\n position: relative;\n cursor: pointer;\n font-size: 14px;\n padding-right: 14px;\n}\n.search-autocomplete__selected-tag:first-of-type {\n margin-left: 0;\n}\n.search-autocomplete__selected-tag i {\n font-size: 10px;\n position: absolute;\n top: 1px;\n right: 2px;\n}\n.search-autocomplete__input {\n position: relative;\n}\n.search-autocomplete {\n width: 100%;\n position: relative;\n}\n.search-autocomplete__tags-list {\n position: absolute;\n top: 100%;\n width: 100%;\n z-index: 100;\n background-color: white;\n box-shadow: 0 5px 8px rgba(0, 0, 0, 0.1);\n}\n.search-autocomplete__tag {\n display: block;\n padding: 5px;\n transition: all 200ms linear;\n cursor: pointer;\n}\n.search-autocomplete__tag:hover {\n background-color: #ededed;\n}\n.search-autocomplete__tag.active {\n background-color: #5c90d2;\n color: white;\n}\n.search-autocomplete__tag small {\n color: #c9c9c9;\n font-size: 11px;\n}\n.search-autocomplete__searched-term {\n display: block;\n margin-top: 10px;\n font-size: 12px;\n}\n.search-autocomplete__searched-term strong {\n font-size: 14px;\n position: relative;\n font-weight: bold;\n padding-left: 10px;\n padding-right: 14px;\n display: inline-block;\n}\n.search-autocomplete__clear-search {\n color: #5c90d2;\n display: block;\n cursor: pointer;\n outline: none;\n background: transparent;\n border: none;\n padding: 0;\n}\n", ""]);
16111
16111
 
16112
16112
  // exports
16113
16113
 
@@ -16135,6 +16135,12 @@
16135
16135
  //
16136
16136
  //
16137
16137
  //
16138
+ //
16139
+ //
16140
+ //
16141
+ //
16142
+ //
16143
+ //
16138
16144
 
16139
16145
  var _vuex = __webpack_require__(44);
16140
16146
 
@@ -16149,7 +16155,8 @@
16149
16155
  return {
16150
16156
  query: '',
16151
16157
  fuseSearch: null,
16152
- selectedTagIndex: -1
16158
+ selectedTagIndex: -1,
16159
+ searchedTerm: ''
16153
16160
  };
16154
16161
  },
16155
16162
 
@@ -16174,18 +16181,20 @@
16174
16181
  } else if (e.key == 'Enter' && this.selectedTagIndex >= 0) {
16175
16182
  this.selectTag();
16176
16183
  } else if (e.key == 'Enter') {
16177
- this.$store.dispatch('mediasStore/setSearchQuery', this.query);
16184
+ this.searchedTerm = this.query;
16185
+ this.$store.dispatch('mediasStore/setSearchQuery', this.searchedTerm);
16178
16186
  this.$store.dispatch('mediasStore/clearImgListing');
16179
16187
  this.$store.dispatch('mediasStore/setSearchPage', 1);
16180
16188
  this.$store.dispatch('mediasStore/fetchImage');
16181
- console.log('search');
16182
16189
  this.query = "";
16183
- } else if ((e.key == 'Backspace' || e.key == 'Meta') && this.query == '' && this.activeFilters.search != '') {
16190
+ } else if ((e.key == 'Backspace' || e.key == 'Meta') && this.searchedTerm == '' && this.activeFilters.search != '') {
16184
16191
  this.clearSearch();
16185
16192
  }
16186
16193
  },
16187
16194
  clearSearch: function clearSearch() {
16195
+ this.searchedTerm = '';
16188
16196
  this.$store.dispatch('mediasStore/setSearchQuery', '');
16197
+ this.$store.dispatch('mediasStore/setSearchPage', 1);
16189
16198
  this.$store.dispatch('mediasStore/clearImgListing');
16190
16199
  this.$store.dispatch('mediasStore/fetchImage');
16191
16200
  },
@@ -16201,7 +16210,6 @@
16201
16210
  var queryArray = query.split(' ').reverse();
16202
16211
  queryArray[0] = this.filteredTags[this.selectedTagIndex].name;
16203
16212
  var newQuery = queryArray.reverse().join(' ');
16204
- this.$store.dispatch('mediasStore/setSearchQuery', '');
16205
16213
  this.$store.dispatch('mediasStore/setSearchPage', 1);
16206
16214
  this.$store.dispatch('mediasStore/clearImgListing');
16207
16215
  this.$store.dispatch('mediasStore/addToTagFilter', this.filteredTags[this.selectedTagIndex].id);
@@ -16211,6 +16219,7 @@
16211
16219
  },
16212
16220
  deselectTag: function deselectTag(id) {
16213
16221
  this.$store.dispatch('mediasStore/clearImgListing');
16222
+ this.$store.dispatch('mediasStore/setSearchPage', 1);
16214
16223
  this.$store.dispatch('mediasStore/removeFromTagFilter', id);
16215
16224
  this.$store.dispatch('mediasStore/fetchImage');
16216
16225
  },
@@ -16614,7 +16623,7 @@
16614
16623
  _vm.selectTag()
16615
16624
  }
16616
16625
  }
16617
- }, [_vm._v(_vm._s(tag.name))])
16626
+ }, [_c('small', [_vm._v("étiquette: ")]), _vm._v(_vm._s(tag.name) + "\n ")])
16618
16627
  }))]), _vm._v(" "), _vm._l((_vm.activeFilters.tags), function(activeTag) {
16619
16628
  return _c('span', {
16620
16629
  staticClass: "label label-primary search-autocomplete__selected-tag",
@@ -16623,8 +16632,20 @@
16623
16632
  _vm.deselectTag(activeTag)
16624
16633
  }
16625
16634
  }
16626
- }, [_vm._v(_vm._s(_vm.getTagFromId(activeTag)))])
16627
- })], 2)
16635
+ }, [_vm._v(_vm._s(_vm.getTagFromId(activeTag))), _c('i', {
16636
+ staticClass: "fa fa-times"
16637
+ })])
16638
+ }), _vm._v(" "), (_vm.searchedTerm) ? _c('div', {
16639
+ staticClass: "search-autocomplete__searched-term"
16640
+ }, [_c('span', [_vm._v("Recherche pour: "), _c('strong', [_vm._v(_vm._s(_vm.searchedTerm))])]), _c('br'), _vm._v(" "), _c('button', {
16641
+ staticClass: "search-autocomplete__clear-search font-s12 primary",
16642
+ attrs: {
16643
+ "type": "button"
16644
+ },
16645
+ on: {
16646
+ "click": _vm.clearSearch
16647
+ }
16648
+ }, [_vm._v("supprimer")])]) : _vm._e()], 2)
16628
16649
  },staticRenderFns: []}
16629
16650
  module.exports.render._withStripped = true
16630
16651
  if (false) {
@@ -34893,4 +34914,4 @@
34893
34914
  });
34894
34915
 
34895
34916
  /***/ })
34896
- /******/ ]);
34917
+ /******/ ]);
@@ -3,10 +3,16 @@
3
3
  <div class="search-autocomplete__input">
4
4
  <input @keyup.prevent="fuzzySearch" class="form-control" v-model="query" type="text" placeholder="Rechercher par titre ou étiquette ...">
5
5
  <div class="search-autocomplete__tags-list">
6
- <span @click="selectedTagIndex = index; selectTag()" :class="[{'active': isActive(index)}, 'search-autocomplete__tag']" v-for="(tag,index) in filteredTags">{{tag.name}}</span>
6
+ <span @click="selectedTagIndex = index; selectTag()" :class="[{'active': isActive(index)}, 'search-autocomplete__tag']" v-for="(tag,index) in filteredTags">
7
+ <small>étiquette: </small>{{tag.name}}
8
+ </span>
7
9
  </div>
8
10
  </div>
9
- <span @click="deselectTag(activeTag)" class="label label-primary search-autocomplete__selected-tag" v-for="activeTag in activeFilters.tags">{{getTagFromId(activeTag)}}</span>
11
+ <span @click="deselectTag(activeTag)" class="label label-primary search-autocomplete__selected-tag" v-for="activeTag in activeFilters.tags">{{getTagFromId(activeTag)}}<i class="fa fa-times"></i></span>
12
+ <div class="search-autocomplete__searched-term" v-if="searchedTerm">
13
+ <span>Recherche pour: <strong>{{ searchedTerm }}</strong></span><br>
14
+ <button type="button" @click="clearSearch" class="search-autocomplete__clear-search font-s12 primary">supprimer</button>
15
+ </div>
10
16
  </div>
11
17
 
12
18
  </template>
@@ -19,7 +25,8 @@ export default {
19
25
  return {
20
26
  query: '',
21
27
  fuseSearch: null,
22
- selectedTagIndex: -1
28
+ selectedTagIndex: -1,
29
+ searchedTerm: ''
23
30
  }
24
31
  },
25
32
  computed: {
@@ -45,18 +52,20 @@ export default {
45
52
  } else if (e.key == 'Enter' && this.selectedTagIndex >= 0) {
46
53
  this.selectTag()
47
54
  } else if (e.key == 'Enter') {
48
- this.$store.dispatch('mediasStore/setSearchQuery', this.query)
55
+ this.searchedTerm = this.query
56
+ this.$store.dispatch('mediasStore/setSearchQuery', this.searchedTerm)
49
57
  this.$store.dispatch('mediasStore/clearImgListing')
50
58
  this.$store.dispatch('mediasStore/setSearchPage', 1)
51
59
  this.$store.dispatch('mediasStore/fetchImage')
52
- console.log('search');
53
60
  this.query = ""
54
- } else if((e.key == 'Backspace' || e.key == 'Meta') && this.query == '' && this.activeFilters.search != '') {
61
+ } else if((e.key == 'Backspace' || e.key == 'Meta') && this.searchedTerm == '' && this.activeFilters.search != '') {
55
62
  this.clearSearch()
56
63
  }
57
64
  },
58
65
  clearSearch() {
66
+ this.searchedTerm = ''
59
67
  this.$store.dispatch('mediasStore/setSearchQuery', '')
68
+ this.$store.dispatch('mediasStore/setSearchPage', 1)
60
69
  this.$store.dispatch('mediasStore/clearImgListing')
61
70
  this.$store.dispatch('mediasStore/fetchImage')
62
71
  },
@@ -72,7 +81,6 @@ export default {
72
81
  let queryArray = query.split(' ').reverse()
73
82
  queryArray[0] = this.filteredTags[this.selectedTagIndex].name
74
83
  let newQuery = queryArray.reverse().join(' ')
75
- this.$store.dispatch('mediasStore/setSearchQuery', '')
76
84
  this.$store.dispatch('mediasStore/setSearchPage', 1)
77
85
  this.$store.dispatch('mediasStore/clearImgListing')
78
86
  this.$store.dispatch('mediasStore/addToTagFilter', this.filteredTags[this.selectedTagIndex].id)
@@ -82,6 +90,7 @@ export default {
82
90
  },
83
91
  deselectTag(id){
84
92
  this.$store.dispatch('mediasStore/clearImgListing')
93
+ this.$store.dispatch('mediasStore/setSearchPage', 1)
85
94
  this.$store.dispatch('mediasStore/removeFromTagFilter', id)
86
95
  this.$store.dispatch('mediasStore/fetchImage')
87
96
  },
@@ -108,9 +117,18 @@ export default {
108
117
  margin: 3px
109
118
  position: relative
110
119
  cursor: pointer
120
+ font-size: 14px
121
+ padding-right: 14px
122
+
111
123
  &:first-of-type
112
124
  margin-left: 0
113
125
 
126
+ i
127
+ font-size: 10px
128
+ position: absolute
129
+ top: 1px
130
+ right: 2px
131
+
114
132
  .search-autocomplete__input
115
133
  position: relative
116
134
 
@@ -137,4 +155,30 @@ export default {
137
155
  &.active
138
156
  background-color: #5c90d2
139
157
  color: white
158
+
159
+ small
160
+ color: #c9c9c9
161
+ font-size: 11px
162
+
163
+ .search-autocomplete__searched-term
164
+ display: block
165
+ margin-top: 10px
166
+ font-size: 12px
167
+ strong
168
+ font-size: 14px
169
+ position: relative
170
+ font-weight: bold
171
+ padding-left: 10px
172
+ padding-right: 14px
173
+ display: inline-block
174
+
175
+ .search-autocomplete__clear-search
176
+ color: #5c90d2
177
+ display: block
178
+ cursor: pointer
179
+ outline: none
180
+ background: transparent
181
+ border: none
182
+ padding: 0
183
+
140
184
  </style>
@@ -1,3 +1,3 @@
1
1
  module RailsAdminImageManager
2
- VERSION = '0.1.30'
2
+ VERSION = '0.1.31'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_image_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.30
4
+ version: 0.1.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - iXmedia