Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
"name": "demoCat",
"version": "0.0.0",
"dependencies": {
"angular": "1.3.15",
"angular-route": "1.3.15",
"angular-cookies": "1.3.15",
"angular-animate": "1.3.15",
"angular": "1.5.8",
"angular-route": "1.5.8",
"angular-cookies": "1.5.8",
"angular-animate": "1.5.8",
"font-awesome": "4.3.0",
"bootstrap": "3.3.4",
"jquery": "2.1.3",
"ckeditor": "4.4.7",
"ng-ckeditor": "latest",
"ng-json-explorer": "*",
"angular-bootstrap": "0.12.1",
"angular-bootstrap": "2.5.0",
"angular-highlightjs": "0.4.1",
"angular-sanitize": "1.3.15",
"angular-sanitize": "1.5.8",
"highlightjs": "8.4.0",
"ml-utils": "withjam/ml-utils",
"ml-search-ng": "0.0.10",
"ml-search-ng": "0.2.8",
"lodash": "3.6.0",
"angular-http-auth": "1.2.2",
"ng-file-upload": "3.2.4",
Expand All @@ -26,11 +26,11 @@
"angular-youtube-mb": "~1.0.2"
},
"devDependencies": {
"angular-mocks": "1.3.15",
"angular-scenario": "1.3.15"
"angular-mocks": "1.5.8",
"angular-scenario": "1.5.8"
},
"resolutions": {
"angular": "1.3.15",
"angular": "1.5.8",
"lodash": "3.6.0"
}
}
2 changes: 1 addition & 1 deletion ui/app/auth/auth-srv.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
password: password
}, {
ignoreAuthModule: true
}).success(function(data) {
}).then(function(data) {
return setUser(data);
});
}
Expand Down
12 changes: 6 additions & 6 deletions ui/app/home/home-ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
};
}
])
.controller('HomeCtrl', ['HomeModel', '$scope', '$modal', '$sce', 'user', 'users', 'demos', 'MLRest', 'demoService', '$filter',
function(model, $scope, $modal, $sce, user, users, demos, mlRest, demoService, $filter) {
.controller('HomeCtrl', ['HomeModel', '$scope', '$uibModal', '$sce', 'user', 'users', 'demos', 'MLRest', 'demoService', '$filter',
function(model, $scope, $uibModal, $sce, user, users, demos, mlRest, demoService, $filter) {
var clientTimezone = new Date().getTimezoneOffset() / -60;
model.user = user;
angular.extend($scope, {
Expand Down Expand Up @@ -247,9 +247,9 @@
}

function showModal(template, title, model, validate) {
return $modal.open({
return $uibModal.open({
templateUrl: template + '',
controller: function($scope, $modalInstance, title, model, validate, user) {
controller: function($scope, $uibModalInstance, title, model, validate, user) {
$scope.title = title;
$scope.model = model;
$scope.user = user;
Expand All @@ -259,11 +259,11 @@
$scope.alerts = validate($scope.model);
}
if (!$scope.modal.$invalid && $scope.alerts.length === 0) {
$modalInstance.close($scope.model);
$uibModalInstance.close($scope.model);
}
};
$scope.cancel = function() {
$modalInstance.dismiss('cancel');
$uibModalInstance.dismiss('cancel');
};
$scope.encodeURIComponent = encodeURIComponent;
$scope.trustUrl = $sce.trustAsResourceUrl;
Expand Down
4 changes: 1 addition & 3 deletions ui/app/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@
<script src="bower_components/angular-sanitize/angular-sanitize.min.js"></script>

<script src="bower_components/ml-common-ng/dist/ml-common-ng.min.js"></script>
<!-- fixed bug in annotateActiveFacets: -->
<!--script src="bower_components/ml-search-ng/dist/ml-search-ng.js"></script-->
<script src="search/ml-search-ng.js"></script>
<script src="bower_components/ml-search-ng/dist/ml-search-ng.js"></script>
<script src="bower_components/ml-search-ng/dist/ml-search-ng-tpls.min.js"></script>
<script src="bower_components/ml-utils/ml-utils.min.js"></script>
<script src="bower_components/ng-ckeditor/ng-ckeditor.js"></script>
Expand Down
12 changes: 6 additions & 6 deletions ui/app/scripts/services/modal.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
'use strict';

angular.module('demoCat')
.service('ModalService', ['$modal', '$sce', 'AuthenticationService', ModalService]);
.service('ModalService', ['$uibModal', '$sce', 'AuthenticationService', ModalService]);

function ModalService($modal, $sce, AuthenticationService) {
function ModalService($uibModal, $sce, AuthenticationService) {

var service = {
show: showModal
Expand All @@ -13,10 +13,10 @@
return service;

function showModal(template, title, model, validate, modalOptions) {
return $modal.open(
return $uibModal.open(
angular.extend({
templateUrl: template+'',
controller: function ($scope, $modalInstance, title, model, validate, user) {
controller: function ($scope, $uibModalInstance, title, model, validate, user) {
$scope.title = title;
$scope.model = model;
$scope.user = user;
Expand All @@ -26,11 +26,11 @@
$scope.alerts = validate($scope.model);
}
if ($scope.alerts.length === 0) {
$modalInstance.close($scope.model);
$uibModalInstance.close($scope.model);
}
};
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
$uibModalInstance.dismiss('cancel');
};
$scope.encodeURIComponent = encodeURIComponent;
$scope.trustUrl = $sce.trustAsResourceUrl;
Expand Down
22 changes: 17 additions & 5 deletions ui/app/search/facets-dir.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
<div class="facet-list" ng-init="initLimit = 5; maxLimit = 9999; limits = {}">
<div class="facet" ng-if="facet.facetValues.length" ng-repeat="(index, facet) in facets | object2Array">
<div class="facet-list" ng-init="initLimit = 5; maxLimit = 9999; limits = {}; mlSearch=$parent.model.mlSearch" >
<div class="facet" ng-if="facet.facetValues.length || mlSearch.activeFacets[facet.__key] != null" ng-repeat="(index, facet) in facets | object2Array">
<h3>{{ facet.__key }}</h3>
<div ng-if="facet.facetValues.length > initLimit" class="pull-right">
<button class="btn btn-default btn-xs" ng-show="limits[facet.__key] !== maxLimit" ng-click="limits[facet.__key] = maxLimit">more</button>
<button class="btn btn-default btn-xs" ng-show="limits[facet.__key] && limits[facet.__key] !== initLimit" ng-click="limits[facet.__key] = initLimit">less</button>
</div>
<div ng-repeat="value in facet.facetValues | filter:{selected: true}">
<div class="btn btn-danger btn-xs facet-selected">
<div class="btn btn-success btn-xs facet-selected" style="background-color:#5cb85c!important">
<span class="fa fa-plus"></span>
<span title="{{ value.name }}" ng-click="toggle({facet: facet.__key, value: value.name})">{{ value.name | truncate:20 }}</span>
<span class="glyphicon glyphicon-trash icon-white" ng-click="toggle({facet: facet.__key, value: value.name})"></span>
</div>
</div>
<div ng-repeat="item in mlSearch.activeFacets[facet.__key].values | filter:{negated : true}">
<div class="btn btn-danger btn-xs facet-selected">
<span class="fa fa-minus"></span>
<span title="{{ item.value }}" ng-click="negate({facet: facet.__key, value: item.value})">{{ item.value | truncate:20 }}</span>
<span class="glyphicon glyphicon-trash icon-white" ng-click="negate({facet: facet.__key, value: item.value})"></span>
</div>
</div>
<div ng-repeat="value in facet.facetValues | filter:{selected: '!'+true} | limitTo:limits[facet.__key] || initLimit">
<a ng-click="toggle({facet: facet.__key, value: value.name})" title="{{ value.name }}">
<span ng-click="toggle({facet: facet.__key, value: value.name})" class="fa fa-plus"></span>
<span> / </span>
<span ng-click="negate({facet: facet.__key, value: value.name})" class="fa fa-minus"></span>
<span> - </span>
<span title="{{ value.name }}">
{{ value.name | truncate:20 }} ({{ value.count }})
</a>
</span>
</div>
</div>
</div>
Loading