Separate import and export tabs.
authorJan Schneider <jan@horde.org>
Tue, 16 Mar 2010 22:06:34 +0000 (22:06 +0000)
committerJan Schneider <jan@horde.org>
Tue, 16 Mar 2010 22:24:27 +0000 (23:24 +0100)
kronolith/js/kronolith.js
kronolith/templates/chunks/calendar.php

index d8164b5..67fb01d 100644 (file)
@@ -2329,9 +2329,10 @@ KronolithCore = {
             switch (type) {
             case 'internal':
                 kronolithCTagAc.reset();
+                $('kronolithCalendar' + type + 'LinkImport').up('span').hide();
                 // Fall through.
             case 'tasklists':
-                $('kronolithCalendar' + type + 'LinkImportExport').up('span').hide();
+                $('kronolithCalendar' + type + 'LinkExport').up('span').hide();
                 break;
             case 'remote':
                 if (calendar) {
@@ -2354,10 +2355,11 @@ KronolithCore = {
             case 'internal':
                 kronolithCTagAc.reset(Kronolith.conf.calendars.internal[calendar].tg);
                 $('kronolithCalendar' + type + 'ImportCal').setValue(calendar);
+                $('kronolithCalendar' + type + 'LinkImport').up('span').show();
                 // Fall through.
             case 'tasklists':
                 $('kronolithCalendar' + type + 'Description').setValue(info.desc);
-                $('kronolithCalendar' + type + 'LinkImportExport').up('span').show();
+                $('kronolithCalendar' + type + 'LinkExport').up('span').show();
                 $('kronolithCalendar' + type + 'Export').href = type == 'internal'
                     ? Kronolith.conf.URI_CALENDAR_EXPORT + '=' + calendar
                     : Kronolith.conf.tasks.URI_TASKLIST_EXPORT + '=' + calendar.substring(6);
index b4ae289..56d1760 100644 (file)
@@ -50,7 +50,8 @@ $file_upload = $GLOBALS['browser']->allowFileUploads();
   <span>
     <span class="kronolithSeparator">|</span>
     <ul>
-      <li><a href="#" class="kronolithTabLink" id="kronolithCalendarinternalLinkImportExport"><?php echo _("Import/Export") ?></a></li>
+      <li><a href="#" class="kronolithTabLink" id="kronolithCalendarinternalLinkImport"><?php echo _("Import") ?></a></li>
+      <li><a href="#" class="kronolithTabLink" id="kronolithCalendarinternalLinkExport"><?php echo _("Export") ?></a></li>
     </ul>
   </span>
 </div>
@@ -70,7 +71,7 @@ $file_upload = $GLOBALS['browser']->allowFileUploads();
 <?php $type = 'internal'; include dirname(__FILE__) . '/permissions.inc'; ?>
 </div>
 
-<div id="kronolithCalendarinternalTabImportExport" class="kronolithTabsOption" style="display:none">
+<div id="kronolithCalendarinternalTabImport" class="kronolithTabsOption" style="display:none">
   <div class="kronolithDialogInfo"><?php echo _("iCalendar is a computer file format which allows internet users to send meeting requests and tasks to other internet users, via email, or sharing files with an extension of .ics. Recipients of the iCalendar data file (with supporting software, such as an email client or calendar application) can respond to the sender easily or counter propose another meeting date/time.") ?></div>
   <label for="kronolithCalendarinternalImport"><?php echo _("Import ICS file") ?>:</label>
   <input type="file" id="kronolithCalendarinternalImport" name="import_file" /><br />
@@ -78,7 +79,10 @@ $file_upload = $GLOBALS['browser']->allowFileUploads();
                '<input type="checkbox" id="kronolithCalendarinternalImportOver" name="purge" />',
                '<label for="kronolithCalendarinternalImportOver">', '</label>') ?>
   <span class="kronolithDialogWarning"><?php printf(_("%sWarning:%s also %sdeletes all events%s currently in the calendar."), '<strong>', '</strong>', '<strong>', '</strong>') ?></span>
-  <hr />
+</div>
+
+<div id="kronolithCalendarinternalTabExport" class="kronolithTabsOption" style="display:none">
+  <div class="kronolithDialogInfo"><?php echo _("iCalendar is a computer file format which allows internet users to send meeting requests and tasks to other internet users, via email, or sharing files with an extension of .ics. Recipients of the iCalendar data file (with supporting software, such as an email client or calendar application) can respond to the sender easily or counter propose another meeting date/time.") ?></div>
   <label><?php echo _("Export ICS file") ?>:</label>
   <a id="kronolithCalendarinternalExport"><?php echo _("Calendar ICS file") ?></a>
 </div>
@@ -120,7 +124,7 @@ $file_upload = $GLOBALS['browser']->allowFileUploads();
   <span>
     <span class="kronolithSeparator">|</span>
     <ul>
-      <li><a href="#" class="kronolithTabLink" id="kronolithCalendartasklistsLinkImportExport"><?php echo _("Export") /*_("Import/Export")*/ ?></a></li>
+      <li><a href="#" class="kronolithTabLink" id="kronolithCalendartasklistsLinkExport"><?php echo _("Export") ?></a></li>
     </ul>
   </span>
 </div>
@@ -134,14 +138,8 @@ $file_upload = $GLOBALS['browser']->allowFileUploads();
 <?php $type = 'tasklists'; include dirname(__FILE__) . '/permissions.inc'; ?>
 </div>
 
-<div id="kronolithCalendartasklistsTabImportExport" class="kronolithTabsOption" style="display:none">
+<div id="kronolithCalendartasklistsTabExport" class="kronolithTabsOption" style="display:none">
   <div class="kronolithDialogInfo"><?php echo _("iCalendar is a computer file format which allows internet users to send meeting requests and tasks to other internet users, via email, or sharing files with an extension of .ics. Recipients of the iCalendar data file (with supporting software, such as an email client or calendar application) can respond to the sender easily or counter propose another meeting date/time.") ?></div>
-  <?php /* ?>
-  <label><?php echo _("Import ICS file") ?>:
-    <input type="file" name="import_file" />
-  </label>
-  <br />
-  <?php */ ?>
   <label><?php echo _("Export ICS file") ?>:</label>
   <a id="kronolithCalendartasklistsExport"><?php echo _("Task list ICS file") ?></a>
 </div>