/** LANAUDIERE API ADDITIONS **/
heap.api.lan = {};

heap.api.lan.lodging = {};
heap.api.setup({
  object: heap.api.lan.lodging,
  'api_class':'lan_lodging',
  url: heap.urlmap.api_json,
  methods: ['create','edit','erase','load','search','autocomplete']
});

heap.api.lan.activities = {};
heap.api.setup({
  object: heap.api.lan.activities,
  'api_class':'lan_activities',
  url: heap.urlmap.api_json,
  methods: ['create','edit','erase','load','search','autocomplete']
});

heap.api.lan.events = {};
heap.api.setup({
  object: heap.api.lan.events,
  'api_class':'lan_events',
  url: heap.urlmap.api_json,
  methods: ['create','edit','erase','load','search','autocomplete']
});

heap.api.lan.members = {};
heap.api.setup({
  object: heap.api.lan.members,
  'api_class':'lan_members',
  url: heap.urlmap.api_json,
  methods: ['create','edit','erase','load','search','autocomplete']
});

heap.api.lan.contacts = {};
heap.api.setup({
  object: heap.api.lan.contacts,
  'api_class':'lan_contacts',
  url: heap.urlmap.api_json,
  methods: ['create','edit','erase','load','search','autocomplete']
});

heap.api.lan.packages = {};
heap.api.setup({
  object: heap.api.lan.packages,
  'api_class':'lan_packages',
  url: heap.urlmap.api_json,
  methods: ['create','edit','erase','load','search','autocomplete']
});

heap.api.lan.restaurants = {};
heap.api.setup({
  object: heap.api.lan.restaurants,
  'api_class':'lan_restaurants',
  url: heap.urlmap.api_json,
  methods: ['create','edit','erase','load','search','autocomplete']
});

heap.api.lan.favorites = {};
heap.api.setup({
  object: heap.api.lan.favorites, 
  'api_class':'lan_favorites', 
  url: heap.urlmap.api_json, 
  methods: ['add', 'remove', 'get']
});

heap.form.lan_memberslist = {};
heap.form.lan_memberslist.initialize = function()
{
  heap.form.lists.initialize({
    'object': this,
    'name':'member',
    'class':'HEAPM_LAN_Member',
    'erase_api_callback': heap.api.lan.members.erase,
    'create_api_callback': heap.api.lan.members.create,
    'edit_api_callback': heap.api.lan.members.edit,
    'rate_api_callback': null
  });
};

heap.form.lan_editmember = {};
heap.form.lan_editmember.initialize = function()
{
  heap.form.edit.initialize({
    'object': this,
    'name':'member',
    'class':'HEAPM_LAN_Member',
    'erase_api_callback': heap.api.lan.members.erase,
    'create_api_callback': heap.api.lan.members.create,
    'edit_api_callback': heap.api.lan.members.edit,
    'rate_api_callback': null, 
    'onBackToList' : function() { location.href = heap.urlmap.app_admin_lan_members; }
  });
};

heap.form.lan_contactslist = {};
heap.form.lan_contactslist.initialize = function()
{
  heap.form.lists.initialize({
    'object': this,
    'name':'contact',
    'class':'HEAPM_LAN_Contact',
    'erase_api_callback': heap.api.lan.contacts.erase,
    'create_api_callback': heap.api.lan.contacts.create,
    'edit_api_callback': heap.api.lan.contacts.edit,
    'rate_api_callback': null
  });
};

heap.form.lan_editcontact = {};
heap.form.lan_editcontact.initialize = function()
{
  heap.form.edit.initialize({
    'object': this,
    'name':'member',
    'class':'HEAPM_LAN_Contact',
    'erase_api_callback': heap.api.lan.contacts.erase,
    'create_api_callback': heap.api.lan.contacts.create,
    'edit_api_callback': heap.api.lan.contacts.edit,
    'rate_api_callback': null, 
    'onBackToList' : function() { location.href = heap.urlmap.app_admin_lan_contacts; }
  });
};

heap.form.lan_packageslist = {};
heap.form.lan_packageslist.initialize = function()
{
  heap.form.lists.initialize({
    'object': this,
    'name':'package',
    'class':'HEAPM_LAN_Package',
    'erase_api_callback': heap.api.lan.packages.erase,
    'create_api_callback': heap.api.lan.packages.create,
    'edit_api_callback': heap.api.lan.packages.edit,
    'rate_api_callback': null
  });
};

