|
6 | 6 | <meta http-equiv="Content-Type" content="text/html; charset=<tmpl_var name="html_content_encoding">"/> |
7 | 7 | <meta http-equiv="X-UA-Compatible" content="IE=8"/> |
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 | 9 | <!--[if lte IE 7]> |
11 | 10 | <link href="themes/default/css/patches/central.css" rel="stylesheet" type="text/css" /> |
12 | 11 | <![endif]--> |
|
56 | 55 | <![endif]--> |
57 | 56 | <link rel="shortcut icon" href="/themes/default/images/favicon.ico" /> |
58 | 57 | <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 | 58 | <script type="text/javascript" src="js/scrigo.js.php"></script> |
61 | 59 | <script type="text/javascript" src="js/uni-form/uni-form.jquery.js"></script> |
62 | 60 | <script language="JavaScript" type="text/javascript"> |
|
77 | 75 | $(".panel #Filter").attr("onsubmit",$(".panel #Filter").attr("onclick")).submit(); |
78 | 76 | } |
79 | 77 | }); |
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'> </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 | 78 | </script> |
193 | 79 | </head> |
194 | 80 | <body> |
|
0 commit comments