Skip to content

Commit

Permalink
be able to add members just after creating a group
Browse files Browse the repository at this point in the history
  • Loading branch information
lduboeuf committed Jan 5, 2017
1 parent ba85fee commit d186a4e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 19 deletions.
2 changes: 1 addition & 1 deletion scripts/spapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
url += ':' + param;

if (location.hash=="" || location.hash!==url){
history.pushState(null, null, "#" + pageName);
history.pushState(null, null, url);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/team-add.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ app.page("team-add", function()
e.preventDefault();
if ($nameInput.value.length>0){

remoteStorage.teams.store({ "name": $nameInput.value}).then(function(){
history.back();
remoteStorage.teams.store({ "name": $nameInput.value}).then(function(team){
app('team-list-details',team.id);
});


Expand Down
3 changes: 0 additions & 3 deletions scripts/team-member-add.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ app.page("team-member-add", function()
function(){
history.back();
});
//TeamRepository.addMember(selectedTeamId, { name: nameInput.value});



}else {
//handle error msg
Expand Down
34 changes: 22 additions & 12 deletions styles/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,21 @@ body {
h2 { font-size: 1.10em; margin-top: 0;}
h3 { font-size: 1em; }

a {
text-decoration: none;
}

/* all sections are off by default */
body > section {
margin: 1em;
margin:1em;
display:none;
}

section > div {
width:50%;
margin:auto;
}


body.about > section#about,
body.home > section#home,
Expand Down Expand Up @@ -52,14 +61,8 @@ body> header {
top:0;
width: 100%;
}
table td{
padding:0;
}

a {
text-decoration: none;
/*color: #4078c0;*/
}

header h2{
display: inline-block;
}
Expand All @@ -71,7 +74,6 @@ header h2{
}

body .brand {
/*float: left;*/
padding: 14px 12px;
text-align: left;
}
Expand Down Expand Up @@ -145,6 +147,12 @@ ul.topnav li.icon {
display: none;
}

section > div {
width:100%;
margin:auto;
}


#remotestorage-widget{
right: 8px !important;
top: 0px !important;
Expand Down Expand Up @@ -219,7 +227,7 @@ ul.topnav li.icon {

/***forms***/

#tool-build-teams,#tool-find-members, #tool-next-member form{
#tool-build-teams form ,#tool-find-members form, #tool-next-member form{
border: 1px solid #dbdbdb;
border-radius: 4px;
padding:8px;
Expand All @@ -241,7 +249,7 @@ ul.topnav li.icon {
padding:8px;
font-weight: 700;
box-shadow: 1px 1px 0px #dbdbdb;
background-color: #727F9B;
background-color: #495A80;
text-align: center;
}

Expand Down Expand Up @@ -339,7 +347,8 @@ textarea{

/*forms for mobiles*/
@media screen and (max-width:680px) {
input[type=text], select, textarea, button, form {

input[type=text], select, textarea, button {
width: 100%;
}
input[type="radio"] {
Expand All @@ -351,6 +360,7 @@ textarea{
.actions {
width:100%;
}

}


Expand Down
2 changes: 1 addition & 1 deletion templates/tool-next-member.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h2><a href="javascript:void(0);" onclick="history.back();" class="link-home">&#
{{ for(var prop in it) { }}
<option value="{{=it[prop].id}}">{{=it[prop].name}} ({{=it[prop].members.length}})</option>
{{ } }}

<option value="-1">--all groups--</option>
</select>

</form>
Expand Down

0 comments on commit d186a4e

Please sign in to comment.