Blogger Information
Blog 250
fans 3
comment 0
visits 322885
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
x-admin点击左侧标签不刷新的解决方法
梁凯达的博客
Original
2305 people have browsed it

兄弟,人家的x-admin里面的下面这个方法里面,有三个参数
其中:if_refresh参数是是否刷新,在后台x-admin的index文件里面

<a onclick="xadmin.add_tab('媒体总类','/admin/ruanwen_list',true)">
明确的给出了三个参数:标题+访问地址+是否刷新
只需要在index的a标签onclick方法里面添加第三个参数为true,就能完美解决点击刷新问题!!!

下面是x-admin.js里面的函数方法

  1. Xadmin.prototype.add_tab = function (title,url,is_refresh) {
  2. var id = md5(url);//md5每个url
  3. //重复点击
  4. for (var i = 0; i <$('.x-iframe').length; i++) {
  5. if($('.x-iframe').eq(i).attr('tab-id')==id){
  6. element.tabChange('xbs_tab', id);
  7. if(is_refresh)
  8. $('.x-iframe').eq(i).attr("src",$('.x-iframe').eq(i).attr('src'));
  9. return;
  10. }
  11. };
  12. this.add_lay_tab(title,url,id);
  13. this.set_data(title,url,id);
  14. element.tabChange('xbs_tab', id);
  15. }
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post