44024: scss import fixes

This commit is contained in:
Lotte Hofstede
2017-09-20 16:06:10 +02:00
parent b52c3fd8eb
commit b0bfff15a6
36 changed files with 62 additions and 63 deletions

View File

@@ -1,4 +1,7 @@
@import '../styles/shared_imports';
@import '../styles/variables.scss';
@import '../../node_modules/bootstrap/scss/bootstrap.scss';
@import "../../node_modules/font-awesome/scss/font-awesome.scss";
html {
position: relative;
min-height: 100%;

View File

@@ -1 +1 @@
@import '../../styles/shared_imports';
@import '../../styles/variables.scss';

View File

@@ -64,22 +64,7 @@ export class CollectionPageComponent implements OnInit, OnDestroy {
this.subs.filter((sub) => hasValue(sub)).forEach((sub) => sub.unsubscribe());
}
onPageChange(currentPage: number): void {
this.config.currentPage = currentPage;
this.updateResults();
}
onPageSizeChange(elementsPerPage: number): void {
this.config.pageSize = elementsPerPage;
this.updateResults();
}
onSortDirectionChange(sortDirection: SortDirection): void {
this.sortConfig = new SortOptions(this.sortConfig.field, sortDirection);
this.updateResults();
}
onSortFieldChange(field: string): void {
onPaginationChange(field: string): void {
this.sortConfig = new SortOptions(field, this.sortConfig.direction);
this.updateResults();
}

View File

@@ -1 +1 @@
@import '../../styles/shared_imports';
@import '../../styles/variables.scss';

View File

@@ -1 +1 @@
@import '../../../styles/shared_imports';
@import '../../../styles/variables.scss';

View File

@@ -1,4 +1,4 @@
@import '../../../styles/shared_imports';
@import '../../../styles/variables.scss';
$footer-bg: $gray-100;
$footer-border: 1px solid darken($footer-bg, 10%);
$footer-padding: $spacer * 1.5;

View File

@@ -1,4 +1,4 @@
@import '../../styles/shared_imports';
@import '../../styles/variables.scss';
header nav.navbar {
border-radius: 0;

View File

@@ -1,4 +1,4 @@
@import '../../../styles/shared_imports';
@import '../../../styles/variables.scss';
:host {
display: block;
margin-right: ($grid-gutter-width / -2);

View File

@@ -1 +1 @@
@import '../../styles/shared_imports';
@import '../../styles/variables.scss';

View File

@@ -1,4 +1,4 @@
@import '../../../../styles/shared_imports';
@import '../../../../styles/variables.scss';
:host {
.simple-view-element {

View File

@@ -1 +1 @@
@import '../../../../styles/shared_imports';
@import '../../../../styles/variables.scss';

View File

@@ -1 +1 @@
@import '../../../../styles/shared_imports';
@import '../../../../styles/variables.scss';

View File

@@ -1,4 +1,5 @@
@import '../../../../../styles/shared_imports';
@import '../../../../../styles/variables';
@import '../../../../../styles/mixins';
@media screen and (min-width: map-get($grid-breakpoints, md)) {
dt {
text-align: right;

View File

@@ -1,4 +1,4 @@
@import '../../../styles/shared_imports';
@import '../../../styles/variables.scss';
:host {
div.simple-view-link {
text-align: center;

View File

@@ -1 +1 @@
@import '../../../styles/shared_imports';
@import '../../../styles/variables.scss';

View File

@@ -1 +1 @@
@import '../../../styles/shared_imports';
@import '../../../styles/variables.scss';

View File

@@ -1 +1 @@
@import '../../../styles/shared_imports';
@import '../../../styles/variables.scss';

View File

@@ -1 +1 @@
@import '../../../styles/shared_imports';
@import '../../../styles/variables.scss';

View File

@@ -1,4 +1,4 @@
@import '../../../styles/shared_imports';
@import '../../../styles/variables.scss';
:host {
display: block;

View File

@@ -1 +1 @@
@import '../../styles/shared_imports';
@import '../../styles/variables.scss';

View File

@@ -1 +1 @@
@import '../../../../styles/shared_imports.scss';
@import '../../../../styles/variables.scss';

View File

@@ -1 +1 @@
@import '../../../../styles/shared_imports.scss';
@import '../../../../styles/variables.scss';

View File

@@ -1 +1 @@
@import '../../../../styles/shared_imports.scss';
@import '../../../../styles/variables.scss';

View File

@@ -1,4 +1,4 @@
@import '../../../styles/shared_imports.scss';
@import '../../../styles/variables.scss';
:host {
/deep/ em {
font-weight: bold;

View File

@@ -1,2 +1,2 @@
@import '../../../styles/shared_imports.scss';
@import '../../../styles/variables.scss';

View File

@@ -1 +1 @@
@import '../../styles/shared_imports';
@import '../../styles/variables.scss';

View File

@@ -1 +1 @@
@import '../../styles/shared_imports.scss';
@import '../../styles/variables.scss';

View File

@@ -11,6 +11,20 @@ import { Metadatum } from '../core/shared/metadatum.model';
import { Item } from '../core/shared/item.model';
import { ItemSearchResult } from '../object-list/search-result-list-element/item-search-result/item-search-result.model';
function shuffle(array: any[]) {
let i = 0;
let j = 0;
let temp = null;
for (i = array.length - 1; i > 0; i -= 1) {
j = Math.floor(Math.random() * (i + 1));
temp = array[i];
array[i] = array[j];
array[j] = temp;
}
return array;
}
@Injectable()
export class SearchService {
@@ -53,19 +67,12 @@ export class SearchService {
returningPageInfo.currentPage = 1;
}
returningPageInfo.totalPages = this.totalPages;
returningPageInfo.totalElements = 10 * this.totalPages;
returningPageInfo.totalElements = returningPageInfo.elementsPerPage * returningPageInfo.totalPages;
const pageInfo = Observable.of(returningPageInfo);
const itemsRD = this.itemDataService.findAll({
scopeID: '8e0928a0-047a-4369-8883-12669f32dd64',
currentPage: returningPageInfo.currentPage,
elementsPerPage: returningPageInfo.elementsPerPage
});
const itemsRD = this.itemDataService.findAll({ elementsPerPage: 10 });
const payload = itemsRD.payload.map((items: Item[]) => {
return items.sort(() => {
const values = [-1, 0, 1];
return values[Math.floor(Math.random() * values.length)];
})
return shuffle(items)
.map((item: Item, index: number) => {
const mockResult: SearchResult<DSpaceObject> = new ItemSearchResult();
mockResult.dspaceObject = item;

View File

@@ -1 +1 @@
@import '../../../styles/shared_imports';
@import '../../../styles/variables.scss';

View File

@@ -1 +1 @@
@import '../../../styles/shared_imports';
@import '../../../styles/variables.scss';

View File

@@ -1 +1 @@
@import '../../../styles/shared_imports';
@import '../../../styles/variables.scss';

View File

@@ -1,4 +1,4 @@
@import '../../../styles/shared_imports.scss';
@import '../../../styles/variables.scss';
// temporary fix for bootstrap 4 beta btn color issue
.btn-secondary {

View File

@@ -1 +1 @@
@import '../../styles/shared_imports';
@import '../../styles/variables.scss';

View File

@@ -1 +1,4 @@
@import '../../node_modules/bootstrap/scss/functions.scss';
@import '../../node_modules/bootstrap/scss/mixins.scss';
/* Custom mixins go here */

View File

@@ -1,5 +0,0 @@
@import 'bootstrap_variables.scss';
@import '../../node_modules/bootstrap/scss/bootstrap.scss';
@import "../../node_modules/font-awesome/scss/font-awesome.scss";
@import 'mixins.scss';
@import 'custom_variables.scss';

View File

@@ -0,0 +1,5 @@
@import 'bootstrap_variables.scss';
@import '../../node_modules/font-awesome/scss/variables.scss';
@import '../../node_modules/bootstrap/scss/functions.scss';
@import '../../node_modules/bootstrap/scss/variables.scss';
@import 'custom_variables.scss';