Commit e84fadc2 authored by agping's avatar agping

隐藏按钮

parent 256e931f
...@@ -161,6 +161,7 @@ a:hover{ ...@@ -161,6 +161,7 @@ a:hover{
height: 9px; height: 9px;
margin-left: 4px; margin-left: 4px;
} }
.sidebar-nav li{ .sidebar-nav li{
border-bottom: 1px solid #1a1a1a; border-bottom: 1px solid #1a1a1a;
} }
......
...@@ -49,6 +49,7 @@ define (['doT', 'text!temp/access_template_tpl.html', 'css!style/home.css','pagi ...@@ -49,6 +49,7 @@ define (['doT', 'text!temp/access_template_tpl.html', 'css!style/home.css','pagi
$("#access_box").html(doTempl(data.data.class)); $("#access_box").html(doTempl(data.data.class));
$("#href2").attr('href','/index/access?id='+id); $("#href2").attr('href','/index/access?id='+id);
$("#href1").attr('href','/index/roleedit?id='+id); $("#href1").attr('href','/index/roleedit?id='+id);
} }
}) })
......
...@@ -25,8 +25,8 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -25,8 +25,8 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
init: function() { init: function() {
//初始化dot //初始化dot
business.getDistrict(); business.getDistrict();
$("body").append(template); $("body").append(template);
function  getPreMonth(date)  {             function  getPreMonth(date)  {            
var  arr  =  date.split('-');             var  arr  =  date.split('-');            
var  year  =  arr[0];              var  year  =  arr[0];             
...@@ -682,7 +682,8 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -682,7 +682,8 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
var temp = document.getElementById('house_list_tpl').innerHTML; var temp = document.getElementById('house_list_tpl').innerHTML;
var doTtmpl = doT.template(temp); var doTtmpl = doT.template(temp);
$("#business_list").html(doTtmpl(data.data.list)); $("#business_list").html(doTtmpl(data.data.list));
$('.btn-default-show-caozuo').nextAll().hide();//默认按钮只显示两个
/*分页代码*/ /*分页代码*/
add_page(data.data.total, pageNo, business.pageSize, business.getList); add_page(data.data.total, pageNo, business.pageSize, business.getList);
/* $ ("#pagediv").pagination ({ /* $ ("#pagediv").pagination ({
......
...@@ -100,16 +100,35 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function ...@@ -100,16 +100,35 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
$('#sidebar-wrapper').hide(); $('#sidebar-wrapper').hide();
_this.html('显示<img src="/resource/image/icon_down_hide@2x.png" class="text-icon-hide"/>'); _this.html('显示<img src="/resource/image/icon_down_hide@2x.png" class="text-icon-hide"/>');
console.log(2); console.log(2);
// $("#page-content-wrapper").css("width","88%"); // $("#page-content-wrapper").css("width","88%");//内容显示大小
}else{ }else{
$('#sidebar-wrapper').show(); $('#sidebar-wrapper').show();
_this.html('隐藏<img src="/resource/image/icon_down@2x.png" class="text-icon-hide"/>'); _this.html('隐藏<img src="/resource/image/icon_down@2x.png" class="text-icon-hide"/>');
// $("#page-content-wrapper").css("width","88%"); // $("#page-content-wrapper").css("width","88%");//内容显示大小
} }
});
//显示操作里的按钮 显示按钮
_doc.on('click', '.btn-default-show-caozuo', function(e){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
_this.hide();
_this.nextAll().show();
});
//隐藏操作里的按钮
_doc.on('click', '.btn-default-hide-caozuo', function(e){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
_this.prevAll('.btn-default-hide-display').hide();
_this.hide();
$('.btn-default-show-caozuo').show();
}); });
layerTipsX=function(n){layer.open({content:n,skin:"msg",time:2})};//注册一个layer自定义全局函数 layerTipsX=function(n){layer.open({content:n,skin:"msg",time:2})};//注册一个layer自定义全局函数
}); });
var ServerHost = location.origin; var ServerHost = location.origin;
......
...@@ -52,12 +52,14 @@ ...@@ -52,12 +52,14 @@
<a class="btn1 btn-success " href="#modal_followup" data-id='[%= it[item]["id"] %]' data-toggle="modal" >跟进</a> <a class="btn1 btn-success " href="#modal_followup" data-id='[%= it[item]["id"] %]' data-toggle="modal" >跟进</a>
[% } %] [% } %]
<a class="btn1 btn-default btn-default-show-caozuo">>>></a>
[% if(it[item]['auth_edit_house'] || check_auth('index/houseEdit')) { %] [% if(it[item]['auth_edit_house'] || check_auth('index/houseEdit')) { %]
<a class="btn1 btn-success " href="/admin.php/index/houseEdit?id=[%= it[item]['id']%]" data-toggle="modal" >编辑</a> <a class="btn1 btn-success btn-default-hide-display" href="/admin.php/index/houseEdit?id=[%= it[item]['id']%]" data-toggle="modal" >编辑</a>
[% } %] [% } %]
[% if(check_auth('index/houseEdit')) { %] [% if(check_auth('index/houseEdit')) { %]
<a class="btn1 btn-success is_show" data-toggle="modal" data-id='[%= it[item]["id"] %]'>推荐</a> <a class="btn1 btn-success is_show btn-default-hide-display" data-toggle="modal" data-id='[%= it[item]["id"] %]'>推荐</a>
[% } %] [% } %]
<!--[% if(check_auth('index/addHousesAgents')) { %] <!--[% if(check_auth('index/addHousesAgents')) { %]
...@@ -65,13 +67,15 @@ ...@@ -65,13 +67,15 @@
[% } %]--> [% } %]-->
[% if(check_auth('index/editExclusive')) { %] [% if(check_auth('index/editExclusive')) { %]
<a class="btn1 btn-success dujia" href="#modal-dujia" data-toggle="modal" data-id='[%= it[item]["id"] %]' >是否独家</a> <a class="btn1 btn-success dujia btn-default-hide-display" href="#modal-dujia" data-toggle="modal" data-id='[%= it[item]["id"] %]' >是否独家</a>
[% } %] [% } %]
<a class="btn1 btn-success caozuo" href="#modal-record" data-toggle="modal" data-id='[%= it[item]["id"] %]'>操作记录</a> <a class="btn1 btn-success caozuo btn-default-hide-display" href="#modal-record" data-toggle="modal" data-id='[%= it[item]["id"] %]'>操作记录</a>
[% if(check_auth('index/houseDel')) { %] [% if(check_auth('index/houseDel')) { %]
<a data-toggle="modal" data-id='[%= it[item]["id"] %]' href="#modal-delete" class="btn1 btn-danger add_applies del_modal">删除</a> <a data-toggle="modal" data-id='[%= it[item]["id"] %]' href="#modal-delete" class="btn1 btn-danger add_applies del_modal btn-default-hide-display">删除</a>
[% } %] [% } %]
<a class="btn1 btn-default btn-default-hide-caozuo btn-default-hide-display"><<<</a>
</td> </td>
</tr> </tr>
[% } %] [% } %]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment