Skip to content

Commit

Permalink
Merge pull request #1446 from ushahidi/develop
Browse files Browse the repository at this point in the history
Freeze v4.4.0
  • Loading branch information
tuxpiper authored Mar 9, 2020
2 parents edd689c + 7f95658 commit 36569c9
Show file tree
Hide file tree
Showing 16 changed files with 123 additions and 109 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions app/common/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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" : "<strong>If you delete this survey</strong>, all of its posts will also be deleted. Proceed with caution.",
Expand Down Expand Up @@ -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: <br />Twitter applications may take a few hours or days to be approved by Twitter.<br />Please be aware of this if you need this data quickly.",
"intro_step_1_desc": "Create a <a href=\"https://apps.twitter.com/app/new\">new twitter application</a>",
"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\".<br /> Then click \"Generate Consumer Key and Secret\".<br /> Copy keys, tokens and secrets into the fields below.",
Expand Down
1 change: 1 addition & 0 deletions app/common/services/maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion app/main/posts/detail/post-detail-data.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/img/iconic-sprite.svg#x"></use>
</svg>
</button>
<div class="post-band" ng-style="{backgroundColor: post.form.color}"></div>
<div class="post-band" ng-style="{backgroundColor: form.color}"></div>
<post-lock ng-if="post.lock" post="post"></post-lock>
<div class="postcard-body">
<h1 class="form-sheet-title survey-title" linkify>
Expand Down
5 changes: 5 additions & 0 deletions app/main/posts/modify/post-data-editor.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -406,4 +407,8 @@ function PostDataEditorController(
});
});
}

function cancel() {
$state.go('posts.data.detail',{postId: $scope.post.id});
}
}
2 changes: 1 addition & 1 deletion app/main/posts/modify/post-data-editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<div class="toolbar toolbar-secondary">
<div class="button-group">

