[Admin|Trunk]

Deploy: update script

Customization:
	keep 3 status of customizationOptions published, applied, draft  - change the variable used accordingly
	enable check for comunity
	add back and exit warning modals
	put reset actions in functions
	add more previews
	add route, menu/ dashboard links
	hide side menu
	update color picker css

Delete unused files 
       src/app/pages/subjects/subjects-edit-form/subjects-edit-form.service.ts
       src/app/pages/subscribers/remove-subscriber.component.html
       src/app/pages/subscribers/remove-subscriber.component.ts

	
	
	

apply


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@57338 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2019-10-10 15:17:43 +00:00
parent 6a83f3683c
commit 85b6b8c386
15 changed files with 481 additions and 224 deletions

View File

@ -14,6 +14,15 @@
# echo -n "Press key:";
# read -n1 ans
# pico ../src/assets/env-properties.json;
# printf '\nCheck the properties file version';
# echo -n "Press key:";
# read -n1 ans
# pico ../src/app/openaireLibrary/utils/properties/environment-specific.service.ts;
# printf '\n\nUpdate css/ js files version!';
# echo -n "Press key:";
# read -n1 ans
# echo -n "Pressed";
# pico ../src/index.html;
# echo -n 'Check Robots.txt: always add "Diasallow /"';
# echo -n "Press key:";
# read -n1 ans

View File

@ -36,7 +36,7 @@
"jquery": "^3.4.1",
"ng2-ckeditor": "1.1.9",
"ngx-bootstrap": "^1.6.6",
"ngx-color-picker": "^8.0.1",
"ngx-color-picker": "^8.1.0",
"ngx-json-ld": "0.1.6",
"ts-md5": "^1.2.0",
"tslib": "^1.9.0",

View File

@ -4,8 +4,12 @@
<div id="wrapper" class="uk-section uk-padding-remove">
<div class="uk-grid-collapse" uk-height-viewport="expand: true" uk-grid>
<sidebar *ngIf="showSidebar && checkLogin" [menuItems]="sideMenuItems" class="uk-width-1-5 uk-light sidebar "></sidebar>
<div class="uk-width-expand uk-overflow-auto" [ngClass]="(!wellcome)?'uk-container uk-container-large uk-padding':''"
<sidebar *ngIf="showSidebar && checkLogin && this.router.url.split('?')[0]!= '/customize-layout'"
[menuItems]="sideMenuItems"
class="uk-width-1-5 uk-light sidebar "></sidebar>
<div class="uk-width-expand uk-overflow-auto"
[ngClass]="(!wellcome)?('uk-container uk-container-large uk-padding' + (this.router.url.split('?')[0]!=
'/customize-layout'?'':' uk-padding-remove-top uk-padding-remove-bottom')):''"
[ngStyle]="{height: (!wellcome)?'85vh':'90vh'}">
<router-outlet></router-outlet>

View File

@ -240,10 +240,17 @@ export class AppComponent implements OnInit {
items: []
});
community.items.push({
rootItem: new MenuItem('communityAffiliations', 'Community Organizations', '/organizations',
rootItem: new MenuItem('communityAffiliations', 'Organizations', '/organizations',
'/organizations', false, [], [], {communityId: this.communityId}),
items: []
});
if(this.properties.environment == 'development') {
community.items.push({
rootItem: new MenuItem('layout', 'Customize Layout', '/customize-layout',
'/customize-layout', false, [], [], {communityId: this.communityId}),
items: []
});
}
/*community.items.push({
rootItem: new MenuItem('communityLayout', 'Community Layout', '/community-layout',
'/community-layout', false, [], [], {communityId: this.communityId}),

View File

@ -144,6 +144,11 @@ const appRoutes: Routes = [
loadChildren: './pages/community/content-providers/communityContentProviders.module#CommunityContentProvidersModule',
resolve: { envSpecific: EnvironmentSpecificResolver }
},
{
path: 'customize-layout',
loadChildren: './pages/customization/customization.module#CustomizationModule',
resolve: { envSpecific: EnvironmentSpecificResolver }
},
{
path: 'manage-content-providers/criteria',
loadChildren: './pages/community/content-providers/criteria/criteria.module#CriteriaModule',

View File

@ -7,7 +7,7 @@ import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGua
@NgModule({
imports: [
RouterModule.forChild([
{ path: '', canActivate: [/*IsCommunity, ConnectAdminLoginGuard*/], component: CustomizationComponent}
{ path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: CustomizationComponent}
])
]
})

View File

