catch up with master
This commit is contained in:
parent
8c60fec36f
commit
f11f900485
@ -1,5 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/html">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{ page.title }}</title>
|
||||
@ -142,7 +142,7 @@
|
||||
</section>
|
||||
<hr/>
|
||||
<footer>
|
||||
<p>Select2 is licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software Foundation License Version 2.0</a>. Coded by Igor Vaynberg.</p>
|
||||
<p>Select2 is licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache Software Foundation License Version 2.0</a> and <a href=="http://www.gnu.org/licenses/gpl-2.0.html">GPL Version 2.0</a>. Coded by Igor Vaynberg.</p>
|
||||
</footer>
|
||||
|
||||
</div> <!-- /container -->
|
||||
|
@ -37,7 +37,8 @@ function format(state) {
|
||||
}
|
||||
$("#e4").select2({
|
||||
formatResult: format,
|
||||
formatSelection: format
|
||||
formatSelection: format,
|
||||
escapeMarkup: function(m) { return m; }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -106,7 +107,8 @@ $("#e6").select2({
|
||||
},
|
||||
formatResult: movieFormatResult, // omitted for brevity, see the source of this page
|
||||
formatSelection: movieFormatSelection, // omitted for brevity, see the source of this page
|
||||
dropdownCssClass: "bigdrop" // apply css that makes the dropdown taller
|
||||
dropdownCssClass: "bigdrop", // apply css that makes the dropdown taller
|
||||
escapeMarkup: function (m) { return m; } // we do not want to escape markup since we are displaying html in results
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -137,7 +139,8 @@ $("#e7").select2({
|
||||
},
|
||||
formatResult: movieFormatResult, // omitted for brevity, see the source of this page
|
||||
formatSelection: movieFormatSelection, // omitted for brevity, see the source of this page
|
||||
dropdownCssClass: "bigdrop" // apply css that makes the dropdown taller
|
||||
dropdownCssClass: "bigdrop", // apply css that makes the dropdown taller
|
||||
escapeMarkup: function (m) { return m; } // we do not want to escape markup since we are displaying html in results
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -997,7 +1000,7 @@ $(document).ready(function () {
|
||||
<p class="alert alert-info">Only applies to single-value select boxes</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>maximumSelectionSize</td><td>int</td><td>
|
||||
<tr><td>maximumSelectionSize</td><td>int/function</td><td>
|
||||
<p>
|
||||
The maximum number of items that can be selected in a multi-select control. If this number is less than 1 selection is not limited.
|
||||
</p>
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 8332d6a7e9bf61be710acad6b7bea32e540db105
|
||||
Subproject commit e78dc69a6b8dcadf8c8919b039d7ad0b4e7a6970
|
37
select2-test.html
Normal file
37
select2-test.html
Normal file
@ -0,0 +1,37 @@
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<script src="js/jquery-1.8.1.js"></script>
|
||||
<script src="select2-master/select2.js"></script>
|
||||
<link href="select2-master/select2.css" rel="stylesheet"/>
|
||||
<style>img.flag { height: 10px; width: 15px; padding-right: 10px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div style="padding: 10px; margin: 10px;">
|
||||
<select id="e4" style="width:300px" class="populate">
|
||||
<option value="AK">Alaska</option>
|
||||
<option value="HI">Hawaii</option>
|
||||
<option value="CA">California</option>
|
||||
<option value="NV">Nevada</option>
|
||||
<option value="OR">Oregon</option>
|
||||
<option value="WA">Washington</option>
|
||||
</select><br/>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
function format(state) {
|
||||
if (!state.id) return state.text; // optgroup
|
||||
return "<img class='flag' src='images/flags/" + state.id.toLowerCase() + ".png'/>" + state.text;
|
||||
}
|
||||
$("#e4").select2({
|
||||
formatResult: format,
|
||||
formatSelection: format
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
x
Reference in New Issue
Block a user