pull/2327/head
mehmet-erim 6 years ago
commit 09ebaa112e

@ -41,7 +41,7 @@ public class UserRole : Entity
public DateTime CreationTime { get; set; }
public Phone()
public UserRole()
{
}

@ -193,61 +193,64 @@
</div>
<div class="docs-content-field">
<div class="position-relative">
@if (Model.Document.Contributors != null && Model.Document.Contributors.Count > 0)
{
<div class="contributors">
<small class="text-muted">@(L["Contributors"].Value + " :")</small>
@foreach (var contributor in Model.Document.Contributors)
{
<a href="@contributor.UserProfileUrl" target="_blank">
<img src="@contributor.AvatarUrl"
class="contributors-avatar" height="21" width="21" title="@contributor.Username" />
</a>
}
</div>
}
@if (Model.DocumentPreferences != null && Model.DocumentPreferences.Parameters != null && Model.DocumentPreferences.Parameters.Any())
{
<div class="alert alert-primary">
<abp-row>
<p class="ml-3">
<i class="fa fa-info-circle"></i>
</p>
</abp-row>
<abp-row>
@foreach (var parameter in Model.DocumentPreferences.Parameters)
<div class="docs-text-field">
<div class="position-relative">
@if (Model.Document.Contributors != null && Model.Document.Contributors.Count > 0)
{
<div class="contributors">
<small class="text-muted">@(L["Contributors"].Value + " :")</small>
@foreach (var contributor in Model.Document.Contributors)
{
<abp-column size="_6" abp-rounded="_0">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="@("Section" + parameter.Name + "ComboboxAddonId")">@(parameter.DisplayName + ":")</span>
</div>
<select class="doc-section-combobox form-control"
aria-describedby="@("Section" + parameter.Name + "ComboboxAddonId")"
id="@("Section" + parameter.Name + "ComboboxId")" data-key="@parameter.Name">
@foreach (var value in parameter.Values)
{
@if (value.Key == (Model.UserPreferences.ContainsKey(parameter.Name) ? Model.UserPreferences[parameter.Name] : null))
{
<option value="@value.Key" selected="selected">@value.Value</option>
}
else
<a href="@contributor.UserProfileUrl" target="_blank">
<img src="@contributor.AvatarUrl"
class="contributors-avatar" height="21" width="21" title="@contributor.Username" />
</a>
}
</div>
}
@if (Model.DocumentPreferences != null && Model.DocumentPreferences.Parameters != null && Model.DocumentPreferences.Parameters.Any())
{
<div class="alert alert-primary alert-criteria">
<abp-row>
<abp-column>
<p class="alert-p mb-2">
<i class="fa fa-info-circle"></i>
This document is customized according to the following criteria.
</p>
</abp-column>
</abp-row>
<abp-form-row>
@foreach (var parameter in Model.DocumentPreferences.Parameters)
{
<abp-column size="_4">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text" id="@("Section" + parameter.Name + "ComboboxAddonId")">@(parameter.DisplayName)</span>
</div>
<select class="doc-section-combobox form-control"
aria-describedby="@("Section" + parameter.Name + "ComboboxAddonId")"
id="@("Section" + parameter.Name + "ComboboxId")" data-key="@parameter.Name">
@foreach (var value in parameter.Values)
{
<option value="@value.Key">@value.Value</option>
@if (value.Key == (Model.UserPreferences.ContainsKey(parameter.Name) ? Model.UserPreferences[parameter.Name] : null))
{
<option value="@value.Key" selected="selected">@value.Value</option>
}
else
{
<option value="@value.Key">@value.Value</option>
}
}
}
</select>
</div>
</abp-column>
}
</abp-row>
</div>
}
</div>
</select>
</div>
</abp-column>
}
</abp-form-row>
</div>
}
</div>
<div class="docs-text-field">
<div data-spy="scroll" data-target="#docs-sticky-index" data-offset="0">
<article class="docs-body">
@ -297,3 +300,5 @@
</div>
</div>

@ -425,6 +425,8 @@ namespace Volo.Docs.Pages.Documents.Project
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);
}
}
@ -435,8 +437,11 @@ namespace Volo.Docs.Pages.Documents.Project
if (UserPreferences.ContainsKey(keyValue.Key))
{
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);
}
if (DocumentPreferences?.Parameters == null)
@ -449,6 +454,7 @@ namespace Volo.Docs.Pages.Documents.Project
if (!UserPreferences.ContainsKey(parameter.Name))
{
UserPreferences.Add(parameter.Name, parameter.Values.FirstOrDefault().Key);
UserPreferences.Add(parameter.Name + "_Value", parameter.Values.FirstOrDefault().Value);
}
}
}

@ -15,6 +15,7 @@
var scrollTopBtn = $(".scroll-top-btn");
var enoughHeight = $(".docs-sidebar-wrapper > .docs-top").height() + 60;
var enoughHeightPlus = 500;
$(window).scroll(function () {
var topPos = $(window).scrollTop();
@ -25,6 +26,11 @@
$(scrollTopBtn).removeClass("showup");
$("body").removeClass("scrolled");
}
if (topPos > enoughHeightPlus) {
$("body").addClass("scrolledMore");
} else {
$("body").removeClass("scrolledMore");
}
});
$(scrollTopBtn).click(function () {
@ -131,4 +137,14 @@
return $li;
};
function docsCriteria() {
var docsContentWidth = $(".docs-content").width() - 20;
$(".alert-criteria").width(docsContentWidth);
}
$(document).ready(function () {
docsCriteria();
});
$(window).resize(function () {
docsCriteria();
});
})(jQuery);

@ -201,13 +201,6 @@
padding-top: 2rem;
padding-bottom: 10px;
font-size: 2rem; }
.docs-page .docs-content article.docs-body .blockquote {
margin-bottom: 1rem;
margin-left: 0;
border-left: 2px solid gray;
padding: 1em;
background-color: #eee;
padding-bottom: .2em; }
.docs-page .docs-content article.docs-body h3, .docs-page .docs-content article.docs-body h4, .docs-page .docs-content article.docs-body h5, .docs-page .docs-content article.docs-body h6 {
padding-top: 20px;
padding-bottom: 5px;
@ -224,6 +217,13 @@
transition: .5s; }
.docs-page .docs-content article.docs-body h1:hover .anchor, .docs-page .docs-content article.docs-body h2:hover .anchor, .docs-page .docs-content article.docs-body h3:hover .anchor, .docs-page .docs-content article.docs-body h4:hover .anchor, .docs-page .docs-content article.docs-body h5:hover .anchor, .docs-page .docs-content article.docs-body h6:hover .anchor {
opacity: 1; }
.docs-page .docs-content article.docs-body .blockquote {
margin-bottom: 1rem;
margin-left: 0;
border-left: 2px solid gray;
padding: 1em;
background-color: #eee;
padding-bottom: .2em; }
.docs-page .docs-content article.docs-body img {
max-width: 100%;
border: 1px solid #f4f5f7;
@ -273,11 +273,13 @@
margin-left: -1px;
margin-top: 1px;
margin-bottom: 1px;
transition: .2s; }
transition: .2s;
font-weight: normal; }
.docs-page .docs-page-index .docs-inner-anchors .navbar .nav-pills .nav-link.active {
border-left: 2px solid #007bff;
border-left: 1px solid #007bff;
background: none;
color: #007bff; }
color: #007bff;
font-weight: normal; }
.docs-page .docs-page-index .docs-inner-anchors .navbar .nav-pills .nav-pills .nav-link.active {
color: #007bff; }
.docs-page .docs-page-index .docs-inner-anchors .navbar .nav-pills .nav-pills .nav-pills .nav-link.active {
@ -560,3 +562,46 @@ div.code-toolbar > .toolbar a {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap; } }
.alert-criteria {
padding: 1.25em 1.5em;
max-width: 100%; }
.alert-criteria p.alert-p {
font-size: .96em; }
.alert-criteria .input-group .input-group-text, .alert-criteria .input-group .form-control {
font-size: .96em; }
@media screen and (max-width: 767px) {
.alert-criteria .input-group .input-group-text, .alert-criteria .input-group .form-control {
font-size: .88em; } }
.alert-criteria .input-group .input-group-text {
color: #004085;
background-color: #bddcfd;
border: 1px solid #bddcfd; }
@media screen and (max-width: 1366px) {
.alert-criteria .input-group .input-group-text {
display: none; } }
.alert-criteria .input-group .form-control {
color: #004085;
background-color: #fff;
border: 1px solid #bddcfd; }
@media screen and (max-width: 1366px) {
.alert-criteria .input-group .form-control {
border-top-left-radius: 0.25rem;
border-bottom-left-radius: 0.25rem; } }
.scrolledMore {
padding-top: 107px; }
.scrolledMore .alert-criteria {
position: fixed;
top: 0;
z-index: 10;
border: 0;
border-radius: 0;
margin-left: -47px;
padding: 0.5em 0.75em; }
@media screen and (max-width: 767px) {
.scrolledMore .alert-criteria {
top: 72px;
margin-left: -36px; } }
.scrolledMore .alert-criteria p.alert-p {
display: none; }

File diff suppressed because one or more lines are too long

@ -452,11 +452,13 @@ body {
margin-top: 1px;
margin-bottom: 1px;
transition: .2s;
font-weight: normal;
&.active {
border-left: 2px solid #007bff;
border-left: 1px solid #007bff;
background: none;
color: #007bff;
font-weight: normal;
}
}
@ -941,4 +943,68 @@ div.code-toolbar > .toolbar a {
white-space: nowrap;
}
}
}
.alert-criteria {
padding: 1.25em 1.5em;
max-width: 100%;
p.alert-p {
font-size: .96em;
}
.input-group {
.input-group-text, .form-control {
font-size: .96em;
@media screen and (max-width: 767px) {
font-size: .88em;
}
}
.input-group-text {
color: #004085;
background-color: #bddcfd;
border: 1px solid #bddcfd;
@media screen and (max-width: 1366px) {
display: none;
}
}
.form-control {
color: #004085;
background-color: #fff;
border: 1px solid #bddcfd;
@media screen and (max-width: 1366px) {
border-top-left-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
}
}
}
}
.scrolledMore {
padding-top: 107px;
.alert-criteria {
position: fixed;
top: 0;
z-index: 10;
border: 0;
border-radius: 0;
margin-left: -47px;
padding: 0.5em 0.75em;
@media screen and (max-width: 767px) {
top: 72px;
margin-left: -36px;
}
p.alert-p {
display: none;
}
}
}
Loading…
Cancel
Save