Commit 6a66b814 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie

Added a "go" button to the userlist element. Fixed problem occuring when no

results were returned.
parent c5e255a5
......@@ -17,22 +17,25 @@
});
replaceChildNodes('{{$name}}_potential');
forEach(users.data, function(user) {
if (members[user.id]) {
return;
}
appendChildNodes('{{$name}}_potential',OPTION({'value':user.id},user.name));
});
if(users.count > users.limit) {
replaceChildNodes('{{$name}}_messages',
DIV(null,
'Only showing first ',
SPAN({'id': '{{$name}}_userlimit'}, users.limit),
' results of ',
SPAN({'id': '{{$name}}_usercount'}, users.count - counter)
)
);
if (users.data) {
forEach(users.data, function(user) {
if (members[user.id]) {
return;
}
appendChildNodes('{{$name}}_potential',OPTION({'value':user.id},user.name));
});
if(users.count > users.limit) {
replaceChildNodes('{{$name}}_messages',
DIV(null,
'Only showing first ',
SPAN({'id': '{{$name}}_userlimit'}, users.limit),
' results of ',
SPAN({'id': '{{$name}}_usercount'}, users.count - counter)
)
);
}
}
});
}
......@@ -49,6 +52,11 @@
k.stop();
}
});
connect('{{$name}}_search_btn', 'onclick', function(e) {
{{$name}}_searchfunc($('{{$name}}_search').value);
e.stop();
});
});
function {{$name}}_moveopts(from,to) {
......@@ -131,7 +139,7 @@
</tr>
<tr>
<td colspan="3">
<label for="{{$name}}_search">Search:</label><input id="{{$name}}_search" type="text">
<label for="{{$name}}_search">Search:</label><input id="{{$name}}_search" type="text"> <button id="{{$name}}_search_btn" type="button" class="button">{{str tag="go"}}</button>
</td>
</tr>
</table>
......
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