Merge branch 'master' into calendar_repeat

This commit is contained in:
Georg Ehrke 2012-06-11 22:18:46 +02:00
commit 66c3ddcd74
6 changed files with 30 additions and 37 deletions

View File

@ -34,29 +34,21 @@
}); });
</script> </script>
<div id="controls"> <div id="controls">
<div> <form id="view">
<form> <input type="button" value="<?php echo $l->t('Week');?>" id="oneweekview_radio"/>
<div id="view"> <input type="button" value="<?php echo $l->t('Month');?>" id="onemonthview_radio"/>
<input type="button" value="<?php echo $l->t('Week');?>" id="oneweekview_radio"/> <input type="button" value="<?php echo $l->t('List');?>" id="listview_radio"/>&nbsp;&nbsp;
<input type="button" value="<?php echo $l->t('Month');?>" id="onemonthview_radio"/> <img id="loading" src="<?php echo OCP\Util::imagePath('core', 'loading.gif'); ?>" />
<input type="button" value="<?php echo $l->t('List');?>" id="listview_radio"/>&nbsp;&nbsp; </form>
<img id="loading" src="<?php echo OCP\Util::imagePath('core', 'loading.gif'); ?>" /> <form id="choosecalendar">
</div> <input type="button" id="today_input" value="<?php echo $l->t("Today");?>"/>
</form> <input type="button" id="choosecalendar_input" value="<?php echo $l->t("Calendars");?>" onclick="Calendar.UI.Calendar.overview();" />
<form> </form>
<div id="choosecalendar"> <form id="datecontrol">
<input type="button" id="today_input" value="<?php echo $l->t("Today");?>"/> <input type="button" value="&nbsp;&lt;&nbsp;" id="datecontrol_left"/>
<input type="button" id="choosecalendar_input" value="<?php echo $l->t("Calendars");?>" onclick="Calendar.UI.Calendar.overview();" /> <span class="button" id="datecontrol_date"></span>
</div> <input type="button" value="&nbsp;&gt;&nbsp;" id="datecontrol_right"/>
</form> </form>
<form>
<div id="datecontrol">
<input type="button" value="&nbsp;&lt;&nbsp;" id="datecontrol_left"/>
<span class="button" id="datecontrol_date"></span>
<input type="button" value="&nbsp;&gt;&nbsp;" id="datecontrol_right"/>
</div>
</form>
</div>
</div> </div>
<div id="notification" style="display:none;"></div> <div id="notification" style="display:none;"></div>
<div id="calendar_holder"> <div id="calendar_holder">

View File

