Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit ce226fa

Browse files
bekospkozlowski-opensource
authored andcommitted
demo(all): remove jQuery dependency
* Replace select2 in custom build with checkbox buttons.
1 parent 8620aed commit ce226fa

6 files changed

Lines changed: 16 additions & 3063 deletions

File tree

misc/demo/assets/app.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11

2-
angular.module('bootstrapDemoApp', ['ui.directives', 'ui.bootstrap', 'plunker']);
2+
angular.module('bootstrapDemoApp', ['ui.bootstrap', 'plunker']);
33

4-
function MainCtrl($scope, $http, orderByFilter) {
4+
function MainCtrl($scope, $http, $document, orderByFilter) {
55
var url = "http://50.116.42.77:3001";
66
$scope.selectedModules = [];
77
//iFrame for downloading
8-
var $iframe = $("<iframe>").css('display','none').appendTo(document.body);
8+
var $iframe = angular.element('<iframe>').css('display','none');
9+
$document.find('body').append($iframe);
910

1011
$scope.showBuildModal = function() {
1112
$scope.buildModalShown = true;
@@ -28,4 +29,12 @@ function MainCtrl($scope, $http, orderByFilter) {
2829
$iframe.attr('src', downloadUrl);
2930
$scope.buildModalShown = false;
3031
};
32+
33+
$scope.selectedChanged = function(module, selected) {
34+
if (selected) {
35+
$scope.selectedModules.push(module);
36+
} else {
37+
$scope.selectedModules.splice($scope.selectedModules.indexOf(module), 1);
38+
}
39+
};
3140
}

0 commit comments

Comments
 (0)