Commit 193c3f157219e366130d8d36c5236be882117890
1 parent
9c8c854c
Exists in
master
and in
2 other branches
Removing filter buttons from mural
Showing
6 changed files
with
50 additions
and
13 deletions
Show diff stats
amadeus/static/js/mural.js
amadeus/static/js/mural_general.js
... | ... | @@ -49,6 +49,26 @@ var loadPosts = function() { |
49 | 49 | $(function () { |
50 | 50 | $(window).bind('scroll', loadOnScroll); |
51 | 51 | |
52 | + $("input[name='favorite']").on('change', function () { | |
53 | + var checked = $(this).is(':checked'); | |
54 | + | |
55 | + $("input[name='favorite']").each(function () { | |
56 | + $(this).prop('checked', checked); | |
57 | + }); | |
58 | + | |
59 | + $("#post-filters").submit(); | |
60 | + }); | |
61 | + | |
62 | + $("input[name='mine']").on('change', function () { | |
63 | + var checked = $(this).is(':checked'); | |
64 | + | |
65 | + $("input[name='mine']").each(function () { | |
66 | + $(this).prop('checked', checked); | |
67 | + }); | |
68 | + | |
69 | + $("#post-filters").submit(); | |
70 | + }); | |
71 | + | |
52 | 72 | $(".clear_filter").click(function () { |
53 | 73 | var frm = $(this).parent(); |
54 | 74 | ... | ... |
amadeus/static/js/mural_ungeneral.js
... | ... | @@ -186,6 +186,17 @@ $('.mural-ungeneral').on('shown.bs.collapse', function(e) { |
186 | 186 | return false; |
187 | 187 | }); |
188 | 188 | |
189 | + var favorite = filters.find("input[name='favorite']"), | |
190 | + mine = filters.find("input[name='mine']"); | |
191 | + | |
192 | + favorite.on('change', function () { | |
193 | + filters.submit(); | |
194 | + }); | |
195 | + | |
196 | + mine.on('change', function () { | |
197 | + filters.submit(); | |
198 | + }); | |
199 | + | |
189 | 200 | clear_filters.click(function () { |
190 | 201 | var frm = $(this).parent(); |
191 | 202 | ... | ... |
mural/templates/mural/list.html
... | ... | @@ -36,8 +36,6 @@ |
36 | 36 | <input name="mine" type="checkbox" {{ mines }}> {% trans 'Only my posts' %} |
37 | 37 | </label> |
38 | 38 | </div> |
39 | - <button type="submit" class="btn btn-success btn-raised">{% trans 'Filter' %}</button> | |
40 | - <button type="button" class="btn btn-default btn-raised clear_filter">{% trans 'Clean Filters' %}</button> | |
41 | 39 | </form> |
42 | 40 | </div> |
43 | 41 | </div> |
... | ... | @@ -84,8 +82,6 @@ |
84 | 82 | <input name="mine" type="checkbox" {{ mines }}> {% trans 'Only my posts' %} |
85 | 83 | </label> |
86 | 84 | </div> |
87 | - <button type="submit" class="btn btn-success btn-raised btn-block">{% trans 'Filter' %}</button> | |
88 | - <button type="button" class="btn btn-default btn-raised btn-block clear_filter">{% trans 'Clean Filters' %}</button> | |
89 | 85 | </form> |
90 | 86 | </div> |
91 | 87 | </div> |
... | ... | @@ -100,4 +96,10 @@ |
100 | 96 | <script type="text/javascript" src="{% static 'js/chat.js' %}"></script> |
101 | 97 | <script type="text/javascript" src="{% static 'js/mural.js' %}"></script> |
102 | 98 | <script type="text/javascript" src="{% static 'js/mural_general.js' %}"></script> |
99 | +{% endblock %} | |
100 | + | |
101 | +{% block addtional_scripts %} | |
102 | + <script type="text/javascript"> | |
103 | + sessionSecurity.confirmFormDiscard = undefined; | |
104 | + </script> | |
103 | 105 | {% endblock %} |
104 | 106 | \ No newline at end of file | ... | ... |
mural/templates/mural/list_category.html
... | ... | @@ -85,8 +85,6 @@ |
85 | 85 | <input name="mine" type="checkbox"> {% trans 'Only my posts' %} |
86 | 86 | </label> |
87 | 87 | </div> |
88 | - <button type="submit" class="btn btn-success btn-raised">{% trans 'Filter' %}</button> | |
89 | - <button type="button" class="btn btn-default btn-raised clear_filter">{% trans 'Clean Filters' %}</button> | |
90 | 88 | </form> |
91 | 89 | </div> |
92 | 90 | </div> |
... | ... | @@ -136,8 +134,6 @@ |
136 | 134 | <input name="mine" type="checkbox"> {% trans 'Only my posts' %} |
137 | 135 | </label> |
138 | 136 | </div> |
139 | - <button type="submit" class="btn btn-success btn-raised btn-block">{% trans 'Filter' %}</button> | |
140 | - <button type="button" class="clear_filter btn btn-default btn-raised btn-block">{% trans 'Clean Filters' %}</button> | |
141 | 137 | </form> |
142 | 138 | </div> |
143 | 139 | </div> |
... | ... | @@ -163,4 +159,10 @@ |
163 | 159 | <script type="text/javascript" src="{% static 'js/chat.js' %}"></script> |
164 | 160 | <script type="text/javascript" src="{% static 'js/mural.js' %}"></script> |
165 | 161 | <script type="text/javascript" src="{% static 'js/mural_ungeneral.js' %}"></script> |
162 | +{% endblock %} | |
163 | + | |
164 | +{% block addtional_scripts %} | |
165 | + <script type="text/javascript"> | |
166 | + sessionSecurity.confirmFormDiscard = undefined; | |
167 | + </script> | |
166 | 168 | {% endblock %} |
167 | 169 | \ No newline at end of file | ... | ... |
mural/templates/mural/list_subject.html
... | ... | @@ -84,8 +84,6 @@ |
84 | 84 | <input name="mine" type="checkbox"> {% trans 'Only my posts' %} |
85 | 85 | </label> |
86 | 86 | </div> |
87 | - <button type="submit" class="btn btn-success btn-raised">{% trans 'Filter' %}</button> | |
88 | - <button type="button" class="btn btn-default btn-raised clear_filter">{% trans 'Clean Filters' %}</button> | |
89 | 87 | </form> |
90 | 88 | </div> |
91 | 89 | </div> |
... | ... | @@ -135,8 +133,6 @@ |
135 | 133 | <input name="mine" type="checkbox"> {% trans 'Only my posts' %} |
136 | 134 | </label> |
137 | 135 | </div> |
138 | - <button type="submit" class="btn btn-success btn-raised btn-block">{% trans 'Filter' %}</button> | |
139 | - <button type="button" class="clear_filter btn btn-default btn-raised btn-block">{% trans 'Clean Filters' %}</button> | |
140 | 136 | </form> |
141 | 137 | </div> |
142 | 138 | </div> |
... | ... | @@ -164,4 +160,10 @@ |
164 | 160 | <script type="text/javascript" src="{% static 'js/mural.js' %}"></script> |
165 | 161 | <script type="text/javascript" src="{% static 'js/mural_ungeneral.js' %}"></script> |
166 | 162 | <script type="text/javascript" src="{% static 'subjects/js/modal_subject.js' %}"></script> |
163 | +{% endblock %} | |
164 | + | |
165 | +{% block addtional_scripts %} | |
166 | + <script type="text/javascript"> | |
167 | + sessionSecurity.confirmFormDiscard = undefined; | |
168 | + </script> | |
167 | 169 | {% endblock %} |
168 | 170 | \ No newline at end of file | ... | ... |