pull/2542/head
Yunus Emre Kalkan 6 years ago
commit 5f63cb0046

@ -23,7 +23,7 @@ namespace Volo.Docs.Documents
IDocumentStoreFactory documentStoreFactory,
IDistributedCache<DocumentWithDetailsDto> documentCache,
IDistributedCache<LanguageConfig> languageCache,
IDistributedCache<DocumentResourceDto> resourceCache,
IDistributedCache<DocumentResourceDto> resourceCache,
IHostEnvironment hostEnvironment)
{
_projectRepository = projectRepository;
@ -107,6 +107,11 @@ namespace Volo.Docs.Documents
try
{
if (string.IsNullOrWhiteSpace(project.ParametersDocumentName))
{
return await Task.FromResult<DocumentParametersDto>(null);
}
var document = await GetDocumentWithDetailsDtoAsync(
project,
project.ParametersDocumentName,

@ -91,7 +91,7 @@ namespace Volo.Docs.Pages.Documents.Project
try
{
await SetProjectAsync();
await SetProjectAsync();
}
catch (EntityNotFoundException e)
{
@ -391,7 +391,8 @@ namespace Volo.Docs.Pages.Documents.Project
private async Task ConvertDocumentContentToHtmlAsync()
{
await SetDocumentPreferences();
await SetDocumentPreferencesAsync();
SetUserPreferences();
UserPreferences.Add("Document_Language_Code", LanguageCode);
Document.Content = await _documentSectionRenderer.RenderAsync(Document.Content, UserPreferences);
@ -431,12 +432,13 @@ namespace Volo.Docs.Pages.Documents.Project
{
continue;
}
var key = keyValue.Split("=")[0];
var value = keyValue.Split("=")[1];
UserPreferences.Add(key, value);
UserPreferences.Add(key + "_Value", DocumentPreferences.Parameters?.FirstOrDefault(p=>p.Name == key)
?.Values.FirstOrDefault(v=>v.Key == value).Value);
UserPreferences.Add(key + "_Value", DocumentPreferences.Parameters?.FirstOrDefault(p => p.Name == key)
?.Values.FirstOrDefault(v => v.Key == value).Value);
}
}
@ -449,9 +451,11 @@ namespace Volo.Docs.Pages.Documents.Project
UserPreferences.Remove(keyValue.Key);
UserPreferences.Remove(keyValue.Key + "_Value");
}
UserPreferences.Add(keyValue.Key, keyValue.Value);
UserPreferences.Add(keyValue.Key + "_Value", DocumentPreferences.Parameters?.FirstOrDefault(p => p.Name == keyValue.Key)
?.Values.FirstOrDefault(v => v.Key == keyValue.Value).Value);
UserPreferences.Add(keyValue.Key + "_Value",
DocumentPreferences.Parameters?.FirstOrDefault(p => p.Name == keyValue.Key)?.Values
.FirstOrDefault(v => v.Key == keyValue.Value).Value);
}
if (DocumentPreferences?.Parameters == null)
@ -469,7 +473,7 @@ namespace Volo.Docs.Pages.Documents.Project
}
}
public async Task SetDocumentPreferences()
public async Task SetDocumentPreferencesAsync()
{
var projectParameters = await _documentAppService.GetParametersAsync(
new GetParametersDocumentInput

@ -6,24 +6,13 @@ export namespace Account {
readonly cancelContentRef?: TemplateRef<any>;
}
// tslint:disable-next-line: no-empty-interface
//tslint:disable
export interface AuthWrapperComponentOutputs {}
// tslint:disable-next-line: no-empty-interface
export interface TenantBoxComponentInputs {}
// tslint:disable-next-line: no-empty-interface
export interface TenantBoxComponentOutputs {}
// tslint:disable-next-line: no-empty-interface
export interface PersonalSettingsComponentInputs {}
// tslint:disable-next-line: no-empty-interface
export interface PersonalSettingsComponentOutputs {}
// tslint:disable-next-line: no-empty-interface
export interface ChangePasswordComponentInputs {}
// tslint:disable-next-line: no-empty-interface
export interface ChangePasswordComponentOutputs {}
// tslint:enable
}

@ -19,9 +19,9 @@ import { ABP } from '@abp/ng.core';
[attr.type]="buttonType"
[ngClass]="buttonClass"
[disabled]="loading || disabled"
(click.stop)="abpClick.next($event)"
(focus)="abpFocus.next($event)"
(blur)="abpBlur.next($event)"
(click.stop)="click.next($event); abpClick.next($event)"
(focus)="focus.next($event); abpFocus.next($event)"
(blur)="blur.next($event); abpBlur.next($event)"
>
<i [ngClass]="icon" class="mr-1"></i><ng-content></ng-content>
</button>
@ -49,6 +49,14 @@ export class ButtonComponent implements OnInit {
@Input()
attributes: ABP.Dictionary<string>;
// tslint:disable
@Output() readonly click = new EventEmitter<MouseEvent>();
@Output() readonly focus = new EventEmitter<FocusEvent>();
@Output() readonly blur = new EventEmitter<FocusEvent>();
// tslint:enable
@Output() readonly abpClick = new EventEmitter<MouseEvent>();
@Output() readonly abpFocus = new EventEmitter<FocusEvent>();

@ -20,6 +20,7 @@
"typescript": "^3.7.4"
},
"devDependencies": {
"@types/node": "^13.1.2",
"esm": "^3.2.25",
"ts-node": "^8.5.4",
"tsconfig-paths": "^3.9.0"

@ -10,7 +10,8 @@
"outDir": "./dist",
"baseUrl": "./",
"incremental": true,
"esModuleInterop": true
"esModuleInterop": true,
"types": ["node"]
},
"exclude": ["node_modules", "dist"]
}

@ -7,6 +7,11 @@
resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee"
integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4=
"@types/node@^13.1.2":
version "13.1.2"
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.1.2.tgz#fe94285bf5e0782e1a9e5a8c482b1c34465fa385"
integrity sha512-B8emQA1qeKerqd1dmIsQYnXi+mmAzTB7flExjmy5X1aVAKFNNNDubkavwR13kR6JnpeLp3aLoJhwn9trWPAyFQ==
ansi-bgblack@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/ansi-bgblack/-/ansi-bgblack-0.1.1.tgz#a68ba5007887701b6aafbe3fa0dadfdfa8ee3ca2"
@ -1157,6 +1162,11 @@ tsconfig-paths@^3.9.0:
minimist "^1.2.0"
strip-bom "^3.0.0"
typescript@^3.7.4:
version "3.7.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.4.tgz#1743a5ec5fef6a1fa9f3e4708e33c81c73876c19"
integrity sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw==
universalify@^0.1.0:
version "0.1.2"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"

Loading…
Cancel
Save