legacy Editmacro editor tweaks
This commit is contained in:
@@ -17,14 +17,14 @@
|
||||
(function($) {
|
||||
$(document).ready(function () {
|
||||
//on drop down change, update the text box and clear other text boxes
|
||||
$("#Table2 td.propertyContent select").change(function() {
|
||||
$(".fileChooser select").change(function () {
|
||||
//update the txt box
|
||||
var txt = $(this).prev("input[type='text']");
|
||||
txt.val($(this).val());
|
||||
//clear other text boxes
|
||||
$("#Table2 td.propertyContent input[type='text']").not(txt).val("");
|
||||
$(".fileChooser input[type='text']").not(txt).val("");
|
||||
//reset other drop downs
|
||||
$("#Table2 td.propertyContent select").not($(this)).val("");
|
||||
$(".fileChooser select").not($(this)).val("");
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
@@ -32,197 +32,145 @@
|
||||
</script>
|
||||
</asp:Content>
|
||||
<asp:Content ContentPlaceHolderID="body" runat="server">
|
||||
<cc1:TabView ID="TabView1" runat="server" Width="552px" Height="392px"></cc1:TabView>
|
||||
<cc1:TabView ID="TabView1" runat="server"></cc1:TabView>
|
||||
|
||||
<cc1:Pane ID="Pane1" runat="server">
|
||||
<table id="macroPane" class="macro-props" runat="server">
|
||||
<tr>
|
||||
<td class="propertyHeader">
|
||||
Name
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:TextBox ID="macroName" runat="server" CssClass="guiInputText"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="propertyHeader">
|
||||
Alias
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:TextBox ID="macroAlias" runat="server" CssClass="guiInputText"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<cc1:PropertyPanel runat="server" Text="Name">
|
||||
<asp:TextBox ID="macroName" runat="server" CssClass="guiInputText"></asp:TextBox>
|
||||
</cc1:PropertyPanel>
|
||||
<cc1:PropertyPanel runat="server" Text="Alias">
|
||||
<asp:TextBox ID="macroAlias" runat="server" CssClass="guiInputText"></asp:TextBox>
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
<cc1:Pane ID="Pane1_2" BackColor="mediumaquamarine" runat="server">
|
||||
<table id="Table2" class="macro-props" >
|
||||
<tr>
|
||||
<td class="propertyHeader">
|
||||
<img alt="python Icon" src="../../images/umbraco/developerScript.gif" align="absMiddle" />
|
||||
Use MVC Partial View
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:TextBox ID="SelectedPartialView" runat="server" CssClass="guiInputText"></asp:TextBox>
|
||||
|
||||
|
||||
<cc1:Pane ID="Pane1_2" runat="server" title="Choose a file to render" CssClass="fileChooser">
|
||||
|
||||
<cc1:PropertyPanel runat="server" Text="MVC Partial view">
|
||||
<asp:TextBox ID="SelectedPartialView" runat="server" CssClass="guiInputText"></asp:TextBox>
|
||||
<asp:DropDownList ID="PartialViewList" runat="server" >
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="propertyHeader">
|
||||
<img alt="Xslt Icon" src="../../images/umbraco/developerXslt.gif" align="absMiddle"/>
|
||||
or XSLT file
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:TextBox ID="macroXslt" runat="server" CssClass="guiInputText"></asp:TextBox>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<cc1:PropertyPanel runat="server" Text="XSLT">
|
||||
<asp:TextBox ID="macroXslt" runat="server" CssClass="guiInputText"></asp:TextBox>
|
||||
<asp:DropDownList ID="xsltFiles" runat="server">
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="propertyHeader">
|
||||
<img alt="User control Icon" src="../../images/developer/userControlIcon.png" align="absMiddle"/>
|
||||
or .NET User Control
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:TextBox ID="macroUserControl" runat="server" CssClass="guiInputText"></asp:TextBox>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<cc1:PropertyPanel runat="server" Text="usercontrol">
|
||||
<asp:TextBox ID="macroUserControl" runat="server" CssClass="guiInputText"></asp:TextBox>
|
||||
<asp:DropDownList ID="userControlList" runat="server">
|
||||
</asp:DropDownList>
|
||||
<asp:PlaceHolder ID="assemblyBrowserUserControl" runat="server"></asp:PlaceHolder>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="propertyHeader">
|
||||
<img alt="Custom Control Icon" src="../../images/developer/customControlIcon.png" align="absMiddle"/>
|
||||
or .NET Custom Control
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:TextBox ID="macroAssembly" runat="server" CssClass="guiInputText"></asp:TextBox>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<cc1:PropertyPanel runat="server" Text="Razor script">
|
||||
<asp:TextBox ID="macroPython" runat="server" CssClass="guiInputText"></asp:TextBox>
|
||||
<asp:DropDownList ID="pythonFiles" runat="server">
|
||||
</asp:DropDownList>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<asp:PlaceHolder runat="server" Visible="false">
|
||||
<asp:TextBox ID="macroAssembly" runat="server" CssClass="guiInputText"></asp:TextBox>
|
||||
(Assembly)<br />
|
||||
<asp:TextBox ID="macroType" runat="server" CssClass="guiInputText"></asp:TextBox>
|
||||
(Type)
|
||||
<asp:PlaceHolder ID="assemblyBrowser" runat="server"></asp:PlaceHolder>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="propertyHeader">
|
||||
<img alt="python Icon" src="../../images/umbraco/developerScript.gif" align="absMiddle"/>
|
||||
or script file
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:TextBox ID="macroPython" runat="server" CssClass="guiInputText"></asp:TextBox>
|
||||
<asp:DropDownList ID="pythonFiles" runat="server">
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:PlaceHolder ID="assemblyBrowser" runat="server"></asp:PlaceHolder>
|
||||
</asp:PlaceHolder>
|
||||
</cc1:Pane>
|
||||
<cc1:Pane ID="Pane1_3" runat="server">
|
||||
<table id="Table1" class="macro-props" runat="server">
|
||||
<tr>
|
||||
<td class="propertyHeader">
|
||||
Use in editor
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:CheckBox ID="macroEditor" runat="server" Text="Yes"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="propertyHeader">
|
||||
Render content in editor
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:CheckBox ID="macroRenderContent" runat="server" Text="Yes"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<cc1:Pane ID="Pane1_3" runat="server" Title="Editor settings">
|
||||
|
||||
<cc1:PropertyPanel runat="server" Text="Use in rich text editor">
|
||||
<asp:CheckBox ID="macroEditor" runat="server" Text="Yes"></asp:CheckBox>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<cc1:PropertyPanel runat="server" Text="Render in rich text editor">
|
||||
<asp:CheckBox ID="macroRenderContent" runat="server" Text="Yes"></asp:CheckBox>
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
<cc1:Pane ID="Pane1_4" runat="server">
|
||||
<table id="Table3" class="macro-props" runat="server">
|
||||
<tr>
|
||||
<td class="propertyHeader">
|
||||
Cache Period
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:TextBox ID="cachePeriod" runat="server" CssClass="guiInputText small"></asp:TextBox> Seconds
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="propertyHeader">
|
||||
Cache By Page
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:CheckBox ID="cacheByPage" runat="server" Text="Yes"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="propertyHeader">
|
||||
Cache Personalized
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:CheckBox ID="cachePersonalized" runat="server" Text="Yes"></asp:CheckBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<cc1:Pane ID="Pane1_4" runat="server" Title="Cache settings">
|
||||
|
||||
<cc1:PropertyPanel runat="server" Text="Cache period">
|
||||
<asp:TextBox ID="cachePeriod" runat="server" CssClass="guiInputText input-small"></asp:TextBox> Seconds
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<cc1:PropertyPanel runat="server" Text="Cache by page">
|
||||
<asp:CheckBox ID="cacheByPage" runat="server" Text="Yes"></asp:CheckBox>
|
||||
</cc1:PropertyPanel>
|
||||
|
||||
<cc1:PropertyPanel runat="server" Text="Cache personalized">
|
||||
<asp:CheckBox ID="cachePersonalized" runat="server" Text="Yes"></asp:CheckBox>
|
||||
</cc1:PropertyPanel>
|
||||
</cc1:Pane>
|
||||
|
||||
<cc1:Pane ID="Panel2" runat="server">
|
||||
<asp:Repeater ID="macroProperties" runat="server">
|
||||
<HeaderTemplate>
|
||||
<table class="macro-props params">
|
||||
<tr>
|
||||
<td class="propertyHeader">
|
||||
<%=umbraco.ui.Text("general", "alias",this.getUser())%>
|
||||
</td>
|
||||
<td class="propertyHeader">
|
||||
<%=umbraco.ui.Text("general", "name",this.getUser())%>
|
||||
</td>
|
||||
<td class="propertyHeader">
|
||||
<%=umbraco.ui.Text("general", "type",this.getUser())%>
|
||||
</td>
|
||||
<td class="propertyHeader" />
|
||||
</tr>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<%=umbraco.ui.Text("general", "alias",this.getUser())%>
|
||||
</th>
|
||||
<th>
|
||||
<%=umbraco.ui.Text("general", "name",this.getUser())%>
|
||||
</th>
|
||||
<th>
|
||||
<%=umbraco.ui.Text("general", "type",this.getUser())%>
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<tr>
|
||||
<td class="propertyContent">
|
||||
<td>
|
||||
<input type="hidden" id="macroPropertyID" runat="server" value='<%#DataBinder.Eval(Container.DataItem, "id")%>'
|
||||
name="macroPropertyID" />
|
||||
<asp:TextBox runat="server" ID="macroPropertyAlias" Text='<%#DataBinder.Eval(Container.DataItem, "Alias")%>' />
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="macroPropertyName" Text='<%#DataBinder.Eval(Container.DataItem, "Name")%>' />
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<td>
|
||||
<asp:DropDownList OnPreRender="AddChooseList" runat="server" ID="macroPropertyType"
|
||||
DataTextFormatString="" DataTextField='macroPropertyTypeAlias' DataValueField="id"
|
||||
DataSource='<%# GetMacroPropertyTypes()%>' SelectedValue='<%# ((umbraco.cms.businesslogic.macro.MacroPropertyType) DataBinder.Eval(Container.DataItem,"Type")).Id %>'>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:Button OnClick="deleteMacroProperty" ID="delete" Text="Delete" runat="server"
|
||||
CssClass="guiInputButton" />
|
||||
<td>
|
||||
<asp:Button OnClick="deleteMacroProperty" ID="delete" Text="Delete" runat="server" CssClass="btn btn-default" />
|
||||
</td>
|
||||
</tr>
|
||||
</ItemTemplate>
|
||||
<FooterTemplate>
|
||||
<tr>
|
||||
<td class="propertyContent">
|
||||
<asp:TextBox runat="server" ID="macroPropertyAliasNew" Text='New Alias' OnTextChanged="macroPropertyCreate" />
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:TextBox runat="server" ID="macroPropertyNameNew" Text='New Name' />
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:DropDownList OnPreRender="AddChooseList" runat="server" ID="macroPropertyTypeNew"
|
||||
DataTextField="macroPropertyTypeAlias" DataValueField="id" DataSource='<%# GetMacroPropertyTypes()%>'>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td class="propertyContent">
|
||||
<asp:Button ID="createNew" Text="Add" runat="server" CssClass="guiInputButton" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfooter>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="macroPropertyAliasNew" Text='New Alias' OnTextChanged="macroPropertyCreate" />
|
||||
</td>
|
||||
<td>
|
||||
<asp:TextBox runat="server" ID="macroPropertyNameNew" Text='New Name' />
|
||||
</td>
|
||||
<td>
|
||||
<asp:DropDownList OnPreRender="AddChooseList" runat="server" ID="macroPropertyTypeNew"
|
||||
DataTextField="macroPropertyTypeAlias" DataValueField="id" DataSource='<%# GetMacroPropertyTypes()%>'>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td>
|
||||
<asp:Button ID="createNew" Text="Add" runat="server" CssClass="guiInputButton" />
|
||||
</td>
|
||||
</tr>
|
||||
</tfooter>
|
||||
</table>
|
||||
</FooterTemplate>
|
||||
</asp:Repeater>
|
||||
</cc1:Pane>
|
||||
|
||||
<asp:PlaceHolder runat="server">
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
@@ -347,13 +347,10 @@ namespace umbraco.cms.presentation.developer
|
||||
Parameters = TabView1.NewTabPage("Parameters");
|
||||
Parameters.Controls.Add(Panel2);
|
||||
|
||||
ImageButton save = InfoTabPage.Menu.NewImageButton();
|
||||
save.ImageUrl = SystemDirectories.Umbraco + "/images/editor/save.gif";
|
||||
save.ID = "save";
|
||||
|
||||
ImageButton save2 = Parameters.Menu.NewImageButton();
|
||||
save2.ImageUrl = SystemDirectories.Umbraco + "/images/editor/save.gif";
|
||||
|
||||
MenuButton save = TabView1.Menu.NewButton();
|
||||
save.ButtonType = MenuButtonType.Primary;
|
||||
save.Text = ui.Text("save");
|
||||
save.ID = "save";
|
||||
base.OnInit(e);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,12 @@ namespace umbraco.uicontrols
|
||||
set { m_Text = value; }
|
||||
}
|
||||
|
||||
private string m_title = string.Empty;
|
||||
public string Title
|
||||
{
|
||||
get { return m_title; }
|
||||
set { m_title = value; }
|
||||
}
|
||||
|
||||
public void addProperty(string Caption, Control C)
|
||||
{
|
||||
@@ -66,7 +72,10 @@ namespace umbraco.uicontrols
|
||||
styleString += key + ":" + this.Style[key] + ";";
|
||||
}
|
||||
|
||||
|
||||
writer.WriteLine("<div class=\"umb-pane " + this.CssClass + "\" style='" + styleString + "'>");
|
||||
if (!string.IsNullOrEmpty(m_title))
|
||||
writer.WriteLine("<h5 class='umb-pane-title'>" + m_title + "</h5>");
|
||||
writer.WriteLine("<div class=\"control-group umb-control-group\" style='" + styleString + "'>");
|
||||
|
||||
if (!string.IsNullOrEmpty(m_Text))
|
||||
|
||||
Reference in New Issue
Block a user