Commit df15b6bd by Piotr Mitros

Merge

parents 6cbc7c9e 64a4afe8
...@@ -29,8 +29,9 @@ $(function() { ...@@ -29,8 +29,9 @@ $(function() {
loc=false; loc=false;
$("#location_sub").html('<input id="id_loc_text" type="text" name="loc_text" />'+ $("#location_sub").html('<form>'+'<input id="id_loc_text" type="text" name="loc_text" />'+
'<input type="button" id="change_loc_button" value="Change" />'); '<input type="submit" id="change_loc_button" value="Save" />'+'</form>');
$("#change_loc_button").click(function() { $("#change_loc_button").click(function() {
$("#change_location").show(); $("#change_location").show();
...@@ -50,8 +51,8 @@ $(function() { ...@@ -50,8 +51,8 @@ $(function() {
if(lang) { if(lang) {
lang=false; lang=false;
$("#language_sub").html('<input id="id_lang_text" type="text" name="lang_text" />'+ $("#language_sub").html('<form>'+'<input id="id_lang_text" type="text" name="lang_text" />'+
'<input type="button" id="change_lang_button" value="Change" />'); '<input type="submit" id="change_lang_button" value="Save" />'+'</form>');
$("#change_lang_button").click(function() { $("#change_lang_button").click(function() {
$("#change_language").show(); $("#change_language").show();
postJSON('/change_setting', {'language':$("#id_lang_text").attr("value")}, function(json) { postJSON('/change_setting', {'language':$("#id_lang_text").attr("value")}, function(json) {
...@@ -140,15 +141,13 @@ $(function() { ...@@ -140,15 +141,13 @@ $(function() {
<li>Forum name: <strong>${username}</strong></li> <li>Forum name: <strong>${username}</strong></li>
<li>E-mail: <strong>${email}</strong></li> <li>E-mail: <strong>${email}</strong></li>
<li> <li>
Location: <div id="location_sub">${location}</div><div id="description"></div> <a href="#" id="change_location">Change</a> Location: <div id="location_sub">${location}</div><div id="description"></div> <a href="#" id="change_location">Edit</a>
</li> </li>
<li> <li>
Language: <div id="language_sub">${language}</div> <a href="#" id="change_language">Change</a> Language: <div id="language_sub">${language}</div> <a href="#" id="change_language">Edit</a>
</li> </li>
</ul> </ul>
<!-- <div><a class="modal" href="#change_password_pop">Reset password</a></div> -->
<div id="change_password_pop"> <div id="change_password_pop">
<h2>Password change</h2> <h2>Password change</h2>
<p>We'll e-mail a password reset link to ${email}.</p> <p>We'll e-mail a password reset link to ${email}.</p>
......
...@@ -26,13 +26,26 @@ div.profile-wrapper { ...@@ -26,13 +26,26 @@ div.profile-wrapper {
@include box-shadow(0 1px 0 #eee); @include box-shadow(0 1px 0 #eee);
padding: 7px lh(); padding: 7px lh();
border-bottom: 1px solid #d3d3d3; border-bottom: 1px solid #d3d3d3;
position: relative;
div#location_sub, div#language_sub { div#location_sub, div#language_sub {
font-weight: bold; font-weight: bold;
@include inline-block(); @include inline-block();
form {
width: 100%;
}
input { input {
margin: lh(.5) 0;
&[type="text"] {
margin: lh(.5) 0;
width: 100%;
@include box-sizing(border-box);
}
&[type="input"]{
}
} }
&:empty { &:empty {
...@@ -43,6 +56,19 @@ div.profile-wrapper { ...@@ -43,6 +56,19 @@ div.profile-wrapper {
div#description { div#description {
font-size: 12px; font-size: 12px;
} }
a#change_language, a#change_location {
position: absolute;
top: 9px;
right: lh(.5);
text-transform: uppercase;
font-size: 12px;
color: #999;
&:hover {
color: #555;
}
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment