|
@@ -4,19 +4,24 @@ $(document).ready(function(){
|
|
|
/*************************** 选择媒体 ***************************/
|
|
|
|
|
|
$(".selectOperator_save").click(function(){
|
|
|
- var operatorId = $("#selectOperatorDiv input[type='radio']:checked").val();
|
|
|
- if(operatorId == undefined){
|
|
|
- alert("请选择媒体,在进行操作!");
|
|
|
- return false;
|
|
|
- }
|
|
|
- parent.$("#input_selectOperator").val(operatorId);//父层的元素
|
|
|
+ var checkboxs = $("#selectOperatorDiv input[type='checkbox']:checked");
|
|
|
+ var operatorIds = [];
|
|
|
+ checkboxs.each(function(){
|
|
|
+ var id = parseInt($(this).val());
|
|
|
+ operatorIds.push(id);
|
|
|
+ });
|
|
|
+ parent.$("#input_selectOperator").val(operatorIds);//父层的元素
|
|
|
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
|
parent.layer.close(index);//再执行关闭
|
|
|
});
|
|
|
|
|
|
- $("#selectOperatorDiv input[type='radio']").each(function(){
|
|
|
- if($(this).val() == parent.$("#input_selectOperator").val()){
|
|
|
- $(this).attr('checked',true);
|
|
|
+ $("#selectOperatorDiv input[type='checkbox']").each(function(){
|
|
|
+ var obj = $(this);
|
|
|
+ var ids = parent.$("#input_selectOperator").val().split(",");
|
|
|
+ for(var i = 0,l=ids.length;i<l;i++){
|
|
|
+ if(obj.attr("id") == ids[i]){
|
|
|
+ obj.attr('checked',true);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -30,19 +35,35 @@ $(document).ready(function(){
|
|
|
/*************************** 选择媒体场景 ***************************/
|
|
|
|
|
|
$(".selectOperatorPlace_save").click(function(){
|
|
|
- var placeId = $("#selectOperatorPlaceDiv input[type='radio']:checked").val();
|
|
|
- if(placeId == undefined){
|
|
|
- alert("请选择媒体场景,在进行操作!");
|
|
|
- return false;
|
|
|
+ var checkboxs = $("#selectOperatorPlaceDiv input[type='checkbox']:checked");
|
|
|
+ var placeId = "a";
|
|
|
+ var placeName= "";
|
|
|
+ if(checkboxs.length > 0){
|
|
|
+ checkboxs.each(function(){
|
|
|
+ var id = parseInt($(this).val());
|
|
|
+ placeId += ","+id;
|
|
|
+ placeName += $(this).attr("title")+",";
|
|
|
+ });
|
|
|
+ parent.$("#btn-selectPlace").addClass("aChange");
|
|
|
+ parent.$("#btn-selectPlaceClass").addClass("aChange");
|
|
|
+ }else{
|
|
|
+ placeId = "";
|
|
|
+ parent.$("#btn-selectPlace").removeClass("aChange");
|
|
|
+ parent.$("#btn-selectPlaceClass").removeClass("aChange");
|
|
|
}
|
|
|
- parent.$("#placeId").val(placeId);//父层的元素
|
|
|
+ parent.$("#selectPlaceId").val(placeId);//父层的元素
|
|
|
+ parent.$("#selectPlaceName").val(placeName);//父层的元素
|
|
|
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
|
parent.layer.close(index);//再执行关闭
|
|
|
});
|
|
|
|
|
|
- $("#selectOperatorPlaceDiv input[type='radio'],#selectPlaceDiv input[type='radio'],#selectPlaceClassDiv input[type='radio']").each(function(){
|
|
|
- if($(this).val() == parent.$("#placeId").val()){
|
|
|
- $(this).attr('checked',true);
|
|
|
+ $("#selectOperatorPlaceDiv input[type='checkbox'],#selectPlaceDiv input[type='checkbox'],#selectPlaceClassDiv input[type='checkbox']").each(function(){
|
|
|
+ var obj = $(this);
|
|
|
+ var ids = parent.$("#selectPlaceId").val().split(",");
|
|
|
+ for(var i = 1,l=ids.length;i<l;i++){
|
|
|
+ if(obj.val() == ids[i]){
|
|
|
+ obj.attr('checked',true);
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
|
|
@@ -56,12 +77,24 @@ $(document).ready(function(){
|
|
|
/*************************** 选择小场景 ***************************/
|
|
|
|
|
|
$(".selectPlace_save").click(function(){
|
|
|
- var placeId = $("#selectPlaceDiv input[type='radio']:checked").val();
|
|
|
- if(placeId == undefined){
|
|
|
- alert("请选择小场景,在进行操作!");
|
|
|
- return false;
|
|
|
+ var checkboxs = $("#selectPlaceDiv input[type='checkbox']:checked");
|
|
|
+ var placeId = "b";
|
|
|
+ var placeName= "";
|
|
|
+ if(checkboxs.length > 0){
|
|
|
+ checkboxs.each(function(){
|
|
|
+ var id = parseInt($(this).val());
|
|
|
+ placeId += ","+id;
|
|
|
+ placeName += $(this).attr("title")+",";
|
|
|
+ });
|
|
|
+ parent.$("#btn-selectOperatorPlace").addClass("aChange");
|
|
|
+ parent.$("#btn-selectPlaceClass").addClass("aChange");
|
|
|
+ }else{
|
|
|
+ placeId = "";
|
|
|
+ parent.$("#btn-selectOperatorPlace").removeClass("aChange");
|
|
|
+ parent.$("#btn-selectPlaceClass").removeClass("aChange");
|
|
|
}
|
|
|
- parent.$("#placeId").val(placeId);//父层的元素
|
|
|
+ parent.$("#selectPlaceId").val(placeId);//父层的元素
|
|
|
+ parent.$("#selectPlaceName").val(placeName);//父层的元素
|
|
|
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
|
parent.layer.close(index);//再执行关闭
|
|
|
});
|
|
@@ -76,12 +109,24 @@ $(document).ready(function(){
|
|
|
/*************************** 选择数聚场景 ***************************/
|
|
|
|
|
|
$(".selectPlaceClass_save").click(function(){
|
|
|
- var placeId = $("#selectPlaceClassDiv input[type='radio']:checked").val();
|
|
|
- if(placeId == undefined){
|
|
|
- alert("请选择数聚场景,在进行操作!");
|
|
|
- return false;
|
|
|
+ var checkboxs = $("#selectPlaceClassDiv input[type='checkbox']:checked");
|
|
|
+ var placeId = "c";
|
|
|
+ var placeName= "";
|
|
|
+ if(checkboxs.length > 0){
|
|
|
+ checkboxs.each(function(){
|
|
|
+ var id = parseInt($(this).val());
|
|
|
+ placeId += ","+id;
|
|
|
+ placeName += $(this).attr("title")+",";
|
|
|
+ });
|
|
|
+ parent.$("#btn-selectPlace").addClass("aChange");
|
|
|
+ parent.$("#btn-selectOperatorPlace").addClass("aChange");
|
|
|
+ }else{
|
|
|
+ placeId = "";
|
|
|
+ parent.$("#btn-selectPlace").removeClass("aChange");
|
|
|
+ parent.$("#btn-selectOperatorPlace").removeClass("aChange");
|
|
|
}
|
|
|
- parent.$("#placeId").val(placeId);//父层的元素
|
|
|
+ parent.$("#selectPlaceId").val(placeId);//父层的元素
|
|
|
+ parent.$("#selectPlaceName").val(placeName);//父层的元素
|
|
|
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
|
parent.layer.close(index);//再执行关闭
|
|
|
});
|
|
@@ -98,17 +143,13 @@ $(document).ready(function(){
|
|
|
$(".selectWifi_save").click(function(){
|
|
|
var checkboxs = $("table tbody .checkboxStyle_change");
|
|
|
var ids = [];
|
|
|
- if(checkboxs.length > 0){
|
|
|
- checkboxs.each(function(){
|
|
|
- var id = parseInt($(this).attr("id"));
|
|
|
- ids.push(id);
|
|
|
- });
|
|
|
- parent.$("#selectWifi").val(ids);//父层的元素
|
|
|
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
|
- parent.layer.close(index);//再执行关闭
|
|
|
- }else{
|
|
|
- alert("请选择wifi信息,在进行操作!");
|
|
|
- }
|
|
|
+ checkboxs.each(function(){
|
|
|
+ var id = parseInt($(this).attr("id"));
|
|
|
+ ids.push(id);
|
|
|
+ });
|
|
|
+ parent.$("#selectWifi").val(ids);//父层的元素
|
|
|
+ var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
|
|
|
+ parent.layer.close(index);//再执行关闭
|
|
|
});
|
|
|
|
|
|
// 分页中超链接跳转
|