1
0
mirror of synced 2024-11-22 21:16:10 +03:00

JavaScript indention.

This commit is contained in:
Florian Kissling 2015-06-07 17:05:17 +02:00
parent 44c64cf6da
commit 14e1c4d5f9
3 changed files with 178 additions and 167 deletions

View File

@ -379,9 +379,10 @@ initSelection : function (element, callback) {
</p>
<pre class="prettyprint linenums">
$.fn.select2.amd.require(
['select2/data/array', 'select2/utils'],
function (ArrayData, Utils) {
$.fn.select2.amd.require([
'select2/data/array',
'select2/utils'
], function (ArrayData, Utils) {
function CustomData ($element, options) {
CustomData.__super__.constructor.call(this, $element, options);
}
@ -505,9 +506,10 @@ query: function (query) {
</p>
<pre class="prettyprint linenums">
$.fn.select2.amd.require(
['select2/data/array', 'select2/utils'],
function (ArrayData, Utils) {
$.fn.select2.amd.require([
'select2/data/array',
'select2/utils'
], function (ArrayData, Utils) {
function CustomData ($element, options) {
CustomData.__super__.constructor.call(this, $element, options);
}

View File

@ -72,9 +72,11 @@ $("[data-fill-from]").each(function () {
prettyPrint();
$.fn.select2.amd.require(
["select2/core", "select2/utils", "select2/compat/matcher"],
function (Select2, Utils, oldMatcher) {
$.fn.select2.amd.require([
"select2/core",
"select2/utils",
"select2/compat/matcher"
], function (Select2, Utils, oldMatcher) {
var $basicSingle = $(".js-example-basic-single");
var $basicMultiple = $(".js-example-basic-multiple");
var $limitMultiple = $(".js-example-basic-multiple-limit");
@ -82,7 +84,13 @@ $.fn.select2.amd.require(
var $dataArray = $(".js-example-data-array");
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");

View File

@ -32,5 +32,6 @@ slug: options
</div>
</div>
<script type="text/javascript">prettyPrint();
<script type="text/javascript">
prettyPrint();
</script>