JavaScript indention.
This commit is contained in:
parent
44c64cf6da
commit
14e1c4d5f9
@ -379,9 +379,10 @@ initSelection : function (element, callback) {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
$.fn.select2.amd.require(
|
$.fn.select2.amd.require([
|
||||||
['select2/data/array', 'select2/utils'],
|
'select2/data/array',
|
||||||
function (ArrayData, Utils) {
|
'select2/utils'
|
||||||
|
], function (ArrayData, Utils) {
|
||||||
function CustomData ($element, options) {
|
function CustomData ($element, options) {
|
||||||
CustomData.__super__.constructor.call(this, $element, options);
|
CustomData.__super__.constructor.call(this, $element, options);
|
||||||
}
|
}
|
||||||
@ -505,9 +506,10 @@ query: function (query) {
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<pre class="prettyprint linenums">
|
<pre class="prettyprint linenums">
|
||||||
$.fn.select2.amd.require(
|
$.fn.select2.amd.require([
|
||||||
['select2/data/array', 'select2/utils'],
|
'select2/data/array',
|
||||||
function (ArrayData, Utils) {
|
'select2/utils'
|
||||||
|
], function (ArrayData, Utils) {
|
||||||
function CustomData ($element, options) {
|
function CustomData ($element, options) {
|
||||||
CustomData.__super__.constructor.call(this, $element, options);
|
CustomData.__super__.constructor.call(this, $element, options);
|
||||||
}
|
}
|
||||||
@ -746,5 +748,5 @@ $("select").prop("disabled", true); // instead of $("select").enable(false);
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
prettyPrint();
|
prettyPrint();
|
||||||
</script>
|
</script>
|
||||||
|
@ -52,13 +52,13 @@ slug: examples
|
|||||||
{% include js-source-states.html %}
|
{% include js-source-states.html %}
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var $states = $(".js-source-states");
|
var $states = $(".js-source-states");
|
||||||
var statesOptions = $states.html();
|
var statesOptions = $states.html();
|
||||||
$states.remove();
|
$states.remove();
|
||||||
|
|
||||||
$(".js-states").append(statesOptions);
|
$(".js-states").append(statesOptions);
|
||||||
|
|
||||||
$("[data-fill-from]").each(function () {
|
$("[data-fill-from]").each(function () {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
|
|
||||||
var codeContainer = $this.data("fill-from");
|
var codeContainer = $this.data("fill-from");
|
||||||
@ -68,13 +68,15 @@ $("[data-fill-from]").each(function () {
|
|||||||
|
|
||||||
$this.text(code);
|
$this.text(code);
|
||||||
$this.addClass("prettyprint linenums");
|
$this.addClass("prettyprint linenums");
|
||||||
});
|
});
|
||||||
|
|
||||||
prettyPrint();
|
prettyPrint();
|
||||||
|
|
||||||
$.fn.select2.amd.require(
|
$.fn.select2.amd.require([
|
||||||
["select2/core", "select2/utils", "select2/compat/matcher"],
|
"select2/core",
|
||||||
function (Select2, Utils, oldMatcher) {
|
"select2/utils",
|
||||||
|
"select2/compat/matcher"
|
||||||
|
], function (Select2, Utils, oldMatcher) {
|
||||||
var $basicSingle = $(".js-example-basic-single");
|
var $basicSingle = $(".js-example-basic-single");
|
||||||
var $basicMultiple = $(".js-example-basic-multiple");
|
var $basicMultiple = $(".js-example-basic-multiple");
|
||||||
var $limitMultiple = $(".js-example-basic-multiple-limit");
|
var $limitMultiple = $(".js-example-basic-multiple-limit");
|
||||||
@ -82,7 +84,13 @@ $.fn.select2.amd.require(
|
|||||||
var $dataArray = $(".js-example-data-array");
|
var $dataArray = $(".js-example-data-array");
|
||||||
var $dataArraySelected = $(".js-example-data-array-selected");
|
var $dataArraySelected = $(".js-example-data-array-selected");
|
||||||
|
|
||||||
var data = [{ id: 0, text: 'enhancement' }, { id: 1, text: 'bug' }, { id: 2, text: 'duplicate' }, { id: 3, text: 'invalid' }, { id: 4, text: 'wontfix' }];
|
var data = [
|
||||||
|
{ id: 0, text: 'enhancement' },
|
||||||
|
{ id: 1, text: 'bug' },
|
||||||
|
{ id: 2, text: 'duplicate' },
|
||||||
|
{ id: 3, text: 'invalid' },
|
||||||
|
{ id: 4, text: 'wontfix' }
|
||||||
|
];
|
||||||
|
|
||||||
var $ajax = $(".js-example-data-ajax");
|
var $ajax = $(".js-example-data-ajax");
|
||||||
|
|
||||||
@ -242,5 +250,5 @@ $.fn.select2.amd.require(
|
|||||||
});
|
});
|
||||||
|
|
||||||
$(".js-example-rtl").select2();
|
$(".js-example-rtl").select2();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -32,5 +32,6 @@ slug: options
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">prettyPrint();
|
<script type="text/javascript">
|
||||||
|
prettyPrint();
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user