Browse Source

修改了城市选择器选择颜色的变换

luyanan 8 years ago
parent
commit
3bcdaf220f
2 changed files with 34 additions and 18 deletions
  1. 0 14
      cmp-portal/cmp-updateinfo.html
  2. 34 4
      cmp-portal/js/cmp-updateinfo.js

+ 0 - 14
cmp-portal/cmp-updateinfo.html

17
	.dropdown-menu table{width:100%;}
17
	.dropdown-menu table{width:100%;}
18
	input.frmtype[readonly] {color: #333;}
18
	input.frmtype[readonly] {color: #333;}
19
</style>
19
</style>
20
<script type="text/javascript">
21
$(document).ready(function() {	
22
	if($("#oprovince").text()=="请选择企业总部所在省或直辖市"){
23
		$("#oprovince").removeClass("mr_select");
24
	}else{
25
		$("#oprovince").addClass("mr_select");
26
	}
27
	if($("#ocity").text()=="请选择企业总部所在城市"){
28
		$("#ocity").removeClass("mr_select");
29
	}else{
30
		$("#ocity").addClass("mr_select");
31
	}
32
})
33
</script>
34
</head>
20
</head>
35
<body>
21
<body>
36
<!--头部-->
22
<!--头部-->

+ 34 - 4
cmp-portal/js/cmp-updateinfo.js

107
					if($data.qualification) {
107
					if($data.qualification) {
108
						indu($data.qualification, '.editUlistC ')
108
						indu($data.qualification, '.editUlistC ')
109
					}
109
					}
110
					//省份城市颜色
111
					if($("#oprovince").text()=="请选择企业总部所在省或直辖市"){
112
						$("#oprovince").removeClass("mr_select");
113
					}else{
114
						$("#oprovince").addClass("mr_select");
115
					}
116
					if($("#ocity").text()=="请选择企业总部所在城市"){
117
						$("#ocity").removeClass("mr_select");
118
					}else{
119
						$("#ocity").addClass("mr_select");
120
					}
110
				}
121
				}
111
			},
122
			},
112
			error: function(XMLHttpRequest, textStats, errorThrown) {
123
			error: function(XMLHttpRequest, textStats, errorThrown) {
386
	});
397
	});
387
	/*取消*/
398
	/*取消*/
388
	$("#Ocancel").click(function() {
399
	$("#Ocancel").click(function() {
389
			location.href="cmp-workspaces.html"
390
		})
391
		/*选择城市*/
392
		/*选择城市填充js	*/
400
		location.href="cmp-workspaces.html"
401
	})
402
	/*选择省份*/
403
	$(document).on("click", "#Province li a", function() {
404
		var aVal = $(this).text();
405
		$(this).parent().parent().parent().find('.mr_show').text(aVal);
406
		$(this).parent().parent().parent().find('input[name=cho_Province]').val(aVal);
407
		
408
		if($("#oprovince").text()=="请选择企业总部所在省或直辖市"){
409
			$("#oprovince").removeClass("mr_select");
410
			$("#ocity").removeClass("mr_select");
411
		}else{
412
			$("#oprovince").addClass("mr_select");
413
			$("#ocity").removeClass("mr_select");
414
		}
415
	});
416
	/*选择城市填充js	*/
393
	$(document).on("click", "#City li a", function() {
417
	$(document).on("click", "#City li a", function() {
394
		var aVal = $(this).text();
418
		var aVal = $(this).text();
395
		$(this).parent().parent().parent().find('.mr_show').text(aVal);
419
		$(this).parent().parent().parent().find('.mr_show').text(aVal);
396
		$(this).parent().parent().parent().find('input[name=cho_City]').val(aVal);
420
		$(this).parent().parent().parent().find('input[name=cho_City]').val(aVal);
421
		if($("#ocity").text()=="请选择企业总部所在城市"){
422
			$("#ocity").removeClass("mr_select");
423
		}else{
424
			$("#ocity").addClass("mr_select");
425
		}
397
	});
426
	});
427
	
398
})
428
})