mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
issue 532: Fixed a combobox bug in install pages
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9890 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
9a9324f41f
commit
5a16701a05
4 changed files with 26 additions and 23 deletions
|
|
@ -18,11 +18,13 @@
|
|||
<div class="select open" style="width:540px;">
|
||||
<span class="ctrl"><span class="arrow"></span></span>
|
||||
<div class="myValue"></div>
|
||||
<ul class="iList">
|
||||
<!--@foreach($time_zone as $key => $val)-->
|
||||
<li><input name="time_zone" id="{$key}" class="option" type="radio" value="{$key}" <!--@if($key==date('O'))-->checked="checked"<!--@end--> /><label for="{$key}">{$val}</label></li>
|
||||
<!--@end-->
|
||||
</ul>
|
||||
<div class="iList">
|
||||
<ul>
|
||||
<!--@foreach($time_zone as $key => $val)-->
|
||||
<li><input name="time_zone" id="{$key}" class="option" type="radio" value="{$key}" <!--@if($key==date('O'))-->checked="checked"<!--@end--> /><label for="{$key}">{$val}</label></li>
|
||||
<!--@end-->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<p>{$lang->about_time_zone}</p>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -75,11 +75,12 @@ html{height:100%;background:url(../img/bgHtml.gif) repeat-x 0 0}
|
|||
.select div.myValue{height:19px;text-indent:8px}
|
||||
.select .ctrl{position:absolute;top:0;right:0;width:18px;height:19px;border:1px solid #999;border-left:1px solid #999;background:#444}
|
||||
.select .arrow{position:absolute;width:0;height:0;top:9px;right:6px;line-height:0;font-size:0;border-top:3px solid #999;border-left:3px solid #444;border-right:3px solid #444}
|
||||
.select ul{position:absolute;top:20px;left:0;width:100%;list-style:none;border:0;border-top:1px solid #bababa;border-bottom:1px solid #bababa;background:#fff;overflow:auto;height:200px;}
|
||||
.select ul.aList{display:none}
|
||||
.select.open ul.aList{display:block}
|
||||
.select ul.iList{left:-2000%}
|
||||
.select.open ul.iList{left:0}
|
||||
.select div.aList,
|
||||
.select div.iList{display:none;position:absolute;top:20px;left:0;width:100%;border:0;border-top:1px solid #bababa;border-bottom:1px solid #bababa;background:#fff;overflow:auto;height:200px;}
|
||||
.select.open div.aList{display:block}
|
||||
.select ul{list-style:none}
|
||||
.select div.iList{display:none}
|
||||
.select.open div.iList{display:block}
|
||||
.select li{position:relative;overflow:hidden;white-space:nowrap;height:18px;margin:0 !important;border-left:1px solid #bababa;border-right:1px solid #bababa}
|
||||
.select li input.option{position:absolute;width:100%;height:20px;line-height:20px}
|
||||
.select li label{position:absolute;left:0;top:0;width:100%;text-indent:8px;*text-indent:6px;height:18px;line-height:18px;color:#eee;background:#555;font-weight:normal !important}
|
||||
|
|
|
|||
|
|
@ -21,9 +21,11 @@
|
|||
<div class="select open" style="width:160px;">
|
||||
<span class="ctrl"><span class="arrow"></span></span>
|
||||
<button type="button" class="myValue selected">{$lang_supported[Context::getLangType()]}</button>
|
||||
<ul class="aList" style="bottom:20px;top:auto">
|
||||
<li loop="$lang_supported=>$key,$val"><a href="{getUrl('l', $key)}">{$val}</a></li>
|
||||
</ul>
|
||||
<div class="aList" style="bottom:20px;top:auto">
|
||||
<ul>
|
||||
<li loop="$lang_supported=>$key,$val"><a href="{getUrl('l', $key)}">{$val}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fRight">
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ jQuery(function($){
|
|||
// Common
|
||||
var select_root = $('div.select');
|
||||
var select_value = $('.myValue');
|
||||
var select_a = $('div.select>ul>li>a');
|
||||
var select_input = $('div.select>ul>li>input[type=radio]');
|
||||
var select_label = $('div.select>ul>li>label');
|
||||
var select_a = $('div.select ul>li>a');
|
||||
var select_input = $('div.select ul>li>input[type=radio]');
|
||||
var select_label = $('div.select ul>li>label');
|
||||
|
||||
// Radio Default Value
|
||||
$('div.myValue').each(function(){
|
||||
|
|
@ -72,20 +72,19 @@ jQuery(function($){
|
|||
// Set Input
|
||||
function set_label(){
|
||||
var v = $(this).next('label').text();
|
||||
$(this).parents('ul:first').prev('.myValue').text('').append(v);
|
||||
$(this).parents('ul:first').prev('.myValue').addClass('selected');
|
||||
$(this).closest('.select').find('>.myValue').text(v).addClass('selected');
|
||||
}
|
||||
|
||||
// Set Anchor
|
||||
function set_anchor(){
|
||||
var v = $(this).text();
|
||||
$(this).parents('ul:first').prev('.myValue').text('').append(v);
|
||||
$(this).parents('ul:first').prev('.myValue').addClass('selected');
|
||||
$(this).closest('.select').find('>.myValue').text(v).addClass('selected');
|
||||
}
|
||||
|
||||
// Anchor Focus Out
|
||||
$('*:not("div.select a")').focus(function(){
|
||||
$('.aList').parent('.select').removeClass('open');
|
||||
$(window).mousedown(function(evt){
|
||||
if($(evt.target).closest('.select').length) return;
|
||||
$('.aList,.iList').parent('.select').removeClass('open');
|
||||
});
|
||||
|
||||
select_value.click(show_option);
|
||||
|
|
@ -93,5 +92,4 @@ jQuery(function($){
|
|||
select_a.click(set_anchor).click(hide_option).focus(i_hover).hover(i_hover);
|
||||
select_input.change(set_label).focus(set_label);
|
||||
select_label.hover(i_hover).click(hide_option);
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue