fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [14550] activitycalendar: remove obsolete code


From: Sigurd Nes
Subject: [Fmsystem-commits] [14550] activitycalendar: remove obsolete code
Date: Wed, 09 Dec 2015 19:24:14 +0000

Revision: 14550
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14550
Author:   sigurdne
Date:     2015-12-09 19:24:13 +0000 (Wed, 09 Dec 2015)
Log Message:
-----------
activitycalendar: remove obsolete code

Removed Paths:
-------------
    branches/dev-syncromind/activitycalendar/templates/base/activity.php
    branches/dev-syncromind/activitycalendar/templates/base/activity_import.php
    branches/dev-syncromind/activitycalendar/templates/base/activity_list.php
    
branches/dev-syncromind/activitycalendar/templates/base/activity_list_partial.php
    branches/dev-syncromind/activitycalendar/templates/base/arena.php
    branches/dev-syncromind/activitycalendar/templates/base/arena_list.php
    
branches/dev-syncromind/activitycalendar/templates/base/arena_list_partial.php
    branches/dev-syncromind/activitycalendar/templates/base/common.php
    branches/dev-syncromind/activitycalendar/templates/base/dashboard.php
    branches/dev-syncromind/activitycalendar/templates/base/group.php
    branches/dev-syncromind/activitycalendar/templates/base/organization.php
    
branches/dev-syncromind/activitycalendar/templates/base/organization_list.php
    
branches/dev-syncromind/activitycalendar/templates/base/organization_list_changed.php
    
branches/dev-syncromind/activitycalendar/templates/base/organization_list_partial.php

Deleted: branches/dev-syncromind/activitycalendar/templates/base/activity.php
===================================================================
--- branches/dev-syncromind/activitycalendar/templates/base/activity.php        
2015-12-09 19:21:48 UTC (rev 14549)
+++ branches/dev-syncromind/activitycalendar/templates/base/activity.php        
2015-12-09 19:24:13 UTC (rev 14550)
@@ -1,749 +0,0 @@
-<?php
-       //include common logic for all templates
-       include("common.php");
-       $act_so          = activitycalendar_soactivity::get_instance();
-       $contpers_so = activitycalendar_socontactperson::get_instance();
-?>
-
-<script type="text/javascript">
-
-       function get_available_groups()
-       {
-               var org_id = document.getElementById('organization_id').value;
-               var div_select = document.getElementById('group_select');
-
-<?php if($activity->get_group_id())
-       {?>
-                               url = 
"index.php?menuaction=activitycalendar.uiactivities.get_organization_groups&amp;phpgw_return_as=json&amp;orgid="
 + org_id + "&amp;groupid=" + <?php echo $activity->get_group_id();?>;
-       <?php }
-       else
-       {?>
-                               url = 
"index.php?menuaction=activitycalendar.uiactivities.get_organization_groups&amp;phpgw_return_as=json&amp;orgid="
 + org_id;
-       <?php }?>
-
-               var divcontent_start = "<select name=\"group_id\" 
id=\"group_id\">";
-               var divcontent_end = "</select>";
-
-               var callback = {
-                       success: function (response) {
-                               div_select.innerHTML = divcontent_start + 
JSON.parse(response.responseText) + divcontent_end;
-                       },
-                       failure: function (o) {
-                               alert("AJAX doesn't work"); //FAILURE
-                       }
-               }
-               var trans = YAHOO.util.Connect.asyncRequest('GET', url, 
callback, null);
-
-       }
-
-       function get_address_search_cp2()
-       {
-               var address = 
document.getElementById('contact_person_2_address').value;
-               var div_address = 
document.getElementById('contact2_address_container');
-               div_address.style.display = "block";
-
-               //url = 
"/aktivby/registreringsskjema/ny/index.php?menuaction=activitycalendarfrontend.uiactivity.get_address_search&amp;phpgw_return_as=json&amp;search="
 + address;
-               url = "<?php echo 
$ajaxURL?>index.php?menuaction=activitycalendarfrontend.uiactivity.get_address_search&amp;phpgw_return_as=json&amp;search="
 + address;
-
-               var divcontent_start = "<select 
name=\"contact2_address_select\" id=\"address_cp2\" size=\"5\" 
onChange='setAddressValue(this)'>";
-               var divcontent_end = "</select>";
-
-               var callback = {
-                       success: function (response) {
-                               div_address.innerHTML = divcontent_start + 
JSON.parse(response.responseText) + divcontent_end;
-                       },
-                       failure: function (o) {
-                               alert("AJAX doesn't work"); //FAILURE
-                       }
-               }
-               var trans = YAHOO.util.Connect.asyncRequest('GET', url, 
callback, null);
-
-       }
-
-       function setAddressValue(field)
-       {
-               if (field.name == 'contact2_address_select')
-               {
-                       var address = 
document.getElementById('contact_person_2_address');
-                       var div_address = 
document.getElementById('contact2_address_container');
-
-                       address.value = field.value;
-                       div_address.style.display = "none";
-               }
-       }
-
-       YAHOO.util.Event.onDOMReady(function ()
-       {
-               get_available_groups();
-       });
-
-       function check_internal()
-       {
-               if (document.getElementById('internal_arena_id').value != null 
&& document.getElementById('internal_arena_id').value > 0)
-               {
-                       //disable external arena drop-down
-                       document.getElementById('arena_id').disabled = 
"disabled";
-               }
-               else
-               {
-                       //enable external arena drop-down
-                       document.getElementById('arena_id').disabled = "";
-               }
-       }
-
-       function check_external()
-       {
-               if (document.getElementById('arena_id').value != null && 
document.getElementById('arena_id').value > 0)
-               {
-                       //disable internal arena drop-down
-                       document.getElementById('internal_arena_id').disabled = 
"disabled";
-               }
-               else
-               {
-                       //enable internal arena drop-down
-                       document.getElementById('internal_arena_id').disabled = 
"";
-               }
-       }
-
-       function allOK()
-       {
-               if (document.getElementById('state').value == 5)
-               {
-                       return true;
-               }
-               if (document.getElementById('title').value == null || 
document.getElementById('title').value == '')
-               {
-                       alert("Tittel må fylles ut!");
-                       return false;
-               }
-               if (document.getElementById('organization_id').value == null || 
document.getElementById('organization_id').value == '')
-               {
-                       alert("Organisasjon må fylles ut!");
-                       return false;
-               }
-               if (document.getElementById('internal_arena_id').value == null 
|| document.getElementById('internal_arena_id').value == 0)
-               {
-                       if (document.getElementById('arena_id').value == null 
|| document.getElementById('arena_id').value == 0)
-                       {
-                               alert("Arena må fylles ut!");
-                               return false;
-                       }
-               }
-               if (document.getElementById('time').value == null || 
document.getElementById('time').value == '')
-               {
-                       alert("Tid må fylles ut!");
-                       return false;
-               }
-               if (document.getElementById('category').value == null || 
document.getElementById('category').value == 0)
-               {
-                       alert("Kategori må fylles ut!");
-                       return false;
-               }
-               var malgrupper = document.getElementsByName('target[]');
-               var malgruppe_ok = false;
-               for (i = 0; i < malgrupper.length; i++)
-               {
-                       if (!malgruppe_ok)
-                       {
-                               if (malgrupper[i].checked)
-                               {
-                                       malgruppe_ok = true;
-                               }
-                       }
-               }
-               if (!malgruppe_ok)
-               {
-                       alert("Målgruppe må fylles ut!");
-                       return false;
-               }
-               var distrikter = document.getElementsByName('district[]');
-               var distrikt_ok = false;
-               for (i = 0; i < distrikter.length; i++)
-               {
-                       if (!distrikt_ok)
-                       {
-                               if (distrikter[i].checked)
-                               {
-                                       distrikt_ok = true;
-                               }
-                       }
-               }
-               if (!distrikt_ok)
-               {
-                       alert("Bydel må fylles ut!");
-                       return false;
-               }
-               if (document.getElementById('office').value == null || 
document.getElementById('office').value == 0)
-               {
-                       alert("Hovedansvarlig kulturkontor må fylles ut!");
-                       return false;
-               }
-               else
-                       return true;
-       }
-</script>
-<?php echo activitycalendar_uicommon::get_page_message($message)?>
-<?php echo activitycalendar_uicommon::get_page_error($error)?>
-<div class="yui-content">
-       <div id="details">
-               <h1><img src="<?php echo 
ACTIVITYCALENDAR_IMAGE_PATH?>images/32x32/custom/contact.png" /><?php echo 
lang('activity')?></h1>
-               <h4><?php if($editable)
-                               { echo lang('activity_helptext');}?></h4>
-               <form action="#" method="post">
-                       <input type="hidden" name="id" value="<?php 
if($activity->get_id())
-                               { echo $activity->get_id();}
-                               else
-                               { echo '0';}?>"/>
-                       <dl class="proplist-col">
-                               <h2><?php echo lang('what')?></h2>
-                               <dt>
-                                       <?php if($activity->get_title() || 
$editable)
-                                               {?>
-                                               <label for="title"><?php echo 
lang('title')?></label>
-                                                       <?php if($editable)
-                                                       {?><br/><?php echo 
lang('title_helptext')?><?php }?>
-                                               <?php }?>
-                               </dt>
-                               <dd>
-<?php
-       if($editable)
-       {
-               ?>
-                                                       <input type="text" 
name="title" id="title" value='<?php echo $activity->get_title()?>' size="100"/>
-                                                       <?php
-                                               }
-                                               else
-                                               {
-                                                       echo 
$activity->get_title();
-                                               }
-                                       ?>
-                               </dd>
-                               <dt>
-                               <label for="description"><?php echo 
lang('description')?></label>
-                               <br/><?php echo lang('description_helptext')?>
-                               </dt>
-                               <dd>
-                                       <?php
-                                               if($activity->get_group_id())
-                                               {
-                                                       
if($activity->get_new_group())
-                                                       {
-                                                               echo 
activitycalendar_sogroup::get_instance()->get_description_local($activity->get_group_id());
-                                                       }
-                                                       else
-                                                       {
-                                                               echo 
activitycalendar_sogroup::get_instance()->get_description($activity->get_group_id());
-                                                       }
-                                               }
-                                               else 
if($activity->get_organization_id())
-                                               {
-                                                       
if($activity->get_new_org())
-                                                       {
-                                                               echo 
activitycalendar_soorganization::get_instance()->get_description_local($activity->get_organization_id());
-                                                       }
-                                                       else
-                                                       {
-                                                               echo 
activitycalendar_soorganization::get_instance()->get_description($activity->get_organization_id());
-                                                       }
-                                               }
-                                       ?>
-                               </dd>
-                               <dt>
-<?php if($activity->get_state() || $editable)
-       {?>
-                                               <label for="state"><?php echo 
lang('state')?></label>
-                                               <br/><?php echo 
lang('state_helptext')?>
-                                               <?php }?>
-                               </dt>
-                               <dd>
-                                       <?php
-                                               if($editable)
-                                               {
-                                                       $selected_state = 
$activity->get_state();
-                                                       ?>
-                                                       <select name="state" 
id="state">
-                                                               <option 
value="3" <?php echo ($selected_state == 3 ? 'selected="selected"' : 
"")?>><?php echo lang('published')?></option>
-                                                               <option 
value="5" <?php echo ($selected_state == 5 ? 'selected="selected"' : 
"")?>><?php echo lang('rejected')?></option>
-                                                               <option 
value="1" <?php echo ($selected_state == 1 ? 'selected="selected"' : 
"")?>><?php echo lang('new')?></option>
-                                                               <option 
value="2" <?php echo ($selected_state == 2 ? 'selected="selected"' : 
"")?>><?php echo lang('change')?></option>
-                                                       </select>
-                                               <?php
-                                       }
-                                       else
-                                       {
-                                               if($activity->get_state() && 
$activity->get_state() > 0)
-                                               {
-                                                       echo lang('state_' . 
$activity->get_state());
-                                               }
-                                       }
-                               ?>
-                               </dd>
-                               <dt>
-                                       <?php if($editable)
-                                               {?>
-                                               <label for="criteria"><?php 
echo lang('criteria_label')?></label>
-                                               <br/><?php echo 
lang('criteria_helptext')?>
-                                                       <?php }?>
-                               </dt>
-                               <dt>
-                                               <?php 
if($activity->get_category() || $editable)
-                                                       {?>
-                                               <label for="category"><?php 
echo lang('category')?></label>
-                                                       <?php if($editable)
-                                                       {?><br/><?php echo 
lang('category_helptext')?><?php }?>
-                                               <?php }?>
-                               </dt>
-                               <dd>
-                                       <?php
-                                               $current_category_id = 
$activity->get_category();
-                                               if($editable)
-                                               {
-                                                       ?>
-                                                       <select name="category" 
id="category">
-                                                               <option 
value="0">Ingen kategori valgt</option>
-                                               <?php
-                                               foreach($categories as 
$category)
-                                               {
-                                                       echo "<option " . 
($current_category_id == $category->get_id() ? 'selected="selected"' : "") . " 
value=\"{$category->get_id()}\">" . $category->get_name() . "</option>";
-                                               }
-                                               ?>
-                                                       </select>
-                                                       <?php
-                                               }
-                                               else
-                                               {
-                                                       
if($activity->get_category())
-                                                       {
-                                                               echo 
$act_so->get_category_name($activity->get_category());
-                                                       }
-                                               }
-                                       ?>
-                               </dd>
-                               <dt>
-                                       <?php if($activity->get_target() || 
$editable)
-                                               {?>
-                                               <label for="target"><?php echo 
lang('target')?></label>
-                                                       <?php if($editable)
-                                                       {?><br/><?php echo 
lang('target_helptext')?><?php }?>
-                                               <?php }?>
-                               </dt>
-                               <dd>
-                                       <?php
-                                               $current_target_ids             
 = $activity->get_target();
-                                               $current_target_id_array = 
explode(",", $current_target_ids);
-                                               //echo 
$current_target_id_array[0]."*".$current_target_id_array[1];
-                                               if($editable)
-                                               {
-                                                       foreach($targets as $t)
-                                                       {
-                                                               ?>
-                                                               <input 
name="target[]" id="target[]" type="checkbox" value="<?php echo $t->get_id()?>" 
<?php echo (in_array($t->get_id(), $current_target_id_array) ? 'checked' : 
"")?>/><?php echo $t->get_name()?><br/>
-                       <?php
-               }
-       }
-       else
-       {
-               if($activity->get_target())
-               {
-                       $current_target_ids              = 
$activity->get_target();
-                       $current_target_id_array = explode(",", 
$current_target_ids);
-                       foreach($current_target_id_array as $curr_target)
-                       {
-                               echo $act_so->get_target_name($curr_target) . 
'<br/>';
-                       }
-               }
-       }
-?>
-                               </dd>
-                               <dt>
-                                       <?php if($activity->get_district() || 
$editable)
-                                               {?>
-                                               <label for="district"><?php 
echo lang('district')?></label>
-                                                       <?php if($editable)
-                                                       {?><br/><?php echo 
lang('district_helptext')?><?php }?>
-                                               <?php }?>
-                               </dt>
-                               <dd>
-                                       <?php
-                                               $current_district_ids           
 = $activity->get_district();
-                                               $current_district_id_array      
 = explode(",", $current_district_ids);
