How can I place a button on the main toolbar called ‘Location’. When the user clicks on it, a dynamic popup menu would appear based on the values of a php query: Location name is the label, location_id is the value. Then when the user clicks on a location from the menu, the mobile scheduler would reload?
Right now my mobile scheduler and events.php file gets info via GET variables.
Here’s the query to generate all possible Locations for the menu:
mysql_select_db($database_connect, $connect);
$query_offices = "SELECT Office, Office_ID FROM offices WHERE Company_ID = '" . addslashes($_SESSION['Company_ID']) . "'";
$offices = mysql_query($query_offices, $connect) or die(mysql_error());
$row_offices = mysql_fetch_assoc($offices);
$totalRows_offices = mysql_num_rows($offices);
So $row_offices[‘Office’] would be the Location menu label and $row_offices[‘Office_ID’] would be the corresponding menu value.
When the user clicks on a location form the menu I would need this link to fire/load to refresh the mobile scheduler based on selected office:
http://www.myurl.com/events.php?Office_ID= 'THE SELECTED LOCATION ID FROM MENU'
As of now, I have this to physcially put a Location button on the bottom toolbar:
scheduler.config.bottom_toolbar = [
{ view:"button",id:"today",label:scheduler.locale.labels.icon_today,inputWidth:scheduler.xy.icon_today, align:"left",width:scheduler.xy.icon_today+6},
{ view:"segmented", id:"buttons",selected:"list",align:"center",multiview:true, options:[
{ value:"list", label:scheduler.locale.labels.list_tab,width:scheduler.xy.list_tab},
{ value:"day", label:scheduler.locale.labels.day_tab,width:scheduler.xy.day_tab},
{ value:"month", label:scheduler.locale.labels.month_tab,width:scheduler.xy.month_tab}
]},
{view:'button', inputWidth:120, id:"location",align:"right",label:"Location", click:"showLocation"},
{ view:"label", label:"",inputWidth:42,width:50, batch:"readonly"}
];
function showLocation(){
?????
};
This is a challenge, I fear? Thanks.