Commit 271df58d2c3422f1d09f4f0a23a6a26928d0d58c

Authored by Gustavo
1 parent e768a3e6

Included javascript code to fix breadcrumb bug

Showing 1 changed file with 20 additions and 5 deletions   Show diff stats
subjects/templates/subjects/view.html 100644 → 100755
@@ -6,8 +6,23 @@ @@ -6,8 +6,23 @@
6 {% block javascript%} 6 {% block javascript%}
7 {{ block.super }} 7 {{ block.super }}
8 <script type="text/javascript" src="{% static 'subjects/js/modal_subject.js' %}"></script> 8 <script type="text/javascript" src="{% static 'subjects/js/modal_subject.js' %}"></script>
  9 + <script type="text/javascript">
  10 + $(document).ready( function () {
  11 + var ul = '';
  12 + var div_crumb = $(".dropdown_crumb");
  13 + var div_change = $(".drop_change");
  14 + if(window.innerWidth < 768) {
  15 + ul = document.querySelector("ul.breadcrumb");
  16 + if (ul) {
  17 + ul.classList.remove('breadcrumb');
  18 + ul.classList.add('screen_drop');
  19 + }
  20 + div_change.addClass("dropdown-menu");
  21 + div_crumb.prepend("<button class='btn btn-block dropdown-toggle' type='button' data-toggle='dropdown'>{% trans 'Navigate' %} <span class='caret'></span></button>")
  22 + }
  23 + });
  24 + </script>
9 {% endblock%} 25 {% endblock%}
10 -  
11 {% block breadcrumbs %} 26 {% block breadcrumbs %}
12 {{ block.super }} 27 {{ block.super }}
13 {% breadcrumb subject.category 'subjects:cat_view' subject.category.slug %} 28 {% breadcrumb subject.category 'subjects:cat_view' subject.category.slug %}
@@ -83,7 +98,7 @@ @@ -83,7 +98,7 @@
83 {% endif %} 98 {% endif %}
84 99
85 {% include 'topics/list.html' with subject=subject %} 100 {% include 'topics/list.html' with subject=subject %}
86 - 101 +
87 <div id="participants" data-toggle="tooltip" data-title="{% trans 'Participants' %}"> 102 <div id="participants" data-toggle="tooltip" data-title="{% trans 'Participants' %}">
88 <i class="fa fa-group"></i> 103 <i class="fa fa-group"></i>
89 </div> 104 </div>
@@ -163,7 +178,7 @@ @@ -163,7 +178,7 @@
163 var popover = $(".popover.fade.in"), 178 var popover = $(".popover.fade.in"),
164 buttons = popover.parent().find('a'), 179 buttons = popover.parent().find('a'),
165 close = popover.parent().find('.close:visible'); 180 close = popover.parent().find('.close:visible');
166 - 181 +
167 popover.animate({ 182 popover.animate({
168 'max-width': '330px', 183 'max-width': '330px',
169 }, 0); 184 }, 0);
@@ -178,7 +193,7 @@ @@ -178,7 +193,7 @@
178 193
179 close.on("click", function () { 194 close.on("click", function () {
180 popover.popover('hide'); 195 popover.popover('hide');
181 - }); 196 + });
182 197
183 buttons.on("click", function () { 198 buttons.on("click", function () {
184 popover.popover('hide'); 199 popover.popover('hide');
@@ -189,7 +204,7 @@ @@ -189,7 +204,7 @@
189 $('#participants').on('click', function(){ 204 $('#participants').on('click', function(){
190 var $this = $(this), 205 var $this = $(this),
191 list = $this.parent().find(".participants-list"); 206 list = $this.parent().find(".participants-list");
192 - 207 +
193 if ($this.hasClass('open')) { 208 if ($this.hasClass('open')) {
194 $this.animate({ 209 $this.animate({
195 right : '0px' 210 right : '0px'