<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head><title><!--{$UUDEV_PAGE_TITLE}--></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="css/ubb.css" rel="stylesheet"/>
</head>
<body>
<div class="portlet ui-widget ui-widget-content ui-helper-clearfix ui-corner-all" style="hight:auto;">
<div class="portlet-header ui-widget-header"><span class="ui-icon ui-icon-circle-arrow-s" style="float:right;"></span>软件搜索</div>
<div class="portlet-content" style="display: block;padding:10px;">
	<div class="panel-body">
		<div class="info-box" style="display:none;"><a class="box warning corners" title="Error box" href="javascript:();"><span class="close">&nbsp;</span>在UBB还没有找到对应的搜索框，建议你先创建一个搜索！</a></div>
		<table class="ubbpad3">
			<tr>
				<td>绑定输入框:</td>
				<td><select id="input-name">
			<option value="英文字母">英文字母</option>
		</select><img class="tiptip" title="英文字母" src="images/quest.gif"/></td>
			</tr>
			<tr>
				<td>按钮名称:</td>
				<td><input id="btn-name" value="软件搜索">
		<img class="tiptip" title="搜索按钮名称。" src="images/quest.gif"/></td>
			</tr>
		</table>
	</div>
	<div class="panel-bottom"  style="text-align:center;">
		<button class="but5font insertBtn" role="button" aria-disabled="false"><span class="ui-button-text">插入</span></button>
		<button class="but5font cancelBtn" role="button" aria-disabled="false"><span class="ui-button-text">取消</span></button>
	</div>
</div>
</div>
<script>
$(document).ready(function(){
	var channel_text = $("#channel_text").val();
	if(channel_text != ""){
		$.ajax({
			url:"index.php?r=Layout.getSearchInputName",
			type:"get",
			cache:false,
			dataType:'json',
			data:{channel_text:channel_text},
			success:function(JsonResponseData){
				if ($.isArray(JsonResponseData)) {
					$("#input-name").empty();
					$(JsonResponseData).each(function(k, v){
						$("<option value='" + v + "'>" + v + "</option>").appendTo("#input-name");
					});
				}else{
					$(".info-box").fadeIn(1000);
				}
			}
		});
	}else{
		$(".info-box").fadeIn(1000);
	}
	$(".tiptip").tipTip({defaultPosition: "right"});
	$(".portlet").css({height:'100%'});
	
	$(".info-box").click(function(){
		$(".info-box").fadeOut(2000);
	});

});
</script>
</body>
</html>