uList.js

Go to the documentation of this file.
00001 // -*-C-*- //tell emacs to use C mode
00002 /*
00003   This file is part of  DocBookWiki.  DocBookWiki is a web application
00004   that displays and edits DocBook documents.
00005 
00006   Copyright (C) 2004, 2005, 2006, 2007
00007   Dashamir Hoxha, dashohoxha@users.sourceforge.net
00008 
00009   DocBookWiki is free software;  you can redistribute it and/or modify
00010   it under the terms of the GNU General Public License as published by
00011   the Free  Software Foundation; either  version 2 of the  License, or
00012   (at your option) any later version.
00013 
00014   DocBookWiki is distributed  in the hope that it  will be useful, but
00015   WITHOUT  ANY   WARRANTY;  without  even  the   implied  warranty  of
00016   MERCHANTABILITY or  FITNESS FOR A  PARTICULAR PURPOSE.  See  the GNU
00017   General Public License for more details.
00018 
00019   You should  have received a copy  of the GNU  General Public License
00020   along  with  DocBookWiki;  if   not,  write  to  the  Free  Software
00021   Foundation, Inc., 59 Temple  Place, Suite 330, Boston, MA 02111-1307
00022   USA
00023 */
00024 
00025 
00026 function select_user(username)
00027 {
00028   SendEvent('uList', 'select', 'username='+username);
00029 }
00030 
00031 function delete_user(username)
00032 {
00033   SendEvent('uList', 'delete', 'username='+username);
00034 }
00035 
00036 function next_page(page)
00037 {
00038   SendEvent('uList', 'next', 'page='+page);
00039 }
00040 
00041 function add_user()
00042 {
00043   var form = document.adduser;
00044   var user = form.new_user.value;
00045   if (user=='')
00046     {
00047       alert(T_("Please give a username."));
00048       form.new_user.focus();
00049       return;
00050     }
00051   SendEvent('uList', 'add_user', 'user='+user);
00052 }
00053 
00054 function set_user(list)
00055 {
00056   var idx = list.selectedIndex;
00057   var user = list.options[idx].value;
00058   var form = document.adduser;
00059   form.new_user.value = user;
00060   form.new_user.focus();
00061 }

Generated on Wed Jan 9 08:27:32 2008 for DokBookWiki by  doxygen 1.5.2