123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <!DOCTYPE html>
- <html lang="zh-cn">
- <head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
- <!-- Apple devices fullscreen -->
- <meta name="apple-mobile-web-app-capable" content="yes">
- <!-- Apple devices fullscreen -->
- <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
- <style type="text/css">
- #online{ padding-top: 0 !important; }
- #online li img{ vertical-align: middle;
- max-width: 100%;
- max-height: 106px;
- position: absolute;
- top: 50%;
- transform: translate(-50%,-50%);
- left: 50%;
- z-index: 1;
- }
- .saveBtn{
- display: inline-block;
- *display: inline;
- *zoom: 1;
- margin-left: 10px;
- padding: 0 18px;
- height: 40px;
- line-height: 40px;
- cursor: pointer;
- text-align: center;
- background: #fff;
- border: 1px solid #CFCFCF;
- border-radius: 3px;
- color: #565656;
- font-size: 14px;
- }
- .tabs li:hover {
- color: #fff;
- background: #00B7EE;
- border-color: transparent;
- }
- .nonepic{ text-align: center; color: #888; margin-top: 60px }
- .heading{ clear: both; margin: 20px 10px; }
- .heading h2 {
- color: #333333;
- font-size: 15px;
- margin: 0px;
- margin-bottom: 10px;
- font-weight: normal;
- }
- .heading hr {
- border: none;
- position: relative;
- margin: 0px;
- height: 1px;
- width: 100%;
- background: #e5e5e5;
- }
- .heading hr:before {
- height: 2px;
- background: #666666;
- content: "";
- position: absolute;
- top: -1px;
- width: 60px;
- left: 0px;
- }
- </style>
- <link href="__PUBLIC__/plugins/Ueditor/dialogs/image/image.css" rel="stylesheet" type="text/css">
- </head>
- <body>
- <div class="ui-layout-west area manage-area" id="manage_area">
- <div id="tree" class="ztree"></div>
- </div>
- <div class="ui-layout-center" id="online">
- <ul id="list" class="tabs">
- {notempty name="$common_pic"}
- <div class="heading">
- <h2>最近使用</h2>
- <hr>
- </div>
- {volist name="common_pic" id="pic"}
- <li data-url="{$pic.pic_path}" onclick='hover_new(this);'>
- <img src="{$pic.pic_path}" />
- <span class="icon"></span>
- </li>
- {/volist}
- {/notempty}
-
- <div class="heading">
- <h2>目录图片</h2>
- <hr>
- </div>
- {empty name="$list"}
- <div class='nonepic'>暂无图片可选择~</div>
- {else/}
- {volist name="list" id="vo"}
- <li data-url="{$vo.path}" onclick='hover_new(this);'>
- <img src="{$vo.path}" />
- <span class="icon"></span>
- </li>
- {/volist}
- {/empty}
- </ul>
- </div>
- {load href="__STATIC__/common/js/jquery.min.js" /}
- <script type="text/javascript" src="__PUBLIC__/plugins/layer-v3.1.0/layer.js?v={$version|default='1.2.9'}"></script>
-
- <script type="text/javascript">
- // 记录选择的图片
- function hover_new(this_) {
- var num = '{$info.num}';
- if (1 == num) {
- // 当数量为1时,仅可选择一张图片
- $("#list li").each(function(){
- $(this).removeClass("selected")
- });
- }
- // 给点击的图片加上Class
- $(this_).toggleClass("selected");
- }
- </script>
- </body>
- </html>
|