summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2012-06-21 16:42:16 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2012-06-21 16:42:16 +0200
commit1338279ca02af2444a7277a041bec18aab615774 (patch)
treebeb2518ad49fedc57cd1bf45b36d5f4f2e36c0ed /apps
parent34739b7ec5b5bb26f993704b169937d3f04ed7c7 (diff)
parent49d9eb7acf8636eed2e25292df924694fc4ccd47 (diff)
downloadnextcloud-server-1338279ca02af2444a7277a041bec18aab615774.tar.gz
nextcloud-server-1338279ca02af2444a7277a041bec18aab615774.zip
Merge branch 'master' of gitorious.org:owncloud/owncloud
Diffstat (limited to 'apps')
-rw-r--r--apps/calendar/ajax/events.php2
-rw-r--r--apps/calendar/lib/app.php3
-rw-r--r--apps/files_versions/js/settings-personal.js78
3 files changed, 37 insertions, 46 deletions
diff --git a/apps/calendar/ajax/events.php b/apps/calendar/ajax/events.php
index 7178358c7b5..ae55cbc02db 100644
--- a/apps/calendar/ajax/events.php
+++ b/apps/calendar/ajax/events.php
@@ -22,7 +22,7 @@ $calendar_id = (is_null($calendar_id)?strip_tags($_GET['calendar_id']):$calendar
$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']);
-$events = OC_Calendar_App::getrequestedEvents($calendar_id, $start, $end);
+$events = OC_Calendar_App::getrequestedEvents($_GET['calendar_id'], $start, $end);
$output = array();
foreach($events as $event){
$output = array_merge($output, OC_Calendar_App::generateEventOutput($event, $start, $end));
diff --git a/apps/calendar/lib/app.php b/apps/calendar/lib/app.php
index 167382a5e7d..8e13b13b8a3 100644
--- a/apps/calendar/lib/app.php
+++ b/apps/calendar/lib/app.php
@@ -338,6 +338,9 @@ class OC_Calendar_App{
$singleevents = OC_Calendar_Share::allSharedwithuser(OCP\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']);
+ if(!array_key_exists('summary', $event)){
+ $event['summary'] = self::$l10n->t('unnamed');
+ }
$event['summary'] .= ' (' . self::$l10n->t('by') . ' ' . OC_Calendar_Object::getowner($event['id']) . ')';
$events[] = $event;
}
diff --git a/apps/files_versions/js/settings-personal.js b/apps/files_versions/js/settings-personal.js
index d9456f3f2af..6ea8c1a950f 100644
--- a/apps/files_versions/js/settings-personal.js
+++ b/apps/files_versions/js/settings-personal.js
@@ -1,51 +1,39 @@
-// $(document).ready(function(){
-// $('#versions').change( function(){
-// OC.msg.startSaving('#calendar .msg')
-// // Serialize the data
-// var post = $( '#timezone' ).serialize();
-// $.post( OC.filePath('calendar', 'ajax/settings', 'settimezone.php'), post, function(data){
-// //OC.msg.finishedSaving('#calendar .msg', data);
-// });
-// return false;
-// });
-// });
+// TODO: allow the button to be clicked only once
-$(document).ready(function(){
+$( document ).ready(function(){
//
- $('#expireAllBtn').click(function(){
+ $( '#expireAllBtn' ).click(
- // Prevent page from reloading
- event.preventDefault();
+ function( event ) {
- // Show loading gif
- $('.expireAllLoading').show();
-
- $.getJSON(
- OC.filePath('files_versions','ajax','expireAll.php'),
- function(result){
- if (result.status == 'success') {
- $('.expireAllLoading').hide();
- $('#expireAllBtn').html('Expiration successful');
- } else {
-
- // Cancel loading
- $('#expireAllBtn').html('Expiration failed');
-
- // Show Dialog
- OC.dialogs.alert(
- 'Something went wrong, your files may not have been expired',
- 'An error has occurred',
- function(){
- $('#expireAllBtn').html(t('files_versions', 'Expire all versions')+'<img style="display: none;" class="loading" src="'+OC.filePath('core','img','loading.gif')+'" />');
- }
-
- );
-
- }
- }
+ // Prevent page from reloading
+ event.preventDefault();
- );
-
- });
-
+ // Show loading gif
+ $('.expireAllLoading').show();
+
+ $.getJSON(
+ OC.filePath('files_versions','ajax','expireAll.php'),
+ function(result){
+ if (result.status == 'success') {
+ $('.expireAllLoading').hide();
+ $('#expireAllBtn').html('Expiration successful');
+ } else {
+
+ // Cancel loading
+ $('#expireAllBtn').html('Expiration failed');
+
+ // Show Dialog
+ OC.dialogs.alert(
+ 'Something went wrong, your files may not have been expired',
+ 'An error has occurred',
+ function(){
+ $('#expireAllBtn').html(t('files_versions', 'Expire all versions')+'<img style="display: none;" class="loading" src="'+OC.filePath('core','img','loading.gif')+'" />');
+ }
+ );
+ }
+ }
+ );
+ }
+ );
}); \ No newline at end of file