Skip to content
This repository has been archived by the owner on Aug 21, 2018. It is now read-only.

Commit

Permalink
[#636] VIP link Login (#669)
Browse files Browse the repository at this point in the history
  • Loading branch information
razu9861 committed Mar 23, 2017
1 parent 358a64b commit e034b72
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
10 changes: 10 additions & 0 deletions app/nation/app/Home-Urdu.css
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,11 @@ h1,h2,h3,h4,h5,h6{
margin-left: 35%;
width: 370px;
}
.date-picker {
width: 300px;
float: left;
margin-bottom: 6px;
}

#olelogo
{
Expand All @@ -314,6 +319,11 @@ h1,h2,h3,h4,h5,h6{
padding-left: 183px;
padding-top: 31px;
}
#loginLang{
display: inline-flex;
float:left;
margin-top:10px;
}
#logo
{
width:50px;
Expand Down
11 changes: 11 additions & 0 deletions app/nation/app/Home.css
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,21 @@ h1,h2,h3,h4,h5,h6{
padding-left: 183px;
padding-top: 31px;
}
#loginLang{
display: inline-flex;
float:right;
margin-top:10px;
}
#nav{
display: flex;
text-align: center;
}
.date-picker {
width: 300px;
float: right;
margin-bottom: 6px;
}

#nav li{
display: inline-block;
text-align:center;
Expand Down
13 changes: 6 additions & 7 deletions app/nation/app/Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -3795,31 +3795,30 @@ $(function() {
});
nationConfig = nationConfig.first();
listCommunity = "<img src='img/logo.png' width='108px' height='108px' style='z-index:1; border:2px solid white;border-radius:60px;'/>";
listCommunity = listCommunity + "<h3> " + "Hi " + viplinkModel.attributes.name + "</h3>" + "<h3>" + App.languageDictValue.attributes.welcome_to + "&nbsp;" + nationConfig.get("name") + "&nbsp" + App.languageDictValue.attributes.Community + "</h3>";
}
if (!$.cookie('Member.login')){
var options = [];
var allLanguages={};
var languages = new App.Collections.Languages();
languages.fetch({
async: false
});
});
for(var i=0;i<languages.length;i++) {
if (languages.models[i].attributes.hasOwnProperty("nameOfLanguage")) {
var languageName =languages.models[i].attributes.nameOfLanguage;
allLanguages[languageName]=languages.models[i].get('nameInNativeLang');
options += '<option value="'+languageName+'">'+ allLanguages[languageName] +'</option>';
}
}
listCommunity += '<div align="center">'+'<select id="onLoginLanguage">'+options+'</select>'+'</div>'+'<br>';
listCommunity += "<div align='center'><a class='btn btn-success' href='../MyApp/index.html#login'>" + App.languageDictValue.attributes.Sign_In + "</a></div>";
listCommunity = "<img src='img/logo.png' width='108px' height='108px' style='z-index:1; border:2px solid white;border-radius:60px;'/>" +
'<div id = "loginLang" st><select id="onLoginLanguage">'+options+'</select>'+"&nbsp;&nbsp;"+"<a class='btn btn-success' href='../MyApp/index.html#login'>" + App.languageDictValue.attributes.Sign_In + "</a>"+'</div>';
}
else {//if logged in and token is not correct
listCommunity = listCommunity + "<h3> " + App.languageDictValue.attributes.Hi + "&nbsp;" + viplinkModel.attributes.name + "</h3>" + "<h3>" + App.languageDictValue.attributes.welcome_to + "&nbsp;" + nationConfig.get("name") + "&nbsp" + App.languageDictValue.attributes.Communities + "</h3>";
} else {//if logged in and token is not correct
listCommunity = "<h3> " + App.languageDictValue.get("Communities") + " | <a class='btn btn-success' id='addComm' href='#addCommunity'>" + App.languageDictValue.get("Add_Community") + "</a> </h3><p>" + App.languageDictValue.get("Member_Resources_Count") + "</p>";
}

if (firstDt.getFullYear() != today.getFullYear() || firstDt.getMonth() != today.getMonth()) {
listCommunity += '<input class="date-picker"/><style>.ui-datepicker-calendar{display: none;}.date-picker{width:300px;float:right;}</style>';
listCommunity += '<input class="date-picker"/><style>.ui-datepicker-calendar{display: none;}.date-picker{width:300px;}</style>';
}
listCommunity += "<div id='list-of-Communities'></div>"

Expand Down

0 comments on commit e034b72

Please sign in to comment.