Skip to content

Commit 2342cec

Browse files
committed
Merge branch 'release/1.9.23'
2 parents 0f812fb + cba8fa4 commit 2342cec

File tree

14 files changed

+124
-64
lines changed

14 files changed

+124
-64
lines changed

Dashboard/app/css/main.scss

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2212,11 +2212,10 @@ li.aSurvey {
22122212

22132213
h2 {
22142214
display: inline;
2215-
2216-
// color: $flowAnchorLink;
2215+
color: rgba($akvoBlack, 0.7);
22172216

22182217
&:hover {
2219-
color: $flowAnchorLinkHover;
2218+
color: rgba($akvoBlack, 1);
22202219
}
22212220
}
22222221
}
@@ -2272,21 +2271,21 @@ li.aFolder {
22722271
padding-bottom: 10px;
22732272

22742273
h2 {
2275-
color: rgb(183, 183, 183);
2274+
color: rgba($akvoBlack, 0.7);
22762275
background: url(../images/folderIcn.svg) right center no-repeat;
22772276
display: inline;
22782277
width: initial;
22792278
padding-right: 45px;
2279+
2280+
&:hover {
2281+
color: rgba($akvoBlack, 1);
2282+
}
22802283
}
22812284
}
22822285

22832286
&:hover {
22842287
background-color: rgb(222, 222, 222);
22852288
border: 1px solid rgba(200, 200, 200, 1);
2286-
2287-
h2 {
2288-
color: $flowAnchorLinkHover;
2289-
}
22902289
}
22912290

