Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Plugin/AvalancheUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,16 @@ public static string GetShortAssembly( Type type )

public static void SetActionItems( string ActionItemValue, Dictionary<string, string> CustomAttributes, Person CurrentPerson, Dictionary<string, object> MergeObjects = null, string EnabledLavaCommands = "", string parameter = "" )
{
var actionItems = ( ActionItemValue ?? "" ).Split( new char[] { '|' } );
char[] splitchar = { };
if ( ActionItemValue.Contains( "^" ) )
{
splitchar = new char[] { '^' };
}
else
{
splitchar = new char[] { '|' };
}
var actionItems = ( ActionItemValue ?? "" ).Split( splitchar );

if ( actionItems.Length > 0 && !string.IsNullOrWhiteSpace( actionItems[0] ) )
{
Expand Down
14 changes: 11 additions & 3 deletions Plugin/Controls/ActionItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,20 +243,28 @@ public string Value
{
if ( ddlActionList.SelectedValue == "1" || ddlActionList.SelectedValue == "2" )
{
return string.Format( "{0}|{1}|{2}", ddlActionList.SelectedValue, ppPage.SelectedValue, tbParameter.Text );
return string.Format( "{0}^{1}^{2}", ddlActionList.SelectedValue, ppPage.SelectedValue, tbParameter.Text );
}

if ( ddlActionList.SelectedValue == "4" )
{
return string.Format( "{0}|{1}|{2}", ddlActionList.SelectedValue, tbTarget.Text, ddlRckipid.SelectedValue );
return string.Format( "{0}^{1}^{2}", ddlActionList.SelectedValue, tbTarget.Text, ddlRckipid.SelectedValue );
}

return ddlActionList.SelectedValue;
}
set
{
EnsureChildControls();
var values = value.Split( '|' );
string[] values = null;
if ( value.Contains( '^' ) )
{
values = value.Split( '^' );
}
else
{
values = value.Split( '|' );
}
ddlActionList.SelectedValue = values[0];

if ( ddlActionList.SelectedValue == "1" || ddlActionList.SelectedValue == "2" )
Expand Down
11 changes: 10 additions & 1 deletion Plugin/Models/FormResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ public class FormResponse

public void SetResponse( string attributeValue )
{
var actionItems = ( attributeValue ?? "" ).Split( new char[] { '|' } );
char[] splitchar = { };
if ( attributeValue.Contains( "^" ) )
{
splitchar = new char[] { '^' };
}
else
{
splitchar = new char[] { '|' };
}
var actionItems = ( attributeValue ?? "" ).Split( splitchar );

if ( actionItems.Length > 0 && !string.IsNullOrWhiteSpace( actionItems[0] ) )
{
Expand Down
4 changes: 2 additions & 2 deletions Plugin/Plugins/Avalanche/IconButton.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public override MobileBlock GetMobile( string parameter )
parameter );


CustomAttributes.Add( "Text", AvalancheUtilities.ProcessLava( GetAttributeValue( "Text" ), CurrentPerson, parameter ) );
CustomAttributes.Add( "Icon", AvalancheUtilities.ProcessLava( GetAttributeValue( "Icon" ), CurrentPerson, parameter ) );
CustomAttributes.Add( "Text", AvalancheUtilities.ProcessLava( GetAttributeValue( "Text" ), CurrentPerson, parameter, GetAttributeValue( "EnabledLavaCommands" ) ) );
CustomAttributes.Add( "Icon", AvalancheUtilities.ProcessLava( GetAttributeValue( "Icon" ), CurrentPerson, parameter, GetAttributeValue( "EnabledLavaCommands" ) ) );

return new MobileBlock()
{
Expand Down
13 changes: 11 additions & 2 deletions Plugin/Plugins/Avalanche/TextOverImage.ascx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ protected override void OnLoad( EventArgs e )
CurrentPerson,
"",
GetAttributeValue( "EnabledLavaCommands" ) );
lLava.Text = GetAttributeValue( "Text" );
lLava.Text = AvalancheUtilities.ProcessLava( GetAttributeValue( "Text" ),
CurrentPerson,
"",
GetAttributeValue( "EnabledLavaCommands" )
);
}

public override MobileBlock GetMobile( string parameter )
Expand All @@ -67,7 +71,12 @@ public override MobileBlock GetMobile( string parameter )

if ( !string.IsNullOrWhiteSpace( GetAttributeValue( "Text" ) ) )
{
CustomAttributes["Text"] = GetAttributeValue( "Text" );
//CustomAttributes["Text"] = GetAttributeValue( "Text" );
CustomAttributes.Add( "Text", AvalancheUtilities.ProcessLava( GetAttributeValue( "Text" ),
CurrentPerson,
parameter,
GetAttributeValue( "EnabledLavaCommands" )
) );
}

if ( GetAttributeValue( "AspectRatio" ).AsDouble() != 0 )
Expand Down