<button class="button-flat" ng-click="leavePost()" translate>app.cancel</button>
<button class="button-flat" ng-click="cancel()" translate>app.cancel</button>
<button class="button button-alpha" ng-click="savePost()" ng-if="!isSaving()" translate="">app.save</button>
<loading-dots button-class="'button-alpha'" ng-if="isSaving()" disabled=true label="'app.saving'"></loading-dots>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/main/posts/views/filters/filter-posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<div class="input-with-icon">
<input name="q" type="search" autocomplete="off"
placeholder="{{ 'toolbar.searchbar.search_entity' | translate }}"
ng-model="filters.q" ng-model-options="{ debounce: 300 }" ng-focus="showDropdown()" ng-keyup="showDropdown()">
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()">
<svg class="iconic" ng-show="!postFiltersFormOpen.q.$viewValue.length">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/img/iconic-sprite.svg#magnifying-glass"></use>
</svg>
Expand Down
14 changes: 9 additions & 5 deletions app/settings/data-export/hdx-export.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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();
Expand All @@ -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) {
Expand Down
10 changes: 5 additions & 5 deletions app/settings/datasources/datasources.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h2 class="listing-item-title">
<label class="tgl-btn" for="{{provider.id}}_form_enable"></label>
</div>
<div data-fieldgroup-target="import_to_survey-survey" class="init active">
<p data-fieldgroup-target="hide-author-message" class="init" ng-class="{'active' : formEnabled[provider.id]}" translate-values="{ provider: provider.name }" translate="" >
<p data-fieldgroup-target="hide-author-message" class="init" ng-class="{'active' : formEnabled[provider.id]}" translate-values="{ datasource_type: provider.name }" translate="survey.choose_survey_field_desc" >
<em>
All incoming data from {{provider.name}} will be used to create responses to the survey you choose.
</em>
Expand Down Expand Up @@ -117,7 +117,7 @@ <h2 class="listing-item-title">

<fieldset data-fieldgroup-target="import_to_survey-fields" class="init active" ng-show="selectedForm[provider.id] && formEnabled">
<legend translate="survey.choose_survey_field">Choose what should be assigned to each survey field</legend>
<p translate="survey.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.</p>
<p translate="survey.choose_survey_field_desc" translate-values="{ datasource_type: provider.name }">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.</p>
<table>
<thead>
<tr>
Expand Down Expand Up @@ -156,14 +156,14 @@ <h2 class="listing-item-title">
<div ng-repeat="(option_key, option) in provider.options track by option_key" ng-class="{ error : formsSubmitted[provider.id] && forms[provider.id][option_key].$invalid, 'form-field' : option.input !== 'radio', 'required' : option.rules.indexOf('required') > -1 }">

<div class="" ng-if="option.input == 'read-only-text'">
<label ng-if="option.label" class="input-label">{{option.label}}</label>
<label ng-if="option.label" ng-bind-html="option.label" class="input-label"></label>
<p ng-bind-html="option.description"></p>
</div>

<div class="form-field" ng-if="option.input == 'text'">
<label ng-if="option.label">
<p ng-if="option.label">
{{option.label}}
</label>
</p>

<p ng-if="option.description">
{{option.description}}
Expand Down
2 changes: 1 addition & 1 deletion app/settings/roles/roles-edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h1 class="mode-context-title" ng-show="!role.id" translate>app.add_role</h1>
<div class="form-sheet">
<div class="form-field">
<label translate>role.name</label>
<input type="text" placeholder="{{'role.name'}}" ng-minlength="3" ng-maxlength="150" ng-model="role.display_name" required>
<input type="text" placeholder="{{'role.name' | translate}}" ng-minlength="3" ng-maxlength="150" ng-model="role.display_name" required>
</div>

<div class="form-field">
Expand Down
12 changes: 10 additions & 2 deletions app/settings/site/settings-editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,18 @@ <h1 class="mode-context-title" translate>app.general</h1>
</file-upload>
</div>

<div class="form-field">
<div class="form-field" ng-class="{ 'error': form.email.$invalid && form.email.$dirty }">
<label translate>settings.site_email</label>
<p class="small" translate>settings.site_email_note</p>
<input id="site-settings-email" type="email" placeholder="name@domain.com" value="brandon@ushahidi.com" ng-model="site.email">
<input id="site-settings-email" type="email" placeholder="name@domain.com" value="brandon@ushahidi.com" name="email" ng-model="site.email">
<div ng-repeat="(error, value) in form.email.$error"
ng-show="form.email.$dirty"
class="alert error">
<svg class="iconic">
<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/img/iconic-sprite.svg#warning"></use>
</svg>
<p translate="{{'user.valid.email.' + error}}" translate-default="{{error}}"></p>
</div>
</div>
<div class="form-field">
<label translate>settings.site_language</label>
Expand Down
51 changes: 26 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,25 @@
"babel-runtime": "^6.6.1",
"browser-sync": "^2.26.7",
"connect-history-api-fallback": "^1.1.0",
"css-loader": "^0.28.0",
"css-loader": "^3.4.0",
"del": "^5.1.0",
"dotenv": "^8.2.0",
"eslint": "^6.7.1",
"extract-text-webpack-plugin": "^2.1.0",
"fancy-log": "^1.3.3",
"file-loader": "^0.11.1",
"fs-walk": "0.0.1",
"file-loader": "^5.0.2",
"fs-walk": "0.0.2",
"gulp": "^4.0.2",
"gulp-eslint": "^6.0.0",
"gulp-gzip": "^1.4.2",
"gulp-if": "^3.0.0",
"gulp-rename": "^1.4.0",
"gulp-tar": "^3.1.0",
"html-loader": "^0.4.3",
"html-webpack-plugin": "^2.22.0",
"imports-loader": "^0.7.1",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"imports-loader": "^0.8.0",
"is-url": "^1.2.4",
"jasmine-core": "^3.5",
"json-loader": "^0.5.4",
"jasmine-core": "^3.5.0",
"json-loader": "^0.5.7",
"karma": "^4.4.1",
"karma-chrome-launcher": "^3.1.0",
"karma-coverage": "^2.0.1",
Expand All @@ -70,27 +69,29 @@
"karma-notify-reporter": "^1.2.0",
"karma-phantomjs-launcher": "^1.0.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^3.0.0",
"karma-webpack": "^4.0.2",
"mini-css-extract-plugin": "^0.9.0",
"minimist": "^1.2.0",
"ng-annotate-loader": "0.6.0",
"ng-annotate-loader": "0.6.1",
"node-fetch": "^2.6.0",
"node-libs-browser": "^2.0.0",
"node-sass": "^4.5.2",
"node-libs-browser": "^2.0.1",
"node-sass": "^4.13.0",
"optimize-css-assets-webpack-plugin": "^5.0.3",
"phantomjs-prebuilt": "^2.1.16",
"pre-commit": "^1.1.2",
"protractor": "^5.4.2",
"raw-loader": "^0.5.1",
"resolve-url-loader": "^2.0.2",
"sass-loader": "^6.0.3",
"style-loader": "^0.16.1",
"raw-loader": "^4.0.0",
"resolve-url-loader": "^3.1.1",
"sass-loader": "^8.0.0",
"style-loader": "^1.1.2",
"supports-color": "^3.1.2",
"svg-url-loader": "^2.0.2",
"transifex": "^1.4.4",
"url-loader": "^0.5.7",
"web-app-manifest-loader": "0.1.1",
"webpack": "^2.4.1",
"webpack-dev-middleware": "^1.6.1",
"webpack-hot-middleware": "^2.6.0"
"svg-url-loader": "^3.0.3",
"transifex": "^1.6.6",
"uglifyjs-webpack-plugin": "^2.2.0",
"url-loader": "^3.0.0",
"webpack": "^4.41.4",
"webpack-dev-middleware": "^3.7.2",
"webpack-hot-middleware": "^2.25.0"
},
"dependencies": {
"@uirouter/angularjs": "^1.0.10",
Expand Down Expand Up @@ -126,7 +127,7 @@
"sortablejs": "1.10.0",
"tui-editor": "^1.4.7",
"underscore": "^1.7.0",
"ushahidi-platform-pattern-library": "^3.12.5"
"ushahidi-platform-pattern-library": "^4.2.0"
},
"engines": {
"node": ">=10.0"
Expand Down
Loading

0 comments on commit 36569c9

Please sign in to comment.