mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-11 12:03:03 +00:00
44024: scss import fixes
This commit is contained in:
@@ -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%;
|
||||
|
@@ -1 +1 @@
|
||||
@import '../../styles/shared_imports';
|
||||
@import '../../styles/variables.scss';
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -1 +1 @@
|
||||
@import '../../styles/shared_imports';
|
||||
@import '../../styles/variables.scss';
|
||||
|
@@ -1 +1 @@
|
||||
@import '../../../styles/shared_imports';
|
||||
@import '../../../styles/variables.scss';
|
||||
|
@@ -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;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
@import '../../styles/shared_imports';
|
||||
@import '../../styles/variables.scss';
|
||||
|
||||
header nav.navbar {
|
||||
border-radius: 0;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
@import '../../../styles/shared_imports';
|
||||
@import '../../../styles/variables.scss';
|
||||
:host {
|
||||
display: block;
|
||||
margin-right: ($grid-gutter-width / -2);
|
||||
|
@@ -1 +1 @@
|
||||
@import '../../styles/shared_imports';
|
||||
@import '../../styles/variables.scss';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
@import '../../../../styles/shared_imports';
|
||||
@import '../../../../styles/variables.scss';
|
||||
|
||||
:host {
|
||||
.simple-view-element {
|
||||
|
@@ -1 +1 @@
|
||||
@import '../../../../styles/shared_imports';
|
||||
@import '../../../../styles/variables.scss';
|
||||
|
@@ -1 +1 @@
|
||||
@import '../../../../styles/shared_imports';
|
||||
@import '../../../../styles/variables.scss';
|
||||
|
@@ -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;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
@import '../../../styles/shared_imports';
|
||||
@import '../../../styles/variables.scss';
|
||||
:host {
|
||||
div.simple-view-link {
|
||||
text-align: center;
|
||||
|
@@ -1 +1 @@
|
||||
@import '../../../styles/shared_imports';
|
||||
@import '../../../styles/variables.scss';
|
||||
|
@@ -1 +1 @@
|
||||
@import '../../../styles/shared_imports';
|
||||
@import '../../../styles/variables.scss';
|
@@ -1 +1 @@
|
||||
@import '../../../styles/shared_imports';
|
||||
@import '../../../styles/variables.scss';
|
@@ -1 +1 @@
|
||||
@import '../../../styles/shared_imports';
|
||||
@import '../../../styles/variables.scss';
|
@@ -1,4 +1,4 @@
|
||||
@import '../../../styles/shared_imports';
|
||||
@import '../../../styles/variables.scss';
|
||||
|
||||
:host {
|
||||
display: block;
|
||||
|
@@ -1 +1 @@
|
||||
@import '../../styles/shared_imports';
|
||||
@import '../../styles/variables.scss';
|
@@ -1 +1 @@
|
||||
@import '../../../../styles/shared_imports.scss';
|
||||
@import '../../../../styles/variables.scss';
|
@@ -1 +1 @@
|
||||
@import '../../../../styles/shared_imports.scss';
|
||||
@import '../../../../styles/variables.scss';
|
@@ -1 +1 @@
|
||||
@import '../../../../styles/shared_imports.scss';
|
||||
@import '../../../../styles/variables.scss';
|
@@ -1,4 +1,4 @@
|
||||
@import '../../../styles/shared_imports.scss';
|
||||
@import '../../../styles/variables.scss';
|
||||
:host {
|
||||
/deep/ em {
|
||||
font-weight: bold;
|
||||
|
@@ -1,2 +1,2 @@
|
||||
@import '../../../styles/shared_imports.scss';
|
||||
@import '../../../styles/variables.scss';
|
||||
|
||||
|
@@ -1 +1 @@
|
||||
@import '../../styles/shared_imports';
|
||||
@import '../../styles/variables.scss';
|
||||
|
@@ -1 +1 @@
|
||||
@import '../../styles/shared_imports.scss';
|
||||
@import '../../styles/variables.scss';
|
||||
|
@@ -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;
|
||||
|
@@ -1 +1 @@
|
||||
@import '../../../styles/shared_imports';
|
||||
@import '../../../styles/variables.scss';
|
@@ -1 +1 @@
|
||||
@import '../../../styles/shared_imports';
|
||||
@import '../../../styles/variables.scss';
|
@@ -1 +1 @@
|
||||
@import '../../../styles/shared_imports';
|
||||
@import '../../../styles/variables.scss';
|
@@ -1,4 +1,4 @@
|
||||
@import '../../../styles/shared_imports.scss';
|
||||
@import '../../../styles/variables.scss';
|
||||
|
||||
// temporary fix for bootstrap 4 beta btn color issue
|
||||
.btn-secondary {
|
||||
|
@@ -1 +1 @@
|
||||
@import '../../styles/shared_imports';
|
||||
@import '../../styles/variables.scss';
|
||||
|
@@ -1 +1,4 @@
|
||||
@import '../../node_modules/bootstrap/scss/functions.scss';
|
||||
@import '../../node_modules/bootstrap/scss/mixins.scss';
|
||||
|
||||
/* Custom mixins go here */
|
@@ -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';
|
5
src/styles/_variables.scss
Normal file
5
src/styles/_variables.scss
Normal 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';
|
Reference in New Issue
Block a user