Skip to content

Commit

Permalink
Update jQuery + jQuery UI
Browse files Browse the repository at this point in the history
  • Loading branch information
jamieholst committed Aug 12, 2014
1 parent 6321741 commit 6f067f6
Show file tree
Hide file tree
Showing 7 changed files with 165 additions and 30 deletions.
17 changes: 9 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Select to Autocomplete</title>
<script src="jquery.js"></script>
<script src="jquery-ui-autocomplete.js"></script>
<script src="jquery-1.11.1.min.js"></script>
<script src="jquery-ui.min.js"></script>
<script src="jquery.select-to-autocomplete.js"></script>
<script type="text/javascript" charset="utf-8">
<script>
(function($){
$(function(){
$('select').selectToAutocomplete();
Expand All @@ -17,7 +17,8 @@
});
})(jQuery);
</script>
<style type="text/css" media="screen">
<link rel="stylesheet" href="jquery-ui.css">
<style>
body {
font-family: Arial, Verdana, sans-serif;
font-size: 13px;
Expand All @@ -29,19 +30,19 @@
width: 218px;
border: 1px solid #B0BECA;
max-height: 350px;
overflow-y: scroll;
overflow-x: hidden;
}
.ui-autocomplete .ui-menu-item a {
.ui-autocomplete .ui-menu-item {
border-top: 1px solid #B0BECA;
display: block;
padding: 4px 6px;
color: #353D44;
cursor: pointer;
}
.ui-autocomplete .ui-menu-item:first-child a {
.ui-autocomplete .ui-menu-item:first-child {
border-top: none;
}
.ui-autocomplete .ui-menu-item a.ui-state-hover {
.ui-autocomplete .ui-menu-item.ui-state-focus {
background-color: #D5E5F4;
color: #161A1C;
}
Expand Down
4 changes: 4 additions & 0 deletions jquery-1.11.1.min.js

Large diffs are not rendered by default.

17 changes: 0 additions & 17 deletions jquery-ui-autocomplete.js

This file was deleted.

142 changes: 142 additions & 0 deletions jquery-ui.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
/*! jQuery UI - v1.11.0 - 2014-08-12
* http://jqueryui.com
* Includes: core.css, autocomplete.css, menu.css
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */

/* Layout helpers
----------------------------------*/
.ui-helper-hidden {
display: none;
}
.ui-helper-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.ui-helper-reset {
margin: 0;
padding: 0;
border: 0;
outline: 0;
line-height: 1.3;
text-decoration: none;
font-size: 100%;
list-style: none;
}
.ui-helper-clearfix:before,
.ui-helper-clearfix:after {
content: "";
display: table;
border-collapse: collapse;
}
.ui-helper-clearfix:after {
clear: both;
}
.ui-helper-clearfix {
min-height: 0; /* support: IE7 */
}
.ui-helper-zfix {
width: 100%;
height: 100%;
top: 0;
left: 0;
position: absolute;
opacity: 0;
filter:Alpha(Opacity=0);
}

.ui-front {
z-index: 100;
}


/* Interaction Cues
----------------------------------*/
.ui-state-disabled {
cursor: default !important;
}


/* Icons
----------------------------------*/

/* states and images */
.ui-icon {
display: block;
text-indent: -99999px;
overflow: hidden;
background-repeat: no-repeat;
}


/* Misc visuals
----------------------------------*/

/* Overlays */
.ui-widget-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.ui-autocomplete {
position: absolute;
top: 0;
left: 0;
cursor: default;
}
.ui-menu {
list-style: none;
padding: 0;
margin: 0;
display: block;
outline: none;
}
.ui-menu .ui-menu {
position: absolute;
}
.ui-menu .ui-menu-item {
position: relative;
margin: 0;
padding: 3px 1em 3px .4em;
cursor: pointer;
min-height: 0; /* support: IE7 */
/* support: IE10, see #8844 */
list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
}
.ui-menu .ui-menu-divider {
margin: 5px 0;
height: 0;
font-size: 0;
line-height: 0;
border-width: 1px 0 0 0;
}

/* icon support */
.ui-menu-icons {
position: relative;
}
.ui-menu-icons .ui-menu-item {
padding-left: 2em;
}

/* left-aligned */
.ui-menu .ui-icon {
position: absolute;
top: 0;
bottom: 0;
left: .2em;
margin: auto 0;
}

/* right-aligned */
.ui-menu .ui-menu-icon {
left: auto;
right: 0;
}
7 changes: 7 additions & 0 deletions jquery-ui.min.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions jquery.js

This file was deleted.

6 changes: 3 additions & 3 deletions jquery.select-to-autocomplete.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Version: 1.0.6
Version: 1.0.7
Documentation: http://baymard.com/labs/country-selector#documentation
Expand Down Expand Up @@ -41,7 +41,7 @@ THE SOFTWARE.
handle_invalid_input: function( context ) {
var selected_finder = 'option:selected:first';
if ( context.settings['remove-valueless-options'] ) {
selected_finder = 'option:selected[value!=]:first';
selected_finder = 'option:selected[value!=""]:first';
}
context.$text_field.val( context.$select_field.find( selected_finder ).text() );
},
Expand Down Expand Up @@ -76,7 +76,7 @@ THE SOFTWARE.
}
var selected_finder = 'option:selected:first';
if ( context.settings['remove-valueless-options'] ) {
selected_finder = 'option:selected[value!=]:first';
selected_finder = 'option:selected[value!=""]:first';
}
return $text_field.val( context.$select_field.find( selected_finder ).text() )
.insertAfter( context.$select_field );
Expand Down

0 comments on commit 6f067f6

Please sign in to comment.