@ -1,28 +1,25 @@
<ng-template #applyResetButtons>
<div class="uk-margin-small">
<button class="uk-button uk-button-small uk-button-primary"
(click)="appliedCustomizationOptions=copyObject(customizationOptions);
initializeCustomizationOptions();">
(click)="resetLayout()">
<span class="uk-icon"><svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="refresh"><path fill="none" stroke="#000" stroke-width="1.1"
d="M17.08,11.15 C17.09,11.31 17.1,11.47 17.1,11.64 C17.1,15.53 13.94,18.69 10.05,18.69 C6.16,18.68 3,15.53 3,11.63 C3,7.74 6.16,4.58 10.05,4.58 C10.9,4.58 11.71,4.73 12.46,5"></path><polyline
fill="none" stroke="#000" points="9.9 2 12.79 4.89 9.79 7.9"></polyline></svg></span>
<span> Reset</span>
</button>
<button class="uk-button uk-button-small uk-button-primary uk-float-right"
(click)="previewUrl = getCommunityUrlSatinized(appliedCustomizationOptions);">Apply
(click)="applyLayout();">Apply
</button>
</div>
</ng-template>
<div class="uk-grid">
<div class="uk-width-1-4 uk-background-muted customizationMenuPanel uk-padding-small ">
<div class="uk-grid uk-height-1-1" >
<div class="uk-width-1-5 uk-background-muted customizationMenuPanel uk-padding-small ">
<div *ngIf="menuSelected == 'main'" class=" ">
<div class="uk-background-primary uk-padding-small uk-light">
<a class="uk-margin-right uk-link " routerLink="/dashboard" routerLinkActive="router-link-active"
[queryParams]="{communityId: communityId }">
<a class="uk-margin-right uk-link " (click)="exit();" >
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="close"><path fill="none" stroke="#000" stroke-width="1.06"
d="M16,16 L4,4"></path><path fill="none" stroke="#000"
@ -51,7 +48,7 @@
</div>
<div class="uk-padding-small customizationMenuItems">
<a [href]="getCommunityUrlNewLayout(appliedCustomizationOptions)" target="_blank">Preview page</a>
<a [href]="previewUrl" target="_blank">Preview page</a>
</div>
<div class="uk-h5 uk-margin-small-top">
@ -66,7 +63,7 @@
</div>
<div *ngIf="menuSelected == 'backgrounds'" class=" ">
<div class="uk-background-primary uk-padding-small uk-light">
<a class="uk-margin-right uk-link " (click)="menuSelected = 'main'">
<a class="uk-margin-right uk-link " (click)="back();">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="arrow-left"><polyline fill="none" stroke="#000"
points="10 14 5 9.5 10 5"></polyline><line
@ -87,23 +84,21 @@
<!-- <div>Appereance</div>-->
<color [color]="appliedCustomizationOptions.panel.background.color" label="Background color"
<color [color]="draftCustomizationOptions.panel.background.color" label="Background color"
(colorChange)=
" appliedCustomizationOptions.panel.background.color = $event;"></color>
" draftCustomizationOptions.panel.background.color = $event;"></color>
<div class="uk-margin-top uk-margin-small-bottom uk-text-bold">BUTTONS & LINKS</div>
<div class=" uk-grid-small uk-child-width-auto uk-grid">
<label><input [value]="true"
[(ngModel)]="appliedCustomizationOptions.panel.onDarkBackground" name="true"
[(ngModel)]="draftCustomizationOptions.panel.onDarkBackground" name="true"
type="radio"/>
for dark background</label>
<label><input [value]="false"
[(ngModel)]="appliedCustomizationOptions.panel.onDarkBackground" name="false"
[(ngModel)]="draftCustomizationOptions.panel.onDarkBackground" name="false"
type="radio"/> for light background</label>
</div>
<div class="uk-margin-top uk-margin-small-bottom uk-text-bold">QUICK LOOK
<span class="uk-icon uk-link " (click)="appliedCustomizationOptions.panel.onDarkBackground =
customizationOptions.panel.onDarkBackground;appliedCustomizationOptions.panel.background.color =
customizationOptions.panel.background.color;">
<span class="uk-icon uk-link " (click)="resetButtons()">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="refresh"><path fill="none" stroke="#000" stroke-width="1.1"
d="M17.08,11.15 C17.09,11.31 17.1,11.47 17.1,11.64 C17.1,15.53 13.94,18.69 10.05,18.69 C6.16,18.68 3,15.53 3,11.63 C3,7.74 6.16,4.58 10.05,4.58 C10.9,4.58 11.71,4.73 12.46,5"></path><polyline
@ -111,37 +106,37 @@
</span>
</div>
<div class="uk-padding-small uk-text-center"
[style.background-color]="appliedCustomizationOptions.panel.background.color">
<div [style.color]="appliedCustomizationOptions.panel.title.color"
[style.font-family]="appliedCustomizationOptions.panel.title.family"
[style.font-size]="appliedCustomizationOptions.panel.title.size+'px'"
[style.font-weight]="appliedCustomizationOptions.panel.title.weight">Banner Big Text
[style.background-color]="draftCustomizationOptions.panel.background.color">
<div [style.color]="draftCustomizationOptions.panel.title.color"
[style.font-family]="draftCustomizationOptions.panel.title.family"
[style.font-size]="draftCustomizationOptions.panel.title.size+'px'"
[style.font-weight]="draftCustomizationOptions.panel.title.weight">Banner Big Text
</div>
<div [style.color]="appliedCustomizationOptions.panel.fonts.color"
[style.font-family]="appliedCustomizationOptions.panel.fonts.family"
[style.font-size]="appliedCustomizationOptions.panel.fonts.size+'px'"
[style.font-weight]="appliedCustomizationOptions.panel.fonts.weight">Banner Small Text
<div [style.color]="draftCustomizationOptions.panel.fonts.color"
[style.font-family]="draftCustomizationOptions.panel.fonts.family"
[style.font-size]="draftCustomizationOptions.panel.fonts.size+'px'"
[style.font-weight]="draftCustomizationOptions.panel.fonts.weight">Banner Small Text
</div>
<div *ngIf="appliedCustomizationOptions.panel.onDarkBackground">
<div *ngIf="draftCustomizationOptions.panel.onDarkBackground">
<a class="" [style]="linkDarkBackgroundPreview"
(mouseover)="linkDarkBackgroundPreview=changeFontsStyle(appliedCustomizationOptions.links.darkBackground, appliedCustomizationOptions.links.darkBackground.onHover.color);"
(mouseout)="linkDarkBackgroundPreview=changeFontsStyle(appliedCustomizationOptions.links.darkBackground, appliedCustomizationOptions.links.darkBackground.color);">Link</a>
(mouseover)="linkDarkBackgroundPreview=changeFontsStyle(draftCustomizationOptions.links.darkBackground, draftCustomizationOptions.links.darkBackground.onHover.color);"
(mouseout)="linkDarkBackgroundPreview=changeFontsStyle(draftCustomizationOptions.links.darkBackground, draftCustomizationOptions.links.darkBackground.color);">Link</a>
<br>
<a class="uk-button" [style]="buttonDarkBackgroundPreview"
(mouseover)="buttonDarkBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.darkBackground.onHover, appliedCustomizationOptions.buttons.darkBackground);"
(mouseout)="buttonDarkBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.darkBackground);">Button</a>
(mouseover)="buttonDarkBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.darkBackground.onHover, draftCustomizationOptions.buttons.darkBackground);"
(mouseout)="buttonDarkBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.darkBackground);">Button</a>
</div>
<div *ngIf="!appliedCustomizationOptions.panel.onDarkBackground">
<div *ngIf="!draftCustomizationOptions.panel.onDarkBackground">
<a class="" [style]="linkLightBackgroundPreview"
(mouseover)="linkLightBackgroundPreview=changeFontsStyle(appliedCustomizationOptions.links.lightBackground,
appliedCustomizationOptions.links.lightBackground.onHover.color);"
(mouseout)="linkLightBackgroundPreview=changeFontsStyle(appliedCustomizationOptions.links.lightBackground, appliedCustomizationOptions.links.lightBackground.color);">Link</a>
(mouseover)="linkLightBackgroundPreview=changeFontsStyle(draftCustomizationOptions.links.lightBackground,
draftCustomizationOptions.links.lightBackground.onHover.color);"
(mouseout)="linkLightBackgroundPreview=changeFontsStyle(draftCustomizationOptions.links.lightBackground, draftCustomizationOptions.links.lightBackground.color);">Link</a>
<br>
<a class="uk-button" [style]="buttonLightBackgroundPreview"
(mouseover)="buttonLightBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.lightBackground.onHover, appliedCustomizationOptions.buttons.lightBackground);"
(mouseout)="buttonLightBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.lightBackground);">
(mouseover)="buttonLightBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.lightBackground.onHover, draftCustomizationOptions.buttons.lightBackground);"
(mouseout)="buttonLightBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.lightBackground);">
Button</a>
</div>
@ -161,7 +156,7 @@
<div *ngIf="menuSelected == 'fonts'" class=" ">
<div class="uk-background-primary uk-padding-small uk-light">
<a class="uk-margin-right uk-link " (click)="menuSelected = 'main'">
<a class="uk-margin-right uk-link " (click)="back();">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="arrow-left"><polyline fill="none" stroke="#000"
points="10 14 5 9.5 10 5"></polyline><line
@ -178,18 +173,18 @@
<a class="uk-accordion-title" href="#">Banner Big Text</a>
<div class="uk-accordion-content uk-margin-remove-top">
<font-size [font]="appliedCustomizationOptions.panel.title.family"
[size]="appliedCustomizationOptions.panel.title.size"
[weight]="appliedCustomizationOptions.panel.title.weight"
(fontChange)="appliedCustomizationOptions.panel.title.family=$event.font;
appliedCustomizationOptions.panel.title.size=$event.size;
appliedCustomizationOptions.panel.title.weight=$event.weight"></font-size>
<color [color]="appliedCustomizationOptions.panel.title.color"
<font-size [font]="draftCustomizationOptions.panel.title.family"
[size]="draftCustomizationOptions.panel.title.size"
[weight]="draftCustomizationOptions.panel.title.weight"
(fontChange)="draftCustomizationOptions.panel.title.family=$event.font;
draftCustomizationOptions.panel.title.size=$event.size;
draftCustomizationOptions.panel.title.weight=$event.weight"></font-size>
<color [color]="draftCustomizationOptions.panel.title.color"
(colorChange)=
" appliedCustomizationOptions.panel.title.color = $event;" [addMargin]="true"></color>
" draftCustomizationOptions.panel.title.color = $event;" [addMargin]="true"></color>
<div class="uk-margin-top uk-margin-small-bottom uk-text-bold">QUICK LOOK
<span class="uk-icon uk-link " (click)="appliedCustomizationOptions.panel.title =
copyObject(customizationOptions.panel.title);">
<span class="uk-icon uk-link " (click)="draftCustomizationOptions.panel.title =
copyObject(publishedCustomizationOptions.panel.title);">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="refresh"><path fill="none" stroke="#000" stroke-width="1.1"
d="M17.08,11.15 C17.09,11.31 17.1,11.47 17.1,11.64 C17.1,15.53 13.94,18.69 10.05,18.69 C6.16,18.68 3,15.53 3,11.63 C3,7.74 6.16,4.58 10.05,4.58 C10.9,4.58 11.71,4.73 12.46,5"></path><polyline
@ -197,11 +192,11 @@
</span>
</div>
<div class="uk-padding-small uk-text-center"
[style.background-color]="appliedCustomizationOptions.panel.background.color">
<div [style.color]="appliedCustomizationOptions.panel.title.color"
[style.font-family]="appliedCustomizationOptions.panel.title.family"
[style.font-size]="appliedCustomizationOptions.panel.title.size+'px'"
[style.font-weight]="appliedCustomizationOptions.panel.title.weight">Banner Big Text
[style.background-color]="draftCustomizationOptions.panel.background.color">
<div [style.color]="draftCustomizationOptions.panel.title.color"
[style.font-family]="draftCustomizationOptions.panel.title.family"
[style.font-size]="draftCustomizationOptions.panel.title.size+'px'"
[style.font-weight]="draftCustomizationOptions.panel.title.weight">Banner Big Text
</div>
</div>
</div>
@ -215,19 +210,18 @@
<div class="uk-accordion-content uk-margin-remove-top">
<font-size [font]="appliedCustomizationOptions.panel.fonts.family"
[size]="appliedCustomizationOptions.panel.fonts.size"
[weight]="appliedCustomizationOptions.panel.fonts.weight"
(fontChange)="appliedCustomizationOptions.panel.fonts.family=$event.font;
appliedCustomizationOptions.panel.fonts.size=$event.size;
appliedCustomizationOptions.panel.fonts.weight=$event.weight"
<font-size [font]="draftCustomizationOptions.panel.fonts.family"
[size]="draftCustomizationOptions.panel.fonts.size"
[weight]="draftCustomizationOptions.panel.fonts.weight"
(fontChange)="draftCustomizationOptions.panel.fonts.family=$event.font;
draftCustomizationOptions.panel.fonts.size=$event.size;
draftCustomizationOptions.panel.fonts.weight=$event.weight"
></font-size>
<color [color]="appliedCustomizationOptions.panel.fonts.color"
<color [color]="draftCustomizationOptions.panel.fonts.color"
(colorChange)=
" appliedCustomizationOptions.panel.fonts.color = $event;" [addMargin]="true"></color>
" draftCustomizationOptions.panel.fonts.color = $event;" [addMargin]="true"></color>
<div class="uk-margin-top uk-margin-small-bottom uk-text-bold">QUICK LOOK
<span class="uk-icon uk-link " (click)="appliedCustomizationOptions.panel.fonts =
copyObject(customizationOptions.panel.fonts);">
<span class="uk-icon uk-link " (click)="resetFontsSmall()">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="refresh"><path fill="none" stroke="#000" stroke-width="1.1"
d="M17.08,11.15 C17.09,11.31 17.1,11.47 17.1,11.64 C17.1,15.53 13.94,18.69 10.05,18.69 C6.16,18.68 3,15.53 3,11.63 C3,7.74 6.16,4.58 10.05,4.58 C10.9,4.58 11.71,4.73 12.46,5"></path><polyline
@ -235,11 +229,11 @@
</span>
</div>
<div class="uk-padding-small uk-text-center"
[style.background-color]="appliedCustomizationOptions.panel.background.color">
<div [style.color]="appliedCustomizationOptions.panel.fonts.color"
[style.font-family]="appliedCustomizationOptions.panel.fonts.family"
[style.font-size]="appliedCustomizationOptions.panel.fonts.size+'px'"
[style.font-weight]="appliedCustomizationOptions.panel.fonts.weight">Banner Small Text
[style.background-color]="draftCustomizationOptions.panel.background.color">
<div [style.color]="draftCustomizationOptions.panel.fonts.color"
[style.font-family]="draftCustomizationOptions.panel.fonts.family"
[style.font-size]="draftCustomizationOptions.panel.fonts.size+'px'"
[style.font-weight]="draftCustomizationOptions.panel.fonts.weight">Banner Small Text
</div>
</div>
@ -260,23 +254,22 @@
<ul class="uk-switcher uk-margin">
<li>
<font-size [font]="appliedCustomizationOptions.links.darkBackground.family"
[size]="appliedCustomizationOptions.links.darkBackground.size"
[weight]="appliedCustomizationOptions.links.darkBackground.weight"
(fontChange)="appliedCustomizationOptions.links.darkBackground.family=$event.font;
appliedCustomizationOptions.links.darkBackground.size=$event.size;
appliedCustomizationOptions.links.darkBackground.weight=$event.weight; linkDarkBackgroundPreview=changeFontsStyle(appliedCustomizationOptions.links.darkBackground, appliedCustomizationOptions.links.darkBackground.color);"
<font-size [font]="draftCustomizationOptions.links.darkBackground.family"
[size]="draftCustomizationOptions.links.darkBackground.size"
[weight]="draftCustomizationOptions.links.darkBackground.weight"
(fontChange)="draftCustomizationOptions.links.darkBackground.family=$event.font;
draftCustomizationOptions.links.darkBackground.size=$event.size;
draftCustomizationOptions.links.darkBackground.weight=$event.weight; linkDarkBackgroundPreview=changeFontsStyle(draftCustomizationOptions.links.darkBackground, draftCustomizationOptions.links.darkBackground.color);"
></font-size>
<!-- <div>Appereance</div>-->
<color [color]="appliedCustomizationOptions.links.darkBackground.color" (colorChange)=
" appliedCustomizationOptions.links.darkBackground.color = $event; linkDarkBackgroundPreview =
changeFontsStyle(appliedCustomizationOptions.links.darkBackground, appliedCustomizationOptions.links.darkBackground.color)"></color>
<color [color]="draftCustomizationOptions.links.darkBackground.color" (colorChange)=
" draftCustomizationOptions.links.darkBackground.color = $event; linkDarkBackgroundPreview =
changeFontsStyle(draftCustomizationOptions.links.darkBackground, draftCustomizationOptions.links.darkBackground.color)"></color>
<div class="uk-margin-top uk-margin-small-bottom uk-text-bold">ON HOVER</div>
<color [color]="appliedCustomizationOptions.links.darkBackground.onHover.color" (colorChange)=
" appliedCustomizationOptions.links.darkBackground.onHover.color = $event;"></color>
<color [color]="draftCustomizationOptions.links.darkBackground.onHover.color" (colorChange)=
" draftCustomizationOptions.links.darkBackground.onHover.color = $event;"></color>
<div class="uk-margin-top uk-margin-small-bottom uk-text-bold">QUICK LOOK
<span class="uk-icon uk-link " (click)="appliedCustomizationOptions.links.darkBackground =
copyObject(customizationOptions.links.darkBackground);">
<span class="uk-icon uk-link " (click)="resetFontsLinksDark();">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="refresh"><path fill="none" stroke="#000" stroke-width="1.1"
d="M17.08,11.15 C17.09,11.31 17.1,11.47 17.1,11.64 C17.1,15.53 13.94,18.69 10.05,18.69 C6.16,18.68 3,15.53 3,11.63 C3,7.74 6.16,4.58 10.05,4.58 C10.9,4.58 11.71,4.73 12.46,5"></path><polyline
@ -285,21 +278,20 @@
</div>
<div class="uk-padding-small uk-text-center uk-background-primary ">
<a class="" [style]="linkDarkBackgroundPreview"
(mouseover)="linkDarkBackgroundPreview=changeFontsStyle(appliedCustomizationOptions.links.darkBackground, appliedCustomizationOptions.links.darkBackground.onHover.color);"
(mouseout)="linkDarkBackgroundPreview=changeFontsStyle(appliedCustomizationOptions.links.darkBackground, appliedCustomizationOptions.links.darkBackground.color);">Link</a>
(mouseover)="linkDarkBackgroundPreview=changeFontsStyle(draftCustomizationOptions.links.darkBackground, draftCustomizationOptions.links.darkBackground.onHover.color);"
(mouseout)="linkDarkBackgroundPreview=changeFontsStyle(draftCustomizationOptions.links.darkBackground, draftCustomizationOptions.links.darkBackground.color);">Link</a>
</div>
</li>
<li>
<!-- <div>Appereance</div>-->
<color [color]="appliedCustomizationOptions.links.lightBackground.color" (colorChange)=
" appliedCustomizationOptions.links.lightBackground.color = $event; linkLightBackgroundPreview=changeFontsStyle(appliedCustomizationOptions.links.lightBackground, appliedCustomizationOptions.links.lightBackground.color);"></color>
<color [color]="draftCustomizationOptions.links.lightBackground.color" (colorChange)=
" draftCustomizationOptions.links.lightBackground.color = $event; linkLightBackgroundPreview=changeFontsStyle(draftCustomizationOptions.links.lightBackground, draftCustomizationOptions.links.lightBackground.color);"></color>
<div class="uk-margin-top uk-margin-small-bottom uk-text-bold">ON HOVER</div>
<color [color]="appliedCustomizationOptions.links.lightBackground.onHover.color" (colorChange)=
" appliedCustomizationOptions.links.lightBackground.onHover.color = $event;"></color>
<color [color]="draftCustomizationOptions.links.lightBackground.onHover.color" (colorChange)=
" draftCustomizationOptions.links.lightBackground.onHover.color = $event;"></color>
<div class="uk-margin-top uk-margin-small-bottom uk-text-bold">QUICK LOOK
<span class="uk-icon uk-link " (click)="appliedCustomizationOptions.links.lightBackground =
copyObject(customizationOptions.links.lightBackground);">
<span class="uk-icon uk-link " (click)="resetFontsLinksLight();">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="refresh"><path fill="none" stroke="#000" stroke-width="1.1"
d="M17.08,11.15 C17.09,11.31 17.1,11.47 17.1,11.64 C17.1,15.53 13.94,18.69 10.05,18.69 C6.16,18.68 3,15.53 3,11.63 C3,7.74 6.16,4.58 10.05,4.58 C10.9,4.58 11.71,4.73 12.46,5"></path><polyline
@ -308,9 +300,9 @@
</div>
<div class="uk-padding-small uk-text-center ">
<a class="" [style]="linkLightBackgroundPreview"
(mouseover)="linkLightBackgroundPreview=changeFontsStyle(appliedCustomizationOptions.links.lightBackground,
appliedCustomizationOptions.links.lightBackground.onHover.color);"
(mouseout)="linkLightBackgroundPreview=changeFontsStyle(appliedCustomizationOptions.links.lightBackground, appliedCustomizationOptions.links.lightBackground.color);">Link</a>
(mouseover)="linkLightBackgroundPreview=changeFontsStyle(draftCustomizationOptions.links.lightBackground,
draftCustomizationOptions.links.lightBackground.onHover.color);"
(mouseout)="linkLightBackgroundPreview=changeFontsStyle(draftCustomizationOptions.links.lightBackground, draftCustomizationOptions.links.lightBackground.color);">Link</a>
</div>
</li>
</ul>
@ -324,7 +316,7 @@
<div *ngIf="menuSelected == 'elements'" class=" ">
<div class="uk-background-primary uk-padding-small uk-light">
<a class="uk-margin-right uk-link " (click)="menuSelected = 'main'">
<a class="uk-margin-right uk-link " (click)="back();">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="arrow-left"><polyline fill="none" stroke="#000"
points="10 14 5 9.5 10 5"></polyline><line
@ -340,15 +332,14 @@
<a class="uk-accordion-title" href="#"> Subject tags & Statistics cubes</a>
<div class="uk-accordion-content uk-margin-remove-top">
<!-- <div>Appereance</div>-->
<color [color]="appliedCustomizationOptions.panel.panelElements.backgroundColor" (colorChange)=
" appliedCustomizationOptions.panel.panelElements.backgroundColor= $event;"
<color [color]="draftCustomizationOptions.panel.panelElements.backgroundColor" (colorChange)=
" draftCustomizationOptions.panel.panelElements.backgroundColor= $event;"
label="Background Color"></color>
<div class="uk-margin-small-top">FONTS</div>
<color [color]="appliedCustomizationOptions.panel.panelElements.color" (colorChange)=
" appliedCustomizationOptions.panel.panelElements.color= $event;"></color>
<color [color]="draftCustomizationOptions.panel.panelElements.color" (colorChange)=
" draftCustomizationOptions.panel.panelElements.color= $event;"></color>
<div class="uk-margin-top uk-margin-small-bottom uk-text-bold">QUICK LOOK
<span class="uk-icon uk-link " (click)="appliedCustomizationOptions.panel.panelElements =
copyObject(customizationOptions.panel.panelElements);">
<span class="uk-icon uk-link " (click)="resetElements()">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="refresh"><path fill="none" stroke="#000" stroke-width="1.1"
d="M17.08,11.15 C17.09,11.31 17.1,11.47 17.1,11.64 C17.1,15.53 13.94,18.69 10.05,18.69 C6.16,18.68 3,15.53 3,11.63 C3,7.74 6.16,4.58 10.05,4.58 C10.9,4.58 11.71,4.73 12.46,5"></path><polyline
@ -356,14 +347,14 @@
</span>
</div>
<div class="uk-padding-small uk-text-center"
[style.background-color]="appliedCustomizationOptions.panel.background.color">
[style.background-color]="draftCustomizationOptions.panel.background.color">
<div class="uk-card uk-padding-small uk-margin-auto" style="width:100px; height:100px"
[style.background-color]="appliedCustomizationOptions.panel.panelElements.backgroundColor"
[style.color]="appliedCustomizationOptions.panel.panelElements.color">Statistics cube
[style.background-color]="draftCustomizationOptions.panel.panelElements.backgroundColor"
[style.color]="draftCustomizationOptions.panel.panelElements.color">Statistics cube
</div>
<div class="uk-label uk-margin-top"
[style.background-color]="appliedCustomizationOptions.panel.panelElements.backgroundColor"
[style.color]="appliedCustomizationOptions.panel.panelElements.color">Subject tag
[style.background-color]="draftCustomizationOptions.panel.panelElements.backgroundColor"
[style.color]="draftCustomizationOptions.panel.panelElements.color">Subject tag
</div>
</div>
@ -377,7 +368,7 @@
<div *ngIf="menuSelected == 'identity'" class=" ">
<div class="uk-background-primary uk-padding-small uk-light">
<a class="uk-margin-right uk-link " (click)="menuSelected = 'main'">
<a class="uk-margin-right uk-link " (click)="back();">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="arrow-left"><polyline fill="none" stroke="#000"
points="10 14 5 9.5 10 5"></polyline><line
@ -386,33 +377,103 @@
</div>
<ng-container
*ngTemplateOutlet="applyResetButtons ; context: { }"></ng-container>
<div class="uk-alert uk-alert-primary uk-text-small uk-padding-small"> Tooltip ....</div>
<div class="uk-alert uk-alert-primary uk-text-small uk-padding-small">Identity colors are used in several
points (e.g paging, accordions, tabs, etc) in your community RCD.<br> Hint: it can't be white!
</div>
<div class="uk-padding-small customizationMenuItems uk-margin-small">
<ul uk-accordion>
<li class="uk-open">
<a class="uk-accordion-title" href="#"> Identity Color</a>
<a class="uk-accordion-title" href="#"> Identity Colors</a>
<div class="uk-accordion-content uk-margin-remove-top">
<!-- <div>Primary color</div>-->
<color [color]="appliedCustomizationOptions.mainColor" (colorChange)=
" appliedCustomizationOptions.mainColor= $event;" label="Primary color"></color>
<color [color]="draftCustomizationOptions.mainColor" (colorChange)=
" draftCustomizationOptions.mainColor= $event;" label="Primary color"></color>
<!-- <div class="uk-margin-small-top">Secondary color</div>-->
<color [color]="appliedCustomizationOptions.secondaryColor" (colorChange)=
" appliedCustomizationOptions.secondaryColor= $event;" label="Secondary color"></color>
<color [color]="draftCustomizationOptions.secondaryColor" (colorChange)=
" draftCustomizationOptions.secondaryColor= $event;" label="Secondary color"></color>
<div class="uk-margin-top uk-margin-small-bottom uk-text-bold">QUICK LOOK
<span class="uk-icon uk-link " (click)="appliedCustomizationOptions.mainColor =
customizationOptions.mainColor; appliedCustomizationOptions.secondaryColor =
customizationOptions.secondaryColor; ">
<span class="uk-icon uk-link " (click)="resetIdentity(); ">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="refresh"><path fill="none" stroke="#000" stroke-width="1.1"
d="M17.08,11.15 C17.09,11.31 17.1,11.47 17.1,11.64 C17.1,15.53 13.94,18.69 10.05,18.69 C6.16,18.68 3,15.53 3,11.63 C3,7.74 6.16,4.58 10.05,4.58 C10.9,4.58 11.71,4.73 12.46,5"></path><polyline
fill="none" stroke="#000" points="9.9 2 12.79 4.89 9.79 7.9"></polyline></svg>
</span>
</div>
<div style="border-style: solid; border-width: 2px; border-radius: 6px;" class="uk-padding-small"
[style.border-color]="draftCustomizationOptions.mainColor">
TODO
<ul class="uk-pagination uk-flex-center" uk-margin="">
<li class="uk-first-column"><a><span class="uk-icon uk-pagination-previous"
uk-pagination-previous="">
<svg [style.color]="draftCustomizationOptions.mainColor" data-svg="pagination-previous" height="12"
viewBox="0 0 7 12" width="7"
xmlns="http://www.w3.org/2000/svg"><polyline fill="none" points="6 1 1 6 6 11" stroke="#000"
stroke-width="1.2"></polyline></svg></span></a></li>
<li><a [style.color]="(hoveredText ==
'page-1'?draftCustomizationOptions.mainColor:'inherit')"
(mouseover)="hoveredText ='page-1'" (mouseout)="hoveredText =''">1</a></li>
<li><a class="uk-active" [style.background-color]="draftCustomizationOptions.mainColor"
[style.color]="'white'">2</a></li>
<li><a [style.color]="(hoveredText ==
'page-3'?draftCustomizationOptions.mainColor:'inherit')"
(mouseover)="hoveredText ='page-3'" (mouseout)="hoveredText =''">3</a></li>
<li><a><span
class="uk-icon uk-pagination-next" uk-pagination-next=""><svg
[style.color]="draftCustomizationOptions.mainColor"
data-svg="pagination-next" height="12" viewBox="0 0 7 12" width="7"
xmlns="http://www.w3.org/2000/svg"><polyline fill="none" points="1 1 6 6 1 11" stroke="#000"
stroke-width="1.2"></polyline></svg></span></a></li>
</ul>
<hr [style.border-color]="draftCustomizationOptions.mainColor">
<ul class="uk-accordion" uk-accordion="">
<li class=""><a class="uk-accordion-title"
[style.border-color]="draftCustomizationOptions.mainColor"
[style.color]="(hoveredText ==
'accordion-1'?draftCustomizationOptions.secondaryColor:draftCustomizationOptions.mainColor)"
(mouseover)="hoveredText ='accordion-1'" (mouseout)="hoveredText =''">Item
1</a>
<div aria-hidden="true" class="uk-accordion-content" hidden="">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.</p>
</div>
</li>
<li><a class="uk-accordion-title"
[style.border-color]="draftCustomizationOptions.mainColor" [style.color]="(hoveredText ==
'accordion-2'?draftCustomizationOptions.secondaryColor:draftCustomizationOptions.mainColor)"
(mouseover)="hoveredText ='accordion-2'" (mouseout)="hoveredText =''">Item
2</a>
<div aria-hidden="false" class="uk-accordion-content">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.</p>
</div>
</li>
<li><a class="uk-accordion-title"
[style.border-color]="draftCustomizationOptions.mainColor" [style.color]="(hoveredText ==
'accordion-3'?draftCustomizationOptions.secondaryColor:draftCustomizationOptions.mainColor)"
(mouseover)="hoveredText ='accordion-3'" (mouseout)="hoveredText =''">Item 3</a>
<div aria-hidden="true" class="uk-accordion-content" hidden="">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.</p>
</div>
</li>
</ul>
<hr [style.border-color]="draftCustomizationOptions.mainColor">
<ul class="uk-tab">
<li class="uk-active"><a [style.border-color]="draftCustomizationOptions.mainColor"
[style.color]="draftCustomizationOptions.mainColor">Active</a></li>
<li><a [style.border-color]="(hoveredText ==
'tab-2'?draftCustomizationOptions.secondaryColor:'')"
[style.color]="(hoveredText ==
'tab-2'?draftCustomizationOptions.secondaryColor:'inherit')"
(mouseover)="hoveredText ='tab-2'" (mouseout)="hoveredText =''">Item</a></li>
</ul>
<div [style.color]="draftCustomizationOptions.mainColor">Text in primary
color
</div>
<div [style.color]="draftCustomizationOptions.secondaryColor">Text in secondary
color
</div>
</div>
</div>
</li>
</ul>
@ -422,7 +483,7 @@
</div>
<div *ngIf="menuSelected == 'buttons'" class=" ">
<div class="uk-background-primary uk-padding-small uk-light">
<a class="uk-margin-right uk-link " (click)="menuSelected = 'main'">
<a class="uk-margin-right uk-link " (click)="back();">
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="arrow-left"><polyline fill="none" stroke="#000"
points="10 14 5 9.5 10 5"></polyline><line
@ -445,38 +506,37 @@
<ul class="uk-switcher uk-margin">
<li>
<border [style]="appliedCustomizationOptions.buttons.darkBackground.borderStyle" [width]=
"appliedCustomizationOptions.buttons.darkBackground.borderWidth" [radius]=
"appliedCustomizationOptions.buttons.darkBackground.borderRadius" (borderChange)=
" appliedCustomizationOptions.buttons.darkBackground.borderStyle = $event.style;
appliedCustomizationOptions.buttons.darkBackground.borderRadius = $event.radius;
appliedCustomizationOptions.buttons.darkBackground.borderWidth = $event.width; buttonDarkBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.darkBackground);"></border>
<color [color]="appliedCustomizationOptions.buttons.darkBackground.color" (colorChange)=
" appliedCustomizationOptions.buttons.darkBackground.color = $event; buttonDarkBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.darkBackground);"
<border [style]="draftCustomizationOptions.buttons.darkBackground.borderStyle" [width]=
"draftCustomizationOptions.buttons.darkBackground.borderWidth" [radius]=
"draftCustomizationOptions.buttons.darkBackground.borderRadius" (borderChange)=
" draftCustomizationOptions.buttons.darkBackground.borderStyle = $event.style;
draftCustomizationOptions.buttons.darkBackground.borderRadius = $event.radius;
draftCustomizationOptions.buttons.darkBackground.borderWidth = $event.width; buttonDarkBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.darkBackground);"></border>
<color [color]="draftCustomizationOptions.buttons.darkBackground.color" (colorChange)=
" draftCustomizationOptions.buttons.darkBackground.color = $event; buttonDarkBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.darkBackground);"
label="Fonts Color"
[addMargin]="true"></color>
<color [color]="appliedCustomizationOptions.buttons.darkBackground.backgroundColor" (colorChange)=
" appliedCustomizationOptions.buttons.darkBackground.backgroundColor = $event; buttonDarkBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.darkBackground);"
<color [color]="draftCustomizationOptions.buttons.darkBackground.backgroundColor" (colorChange)=
" draftCustomizationOptions.buttons.darkBackground.backgroundColor = $event; buttonDarkBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.darkBackground);"
label="Background Color" [addMargin]="true"></color>
<color [color]="appliedCustomizationOptions.buttons.darkBackground.borderColor" (colorChange)=
" appliedCustomizationOptions.buttons.darkBackground.borderColor = $event; buttonDarkBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.darkBackground);"
<color [color]="draftCustomizationOptions.buttons.darkBackground.borderColor" (colorChange)=
" draftCustomizationOptions.buttons.darkBackground.borderColor = $event; buttonDarkBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.darkBackground);"
label="Border Color"
[addMargin]="true"
></color>
<div class="uk-margin-top uk-margin-small-bottom uk-text-bold">ON HOVER</div>
<color [color]="appliedCustomizationOptions.buttons.darkBackground.onHover.color" (colorChange)=
" appliedCustomizationOptions.buttons.darkBackground.onHover.color = $event;" label="Fonts Color"
<color [color]="draftCustomizationOptions.buttons.darkBackground.onHover.color" (colorChange)=
" draftCustomizationOptions.buttons.darkBackground.onHover.color = $event;" label="Fonts Color"
></color>
<color [color]="appliedCustomizationOptions.buttons.darkBackground.onHover.backgroundColor"
<color [color]="draftCustomizationOptions.buttons.darkBackground.onHover.backgroundColor"
(colorChange)=
" appliedCustomizationOptions.buttons.darkBackground.onHover.backgroundColor = $event;"
" draftCustomizationOptions.buttons.darkBackground.onHover.backgroundColor = $event;"
label="Background Color" [addMargin]="true"></color>
<color [color]="appliedCustomizationOptions.buttons.darkBackground.onHover.borderColor" (colorChange)=
" appliedCustomizationOptions.buttons.darkBackground.onHover.borderColor = $event;"
<color [color]="draftCustomizationOptions.buttons.darkBackground.onHover.borderColor" (colorChange)=
" draftCustomizationOptions.buttons.darkBackground.onHover.borderColor = $event;"
label="Border Color" [addMargin]="true"></color>
<div class="uk-margin-top uk-margin-small-bottom uk-text-bold">QUICK LOOK
<span class="uk-icon uk-link " (click)="appliedCustomizationOptions.buttons.darkBackground =
copyObject(customizationOptions.buttons.darkBackground);">
<span class="uk-icon uk-link " (click)="resetButtonsDark();">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="refresh"><path fill="none" stroke="#000" stroke-width="1.1"
d="M17.08,11.15 C17.09,11.31 17.1,11.47 17.1,11.64 C17.1,15.53 13.94,18.69 10.05,18.69 C6.16,18.68 3,15.53 3,11.63 C3,7.74 6.16,4.58 10.05,4.58 C10.9,4.58 11.71,4.73 12.46,5"></path><polyline
@ -485,46 +545,45 @@
</div>
<div class="uk-background-primary uk-padding-small uk-text-center">
<a class="uk-button" [style]="buttonDarkBackgroundPreview"
(mouseover)="buttonDarkBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.darkBackground.onHover, appliedCustomizationOptions.buttons.darkBackground);"
(mouseout)="buttonDarkBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.darkBackground);">Button</a>
(mouseover)="buttonDarkBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.darkBackground.onHover, draftCustomizationOptions.buttons.darkBackground);"
(mouseout)="buttonDarkBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.darkBackground);">Button</a>
</div>
<!-- style="{color:green;} :hover { color: red; }"-->
</li>
<li>
<border [style]="appliedCustomizationOptions.buttons.lightBackground.borderStyle" [width]=
"appliedCustomizationOptions.buttons.lightBackground.borderWidth" [radius]=
"appliedCustomizationOptions.buttons.lightBackground.borderRadius" (borderChange)=
" appliedCustomizationOptions.buttons.lightBackground.borderStyle = $event.style;
appliedCustomizationOptions.buttons.lightBackground.borderRadius = $event.radius;
appliedCustomizationOptions.buttons.lightBackground.borderWidth = $event.width;
buttonLightBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.lightBackground); "></border>
<color [color]="appliedCustomizationOptions.buttons.lightBackground.color" (colorChange)=
" appliedCustomizationOptions.buttons.lightBackground.color = $event; buttonLightBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.lightBackground);"
<border [style]="draftCustomizationOptions.buttons.lightBackground.borderStyle" [width]=
"draftCustomizationOptions.buttons.lightBackground.borderWidth" [radius]=
"draftCustomizationOptions.buttons.lightBackground.borderRadius" (borderChange)=
" draftCustomizationOptions.buttons.lightBackground.borderStyle = $event.style;
draftCustomizationOptions.buttons.lightBackground.borderRadius = $event.radius;
draftCustomizationOptions.buttons.lightBackground.borderWidth = $event.width;
buttonLightBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.lightBackground); "></border>
<color [color]="draftCustomizationOptions.buttons.lightBackground.color" (colorChange)=
" draftCustomizationOptions.buttons.lightBackground.color = $event; buttonLightBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.lightBackground);"
label="Fonts Color"
[addMargin]="true"></color>
<color [color]="appliedCustomizationOptions.buttons.lightBackground.backgroundColor" (colorChange)=
" appliedCustomizationOptions.buttons.lightBackground.backgroundColor = $event; buttonLightBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.lightBackground);"
<color [color]="draftCustomizationOptions.buttons.lightBackground.backgroundColor" (colorChange)=
" draftCustomizationOptions.buttons.lightBackground.backgroundColor = $event; buttonLightBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.lightBackground);"
label="Background Color" [addMargin]="true"></color>
<color [color]="appliedCustomizationOptions.buttons.lightBackground.borderColor" (colorChange)=
" appliedCustomizationOptions.buttons.lightBackground.borderColor = $event; buttonLightBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.lightBackground);"
<color [color]="draftCustomizationOptions.buttons.lightBackground.borderColor" (colorChange)=
" draftCustomizationOptions.buttons.lightBackground.borderColor = $event; buttonLightBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.lightBackground);"
label="Border Color"
[addMargin]="true"
></color>
<div class="uk-margin-top uk-margin-small-bottom uk-text-bold">ON HOVER</div>
<color [color]="appliedCustomizationOptions.buttons.lightBackground.onHover.color" (colorChange)=
" appliedCustomizationOptions.buttons.lightBackground.onHover.color = $event; " label="Fonts Color"
<color [color]="draftCustomizationOptions.buttons.lightBackground.onHover.color" (colorChange)=
" draftCustomizationOptions.buttons.lightBackground.onHover.color = $event; " label="Fonts Color"
></color>
<color [color]="appliedCustomizationOptions.buttons.lightBackground.onHover.backgroundColor"
<color [color]="draftCustomizationOptions.buttons.lightBackground.onHover.backgroundColor"
(colorChange)=
" appliedCustomizationOptions.buttons.lightBackground.onHover.backgroundColor = $event;"
" draftCustomizationOptions.buttons.lightBackground.onHover.backgroundColor = $event;"
label="Background Color" [addMargin]="true"></color>
<color [color]="appliedCustomizationOptions.buttons.lightBackground.onHover.borderColor"
<color [color]="draftCustomizationOptions.buttons.lightBackground.onHover.borderColor"
(colorChange)=
" appliedCustomizationOptions.buttons.lightBackground.onHover.borderColor = $event;"
" draftCustomizationOptions.buttons.lightBackground.onHover.borderColor = $event;"
label="Border Color" [addMargin]="true"></color>
<div class="uk-margin-top uk-margin-small-bottom uk-text-bold">QUICK LOOK
<span class="uk-icon uk-link " (click)="appliedCustomizationOptions.buttons.lightBackground =
copyObject(customizationOptions.buttons.lightBackground);">
<span class="uk-icon uk-link " (click)="resetButtonsLight();">
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
data-svg="refresh"><path fill="none" stroke="#000" stroke-width="1.1"
d="M17.08,11.15 C17.09,11.31 17.1,11.47 17.1,11.64 C17.1,15.53 13.94,18.69 10.05,18.69 C6.16,18.68 3,15.53 3,11.63 C3,7.74 6.16,4.58 10.05,4.58 C10.9,4.58 11.71,4.73 12.46,5"></path><polyline
@ -533,8 +592,8 @@
</div>
<div class=" uk-padding-small uk-text-center">
<a class="uk-button" [style]="buttonLightBackgroundPreview"
(mouseover)="buttonLightBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.lightBackground.onHover, appliedCustomizationOptions.buttons.lightBackground);"
(mouseout)="buttonLightBackgroundPreview=changeStyle(appliedCustomizationOptions.buttons.lightBackground);">
(mouseover)="buttonLightBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.lightBackground.onHover, draftCustomizationOptions.buttons.lightBackground);"
(mouseout)="buttonLightBackgroundPreview=changeStyle(draftCustomizationOptions.buttons.lightBackground);">
Button</a>
</div>
</li>
@ -552,9 +611,19 @@
Publish
</button>
</div>
<div class="uk-width-3-4">
<iframe [src]="previewUrl" class="" width="100%" height="100%"></iframe>
<div class="uk-width-4-5 uk-padding-remove-left">
<iframe [src]="previewUrl" class="" width="100%" height="100%"></iframe>
</div>
</div>
<modal-alert #backAlert (alertOutput)="resetToAppliedOptions()" >
<div class="uk-text-bold uk-h5">If you leave that Page without applying or publishing, changes will be lost.</div>
<div> Are you sure that you want to proceed?</div>
</modal-alert>
<modal-alert #exitAlert (alertOutput)="exitCustomization()" >
<div class="uk-text-bold uk-h5">If you leave that Page without applying or publishing, changes will be lost.</div>
<div> Are you sure that you want to proceed?</div>
</modal-alert>