heap.form.lan_editpackage = {};
heap.form.lan_editpackage.initialize = function()
{
  heap.form.edit.initialize({
    'object': this,
    'name':'package',
    'class':'HEAPM_LAN_Package',
    'erase_api_callback': heap.api.lan.packages.erase,
    'create_api_callback': heap.api.lan.packages.create,
    'edit_api_callback': heap.api.lan.packages.edit,
    'rate_api_callback': null, 
    'onBackToList' : function() { location.href = heap.urlmap.app_admin_lan_packages; }
  });
};

heap.form.lan_eventslist = {};
heap.form.lan_eventslist.initialize = function()
{
  heap.form.lists.initialize({
    'object': this,
    'name':'event',
    'class':'HEAPM_LAN_Event',
    'erase_api_callback': heap.api.lan.events.erase,
    'create_api_callback': heap.api.lan.events.create,
    'edit_api_callback': heap.api.lan.events.edit,
    'rate_api_callback': null
  });
};

heap.form.lan_editevent = {};
heap.form.lan_editevent.initialize = function()
{
  heap.form.edit.initialize({
    'object': this,
    'name':'event',
    'class':'HEAPM_LAN_Event',
    'erase_api_callback': heap.api.lan.events.erase,
    'create_api_callback': heap.api.lan.events.create,
    'edit_api_callback': heap.api.lan.events.edit,
    'rate_api_callback': null, 
    'onBackToList' : function() { location.href = heap.urlmap.app_admin_lan_events; }
  });
};

heap.form.lan_lodginglist = {};
heap.form.lan_lodginglist.initialize = function()
{
  heap.form.lists.initialize({
    'object': this,
    'name':'lodging',
    'class':'HEAPM_LAN_Lodging',
    'erase_api_callback': heap.api.lan.lodging.erase,
    'create_api_callback': heap.api.lan.lodging.create,
    'edit_api_callback': heap.api.lan.lodging.edit,
    'rate_api_callback': null
  });
};

heap.form.lan_editlodging = {};
heap.form.lan_editlodging.initialize = function()
{
  heap.form.edit.initialize({
    'object': this,
    'name':'lodging',
    'class':'HEAPM_LAN_Lodging',
    'erase_api_callback': heap.api.lan.lodging.erase,
    'create_api_callback': heap.api.lan.lodging.create,
    'edit_api_callback': heap.api.lan.lodging.edit,
    'rate_api_callback': null, 
    'onBackToList' : function() { location.href = heap.urlmap.app_admin_lan_lodging; }
  });
};

heap.form.lan_restaurantslist = {};
heap.form.lan_restaurantslist.initialize = function()
{
  heap.form.lists.initialize({
    'object': this,
    'name':'restaurant',
    'class':'HEAPM_LAN_Restaurant',
    'erase_api_callback': heap.api.lan.restaurants.erase,
    'create_api_callback': heap.api.lan.restaurants.create,
    'edit_api_callback': heap.api.lan.restaurants.edit,
    'rate_api_callback': null
  });
};

heap.form.lan_editrestaurant = {};
heap.form.lan_editrestaurant.initialize = function()
{
  heap.form.edit.initialize({
    'object': this,
    'name':'restaurant',
    'class':'HEAPM_LAN_Restaurant',
    'erase_api_callback': heap.api.lan.restaurants.erase,
    'create_api_callback': heap.api.lan.restaurants.create,
    'edit_api_callback': heap.api.lan.restaurants.edit,
    'rate_api_callback': null, 
    'onBackToList' : function() { location.href = heap.urlmap.app_admin_lan_restaurants; }
  });
};

heap.form.lan_activitieslist = {};
heap.form.lan_activitieslist.initialize = function()
{
  heap.form.lists.initialize({
    'object': this,
    'name':'activity',
    'class':'HEAPM_LAN_Activity',
    'erase_api_callback': heap.api.lan.activities.erase,
    'create_api_callback': heap.api.lan.activities.create,
    'edit_api_callback': heap.api.lan.activities.edit,
    'rate_api_callback': null
  });
};

heap.form.lan_editactivity = {};
heap.form.lan_editactivity.initialize = function()
{
  heap.form.edit.initialize({
    'object': this,
    'name':'activity',
    'class':'HEAPM_LAN_Activity',
    'erase_api_callback': heap.api.lan.activities.erase,
    'create_api_callback': heap.api.lan.activities.create,
    'edit_api_callback': heap.api.lan.activities.edit,
    'rate_api_callback': null, 
    'onBackToList' : function() { location.href = heap.urlmap.app_admin_lan_activities; }
  });
};

