OSDN Git Service

メニュー定義画面更新。
[magic3/magic3.git] / widgets / admin_main / include / template / smenudef_detail.tmpl.html
index 394ace5..a277535 100644 (file)
@@ -5,7 +5,7 @@
  *
  * @package    Magic3 Framework
  * @author     平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
- * @copyright  Copyright 2006-2014 Magic3 Project.
+ * @copyright  Copyright 2006-2018 Magic3 Project.
  * @license    http://www.gnu.org/copyleft/gpl.html  GPL License
  * @version    SVN: $Id$
  * @link       http://www.magic3.org
@@ -46,13 +46,6 @@ function previewInOtherWindow()
        var url = $('#item_url').val();
        m3ShowPreviewWindow({DEVICE_TYPE}, url);
 }
-// URL作成
-/*
-function createUrl()
-{
-       var url = $('#item_url').val();
-       m3CreateLinkUrl({DEVICE_TYPE}, url, setLinkUrl);
-}*/
 // 作成リンク取得用
 function setLinkUrl(url)
 {
@@ -82,9 +75,6 @@ function getTitle()
        }
 }
 $(function(){
-       // 親ウィンドウの表示エリア調整
-       m3AdjustParentWindow();
-       
        // テーブル作成
        m3SetConfigTable('mainconfig');
        
@@ -102,8 +92,14 @@ $(function(){
                m3CreateLinkUrl({DEVICE_TYPE}, url, setLinkUrl);
        });
 
+       // オプション領域作成
+       m3CreateOptionButton('{OPEN_BUTTON_ID}', '{CLOSE_BUTTON_ID}', 'option_area', {OPTION_AREA_OPEN});
+       
        // CKEditorプラグイン直接実行
        m3LoadCKTools();
+       
+       // 親ウィンドウの表示エリア調整
+       m3AdjustParentWindow();
 });
 //]]>
 </script>
@@ -124,8 +120,8 @@ $(function(){
     <tbody>
     <tr>
            <th><span {_HELP_MENUDEF_NAME}>{_LC_LABEL_NAME}</span></th>
-           <td colspan="3">
-               <div class="col-sm-6 m3config_item form-group">
+           <td>
+               <div class="col-sm-4 m3config_item">
            <select name="item_sel_menuid" class="form-control" onchange="selectMenu();">
                <option value="0" {SELECTED}>-- {_LC_LABEL_NEW} --</option>
                 <patTemplate:tmpl name="menuid_list">
@@ -133,67 +129,62 @@ $(function(){
                 </patTemplate:tmpl>
            </select>
                </div>
-               <div class="col-sm-6 m3config_item"><input type="button" id="get_title_button" class="button" onclick="getTitle();" value="{_LC_LABEL_GET_TITLE}" {GET_TITLE_DISABLED} /></div>
-
-               <div class="form-group">
-           <div class="col-sm-11 m3config_item"><input type="text" id="item_name" name="item_name" class="form-control" value="{SEL_ITEM_NAME}" size="40" maxlength="40" /></div><div class="col-sm-1 m3config_item form-control-static">{LANG}</div>
-               </div>
+           <div class="col-sm-4 m3config_item following"><input type="text" id="item_name" name="item_name" class="form-control" value="{SEL_ITEM_NAME}" size="40" maxlength="40" /></div><div class="col-sm-1 m3config_item form-control-static">{LANG}</div>
+               <div class="col-sm-3 m3config_item"><input type="button" id="get_title_button" class="button pull-right" onclick="getTitle();" value="{_LC_LABEL_GET_TITLE}" {GET_TITLE_DISABLED} /></div>
            <patTemplate:tmpl name="input_lang" visibility="hidden">
                <div class="form-group">
-           <div class="col-sm-11 m3config_item"><input type="text" name="item_name_{ID}" class="form-control" value="{VALUE}" size="40" maxlength="40" /></div><div class="col-sm-1 m3config_item form-control-static">{LANG}</div>
+           <div class="col-sm-4 m3config_item"><input type="text" name="item_name_{ID}" class="form-control" value="{VALUE}" size="40" maxlength="40" /></div><div class="col-sm-1 m3config_item form-control-static">{LANG}</div>
                </div>
            </patTemplate:tmpl>
            </td>
        </tr>
     <tr>
            <th><span {_HELP_MENUDEF_ITEM_TYPE}>{_LC_LABEL_ITEM_TYPE}</span></th>
-           <td style="width:200px;">
+           <td>
+               <div class="col-sm-4 m3config_item">
            <select name="item_type" class="form-control">
                 <patTemplate:tmpl name="item_type_list">
                 <option value="{VALUE}" {SELECTED}>{NAME}</option>
                 </patTemplate:tmpl>
            </select>
-           </td>
-           <th><span {_HELP_MENUDEF_LINK_TYPE}>{_LC_LABEL_LINK_TYPE}</span></th>
-           <td>
-               <div class="col-sm-6 m3config_item">
-           <select name="item_link_type" class="form-control">
-               <option value="0" {LINK_TYPE_0}>{_LC_LABEL_LINK_SELF}</option>
-                   <option value="1" {LINK_TYPE_1}>{_LC_LABEL_LINK_OTHER}</option>
-           </select>
                </div>
            </td>
        </tr>
     <tr>
            <th><span {_HELP_MENUDEF_LINK_URL}>{_LC_LABEL_LINK_URL}</span><div class="pull-right">{CREATE_URL_BUTTON}</div></th>
-           <td colspan="3">
-               <div class="input-group">
+           <td>
                    <input type="text" id="item_url" name="item_url" class="form-control" value="{URL}" readonly />
-                   <span class="input-group-btn">
-                   <a class="btn btn-default" onclick="previewInOtherWindow();return false;" rel="m3help" title="{PREVIEW_STR}"><i class="glyphicon glyphicon-new-window"></i></a>
-                   </span>
-               </div>
            </td>
        </tr>
-    <tr>
+    <tr class="option_area" style="display:none;">
            <th><span {_HELP_MENUDEF_VISIBLE}>{_LC_LABEL_ITEM_VISIBLE}</span></th>
-           <td colspan="3"><div class="checkbox"><label><input type="checkbox" name="item_visible" {SEL_ITEM_VISIBLE} />{_LC_LABEL_VISIBLE}</label></div>
+           <td><div class="checkbox"><label><input type="checkbox" name="item_visible" {SEL_ITEM_VISIBLE} />{_LC_LABEL_VISIBLE}</label></div>
                <div class="checkbox"><label><input type="checkbox" name="item_user_limited" {USER_LIMITED_CHECKED} />{_LC_MSG_USER_LIMITED}</label></div>
                <div class="checkbox"><label><input type="checkbox" name="item_link_content" {LINK_CONTENT} />{_LC_MSG_LINK_TO_CONTENT}</label></div></td>
        </tr>
-        <!--<tr>
-           <th><span {_HELP_MENUDEF_DESC}>{_LC_LABEL_DESC}</span></th>
-           <td colspan="3"><input type="text" name="item_desc" value="{DESC}" size="100" maxlength="100" /></td>
-       </tr>-->
-    <tr>
+    <tr class="option_area" style="display:none;">
+           <th><span {_HELP_MENUDEF_LINK_TYPE}>{_LC_LABEL_LINK_TYPE}</span></th>
+           <td>
+               <div class="col-sm-4 m3config_item">
+           <select name="item_link_type" class="form-control">
+               <option value="0" {LINK_TYPE_0}>{_LC_LABEL_LINK_SELF}</option>
+                   <option value="1" {LINK_TYPE_1}>{_LC_LABEL_LINK_OTHER}</option>
+           </select>
+               </div>
+           </td>
+       </tr>
+    <tr class="option_area" style="display:none;">
            <th><span {_HELP_MENUDEF_TITLE}>{_LC_LABEL_TITLE}</span></th>
-           <td colspan="3">
+           <td>
                <div class="col-sm-11 m3config_item"><input type="text" name="item_title" class="form-control" value="{TITLE}" maxlength="300" /></div><div class="col-sm-1 m3config_item form-control-static">{LANG}</div>
            <patTemplate:tmpl name="input_title" visibility="hidden">
            <div class="col-sm-11 m3config_item"><input type="text" name="item_title_{ID}" class="form-control" value="{VALUE}" maxlength="300" /></div><div class="col-sm-1 m3config_item form-control-static">{LANG}</div>
            </patTemplate:tmpl>
                </td>
        </tr>
+       <tr>
+           <td colspan="2"><div class="pull-left">{OPEN_BUTTON}{CLOSE_BUTTON}</div></td>
+       </tr>
     </tbody>
 </table>
 <div class="well m3config_update_buttons">
@@ -205,7 +196,6 @@ $(function(){
                <input type="button" class="button" onclick="addItem();" value="{_LC_LABEL_ADD}" />
 </patTemplate:tmpl>
 </div>
-
 </form>
 </div>
 </patTemplate:tmpl>