tags.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 function refresh()
00026 {
00027   GoTo('thisPage');
00028 }
00029 
00030 function unfix()
00031 {
00032   SendEvent('tags', 'set_rev', 'rev=HEAD');
00033 }
00034 
00035 function set_rev(txtbox)
00036 {
00037   var rev = txtbox.value;
00038   if (rev=='')  return;
00039   SendEvent('tags', 'set_rev', 'rev='+rev);
00040 }
00041 
00042 function set_date(txtbox)
00043 {
00044   var date = txtbox.value;
00045   if (date=='')  return;
00046   SendEvent('tags', 'set_date', 'date='+date);
00047 }
00048 
00049 function set_tag(lstbox)
00050 {
00051   var idx = lstbox.selectedIndex;
00052   var tag = lstbox.options[idx].value;
00053   SendEvent('tags', 'set_tag', 'tag='+tag);
00054 }
00055 
00056 function add_tag(txtbox)
00057 {
00058   var tag = txtbox.value;
00059   var msg = T_("You are adding the tag 'v_tag' for the currently selected revision.");
00060   msg = msg.replace(/v_tag/, tag);
00061 
00062   if (tag=='')  return;
00063 
00064   if (confirm(msg))
00065     {
00066       SendEvent('tags', 'add_tag', 'tag='+tag);
00067     }
00068 }
00069 
00070 function del_tag(txtbox)
00071 {
00072   var tag = txtbox.value;
00073   var msg = T_("You are deleting the tag: v_tag !").replace(/v_tag/, tag);
00074 
00075   if (tag=='')  return;
00076 
00077   if (confirm(msg))
00078     {
00079       SendEvent('tags', 'del_tag', 'tag='+tag);
00080     }
00081   else
00082     {
00083       txtbox.value = '';
00084     }
00085 }

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