Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Commit 1855588

Browse files
committed
Some code format
1 parent 7d1a572 commit 1855588

File tree

4 files changed

+66
-66
lines changed

4 files changed

+66
-66
lines changed

dist/angular-datatables.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,21 +1098,21 @@ function dtAjaxRenderer($q, $timeout, DTRenderer, DTRendererService, DT_DEFAULT_
10981098
}
10991099

11001100
function _doRender(options, $elem) {
1101-
var defer = $q.defer();
1102-
// Set it to true in order to be able to redraw the dataTable
1103-
options.bDestroy = true;
1104-
DTRendererService.hideLoading($elem);
1105-
// Condition to refresh the dataTable
1106-
if (_shouldDeferRender(options)) {
1107-
$timeout(function() {
1108-
defer.resolve(DTRendererService.renderDataTable($elem, options));
1109-
}, 0, false);
1110-
} else {
1101+
var defer = $q.defer();
1102+
// Set it to true in order to be able to redraw the dataTable
1103+
options.bDestroy = true;
1104+
DTRendererService.hideLoading($elem);
1105+
// Condition to refresh the dataTable
1106+
if (_shouldDeferRender(options)) {
1107+
$timeout(function() {
11111108
defer.resolve(DTRendererService.renderDataTable($elem, options));
1112-
}
1113-
return defer.promise;
1109+
}, 0, false);
1110+
} else {
1111+
defer.resolve(DTRendererService.renderDataTable($elem, options));
11141112
}
1115-
// See https://github.com/l-lin/angular-datatables/issues/147
1113+
return defer.promise;
1114+
}
1115+
// See https://github.com/l-lin/angular-datatables/issues/147
11161116
function _shouldDeferRender(options) {
11171117
if (angular.isDefined(options) && angular.isDefined(options.dom)) {
11181118
// S for scroller plugin

dist/plugins/bootstrap/angular-datatables.bootstrap.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ dtBootstrapColVis.$inject = ['DTPropertyUtil', 'DTBootstrapDefaultOptions'];
4747

4848
// See http://getbootstrap.com
4949
angular.module('datatables.bootstrap', [
50-
'datatables.bootstrap.options',
51-
'datatables.bootstrap.tabletools',
52-
'datatables.bootstrap.colvis'
53-
])
50+
'datatables.bootstrap.options',
51+
'datatables.bootstrap.tabletools',
52+
'datatables.bootstrap.colvis'
53+
])
5454
.config(dtBootstrapConfig)
5555
.run(initBootstrapPlugin)
5656
.service('DTBootstrap', dtBootstrap);
@@ -283,14 +283,14 @@ function dtBootstrap(DTBootstrapTableTools, DTBootstrapColVis, DTBootstrapDefaul
283283
if (btnDisplay) {
284284
$paginationBtn.appendTo($paginationContainer);
285285
node = $('<a>', {
286-
'href': '#',
287-
'class': btnClass,
288-
'aria-controls': settings.sTableId,
289-
'data-dt-idx': counter,
290-
'tabindex': settings.iTabIndex,
291-
'id': idx === 0 && typeof button === 'string' ?
292-
settings.sTableId + '_' + button : null
293-
})
286+
'href': '#',
287+
'class': btnClass,
288+
'aria-controls': settings.sTableId,
289+
'data-dt-idx': counter,
290+
'tabindex': settings.iTabIndex,
291+
'id': idx === 0 && typeof button === 'string' ?
292+
settings.sTableId + '_' + button : null
293+
})
294294
.html(btnDisplay)
295295
.appendTo($paginationBtn);
296296

@@ -354,15 +354,15 @@ function dtBootstrap(DTBootstrapTableTools, DTBootstrapColVis, DTBootstrapDefaul
354354
}
355355

