commit
0939b1b0ab
@ -1,8 +1,21 @@ |
||||
<?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 id="' . OCP\USER::getUser() . '_' . $_['calendar']['id'] . '"><label for="active_' . $_['calendar']['id'] . '">' . $_['calendar']['displayname'] . '</label></td>'; |
||||
echo '<td width="20px"><a href="#" onclick="Calendar.UI.Share.dropdown(\'' . OCP\USER::getUser() . '\', \'' . $_['calendar']['id'] . '\');" title="' . $l->t("Share Calendar") . '" class="action"><img class="svg action" src="' . ((!$_['shared']) ? OCP\Util::imagePath('core', 'actions/share.svg') : OCP\Util::imagePath('core', 'actions/shared.svg')) . '"></a></td>'; |
||||
echo '<td width="20px"><a href="#" onclick="Calendar.UI.showCalDAVUrl(\'' . OCP\USER::getUser() . '\', \'' . $_['calendar']['uri'] . '\');" title="' . $l->t("CalDav Link") . '" class="action"><img class="svg action" src="'.OCP\Util::imagePath('core', 'actions/public.svg').'"></a></td>'; |
||||
echo '<td width="20px"><a href="?app=calendar&getfile=export.php?calid=' . $_['calendar']['id'] . '" title="' . $l->t('Download') . '" class="action"><img class="svg action" src="'.OCP\Util::imagePath('core', '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="'.OCP\Util::imagePath('core', '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="'.OCP\Util::imagePath('core', 'actions/delete.svg').'"></a></td>'; |
||||
<td width="20px"> |
||||
<input type="checkbox" id="active_<?php echo $_['calendar']['id'] ?>" onclick="Calendar.UI.Calendar.activation(this,<?php echo $_['calendar']['id'] ?>)"<?php echo $_['calendar']['active'] ? ' checked="checked"' : '' ?>>
|
||||
</td> |
||||
<td id="<?php echo OCP\USER::getUser() ?>_<?php echo $_['calendar']['id'] ?>">
|
||||
<label for="active_<?php echo $_['calendar']['id'] ?>"><?php echo $_['calendar']['displayname'] ?></label>
|
||||
</td> |
||||
<td width="20px"> |
||||
<a href="#" onclick="Calendar.UI.Share.dropdown('<?php echo OCP\USER::getUser() ?>', <?php echo $_['calendar']['id'] ?>);" title="<?php echo $l->t('Share Calendar') ?>" class="action"><img class="svg action" src="<?php echo (!$_['shared']) ? OCP\Util::imagePath('core', 'actions/share.svg') : OCP\Util::imagePath('core', 'actions/shared.svg') ?>"></a>
|
||||
</td> |
||||
<td width="20px"> |
||||
<a href="#" onclick="Calendar.UI.showCalDAVUrl('<?php echo OCP\USER::getUser() ?>', '<?php echo rawurlencode(html_entity_decode($_['calendar']['uri'], ENT_QUOTES, 'UTF-8')) ?>');" title="<?php echo $l->t('CalDav Link') ?>" class="action"><img class="svg action" src="<?php echo OCP\Util::imagePath('core', 'actions/public.svg') ?>"></a>
|
||||
</td> |
||||
<td width="20px"> |
||||
<a href="?app=calendar&getfile=export.php?calid=<?php echo $_['calendar']['id'] ?>" title="<?php echo $l->t('Download') ?>" class="action"><img class="svg action" src="<?php echo OCP\Util::imagePath('core', 'actions/download.svg') ?>"></a>
|
||||
</td> |
||||
<td width="20px"> |
||||
<a href="#" onclick="Calendar.UI.Calendar.edit(this, <?php echo $_['calendar']['id'] ?>);" title="<?php echo $l->t('Edit') ?>" class="action"><img class="svg action" src="<?php echo OCP\Util::imagePath('core', 'actions/rename.svg') ?>"></a>
|
||||
</td> |
||||
<td width="20px"> |
||||
<a href="#" onclick="Calendar.UI.Calendar.deleteCalendar(<?php echo $_['calendar']['id'] ?>);" title="<?php echo $l->t('Delete') ?>" class="action"><img class="svg action" src="<?php echo OCP\Util::imagePath('core', 'actions/delete.svg') ?>"></a>
|
||||
</td> |
||||
|
@ -1,6 +1,6 @@ |
||||
<?php for($i=0; $i<count($_["breadcrumb"]); $i++): |
||||
$crumb = $_["breadcrumb"][$i]; ?> |
||||
<div class="crumb <?php if($i == count($_["breadcrumb"])-1) echo 'last';?> svg" data-dir='<?php echo $crumb["dir"];?>' style='background-image:url("<?php echo OCP\image_path('core','breadcrumb.png');?>")'>
|
||||
<a href="<?php echo $_['baseURL'].$crumb["dir"]; ?>"><?php echo htmlentities($crumb["name"],ENT_COMPAT,'utf-8'); ?></a>
|
||||
<a href="<?php echo $_['baseURL'].$crumb["dir"]; ?>"><?php echo OCP\Util::sanitizeHTML($crumb["name"]); ?></a>
|
||||
</div> |
||||
<?php endfor;?> |
||||
|
Binary file not shown.
@ -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')+'" />');
|
||||
}
|
||||
);
|
||||
} |
||||
}
|
||||
); |
||||
} |
||||
); |
||||
}); |
Loading…
Reference in new issue