<commit_before><%@ Page Title="Edit XSLT File" MasterPageFile="../../masterpages/umbracoPage.Master"
    ValidateRequest="false" Language="c#" CodeBehind="editXslt.aspx.cs" AutoEventWireup="True"
    Inherits="umbraco.cms.presentation.developer.editXslt" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>

<asp:Content ID="DocTypeContent" ContentPlaceHolderID="DocType" runat="server">
    <!DOCTYPE html>
</asp:Content>

<asp:Content ContentPlaceHolderID="head" runat="server" ID="cp2">
    
    <umb:JsInclude ID="JsInclude2" runat="server" FilePath="Editors/EditXslt.js" PathNameAlias="UmbracoClient" />
    <umb:CssInclude ID="CssInclude1" runat="server" FilePath="Editors/EditXslt.css" PathNameAlias="UmbracoClient" />

    <script type="text/javascript">

        (function ($) {
            $(document).ready(function () {
                var editor = new Umbraco.Editors.EditXslt({
                    nameTxtBox: $('#<%= xsltFileName.ClientID %>'),
                    originalFileName: '<%= xsltFileName.Text %>',
                    saveButton: $("#<%= ((Control)SaveButton).ClientID %>"),
                    editorSourceElement: $('#<%= editorSource.ClientID %>'),
                    skipTestingCheckBox: $("#<%= SkipTesting.ClientID %>"),
                });
                editor.init();

                //bind save shortcut
                UmbClientMgr.appActions().bindSaveShortCut();
            });
        })(jQuery);

        //TODO: Move these to EditXslt.js one day
        var xsltSnippet = "";        
        function xsltVisualize() {

            xsltSnippet = UmbEditor.IsSimpleEditor
                ? jQuery("#<%= editorSource.ClientID %>").getSelection().text
                    : UmbEditor._editor.getSelection();

            if (xsltSnippet == '') {
                xsltSnippet = UmbEditor.IsSimpleEditor
                ? jQuery("#<%= editorSource.ClientID %>").val()
                    : UmbEditor.GetCode();
            }

            UmbClientMgr.openModalWindow('<%= Umbraco.Core.IO.IOHelper.ResolveUrl(Umbraco.Core.IO.SystemDirectories.Umbraco) %>/developer/xslt/xsltVisualize.aspx', 'Visualize XSLT', true, 550, 650);
        } 
    </script>
    <umb:JsInclude ID="JsInclude1" runat="server" FilePath="Application/jQuery/jquery-fieldselection.js"
        PathNameAlias="UmbracoClient" />
</asp:Content>
<asp:Content ContentPlaceHolderID="body" runat="server" ID="cp1">
    <cc1:TabView ID="UmbracoPanel1" runat="server" Text="Edit xsl" hasMenu="true">
            <cc1:Pane runat="server" ID="pane1">
                <cc1:CodeArea ID="editorSource" CodeBase="XML" runat="server" AutoResize="false"  />
            </cc1:Pane>
            
            <cc1:Pane runat="server" ID="pane2">
                 <cc1:PropertyPanel ID="pp_filename" runat="server" Text="Filename">
                    <asp:TextBox ID="xsltFileName" runat="server" CssClass="guiInputText"></asp:TextBox>
                </cc1:PropertyPanel>
            </cc1:Pane>
    </cc1:TabView>
</asp:Content>
<asp:Content ContentPlaceHolderID="footer" runat="server">
    <asp:Literal ID="editorJs" runat="server"></asp:Literal>
</asp:Content><commit_msg>Fix 2eb050e, broke Xslt edit<commit_after><%@ Page Title="Edit XSLT File" MasterPageFile="../../masterpages/umbracoPage.Master"
    ValidateRequest="false" Language="c#" CodeBehind="editXslt.aspx.cs" AutoEventWireup="True"
    Inherits="umbraco.cms.presentation.developer.editXslt" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>

<asp:Content ID="DocTypeContent" ContentPlaceHolderID="DocType" runat="server">
    <!DOCTYPE html>
</asp:Content>

<asp:Content ContentPlaceHolderID="head" runat="server" ID="cp2">

    <umb:JsInclude ID="JsInclude2" runat="server" FilePath="Editors/EditXslt.js" PathNameAlias="UmbracoClient" />
    <umb:CssInclude ID="CssInclude1" runat="server" FilePath="Editors/EditXslt.css" PathNameAlias="UmbracoClient" />

    <script type="text/javascript">

        (function ($) {
            $(document).ready(function () {
                var editor = new Umbraco.Editors.EditXslt({
                    nameTxtBox: $('#<%= xsltFileName.ClientID %>'),
                    originalFileName: '<%= xsltFileName.Text %>',
                    saveButton: $("#<%= ((Control)SaveButton).ClientID %>"),
                    editorSourceElement: $('#<%= editorSource.ClientID %>')
                });
                editor.init();

                //bind save shortcut
                UmbClientMgr.appActions().bindSaveShortCut();
            });
        })(jQuery);

        //TODO: Move these to EditXslt.js one day
        var xsltSnippet = "";
        function xsltVisualize() {

            xsltSnippet = UmbEditor.IsSimpleEditor
                ? jQuery("#<%= editorSource.ClientID %>").getSelection().text
                    : UmbEditor._editor.getSelection();

            if (xsltSnippet == '') {
                xsltSnippet = UmbEditor.IsSimpleEditor
                ? jQuery("#<%= editorSource.ClientID %>").val()
                    : UmbEditor.GetCode();
            }

            UmbClientMgr.openModalWindow('<%= Umbraco.Core.IO.IOHelper.ResolveUrl(Umbraco.Core.IO.SystemDirectories.Umbraco) %>/developer/xslt/xsltVisualize.aspx', 'Visualize XSLT', true, 550, 650);
        }
    </script>
    <umb:JsInclude ID="JsInclude1" runat="server" FilePath="Application/jQuery/jquery-fieldselection.js"
        PathNameAlias="UmbracoClient" />
</asp:Content>
<asp:Content ContentPlaceHolderID="body" runat="server" ID="cp1">
    <cc1:TabView ID="UmbracoPanel1" runat="server" Text="Edit xsl" hasMenu="true">
            <cc1:Pane runat="server" ID="pane1">
                <cc1:CodeArea ID="editorSource" CodeBase="XML" runat="server" AutoResize="false"  />
            </cc1:Pane>

            <cc1:Pane runat="server" ID="pane2">
                 <cc1:PropertyPanel ID="pp_filename" runat="server" Text="Filename">
                    <asp:TextBox ID="xsltFileName" runat="server" CssClass="guiInputText"></asp:TextBox>
                </cc1:PropertyPanel>
            </cc1:Pane>
    </cc1:TabView>
</asp:Content>
<asp:Content ContentPlaceHolderID="footer" runat="server">
    <asp:Literal ID="editorJs" runat="server"></asp:Literal>
</asp:Content>
{'fraction_non_alphanumeric': 0.15700076511094108, 'fraction_numerical': 0.007957153787299158, 'mean_word_length': 2.906754333532576, 'pattern_counts': {'":': 0, '<': 78, '<?xml version=': 0, '>': 78, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5996935', 'n_tokens_mistral': 2091, 'n_tokens_neox': 1947, 'n_words': 291}