From 8a6cb23170b95336770bc4dcd6d58583de82815e Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Sun, 22 Apr 2012 20:38:17 +0200 Subject: [PATCH 1/9] Contacts: Clear cache for contact photo and thumbnail when it has been changed. --- apps/contacts/ajax/savecrop.php | 2 ++ apps/contacts/photo.php | 9 +++++++-- apps/contacts/thumbnail.php | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/apps/contacts/ajax/savecrop.php b/apps/contacts/ajax/savecrop.php index 73ac521e04b..d003834ef8c 100644 --- a/apps/contacts/ajax/savecrop.php +++ b/apps/contacts/ajax/savecrop.php @@ -94,6 +94,8 @@ if(file_exists($tmp_path)) { OC_Log::write('contacts','savecrop.php: files: Adding PHOTO property.', OC_Log::DEBUG); $card->addProperty('PHOTO', $image->__toString(), array('ENCODING' => 'b', 'TYPE' => $image->mimeType())); } + $now = new DateTime; + $card->setString('REV', $now->format(DateTime::W3C)); if(!OC_Contacts_VCard::edit($id,$card)) { bailOut('Error saving contact.'); } diff --git a/apps/contacts/photo.php b/apps/contacts/photo.php index 298f1215e3c..117d0a9808f 100644 --- a/apps/contacts/photo.php +++ b/apps/contacts/photo.php @@ -19,7 +19,12 @@ function getStandardImage(){ OC_Response::redirect(OC_Helper::imagePath('contacts', 'person_large.png')); } -$id = $_GET['id']; +$id = isset($_GET['id']) ? $_GET['id'] : null; +$caching = isset($_GET['refresh']) ? 0 : null; + +if(is_null($id)) { + getStandardImage(); +} $contact = OC_Contacts_App::getContactVCard($id); $image = new OC_Image(); @@ -30,7 +35,7 @@ if(!$image) { if( is_null($contact)) { OC_Log::write('contacts','photo.php. The VCard for ID '.$id.' is not RFC compatible',OC_Log::ERROR); } else { - OC_Response::enableCaching(); + OC_Response::enableCaching($caching); OC_Contacts_App::setLastModifiedHeader($contact); // Photo :-) diff --git a/apps/contacts/thumbnail.php b/apps/contacts/thumbnail.php index 5082626499b..28b8eba22c9 100644 --- a/apps/contacts/thumbnail.php +++ b/apps/contacts/thumbnail.php @@ -39,6 +39,7 @@ if(!function_exists('imagecreatefromjpeg')) { } $id = $_GET['id']; +$caching = isset($_GET['refresh']) ? 0 : null; $contact = OC_Contacts_App::getContactVCard($id); @@ -48,7 +49,7 @@ if(is_null($contact)){ getStandardImage(); exit(); } -OC_Response::enableCaching(); +OC_Response::enableCaching($caching); OC_Contacts_App::setLastModifiedHeader($contact); $thumbnail_size = 23; From e8f062dc935b6bd9b8047594affda491c659b79a Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Sun, 22 Apr 2012 20:44:11 +0200 Subject: [PATCH 2/9] Contacts: - Added overlay toolbar to contact photo with 'Delete current', 'Edit current', 'Load from OC_Filesystem' and 'Upload' options. - Made action icons translucent instead of hiding them. --- apps/contacts/ajax/currentphoto.php | 68 ++++++++++ apps/contacts/ajax/loadphoto.php | 4 + apps/contacts/ajax/oc_photo.php | 75 +++++++++++ apps/contacts/ajax/uploadphoto.php | 13 -- apps/contacts/css/contacts.css | 19 ++- apps/contacts/js/contacts.js | 116 ++++++++++++++---- apps/contacts/templates/part.contact.php | 5 +- apps/contacts/templates/part.contactphoto.php | 8 +- 8 files changed, 260 insertions(+), 48 deletions(-) create mode 100644 apps/contacts/ajax/currentphoto.php create mode 100644 apps/contacts/ajax/oc_photo.php diff --git a/apps/contacts/ajax/currentphoto.php b/apps/contacts/ajax/currentphoto.php new file mode 100644 index 00000000000..15cb6c7a083 --- /dev/null +++ b/apps/contacts/ajax/currentphoto.php @@ -0,0 +1,68 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see . + * + */ +// Init owncloud +require_once('../../../lib/base.php'); + +// Check if we are a user +// Firefox and Konqueror tries to download application/json for me. --Arthur +OC_JSON::setContentTypeHeader('text/plain'); +OC_JSON::checkLoggedIn(); +OC_JSON::checkAppEnabled('contacts'); +function bailOut($msg) { + OC_JSON::error(array('data' => array('message' => $msg))); + OC_Log::write('contacts','ajax/currentphoto.php: '.$msg, OC_Log::ERROR); + exit(); +} +function debug($msg) { + OC_Log::write('contacts','ajax/currentphoto.php: '.$msg, OC_Log::DEBUG); +} + +if (!isset($_GET['id'])) { + bailOut(OC_Contacts_App::$l10n->t('No contact ID was submitted.')); +} + +$tmpfname = tempnam("/tmp", "occOrig"); +$contact = OC_Contacts_App::getContactVCard($_GET['id']); +$image = new OC_Image(); +if(!$image) { + bailOut(OC_Contacts_App::$l10n->t('Error loading image.')); +} +// invalid vcard +if( is_null($contact)) { + bailOut(OC_Contacts_App::$l10n->t('Error reading contact photo.')); +} else { + if(!$image->loadFromBase64($contact->getAsString('PHOTO'))) { + $image->loadFromBase64($contact->getAsString('LOGO')); + } + if($image->valid()) { + if($image->save($tmpfname)) { + OC_JSON::success(array('data' => array('id'=>$_GET['id'], 'tmp'=>$tmpfname))); + exit(); + } else { + bailOut(OC_Contacts_App::$l10n->t('Error saving temporary file.')); + } + } else { + bailOut(OC_Contacts_App::$l10n->t('The loading photo is not valid.')); + } +} + +?> diff --git a/apps/contacts/ajax/loadphoto.php b/apps/contacts/ajax/loadphoto.php index 2c8bb7bf1ed..2f95cdc9328 100644 --- a/apps/contacts/ajax/loadphoto.php +++ b/apps/contacts/ajax/loadphoto.php @@ -38,6 +38,7 @@ function bailOut($msg) { $image = null; $id = isset($_GET['id']) ? $_GET['id'] : ''; +$refresh = isset($_GET['refresh']) ? true : false; if($id == '') { bailOut(OC_Contacts_App::$l10n->t('Missing contact id.')); @@ -54,6 +55,9 @@ foreach($vcard->children as $property){ $tmpl = new OC_TEMPLATE("contacts", "part.contactphoto"); $tmpl->assign('id', $id); +if($refresh) { + $tmpl->assign('refresh', 1); +} $page = $tmpl->fetchPage(); OC_JSON::success(array('data' => array('page'=>$page, 'checksum'=>$checksum))); ?> diff --git a/apps/contacts/ajax/oc_photo.php b/apps/contacts/ajax/oc_photo.php new file mode 100644 index 00000000000..14d77ea50b7 --- /dev/null +++ b/apps/contacts/ajax/oc_photo.php @@ -0,0 +1,75 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see . + * + */ +// Init owncloud +require_once('../../../lib/base.php'); + +// Check if we are a user +// Firefox and Konqueror tries to download application/json for me. --Arthur +OC_JSON::setContentTypeHeader('text/plain'); +OC_JSON::checkLoggedIn(); +OC_JSON::checkAppEnabled('contacts'); +function bailOut($msg) { + OC_JSON::error(array('data' => array('message' => $msg))); + OC_Log::write('contacts','ajax/oc_photo.php: '.$msg, OC_Log::ERROR); + exit(); +} +function debug($msg) { + OC_Log::write('contacts','ajax/oc_photo.php: '.$msg, OC_Log::DEBUG); +} + +if (!isset($_GET['id'])) { + bailOut(OC_Contacts_App::$l10n->t('No contact ID was submitted.')); +} + +if (!isset($_GET['path'])) { + bailOut(OC_Contacts_App::$l10n->t('No photo path was submitted.')); +} + +$localpath = OC_Filesystem::getLocalFile($_GET['path']); +$tmpfname = tempnam("/tmp", "occOrig"); + +if(!file_exists($localpath)) { + bailOut(OC_Contacts_App::$l10n->t('File doesn\'t exist:').$localpath); +} +file_put_contents($tmpfname, file_get_contents($localpath)); + +$image = new OC_Image(); +if(!$image) { + bailOut(OC_Contacts_App::$l10n->t('Error loading image.')); +} +if(!$image->loadFromFile($tmpfname)) { + bailOut(OC_Contacts_App::$l10n->t('Error loading image.')); +} +if($image->width() > 400 || $image->height() > 400) { + $image->resize(400); // Prettier resizing than with browser and saves bandwidth. +} +if(!$image->fixOrientation()) { // No fatal error so we don't bail out. + debug('Couldn\'t save correct image orientation: '.$tmpfname); +} +if($image->save($tmpfname)) { + OC_JSON::success(array('data' => array('mime'=>$_SERVER['CONTENT_TYPE'], 'name'=>$fn, 'id'=>$id, 'tmp'=>$tmpfname))); + exit(); +} else { + bailOut('Couldn\'t save temporary image: '.$tmpfname); +} + +?> diff --git a/apps/contacts/ajax/uploadphoto.php b/apps/contacts/ajax/uploadphoto.php index 9780df46476..15d4718241e 100644 --- a/apps/contacts/ajax/uploadphoto.php +++ b/apps/contacts/ajax/uploadphoto.php @@ -36,19 +36,6 @@ function debug($msg) { OC_Log::write('contacts','ajax/uploadphoto.php: '.$msg, OC_Log::DEBUG); } -// foreach ($_SERVER as $key=>$element) { -// debug('$_SERVER: '.$key.'=>'.$element); -// } -// foreach ($_GET as $key=>$element) { -// debug('_GET: '.$key.'=>'.$element); -// } -// foreach ($_POST as $key=>$element) { -// debug('_POST: '.$key.'=>'.$element); -// } -// foreach ($_FILES as $key=>$element) { -// debug('_FILES: '.$key.'=>'.$element); -// } - // If it is a Drag'n'Drop transfer it's handled here. $fn = (isset($_SERVER['HTTP_X_FILE_NAME']) ? $_SERVER['HTTP_X_FILE_NAME'] : false); if ($fn) { diff --git a/apps/contacts/css/contacts.css b/apps/contacts/css/contacts.css index c19c6cc7113..b0c68c96e67 100644 --- a/apps/contacts/css/contacts.css +++ b/apps/contacts/css/contacts.css @@ -38,14 +38,17 @@ dl.form { width: 100%; float: left; clear: right; margin: 0; padding: 0; } .ui-autocomplete-loading { background: url('../../../core/img/loading.gif') right center no-repeat; } .float { float: left; } .listactions { height: 1em; width:60px; float: left; clear: right; } -.add,.edit,.delete,.mail, .globe { cursor: pointer; width: 20px; height: 20px; margin: 0; float: left; position:relative; display: none; } +.add,.edit,.delete,.mail, .globe, .upload, .cloud { cursor: pointer; width: 20px; height: 20px; margin: 0; float: left; position:relative; opacity: 0.1; } +.add:hover,.edit:hover,.delete:hover,.mail:hover, .globe:hover, .upload:hover, .cloud:hover { opacity: 1.0 } .add { background:url('../../../core/img/actions/add.svg') no-repeat center; clear: both; } .delete { background:url('../../../core/img/actions/delete.svg') no-repeat center; } .edit { background:url('../../../core/img/actions/rename.svg') no-repeat center; } .mail { background:url('../../../core/img/actions/mail.svg') no-repeat center; } +.upload { background:url('../../../core/img/actions/upload.svg') no-repeat center; } +.cloud { background:url('../../../core/img/places/picture.svg') no-repeat center; } /*.globe { background:url('../img/globe.svg') no-repeat center; }*/ .globe { background:url('../../../core/img/actions/public.svg') no-repeat center; } - +.transparent{ opacity: 0.6; } #edit_name_dialog { padding:0; } #edit_name_dialog > input { width: 15em; } #edit_address_dialog { /*width: 30em;*/ } @@ -60,9 +63,13 @@ dl.form { width: 100%; float: left; clear: right; margin: 0; padding: 0; } .contactpart legend { width:auto; padding:.3em; border:1px solid #ddd; font-weight:bold; cursor:pointer; background:#f8f8f8; color:#555; text-shadow:#fff 0 1px 0; -moz-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 1px #fff inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; } #cropbox { margin: auto; } -#contacts_details_photo { border-radius: 0.5em; border: thin solid #bbb; margin: 0.3em; cursor: pointer; background: url(../../../core/img/loading.gif) no-repeat center center; display: block; /* clear: right;*/ } -#contacts_details_photo:hover { background: #fff; } -/*#contacts_details_photo_progress { margin: 0.3em 0.3em 0.3em 7em; clear: left; }*/ +#contacts_details_photo { border-radius: 0.5em; border: thin solid #bbb; margin: 0.3em; background: url(../../../core/img/loading.gif) no-repeat center center; display: block; -moz-box-shadow: 0 1px 3px #777; -webkit-box-shadow: 0 1px 3px #777; box-shadow: 0 1px 3px #777; } +#contacts_details_photo:hover { background: #fff; cursor: default; } +#phototools { position:absolute; margin: 5px 0 0 10px; width:auto; height:22px; padding:0px; background-color:#fff; list-style-type:none; border-radius: 0.5em; -moz-box-shadow: 0 1px 3px #777; -webkit-box-shadow: 0 1px 3px #777; box-shadow: 0 1px 3px #777; } +#phototools li { display: inline; } +#phototools li a { float:left; cursor:pointer; width:22px; height:22px; opacity: 0.6; } +#phototools li a:hover { opacity: 0.8; } + /* Address editor */ #addressdisplay { padding: 0.5em; } dl.addresscard { background-color: #fff; float: left; width: 45%; margin: 0 0.3em 0.3em 0.3em; padding: 0; border: thin solid lightgray; } @@ -80,7 +87,7 @@ dl.addresscard dd > ul { margin: 0.3em; padding: 0.3em; } #file_upload_target, #crop_target { display:none; } -#file_upload_start { opacity:0; filter:alpha(opacity=0); z-index:1; /*position:absolute; left:0; top:0;*/ cursor:pointer; width:0; height:0;} +#file_upload_start { opacity:0; filter:alpha(opacity=0); z-index:1; /*position:absolute; left:0; top:0;*/ width:0; height:0;} input[type="checkbox"] { width: 20px; height: 20px; vertical-align: bottom; } .big { font-weight:bold; font-size:1.2em; } .huge { font-weight:bold; font-size:1.5em; } diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index b491b3a90ef..45b2fe130e2 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -117,13 +117,21 @@ Contacts={ loadListHandlers:function() { //$('.add,.delete').hide(); $('.globe,.mail,.delete,.edit,.tip').tipsy(); - $('.addresscard,.propertylist li,.propertycontainer').hover( + /*$('.addresscard,.propertylist li,.propertycontainer').hover( function () { $(this).find('.globe,.mail,.delete,.edit').fadeIn(100); }, function () { $(this).find('.globe,.mail,.delete,.edit').fadeOut(100); } + );*/ + $('.addresscard,.propertylist li,.propertycontainer').hover( + function () { + $(this).find('.globe,.mail,.delete,.edit').animate({ opacity: 1.0 }, 200, function() {}); + }, + function () { + $(this).find('.globe,.mail,.delete,.edit').animate({ opacity: 0.1 }, 200, function() {}); + } ); }, loadHandlers:function() { @@ -691,10 +699,11 @@ Contacts={ } }, deleteProperty:function(obj, type){ - //console.log('deleteProperty, id: ' + this.id); + console.log('deleteProperty, obj: ' + obj.attr('id') + ', container: ' + Contacts.UI.propertyContainerFor(obj).html()); Contacts.UI.loading(obj, true); var checksum = Contacts.UI.checksumFor(obj); - if(checksum != undefined) { + console.log('deleteProperty, id: ' + this.id + ', checksum: ' + checksum); + if(checksum) { $.getJSON('ajax/deleteproperty.php',{'id': this.id, 'checksum': checksum },function(jsondata){ if(jsondata.status == 'success'){ if(type == 'list') { @@ -707,13 +716,14 @@ Contacts={ var othertypes = ['NOTE', 'PHOTO']; if(othertypes.indexOf(proptype) != -1) { console.log('NOTE or PHOTO'); - Contacts.UI.propertyContainerFor(obj).hide(); Contacts.UI.propertyContainerFor(obj).data('checksum', ''); if(proptype == 'PHOTO') { console.log('Delete PHOTO'); Contacts.UI.Contacts.refreshThumbnail(Contacts.UI.Card.id); + Contacts.UI.Card.loadPhoto(); } else if(proptype == 'NOTE') { $('#note').find('textarea').val(''); + Contacts.UI.propertyContainerFor(obj).hide(); } } else { $('dl dt[data-element="'+proptype+'"],dd[data-element="'+proptype+'"]').hide(); @@ -1073,13 +1083,65 @@ Contacts={ form.submit(); } }, + loadPhotoHandlers:function(){ + $('#contacts_details_photo_wrapper').hover( + function () { + $('#phototools').slideDown(200); + }, + function () { + $('#phototools').slideUp(200); + } + ); + $('#phototools').hover( + function () { + $(this).removeClass('transparent'); + }, + function () { + $(this).addClass('transparent'); + } + ); + if(this.data.PHOTO) { + $('#phototools .delete').click(function() { + $(this).tipsy('hide'); + Contacts.UI.Card.deleteProperty($('#contacts_details_photo'), 'single'); + $(this).hide(); + }); + $('#phototools .edit').click(function() { + $(this).tipsy('hide'); + Contacts.UI.Card.editCurrentPhoto(); + }); + } else { + $('#phototools .delete').hide(); + $('#phototools .edit').hide(); + } + $('#phototools .upload').click(function() { + $('#file_upload_start').trigger('click'); + }); + $('#phototools .cloud').click(function() { + OC.dialogs.filepicker(t('contacts', 'Select photo'), Contacts.UI.Card.cloudPhotoSelected, false, 'image', true); + }); + }, + cloudPhotoSelected:function(path){ + console.log('cloudPhotoSelected: ' + path); + $.getJSON('ajax/oc_photo.php',{'path':path,'id':Contacts.UI.Card.id},function(jsondata){ + if(jsondata.status == 'success'){ + //alert(jsondata.data.page); + Contacts.UI.Card.editPhoto(jsondata.data.id, jsondata.data.tmp) + $('#edit_photo_dialog_img').html(jsondata.data.page); + } + else{ + OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error')); + } + }); + }, loadPhoto:function(force){ //if(this.data.PHOTO||force==true) { $.getJSON('ajax/loadphoto.php',{'id':this.id},function(jsondata){ if(jsondata.status == 'success'){ //alert(jsondata.data.page); - $('#file_upload_form').data('checksum', jsondata.data.checksum); + $('#contacts_details_photo_wrapper').data('checksum', jsondata.data.checksum); $('#contacts_details_photo_wrapper').html(jsondata.data.page); + Contacts.UI.Card.loadPhotoHandlers(); } else{ OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error')); @@ -1093,6 +1155,18 @@ Contacts={ $('#contacts_propertymenu a[data-type="PHOTO"]').parent().show(); }*/ }, + editCurrentPhoto:function(){ + $.getJSON('ajax/currentphoto.php',{'id':this.id},function(jsondata){ + if(jsondata.status == 'success'){ + //alert(jsondata.data.page); + Contacts.UI.Card.editPhoto(jsondata.data.id, jsondata.data.tmp) + $('#edit_photo_dialog_img').html(jsondata.data.page); + } + else{ + OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error')); + } + }); + }, editPhoto:function(id, tmp_path){ //alert('editPhoto: ' + tmp_path); $.getJSON('ajax/cropphoto.php',{'tmp_path':tmp_path,'id':this.id},function(jsondata){ @@ -1119,6 +1193,7 @@ Contacts={ if(response != undefined && response.status == 'success'){ // load cropped photo. $('#contacts_details_photo_wrapper').html(response.data.page); + Contacts.UI.Card.loadPhotoHandlers(); }else{ OC.dialogs.alert(response.data.message, t('contacts', 'Error')); } @@ -1343,10 +1418,12 @@ $(document).ready(function(){ Contacts.UI.Card.editNew(); }); - /** - * Load the details view for a contact. - */ - $('#leftcontent li').live('click',function(){ + $('#contacts_deletecard').click(function(){ + Contacts.UI.Card.doDelete(); + }); + + // Load a contact. + $('#leftcontent li').click(function(){ var id = $(this).data('id'); $(this).addClass('active'); var oldid = $('#rightcontent').data('id'); @@ -1365,10 +1442,6 @@ $(document).ready(function(){ return false; }); - $('#contacts_deletecard').live('click',function(){ - Contacts.UI.Card.doDelete(); - }); - $('#contacts li').bind('inview', function(event, isInView, visiblePartX, visiblePartY) { if (isInView) { //NOTE: I've kept all conditions for future reference ;-) // element is now visible in the viewport @@ -1390,13 +1463,6 @@ $(document).ready(function(){ } }); - $('.button').tipsy(); - // Triggers invisible file input - $('#contacts_details_photo').live('click', function() { - $('#file_upload_start').trigger('click'); - return false; - }); - // NOTE: For some reason the selector doesn't work when I select by '.contacts_property' too... // I do the filtering in the event handler instead. //$('input[type="text"],input[type="checkbox"],input[type="email"],input[type="tel"],input[type="date"], select').live('change', function(){ @@ -1500,8 +1566,8 @@ $(document).ready(function(){ if (e.lengthComputable){ var _progress = Math.round((e.loaded * 100) / e.total); if (_progress != 100){ - $('#contacts_details_photo_progress').text(_progress + '%'); - $('#contacts_details_photo_progress').val(_progress); + //$('#contacts_details_photo_progress').text(_progress + '%'); + //$('#contacts_details_photo_progress').val(_progress); } } }; @@ -1517,12 +1583,12 @@ $(document).ready(function(){ xhr.send(file); } - $('body').live('click',function(e){ + $('body').click(function(e){ if(!$(e.target).is('#contacts_propertymenu_button')) { $('#contacts_propertymenu').hide(); } }); - $('#contacts_propertymenu_button').live('click',function(){ + $('#contacts_propertymenu_button').click(function(){ var menu = $('#contacts_propertymenu'); if(menu.is(':hidden')) { menu.show(); @@ -1531,7 +1597,7 @@ $(document).ready(function(){ menu.hide(); } }); - $('#contacts_propertymenu a').live('click',function(){ + $('#contacts_propertymenu a').click(function(){ var type = $(this).data('type'); Contacts.UI.Card.addProperty(type); $('#contacts_propertymenu').hide(); diff --git a/apps/contacts/templates/part.contact.php b/apps/contacts/templates/part.contact.php index c09c20fd4e4..b90fa92c2c5 100644 --- a/apps/contacts/templates/part.contact.php +++ b/apps/contacts/templates/part.contact.php @@ -23,10 +23,9 @@ $id = isset($_['id']) ? $_['id'] : '';
-
+
- -
+
diff --git a/apps/contacts/templates/part.contactphoto.php b/apps/contacts/templates/part.contactphoto.php index bcb2f75815c..3c11e4d1582 100644 --- a/apps/contacts/templates/part.contactphoto.php +++ b/apps/contacts/templates/part.contactphoto.php @@ -2,8 +2,14 @@ $id = $_['id']; $wattr = isset($_['width'])?'width="'.$_['width'].'"':''; $hattr = isset($_['height'])?'height="'.$_['height'].'"':''; -$rand = isset($_['refresh'])?'&'.rand().'='.rand():''; +$rand = isset($_['refresh'])?'&refresh='.rand():''; ?> + src="?id=" /> From 43ee5cf2246964abb7b49ff1fd082c5072cbd526 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Sun, 22 Apr 2012 21:12:44 +0200 Subject: [PATCH 3/9] remove old fullcalendar files --- 3rdparty/fullcalendar/GPL-LICENSE.txt | 278 - 3rdparty/fullcalendar/MIT-LICENSE.txt | 20 - 3rdparty/fullcalendar/changelog.txt | 313 - 3rdparty/fullcalendar/css/fullcalendar.css | 616 -- .../fullcalendar/css/fullcalendar.print.css | 59 - 3rdparty/fullcalendar/js/fullcalendar.js | 5210 ----------------- 3rdparty/fullcalendar/js/fullcalendar.min.js | 113 - 3rdparty/fullcalendar/js/gcal.js | 112 - 8 files changed, 6721 deletions(-) delete mode 100644 3rdparty/fullcalendar/GPL-LICENSE.txt delete mode 100644 3rdparty/fullcalendar/MIT-LICENSE.txt delete mode 100644 3rdparty/fullcalendar/changelog.txt delete mode 100644 3rdparty/fullcalendar/css/fullcalendar.css delete mode 100644 3rdparty/fullcalendar/css/fullcalendar.print.css delete mode 100644 3rdparty/fullcalendar/js/fullcalendar.js delete mode 100644 3rdparty/fullcalendar/js/fullcalendar.min.js delete mode 100644 3rdparty/fullcalendar/js/gcal.js diff --git a/3rdparty/fullcalendar/GPL-LICENSE.txt b/3rdparty/fullcalendar/GPL-LICENSE.txt deleted file mode 100644 index 11dddd00ef0..00000000000 --- a/3rdparty/fullcalendar/GPL-LICENSE.txt +++ /dev/null @@ -1,278 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. diff --git a/3rdparty/fullcalendar/MIT-LICENSE.txt b/3rdparty/fullcalendar/MIT-LICENSE.txt deleted file mode 100644 index 46d47544964..00000000000 --- a/3rdparty/fullcalendar/MIT-LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2009 Adam Shaw - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/3rdparty/fullcalendar/changelog.txt b/3rdparty/fullcalendar/changelog.txt deleted file mode 100644 index 50d0880fd7a..00000000000 --- a/3rdparty/fullcalendar/changelog.txt +++ /dev/null @@ -1,313 +0,0 @@ - -version 1.5.2 (8/21/11) - - correctly process UTC "Z" ISO8601 date strings (issue 750) - -version 1.5.1 (4/9/11) - - more flexible ISO8601 date parsing (issue 814) - - more flexible parsing of UNIX timestamps (issue 826) - - FullCalendar now buildable from source on a Mac (issue 795) - - FullCalendar QA'd in FF4 (issue 883) - - upgraded to jQuery 1.5.2 (which supports IE9) and jQuery UI 1.8.11 - -version 1.5 (3/19/11) - - slicker default styling for buttons - - reworked a lot of the calendar's HTML and accompanying CSS - (solves issues 327 and 395) - - more printer-friendly (fullcalendar-print.css) - - fullcalendar now inherits styles from jquery-ui themes differently. - styles for buttons are distinct from styles for calendar cells. - (solves issue 299) - - can now color events through FullCalendar options and Event-Object properties (issue 117) - THIS IS NOW THE PREFERRED METHOD OF COLORING EVENTS (as opposed to using className and CSS) - - FullCalendar options: - - eventColor (changes both background and border) - - eventBackgroundColor - - eventBorderColor - - eventTextColor - - Event-Object options: - - color (changes both background and border) - - backgroundColor - - borderColor - - textColor - - can now specify an event source as an *object* with a `url` property (json feed) or - an `events` property (function or array) with additional properties that will - be applied to the entire event source: - - color (changes both background and border) - - backgroudColor - - borderColor - - textColor - - className - - editable - - allDayDefault - - ignoreTimezone - - startParam (for a feed) - - endParam (for a feed) - - ANY OF THE JQUERY $.ajax OPTIONS - allows for easily changing from GET to POST and sending additional parameters (issue 386) - allows for easily attaching ajax handlers such as `error` (issue 754) - allows for turning caching on (issue 355) - - Google Calendar feeds are now specified differently: - - specify a simple string of your feed's URL - - specify an *object* with a `url` property of your feed's URL. - you can include any of the new Event-Source options in this object. - - the old `$.fullCalendar.gcalFeed` method still works - - no more IE7 SSL popup (issue 504) - - remove `cacheParam` - use json event source `cache` option instead - - latest jquery/jquery-ui - -version 1.4.11 (2/22/11) - - fixed rerenderEvents bug (issue 790) - - fixed bug with faulty dragging of events from all-day slot in agenda views - - bundled with jquery 1.5 and jquery-ui 1.8.9 - -version 1.4.10 (1/2/11) - - fixed bug with resizing event to different week in 5-day month view (issue 740) - - fixed bug with events not sticking after a removeEvents call (issue 757) - - fixed bug with underlying parseTime method, and other uses of parseInt (issue 688) - -version 1.4.9 (11/16/10) - - new algorithm for vertically stacking events (issue 111) - - resizing an event to a different week (issue 306) - - bug: some events not rendered with consecutive calls to addEventSource (issue 679) - -version 1.4.8 (10/16/10) - - ignoreTimezone option (set to `false` to process UTC offsets in ISO8601 dates) - - bugfixes - - event refetching not being called under certain conditions (issues 417, 554) - - event refetching being called multiple times under certain conditions (issues 586, 616) - - selection cannot be triggered by right mouse button (issue 558) - - agenda view left axis sized incorrectly (issue 465) - - IE js error when calendar is too narrow (issue 517) - - agenda view looks strange when no scrollbars (issue 235) - - improved parsing of ISO8601 dates with UTC offsets - - $.fullCalendar.version - - an internal refactor of the code, for easier future development and modularity - -version 1.4.7 (7/5/10) - - "dropping" external objects onto the calendar - - droppable (boolean, to turn on/off) - - dropAccept (to filter which events the calendar will accept) - - drop (trigger) - - selectable options can now be specified with a View Option Hash - - bugfixes - - dragged & reverted events having wrong time text (issue 406) - - bug rendering events that have an endtime with seconds, but no hours/minutes (issue 477) - - gotoDate date overflow bug (issue 429) - - wrong date reported when clicking on edge of last column in agenda views (412) - - support newlines in event titles - - select/unselect callbacks now passes native js event - -version 1.4.6 (5/31/10) - - "selecting" days or timeslots - - options: selectable, selectHelper, unselectAuto, unselectCancel - - callbacks: select, unselect - - methods: select, unselect - - when dragging an event, the highlighting reflects the duration of the event - - code compressing by Google Closure Compiler - - bundled with jQuery 1.4.2 and jQuery UI 1.8.1 - -version 1.4.5 (2/21/10) - - lazyFetching option, which can force the calendar to fetch events on every view/date change - - scroll state of agenda views are preserved when switching back to view - - bugfixes - - calling methods on an uninitialized fullcalendar throws error - - IE6/7 bug where an entire view becomes invisible (issue 320) - - error when rendering a hidden calendar (in jquery ui tabs for example) in IE (issue 340) - - interconnected bugs related to calendar resizing and scrollbars - - when switching views or clicking prev/next, calendar would "blink" (issue 333) - - liquid-width calendar's events shifted (depending on initial height of browser) (issue 341) - - more robust underlying algorithm for calendar resizing - -version 1.4.4 (2/3/10) - - optimized event rendering in all views (events render in 1/10 the time) - - gotoDate() does not force the calendar to unnecessarily rerender - - render() method now correctly readjusts height - -version 1.4.3 (12/22/09) - - added destroy method - - Google Calendar event pages respect currentTimezone - - caching now handled by jQuery's ajax - - protection from setting aspectRatio to zero - - bugfixes - - parseISO8601 and DST caused certain events to display day before - - button positioning problem in IE6 - - ajax event source removed after recently being added, events still displayed - - event not displayed when end is an empty string - - dynamically setting calendar height when no events have been fetched, throws error - -version 1.4.2 (12/02/09) - - eventAfterRender trigger - - getDate & getView methods - - height & contentHeight options (explicitly sets the pixel height) - - minTime & maxTime options (restricts shown hours in agenda view) - - getters [for all options] and setters [for height, contentHeight, and aspectRatio ONLY! stay tuned..] - - render method now readjusts calendar's size - - bugfixes - - lightbox scripts that use iframes (like fancybox) - - day-of-week classNames were off when firstDay=1 - - guaranteed space on right side of agenda events (even when stacked) - - accepts ISO8601 dates with a space (instead of 'T') - -version 1.4.1 (10/31/09) - - can exclude weekends with new 'weekends' option - - gcal feed 'currentTimezone' option - - bugfixes - - year/month/date option sometimes wouldn't set correctly (depending on current date) - - daylight savings issue caused agenda views to start at 1am (for BST users) - - cleanup of gcal.js code - -version 1.4 (10/19/09) - - agendaWeek and agendaDay views - - added some options for agenda views: - - allDaySlot - - allDayText - - firstHour - - slotMinutes - - defaultEventMinutes - - axisFormat - - modified some existing options/triggers to work with agenda views: - - dragOpacity and timeFormat can now accept a "View Hash" (a new concept) - - dayClick now has an allDay parameter - - eventDrop now has an an allDay parameter - (this will affect those who use revertFunc, adjust parameter list) - - added 'prevYear' and 'nextYear' for buttons in header - - minor change for theme users, ui-state-hover not applied to active/inactive buttons - - added event-color-changing example in docs - - better defaults for right-to-left themed button icons - -version 1.3.2 (10/13/09) - - Bugfixes (please upgrade from 1.3.1!) - - squashed potential infinite loop when addMonths and addDays - is called with an invalid date - - $.fullCalendar.parseDate() now correctly parses IETF format - - when switching views, the 'today' button sticks inactive, fixed - - gotoDate now can accept a single Date argument - - documentation for changes in 1.3.1 and 1.3.2 now on website - -version 1.3.1 (9/30/09) - - Important Bugfixes (please upgrade from 1.3!) - - When current date was late in the month, for long months, and prev/next buttons - were clicked in month-view, some months would be skipped/repeated - - In certain time zones, daylight savings time would cause certain days - to be misnumbered in month-view - - Subtle change in way week interval is chosen when switching from month to basicWeek/basicDay view - - Added 'allDayDefault' option - - Added 'changeView' and 'render' methods - -version 1.3 (9/21/09) - - different 'views': month/basicWeek/basicDay - - more flexible 'header' system for buttons - - themable by jQuery UI themes - - resizable events (require jQuery UI resizable plugin) - - rescoped & rewritten CSS, enhanced default look - - cleaner css & rendering techniques for right-to-left - - reworked options & API to support multiple views / be consistent with jQuery UI - - refactoring of entire codebase - - broken into different JS & CSS files, assembled w/ build scripts - - new test suite for new features, uses firebug-lite - - refactored docs - - Options - + date - + defaultView - + aspectRatio - + disableResizing - + monthNames (use instead of $.fullCalendar.monthNames) - + monthNamesShort (use instead of $.fullCalendar.monthAbbrevs) - + dayNames (use instead of $.fullCalendar.dayNames) - + dayNamesShort (use instead of $.fullCalendar.dayAbbrevs) - + theme - + buttonText - + buttonIcons - x draggable -> editable/disableDragging - x fixedWeeks -> weekMode - x abbrevDayHeadings -> columnFormat - x buttons/title -> header - x eventDragOpacity -> dragOpacity - x eventRevertDuration -> dragRevertDuration - x weekStart -> firstDay - x rightToLeft -> isRTL - x showTime (use 'allDay' CalEvent property instead) - - Triggered Actions - + eventResizeStart - + eventResizeStop - + eventResize - x monthDisplay -> viewDisplay - x resize -> windowResize - 'eventDrop' params changed, can revert if ajax cuts out - - CalEvent Properties - x showTime -> allDay - x draggable -> editable - 'end' is now INCLUSIVE when allDay=true - 'url' now produces a real tag, more native clicking/tab behavior - - Methods: - + renderEvent - x prevMonth -> prev - x nextMonth -> next - x prevYear/nextYear -> moveDate - x refresh -> rerenderEvents/refetchEvents - x removeEvent -> removeEvents - x getEventsByID -> clientEvents - - Utilities: - 'formatDate' format string completely changed (inspired by jQuery UI datepicker + datejs) - 'formatDates' added to support date-ranges - - Google Calendar Options: - x draggable -> editable - - Bugfixes - - gcal extension fetched 25 results max, now fetches all - -version 1.2.1 (6/29/09) - - bugfixes - - allows and corrects invalid end dates for events - - doesn't throw an error in IE while rendering when display:none - - fixed 'loading' callback when used w/ multiple addEventSource calls - - gcal className can now be an array - -version 1.2 (5/31/09) - - expanded API - - 'className' CalEvent attribute - - 'source' CalEvent attribute - - dynamically get/add/remove/update events of current month - - locale improvements: change month/day name text - - better date formatting ($.fullCalendar.formatDate) - - multiple 'event sources' allowed - - dynamically add/remove event sources - - options for prevYear and nextYear buttons - - docs have been reworked (include addition of Google Calendar docs) - - changed behavior of parseDate for number strings - (now interpets as unix timestamp, not MS times) - - bugfixes - - rightToLeft month start bug - - off-by-one errors with month formatting commands - - events from previous months sticking when clicking prev/next quickly - - Google Calendar API changed to work w/ multiple event sources - - can also provide 'className' and 'draggable' options - - date utilties moved from $ to $.fullCalendar - - more documentation in source code - - minified version of fullcalendar.js - - test suit (available from svn) - - top buttons now use
From d17eba19c1dc2be936cd00747e6cead33c19e59a Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 19 Apr 2012 17:42:15 +0200 Subject: [PATCH 7/9] fix image viewer --- apps/files_imageviewer/js/lightbox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_imageviewer/js/lightbox.js b/apps/files_imageviewer/js/lightbox.js index 6c97466e6d6..c0f569de351 100644 --- a/apps/files_imageviewer/js/lightbox.js +++ b/apps/files_imageviewer/js/lightbox.js @@ -18,7 +18,7 @@ $(document).ready(function() { }); function viewImage(dir, file) { - if(file.indexOf('.psd')){//can't view those + if(file.indexOf('.psd')>0){//can't view those return; } var location=OC.filePath('files','ajax','download.php')+'?files='+file+'&dir='+dir; From 8f2e9caf962e51105b94232b0120705bf2d31e1c Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Sun, 22 Apr 2012 22:58:48 +0200 Subject: [PATCH 8/9] Contacts: Tipsyfied photo toolbar. --- apps/contacts/js/contacts.js | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js index 45b2fe130e2..f03ae1e46d6 100644 --- a/apps/contacts/js/contacts.js +++ b/apps/contacts/js/contacts.js @@ -1084,6 +1084,7 @@ Contacts={ } }, loadPhotoHandlers:function(){ + $('#phototools li a').tipsy(); $('#contacts_details_photo_wrapper').hover( function () { $('#phototools').slideDown(200); From 82ba2151d176e7e0e1ebcfde8de6db46f651dad4 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Mon, 23 Apr 2012 10:51:25 +0200 Subject: [PATCH 9/9] Wrong app check. --- apps/contacts/import.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/contacts/import.php b/apps/contacts/import.php index 04cfc397d56..233ed5be22f 100644 --- a/apps/contacts/import.php +++ b/apps/contacts/import.php @@ -9,7 +9,7 @@ ob_start(); require_once ('../../lib/base.php'); OC_JSON::checkLoggedIn(); -OC_Util::checkAppEnabled('calendar'); +OC_Util::checkAppEnabled('contacts'); $nl = "\n"; $progressfile = 'import_tmp/' . md5(session_id()) . '.txt'; if(is_writable('import_tmp/')){