Hi.
I’m using Unit’s view and in section’s name I use a link with a parameter. All works fine, except that I want the Units tab to reset chosen GET parameter to undefined.
How to do that?
Is such a construct a “nice” way to deal with such issues at all? (send scheduler’s data to get one parameter to connector)
Scenario: General day scheduler of all hairdressers (Units view). When I click on a hairdresser, that particular persons week calendar is shown. When I click on month’s tab, that particular person’s month calendar is shown.
When user clicks on Unit tab, all hairdressers day calendar is shown. (I get instead that particular hairdressers info as GET parameter is still set).
function init() {
<?php
require_once("config.php");
$res = mysql_connect($mysql_server,$mysql_user,$mysql_pass);
mysql_select_db($mysql_db);
$sql = "SELECT res_id, name FROM b_res WHERE comp_id=6 AND olek='A'";
$res = mysql_query($sql);
echo "var sections=[";
while ( $row=mysql_fetch_array($res) ) {
echo "{key:".$row["res_id"].", label:\"<a href='scheduler.php?res_id=".$row["res_id"]."'>".$row["name"]."</a>\"},";
}
echo "];";
?>
scheduler.config.xml_date="%Y-%m-%d %H:%i";
scheduler.xy.margin_top = 180;
scheduler.config.details_on_create=true;
scheduler.locale.labels.unit_tab = "Unit"
scheduler.locale.labels.section_custom="Section";
scheduler.createUnitsView({
name:"unit",
property:"res_id",
list:sections
});
<?php
if ($_GET["res_id"])
echo 'scheduler.init("scheduler_here",null,"week");';
else
echo 'scheduler.init("scheduler_here",null,"unit");';
echo "scheduler.load('01_basic_init_connector.php?ressursi_id=".$_GET["res_id"]."');";
echo "var dp = new dataProcessor('01_basic_init_connector.php?res_id=".$_GET["res_id"]."');";
?>
dp.init(scheduler);