View File

@ -1,4 +1,4 @@
import {Component, ElementRef, OnInit} from '@angular/core';
import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
@ -9,7 +9,8 @@ import {Curator} from '../../openaireLibrary/utils/entities/CuratorInfo';
import {DomSanitizer} from '@angular/platform-browser';
import {CustomizationOptions} from '../../openaireLibrary/connect/community/CustomizationOptions';
import {StringUtils} from '../../openaireLibrary/utils/string-utils.class';
import {LayoutService} from "../../openaireLibrary/services/layout.service";
import {LayoutService} from '../../openaireLibrary/services/layout.service';
import {AlertModal} from '../../openaireLibrary/utils/modal/alert';
@Component({
selector: 'customization',
@ -20,35 +21,32 @@ export class CustomizationComponent implements OnInit {
menuSelected = 'main';
color = 'white';
communityUrl = 'http://mpagasas.di.uoa.gr:4200/?communityId=ee';
customizationOptions: CustomizationOptions = new CustomizationOptions();
appliedCustomizationOptions: CustomizationOptions = this.copyObject(this.customizationOptions);
previewUrl = this.getCommunityUrlSatinized(this.appliedCustomizationOptions);
communityUrl = 'http://scoobydoo.di.uoa.gr:4200/?communityId=ee';
publishedCustomizationOptions: CustomizationOptions = null;
draftCustomizationOptions: CustomizationOptions = null;
appliedCustomizationOptions: CustomizationOptions = null;
previewUrl = null;
previewCustomization = null;
buttonDarkBackgroundPreview;
buttonLightBackgroundPreview;
linkDarkBackgroundPreview;
linkLightBackgroundPreview;
hoveredText;
public showLoading = true;
public updateErrorMessage = '';
public successfulSaveMessage = '';
public curatorsEnabled;
public newCurator;
public communityId = null;
public affiliationsChanged = false;
public hasChanged = false;
public curatorId = null;
public curator: Curator = null;
public photo: any = null;
public properties: EnvProperties = null;
private file: File = null;
private maxsize: number = 200 * 1024;
public enabled = true;
private deletePhoto = false;
@ViewChild('backAlert') backAlert: AlertModal;
@ViewChild('exitAlert') exitAlert: AlertModal;
constructor(private element: ElementRef,
private route: ActivatedRoute,
@ -59,8 +57,6 @@ export class CustomizationComponent implements OnInit {
ngOnInit() {
this.initializeCustomizationOptions();
console.log(this.customizationOptions);
this.route.data.subscribe((data: { envSpecific: EnvProperties }) => {
this.properties = data.envSpecific;
if (!Session.isLoggedIn()) {
@ -73,11 +69,11 @@ export class CustomizationComponent implements OnInit {
this.showLoading = true;
this.updateErrorMessage = '';
this.layoutService.getLayout(this.communityId, this.properties.adminToolsAPIURL + 'community/').subscribe(layout => {
this.customizationOptions = layout;
this.appliedCustomizationOptions = this.copyObject(this.customizationOptions);
this.communityUrl = 'http://mpagasas.di.uoa.gr:4200/?communityId=' + this.communityId;
this.initializeCustomizationOptions();
this.previewUrl = this.getCommunityUrlSatinized(this.appliedCustomizationOptions);
this.publishedCustomizationOptions = layout;
this.initializeCustomizationOptions(true);
}, error => {
this.publishedCustomizationOptions = new CustomizationOptions();
this.initializeCustomizationOptions(true);
});
});
}
@ -86,21 +82,131 @@ export class CustomizationComponent implements OnInit {
}
saveLayout() {
this.layoutService.
saveLayout(this.communityId, this.properties.adminToolsAPIURL + 'community/', this.appliedCustomizationOptions).subscribe(layout => {
this.customizationOptions = layout;
this.appliedCustomizationOptions = this.copyObject(this.customizationOptions);
this.initializeCustomizationOptions();
this.previewUrl = this.getCommunityUrlSatinized(this.appliedCustomizationOptions);
this.layoutService.saveLayout(this.communityId, this.properties.adminToolsAPIURL + 'community/', this.draftCustomizationOptions).subscribe(layout => {
this.publishedCustomizationOptions = layout;
this.initializeCustomizationOptions(JSON.stringify(this.publishedCustomizationOptions) != this.previewCustomization);
});
}
initializeCustomizationOptions() {
this.buttonDarkBackgroundPreview = this.changeStyle(this.appliedCustomizationOptions.buttons.darkBackground);
this.buttonLightBackgroundPreview = this.changeStyle(this.appliedCustomizationOptions.buttons.lightBackground);
this.linkDarkBackgroundPreview = this.changeFontsStyle(this.appliedCustomizationOptions.links.darkBackground, this.appliedCustomizationOptions.links.darkBackground.color);
this.linkLightBackgroundPreview = this.changeStyle(this.appliedCustomizationOptions.links.lightBackground, this.appliedCustomizationOptions.links.lightBackground.color);
// this.previewUrl = this.getCommunityUrlSatinized(this.appliedCustomizationOptions);
initializeCustomizationOptions(updatePreviewUrl) {
this.draftCustomizationOptions = this.copyObject(this.publishedCustomizationOptions);
this.appliedCustomizationOptions = this.copyObject(this.publishedCustomizationOptions);
if(updatePreviewUrl){
this.previewUrl = this.getCommunityUrlSatinized(JSON.stringify(this.appliedCustomizationOptions));
}
this.buttonDarkBackgroundPreview = this.changeStyle(this.draftCustomizationOptions.buttons.darkBackground);
this.buttonLightBackgroundPreview = this.changeStyle(this.draftCustomizationOptions.buttons.lightBackground);
this.linkDarkBackgroundPreview = this.changeFontsStyle(this.draftCustomizationOptions.links.darkBackground, this.draftCustomizationOptions.links.darkBackground.color);
this.linkLightBackgroundPreview = this.changeStyle(this.draftCustomizationOptions.links.lightBackground, this.draftCustomizationOptions.links.lightBackground.color);
}
applyLayout() {
this.appliedCustomizationOptions = this.copyObject(this.draftCustomizationOptions);
if(JSON.stringify(this.appliedCustomizationOptions) != this.previewCustomization){
this.previewUrl = this.getCommunityUrlSatinized(JSON.stringify(this.appliedCustomizationOptions));
}
}
resetLayout() {
if (this.menuSelected == 'backgrounds') {
this.resetBackgrounds();
} else if (this.menuSelected == 'fonts') {
this.resetFonts();
} else if (this.menuSelected == 'elements') {
this.resetElements();
} else if (this.menuSelected == 'buttons') {
this.resetButtons();
} else if (this.menuSelected == 'identity') {
this.resetIdentity();
} else {
this.draftCustomizationOptions = this.copyObject(this.publishedCustomizationOptions);
this.appliedCustomizationOptions = this.copyObject(this.publishedCustomizationOptions);
}
// console.log(JSON.stringify(this.appliedCustomizationOptions))
// console.log(this.previewCustomization)
this.initializeCustomizationOptions(JSON.stringify(this.appliedCustomizationOptions) != this.previewCustomization);
}
resetBackgrounds() {
this.draftCustomizationOptions.panel.onDarkBackground = this.publishedCustomizationOptions.panel.onDarkBackground;
this.draftCustomizationOptions.panel.background.color = this.publishedCustomizationOptions.panel.background.color;
this.appliedCustomizationOptions.panel.onDarkBackground = this.publishedCustomizationOptions.panel.onDarkBackground;
this.appliedCustomizationOptions.panel.background.color = this.publishedCustomizationOptions.panel.background.color;
}
resetFonts() {
this.resetFontsBig();
this.resetFontsSmall();
this.resetFontsLinksDark();
this.resetFontsLinksLight();
}
resetFontsBig() {
this.draftCustomizationOptions.panel.title = this.copyObject(this.publishedCustomizationOptions.panel.title);
this.appliedCustomizationOptions.panel.title = this.copyObject(this.publishedCustomizationOptions.panel.title);
}
resetFontsSmall() {
this.draftCustomizationOptions.panel.fonts = this.copyObject(this.publishedCustomizationOptions.panel.fonts);
this.appliedCustomizationOptions.panel.fonts = this.copyObject(this.publishedCustomizationOptions.panel.fonts);
}
resetFontsLinksDark() {
this.draftCustomizationOptions.links.darkBackground = this.copyObject(this.publishedCustomizationOptions.links.darkBackground);
this.appliedCustomizationOptions.links.darkBackground = this.copyObject(this.publishedCustomizationOptions.links.darkBackground);
}
resetFontsLinksLight() {
this.draftCustomizationOptions.panel.title = this.copyObject(this.publishedCustomizationOptions.panel.title);
this.draftCustomizationOptions.links.lightBackground = this.copyObject(this.publishedCustomizationOptions.links.lightBackground);
this.appliedCustomizationOptions.panel.title = this.copyObject(this.publishedCustomizationOptions.panel.title);
this.appliedCustomizationOptions.links.lightBackground = this.copyObject(this.publishedCustomizationOptions.links.lightBackground);
}
resetElements() {
this.draftCustomizationOptions.panel.panelElements = this.copyObject(this.publishedCustomizationOptions.panel.panelElements);
this.appliedCustomizationOptions.panel.panelElements = this.copyObject(this.publishedCustomizationOptions.panel.panelElements);
}
resetButtons() {
this.resetButtonsDark();
this.resetButtonsLight();
}
resetButtonsDark() {
this.draftCustomizationOptions.buttons.darkBackground = this.copyObject(this.publishedCustomizationOptions.buttons.darkBackground);
this.appliedCustomizationOptions.buttons.darkBackground = this.copyObject(this.publishedCustomizationOptions.buttons.darkBackground);
}
resetButtonsLight() {
this.draftCustomizationOptions.buttons.lightBackground = this.copyObject(this.publishedCustomizationOptions.buttons.lightBackground);
this.appliedCustomizationOptions.buttons.lightBackground = this.copyObject(this.publishedCustomizationOptions.buttons.lightBackground);
}
resetIdentity() {
this.draftCustomizationOptions.mainColor = this.publishedCustomizationOptions.mainColor;
this.draftCustomizationOptions.secondaryColor = this.publishedCustomizationOptions.secondaryColor;
this.appliedCustomizationOptions.mainColor = this.publishedCustomizationOptions.mainColor;
this.appliedCustomizationOptions.secondaryColor = this.publishedCustomizationOptions.secondaryColor;
}
changeStyle(colorOptions, borderOptions = null) {
@ -109,22 +215,22 @@ export class CustomizationComponent implements OnInit {
borderOptions = colorOptions;
}
if (colorOptions.color) {
style += '; color:' + colorOptions.color;
style = style.concat('; color:' + colorOptions.color);
}
if (colorOptions.backgroundColor) {
style += '; background-color:' + colorOptions.backgroundColor;
style = style.concat( '; background-color:' + colorOptions.backgroundColor);
}
if (colorOptions.borderColor) {
style += '; border-color:' + colorOptions.borderColor;
style = style.concat('; border-color:' + colorOptions.borderColor);
}
if (borderOptions.borderStyle) {
style += '; border-style:' + borderOptions.borderStyle;
style = style.concat('; border-style:' + borderOptions.borderStyle);
}
if (borderOptions.borderWidth) {
style += '; border-width:' + borderOptions.borderWidth + 'px';
style = style.concat( '; border-width:' + borderOptions.borderWidth + 'px');
}
if (borderOptions.borderRadius) {
style += '; border-radius:' + borderOptions.borderRadius + 'px';
style = style.concat('; border-radius:' + borderOptions.borderRadius + 'px');
}
return this.sanitizer.bypassSecurityTrustStyle(style);
@ -136,32 +242,30 @@ export class CustomizationComponent implements OnInit {
if (options.family) {
style += '; font-family:' + options.family;
style = style.concat('; font-family:' + options.family);
}
if (options.size) {
style += '; font-size:' + options.size + 'px';
style = style.concat('; font-size:' + options.size + 'px');
}
if (options.weight) {
style += '; font-weight:' + options.weight;
style = style.concat('; font-weight:' + options.weight);
}
if (color) {
style += '; color:' + color;
style = style.concat('; color:' + color);
}
return this.sanitizer.bypassSecurityTrustStyle(style);
}
getCommunityUrlSatinized(customization: CustomizationOptions) {
return this.sanitizer.bypassSecurityTrustResourceUrl(this.getCommunityUrlNewLayout(customization));
getCommunityUrlSatinized(layout: string) {
return this.sanitizer.bypassSecurityTrustResourceUrl(this.getCommunityUrlNewLayout(layout));
}
getCommunityUrlNewLayout(customization: CustomizationOptions) {
// console.log("here!");
let layout = JSON.stringify(customization);
// console.log(layout);
getCommunityUrlNewLayout(layout: string) {
this.previewCustomization = layout;
return this.communityUrl + '&layout=' + StringUtils.URIEncode(layout);
}
@ -169,9 +273,41 @@ export class CustomizationComponent implements OnInit {
return JSON.parse(JSON.stringify(obj));
}
resetBackgroundsBanners() {
this.appliedCustomizationOptions.panel.onDarkBackground = this.customizationOptions.panel.onDarkBackground;
this.appliedCustomizationOptions.panel.background.color = this.customizationOptions.panel.background.color;
back() {
if (JSON.stringify(this.draftCustomizationOptions) == JSON.stringify(this.publishedCustomizationOptions) ||
JSON.stringify(this.draftCustomizationOptions) == JSON.stringify(this.appliedCustomizationOptions)) {
this.menuSelected = 'main';
} else {
this.backAlert.okButtonText = 'Yes';
this.backAlert.cancelButtonText = 'No';
this.backAlert.alertTitle = '';
this.backAlert.okButtonLeft = true;
this.backAlert.open();
}
}
resetToAppliedOptions() {
this.draftCustomizationOptions = this.copyObject(this.appliedCustomizationOptions);
this.menuSelected = 'main';
}
exit() {
if (JSON.stringify(this.appliedCustomizationOptions) == JSON.stringify(this.publishedCustomizationOptions)) {
this.exitCustomization();
} else {
this.exitAlert.okButtonText = 'Yes';
this.exitAlert.cancelButtonText = 'No';
this.exitAlert.alertTitle = '';
this.exitAlert.okButtonLeft = true;
this.exitAlert.open();
}
}
exitCustomization() {
this._router.navigate(['/dashboard'], {
queryParams: {'communityId': this.communityId}
});
}
}

View File

@ -11,11 +11,13 @@ import {FontSizeComponent} from './FontSize.component';
import {ColorComponent} from './Color.component';
import {BorderComponent} from './Border.component';
import {LayoutService} from '../../openaireLibrary/services/layout.service';
import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module';
// import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard';
// import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard';
@NgModule({
imports: [
CustomizationRoutingModule, CommonModule, FormsModule, RouterModule, ColorPickerModule
CustomizationRoutingModule, CommonModule, FormsModule, RouterModule, ColorPickerModule, AlertModalModule
],
declarations: [
CustomizationComponent, FontSizeComponent, ColorComponent, BorderComponent

View File

@ -9,11 +9,15 @@
Profile
</div>
<div class="target uk-margin">
Edit community information, change logo url, add community managers or organizations related to community.
Edit community information, change logo url, add community managers or organizations related to
community <span *ngIf="properties.environment == 'development'"> and customize css layout</span>.
</div>
<div>
<a routerLink="/community-edit-form" [queryParams]="{communityId: this.communityId}" class="uk-button uk-button-text">Community Profile</a><br>
<a routerLink="/organizations" [queryParams]="{communityId: this.communityId}" class="uk-button uk-button-text">Community Organizations</a>
<a routerLink="/organizations" [queryParams]="{communityId: this.communityId}" class="uk-button uk-button-text">Organizations</a>
<a *ngIf="properties.environment == 'development'" routerLink="/customize-layout"
[queryParams]="{communityId: this.communityId}"
class="uk-button uk-button-text">Customize Layout</a>
</div>
</div>
<div *ngIf="communityId != 'openaire' && this.communityId !== 'connect'" class="uk-card uk-card-default uk-card-body uk-card-hover">

View File

@ -124,3 +124,24 @@
height:100%;
border:0;
}
/*Customization*/
.customizationMenuPanel{
background-color: #999999;
}
.customizationMenuPanel .customizationMenuItems{
background-color: white;
border: white solid 1px;
border-radius: 14px;
}
.colorPicker input{
width:35px;
height: 15px;
border: 1px solid #707070;
border-radius: 2px;
opacity: 1;
}

View File

@ -34,7 +34,7 @@
"piwikBaseUrl" :" https://analytics.openaire.eu/piwik.php?idsite=6",
"loginUrl" :"http://rudie.di.uoa.gr:8080/dnet-login/openid_connect_login",
"userInfoUrl" : "http://scoobydoo.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=",
"userInfoUrl" : "http://rudie.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=",
"logoutUrl" :"https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=",