diff --git a/.travis.yml b/.travis.yml index ec56cd6a08..794614fa1a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,12 +17,12 @@ matrix: allow_failures: - node_js: stable include: - # Run everything with v5 (match production) - - node_js: 5 + # Run everything with v8 (match production) + - node_js: 8 env: TEST_SUITE=lint - - node_js: 5 + - node_js: 8 env: TEST_SUITE=unit - - node_js: 6 + - node_js: 8 env: TEST_SUITE=unit - node_js: stable env: TEST_SUITE=unit diff --git a/app/common/locales/en.json b/app/common/locales/en.json index 201bdb09d3..c0012a864e 100644 --- a/app/common/locales/en.json +++ b/app/common/locales/en.json @@ -314,7 +314,7 @@ "who_can_add": "Who can add to this survey", "survey_field": "Survey field", "choose_survey_field": "Choose what should be assigned to each survey field", - "choose_survey_field_desc": "Each of the survey's fields are listed below. Choose the data from your tweets that you'd like to use to populate each of those fields.", + "choose_survey_field_desc": "Each of the survey's fields are listed below. Choose the data from {{datasource_type}} that you'd like to use to populate each of those fields.", "who_can_contribute_to_task" : "Who can contribute to fields in this task", "delete" : { "desc" : "If you delete this survey, all of its posts will also be deleted. Proceed with caution.", @@ -1119,7 +1119,7 @@ } }, "twitter": { - "intro_step_1": "Step 1: Create a new Twitter application", + "intro_step_1": "Step 1: Create a new Twitter application:
Twitter applications may take a few hours or days to be approved by Twitter.
Please be aware of this if you need this data quickly.", "intro_step_1_desc": "Create a new twitter application", "intro_step_2": "Step 2: Generate a consumer key and secret", "intro_step_2_desc": "Once you've created the application click on \"Keys and Access Tokens\".
Then click \"Generate Consumer Key and Secret\".
Copy keys, tokens and secrets into the fields below.", diff --git a/app/common/services/maps.js b/app/common/services/maps.js index f86f137439..b3acbf54cc 100644 --- a/app/common/services/maps.js +++ b/app/common/services/maps.js @@ -49,6 +49,7 @@ function Maps(ConfigEndpoint, L, _, CONST) { map.attributionControl.setPrefix(false); map.zoomControl.setPosition('bottomleft'); map.setMaxBounds([[-90,-360],[90,360]]); + map.scrollWheelZoom.enable(); map.on('popupopen', function (e) { var px = map.project(e.popup._latlng); // find the pixel location on the map where the popup anchor is px.y -= e.popup._container.clientHeight / 2; // find the height of the popup container, divide by 2, subtract from the Y axis of marker location diff --git a/app/main/posts/detail/post-detail-data.html b/app/main/posts/detail/post-detail-data.html index d661d0d1e0..38d94dcfca 100644 --- a/app/main/posts/detail/post-detail-data.html +++ b/app/main/posts/detail/post-detail-data.html @@ -6,7 +6,7 @@ -
+

diff --git a/app/main/posts/modify/post-data-editor.directive.js b/app/main/posts/modify/post-data-editor.directive.js index d8e16243e0..975f9ddb9a 100644 --- a/app/main/posts/modify/post-data-editor.directive.js +++ b/app/main/posts/modify/post-data-editor.directive.js @@ -83,6 +83,7 @@ function PostDataEditorController( $scope.tagKeys = []; $scope.save = $translate.instant('app.save'); $scope.saving = $translate.instant('app.saving'); + $scope.cancel = cancel; $scope.submit = $translate.instant('app.submit'); $scope.submitting = $translate.instant('app.submitting'); $scope.hasPermission = $rootScope.hasPermission('Manage Posts'); @@ -406,4 +407,8 @@ function PostDataEditorController( }); }); } + + function cancel() { + $state.go('posts.data.detail',{postId: $scope.post.id}); + } } diff --git a/app/main/posts/modify/post-data-editor.html b/app/main/posts/modify/post-data-editor.html index 45729ad525..9ad55a77b8 100644 --- a/app/main/posts/modify/post-data-editor.html +++ b/app/main/posts/modify/post-data-editor.html @@ -69,7 +69,7 @@
- +
diff --git a/app/main/posts/views/filters/filter-posts.html b/app/main/posts/views/filters/filter-posts.html index 43c9e1cb29..010671c086 100644 --- a/app/main/posts/views/filters/filter-posts.html +++ b/app/main/posts/views/filters/filter-posts.html @@ -17,7 +17,7 @@
+ ng-model="filters.q" ng-model-options="{ debounce: 300 }" ng-click = "showDropdown()" ng-keyup="($event.keyCode === 27) ? hideDropdown(): showDropdown()" ng-keypress="($event.keyCode === 27) ? hideDropdown(): showDropdown()"> diff --git a/app/settings/data-export/hdx-export.controller.js b/app/settings/data-export/hdx-export.controller.js index 979a0305e4..931d403d0f 100644 --- a/app/settings/data-export/hdx-export.controller.js +++ b/app/settings/data-export/hdx-export.controller.js @@ -184,9 +184,12 @@ function ( let obj = formAttribute.selectedTag ? {form_attribute_id: formAttribute.id, hxl_tag_id: formAttribute.selectedTag.id} : {form_attribute_id: formAttribute.id}; if (formAttribute.selectedHxlAttributes && !_.isEmpty(formAttribute.selectedHxlAttributes)) { _.each(formAttribute.selectedHxlAttributes, (hxlAttribute) => { - let objWithAttr = angular.copy(obj); - objWithAttr.hxl_attribute_id = parseInt(getHxlAttributeByTagIdAndName(formAttribute, hxlAttribute.attribute).id); - hxlData.push(objWithAttr); + let hxlAttr = getHxlAttributeByTagIdAndName(formAttribute, hxlAttribute.attribute); + if (hxlAttr) { + let objWithAttr = angular.copy(obj); + objWithAttr.hxl_attribute_id = parseInt(hxlAttr.id); + hxlData.push(objWithAttr); + } }); } else { hxlData.push(obj); @@ -203,7 +206,8 @@ function ( } function exportData(sendToHDX) { - if (formatIds().length === 0) { + const formattedIds = formatIds(); + if (formattedIds.length === 0) { // scrolling to top and display the error-message $scope.fieldError = true; $anchorScroll(); @@ -224,7 +228,7 @@ function ( 'send_to_hdx': sendToHDX, 'include_hxl': true, 'send_to_browser': !sendToHDX, - 'hxl_heading_row': formatIds() + 'hxl_heading_row': formattedIds }; if (sendToHDX) { diff --git a/app/settings/datasources/datasources.html b/app/settings/datasources/datasources.html index 3fe98598f0..ffa0c97159 100644 --- a/app/settings/datasources/datasources.html +++ b/app/settings/datasources/datasources.html @@ -74,7 +74,7 @@

-

+

All incoming data from {{provider.name}} will be used to create responses to the survey you choose. @@ -117,7 +117,7 @@

Choose what should be assigned to each survey field -

Each of the survey's fields are listed below. Choose the data from your tweets that you'd like to use to populate each of those fields.

+

Each of the survey's fields are listed below. Choose the data from {{provider.name}} that you'd like to use to populate each of those fields.

@@ -156,14 +156,14 @@

- +

-