From 74686cf0a6e415267daa37e8d7d8258fe70510a2 Mon Sep 17 00:00:00 2001 From: rowasc Date: Tue, 24 Sep 2019 22:53:48 -0300 Subject: [PATCH 01/17] fix hdx issues with attrs --- app/settings/data-export/hdx-export.controller.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/settings/data-export/hdx-export.controller.js b/app/settings/data-export/hdx-export.controller.js index 979a0305e4..6975f0203b 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); From 29727dd797ef9631509510e013a25f47b21e9ce8 Mon Sep 17 00:00:00 2001 From: rowasc Date: Wed, 30 Oct 2019 15:56:06 -0300 Subject: [PATCH 02/17] HDX ids should be added only when present --- app/settings/data-export/hdx-export.controller.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/settings/data-export/hdx-export.controller.js b/app/settings/data-export/hdx-export.controller.js index 979a0305e4..b2eb1db6cf 100644 --- a/app/settings/data-export/hdx-export.controller.js +++ b/app/settings/data-export/hdx-export.controller.js @@ -203,7 +203,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 +225,7 @@ function ( 'send_to_hdx': sendToHDX, 'include_hxl': true, 'send_to_browser': !sendToHDX, - 'hxl_heading_row': formatIds() + 'hxl_heading_row': formattedIds }; if (sendToHDX) { From b1e6fa1fe20529fdd6ac42f99c97bce235d48020 Mon Sep 17 00:00:00 2001 From: Anna Date: Mon, 13 Jan 2020 11:52:32 +0100 Subject: [PATCH 03/17] upgrading to webpack4 --- package.json | 51 ++++++++++++++--------------- webpack.config.js | 73 ++++++++++++------------------------------ webpack.dev.config.js | 5 +++ webpack.dist.config.js | 28 +++++++++------- webpack.test.config.js | 2 ++ 5 files changed, 70 insertions(+), 89 deletions(-) diff --git a/package.json b/package.json index 887835c9f5..e7a6b12458 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", @@ -126,7 +127,7 @@ "sortablejs": "1.10.0", "tui-editor": "^1.4.7", "underscore": "^1.7.0", - "ushahidi-platform-pattern-library": "^3.12.3" + "ushahidi-platform-pattern-library": "^4.2.0" }, "engines": { "node": ">=10.0" diff --git a/webpack.config.js b/webpack.config.js index 19d9507c9b..0fd74f77a8 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,12 +1,8 @@ var path = require('path'); var webpack = require('webpack'); var HtmlWebpackPlugin = require('html-webpack-plugin'); -var ExtractTextPlugin = require('extract-text-webpack-plugin'); - +var MiniCssExtractPlugin = require('mini-css-extract-plugin'); var imgPath = path.resolve('node_modules/ushahidi-platform-pattern-library/assets/'); - -var extractCss = new ExtractTextPlugin('[name].[chunkhash].css'); - var GIT_COMMIT; // Try to get the current GIT COMMIT try { @@ -20,7 +16,7 @@ module.exports = { entry: {'app': [ 'babel-polyfill' ]}, - module: { + module: { rules: [ { test: /\.js$/, @@ -52,14 +48,11 @@ module.exports = { }, { test: /\.scss$/, - use: extractCss.extract({ - fallback: 'style-loader', - use: ['css-loader', 'resolve-url-loader', 'sass-loader?sourceMap'] - }) + use: [MiniCssExtractPlugin.loader, 'css-loader', 'resolve-url-loader', 'sass-loader?sourceMap'] }, { test: /\.css$/, - use: extractCss.extract({ fallback: 'style-loader', use: 'css-loader' }) + use: [MiniCssExtractPlugin.loader, 'css-loader'] }, { test: /\.png/, @@ -78,53 +71,29 @@ module.exports = { { test: /\.ttf|\.eot/, use: 'file-loader' - }, - { - test: /\.json$/, - exclude: [/manifest\.json$/], - use: 'json-loader' - }, - { - test: /manifest\.json$/, - loader: ['file-loader?name=manifest.json', 'web-app-manifest-loader'] } ] }, + optimization: { + splitChunks: { + chunks: 'all' + } + }, plugins: [ - extractCss, - - // Skip locales - new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), - - new webpack.DefinePlugin({ - BACKEND_URL: JSON.stringify(process.env.BACKEND_URL || 'http://backend.url.undefined'), - ENVIRONMENT: JSON.stringify(process.env.ENVIRONMENT || 'dev'), - VERIFIER: JSON.stringify(process.env.VERIFIER || false), - GIT_COMMIT: JSON.stringify(GIT_COMMIT || false), - USH_DISABLE_CHECKS: JSON.stringify(process.env.USH_DISABLE_CHECKS) || false + new MiniCssExtractPlugin(), + // Skip locales + new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/), + new webpack.DefinePlugin({ + BACKEND_URL: JSON.stringify(process.env.BACKEND_URL || 'http://backend.url.undefined'), + ENVIRONMENT: JSON.stringify(process.env.ENVIRONMENT || 'dev'), + VERIFIER: JSON.stringify(process.env.VERIFIER || false), + GIT_COMMIT: JSON.stringify(GIT_COMMIT || false), + USH_DISABLE_CHECKS: JSON.stringify(process.env.USH_DISABLE_CHECKS) || false }), - // Injects bundles in your index.html instead of wiring all manually. - // It also adds hash to all injected assets so we don't have problems - // with cache purging during deployment. new HtmlWebpackPlugin({ - template: 'app/index.html', - inject: 'body', - hash: false - }), - - // Automatically move all modules defined outside of application directory and pattern library - // to vendor bundle. If you are using more complicated project structure, consider to specify - // common chunks manually. - new webpack.optimize.CommonsChunkPlugin({ - name: 'vendor', - minChunks: function (module, count) { - return module.resource && - !module.resource.includes(path.resolve(__dirname, 'app')) && - !module.resource.includes('ushahidi-platform-pattern-library') && - !module.resource.includes('style-loader') && - !module.resource.includes('css-loader'); - } + template: 'app/index.html' }) ] -}; +} + diff --git a/webpack.dev.config.js b/webpack.dev.config.js index bfec9cf0c4..9f6b45f243 100644 --- a/webpack.dev.config.js +++ b/webpack.dev.config.js @@ -8,6 +8,11 @@ config.output = { publicPath: '/', path: path.resolve(__dirname, 'app') }; +config.mode = 'development'; +config.devServer = { + hot: true +} + config.plugins = config.plugins.concat([ diff --git a/webpack.dist.config.js b/webpack.dist.config.js index 5357800220..d274e26808 100644 --- a/webpack.dist.config.js +++ b/webpack.dist.config.js @@ -1,7 +1,11 @@ var webpack = require('webpack'); +var UglifyJsPlugin = require('uglifyjs-webpack-plugin'); +var OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); var path = require('path'); var config = require('./webpack.config'); +config.mode = 'production'; + config.output = { filename: '[name].[chunkhash].js', chunkFilename: '[name].[chunkhash].js', @@ -9,19 +13,19 @@ config.output = { path: path.resolve(__dirname, 'server/www') // Overwritten by gulp }; -config.plugins = config.plugins.concat([ - - // Reduces bundles total size - new webpack.optimize.UglifyJsPlugin({ - mangle: { - - // You can specify all variables that should not be mangled. - // For example if your vendor dependency doesn't use modules - // and relies on global variables. Most of angular modules relies on - // angular global variable, so we should keep it unchanged +config.optimization.minimize = true; +config.optimization.minimizer = [ + new UglifyJsPlugin({ + cache: true, + parallel: true, + sourceMap: true, + uglifyOptions: { + mangle: true, except: ['$super', '$', 'exports', 'require', 'angular'] } - }) -]); + }), + new OptimizeCSSAssetsPlugin({})] + config.stats = 'none'; + module.exports = config; diff --git a/webpack.test.config.js b/webpack.test.config.js index dd36482f3c..fab5f1697b 100644 --- a/webpack.test.config.js +++ b/webpack.test.config.js @@ -11,5 +11,7 @@ config.resolve = { 'node_modules' ] }; +config.mode = 'development'; + module.exports = config; From 2dc4826e58f3304ea4a9f8521c41f1f784148188 Mon Sep 17 00:00:00 2001 From: Anna Date: Tue, 21 Jan 2020 09:45:40 +0100 Subject: [PATCH 04/17] loading manifest.json --- webpack.config.js | 15 ++++++++++++++- webpack.dev.config.js | 4 +++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 0fd74f77a8..27686aa281 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -19,6 +19,7 @@ module.exports = { module: { rules: [ { + type:'javascript/auto', test: /\.js$/, exclude: [/app\/lib/, /node_modules/], use: [ @@ -29,7 +30,7 @@ module.exports = { presets: [ ['es2015', { modules: false }], 'stage-0' - ], + ] } } ] @@ -71,6 +72,18 @@ module.exports = { { test: /\.ttf|\.eot/, use: 'file-loader' + }, + { + type: 'javascript/auto', + test: /manifest\.json$/, + use: [ + { + loader: 'file-loader', + options: { + name: 'manifest.json' + } + } + ] } ] }, diff --git a/webpack.dev.config.js b/webpack.dev.config.js index 9f6b45f243..f3655278ca 100644 --- a/webpack.dev.config.js +++ b/webpack.dev.config.js @@ -2,13 +2,15 @@ var webpack = require('webpack'); var path = require('path'); var config = require('./webpack.config'); +config.mode = 'development'; + config.output = { filename: '[name].js', chunkFilename: '[name].js', publicPath: '/', path: path.resolve(__dirname, 'app') }; -config.mode = 'development'; + config.devServer = { hot: true } From 82780594c3697eb2efe632ed034c74052961c4f4 Mon Sep 17 00:00:00 2001 From: himil-vasava Date: Wed, 5 Feb 2020 19:02:12 +0530 Subject: [PATCH 05/17] Display Name as placeholder in roles --- app/settings/roles/roles-edit.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/settings/roles/roles-edit.html b/app/settings/roles/roles-edit.html index 9fd765d4a1..022d4cf6c3 100644 --- a/app/settings/roles/roles-edit.html +++ b/app/settings/roles/roles-edit.html @@ -42,7 +42,7 @@

app.add_role

- +
From a5cb466910a357f654856d66bafbfaaef681993b Mon Sep 17 00:00:00 2001 From: Jenniline <39647995+Jenniline@users.noreply.github.com> Date: Wed, 5 Feb 2020 20:31:46 +0100 Subject: [PATCH 06/17] 1 Solving issue #3533 Adding a description on setting up a new twitter application for users. The description informs them that the process is lengthy so they don't get disappointed. I have made the edit to the en.json file as described in the problem description. --- app/common/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/locales/en.json b/app/common/locales/en.json index 201bdb09d3..851fb9b672 100644 --- a/app/common/locales/en.json +++ b/app/common/locales/en.json @@ -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 a few 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.", From 5507e707ae123769ab94ccf85c02e6c7d1f9b34e Mon Sep 17 00:00:00 2001 From: himil-vasava Date: Fri, 7 Feb 2020 12:24:42 +0530 Subject: [PATCH 07/17] removed email validation error in settings general --- app/settings/site/settings-editor.html | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/settings/site/settings-editor.html b/app/settings/site/settings-editor.html index 768b9040bb..721f3bede8 100644 --- a/app/settings/site/settings-editor.html +++ b/app/settings/site/settings-editor.html @@ -82,7 +82,15 @@

app.general

settings.site_email_note

- + +
+ + + +

+
From 97bb92b3052208ccde238c89619551a0aa84ac77 Mon Sep 17 00:00:00 2001 From: Jenniline <39647995+Jenniline@users.noreply.github.com> Date: Fri, 7 Feb 2020 10:40:46 +0100 Subject: [PATCH 08/17] Commit to patch-1 to erase "a few" This commit removes the words "a few" days from the description of the lengthy process. This was to perform the corrections mentioned by Anna from my last commit on the 6th of Feb 2020 --- app/common/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/locales/en.json b/app/common/locales/en.json index 851fb9b672..0c664aab86 100644 --- a/app/common/locales/en.json +++ b/app/common/locales/en.json @@ -1119,7 +1119,7 @@ } }, "twitter": { - "intro_step_1": "Step 1: Create a new Twitter application: Twitter applications may take a few hours or a few days to be approved by Twitter. Please be aware of this if you need this data quickly.", + "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.", From 318698eaf5d2efb8e623a902e3ecb97639ded788 Mon Sep 17 00:00:00 2001 From: himil-vasava Date: Fri, 7 Feb 2020 18:25:04 +0530 Subject: [PATCH 09/17] email validation error in settings --- app/settings/site/settings-editor.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/settings/site/settings-editor.html b/app/settings/site/settings-editor.html index 721f3bede8..4392f4b9f9 100644 --- a/app/settings/site/settings-editor.html +++ b/app/settings/site/settings-editor.html @@ -79,7 +79,7 @@

app.general

-
+

settings.site_email_note

From a363a7b230ed5441bb57fac484f7d26333e7190c Mon Sep 17 00:00:00 2001 From: himil-vasava Date: Fri, 7 Feb 2020 21:19:21 +0530 Subject: [PATCH 10/17] Display of survey color in selected card --- app/main/posts/detail/post-detail-data.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ -
+

From 80d711535b8816bc5c81b4fda773f27aa5e0f778 Mon Sep 17 00:00:00 2001 From: Jenniline <39647995+Jenniline@users.noreply.github.com> Date: Mon, 10 Feb 2020 18:48:47 +0100 Subject: [PATCH 11/17] 2nd update to en.json to solve #3531 I changed the line that gives the description to the "choose_survey_field_desc" on line 316. --- app/common/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/locales/en.json b/app/common/locales/en.json index 9a43b759c9..a1ddbdee39 100644 --- a/app/common/locales/en.json +++ b/app/common/locales/en.json @@ -313,7 +313,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.", From 8d41d921f0911ed1a901c9adb6cd8e940ededf9b Mon Sep 17 00:00:00 2001 From: himil-vasava Date: Tue, 11 Feb 2020 14:38:37 +0530 Subject: [PATCH 12/17] Cancel button in post edit page --- app/main/posts/modify/post-data-editor.directive.js | 4 ++++ app/main/posts/modify/post-data-editor.html | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/main/posts/modify/post-data-editor.directive.js b/app/main/posts/modify/post-data-editor.directive.js index d8e16243e0..b0ebc3f8d9 100644 --- a/app/main/posts/modify/post-data-editor.directive.js +++ b/app/main/posts/modify/post-data-editor.directive.js @@ -89,6 +89,10 @@ function PostDataEditorController( $scope.selectForm = selectForm; $scope.isSaving = LoadingProgress.getSavingState; + $scope.cancel = function () { + $location.path('/views/data'); + }; + var ignoreCancelEvent = false; // Need state management $scope.$on('event:edit:post:reactivate', function () { 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 @@
- +
From 7d5bb6578eceb6ca08564bf509a105251f6fbe84 Mon Sep 17 00:00:00 2001 From: rohit645 Date: Wed, 12 Feb 2020 18:20:03 +0530 Subject: [PATCH 13/17] fixed travis build settings --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 From 5dcb95fac89ef7abe367ec4666a4027f3b6fd396 Mon Sep 17 00:00:00 2001 From: rohit645 Date: Wed, 12 Feb 2020 19:31:38 +0530 Subject: [PATCH 14/17] Dropdown error in search bar fixed --- app/main/posts/views/filters/filter-posts.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()"> From 877234e378e64c982e52146078deeadfa2a9eefb Mon Sep 17 00:00:00 2001 From: rohit645 Date: Thu, 13 Feb 2020 01:32:09 +0530 Subject: [PATCH 15/17] Mouse scroll to Zoom in/out in map view --- app/common/services/maps.js | 1 + 1 file changed, 1 insertion(+) 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 From 2dd466d9104db2bb7554925e1a22aafce9e74146 Mon Sep 17 00:00:00 2001 From: Himil Vasava <55590415+himil-vasava@users.noreply.github.com> Date: Thu, 13 Feb 2020 01:42:02 +0530 Subject: [PATCH 16/17] Working of cancel button in post edit page --- app/main/posts/modify/post-data-editor.directive.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/main/posts/modify/post-data-editor.directive.js b/app/main/posts/modify/post-data-editor.directive.js index b0ebc3f8d9..975f9ddb9a 100644 --- a/app/main/posts/modify/post-data-editor.directive.js +++ b/app/main/posts/modify/post-data-editor.directive.js @@ -83,16 +83,13 @@ 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'); $scope.selectForm = selectForm; $scope.isSaving = LoadingProgress.getSavingState; - $scope.cancel = function () { - $location.path('/views/data'); - }; - var ignoreCancelEvent = false; // Need state management $scope.$on('event:edit:post:reactivate', function () { @@ -410,4 +407,8 @@ function PostDataEditorController( }); }); } + + function cancel() { + $state.go('posts.data.detail',{postId: $scope.post.id}); + } } From a84be9fa9105212da3da7543dcd87ca02bd3aed9 Mon Sep 17 00:00:00 2001 From: Anna Date: Mon, 2 Mar 2020 15:13:47 +0100 Subject: [PATCH 17/17] adding correct data-source-names --- app/settings/datasources/datasources.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 @@

- +

-