DELETE FROM _widgets WHERE wd_id = 'blog_main';\r
INSERT INTO _widgets\r
(wd_id, wd_name, wd_type, wd_content_type, wd_category_id, wd_template_type, wd_edit_content, wd_version, wd_required_version, 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_release_dt, wd_install_dt, wd_create_dt) VALUES\r
-('blog_main', 'ブログ-メイン', 'blog', 'blog', 'blog', 'bootstrap', true, '3.6.0', '2.10.10', 'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'ブログ記事を管理し、画面に表示します。', 'entry_detail=jquery-ui.tabs,ckeditor_m3toolbar;image=jquery.jcrop,elfinder;', 'entry_detail=jquery-ui.tabs,ckeditor_m3toolbar;config=ckeditor_m3toolbar,jquery.uploadfile;image=jquery.jcrop,elfinder;analytics=jquery.m3stickyheader,jquery.jqplot;', false, false, true, true, true, true, false,true, '2016-04-24', now(), now());\r
+('blog_main', 'ブログ-メイン', 'blog', 'blog', 'blog', 'bootstrap', true, '3.7.0', '2.15.15', 'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'ブログ記事を管理し、画面に表示します。', 'entry_detail=jquery-ui.tabs,ckeditor_m3toolbar;image=jquery.jcrop,elfinder;schedule_detail=jquery-ui.tabs,ckeditor_m3toolbar;', 'entry_detail=jquery-ui.tabs,ckeditor_m3toolbar;config=ckeditor_m3toolbar,jquery.uploadfile;image=jquery.jcrop,elfinder;analytics=jquery.m3stickyheader,jquery.jqplot;schedule_detail=jquery-ui.tabs,ckeditor_m3toolbar;', false, false, true, true, true, true, false,true, '2016-05-30', now(), now());\r
DELETE FROM _widgets WHERE wd_id = 'blog_search_box';\r
INSERT INTO _widgets\r
(wd_id, wd_name, wd_category_id, wd_template_type, 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_release_dt, wd_install_dt, wd_create_dt) VALUES\r
padding-right: 0;
/* padding-right: 5px;*/
}
-.m3config_item.join {
+/*.m3config_item.join {
padding-left: 0;
padding-right: 5px;
+}*/
+.m3config_item.following {
+ padding-left: 5px;
+ padding-right: 0;
}
.m3config_item.form-control-static {
padding-left: 3px;
padding-right: 3px;
}
+.m3config_item.form-control-static.following {
+ margin-left: 20px;
+}
/* インライン項目 */
.m3config_inline_item {
padding-left: 0;
</select></div>
</div>
<div class="form-group clearfix">
+<div class="form-control-static col-sm-2 m3config_item" style="width:4em;">日付:</div><div class="col-sm-4 m3config_item" style="width:10em;"><input type="text" class="form-control" id="item_entry_date" name="item_entry_date" value="" size="20" maxlength="10" /></div><div class="form-control-static col-sm-2 m3config_item following" style="width:4em;">時間:</div><div class="col-sm-4 m3config_item" style="width:10em;"><input type="text" class="form-control" id="item_entry_time" name="item_entry_time" value="" size="20" maxlength="10" /></div>
+</div>
+<div class="form-group clearfix">
<div class="checkbox m3config_inline_item col-sm-2"><label><input type="checkbox" name="item_detail_visible" />詳細ボタン</label></div>
- <div class="form-control-static col-sm-2 m3config_item" style="width:5em;">ラベル:</div><div class="col-sm-4 m3config_item join"><input type="text" name="item_detail_label" value="もっと詳しく..." maxlength="40" /></div>
- <div class="col-sm-4 m3config_item"><select name="item_select">
+ <div class="form-control-static col-sm-2 m3config_item" style="width:5em;">ラベル:</div><div class="col-sm-4 m3config_item"><input type="text" name="item_detail_label" value="もっと詳しく..." maxlength="40" /></div>
+ <div class="col-sm-4 m3config_item following"><select name="item_select">
<option value="small" >小</option>
<option value="large" selected>中</option>
</select></div>
</div>
<div class="form-group">
-<div class="col-sm-4 m3config_item join"><input type="text" name="item_input1" value="入力データ1" /></div>
-<div class="col-sm-4 m3config_item join"><input type="text" name="item_input2" value="入力データ2" /></div>
-<div class="col-sm-4 m3config_item"><input type="text" name="item_input3" value="入力データ3" /></div>
+<div class="col-sm-4 m3config_item"><input type="text" name="item_input1" value="入力データ1" /></div>
+<div class="col-sm-4 m3config_item following"><input type="text" name="item_input2" value="入力データ2" /></div>
+<div class="col-sm-4 m3config_item following"><input type="text" name="item_input3" value="入力データ3" /></div>
</div>
</td>
</tr>
private $serialArray = array(); // 表示されている項目シリアル番号
const DEFAULT_LIST_COUNT = 20; // 最大リスト表示数
const LINK_PAGE_COUNT = 20; // リンクページ数
+ const EYECATCH_IMAGE_SIZE = 40; // アイキャッチ画像サイズ
/**
* コンストラクタ
$entryId = $request->trimValueOf(M3_REQUEST_PARAM_BLOG_ENTRY_ID);
$pageNo = $request->trimIntValueOf(M3_REQUEST_PARAM_PAGE_NO, '1'); // ページ番号
+// $name = $request->trimValueOf('item_name');
+ $updateDate = $request->trimValueOf('item_date'); // 更新日
+ $updateTime = $request->trimValueOf('item_time'); // 更新時間
+ $html = $request->valueOf('item_html');
+ $html2 = $request->valueOf('item_html2');
+
+ // ブログ記事を取得
+ $ret = self::$_mainDb->getEntryItem($entryId, $langId, $row);
+ if ($ret){
+ $entrySerialNo = $row['be_serial']; // シリアル番号
+ $reloadData = true; // データの再読み込み
+
+ $name = $row['be_name']; // タイトル
+ $html = $row['be_html']; // HTML
+ $html = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->getUrl($this->gEnv->getRootUrl()), $html);// アプリケーションルートを変換
+ $html2 = $row['be_html_ext']; // HTML
+ $html2 = str_replace(M3_TAG_START . M3_TAG_MACRO_ROOT_URL . M3_TAG_END, $this->getUrl($this->gEnv->getRootUrl()), $html2);// アプリケーションルートを変換
+
+ // アイキャッチ画像
+ $iconUrl = blog_mainCommonDef::getEyecatchImageUrl($row['be_thumb_filename'], self::$_configArray[blog_mainCommonDef::CF_ENTRY_DEFAULT_IMAGE], self::$_configArray[blog_mainCommonDef::CF_THUMB_TYPE], 's'/*sサイズ画像*/) . '?' . date('YmdHis');
+ if (empty($row['be_thumb_filename'])){
+ $iconTitle = 'アイキャッチ画像未設定';
+ } else {
+ $iconTitle = 'アイキャッチ画像';
+ }
+ $eyecatchImageTag = '<img src="' . $this->getUrl($iconUrl) . '" width="' . self::EYECATCH_IMAGE_SIZE . '" height="' . self::EYECATCH_IMAGE_SIZE . '" rel="m3help" alt="' . $iconTitle . '" title="' . $iconTitle . '" />';
+ } else {
+ $entrySerialNo = 0;
+
+ $name = ''; // タイトル
+ $html = ''; // HTML
+ $html2 = ''; // HTML
+ }
+
+
// プレビュー用URL
$previewUrl = $this->gEnv->getDefaultUrl() . '?' . M3_REQUEST_PARAM_BLOG_ENTRY_ID . '=' . $entryId;
if ($historyIndex >= 0) $previewUrl .= '&' . M3_REQUEST_PARAM_HISTORY . '=' . $historyIndex; // 履歴番号(旧データの場合のみ有効)
$this->loadCKEditorCssFiles($previewUrl);
// その他
- $this->tmpl->addVar("_widget", "page", $pageNo);
- $this->tmpl->addVar("_widget", "entry_id", $entryId);
+ $this->tmpl->addVar("_widget", "page", $this->convertToDispString($pageNo));
+ $this->tmpl->addVar("_widget", "entry_id", $this->convertToDispString($entryId));
+ $this->tmpl->addVar("_widget", "id", $this->convertToDispString($entryId));
+ $this->tmpl->addVar("_widget", "item_name", $this->convertToDispString($name)); // 名前
+ $this->tmpl->addVar("_widget", "item_html", $html); // HTML
+ $this->tmpl->addVar("_widget", "item_html2", $html2); // HTML(続き)
+ $this->tmpl->addVar("_widget", "eyecatch_image", $eyecatchImageTag); // アイキャッチ画像
}
/**
* 取得したデータをテンプレートに設定する
$("#entryhtml").tabs();
// 編集状態メニューのイベント設定
-/* $('#item_status').change(function() {
+ $('#item_status').change(function() {
setStatusColor();
});
- setStatusColor();*/
-
- // 公開期間エリア表示制御
-/* $("#{TAGID_ACTIVE_TERM}").click(function(){
- var $tableRow = $('tr.active_term_area');
- if ($tableRow.is(':hidden')){
- $('#tmprow').remove();
- $tableRow.slideToggle('slow');
- } else {
- $tableRow.slideToggle('slow', function(){
- $tableRow.after('<tr id="tmprow"></tr>');
- });
- }
-
- // 表示エリアリサイズ
- m3AdjustParentWindow();
- return false;
- });
- if ({SHOW_ACTIVE_TERM_AREA}){
- $('tr.active_term_area').show();
- } else {
- $('tr.active_term_area').after('<tr id="tmprow"></tr>').hide();
- }*/
+ setStatusColor();
// カレンダー作成
/* Calendar.setup({
<select id="item_status" name="item_status" class="form-control">
<option value="1" {SELECTED_EDIT}>編集中(非公開)</option>
<option value="2" {SELECTED_PUBLIC}>公開</option>
- <option value="3" {SELECTED_CLOSED}>非公開</option>
</select>
</div>
</td>
</tr>
<tr>
<th><span {_HELP_SCHEDULE_NAME}>タイトル</span></th>
- <td colspan="5"><input type="text" name="item_name" class="form-control" value="{ITEM_NAME}" size="60" maxlength="60" /></td>
+ <td colspan="5"><input type="text" name="item_name" class="form-control" value="{ITEM_NAME}" maxlength="60" disabled /></td>
</tr>
<tr>
- <th><span {_HELP_SCHEDULE_USER}>投稿者</span></th>
- <td><div class="form-control-static m3config_item">{ENTRY_USER}</div></td>
- <th><span {_HELP_SCHEDULE_DT}>投稿日時</span></th>
- <td colspan="3">
-<div class="form-group"><div class="form-control-static col-sm-2 m3config_item" >日付:</div><div class="col-sm-4 m3config_item" ><input type="text" class="form-control" id="item_entry_date" name="item_entry_date" value="{ENTRY_DATE}" size="20" maxlength="10" /></div><div class="form-control-static col-sm-2 m3config_item" >時間:</div><div class="col-sm-4 m3config_item" ><input type="text" class="form-control" id="item_entry_time" name="item_entry_time" value="{ENTRY_TIME}" size="20" maxlength="10" /></div></div>
- <!--日付<input type="text" id="item_entry_date" name="item_entry_date" value="{ENTRY_DATE}" size="10" maxlength="10" style="width:100px;" /> 時間<input type="text" id="item_entry_time" name="item_entry_time" value="{ENTRY_TIME}" size="10" maxlength="10" style="width:70px;" />-->
- </td>
- </tr>
- <tr class="active_term_area" style="display:none;">
- <th><span {_HELP_SCHEDULE_ACTIVE_TERM}>公開期間</span></th>
+ <th><span {_HELP_SCHEDULE_DT}>更新日時</span></th>
<td colspan="5">
-<div class="form-control-static col-sm-1 m3config_item" >開始日:</div><div class="col-sm-2 m3config_item" style="width:130px;"><input type="text" class="form-control spacer_bottom" id="item_start_date" name="item_start_date" value="{START_DATE}" size="20" maxlength="10" /></div><div class="form-control-static col-sm-1" style="width:30px;padding-left:3px;"><a href="#" id="calenderbutton1"><img src="{CALENDAR_IMG}" alt="カレンダー" title="カレンダー" rel="m3help" /></a></div><div class="form-control-static col-sm-1 m3config_item" style="width:55px;">時間:</div><div class="col-sm-2 m3config_item" style="width:90px;"><input type="text" class="form-control spacer_bottom" id="item_start_time" name="item_start_time" value="{START_TIME}" size="20" maxlength="10" /></div><div class="form-control-static col-sm-1" style="width:10px;padding-left:3px;margin-right:5px;">~</div>
- <div class="form-control-static col-sm-1 m3config_item" >終了日:</div><div class="col-sm-2 m3config_item" style="width:130px;"><input type="text" class="form-control" id="item_end_date" name="item_end_date" value="{END_DATE}" size="20" maxlength="10" /></div><div class="form-control-static col-sm-1" style="width:30px;padding-left:3px;"><a href="#" id="calenderbutton2"><img src="{CALENDAR_IMG}" alt="カレンダー" title="カレンダー" rel="m3help" /></a></div><div class="form-control-static col-sm-1 m3config_item" style="width:55px;">時間:</div><div class="col-sm-2 m3config_item" style="width:90px;"><input type="text" class="form-control" id="item_end_time" name="item_end_time" value="{END_TIME}" size="20" maxlength="10" /></div>
- <!--開始日:<input type="text" id="item_start_date" name="item_start_date" value="{START_DATE}" size="15" maxlength="10" style="width:100px;" /><a href="#" id="calenderbutton1"><img src="{CALENDAR_IMG}" alt="カレンダー" title="カレンダー" border="0" /></a> 時間:<input type="text" id="item_start_time" name="item_start_time" value="{START_TIME}" size="15" maxlength="10" style="width:100px;" /> ~ 終了日:<input type="text" id="item_end_date" name="item_end_date" value="{END_DATE}" size="15" maxlength="10" style="width:100px;" /><a href="#" id="calenderbutton2"><img src="{CALENDAR_IMG}" alt="カレンダー" title="カレンダー" border="0" /></a> 時間:<input type="text" id="item_end_time" name="item_end_time" value="{END_TIME}" size="15" maxlength="10" style="width:100px;" />-->
+<div class="form-group"><div class="form-control-static col-sm-2 m3config_item" style="width:4em;">日付:</div><div class="col-sm-4 m3config_item" style="width:10em;"><input type="text" class="form-control" id="item_entry_date" name="item_entry_date" value="{ENTRY_DATE}" size="20" maxlength="10" /></div><div class="form-control-static col-sm-2 m3config_item following" style="width:4em;">時間:</div><div class="col-sm-4 m3config_item" style="width:10em;"><input type="text" class="form-control" id="item_entry_time" name="item_entry_time" value="{ENTRY_TIME}" size="20" maxlength="10" /></div></div>
+ <!--日付<input type="text" id="item_entry_date" name="item_entry_date" value="{ENTRY_DATE}" size="10" maxlength="10" style="width:100px;" /> 時間<input type="text" id="item_entry_time" name="item_entry_time" value="{ENTRY_TIME}" size="10" maxlength="10" style="width:70px;" />-->
</td>
</tr>
<tr>
<tr>\r
<th><span {_HELP_MENUDEF_NAME}>{_LC_LABEL_NAME}</span></th>\r
<td colspan="3">\r
- <div class="col-sm-4 m3config_item join">\r
+ <div class="col-sm-4 m3config_item">\r
<select name="item_sel_menuid" onchange="selectMenu();">\r
<option value="0" {SELECTED}>-- {_LC_LABEL_NEW} --</option>\r
<patTemplate:tmpl name="menuid_list">\r
</patTemplate:tmpl>\r
</select>\r
</div>\r
- <div class="col-sm-4 m3config_item"><input type="text" name="item_name" value="{NAME}" maxlength="40" /></div><div class="col-sm-1 m3config_item form-control-static">{LANG}</div>\r
+ <div class="col-sm-4 m3config_item following"><input type="text" name="item_name" value="{NAME}" maxlength="40" /></div><div class="col-sm-1 m3config_item form-control-static">{LANG}</div>\r
<patTemplate:tmpl name="input_lang" visibility="hidden">\r
<div class="form-group">\r
- <div class="col-sm-4 m3config_item"><input type="text" name="item_name_{ID}" value="{VALUE}" maxlength="40" /></div><div class="col-sm-1 m3config_item form-control-static">{LANG}</div>\r
+ <div class="col-sm-4 m3config_item following"><input type="text" name="item_name_{ID}" value="{VALUE}" maxlength="40" /></div><div class="col-sm-1 m3config_item form-control-static">{LANG}</div>\r
</div>\r
</patTemplate:tmpl>\r
</td>\r