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,6 +49,26 @@ var loadPosts = function() { | ||
49 | $(function () { | 49 | $(function () { |
50 | $(window).bind('scroll', loadOnScroll); | 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 | $(".clear_filter").click(function () { | 72 | $(".clear_filter").click(function () { |
53 | var frm = $(this).parent(); | 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,6 +186,17 @@ $('.mural-ungeneral').on('shown.bs.collapse', function(e) { | ||
186 | return false; | 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 | clear_filters.click(function () { | 200 | clear_filters.click(function () { |
190 | var frm = $(this).parent(); | 201 | var frm = $(this).parent(); |
191 | 202 |
mural/templates/mural/list.html
@@ -36,8 +36,6 @@ | @@ -36,8 +36,6 @@ | ||
36 | <input name="mine" type="checkbox" {{ mines }}> {% trans 'Only my posts' %} | 36 | <input name="mine" type="checkbox" {{ mines }}> {% trans 'Only my posts' %} |
37 | </label> | 37 | </label> |
38 | </div> | 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 | </form> | 39 | </form> |
42 | </div> | 40 | </div> |
43 | </div> | 41 | </div> |
@@ -84,8 +82,6 @@ | @@ -84,8 +82,6 @@ | ||
84 | <input name="mine" type="checkbox" {{ mines }}> {% trans 'Only my posts' %} | 82 | <input name="mine" type="checkbox" {{ mines }}> {% trans 'Only my posts' %} |
85 | </label> | 83 | </label> |
86 | </div> | 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 | </form> | 85 | </form> |
90 | </div> | 86 | </div> |
91 | </div> | 87 | </div> |
@@ -100,4 +96,10 @@ | @@ -100,4 +96,10 @@ | ||
100 | <script type="text/javascript" src="{% static 'js/chat.js' %}"></script> | 96 | <script type="text/javascript" src="{% static 'js/chat.js' %}"></script> |
101 | <script type="text/javascript" src="{% static 'js/mural.js' %}"></script> | 97 | <script type="text/javascript" src="{% static 'js/mural.js' %}"></script> |
102 | <script type="text/javascript" src="{% static 'js/mural_general.js' %}"></script> | 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 | {% endblock %} | 105 | {% endblock %} |
104 | \ No newline at end of file | 106 | \ No newline at end of file |
mural/templates/mural/list_category.html
@@ -85,8 +85,6 @@ | @@ -85,8 +85,6 @@ | ||
85 | <input name="mine" type="checkbox"> {% trans 'Only my posts' %} | 85 | <input name="mine" type="checkbox"> {% trans 'Only my posts' %} |
86 | </label> | 86 | </label> |
87 | </div> | 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 | </form> | 88 | </form> |
91 | </div> | 89 | </div> |
92 | </div> | 90 | </div> |
@@ -136,8 +134,6 @@ | @@ -136,8 +134,6 @@ | ||
136 | <input name="mine" type="checkbox"> {% trans 'Only my posts' %} | 134 | <input name="mine" type="checkbox"> {% trans 'Only my posts' %} |
137 | </label> | 135 | </label> |
138 | </div> | 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 | </form> | 137 | </form> |
142 | </div> | 138 | </div> |
143 | </div> | 139 | </div> |
@@ -163,4 +159,10 @@ | @@ -163,4 +159,10 @@ | ||
163 | <script type="text/javascript" src="{% static 'js/chat.js' %}"></script> | 159 | <script type="text/javascript" src="{% static 'js/chat.js' %}"></script> |
164 | <script type="text/javascript" src="{% static 'js/mural.js' %}"></script> | 160 | <script type="text/javascript" src="{% static 'js/mural.js' %}"></script> |
165 | <script type="text/javascript" src="{% static 'js/mural_ungeneral.js' %}"></script> | 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 | {% endblock %} | 168 | {% endblock %} |
167 | \ No newline at end of file | 169 | \ No newline at end of file |
mural/templates/mural/list_subject.html
@@ -84,8 +84,6 @@ | @@ -84,8 +84,6 @@ | ||
84 | <input name="mine" type="checkbox"> {% trans 'Only my posts' %} | 84 | <input name="mine" type="checkbox"> {% trans 'Only my posts' %} |
85 | </label> | 85 | </label> |
86 | </div> | 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 | </form> | 87 | </form> |
90 | </div> | 88 | </div> |
91 | </div> | 89 | </div> |
@@ -135,8 +133,6 @@ | @@ -135,8 +133,6 @@ | ||
135 | <input name="mine" type="checkbox"> {% trans 'Only my posts' %} | 133 | <input name="mine" type="checkbox"> {% trans 'Only my posts' %} |
136 | </label> | 134 | </label> |
137 | </div> | 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 | </form> | 136 | </form> |
141 | </div> | 137 | </div> |
142 | </div> | 138 | </div> |
@@ -164,4 +160,10 @@ | @@ -164,4 +160,10 @@ | ||
164 | <script type="text/javascript" src="{% static 'js/mural.js' %}"></script> | 160 | <script type="text/javascript" src="{% static 'js/mural.js' %}"></script> |
165 | <script type="text/javascript" src="{% static 'js/mural_ungeneral.js' %}"></script> | 161 | <script type="text/javascript" src="{% static 'js/mural_ungeneral.js' %}"></script> |
166 | <script type="text/javascript" src="{% static 'subjects/js/modal_subject.js' %}"></script> | 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 | {% endblock %} | 169 | {% endblock %} |
168 | \ No newline at end of file | 170 | \ No newline at end of file |