File tree 1 file changed +18
-6
lines changed
1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change 12
12
showSingleFilterStatus = 'show-single' ,
13
13
title ;
14
14
15
+ $ . bootstrapFilter = {
16
+ filterModal : { }
17
+ } ;
18
+
15
19
16
20
var filterModal = {
17
21
that : null ,
29
33
maxElementsInMultiBox : 3 ,
30
34
dateFormat : dateTimeFormat ,
31
35
selectBoxHeight : 180 ,
32
- borderColor : '#ddd'
36
+ borderColor : '#ddd' ,
37
+ showSearchButton : true ,
33
38
} , options ) ;
34
39
35
40
filterModal . that = this ;
40
45
renderRateRangeIfNeeded ( ) ;
41
46
bindFilterClicks ( ) ;
42
47
populateModal ( ) ;
48
+ exposeFilterModal ( ) ;
43
49
44
50
return this ;
45
51
} ;
48
54
filterModal . that . bootstrapFilter ( filterModal . settings ) ;
49
55
} ;
50
56
57
+ function exposeFilterModal ( ) {
58
+ $ . bootstrapFilter . filterModal = filterModal ;
59
+ }
60
+
51
61
/////////////// html rendering here ////////////////////
52
62
function buildHtml ( settings ) {
53
63
54
64
var selectedFiltersHtml ,
55
65
filterInternalHtml ,
56
- searchButton ,
66
+ searchButton = '' ,
57
67
selectedFilters ;
58
68
59
69
// External Style
67
77
//building the filters html
68
78
filterInternalHtml = buildFiltersHtml ( ) ;
69
79
70
- searchButton = '<div class="clearfix"></div>' +
71
- '<div class="row" style="float: right; margin-top: 20px;">' +
72
- '<button id="filter-search-button" style="padding: 10px 112px" class="btn btn-lg btn-block btn-success">Search</button>' +
73
- '</div> ' ;
80
+ if ( filterModal . settings . showSearchButton ) {
81
+ searchButton = '<div class="clearfix"></div>' +
82
+ '<div class="row" style="float: right; margin-top: 20px;">' +
83
+ '<button id="filter-search-button" style="padding: 10px 112px" class="btn btn-lg btn-block btn-success">Search</button>' +
84
+ '</div> ' ;
85
+ }
74
86
75
87
title = '<legend>' + settings . title + '</legend>' ;
76
88
You can’t perform that action at this time.
0 commit comments