summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/admin_migrate/templates/settings.php6
-rw-r--r--apps/bookmarks/templates/bookmarklet.php2
-rw-r--r--apps/calendar/ajax/changeview.php4
-rw-r--r--apps/calendar/ajax/event/delete.php7
-rw-r--r--apps/calendar/ajax/event/edit.form.php26
-rw-r--r--apps/calendar/ajax/event/edit.php21
-rw-r--r--apps/calendar/ajax/event/move.php9
-rw-r--r--apps/calendar/ajax/event/new.form.php1
-rw-r--r--apps/calendar/ajax/event/resize.php10
-rwxr-xr-xapps/calendar/ajax/events.php99
-rw-r--r--apps/calendar/ajax/import/import.php131
-rw-r--r--apps/calendar/ajax/share/activation.php12
-rw-r--r--apps/calendar/ajax/share/changepermission.php2
-rw-r--r--apps/calendar/ajax/share/share.php10
-rw-r--r--apps/calendar/ajax/share/unshare.php5
-rw-r--r--apps/calendar/appinfo/app.php5
-rw-r--r--apps/calendar/appinfo/database.xml102
-rw-r--r--apps/calendar/appinfo/version2
-rw-r--r--apps/calendar/css/style.css6
-rw-r--r--apps/calendar/export.php4
-rw-r--r--apps/calendar/import.php130
-rw-r--r--apps/calendar/index.php4
-rw-r--r--apps/calendar/js/calendar.js107
-rw-r--r--apps/calendar/js/loader.js2
-rw-r--r--apps/calendar/lib/alarm.php13
-rw-r--r--apps/calendar/lib/app.php339
-rw-r--r--apps/calendar/lib/attendees.php13
-rw-r--r--apps/calendar/lib/object.php32
-rw-r--r--apps/calendar/lib/share.php259
-rw-r--r--apps/calendar/resettimezone.php4
-rw-r--r--apps/calendar/share.php23
-rw-r--r--apps/calendar/templates/part.choosecalendar.php28
-rw-r--r--apps/calendar/templates/part.choosecalendar.rowfields.php10
-rw-r--r--apps/calendar/templates/part.choosecalendar.rowfields.shared.php4
-rw-r--r--apps/calendar/templates/part.editevent.php4
-rw-r--r--apps/calendar/templates/part.eventform.php71
-rw-r--r--apps/calendar/templates/part.import.php4
-rw-r--r--apps/calendar/templates/part.showevent.php247
-rw-r--r--apps/calendar/templates/settings.php4
-rw-r--r--apps/calendar/templates/share.dropdown.php77
-rw-r--r--apps/contacts/ajax/savecrop.php13
-rw-r--r--apps/contacts/css/contacts.css14
-rw-r--r--apps/contacts/img/contact-new.svg449
-rw-r--r--apps/contacts/js/contacts.js19
-rw-r--r--apps/contacts/js/jquery.multi-autocomplete.js4
-rw-r--r--apps/contacts/templates/index.php10
-rw-r--r--apps/contacts/templates/settings.php4
-rw-r--r--apps/files/templates/admin.php10
-rw-r--r--apps/media/templates/settings.php2
-rw-r--r--apps/remoteStorage/templates/settings.php2
-rw-r--r--apps/user_migrate/templates/admin.php2
51 files changed, 1933 insertions, 435 deletions
diff --git a/apps/admin_migrate/templates/settings.php b/apps/admin_migrate/templates/settings.php
index 91e305074e4..f81c9199ece 100644
--- a/apps/admin_migrate/templates/settings.php
+++ b/apps/admin_migrate/templates/settings.php
@@ -6,9 +6,9 @@
</p>
<h3>What would you like to export?</h3>
<p>
- <input type="radio" name="export_type" value="instance" /> ownCloud instance (suitable for import )<br />
- <input type="radio" name="export_type" value="system" /> ownCloud system files<br />
- <input type="radio" name="export_type" value="userfiles" /> Just user files<br />
+ <input type="radio" name="export_type" value="instance" style="width:20px;" /> ownCloud instance (suitable for import )<br />
+ <input type="radio" name="export_type" value="system" style="width:20px;" /> ownCloud system files<br />
+ <input type="radio" name="export_type" value="userfiles" style="width:20px;" /> Just user files<br />
<input type="submit" name="admin_export" value="<?php echo $l->t('Export'); ?>" />
</fieldset>
</form>
diff --git a/apps/bookmarks/templates/bookmarklet.php b/apps/bookmarks/templates/bookmarklet.php
index f7074462a79..a2ca0bba0e3 100644
--- a/apps/bookmarks/templates/bookmarklet.php
+++ b/apps/bookmarks/templates/bookmarklet.php
@@ -3,6 +3,6 @@
function createBookmarklet() {
$l = OC_L10N::get('bookmarks');
echo '<small>' . $l->t('Drag this to your browser bookmarks and click it, when you want to bookmark a webpage quickly:') . '</small>'
- . '<a class="bookmarklet" href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open(\'' . OC_Helper::linkToAbsolute('bookmarks', 'addBm.php') . '?output=popup&url=\'+c(b.location),\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=230px,width=230px,resizable=1,alwaysRaised=1\');a.setTimeout(function(){d.focus()},300);})();">'
+ . '<a class="button bookmarklet" href="javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open(\'' . OC_Helper::linkToAbsolute('bookmarks', 'addBm.php') . '?output=popup&url=\'+c(b.location),\'bkmk_popup\',\'left=\'+((a.screenX||a.screenLeft)+10)+\',top=\'+((a.screenY||a.screenTop)+10)+\',height=230px,width=230px,resizable=1,alwaysRaised=1\');a.setTimeout(function(){d.focus()},300);})();">'
. $l->t('Read later') . '</a>';
}
diff --git a/apps/calendar/ajax/changeview.php b/apps/calendar/ajax/changeview.php
index 707c8c59ebf..736a5625530 100644
--- a/apps/calendar/ajax/changeview.php
+++ b/apps/calendar/ajax/changeview.php
@@ -1,12 +1,10 @@
<?php
/**
- * Copyright (c) 2011 Georg Ehrke <ownclouddev at georgswebsite dot de>
+ * Copyright (c) 2012 Georg Ehrke <ownclouddev at georgswebsite dot de>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
*/
-
-
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$view = $_GET['v'];
diff --git a/apps/calendar/ajax/event/delete.php b/apps/calendar/ajax/event/delete.php
index 49b740656de..3b726651641 100644
--- a/apps/calendar/ajax/event/delete.php
+++ b/apps/calendar/ajax/event/delete.php
@@ -11,7 +11,10 @@ OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$id = $_POST['id'];
-$event_object = OC_Calendar_App::getEventObject($id);
+$access = OC_Calendar_App::getaccess($id, OC_Calendar_App::EVENT);
+if($access != 'owner' && $access != 'rw'){
+ OC_JSON::error(array('message'=>'permission denied'));
+ exit;
+}
$result = OC_Calendar_Object::delete($id);
OC_JSON::success();
-?>
diff --git a/apps/calendar/ajax/event/edit.form.php b/apps/calendar/ajax/event/edit.form.php
index 1634e7ea416..ec50b78be6f 100644
--- a/apps/calendar/ajax/event/edit.form.php
+++ b/apps/calendar/ajax/event/edit.form.php
@@ -14,7 +14,13 @@ if(!OC_USER::isLoggedIn()) {
OC_JSON::checkAppEnabled('calendar');
$id = $_GET['id'];
-$data = OC_Calendar_App::getEventObject($id);
+$data = OC_Calendar_App::getEventObject($id, true, true);
+
+if(!$data){
+ OC_JSON::error(array('data' => array('message' => self::$l10n->t('Wrong calendar'))));
+ exit;
+}
+$access = OC_Calendar_App::getaccess($id, OC_Calendar_Share::EVENT);
$object = OC_VObject::parse($data['calendardata']);
$vevent = $object->VEVENT;
@@ -182,8 +188,12 @@ if($data['repeating'] == 1){
}else{
$repeat['repeat'] = 'doesnotrepeat';
}
-
-$calendar_options = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
+if($access == 'owner'){
+ $calendar_options = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
+}else{
+ $calendar_options = array(OC_Calendar_App::getCalendar($data['calendarid'], false));
+}
+$category_options = OC_Calendar_App::getCategoryOptions();
$repeat_options = OC_Calendar_App::getRepeatOptions();
$repeat_end_options = OC_Calendar_App::getEndOptions();
$repeat_month_options = OC_Calendar_App::getMonthOptions();
@@ -195,8 +205,14 @@ $repeat_bymonth_options = OC_Calendar_App::getByMonthOptions();
$repeat_byweekno_options = OC_Calendar_App::getByWeekNoOptions();
$repeat_bymonthday_options = OC_Calendar_App::getByMonthDayOptions();
-$tmpl = new OC_Template('calendar', 'part.editevent');
-$tmpl->assign('id', $id);
+if($access == 'owner' || $access == 'rw'){
+ $tmpl = new OC_Template('calendar', 'part.editevent');
+}elseif($access == 'r'){
+ $tmpl = new OC_Template('calendar', 'part.showevent');
+}
+
+$tmpl->assign('eventid', $id);
+$tmpl->assign('access', $access);
$tmpl->assign('lastmodified', $lastmodified);
$tmpl->assign('calendar_options', $calendar_options);
$tmpl->assign('repeat_options', $repeat_options);
diff --git a/apps/calendar/ajax/event/edit.php b/apps/calendar/ajax/event/edit.php
index 53912cb4c93..172488f6241 100644
--- a/apps/calendar/ajax/event/edit.php
+++ b/apps/calendar/ajax/event/edit.php
@@ -10,21 +10,34 @@
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
+$id = $_POST['id'];
+
+if(!array_key_exists('calendar', $_POST)){
+ $cal = OC_Calendar_Object::getCalendarid($id);
+ $_POST['calendar'] = $cal;
+}else{
+ $cal = $_POST['calendar'];
+}
+
+$access = OC_Calendar_App::getaccess($id, OC_Calendar_App::EVENT);
+if($access != 'owner' && $access != 'rw'){
+ OC_JSON::error(array('message'=>'permission denied'));
+ exit;
+}
+
$errarr = OC_Calendar_Object::validateRequest($_POST);
if($errarr){
//show validate errors
OC_JSON::error($errarr);
exit;
}else{
- $id = $_POST['id'];
- $cal = $_POST['calendar'];
- $data = OC_Calendar_App::getEventObject($id);
+ $data = OC_Calendar_App::getEventObject($id, false, false);
$vcalendar = OC_VObject::parse($data['calendardata']);
OC_Calendar_App::isNotModified($vcalendar->VEVENT, $_POST['lastmodified']);
OC_Calendar_Object::updateVCalendarFromRequest($_POST, $vcalendar);
- $result = OC_Calendar_Object::edit($id, $vcalendar->serialize());
+ OC_Calendar_Object::edit($id, $vcalendar->serialize());
if ($data['calendarid'] != $cal) {
OC_Calendar_Object::moveToCalendar($id, $cal);
}
diff --git a/apps/calendar/ajax/event/move.php b/apps/calendar/ajax/event/move.php
index bfebefb8fe0..0552c7bbc5b 100644
--- a/apps/calendar/ajax/event/move.php
+++ b/apps/calendar/ajax/event/move.php
@@ -9,15 +9,18 @@
OC_JSON::checkLoggedIn();
$id = $_POST['id'];
-
-$vcalendar = OC_Calendar_App::getVCalendar($id);
+$access = OC_Calendar_App::getaccess($id, OC_Calendar_App::EVENT);
+if($access != 'owner' && $access != 'rw'){
+ OC_JSON::error(array('message'=>'permission denied'));
+ exit;
+}
+$vcalendar = OC_Calendar_App::getVCalendar($id, false, false);
$vevent = $vcalendar->VEVENT;
$allday = $_POST['allDay'];
$delta = new DateInterval('P0D');
$delta->d = $_POST['dayDelta'];
$delta->i = $_POST['minuteDelta'];
-
OC_Calendar_App::isNotModified($vevent, $_POST['lastmodified']);
$dtstart = $vevent->DTSTART;
diff --git a/apps/calendar/ajax/event/new.form.php b/apps/calendar/ajax/event/new.form.php
index 2e03c02af27..62087e9a817 100644
--- a/apps/calendar/ajax/event/new.form.php
+++ b/apps/calendar/ajax/event/new.form.php
@@ -44,6 +44,7 @@ $repeat_byweekno_options = OC_Calendar_App::getByWeekNoOptions();
$repeat_bymonthday_options = OC_Calendar_App::getByMonthDayOptions();
$tmpl = new OC_Template('calendar', 'part.newevent');
+$tmpl->assign('access', 'owner');
$tmpl->assign('calendar_options', $calendar_options);
$tmpl->assign('repeat_options', $repeat_options);
$tmpl->assign('repeat_month_options', $repeat_month_options);
diff --git a/apps/calendar/ajax/event/resize.php b/apps/calendar/ajax/event/resize.php
index 9a9d37ff3d4..593835d86c5 100644
--- a/apps/calendar/ajax/event/resize.php
+++ b/apps/calendar/ajax/event/resize.php
@@ -10,7 +10,13 @@ OC_JSON::checkLoggedIn();
$id = $_POST['id'];
-$vcalendar = OC_Calendar_App::getVCalendar($id);
+$access = OC_Calendar_App::getaccess($id, OC_Calendar_App::EVENT);
+if($access != 'owner' && $access != 'rw'){
+ OC_JSON::error(array('message'=>'permission denied'));
+ exit;
+}
+
+$vcalendar = OC_Calendar_App::getVCalendar($id, false, false);
$vevent = $vcalendar->VEVENT;
$delta = new DateInterval('P0D');
@@ -27,6 +33,6 @@ unset($vevent->DURATION);
$vevent->setDateTime('LAST-MODIFIED', 'now', Sabre_VObject_Element_DateTime::UTC);
$vevent->setDateTime('DTSTAMP', 'now', Sabre_VObject_Element_DateTime::UTC);
-$result = OC_Calendar_Object::edit($id, $vcalendar->serialize());
+OC_Calendar_Object::edit($id, $vcalendar->serialize());
$lastmodified = $vevent->__get('LAST-MODIFIED')->getDateTime();
OC_JSON::success(array('lastmodified'=>(int)$lastmodified->format('U')));
diff --git a/apps/calendar/ajax/events.php b/apps/calendar/ajax/events.php
index 0cfee0dbdc1..3aa487fd231 100755
--- a/apps/calendar/ajax/events.php
+++ b/apps/calendar/ajax/events.php
@@ -1,6 +1,6 @@
<?php
/**
- * Copyright (c) 2011 Georg Ehrke <ownclouddev at georgswebsite dot de>
+ * Copyright (c) 2011, 2012 Georg Ehrke <ownclouddev at georgswebsite dot de>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
@@ -8,102 +8,19 @@
require_once('when/When.php');
-$l = OC_L10N::get('calendar');
-$unnamed = $l->t('unnamed');
-function create_return_event($event, $vevent){
- $return_event = array();
- global $unnamed;
- $return_event['id'] = (int)$event['id'];
- $return_event['title'] = htmlspecialchars(($event['summary']!=NULL || $event['summary'] != '')?$event['summary']: $unnamed);
- $return_event['description'] = isset($vevent->DESCRIPTION)?htmlspecialchars($vevent->DESCRIPTION->value):'';
- $last_modified = $vevent->__get('LAST-MODIFIED');
- if ($last_modified){
- $lastmodified = $last_modified->getDateTime()->format('U');
- }else{
- $lastmodified = 0;
- }
- $return_event['lastmodified'] = (int)$lastmodified;
- return $return_event;
-}
OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
-if(version_compare(PHP_VERSION, '5.3.0', '>=')){
- $start = DateTime::createFromFormat('U', $_GET['start']);
- $end = DateTime::createFromFormat('U', $_GET['end']);
-}else{
- $start = new DateTime('@' . $_GET['start']);
- $end = new DateTime('@' . $_GET['end']);
-}
+$start = (version_compare(PHP_VERSION, '5.3.0', '>='))?DateTime::createFromFormat('U', $_GET['start']):new DateTime('@' . $_GET['start']);
+$end = (version_compare(PHP_VERSION, '5.3.0', '>='))?DateTime::createFromFormat('U', $_GET['end']):new DateTime('@' . $_GET['end']);
-$calendar_id = $_GET['calendar_id'];
-if (is_numeric($calendar_id)) {
- $calendar = OC_Calendar_App::getCalendar($calendar_id);
- OC_Response::enableCaching(0);
- OC_Response::setETagHeader($calendar['ctag']);
- $events = OC_Calendar_Object::allInPeriod($calendar_id, $start, $end);
-} else {
- $events = array();
- OC_Hook::emit('OC_Calendar', 'getEvents', array('calendar_id' => $calendar_id, 'events' => &$events));
-}
+$events = OC_Calendar_App::getrequestedEvents($_GET['calendar_id'], $start, $end);
-$user_timezone = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
-$return = array();
+$output = array();
foreach($events as $event){
- if (isset($event['calendardata'])) {
- $object = OC_VObject::parse($event['calendardata']);
- $vevent = $object->VEVENT;
- } else {
- $vevent = $event['vevent'];
- }
-
- $return_event = create_return_event($event, $vevent);
-
- $dtstart = $vevent->DTSTART;
- $start_dt = $dtstart->getDateTime();
- $dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
- $end_dt = $dtend->getDateTime();
- if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE){
- $return_event['allDay'] = true;
- }else{
- $return_event['allDay'] = false;
- $start_dt->setTimezone(new DateTimeZone($user_timezone));
- $end_dt->setTimezone(new DateTimeZone($user_timezone));
- }
-
- //Repeating Events
- if($event['repeating'] == 1){
- $duration = (double) $end_dt->format('U') - (double) $start_dt->format('U');
- $r = new When();
- $r->recur($start_dt)->rrule((string) $vevent->RRULE);
- while($result = $r->next()){
- if($result < $start){
- continue;
- }
- if($result > $end){
- break;
- }
- if($return_event['allDay'] == true){
- $return_event['start'] = $result->format('Y-m-d');
- $return_event['end'] = date('Y-m-d', $result->format('U') + --$duration);
- }else{
- $return_event['start'] = $result->format('Y-m-d H:i:s');
- $return_event['end'] = date('Y-m-d H:i:s', $result->format('U') + $duration);
- }
- $return[] = $return_event;
- }
- }else{
- if($return_event['allDay'] == true){
- $return_event['start'] = $start_dt->format('Y-m-d');
- $end_dt->modify('-1 sec');
- $return_event['end'] = $end_dt->format('Y-m-d');
- }else{
- $return_event['start'] = $start_dt->format('Y-m-d H:i:s');
- $return_event['end'] = $end_dt->format('Y-m-d H:i:s');
- }
- $return[] = $return_event;
- }
+ $output[] = OC_Calendar_App::generateEventOutput($event, $start, $end);
+
}
-OC_JSON::encodedPrint($return);
+OC_JSON::encodedPrint($output);
?>
diff --git a/apps/calendar/ajax/import/import.php b/apps/calendar/ajax/import/import.php
index 95294948f75..5848cac448d 100644
--- a/apps/calendar/ajax/import/import.php
+++ b/apps/calendar/ajax/import/import.php
@@ -7,11 +7,11 @@
*/
//check for calendar rights or create new one
ob_start();
-
OC_JSON::checkLoggedIn();
OC_Util::checkAppEnabled('calendar');
-$nl = "\n\r";
-$progressfile = OC::$APPSROOT . '/apps/calendar/import_tmp/' . md5(session_id()) . '.txt';
+$nl="\r\n";
+$comps = array('VEVENT'=>true, 'VTODO'=>true, 'VJOURNAL'=>true);
+$progressfile = 'import_tmp/' . md5(session_id()) . '.txt';
if(is_writable('import_tmp/')){
$progressfopen = fopen($progressfile, 'w');
fwrite($progressfopen, '10');
@@ -29,85 +29,94 @@ if($_POST['method'] == 'new'){
}
$id = $_POST['id'];
}
-//analyse the calendar file
if(is_writable('import_tmp/')){
$progressfopen = fopen($progressfile, 'w');
fwrite($progressfopen, '20');
fclose($progressfopen);
}
-$searchfor = array('VEVENT', 'VTODO', 'VJOURNAL');
-$parts = $searchfor;
-$filearr = explode($nl, $file);
-$inelement = false;
-$parts = array();
+// normalize the newlines
+$file = str_replace(array("\r","\n\n"), array("\n","\n"), $file);
+$lines = explode("\n", $file);
+unset($file);
+if(is_writable('import_tmp/')){
+ $progressfopen = fopen($progressfile, 'w');
+ fwrite($progressfopen, '30');
+ fclose($progressfopen);
+}
+// analyze the file, group components by uid, and keep refs to originating calendar object
+// $cals is array calendar objects, keys are 1st line# $cal, ie array( $cal => $caldata )
+// $caldata is array( 'first' => 1st component line#, 'last' => last comp line#, 'end' => end line# )
+// $caldata is used to create prefix/suffix strings when building import text
+// $uids is array of component arrays, keys are $uid, ie array( $uid => array( $beginlineno => $component ) )
+// $component is array( 'end' => end line#, 'cal'=> $cal )
+$comp=$uid=$cal=false;
+$cals=$uids=array();
$i = 0;
-foreach($filearr as $line){
- foreach($searchfor as $search){
- if(substr_count($line, $search) == 1){
- list($attr, $val) = explode(':', $line);
- if($attr == 'BEGIN'){
- $parts[]['begin'] = $i;
- $inelement = true;
+foreach($lines as $line) {
+
+ if(strpos($line, ':')!==false) {
+ list($attr, $val) = explode(':', strtoupper($line));
+ if ($attr == 'BEGIN' && $val == 'VCALENDAR') {
+ $cal = $i;
+ $cals[$cal] = array('first'=>$i,'last'=>$i,'end'=>$i);
+ } elseif ($attr =='BEGIN' && $cal!==false && isset($comps[$val])) {
+ $comp = $val;
+ $beginNo = $i;
+ } elseif ($attr == 'END' && $cal!==false && $val == 'VCALENDAR') {
+ if($comp!==false) {
+ unset($cals[$cal]); // corrupt calendar, unset it
+ } else {
+ $cals[$cal]['end'] = $i;
+ }
+ $comp=$uid=$cal=false; // reset calendar
+ } elseif ($attr == 'END' && $comp!==false && $val == $comp) {
+ if(! $uid) {
+ $uid = OC_Calendar_Object::createUID();
}
- if($attr == 'END'){
- $parts[count($parts) - 1]['end'] = $i;
- $inelement = false;
+ $uids[$uid][$beginNo] = array('end'=>$i, 'cal'=>$cal);
+ if ($cals[$cal]['first'] == $cal) {
+ $cals[$cal]['first'] = $beginNo;
}
+ $cals[$cal]['last'] = $i;
+ $comp=$uid=false; // reset component
+ } elseif ($attr =="UID" && $comp!==false) {
+ list($attr, $uid) = explode(':', $line);
}
}
$i++;
}
-//import the calendar
+// import the calendar
if(is_writable('import_tmp/')){
$progressfopen = fopen($progressfile, 'w');
- fwrite($progressfopen, '40');
+ fwrite($progressfopen, '60');
fclose($progressfopen);
}
-$start = '';
-for ($i = 0; $i < $parts[0]['begin']; $i++) {
- if($i == 0){
- $start = $filearr[0];
- }else{
- $start .= $nl . $filearr[$i];
- }
-}
-$end = '';
-for($i = $parts[count($parts) - 1]['end'] + 1;$i <= count($filearr) - 1; $i++){
- if($i == $parts[count($parts) - 1]['end'] + 1){
- $end = $filearr[$parts[count($parts) - 1]['end'] + 1];
- }else{
- $end .= $nl . $filearr[$i];
- }
-}
-if(is_writable('import_tmp/')){
- $progressfopen = fopen($progressfile, 'w');
- fwrite($progressfopen, '50');
- fclose($progressfopen);
-}
-$importready = array();
-foreach($parts as $part){
- for($i = $part['begin']; $i <= $part['end'];$i++){
- if($i == $part['begin']){
- $content = $filearr[$i];
- }else{
- $content .= $nl . $filearr[$i];
+foreach($uids as $uid) {
+
+ $prefix=$suffix=$content=array();
+ foreach($uid as $begin=>$details) {
+
+ $cal = $details['cal'];
+ if(!isset($cals[$cal])) {
+ continue; // from corrupt/incomplete calendar
+ }
+ $cdata = $cals[$cal];
+ // if we have multiple components from different calendar objects,
+ // we should really merge their elements (enhancement?) -- 1st one wins for now.
+ if(! count($prefix)) {
+ $prefix = array_slice($lines, $cal, $cdata['first'] - $cal);
}
+ if(! count($suffix)) {
+ $suffix = array_slice($lines, $cdata['last']+1, $cdata['end'] - $cdata['last']);
+ }
+ $content = array_merge($content, array_slice($lines, $begin, $details['end'] - $begin + 1));
}
- $importready[] = $start . $nl . $content . $nl . $end;
-}
-if(is_writable('import_tmp/')){
- $progressfopen = fopen($progressfile, 'w');
- fwrite($progressfopen, '70');
- fclose($progressfopen);
-}
-if(count($parts) == 1){
- OC_Calendar_Object::add($id, $file);
-}else{
- foreach($importready as $import){
+ if(count($content)) {
+ $import = join($nl, array_merge($prefix, $content, $suffix)) . $nl;
OC_Calendar_Object::add($id, $import);
}
}
-//done the import
+// finished import
if(is_writable('import_tmp/')){
$progressfopen = fopen($progressfile, 'w');
fwrite($progressfopen, '100');
diff --git a/apps/calendar/ajax/share/activation.php b/apps/calendar/ajax/share/activation.php
new file mode 100644
index 00000000000..a4a3ce48192
--- /dev/null
+++ b/apps/calendar/ajax/share/activation.php
@@ -0,0 +1,12 @@
+<?php
+/**
+ * Copyright (c) 2012 Georg Ehrke <ownclouddev@georgswebsite.de>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+require_once('../../../../lib/base.php');
+$id = strip_tags($_GET['id']);
+$activation = strip_tags($_GET['activation']);
+OC_Calendar_Share::set_active(OC_User::getUser(), $id, $activation);
+OC_JSON::success(); \ No newline at end of file
diff --git a/apps/calendar/ajax/share/changepermission.php b/apps/calendar/ajax/share/changepermission.php
index 5538637eab4..faf2a13c56b 100644
--- a/apps/calendar/ajax/share/changepermission.php
+++ b/apps/calendar/ajax/share/changepermission.php
@@ -36,5 +36,5 @@ if($sharetype == 'group' && !OC_Group::groupExists($sharewith)){
OC_JSON::error(array('message'=>'group not found'));
exit;
}
-$success = OC_Calendar_Share::changepermission($sharewith, $sharetype, $id, $permission, (($idtype=='calendar') ? OC_Calendar_Share::CALENDAR : OC_Calendar_Share::Event));
+$success = OC_Calendar_Share::changepermission($sharewith, $sharetype, $id, $permission, (($idtype=='calendar') ? OC_Calendar_Share::CALENDAR : OC_Calendar_Share::EVENT));
OC_JSON::success(); \ No newline at end of file
diff --git a/apps/calendar/ajax/share/share.php b/apps/calendar/ajax/share/share.php
index 88885cd7c10..70f1ec26ae6 100644
--- a/apps/calendar/ajax/share/share.php
+++ b/apps/calendar/ajax/share/share.php
@@ -16,6 +16,14 @@ switch($idtype){
OC_JSON::error(array('message'=>'unexspected parameter'));
exit;
}
+if($idtype == 'calendar' && !OC_Calendar_App::getCalendar($id)){
+ OC_JSON::error(array('message'=>'permission denied'));
+ exit;
+}
+if($idtype == 'event' && !OC_Calendar_App::getEventObject($id)){
+ OC_JSON::error(array('message'=>'permission denied'));
+ exit;
+}
$sharewith = $_GET['sharewith'];
$sharetype = strip_tags($_GET['sharetype']);
switch($sharetype){
@@ -38,7 +46,7 @@ if($sharetype == 'group' && !OC_Group::groupExists($sharewith)){
if($sharetype == 'user' && OC_User::getUser() == $sharewith){
OC_JSON::error(array('meesage'=>'you can not share with yourself'));
}
-$success = OC_Calendar_Share::share(OC_User::getUser(), $sharewith, $sharetype, $id, (($idtype=='calendar') ? OC_Calendar_Share::CALENDAR : OC_Calendar_Share::Event));
+$success = OC_Calendar_Share::share(OC_User::getUser(), $sharewith, $sharetype, $id, (($idtype=='calendar') ? OC_Calendar_Share::CALENDAR : OC_Calendar_Share::EVENT));
if($success){
if($sharetype == 'public'){
OC_JSON::success(array('message'=>$success));
diff --git a/apps/calendar/ajax/share/unshare.php b/apps/calendar/ajax/share/unshare.php
index 97ef7ab2cb0..c68fc23a6cb 100644
--- a/apps/calendar/ajax/share/unshare.php
+++ b/apps/calendar/ajax/share/unshare.php
@@ -30,12 +30,11 @@ switch($sharetype){
if($sharetype == 'user' && !OC_User::userExists($sharewith)){
OC_JSON::error(array('message'=>'user not found'));
exit;
-}
-if($sharetype == 'group' && !OC_Group::groupExists($sharewith)){
+}elseif($sharetype == 'group' && !OC_Group::groupExists($sharewith)){
OC_JSON::error(array('message'=>'group not found'));
exit;
}
-$success = OC_Calendar_Share::unshare(OC_User::getUser(), $sharewith, $sharetype, $id, (($idtype=='calendar') ? OC_Calendar_Share::CALENDAR : OC_Calendar_Share::Event));
+$success = OC_Calendar_Share::unshare(OC_User::getUser(), $sharewith, $sharetype, $id, (($idtype=='calendar') ? OC_Calendar_Share::CALENDAR : OC_Calendar_Share::EVENT));
if($success){
OC_JSON::success();
}else{
diff --git a/apps/calendar/appinfo/app.php b/apps/calendar/appinfo/app.php
index ea743674fe8..21d128e7b8a 100644
--- a/apps/calendar/appinfo/app.php
+++ b/apps/calendar/appinfo/app.php
@@ -5,9 +5,12 @@ OC::$CLASSPATH['OC_Calendar_Calendar'] = 'apps/calendar/lib/calendar.php';
OC::$CLASSPATH['OC_Calendar_Object'] = 'apps/calendar/lib/object.php';
OC::$CLASSPATH['OC_Calendar_Hooks'] = 'apps/calendar/lib/hooks.php';
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV'] = 'apps/calendar/lib/connector_sabre.php';
+OC::$CLASSPATH['OC_Calendar_Share'] = 'apps/calendar/lib/share.php';
OC::$CLASSPATH['OC_Search_Provider_Calendar'] = 'apps/calendar/lib/search.php';
OC_HOOK::connect('OC_User', 'post_deleteUser', 'OC_Calendar_Hooks', 'deleteUser');
OC_Util::addScript('calendar','loader');
+OC_Util::addScript("3rdparty", "chosen/chosen.jquery.min");
+OC_Util::addStyle("3rdparty", "chosen/chosen");
OC_App::register( array(
'order' => 10,
'id' => 'calendar',
@@ -19,4 +22,4 @@ OC_App::addNavigationEntry( array(
'icon' => OC_Helper::imagePath( 'calendar', 'icon.svg' ),
'name' => $l->t('Calendar')));
OC_App::registerPersonal('calendar', 'settings');
-OC_Search::registerProvider('OC_Search_Provider_Calendar');
+OC_Search::registerProvider('OC_Search_Provider_Calendar'); \ No newline at end of file
diff --git a/apps/calendar/appinfo/database.xml b/apps/calendar/appinfo/database.xml
index 7f7b6457559..b065ab3f94a 100644
--- a/apps/calendar/appinfo/database.xml
+++ b/apps/calendar/appinfo/database.xml
@@ -187,5 +187,107 @@
</declaration>
</table>
+
+ <table>
+
+ <name>*dbprefix*calendar_share_event</name>
+
+ <declaration>
+
+ <field>
+ <name>owner</name>
+ <type>text</type>
+ <notnull>true</notnull>
+ <length>255</length>
+ </field>
+
+ <field>
+ <name>share</name>
+ <type>text</type>
+ <notnull>true</notnull>
+ <length>255</length>
+ </field>
+
+ <field>
+ <name>sharetype</name>
+ <type>text</type>
+ <notnull>true</notnull>
+ <length>6</length>
+ </field>
+
+ <field>
+ <name>eventid</name>
+ <type>integer</type>
+ <default></default>
+ <notnull>true</notnull>
+ <unsigned>true</unsigned>
+ <length>11</length>
+ </field>
+
+ <field>
+ <name>permissions</name>
+ <type>integer</type>
+ <notnull>true</notnull>
+ <length>1</length>
+ </field>
+
+ </declaration>
+
+ </table>
+
+ <table>
+
+ <name>*dbprefix*calendar_share_calendar</name>
+
+ <declaration>
+
+ <field>
+ <name>owner</name>
+ <type>text</type>
+ <notnull>true</notnull>
+ <length>255</length>
+ </field>
+
+ <field>
+ <name>share</name>
+ <type>text</type>
+ <notnull>true</notnull>
+ <length>255</length>
+ </field>
+
+ <field>
+ <name>sharetype</name>
+ <type>text</type>
+ <notnull>true</notnull>
+ <length>6</length>
+ </field>
+
+ <field>
+ <name>calendarid</name>
+ <type>integer</type>
+ <default></default>
+ <notnull>true</notnull>
+ <unsigned>true</unsigned>
+ <length>11</length>
+ </field>
+
+ <field>
+ <name>permissions</name>
+ <type>integer</type>
+ <notnull>true</notnull>
+ <length>1</length>
+ </field>
+ <field>
+ <name>active</name>
+ <type>integer</type>
+ <default>1</default>
+ <notnull>true</notnull>
+ <length>4</length>
+ </field>
+
+ </declaration>
+
+ </table>
+
</database>
diff --git a/apps/calendar/appinfo/version b/apps/calendar/appinfo/version
index 7dff5b89211..1d71ef97443 100644
--- a/apps/calendar/appinfo/version
+++ b/apps/calendar/appinfo/version
@@ -1 +1 @@
-0.2.1 \ No newline at end of file
+0.3 \ No newline at end of file
diff --git a/apps/calendar/css/style.css b/apps/calendar/css/style.css
index cffaf356402..373a4565638 100644
--- a/apps/calendar/css/style.css
+++ b/apps/calendar/css/style.css
@@ -56,6 +56,12 @@ button.category{margin:0 3px;}
.calendar-colorpicker-color{display:inline-block;width:20px;height:20px;margin-right:2px;cursor:pointer;border:2px solid transparent;}
.calendar-colorpicker-color.active{border:2px solid black;}
+#event {padding: 0;margin: 0;margin-top:-5px}
+
+.calendar_share_dropdown{ display:block; position:absolute; z-index:100; width:16em; right:0; margin-right:7em; background:#F8F8F8; padding:1em;
+-moz-box-shadow:0 1px 1px #777; -webkit-box-shadow:0 1px 1px #777; box-shadow:0 1px 1px #777;
+-moz-border-radius:0 0 1em 1em; -webkit-border-radius:0 0 1em 1em; border-radius:0 0 1em 1em;}
+
.fc-list-table
{
margin: 10px;
diff --git a/apps/calendar/export.php b/apps/calendar/export.php
index bf0503defbc..0972ee0f788 100644
--- a/apps/calendar/export.php
+++ b/apps/calendar/export.php
@@ -13,7 +13,7 @@ $cal = isset($_GET['calid']) ? $_GET['calid'] : NULL;
$event = isset($_GET['eventid']) ? $_GET['eventid'] : NULL;
$nl = "\r\n";
if(isset($cal)){
- $calendar = OC_Calendar_App::getCalendar($cal);
+ $calendar = OC_Calendar_App::getCalendar($cal, true);
$calobjects = OC_Calendar_Object::all($cal);
header('Content-Type: text/Calendar');
header('Content-Disposition: inline; filename=' . $calendar['displayname'] . '.ics');
@@ -21,7 +21,7 @@ if(isset($cal)){
echo $calobject['calendardata'] . $nl;
}
}elseif(isset($event)){
- $data = OC_Calendar_App::getEventObject($_GET['eventid']);
+ $data = OC_Calendar_App::getEventObject($_GET['eventid'], true);
$calendarid = $data['calendarid'];
$calendar = OC_Calendar_App::getCalendar($calendarid);
header('Content-Type: text/Calendar');
diff --git a/apps/calendar/import.php b/apps/calendar/import.php
deleted file mode 100644
index 9494ed89fca..00000000000
--- a/apps/calendar/import.php
+++ /dev/null
@@ -1,130 +0,0 @@
-<?php
-/**
- * Copyright (c) 2012 Georg Ehrke <ownclouddev at georgswebsite dot de>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-//check for calendar rights or create new one
-ob_start();
-
-OC_JSON::checkLoggedIn();
-OC_Util::checkAppEnabled('calendar');
-$nl="\r\n";
-$comps = array('VEVENT'=>true, 'VTODO'=>true, 'VJOURNAL'=>true);
-$progressfile = 'import_tmp/' . md5(session_id()) . '.txt';
-if(is_writable('import_tmp/')){
- $progressfopen = fopen($progressfile, 'w');
- fwrite($progressfopen, '10');
- fclose($progressfopen);
-}
-$file = OC_Filesystem::file_get_contents($_POST['path'] . '/' . $_POST['file']);
-if($_POST['method'] == 'new'){
- $id = OC_Calendar_Calendar::addCalendar(OC_User::getUser(), $_POST['calname']);
- OC_Calendar_Calendar::setCalendarActive($id, 1);
-}else{
- $calendar = OC_Calendar_App::getCalendar($_POST['id']);
- if($calendar['userid'] != OC_USER::getUser()){
- OC_JSON::error();
- exit();
- }
- $id = $_POST['id'];
-}
-if(is_writable('import_tmp/')){
- $progressfopen = fopen($progressfile, 'w');
- fwrite($progressfopen, '20');
- fclose($progressfopen);
-}
-// normalize the newlines
-$file = str_replace(array("\r","\n\n"), array("\n","\n"), $file);
-$lines = explode("\n", $file);
-unset($file);
-if(is_writable('import_tmp/')){
- $progressfopen = fopen($progressfile, 'w');
- fwrite($progressfopen, '30');
- fclose($progressfopen);
-}
-// analyze the file, group components by uid, and keep refs to originating calendar object
-// $cals is array calendar objects, keys are 1st line# $cal, ie array( $cal => $caldata )
-// $caldata is array( 'first' => 1st component line#, 'last' => last comp line#, 'end' => end line# )
-// $caldata is used to create prefix/suffix strings when building import text
-// $uids is array of component arrays, keys are $uid, ie array( $uid => array( $beginlineno => $component ) )
-// $component is array( 'end' => end line#, 'cal'=> $cal )
-$comp=$uid=$cal=false;
-$cals=$uids=array();
-$i = 0;
-foreach($lines as $line) {
-
- if(strpos($line, ':')!==false) {
- list($attr, $val) = explode(':', strtoupper($line));
- if ($attr == 'BEGIN' && $val == 'VCALENDAR') {
- $cal = $i;
- $cals[$cal] = array('first'=>$i,'last'=>$i,'end'=>$i);
- } elseif ($attr =='BEGIN' && $cal!==false && isset($comps[$val])) {
- $comp = $val;
- $beginNo = $i;
- } elseif ($attr == 'END' && $cal!==false && $val == 'VCALENDAR') {
- if($comp!==false) {
- unset($cals[$cal]); // corrupt calendar, unset it
- } else {
- $cals[$cal]['end'] = $i;
- }
- $comp=$uid=$cal=false; // reset calendar
- } elseif ($attr == 'END' && $comp!==false && $val == $comp) {
- if(! $uid) {
- $uid = OC_Calendar_Object::createUID();
- }
- $uids[$uid][$beginNo] = array('end'=>$i, 'cal'=>$cal);
- if ($cals[$cal]['first'] == $cal) {
- $cals[$cal]['first'] = $beginNo;
- }
- $cals[$cal]['last'] = $i;
- $comp=$uid=false; // reset component
- } elseif ($attr =="UID" && $comp!==false) {
- list($attr, $uid) = explode(':', $line);
- }
- }
- $i++;
-}
-// import the calendar
-if(is_writable('import_tmp/')){
- $progressfopen = fopen($progressfile, 'w');
- fwrite($progressfopen, '60');
- fclose($progressfopen);
-}
-foreach($uids as $uid) {
-
- $prefix=$suffix=$content=array();
- foreach($uid as $begin=>$details) {
-
- $cal = $details['cal'];
- if(!isset($cals[$cal])) {
- continue; // from corrupt/incomplete calendar
- }
- $cdata = $cals[$cal];
- // if we have multiple components from different calendar objects,
- // we should really merge their elements (enhancement?) -- 1st one wins for now.
- if(! count($prefix)) {
- $prefix = array_slice($lines, $cal, $cdata['first'] - $cal);
- }
- if(! count($suffix)) {
- $suffix = array_slice($lines, $cdata['last']+1, $cdata['end'] - $cdata['last']);
- }
- $content = array_merge($content, array_slice($lines, $begin, $details['end'] - $begin + 1));
- }
- if(count($content)) {
- $import = join($nl, array_merge($prefix, $content, $suffix)) . $nl;
- OC_Calendar_Object::add($id, $import);
- }
-}
-// finished import
-if(is_writable('import_tmp/')){
- $progressfopen = fopen($progressfile, 'w');
- fwrite($progressfopen, '100');
- fclose($progressfopen);
-}
-sleep(3);
-if(is_writable('import_tmp/')){
- unlink($progressfile);
-}
-OC_JSON::success(); \ No newline at end of file
diff --git a/apps/calendar/index.php b/apps/calendar/index.php
index 4aa1f695e31..66f51c97226 100644
--- a/apps/calendar/index.php
+++ b/apps/calendar/index.php
@@ -21,6 +21,10 @@ $eventSources = array();
foreach($calendars as $calendar){
$eventSources[] = OC_Calendar_Calendar::getEventSourceInfo($calendar);
}
+
+$eventSources[] = array('url' => 'ajax/events.php?calendar_id=shared_rw', 'backgroundColor' => '#1D2D44', 'borderColor' => '#888', 'textColor' => 'white', 'editable'=>'true');
+$eventSources[] = array('url' => 'ajax/events.php?calendar_id=shared_r', 'backgroundColor' => '#1D2D44', 'borderColor' => '#888', 'textColor' => 'white', 'editable' => 'false');
+
OC_Hook::emit('OC_Calendar', 'getSources', array('sources' => &$eventSources));
$categories = OC_Calendar_App::getCategoryOptions();
diff --git a/apps/calendar/js/calendar.js b/apps/calendar/js/calendar.js
index 858990fb89d..a16856938ce 100644
--- a/apps/calendar/js/calendar.js
+++ b/apps/calendar/js/calendar.js
@@ -46,6 +46,7 @@ Calendar={
$('#advanced_month').change(function(){
Calendar.UI.repeat('month');
});
+ $( "#event" ).tabs({ selected: 0});
$('#event').dialog({
width : 500,
close : function(event, ui) {
@@ -455,7 +456,7 @@ Calendar={
$('#calendar_holder').fullCalendar('removeEventSource', data.eventSource.url);
$('#calendar_holder').fullCalendar('addEventSource', data.eventSource);
if (calendarid == 'new'){
- $('#choosecalendar_dialog > table').append('<tr><td colspan="6"><a href="#" onclick="Calendar.UI.Calendar.newCalendar(this);"><input type="button" value="' + newcalendar + '"></a></td></tr>');
+ $('#choosecalendar_dialog > table:first').append('<tr><td colspan="6"><a href="#" onclick="Calendar.UI.Calendar.newCalendar(this);"><input type="button" value="' + newcalendar + '"></a></td></tr>');
}
}else{
$("#displayname_"+calendarid).css('background-color', '#FF2626');
@@ -494,6 +495,109 @@ Calendar={
left: -10000
});
}
+ },
+ Share:{
+ currentid: 'false',
+ idtype: '',
+ activation:function(object,owner,id){
+ $.getJSON(OC.filePath('calendar', 'ajax/share', 'activation.php'),{id:id, idtype:'calendar', activation:object.checked?1:0});
+ $('#calendar_holder').fullCalendar('refetchEvents');
+ },
+ dropdown:function(userid, calid){
+ $('.calendar_share_dropdown').remove();
+ $('<div class="calendar_share_dropdown"></div>').appendTo('#'+userid+'_'+calid);
+ $.get(OC.filePath('calendar', 'ajax/share', 'dropdown.php') + '?calid=' + calid, function(data){
+ $('#'+userid+'_'+calid+' > .calendar_share_dropdown').html(data);
+ $('#'+userid+'_'+calid+' > .calendar_share_dropdown').show('blind');
+ $('#share_user').chosen();
+ $('#share_group').chosen();
+ });
+ Calendar.UI.Share.currentid = calid;
+ Calendar.UI.Share.idtype = 'calendar';
+ },
+ share:function(id, idtype, sharewith, sharetype){
+ $.getJSON(OC.filePath('calendar', 'ajax/share', 'share.php'),{id:id, idtype:idtype, sharewith:sharewith, sharetype:sharetype}, function(data){
+
+ });
+ },
+ unshare:function(id, idtype, sharewith, sharetype){
+ $.getJSON(OC.filePath('calendar', 'ajax/share', 'unshare.php'),{id:id, idtype:idtype, sharewith:sharewith, sharetype:sharetype}, function(){
+ if(sharetype == 'public'){
+ $('#public_token').val('');
+ $('#public_token').css('display', 'none');
+ }
+ });
+ },
+ changepermission:function(id, idtype, sharewith, sharetype, permission){
+ $.getJSON(OC.filePath('calendar', 'ajax/share', 'changepermission.php'),{id:id, idtype:idtype, sharewith: sharewith, sharetype:sharetype, permission: (permission?1:0)});
+ },
+ init:function(){
+ $('.calendar_share_dropdown').live('mouseleave', function(){
+ $('.calendar_share_dropdown').hide('blind', function(){
+ $('.calendar_share_dropdown').remove();
+ });
+ });
+ $('#share_user').live('change', function(){
+ if($('#sharewithuser_' + $('#share_user option:selected').text()).length == 0){
+ Calendar.UI.Share.share(Calendar.UI.Share.currentid, Calendar.UI.Share.idtype, $('#share_user option:selected').text(), 'user');
+ var newitem = '<li id="sharewithuser_' + $('#share_user option:selected').text() +'"><input type="checkbox" width="12px" style="visibility:hidden;" title="' + $('#share_user option:selected').text() + '">' + $('#share_user option:selected').text() + '<img src="/owncloud/core/img/actions/delete.svg" class="svg action" style="display:none;float:right;"></li>';
+ $('#sharewithuser_list').append(newitem);
+ $('#sharewithuser_' + $('#share_user option:selected').text() + ' > img').click(function(){
+ $('#share_user option[value="' + $(this).parent().text() + '"]').removeAttr('disabled');
+ Calendar.UI.Share.unshare(Calendar.UI.Share.currentid, Calendar.UI.Share.idtype, $(this).parent().text(), 'user' );
+ $("#share_user").trigger("liszt:updated");
+ $(this).parent().remove();
+ });
+ $('#share_user option:selected').attr('disabled', 'disabled');
+ $("#share_user").trigger("liszt:updated");
+ }
+ });
+ $('#share_group').live('change', function(){
+ if($('#sharewithgroup_' + $('#share_group option:selected').text()).length == 0){
+ Calendar.UI.Share.share(Calendar.UI.Share.currentid, Calendar.UI.Share.idtype, $('#share_group option:selected').text(), 'group');
+ var newitem = '<li id="sharewithgroup_' + $('#share_group option:selected').text() +'"><input type="checkbox" width="12px" style="visibility:hidden;" title="' + $('#share_group option:selected').text() + '">' + $('#share_group option:selected').text() + '<img src="/owncloud/core/img/actions/delete.svg" class="svg action" style="display:none;float:right;"></li>';
+ $('#sharewithgroup_list').append(newitem);
+ $('#sharewithgroup_' + $('#share_group option:selected').text() + ' > img').click(function(){
+ $('#share_group option[value="' + $(this).parent().text() + '"]').removeAttr('disabled');
+ Calendar.UI.Share.unshare(Calendar.UI.Share.currentid, Calendar.UI.Share.idtype, $(this).parent().text(), 'group');
+ $("#share_group").trigger("liszt:updated");
+ $(this).parent().remove();
+ });
+ $('#share_group option:selected').attr('disabled', 'disabled');
+ $("#share_group").trigger("liszt:updated");
+ }
+ });
+ $('#sharewithuser_list > li > input:checkbox').live('change', function(){
+ Calendar.UI.Share.changepermission(Calendar.UI.Share.currentid, Calendar.UI.Share.idtype, $(this).parent().text(), 'user', this.checked);
+ });
+ $('#sharewithgroup_list > li > input:checkbox').live('change', function(){
+ Calendar.UI.Share.changepermission(Calendar.UI.Share.currentid, Calendar.UI.Share.idtype, $(this).parent().text(), 'group', this.checked);
+ });
+ $('#publish').live('change', function(){
+ if(this.checked == 1){
+ Calendar.UI.Share.share(Calendar.UI.Share.currentid, Calendar.UI.Share.idtype, '', 'public');
+ }else{
+ Calendar.UI.Share.unshare(Calendar.UI.Share.currentid, Calendar.UI.Share.idtype, '', 'public');
+ }
+ });
+ $('#sharewithuser_list').live('mouseenter', function(){
+ $('#sharewithuser_list > li > img').css('display', 'block');
+ $('#sharewithuser_list > li > input').css('visibility', 'visible');
+ });
+ $('#sharewithuser_list').live('mouseleave', function(){
+ $('#sharewithuser_list > li > img').css('display', 'none');
+ $('#sharewithuser_list > li > input').css('visibility', 'hidden');
+ });
+ $('#sharewithgroup_list').live('mouseenter', function(){
+ $('#sharewithgroup_list > li > img').css('display', 'block');
+ $('#sharewithgroup_list > li > input').css('visibility', 'visible');
+ });
+ $('#sharewithgroup_list').live('mouseleave', function(){
+ $('#sharewithgroup_list > li > img').css('display', 'none');
+ $('#sharewithgroup_list > li > input').css('visibility', 'hidden');
+ });
+ /*var permissions = (this.checked) ? 1 : 0;*/
+ }
}
}
}
@@ -749,4 +853,5 @@ $(document).ready(function(){
$('#datecontrol_right').click(function(){
$('#calendar_holder').fullCalendar('next');
});
+ Calendar.UI.Share.init();
});
diff --git a/apps/calendar/js/loader.js b/apps/calendar/js/loader.js
index 54003879759..60d92f448ee 100644
--- a/apps/calendar/js/loader.js
+++ b/apps/calendar/js/loader.js
@@ -44,7 +44,7 @@ Calendar_Import={
$('#newcalendar').attr('readonly', 'readonly');
$('#calendar').attr('disabled', 'disabled');
var progressfile = $('#progressfile').val();
- $.post(OC.filePath('calendar', '', 'import.php'), {method: String (method), calname: String (calname), path: String (path), file: String (filename), id: String (calid)}, function(data){
+ $.post(OC.filePath('calendar', 'ajax/import', 'import.php'), {method: String (method), calname: String (calname), path: String (path), file: String (filename), id: String (calid)}, function(data){
if(data.status == 'success'){
$('#progressbar').progressbar('option', 'value', 100);
$('#import_done').css('display', 'block');
diff --git a/apps/calendar/lib/alarm.php b/apps/calendar/lib/alarm.php
new file mode 100644
index 00000000000..a71cc086827
--- /dev/null
+++ b/apps/calendar/lib/alarm.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Copyright (c) 2012 Georg Ehrke <ownclouddev@georgswebsite.de>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+/*
+ * This class manages reminders for calendars
+ */
+class OC_Calendar_Alarm{
+
+} \ No newline at end of file
diff --git a/apps/calendar/lib/app.php b/apps/calendar/lib/app.php
index 4b481a4f286..3ce0d6fa1d4 100644
--- a/apps/calendar/lib/app.php
+++ b/apps/calendar/lib/app.php
@@ -1,60 +1,121 @@
<?php
/**
* Copyright (c) 2011 Bart Visscher <bartv@thisnet.nl>
+ * Copyright (c) 2012 Georg Ehrke <georg@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or
* later.
* See the COPYING-README file.
- */
-
-/**
+ *
* This class manages our app actions
*/
-OC_Calendar_App::$l10n = OC_L10N::get('calendar');
+OC_Calendar_App::$l10n = new OC_L10N('calendar');
+OC_Calendar_App::$tz = OC_Preferences::getValue(OC_USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
class OC_Calendar_App{
+ const CALENDAR = 'calendar';
+ const EVENT = 'event';
+ /*
+ * @brief language object for calendar app
+ */
public static $l10n;
+
+ /*
+ * @brief categories of the user
+ */
protected static $categories = null;
- public static function getCalendar($id){
- $calendar = OC_Calendar_Calendar::find( $id );
- if( $calendar === false || $calendar['userid'] != OC_User::getUser()){
- OC_JSON::error(array('data' => array('message' => self::$l10n->t('Wrong calendar'))));
- exit();
+ /*
+ * @brief timezone of the user
+ */
+ public static $tz;
+
+ /*
+ * @brief returns informations about a calendar
+ * @param int $id - id of the calendar
+ * @param bool $security - check access rights or not
+ * @param bool $shared - check if the user got access via sharing
+ * @return mixed - bool / array
+ */
+ public static function getCalendar($id, $security = true, $shared = false){
+ $calendar = OC_Calendar_Calendar::find($id);
+ if($shared === true){
+ if(OC_Calendar_Share::check_access(OC_User::getUser(), $id, OC_Calendar_Share::CALENDAR)){
+ return $calendar;
+ }
+ }
+ if($security === true){
+ if($calendar['userid'] != OC_User::getUser()){
+ return false;
+ }
}
- return $calendar;
+ if($calendar === false){
+ return false;
+ }
+ return OC_Calendar_Calendar::find($id);
}
-
- public static function getEventObject($id){
- $event_object = OC_Calendar_Object::find( $id );
- if( $event_object === false ){
- OC_JSON::error();
- exit();
+
+ /*
+ * @brief returns informations about an event
+ * @param int $id - id of the event
+ * @param bool $security - check access rights or not
+ * @param bool $shared - check if the user got access via sharing
+ * @return mixed - bool / array
+ */
+ public static function getEventObject($id, $security = true, $shared = false){
+ $event = OC_Calendar_Object::find($id);
+ if($shared === true){
+ if(OC_Calendar_Share::check_access(OC_User::getUser(), $id, OC_Calendar_Share::EVENT)){
+ return $event;
+ }
}
-
- self::getCalendar( $event_object['calendarid'] );//access check
- return $event_object;
+ if($security === true){
+ $calendar = self::getCalendar($event['calendarid'], false);
+ if($calendar['userid'] != OC_User::getUser()){
+ return false;
+ }
+ }
+ if($event === false){
+ return false;
+ }
+ return $event;
}
-
- public static function getVCalendar($id){
- $event_object = self::getEventObject( $id );
-
- $vcalendar = OC_VObject::parse($event_object['calendardata']);
- // Check if the vcalendar is valid
- if(is_null($vcalendar)){
- OC_JSON::error();
- exit();
+
+ /*
+ * @brief returns the parsed calendar data
+ * @param int $id - id of the event
+ * @param bool $security - check access rights or not
+ * @return mixed - bool / object
+ */
+ public static function getVCalendar($id, $security = true, $shared = false){
+ $event_object = self::getEventObject($id, $security, $shared);
+ if($event_object === false){
+ return false;
+ }
+ $vobject = OC_VObject::parse($event_object['calendardata']);
+ if(is_null($vobject)){
+ return false;
}
- return $vcalendar;
+ return $vobject;
}
-
- public static function isNotModified($vevent, $lastmodified)
- {
+
+ /*
+ * @brief checks if an event was edited and dies if it was
+ * @param (object) $vevent - vevent object of the event
+ * @param (int) $lastmodified - time of last modification as unix timestamp
+ * @return (bool)
+ */
+ public static function isNotModified($vevent, $lastmodified){
$last_modified = $vevent->__get('LAST-MODIFIED');
if($last_modified && $lastmodified != $last_modified->getDateTime()->format('U')){
OC_JSON::error(array('modified'=>true));
exit;
}
+ return true;
}
-
+
+ /*
+ * @brief returns the default categories of ownCloud
+ * @return (array) $categories
+ */
protected static function getDefaultCategories()
{
return array(
@@ -75,14 +136,22 @@ class OC_Calendar_App{
self::$l10n->t('Work'),
);
}
-
+
+ /*
+ * @brief returns the vcategories object of the user
+ * @return (object) $vcategories
+ */
protected static function getVCategories() {
if (is_null(self::$categories)) {
self::$categories = new OC_VCategories('calendar', null, self::getDefaultCategories());
}
return self::$categories;
}
-
+
+ /*
+ * @brief returns the categories of the vcategories object
+ * @return (array) $categories
+ */
public static function getCategoryOptions()
{
$categories = self::getVCategories()->categories();
@@ -127,40 +196,226 @@ class OC_Calendar_App{
public static function getRepeatOptions(){
return OC_Calendar_Object::getRepeatOptions(self::$l10n);
}
-
+
+ /*
+ * @brief returns the options for the end of an repeating event
+ * @return array - valid inputs for the end of an repeating events
+ */
public static function getEndOptions(){
return OC_Calendar_Object::getEndOptions(self::$l10n);
}
-
+
+ /*
+ * @brief returns the options for an monthly repeating event
+ * @return array - valid inputs for monthly repeating events
+ */
public static function getMonthOptions(){
return OC_Calendar_Object::getMonthOptions(self::$l10n);
}
-
+
+ /*
+ * @brief returns the options for an weekly repeating event
+ * @return array - valid inputs for weekly repeating events
+ */
public static function getWeeklyOptions(){
return OC_Calendar_Object::getWeeklyOptions(self::$l10n);
}
-
+
+ /*
+ * @brief returns the options for an yearly repeating event
+ * @return array - valid inputs for yearly repeating events
+ */
public static function getYearOptions(){
return OC_Calendar_Object::getYearOptions(self::$l10n);
}
-
+
+ /*
+ * @brief returns the options for an yearly repeating event which occurs on specific days of the year
+ * @return array - valid inputs for yearly repeating events
+ */
public static function getByYearDayOptions(){
return OC_Calendar_Object::getByYearDayOptions();
}
-
+
+ /*
+ * @brief returns the options for an yearly repeating event which occurs on specific month of the year
+ * @return array - valid inputs for yearly repeating events
+ */
public static function getByMonthOptions(){
return OC_Calendar_Object::getByMonthOptions(self::$l10n);
}
+ /*
+ * @brief returns the options for an yearly repeating event which occurs on specific week numbers of the year
+ * @return array - valid inputs for yearly repeating events
+ */
public static function getByWeekNoOptions(){
return OC_Calendar_Object::getByWeekNoOptions();
}
-
+
+ /*
+ * @brief returns the options for an yearly or monthly repeating event which occurs on specific days of the month
+ * @return array - valid inputs for yearly or monthly repeating events
+ */
public static function getByMonthDayOptions(){
return OC_Calendar_Object::getByMonthDayOptions();
}
+ /*
+ * @brief returns the options for an monthly repeating event which occurs on specific weeks of the month
+ * @return array - valid inputs for monthly repeating events
+ */
public static function getWeekofMonth(){
return OC_Calendar_Object::getWeekofMonth(self::$l10n);
}
+
+ /*
+ * @brief checks the access for a calendar / an event
+ * @param (int) $id - id of the calendar / event
+ * @param (string) $type - type of the id (calendar/event)
+ * @return (string) $access - level of access
+ */
+ public static function getaccess($id, $type){
+ if($type == self::CALENDAR){
+ $calendar = self::getCalendar($id, false, false);
+ if($calendar['userid'] == OC_User::getUser()){
+ return 'owner';
+ }
+ $isshared = OC_Calendar_Share::check_access(OC_User::getUser(), $id, OC_Calendar_Share::CALENDAR);
+ if($isshared){
+ $writeaccess = OC_Calendar_Share::is_editing_allowed(OC_User::getUser(), $id, OC_Calendar_Share::CALENDAR);
+ if($writeaccess){
+ return 'rw';
+ }else{
+ return 'r';
+ }
+ }else{
+ return false;
+ }
+ }elseif($type == self::EVENT){
+ if(OC_Calendar_Object::getowner($id) == OC_User::getUser()){
+ return 'owner';
+ }
+ $isshared = OC_Calendar_Share::check_access(OC_User::getUser(), $id, OC_Calendar_Share::EVENT);
+ if($isshared){
+ $writeaccess = OC_Calendar_Share::is_editing_allowed(OC_User::getUser(), $id, OC_Calendar_Share::EVENT);
+ if($writeaccess){
+ return 'rw';
+ }else{
+ return 'r';
+ }
+ }else{
+ return false;
+ }
+ }
+ }
+
+ /*
+ * @brief analyses the parameter for calendar parameter and returns the objects
+ * @param (string) $calendarid - calendarid
+ * @param (int) $start - unixtimestamp of start
+ * @param (int) $end - unixtimestamp of end
+ * @return (array) $events
+ */
+ public static function getrequestedEvents($calendarid, $start, $end){
+ $events = array();
+ if($calendarid == 'shared_rw' || $_GET['calendar_id'] == 'shared_r'){
+ $calendars = OC_Calendar_Share::allSharedwithuser(OC_USER::getUser(), OC_Calendar_Share::CALENDAR, 1, ($_GET['calendar_id'] == 'shared_rw')?'rw':'r');
+ foreach($calendars as $calendar){
+ $calendarevents = OC_Calendar_Object::allInPeriod($calendar['calendarid'], $start, $end);
+ $events = array_merge($events, $calendarevents);
+ }
+ $singleevents = OC_Calendar_Share::allSharedwithuser(OC_USER::getUser(), OC_Calendar_Share::EVENT, 1, ($_GET['calendar_id'] == 'shared_rw')?'rw':'r');
+ foreach($singleevents as $singleevent){
+ $event = OC_Calendar_Object::find($singleevent['eventid']);
+ $events[] = $event;
+ }
+ }else{
+ $calendar_id = $_GET['calendar_id'];
+ if (is_numeric($calendar_id)) {
+ $calendar = self::getCalendar($calendar_id);
+ OC_Response::enableCaching(0);
+ OC_Response::setETagHeader($calendar['ctag']);
+ $events = OC_Calendar_Object::allInPeriod($calendar_id, $start, $end);
+ } else {
+ OC_Hook::emit('OC_Calendar', 'getEvents', array('calendar_id' => $calendar_id, 'events' => &$events));
+ }
+ }
+ return $events;
+ }
+
+ /*
+ * @brief generates the output for an event which will be readable for our js
+ * @param (mixed) $event - event object / array
+ * @param (int) $start - unixtimestamp of start
+ * @param (int) $end - unixtimestamp of end
+ * @return (array) $output - readable output
+ */
+ public static function generateEventOutput($event, $start, $end){
+ $output = array();
+
+ if(isset($event['calendardata'])){
+ $object = OC_VObject::parse($event['calendardata']);
+ $vevent = $object->VEVENT;
+ }else{
+ $vevent = $event['vevent'];
+ }
+
+ $last_modified = @$vevent->__get('LAST-MODIFIED');
+ $lastmodified = ($last_modified)?$last_modified->getDateTime()->format('U'):0;
+
+ $output = array('id'=>(int)$event['id'],
+ 'title' => htmlspecialchars(($event['summary']!=NULL || $event['summary'] != '')?$event['summary']: self::$l10n->t('unnamed')),
+ 'description' => isset($vevent->DESCRIPTION)?htmlspecialchars($vevent->DESCRIPTION->value):'',
+ 'lastmodified'=>$lastmodified);
+
+ $dtstart = $vevent->DTSTART;
+ $start_dt = $dtstart->getDateTime();
+ $dtend = OC_Calendar_Object::getDTEndFromVEvent($vevent);
+ $end_dt = $dtend->getDateTime();
+
+ if ($dtstart->getDateType() == Sabre_VObject_Element_DateTime::DATE){
+ $output['allDay'] = true;
+ }else{
+ $output['allDay'] = false;
+ $start_dt->setTimezone(new DateTimeZone(self::$tz));
+ $end_dt->setTimezone(new DateTimeZone(self::$tz));
+ }
+
+ if($event['repeating'] == 1){
+ $duration = (double) $end_dt->format('U') - (double) $start_dt->format('U');
+ $r = new When();
+ $r->recur($start_dt)->rrule((string) $vevent->RRULE);
+ /*$r = new iCal_Repeat_Generator(array('RECUR' => $start_dt,
+ * 'RRULE' => (string)$vevent->RRULE
+ * 'RDATE' => (string)$vevent->RDATE
+ * 'EXRULE' => (string)$vevent->EXRULE
+ * 'EXDATE' => (string)$vevent->EXDATE));*/
+ while($result = $r->next()){
+ if($result < $start){
+ continue;
+ }
+ if($result > $end){
+ break;
+ }
+ if($output['allDay'] == true){
+ $output['start'] = $result->format('Y-m-d');
+ $output['end'] = date('Y-m-d', $result->format('U') + --$duration);
+ }else{
+ $output['start'] = $result->format('Y-m-d H:i:s');
+ $output['end'] = date('Y-m-d H:i:s', $result->format('U') + $duration);
+ }
+ }
+ }else{
+ if($output['allDay'] == true){
+ $output['start'] = $start_dt->format('Y-m-d');
+ $end_dt->modify('-1 sec');
+ $output['end'] = $end_dt->format('Y-m-d');
+ }else{
+ $output['start'] = $start_dt->format('Y-m-d H:i:s');
+ $output['end'] = $end_dt->format('Y-m-d H:i:s');
+ }
+ }
+ return $output;
+ }
}
diff --git a/apps/calendar/lib/attendees.php b/apps/calendar/lib/attendees.php
new file mode 100644
index 00000000000..ac30e11b3be
--- /dev/null
+++ b/apps/calendar/lib/attendees.php
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Copyright (c) 2012 Georg Ehrke <ownclouddev@georgswebsite.de>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+/*
+ * This class manages Attendees for calendars
+ */
+class OC_Calendar_Attendees{
+
+} \ No newline at end of file
diff --git a/apps/calendar/lib/object.php b/apps/calendar/lib/object.php
index d5622f6251f..825977c17c5 100644
--- a/apps/calendar/lib/object.php
+++ b/apps/calendar/lib/object.php
@@ -104,7 +104,7 @@ class OC_Calendar_Object{
$uri = 'owncloud-'.md5($data.rand().time()).'.ics';
$stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*calendar_objects (calendarid,objecttype,startdate,enddate,repeating,summary,calendardata,uri,lastmodified) VALUES(?,?,?,?,?,?,?,?,?)' );
- $result = $stmt->execute(array($id,$type,$startdate,$enddate,$repeating,$summary,$data,$uri,time()));
+ $stmt->execute(array($id,$type,$startdate,$enddate,$repeating,$summary,$data,$uri,time()));
OC_Calendar_Calendar::touchCalendar($id);
@@ -123,7 +123,7 @@ class OC_Calendar_Object{
list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
$stmt = OC_DB::prepare( 'INSERT INTO *PREFIX*calendar_objects (calendarid,objecttype,startdate,enddate,repeating,summary,calendardata,uri,lastmodified) VALUES(?,?,?,?,?,?,?,?,?)' );
- $result = $stmt->execute(array($id,$type,$startdate,$enddate,$repeating,$summary,$data,$uri,time()));
+ $stmt->execute(array($id,$type,$startdate,$enddate,$repeating,$summary,$data,$uri,time()));
OC_Calendar_Calendar::touchCalendar($id);
@@ -144,7 +144,7 @@ class OC_Calendar_Object{
list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
$stmt = OC_DB::prepare( 'UPDATE *PREFIX*calendar_objects SET objecttype=?,startdate=?,enddate=?,repeating=?,summary=?,calendardata=?, lastmodified = ? WHERE id = ?' );
- $result = $stmt->execute(array($type,$startdate,$enddate,$repeating,$summary,$data,time(),$id));
+ $stmt->execute(array($type,$startdate,$enddate,$repeating,$summary,$data,time(),$id));
OC_Calendar_Calendar::touchCalendar($oldobject['calendarid']);
@@ -165,7 +165,7 @@ class OC_Calendar_Object{
list($type,$startdate,$enddate,$summary,$repeating,$uid) = self::extractData($object);
$stmt = OC_DB::prepare( 'UPDATE *PREFIX*calendar_objects SET objecttype=?,startdate=?,enddate=?,repeating=?,summary=?,calendardata=?, lastmodified = ? WHERE id = ?' );
- $result = $stmt->execute(array($type,$startdate,$enddate,$repeating,$summary,$data,time(),$oldobject['id']));
+ $stmt->execute(array($type,$startdate,$enddate,$repeating,$summary,$data,time(),$oldobject['id']));
OC_Calendar_Calendar::touchCalendar($oldobject['calendarid']);
@@ -202,7 +202,7 @@ class OC_Calendar_Object{
public static function moveToCalendar($id, $calendarid){
$stmt = OC_DB::prepare( 'UPDATE *PREFIX*calendar_objects SET calendarid=? WHERE id = ?' );
- $result = $stmt->execute(array($calendarid,$id));
+ $stmt->execute(array($calendarid,$id));
OC_Calendar_Calendar::touchCalendar($id);
@@ -432,11 +432,6 @@ class OC_Calendar_Object{
$errarr['title'] = 'true';
$errnum++;
}
- $calendar = OC_Calendar_Calendar::find($request['calendar']);
- if($calendar['userid'] != OC_User::getUser()){
- $errarr['cal'] = 'true';
- $errnum++;
- }
$fromday = substr($request['from'], 0, 2);
$frommonth = substr($request['from'], 3, 2);
@@ -461,11 +456,11 @@ class OC_Calendar_Object{
if($request['repeat'] != 'doesnotrepeat'){
if(is_nan($request['interval']) && $request['interval'] != ''){
$errarr['interval'] = 'true';
- $ernum++;
+ $errnum++;
}
if(array_key_exists('repeat', $request) && !array_key_exists($request['repeat'], self::getRepeatOptions(OC_Calendar_App::$l10n))){
$errarr['repeat'] = 'true';
- $ernum++;
+ $errnum++;
}
if(array_key_exists('advanced_month_select', $request) && !array_key_exists($request['advanced_month_select'], self::getMonthOptions(OC_Calendar_App::$l10n))){
$errarr['advanced_month_select'] = 'true';
@@ -760,8 +755,6 @@ class OC_Calendar_Object{
$vevent->setDateTime('DTSTAMP', 'now', Sabre_VObject_Element_DateTime::UTC);
$vevent->setString('SUMMARY', $title);
- $dtstart = new Sabre_VObject_Element_DateTime('DTSTART');
- $dtend = new Sabre_VObject_Element_DateTime('DTEND');
if($allday){
$start = new DateTime($from);
$end = new DateTime($to.' +1 day');
@@ -787,4 +780,15 @@ class OC_Calendar_Object{
return $vcalendar;
}
+
+ public static function getowner($id){
+ $event = self::find($id);
+ $cal = OC_Calendar_Calendar::find($event['calendarid']);
+ return $cal['userid'];
+ }
+
+ public static function getCalendarid($id){
+ $event = self::find($id);
+ return $event['calendarid'];
+ }
}
diff --git a/apps/calendar/lib/share.php b/apps/calendar/lib/share.php
new file mode 100644
index 00000000000..8f91be97474
--- /dev/null
+++ b/apps/calendar/lib/share.php
@@ -0,0 +1,259 @@
+<?php
+/**
+ * Copyright (c) 2012 Georg Ehrke <ownclouddev@georgswebsite.de>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+/*
+ * This class manages shared calendars
+ */
+class OC_Calendar_Share{
+ const CALENDAR = 'calendar';
+ const EVENT = 'event';
+ /*
+ * @brief: returns informations about all calendar or events which users are sharing with the user - userid
+ * @param: (string) $userid - id of the user
+ * @param: (string) $type - use const self::CALENDAR or self::EVENT
+ * @return: (array) $return - information about calendars
+ */
+ public static function allSharedwithuser($userid, $type, $active=null, $permission=null){
+ $group_where = self::group_sql(OC_Group::getUserGroups($userid));
+ $permission_where = self::permission_sql($permission);
+ if($type == self::CALENDAR){
+ $active_where = self::active_sql($active);
+ }else{
+ $active_where = '';
+ }
+ $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*calendar_share_' . $type . ' WHERE ((share = ? AND sharetype = "user") ' . $group_where . ') AND owner <> ? ' . $permission_where . ' ' . $active_where);
+ $result = $stmt->execute(array($userid, $userid));
+ $return = array();
+ while( $row = $result->fetchRow()){
+ $return[] = $row;
+ }
+ return $return;
+ }
+ /*
+ * @brief: returns all users a calendar / event is shared with
+ * @param: (int) id - id of the calendar / event
+ * @param: (string) $type - use const self::CALENDAR or self::EVENT
+ * @return: (array) $users - information about users a calendar / event is shared with
+ */
+ public static function allUsersSharedwith($id, $type){
+ $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*calendar_share_' . $type . ' WHERE ' . $type . 'id = ? ORDER BY share');
+ $result = $stmt->execute(array($id));
+ $users = array();
+ while( $row = $result->fetchRow()){
+ $users[] = $row;
+ }
+ return $users;
+ }
+ /*
+ * @brief: shares a calendar / event
+ * @param: (string) $owner - userid of the owner
+ * @param: (string) $share - userid (if $sharetype == user) / groupid (if $sharetype == group) / token (if $sharetype == public)
+ * @param: (string) $sharetype - type of sharing (can be: user/group/public)
+ * @param: (string) $id - id of the calendar / event
+ * @param: (string) $type - use const self::CALENDAR or self::EVENT
+ * @return (mixed) - token (if $sharetype == public) / bool (if $sharetype != public)
+ */
+ public static function share($owner, $share, $sharetype, $id, $type){
+ if(self::is_already_shared($owner, $share, $sharetype, $id, $type)){
+ return false;
+ }
+ switch($sharetype){
+ case 'user':
+ case 'group':
+ case 'public':
+ break;
+ default:
+ return false;
+ }
+ if($sharetype == 'public'){
+ $share = self::generate_token($id, $type);
+ }
+ $stmt = OC_DB::prepare('INSERT INTO *PREFIX*calendar_share_' . $type . ' (owner,share,sharetype,' . $type . 'id,permissions' . (($type == self::CALENDAR)?', active':'') . ') VALUES(?,?,?,?,0' . (($type == self::CALENDAR)?', 1':'') . ')' );
+ $result = $stmt->execute(array($owner,$share,$sharetype,$id));
+ if($sharetype == 'public'){
+ return $share;
+ }else{
+ return true;
+ }
+ }
+ /*
+ * @brief: stops sharing a calendar / event
+ * @param: (string) $owner - userid of the owner
+ * @param: (string) $share - userid (if $sharetype == user) / groupid (if $sharetype == group) / token (if $sharetype == public)
+ * @param: (string) $sharetype - type of sharing (can be: user/group/public)
+ * @param: (string) $id - id of the calendar / event
+ * @param: (string) $type - use const self::CALENDAR or self::EVENT
+ * @return (bool)
+ */
+ public static function unshare($owner, $share, $sharetype, $id, $type){
+ $stmt = OC_DB::prepare('DELETE FROM *PREFIX*calendar_share_' . $type . ' WHERE owner = ? ' . (($sharetype != 'public')?'AND share = ?':'') . ' AND sharetype = ? AND ' . $type . 'id = ?');
+ if($sharetype != 'public'){
+ $stmt->execute(array($owner,$share,$sharetype,$id));
+ }else{
+ $stmt->execute(array($owner,$sharetype,$id));
+ }
+ return true;
+ }
+ /*
+ * @brief: changes the permission for a calendar / event
+ * @param: (string) $share - userid (if $sharetype == user) / groupid (if $sharetype == group) / token (if $sharetype == public)
+ * @param: (string) $sharetype - type of sharing (can be: user/group/public)
+ * @param: (string) $id - id of the calendar / event
+ * @param: (int) $permission - permission of user the calendar / event is shared with (if $sharetype == public then $permission = 0)
+ * @param: (string) $type - use const self::CALENDAR or self::EVENT
+ * @return (bool)
+ */
+ public static function changepermission($share, $sharetype, $id, $permission, $type){
+ if($sharetype == 'public' && $permission == 1){
+ $permission = 0;
+ }
+ $stmt = OC_DB::prepare('UPDATE *PREFIX*calendar_share_' . $type . ' SET permissions = ? WHERE share = ? AND sharetype = ? AND ' . $type . 'id = ?');
+ $stmt->execute(array($permission, $share, $sharetype, $id));
+ return true;
+ }
+ /*
+ * @brief: generates a token for public calendars / events
+ * @return: (string) $token
+ */
+ private static function generate_token($id, $type){
+ $uniqid = uniqid();
+ if($type == self::CALENDAR){
+ $events = OC_Calendar_Object::all($id);
+ $string = '';
+ foreach($events as $event){
+ $string .= $event['calendardata'];
+ }
+ }else{
+ $string = OC_Calendar_Object::find($id);
+ }
+ $string = sha1($string['calendardata']);
+ $id = sha1($id);
+ $array = array($uniqid,$string,$id);
+ shuffle($array);
+ $string = implode('', $array);
+ $token = md5($string);
+ return substr($token, rand(0,16), 15);
+ }
+ /*
+ * @brief: checks if it is already shared
+ * @param: (string) $owner - userid of the owner
+ * @param: (string) $share - userid (if $sharetype == user) / groupid (if $sharetype == group) / token (if $sharetype == public)
+ * @param: (string) $sharetype - type of sharing (can be: user/group/public)
+ * @param: (string) $id - id of the calendar / event
+ * @param: (string) $type - use const self::CALENDAR or self::EVENT
+ * @return (bool)
+ */
+ public static function is_already_shared($owner, $share, $sharetype, $id, $type){
+ $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*calendar_share_' . $type . ' WHERE owner = ? AND share = ? AND sharetype = ? AND ' . $type . 'id = ?');
+ $result = $stmt->execute(array($owner, $share, $sharetype, $id));
+ if($result->numRows() > 0){
+ return true;
+ }
+ return false;
+ }
+ private static function group_sql($groups){
+ $group_where = '';
+ $i = 0;
+ foreach($groups as $group){
+ $group_where .= ' OR ';
+ $group_where .= ' (share = "' . $group . '" AND sharetype = "group") ';
+ $i++;
+ }
+ return $group_where;
+ }
+ private static function permission_sql($permission = null){
+ $permission_where = '';
+ if(!is_null($permission)){
+ $permission_where = ' AND permissions = ';
+ $permission_where .= ($permission=='rw')?'"1"':'"0"';
+ }
+ return $permission_where;
+ }
+ private static function active_sql($active = null){
+ $active_where = '';
+ if(!is_null($active)){
+ $active_where = 'AND active = ';
+ $active_where .= (!is_null($active) && $active)?'1':'0';
+ }
+ return $active_where;
+ }
+ /*
+ * @brief: checks the permission for editing an event
+ * @param: (string) $share - userid (if $sharetype == user) / groupid (if $sharetype == group) / token (if $sharetype == public)
+ * @param: (string) $id - id of the calendar / event
+ * @param: (string) $type - use const self::CALENDAR or self::EVENT
+ * @return (bool)
+ */
+ public static function is_editing_allowed($share, $id, $type){
+ $group_where = self::group_sql(OC_Group::getUserGroups($share));
+ $permission_where = self::permission_sql('rw');
+ $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*calendar_share_' . $type . ' WHERE ((share = ? AND sharetype = "user") ' . $group_where . ') ' . $permission_where);
+ $result = $stmt->execute(array($share));
+ if($result->numRows() == 1){
+ return true;
+ }
+ if($type == self::EVENT){
+ $event = OC_Calendar_App::getEventObject($id, false, false);
+ return self::is_editing_allowed($share, $event['calendarid'], self::CALENDAR);
+ }
+ return false;
+ }
+ /*
+ * @brief: checks the access of
+ * @param: (string) $share - userid (if $sharetype == user) / groupid (if $sharetype == group) / token (if $sharetype == public)
+ * @param: (string) $id - id of the calendar / event
+ * @param: (string) $type - use const self::CALENDAR or self::EVENT
+ * @return (bool)
+ */
+ public static function check_access($share, $id, $type){
+ $group_where = self::group_sql(OC_Group::getUserGroups($share));
+ $stmt = OC_DB::prepare('SELECT * FROM *PREFIX*calendar_share_' . $type . ' WHERE (' . $type . 'id = ? AND (share = ? AND sharetype = "user") ' . $group_where . ')');
+ $result = $stmt->execute(array($id,$share));
+ $rows = $result->numRows();
+ if($rows > 0){
+ return true;
+ }elseif($type == self::EVENT){
+ $event = OC_Calendar_App::getEventObject($id, false, false);
+ return self::check_access($share, $event['calendarid'], self::CALENDAR);
+ }else{
+ return false;
+ }
+ }
+ /*
+ * @brief: returns the calendardata of an event or a calendar
+ * @param: (string) $token - token which should be searched
+ * @return: mixed - bool if false, array with type and id if true
+ */
+ public static function getElementByToken($token){
+ $stmt_calendar = OC_DB::prepare('SELECT * FROM *PREFIX*calendar_share_' . OC_Calendar_Share::CALENDAR . ' WHERE sharetype = "public" AND share = ?');
+ $result_calendar = $stmt_calendar->execute(array($token));
+ $stmt_event = OC_DB::prepare('SELECT * FROM *PREFIX*calendar_share_' . OC_Calendar_Share::EVENT . ' WHERE sharetype = "public" AND share = ?');
+ $result_event = $stmt_event->execute(array($token));
+ $return = array();
+ if($result_calendar->numRows() == 0 && $result_event->numRows() == 0){
+ return false;
+ }elseif($result_calendar->numRows() != 0){
+ $return ['type'] = 'calendar';
+ $calendar = $result_calendar->fetchRow();
+ $return ['id'] = $calendar['calendarid'];
+ }else{
+ $return ['type'] = 'event';
+ $event = $result_event->fetchRow();
+ $return ['id'] = $event['eventid'];
+ }
+ return $return;
+ }
+
+ /*
+ * @brief sets the active status of the calendar
+ * @param (string) $
+ */
+ public static function set_active($share, $id, $active){
+ $stmt = OC_DB::prepare('UPDATE *PREFIX*calendar_share_calendar SET active = ? WHERE share = ? AND sharetype = "user" AND calendarid = ?');
+ $stmt->execute(array($active, $share, $id));
+ }
+} \ No newline at end of file
diff --git a/apps/calendar/resettimezone.php b/apps/calendar/resettimezone.php
deleted file mode 100644
index 0996924b5ad..00000000000
--- a/apps/calendar/resettimezone.php
+++ /dev/null
@@ -1,4 +0,0 @@
-<?php
-
-OC_Preferences::deleteKey(OC_USER::getUser(), 'calendar', 'timezone');
-?> \ No newline at end of file
diff --git a/apps/calendar/share.php b/apps/calendar/share.php
new file mode 100644
index 00000000000..1cc8a2ef15e
--- /dev/null
+++ b/apps/calendar/share.php
@@ -0,0 +1,23 @@
+<?php
+require_once('../../lib/base.php');
+$token = strip_tags($_GET['t']);
+$shared = OC_Calendar_Share::getElementByToken($token);
+$nl = "\n\r";
+if($shared['type'] == OC_Calendar_Share::CALENDAR){
+ $calendar = OC_Calendar_App::getCalendar($shared['id'], false);
+ $calobjects = OC_Calendar_Object::all($shared['id']);
+ header('Content-Type: text/Calendar');
+ header('Content-Disposition: inline; filename=' . $calendar['displayname'] . '.ics');
+ foreach($calobjects as $calobject){
+ echo $calobject['calendardata'] . $nl;
+ }
+}elseif($shared['type'] == OC_Calendar_Share::EVENT){
+ $data = OC_Calendar_App::getEventObject($shared['id'], false);
+ $calendarid = $data['calendarid'];
+ $calendar = OC_Calendar_App::getCalendar($calendarid);
+ header('Content-Type: text/Calendar');
+ header('Content-Disposition: inline; filename=' . $data['summary'] . '.ics');
+ echo $data['calendardata'];
+}else{
+ header('Error 404: Not Found');
+} \ No newline at end of file
diff --git a/apps/calendar/templates/part.choosecalendar.php b/apps/calendar/templates/part.choosecalendar.php
index 86f09d62076..4f6680bb497 100644
--- a/apps/calendar/templates/part.choosecalendar.php
+++ b/apps/calendar/templates/part.choosecalendar.php
@@ -1,4 +1,5 @@
<div id="choosecalendar_dialog" title="<?php echo $l->t("Choose active calendars"); ?>">
+<p><b><?php echo $l->t('Your calendars'); ?>:</b></p>
<table width="100%" style="border: 0;">
<?php
$option_calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
@@ -6,6 +7,12 @@ for($i = 0; $i < count($option_calendars); $i++){
echo "<tr>";
$tmpl = new OC_Template('calendar', 'part.choosecalendar.rowfields');
$tmpl->assign('calendar', $option_calendars[$i]);
+ if(OC_Calendar_Share::allUsersSharedwith($option_calendars[$i]['id'], OC_Calendar_Share::CALENDAR) == array()){
+ $shared = false;
+ }else{
+ $shared = true;
+ }
+ $tmpl->assign('shared', $shared);
$tmpl->printpage();
echo "</tr>";
}
@@ -20,4 +27,25 @@ for($i = 0; $i < count($option_calendars); $i++){
<p style="margin: 0 auto;width: 90%;"><input style="display:none;width: 90%;float: left;" type="text" id="caldav_url" onmouseover="$('#caldav_url').select();" title="<?php echo $l->t("CalDav Link"); ?>"><img id="caldav_url_close" style="height: 20px;vertical-align: middle;display: none;" src="../../core/img/actions/delete.svg" alt="close" onclick="$('#caldav_url').hide();$('#caldav_url_close').hide();"/></p>
</td>
</tr>
+</table><br>
+<p><b><?php echo $l->t('Shared calendars'); ?>: </b></p>
+<table width="100%" style="border: 0;">
+<?php
+$share = OC_Calendar_Share::allSharedwithuser(OC_User::getUser(), OC_Calendar_Share::CALENDAR);
+$count = count($share);
+for($i = 0; $i < $count; $i++){
+ $share[$i]['calendar'] = OC_Calendar_App::getCalendar($share[$i]['calendarid'], false, false);
+ echo '<tr>';
+ $tmpl = new OC_Template('calendar', 'part.choosecalendar.rowfields.shared');
+ $tmpl->assign('share', $share[$i]);
+ $tmpl->printpage();
+ echo '</tr>';
+}
+?>
</table>
+<?php
+if($count == 0){
+ echo '<p style="text-align:center;"><b>' . $l->t('No shared calendars') . '</b></p>';
+}
+?>
+</div> \ No newline at end of file
diff --git a/apps/calendar/templates/part.choosecalendar.rowfields.php b/apps/calendar/templates/part.choosecalendar.rowfields.php
index d3bf6c0501c..cf85f0dc53e 100644
--- a/apps/calendar/templates/part.choosecalendar.rowfields.php
+++ b/apps/calendar/templates/part.choosecalendar.rowfields.php
@@ -1,4 +1,8 @@
<?php
- echo "<td width=\"20px\"><input id=\"active_" . $_['calendar']["id"] . "\" type=\"checkbox\" onClick=\"Calendar.UI.Calendar.activation(this, " . $_['calendar']["id"] . ")\"" . ($_['calendar']["active"] ? ' checked="checked"' : '') . "></td>";
- echo "<td><label for=\"active_" . $_['calendar']["id"] . "\">" . $_['calendar']["displayname"] . "</label></td>";
- echo "<td width=\"20px\"><a href=\"#\" onclick=\"Calendar.UI.showCalDAVUrl('" . OC_User::getUser() . "', '" . rawurlencode( $_['calendar']["uri"] ) . "');\" title=\"" . $l->t("CalDav Link") . "\" class=\"action\"><img class=\"svg action\" src=\"../../core/img/actions/public.svg\"></a></td><td width=\"20px\"><a href=\"export.php?calid=" . $_['calendar']["id"] . "\" title=\"" . $l->t("Download") . "\" class=\"action\"><img class=\"svg action\" src=\"../../core/img/actions/download.svg\"></a></td><td width=\"20px\"><a href=\"#\" title=\"" . $l->t("Edit") . "\" class=\"action\" onclick=\"Calendar.UI.Calendar.edit(this, " . $_['calendar']["id"] . ");\"><img class=\"svg action\" src=\"../../core/img/actions/rename.svg\"></a></td><td width=\"20px\"><a href=\"#\" onclick=\"Calendar.UI.Calendar.deleteCalendar('" . $_['calendar']["id"] . "');\" title=\"" . $l->t("Delete") . "\" class=\"action\"><img class=\"svg action\" src=\"../../core/img/actions/delete.svg\"></a></td>";
+echo '<td width="20px"><input id="active_' . $_['calendar']['id'] . '" type="checkbox" onClick="Calendar.UI.Calendar.activation(this,' . $_['calendar']['id'] . ')"' . ($_['calendar']['active'] ? ' checked="checked"' : '') . '></td>';
+echo '<td id="' . OC_User::getUser() . '_' . $_['calendar']['id'] . '"><label for="active_' . $_['calendar']['id'] . '">' . $_['calendar']['displayname'] . '</label></td>';
+echo '<td width="20px"><a href="#" onclick="Calendar.UI.Share.dropdown(\'' . OC_User::getUser() . '\', \'' . $_['calendar']['id'] . '\');" title="' . $l->t("Share Calendar") . '" class="action"><img class="svg action" src="' . ((!$_['shared']) ? '../../core/img/actions/share.svg' : '../../core/img/actions/shared.svg') . '"></a></td>';
+echo '<td width="20px"><a href="#" onclick="Calendar.UI.showCalDAVUrl(\'' . OC_User::getUser() . '\', \'' . $_['calendar']['uri'] . '\');" title="' . $l->t("CalDav Link") . '" class="action"><img class="svg action" src="../../core/img/actions/public.svg"></a></td>';
+echo '<td width="20px"><a href="export.php?calid=' . $_['calendar']['id'] . '" title="' . $l->t('Download') . '" class="action"><img class="svg action" src="../../core/img/actions/download.svg"></a></td>';
+echo '<td width="20px"><a href="#" title="' . $l->t('Edit') . '" class="action" onclick="Calendar.UI.Calendar.edit(this, ' . $_['calendar']['id'] . ');"><img class="svg action" src="../../core/img/actions/rename.svg"></a></td>';
+echo '<td width="20px"><a href="#" onclick="Calendar.UI.Calendar.deleteCalendar(\'' . $_['calendar']['id'] . '\');" title="' . $l->t('Delete') . '" class="action"><img class="svg action" src="../../core/img/actions/delete.svg"></a></td>'; \ No newline at end of file
diff --git a/apps/calendar/templates/part.choosecalendar.rowfields.shared.php b/apps/calendar/templates/part.choosecalendar.rowfields.shared.php
new file mode 100644
index 00000000000..a23266da0c3
--- /dev/null
+++ b/apps/calendar/templates/part.choosecalendar.rowfields.shared.php
@@ -0,0 +1,4 @@
+<?php
+echo '<td width="20px"><input id="active_' . $_['share']['owner'] . '_' . $_['share']['calendar']['id'] . '" type="checkbox" onClick="Calendar.UI.Share.activation(this,\'' . $_['share']['owner'] . '\',' . $_['share']['calendar']['id'] . ')"' . ($_['share']['active'] ? ' checked="checked"' : '') . '></td>';
+echo '<td><label for="active_' . $_['share']['owner'] . '_' . $_['share']['calendar']['id'] . '">' . $_['share']['calendar']['displayname'] . '</label></td>';
+echo '<td style="font-style: italic;">' . $l->t('shared with you by') . ' ' . $_['share']['owner'] . '</td>'; \ No newline at end of file
diff --git a/apps/calendar/templates/part.editevent.php b/apps/calendar/templates/part.editevent.php
index 6e319e1b4e0..58314db1a6b 100644
--- a/apps/calendar/templates/part.editevent.php
+++ b/apps/calendar/templates/part.editevent.php
@@ -1,13 +1,13 @@
<div id="event" title="<?php echo $l->t("Edit an event");?>">
<form id="event_form">
- <input type="hidden" name="id" value="<?php echo $_['id'] ?>">
+ <input type="hidden" name="id" value="<?php echo $_['eventid'] ?>">
<input type="hidden" name="lastmodified" value="<?php echo $_['lastmodified'] ?>">
<?php echo $this->inc("part.eventform"); ?>
<div style="width: 100%;text-align: center;color: #FF1D1D;" id="errorbox"></div>
<span id="actions">
<input type="button" class="submit" style="float: left;" value="<?php echo $l->t("Submit");?>" onclick="Calendar.UI.validateEventForm('ajax/event/edit.php');">
<input type="button" class="submit" style="float: left;" name="delete" value="<?php echo $l->t("Delete");?>" onclick="Calendar.UI.submitDeleteEventForm('ajax/event/delete.php');">
- <input type="button" class="submit" style="float: right;" name="export" value="<?php echo $l->t("Export");?>" onclick="window.location='export.php?eventid=<?php echo $_['id'] ?>';">
+ <input type="button" class="submit" style="float: right;" name="export" value="<?php echo $l->t("Export");?>" onclick="window.location='export.php?eventid=<?php echo $_['eventid'] ?>';">
</span>
</form>
</div>
diff --git a/apps/calendar/templates/part.eventform.php b/apps/calendar/templates/part.eventform.php
index 3830c273a73..1eee099d0d1 100644
--- a/apps/calendar/templates/part.eventform.php
+++ b/apps/calendar/templates/part.eventform.php
@@ -1,3 +1,19 @@
+<script type="text/javascript">
+<?php
+echo 'Calendar.UI.Share.idtype = "event";' . "\n" . 'Calendar.UI.Share.currentid = "' . $_['eventid'] . '";';
+?>
+</script>
+
+<ul>
+ <li><a href="#tabs-1"><?php echo $l->t('Eventinfo'); ?></a></li>
+ <li><a href="#tabs-2"><?php echo $l->t('Repeating'); ?></a></li>
+ <!--<li><a href="#tabs-3"><?php echo $l->t('Alarm'); ?></a></li>
+ <li><a href="#tabs-4"><?php echo $l->t('Attendees'); ?></a></li>-->
+ <?php if($_['access'] == 'owner') { ?>
+ <li><a href="#tabs-5"><?php echo $l->t('Share'); ?></a></li>
+ <?php } ?>
+</ul>
+<div id="tabs-1">
<table width="100%">
<tr>
<th width="75px"><?php echo $l->t("Title");?>:</th>
@@ -26,7 +42,7 @@
<?php } else { ?>
<th width="75px">&nbsp;</th>
<td>
- <input type="hidden" name="calendar" value="<?php echo $_['calendar_options'][0]['id'] ?>">
+ <input type="hidden" name="calendar" value="<?php echo $_['calendar_options'][0]['id']; ?>">
</td>
<?php } ?>
</tr>
@@ -59,7 +75,27 @@
</table>
<input type="button" class="submit" value="<?php echo $l->t("Advanced options"); ?>" onclick="Calendar.UI.showadvancedoptions();" id="advanced_options_button">
<div id="advanced_options" style="display: none;">
- <table style="width:100%">
+ <hr>
+ <table>
+ <tr>
+ <th width="85px"><?php echo $l->t("Location");?>:</th>
+ <td>
+ <input type="text" style="width:350px;" size="100" placeholder="<?php echo $l->t("Location of the Event");?>" value="<?php echo isset($_['location']) ? htmlspecialchars($_['location']) : '' ?>" maxlength="100" name="location" />
+ </td>
+ </tr>
+ </table>
+ <table>
+ <tr>
+ <th width="85px" style="vertical-align: top;"><?php echo $l->t("Description");?>:</th>
+ <td>
+ <textarea style="width:350px;height: 150px;" placeholder="<?php echo $l->t("Description of the Event");?>" name="description"><?php echo isset($_['description']) ? htmlspecialchars($_['description']) : '' ?></textarea>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+<div id="tabs-2">
+ <table style="width:100%">
<tr>
<th width="75px"><?php echo $l->t("Repeat");?>:</th>
<td>
@@ -112,7 +148,7 @@
<tr id="advanced_weekday" style="display:none;">
<th width="75px"></th>
<td id="weeklycheckbox">
- <select id="weeklyoptions" name="weeklyoptions[]" multiple="multiple" title="<?php echo $l->t("Select weekdays") ?>">
+ <select id="weeklyoptions" name="weeklyoptions[]" multiple="multiple" style="width: 150px;" title="<?php echo $l->t("Select weekdays") ?>">
<?php
if (!isset($_['weekdays'])) {$_['weekdays'] = array();}
echo html_select_options($_['repeat_weekly_options'], $_['repeat_weekdays'], array('combine'=>true));
@@ -185,6 +221,7 @@
<td>
<select id="end" name="end">
<?php
+ if($_['repeat_end'] == '') $_['repeat_end'] = 'never';
echo html_select_options($_['repeat_end_options'], $_['repeat_end']);
?>
</select>
@@ -203,23 +240,13 @@
</td>
</tr>
</table>
+ <?php echo $l->t('Summary'); ?>:<span id="repeatsummary"></span>
</div>
- <hr>
- <!-- support for attendees will be added in following versions -->
- <table>
- <tr>
- <th width="85px"><?php echo $l->t("Location");?>:</th>
- <td>
- <input type="text" style="width:350px;" size="100" placeholder="<?php echo $l->t("Location of the Event");?>" value="<?php echo isset($_['location']) ? htmlspecialchars($_['location']) : '' ?>" maxlength="100" name="location" />
- </td>
- </tr>
- </table>
- <table>
- <tr>
- <th width="85px" style="vertical-align: top;"><?php echo $l->t("Description");?>:</th>
- <td>
- <textarea style="width:350px;height: 150px;" placeholder="<?php echo $l->t("Description of the Event");?>" name="description"><?php echo isset($_['description']) ? htmlspecialchars($_['description']) : '' ?></textarea>
- </td>
- </tr>
- </table>
- </div>
+</div>
+<!--<div id="tabs-3">//Alarm</div>
+<div id="tabs-4">//Attendees</div>-->
+<?php if($_['access'] == 'owner') { ?>
+<div id="tabs-5">
+ <?php echo $this->inc('share.dropdown'); ?>
+</div>
+<?php } ?>
diff --git a/apps/calendar/templates/part.import.php b/apps/calendar/templates/part.import.php
index 8f46484b42b..90691a33e50 100644
--- a/apps/calendar/templates/part.import.php
+++ b/apps/calendar/templates/part.import.php
@@ -3,7 +3,7 @@
<input type="hidden" id="filename" value="<?php echo $_['filename'];?>">
<input type="hidden" id="path" value="<?php echo $_['path'];?>">
<input type="hidden" id="progressfile" value="<?php echo md5(session_id()) . '.txt';?>">
-<p style="text-align:center;"><b><?php echo $l->t('Please choose the calendar'); ?></b>
+<p style="text-align:center;"><b><?php echo $l->t('Please choose the calendar'); ?></b></p>
<select style="width:100%;" id="calendar" name="calendar">
<?php
$calendar_options = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
@@ -17,7 +17,7 @@ echo html_select_options($calendar_options, $calendar_options[0]['id'], array('v
<input type="button" value="<?php echo $l->t("Import");?>!" id="startimport">
</div>
<div id="progressbar_container" style="display: none">
-<p style="text-align:center;"><b><?php echo $l->t('Importing calendar'); ?></b>
+<p style="text-align:center;"><b><?php echo $l->t('Importing calendar'); ?></b></p>
<div id="progressbar"></div>
<div id="import_done" style="display: none;">
<p style="text-align:center;"><b><?php echo $l->t('Calendar imported successfully'); ?></b></p>
diff --git a/apps/calendar/templates/part.showevent.php b/apps/calendar/templates/part.showevent.php
new file mode 100644
index 00000000000..6baf0415d54
--- /dev/null
+++ b/apps/calendar/templates/part.showevent.php
@@ -0,0 +1,247 @@
+<div id="event" title="<?php echo $l->t("View an event");?>">
+<ul>
+ <li><a href="#tabs-1"><?php echo $l->t('Eventinfo'); ?></a></li>
+ <li><a href="#tabs-2"><?php echo $l->t('Repeating'); ?></a></li>
+ <!--<li><a href="#tabs-3"><?php echo $l->t('Alarm'); ?></a></li>
+ <li><a href="#tabs-4"><?php echo $l->t('Attendees'); ?></a></li>-->
+</ul>
+<div id="tabs-1">
+ <table width="100%">
+ <tr>
+ <th width="75px"><?php echo $l->t("Title");?>:</th>
+ <td>
+ <?php echo isset($_['title']) ? htmlspecialchars($_['title']) : '' ?>
+ </td>
+ </tr>
+ </table>
+ <table width="100%">
+ <tr>
+ <th width="75px"><?php echo $l->t("Category");?>:</th>
+ <td>
+ <?php
+ if(count($_['categories']) == 0){
+ echo $l->t('No categories selected');
+ }else{
+ echo '<select id="category" name="categories[]" multiple="multiple" title="' . $l->t("Select category") . '">';
+ echo html_select_options($_['categories'], $_['categories'], array('combine'=>true));
+ echo '</select>';
+ }
+ ?>
+ </td>
+ <th width="75px">&nbsp;&nbsp;&nbsp;<?php echo $l->t("Calendar");?>:</th>
+ <td>
+ <select name="calendar" disabled="disabled">
+ <option>
+ <?php
+ $calendar = OC_Calendar_App::getCalendar($_['calendar']);
+ echo $calendar['displayname'] . ' ' . $l->t('of') . ' ' . $calendar['userid'];
+ ?>
+ </option>
+
+ </select>
+ </td>
+ <th width="75px">&nbsp;</th>
+ <td>
+ <input type="hidden" name="calendar" value="<?php echo $_['calendar_options'][0]['id'] ?>">
+ </td>
+ </tr>
+ </table>
+ <hr>
+ <table width="100%">
+ <tr>
+ <th width="75px"></th>
+ <td>
+ <input onclick="Calendar.UI.lockTime();" type="checkbox"<?php if($_['allday']){echo 'checked="checked"';} ?> id="allday_checkbox" name="allday" disabled="disabled">
+ <?php echo $l->t("All Day Event");?>
+ </td>
+ </tr>
+ <tr>
+ <th width="75px"><?php echo $l->t("From");?>:</th>
+ <td>
+ <?php echo $_['startdate'];?>
+ &nbsp;&nbsp; <?php echo (!$_['allday'])?$l->t('at'):''; ?> &nbsp;&nbsp;
+ <?php echo $_['starttime'];?>
+ </td>
+ </tr>
+ <tr>
+ <th width="75px"><?php echo $l->t("To");?>:</th>
+ <td>
+ <?php echo $_['enddate'];?>
+ &nbsp;&nbsp; <?php echo (!$_['allday'])?$l->t('at'):''; ?> &nbsp;&nbsp;
+ <?php echo $_['endtime'];?>
+ </td>
+ </tr>
+ </table>
+ <input type="button" class="submit" value="<?php echo $l->t("Advanced options"); ?>" onclick="Calendar.UI.showadvancedoptions();" id="advanced_options_button">
+ <div id="advanced_options" style="display: none;">
+ <hr>
+ <table>
+ <tr>
+ <th width="85px"><?php echo $l->t("Location");?>:</th>
+ <td>
+ <?php echo isset($_['location']) ? htmlspecialchars($_['location']) : '' ?>
+ </td>
+ </tr>
+ </table>
+ <table>
+ <tr>
+ <th width="85px" style="vertical-align: top;"><?php echo $l->t("Description");?>:</th>
+ <td>
+ <?php echo isset($_['description']) ? htmlspecialchars($_['description']) : '' ?></textarea>
+ </tr>
+ </table>
+ </div>
+ </div>
+<div id="tabs-2">
+ <table style="width:100%">
+ <tr>
+ <th width="75px"><?php echo $l->t("Repeat");?>:</th>
+ <td>
+ <select id="repeat" name="repeat">
+ <?php
+ echo html_select_options(array($_['repeat_options'][$_['repeat']]), $_['repeat']);
+ ?>
+ </select></td>
+ <td><input type="button" style="float:right;" class="submit" value="<?php echo $l->t("Advanced"); ?>" onclick="Calendar.UI.showadvancedoptionsforrepeating();" id="advanced_options_button"></td>
+ </tr>
+ </table>
+ <div id="advanced_options_repeating" style="display:none;">
+ <table style="width:100%">
+ <tr id="advanced_month" style="display:none;">
+ <th width="75px"></th>
+ <td>
+ <select id="advanced_month_select" name="advanced_month_select">
+ <?php
+ echo html_select_options(array($_['repeat_month_options'][$_['repeat_month']]), $_['repeat_month']);
+ ?>
+ </select>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr id="advanced_year" style="display:none;">
+ <th width="75px"></th>
+ <td>
+ <select id="advanced_year_select" name="advanced_year_select">
+ <?php
+ echo html_select_options(array($_['repeat_year_options'][$_['repeat_year']]), $_['repeat_year']);
+ ?>
+ </select>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr id="advanced_weekofmonth" style="display:none;">
+ <th width="75px"></th>
+ <td id="weekofmonthcheckbox">
+ <select id="weekofmonthoptions" name="weekofmonthoptions">
+ <?php
+ echo html_select_options(array($_['repeat_weekofmonth_options'][$_['repeat_weekofmonth']]), $_['repeat_weekofmonth']);
+ ?>
+ </select>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr id="advanced_weekday" style="display:none;">
+ <th width="75px"></th>
+ <td id="weeklycheckbox">
+ <select id="weeklyoptions" name="weeklyoptions[]" multiple="multiple" style="width: 150px;" title="<?php echo $l->t("Select weekdays") ?>">
+ <?php
+ if (!isset($_['weekdays'])) {$_['weekdays'] = array();}
+ echo html_select_options(array($_['repeat_weekly_options'][$_['repeat_weekdays']]), $_['repeat_weekdays'], array('combine'=>true));
+ ?>
+ </select>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr id="advanced_byyearday" style="display:none;">
+ <th width="75px"></th>
+ <td id="byyeardaycheckbox">
+ <select id="byyearday" name="byyearday[]" multiple="multiple" title="<?php echo $l->t("Select days") ?>">
+ <?php
+ if (!isset($_['repeat_byyearday'])) {$_['repeat_byyearday'] = array();}
+ echo html_select_options(array($_['repeat_byyearday_options'][$_['repeat_byyearday']]), $_['repeat_byyearday'], array('combine'=>true));
+ ?>
+ </select><?php echo $l->t('and the events day of year.'); ?>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr id="advanced_bymonthday" style="display:none;">
+ <th width="75px"></th>
+ <td id="bymonthdaycheckbox">
+ <select id="bymonthday" name="bymonthday[]" multiple="multiple" title="<?php echo $l->t("Select days") ?>">
+ <?php
+ if (!isset($_['repeat_bymonthday'])) {$_['repeat_bymonthday'] = array();}
+ echo html_select_options(array($_['repeat_bymonthday_options'][$_['repeat_bymonthday']]), $_['repeat_bymonthday'], array('combine'=>true));
+ ?>
+ </select><?php echo $l->t('and the events day of month.'); ?>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr id="advanced_bymonth" style="display:none;">
+ <th width="75px"></th>
+ <td id="bymonthcheckbox">
+ <select id="bymonth" name="bymonth[]" multiple="multiple" title="<?php echo $l->t("Select months") ?>">
+ <?php
+ if (!isset($_['repeat_bymonth'])) {$_['repeat_bymonth'] = array();}
+ echo html_select_options(array($_['repeat_bymonth_options'][$_['repeat_bymonth']]), $_['repeat_bymonth'], array('combine'=>true));
+ ?>
+ </select>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr id="advanced_byweekno" style="display:none;">
+ <th width="75px"></th>
+ <td id="bymonthcheckbox">
+ <select id="byweekno" name="byweekno[]" multiple="multiple" title="<?php echo $l->t("Select weeks") ?>">
+ <?php
+ if (!isset($_['repeat_byweekno'])) {$_['repeat_byweekno'] = array();}
+ echo html_select_options(array($_['repeat_byweekno_options'][$_['repeat_byweekno']]), $_['repeat_byweekno'], array('combine'=>true));
+ ?>
+ </select><?php echo $l->t('and the events week of year.'); ?>
+ </td>
+ </tr>
+ </table>
+ <table style="width:100%">
+ <tr>
+ <th width="75px"><?php echo $l->t('Interval'); ?>:</th>
+ <td>
+ <?php echo isset($_['repeat_interval']) ? $_['repeat_interval'] : '1'; ?>
+ </td>
+ </tr>
+ <tr>
+ <th width="75px"><?php echo $l->t('End'); ?>:</th>
+ <td>
+ <select id="end" name="end">
+ <?php
+ if($_['repeat_end'] == '') $_['repeat_end'] = 'never';
+ echo html_select_options(array($_['repeat_end_options'][$_['repeat_end']]), $_['repeat_end']);
+ ?>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <th></th>
+ <td id="byoccurrences" style="display:none;">
+ <?php echo $_['repeat_count'] . ' ' . $l->t('occurrences'); ?>
+ </td>
+ </tr>
+ <tr>
+ <th></th>
+ <td id="bydate" style="display:none;">
+ <?php echo $_['repeat_date']; ?>
+ </td>
+ </tr>
+ </table>
+ <?php echo $l->t('Summary'); ?>:<span id="repeatsummary"></span>
+ </div>
+</div>
+<!--<div id="tabs-3">//Alarm</div>
+<div id="tabs-4">//Attendees</div>-->
+
+</div> \ No newline at end of file
diff --git a/apps/calendar/templates/settings.php b/apps/calendar/templates/settings.php
index fb2a04a6498..3488fec0187 100644
--- a/apps/calendar/templates/settings.php
+++ b/apps/calendar/templates/settings.php
@@ -9,7 +9,7 @@
?>
<form id="calendar">
<fieldset class="personalblock">
- <strong><?php echo $l->t('Calendar'); ?></strong>
+ <legend><?php echo $l->t('Calendar'); ?></legend>
<table class="nostyle">
<tr><td><label for="timezone" class="bold"><?php echo $l->t('Timezone');?></label></td><td><select style="display: none;" id="timezone" name="timezone">
<?php
@@ -47,6 +47,6 @@
</table>
<?php echo $l->t('Calendar CalDAV syncing address:');?>
- <?php echo OC_Helper::linkToAbsolute('calendar', 'caldav.php'); ?><br />
+ <code><?php echo OC_Helper::linkToAbsolute('calendar', 'caldav.php'); ?></code><br />
</fieldset>
</form>
diff --git a/apps/calendar/templates/share.dropdown.php b/apps/calendar/templates/share.dropdown.php
new file mode 100644
index 00000000000..71556a6a21c
--- /dev/null
+++ b/apps/calendar/templates/share.dropdown.php
@@ -0,0 +1,77 @@
+<?php
+if(array_key_exists('calid', $_)){
+ $id = $_['calid'];
+ $sharedelements = OC_Calendar_Share::allUsersSharedwith($_['calid'], OC_Calendar_Share::CALENDAR);
+}else{
+ $sharedelements = OC_Calendar_Share::allUsersSharedwith($_['eventid'], OC_Calendar_Share::EVENT);
+ $id = $_['eventid'];
+}
+$users = array();$groups = array();$public = array();
+foreach($sharedelements as $sharedelement){
+ if($sharedelement['sharetype'] == 'user'){
+ $users[] = $sharedelement;
+ }elseif($sharedelement['sharetype'] == 'group'){
+ $groups[] = $sharedelement;
+ }elseif($sharedelement['sharetype'] == 'public'){
+ $public = $sharedelement;
+ }
+}
+?>
+<strong><?php echo $l->t('Users');?>:</strong><br>
+<select id="share_user" title="<?php echo $l->t('select users');?>" data-placeholder="<?php echo $l->t('select users'); ?>">
+<option value=""></option>
+<?php
+$allocusers = OC_User::getUsers();
+$allusers = array();
+foreach($allocusers as $ocuser){
+ $allusers[$ocuser] = $ocuser;
+}
+unset($allusers[OC_User::getUser()]);
+$allusers = array_flip($allusers);
+echo html_select_options($allusers, array());
+?>
+</select><br>
+<ul id="sharewithuser_list">
+<?php foreach($users as $user): ?>
+ <li id="sharewithuser_<?php echo $user['share']; ?>"><input type="checkbox" width="12px" <?php echo ($user['permissions']?'checked="checked"':'')?> style="visibility:hidden;" title="<?php echo $l->t('Editable'); ?>"><?php echo $user['share']; ?><img src="<?php echo OC::$WEBROOT; ?>/core/img/actions/delete.svg" class="svg action" style="display:none;float:right;"></li>
+ <script>
+ $('#sharewithuser_<?php echo $user['share']; ?> > img').click(function(){
+ $('#share_user option[value="<?php echo $user['share']; ?>"]').removeAttr('disabled');
+ Calendar.UI.Share.unshare(<?php echo $id; ?>, '<?php echo (array_key_exists('calid', $_)?'calendar':'event');?>', '<?php echo $user['share']; ?>', 'user');
+ $('#sharewithuser_<?php echo $user['share']; ?>').remove();
+ $("#share_user").trigger("liszt:updated");
+ });
+ $('#share_user option[value="<?php echo $user['share']; ?>"]').attr('disabled', 'disabled');
+ </script>
+<?php endforeach; ?>
+</ul>
+<strong><?php echo $l->t('Groups');?>:</strong><br>
+<select id="share_group" title="<?php echo $l->t('select groups');?>" data-placeholder="<?php echo $l->t('select groups'); ?>">
+<option value=""></option>
+<?php
+$allocgroups = OC_Group::getGroups();
+$allgroups = array();
+foreach($allocgroups as $ocgroup){
+ $allgroups[$ocgroup] = $ocgroup;
+}
+echo html_select_options($allgroups, array());
+?>
+</select><br>
+<ul id="sharewithgroup_list">
+<?php foreach($groups as $group): ?>
+ <li id="sharewithgroup_<?php echo $group['share']; ?>"><input type="checkbox" width="12px" <?php echo ($group['permissions']?'checked="checked"':'')?> style="visibility:hidden;" title="<?php echo $l->t('Editable'); ?>"><?php echo $group['share']; ?><img src="<?php echo OC::$WEBROOT; ?>/core/img/actions/delete.svg" class="svg action" style="display:none;float:right;"></li>
+ <script>
+ $('#sharewithgroup_<?php echo $group['share']; ?> > img').click(function(){
+ $('#share_group option[value="<?php echo $group['share']; ?>"]').removeAttr('disabled');
+ Calendar.UI.Share.unshare(<?php echo $id; ?>, '<?php echo (array_key_exists('calid', $_)?'calendar':'event');?>, '<?php echo $group['share']; ?>', 'group'); ?>
+ $('#sharewithgroup_<?php echo $group['share']; ?>').remove();
+ $("#share_group").trigger("liszt:updated");
+ });
+ $('#share_group option[value="<?php echo $group['share']; ?>"]').attr('disabled', 'disabled');
+ </script>
+<?php endforeach; ?>
+</ul>
+<div id="public">
+ <input type="checkbox" id="publish" <?php echo ($public['share'])?'checked="checked"':'' ?>><label for="publish"><?php echo $l->t('make public'); ?></label><br>
+ <input type="text" id="public_token" value="<?php echo OC_Helper::linkToAbsolute('apps/calendar', 'share.php?t=' . $public['share'], null, true) ; ?>" onmouseover="$('#public_token').select();" style="<?php echo (!$public['share'])?'display:none':'' ?>">
+</div> \ No newline at end of file
diff --git a/apps/contacts/ajax/savecrop.php b/apps/contacts/ajax/savecrop.php
index 36ba6a046dc..84c94da50b8 100644
--- a/apps/contacts/ajax/savecrop.php
+++ b/apps/contacts/ajax/savecrop.php
@@ -44,19 +44,15 @@ function bailOut($msg) {
$image = null;
-$x1 = (isset($_POST['x1']) && $_POST['x1']) ? $_POST['x1'] : -1;
+$x1 = (isset($_POST['x1']) && $_POST['x1']) ? $_POST['x1'] : 0;
//$x2 = isset($_POST['x2']) ? $_POST['x2'] : -1;
-$y1 = (isset($_POST['y1']) && $_POST['y1']) ? $_POST['y1'] : -1;
+$y1 = (isset($_POST['y1']) && $_POST['y1']) ? $_POST['y1'] : 0;
//$y2 = isset($_POST['y2']) ? $_POST['y2'] : -1;
$w = (isset($_POST['w']) && $_POST['w']) ? $_POST['w'] : -1;
$h = (isset($_POST['h']) && $_POST['h']) ? $_POST['h'] : -1;
$tmp_path = isset($_POST['tmp_path']) ? $_POST['tmp_path'] : '';
$id = isset($_POST['id']) ? $_POST['id'] : '';
-if(in_array(-1, array($x1, $y1, $w, $h))) {
- bailOut('Wrong crop dimensions: '.implode(', ', array($x1, $y1, $w, $h)));
-}
-
if($tmp_path == '') {
bailOut('Missing path to temporary file.');
}
@@ -70,6 +66,9 @@ OC_Log::write('contacts','savecrop.php: files: '.$tmp_path.' exists: '.file_exi
if(file_exists($tmp_path)) {
$image = new OC_Image();
if($image->loadFromFile($tmp_path)) {
+ $w = ($w != -1 ? $w : $image->width());
+ $h = ($h != -1 ? $h : $image->height());
+ OC_Log::write('contacts','savecrop.php, x: '.$x1.' y: '.$y1.' w: '.$w.' h: '.$h, OC_Log::DEBUG);
if($image->crop($x1, $y1, $w, $h)) {
if($image->resize(200)) {
$tmpfname = tempnam("/tmp", "occCropped"); // create a new file because of caching issues.
@@ -81,7 +80,7 @@ if(file_exists($tmp_path)) {
bailOut('Error getting contact object.');
}
if($card->__isset('PHOTO')) {
- OC_Log::write('contacts','savecrop.php: files: PHOTO property exists.', OC_Log::DEBUG);
+ OC_Log::write('contacts','savecrop.php: PHOTO property exists.', OC_Log::DEBUG);
$property = $card->__get('PHOTO');
if(!$property) {
unlink($tmpfname);
diff --git a/apps/contacts/css/contacts.css b/apps/contacts/css/contacts.css
index 2d207943841..c19c6cc7113 100644
--- a/apps/contacts/css/contacts.css
+++ b/apps/contacts/css/contacts.css
@@ -1,10 +1,14 @@
/*dl > dt {
font-weight: bold;
}*/
-
-#contacts { padding-left:2px; padding-top: 5px; background: #fff; }
+#leftcontent { top: 3.5em !important; }
+#rightcontent { top: 3.5em !important; padding-top: 5px; }
+#contacts { background: #fff; width: 20em; top: 3.7em; bottom:3em; position: fixed; overflow: auto; }
+#bottomcontrols { padding: 0; bottom:0px; height:2.8em; width: 20em; margin:0; background:#eee; border-top:1px solid #ccc; position:fixed; -moz-box-shadow: 0 0 0 #000, -3px 0 7px #000; -webkit-box-shadow: 0 0 0 #000, -3px 0 7px #000; box-shadow: 0 0 0 #000, -3px 0 7px #000;}
+#contacts_newcontact { float: left; margin: 0.2em 0 0 1em; }
+#chooseaddressbook { float: right; margin: 0.2em 1em 0 0; }
#leftcontent a { height: 23px; display: block; margin: 0 0 0 0; padding: 0 0 0 25px; }
-#chooseaddressbook {margin-right: 170px; float: right;}
+#actionbar { height: 30px; width: 60px; position: fixed; right: 0px; top: 4em; margin: 0 0 0 0; padding: 0 0 0 0; z-index: 1000; }
#contacts_deletecard {position:absolute;top:15px;right:25px;}
#contacts_downloadcard {position:absolute;top:15px;right:50px;}
#contacts_propertymenu_button { position:absolute;top:15px;right:150px; background:url('../../../core/img/actions/add.svg') no-repeat center; }
@@ -13,7 +17,6 @@
#contacts_propertymenu li a { padding: 3px; display: block }
#contacts_propertymenu li:hover { background-color: #1d2d44; }
#contacts_propertymenu li a:hover { color: #fff }
-#actionbar { height: 30px; width: 200px; position: fixed; right: 0px; top: 75px; margin: 0 0 0 0; padding: 0 0 0 0; z-index: 1000; }
#card { width: auto;/*max-width: 70em; border: thin solid lightgray; display: block;*/ }
#firstrun { width: 100%; position: absolute; top: 5em; left: 0; text-align: center; font-weight:bold; font-size:1.5em; color:#777; }
#firstrun #selections { font-size:0.8em; margin: 2em auto auto auto; clear: both; }
@@ -21,7 +24,8 @@
#card input[type="text"].contacts_property,input[type="email"].contacts_property { width: 14em; float: left; }
.categories { float: left; width: 16em; }
#card input[type="text"],input[type="email"],input[type="tel"],input[type="date"], select, textarea { background-color: #fefefe; border: 0 !important; -webkit-appearance:none !important; -moz-appearance:none !important; -webkit-box-sizing:none !important; -moz-box-sizing:none !important; box-sizing:none !important; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; -moz-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; float: left; }
-#card input[type="text"]:hover, input[type="text"]:focus, input[type="text"]:active,input[type="email"]:hover,input[type="tel"]:hover,input[type="date"]:hover,input[type="date"],input[type="date"]:hover,input[type="date"]:active,input[type="date"]:active,input[type="date"]:active,input[type="email"]:active,input[type="tel"]:active, select:hover, select:focus, select:active, textarea:focus, textarea:hover { border: 0 !important; -webkit-appearance:textfield; -moz-appearance:textfield; -webkit-box-sizing:content-box; -moz-box-sizing:content-box; box-sizing:content-box; background:#fff; color:#333; border:1px solid #ddd; -moz-box-shadow:0 1px 1px #fff, 0 2px 0 #bbb inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; outline:none; float: left; }
+#card input[type="text"]:hover, input[type="text"]:focus, input[type="text"]:active,input[type="email"]:hover,input[type="tel"]:hover,input[type="date"]:hover,input[type="date"],input[type="date"]:hover,input[type="date"]:active,input[type="date"]:active,input[type="date"]:active,input[type="email"]:active,input[type="tel"]:active, select:hover, select:focus, select:active { border: 0 !important; -webkit-appearance:textfield; -moz-appearance:textfield; -webkit-box-sizing:content-box; -moz-box-sizing:content-box; box-sizing:content-box; background:#fff; color:#333; border:1px solid #ddd; -moz-box-shadow:0 1px 1px #fff, 0 2px 0 #bbb inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; outline:none; float: left; }
+textarea:focus, textarea:hover { background:#fff; color:#333; border:1px solid #ddd; -moz-box-shadow:0 1px 1px #fff, 0 2px 0 #bbb inset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; box-shadow:0 1px 1px #fff, 0 1px 0 #bbb inset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; outline:none; float: left; }
input[type="text"]:invalid,input[type="email"]:invalid,input[type="tel"]:invalid,input[type="date"]:invalid, textarea:invalid { color: #bbb !important; }
textarea { min-height: 4em; }
dl.form { width: 100%; float: left; clear: right; margin: 0; padding: 0; }
diff --git a/apps/contacts/img/contact-new.svg b/apps/contacts/img/contact-new.svg
new file mode 100644
index 00000000000..3c824dd10c9
--- /dev/null
+++ b/apps/contacts/img/contact-new.svg
@@ -0,0 +1,449 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ version="1.0"
+ width="22"
+ height="22"
+ id="svg2">
+ <defs
+ id="defs4">
+ <linearGradient
+ id="linearGradient2804">
+ <stop
+ id="stop2806"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="0" />
+ <stop
+ id="stop2812"
+ style="stop-color:#000000;stop-opacity:1"
+ offset="0.5" />
+ <stop
+ id="stop2808"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="21.875"
+ y1="48.000977"
+ x2="21.875"
+ y2="40"
+ id="linearGradient7875"
+ xlink:href="#linearGradient2804"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ cx="1"
+ cy="44"
+ r="5"
+ fx="1"
+ fy="44"
+ id="radialGradient7873"
+ xlink:href="#linearGradient2781"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2,0,0,0.8,36,8.8)" />
+ <linearGradient
+ id="linearGradient2781">
+ <stop
+ id="stop2783"
+ style="stop-color:#000000;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop2785"
+ style="stop-color:#000000;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ cx="1"
+ cy="44"
+ r="5"
+ fx="1"
+ fy="44"
+ id="radialGradient7871"
+ xlink:href="#linearGradient2781"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(2,0,0,0.8,-13,-79.2)" />
+ <linearGradient
+ x1="9.117774"
+ y1="18.345161"
+ x2="8.4885712"
+ y2="34.608616"
+ id="linearGradient7883"
+ xlink:href="#linearGradient4585"
+ gradientUnits="userSpaceOnUse" />
+ <linearGradient
+ x1="11.511479"
+ y1="0.75951481"
+ x2="31.5"
+ y2="36.625"
+ id="linearGradient7881"
+ xlink:href="#linearGradient6732"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.858045,0,0,0.8,-0.932219,9.3)" />
+ <linearGradient
+ id="linearGradient6732">
+ <stop
+ id="stop6734"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop6736"
+ style="stop-color:#dddddd;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4585">
+ <stop
+ id="stop4587"
+ style="stop-color:#9e9e9e;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop4589"
+ style="stop-color:#dddddd;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient4222">
+ <stop
+ id="stop4224"
+ style="stop-color:#ffffff;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop4226"
+ style="stop-color:#ffffff;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="24.138529"
+ y1="7.0774679"
+ x2="24.138529"
+ y2="47.272728"
+ id="linearGradient7449"
+ xlink:href="#linearGradient4222"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.2817955,0,0,0.2800956,8.7966501,33.376211)" />
+ <linearGradient
+ id="linearGradient2264">
+ <stop
+ id="stop2266"
+ style="stop-color:#d7e866;stop-opacity:1"
+ offset="0" />
+ <stop
+ id="stop2268"
+ style="stop-color:#8cab2a;stop-opacity:1"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ x1="24.103895"
+ y1="15.168831"
+ x2="24.103895"
+ y2="32.485161"
+ id="linearGradient7447"
+ xlink:href="#linearGradient2264"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.4691323,0,0,0.4663025,4.3005671,29.169788)" />
+ <linearGradient
+ x1="9.117774"
+ y1="18.345161"
+ x2="8.4885712"
+ y2="34.608616"
+ id="linearGradient2905"
+ xlink:href="#linearGradient4585"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.6013587,0,0,0.5980624,-1.0380127,-5.8062214)" />
+ <linearGradient
+ x1="11.511479"
+ y1="0.75951481"
+ x2="31.5"
+ y2="36.625"
+ id="linearGradient2918"
+ xlink:href="#linearGradient6732"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.4797481,0,0,0.4329733,-1.4240221,0.5982379)" />
+ </defs>
+ <g
+ transform="matrix(0.5106383,0,0,0.625,-2.5106384,-10)"
+ id="g2822"
+ style="opacity:0.2;display:inline">
+ <rect
+ width="10"
+ height="8"
+ x="-11"
+ y="-48"
+ transform="scale(-1,-1)"
+ id="rect1892"
+ style="fill:url(#radialGradient7871);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="10"
+ height="8"
+ x="38"
+ y="40"
+ id="rect2789"
+ style="fill:url(#radialGradient7873);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="27"
+ height="8"
+ x="11"
+ y="40"
+ id="rect2793"
+ style="fill:url(#linearGradient7875);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+ </g>
+ <g
+ transform="matrix(0.514569,0,0,0.5204006,-0.3058992,-3.571213)"
+ id="g1962"
+ style="stroke-width:1.91310632;stroke-miterlimit:4;stroke-dasharray:none;display:inline">
+ <rect
+ width="34.000015"
+ height="24"
+ rx="2.7500012"
+ ry="2.7499983"
+ x="2.5000017"
+ y="16.499996"
+ id="rect5857"
+ style="fill:url(#linearGradient7881);fill-opacity:1;fill-rule:evenodd;stroke:#939393;stroke-width:1.91310632;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="m 18.395099,22.588796 c 0,0.294138 -0.06929,0.519713 -0.207851,0.676725 -0.138572,0.155966 -0.327526,0.233949 -0.566874,0.233949 -0.09763,0 -0.191057,-0.01832 -0.280291,-0.05495 l 0,-0.417654 c 0.07874,0.05967 0.165868,0.0895 0.261393,0.0895 0.117576,0 0.205753,-0.04344 0.264545,-0.130321 0.05983,-0.08793 0.08975,-0.219293 0.08975,-0.394102 l 0,-1.392703 0.439328,0 0,1.389563 m 1.226649,-0.803906 c 0.24564,2e-6 0.441423,0.07537 0.587344,0.226098 0.145913,0.150734 0.218869,0.353281 0.218869,0.60764 0,0.276344 -0.07821,0.491974 -0.234622,0.646893 -0.156414,0.153873 -0.366362,0.230809 -0.629851,0.230809 -0.242502,0 -0.439851,-0.07589 -0.592071,-0.227669 -0.151163,-0.151778 -0.226749,-0.350661 -0.226749,-0.596648 0,-0.276342 0.07926,-0.49302 0.237775,-0.650033 0.158512,-0.158058 0.371613,-0.237088 0.639305,-0.23709 m -0.03622,1.373863 c 0.128071,0 0.231992,-0.04553 0.31178,-0.136602 0.08083,-0.09211 0.121247,-0.2172 0.121247,-0.37526 0,-0.160152 -0.03989,-0.286286 -0.119674,-0.378401 -0.07979,-0.09316 -0.182137,-0.139741 -0.307054,-0.139742 -0.123876,10e-7 -0.228854,0.04867 -0.314933,0.146022 -0.08608,0.0963 -0.12912,0.223483 -0.12912,0.381541 0,0.155967 0.04199,0.278961 0.125974,0.36898 0.08503,0.08898 0.188952,0.133462 0.31178,0.133462 m 2.675322,0.292043 -0.422011,0 0,-0.880842 c 0,-0.147591 -0.02257,-0.254359 -0.06771,-0.320306 -0.04515,-0.06699 -0.122304,-0.100487 -0.231476,-0.100488 -0.09553,1e-6 -0.174788,0.03611 -0.237767,0.108339 -0.06299,0.07223 -0.09448,0.164341 -0.09448,0.276342 l 0,0.916955 -0.426728,0 0,-2.380314 0.426728,0 0,0.997031 c 0.05774,-0.09421 0.129643,-0.164862 0.215731,-0.211967 0.08713,-0.0471 0.188428,-0.07065 0.3039,-0.07066 0.177409,2e-6 0.310731,0.05496 0.399964,0.164864 0.08923,0.10991 0.133838,0.274774 0.133848,0.49459 l 0,1.006452 m 1.93366,0 -0.42201,0 0,-0.880842 c 0,-0.147591 -0.02257,-0.254359 -0.06771,-0.320306 -0.04514,-0.06699 -0.12229,-0.100487 -0.23147,-0.100488 -0.09553,10e-7 -0.17478,0.03611 -0.23777,0.108339 -0.06299,0.07223 -0.09448,0.164341 -0.09448,0.276342 l 0,0.916955 -0.42673,0 0,-1.607811 0.42673,0 0,0.224528 c 0.05774,-0.09421 0.12965,-0.164862 0.21573,-0.211967 0.08712,-0.0471 0.18842,-0.07065 0.3039,-0.07066 0.17741,2e-6 0.31073,0.05496 0.39996,0.164864 0.08923,0.10991 0.13385,0.274774 0.13385,0.49459 l 0,1.006452 m 1.38096,-2.251563 0.79047,0 c 0.38211,2e-6 0.6687,0.09159 0.85976,0.274772 0.1921,0.183183 0.28815,0.457432 0.28815,0.822747 0,0.352756 -0.10812,0.633285 -0.32437,0.841589 -0.21521,0.208303 -0.50704,0.312455 -0.87551,0.312455 l -0.7385,0 0,-2.251563 m 0.43932,1.904565 0.28974,0 c 0.23724,0 0.42358,-0.07066 0.559,-0.211967 0.13647,-0.141311 0.20469,-0.334437 0.2047,-0.579378 -10e-6,-0.237611 -0.06614,-0.422362 -0.1984,-0.554255 -0.13228,-0.131889 -0.31651,-0.197835 -0.5527,-0.197836 l -0.30234,0 0,1.543436 m 2.62651,-1.318908 c 0.24564,2e-6 0.44142,0.07537 0.58734,0.226098 0.14591,0.150734 0.21888,0.353281 0.21888,0.60764 0,0.276344 -0.07821,0.491974 -0.23462,0.646893 -0.15642,0.153873 -0.36637,0.230809 -0.62986,0.230809 -0.2425,0 -0.43985,-0.07589 -0.59207,-0.227669 -0.15117,-0.151778 -0.22675,-0.350661 -0.22675,-0.596648 0,-0.276342 0.07926,-0.49302 0.23777,-0.650033 0.15851,-0.158058 0.37162,-0.237088 0.63931,-0.23709 m -0.03622,1.373863 c 0.12807,0 0.232,-0.04553 0.31178,-0.136602 0.08083,-0.09211 0.12125,-0.2172 0.12125,-0.37526 0,-0.160152 -0.0399,-0.286286 -0.11968,-0.378401 -0.07978,-0.09316 -0.18213,-0.139741 -0.30705,-0.139742 -0.12388,1e-6 -0.22885,0.04867 -0.31493,0.146022 -0.08608,0.0963 -0.12912,0.223483 -0.12912,0.381541 0,0.155967 0.04199,0.278961 0.12597,0.36898 0.08503,0.08898 0.18896,0.133462 0.31178,0.133462 m 2.58242,-0.419225 -1.07391,0 c 0,0.131892 0.04041,0.234473 0.12125,0.307745 0.08188,0.07223 0.19525,0.10834 0.34012,0.108339 0.15956,1e-6 0.31336,-0.04763 0.46137,-0.142882 l 0,0.348569 c -0.16586,0.08583 -0.35167,0.128751 -0.55742,0.128751 -0.2488,0 -0.44352,-0.07275 -0.58419,-0.218249 -0.13962,-0.145498 -0.20944,-0.34438 -0.20944,-0.596648 0,-0.272155 0.07454,-0.488832 0.22361,-0.650034 0.15011,-0.162244 0.34747,-0.243367 0.59206,-0.243369 0.2152,2e-6 0.38316,0.06699 0.50389,0.200976 0.12177,0.132939 0.18266,0.318737 0.18266,0.557396 l 0,0.199406 m -0.39367,-0.282623 c 0,-0.112002 -0.02834,-0.199405 -0.08503,-0.262211 -0.05563,-0.0628 -0.13489,-0.09421 -0.23777,-0.09421 -0.09342,2e-6 -0.17426,0.03245 -0.24249,0.09735 -0.06824,0.06385 -0.10655,0.15021 -0.11495,0.259071 l 0.68024,0"
+ id="text6970"
+ style="font-size:4.12102222px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:120.00000477%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Segoe" />
+ <rect
+ width="15"
+ height="2"
+ rx="1"
+ ry="1"
+ x="17"
+ y="25"
+ id="rect6978"
+ style="opacity:0.3976608;fill:#8d8d8d;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.91310632;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="10.955575"
+ height="2"
+ rx="1"
+ ry="1"
+ x="17.089211"
+ y="28"
+ id="rect6980"
+ style="opacity:0.3976608;fill:#8d8d8d;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.91310632;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <g
+ transform="matrix(0.782541,0,0,0.650248,0.39068,14.55146)"
+ id="g7033"
+ style="opacity:0.48538011;stroke-width:2.68192148;stroke-miterlimit:4;stroke-dasharray:none">
+ <rect
+ width="1"
+ height="6"
+ rx="0"
+ ry="0"
+ x="6"
+ y="30"
+ id="rect7003"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.68192148;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="1.9375"
+ height="2.9851687"
+ rx="0"
+ ry="0"
+ x="8.0846453"
+ y="30"
+ id="rect7005"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.68192148;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="1"
+ height="2.9851687"
+ x="11"
+ y="30"
+ id="rect7007"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.68192148;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="2"
+ height="2.9851687"
+ x="13"
+ y="30"
+ id="rect7009"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.68192148;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="1"
+ height="2.9851687"
+ x="16"
+ y="30"
+ id="rect7011"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.68192148;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="1"
+ height="2.9851687"
+ x="18"
+ y="30"
+ id="rect7013"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.68192148;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="1"
+ height="2.9851687"
+ x="21"
+ y="30"
+ id="rect7015"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.68192148;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="2"
+ height="2.9851687"
+ x="23"
+ y="30"
+ id="rect7017"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.68192148;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="2"
+ height="2.9851687"
+ x="26"
+ y="30"
+ id="rect7019"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.68192148;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="1"
+ height="2.9851687"
+ x="29"
+ y="30"
+ id="rect7021"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.68192148;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="1"
+ height="2.9851687"
+ x="31"
+ y="30"
+ id="rect7023"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.68192148;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="1"
+ height="2.9851687"
+ x="33"
+ y="30"
+ id="rect7025"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.68192148;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="2"
+ height="2.9851687"
+ x="35"
+ y="30"
+ id="rect7027"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.68192148;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="2"
+ height="2.9851687"
+ x="39"
+ y="30"
+ id="rect7029"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.68192148;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="1"
+ height="6"
+ x="42"
+ y="30"
+ id="rect7031"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.68192148;marker:none;visibility:visible;display:inline;overflow:visible" />
+ </g>
+ <path
+ d="m 7.4730264,37.137227 c 0.058659,0.01251 0.104375,0.03852 0.13714,0.07805 0.033172,0.03953 0.049762,0.08834 0.049762,0.14643 0,0.08915 -0.030746,0.158128 -0.092238,0.206938 -0.061492,0.04881 -0.148871,0.07322 -0.262144,0.07322 -0.038031,0 -0.077276,-0.0038 -0.117725,-0.0115 -0.040051,-0.0073 -0.081517,-0.01835 -0.124401,-0.03328 l 0,-0.117991 c 0.033986,0.01977 0.071204,0.03469 0.111653,0.04478 0.040458,0.01009 0.082731,0.01513 0.126827,0.01513 0.076869,0 0.135325,-0.01513 0.175375,-0.04538 0.04045,-0.03025 0.060678,-0.07422 0.060678,-0.131908 0,-0.05325 -0.018812,-0.0948 -0.056429,-0.124647 -0.037225,-0.03025 -0.089209,-0.04538 -0.155952,-0.04538 l -0.105589,0 0,-0.100444 0.11044,0 c 0.06028,10e-7 0.106395,-0.0119 0.138354,-0.0357 0.031959,-0.0242 0.047938,-0.05889 0.047938,-0.104074 0,-0.04639 -0.016582,-0.08189 -0.049754,-0.106494 -0.032773,-0.02501 -0.079905,-0.03752 -0.141389,-0.03752 -0.033579,0 -0.069584,0.0036 -0.108015,0.01089 -0.038438,0.0073 -0.080711,0.01856 -0.126826,0.03388 l 0,-0.108914 c 0.046522,-0.01291 0.090008,-0.02259 0.130465,-0.02904 0.040857,-0.0065 0.079287,-0.0097 0.115292,-0.0097 0.093052,2e-6 0.166674,0.02118 0.220888,0.06353 0.054207,0.04195 0.081314,0.09883 0.081314,0.170633 0,0.05002 -0.014368,0.09238 -0.043087,0.127066 -0.028719,0.03429 -0.069583,0.05809 -0.122577,0.0714 m 0.525507,0.384227 0.427808,0 0,0.102863 -0.57527,0 0,-0.102863 c 0.04653,-0.048 0.109838,-0.112343 0.189939,-0.193021 0.080508,-0.08108 0.131075,-0.13332 0.151703,-0.156716 0.039245,-0.04397 0.066548,-0.08108 0.081924,-0.111335 0.015776,-0.03066 0.023665,-0.06071 0.023665,-0.09016 0,-0.048 -0.016989,-0.08713 -0.050975,-0.117386 -0.033579,-0.03025 -0.077472,-0.04538 -0.131678,-0.04538 -0.038431,0 -0.079092,0.0067 -0.121967,0.01997 -0.042484,0.01331 -0.087989,0.03348 -0.136538,0.06051 l 0,-0.123437 c 0.049355,-0.01976 0.09547,-0.03469 0.138353,-0.04478 0.042883,-0.01008 0.082128,-0.01513 0.117726,-0.01513 0.09385,2e-6 0.168692,0.0234 0.224526,0.07019 0.055827,0.04679 0.08374,0.109319 0.08374,0.187575 0,0.03711 -0.00708,0.07241 -0.021238,0.10589 -0.013757,0.03308 -0.039041,0.07221 -0.075852,0.117385 -0.010118,0.0117 -0.04228,0.04558 -0.096487,0.101654 -0.054207,0.05567 -0.130669,0.133723 -0.229379,0.234167 m 1.022492,-0.694029 -0.309479,0.48225 0.309479,0 0,-0.48225 m -0.032162,-0.106494 0.154137,0 0,0.588744 0.129252,0 0,0.101654 -0.129252,0 0,0.212988 -0.121975,0 0,-0.212988 -0.408995,0 0,-0.117991 0.376833,-0.572407 m 0.487891,0 0.4812083,0 0,0.102864 -0.3689533,0 0,0.22146 c 0.017803,-0.0061 0.035606,-0.01049 0.053401,-0.01331 0.017803,-0.0032 0.035605,-0.0048 0.0534,-0.0048 0.101136,10e-7 0.181237,0.02763 0.2403033,0.0829 0.059066,0.05527 0.088599,0.130093 0.088599,0.224486 0,0.09722 -0.030347,0.172851 -0.091025,0.226905 -0.060686,0.05365 -0.1462413,0.08048 -0.2566893,0.08048 -0.038024,0 -0.076861,-0.0032 -0.116505,-0.0097 -0.039244,-0.0065 -0.079897,-0.01614 -0.121974,-0.02905 l 0,-0.122831 c 0.036411,0.01977 0.074036,0.03449 0.112873,0.04417 0.03883,0.0097 0.079898,0.01452 0.12318,0.01452 0.069991,0 0.12541,-0.01835 0.166274,-0.05506 0.040857,-0.03671 0.061289,-0.08653 0.061289,-0.149455 0,-0.06293 -0.020432,-0.112747 -0.061289,-0.149455 -0.040864,-0.03671 -0.096283,-0.05506 -0.166274,-0.05506 -0.032765,0 -0.065538,0.0036 -0.098303,0.01089 -0.032366,0.0073 -0.065537,0.01856 -0.099515,0.03388 l 0,-0.453811 m 1.4478736,0.08047 c -0.06311,10e-7 -0.110644,0.03106 -0.142603,0.09318 -0.03156,0.06172 -0.04734,0.154699 -0.04734,0.278942 0,0.12384 0.01578,0.216821 0.04734,0.278942 0.03196,0.06172 0.07949,0.09258 0.142603,0.09258 0.06351,0 0.11105,-0.03086 0.142602,-0.09258 0.03196,-0.06212 0.04794,-0.155102 0.04794,-0.278942 0,-0.124243 -0.01598,-0.217224 -0.04794,-0.278942 -0.03155,-0.06212 -0.07909,-0.09318 -0.142602,-0.09318 m 0,-0.09681 c 0.101542,2e-6 0.179014,0.04014 0.232414,0.120412 0.0538,0.07987 0.0807,0.196047 0.0807,0.348527 0,0.152077 -0.0269,0.268253 -0.0807,0.348527 -0.0534,0.07987 -0.130872,0.119806 -0.232414,0.119806 -0.101543,0 -0.179218,-0.03993 -0.233017,-0.119806 -0.0534,-0.08027 -0.0801,-0.19645 -0.0801,-0.348527 0,-0.15248 0.0267,-0.268656 0.0801,-0.348527 0.0538,-0.08027 0.131474,-0.12041 0.233017,-0.120412 m 0.530359,0.01634 0.481208,0 0,0.102864 -0.368945,0 0,0.22146 c 0.0178,-0.0061 0.0356,-0.01049 0.0534,-0.01331 0.0178,-0.0032 0.0356,-0.0048 0.0534,-0.0048 0.101135,1e-6 0.181236,0.02763 0.240302,0.0829 0.05906,0.05527 0.08859,0.130093 0.08859,0.224486 0,0.09722 -0.03034,0.172851 -0.09102,0.226905 -0.06069,0.05365 -0.14625,0.08048 -0.25669,0.08048 -0.03802,0 -0.07686,-0.0032 -0.116512,-0.0097 -0.03924,-0.0065 -0.0799,-0.01614 -0.121967,-0.02905 l 0,-0.122831 c 0.03641,0.01977 0.07403,0.03449 0.112866,0.04417 0.03884,0.0097 0.0799,0.01452 0.123188,0.01452 0.06998,0 0.12541,-0.01835 0.166266,-0.05506 0.04086,-0.03671 0.06129,-0.08653 0.06129,-0.149455 0,-0.06293 -0.02043,-0.112747 -0.06129,-0.149455 -0.04086,-0.03671 -0.09628,-0.05506 -0.166266,-0.05506 -0.03277,0 -0.06554,0.0036 -0.0983,0.01089 -0.03237,0.0073 -0.06554,0.01856 -0.09952,0.03388 l 0,-0.453811 m 0.791298,0 0.481208,0 0,0.102864 -0.368945,0 0,0.22146 c 0.01779,-0.0061 0.0356,-0.01049 0.0534,-0.01331 0.01779,-0.0032 0.0356,-0.0048 0.0534,-0.0048 0.101136,1e-6 0.181237,0.02763 0.240295,0.0829 0.05907,0.05527 0.0886,0.130093 0.0886,0.224486 0,0.09722 -0.03034,0.172851 -0.09103,0.226905 -0.06068,0.05365 -0.146241,0.08048 -0.256681,0.08048 -0.03803,0 -0.07687,-0.0032 -0.116512,-0.0097 -0.03924,-0.0065 -0.0799,-0.01614 -0.121967,-0.02905 l 0,-0.122831 c 0.0364,0.01977 0.07403,0.03449 0.112866,0.04417 0.03884,0.0097 0.0799,0.01452 0.123187,0.01452 0.06998,0 0.125402,-0.01835 0.166267,-0.05506 0.04086,-0.03671 0.06129,-0.08653 0.06129,-0.149455 0,-0.06293 -0.02043,-0.112747 -0.06129,-0.149455 -0.04087,-0.03671 -0.09628,-0.05506 -0.166267,-0.05506 -0.03277,0 -0.06554,0.0036 -0.09831,0.01089 -0.03237,0.0073 -0.06554,0.01856 -0.09952,0.03388 l 0,-0.453811 m 0.759135,0 0.582547,0 0,0.05204 -0.328902,0.851349 -0.128039,0 0.309479,-0.800522 -0.435085,0 0,-0.102864 m 1.219105,0 0.481208,0 0,0.102864 -0.368952,0 0,0.22146 c 0.0178,-0.0061 0.03561,-0.01049 0.0534,-0.01331 0.0178,-0.0032 0.03561,-0.0048 0.0534,-0.0048 0.101136,10e-7 0.181236,0.02763 0.240303,0.0829 0.05907,0.05527 0.0886,0.130093 0.0886,0.224486 0,0.09722 -0.03035,0.172851 -0.09103,0.226905 -0.06069,0.05365 -0.146249,0.08048 -0.256689,0.08048 -0.03802,0 -0.07686,-0.0032 -0.116505,-0.0097 -0.03924,-0.0065 -0.0799,-0.01614 -0.121975,-0.02905 l 0,-0.122831 c 0.03641,0.01977 0.07404,0.03449 0.112874,0.04417 0.03883,0.0097 0.0799,0.01452 0.12318,0.01452 0.06999,0 0.12541,-0.01835 0.166266,-0.05506 0.04087,-0.03671 0.06129,-0.08653 0.0613,-0.149455 -8e-6,-0.06293 -0.02043,-0.112747 -0.0613,-0.149455 -0.04086,-0.03671 -0.09628,-0.05506 -0.166266,-0.05506 -0.03277,0 -0.06554,0.0036 -0.0983,0.01089 -0.03237,0.0073 -0.06554,0.01856 -0.09952,0.03388 l 0,-0.453811 m 0.811315,0.800523 0.200253,0 0,-0.689188 -0.217852,0.04357 0,-0.111335 0.216639,-0.04357 0.122577,0 0,0.800523 0.200252,0 0,0.102863 -0.521869,0 0,-0.102863 m 1.032203,-0.720048 c -0.06311,1e-6 -0.110643,0.03106 -0.142602,0.09318 -0.03155,0.06172 -0.04733,0.154699 -0.04733,0.278942 0,0.12384 0.01578,0.216821 0.04733,0.278942 0.03196,0.06172 0.07949,0.09258 0.142602,0.09258 0.06351,0 0.111051,-0.03086 0.142603,-0.09258 0.03196,-0.06212 0.04794,-0.155102 0.04794,-0.278942 0,-0.124243 -0.01598,-0.217224 -0.04794,-0.278942 -0.03155,-0.06212 -0.07909,-0.09318 -0.142603,-0.09318 m 0,-0.09681 c 0.101543,2e-6 0.179014,0.04014 0.232415,0.120412 0.0538,0.07987 0.0807,0.196047 0.0807,0.348527 0,0.152077 -0.0269,0.268253 -0.0807,0.348527 -0.0534,0.07987 -0.130872,0.119806 -0.232415,0.119806 -0.101542,0 -0.179209,-0.03993 -0.233017,-0.119806 -0.0534,-0.08027 -0.0801,-0.19645 -0.0801,-0.348527 0,-0.15248 0.0267,-0.268656 0.0801,-0.348527 0.05381,-0.08027 0.131475,-0.12041 0.233017,-0.120412 m 0.806464,0.419322 c -0.05501,10e-7 -0.09871,0.01876 -0.131068,0.05627 -0.03196,0.03751 -0.04794,0.08895 -0.04794,0.154296 0,0.06494 0.01598,0.116377 0.04794,0.154295 0.03236,0.03751 0.07606,0.05627 0.131068,0.05627 0.05502,0 0.09851,-0.01876 0.130473,-0.05627 0.03236,-0.03792 0.04854,-0.08935 0.04854,-0.154295 0,-0.06535 -0.01618,-0.116781 -0.04854,-0.154296 -0.03196,-0.03751 -0.07545,-0.05627 -0.130473,-0.05627 m 0.243339,-0.383017 0,0.111335 c -0.03075,-0.01452 -0.0619,-0.02561 -0.09345,-0.03328 -0.03115,-0.0077 -0.06209,-0.0115 -0.09284,-0.0115 -0.08091,0 -0.142806,0.02723 -0.185689,0.08169 -0.04248,0.05446 -0.06675,0.136749 -0.07282,0.246873 0.02387,-0.03509 0.0538,-0.06192 0.08981,-0.08048 0.036,-0.01896 0.07565,-0.02844 0.118938,-0.02844 0.09102,1e-6 0.162831,0.02763 0.215418,0.0829 0.053,0.05486 0.0795,0.12969 0.0795,0.224486 0,0.09278 -0.02751,0.167204 -0.08253,0.223275 -0.05502,0.05607 -0.128243,0.08411 -0.219675,0.08411 -0.104775,0 -0.184876,-0.03993 -0.240295,-0.119806 -0.05543,-0.08027 -0.08314,-0.19645 -0.08314,-0.348527 0,-0.142799 0.03398,-0.256554 0.101949,-0.341266 0.06796,-0.08511 0.159185,-0.127671 0.27367,-0.127673 0.03075,2e-6 0.0617,0.003 0.09285,0.0091 0.03155,0.0061 0.06432,0.01513 0.0983,0.02723 m 0.667499,-0.01997 0.481214,0 0,0.102864 -0.368953,0 0,0.22146 c 0.0178,-0.0061 0.03561,-0.01049 0.0534,-0.01331 0.0178,-0.0032 0.03561,-0.0048 0.0534,-0.0048 0.101135,1e-6 0.181236,0.02763 0.240302,0.0829 0.05907,0.05527 0.0886,0.130093 0.0886,0.224486 0,0.09722 -0.03035,0.172851 -0.09103,0.226905 -0.06069,0.05365 -0.146249,0.08048 -0.256689,0.08048 -0.03802,0 -0.07686,-0.0032 -0.116504,-0.0097 -0.03925,-0.0065 -0.0799,-0.01614 -0.121973,-0.02905 l 0,-0.122831 c 0.03641,0.01977 0.07403,0.03449 0.112872,0.04417 0.03883,0.0097 0.0799,0.01452 0.123179,0.01452 0.06999,0 0.12541,-0.01835 0.166267,-0.05506 0.04086,-0.03671 0.06129,-0.08653 0.0613,-0.149455 -7e-6,-0.06293 -0.02043,-0.112747 -0.0613,-0.149455 -0.04086,-0.03671 -0.09628,-0.05506 -0.166267,-0.05506 -0.03277,0 -0.06554,0.0036 -0.0983,0.01089 -0.03237,0.0073 -0.06554,0.01856 -0.09952,0.03388 l 0,-0.453811 m 1.126873,0.106494 -0.309479,0.48225 0.309479,0 0,-0.48225 m -0.03216,-0.106494 0.15413,0 0,0.588744 0.129252,0 0,0.101654 -0.129252,0 0,0.212988 -0.121967,0 0,-0.212988 -0.409003,0 0,-0.117991 0.37684,-0.572407 m 0.748814,0.08047 c -0.06311,1e-6 -0.110643,0.03106 -0.142602,0.09318 -0.03155,0.06172 -0.04733,0.154699 -0.04733,0.278942 0,0.12384 0.01578,0.216821 0.04733,0.278942 0.03196,0.06172 0.07949,0.09258 0.142602,0.09258 0.06351,0 0.11105,-0.03086 0.142602,-0.09258 0.03196,-0.06212 0.04794,-0.155102 0.04794,-0.278942 0,-0.124243 -0.01598,-0.217224 -0.04794,-0.278942 -0.03155,-0.06212 -0.07909,-0.09318 -0.142602,-0.09318 m 0,-0.09681 c 0.101543,2e-6 0.179014,0.04014 0.232415,0.120412 0.0538,0.07987 0.0807,0.196047 0.0807,0.348527 0,0.152077 -0.0269,0.268253 -0.0807,0.348527 -0.0534,0.07987 -0.130872,0.119806 -0.232415,0.119806 -0.101543,0 -0.179218,-0.03993 -0.233017,-0.119806 -0.0534,-0.08027 -0.0801,-0.19645 -0.0801,-0.348527 0,-0.15248 0.0267,-0.268656 0.0801,-0.348527 0.0538,-0.08027 0.131474,-0.12041 0.233017,-0.120412 m 0.806463,0.419322 c -0.05501,10e-7 -0.09871,0.01876 -0.131067,0.05627 -0.03196,0.03751 -0.04794,0.08895 -0.04794,0.154296 0,0.06494 0.01598,0.116377 0.04794,0.154295 0.03236,0.03751 0.07606,0.05627 0.131067,0.05627 0.05502,0 0.09851,-0.01876 0.130466,-0.05627 0.03237,-0.03792 0.04855,-0.08935 0.04855,-0.154295 0,-0.06535 -0.01618,-0.116781 -0.04855,-0.154296 -0.03196,-0.03751 -0.07545,-0.05627 -0.130466,-0.05627 m 0.243339,-0.383017 0,0.111335 c -0.03075,-0.01452 -0.0619,-0.02561 -0.09345,-0.03328 -0.03115,-0.0077 -0.0621,-0.0115 -0.09284,-0.0115 -0.08092,0 -0.142806,0.02723 -0.18569,0.08169 -0.04248,0.05446 -0.06675,0.136749 -0.07282,0.246873 0.02387,-0.03509 0.05381,-0.06192 0.08981,-0.08048 0.03601,-0.01896 0.07565,-0.02844 0.118939,-0.02844 0.09103,1e-6 0.162831,0.02763 0.215418,0.0829 0.053,0.05486 0.0795,0.12969 0.0795,0.224486 0,0.09278 -0.02751,0.167204 -0.08253,0.223275 -0.05502,0.05607 -0.128243,0.08411 -0.219675,0.08411 -0.104774,0 -0.184875,-0.03993 -0.240295,-0.119806 -0.05543,-0.08027 -0.08314,-0.19645 -0.08314,-0.348527 0,-0.142799 0.03398,-0.256554 0.101942,-0.341266 0.06796,-0.08511 0.159192,-0.127671 0.273678,-0.127673 0.03075,2e-6 0.0617,0.003 0.09285,0.0091 0.03155,0.0061 0.06432,0.01513 0.0983,0.02723 m 0.6675,-0.01997 0.481216,0 0,0.102864 -0.368953,0 0,0.22146 c 0.0178,-0.0061 0.03561,-0.01049 0.0534,-0.01331 0.0178,-0.0032 0.0356,-0.0048 0.0534,-0.0048 0.101135,1e-6 0.181236,0.02763 0.240302,0.0829 0.05907,0.05527 0.08859,0.130093 0.0886,0.224486 -8e-6,0.09722 -0.03035,0.172851 -0.09103,0.226905 -0.06069,0.05365 -0.146249,0.08048 -0.256689,0.08048 -0.03802,0 -0.07686,-0.0032 -0.116504,-0.0097 -0.03925,-0.0065 -0.0799,-0.01614 -0.121975,-0.02905 l 0,-0.122831 c 0.03641,0.01977 0.07404,0.03449 0.112866,0.04417 0.03884,0.0097 0.07991,0.01452 0.123187,0.01452 0.06999,0 0.12541,-0.01835 0.166267,-0.05506 0.04086,-0.03671 0.06129,-0.08653 0.06129,-0.149455 0,-0.06293 -0.02042,-0.112747 -0.06129,-0.149455 -0.04086,-0.03671 -0.09628,-0.05506 -0.166267,-0.05506 -0.03277,0 -0.06554,0.0036 -0.0983,0.01089 -0.03237,0.0073 -0.06554,0.01856 -0.09952,0.03388 l 0,-0.453811 m 1.126867,0.106494 -0.30947,0.48225 0.30947,0 0,-0.48225 m -0.03215,-0.106494 0.15412,0 0,0.588744 0.12926,0 0,0.101654 -0.12926,0 0,0.212988 -0.12197,0 0,-0.212988 -0.409,0 0,-0.117991 0.37685,-0.572407 m 0.76398,0.402984 c -0.05502,10e-7 -0.09871,0.01876 -0.13107,0.05627 -0.03196,0.03751 -0.04794,0.08895 -0.04794,0.154296 0,0.06494 0.01598,0.116377 0.04794,0.154295 0.03236,0.03751 0.07605,0.05627 0.13107,0.05627 0.05502,0 0.09851,-0.01876 0.13047,-0.05627 0.03236,-0.03792 0.04854,-0.08935 0.04855,-0.154295 -10e-6,-0.06535 -0.01619,-0.116781 -0.04855,-0.154296 -0.03196,-0.03751 -0.07545,-0.05627 -0.13047,-0.05627 m 0.24333,-0.383017 0,0.111335 c -0.03074,-0.01452 -0.06189,-0.02561 -0.09345,-0.03328 -0.03114,-0.0077 -0.06209,-0.0115 -0.09284,-0.0115 -0.08091,0 -0.1428,0.02723 -0.18569,0.08169 -0.04247,0.05446 -0.06675,0.136749 -0.07281,0.246873 0.02386,-0.03509 0.0538,-0.06192 0.0898,-0.08048 0.03601,-0.01896 0.07566,-0.02844 0.11894,-0.02844 0.09103,1e-6 0.16283,0.02763 0.21543,0.0829 0.05299,0.05486 0.07949,0.12969 0.07949,0.224486 0,0.09278 -0.02751,0.167204 -0.08253,0.223275 -0.05502,0.05607 -0.12824,0.08411 -0.21967,0.08411 -0.10478,0 -0.18488,-0.03993 -0.2403,-0.119806 -0.05543,-0.08027 -0.08314,-0.19645 -0.08314,-0.348527 0,-0.142799 0.03399,-0.256554 0.10195,-0.341266 0.06797,-0.08511 0.15919,-0.127671 0.27368,-0.127673 0.03074,2e-6 0.06169,0.003 0.09284,0.0091 0.03155,0.0061 0.06433,0.01513 0.0983,0.02723 m 0.27186,-0.01997 0.48121,0 0,0.102864 -0.36895,0 0,0.22146 c 0.0178,-0.0061 0.03561,-0.01049 0.0534,-0.01331 0.01781,-0.0032 0.0356,-0.0048 0.0534,-0.0048 0.10114,10e-7 0.18124,0.02763 0.24031,0.0829 0.05906,0.05527 0.08859,0.130093 0.08859,0.224486 0,0.09722 -0.03034,0.172851 -0.09102,0.226905 -0.06069,0.05365 -0.14625,0.08048 -0.25669,0.08048 -0.03802,0 -0.07686,-0.0032 -0.1165,-0.0097 -0.03925,-0.0065 -0.0799,-0.01614 -0.12198,-0.02905 l 0,-0.122831 c 0.03641,0.01977 0.07404,0.03449 0.11287,0.04417 0.03883,0.0097 0.0799,0.01452 0.12318,0.01452 0.07,0 0.12541,-0.01835 0.16627,-0.05506 0.04087,-0.03671 0.06129,-0.08653 0.06129,-0.149455 0,-0.06293 -0.02042,-0.112747 -0.06129,-0.149455 -0.04086,-0.03671 -0.09627,-0.05506 -0.16627,-0.05506 -0.03276,0 -0.06553,0.0036 -0.0983,0.01089 -0.03236,0.0073 -0.06554,0.01856 -0.09952,0.03388 l 0,-0.453811 m 1.15478,0 0.58255,0 0,0.05204 -0.3289,0.851349 -0.12804,0 0.30948,-0.800522 -0.43509,0 0,-0.102864 m 1.0844,0.08047 c -0.06311,1e-6 -0.11065,0.03106 -0.14261,0.09318 -0.03156,0.06172 -0.04733,0.154699 -0.04733,0.278942 0,0.12384 0.01577,0.216821 0.04733,0.278942 0.03196,0.06172 0.0795,0.09258 0.14261,0.09258 0.06351,0 0.11104,-0.03086 0.1426,-0.09258 0.03196,-0.06212 0.04794,-0.155102 0.04794,-0.278942 0,-0.124243 -0.01598,-0.217224 -0.04794,-0.278942 -0.03156,-0.06212 -0.07909,-0.09318 -0.1426,-0.09318 m 0,-0.09681 c 0.10153,2e-6 0.179,0.04014 0.2324,0.120412 0.05381,0.07987 0.08072,0.196047 0.08072,0.348527 0,0.152077 -0.02691,0.268253 -0.08072,0.348527 -0.0534,0.07987 -0.13087,0.119806 -0.2324,0.119806 -0.10155,0 -0.17922,-0.03993 -0.23303,-0.119806 -0.0534,-0.08027 -0.0801,-0.19645 -0.0801,-0.348527 0,-0.15248 0.0267,-0.268656 0.0801,-0.348527 0.05381,-0.08027 0.13148,-0.12041 0.23303,-0.120412 m 0.80646,0.419322 c -0.05502,10e-7 -0.09871,0.01876 -0.13108,0.05627 -0.03195,0.03751 -0.04793,0.08895 -0.04793,0.154296 0,0.06494 0.01598,0.116377 0.04793,0.154295 0.03237,0.03751 0.07606,0.05627 0.13108,0.05627 0.05501,0 0.09851,-0.01876 0.13047,-0.05627 0.03235,-0.03792 0.04854,-0.08935 0.04854,-0.154295 0,-0.06535 -0.01619,-0.116781 -0.04854,-0.154296 -0.03196,-0.03751 -0.07546,-0.05627 -0.13047,-0.05627 m 0.24333,-0.383017 0,0.111335 c -0.03074,-0.01452 -0.0619,-0.02561 -0.09345,-0.03328 -0.03114,-0.0077 -0.06209,-0.0115 -0.09284,-0.0115 -0.08091,0 -0.14281,0.02723 -0.18569,0.08169 -0.04248,0.05446 -0.06675,0.136749 -0.07281,0.246873 0.02386,-0.03509 0.05379,-0.06192 0.0898,-0.08048 0.036,-0.01896 0.07566,-0.02844 0.11894,-0.02844 0.09102,1e-6 0.16283,0.02763 0.21542,0.0829 0.053,0.05486 0.07949,0.12969 0.07949,0.224486 0,0.09278 -0.0275,0.167204 -0.08252,0.223275 -0.05502,0.05607 -0.12825,0.08411 -0.21967,0.08411 -0.10478,0 -0.18488,-0.03993 -0.2403,-0.119806 -0.05543,-0.08027 -0.08314,-0.19645 -0.08314,-0.348527 0,-0.142799 0.03399,-0.256554 0.10195,-0.341266 0.06796,-0.08511 0.15918,-0.127671 0.27367,-0.127673 0.03075,2e-6 0.0617,0.003 0.09285,0.0091 0.03155,0.0061 0.06432,0.01513 0.0983,0.02723 m 0.27186,-0.01997 0.48121,0 0,0.102864 -0.36895,0 0,0.22146 c 0.0178,-0.0061 0.03561,-0.01049 0.0534,-0.01331 0.0178,-0.0032 0.03561,-0.0048 0.0534,-0.0048 0.10114,1e-6 0.18124,0.02763 0.2403,0.0829 0.05907,0.05527 0.0886,0.130093 0.0886,0.224486 0,0.09722 -0.03034,0.172851 -0.09102,0.226905 -0.06069,0.05365 -0.14625,0.08048 -0.25669,0.08048 -0.03803,0 -0.07686,-0.0032 -0.11651,-0.0097 -0.03924,-0.0065 -0.07989,-0.01614 -0.12197,-0.02905 l 0,-0.122831 c 0.03641,0.01977 0.07404,0.03449 0.11287,0.04417 0.03883,0.0097 0.0799,0.01452 0.12318,0.01452 0.06999,0 0.12541,-0.01835 0.16627,-0.05506 0.04086,-0.03671 0.06129,-0.08653 0.0613,-0.149455 -10e-6,-0.06293 -0.02044,-0.112747 -0.0613,-0.149455 -0.04086,-0.03671 -0.09628,-0.05506 -0.16627,-0.05506 -0.03276,0 -0.06554,0.0036 -0.0983,0.01089 -0.03237,0.0073 -0.06554,0.01856 -0.09952,0.03388 l 0,-0.453811 m 1.15478,0 0.58255,0 0,0.05204 -0.3289,0.851349 -0.12804,0 0.30948,-0.800522 -0.43509,0 0,-0.102864 m 1.09956,0.402984 c -0.05502,1e-6 -0.09871,0.01876 -0.13107,0.05627 -0.03196,0.03751 -0.04794,0.08895 -0.04794,0.154296 0,0.06494 0.01598,0.116377 0.04794,0.154295 0.03236,0.03751 0.07605,0.05627 0.13107,0.05627 0.05502,0 0.09851,-0.01876 0.13047,-0.05627 0.03236,-0.03792 0.04854,-0.08935 0.04854,-0.154295 0,-0.06535 -0.01618,-0.116781 -0.04854,-0.154296 -0.03196,-0.03751 -0.07545,-0.05627 -0.13047,-0.05627 m 0.24334,-0.383017 0,0.111335 c -0.03075,-0.01452 -0.0619,-0.02561 -0.09345,-0.03328 -0.03115,-0.0077 -0.0621,-0.0115 -0.09285,-0.0115 -0.08091,0 -0.14281,0.02723 -0.18569,0.08169 -0.04248,0.05446 -0.06675,0.136749 -0.07281,0.246873 0.02386,-0.03509 0.0538,-0.06192 0.08981,-0.08048 0.036,-0.01896 0.07565,-0.02844 0.11894,-0.02844 0.09101,10e-7 0.16282,0.02763 0.21541,0.0829 0.053,0.05486 0.07949,0.12969 0.07949,0.224486 0,0.09278 -0.0275,0.167204 -0.08252,0.223275 -0.05502,0.05607 -0.12824,0.08411 -0.21967,0.08411 -0.10477,0 -0.18487,-0.03993 -0.2403,-0.119806 -0.05542,-0.08027 -0.08313,-0.19645 -0.08313,-0.348527 0,-0.142799 0.03398,-0.256554 0.10194,-0.341266 0.06796,-0.08511 0.15919,-0.127671 0.27368,-0.127673 0.03074,2e-6 0.06169,0.003 0.09284,0.0091 0.03156,0.0061 0.06432,0.01513 0.09831,0.02723 m 0.23969,-0.01997 0.58255,0 0,0.05204 -0.3289,0.851349 -0.12803,0 0.30947,-0.800522 -0.43509,0 0,-0.102864 m 0.82589,0.884629 0,-0.111335 c 0.03074,0.01452 0.06189,0.02562 0.09344,0.03328 0.03156,0.0077 0.06251,0.0115 0.09285,0.0115 0.08091,0 0.1426,-0.02703 0.18508,-0.08108 0.04288,-0.05446 0.06735,-0.13695 0.07342,-0.247479 -0.02346,0.03469 -0.05319,0.06132 -0.0892,0.07987 -0.036,0.01856 -0.07585,0.02783 -0.11954,0.02783 -0.09062,0 -0.16243,-0.02723 -0.21542,-0.08169 -0.0526,-0.05486 -0.07889,-0.129688 -0.07889,-0.224485 0,-0.09278 0.02751,-0.167204 0.08252,-0.223275 0.05503,-0.05607 0.12825,-0.08411 0.21968,-0.08411 0.10477,2e-6 0.18467,0.04014 0.23969,0.120412 0.05542,0.07987 0.08313,0.196047 0.08314,0.348527 -10e-6,0.142396 -0.03399,0.256151 -0.10195,0.341266 -0.06756,0.08471 -0.15858,0.127067 -0.27307,0.127067 -0.03074,0 -0.0619,-0.003 -0.09345,-0.0091 -0.03156,-0.0061 -0.06432,-0.01513 -0.0983,-0.02723 m 0.24394,-0.383016 c 0.05501,0 0.09851,-0.01876 0.13046,-0.05627 0.03236,-0.03751 0.04855,-0.08895 0.04855,-0.154296 0,-0.06495 -0.01619,-0.116174 -0.04855,-0.15369 -0.03195,-0.03792 -0.07545,-0.05688 -0.13046,-0.05688 -0.05502,10e-7 -0.09871,0.01896 -0.13108,0.05688 -0.03195,0.03752 -0.04793,0.08874 -0.04793,0.15369 0,0.06535 0.01598,0.116781 0.04793,0.154296 0.03237,0.03751 0.07606,0.05627 0.13108,0.05627 m 0.54735,0.383016 0,-0.111335 c 0.03074,0.01452 0.0619,0.02562 0.09345,0.03328 0.03155,0.0077 0.0625,0.0115 0.09285,0.0115 0.0809,0 0.1426,-0.02703 0.18508,-0.08108 0.04288,-0.05446 0.06735,-0.13695 0.07342,-0.247479 -0.02347,0.03469 -0.0532,0.06132 -0.0892,0.07987 -0.036,0.01856 -0.07586,0.02783 -0.11955,0.02783 -0.09062,0 -0.16242,-0.02723 -0.21542,-0.08169 -0.05259,-0.05486 -0.07888,-0.129688 -0.07888,-0.224485 0,-0.09278 0.0275,-0.167204 0.08252,-0.223275 0.05502,-0.05607 0.12825,-0.08411 0.21967,-0.08411 0.10478,2e-6 0.18468,0.04014 0.2397,0.120412 0.05542,0.07987 0.08313,0.196047 0.08313,0.348527 0,0.142396 -0.03398,0.256151 -0.10194,0.341266 -0.06757,0.08471 -0.15858,0.127067 -0.27308,0.127067 -0.03074,0 -0.06189,-0.003 -0.09345,-0.0091 -0.03155,-0.0061 -0.06432,-0.01513 -0.0983,-0.02723 m 0.24394,-0.383016 c 0.05502,0 0.09851,-0.01876 0.13046,-0.05627 0.03237,-0.03751 0.04855,-0.08895 0.04855,-0.154296 0,-0.06495 -0.01618,-0.116174 -0.04855,-0.15369 -0.03195,-0.03792 -0.07544,-0.05688 -0.13046,-0.05688 -0.05501,10e-7 -0.09871,0.01896 -0.13107,0.05688 -0.03196,0.03752 -0.04794,0.08874 -0.04794,0.15369 0,0.06535 0.01598,0.116781 0.04794,0.154296 0.03236,0.03751 0.07606,0.05627 0.13107,0.05627"
+ id="text7050"
+ style="font-size:1.58812129px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:120.00000477%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans" />
+ <rect
+ width="9.9773989"
+ height="11.70446"
+ rx="0.31249964"
+ ry="0.31249976"
+ x="5.0519104"
+ y="19.740776"
+ id="rect6553"
+ style="fill:url(#linearGradient7883);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.91310632;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <g
+ transform="matrix(0.300427,0,0,0.299566,-1.239336,19.26775)"
+ id="g6935"
+ style="fill:#939393;fill-opacity:1;stroke:none">
+ <path
+ d="m 50.301157,40.747425 c 1.035639,-2.982476 0.176777,-8.892289 -6.540737,-13.488483 l -12.551146,0 c -6.717514,4.24264 -7.556991,10.044831 -6.010407,13.435028 0,0 25.10229,0.05345 25.10229,0.05345 z"
+ id="path2329"
+ style="fill:#939393;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:6.3771019;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="m 39.774755,19.008621 a 8.6620579,8.6620579 0 1 1 -17.324115,0 8.6620579,8.6620579 0 1 1 17.324115,0 z"
+ transform="translate(6.407083,1.742408)"
+ id="path2327"
+ style="fill:#939393;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:6.3771019;marker:none;visibility:visible;display:inline;overflow:visible" />
+ </g>
+ <rect
+ width="32.000011"
+ height="22.000008"
+ rx="1.7777265"
+ ry="1.7777265"
+ x="3.500001"
+ y="17.499992"
+ id="rect6555"
+ style="fill:none;stroke:#ffffff;stroke-width:1.91310632;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+ </g>
+ <rect
+ width="19.010012"
+ height="12.989197"
+ rx="0.9554745"
+ ry="0.9554745"
+ x="0.49499393"
+ y="4.4949956"
+ id="rect2373"
+ style="fill:url(#linearGradient2918);fill-opacity:1;fill-rule:evenodd;stroke:#939393;stroke-width:0.98998767;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="M 9.573176,7.5087174 C 9.590116,7.7680994 9.459654,8.110498 9.152277,8.098906 8.958476,8.135 9.00126,7.9554092 8.999999,7.8327116 c 0.01424,-0.046426 0.295053,0.099821 0.30707,-0.1145656 0.05248,-0.2799917 0.01703,-0.5689122 0.02743,-0.8530236 0.01861,-0.077288 -0.03848,-0.2302757 0.03074,-0.2569546 0.07626,0.018668 0.244681,-0.054816 0.207937,0.076861 0,0.274563 0,0.549126 0,0.823689 z m 0.666423,-0.520996 c 0.327668,-0.014597 0.482629,0.3578734 0.433525,0.636919 0.0068,0.3228281 -0.345852,0.5791316 -0.644403,0.4353456 C 9.704875,7.8929322 9.691675,7.4076643 9.892273,7.1413744 9.975553,7.0377977 10.108341,6.9850262 10.239599,6.9877214 z m -0.01968,0.890375 c 0.304692,-0.030483 0.316983,-0.5638347 0.05202,-0.661867 -0.36198,-0.062264 -0.396644,0.6507089 -0.05203,0.661867 z M 11.67338,8.067362 c -0.07409,-0.02283 -0.249813,0.05597 -0.229273,-0.06149 -0.0078,-0.2265064 0.01884,-0.4563068 -0.02069,-0.6799369 -0.133462,-0.2597947 -0.394183,0.039327 -0.322354,0.2393985 0,0.1673424 0,0.3346849 0,0.5020274 -0.06841,-0.02424 -0.238002,0.0527 -0.231836,-0.04612 0,-0.4988398 0,-0.9976796 0,-1.4965193 0.06841,0.024237 0.238002,-0.052701 0.231836,0.046116 0,0.2000137 0,0.4000275 0,0.6000412 0.09467,-0.2631603 0.52995,-0.2338573 0.554136,0.057239 0.03479,0.2770226 0.01132,0.5601297 0.01819,0.8392391 z m 1.050542,0 c -0.07409,-0.02283 -0.249812,0.05597 -0.229272,-0.06149 -0.0078,-0.2265063 0.01885,-0.4563082 -0.02069,-0.6799369 -0.133464,-0.2597948 -0.394189,0.039325 -0.322359,0.2393985 0,0.1673424 0,0.3346849 0,0.5020274 -0.06841,-0.02424 -0.238002,0.0527 -0.231836,-0.04612 0,-0.3319583 0,-0.6639165 0,-0.9958747 0.06841,0.024238 0.238002,-0.052701 0.231836,0.046116 -0.03571,0.2312441 0.209359,-0.2396496 0.380638,-0.06874 0.240483,0.1084785 0.183823,0.4097303 0.191684,0.6275647 0,0.1456834 0,0.2913669 0,0.43705 z m 0.750256,-1.4591942 c 0.287395,0.017381 0.614129,-0.064527 0.855192,0.136339 0.241518,0.2432184 0.239005,0.6444255 0.129069,0.9487409 -0.101991,0.2707825 -0.399103,0.4051683 -0.675276,0.3741143 -0.102995,0 -0.20599,0 -0.308985,0 0,-0.4863978 0,-0.972796 0,-1.4591942 z m 0.238677,1.2343116 c 0.191729,0.012265 0.423493,-0.0084 0.509764,-0.2123525 0.125197,-0.2621459 0.08546,-0.7123857 -0.25456,-0.7799037 -0.08731,0.013084 -0.301155,-0.074906 -0.255204,0.084219 0,0.3026791 0,0.6053583 0,0.9080374 z m 1.42695,-0.854758 c 0.327666,-0.014597 0.482632,0.3578735 0.433529,0.636919 0.0068,0.3228301 -0.345854,0.5791316 -0.644405,0.4353456 -0.323851,-0.1670528 -0.337044,-0.6523186 -0.136452,-0.9186116 0.08327,-0.1035815 0.216071,-0.1563463 0.347328,-0.153653 z m -0.01968,0.890375 c 0.304693,-0.030481 0.316984,-0.5638342 0.05202,-0.661867 -0.361983,-0.062264 -0.396638,0.6507079 -0.05202,0.661867 z m 1.402995,-0.271693 c -0.194481,0 -0.388962,0 -0.583443,0 -0.0552,0.3638961 0.428733,0.2312211 0.50132,0.2231744 0.0509,0.1786152 -0.08967,0.2676342 -0.26143,0.2619212 -0.326493,0.04945 -0.51851,-0.3067037 -0.470681,-0.5912713 -0.01895,-0.3067557 0.287558,-0.6268862 0.59737,-0.4819783 0.217779,0.1086926 0.22174,0.3767488 0.216872,0.588154 z m -0.213867,-0.183162 c 0.06051,-0.3207056 -0.437363,-0.2580341 -0.354198,0 0.118065,0 0.236131,0 0.354196,0 z"
+ id="path2375"
+ style="font-size:4.12102222px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:120.00000477%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;display:inline;font-family:Segoe" />
+ <rect
+ width="7.499999"
+ height="1.0494535"
+ rx="0.49999997"
+ ry="0.52472675"
+ x="8.999999"
+ y="9.148365"
+ id="rect2377"
+ style="opacity:0.3976608;fill:#8d8d8d;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="5.9999995"
+ height="1.0494535"
+ rx="0.49999997"
+ ry="0.52472675"
+ x="8.999999"
+ y="10.722544"
+ id="rect2379"
+ style="opacity:0.3976608;fill:#8d8d8d;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="M 2,13.875 2,16 l 0.5,0 0,-2.125 -0.5,0 z m 1,0 0,1.03125 1,0 0,-1.03125 -1,0 z m 1.5,0 0,1.03125 0.5,0 0,-1.03125 -0.5,0 z m 1,0 0,1.03125 1,0 0,-1.03125 -1,0 z m 2,0 0,1.03125 0.5,0 0,-1.03125 -0.5,0 z m 1,0 0,1.03125 1,0 0,-1.03125 -1,0 z m 1.5,0 0,1.03125 1,0 0,-1.03125 -1,0 z"
+ id="rect2383"
+ style="opacity:0.48538011;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="6"
+ height="7"
+ rx="0.1879245"
+ ry="0.18689443"
+ x="2"
+ y="6.0000019"
+ id="rect2415"
+ style="fill:url(#linearGradient2905);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <path
+ d="M 4.875,7.78125 C 3.8870611,7.793019 3.080052,8.859894 3.4154196,9.806677 c 0.017081,0.268718 0.4174298,0.608587 0.4479609,0.724573 -0.1722069,0.02911 -0.306249,0.185322 -0.4511408,0.280441 -0.5465131,0.430888 -0.9751065,1.121725 -0.8550737,1.839996 0.037643,0.13003 0.038179,0.371169 0.2276924,0.317063 1.5300472,0 3.0600944,0 4.5901416,0 C 7.5889424,12.308501 7.2812244,11.590921 6.8329971,11.102488 6.6295102,10.884377 6.3989205,10.677674 6.1419602,10.53125 5.8980366,10.567057 6.224519,10.402258 6.2603926,10.309569 6.971785,9.545478 6.5651174,8.193913 5.5882976,7.8835708 5.3616343,7.798463 5.1163878,7.7635579 4.875,7.78125 z"
+ id="path2419"
+ style="fill:#939393;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:5.84023809;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <rect
+ width="17.001713"
+ height="10.948627"
+ rx="0.14346921"
+ ry="0.14346921"
+ x="1.4788659"
+ y="5.5054727"
+ id="rect2423"
+ style="fill:none;stroke:#ffffff;stroke-width:0.98998767;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible" />
+ <g
+ transform="translate(1.389377,-23.361317)"
+ id="g7443"
+ style="display:inline">
+ <path
+ d="m 13.100088,37.861326 0,-3 4,0 0,3 3,0 0,4 -3,0 0,2.999991 -4,0 0,-2.999991 -2.989465,0 0,-4 2.989465,0 z"
+ id="path5596"
+ style="fill:url(#linearGradient7447);fill-opacity:1;fill-rule:evenodd;stroke:#699536;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+ <path
+ d="m 14.100088,38.861326 0,-3 2,0 0,3 3,0 0,2 -3,0 0,3 -2,0 0,-3 -3,0 0,-2 3,0 z"
+ id="path5598"
+ style="opacity:0.4;fill:none;stroke:url(#linearGradient7449);stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;display:inline" />
+ </g>
+</svg>
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js
index 5f2bd6e9df9..b491b3a90ef 100644
--- a/apps/contacts/js/contacts.js
+++ b/apps/contacts/js/contacts.js
@@ -387,10 +387,11 @@ Contacts={
$('#note').data('checksum', this.data.NOTE[0]['checksum']);
$('#note').find('textarea').val(this.data.NOTE[0]['value']);
$('#note').show();
+ $('#contacts_propertymenu a[data-type="NOTE"]').parent().hide();
} else {
$('#note').data('checksum', '');
$('#note').find('textarea').val('');
- //$('#note').hide();
+ $('#note').hide();
}
},
loadSingleProperties:function() {
@@ -536,7 +537,7 @@ Contacts={
},*/
editNew:function(){ // add a new contact
this.id = ''; this.fn = ''; this.fullname = ''; this.givname = ''; this.famname = ''; this.addname = ''; this.honpre = ''; this.honsuf = '';
- Contacts.UI.Card.add(';;;;', '', '', true);
+ Contacts.UI.Card.add(t('contacts', 'Contact')+';'+t('contacts', 'New')+';;;', t('contacts', 'New Contact'), '', true);
/*$.getJSON(OC.filePath('contacts', 'ajax', 'newcontact.php'),{},function(jsondata){
if(jsondata.status == 'success'){
id = '';
@@ -1403,6 +1404,14 @@ $(document).ready(function(){
Contacts.UI.Card.saveProperty(this);
});
+ $('#fn').blur(function(){
+ if($('#fn').val() == '') {
+ OC.dialogs.alert(t('contacts','The name field cannot be empty. Please enter a name for this contact.'), t('contacts','Name is empty'), function() { $('#fn').focus(); });
+ $('#fn').focus();
+ return false;
+ }
+ });
+
// Name has changed. Update it and reorder.
$('#fn').live('change',function(){
var name = $('#fn').val();
@@ -1429,19 +1438,19 @@ $(document).ready(function(){
$('#file_upload_start').live('change',function(){
Contacts.UI.Card.uploadPhoto(this.files);
});
- $('#contacts_details_photo').bind('dragover',function(event){
+ $('#contacts_details_photo_wrapper').bind('dragover',function(event){
console.log('dragover');
$(event.target).css('background-color','red');
event.stopPropagation();
event.preventDefault();
});
- $('#contacts_details_photo').bind('dragleave',function(event){
+ $('#contacts_details_photo_wrapper').bind('dragleave',function(event){
console.log('dragleave');
$(event.target).css('background-color','white');
//event.stopPropagation();
//event.preventDefault();
});
- $('#contacts_details_photo').bind('drop',function(event){
+ $('#contacts_details_photo_wrapper').bind('drop',function(event){
event.stopPropagation();
event.preventDefault();
console.log('drop');
diff --git a/apps/contacts/js/jquery.multi-autocomplete.js b/apps/contacts/js/jquery.multi-autocomplete.js
index e1c5d63dc5f..5516a74b039 100644
--- a/apps/contacts/js/jquery.multi-autocomplete.js
+++ b/apps/contacts/js/jquery.multi-autocomplete.js
@@ -31,7 +31,9 @@
} else {
self.element.val(tmp);
}
- self.element.trigger('change'); // Changes wasn't saved when only using the dropdown.
+ if(self.element.val().trim() != '') {
+ self.element.trigger('change'); // Changes wasn't saved when only using the dropdown.
+ }
});
this.element.bind( "keydown", function( event ) {
if ( event.keyCode === $.ui.keyCode.TAB &&
diff --git a/apps/contacts/templates/index.php b/apps/contacts/templates/index.php
index b14a35e19ed..256d10afc07 100644
--- a/apps/contacts/templates/index.php
+++ b/apps/contacts/templates/index.php
@@ -3,17 +3,23 @@
var categories = <?php echo json_encode($_['categories']); ?>;
var lang = '<?php echo OC_Preferences::getValue(OC_User::getUser(), 'core', 'lang', 'en'); ?>';
</script>
-<div id="controls">
+<!-- div id="controls">
<form>
<input type="button" id="contacts_newcontact" value="<?php echo $l->t('Add Contact'); ?>">
<input type="button" id="chooseaddressbook" value="<?php echo $l->t('Addressbooks'); ?>">
</form>
-</div>
+</div -->
<div id="leftcontent" class="leftcontent">
<ul id="contacts">
<?php echo $this->inc("part.contacts"); ?>
</ul>
</div>
+ <div id="bottomcontrols">
+ <form>
+ <img class="svg" id="contacts_newcontact" src="img/contact-new.svg" alt="<?php echo $l->t('Add Contact'); ?>" title="<?php echo $l->t('Add Contact'); ?>" />
+ <img class="svg" id="chooseaddressbook" src="../../core/img/actions/settings.svg" alt="<?php echo $l->t('Addressbooks'); ?>" title="<?php echo $l->t('Addressbooks'); ?>" />
+ </form>
+ </div>
<div id="rightcontent" class="rightcontent" data-id="<?php echo $_['id']; ?>">
<?php
if ($_['id']){
diff --git a/apps/contacts/templates/settings.php b/apps/contacts/templates/settings.php
index 5627a15c50a..8a24a91e952 100644
--- a/apps/contacts/templates/settings.php
+++ b/apps/contacts/templates/settings.php
@@ -1,7 +1,7 @@
<form id="contacts">
<fieldset class="personalblock">
- <strong><?php echo $l->t('Contacts'); ?></strong><br />
- <?php echo $l->t('CardDAV syncing addresses:'); ?>
+ <legend><?php echo $l->t('Contacts'); ?></legend>
+ <?php echo $l->t('CardDAV syncing addresses'); ?> (<a href="http://owncloud.org/synchronisation/" target="_blank"><?php echo $l->t('more info'); ?></a>)
<dl>
<dt><?php echo $l->t('Primary address (Kontact et al)'); ?></dt>
<dd><code><?php echo OC_Helper::linkToAbsolute('contacts', 'carddav.php'); ?>/</code></dd>
diff --git a/apps/files/templates/admin.php b/apps/files/templates/admin.php
index 9bcc40e9361..01fe1105260 100644
--- a/apps/files/templates/admin.php
+++ b/apps/files/templates/admin.php
@@ -7,9 +7,13 @@
<label for="maxUploadSize"><?php echo $l->t( 'Maximum upload size' ); ?> </label><input name='maxUploadSize' id="maxUploadSize" value='<?php echo $_['uploadMaxFilesize'] ?>'/>(<?php echo $l->t('max. possible: '); echo $_['maxPossibleUploadSize'] ?>)<br/>
<?php endif;?>
<input type="checkbox" name="allowZipDownload" id="allowZipDownload" value="1" title="<?php echo $l->t( 'Needed for multi-file and folder downloads.' ); ?>"<?php if ($_['allowZipDownload']) echo ' checked="checked"'; ?> /> <label for="allowZipDownload"><?php echo $l->t( 'Enable ZIP-download' ); ?></label> <br/>
- <fieldset class="personalblock">
- <label for="maxZipInputSize"><?php echo $l->t( 'Maximum input size for ZIP files:' ); ?> </label><input name="maxZipInputSize" id="maxZipInputSize" value='<?php echo $_['maxZipInputSize'] ?>' title="<?php echo $l->t( '0 is unlimited' ); ?>"<?php if (!$_['allowZipDownload']) echo ' disabled="disabled"'; ?> /><br/>
- </fieldset>
+
+ <input name="maxZipInputSize" id="maxZipInputSize" style="width:180px;" value='<?php echo $_['maxZipInputSize'] ?>' title="<?php echo $l->t( '0 is unlimited' ); ?>"<?php if (!$_['allowZipDownload']) echo ' disabled="disabled"'; ?> />
+ <label for="maxZipInputSize"><?php echo $l->t( 'Maximum input size for ZIP files' ); ?> </label><br />
+
<input type="submit" name="submitFilesAdminSettings" id="submitFilesAdminSettings" value="Save"/>
</fieldset>
</form>
+
+
+
diff --git a/apps/media/templates/settings.php b/apps/media/templates/settings.php
index 2907c616cf6..941c17ff597 100644
--- a/apps/media/templates/settings.php
+++ b/apps/media/templates/settings.php
@@ -2,6 +2,6 @@
<fieldset class="personalblock">
<strong>Media</strong><br />
Ampache address:
- <?php echo OC_Helper::linkToAbsolute('media', ''); ?><br />
+ <code><?php echo OC_Helper::linkToAbsolute('media', ''); ?></code><br />
</fieldset>
</form>
diff --git a/apps/remoteStorage/templates/settings.php b/apps/remoteStorage/templates/settings.php
index 9b5c3b6229c..b940282b2cc 100644
--- a/apps/remoteStorage/templates/settings.php
+++ b/apps/remoteStorage/templates/settings.php
@@ -1,6 +1,6 @@
<fieldset class="personalblock">
<?php
- echo '<img src="/apps/remoteStorage/remoteStorage.png" style="width:16px"> '
+ echo '<img src="../apps/remoteStorage/remoteStorage.png" style="width:16px"> '
.'<strong>'.$l->t('remoteStorage').'</strong> user address: '
.OC_User::getUser().'@'.$_SERVER['SERVER_NAME']
.' (<a href="http://unhosted.org/">more info</a>)';
diff --git a/apps/user_migrate/templates/admin.php b/apps/user_migrate/templates/admin.php
index b01e5c7579a..ff51f43ffde 100644
--- a/apps/user_migrate/templates/admin.php
+++ b/apps/user_migrate/templates/admin.php
@@ -6,7 +6,7 @@
<?php } ?>
<legend><strong><?php echo $l->t('Import user account');?></strong></legend>
</p>
- <p><input type="file" id="owncloud_import" name="owncloud_import"><label for="owncloud_import"><?php echo $l->t('ownCloud User Zip');?></label>
+ <p><input type="file" id="owncloud_import" name="owncloud_import" style="width:180px;"><label for="owncloud_import"> <?php echo $l->t('ownCloud User Zip');?></label>
</p>
<input type="submit" name="user_import" value="<?php echo $l->t('Import'); ?>" />
</fieldset>