22922291
&.folderEmpty {
@@ -2825,7 +2824,11 @@ span.qtnGroupHead {
28252824
margin: 3px 0 0.5em;
28262825

28272826
h1 {
2828-
color: rgba(141, 198, 63, 1);
2827+
color: rgba($akvoBlack, 0.7);
2828+
2829+
&:hover {
2830+
color: rgba($akvoBlack, 1);
2831+
}
28292832
}
28302833

28312834
input {
@@ -2841,7 +2844,11 @@ span.qtnGroupHead {
28412844
}
28422845

28432846
.aQuestionSet header h1.qtnGroupTitle a {
2844-
color: rgb(38, 8, 89);
2847+
color: rgba($akvoBlack, 0.7);
2848+
2849+
&:hover {
2850+
color: rgba($akvoBlack, 1);
2851+
}
28452852
}
28462853

28472854
.aQuestionSet header h1 + a.editSetInfo {
@@ -3255,7 +3262,15 @@ nav.questionActionMenu a:hover {
32553262
margin: 1em 0 1em 0.5em;
32563263

32573264
&.questionNbr {
3258-
font-size: 1.1em;
3265+
font-size: 1em;
3266+
3267+
a {
3268+
color: rgba($akvoBlack, 0.7);
3269+
3270+
&:hover {
3271+
color: rgba($akvoBlack, 1);
3272+
}
3273+
}
32593274
}
32603275
}
32613276

@@ -3296,7 +3311,7 @@ nav.questionActionMenu a:hover {
32963311

32973312
.innerContent .labelcheckbox {
32983313
position: relative;
3299-
display: block;
3314+
display: inline;
33003315
margin: 0.5em 0 0 1em;
33013316
padding: 0.5em 0;
33023317
width: 100%;
@@ -6126,8 +6141,4 @@ svg {
61266141
font-size: 1em !important;
61276142
}
61286143
}
6129-
}
6130-
6131-
.textLink {
6132-
color: inherit !important;
61336144
}

Dashboard/app/dashboard.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<head id="akvoFlow">
55
<meta charset="UTF-8">
6-
<meta name="description" content="Akvo FLOW Dashboard" />
6+
<meta name="description" content="Akvo Flow Dashboard" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0">
88
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
99
<title>Akvo Flow - Dashboard</title>

Dashboard/app/js/lib/controllers/survey-controllers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1821,7 +1821,7 @@ FLOW.translationControl = Ember.ArrayController.create({
18211821
FLOW.CaddisflyResourceController = Ember.ArrayController.extend({
18221822
sortProperties: ['name'],
18231823
sortAscending: true,
1824-
caddisflyTestsFileUrl: 'https://akvoflow-public.s3.amazonaws.com/caddisfly-tests.json',
1824+
caddisflyTestsFileUrl: FLOW.Env.caddisflyTestsFileUrl,
18251825
testsFileLoaded: false,
18261826

18271827
load: function () {

Dashboard/app/js/templates/navData/bulk-upload.handlebars

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
<section class="fullWidth reportTools" id="reportBlocks">
22
{{#view FLOW.BulkUploadAppletView}}
3-
4-
<div class="bulkUpload block">
5-
<p>{{t _upload_applet_text_}}</p>
63

4+
<div class="bulkUpload block">
75
{{#if FLOW.uploader.support}}
86
<div class="resumable-drop" ondragenter="jQuery(this).addClass('resumable-dragover');" ondragend="jQuery(this).removeClass('resumable-dragover');" ondrop="jQuery(this).removeClass('resumable-dragover');">
97
{{t _drop_files}} <a class="resumable-browse"><u>{{t _select_files}}</u></a>
108
</div>
119
<div>{{t _do_not_navigate_away}}</div>
1210
<div class="resumable-progress">
13-
<h5>{{t _progress}}</h5>
14-
<div class="progress-container"><div class="progress-bar"></div></div>
15-
</div>
11+
<div class="progress-container"><div class="progress-bar"></div></div>
12+
</div>
1613
<ul class="resumable-list"></ul>
1714
{{else}}
1815
<div class="resumable-error">

Dashboard/app/js/templates/navSurveys/question-view.handlebars

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@
6666

6767
{{#if view.amOptionType}}
6868
<h1 class="answerNbr">{{t _settings}}: </h1>
69-
<label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowMultipleFlag"}}{{t _allow_multiple}} </label>
70-
<label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowOtherFlag"}}{{t _allow_other}} </label>
71-
<br>
69+
<ul>
70+
<li><label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowMultipleFlag"}}{{t _allow_multiple}} </label></li>
71+
<li><label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowOtherFlag"}}{{t _allow_other}} </label>
72+
</li>
73+
</ul>
7274
<p class="optionTitle"><strong>{{t _options}}:&nbsp;</strong></p>
7375
<div class="optionListView">
7476
{{view FLOW.OptionListView contentBinding="FLOW.questionOptionsControl"}}
@@ -81,17 +83,23 @@
8183
{{/if}}
8284
{{#if view.amBarcodeType}}
8385
<h1 class="answerNbr">{{t _settings}}: </h1>
84-
<label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowMultipleFlag"}}{{t _enable_bulk_barcode_scan}} </label>
85-
<label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.geoLocked"}}{{t _disable_manual_geo_edit}} </label>
86+
<ul>
87+
<li><label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowMultipleFlag"}}{{t _enable_bulk_barcode_scan}} </label></li>
88+
<li><label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.geoLocked"}}{{t _disable_manual_geo_edit}} </label></li>
89+
</ul>
8690
{{/if}}
8791
{{#if view.amNumberType}}
8892
<h1 class="answerNbr">{{t _settings}}: </h1>
89-
<label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowSign"}}{{t _allow_sign}} </label>
90-
<label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowDecimal"}}{{t _allow_decimal_point}} </label>
91-
<label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.requireDoubleEntry"}}{{t _require_double_entry}} {{tooltip _require_double_entry_tooltip}}</label>
93+
<ul>
94+
<li><label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowSign"}}{{t _allow_sign}} </label></li>
95+
<li><label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowDecimal"}}{{t _allow_decimal_point}} </label></li>
96+
<li><label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.requireDoubleEntry"}}{{t _require_double_entry}} {{tooltip _require_double_entry_tooltip}}</label></li>
97+
</ul>
9298

93-
<label class="minValNumb">{{t _min_val}}: {{view Ember.TextField valueBinding="view.minVal" size=10 }}</label>
94-
<label class="maxValNumb">{{t _max_val}}: {{view Ember.TextField valueBinding="view.maxVal" size=10 }}</label>
99+
<ul className="twoColumns">
100+
<li><label class="minValNumb">{{t _min_val}}: {{view Ember.TextField valueBinding="view.minVal" size=10 }}</label></li>
101+
<li><label class="maxValNumb">{{t _max_val}}: {{view Ember.TextField valueBinding="view.maxVal" size=10 }}</label></li>
102+
</ul>
95103
{{/if}}
96104
{{#if view.amGeoType}}
97105
<h1 class="answerNbr">{{t _settings}}: </h1>
@@ -134,10 +142,12 @@
134142
{{/if}}
135143
{{#if view.amGeoshapeType}}
136144
<h1 class="answerNbr">{{t _settings}}: </h1>
137-
<label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowPoints"}}{{t _allow_points}} </label>
138-
<label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowLine"}}{{t _allow_line}} </label>
139-
<label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowPolygon"}}{{t _allow_polygon}} </label>
140-
<label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.geoLocked"}}{{t _disable_manual_geo_edit}} </label>
145+
<ul>
146+
<li><label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowPoints"}}{{t _allow_points}} </label></li>
147+
<li><label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowLine"}}{{t _allow_line}} </label></li>
148+
<li><label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.allowPolygon"}}{{t _allow_polygon}} </label></li>
149+
<li><label class="labelcheckbox"> {{view Ember.Checkbox checkedBinding="view.geoLocked"}}{{t _disable_manual_geo_edit}} </label></li>
150+
</ul>
141151
{{/if}}
142152

143153
{{#if view.amNoOptionsType}}

Dashboard/app/public.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
<!-- the "no-js" class is for Modernizr. -->
1010
<head id="akvoFlow">
1111
<meta charset="UTF-8">
12-
<meta name="description" content="Akvo FLOW" />
12+
<meta name="description" content="Akvo Flow" />
1313
<meta name="viewport" content="width=device-width, maximum-scale=1.0" />
1414
<!-- Force latest IE rendering engine (even in intranet) & Chrome Frame -->
1515
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
16-
<title>Akvo FLOW</title>
16+
<title>Akvo Flow</title>
1717
<link rel="shortcut icon" href="/favicon.ico" />
1818

1919
<!-- enable HTML5 elements in IE7+8 -->

GAE/src/com/gallatinsystems/framework/dao/BaseDAO.java

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -730,18 +730,21 @@ public List<T> fetchItemsByIdBatches(List<Long> idsList, String fieldName) {
730730
if (idsList == null || idsList.isEmpty()) {
731731
return Collections.emptyList();
732732
}
733-
List<T> items = new ArrayList<>();
733+
734+
List<T> fetchedItems = new ArrayList<>();
735+
int idsListSize = idsList.size();
734736
int start = 0;
735-
int listSize = idsList.size();
736-
int end = Math.min(MAX_ALLOWED_FILTERED_ITEMS, listSize);
737-
int maxRound = Math
738-
.max(1, (int) Math.round((double) listSize / MAX_ALLOWED_FILTERED_ITEMS));
739-
for (int i = 0; i < maxRound; i++) {
740-
items.addAll(listValuesByIdsList(idsList.subList(start, end), fieldName));
741-
start = Math.min(start + MAX_ALLOWED_FILTERED_ITEMS, listSize - 1);
742-
end = Math.min(end + MAX_ALLOWED_FILTERED_ITEMS, listSize);
737+
int end = Math.min(MAX_ALLOWED_FILTERED_ITEMS, idsListSize);
738+
int numberOfQueryRounds = (int) Math
739+
.ceil((double) idsListSize / MAX_ALLOWED_FILTERED_ITEMS);
740+
741+
for (int i = 0; i < numberOfQueryRounds; i++) {
742+
List<Long> idsToRetrieve = idsList.subList(start, end);
743+
fetchedItems.addAll(listValuesByIdsList(idsToRetrieve, fieldName));
744+
start = end;
745+
end = Math.min(end + MAX_ALLOWED_FILTERED_ITEMS, idsListSize);
743746
}
744-
return items;
747+
return fetchedItems;
745748
}
746749

747750
private List<T> listValuesByIdsList(List<Long> idsList, final String fieldName) {

GAE/src/com/gallatinsystems/survey/dao/CaddisflyResourceDao.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,16 @@
3535
public class CaddisflyResourceDao {
3636
private static ObjectMapper mapper = new ObjectMapper();
3737

38+
public static String DEFAULT_CADDISFLY_TESTS_FILE_URL = "https://akvoflow-public.s3.amazonaws.com/caddisfly-tests.json";
39+
3840
private static final Logger log = Logger.getLogger(CascadeResourceDao.class
3941
.getName());
4042

41-
/**
42-
* lists caddisfly resources. Source is the json file caddisfly-tests.json stored in
43-
* WEB-INF/resources
44-
*/
45-
public List<CaddisflyResource> listResources() {
43+
public List<CaddisflyResource> listResources(String caddisflyTestsUrl) {
4644
List<CaddisflyResource> result = null;
4745

4846
try {
49-
URL caddisflyFileUrl = new URL(
50-
"https://akvoflow-public.s3.amazonaws.com/caddisfly-tests.json");
47+
URL caddisflyFileUrl = new URL(caddisflyTestsUrl);
5148
InputStream stream = caddisflyFileUrl.openStream();
5249

5350
// create a list of caddisflyResource objects
@@ -67,4 +64,11 @@ public List<CaddisflyResource> listResources() {
6764
return Collections.emptyList();
6865
}
6966
}
67+
68+
/**
69+
* lists caddisfly resources using default caddisfly tests definition file URL
70+
*/
71+
public List<CaddisflyResource> listResources() {
72+
return listResources(DEFAULT_CADDISFLY_TESTS_FILE_URL);
73+
}
7074
}

GAE/src/locale/ui-strings.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ _disallowed_xters_in_code = Codes can only contain letters A - Z, a - z and digi
169169
_do_not_navigate_away = Do not navigate away from this page while the upload is in progress
170170
_doughnut_chart = Doughnut chart
171171
_download_flow_app = Download Flow app
172-
_drop_files = Drop files here to upload or
172+
_drop_files = Drop files here or
173173
_duplicate_option_codes = These codes are used multiple times
174174
_duplicate_option_text = These options are defined multiple times
175175
_edit = Edit
@@ -208,7 +208,7 @@ _export_geoshape_report = Export geographic shape
208208
_export_google_earth_file = Export Google earth file
209209
_export_only_last_collection = Export only last collection
210210
_export_raw_data_report = Export raw data report
211-
_export_report_for_external_use_only = Export this report for use with an external system. This export format cannot be re-imported into the FLOW system.
211+
_export_report_for_external_use_only = Export this report for use with an external system. This export format cannot be re-imported into the Flow system.
212212
_export_reports = Export reports
213213
_export_survey_form = Export survey form
214214
_failed_load_caddisfly_tests = Failed to load Akvo Caddisfly tests!

GAE/src/org/waterforpeople/mapping/app/web/EnvServlet.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public class EnvServlet extends HttpServlet {
5151
.getName());
5252

5353
public static final String SHOW_MAPS_PROPERTY_KEY = "showMapsTab";
54+
public static final String CADDISFLY_TESTS_FILE_URL_KEY = "caddisflyTestsFileUrl";
5455

5556
private static final ArrayList<String> properties = new ArrayList<String>();
5657

@@ -74,6 +75,7 @@ public class EnvServlet extends HttpServlet {
7475
properties.add("extraMapboxTileLayerMapId");
7576
properties.add("extraMapboxTileLayerAccessToken");
7677
properties.add("extraMapboxTileLayerLabel");
78+
properties.add(CADDISFLY_TESTS_FILE_URL_KEY);
7779
}
7880

7981
@Override
@@ -144,6 +146,12 @@ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
144146
props.put(SHOW_MAPS_PROPERTY_KEY, "true");
145147
}
146148

149+
if (props.get(CADDISFLY_TESTS_FILE_URL_KEY) == null
150+
|| props.get(CADDISFLY_TESTS_FILE_URL_KEY).isEmpty()) {
151+
props.put("caddisflyTestsFileUrl",
152+
"https://akvoflow-public.s3.amazonaws.com/caddisfly-tests.json");
153+
}
154+
147155
// load language configuration and strings if present
148156
addLocale(props);
149157

0 commit comments

Comments
 (0)