-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/newsletter #158
Open
serabile
wants to merge
8
commits into
develop
Choose a base branch
from
feature/newsletter
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/newsletter #158
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
07ce8f0
Implements newsletter modal with localeapp integration.
Ozcino 16ceef0
Adds translation and final lable fixes
Ozcino c6c91cc
send newsletter emails to backend, what is left to do:
superyass 3f4ffea
email validation with disabled button when unvalid
serabile a7d8f65
show message registration
serabile b9072c1
reject duplicated emails
serabile 856581f
registration message with arabic translation
serabile 10f7eab
Fix registration
superyass File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
"contributors_title": "contributors", | ||
"education_description": "Get smarter, develop new skills and continue growing", | ||
"education_title": "education", | ||
"email_hint": "Sign up with [email protected]", | ||
"employment_description": "Start networking, get an internship, a job or start new business", | ||
"employment_title": "employment", | ||
"follow_us": "follow us", | ||
|
@@ -23,11 +24,14 @@ | |
"language_title": "language", | ||
"media-and-communication_description": "Get inspired and learn from other people’s lives and experiences.", | ||
"media-and-communication_title": "media & communication", | ||
"newsletter_description": "lorem ipsum in collaboration with this and that date", | ||
"newsletter_title": "newsletter", | ||
"refugee_tech_info": "We build bridges between parts of the society to enable newcomers potential relying on efficiently designed and developed solutions", | ||
"setelin_description": "Setelin was created as a result of a hackathon that was organised by Refugee Tech, together with Migrationsverket and STHLM TECH. The hackathon joined forces of Swedish tech initiatives who deal with social topics.", | ||
"setelin_footer": null, | ||
"setelin_header": null, | ||
"social_description": "Friends make us who we are, find new friends and meet new folks.", | ||
"social_title": "Social", | ||
"social_title": "social", | ||
"subscribe_label": "subscribe", | ||
"visit_us": "visit us" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.newsletter-content { | ||
margin: 0px 0px 0px 15px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ $translateProvider.translations("ar", { | |
"contributors_title": null, | ||
"education_description": "قم بتطوير خبراتك المعرفية و تنمية مهاراتك من اجل مستقبل أفضل", | ||
"education_title": "تعليم", | ||
"email_hint": null, | ||
"employment_description": "ابحث عن فرص شغل او تكوين مهني، التق بمهنيين بنفس اهتماماتك", | ||
"employment_title": "شغل", | ||
"follow_us": null, | ||
|
@@ -24,12 +25,17 @@ $translateProvider.translations("ar", { | |
"language_title": "لغات", | ||
"media-and-communication_description": "تّعرف على قصص ملهمة، و تجارب مثيرة غيرت حياة الناس", | ||
"media-and-communication_title": "إعلام و مواصلات", | ||
"newsletter_description": null, | ||
"newsletter_title": null, | ||
"newsletter_registration_info": " تم تسجيل البريد الاكتروني ", | ||
"newsletter_registration_exist": "ﻫﺬﺍ ﺍﻟﺒﺮﻳﺪ ﺍﻹﻟﻜﺘﺮﻭﻧﻰ ﻣﺴﺠﻞ", | ||
"refugee_tech_info": "نقوم بتوحيد جهود المجتمع، من اجل مساعدة القادمين الجدد. نقوم بذلك من خلال توظيف تكنولجيات وخدم معدة لذلك ", | ||
"setelin_description": "تم إنشاء 'ستل إن' خلال هكاتون نظمته 'ريفوجي تك ' مع مصلحة الهجرة و 'ستكهولم تك '. خلال الهكاتون، تم توحيد جهود المبادرات التي تساعد اللاجئين في السويد من خلال إنشاء هذا التطبيق.\nقامت 'ريفوجي تك ' بعد ذلك بالسهر على إتمام التطبيق.", | ||
"setelin_footer": null, | ||
"setelin_header": null, | ||
"social_description": "قل لي من تعاشر، أقول لك من أنت. تعرف على أناس جدد و ابدأ صداقات جديدة", | ||
"social_title": "تواصل اجتماعي", | ||
"subscribe_label": null, | ||
"visit_us": null | ||
}); | ||
|
||
|
@@ -43,6 +49,7 @@ $translateProvider.translations("en", { | |
"contributors_title": "contributors", | ||
"education_description": "Get smarter, develop new skills and continue growing", | ||
"education_title": "education", | ||
"email_hint": "Sign up with [email protected]", | ||
"employment_description": "Start networking, get an internship, a job or start new business", | ||
"employment_title": "employment", | ||
"follow_us": "follow us", | ||
|
@@ -58,25 +65,31 @@ $translateProvider.translations("en", { | |
"language_title": "language", | ||
"media-and-communication_description": "Get inspired and learn from other people’s lives and experiences.", | ||
"media-and-communication_title": "media & communication", | ||
"newsletter_description": "lorem ipsum in collaboration with this and that date", | ||
"newsletter_title": "newsletter", | ||
"newsletter_registration_info": "Registration done", | ||
"newsletter_registration_exist": "This email is already registered", | ||
"refugee_tech_info": "We build bridges between parts of the society to enable newcomers potential relying on efficiently designed and developed solutions", | ||
"setelin_description": "Setelin was created as a result of a hackathon that was organised by Refugee Tech, together with Migrationsverket and STHLM TECH. The hackathon joined forces of Swedish tech initiatives who deal with social topics.", | ||
"setelin_footer": null, | ||
"setelin_header": null, | ||
"social_description": "Friends make us who we are, find new friends and meet new folks.", | ||
"social_title": "Social", | ||
"social_title": "social", | ||
"subscribe_label": "subscribe", | ||
"visit_us": "visit us" | ||
}); | ||
|
||
$translateProvider.translations("fa", { | ||
"about_us": "درباره ما", | ||
"add_your_app": null, | ||
"add_your_app": "اپليكشن خود را اضافه كنيد", | ||
"categories": "دسته بندی ها", | ||
"choose_language": "انتخاب زبان", | ||
"contact": null, | ||
"contributors_description": null, | ||
"contributors_title": null, | ||
"education_description": "باهوش تر شوید و مهارت هایتان را بیافزایید", | ||
"education_title": "تحصیلات", | ||
"email_hint": null, | ||
"employment_description": "با دیگران ارتباط برقرار کنید،تا کارآموزی ويا شغل ثابت بگیرید", | ||
"employment_title": "استخدام", | ||
"follow_us": null, | ||
|
@@ -92,12 +105,17 @@ $translateProvider.translations("fa", { | |
"language_title": "زبان", | ||
"media-and-communication_description": "از زندگی وتجربیات دیگران الهام بگیرید", | ||
"media-and-communication_title": "رسانه و ارتباطات", | ||
"refugee_tech_info": "نهج حصلت على أي أفكار التطبيق المباشر لهم RT إذا المطور يريد تحميل التطبيق .", | ||
"newsletter_description": null, | ||
"newsletter_title": null, | ||
"newsletter_registration_info": null, | ||
"newsletter_registration_exist": null, | ||
"refugee_tech_info": "ما پلى هستيم بين بخش هاى مختلف جامعه تا به وسيله ى تكنولوژى و راه حل هاى سازمان يافته، توانايى هاى مهاجران را شكوفا كنيم.", | ||
"setelin_description": "ستلین در یک هکتن با مدیریت رفیوجی تک و همکاری اداره ی مهاجرت و استکهلم تک شکل گرفت. این محفل پروژه هایی که هدف کمک کردن به مسائل اجتماعی دارند را دور هم جمع کرد.\nرفیوجی تک مسؤلیت توسعه وتکمیل کردن پلتفرم ستلین را ، با یاری داوطلبان و همکاران دیگر، به عهده گرفت.", | ||
"setelin_footer": null, | ||
"setelin_header": null, | ||
"social_description": "دوستان جدید بیابید و با مردمان جدید آشنا شوید", | ||
"social_title": "اجتماعي", | ||
"subscribe_label": null, | ||
"visit_us": null | ||
}); | ||
|
||
|
@@ -111,6 +129,7 @@ $translateProvider.translations("sv", { | |
"contributors_title": "volontärer", | ||
"education_description": "Bli mer skicklig, utveckla nya kompetenser och fortsätt växa", | ||
"education_title": "utbildning", | ||
"email_hint": null, | ||
"employment_description": "Börja nätverka, få ett internship, ett jobb eller starta eget företag", | ||
"employment_title": "jobb", | ||
"follow_us": "följ oss", | ||
|
@@ -126,12 +145,17 @@ $translateProvider.translations("sv", { | |
"language_title": "språk", | ||
"media-and-communication_description": "Bli inspirerad och ta lärdom från andra människors liv och erfarenheter", | ||
"media-and-communication_title": "media & kommunikation", | ||
"newsletter_description": null, | ||
"newsletter_title": "nyhetsbrev", | ||
"newsletter_registration_info": null, | ||
"newsletter_registration_exist": null, | ||
"refugee_tech_info": "Vi möjligör samarbete mellan alla delar av samhället med målet att tillvarata potentialen hos nyanlända genom effektivt designade och utvecklade lösningar", | ||
"setelin_description": "Setelin är resultatet från ett hackathon organiserat av Refugee Tech tillsammans med Migrationsverket och STHLM TECH.\nRefugee Tech tog på sig att vidareutveckla plattformen tillsammans med voluntärer.", | ||
"setelin_footer": null, | ||
"setelin_header": null, | ||
"social_description": "Vänner gör oss till dem vi är, hitta nya vänner och skapa nya bekantskaper", | ||
"social_title": "socialt", | ||
"subscribe_label": null, | ||
"visit_us": "besök oss" | ||
}); | ||
}]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,6 +153,73 @@ angular.module('starter.controllers', []) | |
$scope.closeapp() | ||
} | ||
|
||
$ionicModal.fromTemplateUrl('templates/newsletter.html', { | ||
scope: $scope | ||
}).then(function(modal) { | ||
$scope.newsletterModal = modal | ||
}) | ||
|
||
// Triggered in the about modal to close it | ||
$scope.closeNewsletter = function() { | ||
$scope.newsletterModal.hide() | ||
} | ||
|
||
// Open the about aboutModal | ||
$scope.showNewsletter = function() { | ||
$scope.newsletterModal.show() | ||
} | ||
|
||
// Call email registration | ||
$scope.newsletterEmail = null; | ||
// by default hide info message | ||
$scope.showInfo = "ng-hide" | ||
$scope.messageInfo = "newsletter_registration_info" | ||
|
||
$scope.registerEmail = function(email) { | ||
|
||
API.registerEmail(email).$promise.then(function(res) { | ||
//console.log(res); | ||
if(res.status === "exists"){ | ||
$scope.messageInfo = "newsletter_registration_exist" | ||
} else if(res.status === "success") { | ||
$scope.messageInfo = "newsletter_registration_info" | ||
} | ||
|
||
$scope.hideForm = "ng-hide" | ||
$scope.showInfo = "ng-show" | ||
}) | ||
|
||
} | ||
|
||
|
||
// Email validation | ||
/*$scope.validEmail = function(email){ | ||
console.log("newsletterEmail="+email) | ||
var valid = angular.element($scope.binding('mailForm.input.$valid')) | ||
var text = angular.element($scope.binding('newsletterEmail')) | ||
var input = angular.element(email) | ||
|
||
it('should init to model', function(){ | ||
expect(email).toContain('[email protected]') | ||
expect(valid.getText()).toContain('true') | ||
}) | ||
|
||
it('should be invalid if empty', function(){ | ||
input.clear() | ||
input.sendKeys('') | ||
expect(text.getText()).toEqual('text=') | ||
expect(valid.getText()).toContain('false') | ||
}) | ||
|
||
it('should be invalid if not email', function(){ | ||
input.clear() | ||
input.sendKeys('xxx') | ||
expect(valid.getText()).toContain('false') | ||
}) | ||
|
||
}*/ | ||
|
||
|
||
$ionicModal.fromTemplateUrl('templates/about.html', { | ||
scope: $scope | ||
}).then(function(modal) { | ||
|
@@ -169,12 +236,6 @@ angular.module('starter.controllers', []) | |
$scope.aboutModal.show() | ||
} | ||
|
||
// Perform the about action when the user submits the app form | ||
$scope.doapp = function() { | ||
$scope.closeapp() | ||
} | ||
|
||
|
||
/* Begin Favorite functions */ | ||
|
||
$scope.toggleFavorites = function() { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff a/www/js/controllers.js b/www/js/controllers.js (rejected hunks) | ||
@@ -169,6 +169,12 @@ | ||
$scope.newsletterModal.show() | ||
} | ||
|
||
+ $scope.newsletterEmail = null; | ||
+ $scope.registerEmail = function(email) { | ||
+ console.log(email); | ||
+ API.registerEmail(email) | ||
+ } | ||
+ | ||
$ionicModal.fromTemplateUrl('templates/about.html', { | ||
scope: $scope | ||
}).then(function(modal) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to implement and try this out with the backend before merging.