Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 2f227a6c

Přidáno uživatelem Tomáš Ballák před více než 3 roky(ů)

Feature Re #8156 show all datasets

Zobrazit rozdíly:

website/templates/heatmap.html.twig
51 51
                  'id' : 'time',
52 52
                  'attr' : {
53 53
                    'class' : 'custom-select'
54
                  }
54
                  },
55 55
                })
56 56
              }}             
57 57
            </li>
58 58

  
59 59
            <li class="nav-item">
60
              {{ form_label(form.type, 'Vyberte datovou sadu') }}
61
              {{
62
                form_widget(form.type, {
63
                  'id' : 'type',
64
                  'attr' : {
65
                    'class' : 'custom-select'
66
                  }
67
                })
68
              }}  
60
              <div class="dropdown">
61
              {# {{ form_label(form.type, 'Vyberte datovou sadu') }} #}
62
                <button class="btn dropdown-toggle text-white font-weight-bold" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
63
                  Vyberte datovou sadu
64
              </button>
65
              <div id="dataset-dropdown" class="dropdown-menu" aria-labelledby="dropdownMenuButton">
66
              {% for oneType in form.type.children %}
67
              <label class="dropdown-item custom-dropdown-item">
68
              <div class="custom-control custom-checkbox custom-checkbox-{{oneType.vars.value}}">
69
              {{ form_widget(oneType, {
70
                attr: {'class': "custom-control-input custom-control-input-#{oneType.vars.value}"}
71
              }) }}
72
              {{ form_label(oneType, null, {
73
                'label_attr': {'class': 'custom-control-label'}
74
                }) }}
75
              </div>
76
              </label>
77
              {% endfor %}
78
              </div>
79
              </div>  
69 80
            </li>
70 81

  
71 82
            <li class="nav-item">
72 83
              {{
73 84
                form_widget(form.submit,
74 85
                {
86
                  'name' : '',
75 87
                  'label' : 'Potvrdit výběr',
76 88
                  'type' : 'submit',
77 89
                  'id' : 'submit-btn',
......
171 183
    <script>
172 184
        initDatepicker("{{ path('dates') }}");
173 185
        initLocationsMenu();
174
        initMap();
175
        checkDataSetsAvailability("{{ path('available') }}")
176
        {% if submitted %}
177
        loadCurrentTimeHeatmap("{{ path('opendata') }}", "{{ path('positions') }}");
178
        {% endif %}
179

  
186
        initMap();        
187
        $( document ).ready(function() {
188
          onDocumentReady();
189
          checkDataSetsAvailability("{{ path('available') }}")
190
          {% if submitted %}
191
          loadCurrentTimeHeatmap("{{ path('opendata') }}", "{{ path('positions') }}");
192
          {% endif %}
193
        });
180 194
        $(window).resize(function() {
181 195
          initLocationsMenu();
182 196
        });
183 197
  </script>
184 198

  
199
{% endblock %}
200

  
201
{% block style %}
202
  <style>
203
    {% for key, item in dataset_colors %}
204
      .custom-control-input-{{key}}:focus~.custom-control-label::before {
205
          border-color: {{item}} !important;
206
          box-shadow: 0 0 0 0.2rem rgba(192,192,192, 0.4) !important;
207
      }
208

  
209
      .custom-control-input-{{key}}:checked~.custom-control-label::before {
210
          border-color: {{item}} !important;
211
          background-color: {{item}} !important;
212
      }
213

  
214
      .custom-control-input-{{key}}:focus:not(:checked)~.custom-control-label::before {
215
          border-color: {{item}} !important;
216
      }
217

  
218
      .custom-control-input-{{key}}:not(:disabled):active~.custom-control-label::before {
219
          background-color: {{item}} !important;
220
          border-color: {{item}} !important;
221
      }
222

  
223
      .popup-{{key}} > .leaflet-popup-content-wrapper, .popup-{{key}} .leaflet-popup-tip{
224
        background-color: {{item}} !important;
225
      }
226
    {% endfor %}
227
  </style>
185 228
{% endblock %}

Také k dispozici: Unified diff