mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-11 20:13:07 +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 {
|
html {
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 100%;
|
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());
|
this.subs.filter((sub) => hasValue(sub)).forEach((sub) => sub.unsubscribe());
|
||||||
}
|
}
|
||||||
|
|
||||||
onPageChange(currentPage: number): void {
|
onPaginationChange(field: string): 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 {
|
|
||||||
this.sortConfig = new SortOptions(field, this.sortConfig.direction);
|
this.sortConfig = new SortOptions(field, this.sortConfig.direction);
|
||||||
this.updateResults();
|
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-bg: $gray-100;
|
||||||
$footer-border: 1px solid darken($footer-bg, 10%);
|
$footer-border: 1px solid darken($footer-bg, 10%);
|
||||||
$footer-padding: $spacer * 1.5;
|
$footer-padding: $spacer * 1.5;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
@import '../../styles/shared_imports';
|
@import '../../styles/variables.scss';
|
||||||
|
|
||||||
header nav.navbar {
|
header nav.navbar {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
@import '../../../styles/shared_imports';
|
@import '../../../styles/variables.scss';
|
||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
margin-right: ($grid-gutter-width / -2);
|
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 {
|
:host {
|
||||||
.simple-view-element {
|
.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)) {
|
@media screen and (min-width: map-get($grid-breakpoints, md)) {
|
||||||
dt {
|
dt {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
@import '../../../styles/shared_imports';
|
@import '../../../styles/variables.scss';
|
||||||
:host {
|
:host {
|
||||||
div.simple-view-link {
|
div.simple-view-link {
|
||||||
text-align: center;
|
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 {
|
:host {
|
||||||
display: block;
|
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 {
|
:host {
|
||||||
/deep/ em {
|
/deep/ em {
|
||||||
font-weight: bold;
|
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 { Item } from '../core/shared/item.model';
|
||||||
import { ItemSearchResult } from '../object-list/search-result-list-element/item-search-result/item-search-result.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()
|
@Injectable()
|
||||||
export class SearchService {
|
export class SearchService {
|
||||||
|
|
||||||
@@ -53,19 +67,12 @@ export class SearchService {
|
|||||||
returningPageInfo.currentPage = 1;
|
returningPageInfo.currentPage = 1;
|
||||||
}
|
}
|
||||||
returningPageInfo.totalPages = this.totalPages;
|
returningPageInfo.totalPages = this.totalPages;
|
||||||
returningPageInfo.totalElements = 10 * this.totalPages;
|
returningPageInfo.totalElements = returningPageInfo.elementsPerPage * returningPageInfo.totalPages;
|
||||||
const pageInfo = Observable.of(returningPageInfo);
|
const pageInfo = Observable.of(returningPageInfo);
|
||||||
|
|
||||||
const itemsRD = this.itemDataService.findAll({
|
const itemsRD = this.itemDataService.findAll({ elementsPerPage: 10 });
|
||||||
scopeID: '8e0928a0-047a-4369-8883-12669f32dd64',
|
|
||||||
currentPage: returningPageInfo.currentPage,
|
|
||||||
elementsPerPage: returningPageInfo.elementsPerPage
|
|
||||||
});
|
|
||||||
const payload = itemsRD.payload.map((items: Item[]) => {
|
const payload = itemsRD.payload.map((items: Item[]) => {
|
||||||
return items.sort(() => {
|
return shuffle(items)
|
||||||
const values = [-1, 0, 1];
|
|
||||||
return values[Math.floor(Math.random() * values.length)];
|
|
||||||
})
|
|
||||||
.map((item: Item, index: number) => {
|
.map((item: Item, index: number) => {
|
||||||
const mockResult: SearchResult<DSpaceObject> = new ItemSearchResult();
|
const mockResult: SearchResult<DSpaceObject> = new ItemSearchResult();
|
||||||
mockResult.dspaceObject = item;
|
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
|
// temporary fix for bootstrap 4 beta btn color issue
|
||||||
.btn-secondary {
|
.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 */
|
/* 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