Commit adf2abf1 by yyq1988

优化代码

parent b14e8f23
...@@ -37,11 +37,13 @@ $(document).ready(function(){ ...@@ -37,11 +37,13 @@ $(document).ready(function(){
if ($("#${id}Button").hasClass("disabled")){ if ($("#${id}Button").hasClass("disabled")){
return true; return true;
} }
var url = '${url}';
if('${validate}' && '${validateSelector}'){ if('${validate}' && '${validateSelector}'){
if(!$("${validateSelector}").val()){ if(!$("${validateSelector}").val()){
jp.warning('${validateMsg}'); jp.warning('${validateMsg}');
return; return;
}else{
url+="?office.id="+$("${validateSelector}").val()
} }
} }
top.layer.open({ top.layer.open({
...@@ -50,7 +52,7 @@ $(document).ready(function(){ ...@@ -50,7 +52,7 @@ $(document).ready(function(){
title:"${title}", title:"${title}",
auto:true, auto:true,
name:'friend', name:'friend',
content: "${ctx}/tag/gridselect?url="+encodeURIComponent("${url}")+"&fieldLabels="+encodeURIComponent("${fieldLabels}")+"&fieldKeys="+encodeURIComponent("${fieldKeys}")+"&searchLabels="+encodeURIComponent("${searchLabels}")+"&searchKeys="+encodeURIComponent("${searchKeys}")+"&isMultiSelected=${isMultiSelected? true:false}", content: "${ctx}/tag/gridselect?url="+encodeURIComponent(url)+"&fieldLabels="+encodeURIComponent("${fieldLabels}")+"&fieldKeys="+encodeURIComponent("${fieldKeys}")+"&searchLabels="+encodeURIComponent("${searchLabels}")+"&searchKeys="+encodeURIComponent("${searchKeys}")+"&isMultiSelected=${isMultiSelected? true:false}",
btn: ['确定', '关闭'], btn: ['确定', '关闭'],
yes: function(index, layero){ yes: function(index, layero){
var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method(); var iframeWin = layero.find('iframe')[0].contentWindow; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
......
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