123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php $data['journal/lib/manage.journalContent']=Dever::load('journal/lib/manage.journalContent') ?>
- <style>
- .layui-col-md2
- {
- height: 450px;
- }
- </style>
- <div class="layui-fluid layadmin-cmdlist-fluid" test="公告">
- <ul class="layui-row layui-col-space30" id="sortable">
- <?php if(isset($data['journal/lib/manage.journalContent']) && is_array($data['journal/lib/manage.journalContent'])): ?><?php $t=count($data['journal/lib/manage.journalContent'])-1 ?><?php $i=0 ?><?php foreach($data['journal/lib/manage.journalContent'] as $k => $v): ?><li class="layui-col-md2 layui-col-sm4" id="data-<?php echo $v['id'] ?>">
- <div class="cmdlist-container">
- <div href="javascript:;" style="height:auto;text-align: center;">
- <img src="<?php echo $v['pic'] ?>" width="150">
- </div>
- <a href="javascript:;">
- <div class="cmdlist-text">
- <p class="info"><?php echo $v['name'] ?></p>
- <div class="price">
- <b></b>
- </div>
- <div class="text"><?php echo $v['text'] ?></div>
-
- <div style="margin-top:10px;text-align:center;">
- <div class="layui-table-cell"><a href="javascript:;" class="edit" onclick="<?php echo $v['edit'] ?>"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5 layui-btn layui-btn-xs">编辑</button></a> <a href="<?php echo $v['delete'] ?>" class="oper_delete"><button type="button" class="btn btn-info btn-rounded waves-effect waves-light m-b-5 layui-btn layui-btn-danger layui-btn-xs"><span class="am-icon-trash-o"></span>删除</button></a> </div>
- </div>
- </div>
- </a>
- </div>
- </li><?php $i=$i+1 ?><?php endforeach; ?><?php else: ?><?php echo $data['journal/lib/manage.journalContent'] ?><?php endif; ?>
- </ul>
- </div>
- <script id="url">var url="<?php echo Dever::url("journal/lib/manage.updateJournalContent") ?>"</script>
- <script>
- $( function() {
- var sort = $( "#sortable" ).sortable({
- opacity: 0.7,
- stop:function(){
- var arr = $( "#sortable" ).sortable('toArray');
- arr = arr.join(',');
- $.post(url, {data:arr}, function()
- {
- })
- }
- });
- $( "#sortable" ).disableSelection();
- } );
- </script>
|