OSDN Git Service

merged 3.2 original code
[nucleus-jp/nucleus-jp-ancient.git] / utf8 / nucleus / javascript / admin.js
1 /**\r
2   * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/) \r
3   * Copyright (C) 2002-2005 The Nucleus Group\r
4   *\r
5   * This program is free software; you can redistribute it and/or\r
6   * modify it under the terms of the GNU General Public License\r
7   * as published by the Free Software Foundation; either version 2\r
8   * of the License, or (at your option) any later version.\r
9   * (see nucleus/documentation/index.html#license for more info)\r
10   *  \r
11   * Some JavaScript code for the admin area\r
12   *\r
13   * $Id: admin.js,v 1.3 2005-03-12 06:19:04 kimitake Exp $\r
14   * $NucleusJP$\r
15   */\r
16 \r
17 function help(url) {\r
18         popup = window.open(url,'helpwindow','status=no,toolbar=yes,scrollbars=yes,resizable=yes,width=500,height=500,top=0,left=0');\r
19         if (popup.focus) popup.focus();\r
20         if (popup.GetAttention) popup.GetAttention();\r
21         return false;\r
22 }                               \r
23 \r
24 var oldCellColor = "#000";\r
25 function focusRow(row) {\r
26         var cells = row.cells;\r
27         if (!cells) return;\r
28         oldCellColor = cells[0].style.backgroundColor;\r
29         for (var i=0;i<cells.length;i++) {\r
30                 cells[i].style.backgroundColor='whitesmoke';\r
31         }\r
32 }\r
33 function blurRow(row) {\r
34         var cells = row.cells;\r
35         if (!cells) return;\r
36         for (var i=0;i<cells.length;i++) {\r
37                 cells[i].style.backgroundColor=oldCellColor;\r
38         }\r
39 }\r
40 function batchSelectAll(what) {\r
41         var i = 0;\r
42         var el;\r
43         while (el = document.getElementById('batch' + i)) {\r
44                 el.checked = what?'checked':'';\r
45                 i++;\r
46         }\r
47         return false;                                   \r
48 }\r
49 \r