-                                               //echo 
$current_target_id_array[0]."*".$current_target_id_array[1];
-                                               if($editable)
-                                               {
-                                                       foreach($districts as 
$d)
-                                                       {
-                                                               ?>
-                                                               <input 
name="district[]" type="checkbox" value="<?php echo $d['part_of_town_id']?>" 
<?php echo (in_array($d['part_of_town_id'], $current_district_id_array) ? 
'checked' : "")?>/><?php echo $d['name']?><br/>
-                       <?php
-               }
-       }
-       else
-       {
-               if($activity->get_district())
-               {
-                       $current_district_ids            = 
$activity->get_district();
-//                                                     echo 
$current_district_ids;
-                       $current_district_id_array       = explode(",", 
$current_district_ids);
-                       foreach($current_district_id_array as $curr_district)
-                       {
-                               echo $act_so->get_district_name($curr_district) 
. '<br/>';
-                       }
-               }
-       }
-?>
-                               </dd>
-                               <dt>
-                               <label for="special_adaptation"><?php echo 
lang('special_adaptation')?></label>
-                               <br/><?php echo lang('adaptation_helptext')?>
-                               </dt>
-                               <dd>
-                                       <input type="checkbox" 
name="special_adaptation" id="special_adaptation"<?php echo 
$activity->get_special_adaptation() ? ' checked="checked"' : ''?> <?php 
echo!$editable ? ' disabled="disabled"' : ''?>/>
-                               </dd>
-                               <h2><?php echo lang('where_when')?></h2>
-                               <dt>
-                                       <?php if($activity->get_arena() || 
$activity->get_internal_arena() || $editable)
-                                               {?>
-                                               <label for="arena"><?php echo 
lang('arena')?></label>
-                                               <br/><?php echo 
lang('arena_helptext')?>
-                                               <?php }?>
-                               </dt>
-                               <dt>
-                               <label for="internal_arena_id"><?php echo 
lang('building')?></label>
-                               </dt>
-                               <dd>
-<?php
-       $current_internal_arena_id = $activity->get_internal_arena();
-       if($editable)
-       {
-               ?>
-                                                       <select 
name="internal_arena_id" id="internal_arena_id" onchange="javascript: 
check_internal();">
-                                                               <option 
value="0">Ingen kommunale bygg valgt</option>
-               <?php
-               foreach($buildings as $building_id => $building_name)
-               {
-                       echo "<option " . ($current_internal_arena_id == 
$building_id ? 'selected="selected"' : "") . " value=\"{$building_id}\">" . 
$building_name . "</option>";
-               }
-               ?>
-                                                       </select>
-                                                               <?php
-                                                       }
-                                                       else
-                                                       {
-                                                               
if($activity->get_internal_arena())
-                                                               {
-                                                                       echo 
activitycalendar_soarena::get_instance()->get_building_name($activity->get_internal_arena());
-                                                               }
-                                                       }
-                                               ?>
-                               </dd>
-                               <dt>
-                               <label for="arena_id"><?php echo 
lang('external_arena')?></label>
-                               </dt>
-                               <dd>
-                               <?php
-                                       $current_arena_id = 
$activity->get_arena();
-                                       if($editable)
-                                       {
-                                               ?>
-                                                       <select name="arena_id" 
id="arena_id" style="width: 300px;" onchange="javascript: check_external();">
-                                                               <option 
value="0">Ingen arena valgt</option>
-                                                       <?php
-                                                       foreach($arenas as 
$arena)
-                                                       {
-                                                               echo "<option " 
. ($current_arena_id == $arena->get_id() ? 'selected="selected"' : "") . " 
value=\"{$arena->get_id()}\" title=\"{$arena->get_arena_name()}\">" . 
$arena->get_arena_name() . "</option>";
-                                                       }
-                                                       ?>
-                                                       </select>
-                                                       <?php
-                                               }
-                                               else
-                                               {
-                                                       
if($activity->get_arena())
-                                                       {
-                                                               echo 
activitycalendar_soarena::get_instance()->get_arena_name($activity->get_arena());
-                                                       }
-                                               }
-                                       ?>
-                               </dd>
-                               <dt>
-                                       <?php if($activity->get_time() || 
$editable)
-                                               {?>
-                                               <label for="time"><?php echo 
lang('time')?></label>
-                                               <br/><?php echo 
lang('time_helptext')?>
-                                                       <?php }?>
-                               </dt>
-                               <dd>
-                                               <?php
-                                                       if($editable)
-                                                       {
-                                                               ?>
-                                                       <input type="text" 
name="time" id="time" value="<?php echo $activity->get_time()?>" />
-                                                       <?php
-                                               }
-                                               else
-                                               {
-                                                       echo 
$activity->get_time();
-                                               }
-                                       ?>
-                               </dd>
-                               <dt>
-<?php if($activity->get_office() || $editable)
-       {?>
-                                               <label for="office"><?php echo 
lang('office')?></label>
-                                               <br/><?php echo 
lang('office_helptext')?>
-                                       <?php }?>
-                               </dt>
-                               <dd>
-<?php
-       if($editable)
-       {
-               $selected_office = $activity->get_office();
-               ?>
-                                                       <select name="office" 
id="office">
-                                                               <option 
value="0">Ingen kontor valgt</option>
-                                                       <?php
-                                                       foreach($offices as 
$office)
-                                                       {
-                                                               echo "<option " 
. ($selected_office == $office['id'] ? 'selected="selected"' : "") . " 
value=\"{$office['id']}\">" . $office['name'] . "</option>";
-                                                       }
-                                                       ?>
-                                                       </select>
-                                                               <?php
-                                                       }
-                                                       else
-                                                       {
-                                                               
if($activity->get_office())
-                                                               {
-                                                                       echo 
$act_so->get_office_name($activity->get_office());
-                                                               }
-                                                       }
-                                               ?>
-                               </dd>
-                               <h2><?php echo lang('who')?></h2>
-                               <dt>
-                                       <?php 
if($activity->get_organization_id() || $editable)
-                                               {?>
-                                               <label 
for="organization_id"><?php echo lang('organization')?></label>
-                                                       <?php if($editable)
-                                                       {?><br/><?php echo 
lang('organization_helptext')?><?php }?>
-                                               <?php }?>
-                               </dt>
-                               <dd>
-                                       <?php
-                                               $current_organization_id = 
$activity->get_organization_id();
-                                               if($editable)
-                                               {
-                                                       
if($activity->get_new_org())
-                                                       {
-                                                               echo $org_name;
-                                                       }
-                                                       else
-                                                       {
-                                                               ?>
-                                                               <select 
name="organization_id" id="organization_id" 
onchange="javascript:get_available_groups();">
-                                                                       <option 
value="">Ingen organisasjon valgt</option>
-                                                       <?php
-                                                       foreach($organizations 
as $organization)
-                                                       {
-                                                               echo "<option " 
. ($current_organization_id == $organization->get_id() ? 'selected="selected"' 
: "") . " value=\"{$organization->get_id()}\">" . $organization->get_name() . 
"</option>";
-                                                       }
-                                                       ?>
-                                                               </select>
-                                                               <?php 
if($current_organization_id)
-                                                               {?>
-                                                                       
<br/><?php echo lang('edit_contact_info')?> <a 
href="index.php?menuaction=booking.uiorganization.show&id=<?php echo 
$current_organization_id?>"><?php echo lang('edit_contact_info_org')?></a>
-                                                               <?php }?>
-                                                               <?php
-                                                       }
-                                                       ?>
-                                                       <?php
-                                               }
-                                               else
-                                               {
-                                                       
if($activity->get_organization_id())
-                                                       {
-                                                               
if($activity->get_new_org())
-                                                               {
-                                                                       echo 
activitycalendar_soorganization::get_instance()->get_organization_name_local($activity->get_organization_id());
-                                                               }
-                                                               else
-                                                               {
-                                                                       echo 
activitycalendar_soorganization::get_instance()->get_organization_name($activity->get_organization_id());
-                                                               }
-                                                       }
-                                               }
-                                       ?>
-                               </dd>
-                               <dt>
-                                       <?php if($activity->get_group_id() || 
$editable)
-                                               {?>
-                                               <label for="group_id"><?php 
echo lang('group')?></label>
-                                                       <?php if($editable)
-                                                       {?><br/><?php echo 
lang('group_helptext')?><?php }?>
-                                               <?php }?>
-                               </dt>
-                               <dd>
-                                       <?php
-                                               if($editable)
-                                               {
-                                                       $current_group_id = 
$activity->get_group_id();
-                                                       
if($activity->get_new_group())
-                                                       {
-                                                               echo "<input 
type=\"hidden\" name=\"group_id\" id=\"group_id\" value=\"" . 
$local_group->get_id() . "\" />";
-                                                               echo 
$local_group->get_name();
-                                                       }
-                                                       else
-                                                       {
-                                                               ?>
-                                                               <div 
id="group_select">
-                                                                       <select 
name="group_id" id="group_id">
-                                                                               
<option value="0">Ingen gruppe valgt</option>
-                                                                       
</select>
-                                                               </div>
-                                                               <?php 
if($current_group_id)
-                                                               {?>
-                                                                       
<br/><?php echo lang('edit_contact_info')?> <a 
href="index.php?menuaction=booking.uigroup.show&id=<?php echo 
$current_group_id?>"><?php echo lang('edit_contact_info_group')?></a>
-                                                               <?php }
-                                                       }
-                                                       ?>
-                                                       <?php
-                                                       ?>
-                                                       <?php
-                                               }
-                                               else
-                                               {
-                                                       
if($activity->get_group_id())
-                                                       {
-                                                               
if($activity->get_new_group())
-                                                               {
-                                                                       echo 
activitycalendar_sogroup::get_instance()->get_group_name_local($activity->get_group_id());
-                                                               }
-                                                               else
-                                                               {
-                                                                       echo 
activitycalendar_sogroup::get_instance()->get_group_name($activity->get_group_id());
-                                                               }
-                                                       }
-                                               }
-                                       ?>
-                               </dd>
-                               <dt>
-                               <label><?php echo lang('contact_info')?></label>
-                               <br/><?php echo lang('contact_info_helptext')?>
-                               </dt>
-                                       <?php 
if($activity->get_contact_person_1() || $editable)
-                                               {?>
-                                               <dt>
-                                               <label 
for="contact_person_1"><?php echo lang('contact_person_1')?></label>
-                                               </dt>
-                                               <dd>
-                                                       <?php
-                                                       
if($activity->get_group_id())
-                                                       {
-                                                               
if($activity->get_new_group())
-                                                               {
-                                                                       echo 
$contpers_so->get_group_contact_name_local($activity->get_contact_person_1());
-                                                               }
-                                                               else
-                                                               {
-                                                                       echo 
$contpers_so->get_group_contact_name($activity->get_contact_person_1());
-                                                               }
-                                                       }
-                                                       else 
if($activity->get_organization_id())
-                                                       {
-                                                               
if($activity->get_new_org())
-                                                                       echo 
$contpers_so->get_org_contact_name_local($activity->get_contact_person_1());
-                                                               else
-                                                                       echo 
$contpers_so->get_org_contact_name($activity->get_contact_person_1());
-                                                       }
-                                                       ?>
-                                               </dd>
-                                               <?php }?>
-                                       <?php 
if($activity->get_contact_person_2() || $editable)
-                                               {?>
-                                               <dt>
-                                               <label 
for="contact_person_2"><?php echo lang('contact_person_2')?></label>
-                                               </dt>
-                                               <dd>
-                                               <?php
-                                               if($activity->get_group_id())
-                                               {
-                                                       
if($activity->get_new_group())
-                                                       {
-                                                               echo 
$contpers_so->get_group_contact_name_local($activity->get_contact_person_2());
-                                                       }
-                                                       else
-                                                       {
-                                                               echo 
$contpers_so->get_group_contact_name($activity->get_contact_person_2());
-                                                       }
-                                               }
-                                               else 
if($activity->get_organization_id())
-                                               {
-                                                       
if($activity->get_new_org())
-                                                               echo 
$contpers_so->get_org_contact_name_local($activity->get_contact_person_2());
-                                                       else
-                                                               echo 
$contpers_so->get_org_contact_name($activity->get_contact_person_2());
-                                               }
-                                               ?>
-                                               </dd>
-                                       <?php }?>
-                               <dt>
-                               <?php 
if($activity->get_contact_person_2_address() || $editable)
-                                       {?>
-                                               <label 
for="contact_person_2_address"><?php echo 
lang('contact_person_2_address')?></label>
-                                       <?php }?>
-                               </dt>
-                               <dd>
-                               <?php
-                                       if($editable)
-                                       {
-                                               ?>
-                                                       <input type="text" 
name="contact_person_2_address" id="contact_person_2_address" value="<?php echo 
$activity->get_contact_person_2_address()?>" 
onkeyup="javascript:get_address_search_cp2()"/>
-                                                       <div 
id="contact2_address_container"></div>
-               <?php
-       }
-       else
-       {
-               echo $activity->get_contact_person_2_address();
-       }
-?>
-                               </dd>
-                               <dt>
-<?php if($activity->get_contact_person_2_zip() || $editable)
-       {?>
-                                               <label 
for="contact_person_2_zip"><?php echo lang('contact_person_2_zip')?></label>
-       <?php }?>
-                               </dt>
-                               <dd>
-<?php
-       if($editable)
-       {
-               ?>
-                                                       <input type="text" 
name="contact_person_2_zip" id="contact_person_2_zip" value="<?php echo 
$activity->get_contact_person_2_zip()?>" />
-               <?php
-       }
-       else
-       {
-               echo $activity->get_contact_person_2_zip();
-       }
-?>
-                               </dd>
-                       </dl>
-                       <div class="form-buttons">
-<?php
-       if($editable)
-       {
-               echo '<input type="submit" name="save_activity" value="' . 
lang('save') . '" onclick="return allOK();"/>';
-               echo '<a href="' . $cancel_link . '">' . lang('back_to_list') . 
'</a>';
-       }
-       else
-       {
-               echo '<input type="submit" name="edit_activity" value="' . 
lang('edit') . '"/>';
-               echo '<a href="' . $cancel_link . '">' . lang('back_to_list') . 
'</a>';
-       }
-?>
-                       </div>
-
-               </form>
-
-       </div>
-</div>
\ No newline at end of file

Deleted: 
branches/dev-syncromind/activitycalendar/templates/base/activity_import.php
===================================================================
--- branches/dev-syncromind/activitycalendar/templates/base/activity_import.php 
2015-12-09 19:21:48 UTC (rev 14549)
+++ branches/dev-syncromind/activitycalendar/templates/base/activity_import.php 
2015-12-09 19:24:13 UTC (rev 14550)
@@ -1,77 +0,0 @@
-<?php
-       include("common.php");
-?>
-<script>
-
-</script>
-<?php echo activitycalendar_uicommon::get_page_error($error)?>
-<?php echo activitycalendar_uicommon::get_page_message($message)?>
-
-<h1><img src="<?php echo 
ACTIVITYCALENDAR_IMAGE_PATH?>images/32x32/actions/document-save.png" /> <?php 
echo lang('activity_import')?></h1>
-
-<div id="messageHolder"></div>
-
-<form action="index.php?menuaction=activitycalendar.uiimport.index" 
method="post" enctype="multipart/form-data">
-       <fieldset>
-               <label for="file">Choose activities file:</label> <input 
type="file" name="file" id="file" />
-               <label for="district">Location for the imported 
activities:</label>
-               <select name="district" id="district">
-                       <?php
-                               $districts = 
activitycalendar_soactivity::get_instance()->select_district_list();
-                               foreach($districts as $district)
-                               {
-                                       echo "<option 
value=\"{$district['id']}\">" . $district['name'] . "</option>";
-                               }
-                       ?>
-               </select>
-               <input type="submit" name="importsubmit" value="<?php echo 
$button_label;?>" <?php if($button_label == "Import done")
-                       { echo ' disabled="disabled"';}?> />
-
-       </fieldset>
-       <!-- <fieldset>
-               <input type="submit" name="cancelsubmit" value="<?php echo 
lang('import_reset');?>" />
-       </fieldset>
-       -->
-
-<?php if($messages || $warnings || $errors)
-       {?>
-                       <h2><?php echo lang('import_log_messages')?></h2>
-
-                               <?php if($errors)
-                               {?>
-                               <ul>
-                                       <?php
-                                       foreach($errors as $error)
-                                       {
-                                               echo '<li class="error">Error: 
' . $error . '</li>';
-                                       }
-                                       ?>
-                               </ul>
-                               <?php }?>
-
-                               <?php if($warnings)
-                               {?>
-                               <ul>
-                               <?php
-                               foreach($warnings as $warning)
-                               {
-                                       echo '<li class="warning">Warning: ' . 
$warning . '</li>';
-                               }
-                               ?>
-                               </ul>
-                               <?php }?>
-
-                               <?php if($messages)
-                               {?>
-                               <ul>
-                               <?php
-                               foreach($messages as $message)
-                               {
-                                       echo '<li class="info">' . $message . 
'</li>';
-                               }
-                               ?>
-                               </ul>
-               <?php }?>
-
-       <?php }?>
-</form>
\ No newline at end of file

