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

后台添加代码的方式模态框的方法

时间:2017-03-09 11:32:41      阅读:400      评论:0      收藏:0      [点我收藏+]

标签:oca   index   pid   type   show   opera   after   miss   方法   

以添加含有帮助的方式为例:

1,在某DIV后面增加代码:

$("#ListBoxControl1_1772158006").after(function()
    { return "<div id=‘firstmodal‘ class=‘modal container fade‘ role=‘dialog‘ tabindex=‘-1‘ style=‘display: none;‘><div class=‘modal-header‘><button type=‘button‘ class=‘close‘ data-dismiss=‘modal‘ aria-hidden=‘true‘>×</button><h4 class=‘modal-title‘>第一层模态窗口</h4></div><div class=‘modal-body‘><div id=‘GroupControl4_1811834094-body‘><div data-visible=‘true‘><a id=‘LinkLabel1_1674513499‘ name=‘‘ href=‘‘ data-visible=‘true‘ class=‘btn btn-info‘><span>修改</span></a></div><div class=‘form-group‘><label for=‘XTextBox3_2100682917‘>批号</label><div class=‘input-icon-group‘><input id=‘XTextBox3_2100682917‘ name=‘XTextBox3_2100682917‘ placeholder=‘‘ data-clearbtn=‘true‘ type=‘text‘ data-visible=‘true‘ data-bind=‘datasource:{dataSourceName:‘Instance_DataModel14_Card‘, value:‘DHDFL.BATCHID‘}‘ data-bv-notempty=‘false‘ class=‘form-control‘> <span data-role=‘clearBtn‘ class=‘iconjs iconjs-clear input-icon input-icon-clear‘> </span></div></div><div class=‘form-group‘><label for=‘XCalculator1_2100682917‘>数量</label><div class=‘input-icon-group‘><input type=‘hidden‘ value=‘2‘><input id=‘XCalculator1_2100682917‘ name=‘XCalculator1_2100682917‘ placeholder=‘‘ data-clearbtn=‘true‘ type=‘number‘ data-visible=‘true‘ data-bind=‘datasource:{dataSourceName:‘Instance_DataModel14_Card‘, numberbox:‘DHDFL.IMQUANTITY‘}‘ data-bv-notempty=‘false‘ class=‘form-control‘ data-bv-accuracy=‘true‘ data-bv-accuracy-num=‘8‘ data-bv-accuracy-message=‘‘ data-bv-field=‘XCalculator1_2100682917‘> <span data-role=‘clearBtn‘ class=‘iconjs iconjs-clear input-icon input-icon-clear‘> </span></div><small class=‘help-block‘ data-bv-validator=‘accuracy‘ data-bv-for=‘XCalculator1_2100682917‘ data-bv-result=‘NOT_VALIDATED‘ style=‘display: none;‘>请输入精度内数字</small></div><div class=‘form-group‘><label for=‘XSmartDictLookup2_723727198‘>货位</label><div class=‘input-group‘><div class=‘input-icon-group‘><input id=‘XSmartDictLookup2_723727198_value‘ name=‘XSmartDictLookup2_723727198_value‘ type=‘hidden‘ class=‘excluded‘><input type=‘text‘ id=‘XSmartDictLookup2_723727198‘ name=‘XSmartDictLookup2_723727198‘ placeholder=‘‘ data-role=‘lookup‘ data-clearbtn=‘true‘ data-showfavor=‘false‘ data-multiselect=‘true‘ data-separator=‘;‘ data-istree=‘false‘ data-visible=‘true‘ data-bind=‘datasource:{dataSourceName:‘Instance_DataModel14_Card‘, value:‘DHDFL.LOCATIONID_LOCATIONNAME‘}‘ data-bv-notempty=‘false‘ data-helpid=‘48df741a-3e3f-4e9a-b25a-64b880851ec0‘ data-valuefield=‘LOCATIONID‘ data-textfield=‘LOCATIONNAME‘ data-businessobject=‘‘ data-businessoperation=‘‘ data-permissionfield=‘‘ data-refelementid=‘‘ data-mapfields=‘{‘LOCATIONID_LOCATIONCODE‘: ‘LOCATIONCODE‘,‘LOCATIONID‘: ‘LOCATIONID‘}‘ class=‘form-control‘ readonly=‘‘> <span data-role=‘clearBtn‘ class=‘iconjs iconjs-clear input-icon input-icon-clear‘> </span></div><span class=‘input-group-btn‘><button class=‘btn btn-info search‘ type=‘button‘><i class=‘iconjs iconjs-lookup‘> </i></button></span></div></div></div><div class=‘modal-footer‘ style=‘text-align: center;‘><button type=‘button‘ data-dismiss=‘modal‘ class=‘btn btn-default‘>关闭</button></div></div>"
    });

2,增加弹出模态框方法:

$("#ToolStripButton3_1872779387").on("click",function()
    {
        $("#firstmodal").modal();

        $("#firstmodal").simpleEnhance();//帮助初始化
    });

