The 'Master' Quality DropDownList now controls all quality controls on the page + on the AddNew Series Page.

Master DropDown is now a Telerik Dropdown to fit better with the styling.
pull/3113/head
Mark McDowall 14 years ago
parent 463881843e
commit 0fd9fa1e2b

@ -27,13 +27,10 @@
@Html.DisplayText("No Series to Add"); @Html.DisplayText("No Series to Add");
} }
@Html.DropDownList("masterDropbox", (SelectList) ViewData["qualities"], @Html.Telerik().DropDownList().Name("masterDropbox").BindTo((SelectList) ViewData["qualities"]).HtmlAttributes(
new {style = "width: 100px;", id = "masterDropboxId"}) new {style = "width: 100px; margin-left:5px;"}).ClientEvents(events => events.OnChange("masterChanged"))
@Html.Telerik().DropDownList().Name("tester").BindTo((SelectList) ViewData["qualities"]).HtmlAttributes( <button onclick="openAddNewSeries(); return false;" class="listButton" style="margin-left:210px">Add New</button>
new {style = "width: 100px", @class = "qualityDropbox"})
<button onclick="openAddNewSeries(); return false;" class="listButton">Add New</button>
@foreach (var path in Model) @foreach (var path in Model)
{ {
@ -47,19 +44,27 @@
var windowElement = $('#Window'); var windowElement = $('#Window');
windowElement.data('tWindow').center().open(); windowElement.data('tWindow').center().open();
}; }
function closeAddNewSeries() { function closeAddNewSeries() {
var window = $('#Window').data("tWindow"); var window = $('#Window').data("tWindow");
window.close(); window.close();
} }
$("#masterDropboxId").change(function () { function masterChanged() {
var selectedQuality = $('#masterDropboxId').get(0).selectedIndex; var masterQuality = $('#masterDropbox').data("tDropDownList").value();
//$(".qualityDropbox").data("tComboBox").value(selectedQuality);
//$(".qualityDropbox").data("tDropDownList").val(selectedQuality); var qualityDropbox = $(".qualityDropbox");
var comboBox = $(".qualityDropbox").data("tDropDownList"); qualityDropbox.each(function () {
comboBox.select(selectedQuality); var child = $(this).children("[id^='qualityList']");
var comboBox = child.data("tDropDownList");
comboBox.value(masterQuality);
}); });
}
function testValue() {
var comboBox = $('#qualityList_tester').data("tDropDownList");
comboBox.value('2');
}
</script> </script>
Loading…
Cancel
Save