Deleted: 
branches/dev-syncromind/activitycalendar/templates/base/activity_list.php
===================================================================
--- branches/dev-syncromind/activitycalendar/templates/base/activity_list.php   
2015-12-09 19:21:48 UTC (rev 14549)
+++ branches/dev-syncromind/activitycalendar/templates/base/activity_list.php   
2015-12-09 19:24:13 UTC (rev 14550)
@@ -1,61 +0,0 @@
-<?php
-       include("common.php");
-?>
-
-<script type="text/javascript">
-
-       YAHOO.util.Event.addListener(
-                       'ctrl_add_activitycalendar_activity',
-                       'click',
-                       function (e)
-                       {
-                               YAHOO.util.Event.stopEvent(e);
-                               window.location = 
'index.php?menuaction=activitycalendar.uiactivities.add';
-                       }
-       );
-</script>
-
-<h1><img src="<?php echo 
ACTIVITYCALENDAR_IMAGE_PATH?>images/32x32/x-office-address-book.png" /> <?php 
echo lang('activities')?></h1>
-
-<fieldset>
-       <input type="submit" name="ctrl_add_activitycalendar_activity" 
id="ctrl_add_activitycalendar_activity" value="<?php echo 
lang('f_new_activity')?>" />
-</fieldset>
-
-
-<?php
-       $list_form       = true;
-       $list_id         = 'all_activities';
-       $url_add_on      = '&amp;type=all_activities';
-       include('activity_list_partial.php');
-?>
-<!-- 
-<hr/>
-<div style="float:left" class="field"><input id="btn_cat_id" type="button" 
name="cat_id" value="Kategori" class="button" tabindex="1"></div>
-<div style="float:left" class="field"><input id="btn_district_id" 
type="button" name="district_id" value="Område" class="button" 
tabindex="2"></div>
-
-<div style="float:left" class="field"><input id="btn_part_of_town_id" 
type="button" name="part_of_town_id" value="Bydel" class="button" 
tabindex="3"></div>
-<div style="float:left" class="field"><input id="btn_owner_id" type="button" 
name="owner_id" value="Filter" class="button" tabindex="4"></div>
-<script type="text/javascript">
-               var values_combo_box = [
-
-                               {
-                                       id: "values_combo_box_0",
-                                       value: "#Kategori ikke 
address@hidden@11#AN01 - ANDRE address@hidden - ANDRE address@hidden EIENDOM 
@address@hidden - FESTET address@hidden@14#BY01- address@hidden@15#FR01 - 
address@hidden - address@hidden@address@hidden@address@hidden address@hidden - 
address@hidden - address@hidden - address@hidden@99#SOLGT/address@hidden - 
address@hidden - TRANSFORMATORKIOSK @21#VE01 - VEIGRUNN@"
-                               },
-                               {
-                                       id: "values_combo_box_1",
-                                       value: "#Distrikt ikke 
address@hidden/address@hidden/address@hidden/address@hidden/address@hidden@"
-                               },
-                               {
-                                       id: "values_combo_box_2",
-                                       value: "#Bydel ikke address@hidden 
address@hidden address@hidden address@hidden address@hidden address@hidden 
address@hidden  address@hidden@6#YTREBYGDA  BYDEL@"
-                               },
-                               {
-                                       id: "values_combo_box_3",
-                                       value: "#vis address@hidden@2#Ekstern@"
-                               }
-               ];
-
-
-       </script>
--->
\ No newline at end of file

Deleted: 
branches/dev-syncromind/activitycalendar/templates/base/activity_list_partial.php
===================================================================
--- 
branches/dev-syncromind/activitycalendar/templates/base/activity_list_partial.php
   2015-12-09 19:21:48 UTC (rev 14549)
+++ 
branches/dev-syncromind/activitycalendar/templates/base/activity_list_partial.php
   2015-12-09 19:24:13 UTC (rev 14550)
