Code:
<script type="text/javascript">
function dropDown_onchange(e) {
var tabName = '';
var dropDown = $(e.data);
switch (e.data) {
case "#DeliveryEmailList":
tabName = '.cs-adlogix-email';
break;
case "#DeliveryTextList":
tabName = '.cs-adlogix-text';
break;
case "#DeliveryTwitterList":
tabName = '.cs-adlogix-twitter';
break;
case "#DeliveryFacebookList":
tabName = '.cs-adlogix-fb';
break;
}
var tabstrip = $("#DeliveryMethods").data("tTabStrip");
var item = $("li." + tabName, tabstrip.element);
if (dropDown.val() != 'None') {
tabstrip.enable(item);
} else {
tabstrip.disable(item);
}
}
function add_ArtifactDocument_ready() {
$('#IsDailyDeal').bind('click', null, chasingSavings.Artifact.showDailyDealDelivery);
$('#frmAddArtifact').bind('submit', { isAdding: true, hasPayload: true }, chasingSavings.Artifact.validate);
$('#CSArtifactTypeField').bind('change', null, chasingSavings.Artifact.GetArtifactSizeDetails);
$('#DeliveryEmailList').bind('change', '#DeliveryEmailList', dropDown_onchange);
$('#DeliveryFacebookList').bind('change', '#DeliveryFacebookList', dropDown_onchange);
$('#DeliveryTextList').bind('change', '#DeliveryTextList', dropDown_onchange);
$('#DeliveryTwitterList').bind('change', '#DeliveryTwitterList', dropDown_onchange);
$('#IsDailyDeal').click();
$('#IsDailyDeal').click();
chasingSavings.Artifact.showDailyDealDelivery();
}
</script>
<td colspan="6">
<%=Html.Telerik().TabStrip().Name("DeliveryMethods")
.Items(item => item
.Add()
.Text("General")
.HtmlAttributes(new {@class = "cs-adlogix-general"})
.Enabled(true)
.LoadContentFrom("GeneralInfo", "Artifact"))
.Items(item => item
.Add()
.Text("Facebook")
.Enabled(false)
.LoadContentFrom("DeliveryMethodFacebook", "Artifact")
.HtmlAttributes(new { @class = "cs-adlogix-fb" }))
.Items(item => item
.Add()
.Text("Twitter")
.Enabled(false)
.HtmlAttributes(new { @class = "cs-adlogix-twitter" })
.LoadContentFrom("DeliveryMethodTwitter", "Artifact"))
.Items(item => item
.Add()
.Text("Text Message")
.Enabled(false)
.HtmlAttributes(new { @class = "cs-adlogix-text" })
.LoadContentFrom("DeliveryMethodText", "Artifact"))
.Items(item => item
.Add()
.Text("Email Blast")
.Enabled(true)
.HtmlAttributes(new { @class = "cs-adlogix-email" })
.LoadContentFrom("DeliveryMethodEmail", "Artifact")
.Selected(true))
.HtmlAttributes(new { style = "width:900px;" })
%>
</td>