| @@ -2177,9 +2177,9 @@ | ||
| 2177 | 2177 | buttonsCont.hide(200); |
| 2178 | 2178 | } |
| 2179 | 2179 | }); |
| 2180 | 2180 | |
| 2181 | - $(document).find('.ays-poll-question-tab-all-filter-button-top, .ays-poll-question-tab-all-filter-button-bottom').on('click', function(e) { | |
| 2181 | + $(document).find('.ays-poll-question-tab-all-filter-button-top, .ays-poll-question-tab-all-filter-button-bottom, .description-filter-apply-top, .description-filter-apply-bottom').on('click', function(e) { | |
| 2182 | 2182 | e.preventDefault(); |
| 2183 | 2183 | var $this = $(this); |
| 2184 | 2184 | var parent = $this.parents('.tablenav'); |
| 2185 | 2185 | |
| @@ -2194,8 +2194,9 @@ | ||
| 2194 | 2194 | top_or_bottom = 'bottom'; |
| 2195 | 2195 | } |
| 2196 | 2196 | |
| 2197 | 2197 | var catFilter = $(document).find('select[name="filterby-'+ top_or_bottom +'"]').val(); |
| 2198 | + var catDescFilter = $(document).find('select[name="filterbyDescription-'+ top_or_bottom +'"]').val(); | |
| 2198 | 2199 | var authorFilter = $(document).find('select[name="filterbyauthor-'+ top_or_bottom +'"]').val(); |
| 2199 | 2200 | var typeFilter = $(document).find('select[name="filterbytype-'+ top_or_bottom +'"]').val(); |
| 2200 | 2201 | var link = location.href; |
| 2201 | 2202 | |
| @@ -2204,8 +2205,14 @@ | ||
| 2204 | 2205 | what: 'filterby', |
| 2205 | 2206 | value: catFilter |
| 2206 | 2207 | }); |
| 2207 | 2208 | } |
| 2209 | + if (typeof catDescFilter != "undefined") { | |
| 2210 | + link = catFilterForListTable(link, searchValue, { | |
| 2211 | + what: 'filterbyDescription', | |
| 2212 | + value: catDescFilter | |
| 2213 | + }); | |
| 2214 | + } | |
| 2208 | 2215 | if (typeof authorFilter != "undefined") { |
| 2209 | 2216 | link = catFilterForListTable(link, searchValue, { |
| 2210 | 2217 | what: 'filterbyauthor', |
| 2211 | 2218 | value: authorFilter |
| @@ -2228,10 +2235,11 @@ | ||
| 2228 | 2235 | for(var i = 0; i < linkModified.length; i++){ |
| 2229 | 2236 | if ( linkModified[i].split("=")[0] == "ays_result_tab" ) { |
| 2230 | 2237 | linkModified.splice(i, 1, "ays_result_tab=poststuff"); |
| 2231 | 2238 | } |
| 2232 | - if(linkModified[i].split("=")[0] == options.what){ | |
| 2239 | + if(linkModified[i].split("=")[0] == options.what || linkModified[i].split("=")[0] == 'paged'){ | |
| 2233 | 2240 | linkModified.splice(i, 1); |
| 2241 | + i--; | |
| 2234 | 2242 | } |
| 2235 | 2243 | } |
| 2236 | 2244 | linkModified = linkModified.join('&'); |
| 2237 | 2245 | if (typeof searchValue != 'undefined' && searchValue != '') { |
| @@ -2241,10 +2249,11 @@ | ||
| 2241 | 2249 | }else{ |
| 2242 | 2250 | var linkModifiedStart = link.split('?')[0]; |
| 2243 | 2251 | var linkModified = link.split('?')[1].split('&'); |
| 2244 | 2252 | for(var i = 0; i < linkModified.length; i++){ |
| 2245 | - if(linkModified[i].split("=")[0] == options.what){ | |
| 2253 | + if(linkModified[i].split("=")[0] == options.what || linkModified[i].split("=")[0] == 'paged'){ | |
| 2246 | 2254 | linkModified.splice(i, 1); |
| 2255 | + i--; | |
| 2247 | 2256 | } |
| 2248 | 2257 | } |
| 2249 | 2258 | linkModified = linkModified.join('&'); |
| 2250 | 2259 | if (typeof searchValue != 'undefined' && searchValue != '') { |