<?xml version="1.0" encoding="UTF-8" ?>
<Module>
  <ModulePrefs author="eXoPlatform"
    title="Agenda"
    title_url="http://www.exoplatform.org"
    description="Tasks and Upcoming Event list.">
    <Locale messages="locale/default.xml" />
    <Locale lang="fr" messages="locale/fr.xml" />
    <Require feature="setprefs"/>
    <Require feature="dynamic-height"/>
    <UserPref name="setting" default_value="/calendar;/portal/rest/cs/calendar/events/personal;10;AM/PM;Default;0" datatype="hidden" />
  </ModulePrefs>
  <Content type="html">
    <![CDATA[
	<link rel="stylesheet" href="css/tasks.css" type="text/css" />
    <link type="text/css" rel="stylesheet" href="/exo-gadget-resources/skin/exo-gadget/gadget-common.css" />
   	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript" src="js/tasks.js"></script>
    
	<script type="text/javascript">        
		var defaultCalendar = "";
	</script>
	
	<script type="text/javascript">

			function showTask(){
				$("#eventDiv").hide();
				$("#taskLink").removeClass();
				$("#eventLink").addClass("ThemeColor customLink");
				$("#taskDiv").show();
	
				}
			function showEvent(){
				$("#taskDiv").hide();
				$("#eventLink").removeClass();
				$("#taskLink").addClass("ThemeColor customLink");
				$("#eventDiv").show();
				}


	  $(document).ready(function(){

		showEvent();

		$("#taskLink").click(function () {
			showTask();
			gadgets.window.adjustHeight($("#agenda-gadget").get(0).offsetHeight);
		});

		$("#eventLink").click(function () {
			showEvent();
			gadgets.window.adjustHeight($("#agenda-gadget").get(0).offsetHeight);
		});
		//gadgets.window.adjustHeight($("#agenda-gadget").get(0).offsetHeight);

	  });
  </script>

<div id="agenda-gadget" class="UIGadgetThemes">

        <div class="TitGad ClearFix">
          <a href="#demo" class="IconDropDown" id="ShowAll" target="_parent">__MSG_showall__</a>

          <div class="SettingButton" id="SettingButton" title="__MSG_setting__" style="display:block; height:19px">
            <a href="javascript:eXoEventGadget.showHideSetting(true);"><span></span></a>
          </div>
          <div class="ContTit">Agenda</div>
        </div>
        
     <form id="Setting" action="#" style="display:none;">
      <table>
        <tr>
          <td>__MSG_baseurl__</td>
          <td><input type="text" name="url"></td>
        </tr>
        <tr>
          <td>__MSG_subscribeurl__</td>
          <td><input type="text" name="subscribeurl"></td>
        </tr>
        <tr>
          <td>__MSG_limit__</td>
          <td><input type="text" name="limit"></td>
        </tr>   
        <tr>
          <td>__MSG_calendars__</td>
          <td>
            <select type="text" name="calendars">
            </select>
          </td>
        </tr>
        <tr>
          <td colspan="2">
            <input type="button" name="save" value="__MSG_save__" onclick="eXoEventGadget.saveSetting();">
            <input type="button" name="cancel" value="__MSG_cancel__" onclick="eXoEventGadget.showHideSetting(false);">
          </td>          
        </tr>
      </table>
      </form>
      
     <div class="GadCont">
	<div>
	<span id="eventLink" href="#" class="ThemeColor customLink"> </span>
	&nbsp; | &nbsp;
	<span id="taskLink" href="#" class="ThemeColor customLink"> </span> 
	</div>

        <div class="GadCont MyTasks" id="taskDiv">
        </div> 

        <div class="GadCont UpcomingEvents" id="eventDiv">
        </div>
        
     </div>
     
</div>

    ]]>
  </Content>
</Module>
