[Library|Trunk]
Admin tool pages: updates after migration css updates after theme change portal: add piwik id Navbar: optionto enable/disable sticky animation git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59726 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
ed15ef8169
commit
5ccca64ee0
|
@ -35,7 +35,7 @@
|
||||||
<div class="show-options uk-float-right">
|
<div class="show-options uk-float-right">
|
||||||
<button class="uk-button" type="button">Bulk Actions</button>
|
<button class="uk-button" type="button">Bulk Actions</button>
|
||||||
<div uk-dropdown="mode: click">
|
<div uk-dropdown="mode: click">
|
||||||
<ul class="uk-nav uk-navbar-dropdown-nav"
|
<ul class="uk-nav uk-margin-left"
|
||||||
[attr.uk-tooltip]="getSelectedDivIds().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
[attr.uk-tooltip]="getSelectedDivIds().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
||||||
title="Select at least one class">
|
title="Select at least one class">
|
||||||
<li><a [class]="getSelectedDivIds().length == 0 ? 'uk-disabled' : ''"
|
<li><a [class]="getSelectedDivIds().length == 0 ? 'uk-disabled' : ''"
|
||||||
|
@ -80,9 +80,9 @@
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
<div class="actions" href="#">
|
<div class="actions" href="#">
|
||||||
<i class="md-icon material-icons" (click)="editDivId(i)"></i>
|
<i class="clickable" uk-icon= "pencil" (click)="editDivId(i)"></i>
|
||||||
<i class="material-icons md-icon"
|
<i class="clickable uk-text-danger" uk-icon= "trash"
|
||||||
(click)="confirmDeleteDivId(check.divId._id)">delete</i>
|
(click)="confirmDeleteDivId(check.divId._id)"></i>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -93,8 +93,8 @@
|
||||||
<div class="uk-alert-warning uk-alert" >No classes found</div>
|
<div class="uk-alert-warning uk-alert" >No classes found</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-1-1 uk-flex uk-flex-center ">
|
<div class="uk-width-1-1 uk-flex uk-flex-center ">
|
||||||
<div class="uk-width-small uk-flex uk-flex-center uk-button" (click)="newDivId()">
|
<div class="uk-width-small uk-button uk-button-default" (click)="newDivId()">
|
||||||
<i class="material-icons md-48">add</i>
|
<i class="" uk-icon= "plus"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -101,7 +101,7 @@ export class DivIdsComponent implements OnInit {
|
||||||
this.updateErrorMessage = "";
|
this.updateErrorMessage = "";
|
||||||
this.errorMessage = "";
|
this.errorMessage = "";
|
||||||
|
|
||||||
this._helpContentService.getDivIdsFull(null, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.getAllDivIdsFull( this.properties.adminToolsAPIURL).subscribe(
|
||||||
divIds => {
|
divIds => {
|
||||||
this.divIds = divIds;
|
this.divIds = divIds;
|
||||||
this.checkboxes = [];
|
this.checkboxes = [];
|
||||||
|
@ -326,7 +326,7 @@ export class DivIdsComponent implements OnInit {
|
||||||
getPages() {
|
getPages() {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.errorMessage = "";
|
this.errorMessage = "";
|
||||||
this._helpContentService.getPages(this.properties.adminToolsAPIURL, this.selectedCommunityPid).subscribe(
|
this._helpContentService.getAllPages(this.properties.adminToolsAPIURL).subscribe(
|
||||||
pages => {
|
pages => {
|
||||||
this.allPages = pages;
|
this.allPages = pages;
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
|
|
|
@ -116,7 +116,7 @@ export class DivContentFormComponent implements OnInit{
|
||||||
//this.showLoading = true;
|
//this.showLoading = true;
|
||||||
this.errorMessage = '';
|
this.errorMessage = '';
|
||||||
|
|
||||||
this._helpContentService.getDivIdsFull(pageId, this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
this._helpContentService.getDivIdsFullByPortal(pageId, this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
||||||
divs => {
|
divs => {
|
||||||
this.availableDivs = divs;
|
this.availableDivs = divs;
|
||||||
this.pageId = pageId;
|
this.pageId = pageId;
|
||||||
|
|
|
@ -16,17 +16,12 @@
|
||||||
<div id="page_content_inner">
|
<div id="page_content_inner">
|
||||||
|
|
||||||
<div class="menubar ">
|
<div class="menubar ">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="!errorMessage && !showLoading" class="page-controls">
|
<div *ngIf="!errorMessage && !showLoading" class="page-controls">
|
||||||
<div class=" filters ">
|
<div class=" filters ">
|
||||||
<div class="show-options uk-float-right">
|
<div class="show-options uk-float-right">
|
||||||
<button class="uk-button uk-button-primary" type="button">Bulk Actions</button>
|
<button class="uk-button uk-button-primary" type="button">Bulk Actions</button>
|
||||||
<div uk-dropdown="mode: click">
|
<div uk-dropdown="mode: click">
|
||||||
<ul class="uk-nav uk-navbar-dropdown-nav uk-margin-left"
|
<ul class="uk-nav uk-margin-left"
|
||||||
[attr.uk-tooltip]="getSelectedDivHelpContents().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
[attr.uk-tooltip]="getSelectedDivHelpContents().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
||||||
title="Select at least one help text">
|
title="Select at least one help text">
|
||||||
<li><a [class]="getSelectedDivHelpContents().length == 0 ? 'uk-disabled' : ''"
|
<li><a [class]="getSelectedDivHelpContents().length == 0 ? 'uk-disabled' : ''"
|
||||||
|
@ -125,18 +120,18 @@
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
<div class="actions" href="#">
|
<div class="actions" href="#">
|
||||||
<i class="md-icon material-icons"
|
<i class="clickable" uk-icon="pencil"
|
||||||
(click)="editDivHelpContent(check.divHelpContent._id)"></i>
|
(click)="editDivHelpContent(check.divHelpContent._id)"></i>
|
||||||
<i class="material-icons md-icon"
|
<i class="clickable uk-text-danger" uk-icon="trash"
|
||||||
(click)="confirmDeleteDivHelpContent(check.divHelpContent._id)">delete</i>
|
(click)="confirmDeleteDivHelpContent(check.divHelpContent._id)"></i>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="uk-width-1-1 uk-flex uk-flex-center ">
|
<div class="uk-width-1-1 uk-flex uk-flex-center ">
|
||||||
<div class="uk-width-small uk-flex uk-flex-center uk-button" (click)="newClassContent()">
|
<div class="uk-width-small uk-flex uk-flex-center uk-button uk-button-default" (click)="newClassContent()">
|
||||||
<i class="material-icons md-48">add</i>
|
<i class="" uk-icon="plus"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="checkboxes.length==0" class="col-md-12">
|
<div *ngIf="checkboxes.length==0" class="col-md-12">
|
||||||
|
|
|
@ -120,7 +120,7 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
this.updateErrorMessage = "";
|
this.updateErrorMessage = "";
|
||||||
this.errorMessage = "";
|
this.errorMessage = "";
|
||||||
|
|
||||||
this._helpService.getPage(pageId, this.properties.adminToolsAPIURL).subscribe(
|
this._helpService.getPageByPortal(pageId, this.properties.adminToolsAPIURL, this.selectedCommunityPid).subscribe(
|
||||||
page => {
|
page => {
|
||||||
if (this.properties.adminToolsPortalType != page.portalType) {
|
if (this.properties.adminToolsPortalType != page.portalType) {
|
||||||
this.router.navigate(['/classContents'], {queryParams: {"communityId": this.selectedCommunityPid}});
|
this.router.navigate(['/classContents'], {queryParams: {"communityId": this.selectedCommunityPid}});
|
||||||
|
@ -269,7 +269,7 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.updateErrorMessage = "";
|
this.updateErrorMessage = "";
|
||||||
|
|
||||||
this._helpService.deleteDivHelpContents(this.selectedDivContents, this.properties.adminToolsAPIURL).subscribe(
|
this._helpService.deleteDivHelpContents(this.selectedDivContents, this.properties.adminToolsAPIURL, this.selectedCommunityPid).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this.deleteDivHelpContentsFromArray(this.selectedDivContents);
|
this.deleteDivHelpContentsFromArray(this.selectedDivContents);
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
|
@ -320,7 +320,7 @@ export class DivHelpContentsComponent implements OnInit {
|
||||||
} else {
|
} else {
|
||||||
this.updateErrorMessage = "";
|
this.updateErrorMessage = "";
|
||||||
|
|
||||||
this._helpService.toggleDivHelpContents(ids, status, this.properties.adminToolsAPIURL).subscribe(
|
this._helpService.toggleDivHelpContents(ids, status, this.properties.adminToolsAPIURL,this.selectedCommunityPid).subscribe(
|
||||||
() => {
|
() => {
|
||||||
for (let id of ids) {
|
for (let id of ids) {
|
||||||
let i = this.checkboxes.findIndex(_ => _.divHelpContent._id == id);
|
let i = this.checkboxes.findIndex(_ => _.divHelpContent._id == id);
|
||||||
|
|
|
@ -78,7 +78,7 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
|
||||||
}
|
}
|
||||||
|
|
||||||
private getPage(pageId: string) {
|
private getPage(pageId: string) {
|
||||||
this._helpContentService.getPage(pageId,this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.getPageByPortal(pageId,this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
||||||
page => {
|
page => {
|
||||||
if(this.properties.adminToolsPortalType != page.portalType) {
|
if(this.properties.adminToolsPortalType != page.portalType) {
|
||||||
this.router.navigate(['/classContents'], { queryParams: { "communityId": this.communityPid} });
|
this.router.navigate(['/classContents'], { queryParams: { "communityId": this.communityPid} });
|
||||||
|
@ -99,7 +99,7 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
|
||||||
this.errorMessage = "";
|
this.errorMessage = "";
|
||||||
this.updateErrorMessage = "";
|
this.updateErrorMessage = "";
|
||||||
|
|
||||||
this._helpContentService.getDivHelpContent(divContentId, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.getDivHelpContent(divContentId, this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
||||||
divHelpContent => {
|
divHelpContent => {
|
||||||
if(this.pageId) {
|
if(this.pageId) {
|
||||||
this.getPage(this.pageId);
|
this.getPage(this.pageId);
|
||||||
|
@ -117,7 +117,7 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
|
||||||
} else {
|
} else {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
|
||||||
this._helpContentService.getDivIdFull(divId, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.getDivIdFull(divId, this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
||||||
div => {
|
div => {
|
||||||
this.formComponent.selectedDiv = div;
|
this.formComponent.selectedDiv = div;
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ export class EditDivHelpContentComponent implements OnInit, OnDestroy{
|
||||||
|
|
||||||
let divHelpContent : DivHelpContent = this.formComponent.myForm.value;
|
let divHelpContent : DivHelpContent = this.formComponent.myForm.value;
|
||||||
|
|
||||||
this._helpContentService.insertOrUpdateDivHelpContent(divHelpContent, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.insertOrUpdateDivHelpContent(divHelpContent, this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
if(this.pageId) {
|
if(this.pageId) {
|
||||||
this.router.navigate( ['/classContents/'], { queryParams: { "communityId": this.communityPid, "pageId": this.pageId } } );
|
this.router.navigate( ['/classContents/'], { queryParams: { "communityId": this.communityPid, "pageId": this.pageId } } );
|
||||||
|
|
|
@ -60,7 +60,7 @@ export class NewDivHelpContentComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
private getPage(pageId: string) {
|
private getPage(pageId: string) {
|
||||||
this._helpContentService.getPage(pageId,this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.getPageByPortal(pageId,this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
||||||
page => {
|
page => {
|
||||||
if(this.properties.adminToolsPortalType != page.portalType) {
|
if(this.properties.adminToolsPortalType != page.portalType) {
|
||||||
this.router.navigate(['/classContents'], { queryParams: { "communityId": this.communityPid} });
|
this.router.navigate(['/classContents'], { queryParams: { "communityId": this.communityPid} });
|
||||||
|
@ -84,7 +84,7 @@ export class NewDivHelpContentComponent {
|
||||||
|
|
||||||
let divHelpContent : DivHelpContent = this.formComponent.myForm.value;
|
let divHelpContent : DivHelpContent = this.formComponent.myForm.value;
|
||||||
|
|
||||||
this._helpContentService.insertOrUpdateDivHelpContent(divHelpContent, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.insertOrUpdateDivHelpContent(divHelpContent, this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
if(this.pageId) {
|
if(this.pageId) {
|
||||||
this.router.navigate( ['/classContents/'], { queryParams: { "communityId": this.communityPid, "pageId": this.pageId } } );
|
this.router.navigate( ['/classContents/'], { queryParams: { "communityId": this.communityPid, "pageId": this.pageId } } );
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<div class="show-options uk-float-right">
|
<div class="show-options uk-float-right">
|
||||||
<button class="uk-button uk-button-primary" type="button">Bulk Actions</button>
|
<button class="uk-button uk-button-primary" type="button">Bulk Actions</button>
|
||||||
<div uk-dropdown="mode: click">
|
<div uk-dropdown="mode: click">
|
||||||
<ul class="uk-nav uk-navbar-dropdown-nav uk-margin-left"
|
<ul class="uk-nav uk-margin-left"
|
||||||
[attr.uk-tooltip]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
[attr.uk-tooltip]="getSelectedEntities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
||||||
title="Select at least one entity">
|
title="Select at least one entity">
|
||||||
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''"
|
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedEntities().length == 0 ? 'uk-disabled' : ''"
|
||||||
|
@ -89,17 +89,17 @@
|
||||||
|
|
||||||
<td *ngIf="isPortalAdministrator">
|
<td *ngIf="isPortalAdministrator">
|
||||||
<div class="actions" href="#">
|
<div class="actions" href="#">
|
||||||
<i class="md-icon material-icons" (click)="editEntity(i)"></i>
|
<i class="clickable " uk-icon="pencil" (click)="editEntity(i)"></i>
|
||||||
<i class="material-icons md-icon"
|
<i class="clickable uk-text-danger" uk-icon="trash"
|
||||||
(click)="confirmDeleteEntity(check.entity._id)">delete</i>
|
(click)="confirmDeleteEntity(check.entity._id)"></i>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="uk-width-1-1 uk-flex uk-flex-center " *ngIf="isPortalAdministrator">
|
<div class="uk-width-1-1 uk-flex uk-flex-center " *ngIf="isPortalAdministrator">
|
||||||
<div class="uk-width-small uk-flex uk-flex-center uk-button" (click)="newEntity()">
|
<div class="uk-width-small uk-button uk-button-default" (click)="newEntity()">
|
||||||
<i class="material-icons md-48">add</i>
|
<i class="" uk-icon="plus"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="checkboxes.length==0" class="col-md-12">
|
<div *ngIf="checkboxes.length==0" class="col-md-12">
|
||||||
|
|
|
@ -80,7 +80,7 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
|
||||||
}
|
}
|
||||||
|
|
||||||
private getPage(pageId: string) {
|
private getPage(pageId: string) {
|
||||||
this._helpContentService.getPage(pageId,this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.getPageByPortal(pageId,this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
||||||
page => {
|
page => {
|
||||||
if(this.properties.adminToolsPortalType != page.portalType) {
|
if(this.properties.adminToolsPortalType != page.portalType) {
|
||||||
this.router.navigate(['/pageContents'], { queryParams: { "communityId": this.communityPid} });
|
this.router.navigate(['/pageContents'], { queryParams: { "communityId": this.communityPid} });
|
||||||
|
@ -102,7 +102,7 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
|
||||||
this.errorMessage = "";
|
this.errorMessage = "";
|
||||||
this.updateErrorMessage = "";
|
this.updateErrorMessage = "";
|
||||||
|
|
||||||
this._helpContentService.getPageHelpContent(pageContentId as string, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.getPageHelpContent(pageContentId as string, this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
||||||
pageHelpContent => {
|
pageHelpContent => {
|
||||||
if(this.pageId && this.pageId != pageHelpContent.page) {
|
if(this.pageId && this.pageId != pageHelpContent.page) {
|
||||||
this.router.navigate(['/pageContents'], { queryParams: { "communityId": this.communityPid} });
|
this.router.navigate(['/pageContents'], { queryParams: { "communityId": this.communityPid} });
|
||||||
|
@ -133,7 +133,7 @@ export class EditPageHelpContentComponent implements OnInit, OnDestroy{
|
||||||
this.updateErrorMessage = "";
|
this.updateErrorMessage = "";
|
||||||
|
|
||||||
let pageHelpContent : PageHelpContent = this.formComponent.myForm.value;
|
let pageHelpContent : PageHelpContent = this.formComponent.myForm.value;
|
||||||
this._helpContentService.updatePageHelpContent(pageHelpContent, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.updatePageHelpContent(pageHelpContent, this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
if(this.pageId) {
|
if(this.pageId) {
|
||||||
this.router.navigate( ['/pageContents/'], { queryParams: { "communityId": this.communityPid, "pageId": this.pageId } } );
|
this.router.navigate( ['/pageContents/'], { queryParams: { "communityId": this.communityPid, "pageId": this.pageId } } );
|
||||||
|
|
|
@ -60,7 +60,7 @@ export class NewPageHelpContentComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
private getPage(pageId: string) {
|
private getPage(pageId: string) {
|
||||||
this._helpContentService.getPage(pageId,this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.getPageByPortal(pageId,this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
||||||
page => {
|
page => {
|
||||||
if(this.properties.adminToolsPortalType != page.portalType) {
|
if(this.properties.adminToolsPortalType != page.portalType) {
|
||||||
this.router.navigate(['/pageContents'], { queryParams: { "communityId": this.communityPid} });
|
this.router.navigate(['/pageContents'], { queryParams: { "communityId": this.communityPid} });
|
||||||
|
@ -87,7 +87,7 @@ export class NewPageHelpContentComponent {
|
||||||
|
|
||||||
let pageHelpContent : PageHelpContent = this.formComponent.myForm.value;
|
let pageHelpContent : PageHelpContent = this.formComponent.myForm.value;
|
||||||
|
|
||||||
this._helpContentService.savePageHelpContent(pageHelpContent, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.savePageHelpContent(pageHelpContent, this.properties.adminToolsAPIURL, this.communityPid).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
if(this.pageId) {
|
if(this.pageId) {
|
||||||
this.router.navigate( ['/helptexts/'], { queryParams: { "communityId": this.communityPid, "pageId": this.pageId } } );
|
this.router.navigate( ['/helptexts/'], { queryParams: { "communityId": this.communityPid, "pageId": this.pageId } } );
|
||||||
|
|
|
@ -49,12 +49,12 @@ export class PageContentFormComponent implements OnInit{
|
||||||
if(!this.pageId) {
|
if(!this.pageId) {
|
||||||
this.myForm.valueChanges.subscribe(value => {
|
this.myForm.valueChanges.subscribe(value => {
|
||||||
let pageId = value.page;
|
let pageId = value.page;
|
||||||
this._helpContentService.getPage(pageId, this.properties.adminToolsAPIURL).subscribe(page => {
|
this._helpContentService.getPageByPortal(pageId, this.properties.adminToolsAPIURL, this.communityPid).subscribe(page => {
|
||||||
this.setPlacements(page);
|
this.setPlacements(page);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this._helpContentService.getPages(this.properties.adminToolsAPIURL, this.communityPid, true).subscribe(
|
this._helpContentService.getCommunityPagesWithPositions(this.communityPid, this.properties.adminToolsAPIURL).subscribe(
|
||||||
pages => {
|
pages => {
|
||||||
this.availablePages = pages;
|
this.availablePages = pages;
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
<button class="uk-button uk-button-primary uk-float-right" type="button">Bulk Actions</button>
|
<button class="uk-button uk-button-primary uk-float-right" type="button">Bulk Actions</button>
|
||||||
<div uk-dropdown="mode: click">
|
<div uk-dropdown="mode: click">
|
||||||
<ul class="uk-nav uk-navbar-dropdown-nav uk-margin-left"
|
<ul class="uk-nav uk-margin-left"
|
||||||
[attr.uk-tooltip]="getSelectedPageHelpContents().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
[attr.uk-tooltip]="getSelectedPageHelpContents().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
||||||
title="Select at least one help text">
|
title="Select at least one help text">
|
||||||
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
|
<li><a [class]="getSelectedPageHelpContents().length == 0 ? 'uk-disabled' : ''"
|
||||||
|
@ -128,10 +128,10 @@
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
|
|
||||||
<div class="actions" href="#">
|
<div class="actions" href="#">
|
||||||
<i class="md-icon material-icons"
|
<i class="clickable" ui-kit="pencil"
|
||||||
(click)="editPageHelpContent(check.pageHelpContent._id)"></i>
|
(click)="editPageHelpContent(check.pageHelpContent._id)"></i>
|
||||||
<i class="material-icons md-icon"
|
<i class="clickable uk-text-danger" uk-icon="trash"
|
||||||
(click)="confirmDeletePageHelpContent(check.pageHelpContent._id)">delete</i>
|
(click)="confirmDeletePageHelpContent(check.pageHelpContent._id)"></i>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -142,8 +142,8 @@
|
||||||
<div class="uk-alert-warning" uk-alert>No page contents found</div>
|
<div class="uk-alert-warning" uk-alert>No page contents found</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-1-1 uk-flex uk-flex-center ">
|
<div class="uk-width-1-1 uk-flex uk-flex-center ">
|
||||||
<div class="uk-width-small uk-flex uk-flex-center uk-button" (click)="newPageContent()">
|
<div class="uk-width-small uk-button-default uk-button" (click)="newPageContent()">
|
||||||
<i class="material-icons md-48">add</i>
|
<i class="" uk-icon="plus"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -159,6 +159,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- <fab (clicked)="newPageContent()"></fab>-->
|
<!-- <fab (clicked)="newPageContent()"></fab>-->
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- <delete-confirmation-dialog #deleteConfirmationModal [isModalShown]="isModalShown" (emmitObject)="confirmedDeletePageHelpContents($event)">
|
<!-- <delete-confirmation-dialog #deleteConfirmationModal [isModalShown]="isModalShown" (emmitObject)="confirmedDeletePageHelpContents($event)">
|
||||||
Are you sure you want to delete the selected page content(s)?
|
Are you sure you want to delete the selected page content(s)?
|
||||||
|
|
|
@ -113,7 +113,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
this.updateErrorMessage = "";
|
this.updateErrorMessage = "";
|
||||||
this.errorMessage = "";
|
this.errorMessage = "";
|
||||||
|
|
||||||
this._helpService.getPage(pageId, this.properties.adminToolsAPIURL).subscribe(
|
this._helpService.getPageByPortal(pageId, this.properties.adminToolsAPIURL, this.selectedCommunityPid).subscribe(
|
||||||
page => {
|
page => {
|
||||||
if (this.properties.adminToolsPortalType != page.portalType) {
|
if (this.properties.adminToolsPortalType != page.portalType) {
|
||||||
this.router.navigate(['/pageContents'], {queryParams: {"communityId": this.selectedCommunityPid}});
|
this.router.navigate(['/pageContents'], {queryParams: {"communityId": this.selectedCommunityPid}});
|
||||||
|
@ -140,7 +140,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
this.errorMessage = "";
|
this.errorMessage = "";
|
||||||
|
|
||||||
//this._helpService.getCommunityPages(community_pid, "", this.properties.adminToolsAPIURL).subscribe(
|
//this._helpService.getCommunityPages(community_pid, "", this.properties.adminToolsAPIURL).subscribe(
|
||||||
this._helpService.getPages(this.properties.adminToolsAPIURL, community_pid, true).subscribe(
|
this._helpService.getCommunityPagesWithPositions(community_pid,this.properties.adminToolsAPIURL).subscribe(
|
||||||
pages => {
|
pages => {
|
||||||
this.pages = pages;
|
this.pages = pages;
|
||||||
this.getPageHelpContents(this.selectedCommunityPid);
|
this.getPageHelpContents(this.selectedCommunityPid);
|
||||||
|
@ -266,7 +266,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.updateErrorMessage = "";
|
this.updateErrorMessage = "";
|
||||||
|
|
||||||
this._helpService.deletePageHelpContents(this.selectedPageContents, this.properties.adminToolsAPIURL).subscribe(
|
this._helpService.deletePageHelpContents(this.selectedPageContents, this.properties.adminToolsAPIURL, this.selectedCommunityPid).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this.deletePageHelpContentsFromArray(this.selectedPageContents);
|
this.deletePageHelpContentsFromArray(this.selectedPageContents);
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
|
@ -317,7 +317,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
} else {
|
} else {
|
||||||
this.updateErrorMessage = "";
|
this.updateErrorMessage = "";
|
||||||
|
|
||||||
this._helpService.togglePageHelpContents(ids, status, this.properties.adminToolsAPIURL).subscribe(
|
this._helpService.togglePageHelpContents(ids, status, this.properties.adminToolsAPIURL, this.selectedCommunityPid).subscribe(
|
||||||
() => {
|
() => {
|
||||||
for (let id of ids) {
|
for (let id of ids) {
|
||||||
let i = this.checkboxes.findIndex(_ => _.pageHelpContent._id == id);
|
let i = this.checkboxes.findIndex(_ => _.pageHelpContent._id == id);
|
||||||
|
|
|
@ -16,16 +16,16 @@
|
||||||
<div class="show-options uk-float-right">
|
<div class="show-options uk-float-right">
|
||||||
<button class="uk-button uk-button-primary" type="button">Bulk Actions</button>
|
<button class="uk-button uk-button-primary" type="button">Bulk Actions</button>
|
||||||
<div uk-dropdown="mode: click">
|
<div uk-dropdown="mode: click">
|
||||||
<ul class="uk-nav uk-navbar-dropdown-nav uk-margin-left"
|
<ul class="uk-nav uk-margin-left"
|
||||||
[attr.uk-tooltip]="getSelectedPages().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
[attr.uk-tooltip]="getSelectedPages().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
||||||
title="Select at least one page">
|
title="Select at least one page">
|
||||||
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''"
|
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''"
|
||||||
(click)="togglePages(true, getSelectedPages())"><i></i> Activate
|
(click)="togglePages(true, getSelectedPages())"> Activate
|
||||||
</a></li>
|
</a></li>
|
||||||
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''"
|
<li *ngIf="!isPortalAdministrator"><a [class]="getSelectedPages().length == 0 ? 'uk-disabled' : ''"
|
||||||
(click)="togglePages(false, getSelectedPages())"><i></i> Deactivate
|
(click)="togglePages(false, getSelectedPages())"> Deactivate
|
||||||
</a></li>
|
</a></li>
|
||||||
<li *ngIf="isPortalAdministrator"><a (click)="confirmDeleteSelectedPages()"><i></i> Delete </a></li>
|
<li *ngIf="isPortalAdministrator"><a (click)="confirmDeleteSelectedPages()"> Delete </a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -107,9 +107,9 @@
|
||||||
|
|
||||||
<td *ngIf="isPortalAdministrator">
|
<td *ngIf="isPortalAdministrator">
|
||||||
<div class="actions" href="#">
|
<div class="actions" href="#">
|
||||||
<i class="md-icon material-icons" (click)="editPage(i)"></i>
|
<i class="clickable " (click)="editPage(i)" uk-icon="pencil"></i>
|
||||||
<i class="material-icons md-icon"
|
<i class="clickable uk-text-danger"
|
||||||
(click)="confirmDeletePage(check.page._id)">delete</i>
|
(click)="confirmDeletePage(check.page._id)" uk-icon="trash"></i>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td *ngIf="!isPortalAdministrator" class="uk-text-center">
|
<td *ngIf="!isPortalAdministrator" class="uk-text-center">
|
||||||
|
@ -137,8 +137,8 @@
|
||||||
<div class="uk-alert-warning" uk-alert>No pages found</div>
|
<div class="uk-alert-warning" uk-alert>No pages found</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-1-1 uk-flex uk-flex-center ">
|
<div class="uk-width-1-1 uk-flex uk-flex-center ">
|
||||||
<div class="uk-width-small uk-flex uk-flex-center uk-button" (click)="newPage()">
|
<div class="uk-width-small uk-button uk-button-default" (click)="newPage()">
|
||||||
<i class="material-icons md-48">add</i>
|
<i class="" uk-icon="plus"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -278,25 +278,14 @@
|
||||||
<!-- </span>-->
|
<!-- </span>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
|
|
||||||
<div [ngClass]="{'has-error':!myForm.controls.portalType.valid && myForm.controls.portalType.dirty}" class="form-group" uk-grid>
|
<div [ngClass]="{'has-error':!myForm.controls.portalType.valid && myForm.controls.portalType.dirty}" class="form-group" >
|
||||||
<label class="uk-width-1-1 uk-margin-small-bottom">
|
<div class="uk-width-1-1 uk-margin-small-bottom">
|
||||||
Page exists in:
|
Page exists in:
|
||||||
</label>
|
</div>
|
||||||
<label class="uk-width-1-1 radio uk-margin-large-left">
|
<span *ngFor="let option of portalUtils.portalTypes" class="radio">
|
||||||
<span class="uk-margin-small-right" style="font-weight: normal;">OpenAIRE portal</span>
|
<span class="uk-margin-small-right" style="font-weight: normal;">{{option.label}}</span>
|
||||||
<!-- <input tabindex="0" type="checkbox" formControlName="openaire">-->
|
<input type="radio" [value]="option.value" formControlName="portalType">
|
||||||
<input type="radio" value="explore" formControlName="portalType">
|
</span>
|
||||||
</label>
|
|
||||||
<label class="uk-width-1-1 radio uk-margin-large-left">
|
|
||||||
<span class="uk-margin-small-right" style="font-weight: normal;">OpenAIRE Connect portal</span>
|
|
||||||
<!-- <input tabindex="0" type="checkbox" formControlName="connect">-->
|
|
||||||
<input type="radio" value="connect" formControlName="portalType">
|
|
||||||
</label>
|
|
||||||
<label class="uk-width-1-1 radio uk-margin-large-left">
|
|
||||||
<span class="uk-margin-small-right" style="font-weight: normal;">Communities' Gateway</span>
|
|
||||||
<!-- <input tabindex="0" type="checkbox" formControlName="communities">-->
|
|
||||||
<input type="radio" value="community" formControlName="portalType">
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="hidden" formControlName="_id">
|
<input type="hidden" formControlName="_id">
|
||||||
|
|
|
@ -13,6 +13,7 @@ import {UserManagementService} from '../../services/user-management.service';
|
||||||
import {Observable, Subscriber} from "rxjs";
|
import {Observable, Subscriber} from "rxjs";
|
||||||
import {map, startWith} from "rxjs/operators";
|
import {map, startWith} from "rxjs/operators";
|
||||||
import {MatAutocompleteSelectedEvent} from "@angular/material";
|
import {MatAutocompleteSelectedEvent} from "@angular/material";
|
||||||
|
import {PortalUtils} from "../portal/portalHelper";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'pages',
|
selector: 'pages',
|
||||||
|
@ -65,7 +66,7 @@ export class PagesComponent implements OnInit {
|
||||||
allEntities: Entity[] = [];
|
allEntities: Entity[] = [];
|
||||||
|
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
|
public portalUtils:PortalUtils = new PortalUtils();
|
||||||
constructor(private element: ElementRef, private route: ActivatedRoute,
|
constructor(private element: ElementRef, private route: ActivatedRoute,
|
||||||
private _router: Router, private _helpContentService: HelpContentService,
|
private _router: Router, private _helpContentService: HelpContentService,
|
||||||
private userManagementService: UserManagementService, private _fb: FormBuilder) {
|
private userManagementService: UserManagementService, private _fb: FormBuilder) {
|
||||||
|
@ -152,7 +153,7 @@ export class PagesComponent implements OnInit {
|
||||||
parameters = '?page_type=' + this.pagesType;
|
parameters = '?page_type=' + this.pagesType;
|
||||||
}
|
}
|
||||||
if (community_pid) {
|
if (community_pid) {
|
||||||
this._helpContentService.getCommunityPages(community_pid, parameters, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.getCommunityPagesByType(community_pid, parameters, this.properties.adminToolsAPIURL).subscribe(
|
||||||
pages => {
|
pages => {
|
||||||
this.pagesReturned(pages);
|
this.pagesReturned(pages);
|
||||||
//if(!this.pagesType || this.pagesType == "link") {
|
//if(!this.pagesType || this.pagesType == "link") {
|
||||||
|
@ -164,7 +165,7 @@ export class PagesComponent implements OnInit {
|
||||||
error => this.handleError('System error retrieving pages', error)
|
error => this.handleError('System error retrieving pages', error)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this._helpContentService.getPagesFull(this.properties.adminToolsAPIURL, null).subscribe(
|
this._helpContentService.getAllPagesFull(this.properties.adminToolsAPIURL).subscribe(
|
||||||
pages => {
|
pages => {
|
||||||
this.pagesReturned(pages);
|
this.pagesReturned(pages);
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
|
@ -184,7 +185,7 @@ export class PagesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this._helpContentService.getPagesWithDivIds(community_pid, this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.getPageIdsFromDivIds(community_pid, this.properties.adminToolsAPIURL).subscribe(
|
||||||
pages => {
|
pages => {
|
||||||
this.pageWithDivIds = pages;
|
this.pageWithDivIds = pages;
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
import {Option} from "../sharedComponents/input/input.component";
|
||||||
|
|
||||||
|
export class PortalUtils{
|
||||||
|
|
||||||
|
portalTypes: Option[] = [
|
||||||
|
{value: 'explore', label: 'Explore Portal'},
|
||||||
|
{value: 'connect', label: 'Connect portal'},
|
||||||
|
{value: 'monitor', label: 'Monitor portal'},
|
||||||
|
{value: 'community', label: 'Community Gateway'},
|
||||||
|
{value: 'funder', label: 'Funder Dashboard'},
|
||||||
|
{value: 'ri', label: 'Research Initiative Dashboard'},
|
||||||
|
{value: 'organization', label: 'Institution Dashboard'},
|
||||||
|
{value: 'project', label: 'Project Dashboard'}
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
|
@ -35,7 +35,7 @@
|
||||||
<div class="show-options uk-float-right">
|
<div class="show-options uk-float-right">
|
||||||
<button class="uk-button" type="button">Bulk Actions</button>
|
<button class="uk-button" type="button">Bulk Actions</button>
|
||||||
<div uk-dropdown="mode: click">
|
<div uk-dropdown="mode: click">
|
||||||
<ul class="uk-nav uk-navbar-dropdown-nav"
|
<ul class="uk-nav uk-margin-left"
|
||||||
[attr.uk-tooltip]="getSelectedCommunities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
[attr.uk-tooltip]="getSelectedCommunities().length == 0 ? 'pos:left; cls: uk-active' : 'cls: uk-invisible'"
|
||||||
title="Select at least one portal">
|
title="Select at least one portal">
|
||||||
<li><a [class]="getSelectedCommunities().length == 0 ? 'uk-disabled' : ''"
|
<li><a [class]="getSelectedCommunities().length == 0 ? 'uk-disabled' : ''"
|
||||||
|
@ -72,9 +72,9 @@
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="actions" href="#">
|
<div class="actions" href="#">
|
||||||
<i class="md-icon material-icons" (click)="editCommunity(i)"></i>
|
<i class="clickable" uk-icon="pencil" (click)="editCommunity(i)"></i>
|
||||||
<i class="material-icons md-icon"
|
<i class="clickable uk-text-danger" uk-icon="trash"
|
||||||
(click)="confirmDeleteCommunity(check.community._id)">delete</i>
|
(click)="confirmDeleteCommunity(check.community._id)"></i>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
|
@ -83,8 +83,8 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<div class="uk-width-1-1 uk-flex uk-flex-center ">
|
<div class="uk-width-1-1 uk-flex uk-flex-center ">
|
||||||
<div class="uk-width-small uk-flex uk-flex-center uk-button" (click)="newCommunity()">
|
<div class="uk-width-small uk-button-default uk-button" (click)="newCommunity()">
|
||||||
<i class="material-icons md-48">add</i>
|
<i class="" uk-icon="plus"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -114,16 +114,17 @@
|
||||||
<div [ngClass]="{'has-error':!portalFG.controls.type.valid && portalFG.controls.type.dirty}">
|
<div [ngClass]="{'has-error':!portalFG.controls.type.valid && portalFG.controls.type.dirty}">
|
||||||
<label for="portalTypeTag">*Portal Type</label>
|
<label for="portalTypeTag">*Portal Type</label>
|
||||||
<select formControlName="type" id="portalTypeTag" class="form-control uk-select">
|
<select formControlName="type" id="portalTypeTag" class="form-control uk-select">
|
||||||
<option [value]="'explore'">OpenAIRE Explore Portal</option>
|
<option *ngFor="let option of portalUtils.portalTypes" [value]="option.value">{{option.label}}</option>
|
||||||
<option [value]="'connect'">OpenAIRE Connect Portal</option>
|
|
||||||
<option [value]="'monitor'">OpenAIRE Monitor Portal</option>
|
|
||||||
<option [value]="'community'">OpenAIRE Community Gateway</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div dashboard-input class="uk-margin-small-left " [formInput]="portalFG.controls.pid"
|
<div dashboard-input class="uk-margin-small-left " [formInput]="portalFG.controls.pid"
|
||||||
type="text"
|
type="text"
|
||||||
label="Portal persistent id for portal">
|
label="Portal persistent id for portal">
|
||||||
</div>
|
</div>
|
||||||
|
<div dashboard-input class="uk-margin-small-left" [formInput]="portalFG.controls.piwik"
|
||||||
|
type="text"
|
||||||
|
label="Piwik id">
|
||||||
|
</div>
|
||||||
<input type="hidden" formControlName="_id">
|
<input type="hidden" formControlName="_id">
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -2,20 +2,21 @@ import {Component, ViewChild, OnInit, ElementRef} from '@angular/core';
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
import {HelpContentService} from '../../services/help-content.service';
|
import {HelpContentService} from '../../services/help-content.service';
|
||||||
import {FormBuilder, FormControl, FormGroup} from '@angular/forms';
|
import {FormBuilder, FormControl, FormGroup} from '@angular/forms';
|
||||||
import {CheckPortal, Portal} from '../../utils/entities/adminTool/portal';
|
|
||||||
import {EnvProperties} from '../../utils/properties/env-properties';
|
import {EnvProperties} from '../../utils/properties/env-properties';
|
||||||
|
|
||||||
import {Session} from '../../login/utils/helper.class';
|
import {Session} from '../../login/utils/helper.class';
|
||||||
import {LoginErrorCodes} from '../../login/utils/guardHelper.class';
|
import {LoginErrorCodes} from '../../login/utils/guardHelper.class';
|
||||||
import {HelperFunctions} from "../../utils/HelperFunctions.class";
|
import {HelperFunctions} from "../../utils/HelperFunctions.class";
|
||||||
import {Subscriber} from "rxjs";
|
import {Subscriber} from "rxjs";
|
||||||
|
import {CheckPortal, Portal} from "../../utils/entities/adminTool/portal";
|
||||||
|
import {PortalUtils} from "./portalHelper";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'communities',
|
selector: 'portals',
|
||||||
templateUrl: './communities.component.html',
|
templateUrl: './portals.component.html',
|
||||||
})
|
})
|
||||||
|
|
||||||
export class CommunitiesComponent implements OnInit {
|
export class PortalsComponent implements OnInit {
|
||||||
|
|
||||||
@ViewChild('AlertModalSaveCommunity') alertModalSaveCommunity;
|
@ViewChild('AlertModalSaveCommunity') alertModalSaveCommunity;
|
||||||
@ViewChild('AlertModalDeleteCommunities') alertModalDeleteCommunities;
|
@ViewChild('AlertModalDeleteCommunities') alertModalDeleteCommunities;
|
||||||
|
@ -37,12 +38,13 @@ export class CommunitiesComponent implements OnInit {
|
||||||
public errorMessage = '';
|
public errorMessage = '';
|
||||||
public updateErrorMessage = '';
|
public updateErrorMessage = '';
|
||||||
public modalErrorMessage = '';
|
public modalErrorMessage = '';
|
||||||
|
public portalUtils:PortalUtils = new PortalUtils();
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.portalFG = this._fb.group({
|
this.portalFG = this._fb.group({
|
||||||
name: '',
|
name: '',
|
||||||
_id: '',
|
_id: '',
|
||||||
pid: '',
|
pid: '',
|
||||||
|
piwik:'',
|
||||||
type: ''
|
type: ''
|
||||||
});
|
});
|
||||||
this.formControl = this._fb.control('');
|
this.formControl = this._fb.control('');
|
||||||
|
@ -85,12 +87,14 @@ export class CommunitiesComponent implements OnInit {
|
||||||
this.errorMessage = '';
|
this.errorMessage = '';
|
||||||
|
|
||||||
|
|
||||||
this._helpContentService.getCommunitiesFull(this.properties.adminToolsAPIURL).subscribe(
|
this._helpContentService.getPortalsFull(this.properties.adminToolsAPIURL).subscribe(
|
||||||
communities => {
|
communities => {
|
||||||
this.communities = communities;
|
this.communities = communities;
|
||||||
|
if(communities) {
|
||||||
communities.forEach(_ => {
|
communities.forEach(_ => {
|
||||||
this.checkboxes.push(<CheckPortal>{community: _, checked: false});
|
this.checkboxes.push(<CheckPortal>{community: _, checked: false});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
},
|
},
|
||||||
error => this.handleError('System error retrieving communities', error));
|
error => this.handleError('System error retrieving communities', error));
|
||||||
|
@ -168,6 +172,7 @@ export class CommunitiesComponent implements OnInit {
|
||||||
name: community.name,
|
name: community.name,
|
||||||
_id: community._id,
|
_id: community._id,
|
||||||
type: community.type,
|
type: community.type,
|
||||||
|
piwik:community.piwik,
|
||||||
pid: community.pid
|
pid: community.pid
|
||||||
});
|
});
|
||||||
this.portalFG.controls['type'].disable();
|
this.portalFG.controls['type'].disable();
|
||||||
|
@ -181,6 +186,7 @@ export class CommunitiesComponent implements OnInit {
|
||||||
name: '',
|
name: '',
|
||||||
_id: '',
|
_id: '',
|
||||||
type: '',
|
type: '',
|
||||||
|
piwik: '',
|
||||||
pid: ''
|
pid: ''
|
||||||
});
|
});
|
||||||
this.modalErrorMessage = '';
|
this.modalErrorMessage = '';
|
||||||
|
@ -281,6 +287,7 @@ export class CommunitiesComponent implements OnInit {
|
||||||
name: '',
|
name: '',
|
||||||
_id: '',
|
_id: '',
|
||||||
pid: '',
|
pid: '',
|
||||||
|
piwik:'',
|
||||||
type: ''
|
type: ''
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
|
@ -1,6 +1,6 @@
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import {CommunitiesComponent} from './communities.component';
|
import {PortalsComponent} from './portals.component';
|
||||||
import {RouterModule} from '@angular/router';
|
import {RouterModule} from '@angular/router';
|
||||||
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
||||||
import {AlertModalModule} from '../../utils/modal/alertModal.module';
|
import {AlertModalModule} from '../../utils/modal/alertModal.module';
|
||||||
|
@ -14,8 +14,8 @@ import {InputModule} from "../sharedComponents/input/input.module";
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
RouterModule, AdminToolServiceModule, InputModule
|
RouterModule, AdminToolServiceModule, InputModule
|
||||||
],
|
],
|
||||||
declarations: [CommunitiesComponent],
|
declarations: [PortalsComponent],
|
||||||
providers: [AdminLoginGuard],
|
providers: [AdminLoginGuard],
|
||||||
exports: [CommunitiesComponent]
|
exports: [PortalsComponent]
|
||||||
})
|
})
|
||||||
export class CommunitiesModule { }
|
export class PortalModule { }
|
|
@ -14,12 +14,12 @@
|
||||||
<!-- <li *ngIf="headerName"><a-->
|
<!-- <li *ngIf="headerName"><a-->
|
||||||
<!-- class="uk-disabled"><span class="menu_title uk-text-muted uk-text-uppercase">{{headerName}}</span></a></li>-->
|
<!-- class="uk-disabled"><span class="menu_title uk-text-muted uk-text-uppercase">{{headerName}}</span></a></li>-->
|
||||||
<ng-template ngFor [ngForOf]="items" let-item let-i="index">
|
<ng-template ngFor [ngForOf]="items" let-item let-i="index">
|
||||||
<li [class.current_section]="isTheActiveMenuItem(item)" [class.uk-text-bold]="isTheActiveMenuItem(item)"
|
<li [class.current_section]="isTheActiveMenuItem(item)"
|
||||||
[class.act_section]="item.open"
|
[class.act_section]="item.open"
|
||||||
[title]="item.title"
|
[title]="item.title"
|
||||||
[class.submenu_trigger]="item.items.length > 1" [class.uk-margin]="!isTheActiveMenuItem(item)">
|
[class.submenu_trigger]="item.items.length > 1" [class.uk-margin]="!isTheActiveMenuItem(item)">
|
||||||
<a *ngIf="item.items.length <= 1" [routerLink]="(item.route && !isTheActiveMenuItem(item))?item.route:null"
|
<a *ngIf="item.items.length <= 1" [routerLink]="(item.route && !isTheActiveMenuItem(item))?item.route:null"
|
||||||
[queryParams]=item.params [queryParamsHandling]="queryParamsHandling" class="uk-text-center">
|
[queryParams]=item.params [queryParamsHandling]="queryParamsHandling" class="uk-text-center" [class.uk-text-bold]="isTheActiveMenuItem(item)">
|
||||||
<div *ngIf="item.icon && !open" class="menu_icon uk-margin-auto">
|
<div *ngIf="item.icon && !open" class="menu_icon uk-margin-auto">
|
||||||
<span [innerHTML]="satinizeHTML(item.icon)"></span>
|
<span [innerHTML]="satinizeHTML(item.icon)"></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -27,14 +27,14 @@
|
||||||
<span class="menu_title" [class.uk-text-small]="!open">{{item.title}}</span>
|
<span class="menu_title" [class.uk-text-small]="!open">{{item.title}}</span>
|
||||||
</a>
|
</a>
|
||||||
<ng-template [ngIf]="item.items.length > 1">
|
<ng-template [ngIf]="item.items.length > 1">
|
||||||
<a (click)="item.open = !item.open" >
|
<a (click)="item.open = !item.open" class="uk-text-center">
|
||||||
<div *ngIf="item.icon && !open" class="menu_icon "><i class="material-icons">{{item.icon}}</i></div>
|
<div *ngIf="item.icon && !open" class="menu_icon "><i class="material-icons">{{item.icon}}</i></div>
|
||||||
<span class="menu_title " [class.uk-text-small]="!open">{{item.title}}</span>
|
<span class="menu_title " [class.uk-text-small]="!open">{{item.title}}</span>
|
||||||
|
|
||||||
</a>
|
</a>
|
||||||
<ul [style.display]="(item.open?'block':'none')">
|
<ul [style.display]="(item.open?'block':'none')" class="uk-text-center">
|
||||||
<ng-template ngFor [ngForOf]="item.items" let-subItem let-j="index">
|
<ng-template ngFor [ngForOf]="item.items" let-subItem let-j="index">
|
||||||
<li *ngIf="subItem.route" [class.act_item]="isTheActiveMenuItem(item, subItem)">
|
<li *ngIf="subItem.route" [class.act_item]="isTheActiveMenuItem(item, subItem)" [class.current_section]="isTheActiveMenuItem(subItem)">
|
||||||
<a [routerLink]="!isTheActiveMenuItem(item, subItem)?subItem.route:null"
|
<a [routerLink]="!isTheActiveMenuItem(item, subItem)?subItem.route:null"
|
||||||
[queryParams]=subItem.params [queryParamsHandling]="queryParamsHandling">
|
[queryParams]=subItem.params [queryParamsHandling]="queryParamsHandling">
|
||||||
<div *ngIf="subItem.icon" class="menu_icon"><i class="material-icons">{{subItem.icon}}</i></div>
|
<div *ngIf="subItem.icon" class="menu_icon"><i class="material-icons">{{subItem.icon}}</i></div>
|
||||||
|
|
|
@ -39,7 +39,8 @@ export class SideBarComponent implements OnInit {
|
||||||
if (subItem) {
|
if (subItem) {
|
||||||
return MenuItem.isTheActiveMenu(subItem, this.router.url.split('?')[0])
|
return MenuItem.isTheActiveMenu(subItem, this.router.url.split('?')[0])
|
||||||
}
|
}
|
||||||
return MenuItem.isTheActiveMenu(item, this.router.url.split('?')[0])
|
console.debug(item.route + " " + this.router.url.split('?')[0] + MenuItem.isTheActiveMenu(item,this.router.url.split('?')[0]))
|
||||||
|
return MenuItem.isTheActiveMenu(item,this.router.url.split('?')[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,6 @@ import { CustomOptions } from './servicesUtils/customOptions.class';
|
||||||
import {catchError, map} from "rxjs/operators";
|
import {catchError, map} from "rxjs/operators";
|
||||||
import {properties} from "../../../environments/environment";
|
import {properties} from "../../../environments/environment";
|
||||||
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class HelpContentService {
|
export class HelpContentService {
|
||||||
|
|
||||||
|
@ -30,23 +29,107 @@ export class HelpContentService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getDivIdsFull(page_id: string, helpContentUrl:string, pid: string = null) {
|
getEntities(helpContentUrl:string) {
|
||||||
let parameters: string = "";
|
return this.http.get<Array<Entity>>(helpContentUrl + 'entity')
|
||||||
if(page_id || pid) {
|
//.map(res => <Array<Entity>> res.json())
|
||||||
parameters = "?";
|
.pipe(catchError(this.handleError));
|
||||||
if(page_id) {
|
|
||||||
parameters += "&page="+page_id;
|
|
||||||
}
|
|
||||||
if(pid) {
|
|
||||||
parameters += "&portal="+pid;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.http.get<Array<DivId>>(helpContentUrl + 'divFull'+parameters)
|
saveEntity(entity: Entity, helpContentUrl:string) {
|
||||||
|
HelpContentService.removeNulls(entity);
|
||||||
|
|
||||||
|
return this.http.post<Entity>(helpContentUrl + 'entity/save', JSON.stringify(entity), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
//.map(res => <Entity> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
updateEntity(entity: Entity, helpContentUrl:string) {
|
||||||
|
HelpContentService.removeNulls(entity);
|
||||||
|
|
||||||
|
return this.http.post<Entity>(helpContentUrl + 'entity/update', JSON.stringify(entity), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
//.map(res => <Entity> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteEntities(ids : string[], helpContentUrl:string) {
|
||||||
|
return this.http.post(helpContentUrl + 'entity/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
// toggleEntity(selectedCommunityId: string, id : string,status : boolean) {
|
||||||
|
// let headers = new Headers({'Content-Type': 'application/json'});
|
||||||
|
// let options = new RequestOptions({headers: headers});
|
||||||
|
//
|
||||||
|
// return this.http.post(helpContentUrl + 'community/'+selectedCommunityId+'/entity/toggle?status='+ status.toString()+'&entityId='+id.toString(), options)
|
||||||
|
// .catch(this.handleError);
|
||||||
|
// }
|
||||||
|
|
||||||
|
getCommunityEntities(pid: string, helpContentUrl:string) {
|
||||||
|
return this.http.get<Array<Entity>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid+'/entities')
|
||||||
|
//.map(res => <Array<Entity>> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
toggleEntities(pid: string, ids : string[],status : boolean, helpContentUrl:string) {
|
||||||
|
|
||||||
|
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/'+pid+ '/entity/toggle?status='+ status.toString(),
|
||||||
|
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
//.map( res => <string[]> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
// unused
|
||||||
|
toggleEntityOfPage(pageId: string, entityId : string,status : boolean, helpContentUrl:string) {
|
||||||
|
return this.http.post(helpContentUrl + 'page/'+pageId+'/entity/toggle?status='+ status.toString()+'&entityId='+entityId.toString(),
|
||||||
|
CustomOptions.getAuthOptionsWithBody())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
// getDivIdsFull(page_id: string, helpContentUrl:string, pid: string = null) {
|
||||||
|
// let parameters: string = "";
|
||||||
|
// if(page_id || pid) {
|
||||||
|
// parameters = "?";
|
||||||
|
// if(page_id) {
|
||||||
|
// parameters += "&page="+page_id;
|
||||||
|
// }
|
||||||
|
// if(pid) {
|
||||||
|
// parameters += "&portal="+pid;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// return this.http.get<Array<DivId>>(helpContentUrl + 'div/full'+parameters)
|
||||||
|
// //.map(res => <Array<DivId>> res.json())
|
||||||
|
// .pipe(catchError(this.handleError));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Replacing getDivIdsFull
|
||||||
|
getAllDivIdsFull(helpContentUrl:string) {
|
||||||
|
return this.http.get<Array<DivId>>(helpContentUrl + 'div/full')
|
||||||
//.map(res => <Array<DivId>> res.json())
|
//.map(res => <Array<DivId>> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getDivIdsFullByPortal(page_id: string, helpContentUrl:string, pid: string) {
|
||||||
|
let parameters: string = page_id ? "?&page="+page_id : "";
|
||||||
|
|
||||||
|
return this.http.get<Array<DivId>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid + '/div/full'+parameters)
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
// End of replacing getDivIdsFull
|
||||||
|
|
||||||
|
// unused
|
||||||
|
getDivId(divId: string, helpContentUrl:string) {
|
||||||
|
return this.http.get<DivId>(helpContentUrl + 'div/'+divId)
|
||||||
|
//.map(res => <DivId> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
getDivIdFull(divId: string, helpContentUrl:string, pid: string) {
|
||||||
|
return this.http.get<DivId>(helpContentUrl + properties.adminToolsPortalType + "/" + pid + '/div/'+divId+"/full")
|
||||||
|
//.map(res => <DivId> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
updateDivId(divId: DivId, helpContentUrl:string) {
|
updateDivId(divId: DivId, helpContentUrl:string) {
|
||||||
HelpContentService.removeNulls(divId);
|
HelpContentService.removeNulls(divId);
|
||||||
|
|
||||||
|
@ -55,18 +138,6 @@ export class HelpContentService {
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
getDivId(divId: string, helpContentUrl:string) {
|
|
||||||
return this.http.get<DivId>(helpContentUrl + 'div/'+divId)
|
|
||||||
//.map(res => <DivId> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
getDivIdFull(divId: string, helpContentUrl:string) {
|
|
||||||
return this.http.get<DivId>(helpContentUrl + 'divFull/'+divId)
|
|
||||||
//.map(res => <DivId> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
saveDivId(divId: DivId, helpContentUrl:string) {
|
saveDivId(divId: DivId, helpContentUrl:string) {
|
||||||
HelpContentService.removeNulls(divId);
|
HelpContentService.removeNulls(divId);
|
||||||
|
|
||||||
|
@ -74,116 +145,247 @@ export class HelpContentService {
|
||||||
//.map(res => <DivId> res.json())
|
//.map(res => <DivId> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
getCommunitiesWithDivId(helpContentUrl:string) {
|
|
||||||
return this.http.get(helpContentUrl + 'community?div=true')
|
|
||||||
.map(res => <Array<Portal>> res.json())
|
|
||||||
.catch(this.handleError);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
getCommunityPagesWithDivId(portal_pid: string, helpContentUrl:string) {
|
|
||||||
return this.http.get<Array<Page>>(helpContentUrl + properties.adminToolsPortalType + '/'+portal_pid+'/pages?div=true')
|
|
||||||
//.map(res => <Array<Page>> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
getCommunityDivHelpContents(portal_pid: string, helpContentUrl:string) {
|
|
||||||
return this.http.get<Array<DivHelpContent>>(helpContentUrl + 'divhelpcontent?portal='+portal_pid)
|
|
||||||
//.map(res => <Array<DivHelpContent>> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
getDivHelpContent(id : string, helpContentUrl:string) {
|
|
||||||
return this.http.get<DivHelpContent>(helpContentUrl + 'divhelpcontent/' + id)
|
|
||||||
//.map(res => <DivHelpContent> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
insertOrUpdateDivHelpContent(divHelpContent: DivHelpContent, helpContentUrl:string) {
|
|
||||||
HelpContentService.removeNulls(divHelpContent);
|
|
||||||
|
|
||||||
return this.http.post<DivHelpContent>(helpContentUrl + 'divhelpcontent', JSON.stringify(divHelpContent), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
//.map(res => <DivHelpContent> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
deleteDivIds(ids : string[], helpContentUrl:string) {
|
deleteDivIds(ids : string[], helpContentUrl:string) {
|
||||||
return this.http.post(helpContentUrl + 'div/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
return this.http.post(helpContentUrl + 'div/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteDivHelpContents(ids : string[], helpContentUrl:string) {
|
getPageIdsFromDivIds(pid: string, helpContentUrl:string) {
|
||||||
return this.http.post(helpContentUrl + 'divhelpcontent/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
//let parameters = (pid ? "?portal="+pid : "");
|
||||||
.pipe(catchError(this.handleError));
|
return this.http.get<Array<string>>(helpContentUrl + properties.adminToolsPortalType + "/" + pid + '/div/pages')
|
||||||
}
|
|
||||||
|
|
||||||
toggleDivHelpContents(ids : string[],status : boolean, helpContentUrl:string) {
|
|
||||||
|
|
||||||
return this.http.post(helpContentUrl + 'divhelpcontent/toggle?status='+ status.toString(), JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
//.map( res => <string[]> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
getPagesWithDivIds(portal_pid: string, helpContentUrl:string) {
|
|
||||||
let parameters = (portal_pid ? "?portal="+portal_pid : "");
|
|
||||||
return this.http.get<Array<string>>(helpContentUrl + 'div/pages'+parameters)
|
|
||||||
//.map(res => <Map<string, Set<string>>> res.json())
|
//.map(res => <Map<string, Set<string>>> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
getPages(helpContentUrl:string,pid:string,with_positions:boolean=null) {
|
/*
|
||||||
let parameters: string = "";
|
getCommunitiesWithDivId(helpContentUrl:string) {
|
||||||
if(pid || with_positions == true || with_positions == false) {
|
return this.http.get(helpContentUrl + 'community?div=true')
|
||||||
parameters = "?";
|
.map(res => <Array<Portal>> res.json())
|
||||||
if(pid) {
|
.catch(this.handleError);
|
||||||
parameters += "&pid="+pid;
|
|
||||||
}
|
}
|
||||||
if(with_positions == true || with_positions == false) {
|
*/
|
||||||
parameters += "&with_positions="+with_positions;
|
|
||||||
|
getCommunityDivHelpContents(pid: string, helpContentUrl:string) {
|
||||||
|
return this.http.get<Array<DivHelpContent>>(helpContentUrl + properties.adminToolsPortalType + "/" + pid + '/divhelpcontent')
|
||||||
|
//.map(res => <Array<DivHelpContent>> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getDivHelpContent(id : string, helpContentUrl:string, pid: string) {
|
||||||
|
return this.http.get<DivHelpContent>(helpContentUrl + properties.adminToolsPortalType + "/" + pid + '/divhelpcontent/' + id)
|
||||||
|
//.map(res => <DivHelpContent> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
return this.http.get<Array<Page>>(helpContentUrl + 'page'+parameters)
|
|
||||||
|
// unused
|
||||||
|
insertOrUpdateDivHelpContent(divHelpContent: DivHelpContent, helpContentUrl:string, pid: string) {
|
||||||
|
HelpContentService.removeNulls(divHelpContent);
|
||||||
|
|
||||||
|
return this.http.post<DivHelpContent>(helpContentUrl + properties.adminToolsPortalType + "/" + pid + '/divhelpcontent',
|
||||||
|
JSON.stringify(divHelpContent), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
//.map(res => <DivHelpContent> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
saveDivHelpContent(divHelpContent: DivHelpContent, helpContentUrl:string, pid: string) {
|
||||||
|
HelpContentService.removeNulls(divHelpContent);
|
||||||
|
|
||||||
|
return this.http.post<DivHelpContent>(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/divhelpcontent/save',
|
||||||
|
JSON.stringify(divHelpContent), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
updateDivHelpContent(divHelpContent: DivHelpContent, helpContentUrl:string, pid: string) {
|
||||||
|
HelpContentService.removeNulls(divHelpContent);
|
||||||
|
|
||||||
|
return this.http.post<DivHelpContent>(helpContentUrl + properties.adminToolsPortalType + '/' + pid +'/divhelpcontent/update',
|
||||||
|
JSON.stringify(divHelpContent), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteDivHelpContents(ids : string[], helpContentUrl:string, pid: string) {
|
||||||
|
return this.http.post(helpContentUrl + properties.adminToolsPortalType + "/" + pid + '/divhelpcontent/delete',
|
||||||
|
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
toggleDivHelpContents(ids : string[],status : boolean, helpContentUrl:string, pid: string) {
|
||||||
|
|
||||||
|
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/divhelpcontent/toggle?status='+ status.toString(),
|
||||||
|
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
//.map( res => <string[]> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
// unused
|
||||||
|
getPageHelpContents(helpContentUrl:string) {
|
||||||
|
return this.http.get<Array<PageHelpContent>>(helpContentUrl + 'pagehelpcontent')
|
||||||
|
//.map(res => <Array<PageHelpContent>> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
getCommunityPageHelpContents(pid: string, helpContentUrl:string) {
|
||||||
|
return this.http.get<Array<PageHelpContent>>(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent')
|
||||||
|
//.map(res => <Array<PageHelpContent>> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
getPageHelpContent(id : string, helpContentUrl:string, pid: string) {
|
||||||
|
return this.http.get<PageHelpContent>(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/' + id)
|
||||||
|
//.map(res => <PageHelpContent> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
savePageHelpContent(pageHelpContent: PageHelpContent, helpContentUrl:string, pid: string) {
|
||||||
|
HelpContentService.removeNulls(pageHelpContent);
|
||||||
|
|
||||||
|
return this.http.post<PageHelpContent>(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/save',
|
||||||
|
JSON.stringify(pageHelpContent), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
//.map(res => <PageHelpContent> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
updatePageHelpContent(pageHelpContent: PageHelpContent, helpContentUrl:string, pid: string) {
|
||||||
|
HelpContentService.removeNulls(pageHelpContent);
|
||||||
|
|
||||||
|
return this.http.post<PageHelpContent>(helpContentUrl + properties.adminToolsPortalType + '/' + pid +'/pagehelpcontent/update',
|
||||||
|
JSON.stringify(pageHelpContent), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
//.map(res => <PageHelpContent> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
deletePageHelpContents(ids : string[], helpContentUrl:string, pid: string) {
|
||||||
|
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/delete',
|
||||||
|
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
togglePageHelpContents(ids : string[],status : boolean, helpContentUrl:string, pid: string) {
|
||||||
|
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/toggle?status='+ status.toString(),
|
||||||
|
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
//.map( res => <string[]> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
getCommunityPagesWithDivId(pid: string, helpContentUrl:string) {
|
||||||
|
return this.http.get<Array<Page>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid+'/pages?div=true')
|
||||||
//.map(res => <Array<Page>> res.json())
|
//.map(res => <Array<Page>> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
getPagesFull(helpContentUrl:string,pid:string) {
|
// getCommunityPages(pid: string, params: string, helpContentUrl:string) {
|
||||||
return this.http.get<Array<Page>>(helpContentUrl + 'pageFull'+(pid?("?pid="+pid):""))
|
// return this.http.get<Array<Page>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid+'/pages'+params, CustomOptions.getAuthOptions())
|
||||||
|
// //.map(res => <Array<Page>> res.json())
|
||||||
|
// .pipe(catchError(this.handleError));
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Replacing getCommunityPages
|
||||||
|
getCommunityPagesByType(pid: string, type: string, helpContentUrl:string) {
|
||||||
|
return this.http.get<Array<Page>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid+'/pages'
|
||||||
|
+ (type ? '?page_type='+type : ''))
|
||||||
|
//.map(res => <Array<Page>> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
// End of replacing getCommunityPages
|
||||||
|
|
||||||
|
// Replacing part of getPages (now getAllPages)
|
||||||
|
getCommunityPagesWithPositions(pid: string, helpContentUrl:string) {
|
||||||
|
return this.http.get<Array<Page>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid+'/pages?with_positions=true')
|
||||||
|
//.map(res => <Array<Page>> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
// End of replacing part of getPages (now getAllPages)
|
||||||
|
|
||||||
|
getAllPages(helpContentUrl:string) {//,pid:string,with_positions:boolean=null) {
|
||||||
|
// let parameters: string = "";
|
||||||
|
// if(pid || with_positions == true || with_positions == false) {
|
||||||
|
// parameters = "?";
|
||||||
|
// if(pid) {
|
||||||
|
// parameters += "&pid="+pid;
|
||||||
|
// }
|
||||||
|
// if(with_positions == true || with_positions == false) {
|
||||||
|
// parameters += "&with_positions="+with_positions;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
return this.http.get<Array<Page>>(helpContentUrl + 'page')
|
||||||
//.map(res => <Array<Page>> res.json())
|
//.map(res => <Array<Page>> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
getPage(pageId:string, helpContentUrl:string) {
|
getAllPagesFull(helpContentUrl:string) {
|
||||||
return this.http.get<Page>(helpContentUrl + 'page/'+pageId)
|
return this.http.get<Array<Page>>(helpContentUrl + 'page/full')//+(pid?("?pid="+pid):""))
|
||||||
|
//.map(res => <Array<Page>> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
getPageByPortal(pageId:string, helpContentUrl:string, pid: string) {
|
||||||
|
return this.http.get<Page>(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/page/'+pageId)
|
||||||
//.map(res => <Page> res.json())
|
//.map(res => <Page> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
getPageByRoute(route:string, helpContentUrl:string) {
|
getCommunityPageByRoute(route:string, helpContentUrl:string, pid: string) {
|
||||||
return this.http.get<Page>(helpContentUrl + 'page/?page_route='+route)
|
return this.http.get<Page>(helpContentUrl + properties.adminToolsPortalType +'/' + pid + '/page/?page_route='+route)
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
savePage(page: Page, helpContentUrl:string) {
|
||||||
|
HelpContentService.removeNulls(page);
|
||||||
|
|
||||||
|
return this.http.post<Page>(helpContentUrl + 'page/save', JSON.stringify(page), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
//.map(res => <Page> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
updatePage(page: Page, helpContentUrl:string) {
|
||||||
|
|
||||||
|
HelpContentService.removeNulls(page);
|
||||||
|
|
||||||
|
return this.http.post<Page>(helpContentUrl + 'page/update', JSON.stringify(page), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
//.map(res => <Page> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
togglePages(selectedPortalPid: string, ids : string[],status : boolean, helpContentUrl:string) {
|
||||||
|
|
||||||
|
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/'+selectedPortalPid+'/page/toggle?status='+ status.toString(),
|
||||||
|
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
deletePages(ids : string[], helpContentUrl:string) {
|
||||||
|
|
||||||
|
return this.http.post(helpContentUrl + 'page/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
|
|
||||||
|
// unused
|
||||||
getCommunities( helpContentUrl:string) {
|
getCommunities( helpContentUrl:string) {
|
||||||
return this.http.get<Array<Portal>>(helpContentUrl + properties.adminToolsPortalType)
|
return this.http.get<Array<Portal>>(helpContentUrl + properties.adminToolsPortalType)
|
||||||
//.map(res => <Array<Portal>> res.json())
|
//.map(res => <Array<Portal>> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
getCommunity(portal_pid: string, helpContentUrl:string) {
|
getCommunity(pid: string, helpContentUrl:string) {
|
||||||
return this.http.get<Portal>(helpContentUrl + properties.adminToolsPortalType + '/'+portal_pid)
|
return this.http.get<Portal>(helpContentUrl + properties.adminToolsPortalType + '/'+pid)
|
||||||
//.map(res => <Portal> res.json())
|
//.map(res => <Portal> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
getCommunitiesFull( helpContentUrl:string) {
|
getCommunitiesFull( helpContentUrl:string) {
|
||||||
return this.http.get<Array<Portal>>(helpContentUrl + properties.adminToolsPortalType + 'Full')
|
return this.http.get<Array<Portal>>(helpContentUrl + properties.adminToolsPortalType + '/full')
|
||||||
//.map(res => <Array<Portal>> res.json())
|
//.map(res => <Array<Portal>> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getPortalsFull( helpContentUrl:string) {
|
||||||
|
return this.http.get<Array<Portal>>(helpContentUrl + 'portal/full')
|
||||||
|
//.map(res => <Array<Portal>> res.json())
|
||||||
|
.pipe(catchError(this.handleError));
|
||||||
|
}
|
||||||
getCommunityFull(portal_pid: string, helpContentUrl:string) {
|
getCommunityFull(portal_pid: string, helpContentUrl:string) {
|
||||||
return this.http.get<Portal>(helpContentUrl + properties.adminToolsPortalType + 'Full/'+portal_pid)
|
return this.http.get<Portal>(helpContentUrl + properties.adminToolsPortalType + '/'+portal_pid+'/full')
|
||||||
//.map(res => <Portal> res.json())
|
//.map(res => <Portal> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
@ -218,141 +420,6 @@ export class HelpContentService {
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
getCommunityPages(portal_pid: string, params: string, helpContentUrl:string) {
|
|
||||||
return this.http.get<Array<Page>>(helpContentUrl + properties.adminToolsPortalType + '/'+portal_pid+'/pages'+params)
|
|
||||||
//.map(res => <Array<Page>> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
getEntities(helpContentUrl:string) {
|
|
||||||
return this.http.get<Array<Entity>>(helpContentUrl + 'entity')
|
|
||||||
//.map(res => <Array<Entity>> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
getCommunityEntities(portal_pid: string, helpContentUrl:string) {
|
|
||||||
return this.http.get<Array<Entity>>(helpContentUrl + properties.adminToolsPortalType + '/'+portal_pid+'/entities')
|
|
||||||
//.map(res => <Array<Entity>> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
saveEntity(entity: Entity, helpContentUrl:string) {
|
|
||||||
HelpContentService.removeNulls(entity);
|
|
||||||
|
|
||||||
return this.http.post<Entity>(helpContentUrl + 'entity/save', JSON.stringify(entity), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
//.map(res => <Entity> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
updateEntity(entity: Entity, helpContentUrl:string) {
|
|
||||||
HelpContentService.removeNulls(entity);
|
|
||||||
|
|
||||||
return this.http.post<Entity>(helpContentUrl + 'entity/update', JSON.stringify(entity), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
//.map(res => <Entity> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
// toggleEntity(selectedCommunityId: string, id : string,status : boolean) {
|
|
||||||
// let headers = new Headers({'Content-Type': 'application/json'});
|
|
||||||
// let options = new RequestOptions({headers: headers});
|
|
||||||
//
|
|
||||||
// return this.http.post(helpContentUrl + 'community/'+selectedCommunityId+'/entity/toggle?status='+ status.toString()+'&entityId='+id.toString(), options)
|
|
||||||
// .catch(this.handleError);
|
|
||||||
// }
|
|
||||||
|
|
||||||
toggleEntities(selectedPortalPid: string, ids : string[],status : boolean, helpContentUrl:string) {
|
|
||||||
|
|
||||||
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/'+selectedPortalPid+ '/entity/toggle?status='+ status.toString(), JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
//.map( res => <string[]> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
deleteEntities(ids : string[], helpContentUrl:string) {
|
|
||||||
return this.http.post(helpContentUrl + 'entity/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
toggleEntityOfPage(pageId: string, entityId : string,status : boolean, helpContentUrl:string) {
|
|
||||||
return this.http.post(helpContentUrl + 'page/'+pageId+'/entity/toggle?status='+ status.toString()+'&entityId='+entityId.toString(), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
savePage(page: Page, helpContentUrl:string) {
|
|
||||||
HelpContentService.removeNulls(page);
|
|
||||||
|
|
||||||
return this.http.post<Page>(helpContentUrl + 'page/save', JSON.stringify(page), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
//.map(res => <Page> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
updatePage(page: Page, helpContentUrl:string) {
|
|
||||||
|
|
||||||
HelpContentService.removeNulls(page);
|
|
||||||
|
|
||||||
return this.http.post<Page>(helpContentUrl + 'page/update', JSON.stringify(page), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
//.map(res => <Page> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
togglePages(selectedPortalPid: string, ids : string[],status : boolean, helpContentUrl:string) {
|
|
||||||
|
|
||||||
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/'+selectedPortalPid+'/page/toggle?status='+ status.toString(),JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
deletePages(ids : string[], helpContentUrl:string) {
|
|
||||||
|
|
||||||
return this.http.post(helpContentUrl + 'page/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
getPageHelpContents(helpContentUrl:string) {
|
|
||||||
return this.http.get<Array<PageHelpContent>>(helpContentUrl + 'pagehelpcontent')
|
|
||||||
//.map(res => <Array<PageHelpContent>> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
getCommunityPageHelpContents(portal_pid: string, helpContentUrl:string) {
|
|
||||||
return this.http.get<Array<PageHelpContent>>(helpContentUrl + 'pagehelpcontent?portal='+portal_pid)
|
|
||||||
//.map(res => <Array<PageHelpContent>> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
getPageHelpContent(id : string, helpContentUrl:string) {
|
|
||||||
return this.http.get<PageHelpContent>(helpContentUrl + 'pagehelpcontent/' + id)
|
|
||||||
//.map(res => <PageHelpContent> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
savePageHelpContent(pageHelpContent: PageHelpContent, helpContentUrl:string) {
|
|
||||||
HelpContentService.removeNulls(pageHelpContent);
|
|
||||||
|
|
||||||
return this.http.post<PageHelpContent>(helpContentUrl + 'pagehelpcontent/save', JSON.stringify(pageHelpContent), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
//.map(res => <PageHelpContent> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
updatePageHelpContent(pageHelpContent: PageHelpContent, helpContentUrl:string) {
|
|
||||||
HelpContentService.removeNulls(pageHelpContent);
|
|
||||||
|
|
||||||
return this.http.post<PageHelpContent>(helpContentUrl + 'pagehelpcontent/update', JSON.stringify(pageHelpContent), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
//.map(res => <PageHelpContent> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
deletePageHelpContents(ids : string[], helpContentUrl:string) {
|
|
||||||
return this.http.post(helpContentUrl + 'pagehelpcontent/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
togglePageHelpContents(ids : string[],status : boolean, helpContentUrl:string) {
|
|
||||||
return this.http.post(helpContentUrl + 'pagehelpcontent/toggle?status='+ status.toString(), JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
//.map( res => <string[]> res.json())
|
|
||||||
.pipe(catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
private handleError(error: HttpErrorResponse) {
|
private handleError(error: HttpErrorResponse) {
|
||||||
// in a real world app, we may send the error to some remote logging infrastructure
|
// in a real world app, we may send the error to some remote logging infrastructure
|
||||||
// instead of just logging it to the console
|
// instead of just logging it to the console
|
||||||
|
|
|
@ -161,7 +161,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="tm-header uk-visible@m tm-header-transparent" uk-header="">
|
<div class="tm-header uk-visible@m tm-header-transparent" uk-header="">
|
||||||
<div id="stickyNavbar" [class]="'uk-navbar-container uk-sticky uk-navbar-transparent '+portal+'-menu'" uk-sticky=""
|
<div id="stickyNavbar" [class]="'uk-navbar-container uk-sticky uk-navbar-transparent '+portal+'-menu'" uk-sticky=""
|
||||||
media="768" cls-active="uk-active uk-navbar-sticky" animation="uk-animation-slide-top"
|
media="768" cls-active="uk-active uk-navbar-sticky"
|
||||||
|
[attr.animation]="(header.stickyAnimation != false ?'uk-animation-slide-top':null)"
|
||||||
top=".tm-header + [class*="uk-section"]" cls-inactive="uk-navbar-transparent" style="">
|
top=".tm-header + [class*="uk-section"]" cls-inactive="uk-navbar-transparent" style="">
|
||||||
<div *ngIf="(properties.environment =='beta' || properties.environment =='development') && showLogo && header.badge">
|
<div *ngIf="(properties.environment =='beta' || properties.environment =='development') && showLogo && header.badge">
|
||||||
<img class="beta-indication-sticky"
|
<img class="beta-indication-sticky"
|
||||||
|
|
|
@ -15,6 +15,7 @@ export interface Header {
|
||||||
logoSmallUrl: string,
|
logoSmallUrl: string,
|
||||||
position: 'left' | 'center' | 'right',
|
position: 'left' | 'center' | 'right',
|
||||||
badge: boolean
|
badge: boolean
|
||||||
|
stickyAnimation?:boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
import {Page} from './page';
|
||||||
|
import {Entity} from './entity';
|
||||||
|
/*
|
||||||
|
|
||||||
|
export interface Community {
|
||||||
|
_id: string;
|
||||||
|
pid: string;
|
||||||
|
name: string;
|
||||||
|
entities: string[] | Entity[];
|
||||||
|
pages: string[] | Page[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface CheckCommunity {
|
||||||
|
community: Community;
|
||||||
|
checked: boolean;
|
||||||
|
}
|
||||||
|
*/
|
|
@ -3,7 +3,7 @@ import {Page} from './page';
|
||||||
export interface DivId {
|
export interface DivId {
|
||||||
_id: string;
|
_id: string;
|
||||||
name: string;
|
name: string;
|
||||||
pages: Page[] | String[];
|
pages: string[] | Page[];
|
||||||
portalType: string;
|
portalType: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Portal } from "./portal";
|
||||||
export interface HtmlPageContent {
|
export interface HtmlPageContent {
|
||||||
_id: string;
|
_id: string;
|
||||||
page: Page | string;
|
page: Page | string;
|
||||||
portal: Portal | string;
|
community: Portal | string;
|
||||||
content: string;
|
content: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* Created by stefania on 7/13/17.
|
* Created by stefania on 7/13/17.
|
||||||
*/
|
*/
|
||||||
import { Page } from './page';
|
import { Page } from './page';
|
||||||
import {Portal} from "./portal";
|
import { Portal } from './portal';
|
||||||
|
|
||||||
export interface PageHelpContent {
|
export interface PageHelpContent {
|
||||||
_id: string;
|
_id: string;
|
||||||
|
|
|
@ -6,6 +6,7 @@ export interface Portal {
|
||||||
pid: string;
|
pid: string;
|
||||||
name: string;
|
name: string;
|
||||||
type: string;
|
type: string;
|
||||||
|
piwik:number;
|
||||||
entities: string[] | Entity[];
|
entities: string[] | Entity[];
|
||||||
pages: string[] | Page[];
|
pages: string[] | Page[];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue