Commit 18c23e89 authored by PhoeniX's avatar PhoeniX

User interests/about

parent 330367e4
......@@ -367,6 +367,73 @@ Blocks.page = (function(){
if (ls) ls.remove();
if (personal.childNodes.length == 0) personal.remove();
personal = fullinfo.appendChild(personal.cloneNode(false));
if (user.activities) {
var activities = personal.appendChild(item.cloneNode()), title = ttitle.cloneNode();
title.innerHTML = 'Деятельность';
activities.appendChild(title);
activities.appendChild(document.createTextNode(user.activities));
ls = personal.appendChild(sep.cloneNode());
}
if (user.interests) {
var interests = personal.appendChild(item.cloneNode()), title = ttitle.cloneNode();
title.innerHTML = 'Интересы';
interests.appendChild(title);
interests.appendChild(document.createTextNode(user.interests));
ls = personal.appendChild(sep.cloneNode());
}
if (user.music) {
var music = personal.appendChild(item.cloneNode()), title = ttitle.cloneNode();
title.innerHTML = 'Любимая музыка';
music.appendChild(title);
music.appendChild(document.createTextNode(user.music));
ls = personal.appendChild(sep.cloneNode());
}
if (user.movies) {
var movies = personal.appendChild(item.cloneNode()), title = ttitle.cloneNode();
title.innerHTML = 'Любимые фильмы';
movies.appendChild(title);
movies.appendChild(document.createTextNode(user.movies));
ls = personal.appendChild(sep.cloneNode());
}
if (user.tv) {
var tv = personal.appendChild(item.cloneNode()), title = ttitle.cloneNode();
title.innerHTML = 'Любимые телешоу';
tv.appendChild(title);
tv.appendChild(document.createTextNode(user.tv));
ls = personal.appendChild(sep.cloneNode());
}
if (user.books) {
var books = personal.appendChild(item.cloneNode()), title = ttitle.cloneNode();
title.innerHTML = 'Любимые книги';
books.appendChild(title);
books.appendChild(document.createTextNode(user.books));
ls = personal.appendChild(sep.cloneNode());
}
if (user.games) {
var games = personal.appendChild(item.cloneNode()), title = ttitle.cloneNode();
title.innerHTML = 'Любимые игры';
games.appendChild(title);
games.appendChild(document.createTextNode(user.games));
ls = personal.appendChild(sep.cloneNode());
}
if (user.quotes) {
var quotes = personal.appendChild(item.cloneNode()), title = ttitle.cloneNode();
title.innerHTML = 'Любимые цитаты';
quotes.appendChild(title);
quotes.appendChild(document.createTextNode(user.quotes));
ls = personal.appendChild(sep.cloneNode());
}
if (user.about) {
var about = personal.appendChild(item.cloneNode()), title = ttitle.cloneNode();
title.innerHTML = 'О себе';
about.appendChild(title);
about.appendChild(document.createTextNode(user.about));
ls = personal.appendChild(sep.cloneNode());
}
if (ls) ls.remove();
if (personal.childNodes.length == 0) personal.remove();
for (var i in {
"uid": 1,
"first_name": 1,
......@@ -391,7 +458,17 @@ Blocks.page = (function(){
"occupation": 1,
"relatives": 1,
"personal": 1,
"relation": 1
"relation": 1,
"sex": 1,
"interests": 1,
"books": 1,
"games": 1,
"music": 1,
"activities": 1,
"tv": 1,
"movies": 1,
"quotes": 1,
"about": 1,
}) delete(user[i]);
var dbg = block.appendChild(document.createElement('pre'));
......
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