Widget:CJP4: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
function loadResources() { | function loadResources() { | ||
// mw.loader.load('mediaWiki.user'); | |||
$('#search').click(runQuery); | $('#search').click(runQuery); | ||
$('#query-container').mouseover(updateDisplay); | $('#query-container').mouseover(updateDisplay); | ||
Line 16: | Line 16: | ||
step: 1, | step: 1, | ||
range: true, | range: true, | ||
values: [5, 20] | values: [5, 20], | ||
slide: function(event, ui) { | |||
if (ui.values[0] < ui.values[1]) | |||
{ | |||
$("input.pillSizeSlider[data-index=0]").val(ui.values[0]); | |||
$("input.pillSizeSlider[data-index=1]").val(ui.values[1]); | |||
} | |||
else if (ui.values[0] > ui.values[1]) | |||
{ | |||
$("input.pillSizeSlider[data-index=1]").val(ui.values[0]); | |||
$("input.pillSizeSlider[data-index=0]").val(ui.values[1]); | |||
} | |||
else | |||
{ | |||
$("input.pillSizeSlider[data-index=0]").val(ui.values[0]); | |||
$("input.pillSizeSlider[data-index=1]").val(ui.values[1]); | |||
} | |||
} | |||
}); | }); | ||