356356
function _setDom(options) {
357-
if (!options.dom || options.dom === DT_DEFAULT_OPTIONS.dom) {
358-
return DTBootstrapDefaultOptions.getOptions().dom;
359-
}
360-
return options.dom;
357+
if (!options.dom || options.dom === DT_DEFAULT_OPTIONS.dom) {
358+
return DTBootstrapDefaultOptions.getOptions().dom;
361359
}
362-
/**
363-
* Integrate Bootstrap
364-
* @param options the datatables options
365-
*/
360+
return options.dom;
361+
}
362+
/**
363+
* Integrate Bootstrap
364+
* @param options the datatables options
365+
*/
366366
function integrate(options) {
367367
_init(options.bootstrap);
368368
DTBootstrapTableTools.integrate(options.bootstrap);

src/angular-datatables.renderer.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -429,21 +429,21 @@ function dtAjaxRenderer($q, $timeout, DTRenderer, DTRendererService, DT_DEFAULT_
429429
}
430430

431431
function _doRender(options, $elem) {
432-
var defer = $q.defer();
433-
// Set it to true in order to be able to redraw the dataTable
434-
options.bDestroy = true;
435-
DTRendererService.hideLoading($elem);
436-
// Condition to refresh the dataTable
437-
if (_shouldDeferRender(options)) {
438-
$timeout(function() {
439-
defer.resolve(DTRendererService.renderDataTable($elem, options));
440-
}, 0, false);
441-
} else {
432+
var defer = $q.defer();
433+
// Set it to true in order to be able to redraw the dataTable
434+
options.bDestroy = true;
435+
DTRendererService.hideLoading($elem);
436+
// Condition to refresh the dataTable
437+
if (_shouldDeferRender(options)) {
438+
$timeout(function() {
442439
defer.resolve(DTRendererService.renderDataTable($elem, options));
443-
}
444-
return defer.promise;
440+
}, 0, false);
441+
} else {
442+
defer.resolve(DTRendererService.renderDataTable($elem, options));
445443
}
446-
// See https://github.com/l-lin/angular-datatables/issues/147
444+
return defer.promise;
445+
}
446+
// See https://github.com/l-lin/angular-datatables/issues/147
447447
function _shouldDeferRender(options) {
448448
if (angular.isDefined(options) && angular.isDefined(options.dom)) {
449449
// S for scroller plugin

src/plugins/bootstrap/angular-datatables.bootstrap.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
// See http://getbootstrap.com
55
angular.module('datatables.bootstrap', [
6-
'datatables.bootstrap.options',
7-
'datatables.bootstrap.tabletools',
8-
'datatables.bootstrap.colvis'
9-
])
6+
'datatables.bootstrap.options',
7+
'datatables.bootstrap.tabletools',
8+
'datatables.bootstrap.colvis'
9+
])
1010
.config(dtBootstrapConfig)
1111
.run(initBootstrapPlugin)
1212
.service('DTBootstrap', dtBootstrap);
@@ -236,14 +236,14 @@ function dtBootstrap(DTBootstrapTableTools, DTBootstrapColVis, DTBootstrapDefaul
236236
if (btnDisplay) {
237237
$paginationBtn.appendTo($paginationContainer);
238238
node = $('<a>', {
239-
'href': '#',
240-
'class': btnClass,
241-
'aria-controls': settings.sTableId,
242-
'data-dt-idx': counter,
243-
'tabindex': settings.iTabIndex,
244-
'id': idx === 0 && typeof button === 'string' ?
245-
settings.sTableId + '_' + button : null
246-
})
239+
'href': '#',
240+
'class': btnClass,
241+
'aria-controls': settings.sTableId,
242+
'data-dt-idx': counter,
243+
'tabindex': settings.iTabIndex,
244+
'id': idx === 0 && typeof button === 'string' ?
245+
settings.sTableId + '_' + button : null
246+
})
247247
.html(btnDisplay)
248248
.appendTo($paginationBtn);
249249

@@ -307,15 +307,15 @@ function dtBootstrap(DTBootstrapTableTools, DTBootstrapColVis, DTBootstrapDefaul
307307
}
308308

309309
function _setDom(options) {
310-
if (!options.dom || options.dom === DT_DEFAULT_OPTIONS.dom) {
311-
return DTBootstrapDefaultOptions.getOptions().dom;
312-
}
313-
return options.dom;
310+
if (!options.dom || options.dom === DT_DEFAULT_OPTIONS.dom) {
311+
return DTBootstrapDefaultOptions.getOptions().dom;
314312
}
315-
/**
316-
* Integrate Bootstrap
317-
* @param options the datatables options
318-
*/
313+
return options.dom;
314+
}
315+
/**
316+
* Integrate Bootstrap
317+
* @param options the datatables options
318+
*/
319319
function integrate(options) {
320320
_init(options.bootstrap);
321321
DTBootstrapTableTools.integrate(options.bootstrap);

0 commit comments

Comments
 (0)