修改了新建元数据页面的样式
This commit is contained in:
parent
7491be2bd2
commit
7845c99a92
|
@ -2,7 +2,6 @@
|
||||||
$this->headTitle($this->config->title->site);
|
$this->headTitle($this->config->title->site);
|
||||||
$this->headTitle($this->config->title->author);
|
$this->headTitle($this->config->title->author);
|
||||||
$this->headTitle()->setSeparator(' - ');
|
$this->headTitle()->setSeparator(' - ');
|
||||||
$this->theme->AppendPlus($this,'jquery');
|
|
||||||
$this->theme->AppendPlus($this,'jquery_ui');
|
$this->theme->AppendPlus($this,'jquery_ui');
|
||||||
$this->theme->AppendPlus($this,'google_map_v3');
|
$this->theme->AppendPlus($this,'google_map_v3');
|
||||||
$this->theme->AppendPlus($this,'google_map_keydragzone');
|
$this->theme->AppendPlus($this,'google_map_keydragzone');
|
||||||
|
@ -16,274 +15,263 @@ $this->breadcrumb('<a href="/author">'.$this->config->title->author.'</a>');
|
||||||
$this->breadcrumb('新建数据');
|
$this->breadcrumb('新建数据');
|
||||||
$this->breadcrumb()->setSeparator(' > ');
|
$this->breadcrumb()->setSeparator(' > ');
|
||||||
?>
|
?>
|
||||||
<!-- 左侧导航 -->
|
<div class="row">
|
||||||
<div id='sidebar'>
|
<div class="span3">
|
||||||
<div id='leftnavi'>
|
<?= $this->partial('author/navi.phtml'); ?>
|
||||||
<?= $this->partial('author/navi.phtml'); ?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="span9">
|
||||||
<!-- //左侧导航 -->
|
<div>
|
||||||
|
<ul class="nav nav-pills">
|
||||||
<!-- 页面内容 -->
|
<li><a href="/author/newdata">未提交数据列表</a></li>
|
||||||
<div id="wapper">
|
<li><a class="iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a></li>
|
||||||
<div id="tabs-controller">
|
<li><a href="/author/newdata/ac/add-by-template">根据模板新建元数据</a></li>
|
||||||
<ul>
|
<li><a href="/author/newdata/ac/add-by-data">根据已有数据新建元数据</a></li>
|
||||||
<li class="box-shadow"><a class="text-shadow" href="/author/newdata">未提交数据列表</a></li>
|
<li class="active"><a href="/author/metadata">新建元数据</a></li>
|
||||||
<li class="box-shadow"><a class="text-shadow iframe" href="/service/geonetwork?url=metadata.xmlinsert.form">导入元数据</a></li>
|
|
||||||
<li class="box-shadow"><a class="text-shadow" href="/author/newdata/ac/add-by-template">根据模板新建元数据</a></li>
|
|
||||||
<li class="box-shadow"><a class="text-shadow" href="/author/newdata/ac/add-by-data">根据已有数据新建元数据</a></li>
|
|
||||||
<li class="box-shadow active"><a class="text-shadow" href="/author/metadata">新建元数据</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="">
|
|
||||||
<?php if(empty($this->error)) { ?>
|
|
||||||
<div class="step_ctl">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);" onclick="jumpstep(1)" id="step_btn1" class="step_btns current_step">
|
|
||||||
<div class="title">Step1</div>
|
|
||||||
<div class="description">元数据基本信息</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);" onclick="save(0,this,2)" id="step_btn2" class="step_btns">
|
|
||||||
<div class="title">Step2</div>
|
|
||||||
<div class="description">时空范围</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="javascript:void(0);" onclick="save(0,this,3)" id="step_btn3" class="step_btns">
|
|
||||||
<div class="title">Step3</div>
|
|
||||||
<div class="description">元数据基本信息</div>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<?php if(!empty($this->uuid)) {
|
<div class="">
|
||||||
$F = array();
|
<?php if(empty($this->error)) { ?>
|
||||||
}?>
|
<div class="step_ctl">
|
||||||
<form class="form-horizontal well" id="metadata_temp_value" action="/author/metadata/ac/save" method="post">
|
<ul>
|
||||||
<input type="hidden" id="temp_uuid" name="uuid" value="<?= empty($this->uuid) ? "":$this->uuid ?>" />
|
<li>
|
||||||
<div class="stepy_content" id="step_content_1">
|
<a href="javascript:void(0);" onclick="jumpstep(1)" id="step_btn1" class="step_btns current_step">
|
||||||
<fieldset>
|
<div class="title">Step1</div>
|
||||||
<p class="f_legend">元数据基本信息</p>
|
<div class="description">元数据基本信息</div>
|
||||||
<div class="control-group">
|
</a>
|
||||||
<label class="control-label">元数据标题</label>
|
</li>
|
||||||
<div class="controls">
|
<li>
|
||||||
<?php $F['title'] = $this->Field['title']['FieldName_temp']; ?>
|
<a href="javascript:void(0);" onclick="save(0,this,2)" id="step_btn2" class="step_btns">
|
||||||
<input type="text" name="<?= $F['title']?>"
|
<div class="title">Step2</div>
|
||||||
value="<?= empty($this->data->$F['title']) ? "":$this->data->$F['title'] ?>" />
|
<div class="description">时空范围</div>
|
||||||
</div>
|
</a>
|
||||||
</div>
|
</li>
|
||||||
<div class="control-group">
|
<li>
|
||||||
<label class="control-label">元数据英文标题</label>
|
<a href="javascript:void(0);" onclick="save(0,this,3)" id="step_btn3" class="step_btns">
|
||||||
<div class="controls">
|
<div class="title">Step3</div>
|
||||||
<?php $F['title_en'] = $this->Field['title_en']['FieldName_temp']; ?>
|
<div class="description">元数据基本信息</div>
|
||||||
<input type="text" name="<?= $F['title_en']?>"
|
</a>
|
||||||
value="<?= empty($this->data->$F['title_en']) ? "":$this->data->$F['title_en'] ?>" />
|
</li>
|
||||||
</div>
|
</ul>
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label">元数据简介</label>
|
|
||||||
<div class="controls">
|
|
||||||
<?php $F['description'] = $this->Field['description']['FieldName_temp']; ?>
|
|
||||||
<textarea name="<?= $F['description']?>"><?= empty($this->data->$F['description']) ? "":$this->data->$F['description'] ?></textarea>
|
|
||||||
<span class="help-block">概括元数据内容</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group" id="next_step_button" >
|
|
||||||
<div class="controls">
|
|
||||||
<button type="button" onclick="save(0,this,2)" class="btn btn-green">下一步</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="stepy_content" id="step_content_2" style="display:none;">
|
<?php if(!empty($this->uuid)) {
|
||||||
<fieldset>
|
$F = array();
|
||||||
<p class="f_legend">时间范围</p>
|
}?>
|
||||||
<div class="control-group">
|
<form class="form-horizontal well" id="metadata_temp_value" action="/author/metadata/ac/save" method="post">
|
||||||
<label class="control-label">开始时间</label>
|
<input type="hidden" id="temp_uuid" name="uuid" value="<?= empty($this->uuid) ? "":$this->uuid ?>" />
|
||||||
<div class="controls">
|
<div class="stepy_content" id="step_content_1">
|
||||||
<?php $F['timebegin'] = $this->Field['timebegin']['FieldName_temp']; ?>
|
<fieldset>
|
||||||
<input type="text" id="timebegin" name="<?= $F['timebegin']?>" value="<?= empty($this->data->$F['timebegin']) ? "":$this->data->$F['timebegin'] ?>" />
|
<p class="f_legend">元数据基本信息</p>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control-label">结束时间</label>
|
|
||||||
<div class="controls">
|
|
||||||
<?php $F['timeend'] = $this->Field['timeend']['FieldName_temp']; ?>
|
|
||||||
<input type="text" id="timeend" name="<?= $F['timeend'] ?>" value="<?= empty($this->data->$F['timeend']) ? "":$this->data->$F['timeend'] ?>" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset>
|
|
||||||
<p class="f_legend">空间范围</p>
|
|
||||||
<div class="map_input_part">
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label">东</label>
|
<label class="control-label">元数据标题</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?php $F['east'] = $this->Field['east']['FieldName_temp']; ?>
|
<?php $F['title'] = $this->Field['title']['FieldName_temp']; ?>
|
||||||
<input type="text" id="map_east" name="<?= $F['east'] ?>" class="span2"
|
<input type="text" name="<?= $F['title']?>"
|
||||||
value="<?= empty($this->data->$F['east']) ? "":$this->data->$F['east'] ?>" />
|
value="<?= empty($this->data->$F['title']) ? "":$this->data->$F['title'] ?>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label">南</label>
|
<label class="control-label">元数据英文标题</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?php $F['south'] = $this->Field['south']['FieldName_temp']; ?>
|
<?php $F['title_en'] = $this->Field['title_en']['FieldName_temp']; ?>
|
||||||
<input type="text" id="map_south" name="<?= $F['south'] ?>" class="span2"
|
<input type="text" name="<?= $F['title_en']?>"
|
||||||
value="<?= empty($this->data->$F['south']) ? "":$this->data->$F['south'] ?>" />
|
value="<?= empty($this->data->$F['title_en']) ? "":$this->data->$F['title_en'] ?>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label">西</label>
|
<label class="control-label">元数据简介</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?php $F['west'] = $this->Field['west']['FieldName_temp']; ?>
|
<?php $F['description'] = $this->Field['description']['FieldName_temp']; ?>
|
||||||
<input type="text" id="map_west" name="<?= $F['west'] ?>" class="span2"
|
<textarea name="<?= $F['description']?>"><?= empty($this->data->$F['description']) ? "":$this->data->$F['description'] ?></textarea>
|
||||||
value="<?= empty($this->data->$F['west']) ? "":$this->data->$F['west'] ?>" />
|
<span class="help-block">概括元数据内容</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group" id="next_step_button" >
|
||||||
|
<div class="controls">
|
||||||
|
<button type="button" onclick="save(0,this,2)" class="btn btn-green">下一步</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
</div>
|
||||||
|
<div class="stepy_content" id="step_content_2" style="display:none;">
|
||||||
|
<fieldset>
|
||||||
|
<p class="f_legend">时间范围</p>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">开始时间</label>
|
||||||
|
<div class="controls">
|
||||||
|
<?php $F['timebegin'] = $this->Field['timebegin']['FieldName_temp']; ?>
|
||||||
|
<input type="text" id="timebegin" name="<?= $F['timebegin']?>" value="<?= empty($this->data->$F['timebegin']) ? "":$this->data->$F['timebegin'] ?>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label">北</label>
|
<label class="control-label">结束时间</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
<?php $F['north'] = $this->Field['north']['FieldName_temp']; ?>
|
<?php $F['timeend'] = $this->Field['timeend']['FieldName_temp']; ?>
|
||||||
<input type="text" id="map_north" name="<?= $F['north'] ?>" class="span2"
|
<input type="text" id="timeend" name="<?= $F['timeend'] ?>" value="<?= empty($this->data->$F['timeend']) ? "":$this->data->$F['timeend'] ?>" />
|
||||||
value="<?= empty($this->data->$F['north']) ? "":$this->data->$F['north'] ?>" />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<p class="f_legend">空间范围</p>
|
||||||
|
<div class="map_input_part">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">东</label>
|
||||||
|
<div class="controls">
|
||||||
|
<?php $F['east'] = $this->Field['east']['FieldName_temp']; ?>
|
||||||
|
<input type="text" id="map_east" name="<?= $F['east'] ?>" class="span2"
|
||||||
|
value="<?= empty($this->data->$F['east']) ? "":$this->data->$F['east'] ?>" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">南</label>
|
||||||
|
<div class="controls">
|
||||||
|
<?php $F['south'] = $this->Field['south']['FieldName_temp']; ?>
|
||||||
|
<input type="text" id="map_south" name="<?= $F['south'] ?>" class="span2"
|
||||||
|
value="<?= empty($this->data->$F['south']) ? "":$this->data->$F['south'] ?>" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">西</label>
|
||||||
|
<div class="controls">
|
||||||
|
<?php $F['west'] = $this->Field['west']['FieldName_temp']; ?>
|
||||||
|
<input type="text" id="map_west" name="<?= $F['west'] ?>" class="span2"
|
||||||
|
value="<?= empty($this->data->$F['west']) ? "":$this->data->$F['west'] ?>" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">北</label>
|
||||||
|
<div class="controls">
|
||||||
|
<?php $F['north'] = $this->Field['north']['FieldName_temp']; ?>
|
||||||
|
<input type="text" id="map_north" name="<?= $F['north'] ?>" class="span2"
|
||||||
|
value="<?= empty($this->data->$F['north']) ? "":$this->data->$F['north'] ?>" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label">按住键盘上“Shift”键可以直接在地图上用鼠标拖动选取</label>
|
||||||
|
<div class="controls">
|
||||||
|
<div class="map_display_part" id="map_canvas"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</fieldset>
|
||||||
|
<div class="control-group" id="next_step_button" >
|
||||||
|
<div class="controls">
|
||||||
|
<button type="button" onclick="save(0,this,3)" class="btn btn-green">下一步</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="stepy_content" id="step_content_3" style="display:none;">
|
||||||
|
<fieldset>
|
||||||
|
<p class="f_legend">数据引用方式</p>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
按住键盘上“Shift”键可以直接在地图上用鼠标拖动选取
|
<?php $F['citation'] = $this->Field['citation']['FieldName_temp']; ?>
|
||||||
|
<input type="text" name="<?= $F['citation'] ?>" class="span8"
|
||||||
|
value="<?= empty($this->data->$F['citation']) ? "":$this->data->$F['citation'] ?>" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</fieldset>
|
||||||
<div class="map_display_part" id="map_canvas">
|
|
||||||
|
|
||||||
</div>
|
<fieldset>
|
||||||
</fieldset>
|
<p class="f_legend">参考文献</p>
|
||||||
<div class="control-group" id="next_step_button" >
|
<?php $F['reference'] = $this->Field['reference']['FieldName_temp']; ?>
|
||||||
<div class="controls">
|
<?php if(isset($this->data->$F['reference']) && count($this->data->$F['reference'])>0)
|
||||||
<button type="button" onclick="save(0,this,3)" class="btn btn-green">下一步</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="stepy_content" id="step_content_3" style="display:none;">
|
|
||||||
<fieldset>
|
|
||||||
<p class="f_legend">数据引用方式</p>
|
|
||||||
<div class="control-group">
|
|
||||||
<div class="controls">
|
|
||||||
<?php $F['citation'] = $this->Field['citation']['FieldName_temp']; ?>
|
|
||||||
<input type="text" name="<?= $F['citation'] ?>" class="span8"
|
|
||||||
value="<?= empty($this->data->$F['citation']) ? "":$this->data->$F['citation'] ?>" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset>
|
|
||||||
<p class="f_legend">参考文献</p>
|
|
||||||
|
|
||||||
<?php $F['reference'] = $this->Field['reference']['FieldName_temp']; ?>
|
|
||||||
<?php if(isset($this->data->$F['reference']) && count($this->data->$F['reference'])>0)
|
|
||||||
{
|
|
||||||
$index = 0;
|
|
||||||
foreach($this->data->$F['reference'] as $k=>$v)
|
|
||||||
{
|
|
||||||
$index ++ ;
|
|
||||||
?>
|
|
||||||
<div class="control-group control-group-reference" id="reference_1st">
|
|
||||||
<div class="controls">
|
|
||||||
<input type="text" name="<?= $F['reference'] ?>[]" class="span8"
|
|
||||||
value="<?= $v ?>" />
|
|
||||||
<?php if($index > 1) {?>
|
|
||||||
<a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>
|
|
||||||
<?php } ?>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php }
|
|
||||||
}else{?>
|
|
||||||
<div class="control-group control-group-reference" id="reference_1st">
|
|
||||||
<div class="controls">
|
|
||||||
<input type="text" name="<?= $F['reference'] ?>[]" class="span8"
|
|
||||||
value="" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<?php }
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div class="control-group">
|
|
||||||
<a href="javascript:void(0);" onclick="AddInput('reference')">+ 再添加一条</a>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<fieldset>
|
|
||||||
<p class="f_legend">联系人</p>
|
|
||||||
<?php $F['contact'] = $this->Field['contact']['FieldName_temp']; ?>
|
|
||||||
<?php if(isset($this->data->$F['contact']) && count($this->data->$F['contact'])>0)
|
|
||||||
{
|
|
||||||
$index = 0;
|
|
||||||
foreach($this->data->$F['contact'] as $k=>$v)
|
|
||||||
{
|
|
||||||
$index++ ;?>
|
|
||||||
<div class="control-group control-group-contact" id="contact_1st">
|
|
||||||
<div class="controls">
|
|
||||||
<input type="text" name="<?= $F['contact'] ?>[<?= $index ?>][name]" class="span3 contact_name" value="<?= $v->name ?>" />
|
|
||||||
<input type="text" name="<?= $F['contact'] ?>[<?= $index ?>][unit]" class="span3 contact_unit" value="<?= $v->unit ?>" />
|
|
||||||
<input type="text" name="<?= $F['contact'] ?>[<?= $index ?>][email]" class="span3 contact_email" value="<?= $v->email ?>" />
|
|
||||||
<select type="text" name="<?= $F['contact'] ?>[<?= $index ?>][type]" class="span3">
|
|
||||||
<option value="0">请选择联系人职能</option>
|
|
||||||
<?php
|
|
||||||
foreach($this->Field['contact']['options'] as $va)
|
|
||||||
{
|
|
||||||
if($v->type == $va)
|
|
||||||
{
|
{
|
||||||
echo '<option value="'.$va.'" selected="selected">'.$va.'</option>'."\r\n";
|
$index = 0;
|
||||||
}else{
|
foreach($this->data->$F['reference'] as $k=>$v)
|
||||||
echo '<option value="'.$va.'">'.$va.'</option>'."\r\n";
|
{
|
||||||
}
|
$index ++ ;
|
||||||
}
|
?>
|
||||||
?>
|
<div class="control-group control-group-reference" id="reference_1st">
|
||||||
</select>
|
<input type="text" name="<?= $F['reference'] ?>[]" class="span8"
|
||||||
<?php if($index > 1) {?>
|
value="<?= $v ?>" />
|
||||||
<a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>
|
<?php if($index > 1) {?>
|
||||||
<?php } ?>
|
<a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>
|
||||||
</div>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<?php }
|
<?php }
|
||||||
}else{ ?>
|
}else{?>
|
||||||
<div class="control-group control-group-contact" id="contact_1st">
|
<div class="control-group control-group-reference" id="reference_1st">
|
||||||
<div class="controls">
|
<input type="text" name="<?= $F['reference'] ?>[]" class="span8"
|
||||||
<input type="text" name="<?= $F['contact'] ?>[1][name]" class="span3 contact_name" />
|
value="" />
|
||||||
<input type="text" name="<?= $F['contact'] ?>[1][unit]" class="span3 contact_unit" />
|
</div>
|
||||||
<input type="text" name="<?= $F['contact'] ?>[1][email]" class="span3 contact_email" />
|
<?php }
|
||||||
<select type="text" name="<?= $F['contact'] ?>[1][type]" class="span3">
|
?>
|
||||||
|
|
||||||
|
<div class="control-group">
|
||||||
|
<a href="javascript:void(0);" onclick="AddInput('reference')">+ 再添加一条</a>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
<p class="f_legend">联系人</p>
|
||||||
|
<?php $F['contact'] = $this->Field['contact']['FieldName_temp']; ?>
|
||||||
|
<?php if(isset($this->data->$F['contact']) && count($this->data->$F['contact'])>0)
|
||||||
|
{
|
||||||
|
$index = 0;
|
||||||
|
foreach($this->data->$F['contact'] as $k=>$v)
|
||||||
|
{
|
||||||
|
$index++ ;?>
|
||||||
|
<div class="control-group control-group-contact" id="contact_1st">
|
||||||
|
<input type="text" name="<?= $F['contact'] ?>[<?= $index ?>][name]" class="span2 contact_name" value="<?= $v->name ?>" placeholder="姓名" />
|
||||||
|
<input type="text" name="<?= $F['contact'] ?>[<?= $index ?>][unit]" class="span2 contact_unit" value="<?= $v->unit ?>" placeholder="单位" />
|
||||||
|
<input type="text" name="<?= $F['contact'] ?>[<?= $index ?>][email]" class="span2 contact_email" value="<?= $v->email ?>" placeholder="Email" />
|
||||||
|
<select type="text" name="<?= $F['contact'] ?>[<?= $index ?>][type]" class="span3">
|
||||||
<option value="0">请选择联系人职能</option>
|
<option value="0">请选择联系人职能</option>
|
||||||
<?php
|
<?php
|
||||||
foreach($this->Field['contact']['options'] as $va)
|
foreach($this->Field['contact']['options'] as $va)
|
||||||
{
|
{
|
||||||
echo '<option value="'.$va.'">'.$va.'</option>'."\r\n";
|
if($v->type == $va)
|
||||||
|
{
|
||||||
|
echo '<option value="'.$va.'" selected="selected">'.$va.'</option>'."\r\n";
|
||||||
|
}else{
|
||||||
|
echo '<option value="'.$va.'">'.$va.'</option>'."\r\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
<?php if($index > 1) {?>
|
||||||
|
<a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>
|
||||||
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<?php }
|
||||||
<?php } ?>
|
}else{ ?>
|
||||||
|
<div class="control-group control-group-contact" id="contact_1st">
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" name="<?= $F['contact'] ?>[1][name]" class="span2 contact_name" placeholder="姓名" />
|
||||||
|
<input type="text" name="<?= $F['contact'] ?>[1][unit]" class="span2 contact_unit" placeholder="单位" />
|
||||||
|
<input type="text" name="<?= $F['contact'] ?>[1][email]" class="span2 contact_email" placeholder="Email" />
|
||||||
|
<select type="text" name="<?= $F['contact'] ?>[1][type]" class="span3">
|
||||||
|
<option value="0">请选择联系人职能</option>
|
||||||
|
<?php
|
||||||
|
foreach($this->Field['contact']['options'] as $va)
|
||||||
|
{
|
||||||
|
echo '<option value="'.$va.'">'.$va.'</option>'."\r\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
|
<div class="control-group">
|
||||||
|
<a href="javascript:void(0);" onclick="AddInput('contact')">+ 再添加一条</a>
|
||||||
|
</div>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<a href="javascript:void(0);" onclick="AddInput('contact')">+ 再添加一条</a>
|
<div class="controls">
|
||||||
|
<button type="button" onclick="save(0,this,'')" class="btn btn-green">保存草稿</button>
|
||||||
|
<button type="button" onclick="save(1,this,'')" class="btn btn-green">提交元数据</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
|
||||||
|
|
||||||
<div class="control-group">
|
</div>
|
||||||
<div class="controls">
|
|
||||||
<button type="button" onclick="save(0,this,'')" class="btn btn-green">保存草稿</button>
|
|
||||||
<button type="button" onclick="save(1,this,'')" class="btn btn-green">提交元数据</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</form>
|
||||||
|
<?php } else { ?>
|
||||||
</form>
|
<?= $this->error;?>
|
||||||
<?php } else { ?>
|
<?php } ?>
|
||||||
<?= $this->error;?>
|
</div>
|
||||||
<?php } ?>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- //页面内容 -->
|
<!-- //页面内容 -->
|
||||||
|
@ -302,7 +290,6 @@ $(function() {
|
||||||
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
||||||
|
|
||||||
//Form
|
//Form
|
||||||
InputTextSet();
|
|
||||||
StepBtnClick();
|
StepBtnClick();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -311,29 +298,8 @@ function getValue(){
|
||||||
return $('#metadata_temp_value').serialize();
|
return $('#metadata_temp_value').serialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
function prepare(){
|
|
||||||
$('.contact_email').each(function(index, element) {
|
|
||||||
if($(this).val()=='Email')
|
|
||||||
{
|
|
||||||
$(this).val('');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('.contact_name').each(function(index, element) {
|
|
||||||
if($(this).val()=='姓名')
|
|
||||||
{
|
|
||||||
$(this).val('');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('.contact_unit').each(function(index, element) {
|
|
||||||
if($(this).val()=='单位')
|
|
||||||
{
|
|
||||||
$(this).val('');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function save(s,btn,jump){
|
function save(s,btn,jump){
|
||||||
prepare();
|
|
||||||
if(CheckStep(jump) == false)
|
if(CheckStep(jump) == false)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -553,7 +519,6 @@ function AutoCompleteElement(data)
|
||||||
//Form element
|
//Form element
|
||||||
function AddInput(name){
|
function AddInput(name){
|
||||||
$('.control-group-' + name).last().after(SelectInputTemplate(name));
|
$('.control-group-' + name).last().after(SelectInputTemplate(name));
|
||||||
InputTextSet();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function SelectInputTemplate(name){
|
function SelectInputTemplate(name){
|
||||||
|
@ -561,10 +526,8 @@ function SelectInputTemplate(name){
|
||||||
if(name == 'reference')
|
if(name == 'reference')
|
||||||
{
|
{
|
||||||
html = ' <div class="control-group control-group-reference">'
|
html = ' <div class="control-group control-group-reference">'
|
||||||
+' <div class="controls">'
|
|
||||||
+' <input type="text" name="<?= $this->Field['reference']['FieldName_temp']?>[]" class="span8" />'
|
+' <input type="text" name="<?= $this->Field['reference']['FieldName_temp']?>[]" class="span8" />'
|
||||||
+' <a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>'
|
+' <a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>'
|
||||||
+' </div>'
|
|
||||||
+' </div>';
|
+' </div>';
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
@ -574,10 +537,9 @@ function SelectInputTemplate(name){
|
||||||
var now_index = $('.control-group-contact').length;
|
var now_index = $('.control-group-contact').length;
|
||||||
var index = now_index + 1;
|
var index = now_index + 1;
|
||||||
html = '<div class="control-group control-group-contact">'
|
html = '<div class="control-group control-group-contact">'
|
||||||
+ '<div class="controls">'
|
+ '<input type="text" name="contact[' + index + '][name]" class="span2 contact_name" placeholder="姓名" /> '
|
||||||
+ '<input type="text" name="contact[' + index + '][name]" class="span3 contact_name" /> '
|
+ '<input type="text" name="contact[' + index + '][unit]" class="span2 contact_unit" placeholder="单位" /> '
|
||||||
+ '<input type="text" name="contact[' + index + '][unit]" class="span3 contact_unit" /> '
|
+ '<input type="text" name="contact[' + index + '][email]" class="span2 contact_email" placeholder="Email" /> '
|
||||||
+ '<input type="text" name="contact[' + index + '][email]" class="span3 contact_email" /> '
|
|
||||||
+ '<select type="text" name="contact[' + index + '][type]" class="span3">'
|
+ '<select type="text" name="contact[' + index + '][type]" class="span3">'
|
||||||
+ '<option value="0">请选择联系人职能</option>'
|
+ '<option value="0">请选择联系人职能</option>'
|
||||||
<?php
|
<?php
|
||||||
|
@ -588,7 +550,6 @@ function SelectInputTemplate(name){
|
||||||
?>
|
?>
|
||||||
+ '</select>'
|
+ '</select>'
|
||||||
+ '<a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>'
|
+ '<a href="javascript:void(0);" onclick="RmInput(this)"> -删除</a>'
|
||||||
+ '</div>'
|
|
||||||
+ '</div>';
|
+ '</div>';
|
||||||
now_index = null;
|
now_index = null;
|
||||||
index = null;
|
index = null;
|
||||||
|
@ -599,21 +560,7 @@ function SelectInputTemplate(name){
|
||||||
|
|
||||||
function RmInput(e){
|
function RmInput(e){
|
||||||
$e = $(e);
|
$e = $(e);
|
||||||
$e.parent('div').parent('div').remove();
|
$e.parent('div').remove();
|
||||||
}
|
|
||||||
|
|
||||||
function InputTextSet(){
|
|
||||||
$('.contact_name').inputbg({'val':'姓名'});
|
|
||||||
$('.contact_unit').inputbg({'val':'单位'});
|
|
||||||
$('.contact_email').inputbg({'val':'Email'});
|
|
||||||
$('.contact_name').each(function(index, element) {
|
|
||||||
$(this).bind('change',function(){
|
|
||||||
if($(this).val() != '')
|
|
||||||
{
|
|
||||||
AutoComplete(this);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Google Map Part
|
// Google Map Part
|
||||||
|
@ -654,8 +601,8 @@ function initialize() {
|
||||||
//console.dir(latlng);
|
//console.dir(latlng);
|
||||||
});
|
});
|
||||||
google.maps.event.addListener(dz, 'dragend', function (latlng) {
|
google.maps.event.addListener(dz, 'dragend', function (latlng) {
|
||||||
MapValueChange(latlng.ca.d,latlng.Z.d,latlng.ca.b,latlng.Z.b);
|
MapValueChange(latlng.fa.d,latlng.Z.d,latlng.fa.b,latlng.Z.b);
|
||||||
setRectangle(latlng.ca.d,latlng.ca.b,latlng.Z.b,latlng.Z.d);
|
setRectangle(latlng.fa.d,latlng.fa.b,latlng.Z.b,latlng.Z.d);
|
||||||
//console.dir(latlng);
|
//console.dir(latlng);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -679,7 +626,7 @@ function setRectangle(east,west,south,north){
|
||||||
|
|
||||||
google.maps.event.addListener(rectangle, 'bounds_changed', function () {
|
google.maps.event.addListener(rectangle, 'bounds_changed', function () {
|
||||||
var latlng = rectangle.getBounds();
|
var latlng = rectangle.getBounds();
|
||||||
MapValueChange(latlng.ca.d,latlng.Z.d,latlng.ca.b,latlng.Z.b);
|
MapValueChange(latlng.fa.d,latlng.Z.d,latlng.fa.b,latlng.Z.b);
|
||||||
//console.dir(latlng);
|
//console.dir(latlng);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue