Skip to content

Instantly share code, notes, and snippets.

@bleroy
Created April 1, 2015 22:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bleroy/ea0f0d48e16c64a404d4 to your computer and use it in GitHub Desktop.
Save bleroy/ea0f0d48e16c64a404d4 to your computer and use it in GitHub Desktop.
CodePlex Issue #16381 Plain Text Attachments
diff --git a/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Routable.ascx b/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Routable.ascx
--- a/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Routable.ascx
+++ b/src/Orchard.Web/Core/Common/Views/EditorTemplates/Parts/Common.Routable.ascx
@@ -17,18 +17,7 @@
<script type="text/javascript">
$(function(){
//pull slug input from tab order
- $("<%=String.Format("input#{0}Slug", !string.IsNullOrEmpty(Model.Prefix) ? Model.Prefix + "_" : "") %>").attr("tabindex",-1);
- $("<%=String.Format("input#{0}Title", !string.IsNullOrEmpty(Model.Prefix) ? Model.Prefix + "_" : "") %>").blur(function(){
- $(this).slugify({
- target:$("<%=String.Format("input#{0}Slug", !string.IsNullOrEmpty(Model.Prefix) ? Model.Prefix + "_" : "") %>"),
- url:"<%=Url.Slugify() %>",
- contentType:"<%=Model.RoutableAspect.ContentItem.ContentType %>",
- id:"<%=Model.RoutableAspect.ContentItem.Id %>"<%
- var container = Model.RoutableAspect.ContentItem.As<ICommonAspect>().Container;
- if (container != null) { %>,
- containerId:<%=container.ContentItem.Id %><%
- } %>
- })
+ $("<%=String.Format("input#{0}Slug", !string.IsNullOrEmpty(Model.Prefix) ? Model.Prefix + "_" : "") %>").attr("tabindex",-1);
})
})</script>
<% } %>
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment