Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 860

Přidáno uživatelem Michal Kliment před více než 13 roky(ů)

Opraveno ajaxova filtrace polozek pri pridavani tarifu a u pridavani prevodu.

Zobrazit rozdíly:

freenetis/branches/testing/application/controllers/transfers.php
$view->extra_scripts = '$(document).ready(function(){
$("#account_type").change(function(){
$("#aname").html(\'<option value="">'.url_lang::lang('texts.Loading data, please wait').'...</option>\');
$.getJSON("'.url_lang::base().'json/get_accounts_by_type/",{id: $(this).val()}, function(j){
var options = \'\';
for (var i = 0; i < j.length; i++) {
options += \'<option value="\' + j[i].optionValue + \'">\' + j[i].optionDisplay + \'</option>\';
}
$.getJSON("'.url_lang::base().'json/get_accounts_by_type/",{id: $(this).val()}, function(data){
var options = \'\';
$.each(data, function(key, val) {
options += \'<option value="\' + key + \'">\' + val + \'</option>\';
});
$("#aname").html(options);
})
})
freenetis/branches/testing/application/controllers/members_fees.php
$("#fee_id_add_button").attr("href","'.url_lang::base().'fees/add/"+$(this).val()+"?popup=1");
else
$("#fee_id_add_button").attr("href","'.url_lang::base().'fees/add?popup=1");
$.getJSON("'.url_lang::base().'json/get_fees_by_type/",{id: $(this).val()}, function(j){
$.getJSON("'.url_lang::base().'json/get_fees_by_type/",{id: $(this).val()}, function(data){
var options = \'\';
for (var i = 0; i < j.length; i++) {
options += \'<option value="\' + j[i].optionValue + \'">\' + j[i].optionDisplay + \'</option>\';
}
$.each(data, function(key, val) {
options += \'<option value="\' + key + \'">\' + val + \'</option>\';
});
$("#fee_id").html(options);
})
})
freenetis/branches/testing/application/controllers/json.php
}
asort($arr_accounts, SORT_LOCALE_STRING);
echo "[ ";
$lines = array();
foreach ($arr_accounts as $id => $account)
{
$lines[] = "{optionValue:".$id.", optionDisplay: '$account'}";
}
echo implode(",\n", $lines);
echo " ]";
echo json_encode($arr_accounts);
}
/**
......
$fees = $fee_model->get_all_fees();
$arr_fees = array();
$arr_fees[0] = '----- '.url_lang::lang('texts.Select fee').' -----';
foreach ($fees as $fee)
{
// tariff of membership interrupt can be add only by adding of new membership interrupt
......
$arr_fees[$fee->id] = "$fee->fee ".$this->settings->get('currency')." $name($from-$to)";
}
echo "[";
$lines = array();
$lines[] = "{optionValue:0, optionDisplay: '".'----- '.url_lang::lang('texts.Select fee').' -----'."'}";
foreach ($arr_fees as $id => $fee)
{
$lines[] = "{optionValue:".$id.", optionDisplay: '$fee'}";
}
echo implode(",\n", $lines);
echo "]";
echo json_encode($arr_fees);
}
}

Také k dispozici: Unified diff