@@ -1,276 +0,0 @@
-<script type="text/javascript">
-       //Add listener resetting form: redirects browser to call index  again
-       YAHOO.util.Event.addListener(
-                       'ctrl_reset_button',
-                       'click',
-                       function (e)
-                       {
-                               YAHOO.util.Event.stopEvent(e);
-                               window.location = 
'index.php?menuaction=activitycalendar.uiactivities.index';
-                       }
-       );
-
-       // Defining columns for datatable
-       var columnDefs = [{
-                       key: "id",
-                       label: "<?php echo lang('id')?>",
-                       sortable: true
-               },
-               {
-                       key: "title",
-                       label: "<?php echo lang('title')?>",
-                       sortable: true
-               },
-               {
-                       key: "state",
-                       label: "<?php echo lang('status')?>",
-                       sortable: true
-               },
-               {
-                       key: "organization_id",
-                       label: "<?php echo lang('organization')?>",
-                       sortable: true
-               },
-               {
-                       key: "group_id",
-                       label: "<?php echo lang('group')?>",
-                       sortable: true
-               },
-               {
-                       key: "district",
-                       label: "<?php echo lang('district')?>",
-                       sortable: true
-               },
-               {
-                       key: "office",
-                       label: "<?php echo lang('office')?>",
-                       sortable: true
-               },
-               {
-                       key: "category",
-                       label: "<?php echo lang('category')?>",
-                       sortable: true
-               },
-               {
-                       key: "description",
-                       label: "<?php echo lang('description')?>",
-                       sortable: true
-               },
-               {
-                       key: "arena",
-                       label: "<?php echo lang('arena')?>",
-                       sortable: true
-               },
-               {
-                       key: "time",
-                       label: "<?php echo lang('time')?>",
-                       sortable: true
-               },
-               {
-                       key: "contact_person_1",
-                       label: "<?php echo lang('contact_person_1')?>",
-                       sortable: true
-               },
-               {
-                       key: "contact_person_2",
-                       label: "<?php echo lang('contact_person_2')?>",
-                       sortable: true
-               },
-               {
-                       key: "last_change_date",
-                       label: "<?php echo lang('last_change_date')?>",
-                       sortable: true
-               },
-               {
-                       key: "actions",
-                       hidden: true
-               },
-               {
-                       key: "labels",
-                       hidden: true
-               },
-               {
-                       key: "ajax",
-                       hidden: true
-               }
-       ];
-
-<?php
-       if(isset($extra_cols))
-       {
-               foreach($extra_cols as $col)
-               {
-                       $literal = "{key: \"" . $col["key"] . "\",
-                                               label: \"" . $col["label"] . 
"\"}";
-                       if($col["index"])
-                       {
-                               echo "columnDefs.splice(" . $col["index"] . ", 
0," . $literal . ");";
-                       }
-                       else
-                       {
-                               echo "columnDefs.push($literal);";
-                       }
-               }
-       }
-?>
-
-       // Initiating the data source
-       setDataSource(
-                       
'index.php?menuaction=activitycalendar.uiactivities.query&amp;phpgw_return_as=json<?php
 echo $url_add_on;?>&amp;editable=<?php echo $editable ? "true" : "false";?>',
-                       columnDefs,
-                       '<?php echo $list_id?>_form',
-                       ['<?php echo $list_id?>_ctrl_toggle_activity_state', 
'<?php echo $list_id?>_ctrl_toggle_activity_district', '<?php echo 
$list_id?>_ctrl_toggle_activity_category', '<?php echo 
$list_id?>_ctrl_search_query', 'date_change'],
-                       '<?php echo $list_id?>_container',
-                       '<?php echo $list_id?>_paginator',
-                       '<?php echo $list_id?>',
-                       new Array(<?php
-       if(isset($related))
-       {
-               foreach($related as $r)
-               {
-                       echo "\"" . $r . "\"";
-               }
-       }
-?>)
-                       );
-
-       function activity_export(ptype) {
-
-               var query = document.getElementById('<?php echo 
$list_id?>_ctrl_search_query').value;
-               var office = document.getElementById('<?php echo 
$list_id?>_ctrl_toggle_activity_district').value;
-               var state = document.getElementById('<?php echo 
$list_id?>_ctrl_toggle_activity_state').value;
-               var category = document.getElementById('<?php echo 
$list_id?>_ctrl_toggle_activity_category').value;
-               var updatedDate = document.getElementById('date_change').value;
-<?php
-       /* FIXME Search queries will affect ALL data tables listed on one page 
(of that type) when exporting
-        * even though the search only affects one of the data tables.
-        * F.ex on /index.php?menuaction=rental.uicontract.edit&id=1 -> Parties
-        */
-?>
-
-               window.location = 
'index.php?menuaction=activitycalendar.uiactivities.download' +
-                               '<?php echo $url_add_on;?>' +
-                               '&amp;query=' + query +
-                               '&amp;activity_district=' + office +
-                               '&amp;activity_state=' + state +
-                               '&amp;activity_category=' + category +
-                               '&amp;activity_updated=' + updatedDate +
-                               '&amp;export=true';
-       }
-
-       function activity_email(ptype) {
-
-               var confirm_res = confirm("Du er i ferd med å sende e-post til 
utvalget under.\n\nVil du gjøre dette?");
-               if (confirm_res == true)
-               {
-                       var query = document.getElementById('<?php echo 
$list_id?>_ctrl_search_query').value;
-                       var office = document.getElementById('<?php echo 
$list_id?>_ctrl_toggle_activity_district').value;
-                       var state = document.getElementById('<?php echo 
$list_id?>_ctrl_toggle_activity_state').value;
-                       var category = document.getElementById('<?php echo 
$list_id?>_ctrl_toggle_activity_category').value;
-                       var updatedDate = 
document.getElementById('date_change').value;
-<?php
-       /* FIXME Search queries will affect ALL data tables listed on one page 
(of that type) when exporting
-        * even though the search only affects one of the data tables.
-        * F.ex on /index.php?menuaction=rental.uicontract.edit&id=1 -> Parties
-        */
-?>
-
-                       window.location = 
'index.php?menuaction=activitycalendar.uiactivities.query' +
-                                       '<?php echo $url_add_on;?>' +
-                                       '&amp;query=' + query +
-                                       '&amp;activity_district=' + office +
-                                       '&amp;activity_state=' + state +
-                                       '&amp;activity_category=' + category +
-                                       '&amp;activity_updated=' + updatedDate +
-                                       '&amp;email=true';
-               }
-       }
-
-</script>
-<?php
-       if($list_form)
-       {
-               $uid             = $GLOBALS['phpgw_info']['user']['account_id'];
-               $user_office = 
activitycalendar_soactivity::get_instance()->get_office_from_user($uid);
-               if($user_office && $user_office == 1)
-               {
-                       $user_office = 2;
-               }
-               else if($user_office == 2)
-               {
-                       $user_office = 1;
-               }
-               ?>
-
-               <form id="<?php echo $list_id?>_form" method="GET">
-                       <fieldset>
-                               <!-- Search -->
-                               <label for="ctrl_search_query"><?php echo 
lang('search_for')?></label>
-                               <input id="<?php echo 
$list_id?>_ctrl_search_query" type="text" name="query" autocomplete="off" 
value="<?php echo isset($q) ? $q : ''?>"/>
-                               <input type="submit" id="ctrl_search_button" 
value="<?php echo lang('search')?>" />
-                               <input type="button" id="ctrl_reset_button" 
value="<?php echo lang('reset')?>" />
-                       </fieldset>
-
-                       <fieldset>
-                               <!-- Filters -->
-                               <label class="toolbar_element_label" 
for="ctrl_toggle_activity_state"><?php echo lang('activity_state')?></label>
-                               <select name="activity_state" id="<?php echo 
$list_id?>_ctrl_toggle_activity_state">
-                                       <option value="all"><?php echo 
lang('all')?></option>
-                                       <option value="1"><?php echo 
lang('new')?></option>
-                                       <option value="2"><?php echo 
lang('change')?></option>
-               <?php if(!$nofilter)
-               { //remove state if on dashboard ?><option value="3" ><?php 
echo lang('published')?></option><?php }?>
-                                       <?php if(!$nofilter)
-                                       { //remove state if on dashboard 
?><option value="5" ><?php echo lang('rejected')?></option><?php }?>
-                               </select>
-                               <label class="toolbar_element_label" 
for="ctrl_toggle_activity_district"><?php echo lang('office')?></label>
-                                       <?php
-                                       $districts = 
activitycalendar_soactivity::get_instance()->select_district_list();
-                                       ?>
-                               <select name="activity_district" id="<?php echo 
$list_id?>_ctrl_toggle_activity_district">
-                                       <option value="all"><?php echo 
lang('all')?></option>
-                               <?php
-                               foreach($districts as $district)
-                               {
-                                       echo "<option 
value=\"{$district['id']}\"" . ($user_office == $district['id'] ? 'selected' : 
'') . ">" . $district['name'] . "</option>";
-                               }
-                               ?>
-                               </select>
-                               <label class="toolbar_element_label" 
for="ctrl_toggle_activity_category"><?php echo lang('category')?></label>
-                                       <?php
-                                       $categories = 
activitycalendar_soactivity::get_instance()->get_categories();
-                                       ?>
-                               <select name="activity_category" id="<?php echo 
$list_id?>_ctrl_toggle_activity_category">
-                                       <option value="all"><?php echo 
lang('all')?></option>
-               <?php
-               foreach($categories as $category)
-               {
-                       echo "<option value=\"{$category->get_id()}\">" . 
$category->get_name() . "</option>";
-               }
-               ?>
-                               </select>
-                               <label class="toolbar_element_label" 
for="date_change" id="label_date_change"><?php echo lang('date')?></label>
-               <?php echo 
$GLOBALS['phpgw']->yuical->add_listener('date_change');?>
-                       </fieldset>
-
-
-               </form>
-                       <?php
-               }
-       ?>
-<?php if($list_id != 'new_activities')
-       {
-               ?>
-               <fieldset>
-                       <h3><?php echo lang('export_to')?></h3>
-               <?php
-               $export_format = 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['export_format'])
 && $GLOBALS['phpgw_info']['user']['preferences']['property']['export_format'] 
? $GLOBALS['phpgw_info']['user']['preferences']['property']['export_format'] : 
'csv';
-               ?>
-                       <div id="export">
-                               <a href="javascript:activity_export('<?php echo 
$list_id?>')" title="<?php echo lang('Download as excel')?>"><img src="<?php 
echo 
ACTIVITYCALENDAR_IMAGE_PATH?>images/16x16/mimetypes/x-office-spreadsheet.png"/></a>&nbsp;&nbsp;<button
 onclick="javascript:activity_email('<?php echo $list_id?>')"><?php echo 
lang('Send mail to selection')?></button>
-                       </div>
-               </fieldset>
-       <?php }?>
-
-<div id="<?php echo $list_id?>_paginator" class="paginator"></div>
-<div id="<?php echo $list_id?>_container" class="datatable_container"></div>

Deleted: branches/dev-syncromind/activitycalendar/templates/base/arena.php
===================================================================
--- branches/dev-syncromind/activitycalendar/templates/base/arena.php   
2015-12-09 19:21:48 UTC (rev 14549)
+++ branches/dev-syncromind/activitycalendar/templates/base/arena.php   
2015-12-09 19:24:13 UTC (rev 14550)
@@ -1,153 +0,0 @@
-<?php
-       //include common logic for all templates
-       include("common.php");
-?>
-
-<script type="text/javascript">
-
-       function get_address_search()
-       {
-               var address = document.getElementById('address').value;
-               var div_address = document.getElementById('address_container');
-               div_address.style.display = "block";
-
-               url = 
"index.php?menuaction=activitycalendar.uiarena.get_address_search&amp;phpgw_return_as=json&amp;search="
 + address;
-
-               var divcontent_start = "<select name=\"address_select\" 
id=\"address\" size=\"5\" onChange='setAddressValue(this)'>";
-               var divcontent_end = "</select>";
-
-               var callback = {
-                       success: function (response) {
-                               div_address.innerHTML = divcontent_start + 
JSON.parse(response.responseText) + divcontent_end;
-                       },
-                       failure: function (o) {
-                               alert("AJAX doesn't work"); //FAILURE
-                       }
-               }
-               var trans = YAHOO.util.Connect.asyncRequest('GET', url, 
callback, null);
-
-       }
-
-       function setAddressValue(field)
-       {
-               var address = document.getElementById('address');
-               var div_address = document.getElementById('address_container');
-
-               address.value = field.value;
-               div_address.style.display = "none";
-       }
-
-</script>
-<?php echo activitycalendar_uicommon::get_page_message($message)?>
-<div class="identifier-header">
-       <h1><img src="<?php echo 
ACTIVITYCALENDAR_IMAGE_PATH?>images/32x32/custom/contact.png" /><?php echo 
lang('arena')?></h1>
-       <div>
-               <label><?php echo lang('name');?></label>
-               <?php if($arena->get_arena_name())
-                       { echo $arena->get_arena_name();}
-                       else
-                       { echo lang('no_value');}?>
-       </div>
-</div>
-<div class="yui-content">
-       <div id="details">
-               <form action="#" method="post">
-                       <input type="hidden" name="id" value="<?php 
if($arena->get_id())
-                       { echo $arena->get_id();}
-                       else
-                       { echo '0';}?>"/>
-                       <dl class="proplist-col">
-                               <dt><?php
-                       if($editable)
-                       {
-                               echo lang('arena_helptext');
-                       }
-               ?>
-                               </dt>
-                               <dt>
-                                       <?php if($arena->get_arena_name() || 
$editable)
-                                               {?>
-                                               <label for="name"><?php echo 
lang('name')?></label>
-                                               <?php }?>
-                               </dt>
-                               <dd>
-                                       <?php
-                                               if($editable)
-                                               {
-                                                       ?>
-                                                       <input type="text" 
name="arena_name" id="arena_name" value="<?php echo $arena->get_arena_name()?>" 
/>
-                                               <?php
-                                       }
-                                       else
-                                       {
-                                               echo $arena->get_arena_name();
-                                       }
-                               ?>
-                               </dd>
-                               <dt>
-<?php if($arena->get_address() || $editable)
-       {?>
-                                               <label for="address"><?php echo 
lang('address')?></label>
-                                               <?php }?>
-                               </dt>
-                               <dd>
-                                       <?php
-                                               if($editable)
-                                               {
-                                                       ?>
-                                                       <input type="text" 
name="address" id="address" value="<?php echo $arena->get_address()?>" 
onkeyup="javascript:get_address_search()"/>
-                                                       <div 
id="address_container"></div>
-                                                       <label 
for="address_number"><?php echo lang('address_number')?></label><input 
type="text" name="address_no" id="address_no" size="6"/>
-               <?php
-       }
-       else
-       {
-               echo $arena->get_address();
-       }
-?>
-                               </dd>
-                               <?php if($editable)
-                                       {?>
-                                               <dt>
-                                               <label for="arena_active"><?php 
echo lang('active_arena')?></label>
-                                               </dt>
-                                               <dd>
-                                                       <select 
name="arena_active" id="arena_active">
-                                                               <option 
value="yes" <?php if($arena->is_active())
-                               { echo "selected";}?>><?php echo 
lang('active')?></option>
-                                                               <option 
value="no" <?php if(!$arena->is_active())
-                               { echo "selected";}?>><?php echo 
lang('inactive')?></option>
-                                                       </select>
-                                               </dd>
-                                               <?php
-                                       }
-                                       else
-                                       {
-                                               ?>
-                                               <dt><label><?php 
if($arena->is_active())
-                               {?><font style="color: green;"><?php echo 
lang('active_arena');?></font><?php }
-                               else
-                               {?><font style="color: red;"><?php echo 
lang('inactive_arena');?></font><?php }?></label></dt>
-                                               <dd>&nbsp;</dd>
-       <?php }?>
-                       </dl>
-                       <div class="form-buttons">
-<?php
-       if($editable)
-       {
-               echo '<input type="submit" name="save_arena" value="' . 
lang('save') . '"/>';
-               echo '<a href="' . $cancel_link . '">' . lang('cancel') . 
'</a>';
-       }
-       else
-       {
-               echo '<input type="submit" name="edit_arena" value="' . 
lang('edit') . '"/>';
-               echo '<a href="' . $cancel_link . '">' . lang('back') . '</a>';
-       }
-?>
-                       </div>
-
-               </form>
-
-       </div>
-</div>
-

Deleted: branches/dev-syncromind/activitycalendar/templates/base/arena_list.php
===================================================================
--- branches/dev-syncromind/activitycalendar/templates/base/arena_list.php      
2015-12-09 19:21:48 UTC (rev 14549)
+++ branches/dev-syncromind/activitycalendar/templates/base/arena_list.php      
2015-12-09 19:24:13 UTC (rev 14550)
@@ -1,30 +0,0 @@
-<?php
-       include("common.php");
-?>
-
-<script type="text/javascript">
-
-       YAHOO.util.Event.addListener(
-                       'ctrl_add_activitycalendar_arena',
-                       'click',
-                       function (e)
-                       {
-                               YAHOO.util.Event.stopEvent(e);
-                               window.location = 
'index.php?menuaction=activitycalendar.uiarena.add';
-                       }
-       );
-</script>
-
-<h1><img src="<?php echo 
ACTIVITYCALENDAR_IMAGE_PATH?>images/32x32/x-office-address-book.png" /> <?php 
echo lang('arenas')?></h1>
-
-<fieldset>
-       <input type="submit" name="ctrl_add_activitycalendar_arena" 
id="ctrl_add_activitycalendar_arena" value="<?php echo lang('f_new_arena')?>" />
-</fieldset>
-
-
-<?php
-       $list_form       = true;
-       $list_id         = 'all_arenas';
-       $url_add_on      = '&amp;type=all_arenas';
-       include('arena_list_partial.php');
-?>
\ No newline at end of file

Deleted: 
branches/dev-syncromind/activitycalendar/templates/base/arena_list_partial.php
===================================================================
--- 
branches/dev-syncromind/activitycalendar/templates/base/arena_list_partial.php  
    2015-12-09 19:21:48 UTC (rev 14549)
+++ 
branches/dev-syncromind/activitycalendar/templates/base/arena_list_partial.php  
    2015-12-09 19:24:13 UTC (rev 14550)
@@ -1,141 +0,0 @@
-<script type="text/javascript">
-       //Add listener resetting form: redirects browser to call index  again
-       YAHOO.util.Event.addListener(
-                       'ctrl_reset_button',
-                       'click',
-                       function (e)
-                       {
-                               YAHOO.util.Event.stopEvent(e);
-                               window.location = 
'index.php?menuaction=activitycalendar.uiarena.index';
-                       }
-       );
-
-       // Defining columns for datatable
-       var columnDefs = [{
-                       key: "id",
-                       label: "<?php echo lang('id')?>",
-                       sortable: true
-               },
-               {
-                       key: "arena_name",
-                       label: "<?php echo lang('name')?>",
-                       sortable: true
-               },
-               {
-                       key: "address",
-                       label: "<?php echo lang('address')?>",
-                       sortable: true
-               },
-               {
-                       key: "actions",
-                       hidden: true
-               },
-               {
-                       key: "labels",
-                       hidden: true
-               },
-               {
-                       key: "ajax",
-                       hidden: true
-               }
-       ];
-
-<?php
-       if(isset($extra_cols))
-       {
-               foreach($extra_cols as $col)
-               {
-                       $literal = "{key: \"" . $col["key"] . "\",
-                                               label: \"" . $col["label"] . 
"\"}";
-                       if($col["index"])
-                       {
-                               echo "columnDefs.splice(" . $col["index"] . ", 
0," . $literal . ");";
-                       }
-                       else
-                       {
-                               echo "columnDefs.push($literal);";
-                       }
-               }
-       }
-?>
-
-       // Initiating the data source
-       setDataSource(
-                       
'index.php?menuaction=activitycalendar.uiarena.query&amp;phpgw_return_as=json<?php
 echo $url_add_on;?>&amp;editable=<?php echo $editable ? "true" : "false";?>',
-                       columnDefs,
-                       '<?php echo $list_id?>_form',
-                       ['<?php echo $list_id?>_ctrl_search_query', '<?php echo 
$list_id?>_ctrl_toggle_active'],
-                       '<?php echo $list_id?>_container',
-                       '<?php echo $list_id?>_paginator',
-                       '<?php echo $list_id?>',
-                       new Array(<?php
-       if(isset($related))
-       {
-               foreach($related as $r)
-               {
-                       echo "\"" . $r . "\"";
-               }
-       }
-?>)
-                       );
-
-       function arena_export(ptype) {
-
-               var query = document.getElementById('<?php echo 
$list_id?>_ctrl_search_query').value;
-               var active = document.getElementById('<?php echo 
$list_id?>_ctrl_toggle_active').value;
-<?php
-       /* FIXME Search queries will affect ALL data tables listed on one page 
(of that type) when exporting
-        * even though the search only affects one of the data tables.
-        * F.ex on /index.php?menuaction=rental.uicontract.edit&id=1 -> Parties
-        */
-?>
-
-               window.location = 
'index.php?menuaction=activitycalendar.uiarena.download' +
-                               '<?php echo $url_add_on;?>' +
-                               '&amp;query=' + query +
-                               '&amp;active=' + active +
-                               '&amp;export=true';
-       }
-
-</script>
-<?php
-       if($list_form)
-       {
-               ?>
-
-               <form id="<?php echo $list_id?>_form" method="GET">
-                       <fieldset>
-                               <!-- Search -->
-                               <label for="ctrl_search_query"><?php echo 
lang('search_for')?></label>
-                               <input id="<?php echo 
$list_id?>_ctrl_search_query" type="text" name="query" autocomplete="off" 
value="<?php echo isset($q) ? $q : ''?>"/>
-                               <input type="submit" id="ctrl_search_button" 
value="<?php echo lang('search')?>" />
-                               <input type="button" id="ctrl_reset_button" 
value="<?php echo lang('reset')?>" />
-                       </fieldset>
-
-                       <fieldset>
-                               <!-- Filters -->
-                               <label class="toolbar_element_label" for="<?php 
echo $list_id?>_ctrl_toggle_active"><?php echo lang('marked_as')?></label>
-                               <select name="active" id="<?php echo 
$list_id?>_ctrl_toggle_active">
-                                       <option value="all" <?php echo ($status 
== 'all') ? 'selected' : ''?>><?php echo lang('all')?></option>
-                                       <option value="active" <?php echo 
($status == 'active') ? 'selected' : ''?>><?php echo lang('active')?></option>
-                                       <option value="inactive" <?php echo 
($status == 'inactive') ? 'selected' : ''?>><?php echo 
lang('inactive')?></option>
-                               </select>
-                       </fieldset>
-
-
-               </form>
-                       <?php
-               }
-       ?>
-<fieldset>
-       <h3><?php echo lang('export_to')?></h3>
-<?php
-       $export_format = 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['export_format'])
 && $GLOBALS['phpgw_info']['user']['preferences']['property']['export_format'] 
? $GLOBALS['phpgw_info']['user']['preferences']['property']['export_format'] : 
'csv';
-?>
-       <div id="export">
-               <a href="javascript:arena_export('<?php echo $list_id?>')" 
title="<?php echo lang('Download as excel')?>"><img src="<?php echo 
ACTIVITYCALENDAR_IMAGE_PATH?>images/16x16/mimetypes/x-office-spreadsheet.png"/></a>
-       </div>
-</fieldset>
-
-<div id="<?php echo $list_id?>_paginator" class="paginator"></div>
-<div id="<?php echo $list_id?>_container" class="datatable_container"></div>

Deleted: branches/dev-syncromind/activitycalendar/templates/base/common.php
===================================================================
--- branches/dev-syncromind/activitycalendar/templates/base/common.php  
2015-12-09 19:21:48 UTC (rev 14549)
+++ branches/dev-syncromind/activitycalendar/templates/base/common.php  
2015-12-09 19:24:13 UTC (rev 14550)
@@ -1,928 +0,0 @@
-<script type="text/javascript">
-
-       /**
-        * Javascript for the activitycalendar module.  Holds datasource init 
functions and form helpers.
-        *
-        * Functions and objects within this file are kept in the 
YAHOO.activitycalendar namespace.
-        */
-
-       // Holds data source setup funtions
-       YAHOO.activitycalendar.setupDatasource = new Array();
-                       //Holds all data sources
-                       YAHOO.activitycalendar.datatables = new Array();
-                       counter = 0;
-                       // Adds data source setup funtions
-                                       function setDataSource(source_url, 
column_defs, form_id, filter_ids, container_id, paginator_id, datatable_id, 
rel_id, editor_action, disable_left_click) {
-                                       
YAHOO.activitycalendar.setupDatasource.push(
-                                                       function() {
-                                                       this.url = source_url;
-                                                                       
this.columns = column_defs;
-                                                                       
this.form = form_id;
-                                                                       
this.filters = filter_ids;
-                                                                       
this.container = container_id;
-                                                                       
this.paginator = paginator_id;
-                                                                       
this.tid = datatable_id;
-                                                                       
this.related_datatable = rel_id;
-                                                                       
this.editor_action = editor_action;
-                                                                       if 
(disable_left_click) {
-                                                       this.disable_left_click 
= true;
-                                                       } else {
-                                                       this.disable_left_click 
= false;
-                                                       }
-                                                       }
-                                       );
-                                       }
-
-                       YAHOO.activitycalendar.formatDate = function(elCell, 
oRecord, oColumn, oData) {
-                       //alert("oDate: " + oData);
-                       if (oData && oData != "Invalid Date" && oData != "NaN") 
{
-                       var my_date = Math.round(Date.parse(oData) / 1000);
-                                       elCell.innerHTML = formatDate('<?php 
echo $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']?>', 
my_date);
-                       } else {
-                       elCell.innerHTML = "";
-                       }
-                       };
-                                       // Override the built-in formatter
-                                       YAHOO.widget.DataTable.formatCurrency = 
function(elCell, oRecord, oColumn, oData) {
-                                       if (oData != undefined) {
-                                       elCell.innerHTML = 
YAHOO.util.Number.format(oData,
-                                       {
-                                       prefix: "<?php echo 
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'] . ' '?>",
-                                                       thousandsSeparator: ",",
-                                                       decimalPlaces: 2
-                                       });
-                                       }
-                                       //if (oData != undefined) {
-                                       //      elCell.innerHTML = '<?php echo 
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'] . ' '?>' + 
parseFloat(oData).toFixed(2);
-                                       //}
-                                       };
-                                       // Reloads all data sources that are 
necessary based on the selected related datatable
-                                                       function 
reloadDataSources(selected_datatable){
-
-                                                       //... hooks into  the 
regular callback function (onDataReturnInitializeTable) call to set empty 
payload array
-                                                       var loaded = function  
(sRequest, oResponse, oPayload) {
-                                                       var payload = new 
Array();
-                                                                       
this.onDataReturnInitializeTable(sRequest, oResponse, payload);
-                                                       }
-
-                                                       //... refresh the 
selected data tables
-                                                       
selected_datatable.getDataSource().sendRequest('', {success:loaded, 
scope:selected_datatable});
-                                                                       //... 
traverse all datatables and refresh related (to the selected) data tables
-                                                                       for 
(var i = 0; i < YAHOO.activitycalendar.datatables.length; i++){
-                                                       var datatable = 
YAHOO.activitycalendar.datatables[i];
-                                                                       for 
(var j = 0; j < selected_datatable.related.length; j++){
-                                                       var curr_related = 
selected_datatable.related[j];
-                                                                       if 
(datatable.tid == curr_related){
-                                                       
datatable.getDataSource().sendRequest('', {success:loaded, scope: datatable});
-                                                       }
-                                                       }
-                                                       }
-                                                       }
-
-                                       var highlightEditableCell = 
function(oArgs) {
-                                       var elCell = oArgs.target;
-                                                       if 
(YAHOO.util.Dom.hasClass(elCell, "yui-dt-editable")) {
-                                       this.highlightCell(elCell);
-                                       }
-                                       };
-                                                       // Wraps data sources 
setup logic
-                                                                       
function dataSourceWrapper(source_properties, pag) {
-
-                                                                       
this.properties = source_properties;
-                                                                               
        this.paginator = pag;
-                                                                               
        //... prepare base url
-                                                                               
        this.url = this.properties.url;
-                                                                               
        if (this.url[length - 1] != '&') {
-                                                                       
this.url += '&';
-                                                                       }
-
-                                                                       //... 
set up a new data source
-                                                                       
this.source = new YAHOO.util.DataSource(this.url);
-                                                                               
        this.source.responseType = YAHOO.util.DataSource.TYPE_JSON;
-                                                                               
        this.source.connXhrMode = "queueRequests";
-                                                                               
        this.source.responseSchema = {
-                                                                               
        resultsList: "ResultSet.Result",
-                                                                               
                        fields: this.properties.columns,
-                                                                               
                        metaFields : {
-                                                                               
                        totalRecords: "ResultSet.totalRecords"
-                                                                               
                        }
-                                                                               
        };
-                                                                               
        //... set up a new data table
-                                                                               
        if (this.properties.tid == 'total_price')
-                                                                       {
-                                                                       //if 
the datatable is display of total price on contract, always initialize
-                                                                       
this.table = new YAHOO.widget.DataTable(
-                                                                               
        this.properties.container,
-                                                                               
        this.properties.columns,
-                                                                               
        this.source,
-                                                                       {
-                                                                       
paginator: this.paginator,
-                                                                               
        dynamicData: true,
-                                                                               
        MSG_EMPTY: '<?php echo lang("DATATABLE_MSG_EMPTY")?>',
-                                                                               
        MSG_ERROR: '<?php echo lang("DATATABLE_MSG_ERROR")?>',
-                                                                               
        MSG_LOADING: '<?php echo lang("DATATABLE_MSG_LOADING")?>'
-                                                                       }
-                                                                       );
-                                                                       }
-                                                                       else
-                                                                       {
-                                                                       
this.table = new YAHOO.widget.DataTable(
-                                                                               
        this.properties.container,
-                                                                               
        this.properties.columns,
-                                                                               
        this.source,
-                                                                       {
-                                                                       
paginator: this.paginator,
-                                                                               
        dynamicData: true,
-<?php
-       $populate        = phpgw::get_var('populate_form');
-       echo isset($populate) ? 'initialLoad: false,' : ''
-?>
-<?php
-       $initLoad        = phpgw::get_var('initial_load');
-       echo ($initLoad == 'no') ? 'initialLoad: false,' : ''
-?>
-                                                                       
MSG_EMPTY: '<?php echo lang("DATATABLE_MSG_EMPTY")?>',
-                                                                               
        MSG_ERROR: '<?php echo lang("DATATABLE_MSG_ERROR")?>',
-                                                                               
        MSG_LOADING: '<?php echo lang("DATATABLE_MSG_LOADING")?>'
-                                                                       }
-                                                                       );
-                                                                       }
-
-                                                                       //... 
set table properties
-                                                                       
this.table.related = this.properties.related_datatable;
-                                                                               
        this.table.tid = this.properties.tid;
-                                                                               
        this.table.container_id = this.properties.container;
-                                                                               
        this.table.editor_action = this.properties.editor_action;
-                                                                               
        //... push the data table on a stack
-                                                                               
        YAHOO.activitycalendar.datatables.push(this.table);
-                                                                               
        //... ?
-                                                                               
        this.table.handleDataReturnPayload = function(oRequest, oResponse, 
oPayload) {
-                                                                               
        if (oPayload){
-                                                                               
        oPayload.totalRecords = oResponse.meta.totalRecords;
-                                                                               
                        return oPayload;
-                                                                               
        }
-                                                                               
        }
-
-                                                                       //... 
create context menu for each record after the table has loaded the data
-                                                                       
this.table.doAfterLoadData = function() {
-                                                                       
onContextMenuBeforeShow = function(p_sType, p_aArgs)
-                                                                       {
-                                                                       var 
oTarget = this.contextEventTarget;
-                                                                               
        if (this.getRoot() == this)
-                                                                       {
-                                                                       if 
(oTarget.tagName != "TD")
-                                                                       {
-                                                                       oTarget 
= YAHOO.util.Dom.getAncestorByTagName(oTarget, "td");
-                                                                       }
-                                                                       
oSelectedTR = YAHOO.util.Dom.getAncestorByTagName(oTarget, "tr");
-                                                                               
        oSelectedTR.style.backgroundColor = '#AAC1D8';
-                                                                               
        oSelectedTR.style.color = "black";
-                                                                               
        YAHOO.util.Dom.addClass(oSelectedTR, prefixSelected);
-                                                                       }
-                                                                       }
-
-                                                                       
onContextMenuHide = function(p_sType, p_aArgs)
-                                                                       {
-                                                                       if 
(this.getRoot() == this && oSelectedTR)
-                                                                       {
-                                                                       
oSelectedTR.style.backgroundColor = "";
-                                                                               
        oSelectedTR.style.color = "";
-                                                                               
        YAHOO.util.Dom.removeClass(oSelectedTR, prefixSelected);
-                                                                       }
-                                                                       }
-
-                                                                       var 
records = this.getRecordSet();
-                                                                               
        var validRecords = 0;
-                                                                               
        for (var i = 0; i < records.getLength(); i++) {
-                                                                       var 
record = records.getRecord(i);
-                                                                               
        if (record == null)
-                                                                       {
-                                                                       
continue;
-                                                                       }
-                                                                       else
-                                                                       {
-                                                                       
validRecords++;
-                                                                       }
-
-                                                                       // use 
a global counter to create unique names (even for the same datatable) for all 
context menues on the page
-                                                                       var 
menuName = this.container_id + "_cm_" + counter;
-                                                                               
        counter++;
-                                                                               
        //... add menu items with label and handler function for click events
-                                                                               
        var labels = record.getData().labels;
-                                                                               
        //create a context menu that triggers on the HTML row element
-                                                                               
        record.menu = new YAHOO.widget.ContextMenu(menuName, 
{trigger:this.getTrEl(validRecords - 1), itemdata: labels, lazyload: true});
-                                                                               
        //... subscribe handler for click events
-                                                                               
        record.menu.clickEvent.subscribe(onContextMenuClick, this);
-                                                                               
        record.menu.subscribe("beforeShow", onContextMenuBeforeShow);
-                                                                               
        record.menu.subscribe("hide", onContextMenuHide);
-                                                                               
        //... render the menu on the related table row
-                                                                               
        record.menu.render(this.getTrEl(validRecords - 1));
-                                                                       }
-
-
-                                                                       }
-
-                                                                       //... 
calback methods for handling ajax calls
-                                                                       var 
ajaxResponseSuccess = function(o){
-                                                                       
reloadDataSources(this.args);
-                                                                       };
-                                                                               
        var ajaxResponseFailure = function(o){
-                                                                               
        reloadDataSources(this.args);
-                                                                               
        };
-                                                                               
        //...create a handler for context menu clicks
-                                                                               
        var onContextMenuClick = function(eventString, args, table) {
-                                                                               
        //... the argument holds the selected index number in the context menu
-                                                                               
        var task = args[1];
-                                                                               
                        //... only act on a data table
-                                                                               
                        if (table instanceof YAHOO.widget.DataTable) {
-                                                                               
        //... retrieve the record based on the selected table row
-                                                                               
        var row = table.getTrEl(this.contextEventTarget);
-                                                                               
                        var record = table.getRecord(row);
-                                                                               
                        //... check whether this action should be an AJAX call
-                                                                               
                        if (record.getData().ajax[task.index]) {
-                                                                               
        var request = YAHOO.util.Connect.asyncRequest(
-                                                                               
                        'GET',
-                                                                               
                        record.getData().actions[ task.index ],
-                                                                               
        {
-                                                                               
        success: ajaxResponseSuccess,
-                                                                               
                        success: ajaxResponseFailure,
-                                                                               
                        args:table
-                                                                               
        });
-                                                                               
        } else {
-                                                                               
        window.location = record.getData().actions[task.index];
-                                                                               
        }
-                                                                               
        }
-                                                                               
        };
-                                                                               
        // Handle mouseover and click events for inline editing
-                                                                               
        this.table.subscribe("cellMouseoverEvent", highlightEditableCell);
-                                                                               
        this.table.subscribe("cellMouseoutEvent", 
this.table.onEventUnhighlightCell);
-                                                                               
        this.table.subscribe("cellClickEvent", 
this.table.onEventShowCellEditor);
-                                                                               
        this.table.subscribe("editorSaveEvent", function(oArgs) {
-                                                                               
        var field = oArgs.editor.getColumn().field;
-                                                                               
                        var value = oArgs.newData;
-                                                                               
                        var id = oArgs.editor.getRecord().getData().id;
-                                                                               
                        var action = oArgs.editor.getDataTable().editor_action;
-                                                                               
                        // Translate to unix time if the editor is a calendar.
-                                                                               
                        if (oArgs.editor._sType == 'date') {
-                                                                               
        var selectedDate = oArgs.editor.calendar.getSelectedDates()[0];
-                                                                               
                        //alert("selDate1: " + selectedDate);
-                                                                               
                        // Make sure we're at midnight GMT
-                                                                               
                        selectedDate = selectedDate.toString().split(" ");
-                                                                               
                        //for(var e=0;e<selectedDate.length;e++){
-                                                                               
                        //      alert("element " + e + ": " + selectedDate[e]);
-                                                                               
                        //}
-                                                                               
                        if (selectedDate[3] == "00:00:00"){
-                                                                               
        //      alert("seldate skal byttes!");
-                                                                               
        selectedDate = selectedDate.slice(0, 3).join(" ") + " " + 
selectedDate[5] + " 00:00:00 GMT";
-                                                                               
        }
-                                                                               
        else{
-                                                                               
        selectedDate = selectedDate.slice(0, 4).join(" ") + " 00:00:00 GMT";
-                                                                               
        }
-                                                                               
        //selectedDate = selectedDate.toString().split(" ").slice(0, 4).join(" 
") + " 00:00:00 GMT";
-                                                                               
        //alert("selDate2: " + selectedDate);
-                                                                               
        var value = Math.round(Date.parse(selectedDate) / 1000);
-                                                                               
                        //alert("selDate3 value: " + value);
-                                                                               
        }
-
-                                                                               
        var request = YAHOO.util.Connect.asyncRequest(
-                                                                               
                        'GET',
-                                                                               
                        'index.php?menuaction=' + action + "&amp;field=" + 
field + "&amp;value=" + value + "&amp;id=" + id,
-                                                                               
        {
-                                                                               
        success: ajaxResponseSuccess,
-                                                                               
                        failure: ajaxResponseFailure,
-                                                                               
                        args:oArgs.editor.getDataTable()
-                                                                               
        }
-                                                                               
        );
-                                                                               
        });
-                                                                               
        // Don't set the row to be left-clickable if the table is editable by 
inline editors.
-                                                                               
        // In that case we use cellClickEvents instead
-                                                                               
        var table_should_be_clickable = true;
-                                                                               
        for (i in this.properties.columns) {
-                                                                       if 
(this.properties.columns[i].editor) {
-                                                                       
table_should_be_clickable = false;
-                                                                       }
-                                                                       }
-
-                                                                       if 
(table_should_be_clickable && !this.properties.disable_left_click) {
-                                                                       //... 
create a handler for regular clicks on a table row
-                                                                       
this.table.subscribe("rowClickEvent", function(e, obj) {
-                                                                       
YAHOO.util.Event.stopEvent(e);
-                                                                               
        //... trigger first action on row click
-                                                                               
        var row = obj.table.getTrEl(e.target);
-                                                                               
        if (row) {
-                                                                       var 
record = obj.table.getRecord(row);
-                                                                               
        //... check whether this action should be an AJAX call
-                                                                               
        if (record.getData().ajax[0]) {
-                                                                       var 
request = YAHOO.util.Connect.asyncRequest(
-                                                                               
        'GET',
-                                                                               
        //... execute first action
-                                                                               
        record.getData().actions[0],
-                                                                       {
-                                                                       
success: ajaxResponseSuccess,
-                                                                               
        failure: ajaxResponseFailure,
-                                                                               
        args:obj.table
-                                                                       }
-                                                                       );
-                                                                       } else {
-                                                                       //... 
execute first action
-                                                                       
window.location = record.getData().actions[0];
-                                                                       }
-                                                                       }
-                                                                       }, 
this);
-                                                                               
        //... highlight rows on mouseover.  This too only happens if the table 
is
-                                                                               
        // not editable.
-                                                                               
        this.table.subscribe("rowMouseoverEvent", 
this.table.onEventHighlightRow);
-                                                                               
        this.table.subscribe("rowMouseoutEvent", 
this.table.onEventUnhighlightRow);
-                                                                       }
-
-
-                                                                       //... 
create context menues when the table renders
-                                                                       
this.table.subscribe("renderEvent", this.table.doAfterLoadData);
-                                                                               
        //... listen for form submits and filter changes
-                                                                               
        YAHOO.util.Event.addListener(this.properties.form, 'submit', 
formListener, this, true);
-                                                                               
        YAHOO.util.Event.addListener(this.properties.filters, 'change', 
formListener, this, true);
-                                                                       }
-
-
-                                                       // Set up data sources 
when the document has loaded
-                                                       
YAHOO.util.Event.addListener(window, "load", function() {
-                                                       var i = 0;
-                                                                       while 
(YAHOO.activitycalendar.setupDatasource.length > 0){
-                                                       //... create a variable 
name, assign set up function to that variable and instantiate properties
-                                                       variableName = 
"YAHOO.activitycalendar.datasource" + i;
-                                                                       
eval(variableName + " = YAHOO.activitycalendar.setupDatasource.shift()");
-                                                                       var 
source_properties = eval("new " + variableName + "()");
-<?php
-       if($GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'] 
> 0)
-       {
-               $user_rows_per_page = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
-       }
-       else
-       {
-               $user_rows_per_page = 10;
-       }
-?>
-
-                                                       // ... create a 
paginator for this datasource
-                                                       var pag = new 
YAHOO.widget.Paginator({
-                                                       rowsPerPage: <?php echo 
$user_rows_per_page?>,
-                                                                       
alwaysVisible: true,
-                                                                       
rowsPerPageOptions: [5, 10, 25, 50, 100, 200],
-                                                                       
firstPageLinkLabel: "<< <?php echo lang('first')?>",
-                                                                       
previousPageLinkLabel: "< <?php echo lang('previous')?>",
-                                                                       
nextPageLinkLabel: "<?php echo lang('next')?> >",
-                                                                       
lastPageLinkLabel: "<?php echo lang('last')?> >>",
-                                                                       
template                        : "{RowsPerPageDropdown}<?php echo 
lang('elements_pr_page')?>.{CurrentPageReport}<br/>  {FirstPageLink} 
{PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}",
-                                                                       
pageReportTemplate      : "<?php echo lang('shows_from')?> {startRecord} <?php 
echo lang('to')?> {endRecord} <?php echo lang('of_total')?> {totalRecords}.",
-                                                                       
containers: [source_properties.paginator]
-                                                       });
-                                                                       
pag.render();
-                                                                       //... 
send data source properties and paginator to wrapper function
-                                                                       
this.wrapper = new dataSourceWrapper(source_properties, pag);
-                                                                       i += 1;
-<?php
-       $populate = phpgw::get_var('populate_form');
-       if(isset($populate))
-       {
-               ?>
-                                                                       var qs 
= YAHOO.activitycalendar.serializeForm(source_properties.form);
-                                                                               
        this.wrapper.source.liveData = this.wrapper.url + qs + '&';
-                                                                               
        this.wrapper.source.sendRequest('', {success: function(sRequest, 
oResponse, oPayload) {
-                                                                               
        this.wrapper.table.onDataReturnInitializeTable(sRequest, oResponse, 
this.wrapper.paginator);
-                                                                               
        }, scope: this});
-       <?php }
-?>
-
-                                                       // XXX: Create generic 
column picker for all datasources
-
-                                                       // Shows dialog, 
creating one when necessary
-                                                       var newCols = true;
-                                                                       var 
showDlg = function(e) {
-                                                                       
YAHOO.util.Event.stopEvent(e);
-                                                                               
        if (newCols) {
-                                                                       // 
Populate Dialog
-                                                                       // 
Using a template to create elements for the SimpleDialog
-                                                                       var 
allColumns = this.wrapper.table.getColumnSet().keys;
-                                                                               
        var elPicker = YAHOO.util.Dom.get("dt-dlg-picker");
-                                                                               
        var elTemplateCol = document.createElement("div");
-                                                                               
        YAHOO.util.Dom.addClass(elTemplateCol, "dt-dlg-pickercol");
-                                                                               
        var elTemplateKey = 
elTemplateCol.appendChild(document.createElement("span"));
-                                                                               
        YAHOO.util.Dom.addClass(elTemplateKey, "dt-dlg-pickerkey");
-                                                                               
        var elTemplateBtns = 
elTemplateCol.appendChild(document.createElement("span"));
-                                                                               
        YAHOO.util.Dom.addClass(elTemplateBtns, "dt-dlg-pickerbtns");
-                                                                               
        var onclickObj = {fn:handleButtonClick, obj:this, scope:false };
-                                                                               
        // Create one section in the SimpleDialog for each Column
-                                                                               
        var elColumn, elKey, elButton, oButtonGrp;
-                                                                               
        for (var i = 0, l = allColumns.length; i < l; i++) {
-                                                                       var 
oColumn = allColumns[i];
-                                                                               
        if (oColumn.label != 'unselectable') { // We haven't marked the column 
as unselectable for the user
-                                                                       // Use 
the template
-                                                                       
elColumn = elTemplateCol.cloneNode(true);
-                                                                               
        // Write the Column key
-                                                                               
        elKey = elColumn.firstChild;
-                                                                               
        elKey.innerHTML = oColumn.label;
-                                                                               
        // Create a ButtonGroup
-                                                                               
        oButtonGrp = new YAHOO.widget.ButtonGroup({
-                                                                               
        id: "buttongrp" + i,
-                                                                               
                        name: oColumn.getKey(),
-                                                                               
                        container: elKey.nextSibling
-                                                                               
        });
-                                                                               
        oButtonGrp.addButtons([
-                                                                               
        { label: "Vis", value: "Vis", checked: ((!oColumn.hidden)), onclick: 
onclickObj},
-                                                                               
        { label: "Skjul", value: "Skjul", checked: ((oColumn.hidden)), onclick: 
onclickObj}
-                                                                               
        ]);
-                                                                               
        elPicker.appendChild(elColumn);
-                                                                       }
-                                                                       }
-
-                                                                       newCols 
= false;
-                                                                       }
-
-                                                                       
myDlg.show();
-                                                                       };
-                                                                       var 
storeColumnsUrl = YAHOO.activitycalendar.storeColumnsUrl;
-                                                                       var 
hideDlg = function(e) {
-                                                                       
this.hide();
-                                                                               
        // After we've hidden the dialog we send a post call to store the 
columns the user has selected
-                                                                               
        var postData = 'values[save]=1';
-                                                                               
        var allColumns = wrapper.table.getColumnSet().keys;
-                                                                               
        for (var i = 0; i < allColumns.length; i++) {
-                                                                       if 
(!allColumns[i].hidden){
-                                                                       
postData += '&values[columns][]=' + allColumns[i].getKey();
-                                                                       }
-                                                                       }
-
-                                                                       
YAHOO.util.Connect.asyncRequest('POST', storeColumnsUrl, null, postData);
-                                                                       };
-                                                                       var 
handleButtonClick = function(e, oSelf) {
-                                                                       var 
sKey = this.get("name");
-                                                                               
        if (this.get("value") === "Skjul") {
-                                                                       // 
Hides a Column
-                                                                       
wrapper.table.hideColumn(sKey);
-                                                                       } else {
-                                                                       // 
Shows a Column
-                                                                       
wrapper.table.showColumn(sKey);
-                                                                       }
-                                                                       };
-                                                                       // 
Create the SimpleDialog
-                                                                       
YAHOO.util.Dom.removeClass("dt-dlg", "inprogress");
-                                                                       var 
myDlg = new YAHOO.widget.SimpleDialog("dt-dlg", {
-                                                                       width: 
"30em",
-                                                                               
        visible: false,
-                                                                               
        modal: false, // modal: true doesn't work for some reason - the dialog 
becomes unclickable
-                                                                               
        buttons: [
-                                                                               
        {text:"Lukk", handler:hideDlg}
-                                                                               
        ],
-                                                                               
        fixedcenter: true,
-                                                                               
        constrainToViewport: true
-                                                                       });
-                                                                       
myDlg.render();
-                                                                       // 
Nulls out myDlg to force a new one to be created
-                                                                       
wrapper.table.subscribe("columnReorderEvent", function(){
-                                                                       newCols 
= true;
-                                                                               
        YAHOO.util.Event.purgeElement("dt-dlg-picker", true);
-                                                                               
        YAHOO.util.Dom.get("dt-dlg-picker").innerHTML = "";
-                                                                       }, 
this, true);
-                                                                       // Hook 
up the SimpleDialog to the link
-                                                                       
YAHOO.util.Event.addListener("dt-options-link", "click", showDlg, this, true);
-                                                       }
-                                                       });
-                                                                       /*
-                                                                        * 
Listen for events in form. Serialize all form elements. Stop
-                                                                        * the 
original request and send new request.
-                                                                        */
-                                                                               
        function formListener(event){
-                                                                               
        YAHOO.util.Event.stopEvent(event);
-                                                                               
                        var qs = 
YAHOO.activitycalendar.serializeForm(this.properties.form);
-                                                                               
                        this.source.liveData = this.url + qs + '&';
-                                                                               
                        this.source.sendRequest('', {success: 
function(sRequest, oResponse, oPayload) {
-                                                                               
                        this.table.onDataReturnInitializeTable(sRequest, 
oResponse, this.paginator);
-                                                                               
                        }, scope: this});
-                                                                               
        }
-
-
-
-// TODO: All the calendar data must be removed when the 'old' calender is no 
longer used.
-
-// CALENDAR LOGIC
-
-                                                                       
function onClickOnInput(event)
-                                                                               
        {
-                                                                               
        this.align();
-                                                                               
                        this.show();
-                                                                               
                        }
-
-                                                                       
function closeCalender(event)
-                                                                               
        {
-                                                                               
        YAHOO.util.Event.stopEvent(event);
-                                                                               
                        this.hide();
-                                                                               
                        }
-
-                                                                       
function clearCalendar(event)
-                                                                               
        {
-                                                                               
        YAHOO.util.Event.stopEvent(event);
-                                                                               
                        this.clear();
-                                                                               
                        document.getElementById(this.inputFieldID).value = '';
-                                                                               
                        document.getElementById(this.hiddenField).value = '';
-                                                                               
                        }
-
-                                                                       
function initCalendar(inputFieldID, divContainerID, calendarBodyId, 
calendarTitle, closeButton, clearButton, hiddenField, noPostOnSelect)
-                                                                               
        {
-                                                                               
        var overlay = new YAHOO.widget.Dialog(
-                                                                               
                        divContainerID,
-                                                                               
        {       visible: false,
-                                                                               
                        close: true
-                                                                               
        }
-                                                                               
        );
-                                                                               
                        var navConfig = {
-                                                                               
                        strings: {
-                                                                               
                        month:"<?php echo lang('month')?>",
-                                                                               
                                        year:"<?php echo lang('year')?>",
-                                                                               
                                        submit: "<?php echo lang('ok')?>",
-                                                                               
                                        cancel: "<?php echo lang('cancel')?>",
-                                                                               
                                        invalidYear: "<?php echo 
lang('select_date_valid_year')?>"
-                                                                               
                        },
-                                                                               
                                        initialFocus: "month"
-                                                                               
                        }
-
-                                                                               
        var cal = new YAHOO.widget.Calendar(
-                                                                               
                        calendarBodyId,
-                                                                               
        {       navigator:navConfig,
-                                                                               
                        title: '<?php echo lang('select_date')?>',
-                                                                               
                        start_weekday:1,
-                                                                               
                        LOCALE_WEEKDAYS:"short"}
-                                                                               
        );
-                                                                               
                        cal.cfg.setProperty("MONTHS_LONG",<?php echo 
lang('calendar_months')?>);
-                                                                               
                        cal.cfg.setProperty("WEEKDAYS_SHORT",<?php echo 
lang('calendar_weekdays')?>);
-                                                                               
                        cal.render();
-                                                                               
                        cal.selectEvent.subscribe(onCalendarSelect, 
[inputFieldID, overlay, hiddenField, noPostOnSelect], false);
-                                                                               
                        cal.inputFieldID = inputFieldID;
-                                                                               
                        cal.hiddenField = hiddenField;
-                                                                               
                        YAHOO.util.Event.addListener(closeButton, 'click', 
closeCalender, overlay, true);
-                                                                               
                        YAHOO.util.Event.addListener(clearButton, 'click', 
clearCalendar, cal, true);
-                                                                               
                        YAHOO.util.Event.addListener(inputFieldID, 'click', 
onClickOnInput, overlay, true);
-                                                                               
                        return cal;
-                                                                               
                        }
-
-                                                                       
function onCalendarSelect(type, args, array){
-                                                                       var 
firstDate = args[0][0];
-                                                                               
        var month = firstDate[1] + "";
-                                                                               
        var day = firstDate[2] + "";
-                                                                               
        var year = firstDate[0] + "";
-                                                                               
        var date = month + "/" + day + "/" + year;
-                                                                               
        var hiddenDateField = document.getElementById(array[2]);
-                                                                               
        if (hiddenDateField != null)
-                                                                       {
-                                                                       if 
(month < 10)
-                                                                       {
-                                                                       month = 
'0' + month;
-                                                                       }
-                                                                       if (day 
< 10)
-                                                                       {
-                                                                       day = 
'0' + day;
-                                                                       }
-                                                                       
hiddenDateField.value = year + '-' + month + '-' + day;
-                                                                       }
-                                                                       
document.getElementById(array[0]).value = formatDate('<?php echo 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']?>', 
Math.round(Date.parse(date) / 1000));
-                                                                               
        array[1].hide();
-                                                                               
        if (cal_postOnChange || (array[3] != undefined && !array[3])) {
-                                                                       
document.getElementById('ctrl_search_button').click();
-                                                                       }
-
-                                                                       }
-
-                                                                       /**
-                                                                        * 
Update the selected calendar date with a date from an input field
-                                                                        * 
Input field value must be of the format YYYY-MM-DD
-                                                                        */
-                                                                       
function updateCalFromInput(cal, inputId) {
-                                                                       var 
txtDate1 = document.getElementById(inputId);
-                                                                               
        if (txtDate1.value != "") {
-
-                                                                       var 
date_elements = txtDate1.value.split('-');
-                                                                               
        var year = date_elements[0];
-                                                                               
        var month = date_elements[1];
-                                                                               
        var day = date_elements[2];
-                                                                               
        cal.select(month + "/" + day + "/" + year);
-                                                                               
        var selectedDates = cal.getSelectedDates();
-                                                                               
        if (selectedDates.length > 0) {
-                                                                       var 
firstDate = selectedDates[0];
-                                                                               
        cal.cfg.setProperty("pagedate", (firstDate.getMonth() + 1) + "/" + 
firstDate.getFullYear());
-                                                                               
        cal.render();
-                                                                       }
-
-                                                                       }
-                                                                       }
-
-                                                                       
function formatDate (format, timestamp) {
-                                                                       // 
http://kevin.vanzonneveld.net
-                                                                       // +   
original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com)
-                                                                       // +    
  parts by: Peter-Paul Koch (http://www.quirksmode.org/js/beat.html)
-                                                                       // +   
improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
-                                                                       // +   
improved by: MeEtc (http://yass.meetcweb.com)
-                                                                       // +   
improved by: Brad Touesnard
-                                                                       // +   
improved by: Tim Wiel
-                                                                       // +   
improved by: Bryan Elliott
-                                                                       // +   
improved by: Brett Zamir (http://brett-zamir.me)
-                                                                       // +   
improved by: David Randall
-                                                                       // +    
  input by: Brett Zamir (http://brett-zamir.me)
-                                                                       // +   
bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
-                                                                       // +   
improved by: Brett Zamir (http://brett-zamir.me)
-                                                                       // +   
improved by: Brett Zamir (http://brett-zamir.me)
-                                                                       // +   
derived from: gettimeofday
-                                                                       // %    
    note 1: Uses global: php_js to store the default timezone
-                                                                       // *    
 example 1: date('H:m:s \\m \\i\\s \\m\\o\\n\\t\\h', 1062402400);
-                                                                       // *    
 returns 1: '09:09:40 m is month'
-                                                                       // *    
 example 2: date('F j, Y, g:i a', 1062462400);
-                                                                       // *    
 returns 2: 'September 2, 2003, 2:26 am'
-                                                                       // *    
 example 3: date('Y W o', 1062462400);
-                                                                       // *    
 returns 3: '2003 36 2003'
-                                                                       // *    
 example 4: x = date('Y m d', (new Date()).getTime()/1000); // 2009 01 09
-                                                                       // *    
 example 4: (x+'').length == 10
-                                                                       // *    
 returns 4: true
-
-                                                                       var 
jsdate = (
-                                                                               
        (typeof (timestamp) == 'undefined') ? new Date() : // Not provided
-                                                                               
        (typeof (timestamp) == 'number') ? new Date(timestamp * 1000) : // UNIX 
timestamp
-                                                                               
        new Date(timestamp) // Javascript Date()
-                                                                               
        ); // , tal=[]
-                                                                               
        var pad = function(n, c){
-                                                                               
        if ((n = n + "").length < c) {
-                                                                               
        return new Array(++c - n.length).join("0") + n;
-                                                                               
        } else {
-                                                                               
        return n;
-                                                                               
        }
-                                                                               
        };
-                                                                               
        var _dst = function (t) {
-                                                                               
        // Calculate Daylight Saving Time (derived from gettimeofday() code)
-                                                                               
        var dst = 0;
-                                                                               
                        var jan1 = new Date(t.getFullYear(), 0, 1, 0, 0, 0, 0); 
// jan 1st
-                                                                               
                        var june1 = new Date(t.getFullYear(), 6, 1, 0, 0, 0, 
0); // june 1st
-                                                                               
                        var temp = jan1.toUTCString();
-                                                                               
                        var jan2 = new Date(temp.slice(0, temp.lastIndexOf(' ') 
- 1));
-                                                                               
                        temp = june1.toUTCString();
-                                                                               
                        var june2 = new Date(temp.slice(0, temp.lastIndexOf(' 
') - 1));
-                                                                               
                        var std_time_offset = (jan1 - jan2) / (1000 * 60 * 60);
-                                                                               
                        var daylight_time_offset = (june1 - june2) / (1000 * 60 
* 60);
-                                                                               
                        if (std_time_offset === daylight_time_offset) {
-                                                                               
        dst = 0; // daylight savings time is NOT observed
-                                                                               
        }
-                                                                               
        else {
-                                                                               
        // positive is southern, negative is northern hemisphere
-                                                                               
        var hemisphere = std_time_offset - daylight_time_offset;
-                                                                               
                        if (hemisphere >= 0) {
-                                                                               
        std_time_offset = daylight_time_offset;
-                                                                               
        }
-                                                                               
        dst = 1; // daylight savings time is observed
-                                                                               
        }
-                                                                               
        return dst;
-                                                                               
        };
-                                                                               
        var ret = '';
-                                                                               
        var txt_weekdays = ["Sunday", "Monday", "Tuesday", "Wednesday",
-                                                                               
                        "Thursday", "Friday", "Saturday"];
-                                                                               
        var txt_ordin = {1:"st", 2:"nd", 3:"rd", 21:"st", 22:"nd", 23:"rd", 
31:"st"};
-                                                                               
        var txt_months = ["", "January", "February", "March", "April",
-                                                                               
                        "May", "June", "July", "August", "September", 
"October", "November",
-                                                                               
                        "December"];
-                                                                               
        var f = {
-                                                                               
        // Day
-                                                                               
        d: function(){
-                                                                               
        return pad(f.j(), 2);
-                                                                               
        },
-                                                                               
                        D: function(){
-                                                                               
                        var t = f.l();
-                                                                               
                                        return t.substr(0, 3);
-                                                                               
                        },
-                                                                               
                        j: function(){
-                                                                               
                        return jsdate.getDate();
-                                                                               
                        },
-                                                                               
                        l: function(){
-                                                                               
                        return txt_weekdays[f.w()];
-                                                                               
                        },
-                                                                               
                        N: function(){
-                                                                               
                        return f.w() + 1;
-                                                                               
                        },
-                                                                               
                        S: function(){
-                                                                               
                        return txt_ordin[f.j()] ? txt_ordin[f.j()] : 'th';
-                                                                               
                        },
-                                                                               
                        w: function(){
-                                                                               
                        return jsdate.getDay();
-                                                                               
                        },
-                                                                               
                        z: function(){
-                                                                               
                        return (jsdate - new Date(jsdate.getFullYear() + 
"/1/1")) / 864e5 >> 0;
-                                                                               
                        },
-                                                                               
                        // Week
-                                                                               
                        W: function(){
-                                                                               
                        var a = f.z(), b = 364 + f.L() - a;
-                                                                               
                                        var nd2, nd = (new 
Date(jsdate.getFullYear() + "/1/1").getDay() || 7) - 1;
-                                                                               
                                        if (b <= 2 && ((jsdate.getDay() || 7) - 
1) <= 2 - b){
-                                                                               
                        return 1;
-                                                                               
                        }
-                                                                               
                        if (a <= 2 && nd >= 4 && a >= (6 - nd)){
-                                                                               
                        nd2 = new Date(jsdate.getFullYear() - 1 + "/12/31");
-                                                                               
                                        return date("W", 
Math.round(nd2.getTime() / 1000));
-                                                                               
                        }
-                                                                               
                        return (1 + (nd <= 3 ? ((a + nd) / 7) : (a - (7 - nd)) 
/ 7) >> 0);
-                                                                               
                        },
-                                                                               
                        // Month
-                                                                               
                        F: function(){
-                                                                               
                        return txt_months[f.n()];
-                                                                               
                        },
-                                                                               
                        m: function(){
-                                                                               
                        return pad(f.n(), 2);
-                                                                               
                        },
-                                                                               
                        M: function(){
-                                                                               
                        var t = f.F();
-                                                                               
                                        return t.substr(0, 3);
-                                                                               
                        },
-                                                                               
                        n: function(){
-                                                                               
                        return jsdate.getMonth() + 1;
-                                                                               
                        },
-                                                                               
                        t: function(){
-                                                                               
                        var n;
-                                                                               
                                        if ((n = jsdate.getMonth() + 1) == 2){
-                                                                               
                        return 28 + f.L();
-                                                                               
                        }
-                                                                               
                        if (n & 1 && n < 8 || !(n & 1) && n > 7){
-                                                                               
                        return 31;
-                                                                               
                        }
-                                                                               
                        return 30;
-                                                                               
                        },
-                                                                               
                        // Year
-                                                                               
                        L: function(){
-                                                                               
                        var y = f.Y();
-                                                                               
                                        return (!(y & 3) && (y % 1e2 || !(y % 
4e2))) ? 1 : 0;
-                                                                               
                        },
-                                                                               
                        o: function(){
-                                                                               
                        if (f.n() === 12 && f.W() === 1) {
-                                                                               
                        return jsdate.getFullYear() + 1;
-                                                                               
                        }
-                                                                               
                        if (f.n() === 1 && f.W() >= 52) {
-                                                                               
                        return jsdate.getFullYear() - 1;
-                                                                               
                        }
-                                                                               
                        return jsdate.getFullYear();
-                                                                               
                        },
-                                                                               
                        Y: function(){
-                                                                               
                        return jsdate.getFullYear();
-                                                                               
                        },
-                                                                               
                        y: function(){
-                                                                               
                        return (jsdate.getFullYear() + "").slice(2);
-                                                                               
                        },
-                                                                               
                        // Time
-                                                                               
                        a: function(){
-                                                                               
                        return jsdate.getHours() > 11 ? "pm" : "am";
-                                                                               
                        },
-                                                                               
                        A: function(){
-                                                                               
                        return f.a().toUpperCase();
-                                                                               
                        },
-                                                                               
                        B: function(){
-                                                                               
                        // peter paul koch:
-                                                                               
                        var off = (jsdate.getTimezoneOffset() + 60) * 60;
-                                                                               
                                        var theSeconds = (jsdate.getHours() * 
3600) +
-                                                                               
                                        (jsdate.getMinutes() * 60) +
-                                                                               
                                        jsdate.getSeconds() + off;
-                                                                               
                                        var beat = Math.floor(theSeconds / 
86.4);
-                                                                               
                                        if (beat > 1000) {
-                                                                               
                        beat -= 1000;
-                                                                               
                        }
-                                                                               
                        if (beat < 0) {
-                                                                               
                        beat += 1000;
-                                                                               
                        }
-                                                                               
                        if ((String(beat)).length == 1) {
-                                                                               
                        beat = "00" + beat;
-                                                                               
                        }
-                                                                               
                        if ((String(beat)).length == 2) {
-                                                                               
                        beat = "0" + beat;
-                                                                               
                        }
-                                                                               
                        return beat;
-                                                                               
                        },
-                                                                               
                        g: function(){
-                                                                               
                        return jsdate.getHours() % 12 || 12;
-                                                                               
                        },
-                                                                               
                        G: function(){
-                                                                               
                        return jsdate.getHours();
-                                                                               
                        },
-                                                                               
                        h: function(){
-                                                                               
                        return pad(f.g(), 2);
-                                                                               
                        },
-                                                                               
                        H: function(){
-                                                                               
                        return pad(jsdate.getHours(), 2);
-                                                                               
                        },
-                                                                               
                        i: function(){
-                                                                               
                        return pad(jsdate.getMinutes(), 2);
-                                                                               
                        },
-                                                                               
                        s: function(){
-                                                                               
                        return pad(jsdate.getSeconds(), 2);
-                                                                               
                        },
-                                                                               
                        u: function(){
-                                                                               
                        return pad(jsdate.getMilliseconds() * 1000, 6);
-                                                                               
                        },
-                                                                               
                        // Timezone
-                                                                               
                        e: function () {
-                                                                               
                        /*                var abbr='', i=0;
-                                                                               
                         if (this.php_js && this.php_js.default_timezone) {
-                                                                               
                         return this.php_js.default_timezone;
-                                                                               
                         }
-                                                                               
                         if (!tal.length) {
-                                                                               
                         tal = timezone_abbreviations_list();
-                                                                               
                         }
-                                                                               
                         for (abbr in tal) {
-                                                                               
                         for (i=0; i < tal[abbr].length; i++) {
-                                                                               
                         if (tal[abbr][i].offset === 
-jsdate.getTimezoneOffset()*60) {
-                                                                               
                         return tal[abbr][i].timezone_id;
-                                                                               
                         }
-                                                                               
                         }
-                                                                               
                         }
-                                                                               
                         */
-                                                                               
                        return 'UTC';
-                                                                               
                        },
-                                                                               
                        I: function(){
-                                                                               
                        return _dst(jsdate);
-                                                                               
                        },
-                                                                               
                        O: function(){
-                                                                               
                        var t = pad(Math.abs(jsdate.getTimezoneOffset() / 60 * 
100), 4);
-                                                                               
                                        t = (jsdate.getTimezoneOffset() > 0) ? 
"-" + t : "+" + t;
-                                                                               
                                        return t;
-                                                                               
                        },
-                                                                               
                        P: function(){
-                                                                               
                        var O = f.O();
-                                                                               
                                        return (O.substr(0, 3) + ":" + 
O.substr(3, 2));
-                                                                               
                        },
-                                                                               
                        T: function () {
-                                                                               
                        /*                var abbr='', i=0;
-                                                                               
                         if (!tal.length) {
-                                                                               
                         tal = timezone_abbreviations_list();
-                                                                               
                         }
-                                                                               
                         if (this.php_js && this.php_js.default_timezone) {
-                                                                               
                         for (abbr in tal) {
-                                                                               
                         for (i=0; i < tal[abbr].length; i++) {
-                                                                               
                         if (tal[abbr][i].timezone_id === 
this.php_js.default_timezone) {
-                                                                               
                         return abbr.toUpperCase();
-                                                                               
                         }
-                                                                               
                         }
-                                                                               
                         }
-                                                                               
                         }
-                                                                               
                         for (abbr in tal) {
-                                                                               
                         for (i=0; i < tal[abbr].length; i++) {
-                                                                               
                         if (tal[abbr][i].offset === 
-jsdate.getTimezoneOffset()*60) {
-                                                                               
                         return abbr.toUpperCase();
-                                                                               
                         }
-                                                                               
                         }
-                                                                               
                         }
-                                                                               
                         */
-                                                                               
                        return 'UTC';
-                                                                               
                        },
-                                                                               
                        Z: function(){
-                                                                               
                        return - jsdate.getTimezoneOffset() * 60;
-                                                                               
                        },
-                                                                               
                        // Full Date/Time
-                                                                               
                        c: function(){
-                                                                               
                        return f.Y() + "-" + f.m() + "-" + f.d() + "T" + f.h() 
+ ":" + f.i() + ":" + f.s() + f.P();
-                                                                               
                        },
-                                                                               
                        r: function(){
-                                                                               
                        return f.D() + ', ' + f.d() + ' ' + f.M() + ' ' + f.Y() 
+ ' ' + f.H() + ':' + f.i() + ':' + f.s() + ' ' + f.O();
-                                                                               
                        },
-                                                                               
                        U: function(){
-                                                                               
                        return Math.round(jsdate.getTime() / 1000);
-                                                                               
                        }
-                                                                               
        };
-                                                                               
        return format.replace(/[\\]?([a-zA-Z])/g, function(t, s){
-                                                                               
        if (t != s){
-                                                                               
        // escaped
-                                                                               
        ret = s;
-                                                                               
        } else if (f[s]){
-                                                                               
        // a date function exists
-                                                                               
        ret = f[s]();
-                                                                               
        } else{
-                                                                               
        // nothing special
-                                                                               
        ret = s;
-                                                                               
        }
-                                                                               
        return ret;
-                                                                               
        });
-                                                                               
        }
-                                                                       /*
-                                                                        
YAHOO.activitycalendar.autocompleteHelper = function(url, field, hidden, 
container, label_attr) {
-                                                                        
label_attr = label_attr || 'name';
-                                                                        var 
myDataSource = new YAHOO.util.DataSource(url);
-                                                                        
myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON;
-                                                                        
myDataSource.connXhrMode = "queueRequests";
-                                                                        
myDataSource.responseSchema = {
-                                                                        
resultsList: "ResultSet.Result",
-                                                                        
fields: [label_attr, 'id']
-                                                                        };
-                                                                        
myDataSource.maxCacheEntries = 5;
-                                                                        
console.log(myDataSource);
-                                                                        
console.log(field);
-                                                                        
console.log(container);
-                                                                        var ac 
= new YAHOO.widget.AutoComplete(field, container, myDataSource);
-                                                                        
ac.queryQuestionMark = false;
-                                                                        
ac.resultTypeList = false;
-                                                                        
ac.forceSelection = true;
-                                                                        
console.log(ac);
-                                                                        
ac.itemSelectEvent.subscribe(function(sType, aArgs) {
-                                                                        
YAHOO.util.Dom.get(hidden).value = aArgs[2].id;
-                                                                        });
-                                                                        return 
ac;
-                                                                        };
-                                                                        */
-</script>

Deleted: branches/dev-syncromind/activitycalendar/templates/base/dashboard.php
===================================================================
--- branches/dev-syncromind/activitycalendar/templates/base/dashboard.php       
2015-12-09 19:21:48 UTC (rev 14549)
+++ branches/dev-syncromind/activitycalendar/templates/base/dashboard.php       
2015-12-09 19:24:13 UTC (rev 14550)
@@ -1,34 +0,0 @@
-<?php
-       include("common.php");
-?>
-
-<h1><img src="<?php echo 
ACTIVITYCALENDAR_IMAGE_PATH?>images/32x32/x-office-address-book.png" /> <?php 
echo lang('dashboard')?></h1>
-
-<h2><?php echo lang('organization')?></h2>
-<?php
-       $list_form       = true;
-       $list_id         = 'new_organizations';
-       $url_add_on      = '&amp;type=new_organizations';
-       $nosearch        = true;
-       $extra_cols      = array(array("key" => "change_type", "label" => 
lang('change_type'),
-                       "sortable" => true, "index" => 5));
-       include('organization_list_partial.php');
-?>
-<?php /* ?>
-         <h2><?php echo lang('group')?></h2>
-         <?php
-         $list_form = true;
-         $list_id = 'new_groups';
-         $url_add_on = '&amp;type=new_groups';
-         $nosearch = true;
-         $extra_cols = array(array("key" => "change_type", "label" => 
lang('change_type'), "sortable" => true, "index" => 5));
-         include('organization_list_partial.php');
-        */?>
-<h2><?php echo lang('activities')?></h2>
-<?php
-       $list_form       = true;
-       $list_id         = 'new_activities';
-       $url_add_on      = '&amp;type=new_activities';
-       $nofilter        = true;
-       include('activity_list_partial.php');
-?>
\ No newline at end of file

Deleted: branches/dev-syncromind/activitycalendar/templates/base/group.php
===================================================================
--- branches/dev-syncromind/activitycalendar/templates/base/group.php   
2015-12-09 19:21:48 UTC (rev 14549)
+++ branches/dev-syncromind/activitycalendar/templates/base/group.php   
2015-12-09 19:24:13 UTC (rev 14550)
@@ -1,128 +0,0 @@
-<?php
-       //include common logic for all templates
-       include("common.php");
-?>
-<div class="identifier-header">
-       <h1><img src="<?php echo 
ACTIVITYCALENDAR_IMAGE_PATH?>images/32x32/custom/contact.png" /><?php echo 
lang('group')?></h1>
-</div>
-<?php echo activitycalendar_uicommon::get_page_message($message)?>
-<?php echo activitycalendar_uicommon::get_page_error($error)?>
-<div class="yui-content">
-       <div id="details">
-               <form action="#" method="post">
-                       <input type="hidden" name="id" value="<?php 
if($group->get_id())
-{ echo $group->get_id();}
-else
-{ echo '0';}?>"/>
-                       <dl class="proplist-col">
-                               <dt><label for="orgname">Gruppenavn</label></dt>
-                               <dd><?php echo $group->get_name();?></dd>
-                               <dt><label 
for="group_description">Beskrivelse</label></dt>
-                               <dd>
-                                       <?php if($editable)
-                                               {?>
-                                                       <textarea rows="10" 
cols="100" name="group_description"><?php echo 
$group->get_description();?></textarea>
-                                       <?php }
-                                       else
-                                       {?>
-               <?php echo $group->get_description();?>
-                                               <?php }?>
-                               </dd>
-                               <dt><label>Kontaktperson 1</label></dt>
-                                       <?php if($contactperson1)
-                                               {?>
-                                               <dd><input type="hidden" 
name="contact1_id" value="<?php echo $contactperson1->get_id();?>"/></dd>
-                                               <dt><label 
for="contact1_name">Navn</label></dt>
-                                               <dd>
-                                                       <?php if($editable)
-                                                       {?>
-                                                               <input 
type="text" name="contact1_name" value="<?php echo 
$contactperson1->get_name();?>"/><br/>
-                                                       <?php }
-                                                       else
-                                                       {?>
-                       <?php echo $contactperson1->get_name();?>
-               <?php }?>
-                                               </dd>
-                                               <dt><label 
for="contact1_phone">Telefon</label></dt>
-                                               <dd>
-                                                       <?php if($editable)
-                                                       {?>
-                                                               <input 
type="text" name="contact1_phone" value="<?php echo 
$contactperson1->get_phone();?>"/>
-                                               <?php }
-                                               else
-                                               {?>
-                                                       <?php echo 
$contactperson1->get_phone();?>
-               <?php }?>
-                                               </dd>
-                                               <dt><label 
for="contact1_mail">E-post</label></dt>
-                                               <dd>
-                                                       <?php if($editable)
-                                                       {?>
-                                                               <input 
type="text" name="contact1_email" value="<?php echo 
$contactperson1->get_email();?>"/>
-                                                       <?php }
-                                                       else
-                                                       {?>
-                                                               <?php echo 
$contactperson1->get_email();?>
-                                                       <?php }?>
-                                               </dd>
-                                               <?php }?>
-                               <dt><label>Kontaktperson 2</label></dt>
-                                       <?php if($contactperson2)
-                                               {?>
-                                               <dd><input type="hidden" 
name="contact2_id" value="<?php echo $contactperson2->get_id();?>"/></dd>
-                                               <dt><label 
for="contact1_name">Navn</label></dt>
-                                               <dd>
-                                                       <?php if($editable)
-                                                       {?>
-                                                               <input 
type="text" name="contact2_name" value="<?php echo 
$contactperson2->get_name();?>"/><br/>
-                                                       <?php }
-                                                       else
-                                                       {?>
-                       <?php echo $contactperson2->get_name();?>
-                                               <?php }?>
-                                               </dd>
-                                               <dt><label 
for="contact1_phone">Telefon</label></dt>
-                                               <dd>
-                                               <?php if($editable)
-                                               {?>
-                                                               <input 
type="text" name="contact2_phone" value="<?php echo 
$contactperson2->get_phone();?>"/>
-                                               <?php }
-                                               else
-                                               {?>
-                                                       <?php echo 
$contactperson2->get_phone();?>
-                                               <?php }?>
-                                               </dd>
-                                               <dt><label 
for="contact1_mail">E-post</label></dt>
-                                               <dd>
-                                               <?php if($editable)
-                                               {?>
-                                                               <input 
type="text" name="contact2_email" value="<?php echo 
$contactperson2->get_email();?>"/>
-               <?php }
-               else
-               {?>
-                       <?php echo $contactperson2->get_email();?>
-               <?php }?>
-                                               </dd>
-       <?php }?>
-                       </dl>
-                       <div class="form-buttons">
-<?php
-       if($editable)
-       {
-               echo '<input type="submit" name="save_group" value="' . 
lang('save') . '"/>';
-               echo '<input type="submit" name="store_group" value="' . 
lang('store') . '"/>';
-               echo '<a href="' . $cancel_link . '">' . lang('back_to_list') . 
'</a>';
-       }
-       else
-       {
-               if(!$group->get_transferred())
-               {
-                       echo '<input type="submit" name="edit_group" value="' . 
lang('edit') . '"/>';
-               }
-               echo '<a href="' . $cancel_link . '">' . lang('back_to_list') . 
'</a>';
-       }
-?>
-                       </div>
-               </form>
-       </div>
-</div>

Deleted: 
branches/dev-syncromind/activitycalendar/templates/base/organization.php
===================================================================
--- branches/dev-syncromind/activitycalendar/templates/base/organization.php    
2015-12-09 19:21:48 UTC (rev 14549)
+++ branches/dev-syncromind/activitycalendar/templates/base/organization.php    
2015-12-09 19:24:13 UTC (rev 14550)
@@ -1,253 +0,0 @@
-<?php
-       //include common logic for all templates
-       include("common.php");
-?>
-<div class="identifier-header">
-       <h1><img src="<?php echo 
ACTIVITYCALENDAR_IMAGE_PATH?>images/32x32/custom/contact.png" /><?php echo 
lang('organization')?></h1>
-</div>
-<?php echo activitycalendar_uicommon::get_page_message($message)?>
-<?php echo activitycalendar_uicommon::get_page_error($error)?>
-<div class="yui-content">
-       <div id="details">
-               <form action="#" method="post">
-                       <input type="hidden" name="id" value="<?php 
if($organization->get_id())
-{ echo $organization->get_id();}
-else
-{ echo '0';}?>"/>
-                       <input type="hidden" name="original_org_id" 
value="<?php if($organization->get_original_org_id())
-{ echo $organization->get_original_org_id();}
-else
-{ echo '0';}?>"/>
-                       <dl class="proplist-col">
-                               <dt><label 
for="orgname">Organisasjonsnavn</label></dt>
-                               <dd><?php echo $organization->get_name();?></dd>
-                               <dt><label 
for="orgno">Organisasjonsnummer</label></dt>
-                               <dd>
-                                       <?php if($editable)
-                                               {?>
-                                                       <input type="text" 
name="orgno" value="<?php echo 
$organization->get_organization_number();?>"/><br/>
-                                                       <?php }
-                                               else
-                                               {
-                                                       ?>
-                                                       <?php echo 
$organization->get_organization_number();?>
-                                               <?php }?>
-                               </dd>
-                               <dt><label for="district">Bydel</label></dt>
-                               <dd>
-                                               <?php if($editable)
-                                                       {?>
-                                                               <?php
-                                                               $curr_district 
= $organization->get_district();
-                                                               
if(!is_numeric($curr_district))
-                                                               {
-                                                                       
$curr_district = 
activitycalendar_soactivity::get_instance()->get_district_from_name($organization->get_district());
-                                                               }
-                                                               ?>
-                                                       <select 
name="org_district">
-                                                               <option 
value="0">Ingen bydel valgt</option>
-                                                       <?php 
foreach($districts as $d)
-                                                       {?>
-                                                                       <option 
value="<?php echo $d['part_of_town_id']?>" <?php echo ($curr_district == 
$d['part_of_town_id']) ? 'selected' : ''?>><?php echo $d['name']?></option>
-                                                       <?php }?>
-                                                       </select>
-                                               <?php
- }
-                                               else
-                                               {
-                                                       
if($organization->get_change_type() == 'new')
-                                                       {
-                                                               
if($organization->get_district())
-                                                               {
-                                                                       ?>
-                                                                       <?php 
echo 
activitycalendar_soactivity::get_instance()->get_district_from_id($organization->get_district());?>
-                                                               <?php
- }
-                                                       }
-                                                       else
-                                                       {
-                                                               
if($organization->get_district() && is_numeric($organization->get_district()))
-                                                               {
-                                                                       ?>
-                                                                       <?php 
echo 
activitycalendar_soactivity::get_instance()->get_district_from_id($organization->get_district());?>
-                                                               <?php }
-                                                               else
-                                                               {?>
-                                                                       <?php 
echo $organization->get_district();?>
-                                                               <?php }
-                                                       }
-                                                       ?>
-                                               <?php }?>
-                               </dd>
-                               <dt><label 
for="homepage">Hjemmeside</label></dt>
-                               <dd>
-                                       <?php if($editable)
-                                               {?>
-                                                       <input type="text" 
name="homepage" value="<?php echo $organization->get_homepage();?>"/><br/>
-                                               <?php }
-                                               else
-                                               {?>
-               <?php echo $organization->get_homepage();?>
-       <?php }?>
-                               </dd>
-                               <dt><label for="email">E-post</label></dt>
-                               <dd>
-                                       <?php if($editable)
-                                               {?>
-                                                       <input type="text" 
name="email" value="<?php echo $organization->get_email();?>"/>
-       <?php }
-       else
-       {?>
-                                                       <?php echo 
$organization->get_email();?>
-                                               <?php }?>
-                               </dd>
-                               <dt><label for="phone">Telefon</label></dt>
-                               <dd>
-                               <?php if($editable)
-                                       {?>
-                                                       <input type="text" 
name="phone" value="<?php echo $organization->get_phone();?>"/>
-       <?php }
-       else
-       {?>
-                                                       <?php echo 
$organization->get_phone();?>
-                                               <?php }?>
-                               </dd>
-                               <dt><label for="street">Adresse</label></dt>
-                               <dd>
-<?php if($editable)
-       {?>
-                                                       <input type="text" 
name="address" value="<?php echo $organization->get_address();?> <?php echo 
$organization->get_addressnumber();?>"/>
-                                               <?php }
-                                               else
-                                               {?>
-                                                       <?php echo 
$organization->get_address() . ' ' . $organization->get_addressnumber();;?>
-                                               <?php }?>
-                               </dd>
-                               <dt><label 
for="street">Postnummer/Sted</label></dt>
-                               <dd>
-                                       <?php if($editable)
-                                               {?>
-                                                       <input type="text" 
name="zip_code" value="<?php echo $organization->get_zip_code();?>" 
size="6"/>&nbsp;&nbsp;<input type="text" name="city" value="<?php echo 
$organization->get_city();?>"/>
-                                               <?php }
-                                               else
-                                               {?>
-                                               <?php echo 
$organization->get_zip_code() . ' ' . $organization->get_city();?>
-                                       <?php }?>
-                               </dd>
-                               <dt><label 
for="org_description">Beskrivelse</label></dt>
-                               <dd>
-                                       <?php if($editable)
-                                               {?>
-                                                       <textarea rows="10" 
cols="100" name="org_description"><?php echo 
$organization->get_description();?></textarea>
-                                               <?php }
-                                               else
-                                               {?>
-               <?php echo $organization->get_description();?>
-       <?php }?>
-                               </dd>
-                                       <?php if($contactperson1)
-                                               {?>
-                                               <dt><label>Kontaktperson 
1</label></dt>
-                                               <dd><input type="hidden" 
name="contact1_id" value="<?php echo $contactperson1->get_id();?>"/></dd>
-                                               <dt><label 
for="contact1_name">Navn</label></dt>
-                                               <dd>
-               <?php if($editable)
-               {?>
-                                                               <input 
type="text" name="contact1_name" value="<?php echo 
$contactperson1->get_name();?>"/><br/>
-                                                       <?php }
-                                                       else
-                                                       {?>
-                                                               <?php echo 
$contactperson1->get_name();?>
-                                               <?php }?>
-                                               </dd>
-                                               <dt><label 
for="contact1_phone">Telefon</label></dt>
-                                               <dd>
-                                               <?php if($editable)
-                                               {?>
-                                                               <input 
type="text" name="contact1_phone" value="<?php echo 
$contactperson1->get_phone();?>"/>
-                                               <?php }
-                                               else
-                                               {?>
-                                                       <?php echo 
$contactperson1->get_phone();?>
-                                               <?php }?>
-                                               </dd>
-                                               <dt><label 
for="contact1_mail">E-post</label></dt>
-                                               <dd>
-                                               <?php if($editable)
-                                               {?>
-                                                               <input 
type="text" name="contact1_email" value="<?php echo 
$contactperson1->get_email();?>"/>
-                                               <?php }
-                                               else
-                                               {?>
-                                                       <?php echo 
$contactperson1->get_email();?>
-                                               <?php }?>
-                                               </dd>
-                                       <?php }?>
-                               <?php if($contactperson2)
-                                       {?>
-                                               <dt><label>Kontaktperson 
2</label></dt>
-                                               <dd><input type="hidden" 
name="contact2_id" value="<?php echo $contactperson2->get_id();?>"/></dd>
-                                               <dt><label 
for="contact1_name">Navn</label></dt>
-                                               <dd>
-               <?php if($editable)
-               {?>
-                                                               <input 
type="text" name="contact2_name" value="<?php echo 
$contactperson2->get_name();?>"/><br/>
-               <?php }
-               else
-               {?>
-                       <?php echo $contactperson2->get_name();?>
-               <?php }?>
-                                               </dd>
-                                               <dt><label 
for="contact1_phone">Telefon</label></dt>
-                                               <dd>
-               <?php if($editable)
-               {?>
-                                                               <input 
type="text" name="contact2_phone" value="<?php echo 
$contactperson2->get_phone();?>"/>
-               <?php }
-               else
-               {?>
-                       <?php echo $contactperson2->get_phone();?>
-               <?php }?>
-                                               </dd>
-                                               <dt><label 
for="contact1_mail">E-post</label></dt>
-                                               <dd>
-               <?php if($editable)
-               {?>
-                                                               <input 
type="text" name="contact2_email" value="<?php echo 
$contactperson2->get_email();?>"/>
-               <?php }
-               else
-               {?>
-                       <?php echo $contactperson2->get_email();?>
-               <?php }?>
-                                               </dd>
-       <?php }?>
-                       </dl>
-                       <div class="form-buttons">
-<?php
-       if($editable)
-       {
-               if($organization->get_original_org_id() && 
$organization->get_original_org_id() > 0)
-               {
-                       echo '<input type="submit" name="update_organization" 
value="' . lang('update_org') . '"/>';
-                       echo '<input type="submit" 
name="reject_organization_update" value="' . lang('reject') . '"/>';
-               }
-               else
-               {
-                       echo '<input type="submit" name="store_organization" 
value="' . lang('store') . '"/>';
-                       echo '<input type="submit" name="reject_organization" 
value="' . lang('reject') . '"/>';
-               }
-               echo '<a href="' . $cancel_link . '">' . lang('back_to_list') . 
'</a>';
-       }
-       else
-       {
-               if(!$organization->get_transferred())
-               {
-                       echo '<input type="submit" name="edit_organization" 
value="' . lang('edit') . '"/>';
-               }
-               echo '<a href="' . $cancel_link . '">' . lang('back_to_list') . 
'</a>';
-       }
-?>
-                       </div>
-               </form>
-       </div>
-</div>

Deleted: 
branches/dev-syncromind/activitycalendar/templates/base/organization_list.php
===================================================================
--- 
branches/dev-syncromind/activitycalendar/templates/base/organization_list.php   
    2015-12-09 19:21:48 UTC (rev 14549)
+++ 
branches/dev-syncromind/activitycalendar/templates/base/organization_list.php   
    2015-12-09 19:24:13 UTC (rev 14550)
@@ -1,13 +0,0 @@
-<?php
-       include("common.php");
-?>
-
-<h1><img src="<?php echo 
ACTIVITYCALENDAR_IMAGE_PATH?>images/32x32/x-office-address-book.png" /> <?php 
echo lang('organizations')?></h1>
-
-
-<?php
-       $list_form       = true;
-       $list_id         = 'all_organizations';
-       $url_add_on      = '&amp;type=all_organizations';
-       include('organization_list_partial.php');
-?>
\ No newline at end of file

Deleted: 
branches/dev-syncromind/activitycalendar/templates/base/organization_list_changed.php
===================================================================
--- 
branches/dev-syncromind/activitycalendar/templates/base/organization_list_changed.php
       2015-12-09 19:21:48 UTC (rev 14549)
+++ 
branches/dev-syncromind/activitycalendar/templates/base/organization_list_changed.php
       2015-12-09 19:24:13 UTC (rev 14550)
@@ -1,27 +0,0 @@
-<?php
-       include("common.php");
-?>
-
-<h1><img src="<?php echo 
ACTIVITYCALENDAR_IMAGE_PATH?>images/32x32/x-office-address-book.png" /> <?php 
echo lang('changed_organizations_groups')?></h1>
-
-<h2><?php echo lang('organization')?></h2>
-<?php
-       $list_form       = true;
-       $list_id         = 'changed_organizations';
-       $url_add_on      = '&amp;type=changed_organizations';
-       $nosearch        = true;
-       $extra_cols      = array(array("key" => "change_type", "label" => 
lang('change_type'),
-                       "sortable" => true, "index" => 5));
-       include('organization_list_partial.php');
-?>
-<?php
-       /*
-         <h2><?php echo lang('group')?></h2>
-         <?php
-         $list_form = true;
-         $list_id = 'changed_groups';
-         $url_add_on = '&amp;type=changed_groups';
-         $nosearch = true;
-         $extra_cols = array(array("key" => "change_type", "label" => 
lang('change_type'), "sortable" => true, "index" => 5));
-         include('organization_list_partial.php');
-        */?>
\ No newline at end of file

Deleted: 
branches/dev-syncromind/activitycalendar/templates/base/organization_list_partial.php
===================================================================
--- 
branches/dev-syncromind/activitycalendar/templates/base/organization_list_partial.php
       2015-12-09 19:21:48 UTC (rev 14549)
+++ 
branches/dev-syncromind/activitycalendar/templates/base/organization_list_partial.php
       2015-12-09 19:24:13 UTC (rev 14550)
@@ -1,164 +0,0 @@
-<script type="text/javascript">
-       //Add listener resetting form: redirects browser to call index  again
-       YAHOO.util.Event.addListener(
-                       'ctrl_reset_button',
-                       'click',
-                       function (e)
-                       {
-                               YAHOO.util.Event.stopEvent(e);
-                               window.location = 
'index.php?menuaction=activitycalendar.uiorganization.index';
-                       }
-       );
-<?php
-       if($list_id == 'new_organizations')
-       {
-               ?>
-                       // Defining columns for datatable
-                       var columnDefs = [{
-                                       key: "organization_number",
-                                       label: "<?php echo 
lang('organization_number')?>",
-                                       sortable: false
-                               },
-                               {
-                                       key: "name",
-                                       label: "<?php echo lang('name')?>",
-                                       sortable: false
-                               },
-                               {
-                                       key: "district",
-                                       label: "<?php echo lang('district')?>",
-                                       sortable: false
-                               },
-                               {
-                                       key: "office",
-                                       label: "<?php echo lang('office')?>",
-                                       sortable: false
-                               },
-                               {
-                                       key: "description",
-                                       label: "<?php echo 
lang('description')?>",
-                                       sortable: false
-                               },
-                               {
-                                       key: "actions",
-                                       hidden: true
-                               },
-                               {
-                                       key: "labels",
-                                       hidden: true
-                               },
-                               {
-                                       key: "ajax",
-                                       hidden: true
-                               }
-                       ];
-       <?php
- }
-       else
-       {
-               ?>
-                       // Defining columns for datatable
-                       var columnDefs = [{
-                                       key: "organization_number",
-                                       label: "<?php echo 
lang('organization_number')?>",
-                                       sortable: true
-                               },
-                               {
-                                       key: "name",
-                                       label: "<?php echo lang('name')?>",
-                                       sortable: true
-                               },
-                               {
-                                       key: "district",
-                                       label: "<?php echo lang('district')?>",
-                                       sortable: true
-                               },
-                               {
-                                       key: "office",
-                                       label: "<?php echo lang('office')?>",
-                                       sortable: true
-                               },
-                               {
-                                       key: "description",
-                                       label: "<?php echo 
lang('description')?>",
-                                       sortable: true
-                               },
-                               {
-                                       key: "actions",
-                                       hidden: true
-                               },
-                               {
-                                       key: "labels",
-                                       hidden: true
-                               },
-                               {
-                                       key: "ajax",
-                                       hidden: true
-                               }
-                       ];
-       <?php }
-?>
-
-<?php
-       if(isset($extra_cols))
-       {
-               foreach($extra_cols as $col)
-               {
-                       $literal = "{key: \"" . $col["key"] . "\",
-                                               label: \"" . $col["label"] . 
"\"}";
-                       if($col["index"])
-                       {
-                               echo "columnDefs.splice(" . $col["index"] . ", 
0," . $literal . ");";
-                       }
-                       else
-                       {
-                               echo "columnDefs.push($literal);";
-                       }
-               }
-       }
-?>
-
-       // Initiating the data source
-       setDataSource(
-                       
'index.php?menuaction=activitycalendar.uiorganization.query&amp;phpgw_return_as=json<?php
 echo $url_add_on;?>&amp;editable=<?php echo $editable ? "true" : "false";?>',
-                       columnDefs,
-                       '<?php echo $list_id?>_form',
-                       ['<?php echo $list_id?>_ctrl_search_query'],
-                       '<?php echo $list_id?>_container',
-                       '<?php echo $list_id?>_paginator',
-                       '<?php echo $list_id?>',
-                       new Array(<?php
-       if(isset($related))
-       {
-               foreach($related as $r)
-               {
-                       echo "\"" . $r . "\"";
-               }
-       }
-?>)
-                       );
-
-</script>
-<?php
-       if($list_form)
-       {
-               if(!$nosearch)
-               {
-                       ?>
-
-                       <form id="<?php echo $list_id?>_form" method="GET">
-                               <fieldset>
-                                       <!-- Search -->
-                                       <label for="ctrl_search_query"><?php 
echo lang('search_for')?></label>
-                                       <input id="<?php echo 
$list_id?>_ctrl_search_query" type="text" name="query" autocomplete="off" 
value="<?php echo isset($q) ? $q : ''?>"/>
-                                       <input type="submit" 
id="ctrl_search_button" value="<?php echo lang('search')?>" />
-                                       <input type="button" 
id="ctrl_reset_button" value="<?php echo lang('reset')?>" />
-                               </fieldset>
-                       </form>
-                       <?php
-               }
-       }
-?>
-
-<div id="<?php echo $list_id?>_paginator" class="paginator"></div>
-<div id="<?php echo $list_id?>_container" class="datatable_container"></div>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]