Edit D:\AVA\AVAStandard\AVA.ResourcesPlatform.WebUI\Themes\Bsk\Control\My\MySubjectEdit.ascx
??<%@ Control Language="C#" AutoEventWireup="true" Inherits="AVA.ResourcesPlatform.WebUI.Control.My.MySubjectEdit" %> <div class="well"> <div class="p_title"> <span class="title">???????????</span> <%= string.IsNullOrEmpty(this.PrimaryKey) ? "?????????" : "?????????"%> <% if (Has(this.ViewData["_Subject"])) { %> <span class="f_r"> <%= new MySubjectNavInstance(this) { Local = "???" }.ToHtml()%> </span> <% } %> </div> <hr /> <div class="userInput pwd"> <form id="frmSubjectEdit" action="" method="post" onsubmit="return false;"> <table border="0" cellpadding="2px" cellspacing="2px" class="myTab"> <tr> <td style="text-align: right; width: 150px;"><span class="label"><span class="required">*</span>?????</span></td> <td> <%= new HtmlText("Name", this.ViewData["_Subject.Name"], 256) { }%> <%= new HtmlYKTip("Name")%> </td> </tr> <tr> <td style="text-align: right;"><span class="label">????????</span></td> <td> <%= new HtmlSelect("ParentSubject", "Name", "Guid", "Guid") { Option = this.ListSubject, SelectedValue=this.ViewData["_Subject.ParentSubject.Guid"] }.InsertOption("::" + DefineEnum.???.Define() + "::", null, 0)%> </td> </tr> <tr> <td style="text-align: right;"><span class="label"><span class="required">*</span>???????????</span></td> <td> <table border="0"> <tr> <td> <%= new HtmlHidden("Cover", this.ViewData["_Subject.Cover"]) { Class = "ipt-t ipt-t-dft " }%> <%= new HtmlImg(SettingGroup.SubjectCover(this.ViewData["_Subject"]), "") { ID = "imgCover", Width=140, Height=88, OnErrorImg=SettingGroup.DefaultImg }%> </td> </tr> <tr> <td> <input type="button" value="??????" onclick="UploadSubjectCover();" style="width: auto;" /> <%= new HtmlYKTip("Cover")%> <script type="text/javascript"> function UploadSubjectCover() { UploadFile('#frmSubjectEdit [name=Cover]', '????????????', '0', '<%= SettingGroup.SubjectUploadPath %>', '', '960', '540'); } </script> </td> </tr> <tr> <td>???.jpg??if??ng???????? </td> </tr> </table> </td> </tr> <tr> <td style="text-align: right;"><span class="label">??????</span></td> <td> <table border="0"> <tr> <td> <%= new HtmlHidden("Ad", this.ViewData["_Subject.Ad"]) { Class = "ipt-t ipt-t-dft " }%> <%= new HtmlImg(SettingGroup.SubjectAd(this.ViewData["_Subject"]), "") { ID = "imgAd", Width=400, Height=300, OnErrorImg= SettingGroup.DefaultMaxImg }%> </td> </tr> <tr> <td> <input type="button" value="????????" onclick="UploadSubjectAd();" style="width: auto;" /> <%= new HtmlYKTip("Ad")%> <script type="text/javascript"> function UploadSubjectAd() { UploadFile('#frmSubjectEdit [name=Ad]', '????????????', '0', '<%= SettingGroup.SubjectUploadPath %>', '', '0', '0'); } </script> </td> </tr> <tr> <td>???.jpg??if??ng???????? </td> </tr> </table> </td> </tr> <tr> <td style="text-align: right;"><span class="label">?????????</span></td> <td> <%= new HtmlText("Compere", this.ViewData["_Subject.Compere"], 255) { }%> </td> </tr> <tr> <td style="text-align: right;"><span class="label"><span class="required">*</span>????????</span></td> <td> <%= new HtmlText("BeginTime", this.ViewData["_Subject.BeginTime"].ToDateTimeN().ToShortDate(), 255) { }%> <%= new HtmlYKTip("BeginTime")%> </td> </tr> <tr> <td style="text-align: right;"><span class="label"><span class="required">*</span>????????</span></td> <td> <%= new HtmlText("EndTime", this.ViewData["_Subject.EndTime"].ToDateTimeN().ToShortDate(), 255) { }%> <%= new HtmlYKTip("EndTime")%> </td> </tr> <tr> <td style="text-align: right;"><span class="label"><span class="required">*</span>???????????</span></td> <td> <%= new HtmlText("CutoffTime", this.ViewData["_Subject.CutoffTime"].ToDateTimeN().ToShortDate(), 255) { }%> <%= new HtmlYKTip("CutoffTime")%> </td> </tr> <tr> <td style="text-align: right;"><span class="label">????????</span></td> <td> <%= new HtmlCheckBox("ShareUpload", this.ViewData["_Subject.ShareUpload"], 1, 0) { Class = "" }.Style(new { Width = "auto" })%> </td> </tr> <tr> <td style="text-align: right;"><span class="label">???????????</span></td> <td> <%= new HtmlCheckBox("STEnable", this.ViewData["_Subject.STEnable"], 1, 0) { Class = "", OnClick="SwitchCutoffTimeBeforLock();" }.Style(new { Width = "auto" })%> </td> </tr> <tr id="trCutoffTimeBeforLock" style="display:none;"> <td style="text-align: right;"><span class="label">????????????</span></td> <td> <%= new HtmlCheckBox("CutoffTimeBeforLock", this.ViewData["_Subject.CutoffTimeBeforLock"], 1, 0) { Class = "" }.Style(new { Width = "auto" })%> <script type="text/javascript"> function SwitchCutoffTimeBeforLock() { var checked = $("#frmSubjectEdit [Name=STEnable]").is(':checked'); //alert(checked==true); if (checked == true) { document.getElementById("trCutoffTimeBeforLock").style.display = ""; } else { document.getElementById("trCutoffTimeBeforLock").style.display = "none"; $("#frmSubjectEdit [Name=CutoffTimeBeforLock]").prop('checked', false); } } $(function () { SwitchCutoffTimeBeforLock(); }); </script> </td> </tr> <tr> <td style="text-align: right;"><span class="label"><span class="required">*</span>????????</span></td> <td> <%= new HtmlRadio("Share", (this.ViewData["_Subject.Share"].ToInt(0) == 0 ? true : false), 0, null) { ID = "Subject_Share_0" }.Style(new { Width = "auto" })%> <label for="Subject_Share_0"> ??? </label> <%= new HtmlRadio("Share", (this.ViewData["_Subject.Share"].ToInt(0) == 1 ? true : false), 1, null) { ID = "Subject_Share_1" }.Style(new { Width = "auto" })%> <label for="Subject_Share_1"> ??? </label> <%= new HtmlRadio("Share", (this.ViewData["_Subject.Share"].ToInt(0) == 2 || this.ViewData["_Subject.Share"] == null ? true : false), 2, null) { ID = "Subject_Share_2" }.Style(new { Width = "auto" })%> <label for="Subject_Share_2"> ??? </label> <%= new HtmlYKTip("Share") %> </td> </tr> <tr> <td style="text-align: right;"><span class="label">????????</span></td> <td> <%= new HtmlTextArea("Description", this.ViewData["_Subject.Description"], 2000)%> </td> </tr> <tr> <td style="text-align: right;"><span class="label"><span class="required">*</span>??????</span></td> <td> <%= new HtmlText("SortNumber", this.ViewData["_Subject.SortNumber"], 4) { DefaultValue = 0 }%> <%= new HtmlYKTip("SortNumber") %> </td> </tr> <tr> <td style="text-align: right;"><span class="label">????????(" ")?????</span></td> <td> <%= new HtmlText("SubjectTag", this.SubjectTag, 256) { }%> </td> </tr> <tr> <td style="text-align: right;"><span class="label">????????</span></td> <td> <ul> <% foreach (var channel in this.ListAllChannel) { string parentChannelGuid = ""; if (channel.ParentChannel != null) { parentChannelGuid = channel.ParentChannel.Guid; %> <li> <%= new HtmlCheckBox("Channel", this.SelectChannel.Contains(channel.Guid), channel.Guid, "") { ID = "Channel" + channel.Guid, Class = "ChannelItem ChannelItemChannel" + parentChannelGuid, Lang = channel.ParentChannel.Guid }.Style(new { Width = "auto" })%> <%= new HtmlLabel("Channel" + channel.Guid, channel.Name)%> </li> <% } else { %> <li> <%= new HtmlCheckBox("Channel", this.SelectChannel.Contains(channel.Guid), channel.Guid, "") { ID = "Channel" + channel.Guid, Class = "ChannelMaster ChannelMaster" + channel.Guid }.Style(new { Width = "auto" })%> <%= new HtmlLabel("Channel" + channel.Guid, channel.Name)%> </li> <% } } %> </ul> <script type="text/javascript"> //????????? $(".ChannelMaster").bind("click", function () { if (this.checked == false) { $(".ChannelItem" + this.id).removeAttr("checked"); } }) //????????? $(".ChannelItem").bind("click", function () { if (this.checked == true) { $(".ChannelMaster" + this.lang).attr("checked", "checked"); } else { if ($(".ChannelItemChannel" + this.lang + ":checked").length > 0) { $(".ChannelMaster" + this.lang).attr("checked", "checked"); } else { $(".ChannelMaster" + this.lang).removeAttr("checked"); } } }) </script> </td> </tr> <tr> <td style="text-align: right;"><span class="label">????????</span></td> <td> <ul> <% foreach (var category in this.ListAllCategory) { string parentCategoryGuid = ""; if (category.ParentCategory != null) { parentCategoryGuid = category.ParentCategory.Guid; %> <li> <%= new HtmlCheckBox("Category", this.SelectCategory.Contains(category.Guid), category.Guid, "") { ID = "Category" + category.Guid, Class = "CategoryItem CategoryItemCategory" + parentCategoryGuid, Lang = category.ParentCategory.Guid }.Style(new { Width = "auto" })%> <%= new HtmlLabel("Category" + category.Guid, category.Name)%> </li> <% } else { %> <li> <%= new HtmlCheckBox("Category", this.SelectCategory.Contains(category.Guid), category.Guid, "") { ID = "Category" + category.Guid, Class = "CategoryMaster CategoryMaster" + category.Guid }.Style(new { Width = "auto" })%> <%= new HtmlLabel("Category" + category.Guid, category.Name)%> </li> <% } } %> </ul> <script type="text/javascript"> //??????????? $(".CategoryMaster").bind("click", function () { if (this.checked == false) { $(".CategoryItem" + this.id).removeAttr("checked"); } }) //??????????? $(".CategoryItem").bind("click", function () { if (this.checked == true) { $(".CategoryMaster" + this.lang).attr("checked", "checked"); } else { if ($(".CategoryItemCategory" + this.lang + ":checked").length > 0) { $(".CategoryMaster" + this.lang).attr("checked", "checked"); } else { $(".CategoryMaster" + this.lang).removeAttr("checked"); } } }) </script> </td> </tr> <tr> <td style="text-align: right;"></td> <td></td> </tr> <tr> <td style="text-align: right;"></td> <td> <%= new HtmlHidden("InheritScoreItem", "0")%> <%= new HtmlHidden("Key", SetKey(this.ViewData["_Subject.Guid"], this.ViewData["_Subject.Version"]))%> <%= new HtmlSubmit(string.IsNullOrEmpty(this.PrimaryKey) ? "?????????" : "????????????", "SubjectEdit", "SubjectEditClient(this);").Style(new { Width = "100px" })%> </td> </tr> </table> </form> </div> <script type="text/javascript"> $(function () { $("#frmSubjectEdit [name=BeginTime]").datepicker({ onClose: function () { $.validator.itemValid("#frmSubjectEdit [name=BeginTime]", "SubjectEdit"); } }); $("#frmSubjectEdit [name=EndTime]").datepicker({ onClose: function () { $.validator.itemValid("#frmSubjectEdit [name=EndTime]", "SubjectEdit"); } }); $("#frmSubjectEdit [name=CutoffTime]").datepicker({ onClose: function () { $.validator.itemValid("#frmSubjectEdit [name=CutoffTime]", "SubjectEdit"); } }); }); //?????? $.validator.initConfig({ validatorGroup: "SubjectEdit", form: "#frmSubjectEdit", alertMessage: true, showMessage: false }); //????????? $("#frmSubjectEdit [name=Name]").formValidator({ validatorGroup: "SubjectEdit", rules: { required: null }, message: { required: "??????????????" } }); ////????????? //$("#frmSubjectEdit [name=Cover]").formValidator({ // validatorGroup: "SubjectEdit", // rules: //{ // required: null //}, // message: //{ // required: "??????????????" //} //}); ////??????????? //$("#frmSubjectEdit [name=Ad]").formValidator({ // validatorGroup: "SubjectEdit", // rules: // { // required: null // }, // message: // { // required: "???????????????" // } //}); //??????? $("#frmSubjectEdit [name=BeginTime]").formValidator({ validatorGroup: "SubjectEdit", rules: { required: null, regex: "date" }, message: { required: "????????????", regex: "??????????????" } }); //?????? $("#frmSubjectEdit [name=EndTime]").formValidator({ validatorGroup: "SubjectEdit", rules: { required: null, regex: "date" }, message: { required: "???????????", regex: "??????????????" } }); //????????? $("#frmSubjectEdit [name=CutoffTime]").formValidator({ validatorGroup: "SubjectEdit", rules: { required: null, regex: "date" }, message: { required: "??????????????", regex: "?????????????????" } }); //?????? $("#frmSubjectEdit [name=Share]").formValidator({ validatorGroup: "SubjectEdit", rules: { min: 1 }, message: { min: "???????????" } }); //????? $("#frmSubjectEdit [name=SortNumber]").formValidator({ validatorGroup: "SubjectEdit", rules: { required: null, regex: "num1" }, message: { required: "???????????", regex: "???????????" } }); </script> <script type="text/javascript"> function SubjectEditClient(send) { var isInsert = '<%= string.IsNullOrEmpty(this.PrimaryKey) ? "1" : "0"%>'; if (isInsert == '1') { if ($("#frmSubjectEdit [name=STEnable]").val() == '1') { if (confirm("??????????????????")) { $("#frmSubjectEdit [name=InheritScoreItem]").val("1"); } } } $.ajax( { cache: false, type: "POST", url: Global.Site + "/Ajax.aspx?AVA.ResourcesPlatform.Ajax.ClientAjax.SubjectEdit", data: Global.GetFormValue($("#frmSubjectEdit")), async: true, dataType: 'json', success: function (result) { $(send).val('<%= string.IsNullOrEmpty(this.PrimaryKey) ? "?????????" : "????????????"%>'); alert('<%= string.IsNullOrEmpty(this.PrimaryKey) ? "????????????" : "???????????????"%>') Global.Disabled(send, false); window.location.href = result; }, beforeSend: function () { $(send).val('<%= string.IsNullOrEmpty(this.PrimaryKey) ? "??????..." : "??????..."%>'); Global.Disabled(send, true); }, complete: function () { }, error: function (XMLHttpRequest, textStatus, errorThrown) { $(send).val('<%= string.IsNullOrEmpty(this.PrimaryKey) ? "?????????" : "????????????"%>'); Global.Disabled(send, false); var message = XMLHttpRequest.responseText; Global.Error(message); } }); } </script> </div>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de