-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1050 refactor form, seperator datatype components to reuse in parame…
…ter view
- Loading branch information
Showing
16 changed files
with
1,295 additions
and
267 deletions.
There are no files selected for viewing
709 changes: 709 additions & 0 deletions
709
Components/XML/BExIS.Xml.Helpers.UnitTests/App_Data/datacite/metadata - Kopie.xsd
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
Console/BExIS.Web.Shell/Areas/DCM/Models/Metadata/UIComponentModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace BExIS.Modules.Dcm.UI.Models.Metadata | ||
{ | ||
public enum MetadataAttrType | ||
{ | ||
Attribute = 0, | ||
Parameter = 1 | ||
} | ||
|
||
public class UIComponentModel | ||
{ | ||
public MetadataAttrType Type { get; set; } | ||
public string IdInput { get; set; } | ||
public string IdByXpath { get; set; } | ||
|
||
public long ParentId { get; set; } | ||
|
||
public string DisplayName { get; set; } | ||
public string DisplayPattern { get; set; } | ||
public string Discription { get; set; } | ||
|
||
public object Value { get; set; } | ||
|
||
public bool Locked { get; set; } | ||
|
||
public List<object> DomainList { get; set; } | ||
|
||
public string SystemType { get; set; } | ||
|
||
public string ErrorMessage { get; set; } | ||
public string ErrorClass { get; set; } | ||
public string LockedClass { get; set; } | ||
|
||
public string OnChangeAction { get; set; } | ||
|
||
public UIComponentModel(MetadataAttrType type) | ||
{ | ||
Type = type; | ||
IdInput = String.Empty; | ||
IdByXpath = String.Empty; | ||
ParentId = 0; | ||
DisplayName = String.Empty; | ||
DisplayPattern = String.Empty; | ||
Value = String.Empty; | ||
DomainList = new List<object>(); | ||
SystemType = String.Empty; | ||
ErrorMessage = String.Empty; | ||
LockedClass = String.Empty; | ||
OnChangeAction = String.Empty; | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@model BExIS.Modules.Dcm.UI.Models.Metadata.UIComponentModel | ||
@using BExIS.Modules.Dcm.UI.Models.Metadata | ||
|
||
@{ | ||
bool value = false;//(bool?)Model.Value ?? false; | ||
try | ||
{ | ||
value = Convert.ToBoolean(Model.Value); | ||
} | ||
catch | ||
{ | ||
value = false; | ||
} | ||
|
||
string action = "OnChangeCheckBox(this)"; | ||
if (Model.Type.Equals(MetadataAttrType.Parameter)){ action = "OnChangeParameterCheckBox(this)"; } | ||
|
||
string disabled = Model.Locked ? "disabled" : ""; | ||
} | ||
|
||
|
||
@Html.CheckBox(Model.DisplayName, value, | ||
new{ | ||
idbyxpath = @Model.IdByXpath, | ||
OnClick = action, | ||
disabled = disabled, | ||
Name = @Model.DisplayName, | ||
Id = @Model.IdInput, | ||
PackageId = @Model.ParentId, | ||
Title = @Model.ErrorMessage | ||
}) | ||
|
||
|
Oops, something went wrong.