Cloud computing platform
Revisão | 767186207b417128f2e6f79b75ad939c31281b1d (tree) |
---|---|
Hora | 2017-07-21 08:20:24 |
Autor | naoki hirata <naoki@magi...> |
Commiter | naoki hirata |
ページタイトルの設定処理更新。
@@ -39,6 +39,7 @@ class EnvManager extends Core | ||
39 | 39 | private $currentPageDefRec; // 現在処理中のウィジェットのページ定義レコード |
40 | 40 | private $defaultPageSubId; // デフォルトのページサブId |
41 | 41 | private $currentPageDeviceType; // 現在のページの端末タイプ |
42 | + private $currentWidgetHeadTitle; // 現在作成中のウィジェットのヘッドタイトル文字列 | |
42 | 43 | private $currentWidgetPrefix; // 現在作成中のウィジェットのプレフィックス文字列 |
43 | 44 | private $currentWidgetTitle; // 現在作成中のウィジェットのタイトル文字列 |
44 | 45 | private $currentWidgetStyle; // 現在作成中のウィジェットのスタイル文字列 |
@@ -1699,6 +1700,25 @@ class EnvManager extends Core | ||
1699 | 1700 | return $this->currentWidgetPrefix; |
1700 | 1701 | } |
1701 | 1702 | /** |
1703 | + * 現在処理中のウィジェットのヘッドタイトル文字列を設定 | |
1704 | + * | |
1705 | + * @param string $val タイトル文字列 | |
1706 | + * @return なし | |
1707 | + */ | |
1708 | + public function setCurrentWidgetHeadTitle($val) | |
1709 | + { | |
1710 | + $this->currentWidgetHeadTitle = $val; | |
1711 | + } | |
1712 | + /** | |
1713 | + * 現在処理中のウィジェットのヘッドタイトル文字列を取得 | |
1714 | + * | |
1715 | + * @return string タイトル文字列 | |
1716 | + */ | |
1717 | + public function getCurrentWidgetHeadTitle() | |
1718 | + { | |
1719 | + return $this->currentWidgetHeadTitle; | |
1720 | + } | |
1721 | + /** | |
1702 | 1722 | * 現在処理中のウィジェットのタイトル文字列 |
1703 | 1723 | * |
1704 | 1724 | * @param string $val タイトル文字列 |
@@ -554,12 +554,19 @@ class PageManager extends Core | ||
554 | 554 | * @param string $str 出力文字列 |
555 | 555 | * @param string $url リンク先 |
556 | 556 | */ |
557 | - function setHeadSubTitle($str, $url='') | |
557 | + function setHeadSubTitle($str = '', $url = '') | |
558 | 558 | { |
559 | - if (is_string($str) && !empty($str)){ | |
560 | - $this->headSubTitle[] = $str; | |
561 | - $this->headSubTitleUrl[] = $url; | |
562 | - $this->lastHeadTitle = $str; // 最後に設定した値を退避 | |
559 | + global $gEnvManager; | |
560 | + | |
561 | + if (is_string($str)){ | |
562 | + // 空の場合はウィジェットのヘッドタイトルから取得 | |
563 | + if (empty($str)) $str = $gEnvManager->getCurrentWidgetHeadTitle(); | |
564 | + | |
565 | + if (!empty($str)){ | |
566 | + $this->headSubTitle[] = $str; | |
567 | + $this->headSubTitleUrl[] = $url; | |
568 | + $this->lastHeadTitle = $str; // 最後に設定した値を退避 | |
569 | + } | |
563 | 570 | } |
564 | 571 | } |
565 | 572 | /** |
@@ -5409,6 +5416,8 @@ class PageManager extends Core | ||
5409 | 5416 | $prefix = $fetchedRow['wd_suffix']; // サフィックス文字列 |
5410 | 5417 | $title = $fetchedRow['wd_name']; // デフォルトのウィジェットタイトル |
5411 | 5418 | if (empty($title)) $title = $fetchedRow['wd_id']; |
5419 | + $widgetHeadTitle = $fetchedRow['pd_title']; // ウィジェットのヘッドタイトル | |
5420 | + if (empty($widgetHeadTitle)) $widgetHeadTitle = $title; // ウィジェットのヘッドタイトルが空の場合はウィジェットタイトルを取得 | |
5412 | 5421 | $serial = $fetchedRow['pd_serial']; // シリアル番号 |
5413 | 5422 | $cssStyle = $fetchedRow['pd_style']; // CSS |
5414 | 5423 | $lateLaunchIndex = $fetchedRow['wd_launch_index']; // 遅延実行インデックス |
@@ -5500,6 +5509,9 @@ class PageManager extends Core | ||
5500 | 5509 | // パラメータを設定 |
5501 | 5510 | $gEnvManager->setCurrentWidgetPrefix($prefix); // プレフィックス文字列 |
5502 | 5511 | |
5512 | + // ウィジェットのヘッドタイトルを設定 | |
5513 | + $gEnvManager->setCurrentWidgetHeadTitle($widgetHeadTitle); | |
5514 | + | |
5503 | 5515 | // ウィジェットのタイトルを設定 |
5504 | 5516 | $gEnvManager->setCurrentWidgetTitle($title); |
5505 | 5517 |
@@ -8,7 +8,7 @@ | ||
8 | 8 | * |
9 | 9 | * @package Magic3 Framework |
10 | 10 | * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp> |
11 | - * @copyright Copyright 2006-2014 Magic3 Project. | |
11 | + * @copyright Copyright 2006-2017 Magic3 Project. | |
12 | 12 | * @license http://www.gnu.org/copyleft/gpl.html GPL License |
13 | 13 | * @version SVN: $Id$ |
14 | 14 | * @link http://www.magic3.org |
@@ -239,7 +239,8 @@ class contactusWidgetContainer extends BaseWidgetContainer | ||
239 | 239 | } |
240 | 240 | } |
241 | 241 | // HTMLサブタイトルを設定 |
242 | - $this->gPage->setHeadSubTitle(self::DEFAULT_TITLE_NAME); | |
242 | +// $this->gPage->setHeadSubTitle(self::DEFAULT_TITLE_NAME); | |
243 | + $this->gPage->setHeadSubTitle(); // 共通設定画面の「タイトル」値を使用する | |
243 | 244 | |
244 | 245 | // タイトルの表示 |
245 | 246 | if ($showTitle){ |