zoukankan      html  css  js  c++  java
  • ligerUI的dialog

    function f_selectContact(){
    $.post("${ctx}/basicInfo/findEnterNames.action",function(data){
    var hh = data;
    localStorage.setItem("array",JSON.stringify(hh));//传递数据
    parent.jQuery.ligerDialog.open({ title: '企业',  //构建弹窗
    name:'winselector',
    550,
    height: 520,
    url: '${ctx}/pages/outfalls/viewGrid.jsp',    //子页面
    isHidden: false,
    buttons: [
    { text: '确定', onclick: f_selectContactOK },
    { text: '取消', onclick: f_selectContactCancel }
    ]
    });
    });

    //

    return false;
    }
    function f_selectContactOK(item, dialog) {    
    var fn = dialog.frame.f_select || dialog.frame.window.f_select;    

    var data = fn();
    if (!data) {
    alert('请选择行!');
    return;
    }
    $("#outUserCbx").val(data.entName);
    $("#outfallsentid").val(data.id);
    dialog.close();
    }
    function f_selectContactCancel(item, dialog) {
    dialog.close();
    }

    function f_loadText(){
    var id = $("#voId").val();
    $.post("${ctx}/basicInfo/outfallsAct!loadText.action",{"id":id},
    function(data){

    $("#outUserCbx").val(data[0].entName);
    });
    }

    //dialog的显示内容

    <head>
    <link href="${ctx}/javascripts/ligerUI_v133/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <link href="${ctx}/javascripts/ligerUI/skins/ligerui-icons.css" rel="stylesheet" type="text/css" />
    <script src="${ctx}/javascripts/jquery/jquery-1.9.0.min.js" type="text/javascript"></script>
    <script src="${ctx}/javascripts/ligerUI_v133/js/ligerui.min.js" type="text/javascript"></script>
    <title></title>
    <script type="text/javascript">
    var g = null;
    var array = null;
    $(function(){
    var url=window.location.search; //获取url中"?"符后的字串

    //if($("#txtKey").val()==null || $("#txtKey").val()==""){
    array = JSON.parse(localStorage.getItem("array"));
    console.log("array: " +array);
    /* }else{
    array = selarr;
    } */
    f_reload();
    });
    function f_reload(){

    g = $("#maingrid4").ligerGrid({
    columns: [
    { display: 'id', name: 'id', hide:1, 5,isAllowHide:true },
    { display: '企业', name: 'entName', 300 ,frozen: false}
    ], usePager :false,
    allowAdjustColWidth: true,
    data: {Rows:array},
    '99.5%',height:'100%',
    rownumbers: true // 显示序号
    });
    }
    function f_select()
    {
    return g.getSelectedRow();
    }
    var selarr ;
    function f_search() {
    var seloutfalls = $("#txtKey").val();
    $.post("${ctx}/basicInfo/outfallsAct!findEnterNames.action",{"seleoutfalls":seloutfalls},function(data){
    array = data;
    f_reload();
    });

    }
    </script>
    <style type="text/css">
    .edittable td.editcellmessage,.edittable td.editcellverify,.edittable td.editcell{ padding:4px;line-height:23px;}
    .edittable td.editcellmessage{ padding-left:20px;}
    body { font-size:12px; background:white;}
    .l-button-submit {80px; margin:10px 15px 10px 10px ; padding-bottom:2px;}
    </style>
    </head>
    <body>
    <table class="edittable">
    <tbody>
    <tr >
    <!--企业 -->

    <td align="right" class="editcellmessage">企业:</td>
    <td align="left" class="editcell"><input type="text" id="txtKey" style="130px;height:18px;border: 1px solid #A3C0E8" /></td>
    <td><input type="submit" id="btnOK" value="搜索" class="l-button l-button-submit" onclick="f_search()"/> </td>
    </tr>

    </tbody>
    </table>

    <div id="maingrid4" style="margin:0; padding:0"></div>


    <div style="display:none;">
    <!-- g data total ttt -->
    </div>

  • 相关阅读:
    sql脚本:将一个数据库完整复制到另一个数据库(转)
    问题:DropDownList启用AutoPostback后,SelectedIndexChanged事件跟踪不到
    学习:如何在已有MOSS的环境下重装IIS(转)
    学习:MOSS2007 实现单点登陆(转)
    sql脚本:恢复数据库(根据备份的bak)(转)
    学习:深入浅出之正则表达式(转)
    错误:此网页的安全性验证无效并且可能损坏。请单击 Web 浏览器中的“后退”,刷新网页,再重试操作
    学习:关于代码调用SSP获取UserProfile出错的解决方案(转)
    问题:提升权限后,更新SPListItem即 Item.Update()出错问题
    学习:char、varchar、text和nchar、nvarchar、ntext的区别(转)
  • 原文地址:https://www.cnblogs.com/hnzkljq/p/9576816.html
Copyright © 2011-2022 走看看