OSDN Git Service

コピーライトを2007から2009に変更
[nucleus-jp/nucleus-jp-ancient.git] / utf8 / nucleus / javascript / admin.js
1 /**
2   * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/) 
3   * Copyright (C) 2002-2009 The Nucleus Group
4   *
5   * This program is free software; you can redistribute it and/or
6   * modify it under the terms of the GNU General Public License
7   * as published by the Free Software Foundation; either version 2
8   * of the License, or (at your option) any later version.
9   * (see nucleus/documentation/index.html#license for more info)
10   *  
11   * Some JavaScript code for the admin area
12   *
13   * $Id: admin.js,v 1.7 2008-02-08 09:31:22 kimitake Exp $
14   * $NucleusJP: admin.js,v 1.6.2.1 2007/09/05 05:58:56 kimitake Exp $
15   */
16
17 function help(url) {
18         popup = window.open(url,'helpwindow','status=no,toolbar=yes,scrollbars=yes,resizable=yes,width=500,height=500,top=0,left=0');
19         if (popup.focus) popup.focus();
20         if (popup.GetAttention) popup.GetAttention();
21         return false;
22 }                               
23
24 var oldCellColor = "#000";
25 function focusRow(row) {
26         var cells = row.cells;
27         if (!cells) return;
28         oldCellColor = cells[0].style.backgroundColor;
29         for (var i=0;i<cells.length;i++) {
30                 cells[i].style.backgroundColor='whitesmoke';
31         }
32 }
33 function blurRow(row) {
34         var cells = row.cells;
35         if (!cells) return;
36         for (var i=0;i<cells.length;i++) {
37                 cells[i].style.backgroundColor=oldCellColor;
38         }
39 }
40 function batchSelectAll(what) {
41         var i = 0;
42         var el;
43         while (el = document.getElementById('batch' + i)) {
44                 el.checked = what?'checked':'';
45                 i++;
46         }
47         return false;                                   
48 }
49 function selectCanLogin(flag) {
50         if (flag) {
51                 window.document.memberedit.canlogin[0].checked=true;
52
53                 // don't disable canlogin[0], otherwise the value won't be passed.
54 //              window.document.memberedit.canlogin[0].disabled=true;
55                 window.document.memberedit.canlogin[1].disabled=true;
56         } else {
57                 window.document.memberedit.canlogin[0].disabled=false;
58                 window.document.memberedit.canlogin[1].disabled=false;
59         }
60 }