1
1
Fork 0

manage-selector: some cleanup and css work

This commit is contained in:
rabuzarus 2015-10-25 16:49:45 +01:00
parent e0e6762ed8
commit bac61cf596
5 changed files with 144 additions and 37 deletions

View file

@ -99,16 +99,17 @@ function manage_content(&$a) {
$identities = $a->identities;
//getting profile pics for delegates
//getting additinal information for each identity
foreach ($identities as $key=>$id) {
$thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = %d AND `name` = '%s' AND `nick` = '%s' AND (network = 'dfrn' OR self = 1)",
$thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = %d AND `name` = '%s' AND `nick` = '%s' AND (`network` = '%s' OR `self` = 1)",
intval($a->user['uid']),
dbesc($id['username']),
dbesc($id['nickname'])
dbesc($id['nickname']),
dbesc(NETWORK_DFRN)
);
$identities[$key][thumb] = $thumb[0][thumb];
$identities[$key]['selected'] = (($id['nickname'] === $a->user['nickname']) ? ' selected="selected" ' : '');
$identities[$key]['selected'] = (($id['nickname'] === $a->user['nickname']) ? true : false);
}
$o = replace_macros(get_markup_template('manage.tpl'), array(

View file

@ -212,3 +212,48 @@ a {
clip: rect(0,0,0,0);
border: 0;
}
.itentity-match-wrapper {
float: left;
padding: 10px;
width: 120px;
height: 140px;
margin-bottom: 20px;
}
.identity-match-photo {
float: left;
text-align: center;
width: 120px;
}
.identity-match-name {
text-align: center;
}
.identity-match-details {
float: left;
text-align: center;
width: 120px;
overflow: hidden;
font-size: 10px;
font-weight: 500;
color: #999999;
}
.identity-match-break, .identity-match-end {
clear: both;
}
.identity-match-photo button {
border: none;
padding: 0;
margin: 0;
background: none;
height: 80px;
width: 80px;
}
.selected-identity img {
border: 2px solid #ff0000;
}

View file

@ -2,32 +2,29 @@
<h3>{{$title}}</h3>
<div id="identity-manage-desc">{{$desc}}</div>
<div id="identity-manage-choose">{{$choose}}</div>
{{*<div id="identity-selector-wrapper">
<form action="manage" method="post" >
<select name="identity" size="10" onchange="this.form.submit();" >
{{foreach $identities as $id}}
<option {{$id.selected}} value="{{$id.uid}}">{{$id.username}} ({{$id.nickname}})</option>
{{/foreach}}
</select>
<div id="identity-select-break"></div>
</form>
</div>*}}
<div id="identity-selector-wrapper">
<form action="manage" method="post" >
{{foreach $identities as $id}}
<button name="identity" value="{{$id.uid}}" onclick="this.form.submit();" class="id-selection-photo-link" title="{{$id.username}}"><img class="channel-photo" src="{{$id.thumb}}" alt="{{$id.username}}" /></button>
<div class="itentity-match-wrapper {{if $id.selected}}selected-identity{{/if}}" id="identity-match-{{$id.uid}}">
<div class="identity-match-photo" id="identity-match-photo-{{$id.uid}}">
<button name="identity" value="{{$id.uid}}" onclick="this.form.submit();" title="{{$id.username}}">
<img src="{{$id.thumb}}" alt="{{$id.username}}" />
</button>
</div>
<div class="identity-match-break"></div>
<div class="identity-match-desc">
<div class="identity-match-name" id="identity-match-name-{{$id.uid}}">{{$id.username}}</div>
<div class="identity-match-details" id="identity-match-nick-{{$id.uid}}">({{$id.nickname}})</div>
</div>
<div class="identity-match-end"></div>
</div>
{{/foreach}}
{{*<!--<input id="identity-submit" type="submit" name="submit" value="{{$submit}}" />-->*}}
</form>
</div>

View file

@ -3234,17 +3234,49 @@ aside input[type='text'] {
margin: 10px;
}
#identity-manage-desc {
margin-top:15px;
margin-bottom: 15px;
.itentity-match-wrapper {
float: left;
padding: 10px;
width: 120px;
height: 140px;
margin-bottom: 20px;
}
#identity-manage-choose {
margin-bottom: 15px;
.identity-match-photo {
float: left;
text-align: center;
width: 120px;
}
#identity-submit {
margin-top: 20px;
.identity-match-name {
text-align: center;
}
.identity-match-details {
float: left;
text-align: center;
width: 120px;
overflow: hidden;
font-size: 10px;
font-weight: 500;
color: #999999;
}
.identity-match-break, .identity-match-end {
clear: both;
}
.identity-match-photo button {
border: none;
padding: 0;
margin: 0;
background: none;
height: 80px;
width: 80px;
}
.selected-identity img {
border: 2px solid #ff0000;
}
#photo-nav {

View file

@ -3006,17 +3006,49 @@ aside input[type='text'] {
margin: 10px;
}
#identity-manage-desc {
margin-top:15px;
margin-bottom: 15px;
.itentity-match-wrapper {
float: left;
padding: 10px;
width: 120px;
height: 140px;
margin-bottom: 20px;
}
#identity-manage-choose {
margin-bottom: 15px;
.identity-match-photo {
float: left;
text-align: center;
width: 120px;
}
#identity-submit {
margin-top: 20px;
.identity-match-name {
text-align: center;
}
.identity-match-details {
float: left;
text-align: center;
width: 120px;
overflow: hidden;
font-size: 10px;
font-weight: 500;
color: #999999;
}
.identity-match-break, .identity-match-end {
clear: both;
}
.identity-match-photo button {
border: none;
padding: 0;
margin: 0;
background: none;
height: 80px;
width: 80px;
}
.selected-identity img {
border: 2px solid #ff0000;
}
#photo-prev-link, #photo-next-link {