|
|
@ -8,26 +8,49 @@ using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
using System.Linq; |
|
|
using System.Linq; |
|
|
using System.Text; |
|
|
using System.Text; |
|
|
|
|
|
using System.Web.UI; |
|
|
using System.Web.UI.WebControls; |
|
|
using System.Web.UI.WebControls; |
|
|
|
|
|
using TSingSoft.WebControls2; |
|
|
|
|
|
|
|
|
namespace BWP.Web.Pages.B3WeChat.ContentTemplate_ |
|
|
namespace BWP.Web.Pages.B3WeChat.ContentTemplate_ |
|
|
{ |
|
|
{ |
|
|
class ContentTemplateEdit : BaseInfoEditPage<ContentTemplate, IContentTemplateBL> |
|
|
class ContentTemplateEdit : BaseInfoEditPage<ContentTemplate, IContentTemplateBL> |
|
|
{ |
|
|
{ |
|
|
protected override void BuildBasePropertiesEditor(TitlePanel titlePanel, PageLayoutSection pageLayoutSection) |
|
|
|
|
|
|
|
|
protected override void OnPreRender(EventArgs e) |
|
|
{ |
|
|
{ |
|
|
|
|
|
base.OnPreRender(e); |
|
|
|
|
|
|
|
|
|
|
|
var script = @"
|
|
|
|
|
|
function changed(){ |
|
|
|
|
|
window.frames['result'].postMessage([__DFContainer.getValue('TestData'),__DFContainer.getValue('Text')],'*'); |
|
|
|
|
|
} |
|
|
|
|
|
$(function(){ |
|
|
|
|
|
setTimeout(changed,500); |
|
|
|
|
|
}); |
|
|
|
|
|
";
|
|
|
|
|
|
Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "init", script, true); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
protected override void BuildBasePropertiesEditor(TitlePanel titlePanel, PageLayoutSection pageLayoutSection) |
|
|
|
|
|
{ |
|
|
var layoutManager = new LayoutManager("", mDFInfo, mDFContainer); |
|
|
var layoutManager = new LayoutManager("", mDFInfo, mDFContainer); |
|
|
layoutManager.Add("Text", InputCreator.CreateTextArea(480, 640)); |
|
|
|
|
|
|
|
|
layoutManager.Add("Text", InputCreator.CreateTextArea(480, 640)) |
|
|
|
|
|
.Attributes["onchange"] = "changed();"; |
|
|
|
|
|
layoutManager.Add("TestData", InputCreator.CreateTextArea(480, 640)) |
|
|
|
|
|
.Attributes["onchange"] = "changed();"; |
|
|
|
|
|
layoutManager.Add("ShowResult", new SimpleLabel("显示"), new LiteralControl(@"<iframe style='border:0px;width:370px;height:667px;zoom:69%' name='result' src='../../app/index.html?onlyShowTemplate=1'></iframe>")); |
|
|
|
|
|
layoutManager["ShowResult"].NotAutoAddToContainer = true; |
|
|
|
|
|
|
|
|
var config = new AutoLayoutConfig(); |
|
|
var config = new AutoLayoutConfig(); |
|
|
layoutManager.Config = config; |
|
|
layoutManager.Config = config; |
|
|
config.Add("Name"); |
|
|
config.Add("Name"); |
|
|
config.Add("Remark"); |
|
|
|
|
|
config.Add("Text").ColSpan = 8; |
|
|
|
|
|
|
|
|
config.Add("Remark").EndLine = true; |
|
|
|
|
|
config.Add("Text").ColSpan = 3; |
|
|
|
|
|
config.Add("TestData").ColSpan = 3; |
|
|
|
|
|
config.Add("ShowResult"); |
|
|
config.SetAllLabelLayoutOptionWidth(Unit.Pixel(60)); |
|
|
config.SetAllLabelLayoutOptionWidth(Unit.Pixel(60)); |
|
|
|
|
|
|
|
|
pageLayoutSection.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo); |
|
|
pageLayoutSection.ApplyLayout(layoutManager, config, mPageLayoutManager, mDFInfo); |
|
|
|
|
|
|
|
|
titlePanel.Controls.Add(layoutManager.CreateLayout()); |
|
|
titlePanel.Controls.Add(layoutManager.CreateLayout()); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|