Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-102339 remove old elements from theme page #2499

Merged
merged 1 commit into from
Jul 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ApplicationRef, Input, Output, EventEmitter, Component, Injector, OnInit, ViewContainerRef, OnChanges, OnDestroy } from '@angular/core';
import { NgModel } from '@angular/forms';
import { ApplicationRef, Component, Injector, OnInit, OnChanges, OnDestroy } from '@angular/core';
import {Router} from '@angular/router';
import * as _ from 'lodash';
import { FieldConfig } from 'app/pages/common/entity/entity-form/models/field-config.interface';
Expand All @@ -9,7 +8,7 @@ import {RestService, WebSocketService} from 'app/services/';
import { ThemeService, Theme } from 'app/services/theme/theme.service';
import { CoreEvent, CoreService } from 'app/core/services/core.service';
import { Subject } from 'rxjs';
import { MatDialog, MatDialogRef, MatSnackBar } from '@angular/material';
import { MatDialog } from '@angular/material';
import { DialogService } from 'app/services/dialog.service';
import { T } from 'app/translate-marker';

Expand Down Expand Up @@ -41,7 +40,7 @@ export class CustomThemeComponent implements OnInit, OnChanges, OnDestroy {
description:'',
label:'',
labelSwatch:'',
hasDarkLogo:true,
hasDarkLogo:false,
accentColors:['violet','blue','magenta', 'cyan', 'red','green', 'orange', 'yellow'],
favorite:false,
primary:"",
Expand Down Expand Up @@ -111,36 +110,14 @@ export class CustomThemeComponent implements OnInit, OnChanges, OnDestroy {
placeholder: 'Menu Label',
required:true,
tooltip: 'Enter a short name for the theme. The Menu Label is \
shown when the theme is registered in the Favorites \
menu.',
},
{
type: 'select',
name: 'labelSwatch',
width:'100%',
placeholder: 'Menu Swatch',
required:true,
options:this.colorOptions,
tooltip: "Choose the color to display next to the Menu Label \
in the Favorites menu.",
class:'inline'
shown when the theme is listed in Preferences.'
},
{ type: 'input',
name : 'description',
width:'100%',
placeholder : 'Description',
tooltip: 'Enter a short description of the theme.',
},
{
type: 'checkbox',
name: 'favorite',
width:'100%',
placeholder: 'Add to Favorites',
tooltip: 'Set to add this theme to the favorites list. \
Favorites are always available on the top navigation \
bar.',
class:'inline'
},
{
type: 'checkbox',
name: 'hasDarkLogo',
Expand Down Expand Up @@ -422,7 +399,7 @@ export class CustomThemeComponent implements OnInit, OnChanges, OnDestroy {
case "FormSubmitted":
let valid:boolean = this.validateForm(evt.data);
if(valid){
evt.data.labelSwatch = evt.data.labelSwatch.slice(6, -1);
evt.data.labelSwatch = evt.data.primary.slice(6, -1);
evt.data.accentColors = ['blue', 'orange','green', 'violet','cyan', 'magenta', 'yellow','red'];
this.core.emit({name:"AddCustomThemePreference",data:evt.data});
this.globalPreview = false;
Expand Down