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.
110 lines
4.4 KiB
110 lines
4.4 KiB
{template 'header', 'member'}
|
|
<div id="head-bar">
|
|
<div class="head-bar">
|
|
<div class="head-bar-back"><a href="{if $back_link}{$back_link}{else}javascript:Dback();" id="back-{$js_pageid}{/if}" data-direction="reverse"><img src="{DT_MOB}static/img/icon-back.png" width="24" height="24"/></a></div>
|
|
<div class="head-bar-title">{$head_name}</div>
|
|
<div class="head-bar-right">
|
|
{if $action=='add' || $action=='edit' || $action=='show'}
|
|
<a href="?action=index"><img src="{DT_MOB}static/img/icon-cancel.png" width="24" height="24"/></a>
|
|
{else}
|
|
<a href="?action=add"><img src="{DT_MOB}static/img/icon-add.png" width="24" height="24"/></a>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
<div class="head-bar-fix" id="load-fix-{$js_pageid}" style="height:0;"></div>
|
|
<div class="head-bar-fix" id="head-fix-{$js_pageid}"></div>
|
|
</div>
|
|
{if $action=='add' || $action=='edit'}
|
|
<form method="post" action="?" id="dform" onsubmit="return check();">
|
|
<input type="hidden" name="action" value="{$action}"/>
|
|
<input type="hidden" name="itemid" value="{$itemid}"/>
|
|
<input type="hidden" name="forward" value="{$forward}"/>
|
|
<input type="hidden" name="post[style]" value="{$style}"/>
|
|
<div class="ui-form">
|
|
<p>分类</p>
|
|
<div>{$type_select}</div>
|
|
<p>标题<em>*</em><b id="dtitle"></b></p>
|
|
<div><input type="text" name="post[title]" id="title" value="{$title}"/></div>
|
|
<p>网址<em>*</em><b id="durl"></b></p>
|
|
<div><input type="url" name="post[url]" id="url" value="{$url}"/></div>
|
|
<p>备注</p>
|
|
<div><input type="text" name="post[note]" id="note" value="{$note}"/></div>
|
|
<p>排序</p>
|
|
<div><input type="tel" name="post[listorder]" id="listorder" value="{$listorder}" style="width:100px;"/></div>
|
|
<div class="blank-16"></div>
|
|
<input type="submit" name="submit" value="{if $action=='edit'}修改{else}添加{/if}" class="btn-blue"/>
|
|
<div class="blank-32"></div>
|
|
</div>
|
|
</form>
|
|
{else}
|
|
<div class="ui-form">
|
|
<form action="?">
|
|
<div><input type="search" name="kw" value="{$kw}" placeholder="{$L[kw]}"/></div>
|
|
</form>
|
|
</div>
|
|
<form method="post">
|
|
{if $lists}
|
|
{loop $lists $v}
|
|
<div class="list-img">
|
|
<input type="checkbox" name="itemid[]" value="{$v[itemid]}" class="dsn" id="checkbox-{$v[itemid]}"/>
|
|
<a href="{$v[url]}" target="_blank"><img src="{if $v[thumb]}{$v[thumb]}{else}{DT_MOB}static/img/60x60.png{/if}" width="60" height="60" alt="" onerror="this.src='{DT_MOB}static/img/60x60.png';"/></a>
|
|
<ul>
|
|
<li><em class="check" id="check-{$v[itemid]}"></em><a href="{$v[url]}" target="_blank"><strong>{$v[title]}</strong></a></li>
|
|
<li><em class="sheet" id="sheet-{$v[itemid]}"></em><span><a href="?typeid={$v[typeid]}">{$v[type]}</a></span></li>
|
|
</ul>
|
|
</div>
|
|
{/loop}
|
|
{/if}
|
|
{if $MG[favorite_limit]}
|
|
<div class="limit">收藏夹容量 <span class="f_b f_red">{$MG[favorite_limit]}</span> 条 当前已收藏 <span class="f_b">{$limit_used}</span> 条 还可以收藏 <span class="f_b f_blue">{$limit_free}</span> 条</div>
|
|
{/if}
|
|
{if $pages}<div class="pages" id="pages-{$js_pageid}">{$pages}</div>{/if}
|
|
<div id="foot-bar" class="dsn">
|
|
<div class="foot-bar-fix"></div>
|
|
<div class="foot-bar btns">
|
|
<input type="submit" name="submit" value="删除选中" class="btn-red" onclick="if(confirm('确定要删除选中收藏吗?')){this.form.action='?action=delete'}else{return false;}"/>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
<script type="text/javascript">
|
|
$(function(){
|
|
if($('#foot-bar input').length == 0) $('.check').hide();
|
|
$('.list-img em').click(function() {
|
|
if($(this).attr('class') == 'sheet') {
|
|
var id = $(this).attr('id').replace('sheet-', '');
|
|
Dsheet('{$js_pageid}','<a href="?action=edit&itemid='+id+'"><span>修改</span></a>|<a href="?action=delete&itemid='+id+'" onclick="return _delete();"><span style="color:red;">删除</span></a>', '取消');
|
|
} else {
|
|
var id = $(this).attr('id').replace('check-', '');
|
|
if($('#checkbox-'+id).attr('checked')) {
|
|
$('#checkbox-'+id).attr('checked', false);
|
|
$(this).attr('class', 'check');
|
|
} else {
|
|
$('#checkbox-'+id).attr('checked', true);
|
|
$(this).attr('class', 'checked');
|
|
}
|
|
if($('.checked').length > 0) {
|
|
$('#foot-bar').fadeIn(300);
|
|
} else {
|
|
$('#foot-bar').fadeOut(300);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
{/if}
|
|
{if $action=='add' || $action=='edit'}
|
|
<script type="text/javascript">
|
|
function check() {
|
|
if(Dd('title').value.length < 2) {
|
|
Dmsg('请填写标题', 'title');
|
|
return false;
|
|
}
|
|
if(Dd('url').value.length < 12) {
|
|
Dmsg('请填写网址', 'url');
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
</script>
|
|
{/if}
|
|
{template 'footer', 'member'}
|