You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
119 lines
4.2 KiB
119 lines
4.2 KiB
<script type="text/javascript">
|
|
$(function() { //防止回车提交表单
|
|
document.onkeydown = function(e){
|
|
var ev = document.all ? window.event : e;
|
|
if (ev.keyCode==13) {
|
|
$("#mark").val("1"); // 标识不能提交表单
|
|
}
|
|
}
|
|
$(".t_1").hide();
|
|
$(".t_2").hide();
|
|
$(".t_{$menu_url}").show();
|
|
$("._type").click(function(){
|
|
var t = $(this).val();
|
|
$(".t_1").hide();
|
|
$(".t_2").hide();
|
|
$(".t_"+t).show();
|
|
});
|
|
$(".table_form th").last().css('border','none');
|
|
$(".table_form td").last().css('border','none');
|
|
});
|
|
function dr_form_check() {
|
|
if ($("#dr_name").val() == '') {
|
|
dr_form_tips('name', false, '{dr_lang("名称不能为空")}');
|
|
return false;
|
|
} else {
|
|
dr_form_tips('name', true, ' ');
|
|
}
|
|
if ($("#mark").val() == 0) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
</script>
|
|
<div class="table-list" style="width:550px;">
|
|
<form action="" method="post" id="myform" name="myform" onsubmit="return dr_form_check()">
|
|
<input name="mark" id="mark" type="hidden" value="0">
|
|
<input name="data[istop]" type="hidden" value="{$data['istop']}">
|
|
<input name="data[pid]" type="hidden" value="{$data['pid']}">
|
|
<table width="100%" class="table_form">
|
|
<tr>
|
|
<th width="100"><font color="red">*</font> {fc_lang('类型')}: </th>
|
|
<td>{$menu_name}</td>
|
|
</tr>
|
|
{if $select}
|
|
<tr>
|
|
<th width="100"><font color="red">*</font> {fc_lang('上级')}: </th>
|
|
<td>{$select}</td>
|
|
</tr>
|
|
{/if}
|
|
<tr>
|
|
<th><font color="red">*</font> {fc_lang('名称')}: </th>
|
|
<td>
|
|
<input class="input-text" type="text" name="data[name]" id="dr_name" value="{$data['name']}" size="20" />
|
|
<div class="onShow" id="dr_name_tips">{fc_lang('给它一个描述名称')}</div>
|
|
</td>
|
|
</tr>
|
|
{if $menu_type}
|
|
<tr>
|
|
<th> {fc_lang('类型')}: </th>
|
|
<td>
|
|
<input name="_type" type="radio" value="2" class="_type" {if $menu_url==2} checked{/if}> <label>{fc_lang('CI风格')}</label>
|
|
<input name="_type" type="radio" value="1" class="_type" {if $menu_url==1} checked{/if}> <label>{fc_lang('URL链接')}</label>
|
|
</td>
|
|
</tr>
|
|
<tr class="t_2">
|
|
<th> Directory: </th>
|
|
<td>
|
|
<input name="data[directory]" type="radio" value="admin" {if empty($uri['directory']) || $uri['directory']=='admin'} checked{/if}> <label>admin</label>
|
|
<input name="data[directory]" type="radio" value="member" {if $uri['directory']=='member'} checked{/if}> <label>member</label>
|
|
<div class="onShow" id="dr_s_tips">{fc_lang('在fc中被定义为admin或者member')}</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="t_2">
|
|
<th> {fc_lang('目录')}: </th>
|
|
<td>
|
|
<input class="input-text" type="text" name="data[dir]" id="dr_c" value="{$uri['dir']}" size="20" />
|
|
<div class="onShow" id="dr_s_tips">{fc_lang('模块、应用或者会员目录')}</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="t_2">
|
|
<th> Class: </th>
|
|
<td>
|
|
<input class="input-text" type="text" name="data[class]" id="dr_c" value="{$uri['class']}" size="20" />
|
|
<div class="onShow" id="dr_c_tips">{fc_lang('CI控制器名称,参数c')}</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="t_2">
|
|
<th> Method: </th>
|
|
<td>
|
|
<input class="input-text" type="text" name="data[method]" id="dr_m" value="{$uri['method']}" size="20" />
|
|
<div class="onShow" id="dr_m_tips">{fc_lang('CI方法名称,参数m')}</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="t_2">
|
|
<th> {fc_lang('附加参数')}: </th>
|
|
<td>
|
|
<input class="input-text" type="text" name="data[param]" id="dr_param" value="{$uri['param_str']}" size="20" />
|
|
<div class="onShow" id="dr_param_tips">{fc_lang('格式:参数1/值/参数2/值..')}</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="t_1">
|
|
<th> Url: </th>
|
|
<td>
|
|
<input class="input-text" type="text" name="data[url]" id="dr_url" value="{$data['url']}" size="30" />
|
|
<div class="onShow" id="dr_url_tips">{fc_lang('指定一个URL地址')}</div>
|
|
</td>
|
|
</tr>
|
|
{/if}
|
|
<tr>
|
|
<th> Ico: </th>
|
|
<td>
|
|
<input class="input-text" type="text" name="data[icon]" value="{$data['icon']}" size="20" />
|
|
<div class="onShow"><a href="{dr_member_url('api/icon')}" target="_blank">{fc_lang('菜单前面的图标,点击查看更多图标')}</a></div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</div>
|