INSERT INTO _widgets\r
(wd_id, wd_name, wd_version, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_has_admin, wd_use_instance_def, wd_initialized, wd_cache_type, wd_view_control_type, wd_install_dt, wd_create_dt) VALUES\r
('access_count', 'アクセスカウンター', '2.0.0', 'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'サイトのアクセス数を表示。', true, false,true, 0, 0, now(), now());\r
-DELETE FROM _widgets WHERE wd_id = 'dg_clock';\r
-INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_initialized, wd_launch_index, wd_cache_type, wd_view_control_type, wd_install_dt, wd_create_dt) VALUES\r
-('dg_clock', 'デジタル時計', 'DGCK', '1.0.0', '', 'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'デジタル時計。', false, true, false, false, false,true, 0, 0, -1, now(), now());\r
DELETE FROM _widgets WHERE wd_id = 'news';\r
INSERT INTO _widgets\r
(wd_id, wd_name, wd_version, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_add_script_lib_a, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_initialized, wd_launch_index, wd_cache_type, wd_view_control_type, wd_install_dt, wd_create_dt) VALUES\r
INSERT INTO _widgets\r
(wd_id, wd_name, wd_template_type, wd_version, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_add_script_lib, wd_add_script_lib_a, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_initialized, wd_launch_index, wd_cache_type, wd_view_control_type, wd_release_dt, wd_install_dt, wd_create_dt) VALUES\r
('contactus', '簡易お問い合わせ', 'bootstrap', '2.0.0', 'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'お問い合わせの入力データをメールで送る。', '', 'ckeditor_m3toolbar', true, true, true, false, false,true, 0, 0, 0, '2014-04-11', now(), now());\r
-DELETE FROM _widgets WHERE wd_id = 'joomla_clock';\r
-INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_initialized, wd_launch_index, wd_cache_type, wd_view_control_type, wd_install_dt, wd_create_dt) VALUES\r
-('joomla_clock', 'Joomla時計', 'JMCK', '1.0.0', '', 'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'Joomlaロゴの時計。', false, true, false, false, false,true, 0, 1, -1, now(), now());\r
DELETE FROM _widgets WHERE wd_id = 'qrcode';\r
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_initialized, wd_launch_index, wd_cache_type, wd_view_control_type, wd_install_dt, wd_create_dt) VALUES\r
('qrcode', 'QRコード', 'QRVW', '1.0.0', '', 'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'QRコードを作成表示。', false, false, true, true, true, true, false,true, 0, 1, -1, now(), now());\r
INSERT INTO _widgets\r
(wd_id, wd_name, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_initialized, wd_launch_index, wd_cache_type, wd_view_control_type, wd_install_dt, wd_create_dt) VALUES\r
('css_add', 'CSS追加', '2.0.0', '', 'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'テンプレートのCSSに加えてCSS定義を追加するためのウィジェットです。', false, false, true, true, true, false, true, true, 0, 3, 1, now(), now());\r
-DELETE FROM _widgets WHERE wd_id = 'effect_nicejforms';\r
-INSERT INTO _widgets\r
-(wd_id, wd_name, wd_status, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_add_script_lib, wd_add_script_lib_a, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_initialized, wd_launch_index, wd_cache_type, wd_view_control_type, wd_install_dt, wd_create_dt) VALUES\r
-('effect_nicejforms', 'effect_nicejforms(廃止予定)', -1, '1.0.0', '', 'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'フォーム部品を装飾するウィジェット。', 'jquery', 'jquery', true, false, false, true, true, false, true, true, 0, 1, 1, now(), now());\r
DELETE FROM _widgets WHERE wd_id = 'contactus_modal';\r
INSERT INTO _widgets\r
(wd_id, wd_name, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_add_script_lib, wd_add_script_lib_a, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_initialized, wd_launch_index, wd_cache_type, wd_view_control_type, wd_install_dt, wd_create_dt) VALUES\r
INSERT INTO _widgets\r
(wd_id, wd_name, wd_version, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_initialized, wd_launch_index, wd_cache_type, wd_view_control_type, wd_install_dt, wd_create_dt) VALUES\r
('bbs_2ch_search_box', '2ちゃんねる風BBS-検索', '1.0.0', 'Naoki Hirata', 'Magic3.org', 'GPL', 10, '2ちゃんねる風BBSの記事を検索するためのボックス。', true, true, false, false, false,true, 0, 1, -1, now(), now());\r
-DELETE FROM _widgets WHERE wd_id = 'ie6_nomore';\r
-INSERT INTO _widgets \r
-(wd_id, wd_name, wd_version, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_available, wd_initialized, wd_cache_type, wd_view_control_type, wd_install_dt, wd_create_dt) VALUES\r
-('ie6_nomore', 'IE6 No More', '1.0.0', 'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'IE6ブラウザ向けにメッセージを表示', false, true, 1, -1, now(), now());\r
DELETE FROM _widgets WHERE wd_id = 'simple_html';\r
INSERT INTO _widgets (\r
wd_id, wd_name, wd_version, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_add_script_lib_a, wd_has_admin, wd_use_instance_def, wd_initialized, wd_cache_type, wd_view_control_type, wd_install_dt, wd_create_dt) VALUES\r
+++ /dev/null
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package Magic3 Framework
- * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2009 Magic3 Project.
- * @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: dg_clockWidgetContainer.php 2237 2009-08-19 09:28:55Z fishbone $
- * @link http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseWidgetContainer.php');
-
-class dg_clockWidgetContainer extends BaseWidgetContainer
-{
- /**
- * コンストラクタ
- */
- function __construct()
- {
- // 親クラスを呼び出す
- parent::__construct();
- }
- /**
- * テンプレートファイルを設定
- *
- * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
- * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
- *
- * @param RequestManager $request HTTPリクエスト処理クラス
- * @param object $param 任意使用パラメータ。そのまま_assign()に渡る
- * @return string テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
- */
- function _setTemplate($request, &$param)
- {
- return 'index.tmpl.html';
- }
- /**
- * テンプレートにデータ埋め込む
- *
- * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
- *
- * @param RequestManager $request HTTPリクエスト処理クラス
- * @param object $param 任意使用パラメータ。_setTemplate()と共有。
- * @return なし
- */
- function _assign($request, &$param)
- {
- // 作成したHTMLを出力
- $this->tmpl->addVar("_widget", "IMG_URL", $this->getUrl($this->gEnv->getCurrentWidgetRootUrl() . '/image'));
- }
-}
-?>
+++ /dev/null
-<patTemplate:tmpl name="_widget">
-<img name="hr1" style="margin:0;padding:0;border:0;" /><img name="hr2" style="margin:0;padding:0;border:0;" /><img src="{IMG_URL}/dgc.gif" name="c" style="margin:0;padding:0;border:0;" /><img name="mn1" style="margin:0;padding:0;border:0;" /><img name="mn2" style="margin:0;padding:0;border:0;" /><img src="{IMG_URL}/dgc.gif" name="c" style="margin:0;padding:0;border:0;" /><img name="se1" style="margin:0;padding:0;border:0;" /><img name="se2" style="margin:0;padding:0;border:0;" /><img name="ampm" style="margin:0;padding:0;border:0;" />
-<script type="text/javascript">
-<!--
-dg0 = new Image();dg0.src = "{IMG_URL}/dg0.gif";
-dg1 = new Image();dg1.src = "{IMG_URL}/dg1.gif";
-dg2 = new Image();dg2.src = "{IMG_URL}/dg2.gif";
-dg3 = new Image();dg3.src = "{IMG_URL}/dg3.gif";
-dg4 = new Image();dg4.src = "{IMG_URL}/dg4.gif";
-dg5 = new Image();dg5.src = "{IMG_URL}/dg5.gif";
-dg6 = new Image();dg6.src = "{IMG_URL}/dg6.gif";
-dg7 = new Image();dg7.src = "{IMG_URL}/dg7.gif";
-dg8 = new Image();dg8.src = "{IMG_URL}/dg8.gif";
-dg9 = new Image();dg9.src = "{IMG_URL}/dg9.gif";
-dgam= new Image();dgam.src= "{IMG_URL}/dgam.gif";
-dgpm= new Image();dgpm.src= "{IMG_URL}/dgpm.gif";
-dgc = new Image();dgc.src = "{IMG_URL}/dgc.gif";
-
-function dgUpdateTime()
-{
- theTime = setTimeout('dgUpdateTime()', 1000);
- d = new Date();
- hr = d.getHours() + 100;
- mn = d.getMinutes() + 100;
- se = d.getSeconds() + 100;
- if (hr == 100){
- hr = 112;
- am_pm = 'am';
- } else if (hr < 112){
- am_pm = 'am';
- } else if (hr == 112){
- am_pm = 'pm';
- } else if (hr > 112){
- am_pm = 'pm';
- hr -= 12;
- }
- tot = '' + hr + mn + se;
- document.hr1.src = '{IMG_URL}/dg' + tot.substring(1,2) + '.gif';
- document.hr2.src = '{IMG_URL}/dg' + tot.substring(2,3) + '.gif';
- document.mn1.src = '{IMG_URL}/dg' + tot.substring(4,5) + '.gif';
- document.mn2.src = '{IMG_URL}/dg' + tot.substring(5,6) + '.gif';
- document.se1.src = '{IMG_URL}/dg' + tot.substring(7,8) + '.gif';
- document.se2.src = '{IMG_URL}/dg' + tot.substring(8,9) + '.gif';
- document.ampm.src = '{IMG_URL}/dg' + am_pm + '.gif';
-}
-dgUpdateTime();
--->
-</script>
-</patTemplate:tmpl>
+++ /dev/null
-<?php
-/**
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package Magic3 Framework
- * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2007 Magic3 Project.
- * @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: index.php 2 2007-11-03 04:59:01Z fishbone $
- * @link http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
+++ /dev/null
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package Magic3 Framework
- * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2007 Magic3 Project.
- * @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: index.php 1589 2009-03-18 08:37:41Z fishbone $
- * @link http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
+++ /dev/null
-/*##########################################
-Name: Default styling for Niceforms v.1.0
-Author: Lucian Slatineanu
-URL: http://www.badboy.ro/
-
-modified by naoki on 2009.3.18
-##########################################*/
-
-/*General styles - NOT really related to the forms*/
-/*
-* {
- margin:0;
- padding:0;
-}
-body {
- font-family:Arial, Helvetica, sans-serif;
- font-size:12px;
- color:#404040;
- background:#fff;
-}
-img {border:0;}
-#container {padding:20px;}
-*/
-
-/*Forms defaults - change as needed*/
-/*
-input, textarea {
- font-family:Arial, Helvetica, sans-serif;
- font-size:12px;
- color:#404040;
-}
-label {
- color:#999;
- cursor:pointer;
- padding-left:2px;
- line-height:16px;
-}
-label.chosen {color:#333;}
-*/
-/*Transparent items*/
-.outtaHere {
- position:absolute;
- left:-3000px;
-}
-
-/*Radio buttons*/
-.radioArea, .radioAreaChecked {
- display:block;
- float:left;
- clear:left;
- width:15px;
- height:14px;
- font-size:0;
- cursor:pointer;
-}
-.radioArea {background:url(../images/default/radio.gif) no-repeat left top;}
-.radioAreaChecked {background:url(../images/default/radio.gif) no-repeat left bottom;}
-
-/*Checkboxes*/
-.checkboxArea, .checkboxAreaChecked {
- display:block;
- float:left;
- clear:left;
- width:13px;
- height:13px;
- font-size:0;
- padding:0;
- margin:0;
- cursor:pointer;
-}
-.checkboxArea {background:url(../images/default/checkbox.gif) no-repeat left top;}
-.checkboxAreaChecked {background:url(../images/default/checkbox.gif) no-repeat left bottom;}
-.focused {border:1px dotted #ddd;}
-
-/*Text inputs*/
-input.textinput, .txtarea textarea {
- font-size:12px;
-}
-.textinput, .textinputHovered {
- height:15px;
- background:url(../images/default/input_bg.gif) repeat-x left top;
- border:none;
- padding:4px 0;
- vertical-align:middle;
-}
-.textinputHovered {background-position:left bottom;}
-.inputCorner {
- padding-bottom:0;
- vertical-align:middle;
-}
-
-/*Text areas*/
-.txtarea .tr, .txtarea .tr_xon {background:url(../images/default/txtarea_tr.gif) no-repeat top right;}
-.txtarea .tr_xon {background:url(../images/default/txtarea_tr_xon.gif) no-repeat top right;}
-.txtarea img.txt_corner {
- width:5px;
- height:5px;
- display:block;
-}
-.txtarea .br, .txtarea .br_xon {background:url(../images/default/txtarea_br.gif) no-repeat top right;}
-.txtarea .br_xon {background:url(../images/default/txtarea_br_xon.gif) no-repeat top right;}
-.txtarea .cntr {background:url(../images/default/txtarea_cntr.gif) repeat-y right top;}
-.txtarea .cntr_xon {background:url(../images/default/txtarea_cntr_xon.gif) repeat-y right top;}
-.txtarea .cntr_l, .txtarea .cntr_l_xon {
- width:5px;
- background:url(../images/default/txtarea_l.gif) repeat-y left top;
- float:left;
-}
-.txtarea .cntr_l_xon {background:url(../images/default/txtarea_l_xon.gif) repeat-y left top;}
-.txtarea textarea {
- border:0;
- background:none;
- padding:0;
- margin:5px;
- overflow:hidden;
-}
-
-/*Selects*/
-.selectArea {
- text-align:left;
- width:200px;
- height:21px;
- background:url(../images/default/select_bg.gif) repeat-x left top;
-}
-.selectArea .left {
- width:8px;
- height:21px;
- float:left;
- background:url(../images/default/select_left.gif) no-repeat left top;
-}
-.selectArea .right {
- width:21px;
- height:21px;
- float:right;
- background:url(../images/default/select_right.gif) no-repeat left top;
-}
-.selectArea .right a {
- display:block;
- width:200px;
- height:21px;
- margin-left:-179px;
- position:absolute;
-}
-.selectArea .right i {display:none;}
-.selectArea .center {
- width:160px;
- color:#FFF;
- padding-top:3px;
- overflow:hidden;
- white-space:nowrap;
-}
-
-/*Selects drop-down*/
-.optionsDivInvisible, .optionsDivVisible {
- text-align:left;
- position:absolute;
- margin-top:-1px;
- margin-left:3px;
- width:172px;
- background:#6f7074;
- padding:2px;
- font-size:11px;
- z-index:20;
-}
-.optionsDivInvisible {display:none;}
-.optionsDivVisible {display:block;}
-.optionsDivVisible p {
- margin:0;
- padding:0;
-}
-.optionsDivVisible a {
- color:#F2F2F2;
- text-decoration:none;
- display:block;
- padding:1px 4px;
- border:1px solid #6f7074;
-}
-.optionsDivVisible a:hover {
- color:#FFF;
- background:#5F6062;
- border-color:#cfd0d6;
-}
-
-/*Button*/
-.buttonSubmit, .buttonSubmitHovered {
- width:auto;
- height:26px;
- color:#FFF;
- font-weight:bold;
- padding:2px;
- background:url(../images/default/button_bg.gif) repeat-x left top;
- cursor:pointer;
- border:none;
-}
-.buttonSubmitHovered {background-position:left bottom;}
-.buttonImg {vertical-align:bottom;}
\ No newline at end of file
+++ /dev/null
-/*##########################################
-Name: Default styling for Niceforms v.1.0
-Author: Lucian Slatineanu
-URL: http://www.badboy.ro/
-
-modified by naoki on 2009.3.18
-##########################################*/
-
-/*General styles - NOT really related to the forms*/
-/*
-* {
- margin:0;
- padding:0;
-}
-body {
- font-family:Arial, Helvetica, sans-serif;
- font-size:12px;
- color:#404040;
- background:#fff;
-}
-img {border:0;}
-#container {padding:20px;}
-*/
-/*Forms defaults - change as needed*/
-/*
-input, textarea {
- font-family:Arial, Helvetica, sans-serif;
- font-size:12px;
- color:#404040;
-}
-label {
- color:#999;
- cursor:pointer;
- padding-left:2px;
- line-height:16px;
-}
-label.chosen {color:#333;}
-*/
-
-/*Transparent items*/
-.outtaHere {
- position:absolute;
- left:-3000px;
-}
-
-/*Radio buttons*/
-.radioArea, .radioAreaChecked {
- display:block;
- float:left;
- clear:left;
- width:15px;
- height:14px;
- font-size:0;
- cursor:pointer;
-}
-.radioArea {background:url(../images/greentheme/radio.gif) no-repeat left top;}
-.radioAreaChecked {background:url(../images/greentheme/radio.gif) no-repeat left bottom;}
-
-/*Checkboxes*/
-.checkboxArea, .checkboxAreaChecked {
- display:block;
- float:left;
- clear:left;
- width:13px;
- height:13px;
- font-size:0;
- padding:0;
- margin:0;
- cursor:pointer;
-}
-.checkboxArea {background:url(../images/greentheme/checkbox.gif) no-repeat left top;}
-.checkboxAreaChecked {background:url(../images/greentheme/checkbox.gif) no-repeat left bottom;}
-.focused {border:1px dotted #ddd;}
-
-/*Text inputs*/
-input.textinput, .txtarea textarea {
- font-size:12px;
-}
-.textinput, .textinputHovered {
- height:15px;
- background:url(../images/greentheme/input_bg.gif) repeat-x left top;
- border:none;
- padding:4px 0;
- vertical-align:middle;
-}
-.textinputHovered {background-position:left bottom;}
-.inputCorner {
- padding-bottom:0;
- vertical-align:middle;
-}
-
-/*Text areas*/
-.txtarea .tr, .txtarea .tr_xon {background:url(../images/greentheme/txtarea_tr.gif) no-repeat top right;}
-.txtarea .tr_xon {background:url(../images/greentheme/txtarea_tr_xon.gif) no-repeat top right;}
-.txtarea img.txt_corner {
- width:5px;
- height:5px;
- display:block;
-}
-.txtarea .br, .txtarea .br_xon {background:url(../images/greentheme/txtarea_br.gif) no-repeat top right;}
-.txtarea .br_xon {background:url(../images/greentheme/txtarea_br_xon.gif) no-repeat top right;}
-.txtarea .cntr {background:url(../images/greentheme/txtarea_cntr.gif) repeat-y right top;}
-.txtarea .cntr_xon {background:url(../images/greentheme/txtarea_cntr_xon.gif) repeat-y right top;}
-.txtarea .cntr_l, .txtarea .cntr_l_xon {
- width:5px;
- background:url(../images/greentheme/txtarea_l.gif) repeat-y left top;
- float:left;
-}
-.txtarea .cntr_l_xon {background:url(../images/greentheme/txtarea_l_xon.gif) repeat-y left top;}
-.txtarea textarea {
- border:0;
- background:none;
- padding:0;
- margin:5px;
- overflow:hidden;
-}
-
-/*Selects*/
-.selectArea {
- text-align:left;
- width:200px;
- height:21px;
- background:url(../images/greentheme/select_bg.gif) repeat-x left top;
-}
-.selectArea .left {
- width:8px;
- height:21px;
- float:left;
- background:url(../images/greentheme/select_left.gif) no-repeat left top;
-}
-.selectArea .right {
- width:21px;
- height:21px;
- float:right;
- background:url(../images/greentheme/select_right.gif) no-repeat left top;
-}
-.selectArea .right a {
- display:block;
- width:200px;
- height:21px;
- margin-left:-179px;
- position:absolute;
-}
-.selectArea .right i {display:none;}
-.selectArea .center {
- width:160px;
- color:#666;
- padding-top:3px;
- overflow:hidden;
- white-space:nowrap;
-}
-
-/*Selects drop-down*/
-.optionsDivInvisible, .optionsDivVisible {
- text-align:left;
- position:absolute;
- margin-top:-1px;
- margin-left:3px;
- width:172px;
- background:#330000;
- padding:2px;
- font-size:11px;
- z-index:20;
-}
-.optionsDivInvisible {display:none;}
-.optionsDivVisible {display:block;}
-.optionsDivVisible p {
- margin:0;
- padding:0;
-}
-.optionsDivVisible a {
- color:#F2F2F2;
- text-decoration:none;
- display:block;
- padding:1px 4px;
- border:1px solid #330000;
-}
-.optionsDivVisible a:hover {
- color:#FFF;
- background:#669933;
- border-color:#cfd0d6;
-}
-
-/*Button*/
-.buttonSubmit, .buttonSubmitHovered {
- width:auto;
- height:26px;
- color:#666;
- font-weight:bold;
- padding:2px;
- background:url(../images/greentheme/button_bg.gif) repeat-x left top;
- cursor:pointer;
- border:none;
-}
-.buttonSubmitHovered {background-position:left bottom;}
-.buttonImg {vertical-align:bottom;}
\ No newline at end of file
+++ /dev/null
-/*##########################################
-Name: Default styling for Niceforms v.1.0
-Author: Lucian Slatineanu
-URL: http://www.badboy.ro/
-
-modified by naoki on 2009.3.18
-##########################################*/
-
-/*General styles - NOT really related to the forms*/
-/*
-* {
- margin:0;
- padding:0;
-}
-body {
- font-family:Arial, Helvetica, sans-serif;
- font-size:12px;
- color:#404040;
- background:#fff;
-}
-img {border:0;}
-#container {padding:20px;}
-*/
-/*Forms defaults - change as needed*/
-/*
-input, textarea {
- font-family:Arial, Helvetica, sans-serif;
- font-size:12px;
- color:#404040;
-}
-label {
- color:#999;
- cursor:pointer;
- padding-left:2px;
- line-height:16px;
-}
-label.chosen {color:#333;}
-*/
-/*Transparent items*/
-.outtaHere {
- position:absolute;
- left:-3000px;
-}
-
-/*Radio buttons*/
-.radioArea, .radioAreaChecked {
- display:block;
- float:left;
- clear:left;
- width:15px;
- height:14px;
- font-size:0;
- cursor:pointer;
-}
-.radioArea {background:url(../images/redtheme/radio.gif) no-repeat left top;}
-.radioAreaChecked {background:url(../images/redtheme/radio.gif) no-repeat left bottom;}
-
-/*Checkboxes*/
-.checkboxArea, .checkboxAreaChecked {
- display:block;
- float:left;
- clear:left;
- width:13px;
- height:13px;
- font-size:0;
- padding:0;
- margin:0;
- cursor:pointer;
-}
-.checkboxArea {background:url(../images/redtheme/checkbox.gif) no-repeat left top;}
-.checkboxAreaChecked {background:url(../images/redtheme/checkbox.gif) no-repeat left bottom;}
-.focused {border:1px dotted #ddd;}
-
-/*Text inputs*/
-input.textinput, .txtarea textarea {
- font-size:12px;
-}
-.textinput, .textinputHovered {
- height:15px;
- background:url(../images/redtheme/input_bg.gif) repeat-x left top;
- border:none;
- padding:4px 0;
- vertical-align:middle;
-}
-.textinputHovered {background-position:left bottom;}
-.inputCorner {
- padding-bottom:0;
- vertical-align:middle;
-}
-
-/*Text areas*/
-.txtarea .tr, .txtarea .tr_xon {background:url(../images/redtheme/txtarea_tr.gif) no-repeat top right;}
-.txtarea .tr_xon {background:url(../images/redtheme/txtarea_tr_xon.gif) no-repeat top right;}
-.txtarea img.txt_corner {
- width:5px;
- height:5px;
- display:block;
-}
-.txtarea .br, .txtarea .br_xon {background:url(../images/redtheme/txtarea_br.gif) no-repeat top right;}
-.txtarea .br_xon {background:url(../images/redtheme/txtarea_br_xon.gif) no-repeat top right;}
-.txtarea .cntr {background:url(../images/redtheme/txtarea_cntr.gif) repeat-y right top;}
-.txtarea .cntr_xon {background:url(../images/redtheme/txtarea_cntr_xon.gif) repeat-y right top;}
-.txtarea .cntr_l, .txtarea .cntr_l_xon {
- width:5px;
- background:url(../images/redtheme/txtarea_l.gif) repeat-y left top;
- float:left;
-}
-.txtarea .cntr_l_xon {background:url(../images/redtheme/txtarea_l_xon.gif) repeat-y left top;}
-.txtarea textarea {
- border:0;
- background:none;
- padding:0;
- margin:5px;
- overflow:hidden;
-}
-
-/*Selects*/
-.selectArea {
- text-align:left;
- width:200px;
- height:21px;
- background:url(../images/redtheme/select_bg.gif) repeat-x left top;
-}
-.selectArea .left {
- width:8px;
- height:21px;
- float:left;
- background:url(../images/redtheme/select_left.gif) no-repeat left top;
-}
-.selectArea .right {
- width:21px;
- height:21px;
- float:right;
- background:url(../images/redtheme/select_right.gif) no-repeat left top;
-}
-.selectArea .right a {
- display:block;
- width:200px;
- height:21px;
- margin-left:-179px;
- position:absolute;
-}
-.selectArea .right i {display:none;}
-.selectArea .center {
- width:160px;
- color:#FFF;
- padding-top:3px;
- overflow:hidden;
- white-space:nowrap;
-}
-
-/*Selects drop-down*/
-.optionsDivInvisible, .optionsDivVisible {
- text-align:left;
- position:absolute;
- margin-top:-1px;
- margin-left:3px;
- width:172px;
- background:#330000;
- padding:2px;
- font-size:11px;
- z-index:20;
-}
-.optionsDivInvisible {display:none;}
-.optionsDivVisible {display:block;}
-.optionsDivVisible p {
- margin:0;
- padding:0;
-}
-.optionsDivVisible a {
- color:#F2F2F2;
- text-decoration:none;
- display:block;
- padding:1px 4px;
- border:1px solid #330000;
-}
-.optionsDivVisible a:hover {
- color:#FFF;
- background:#990000;
- border-color:#cfd0d6;
-}
-
-/*Button*/
-.buttonSubmit, .buttonSubmitHovered {
- width:auto;
- height:26px;
- color:#FFF;
- font-weight:bold;
- padding:2px;
- background:url(../images/redtheme/button_bg.gif) repeat-x left top;
- cursor:pointer;
- border:none;
-}
-.buttonSubmitHovered {background-position:left bottom;}
-.buttonImg {vertical-align:bottom;}
\ No newline at end of file
+++ /dev/null
-<?php
-/**
- * コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package Magic3 Framework
- * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2009 Magic3 Project.
- * @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: admin_effect_nicejformsWidgetContainer.php 2266 2009-08-28 08:25:59Z fishbone $
- * @link http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
-
-class admin_effect_nicejformsWidgetContainer extends BaseAdminWidgetContainer
-{
- private $sysDb; // DB接続オブジェクト
- private $serialNo; // 選択中の項目のシリアル番号
- private $serialArray = array(); // 表示中のシリアル番号
- private $langId;
- private $configId; // 定義ID
- private $paramObj; // パラメータ保存用オブジェクト
- private $colorType; // カラータイプ
- private $colorTypeDef; // カラータイプ選択用メニュー定義
- const DEFAULT_NAME_HEAD = '名称未設定'; // デフォルトの設定名
- const DEFAULT_COLOR_TYPE = '0';
-
- /**
- * コンストラクタ
- */
- function __construct()
- {
- // 親クラスを呼び出す
- parent::__construct();
-
- // DBオブジェクト作成
- $this->sysDb = $this->gInstance->getSytemDbObject();
-
- // カラータイプ選択用メニュー定義
- $this->colorTypeDef = array( array( 'name' => '青', 'value' => '0', 'filename' => 'niceforms-default.css', 'image_dir' => 'default'),
- array( 'name' => '緑', 'value' => '1', 'filename' => 'niceforms-green.css', 'image_dir' => 'greentheme'),
- array( 'name' => '赤', 'value' => '2', 'filename' => 'niceforms-red.css', 'image_dir' => 'redtheme'));
- }
- /**
- * テンプレートファイルを設定
- *
- * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
- * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
- *
- * @param RequestManager $request HTTPリクエスト処理クラス
- * @param object $param 任意使用パラメータ。そのまま_assign()に渡る
- * @return string テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
- */
- function _setTemplate($request, &$param)
- {
- $task = $request->trimValueOf('task');
- if ($task == 'list'){ // 一覧画面
- return 'admin_list.tmpl.html';
- } else { // 一覧画面
- return 'admin.tmpl.html';
- }
- }
- /**
- * テンプレートにデータ埋め込む
- *
- * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
- *
- * @param RequestManager $request HTTPリクエスト処理クラス
- * @param object $param 任意使用パラメータ。_setTemplate()と共有。
- * @param なし
- */
- function _assign($request, &$param)
- {
- $task = $request->trimValueOf('task');
- if ($task == 'list'){ // 一覧画面
- return $this->createList($request);
- } else { // 詳細設定画面
- return $this->createDetail($request);
- }
- }
- /**
- * 詳細画面作成
- *
- * @param RequestManager $request HTTPリクエスト処理クラス
- * @param なし
- */
- function createDetail($request)
- {
- // ページ定義IDとページ定義のレコードシリアル番号を取得
- $this->startPageDefParam($defSerial, $defConfigId, $this->paramObj);
-
- $userId = $this->gEnv->getCurrentUserId();
- $this->langId = $this->gEnv->getCurrentLanguage(); // 表示言語を取得
- $act = $request->trimValueOf('act');
- $this->serialNo = $request->trimValueOf('serial'); // 選択項目のシリアル番号
- $this->configId = $request->trimValueOf('item_id'); // 定義ID
- if (empty($this->configId)) $this->configId = $defConfigId; // 呼び出しウィンドウから引き継いだ定義ID
-
- // 入力値を取得
- $name = $request->trimValueOf('item_name'); // 定義名
- $this->colorType = $request->trimValueOf('item_color_type'); // カラータイプ
-
- $replaceNew = false; // データを再取得するかどうか
- if ($act == 'add'){// 新規追加
- // 入力チェック
- $this->checkInput($name, '名前');
-
- // 設定名の重複チェック
- for ($i = 0; $i < count($this->paramObj); $i++){
- $targetObj = $this->paramObj[$i]->object;
- if ($name == $targetObj->name){ // 定義名
- $this->setUserErrorMsg('名前が重複しています');
- break;
- }
- }
-
- // エラーなしの場合は、データを登録
- if ($this->getMsgCount() == 0){
- // 追加オブジェクト作成
- $newObj = new stdClass;
- $newObj->name = $name;// 表示名
- $newObj->colorType = $this->colorType; // カラータイプ
-
- $ret = $this->addPageDefParam($defSerial, $defConfigId, $this->paramObj, $newObj);
- if ($ret){
- $this->setGuidanceMsg('データを追加しました');
-
- $this->configId = $defConfigId; // 定義定義IDを更新
- $replaceNew = true; // データ再取得
- } else {
- $this->setAppErrorMsg('データ追加に失敗しました');
- }
- }
- } else if ($act == 'update'){ // 設定更新のとき
- // 入力値のエラーチェック
-
- if ($this->getMsgCount() == 0){ // エラーのないとき
- // 現在の設定値を取得
- $ret = $this->getPageDefParam($defSerial, $defConfigId, $this->paramObj, $this->configId, $targetObj);
- if ($ret){
- // ウィジェットオブジェクト更新
- $targetObj->colorType = $this->colorType; // カラータイプ
- }
-
- // 設定値を更新
- if ($ret) $ret = $this->updatePageDefParam($defSerial, $defConfigId, $this->paramObj, $this->configId, $targetObj);
- if ($ret){
- $this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
- $replaceNew = true; // データ再取得
- } else {
- $this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
- }
- }
- } else if ($act == 'select'){ // 定義IDを変更
- $replaceNew = true; // データ再取得
- } else { // 初期起動時、または上記以外の場合
- // デフォルト値設定
- $this->configId = $defConfigId; // 呼び出しウィンドウから引き継いだ定義ID
- $replaceNew = true; // データ再取得
- }
- // 設定項目選択メニュー作成
- $this->createItemMenu();
-
- // 表示用データを取得
- if (empty($this->configId)){ // 新規登録の場合
- $this->tmpl->setAttribute('item_name_visible', 'visibility', 'visible');// 名前入力フィールド表示
- if ($replaceNew){ // データ再取得時
- $name = $this->createDefaultName(); // デフォルト登録項目名
- $this->colorType = self::DEFAULT_COLOR_TYPE; // カラータイプ
- }
- $this->serialNo = 0;
- } else {
- if ($replaceNew){// データ再取得時
- $ret = $this->getPageDefParam($defSerial, $defConfigId, $this->paramObj, $this->configId, $targetObj);
- if ($ret){
- $name = $targetObj->name; // 名前
- $this->colorType = $targetObj->colorType; // カラータイプ
- }
- }
- $this->serialNo = $this->configId;
-
- // 新規作成でないときは、メニューを変更不可にする(画面作成から呼ばれている場合のみ)
- if (!empty($defConfigId) && !empty($defSerial)) $this->tmpl->addVar("_widget", "id_disabled", 'disabled');
- }
-
- // カラー選択メニュー作成
- $this->createColorTypeMenu();
-
- // 画面にデータを埋め込む
- if (!empty($this->configId)) $this->tmpl->addVar("_widget", "id", $this->configId); // 定義ID
- $this->tmpl->addVar("item_name_visible", "name", $name);
- $this->tmpl->addVar("_widget", "serial", $this->serialNo);// 選択中のシリアル番号、IDを設定
-
- // ボタンの表示制御
- if (empty($this->serialNo)){ // 新規追加項目を選択しているとき
- $this->tmpl->setAttribute('add_button', 'visibility', 'visible');// 「新規追加」ボタン
- } else {
- $this->tmpl->setAttribute('update_button', 'visibility', 'visible');// 「更新」ボタン
-
- // ヘルプの追加
- $this->convertHelp('update_button');
- }
-
- // ページ定義IDとページ定義のレコードシリアル番号を更新
- $this->endPageDefParam($defSerial, $defConfigId, $this->paramObj);
- }
- /**
- * 選択用メニューを作成
- *
- * @return なし
- */
- function createItemMenu()
- {
- for ($i = 0; $i < count($this->paramObj); $i++){
- $id = $this->paramObj[$i]->id;// 定義ID
- $targetObj = $this->paramObj[$i]->object;
- $name = $targetObj->name;// 定義名
- $selected = '';
- if ($this->configId == $id) $selected = 'selected';
-
- $row = array(
- 'name' => $name, // 名前
- 'value' => $id, // 定義ID
- 'selected' => $selected // 選択中の項目かどうか
- );
- $this->tmpl->addVars('title_list', $row);
- $this->tmpl->parseTemplate('title_list', 'a');
- }
- }
- /**
- * デフォルトの名前を取得
- *
- * @return string デフォルト名
- */
- function createDefaultName()
- {
- $name = self::DEFAULT_NAME_HEAD;
- for ($j = 1; $j < 100; $j++){
- $name = self::DEFAULT_NAME_HEAD . $j;
- // 設定名の重複チェック
- for ($i = 0; $i < count($this->paramObj); $i++){
- $targetObj = $this->paramObj[$i]->object;
- if ($name == $targetObj->name){ // 定義名
- break;
- }
- }
- // 重複なしのときは終了
- if ($i == count($this->paramObj)) break;
- }
- return $name;
- }
- /**
- * 一覧画面作成
- *
- * @param RequestManager $request HTTPリクエスト処理クラス
- * @param なし
- */
- function createList($request)
- {
- // ページ定義IDとページ定義のレコードシリアル番号を取得
- $this->startPageDefParam($defSerial, $defConfigId, $this->paramObj);
-
- $userId = $this->gEnv->getCurrentUserId();
- $langId = $this->gEnv->getCurrentLanguage(); // 表示言語を取得
- $act = $request->trimValueOf('act');
-
- if ($act == 'delete'){ // メニュー項目の削除
- $listedItem = explode(',', $request->trimValueOf('seriallist'));
- $delItems = array();
- for ($i = 0; $i < count($listedItem); $i++){
- // 項目がチェックされているかを取得
- $itemName = 'item' . $i . '_selected';
- $itemValue = ($request->trimValueOf($itemName) == 'on') ? 1 : 0;
-
- if ($itemValue){ // チェック項目
- $delItems[] = $listedItem[$i];
- }
- }
- if (count($delItems) > 0){
- $ret = $this->delPageDefParam($defSerial, $defConfigId, $this->paramObj, $delItems);
- if ($ret){ // データ削除成功のとき
- $this->setGuidanceMsg('データを削除しました');
- } else {
- $this->setAppErrorMsg('データ削除に失敗しました');
- }
- }
- }
- // 定義一覧作成
- $this->createItemList();
-
- $this->tmpl->addVar("_widget", "serial_list", implode($this->serialArray, ','));// 表示項目のシリアル番号を設定
-
- // ページ定義IDとページ定義のレコードシリアル番号を更新
- $this->endPageDefParam($defSerial, $defConfigId, $this->paramObj);
- }
- /**
- * 定義一覧作成
- *
- * @return なし
- */
- function createItemList()
- {
- for ($i = 0; $i < count($this->paramObj); $i++){
- $id = $this->paramObj[$i]->id;// 定義ID
- $targetObj = $this->paramObj[$i]->object;
- $name = $targetObj->name;// 定義名
-
- // 使用数
- $defCount = 0;
- if (!empty($id)){
- $defCount = $this->sysDb->getPageDefCount($this->gEnv->getCurrentWidgetId(), $id);
- }
- $operationDisagled = '';
- if ($defCount > 0) $operationDisagled = 'disabled';
-
- $row = array(
- 'index' => $i,
- 'id' => $id,
- 'ope_disabled' => $operationDisagled, // 選択可能かどうか
- 'name' => $this->convertToDispString($name), // 名前
- 'def_count' => $defCount // 使用数
- );
- $this->tmpl->addVars('itemlist', $row);
- $this->tmpl->parseTemplate('itemlist', 'a');
-
- // シリアル番号を保存
- $this->serialArray[] = $id;
- }
- }
- /**
- * カラー選択メニュー作成
- *
- * @return なし
- */
- function createColorTypeMenu()
- {
- for ($i = 0; $i < count($this->colorTypeDef); $i++){
- $value = $this->colorTypeDef[$i]['value'];
- $name = $this->colorTypeDef[$i]['name'];
-
- $selected = '';
- if ($value == $this->colorType) $selected = 'selected';
-
- $row = array(
- 'value' => $value, // 値
- 'name' => $name, // 名前
- 'selected' => $selected // 選択中かどうか
- );
- $this->tmpl->addVars('color_type_list', $row);
- $this->tmpl->parseTemplate('color_type_list', 'a');
- }
- }
-}
-?>
+++ /dev/null
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package Magic3 Framework
- * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2009 Magic3 Project.
- * @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: effect_nicejformsWidgetContainer.php 2266 2009-08-28 08:25:59Z fishbone $
- * @link http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseWidgetContainer.php');
-
-class effect_nicejformsWidgetContainer extends BaseWidgetContainer
-{
- private $langId; // 現在の言語
- private $paramObj; // 定義取得用
- private $headCss; // ヘッダ出力用CSS
- private $cssFilePath; // CSSファイルのパス
- private $colorTypeDef; // カラータイプ選択用メニュー定義
- const DEFAULT_CONFIG_ID = 0;
-
- /**
- * コンストラクタ
- */
- function __construct()
- {
- // 親クラスを呼び出す
- parent::__construct();
-
- // カラータイプ選択用メニュー定義
- $this->colorTypeDef = array( array( 'name' => '青', 'value' => '0', 'filename' => 'niceforms-default.css', 'image_dir' => 'default'),
- array( 'name' => '緑', 'value' => '1', 'filename' => 'niceforms-green.css', 'image_dir' => 'greentheme'),
- array( 'name' => '赤', 'value' => '2', 'filename' => 'niceforms-red.css', 'image_dir' => 'redtheme'));
- }
- /**
- * テンプレートファイルを設定
- *
- * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
- * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
- *
- * @param RequestManager $request HTTPリクエスト処理クラス
- * @param object $param 任意使用パラメータ。そのまま_assign()に渡る
- * @return string テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
- */
- function _setTemplate($request, &$param)
- {
- return 'index.tmpl.html';
- }
- /**
- * テンプレートにデータ埋め込む
- *
- * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
- *
- * @param RequestManager $request HTTPリクエスト処理クラス
- * @param object $param 任意使用パラメータ。_setTemplate()と共有。
- * @param なし
- */
- function _assign($request, &$param)
- {
- $this->langId = $this->gEnv->getCurrentLanguage();
-
- // 定義ID取得
- $configId = $this->gEnv->getCurrentWidgetConfigId();
- if (empty($configId)) $configId = self::DEFAULT_CONFIG_ID;
-
- // パラメータオブジェクトを取得
- $targetObj = $this->getWidgetParamObjByConfigId($configId);
- if (!empty($targetObj)){ // 定義データが取得できたとき
- $menuId = $targetObj->menuId; // メニューID
- $name = $targetObj->name;// 定義名
- $colorType = $targetObj->colorType; // カラータイプ
-
- $this->cssFilePath = ''; // CSSファイルのパス
- for ($i = 0; $i < count($this->colorTypeDef); $i++){
- $value = $this->colorTypeDef[$i]['value'];
- if ($value == $colorType){
- $this->cssFilePath = $this->gEnv->getCurrentWidgetCssUrl() . '/' . $this->colorTypeDef[$i]['filename']; // CSSファイル名
- $imagePath = $this->gEnv->getCurrentWidgetImagesUrl() . '/' . $this->colorTypeDef[$i]['image_dir'] . '/'; // 画像ディレクトリ
-
- $this->tmpl->setAttribute('show_html', 'visibility', 'visible');
- $this->tmpl->addVar('show_html', 'image_path', $this->getUrl($imagePath));
- break;
- }
- }
- }
- }
- /**
- * CSSファイルをHTMLヘッダ部に設定
- *
- * CSSファイルをHTMLのheadタグ内に追加出力する。
- * _assign()よりも後に実行される。
- *
- * @param RequestManager $request HTTPリクエスト処理クラス
- * @param object $param 任意使用パラメータ。
- * @return string CSS文字列。出力しない場合は空文字列を設定。
- */
- function _addCssFileToHead($request, &$param)
- {
- return $this->cssFilePath;
- }
-}
-?>
+++ /dev/null
-<?php
-/**
- * ヘルプリソースファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package Magic3 Framework
- * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2009 Magic3 Project.
- * @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: index.php 1594 2009-03-19 04:43:33Z fishbone $
- * @link http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-global $HELP;
-
-// ########## 設定項目一覧 ##########
-$HELP['item_list']['title'] = '設定一覧';
-$HELP['item_list']['body'] = '登録されている設定の一覧です。';
-$HELP['item_detail']['title'] = '設定詳細';
-$HELP['item_detail']['body'] = '詳細設定を行います。';
-$HELP['item_check']['title'] = '選択用チェックボックス';
-$HELP['item_check']['body'] = '削除を行う項目を選択します。';
-$HELP['item_name']['title'] = '名前';
-$HELP['item_name']['body'] = '設定名です。';
-$HELP['item_name_input']['title'] = '名前';
-$HELP['item_name_input']['body'] = '設定名です。新規に登録するか、登録済みの設定を選択します。';
-$HELP['item_color_type']['title'] = 'カラータイプ';
-$HELP['item_color_type']['body'] = 'フォーム部品の基本カラーです。';
-$HELP['item_id']['title'] = '設定ID';
-$HELP['item_id']['body'] = '自動的に振られる設定IDです。';
-$HELP['item_ref']['title'] = '使用';
-$HELP['item_ref']['body'] = '設定を使用しているウィジェット数を示します。使用が0の設定のみ削除可能です。';
-$HELP['item_list_btn']['title'] = '一覧ボタン';
-$HELP['item_list_btn']['body'] = '設定一覧を表示します。';
-$HELP['item_del_btn']['title'] = '削除ボタン';
-$HELP['item_del_btn']['body'] = '選択されている設定を削除します。<br />項目を選択するには、一覧の左端のチェックボックスにチェックを入れます。';
-$HELP['item_ret_btn']['title'] = '戻るボタン';
-$HELP['item_ret_btn']['body'] = '設定詳細へ戻ります。';
-?>
+++ /dev/null
-<patTemplate:tmpl name="_widget">\r
-<script type="text/javascript">\r
-<!--\r
-function addItem(){\r
- if (!window.confirm('項目を新規追加しますか?')) return false;\r
- document.main.act.value = 'add';\r
- document.main.submit();\r
- return true;\r
-}\r
-function updateItem(){\r
- if (!window.confirm('設定を更新しますか?')) return false;\r
- document.main.act.value='update';\r
- document.main.submit();\r
- return true;\r
-}\r
-function selectItem()\r
-{\r
- document.main.act.value = 'select';\r
- document.main.submit();\r
- return true;\r
-}\r
-function listItem(){\r
- document.main.task.value = 'list';\r
- document.main.submit();\r
- return true;\r
-}\r
-function selectColor()\r
-{\r
- return true;\r
-}\r
-// -->\r
-</script>\r
-<div align="center">\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="task" />\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="serial" value="{SERIAL}" />\r
-<!-- m3:PostParam -->\r
-<table width="90%">\r
-<tr><td><span {_HELP_ITEM_DETAIL}><label>設定詳細</label></span></td>\r
-<td align="right"><span {_HELP_ITEM_LIST_BTN}><input type="button" class="button" onclick="listItem();" value="一覧" /></span>\r
-</td></tr>\r
-<tr><td colspan="2">\r
-\r
-<table class="simple-table" width="100%">\r
- <tbody>\r
- <tr>\r
- <td class="table-headside" width="100"><span {_HELP_ITEM_NAME_INPUT}>名前</span></td>\r
- <td width="500">\r
- <select name="item_id" onchange="selectItem();" {ID_DISABLED}>\r
- <option value="0">-- 新規 --</option>\r
- <patTemplate:tmpl name="title_list">\r
- <option value="{VALUE}" {SELECTED}>{NAME}</option>\r
- </patTemplate:tmpl>\r
- </select>\r
- <patTemplate:tmpl name="item_name_visible" visibility="hidden">\r
- <input type="text" name="item_name" value="{NAME}" size="40" maxlength="40" />\r
- </patTemplate:tmpl>\r
- </td>\r
- <td class="table-headside" width="100"><span {_HELP_ITEM_ID}>ID</span></td>\r
- <td align="center">{ID}</td>\r
- </tr>\r
- <tr class="even">\r
- <td class="table-headside"><span {_HELP_ITEM_COLOR_TYPE}>カラータイプ</span></td>\r
- <td colspan="3">\r
- <select name="item_color_type" onchange="selectColor();">\r
- <patTemplate:tmpl name="color_type_list">\r
- <option value="{VALUE}" {SELECTED}>{NAME}</option>\r
- </patTemplate:tmpl>\r
- </select>\r
- </td>\r
- </tr>\r
- <tr>\r
- <td align="right" colspan="4">\r
-<patTemplate:tmpl name="update_button" visibility="hidden">\r
- <input type="button" class="button" onclick="updateItem();" value="更新" />\r
-</patTemplate:tmpl>\r
-<patTemplate:tmpl name="add_button" visibility="hidden">\r
- <input type="button" class="button" onclick="addItem();" value="新規追加" />\r
-</patTemplate:tmpl>\r
- </td>\r
- </tr>\r
- </tbody>\r
-</table>\r
-</td></tr>\r
-</table>\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
+++ /dev/null
-<patTemplate:tmpl name="_widget">\r
-<script type="text/javascript">\r
-<!--\r
-function delItem(){\r
- if (document.main.seriallist.value){\r
- var items = document.main.seriallist.value.split(",");\r
- for (var i = 0; i < items.length; i++){\r
- var name = "document.main.item" + i + "_selected";\r
- var itemObj = eval(name);\r
- // チェックありのときは終了\r
- if (itemObj && itemObj.checked) break;\r
- }\r
- if (i == items.length){ \r
- window.alert('削除する項目を選択してください');\r
- } else {\r
- if (!window.confirm('選択項目を削除しますか?')) return false;\r
- document.main.act.value = 'delete';\r
- document.main.submit();\r
- }\r
- }\r
- return true;\r
-}\r
-function cancelItem(){\r
- document.main.task.value = '';\r
- document.main.submit();\r
- return true;\r
-}\r
-$(function(){\r
- // スクロールバー付きのテーブルを作成\r
- m3_tableWithScrollbar('itemlist', -1, 0);\r
-});\r
-// -->\r
-</script>\r
-<div align="center">\r
-<br />\r
-<!-- m3:ErrorMessage -->\r
-<form method="post" name="main">\r
-<input type="hidden" name="task" value="list" />\r
-<input type="hidden" name="act" />\r
-<input type="hidden" name="serial" />\r
-<input type="hidden" name="seriallist" value="{SERIAL_LIST}" />\r
-<!-- m3:PostParam -->\r
-<table width="90%">\r
-<tr><td>\r
-<span {_HELP_ITEM_LIST}><label>設定一覧</label></span>\r
-</td><td align="right"><span {_HELP_ITEM_DEL_BTN}><input type="button" class="button" onclick="delItem();" value="削除" /></span>\r
-<span {_HELP_ITEM_RET_BTN}><input type="button" class="button" onclick="cancelItem();" value="戻る" /></span>\r
-</td></tr>\r
-<tr><td colspan="2">\r
-<table id="itemlist" class="simple-table" width="100%">\r
- <thead>\r
- <tr>\r
- <th width="35" align="center"><span {_HELP_ITEM_CHECK}>選択</span></th>\r
- <th width="35" align="center"><span {_HELP_ITEM_ID}>ID</span></th>\r
- <th width="40%" align="center"><span {_HELP_ITEM_NAME}>名前</span></th>\r
- <th align="center"><span {_HELP_ITEM_REF}>使用</span></th>\r
- </tr>\r
- </thead>\r
- <tbody>\r
- <patTemplate:tmpl name="itemlist">\r
- <tr>\r
- <td align="center"><input type="checkbox" name="item{INDEX}_selected" {OPE_DISABLED} /></td>\r
- <td align="center">{ID}</td>\r
- <td>{NAME}</td>\r
- <td align="center">{DEF_COUNT}</td>\r
- </tr>\r
- </patTemplate:tmpl>\r
- </tbody>\r
-</table>\r
-</td></tr>\r
-</table>\r
-</form>\r
-</div>\r
-</patTemplate:tmpl>\r
+++ /dev/null
-<patTemplate:tmpl name="_widget">
-<patTemplate:tmpl name="show_html" visibility="hidden">
-<script type="text/javascript">
-<!--
-$(document).ready(function(){
- $.NiceJForms.build({
- imagesPath:"{IMAGE_PATH}"
- })
-});
-//-->
-</script>
-</patTemplate:tmpl>
-</patTemplate:tmpl>
+++ /dev/null
-<?php
-/**
- * ウィジェット呼び出し用ファイル
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package Magic3 Framework
- * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2007 Magic3 Project.
- * @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: index.php 1589 2009-03-18 08:37:41Z fishbone $
- * @link http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
+++ /dev/null
-/**
- * @name NiceJForms
- * @description This a jQuery equivalent for Niceforms ( http://badboy.ro/articles/2007-01-30/niceforms/ ). All the forms are styled with beautiful images as backgrounds and stuff. Enjoy them!
- * @param Hash hash A hash of parameters
- * @option integer selectRightSideWidth width of right side of the select
- * @option integer selectLeftSideWidth width of left side of the select
- * @option integer selectAreaHeight
- * @option integer selectAreaOPtionsOverlap
- * @option imagesPath folder where custom form images are stored
- * @type jQuery
- * @cat Plugins/Interface/Forms
- * @author Lucian Lature ( lucian.lature@gmail.com )
- * @credits goes to Lucian Slatineanu ( http://www.badboy.ro )
- * @version 0.1
- *
- * modified by naoki on 2009.3.18
- */
-
-jQuery.NiceJForms = {
- options : {
- selectWidth : 200,
- selectRightSideWidth : 21,
- selectLeftSideWidth : 8,
- selectAreaHeight : 21,
- selectAreaOptionsOverlap : 2,
- imagesPath : "css/images/default/",
- className : 'form' // default class name
- // other options here
- },
-
- selectText : 'please select',
- preloads : new Array(),
-// inputs : new Array(),
- labels : new Array(),
- textareas : new Array(),
- selects : new Array(),
- radios : new Array(),
- checkboxes : new Array(),
- texts : new Array(),
- buttons : new Array(),
- radioLabels : new Array(),
- checkboxLabels : new Array(),
- hasImages : true,
-
- keyPressed : function(event)
- {
- var pressedKey = event.charCode || event.keyCode || -1;
-
- switch (pressedKey)
- {
- case 40: //down
- if (this.parentNode){
- var fieldId = this.parentNode.parentNode.id.replace(/sarea/g, "");
- var linkNo = 0;
- var info = fieldId.split("-");
- var index = info[0];
- var no = info[1];
- for(var q = 0; q < selects[index][no].options.length; q++) {if(selects[index][no].options[q].selected) {linkNo = q;}}
- ++linkNo;
- if(linkNo >= selects[index][no].options.length) {linkNo = 0;}
- selectMe(selects[index][no].id, linkNo, fieldId);
- }
- break;
-
- case 38: //up
- if (this.parentNode){
- var fieldId = this.parentNode.parentNode.id.replace(/sarea/g, "");
- var linkNo = 0;
- var info = fieldId.split("-");
- var index = info[0];
- var no = info[1];
- for(var q = 0; q < selects[index][no].options.length; q++) {if(selects[index][no].options[q].selected) {linkNo = q;}}
- --linkNo;
- if(linkNo < 0) {linkNo = selects[index][no].options.length - 1;}
- selectMe(selects[index][no].id, linkNo, fieldId);
- }
- break;
- default:
- break;
- }
- },
-
- build : function(options)
- {
- if (options)
- jQuery.extend(jQuery.NiceJForms.options, options);
-
- if (window.event) {
- jQuery('body',document).bind('keyup', jQuery.NiceJForms.keyPressed);
- } else {
- jQuery(document).bind('keyup', jQuery.NiceJForms.keyPressed);
- }
-
- // test if images are disabled or not
- var testImg = document.createElement('img');
- $(testImg).attr("src", jQuery.NiceJForms.options.imagesPath + "blank.gif").attr("id", "imagineTest");
- jQuery('body').append(testImg);
-
- if(testImg.complete)
- {
- if(testImg.offsetWidth == '1') {jQuery.NiceJForms.hasImages = true;}
- else {jQuery.NiceJForms.hasImages = false;}
- }
-
- $(testImg).remove();
-
- if(jQuery.NiceJForms.hasImages)
- {
- var index = 0;
-
- // form class changed by naoki.
- var name = 'form.' + jQuery.NiceJForms.options.className;
- $(name).each( function()
- {
- el = jQuery(this);
- jQuery.NiceJForms.preloadImages();
- jQuery.NiceJForms.getElements(el, index);
- jQuery.NiceJForms.replaceRadios(index);
- jQuery.NiceJForms.replaceCheckboxes(index);
- jQuery.NiceJForms.replaceSelects(index);
-
- if (!$.browser.safari) {
- jQuery.NiceJForms.replaceTexts(index);
- jQuery.NiceJForms.replaceTextareas(index);
- jQuery.NiceJForms.buttonHovers(index);
- }
- index++;
- }
- );
- }
- },
-
- preloadImages: function()
- {
- jQuery.NiceJForms.preloads = $.preloadImages(jQuery.NiceJForms.options.imagesPath + "button_left_xon.gif", jQuery.NiceJForms.options.imagesPath + "button_right_xon.gif",
- jQuery.NiceJForms.options.imagesPath + "input_left_xon.gif", jQuery.NiceJForms.options.imagesPath + "input_right_xon.gif",
- jQuery.NiceJForms.options.imagesPath + "txtarea_bl_xon.gif", jQuery.NiceJForms.options.imagesPath + "txtarea_br_xon.gif",
- jQuery.NiceJForms.options.imagesPath + "txtarea_cntr_xon.gif", jQuery.NiceJForms.options.imagesPath + "txtarea_l_xon.gif", jQuery.NiceJForms.options.imagesPath + "txtarea_tl_xon.gif", jQuery.NiceJForms.options.imagesPath + "txtarea_tr_xon.gif");
- },
-
- getElements: function(elm, index)
- {
- el = elm ? jQuery(elm) : jQuery(this);
-
- var r = 0; var c = 0; var t = 0; var rl = 0; var cl = 0; var tl = 0; var b = 0;
-
-// jQuery.NiceJForms.inputs = $('input', el);
- jQuery.NiceJForms.labels[index] = $('label', el);
- jQuery.NiceJForms.textareas[index] = $('textarea', el);
- jQuery.NiceJForms.selects[index] = $('select', el);
- jQuery.NiceJForms.radios[index] = $('input[type=radio]', el);
- jQuery.NiceJForms.checkboxes[index] = $('input[type=checkbox]', el);
- jQuery.NiceJForms.texts[index] = $('input[type=text]', el).add($('input[type=password]', el));
- jQuery.NiceJForms.buttons[index] = $('input[type=submit]', el).add($('input[type=button]', el));
- jQuery.NiceJForms.checkboxLabels[index] = new Array();
- jQuery.NiceJForms.radioLabels[index] = new Array();
-
- jQuery.NiceJForms.labels[index].each(function(i){
- labelFor = $(jQuery.NiceJForms.labels[index][i]).attr("for");
- jQuery.NiceJForms.radios[index].each(function(q){
- if(labelFor == $(jQuery.NiceJForms.radios[index][q]).attr("id"))
- {
- if(jQuery.NiceJForms.radios[index][q].checked)
- {
- $(jQuery.NiceJForms.labels[index][i]).removeClass().addClass("chosen");
- }
-
- jQuery.NiceJForms.radioLabels[index][rl] = jQuery.NiceJForms.labels[index][i];
- ++rl;
- }
- })
-
- jQuery.NiceJForms.checkboxes[index].each(function(x){
- if(labelFor == $(this).attr("id"))
- {
- if(this.checked)
- {
- $(jQuery.NiceJForms.labels[index][i]).removeClass().addClass("chosen");
- }
- jQuery.NiceJForms.checkboxLabels[index][cl] = jQuery.NiceJForms.labels[index][i];
- ++cl;
- }
- })
- });
- },
-
- replaceRadios: function(index)
- {
- var self = this;
-
- jQuery.NiceJForms.radios[index].each(function(q){
-
- $(this).removeClass().addClass('outtaHere'); //.hide(); //.className = "outtaHere";
-
- var radioArea = document.createElement('div');
- //console.info($(radioArea));
- if(this.checked) {$(radioArea).removeClass().addClass("radioAreaChecked");} else {$(radioArea).removeClass().addClass("radioArea");};
-
- radioPos = jQuery.iUtil.getPosition(this);
-
- jQuery(radioArea)
- .attr({id: 'myRadio' + index + '-' + q})
- .css({left: radioPos.x + 'px', top: radioPos.y + 'px', margin : '1px'})
- .bind('click', {who: index + '-' + q}, function(e){self.rechangeRadios(e)})
- .insertBefore($(this));
-
- if (jQuery.NiceJForms.radioLabels[index][q]) $(jQuery.NiceJForms.radioLabels[index][q]).bind('click', {who: index + '-' + q}, function(e){self.rechangeRadios(e)});
-
- if (!$.browser.msie) {
- $(this).bind('focus', function(){self.focusRadios(q)}).bind('blur', function() {self.blurRadios(q)});
- }
-
- $(this).bind('click', {who: index + '-' + q}, function(e){self.radioEvent(e)});
- });
-
- return true;
- },
-
- changeRadios: function(who)
- {
- var self = this;
- var info = e.data.who.split("-");
- var index = info[0];
- var no = info[1];
-
- if(jQuery.NiceJForms.radios[index][no].checked) {
-
- jQuery.NiceJForms.radios[index].each(function(q){
- if($(this).attr("name") == $(jQuery.NiceJForms.radios[index][no]).attr("name"))
- {
- this.checked = false;
- $(jQuery.NiceJForms.radioLabels[index][q]).removeClass();
- }
- });
- jQuery.NiceJForms.radios[index][no].checked = true;
- $(jQuery.NiceJForms.radioLabels[index][no]).addClass("chosen");
-
- self.checkRadios(e.data.who);
- }
- },
-
- rechangeRadios:function(e)
- {
- var info = e.data.who.split("-");
- var index = info[0];
- var no = info[1];
-
- if(!jQuery.NiceJForms.radios[index][no].checked) {
- for(var q = 0; q < jQuery.NiceJForms.radios[index].length; q++)
- {
- if(jQuery.NiceJForms.radios[index][q].name == jQuery.NiceJForms.radios[index][no].name)
- {
- jQuery.NiceJForms.radios[index][q].checked = false;
- //console.info(q);
- if (jQuery.NiceJForms.radioLabels[index][q]) jQuery.NiceJForms.radioLabels[index][q].className = "";
- }
- }
- $(jQuery.NiceJForms.radios[index][no]).attr('checked', true);
- if (jQuery.NiceJForms.radioLabels[index][no]) jQuery.NiceJForms.radioLabels[index][no].className = "chosen";
- jQuery.NiceJForms.checkRadios(e.data.who);
- }
- },
-
- checkRadios: function(who)
- {
- var info = who.split("-");
- var index = info[0];
- var no = info[1];
-
- $('div').each(function(q){
- if($(this).is(".radioAreaChecked") && $(this).next().attr("name") == $(jQuery.NiceJForms.radios[index][no]).attr("name")) {$(this).removeClass().addClass("radioArea");}
- });
- $('#myRadio' + who).toggleClass("radioAreaChecked");
- },
-
- focusRadios: function(who) {
- $('#myRadio' + who).css({border: '1px dotted #333', margin: '0'}); return false;
- },
-
- blurRadios:function(who) {
- $('#myRadio' + who).css({border: 'none', margin: '1px'}); return false;
- },
-
- radioEvent: function(e) {
- var self = this;
- if (!e) var e = window.event;
- var info = e.data.who.split("-");
- var index = info[0];
- var no = info[1];
-
- if(e.type == "click") {
- for (var q = 0; q < jQuery.NiceJForms.radios[index].length; q++) {
- if(this == jQuery.NiceJForms.radios[index][q]) {
- self.changeRadios(q); break;
- }
- }
- }
- },
-
- replaceCheckboxes: function (index)
- {
- var self = this;
-
- jQuery.NiceJForms.checkboxes[index].each(function(q){
- //move the checkboxes out of the way
- $(jQuery.NiceJForms.checkboxes[index][q]).removeClass().addClass('outtaHere');
- //create div
- var checkboxArea = document.createElement('div');
-
- //console.info($(radioArea));
- if(jQuery.NiceJForms.checkboxes[index][q].checked) {$(checkboxArea).removeClass().addClass("checkboxAreaChecked");} else {$(checkboxArea).removeClass().addClass("checkboxArea");};
-
- checkboxPos = jQuery.iUtil.getPosition(jQuery.NiceJForms.checkboxes[index][q]);
-
- jQuery(checkboxArea)
- .attr({id: 'myCheckbox' + index + '-' + q})
- .css({
- left: checkboxPos.x + 'px',
- top: checkboxPos.y + 'px',
- margin : '1px'
- })
- .bind('click', {who: index + '-' + q}, function(e){self.rechangeCheckboxes(e)})
- .insertBefore($(jQuery.NiceJForms.checkboxes[index][q]));
-
- if(!$.browser.safari)
- {
- $(jQuery.NiceJForms.checkboxLabels[index][q]).bind('click', {who: index + '-' + q}, function(e){self.changeCheckboxes(e)})
- }
- else {
- $(jQuery.NiceJForms.checkboxLabels[index][q]).bind('click', {who: index + '-' + q}, function(e){self.rechangeCheckboxes(e)})
- }
-
- if(!$.browser.msie)
- {
- $(jQuery.NiceJForms.checkboxes[index][q]).bind('focus', {who: index + '-' + q}, function(e){self.focusCheckboxes(e)});
- $(jQuery.NiceJForms.checkboxes[index][q]).bind('blur', {who: index + '-' + q}, function(e){self.blurCheckboxes(e)});
- }
-
- //$(jQuery.NiceJForms.checkboxes[index][q]).keydown(checkEvent);
- });
- return true;
- },
-
- rechangeCheckboxes: function(e)
- {
- var info = e.data.who.split("-");
- var index = info[0];
- var no = info[1];
- var tester = false;
-
- if($(jQuery.NiceJForms.checkboxLabels[index][no]).is(".chosen")) {
- tester = false;
- $(jQuery.NiceJForms.checkboxLabels[index][no]).removeClass();
- }
- else if(jQuery.NiceJForms.checkboxLabels[index][no].className == "") {
- tester = true;
- $(jQuery.NiceJForms.checkboxLabels[index][no]).addClass("chosen");
- }
- jQuery.NiceJForms.checkboxes[index][no].checked = tester;
- jQuery.NiceJForms.checkCheckboxes(e.data.who, tester);
- },
-
- checkCheckboxes: function(who, action)
- {
- var what = $('#myCheckbox' + who);
- if(action == true) {$(what).removeClass().addClass("checkboxAreaChecked");}
- if(action == false) {$(what).removeClass().addClass("checkboxArea");}
- },
-
- focusCheckboxes: function(who)
- {
- var what = $('#myCheckbox' + who);
- $(what).css(
- {
- border : "1px dotted #333",
- margin : "0"
- });
- return false;
- },
-
- changeCheckboxes: function(e)
- {
- var info = e.data.who.split("-");
- var index = info[0];
- var no = info[1];
-
- //console.log('changeCheckboxes who is ' + who);
- if($(jQuery.NiceJForms.checkboxLabels[index][no]).is(".chosen")) {
- jQuery.NiceJForms.checkboxes[index][no].checked = true;
- $(jQuery.NiceJForms.checkboxLabels[index][no]).removeClass();
- jQuery.NiceJForms.checkCheckboxes(e.data.who, false);
- }
- else if(jQuery.NiceJForms.checkboxLabels[index][no].className == "") {
- jQuery.NiceJForms.checkboxes[index][no].checked = false;
- $(jQuery.NiceJForms.checkboxLabels[index][no]).toggleClass("chosen");
- jQuery.NiceJForms.checkCheckboxes(e.data.who, true);
- }
- },
-
- blurCheckboxes: function(who)
- {
- var what = $('#myCheckbox' + who);
- $(what).css(
- {
- border : 'none',
- margin : '1px'
- });
- return false;
- },
-
- replaceSelects: function(index)
- {
- var self = this;
-
- jQuery.NiceJForms.selects[index].each(function(q){
- //create and build div structure
- var selectArea = document.createElement('div');
- var left = document.createElement('div');
- var right = document.createElement('div');
- var center = document.createElement('div');
- var button = document.createElement('a');
- var text = document.createTextNode(jQuery.NiceJForms.selectText);
- var widthStr = this.className.replace(/width_/g, "");
- if (!widthStr) widthStr = jQuery.NiceJForms.options.selectWidth;
- var selectWidth = parseInt(widthStr);
-
- jQuery(center)
- .attr({id:'mySelectText' + index + '-' + q})
- .css({width: selectWidth - 10 + 'px'});
- jQuery(selectArea)
- .attr({id:'sarea' + index + '-' + q})
- .css({
- width: selectWidth + jQuery.NiceJForms.options.selectRightSideWidth + jQuery.NiceJForms.options.selectLeftSideWidth + 'px'
- })
- .addClass("selectArea");
-
- jQuery(button)
- .css({
- width : selectWidth + jQuery.NiceJForms.options.selectRightSideWidth + jQuery.NiceJForms.options.selectLeftSideWidth + 'px',
- marginLeft : - selectWidth - jQuery.NiceJForms.options.selectLeftSideWidth + 'px',
- cursor: 'pointer'
- })
- .addClass("selectButton")
- .bind('click', {who: index + '-' + q}, function(e){self.showOptions(e)})
- .keydown(jQuery.NiceJForms.keyPressed);
-
- jQuery(left).addClass("left");
- jQuery(right).addClass("right").append(button);
- jQuery(center).addClass("center").append(text);
-
- jQuery(selectArea).append(left).append(right).append(center).insertBefore(this);
- //hide the select field
- $(this).hide();
- //insert select div
- //build & place options div
- var optionsDiv = document.createElement('div');
- selectAreaPos = jQuery.iUtil.getPosition(selectArea);
-
- jQuery(optionsDiv)
- .attr({id:"optionsDiv" + index + '-' + q})
- .css({
- width : selectWidth + 1 + 'px',
- left : selectAreaPos.x + 'px',
- top : selectAreaPos.y + jQuery.NiceJForms.options.selectAreaHeight - jQuery.NiceJForms.options.selectAreaOptionsOverlap + 'px'
- })
- .addClass("optionsDivInvisible");
-
- //get select's options and add to options div
- $(jQuery.NiceJForms.selects[index][q]).children().each(function(w){
- var optionHolder = document.createElement('p');
- var optionLink = document.createElement('a');
- var optionTxt = document.createTextNode(jQuery.NiceJForms.selects[index][q].options[w].text);
-
- jQuery(optionLink)
- .attr({href:'#'})
- .css({cursor:'pointer'})
- .append(optionTxt)
- .bind('click', {who: index + '-' + q, id:jQuery.NiceJForms.selects[index][q].id, option:w, select: index + '-' + q}, function(e){self.showOptions(e);self.selectMe(jQuery.NiceJForms.selects[index][q].id, w, index + '-' + q)});
-
- jQuery(optionHolder).append(optionLink);
- jQuery(optionsDiv).append(optionHolder);
-
- //check for pre-selected items
- if(jQuery.NiceJForms.selects[index][q].options[w].selected) {self.selectMe($(jQuery.NiceJForms.selects[index][q]).attr("id"), w, index + '-' + q);}
- });
-
- jQuery('body').append(optionsDiv);
- });
- },
-
- selectMe: function(selectFieldId, linkNo, selectNo) {
- selectField = $('#' + selectFieldId);
- sFoptions = selectField.children();
- var valueChanged = false;
- selectField.children().each(function(k){
- if(k == linkNo){
- if (sFoptions[k].selected == "") valueChanged = true;;
- sFoptions[k].selected="selected";
- } else {
- sFoptions[k].selected = "";
- }
- });
-
- textVar = $("#mySelectText" + selectNo);
- var newText = document.createTextNode($(sFoptions[linkNo]).text());
- textVar.empty().append(newText);
-
- if (valueChanged) selectField.change();
- },
-
- showOptions: function(e) {
- var self = this;
- $("#optionsDiv"+e.data.who).toggleClass("optionsDivVisible").toggleClass("optionsDivInvisible").mouseout(function(e){self.hideOptions(e)});
- },
-
- hideOptions: function(e) {
- if (!e) var e = window.event;
- var reltg = (e.relatedTarget) ? e.relatedTarget : e.toElement;
- if(((reltg.nodeName != 'A') && (reltg.nodeName != 'DIV')) || ((reltg.nodeName == 'A') && (reltg.className=="selectButton") && (reltg.nodeName != 'DIV'))) {this.className = "optionsDivInvisible";};
- e.cancelBubble = true;
- if (e.stopPropagation) e.stopPropagation();
- },
-
- replaceTexts: function(index) {
- jQuery.NiceJForms.texts[index].each(function(q){
- $(jQuery.NiceJForms.texts[index][q]).css({width:this.size * 10 + 'px'});
- var txtLeft = new Image();
- jQuery(txtLeft)
- .attr({src:jQuery.NiceJForms.options.imagesPath + "input_left.gif"})
- .addClass("inputCorner");
-
- var txtRight = new Image();
- jQuery(txtRight)
- .attr({src:jQuery.NiceJForms.options.imagesPath + "input_right.gif"})
- .addClass("inputCorner");
-
- $(jQuery.NiceJForms.texts[index][q]).before(txtLeft).after(txtRight).addClass("textinput");
-
- //create hovers
- $(jQuery.NiceJForms.texts[index][q]).focus(function(){$(this).addClass("textinputHovered");$(this).prev().attr('src', jQuery.NiceJForms.options.imagesPath + "input_left_xon.gif");$(this).next().attr('src', jQuery.NiceJForms.options.imagesPath + "input_right_xon.gif");});
-
- $(jQuery.NiceJForms.texts[index][q]).blur(function() {$(this).removeClass().addClass("textinput");$(this).prev().attr('src', jQuery.NiceJForms.options.imagesPath + "input_left.gif");$(this).next().attr('src', jQuery.NiceJForms.options.imagesPath + "input_right.gif");});
- });
- },
-
- replaceTextareas: function(index)
- {
- jQuery.NiceJForms.textareas[index].each(function(q){
-
- var where = $(this).parent();
- var where2 = $(this).prev();
-
- // ##### textarea removed problem fixed by naoki. #####
- var insertPos = document.createElement('span');
- $(this).before(jQuery(insertPos));
-
- $(this).css({width: $(this).attr("cols") * 10 + 'px', height: $(this).attr("rows") * 10 + 'px'});
- //create divs
- var container = document.createElement('div');
- jQuery(container)
- .css({width: jQuery.NiceJForms.textareas[index][q].cols * 10 + 20 + 'px', height: jQuery.NiceJForms.textareas[index][q].rows * 10 + 20 + 'px'})
- .addClass("txtarea");
-
- var topRight = document.createElement('div');
- jQuery(topRight).addClass("tr");
-
- var topLeft = new Image();
- jQuery(topLeft).attr({src: jQuery.NiceJForms.options.imagesPath + 'txtarea_tl.gif'}).addClass("txt_corner");
-
- var centerRight = document.createElement('div');
- jQuery(centerRight).addClass("cntr");
- var centerLeft = document.createElement('div');
- jQuery(centerLeft).addClass("cntr_l");
-
- if(!$.browser.msie) {jQuery(centerLeft).height(jQuery.NiceJForms.textareas[index][q].rows * 10 + 10 + 'px')}
- else {jQuery(centerLeft).height(jQuery.NiceJForms.textareas[index][q].rows * 10 + 12 + 'px')};
-
- var bottomRight = document.createElement('div');
- jQuery(bottomRight).addClass("br");
- var bottomLeft = new Image();
- jQuery(bottomLeft).attr({src: jQuery.NiceJForms.options.imagesPath + 'txtarea_bl.gif'}).addClass('txt_corner');
-
- //assemble divs
- jQuery(topRight).append(topLeft);
- jQuery(centerRight).append(centerLeft).append(jQuery.NiceJForms.textareas[index][q]);
- jQuery(bottomRight).append(bottomLeft);
- jQuery(container).append(topRight).append(centerRight).append(bottomRight);
-
- // ##### textarea removed problem fixed by naoki. #####
- //jQuery(where2).before(container);
- jQuery(insertPos).after(container);
-
- //create hovers
- $(jQuery.NiceJForms.textareas[index][q]).focus(function(){$(this).prev().removeClass().addClass("cntr_l_xon"); $(this).parent().removeClass().addClass("cntr_xon"); $(this).parent().prev().removeClass().addClass("tr_xon"); $(this).parent().prev().children(".txt_corner").attr('src', jQuery.NiceJForms.options.imagesPath + "txtarea_tl_xon.gif"); $(this).parent().next().removeClass().addClass("br_xon"); $(this).parent().next().children(".txt_corner").attr('src', jQuery.NiceJForms.options.imagesPath + "txtarea_bl_xon.gif")});
- $(jQuery.NiceJForms.textareas[index][q]).blur(function(){$(this).prev().removeClass().addClass("cntr_l"); $(this).parent().removeClass().addClass("cntr"); $(this).parent().prev().removeClass().addClass("tr"); $(this).parent().prev().children(".txt_corner").attr('src', jQuery.NiceJForms.options.imagesPath + "txtarea_tl.gif"); $(this).parent().next().removeClass().addClass("br"); $(this).parent().next().children(".txt_corner").attr('src', jQuery.NiceJForms.options.imagesPath + "txtarea_bl.gif")});
- });
- },
-
- buttonHovers: function(index) {
- jQuery.NiceJForms.buttons[index].each(function(i){
- $(this).addClass("buttonSubmit");
- var buttonLeft = document.createElement('img');
- jQuery(buttonLeft).attr({src: jQuery.NiceJForms.options.imagesPath + "button_left.gif"}).addClass("buttonImg");
-
- $(this).before(buttonLeft);
-
- var buttonRight = document.createElement('img');
- jQuery(buttonRight).attr({src: jQuery.NiceJForms.options.imagesPath + "button_right.gif"}).addClass("buttonImg");
-
- if($(this).next()) {$(this).after(buttonRight)}
- else {$(this).parent().append(buttonRight)};
-
- $(this).hover(
- function(){$(this).attr("class", $(this).attr("class") + "Hovered"); $(this).prev().attr("src", jQuery.NiceJForms.options.imagesPath + "button_left_xon.gif"); $(this).next().attr("src", jQuery.NiceJForms.options.imagesPath + "button_right_xon.gif")},
- function(){$(this).attr("class", $(this).attr("class").replace(/Hovered/g, "")); $(this).prev().attr("src", jQuery.NiceJForms.options.imagesPath + "button_left.gif"); $(this).next().attr("src", jQuery.NiceJForms.options.imagesPath + "button_right.gif")}
- );
- });
- }
-}
-
-jQuery.preloadImages = function()
-{
- var imgs = new Array();
- for(var i = 0; i<arguments.length; i++)
- {
- imgs[i] = jQuery("<img>").attr("src", arguments[i]);
- }
-
- return imgs;
-}
-
-jQuery.iUtil = {
- getPosition : function(e)
- {
- var x = 0;
- var y = 0;
- var restoreStyle = false;
- var es = e.style;
- if (jQuery(e).css('display') == 'none') {
- oldVisibility = es.visibility;
- oldPosition = es.position;
- es.visibility = 'hidden';
- es.display = 'block';
- es.position = 'absolute';
- restoreStyle = true;
- }
- var el = e;
- while (el){
- x += el.offsetLeft + (el.currentStyle && !jQuery.browser.opera ?parseInt(el.currentStyle.borderLeftWidth)||0:0);
- y += el.offsetTop + (el.currentStyle && !jQuery.browser.opera ?parseInt(el.currentStyle.borderTopWidth)||0:0);
- el = el.offsetParent;
- }
- el = e;
- while (el && el.tagName && el.tagName.toLowerCase() != 'body')
- {
- x -= el.scrollLeft||0;
- y -= el.scrollTop||0;
- el = el.parentNode;
- }
- if (restoreStyle) {
- es.display = 'none';
- es.position = oldPosition;
- es.visibility = oldVisibility;
- }
- return {x:x, y:y};
- },
- getPositionLite : function(el)
- {
- var x = 0, y = 0;
- while(el) {
- x += el.offsetLeft || 0;
- y += el.offsetTop || 0;
- el = el.offsetParent;
- }
- return {x:x, y:y};
- }
-};
\ No newline at end of file
+++ /dev/null
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package Magic3 Framework
- * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2011 Magic3 Project.
- * @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: ie6_nomoreWidgetContainer.php 4376 2011-10-05 05:33:55Z fishbone $
- * @link http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseWidgetContainer.php');
-
-class ie6_nomoreWidgetContainer extends BaseWidgetContainer
-{
- /**
- * コンストラクタ
- */
- function __construct()
- {
- // 親クラスを呼び出す
- parent::__construct();
- }
- /**
- * テンプレートファイルを設定
- *
- * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
- * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
- *
- * @param RequestManager $request HTTPリクエスト処理クラス
- * @param object $param 任意使用パラメータ。そのまま_assign()に渡る
- * @return string テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
- */
- function _setTemplate($request, &$param)
- {
- return 'index.tmpl.html';
- }
- /**
- * テンプレートにデータ埋め込む
- *
- * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
- *
- * @param RequestManager $request HTTPリクエスト処理クラス
- * @param object $param 任意使用パラメータ。_setTemplate()と共有。
- * @return なし
- */
- function _assign($request, &$param)
- {
- }
-}
-?>
+++ /dev/null
-<patTemplate:tmpl name="_widget">\r
-<!--[if lt IE 7]> <div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative;'> <div style='position: absolute; right: 3px; top: 3px; font-family: courier new; font-weight: bold;'><a href='#' onclick='javascript:this.parentNode.parentNode.style.display='none'; return false;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/></a></div> <div style='width: 350px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'> <div style='width: 75px; float: left;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt='Warning!'/></div> <div style='width: 275px; float: left; font-family: Arial, sans-serif;'> <div style='font-size: 14px; font-weight: bold; margin-top: 12px;'>あなたは旧式ブラウザをご利用中です</div> <div style='font-size: 12px; margin-top: 6px; line-height: 12px;'>このウェブサイトを快適に閲覧するにはブラウザをアップグレードしてください。</div> </div> <div style='width: 75px; float: left;'><a href='http://www.mozilla.jp' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-firefox.jpg' style='border: none;' alt='Get Firefox 3.5'/></a></div> <div style='width: 75px; float: left;'><a href='http://www.microsoft.com/downloads/details.aspx?FamilyID=341c2ad5-8c3d-4347-8c03-08cdecd8852b&DisplayLang=ja' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-ie8.jpg' style='border: none;' alt='Get Internet Explorer 8'/></a></div> <div style='width: 73px; float: left;'><a href='http://www.apple.com/jp/safari/download/' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-safari.jpg' style='border: none;' alt='Get Safari 4'/></a></div> <div style='float: left;'><a href='http://www.google.com/chrome?hl=ja' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-chrome.jpg' style='border: none;' alt='Get Google Chrome'/></a></div> </div> </div> <![endif]-->\r
-</patTemplate:tmpl>\r
+++ /dev/null
-<?php
-/**
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package Magic3 Framework
- * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2009 Magic3 Project.
- * @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: index.php 4376 2011-10-05 05:33:55Z fishbone $
- * @link http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>
+++ /dev/null
-<?php
-/**
- * index.php用コンテナクラス
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package Magic3 Framework
- * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2007 Magic3 Project.
- * @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: joomla_clockWidgetContainer.php 8 2007-11-07 08:37:04Z fishbone $
- * @link http://www.magic3.org
- */
-require_once($gEnvManager->getContainerPath() . '/baseWidgetContainer.php');
-
-class joomla_clockWidgetContainer extends BaseWidgetContainer
-{
- /**
- * コンストラクタ
- */
- function __construct()
- {
- // 親クラスを呼び出す
- parent::__construct();
- }
- /**
- * テンプレートファイルを設定
- *
- * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
- * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
- *
- * @param RequestManager $request HTTPリクエスト処理クラス
- * @param object $param 任意使用パラメータ。そのまま_assign()に渡る
- * @return string テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
- */
- function _setTemplate($request, &$param)
- {
- return 'index.tmpl.html';
- }
- /**
- * テンプレートにデータ埋め込む
- *
- * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
- *
- * @param RequestManager $request HTTPリクエスト処理クラス
- * @param object $param 任意使用パラメータ。_setTemplate()と共有。
- * @return なし
- */
- function _assign($request, &$param)
- {
- global $gEnvManager;
-
- // 作成したHTMLを出力
- $this->tmpl->addVar("_widget", "WIDGET_URL", $gEnvManager->getCurrentWidgetRootUrl());
- }
-}
-?>
+++ /dev/null
-<patTemplate:tmpl name="_widget">
-<div style="text-align:center;" width="100%" align="middle" >
-<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="140" height="140" id="clock">
-<param name="movie" value="{WIDGET_URL}/clock.swf">
-<param name="quality" value="high">
-<param name="bgcolor">
-<param name="menu" value="false">
-<embed src="{WIDGET_URL}/clock.swf" quality="high" width="140" height="140" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" menu="false">
-</embed>
-</object>
-</div>
-</patTemplate:tmpl>
+++ /dev/null
-<?php
-/**
- * index.php
- *
- * PHP versions 5
- *
- * LICENSE: This source file is licensed under the terms of the GNU General Public License.
- *
- * @package Magic3 Framework
- * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright Copyright 2006-2007 Magic3 Project.
- * @license http://www.gnu.org/copyleft/gpl.html GPL License
- * @version SVN: $Id: index.php 8 2007-11-07 08:37:04Z fishbone $
- * @link http://www.magic3.org
- */
-// 直接アクセスの防止
-defined('M3_SYSTEM') or die('Access error: Direct access denied.');
-
-// ウィジェット実行
-global $gLaunchManager;
-$gLaunchManager->goWidget(__FILE__);
-?>