Skip to content

Commit 7281d1b

Browse files
authored
Fix/toggleicon (#40)
* Fixes icon font theme issue Signed-off-by: Daniel Kastl <[email protected]> * Fixes fieldset toggle icon Signed-off-by: Daniel Kastl <[email protected]>
1 parent 57f9cb3 commit 7281d1b

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

app/views/issues/index/_map.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<% if @project and @project.module_enabled?(:gtt) %>
22

33
<fieldset id="location" class="collapsible collapsed">
4-
<legend><%= l(:field_location) %></legend>
4+
<legend class="icon icon-collapsed"><%= l(:field_location) %></legend>
55

66
<%= map_tag map: @project.map, geom: (Issue.array_to_geojson(@issues, include_properties: { only: %i(id subject tracker_id status_id) }) if @issues), popup: { href: '/issues/[id]' } %>
77
</fieldset>

assets/javascripts/app.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ var App = (function ($, publ) {
338338
}
339339
return color;
340340
};
341-
341+
342342
publ.getFontColor = function (feature) {
343343
color = "#FFFFFF"
344344
return color;
@@ -717,7 +717,7 @@ var App = (function ($, publ) {
717717
var value = getObjectPathValue(item, defaults.geocoder.place_search_result_value_path);
718718
if (display && value != null) {
719719
$("div#places").append('<input type="radio" name="places" value="' + value + '">'
720-
+ display
720+
+ display
721721
+'<br>')
722722
}
723723
})
@@ -939,7 +939,7 @@ var App = (function ($, publ) {
939939
if (match && match.length === 2) {
940940
districtInput.val(match[1]);
941941
foundDistrict = true;
942-
}
942+
}
943943
}
944944
}
945945
}
@@ -1023,6 +1023,7 @@ var App = (function ($, publ) {
10231023
function toggleAndLoadMap(el) {
10241024
var fieldset = $(el).parents('fieldset').first();
10251025
fieldset.toggleClass('collapsed');
1026+
fieldset.children('legend').toggleClass('icon-expended icon-collapsed');
10261027
fieldset.children('div').toggle();
10271028
maps.forEach(function (m) {
10281029
m.updateSize();
@@ -1057,8 +1058,8 @@ var App = (function ($, publ) {
10571058
};
10581059

10591060
path = stringToPath(path);
1060-
var current = obj;
1061-
for (var i = 0; i < path.length; i++) {
1061+
var current = obj;
1062+
for (var i = 0; i < path.length; i++) {
10621063
if (!current[path[i]]) {
10631064
return def;
10641065
}

0 commit comments

Comments
 (0)