3,总代码

    $("#ListBoxControl1_1772158006").after(function()
    { return "<div id=‘firstmodal‘ class=‘modal container fade‘ role=‘dialog‘ tabindex=‘-1‘ style=‘display: none;‘><div class=‘modal-header‘><button type=‘button‘ class=‘close‘ data-dismiss=‘modal‘ aria-hidden=‘true‘>×</button><h4 class=‘modal-title‘>第一层模态窗口</h4></div><div class=‘modal-body‘><div id=‘GroupControl4_1811834094-body‘><div data-visible=‘true‘><a id=‘LinkLabel1_1674513499‘ name=‘‘ href=‘‘ data-visible=‘true‘ class=‘btn btn-info‘><span>修改</span></a></div><div class=‘form-group‘><label for=‘XTextBox3_2100682917‘>批号</label><div class=‘input-icon-group‘><input id=‘XTextBox3_2100682917‘ name=‘XTextBox3_2100682917‘ placeholder=‘‘ data-clearbtn=‘true‘ type=‘text‘ data-visible=‘true‘ data-bind=‘datasource:{dataSourceName:‘Instance_DataModel14_Card‘, value:‘DHDFL.BATCHID‘}‘ data-bv-notempty=‘false‘ class=‘form-control‘> <span data-role=‘clearBtn‘ class=‘iconjs iconjs-clear input-icon input-icon-clear‘> </span></div></div><div class=‘form-group‘><label for=‘XCalculator1_2100682917‘>数量</label><div class=‘input-icon-group‘><input type=‘hidden‘ value=‘2‘><input id=‘XCalculator1_2100682917‘ name=‘XCalculator1_2100682917‘ placeholder=‘‘ data-clearbtn=‘true‘ type=‘number‘ data-visible=‘true‘ data-bind=‘datasource:{dataSourceName:‘Instance_DataModel14_Card‘, numberbox:‘DHDFL.IMQUANTITY‘}‘ data-bv-notempty=‘false‘ class=‘form-control‘ data-bv-accuracy=‘true‘ data-bv-accuracy-num=‘8‘ data-bv-accuracy-message=‘‘ data-bv-field=‘XCalculator1_2100682917‘> <span data-role=‘clearBtn‘ class=‘iconjs iconjs-clear input-icon input-icon-clear‘> </span></div><small class=‘help-block‘ data-bv-validator=‘accuracy‘ data-bv-for=‘XCalculator1_2100682917‘ data-bv-result=‘NOT_VALIDATED‘ style=‘display: none;‘>请输入精度内数字</small></div><div class=‘form-group‘><label for=‘XSmartDictLookup2_723727198‘>货位</label><div class=‘input-group‘><div class=‘input-icon-group‘><input id=‘XSmartDictLookup2_723727198_value‘ name=‘XSmartDictLookup2_723727198_value‘ type=‘hidden‘ class=‘excluded‘><input type=‘text‘ id=‘XSmartDictLookup2_723727198‘ name=‘XSmartDictLookup2_723727198‘ placeholder=‘‘ data-role=‘lookup‘ data-clearbtn=‘true‘ data-showfavor=‘false‘ data-multiselect=‘true‘ data-separator=‘;‘ data-istree=‘false‘ data-visible=‘true‘ data-bind=‘datasource:{dataSourceName:‘Instance_DataModel14_Card‘, value:‘DHDFL.LOCATIONID_LOCATIONNAME‘}‘ data-bv-notempty=‘false‘ data-helpid=‘48df741a-3e3f-4e9a-b25a-64b880851ec0‘ data-valuefield=‘LOCATIONID‘ data-textfield=‘LOCATIONNAME‘ data-businessobject=‘‘ data-businessoperation=‘‘ data-permissionfield=‘‘ data-refelementid=‘‘ data-mapfields=‘{‘LOCATIONID_LOCATIONCODE‘: ‘LOCATIONCODE‘,‘LOCATIONID‘: ‘LOCATIONID‘}‘ class=‘form-control‘ readonly=‘‘> <span data-role=‘clearBtn‘ class=‘iconjs iconjs-clear input-icon input-icon-clear‘> </span></div><span class=‘input-group-btn‘><button class=‘btn btn-info search‘ type=‘button‘><i class=‘iconjs iconjs-lookup‘> </i></button></span></div></div></div><div class=‘modal-footer‘ style=‘text-align: center;‘><button type=‘button‘ data-dismiss=‘modal‘ class=‘btn btn-default‘>关闭</button></div></div>"
    });

    $("#ToolStripButton3_1872779387").on("click",function()
    {
        $("#firstmodal").modal();

        $("#firstmodal").simpleEnhance();
    });

 

后台添加代码的方式模态框的方法

标签:oca   index   pid   type   show   opera   after   miss   方法   

原文地址:http://www.cnblogs.com/alsf/p/6524371.html

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