Skip to content

Commit c72ea83

Browse files
author
xaver
committed
theme with combobox, eventhandler blur is not perfect and theme is ui default
1 parent 9de3b26 commit c72ea83

File tree

6 files changed

+623
-0
lines changed

6 files changed

+623
-0
lines changed

interface/web/themes/default_combobox/css/additional.css

Lines changed: 373 additions & 0 deletions
Large diffs are not rendered by default.
590 Bytes
Loading
590 Bytes
Loading
661 Bytes
Loading
656 Bytes
Loading
Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4+
<head>
5+
<title><tmpl_var name="app_title"> <tmpl_var name="app_version"></title>
6+
<meta http-equiv="Content-Type" content="text/html; charset=<tmpl_var name="html_content_encoding">"/>
7+
<meta http-equiv="X-UA-Compatible" content="IE=8"/>
8+
<link href="themes/default/css/central.css" rel="stylesheet" type="text/css"/>
9+
<link href="themes/default/css/screen/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css"/>
10+
<!--[if lte IE 7]>
11+
<link href="themes/default/css/patches/central.css" rel="stylesheet" type="text/css" />
12+
<![endif]-->
13+
<!--[if lte ie 6]>
14+
<style type="text/css" media="screen">
15+
/*
16+
Move these to your IE specific stylesheet if possible
17+
*/
18+
.uniForm,
19+
.uniForm fieldset,
20+
.uniForm .ctrlHolder,
21+
.uniForm .formHint,
22+
.uniForm .buttonHolder,
23+
.uniForm .ctrlHolder .multiField,
24+
.uniForm .inlineLabel{ zoom:1; }
25+
26+
.uniForm .inlineLabels label, .uniForm .inlineLabels .label,
27+
.uniForm .blockLabels label, .uniForm .blockLabels .label,
28+
.uniForm .inlineLabel span{ padding-bottom: .2em; }
29+
30+
.uniForm .inlineLabel input,
31+
.uniForm .inlineLabels .inlineLabel input,
32+
.uniForm .blockLabels .inlineLabel input{ margin-top: -.3em; }
33+
</style>
34+
<![endif]-->
35+
<!--[if gt ie 6]>
36+
<style type="text/css" media="screen">
37+
/*
38+
Move these to your IE specific stylesheet if possible
39+
*/
40+
.uniForm,
41+
.uniForm fieldset,
42+
.uniForm .ctrlHolder,
43+
.uniForm .formHint,
44+
.uniForm .buttonHolder,
45+
.uniForm .ctrlHolder .multiField,
46+
.uniForm .inlineLabel{ zoom:1; }
47+
48+
.uniForm .inlineLabels label, .uniForm .inlineLabels .label,
49+
.uniForm .blockLabels label, .uniForm .blockLabels .label,
50+
.uniForm .inlineLabel span{ padding-bottom: .2em; }
51+
52+
.uniForm .inlineLabel input,
53+
.uniForm .inlineLabels .inlineLabel input,
54+
.uniForm .blockLabels .inlineLabel input{ margin-top: -.3em; }
55+
</style>
56+
<![endif]-->
57+
<link rel="shortcut icon" href="/themes/default/images/favicon.ico" />
58+
<script type="text/javascript" src="js/jquery-1.6.3.min.js"></script>
59+
<script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
60+
<script type="text/javascript" src="js/scrigo.js.php"></script>
61+
<script type="text/javascript" src="js/uni-form/uni-form.jquery.js"></script>
62+
<script language="JavaScript" type="text/javascript">
63+
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
64+
if(!is_chrome && getInternetExplorerVersion() > 8.0) {
65+
var style = document.createElement('style');
66+
style.innerHTML = '#page_margins { min-width: 980px; max-width: 80%; background: #fff; display: table;}';
67+
document.getElementsByTagName("head")[0].appendChild(style);
68+
}
69+
70+
jQuery(document).ready(function() {
71+
loadInitContent();
72+
});
73+
74+
//Use jQuery submit with kespress Enter in panel filterbar
75+
jQuery(document).bind("keypress", function(event) {
76+
if (event.which == '13' && $(".panel #Filter").length > 0) {
77+
$(".panel #Filter").attr("onsubmit",$(".panel #Filter").attr("onclick")).submit();
78+
}
79+
});
80+
81+
// jQuery(document).ready( function(){
82+
//
83+
// });
84+
85+
(function( $ ) {
86+
$.widget( "ui.combobox", {
87+
_create: function() {
88+
var self = this,
89+
select = this.element.hide(),
90+
selected = select.children( ":selected" ),
91+
value = selected.val() ? selected.text() : "";
92+
var input = this.input = $( "<input>" )
93+
.insertAfter( select )
94+
.val( value )
95+
.autocomplete({
96+
delay: 0,
97+
minLength: 0,
98+
source: function( request, response ) {
99+
var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
100+
response( select.children( "option" ).map(function() {
101+
var text = $( this ).text();
102+
if ( this.value && ( !request.term || matcher.test(text) ) )
103+
return {
104+
label: text.replace(
105+
new RegExp(
106+
"(?![^&;]+;)(?!<[^<>]*)(" +
107+
$.ui.autocomplete.escapeRegex(request.term) +
108+
")(?![^<>]*>)(?![^&;]+;)", "gi"
109+
), "<strong>$1</strong>" ),
110+
value: text,
111+
option: this
112+
};
113+
}) );
114+
},
115+
select: function( event, ui ) {
116+
ui.item.option.selected = true;
117+
self._trigger( "selected", event, {
118+
item: ui.item.option
119+
});
120+
},
121+
change: function( event, ui ) {
122+
if ( !ui.item ) {
123+
var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ),
124+
valid = false;
125+
select.children( "option" ).each(function() {
126+
if ( $( this ).text().match( matcher ) ) {
127+
this.selected = valid = true;
128+
return false;
129+
}
130+
});
131+
if ( !valid ) {
132+
// remove invalid value, as it didn't match anything
133+
$( this ).val( "" );
134+
select.val( "" );
135+
input.data( "autocomplete" ).term = "";
136+
return false;
137+
}
138+
}
139+
}
140+
})
141+
.addClass( "ui-widget ui-widget-content ui-corner-left" );
142+
143+
input.data( "autocomplete" )._renderItem = function( ul, item ) {
144+
return $( "<li></li>" )
145+
.data( "item.autocomplete", item )
146+
.append( "<a>" + item.label + "</a>" )
147+
.appendTo( ul );
148+
};
149+
150+
this.button = $( "<button type='button'>&nbsp;</button>" )
151+
.attr( "tabIndex", -1 )
152+
.attr( "title", "Show All Items" )
153+
.insertAfter( input )
154+
.button({
155+
icons: {
156+
primary: "ui-icon-triangle-1-s"
157+
},
158+
text: false
159+
})
160+
.removeClass( "ui-corner-all" )
161+
.addClass( "ui-corner-right ui-button-icon" )
162+
.click(function() {
163+
// close if already visible
164+
if ( input.autocomplete( "widget" ).is( ":visible" ) ) {
165+
input.autocomplete( "close" );
166+
return;
167+
}
168+
169+
// work around a bug (likely same cause as #5265)
170+
$( this ).blur();
171+
172+
// pass empty string as value to search for, displaying all results
173+
input.autocomplete( "search", "" );
174+
input.focus();
175+
});
176+
},
177+
178+
destroy: function() {
179+
this.input.remove();
180+
this.button.remove();
181+
this.element.show();
182+
$.Widget.prototype.destroy.call( this );
183+
}
184+
});
185+
})( jQuery );
186+
187+
jQuery("#pageContent").live("blur" function(){
188+
if(jQuery(".panel select").css("display") != "none"){
189+
jQuery(".panel select").combobox();
190+
}
191+
});
192+
</script>
193+
</head>
194+
<body>
195+
<div id="page_margins">
196+
<div id="page">
197+
<div id="header">
198+
<div id="topsubnav">
199+
<!-- start: skip link navigation -->
200+
<a class="skip" href="#navigation" title="skip link">Skip to the navigation</a><span class="hideme">.</span>
201+
<a class="skip" href="#content" title="skip link">Skip to the content</a><span class="hideme">.</span>
202+
<!-- end: skip link navigation -->
203+
<tmpl_if name="cpuser">
204+
<span><a href="#logout" onclick="loadContent('login/logout.php');">LOGOUT <tmpl_var format="strtoupper" name="cpuser"></a><!-- | <a href="#" onclick="capp('help')">Help</a> | <a href="#">Imprint</a>--></span>
205+
</tmpl_if>
206+
</div>
207+
<h1 id="ir-HeaderLogo" class="swap"><span>ISPConfig 3</span></h1>
208+
<span>hosting control panel</span>
209+
</div>
210+
<!-- begin: main navigation #nav -->
211+
<div id="nav">
212+
<a id="navigation" name="navigation"></a>
213+
<!-- skiplink anchor: navigation -->
214+
<div id="nav_main">
215+
<div id="topNav">&nbsp;</div>
216+
</div>
217+
</div>
218+
<!-- end: main navigation -->
219+
<!-- begin: main content area #main -->
220+
<div id="main">
221+
<!-- begin: #col1 - first float column -->
222+
<div id="col1">
223+
<div id="col1_content" class="clearfix">
224+
<div id="sideNav">&nbsp;</div>
225+
</div>
226+
</div>
227+
<!-- end: #col1 -->
228+
<!-- begin: #col3 static column -->
229+
<div id="col3">
230+
<div id="col3_content" class="clearfix">
231+
<a id="content" name="content"></a>
232+
<!-- skiplink anchor: Content -->
233+
<form method="post" action="" id="pageForm" name="pageForm" enctype="multipart/form-data" class="uniForm">
234+
<div id="pageContent"><!-- AJAX CONTENT --></div>
235+
</form>
236+
</div>
237+
<div id="ie_clearing">&nbsp;</div>
238+
<!-- End: IE Column Clearing -->
239+
</div>
240+
<!-- end: #col3 -->
241+
</div>
242+
<!-- end: #main -->
243+
<!-- begin: #footer -->
244+
<div id="footer">
245+
Powered by <a href="<tmpl_var name="app_link">" target="_blank"><tmpl_var name="app_title"></a>
246+
</div><!-- end: #footer -->
247+
</div>
248+
</div>
249+
</body>
250+
</html>

0 commit comments

Comments
 (0)