diff --git a/Implem.CodeDefiner/Implem.CodeDefiner.csproj b/Implem.CodeDefiner/Implem.CodeDefiner.csproj
index 37f4be1bf..d123e8b41 100644
--- a/Implem.CodeDefiner/Implem.CodeDefiner.csproj
+++ b/Implem.CodeDefiner/Implem.CodeDefiner.csproj
@@ -5,9 +5,9 @@
net6.0
Copyright © Implem Inc 2014 - 2023
This program does the automatic code creation and merging of existing code based on the definition. Also it will make the configuration change of sql server database.
- 1.3.44.0
- 1.3.44.0
- 1.3.44.0
+ 1.3.45.0
+ 1.3.45.0
+ 1.3.45.0
Linux
diff --git a/Implem.DefinitionAccessor/Def.cs b/Implem.DefinitionAccessor/Def.cs
index be2a930e6..e24f0c20e 100644
--- a/Implem.DefinitionAccessor/Def.cs
+++ b/Implem.DefinitionAccessor/Def.cs
@@ -4797,7 +4797,7 @@ public static void SetTemplateDefinition()
{
switch (definitionRow[0].ToString())
{
- case "Dashboard": Template.Dashboard = definitionRow[1].ToString(); SetTemplateTable(TemplateTable.Dashboard, definitionRow, TemplateXls); break;
+ case "Dashboard_en": Template.Dashboard_en = definitionRow[1].ToString(); SetTemplateTable(TemplateTable.Dashboard_en, definitionRow, TemplateXls); break;
case "Dashboard_ja": Template.Dashboard_ja = definitionRow[1].ToString(); SetTemplateTable(TemplateTable.Dashboard_ja, definitionRow, TemplateXls); break;
case "Template1": Template.Template1 = definitionRow[1].ToString(); SetTemplateTable(TemplateTable.Template1, definitionRow, TemplateXls); break;
case "Template10": Template.Template10 = definitionRow[1].ToString(); SetTemplateTable(TemplateTable.Template10, definitionRow, TemplateXls); break;
@@ -12438,7 +12438,7 @@ public void RestoreBySavedMemory()
public class TemplateColumn2nd
{
- public string Dashboard;
+ public string Dashboard_en;
public string Dashboard_ja;
public string Template1;
public string Template10;
@@ -12846,7 +12846,7 @@ public class TemplateColumn2nd
public class TemplateTable
{
- public TemplateDefinition Dashboard = new TemplateDefinition();
+ public TemplateDefinition Dashboard_en = new TemplateDefinition();
public TemplateDefinition Dashboard_ja = new TemplateDefinition();
public TemplateDefinition Template1 = new TemplateDefinition();
public TemplateDefinition Template10 = new TemplateDefinition();
diff --git a/Implem.DefinitionAccessor/Implem.DefinitionAccessor.csproj b/Implem.DefinitionAccessor/Implem.DefinitionAccessor.csproj
index 9e8432e41..a0630cea2 100644
--- a/Implem.DefinitionAccessor/Implem.DefinitionAccessor.csproj
+++ b/Implem.DefinitionAccessor/Implem.DefinitionAccessor.csproj
@@ -3,9 +3,9 @@
net6.0
Copyright © Implem Inc 2014 - 2023
- 1.3.44.0
- 1.3.44.0
- 1.3.44.0
+ 1.3.45.0
+ 1.3.45.0
+ 1.3.45.0
disable
diff --git a/Implem.DisplayAccessor/Implem.DisplayAccessor.csproj b/Implem.DisplayAccessor/Implem.DisplayAccessor.csproj
index 8347c9c93..6c7c36643 100644
--- a/Implem.DisplayAccessor/Implem.DisplayAccessor.csproj
+++ b/Implem.DisplayAccessor/Implem.DisplayAccessor.csproj
@@ -3,9 +3,9 @@
net6.0
Copyright © Implem Inc 2014 - 2023
- 1.3.44.0
- 1.3.44.0
- 1.3.44.0
+ 1.3.45.0
+ 1.3.45.0
+ 1.3.45.0
disable
diff --git a/Implem.Factory/Implem.Factory.csproj b/Implem.Factory/Implem.Factory.csproj
index 3b3055358..dd04b0a65 100644
--- a/Implem.Factory/Implem.Factory.csproj
+++ b/Implem.Factory/Implem.Factory.csproj
@@ -3,9 +3,9 @@
net6.0
Copyright © Implem Inc 2014 - 2023
- 1.3.44.0
- 1.3.44.0
- 1.3.44.0
+ 1.3.45.0
+ 1.3.45.0
+ 1.3.45.0
disable
diff --git a/Implem.Libraries/Implem.Libraries.csproj b/Implem.Libraries/Implem.Libraries.csproj
index b329f2fb8..6d54c060c 100644
--- a/Implem.Libraries/Implem.Libraries.csproj
+++ b/Implem.Libraries/Implem.Libraries.csproj
@@ -3,9 +3,9 @@
net6.0
Copyright © Implem Inc 2014 - 2023
- 1.3.44.0
- 1.3.44.0
- 1.3.44.0
+ 1.3.45.0
+ 1.3.45.0
+ 1.3.45.0
disable
diff --git a/Implem.ParameterAccessor/Implem.ParameterAccessor.csproj b/Implem.ParameterAccessor/Implem.ParameterAccessor.csproj
index ecb2ed9fe..1839e7245 100644
--- a/Implem.ParameterAccessor/Implem.ParameterAccessor.csproj
+++ b/Implem.ParameterAccessor/Implem.ParameterAccessor.csproj
@@ -3,9 +3,9 @@
net6.0
Copyright © Implem Inc 2014 - 2023
- 1.3.44.0
- 1.3.44.0
- 1.3.44.0
+ 1.3.45.0
+ 1.3.45.0
+ 1.3.45.0
disable
diff --git a/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByDataChanges_Body.txt b/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByDataChanges_Body.txt
index 06cd9a1f9..0539c9a56 100644
--- a/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByDataChanges_Body.txt
+++ b/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByDataChanges_Body.txt
@@ -73,6 +73,7 @@
formData: formData);
SetByLookups(
context: context,
- ss: ss);
+ ss: ss,
+ formData: formData);
});
}
\ No newline at end of file
diff --git a/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByLookups_Body.txt b/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByLookups_Body.txt
index cfe15062d..9b1741e73 100644
--- a/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByLookups_Body.txt
+++ b/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_SetByLookups_Body.txt
@@ -23,9 +23,13 @@
?.Select(lookup => ss.GetColumn(
context: context,
columnName: lookup.To))
- .Where(column => column?.BlankValue(value: SavedPropertyValue(
- context: context,
- column: column)) == true)
+ .Where(column => column?.BlankValue(value: AccessStatus == Databases.AccessStatuses.Selected
+ ? SavedPropertyValue(
+ context: context,
+ column: column)
+ : PropertyValue(
+ context: context,
+ column: column)) == true)
.Select(column => column.ColumnName)
.ToList(),
copyByDefaultOnly: copyByDefaultOnly))
diff --git a/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_Utilities_EditorItem_Body.txt b/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_Utilities_EditorItem_Body.txt
index bd03a5d4c..83043a2e9 100644
--- a/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_Utilities_EditorItem_Body.txt
+++ b/Implem.Pleasanter/App_Data/Definitions/Definition_Code/Model_Utilities_EditorItem_Body.txt
@@ -109,6 +109,7 @@ public static string Editor(
context: context, methodType: #modelName#Model.MethodType),
userStyle: ss.EditorStyles(
context: context, methodType: #modelName#Model.MethodType),
+ methodType: #modelName#Model.MethodType,
serverScriptModelRow: serverScriptModelRow,
action: () => hb
.Editor(
diff --git a/Implem.Pleasanter/App_Data/Displays/Html.json b/Implem.Pleasanter/App_Data/Displays/Html.json
new file mode 100644
index 000000000..c5ef66dd1
--- /dev/null
+++ b/Implem.Pleasanter/App_Data/Displays/Html.json
@@ -0,0 +1,9 @@
+{
+ "Id": "Html",
+ "Type": 110,
+ "Languages": [
+ {
+ "Body": "HTML"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Implem.Pleasanter/App_Data/Displays/HtmlBodyScriptBottom.json b/Implem.Pleasanter/App_Data/Displays/HtmlBodyScriptBottom.json
new file mode 100644
index 000000000..0aed85103
--- /dev/null
+++ b/Implem.Pleasanter/App_Data/Displays/HtmlBodyScriptBottom.json
@@ -0,0 +1,9 @@
+{
+ "Id": "HtmlBodyScriptBottom",
+ "Type": 110,
+ "Languages": [
+ {
+ "Body": "Body script bottom"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Implem.Pleasanter/App_Data/Displays/HtmlBodyScriptTop.json b/Implem.Pleasanter/App_Data/Displays/HtmlBodyScriptTop.json
new file mode 100644
index 000000000..1e0926804
--- /dev/null
+++ b/Implem.Pleasanter/App_Data/Displays/HtmlBodyScriptTop.json
@@ -0,0 +1,9 @@
+{
+ "Id": "HtmlBodyScriptTop",
+ "Type": 110,
+ "Languages": [
+ {
+ "Body": "Body script top"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Implem.Pleasanter/App_Data/Displays/HtmlHeadBottom.json b/Implem.Pleasanter/App_Data/Displays/HtmlHeadBottom.json
new file mode 100644
index 000000000..f073e8a59
--- /dev/null
+++ b/Implem.Pleasanter/App_Data/Displays/HtmlHeadBottom.json
@@ -0,0 +1,9 @@
+{
+ "Id": "HtmlHeadBottom",
+ "Type": 110,
+ "Languages": [
+ {
+ "Body": "Head bottom"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Implem.Pleasanter/App_Data/Displays/HtmlHeadTop.json b/Implem.Pleasanter/App_Data/Displays/HtmlHeadTop.json
new file mode 100644
index 000000000..ff71af67b
--- /dev/null
+++ b/Implem.Pleasanter/App_Data/Displays/HtmlHeadTop.json
@@ -0,0 +1,9 @@
+{
+ "Id": "HtmlHeadTop",
+ "Type": 110,
+ "Languages": [
+ {
+ "Body": "Head top"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Implem.Pleasanter/App_Data/Displays/HtmlPositionType.json b/Implem.Pleasanter/App_Data/Displays/HtmlPositionType.json
new file mode 100644
index 000000000..b552f52d8
--- /dev/null
+++ b/Implem.Pleasanter/App_Data/Displays/HtmlPositionType.json
@@ -0,0 +1,33 @@
+{
+ "Id": "HtmlPositionType",
+ "Type": 110,
+ "Languages": [
+ {
+ "Body": "Insertion potision"
+ },
+ {
+ "Language": "zh",
+ "Body": "插入位置"
+ },
+ {
+ "Language": "ja",
+ "Body": "挿入位置"
+ },
+ {
+ "Language": "de",
+ "Body": "Einfügeposition"
+ },
+ {
+ "Language": "ko",
+ "Body": "삽입 위치"
+ },
+ {
+ "Language": "es",
+ "Body": "Posición de inserción"
+ },
+ {
+ "Language": "vn",
+ "Body": "vị trí chèn"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/Implem.Pleasanter/App_Data/Displays/Script.json b/Implem.Pleasanter/App_Data/Displays/Script.json
index 79230bf17..8443fd126 100644
--- a/Implem.Pleasanter/App_Data/Displays/Script.json
+++ b/Implem.Pleasanter/App_Data/Displays/Script.json
@@ -1,4 +1,4 @@
-{
+{
"Id": "Script",
"Type": 110,
"Languages": [
diff --git a/Implem.Pleasanter/App_Start/BundleConfig.cs b/Implem.Pleasanter/App_Start/BundleConfig.cs
index 390934d5c..64b4d3600 100644
--- a/Implem.Pleasanter/App_Start/BundleConfig.cs
+++ b/Implem.Pleasanter/App_Start/BundleConfig.cs
@@ -64,6 +64,7 @@ public static IEnumerable Generals()
"~/scripts/loading.js",
"~/scripts/lockevents.js",
"~/scripts/log.js",
+ "~/scripts/showpassword.js",
"~/scripts/markdown.js",
"~/scripts/markdownevents.js",
"~/scripts/menuevents.js",
diff --git a/Implem.Pleasanter/Implem.Pleasanter.csproj b/Implem.Pleasanter/Implem.Pleasanter.csproj
index f32c6e596..c9994a541 100644
--- a/Implem.Pleasanter/Implem.Pleasanter.csproj
+++ b/Implem.Pleasanter/Implem.Pleasanter.csproj
@@ -5,9 +5,9 @@
Copyright © Implem Inc 2014 - 2023
Business application platform
Implem.Pleasanter
- 1.3.44.0
- 1.3.44.0
- 1.3.44.0
+ 1.3.45.0
+ 1.3.45.0
+ 1.3.45.0
disable
Linux
..\docker-compose.dcproj
diff --git a/Implem.Pleasanter/Libraries/DataSources/Saml.cs b/Implem.Pleasanter/Libraries/DataSources/Saml.cs
index 6a2d060ed..1612f9aa0 100644
--- a/Implem.Pleasanter/Libraries/DataSources/Saml.cs
+++ b/Implem.Pleasanter/Libraries/DataSources/Saml.cs
@@ -568,7 +568,7 @@ public static Sustainsys.Saml2.IdentityProvider SetIdpCache(Context context, int
}
}
- public static (string redirectResultUrl, string html) SamlLogin(Context context, string returnUrl="")
+ public static (string redirectResultUrl, string html) SamlLogin(Context context, string returnUrl = "")
{
if (!Authentications.SAML()
|| context.AuthenticationType != "Federation"
@@ -650,30 +650,26 @@ public static (string redirectResultUrl, string html) SamlLogin(Context context,
}
throw;
}
- var user = new UserModel().Get(
+ var userModel = new UserModel().Get(
context: context,
ss: null,
where: Rds.UsersWhere()
.TenantId(tenant.TenantId)
.LoginId(loginId.Value));
- if (user.AccessStatus == Databases.AccessStatuses.Selected)
+ if (userModel.AccessStatus == Databases.AccessStatuses.Selected)
{
- if (user.Disabled)
+ if (userModel.Disabled)
{
return (Responses.Locations.UserDisabled(context: context), null);
}
- if (user.Lockout)
+ if (userModel.Lockout)
{
return (Responses.Locations.UserLockout(context: context), null);
}
- var redirectResultUrl = Strings.CoalesceEmpty(
- user.GetReturnUrl(
- context: context,
- returnUrl: returnUrl),
- Responses.Locations.Top(context: context));
- user.Allow(
+ context.LoginId = userModel.LoginId;
+ var redirectResultUrl = userModel.AllowAfterUrl(
context: context,
- returnUrl: redirectResultUrl,
+ returnUrl: returnUrl,
createPersistentCookie: true);
return (redirectResultUrl, null);
}
diff --git a/Implem.Pleasanter/Libraries/HtmlParts/HtmlFields.cs b/Implem.Pleasanter/Libraries/HtmlParts/HtmlFields.cs
index 9247fb3b8..c01faab27 100644
--- a/Implem.Pleasanter/Libraries/HtmlParts/HtmlFields.cs
+++ b/Implem.Pleasanter/Libraries/HtmlParts/HtmlFields.cs
@@ -432,7 +432,6 @@ private static HtmlBuilder SwitchField(
controlContainerCss: controlContainerCss,
controlCss: controlCss,
labelText: labelText,
- placeholder: placeholder,
labelRaw: labelRaw,
controlOnly: controlOnly,
text: value,
@@ -1240,6 +1239,14 @@ public static HtmlBuilder FieldTextBox(
action: action,
method: method,
attributes: attributes);
+ if (textType == HtmlTypes.TextTypes.Password)
+ {
+ hb.Div(
+ attributes: new HtmlAttributes()
+ .Class("material-symbols-outlined show-password")
+ .OnClick("$p.showPassword(this)"),
+ action: () => hb.Text("visibility"));
+ }
controlOption?.Invoke();
hb.Span(
css: "unit",
diff --git a/Implem.Pleasanter/Libraries/HtmlParts/HtmlTemplates.cs b/Implem.Pleasanter/Libraries/HtmlParts/HtmlTemplates.cs
index 185c89db1..2ed8c6fe4 100644
--- a/Implem.Pleasanter/Libraries/HtmlParts/HtmlTemplates.cs
+++ b/Implem.Pleasanter/Libraries/HtmlParts/HtmlTemplates.cs
@@ -36,6 +36,7 @@ public static HtmlBuilder Template(
string script = null,
string userScript = null,
string userStyle = null,
+ BaseModel.MethodTypes methodType = BaseModel.MethodTypes.NotSet,
ServerScriptModelRow serverScriptModelRow = null,
Action action = null)
{
@@ -43,6 +44,7 @@ public static HtmlBuilder Template(
context: context,
ss: ss,
body: body,
+ methodType: methodType,
action: () => hb
.Raw(HtmlHtmls.ExtendedHtmls(
context: context,
@@ -77,11 +79,21 @@ public static HtmlBuilder Template(
context: context,
ss: ss,
userStyle: userStyle)
+ .Htmls(
+ context: context,
+ ss: ss,
+ positionType: Settings.Html.PositionTypes.BodyScriptTop,
+ methodType: methodType)
.Scripts(
context: context,
ss: ss,
script: script,
userScript: userScript)
+ .Htmls(
+ context: context,
+ ss: ss,
+ positionType: Settings.Html.PositionTypes.BodyScriptBottom,
+ methodType: methodType)
.Raw(HtmlHtmls.ExtendedHtmls(
context: context,
id: "HtmlBodyBottom")));
@@ -92,6 +104,7 @@ private static HtmlBuilder Container(
Context context,
SiteSettings ss,
string body,
+ BaseModel.MethodTypes methodType,
Action action)
{
if (!context.Ajax)
@@ -102,6 +115,11 @@ private static HtmlBuilder Container(
.Raw(HtmlHtmls.ExtendedHtmls(
context: context,
id: "HtmlHeaderTop"))
+ .Htmls(
+ context: context,
+ ss: ss,
+ positionType: Settings.Html.PositionTypes.HeadTop,
+ methodType: methodType)
.Meta(httpEquiv: "X-UA-Compatible", content: "IE=edge")
.Meta(charset: "utf-8")
.Meta(name: "keywords", content: Parameters.General.HtmlHeadKeywords)
@@ -119,6 +137,11 @@ private static HtmlBuilder Container(
context: context,
ss: ss)))
.ExtendedHeader(ss: ss)
+ .Htmls(
+ context: context,
+ ss: ss,
+ positionType: Settings.Html.PositionTypes.HeadBottom,
+ methodType: methodType)
.Raw(HtmlHtmls.ExtendedHtmls(
context: context,
id: "HtmlHeaderBottom")))
@@ -131,6 +154,42 @@ private static HtmlBuilder Container(
}
}
+ private static HtmlBuilder Htmls(
+ this HtmlBuilder hb,
+ Context context,
+ SiteSettings ss,
+ Settings.Html.PositionTypes positionType,
+ BaseModel.MethodTypes methodType)
+ {
+ if (context.ContractSettings.Html == false) return hb;
+ hb.Raw(ss.GetHtmlBody(
+ context: context,
+ peredicate: o => o.All == true,
+ positionType: positionType));
+ var htmlBody = string.Empty;
+ switch (methodType)
+ {
+ case BaseModel.MethodTypes.New:
+ htmlBody = ss.GetHtmlBody(
+ context: context,
+ peredicate: o => o.New == true,
+ positionType: positionType);
+ break;
+ case BaseModel.MethodTypes.Edit:
+ htmlBody = ss.GetHtmlBody(
+ context: context,
+ peredicate: o => o.Edit == true,
+ positionType: positionType);
+ break;
+ default:
+ htmlBody = ss.ViewModeHtmls(
+ context: context,
+ positionType: positionType);
+ break;
+ }
+ return hb.Raw(htmlBody);
+ }
+
private static string Description(SiteSettings ss, string body)
{
return WebUtility.HtmlEncode(Strings.CoalesceEmpty(
@@ -627,6 +686,7 @@ public static string Error(
context: context,
ss: ss,
body: null,
+ methodType: BaseModel.MethodTypes.NotSet,
action: () => hb
.MainContainer(
context: context,
diff --git a/Implem.Pleasanter/Libraries/HtmlParts/HtmlViewFilters.cs b/Implem.Pleasanter/Libraries/HtmlParts/HtmlViewFilters.cs
index 9fcecfcb1..8ac6c6cf6 100644
--- a/Implem.Pleasanter/Libraries/HtmlParts/HtmlViewFilters.cs
+++ b/Implem.Pleasanter/Libraries/HtmlParts/HtmlViewFilters.cs
@@ -405,7 +405,8 @@ public static void Column(
idPrefix: idPrefix,
controlOnly: controlOnly,
action: action,
- labelIcon: labelIcon);
+ labelIcon: labelIcon,
+ useFilterButton: ss.UseFilterButton);
}
else
{
@@ -433,7 +434,8 @@ public static void Column(
idPrefix: idPrefix,
controlOnly: controlOnly,
action: action,
- labelIcon: labelIcon);
+ labelIcon: labelIcon,
+ useFilterButton: ss.UseFilterButton);
}
else
{
@@ -495,7 +497,8 @@ public static void Column(
idPrefix: idPrefix,
controlOnly: controlOnly,
action: action,
- labelIcon: labelIcon);
+ labelIcon: labelIcon,
+ useFilterButton: ss.UseFilterButton);
}
else
{
@@ -621,7 +624,8 @@ private static HtmlBuilder DropDown(
string idPrefix = "ViewFilters__",
string action = null,
string labelIcon = null,
- bool controlOnly = false)
+ bool controlOnly = false,
+ bool? useFilterButton = false)
{
var selectedValue = view.ColumnFilter(column.ColumnName);
if (column.UseSearch == true
@@ -660,7 +664,7 @@ private static HtmlBuilder DropDown(
fieldId: idPrefix + column.ColumnName + "Field",
controlId: idPrefix + column.ColumnName,
fieldCss: "field-auto-thin",
- controlCss: (ss.UseFilterButton != true
+ controlCss: (useFilterButton != true
? " auto-postback"
: string.Empty)
+ (column.UseSearch == true
diff --git a/Implem.Pleasanter/Libraries/Requests/Context.cs b/Implem.Pleasanter/Libraries/Requests/Context.cs
index 709216f21..d17d160c8 100644
--- a/Implem.Pleasanter/Libraries/Requests/Context.cs
+++ b/Implem.Pleasanter/Libraries/Requests/Context.cs
@@ -451,7 +451,6 @@ private void SetUser(UserModel userModel, bool noHttpContext = false)
{
if (userModel.AccessStatus == Databases.AccessStatuses.Selected)
{
- LoginId = userModel.LoginId;
SwitchUser = SessionData.Get("SwitchLoginId") != null;
Authenticated = true;
TenantId = userModel.TenantId;
diff --git a/Implem.Pleasanter/Libraries/Responses/Displays.cs b/Implem.Pleasanter/Libraries/Responses/Displays.cs
index d7edf3c7d..e82f40ea7 100644
--- a/Implem.Pleasanter/Libraries/Responses/Displays.cs
+++ b/Implem.Pleasanter/Libraries/Responses/Displays.cs
@@ -4349,6 +4349,66 @@ public static string HoursAgo(
data: data);
}
+ public static string Html(
+ Context context,
+ params string[] data)
+ {
+ return Get(
+ context: context,
+ id: "Html",
+ data: data);
+ }
+
+ public static string HtmlBodyScriptBottom(
+ Context context,
+ params string[] data)
+ {
+ return Get(
+ context: context,
+ id: "HtmlBodyScriptBottom",
+ data: data);
+ }
+
+ public static string HtmlBodyScriptTop(
+ Context context,
+ params string[] data)
+ {
+ return Get(
+ context: context,
+ id: "HtmlBodyScriptTop",
+ data: data);
+ }
+
+ public static string HtmlHeadBottom(
+ Context context,
+ params string[] data)
+ {
+ return Get(
+ context: context,
+ id: "HtmlHeadBottom",
+ data: data);
+ }
+
+ public static string HtmlHeadTop(
+ Context context,
+ params string[] data)
+ {
+ return Get(
+ context: context,
+ id: "HtmlHeadTop",
+ data: data);
+ }
+
+ public static string HtmlPositionType(
+ Context context,
+ params string[] data)
+ {
+ return Get(
+ context: context,
+ id: "HtmlPositionType",
+ data: data);
+ }
+
public static string HtmlTitle(
Context context,
params string[] data)
diff --git a/Implem.Pleasanter/Libraries/Search/Indexes.cs b/Implem.Pleasanter/Libraries/Search/Indexes.cs
index 0e27a5a18..3df19a337 100644
--- a/Implem.Pleasanter/Libraries/Search/Indexes.cs
+++ b/Implem.Pleasanter/Libraries/Search/Indexes.cs
@@ -388,6 +388,8 @@ private static HtmlBuilder Results(
if (dataRow != null)
{
var href = string.Empty;
+ var highlightSplitedTitles = dataRow.String("Title").Split(text);
+ var highlightSplitedBodys = dataRow.String("Body").Split(text);
switch (referenceType)
{
case "Sites":
@@ -414,11 +416,32 @@ private static HtmlBuilder Results(
SiteId = dataRow.Long("SiteId")
})
.H(number: 3, action: () => hb
- .A(
+ .A(
href: href,
- text: dataRow.String("Title")))
- .P(action: () => hb
- .Text(text: dataRow.String("Body"))));
+ action: () =>
+ highlightSplitedTitles.ForEach(highlightSplitedTitle =>
+ {
+ if(highlightSplitedTitle != highlightSplitedTitles[0])
+ {
+ hb.Span(
+ css: "highlight",
+ action: () => hb
+ .Text(text));
+ }
+ hb.Text(highlightSplitedTitle);
+ })))
+ .P(action: () =>
+ highlightSplitedBodys.ForEach(highlightSplitedBody =>
+ {
+ if (highlightSplitedBody != highlightSplitedBodys[0])
+ {
+ hb.Span(
+ css: "highlight",
+ action: () => hb
+ .Text(text));
+ }
+ hb.Text(highlightSplitedBody);
+ })));
}
});
}
diff --git a/Implem.Pleasanter/Libraries/Server/Times.cs b/Implem.Pleasanter/Libraries/Server/Times.cs
index d37edf40c..f4a79433e 100644
--- a/Implem.Pleasanter/Libraries/Server/Times.cs
+++ b/Implem.Pleasanter/Libraries/Server/Times.cs
@@ -33,9 +33,21 @@ public static DateTime ToLocal(this DateTime value, Context context)
{
if (value.ToOADate() == 0) return value;
var timeZoneInfo = context.TimeZoneInfo;
- return timeZoneInfo != null && timeZoneInfo.Id != TimeZoneInfo.Local.Id
- ? TimeZoneInfo.ConvertTime(value, timeZoneInfo)
- : value;
+ if (timeZoneInfo == null || timeZoneInfo.Id == TimeZoneInfo.Local.Id) return value;
+ try
+ {
+ return TimeZoneInfo.ConvertTime(
+ value,
+ timeZoneInfo);
+ }
+ catch (ArgumentException)
+ {
+ return TimeZoneInfo.ConvertTime(
+ DateTime.SpecifyKind(
+ value.Add(-TimeZoneInfo.Local.BaseUtcOffset),
+ DateTimeKind.Utc),
+ timeZoneInfo);
+ }
}
public static string ToLocal(this DateTime value, Context context, string format)
@@ -47,9 +59,23 @@ public static DateTime ToUniversal(this DateTime value, Context context)
{
if (value.ToOADate() == 0) return value;
var timeZoneInfo = context.TimeZoneInfo;
- return timeZoneInfo != null && timeZoneInfo.Id != TimeZoneInfo.Local.Id
- ? TimeZoneInfo.ConvertTime(value, timeZoneInfo, TimeZoneInfo.Local)
- : value;
+ if (timeZoneInfo == null || timeZoneInfo.Id == TimeZoneInfo.Local.Id) return value;
+ try
+ {
+ return TimeZoneInfo.ConvertTime(
+ value,
+ timeZoneInfo,
+ TimeZoneInfo.Local);
+ }
+ catch (ArgumentException)
+ {
+ return TimeZoneInfo.ConvertTime(
+ DateTime.SpecifyKind(
+ value.Add(-timeZoneInfo.BaseUtcOffset),
+ DateTimeKind.Utc),
+ TimeZoneInfo.Utc,
+ TimeZoneInfo.Local);
+ }
}
public static double DateDiff(Types interval, DateTime from, DateTime to)
diff --git a/Implem.Pleasanter/Libraries/Settings/ContractSettings.cs b/Implem.Pleasanter/Libraries/Settings/ContractSettings.cs
index 47c43fb96..885e99e94 100644
--- a/Implem.Pleasanter/Libraries/Settings/ContractSettings.cs
+++ b/Implem.Pleasanter/Libraries/Settings/ContractSettings.cs
@@ -26,6 +26,7 @@ public class ContractSettings
public bool? Mail;
public bool? Style;
public bool? Script;
+ public bool? Html;
public bool? ServerScript;
public bool? Api;
public DateTime? Deadline;
diff --git a/Implem.Pleasanter/Libraries/Settings/Html.cs b/Implem.Pleasanter/Libraries/Settings/Html.cs
new file mode 100644
index 000000000..c4d595b22
--- /dev/null
+++ b/Implem.Pleasanter/Libraries/Settings/Html.cs
@@ -0,0 +1,135 @@
+using Implem.Pleasanter.Interfaces;
+
+namespace Implem.Pleasanter.Libraries.Settings
+{
+ public class Html : ISettingListItem
+ {
+ public enum PositionTypes: int
+ {
+ HeadTop = 1000,
+ HeadBottom = 1010,
+ BodyScriptTop = 9000,
+ BodyScriptBottom = 9010,
+ }
+
+ public int Id { get; set; }
+ public string Title;
+ public PositionTypes PositionType;
+ public bool? All;
+ public bool? New;
+ public bool? Edit;
+ public bool? Index;
+ public bool? Calendar;
+ public bool? Crosstab;
+ public bool? Gantt;
+ public bool? BurnDown;
+ public bool? TimeSeries;
+ public bool? Kamban;
+ public bool? ImageLib;
+ public bool? Disabled;
+ public string Body;
+
+ public Html()
+ {
+
+ }
+
+ public Html(
+ int id,
+ string title,
+ PositionTypes positionType,
+ bool all,
+ bool _new,
+ bool edit,
+ bool index,
+ bool calendar,
+ bool crosstab,
+ bool gantt,
+ bool burnDown,
+ bool timeSeries,
+ bool kamban,
+ bool imageLib,
+ bool disabled,
+ string body)
+ {
+ Id = id;
+ Title = title;
+ PositionType = positionType;
+ All = all;
+ New = _new;
+ Edit = edit;
+ Index = index;
+ Calendar = calendar;
+ Crosstab = crosstab;
+ Gantt = gantt;
+ BurnDown = burnDown;
+ TimeSeries = timeSeries;
+ Kamban = kamban;
+ ImageLib = imageLib;
+ Disabled = disabled;
+ Body = body;
+ }
+
+ public void Update(
+ string title,
+ PositionTypes positionType,
+ bool all,
+ bool _new,
+ bool edit,
+ bool index,
+ bool calendar,
+ bool crosstab,
+ bool gantt,
+ bool burnDown,
+ bool timeSeries,
+ bool kamban,
+ bool imageLib,
+ bool disabled,
+ string body)
+ {
+ Title = title;
+ PositionType = positionType;
+ All = all;
+ New = _new;
+ Edit = edit;
+ Index = index;
+ Calendar = calendar;
+ Crosstab = crosstab;
+ Gantt = gantt;
+ BurnDown = burnDown;
+ TimeSeries = timeSeries;
+ Kamban = kamban;
+ ImageLib = imageLib;
+ Disabled = disabled;
+ Body = body;
+ }
+
+ public Html GetRecordingData()
+ {
+ var html = new Html();
+ html.Id = Id;
+ html.Title = Title;
+ html.PositionType = PositionType;
+ if (All == true)
+ {
+ html.All = true;
+ }
+ else
+ {
+ if (New == true) html.New = true;
+ if (Edit == true) html.Edit = true;
+ if (Index == true) html.Index = true;
+ if (Calendar == true) html.Calendar = true;
+ if (Crosstab == true) html.Crosstab = true;
+ if (Gantt == true) html.Gantt = true;
+ if (BurnDown == true) html.BurnDown = true;
+ if (TimeSeries == true) html.TimeSeries = true;
+ if (Kamban == true) html.Kamban = true;
+ if (ImageLib == true) html.ImageLib = true;
+ }
+ if (Disabled == true) html.Disabled = true;
+ html.Body = Body;
+ return html;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Implem.Pleasanter/Libraries/Settings/SiteSettings.cs b/Implem.Pleasanter/Libraries/Settings/SiteSettings.cs
index b41514af1..d4eac5830 100644
--- a/Implem.Pleasanter/Libraries/Settings/SiteSettings.cs
+++ b/Implem.Pleasanter/Libraries/Settings/SiteSettings.cs
@@ -188,6 +188,7 @@ public enum TextAlignTypes : int
public SettingList