@ -15,7 +15,7 @@ session_write_close();
$nl = "\n"; $nl = "\n";
global $progresskey; global $progresskey;
$progresskey = 'contacts.import-' . $_GET['progresskey']; $progresskey = 'contacts.import-' . (isset($_GET['progresskey'])?$_GET['progresskey']:'');
if (isset($_GET['progress']) && $_GET['progress']) { if (isset($_GET['progress']) && $_GET['progress']) {
echo OC_Cache::get($progresskey); echo OC_Cache::get($progresskey);
@ -63,13 +63,13 @@ foreach($lines as $line){
if(strtoupper(trim($line)) == 'BEGIN:VCARD'){ if(strtoupper(trim($line)) == 'BEGIN:VCARD'){
$inelement = true; $inelement = true;
} elseif (strtoupper(trim($line)) == 'END:VCARD') { } elseif (strtoupper(trim($line)) == 'END:VCARD') {
$card[] = str_replace('=0D=0A', '\n', iconv(mb_detect_encoding($line, 'UTF-8, ISO-8859-1'), 'utf-8', $line)); $card[] = $line;
$parts[] = implode($nl, $card); $parts[] = implode($nl, $card);
$card = array(); $card = array();
$inelement = false; $inelement = false;
} }
if ($inelement === true && trim($line) != '') { if ($inelement === true && trim($line) != '') {
$card[] = str_replace('=0D=0A', '\n', iconv(mb_detect_encoding($line, 'UTF-8, ISO-8859-1'), 'utf-8', $line)); $card[] = $line;
} }
} }
//import the contacts //import the contacts

View File

@ -839,22 +839,22 @@ Contacts={
$('#addressdisplay dl').last().data('checksum', this.data.ADR[adr]['checksum']); $('#addressdisplay dl').last().data('checksum', this.data.ADR[adr]['checksum']);
var adrarray = this.data.ADR[adr]['value']; var adrarray = this.data.ADR[adr]['value'];
var adrtxt = ''; var adrtxt = '';
if(adrarray[0].length > 0) { if(adrarray[0] && adrarray[0].length > 0) {
adrtxt = adrtxt + '<li>' + adrarray[0].strip_tags() + '</li>'; adrtxt = adrtxt + '<li>' + adrarray[0].strip_tags() + '</li>';
} }
if(adrarray[1].length > 0) { if(adrarray[1] && adrarray[1].length > 0) {
adrtxt = adrtxt + '<li>' + adrarray[1].strip_tags() + '</li>'; adrtxt = adrtxt + '<li>' + adrarray[1].strip_tags() + '</li>';
} }
if(adrarray[2].length > 0) { if(adrarray[2] && adrarray[2].length > 0) {
adrtxt = adrtxt + '<li>' + adrarray[2].strip_tags() + '</li>'; adrtxt = adrtxt + '<li>' + adrarray[2].strip_tags() + '</li>';
} }
if(adrarray[3].length > 0 || adrarray[5].length > 0) { if((adrarray[3] && adrarray[5]) && adrarray[3].length > 0 || adrarray[5].length > 0) {
adrtxt = adrtxt + '<li>' + adrarray[5].strip_tags() + ' ' + adrarray[3].strip_tags() + '</li>'; adrtxt = adrtxt + '<li>' + adrarray[5].strip_tags() + ' ' + adrarray[3].strip_tags() + '</li>';
} }
if(adrarray[4].length > 0) { if(adrarray[4] && adrarray[4].length > 0) {
adrtxt = adrtxt + '<li>' + adrarray[4].strip_tags() + '</li>'; adrtxt = adrtxt + '<li>' + adrarray[4].strip_tags() + '</li>';
} }
if(adrarray[6].length > 0) { if(adrarray[6] && adrarray[6].length > 0) {
adrtxt = adrtxt + '<li>' + adrarray[6].strip_tags() + '</li>'; adrtxt = adrtxt + '<li>' + adrarray[6].strip_tags() + '</li>';
} }
$('#addressdisplay dl').last().find('.addresslist').html(adrtxt); $('#addressdisplay dl').last().find('.addresslist').html(adrtxt);

View File

@ -131,7 +131,7 @@ class OC_Contacts_VCard{
foreach($property->parameters as $key=>&$parameter){ foreach($property->parameters as $key=>&$parameter){
if(strtoupper($parameter->name) == 'ENCODING') { if(strtoupper($parameter->name) == 'ENCODING') {
if(strtoupper($parameter->value) == 'QUOTED-PRINTABLE') { // what kind of other encodings could be used? if(strtoupper($parameter->value) == 'QUOTED-PRINTABLE') { // what kind of other encodings could be used?
$property->value = quoted_printable_decode($property->value); $property->value = str_replace("\r\n", "\n", mb_convert_encoding(quoted_printable_decode($property->value), 'utf-8', 'auto'));
unset($property->parameters[$key]); unset($property->parameters[$key]);
} }
} elseif(strtoupper($parameter->name) == 'CHARSET') { } elseif(strtoupper($parameter->name) == 'CHARSET') {

View File

@ -2,8 +2,6 @@
namespace OC\Pictures; namespace OC\Pictures;
require_once('lib/base.php');
class DatabaseManager { class DatabaseManager {
private static $instance = null; private static $instance = null;
const TAG = 'DatabaseManager'; const TAG = 'DatabaseManager';

View File

@ -310,8 +310,11 @@ OC.Tasks = {
}; };
$(document).ready(function(){ $(document).ready(function(){
fillHeight($('#tasks_lists')); $(window).resize(function () {
fillWindow($('#tasks_list')); fillHeight($('#tasks_lists'));
fillWindow($('#tasks_list'));
});
$(window).trigger('resize');
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
* Actions for startup * Actions for startup