码迷,mamicode.com
首页 > 其他好文 > 详细

页面跳转的问题

时间:2016-04-12 19:23:50      阅读:1576      评论:0      收藏:0      [点我收藏+]

标签:

<div id="exception_wizard_container">
  <div class="steps-container" style="display:none;">
    <ul class="steps">
      <li data-step="1" class="active"></li>
      <li data-step="2"></li>
    </ul>
  </div>
    <div class="step-content pos-rel">
      <div class="step-pane active" data-step="1" style="padding:0;">

      </div>
      <div class="step-pane" data-step="2" style="padding:0;" id="exception_detail_show_pane">
    </div>
  </div>
</div>

js脚本架包<script src="${ctx!}/static/ui/ace135/js/fuelux/fuelux.wizard.js"></script>

//切换panel事件
$("#exception_wizard_container").ace_wizard({}).on(‘actionclicked.fu.wizard‘ , function(e, info){
  //if(info.step == 1)
}).on(‘changed.fu.wizard‘ , function(e, info){
  if(info.step == 1){
    $(window).triggerHandler(‘resize.jqGrid‘);
  }
});

超链接跳转

{ label: "提货单号", name: "send_no", width: 40,formatter: detailFormatter},

function detailFormatter(cellvalue, options, rowObject){
  var noResult = "<a href=‘javascript:void(0);‘ onclick=‘orderDetail("+rowObject["id"]+")‘>"+cellvalue+"</a>";
  return noResult;
}
function orderDetail(id){
  var wizard = $("#send_wizard_container").data(‘fu.wizard‘)
  wizard.currentStep = 2;
  wizard.setState();
  $("#send_detail_show_pane").empty();
  $("#send_detail_show_pane").load("${ctx!}/bus/send/showSendDetail?id="+id+"&wizardId=send_wizard_container&wizardName=派车管理 ");
  //修改title
  SQ.changName("派车单详情");
}

//新增
$("#exception_add_btn").on("click", function(){
  //location.href = "#page/bus/exception/showExceptionEdit";
  editExceptionInfoBef();
});

//编辑前置
function editExceptionInfoBef(rowData){
  //location.href = "#page/bus/exception/showExceptionEdit?id="+rowData.id;
  var wizard = $("#exception_wizard_container").data(‘fu.wizard‘)
  wizard.currentStep = 2;
  wizard.setState();
  $("#exception_detail_show_pane").empty();
  $("#exception_detail_show_pane").load("${ctx!}/bus/exception/showExceptionEdit?id="+(rowData ? rowData.id : "0"));

  //修改title
  SQ.changName("异常管理详情");
}

跳回

$("#exception_close_btn").on("click",function(){
  //location.href = "#page/bus/exception/index";
  bootbox.confirm("您确定要离开吗?", function(result) {
    if(result){
      var wizard = $("#exception_wizard_container").data(‘fu.wizard‘)
      wizard.currentStep = 1;
      wizard.setState();
      $("#exception_edit_step_pane").empty();
      $("#bus_exception_grid").jqGrid("setGridParam", {postData:$("").serializeObject()}).trigger("reloadGrid");//重新载入数据

      /修改title
      SQ.changName("异常登记");
    }
  });
});

后台

/**
* 跳转到新增页面
*/
public void showExceptionEdit(){
  int exceptionId = getParaToInt("id",0);
  setAttr("id", exceptionId);
  render("/bus/exception_edit.html");
}

页面跳转的问题

标签:

原文地址:http://www.cnblogs.com/sho560/p/5383585.html

(0)
(1)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!