Revize 1471
Přidáno uživatelem Ondřej Fibich před asi 12 roky(ů)
freenetis/branches/network/application/views/filter_form_template.php | ||
---|---|---|
$(this).next().html("");
|
||
|
||
// adds only operations of current type
|
||
for (i in types[$(this).val()]['operations'])
|
||
var b = [];
|
||
for (var i in types[$(this).val()]['operations'])
|
||
{
|
||
$(this).next().append("<option value='"+i+"'>"+types[$(this).val()]['operations'][i]+"</option>");
|
||
b.push("<option value='"+i+"'>"+types[$(this).val()]['operations'][i]+"</option>");
|
||
}
|
||
$(this).next().append(b.join(''));
|
||
|
||
// type has callback
|
||
if (types[$(this).val()]['callback'] != null)
|
||
{
|
||
$(this).next().next().autocomplete({
|
||
source: "<?php echo url_lang::base() ?>"+types[$(this).val()]['callback']
|
||
});
|
||
$(this).next().next().autocomplete({
|
||
source: "<?php echo url_lang::base() ?>"+types[$(this).val()]['callback']
|
||
});
|
||
}
|
||
else
|
||
$(this).next().next().autocomplete("destroy");
|
||
... | ... | |
|
||
// repair classes of value input
|
||
$(this).next().next().removeClass().addClass("v");
|
||
for (i in types[$(this).val()]['classes'])
|
||
for (var i in types[$(this).val()]['classes'])
|
||
{
|
||
$(this).next().next().addClass(types[$(this).val()]['classes'][i]);
|
||
}
|
||
... | ... | |
|
||
$(this).next().next().replaceWith("<select class='v' name='"+$(this).next().next().attr("name")+"'></select>");
|
||
|
||
for (i in types[$(this).val()]['values'])
|
||
b = [];
|
||
for (var i in types[$(this).val()]['values'])
|
||
{
|
||
$(this).next().next().append("<option value='"+i+"'>"+types[$(this).val()]['values'][i]+"</option>")
|
||
b.push("<option value='"+i+"'>"+types[$(this).val()]['values'][i]+"</option>");
|
||
}
|
||
$(this).next().next().append(b.join(''));
|
||
}
|
||
// type returns value (not key), change value select to input
|
||
else
|
Také k dispozici: Unified diff
Upravy:
- optimalizace filtru u casti se selecty