Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable EnclosingTag, DisableWebEdit, ShowTitleWhenBlank parameters for editable glass fields #338

Merged
merged 5 commits into from
Jun 8, 2018
Merged
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
Binary file added .vs/Glass.Mapper/v15/sqlite3/storage.ide
Binary file not shown.
68 changes: 35 additions & 33 deletions NugetDefinitions/readme.txt
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@


/*******************************/

Glass.Mapper.Sc V4

/*******************************/

Thank you for downloading Glass.Mapper.Sc V4, this is the latest and greatest version of Glass.Mapper.Sc.

//TODO: CHECK THE FOLLOWING!!!

* Does your project contain a reference to Glass.Mapper.Sc.dll? If this reference is missing Glass was unable to find the Sitecore.Kernel.dll
reference in your project. Add a reference to Sitecore.Kernel.dll and re-install the Glass.Mapper.Sc nuget package.
* Does your project contain a reference to Glass.Mapper.Sc,Mvc.dll? If this reference is missing Glass was unable to find the System.Web.Mvc.dll
reference in your project. Add a reference to System.Web.Mvc.dll and re-install the Glass.Mapper.Sc nuget package. You only need to do this if
you want MVC support with Glass.*



For more information on how to use the framework please visit http://www.glass.lu/Mapper/Sc

Glass.Mapper.Sc is distributed under the Apache License 2.0 https://github.com/mikeedwards83/Glass.Mapper/blob/master/License.txt

You can stay up to date with Glass.Mapper.Sc by signing up to receive our newsletter http://www.glass.lu/Signup

We automatically generate a website contain help information which you can read at http://docs.glass.lu

We have a great community who will help answer your questions at http://stackoverflow.com/ but if you need more
specialist support please contact us at hello@glass.lu where we will be able to offer our consultancy services.





/*******************************/

Glass.Mapper.Sc V4

/*******************************/

Thank you for downloading Glass.Mapper.Sc V4, this is the latest and greatest version of Glass.Mapper.Sc.

Release notes http://www.glass.lu/Mapper/Sc/Releases

//TODO: CHECK THE FOLLOWING!!!

* Does your project contain a reference to Glass.Mapper.Sc.dll? If this reference is missing Glass was unable to find the Sitecore.Kernel.dll
reference in your project. Add a reference to Sitecore.Kernel.dll and re-install the Glass.Mapper.Sc nuget package.
* Does your project contain a reference to Glass.Mapper.Sc,Mvc.dll? If this reference is missing Glass was unable to find the System.Web.Mvc.dll
reference in your project. Add a reference to System.Web.Mvc.dll and re-install the Glass.Mapper.Sc nuget package. You only need to do this if
you want MVC support with Glass.*



For more information on how to use the framework please visit http://www.glass.lu/Mapper/Sc

Glass.Mapper.Sc is distributed under the Apache License 2.0 https://github.com/mikeedwards83/Glass.Mapper/blob/master/License.txt

You can stay up to date with Glass.Mapper.Sc by signing up to receive our newsletter http://www.glass.lu/Signup

We automatically generate a website contain help information which you can read at http://docs.glass.lu

We have a great community who will help answer your questions at http://stackoverflow.com/ but if you need more
specialist support please contact us at hello@glass.lu where we will be able to offer our consultancy services.



1 change: 1 addition & 0 deletions Source/Glass.Mapper.Sc/Glass.Mapper.Sc.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@
<Compile Include="Profilers\SitecoreProfiler.cs" />
<Compile Include="RenderField\DateParameterKeys.cs" />
<Compile Include="RenderField\ImageParameterKeys.cs" />
<Compile Include="RenderField\RenderParameterKeys.cs" />
<Compile Include="RenderField\LinkParameterKeys.cs" />
<Compile Include="RenderingResult.cs" />
<Compile Include="SitecoreContentContext.cs" />
Expand Down
6 changes: 5 additions & 1 deletion Source/Glass.Mapper.Sc/GlassHtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,11 @@ private RenderingResult MakeEditable<T>(
}

renderFieldArgs.Parameters = dictionary;
renderFieldArgs.DisableWebEdit = false;
renderFieldArgs.DisableWebEdit = dictionary.ContainsKey(RenderParameterKeys.DisableWebEdit) ? dictionary[RenderParameterKeys.DisableWebEdit] : false;
renderFieldArgs.EnclosingTag =
dictionary.ContainsKey(RenderParameterKeys.EnclosingTag) ? dictionary[RenderParameterKeys.EnclosingTag] : string.Empty;

renderFieldArgs.RenderParameters[RenderParameterKeys.ShowTitleWhenBlank] = dictionary.ContainsKey(RenderParameterKeys.ShowTitleWhenBlank) ? dictionary[RenderParameterKeys.ShowTitleWhenBlank] : "false";

CorePipeline.Run("renderField", (PipelineArgs)renderFieldArgs);

Expand Down
39 changes: 39 additions & 0 deletions Source/Glass.Mapper.Sc/RenderField/RenderParameterKeys.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
Copyright 2012 Michael Edwards

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

*/
//-CRE-

namespace Glass.Mapper.Sc.RenderField
{
/// <summary>
/// Used for specifying rendering parameters when outputting through a field renderer.
/// </summary>
public class RenderParameterKeys
{
/// <summary>
/// Disable Web Edit
/// </summary>
public const string DisableWebEdit = "DisableWebEdit";
/// <summary>
/// The Enclosing Tag
/// </summary>
public const string EnclosingTag = "EnclosingTag";
/// <summary>
/// Show Titles When Blank
/// </summary>
public const string ShowTitleWhenBlank = "show-title-when-blank";
}
}