Merge branch 'master' into calendar_import
|
@ -34,6 +34,9 @@ RCS/*
|
|||
# netbeans
|
||||
nbproject
|
||||
|
||||
# phpStorm
|
||||
.idea
|
||||
|
||||
# geany
|
||||
*.geany
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ class Sabre_DAV_Client {
|
|||
protected $userName;
|
||||
protected $password;
|
||||
protected $proxy;
|
||||
protected $capath;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
@ -50,10 +49,6 @@ class Sabre_DAV_Client {
|
|||
'proxy'
|
||||
);
|
||||
|
||||
$this->capath = '';
|
||||
if (isset($settings['capath'])) {
|
||||
$this->capath = $settings['capath'];
|
||||
}
|
||||
|
||||
foreach($validSettings as $validSetting) {
|
||||
if (isset($settings[$validSetting])) {
|
||||
|
@ -259,8 +254,6 @@ class Sabre_DAV_Client {
|
|||
//CURLOPT_SSL_VERIFYPEER => false,
|
||||
);
|
||||
|
||||
if ($this->capath != '') $curlSettings[CURLOPT_CAPATH] = $this->capath;
|
||||
|
||||
switch ($method) {
|
||||
case 'PUT':
|
||||
$curlSettings[CURLOPT_PUT] = true;
|
||||
|
|
|
@ -28,6 +28,8 @@ $RUNTIME_NOSETUPFS=true;
|
|||
|
||||
// Check if we are a user
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
|
||||
require_once(OC_App::getAppPath('bookmarks').'/bookmarksHelper.php');
|
||||
|
|
|
@ -28,6 +28,8 @@ $RUNTIME_NOSETUPFS=true;
|
|||
|
||||
// Check if we are a user
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
|
||||
$id = $_POST['id'];
|
||||
|
|
|
@ -28,6 +28,8 @@ $RUNTIME_NOSETUPFS=true;
|
|||
|
||||
// Check if we are a user
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
OCP\JSON::checkAppEnabled('bookmarks');
|
||||
|
||||
$CONFIG_DBTYPE = OCP\Config::getSystemValue( "dbtype", "sqlite" );
|
||||
|
|
|
@ -145,5 +145,4 @@ class OC_Bookmarks_Bookmarks{
|
|||
$result = $query->execute();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
?>
|
||||
}
|
|
@ -34,6 +34,6 @@ $server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
|
|||
$server->addPlugin(new Sabre_CalDAV_Plugin());
|
||||
$server->addPlugin(new Sabre_DAVACL_Plugin());
|
||||
$server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in the Browser, but no upload
|
||||
|
||||
$server->addPlugin(new Sabre_CalDAV_ICSExportPlugin());
|
||||
// And off we go!
|
||||
$server->exec();
|
||||
|
|
|
@ -10,6 +10,7 @@ $tmpl = new OCP\Template( 'calendar', 'settings');
|
|||
$timezone=OCP\Config::getUserValue(OCP\USER::getUser(),'calendar','timezone','');
|
||||
$tmpl->assign('timezone',$timezone);
|
||||
$tmpl->assign('timezones',DateTimeZone::listIdentifiers());
|
||||
$tmpl->assign('calendars', OC_Calendar_Calendar::allCalendars(OCP\USER::getUser()), false);
|
||||
|
||||
OCP\Util::addscript('calendar','settings');
|
||||
|
||||
|
|
|
@ -56,6 +56,12 @@
|
|||
<dd><code><?php echo OCP\Util::linkToRemote('caldav'); ?></code></dd>
|
||||
<dt><?php echo $l->t('iOS/OS X'); ?></dt>
|
||||
<dd><code><?php echo OCP\Util::linkToRemote('caldav'); ?>principals/<?php echo OCP\USER::getUser(); ?></code>/</dd>
|
||||
<dt><?php echo $l->t('Read only iCalendar link(s)'); ?></dt>
|
||||
<dd>
|
||||
<?php foreach($_['calendars'] as $calendar) { ?>
|
||||
<a href="<?php echo OCP\Util::linkToRemote('caldav').'calendars/'.OCP\USER::getUser().'/'.rawurlencode($calendar['uri']) ?>?export"><?php echo $calendar['displayname'] ?></a><br />
|
||||
<?php } ?>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
|
|
@ -17,4 +17,3 @@ $tmpl = new OCP\Template('contacts', 'part.editaddressbook');
|
|||
$tmpl->assign('new', true);
|
||||
$tmpl->assign('addressbook', $book);
|
||||
$tmpl->printPage();
|
||||
?>
|
||||
|
|
|
@ -25,4 +25,3 @@ foreach($vcard->children as $property){
|
|||
}
|
||||
}
|
||||
OCP\JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Error setting checksum.'))));
|
||||
?>
|
||||
|
|
|
@ -45,5 +45,3 @@ $catman->delete($categories, $cards);
|
|||
debug('After delete: '.print_r($catman->categories(), true));
|
||||
OC_Contacts_VCard::updateDataByID($cards);
|
||||
OCP\JSON::success(array('data' => array('categories'=>$catman->categories())));
|
||||
|
||||
?>
|
||||
|
|
|
@ -13,5 +13,3 @@ OCP\JSON::checkAppEnabled('contacts');
|
|||
$categories = OC_Contacts_App::getCategories();
|
||||
|
||||
OCP\JSON::success(array('data' => array('categories'=>$categories)));
|
||||
|
||||
?>
|
||||
|
|
|
@ -10,24 +10,7 @@
|
|||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('contacts');
|
||||
|
||||
require_once('../loghandler.php');
|
||||
|
||||
$addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser());
|
||||
if(count($addressbooks) == 0) {
|
||||
bailOut(OC_Contacts_App::$l10n->t('No address books found.'));
|
||||
}
|
||||
$addressbookids = array();
|
||||
foreach($addressbooks as $addressbook) {
|
||||
$addressbookids[] = $addressbook['id'];
|
||||
}
|
||||
$contacts = OC_Contacts_VCard::all($addressbookids);
|
||||
if(count($contacts) == 0) {
|
||||
bailOut(OC_Contacts_App::$l10n->t('No contacts found.'));
|
||||
}
|
||||
|
||||
OC_Contacts_App::scanCategories($contacts);
|
||||
OC_Contacts_App::scanCategories();
|
||||
$categories = OC_Contacts_App::getCategories();
|
||||
|
||||
OCP\JSON::success(array('data' => array('categories'=>$categories)));
|
||||
|
||||
?>
|
||||
|
|
|
@ -51,5 +51,3 @@ if( is_null($contact)) {
|
|||
bailOut(OC_Contacts_App::$l10n->t('The loading photo is not valid.'));
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -39,5 +39,3 @@ $tmpl->assign('adr_types',$adr_types);
|
|||
|
||||
$page = $tmpl->fetchPage();
|
||||
OCP\JSON::success(array('data' => array('page'=>$page, 'checksum'=>$checksum)));
|
||||
|
||||
?>
|
||||
|
|
|
@ -14,4 +14,3 @@ $tmpl = new OCP\Template("contacts", "part.editaddressbook");
|
|||
$tmpl->assign('new', false);
|
||||
$tmpl->assign('addressbook', $addressbook);
|
||||
$tmpl->printPage();
|
||||
?>
|
||||
|
|
|
@ -32,5 +32,3 @@ if($id) {
|
|||
}
|
||||
$page = $tmpl->fetchPage();
|
||||
OCP\JSON::success(array('data' => array('page'=>$page)));
|
||||
|
||||
?>
|
||||
|
|
|
@ -18,6 +18,6 @@ $maxUploadFilesize = min($maxUploadFilesize ,$freeSpace);
|
|||
|
||||
$tmpl = new OCP\Template('contacts', 'part.importaddressbook');
|
||||
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
|
||||
$tmpl->assign('requesttoken', $_SERVER['HTTP_REQUESTTOKEN']);
|
||||
$tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
|
||||
$tmpl->printpage();
|
||||
?>
|
||||
|
|
|
@ -13,4 +13,3 @@ $tmpl = new OCP\Template('contacts', 'part.import');
|
|||
$tmpl->assign('path', $_POST['path']);
|
||||
$tmpl->assign('filename', $_POST['filename']);
|
||||
$tmpl->printpage();
|
||||
?>
|
||||
|
|
|
@ -58,5 +58,3 @@ if(OC_Cache::set($tmpkey, $image->data(), 600)) {
|
|||
} else {
|
||||
bailOut('Couldn\'t save temporary image: '.$tmpkey);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -70,6 +70,3 @@ if(file_exists($file['tmp_name'])) {
|
|||
} else {
|
||||
bailOut('Temporary file: \''.$file['tmp_name'].'\' has gone AWOL?');
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
|
|
@ -102,4 +102,3 @@ if(file_exists($file['tmp_name'])) {
|
|||
} else {
|
||||
bailOut('Temporary file: \''.$file['tmp_name'].'\' has gone AWOL?');
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -4,6 +4,7 @@ OC::$CLASSPATH['OC_Contacts_Addressbook'] = 'apps/contacts/lib/addressbook.php';
|
|||
OC::$CLASSPATH['OC_Contacts_VCard'] = 'apps/contacts/lib/vcard.php';
|
||||
OC::$CLASSPATH['OC_Contacts_Hooks'] = 'apps/contacts/lib/hooks.php';
|
||||
OC::$CLASSPATH['OC_Connector_Sabre_CardDAV'] = 'apps/contacts/lib/connector_sabre.php';
|
||||
OC::$CLASSPATH['Sabre_CardDAV_VCFExportPlugin'] = 'apps/contacts/lib/VCFExportPlugin.php';
|
||||
OC::$CLASSPATH['OC_Search_Provider_Contacts'] = 'apps/contacts/lib/search.php';
|
||||
OCP\Util::connectHook('OC_User', 'post_createUser', 'OC_Contacts_Hooks', 'createUser');
|
||||
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Contacts_Hooks', 'deleteUser');
|
||||
|
|
|
@ -49,6 +49,7 @@ $server->addPlugin(new Sabre_DAV_Auth_Plugin($authBackend,'ownCloud'));
|
|||
$server->addPlugin(new Sabre_CardDAV_Plugin());
|
||||
$server->addPlugin(new Sabre_DAVACL_Plugin());
|
||||
$server->addPlugin(new Sabre_DAV_Browser_Plugin(false)); // Show something in the Browser, but no upload
|
||||
$server->addPlugin(new Sabre_CardDAV_VCFExportPlugin());
|
||||
|
||||
// And off we go!
|
||||
$server->exec();
|
||||
|
|
|
@ -19,11 +19,12 @@ if(isset($bookid)){
|
|||
header('Content-Disposition: inline; filename=' . str_replace(' ', '_', $addressbook['displayname']) . '.vcf');
|
||||
|
||||
$start = 0;
|
||||
while($cardobjects = OC_Contacts_VCard::all($bookid, $start, 20)){
|
||||
$batchsize = OCP\Config::getUserValue(OCP\User::getUser(), 'contacts', 'export_batch_size', 20);
|
||||
while($cardobjects = OC_Contacts_VCard::all($bookid, $start, $batchsize)){
|
||||
foreach($cardobjects as $card) {
|
||||
echo $card['carddata'] . $nl;
|
||||
}
|
||||
$start += 20;
|
||||
$start += $batchsize;
|
||||
}
|
||||
}elseif(isset($contactid)){
|
||||
$data = OC_Contacts_App::getContactObject($contactid);
|
||||
|
@ -31,4 +32,3 @@ if(isset($bookid)){
|
|||
header('Content-Disposition: inline; filename=' . str_replace(' ', '_', $data['fullname']) . '.vcf');
|
||||
echo $data['carddata'];
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -12,6 +12,7 @@ OCP\JSON::checkLoggedIn();
|
|||
OCP\App::checkAppEnabled('contacts');
|
||||
session_write_close();
|
||||
|
||||
$cr = "\r";
|
||||
$nl = "\n";
|
||||
|
||||
global $progresskey;
|
||||
|
@ -35,20 +36,20 @@ if(isset($_POST['fstype']) && $_POST['fstype'] == 'OC_FilesystemView') {
|
|||
$file = OC_Filesystem::file_get_contents($_POST['path'] . '/' . $_POST['file']);
|
||||
}
|
||||
if(!$file) {
|
||||
OCP\JSON::error(array('message' => 'Import file was empty.'));
|
||||
OCP\JSON::error(array('data' => array('message' => 'Import file was empty.')));
|
||||
exit();
|
||||
}
|
||||
if(isset($_POST['method']) && $_POST['method'] == 'new'){
|
||||
$id = OC_Contacts_Addressbook::add(OCP\USER::getUser(), $_POST['addressbookname']);
|
||||
if(!$id) {
|
||||
OCP\JSON::error(array('message' => 'Error creating address book.'));
|
||||
OCP\JSON::error(array('data' => array('message' => 'Error creating address book.')));
|
||||
exit();
|
||||
}
|
||||
OC_Contacts_Addressbook::setActive($id, 1);
|
||||
}else{
|
||||
$id = $_POST['id'];
|
||||
if(!$id) {
|
||||
OCP\JSON::error(array('message' => 'Error getting the ID of the address book.'));
|
||||
OCP\JSON::error(array('data' => array('message' => 'Error getting the ID of the address book.')));
|
||||
exit();
|
||||
}
|
||||
OC_Contacts_App::getAddressbook($id); // is owner access check
|
||||
|
@ -56,6 +57,10 @@ if(isset($_POST['method']) && $_POST['method'] == 'new'){
|
|||
//analyse the contacts file
|
||||
writeProgress('40');
|
||||
$lines = explode($nl, $file);
|
||||
if(count($lines) == 1) { // Mac eol
|
||||
$lines = explode($cr, $file);
|
||||
}
|
||||
|
||||
$inelement = false;
|
||||
$parts = array();
|
||||
$card = array();
|
||||
|
@ -77,7 +82,7 @@ writeProgress('70');
|
|||
$imported = 0;
|
||||
$failed = 0;
|
||||
if(!count($parts) > 0) {
|
||||
OCP\JSON::error(array('message' => 'No contacts to import in .'.$_POST['file'].' Please check if the file is corrupted.'));
|
||||
OCP\JSON::error(array('data' => array('message' => 'No contacts to import in .'.$_POST['file'].' Please check if the file is corrupted.')));
|
||||
exit();
|
||||
}
|
||||
foreach($parts as $part){
|
||||
|
|
|
@ -14,28 +14,16 @@ OCP\App::checkAppEnabled('contacts');
|
|||
|
||||
// Get active address books. This creates a default one if none exists.
|
||||
$ids = OC_Contacts_Addressbook::activeIds(OCP\USER::getUser());
|
||||
$contacts = OC_Contacts_VCard::all($ids);
|
||||
$has_contacts = (count(OC_Contacts_VCard::all($ids, 0, 1)) > 0 ? true : false); // just to check if there are any contacts.
|
||||
if($contacts === false) {
|
||||
OCP\Util::writeLog('contacts','index.html: No contacts found.',OCP\Util::DEBUG);
|
||||
}
|
||||
|
||||
$addressbooks = OC_Contacts_Addressbook::active(OCP\USER::getUser());
|
||||
|
||||
// Load the files we need
|
||||
OCP\App::setActiveNavigationEntry( 'contacts_index' );
|
||||
|
||||
// Load a specific user?
|
||||
$id = isset( $_GET['id'] ) ? $_GET['id'] : null;
|
||||
$details = array();
|
||||
|
||||
if(is_null($id) && count($contacts) > 0) {
|
||||
$id = $contacts[0]['id'];
|
||||
}
|
||||
unset($contacts);
|
||||
if(!is_null($id)) {
|
||||
$vcard = OC_Contacts_App::getContactVCard($id);
|
||||
$details = OC_Contacts_VCard::structureContact($vcard);
|
||||
}
|
||||
$property_types = OC_Contacts_App::getAddPropertyOptions();
|
||||
$phone_types = OC_Contacts_App::getTypesOfProperty('TEL');
|
||||
$email_types = OC_Contacts_App::getTypesOfProperty('EMAIL');
|
||||
|
@ -63,15 +51,12 @@ OCP\Util::addStyle('contacts','jquery.Jcrop');
|
|||
OCP\Util::addStyle('contacts','contacts');
|
||||
|
||||
$tmpl = new OCP\Template( "contacts", "index", "user" );
|
||||
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize);
|
||||
$tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
|
||||
$tmpl->assign('property_types', $property_types);
|
||||
$tmpl->assign('phone_types', $phone_types);
|
||||
$tmpl->assign('email_types', $email_types);
|
||||
$tmpl->assign('categories', $categories);
|
||||
$tmpl->assign('addressbooks', $addressbooks);
|
||||
$tmpl->assign('details', $details );
|
||||
$tmpl->assign('id',$id);
|
||||
$tmpl->assign('uploadMaxFilesize', $maxUploadFilesize, false);
|
||||
$tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize), false);
|
||||
$tmpl->assign('property_types', $property_types, false);
|
||||
$tmpl->assign('phone_types', $phone_types, false);
|
||||
$tmpl->assign('email_types', $email_types, false);
|
||||
$tmpl->assign('categories', $categories, false);
|
||||
$tmpl->assign('has_contacts', $has_contacts, false);
|
||||
$tmpl->assign('id',$id, false);
|
||||
$tmpl->printPage();
|
||||
|
||||
?>
|
||||
|
|
|
@ -316,7 +316,7 @@ Contacts={
|
|||
$('#contacts li[data-id="'+newid+'"]').addClass('active');
|
||||
$.getJSON(OC.filePath('contacts', 'ajax', 'contactdetails.php'),{'id':newid},function(jsondata){
|
||||
if(jsondata.status == 'success'){
|
||||
$('#contacts h3[data-id="'+bookid+'"]').trigger('click');
|
||||
$('#contacts ul[data-id="'+bookid+'"]').slideDown(300);
|
||||
Contacts.UI.Card.loadContact(jsondata.data, bookid);
|
||||
} else {
|
||||
OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error'));
|
||||
|
@ -326,7 +326,8 @@ Contacts={
|
|||
}
|
||||
|
||||
// Make sure proper DOM is loaded.
|
||||
if(!$('#card')[0] && newid) {
|
||||
if(!$('#card').length && newid) {
|
||||
console.log('Loading card DOM');
|
||||
$.getJSON(OC.filePath('contacts', 'ajax', 'loadcard.php'),{requesttoken:requesttoken},function(jsondata){
|
||||
if(jsondata.status == 'success'){
|
||||
$('#rightcontent').html(jsondata.data.page).ready(function() {
|
||||
|
@ -339,6 +340,7 @@ Contacts={
|
|||
});
|
||||
}
|
||||
else if(!newid) {
|
||||
console.log('Loading intro');
|
||||
// load intro page
|
||||
$.getJSON(OC.filePath('contacts', 'ajax', 'loadintro.php'),{},function(jsondata){
|
||||
if(jsondata.status == 'success'){
|
||||
|
@ -370,6 +372,7 @@ Contacts={
|
|||
return $('<li data-id="'+data.id+'" data-bookid="'+data.addressbookid+'" role="button"><a href="'+OC.linkTo('contacts', 'index.php')+'&id='+data.id+'" style="background: url('+OC.filePath('contacts', '', 'thumbnail.php')+'?id='+data.id+') no-repeat scroll 0% 0% transparent;">'+data.displayname+'</a></li>');
|
||||
},
|
||||
add:function(n, fn, aid, isnew){ // add a new contact
|
||||
console.log('Adding ' + fn);
|
||||
aid = aid?aid:$('#contacts h3.active').first().data('id');
|
||||
var localAddcontact = function(n, fn, aid, isnew) {
|
||||
$.post(OC.filePath('contacts', 'ajax', 'addcontact.php'), { n: n, fn: fn, aid: aid, isnew: isnew },
|
||||
|
@ -413,8 +416,8 @@ Contacts={
|
|||
});
|
||||
}
|
||||
|
||||
var card = $('#card')[0];
|
||||
if(!card) {
|
||||
if(!$('#card').length) {
|
||||
console.log('Loading card DOM');
|
||||
$.getJSON(OC.filePath('contacts', 'ajax', 'loadcard.php'),{'requesttoken': requesttoken},function(jsondata){
|
||||
if(jsondata.status == 'success'){
|
||||
$('#rightcontent').html(jsondata.data.page).ready(function() {
|
||||
|
@ -660,7 +663,7 @@ Contacts={
|
|||
return false;
|
||||
}
|
||||
container = $(obj).parents('.propertycontainer').first(); // get the parent holding the metadata.
|
||||
Contacts.UI.loading(container, true);
|
||||
Contacts.UI.loading(obj, true);
|
||||
var checksum = container.data('checksum');
|
||||
var name = container.data('element');
|
||||
var fields = container.find('input.contacts_property,select.contacts_property').serializeArray();
|
||||
|
@ -683,7 +686,7 @@ Contacts={
|
|||
var q = container.find('input.contacts_property,select.contacts_property,textarea.contacts_property').serialize();
|
||||
if(q == '' || q == undefined) {
|
||||
OC.dialogs.alert(t('contacts', 'Couldn\'t serialize elements.'), t('contacts', 'Error'));
|
||||
Contacts.UI.loading(container, false);
|
||||
Contacts.UI.loading(obj, false);
|
||||
return false;
|
||||
}
|
||||
q = q + '&id=' + this.id + '&name=' + name;
|
||||
|
@ -695,13 +698,13 @@ Contacts={
|
|||
if(jsondata.status == 'success'){
|
||||
container.data('checksum', jsondata.data.checksum);
|
||||
Contacts.UI.Card.savePropertyInternal(name, fields, checksum, jsondata.data.checksum);
|
||||
Contacts.UI.loading(container, false);
|
||||
Contacts.UI.loading(obj, false);
|
||||
$(obj).removeAttr('disabled');
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error'));
|
||||
Contacts.UI.loading(container, false);
|
||||
Contacts.UI.loading(obj, false);
|
||||
$(obj).removeAttr('disabled');
|
||||
return false;
|
||||
}
|
||||
|
@ -714,13 +717,13 @@ Contacts={
|
|||
container.data('checksum', jsondata.data.checksum);
|
||||
// TODO: savePropertyInternal doesn't know about new fields
|
||||
//Contacts.UI.Card.savePropertyInternal(name, fields, checksum, jsondata.data.checksum);
|
||||
Contacts.UI.loading(container, false);
|
||||
Contacts.UI.loading(obj, false);
|
||||
$(obj).removeAttr('disabled');
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error'));
|
||||
Contacts.UI.loading(container, false);
|
||||
Contacts.UI.loading(obj, false);
|
||||
$(obj).removeAttr('disabled');
|
||||
return false;
|
||||
}
|
||||
|
@ -1393,6 +1396,7 @@ Contacts={
|
|||
function(jsondata) {
|
||||
if (jsondata.status == 'success'){
|
||||
$(obj).closest('tr').remove();
|
||||
$('#contacts h3[data-id="'+bookid+'"],#contacts ul[data-id="'+bookid+'"]').remove();
|
||||
Contacts.UI.Contacts.update();
|
||||
} else {
|
||||
OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error'));
|
||||
|
@ -1603,10 +1607,10 @@ Contacts={
|
|||
firstrun = true;
|
||||
|
||||
if($('#contacts h3').length == 0) {
|
||||
$('#contacts').html('<h3 class="addressbook" data-id="'+b+'">'+book.displayname+'</h3><ul class="contacts" data-id="'+b+'"></ul>');
|
||||
$('#contacts').html('<h3 class="addressbook" data-id="'+b+'">'+book.displayname+'</h3><ul class="contacts hidden" data-id="'+b+'"></ul>');
|
||||
} else {
|
||||
if(!$('#contacts h3[data-id="'+b+'"]').length) {
|
||||
$('<h3 class="addressbook" data-id="'+b+'">'+book.displayname+'</h3><ul class="contacts" data-id="'+b+'"></ul>')
|
||||
$('<h3 class="addressbook" data-id="'+b+'">'+book.displayname+'</h3><ul class="contacts hidden" data-id="'+b+'"></ul>')
|
||||
.appendTo('#contacts');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,100 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* VCF Exporter
|
||||
*
|
||||
* This plugin adds the ability to export entire address books as .vcf files.
|
||||
* This is useful for clients that don't support CardDAV yet. They often do
|
||||
* support vcf files.
|
||||
*
|
||||
* @package Sabre
|
||||
* @subpackage CardDAV
|
||||
* @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved.
|
||||
* @author Evert Pot (http://www.rooftopsolutions.nl/)
|
||||
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
|
||||
*/
|
||||
class Sabre_CardDAV_VCFExportPlugin extends Sabre_DAV_ServerPlugin {
|
||||
|
||||
/**
|
||||
* Reference to Server class
|
||||
*
|
||||
* @var Sabre_DAV_Server
|
||||
*/
|
||||
private $server;
|
||||
|
||||
/**
|
||||
* Initializes the plugin and registers event handlers
|
||||
*
|
||||
* @param Sabre_DAV_Server $server
|
||||
* @return void
|
||||
*/
|
||||
public function initialize(Sabre_DAV_Server $server) {
|
||||
|
||||
$this->server = $server;
|
||||
$this->server->subscribeEvent('beforeMethod',array($this,'beforeMethod'), 90);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 'beforeMethod' event handles. This event handles intercepts GET requests ending
|
||||
* with ?export
|
||||
*
|
||||
* @param string $method
|
||||
* @param string $uri
|
||||
* @return bool
|
||||
*/
|
||||
public function beforeMethod($method, $uri) {
|
||||
|
||||
if ($method!='GET') return;
|
||||
if ($this->server->httpRequest->getQueryString()!='export') return;
|
||||
|
||||
// splitting uri
|
||||
list($uri) = explode('?',$uri,2);
|
||||
|
||||
$node = $this->server->tree->getNodeForPath($uri);
|
||||
|
||||
if (!($node instanceof Sabre_CardDAV_IAddressBook)) return;
|
||||
|
||||
// Checking ACL, if available.
|
||||
if ($aclPlugin = $this->server->getPlugin('acl')) {
|
||||
$aclPlugin->checkPrivileges($uri, '{DAV:}read');
|
||||
}
|
||||
|
||||
$this->server->httpResponse->setHeader('Content-Type','text/directory');
|
||||
$this->server->httpResponse->sendStatus(200);
|
||||
|
||||
$nodes = $this->server->getPropertiesForPath($uri, array(
|
||||
'{' . Sabre_CardDAV_Plugin::NS_CARDDAV . '}address-data',
|
||||
),1);
|
||||
|
||||
$this->server->httpResponse->sendBody($this->generateVCF($nodes));
|
||||
|
||||
// Returning false to break the event chain
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Merges all vcard objects, and builds one big vcf export
|
||||
*
|
||||
* @param array $nodes
|
||||
* @return string
|
||||
*/
|
||||
public function generateVCF(array $nodes) {
|
||||
$objects = array();
|
||||
|
||||
foreach($nodes as $node) {
|
||||
|
||||
if (!isset($node[200]['{' . Sabre_CardDAV_Plugin::NS_CARDDAV . '}address-data'])) {
|
||||
continue;
|
||||
}
|
||||
$nodeData = $node[200]['{' . Sabre_CardDAV_Plugin::NS_CARDDAV . '}address-data'];
|
||||
$objects[] = $nodeData;
|
||||
|
||||
}
|
||||
|
||||
return implode("\r\n", $objects);
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -83,7 +83,7 @@ class OC_Contacts_Addressbook{
|
|||
$activeaddressbooks = self::all($uid, true);
|
||||
$ids = array();
|
||||
foreach($activeaddressbooks as $addressbook) {
|
||||
$ids[] = $addressbook['userid'];
|
||||
$ids[] = $addressbook['id'];
|
||||
}
|
||||
return $ids;
|
||||
}
|
||||
|
@ -148,10 +148,17 @@ class OC_Contacts_Addressbook{
|
|||
* @return insertid
|
||||
*/
|
||||
public static function add($uid,$name,$description=''){
|
||||
$all = self::all($uid);
|
||||
try {
|
||||
$stmt = OCP\DB::prepare( 'SELECT uri FROM *PREFIX*contacts_addressbooks WHERE userid = ? ' );
|
||||
$result = $stmt->execute(array($uid));
|
||||
} catch(Exception $e) {
|
||||
OCP\Util::writeLog('contacts',__CLASS__.'::'.__METHOD__.' exception: '.$e->getMessage(),OCP\Util::ERROR);
|
||||
OCP\Util::writeLog('contacts',__CLASS__.'::'.__METHOD__.' uid: '.$uid,OCP\Util::DEBUG);
|
||||
return false;
|
||||
}
|
||||
$uris = array();
|
||||
foreach($all as $i){
|
||||
$uris[] = $i['uri'];
|
||||
while($row = $result->fetchRow()){
|
||||
$uris[] = $row['uri'];
|
||||
}
|
||||
|
||||
$uri = self::createURI($name, $uris );
|
||||
|
|
|
@ -196,17 +196,20 @@ class OC_Contacts_App {
|
|||
foreach($vcaddressbooks as $vcaddressbook) {
|
||||
$vcaddressbookids[] = $vcaddressbook['id'];
|
||||
}
|
||||
$vccontacts = OC_Contacts_VCard::all($vcaddressbookids);
|
||||
$start = 0;
|
||||
$batchsize = 10;
|
||||
while($vccontacts = OC_Contacts_VCard::all($vcaddressbookids, $start, $batchsize)){
|
||||
$cards = array();
|
||||
foreach($vccontacts as $vccontact) {
|
||||
$cards[] = $vccontact['carddata'];
|
||||
}
|
||||
OCP\Util::writeLog('contacts',__CLASS__.'::'.__METHOD__.', scanning: '.$batchsize.' starting from '.$start,OCP\Util::DEBUG);
|
||||
// only reset on first batch.
|
||||
self::getVCategories()->rescan($cards, true, ($start==0?true:false));
|
||||
$start += $batchsize;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(is_array($vccontacts) && count($vccontacts) > 0) {
|
||||
$cards = array();
|
||||
foreach($vccontacts as $vccontact) {
|
||||
$cards[] = $vccontact['carddata'];
|
||||
}
|
||||
|
||||
self::$categories->rescan($cards);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -138,7 +138,9 @@ class OC_Connector_Sabre_CardDAV extends Sabre_CardDAV_Backend_Abstract {
|
|||
foreach($data as $i){
|
||||
$cards[] = array(
|
||||
'id' => $i['id'],
|
||||
'carddata' => $i['carddata'],
|
||||
//'carddata' => $i['carddata'],
|
||||
'size' => strlen($i['carddata']),
|
||||
'etag' => md5($i['carddata']),
|
||||
'uri' => $i['uri'],
|
||||
'lastmodified' => $i['lastmodified'] );
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
$tmpl = new OCP\Template( 'contacts', 'settings');
|
||||
$tmpl->assign('addressbooks', OC_Contacts_Addressbook::all(OCP\USER::getUser()), false);
|
||||
|
||||
return $tmpl->fetchPage();
|
||||
?>
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
<div id="rightcontent" class="rightcontent" data-id="<?php echo $_['id']; ?>">
|
||||
<?php
|
||||
if ($_['id']){
|
||||
if($_['has_contacts']){
|
||||
echo $this->inc('part.contact');
|
||||
}
|
||||
else{
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
<th><?php echo $l->t('Select address book to import to:') ?></th>
|
||||
<td>
|
||||
<form id="import_upload_form" action="<?php echo OCP\Util::linkTo('contacts', 'ajax/uploadimport.php'); ?>" method="post" enctype="multipart/form-data" target="import_upload_target">
|
||||
<input type="hidden" name="requesttoken" value="<?php echo $_['requesttoken'] ?>">
|
||||
<select id="book" name="book" class="float">
|
||||
<?php
|
||||
$contacts_options = OC_Contacts_Addressbook::all(OCP\USER::getUser());
|
||||
|
|
|
@ -7,6 +7,12 @@
|
|||
<dd><code><?php echo OCP\Util::linkToRemote('carddav'); ?></code></dd>
|
||||
<dt><?php echo $l->t('iOS/OS X'); ?></dt>
|
||||
<dd><code><?php echo OCP\Util::linkToRemote('carddav'); ?>principals/<?php echo OCP\USER::getUser(); ?></code>/</dd>
|
||||
<dt><?php echo $l->t('Read only vCard directory link(s)'); ?></dt>
|
||||
<dd>
|
||||
<?php foreach($_['addressbooks'] as $addressbook) { ?>
|
||||
<a href="<?php echo OCP\Util::linkToRemote('carddav').'addressbooks/'.OCP\USER::getUser().'/'.rawurlencode($addressbook['uri']) ?>?export"><?php echo $addressbook['displayname'] ?></a><br />
|
||||
<?php } ?>
|
||||
</dd>
|
||||
</dl>
|
||||
Powered by <a href="http://geonames.org/" target="_blank">geonames.org webservice</a>
|
||||
</fieldset>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
|
||||
OCP\User::checkAdminUser();
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
$sites = array();
|
||||
for ($i = 0; $i < sizeof($_POST['site_name']); $i++) {
|
||||
|
@ -22,4 +23,3 @@ else
|
|||
OCP\Config::setAppValue('external', 'sites', json_encode($sites));
|
||||
|
||||
echo 'true';
|
||||
?>
|
||||
|
|
|
@ -40,4 +40,3 @@ if (isset($_GET['id'])) {
|
|||
$tmpl->printPage();
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -32,5 +32,3 @@ class OC_External {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -7,4 +7,3 @@ OCP\Util::addscript( "external", "admin" );
|
|||
$tmpl = new OCP\Template( 'external', 'settings');
|
||||
|
||||
return $tmpl->fetchPage();
|
||||
?>
|
||||
|
|
|
@ -52,5 +52,3 @@ if(OC_Filesystem::file_exists($base) and OC_Filesystem::is_dir($base)){
|
|||
}
|
||||
}
|
||||
OCP\JSON::encodedPrint($files);
|
||||
|
||||
?>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
// Get data
|
||||
$dir = stripslashes($_GET["dir"]);
|
||||
|
@ -25,5 +26,3 @@ if($success) {
|
|||
} else {
|
||||
OCP\JSON::error(array("data" => array( "message" => "Could not delete:\n" . $filesWithError )));
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -34,4 +34,3 @@ $files = $_GET["files"];
|
|||
$dir = $_GET["dir"];
|
||||
|
||||
OC_Files::get($dir, $files, $_SERVER['REQUEST_METHOD'] == 'HEAD' ? true : false);
|
||||
?>
|
||||
|
|
|
@ -42,5 +42,3 @@ $list->assign( "files", $files, false );
|
|||
$data = array('files' => $list->fetchPage());
|
||||
|
||||
OCP\JSON::success(array('data' => $data));
|
||||
|
||||
?>
|
||||
|
|
|
@ -7,5 +7,3 @@ $RUNTIME_NOAPPS=false;
|
|||
|
||||
|
||||
print OC_Helper::mimetypeIcon($_GET['mime']);
|
||||
|
||||
?>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
// Get data
|
||||
$dir = stripslashes($_GET["dir"]);
|
||||
|
@ -16,5 +17,3 @@ if(OC_Files::move($dir,$file,$target,$file)){
|
|||
}else{
|
||||
OCP\JSON::error(array("data" => array( "message" => "Could not move $file" )));
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
// Get the params
|
||||
$dir = isset( $_POST['dir'] ) ? stripslashes($_POST['dir']) : '';
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
// Get the params
|
||||
$dir = isset( $_POST['dir'] ) ? stripslashes($_POST['dir']) : '';
|
||||
|
|
|
@ -22,5 +22,3 @@ foreach( OC_Files::getdirectorycontent( $dir, $mimetype ) as $i ){
|
|||
}
|
||||
|
||||
OCP\JSON::success(array('data' => $files));
|
||||
|
||||
?>
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
// Get data
|
||||
$dir = stripslashes($_GET["dir"]);
|
||||
|
@ -17,5 +18,3 @@ if( OC_Files::move( $dir, $file, $dir, $newname )) {
|
|||
else{
|
||||
OCP\JSON::error(array("data" => array( "message" => "Unable to rename file" )));
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
// see lib/base.php for an example
|
||||
//session_start();
|
||||
$_SESSION['timezone'] = $_GET['time'];
|
||||
?>
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
OCP\JSON::setContentTypeHeader('text/plain');
|
||||
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
if (!isset($_FILES['files'])) {
|
||||
OCP\JSON::error(array("data" => array( "message" => "No file was uploaded. Unknown error" )));
|
||||
|
@ -59,5 +60,3 @@ if(strpos($dir,'..') === false){
|
|||
}
|
||||
|
||||
OCP\JSON::error(array('data' => array('error' => $error, "file" => $fileName)));
|
||||
|
||||
?>
|
||||
|
|
|
@ -46,4 +46,3 @@ header('Content-Length: '.OC_Filesystem::filesize($filename));
|
|||
|
||||
@ob_end_clean();
|
||||
OC_Filesystem::readfile( $filename );
|
||||
?>
|
||||
|
|
|
@ -40,6 +40,7 @@ $dir = isset( $_GET['dir'] ) ? stripslashes($_GET['dir']) : '';
|
|||
// Redirect if directory does not exist
|
||||
if(!OC_Filesystem::is_dir($dir.'/')) {
|
||||
header('Location: '.$_SERVER['PHP_SELF'].'');
|
||||
exit();
|
||||
}
|
||||
|
||||
$files = array();
|
||||
|
@ -98,5 +99,3 @@ $tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize);
|
|||
$tmpl->assign( 'uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
|
||||
$tmpl->assign( 'allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true)));
|
||||
$tmpl->printPage();
|
||||
|
||||
?>
|
||||
|
|
|
@ -56,5 +56,3 @@ $tmpl = new OCP\Template( "files", "index", "user" );
|
|||
$tmpl->assign( 'files', $files );
|
||||
$tmpl->assign( "breadcrumb", $breadcrumb );
|
||||
$tmpl->printPage();
|
||||
|
||||
?>
|
||||
|
|
|
@ -17,8 +17,8 @@ $(document).ready(function(){
|
|||
OC.AppConfig.setValue('files_encryption','type_blacklist',blackList);
|
||||
}
|
||||
|
||||
$('#enbale_encryption').change(function(){
|
||||
var checked=$('#enbale_encryption').is(':checked');
|
||||
$('#enable_encryption').change(function(){
|
||||
var checked=$('#enable_encryption').is(':checked');
|
||||
OC.AppConfig.setValue('files_encryption','enable_encryption',(checked)?'true':'false');
|
||||
})
|
||||
})
|
|
@ -7,6 +7,6 @@
|
|||
<option selected="selected" value="<?php echo $type;?>"><?php echo $type;?></option>
|
||||
<?php endforeach;?>
|
||||
</select>
|
||||
<input type='checkbox' id='enbale_encryption' <?php if($_['encryption_enabled']){echo 'checked="checked"';} ?>></input><label for='enbale_encryption'><?php echo $l->t('Enable Encryption')?></label>
|
||||
<input type='checkbox' id='enable_encryption' <?php if($_['encryption_enabled']){echo 'checked="checked"';} ?>></input><label for='enable_encryption'><?php echo $l->t('Enable Encryption')?></label>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
OCP\JSON::checkAppEnabled('files_external');
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
if ($_POST['isPersonal'] == 'true') {
|
||||
OCP\JSON::checkLoggedIn();
|
||||
$isPersonal = true;
|
||||
|
@ -9,5 +11,3 @@ if ($_POST['isPersonal'] == 'true') {
|
|||
$isPersonal = false;
|
||||
}
|
||||
OC_Mount_Config::addMountPoint($_POST['mountPoint'], $_POST['class'], $_POST['classOptions'], $_POST['mountType'], $_POST['applicable'], $isPersonal);
|
||||
|
||||
?>
|
||||
|
|
|
@ -4,9 +4,25 @@ OCP\JSON::checkAppEnabled('files_external');
|
|||
|
||||
$view = \OCP\Files::getStorage("files_external");
|
||||
$from = $_FILES['rootcert_import']['tmp_name'];
|
||||
$to = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").$_FILES['rootcert_import']['name'];
|
||||
$path = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/';
|
||||
if(!file_exists($path)) mkdir($path,0700,true);
|
||||
$to = $path.$_FILES['rootcert_import']['name'];
|
||||
move_uploaded_file($from, $to);
|
||||
|
||||
//check if it is a PEM certificate, otherwise convert it if possible
|
||||
$fh = fopen($to, 'r');
|
||||
$data = fread($fh, filesize($to));
|
||||
fclose($fh);
|
||||
if (!strpos($data, 'BEGIN CERTIFICATE')) {
|
||||
$pem = chunk_split(base64_encode($data), 64, "\n");
|
||||
$pem = "-----BEGIN CERTIFICATE-----\n".$pem."-----END CERTIFICATE-----\n";
|
||||
$fh = fopen($to, 'w');
|
||||
fwrite($fh, $pem);
|
||||
fclose($fh);
|
||||
}
|
||||
|
||||
OC_Mount_Config::createCertificateBundle();
|
||||
|
||||
header("Location: settings/personal.php");
|
||||
exit;
|
||||
?>
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
OCP\JSON::checkAppEnabled('files_external');
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
if ($_POST['isPersonal'] == 'true') {
|
||||
OCP\JSON::checkLoggedIn();
|
||||
$isPersonal = true;
|
||||
|
@ -9,5 +11,3 @@ if ($_POST['isPersonal'] == 'true') {
|
|||
$isPersonal = false;
|
||||
}
|
||||
OC_Mount_Config::removeMountPoint($_POST['mountPoint'], $_POST['mountType'], $_POST['applicable'], $isPersonal);
|
||||
|
||||
?>
|
||||
|
|
|
@ -4,6 +4,7 @@ OCP\JSON::checkAppEnabled('files_external');
|
|||
|
||||
$view = \OCP\Files::getStorage("files_external");
|
||||
$cert = $_POST['cert'];
|
||||
$file = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").$cert;
|
||||
$file = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/'.$cert;
|
||||
unlink($file);
|
||||
OC_Mount_Config::createCertificateBundle();
|
||||
?>
|
|
@ -244,7 +244,8 @@ class OC_Mount_Config {
|
|||
*/
|
||||
public static function getCertificates() {
|
||||
$view = \OCP\Files::getStorage('files_external');
|
||||
$path=\OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("");
|
||||
$path=\OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("").'uploads/';
|
||||
if (!is_dir($path)) mkdir($path);
|
||||
$result = array();
|
||||
$handle = opendir($path);
|
||||
while (false !== ($file = readdir($handle))) {
|
||||
|
@ -252,6 +253,30 @@ class OC_Mount_Config {
|
|||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* creates certificate bundle
|
||||
*/
|
||||
public static function createCertificateBundle() {
|
||||
$view = \OCP\Files::getStorage("files_external");
|
||||
$path = \OCP\Config::getSystemValue('datadirectory').$view->getAbsolutePath("");
|
||||
|
||||
$certs = OC_Mount_Config::getCertificates();
|
||||
$fh_certs = fopen($path."/rootcerts.crt", 'w');
|
||||
foreach ($certs as $cert) {
|
||||
$file=$path.'/uploads/'.$cert;
|
||||
$fh = fopen($file, "r");
|
||||
$data = fread($fh, filesize($file));
|
||||
fclose($fh);
|
||||
if (strpos($data, 'BEGIN CERTIFICATE')) {
|
||||
fwrite($fh_certs, $data);
|
||||
}
|
||||
}
|
||||
|
||||
fclose($fh_certs);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -36,18 +36,20 @@ class OC_FileStorage_DAV extends OC_Filestorage_Common{
|
|||
$this->root.='/';
|
||||
}
|
||||
|
||||
$capath = '';
|
||||
if($caview = \OCP\Files::getStorage('files_external')) {
|
||||
$capath=\OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath("");
|
||||
}
|
||||
$settings = array(
|
||||
'baseUri' => $this->createBaseUri(),
|
||||
'userName' => $this->user,
|
||||
'password' => $this->password,
|
||||
'capath' => $capath,
|
||||
);
|
||||
$this->client = new Sabre_DAV_Client($settings);
|
||||
|
||||
$this->client = new OC_Connector_Sabre_Client($settings);
|
||||
|
||||
if($caview = \OCP\Files::getStorage('files_external')) {
|
||||
$certPath=\OCP\Config::getSystemValue('datadirectory').$caview->getAbsolutePath("").'rootcerts.crt';
|
||||
if (file_exists($certPath)) {
|
||||
$this->client->addTrustedCertificates($certPath);
|
||||
}
|
||||
}
|
||||
//create the root folder if necesary
|
||||
$this->mkdir('');
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<form id="files_external" method="post" enctype="multipart/form-data" action="/owncloud/?app=files_external&getfile=ajax%2FaddRootCertificate.php">
|
||||
<form id="files_external" method="post" enctype="multipart/form-data" action="<?php echo OCP\Util::linkTo('files_external', 'ajax/addRootCertificate.php'); ?>">
|
||||
<fieldset class="personalblock">
|
||||
<legend><strong><?php echo $l->t('External Storage'); ?></strong></legend>
|
||||
<table id="externalStorage" data-admin='<?php echo json_encode($_['isAdminPage']); ?>'>
|
||||
|
@ -81,7 +81,7 @@
|
|||
</table>
|
||||
<br />
|
||||
|
||||
<?php if (!$_['isAdminPage'] && false): // disabled until sabredav can handle uploaded ca certs ?>
|
||||
<?php if (!$_['isAdminPage']): ?>
|
||||
<table id="sslCertificate" data-admin='<?php echo json_encode($_['isAdminPage']); ?>'>
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
@ -45,6 +45,3 @@ if (!is_array($config) or !isset($config['amazons3']) or !$config['amazons3']['r
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
@ -4,5 +4,3 @@ OCP\Util::addscript( 'files_imageviewer', 'lightbox' );
|
|||
OCP\Util::addscript('files_imageviewer', 'jquery.mousewheel-3.0.4.pack');
|
||||
OCP\Util::addscript('files_imageviewer', 'jquery.fancybox-1.3.4.pack');
|
||||
OCP\Util::addStyle( 'files_imageviewer', 'jquery.fancybox-1.3.4' );
|
||||
|
||||
?>
|
||||
|
|
|
@ -6,4 +6,3 @@ OCP\Util::addscript( 'files_pdfviewer', 'pdfjs/compatibility');
|
|||
OCP\Util::addscript( 'files_pdfviewer', 'viewer');
|
||||
OCP\Util::addscript( 'files_pdfviewer', 'pdfjs/build/pdf');
|
||||
OCP\Util::addscript( 'files_pdfviewer', 'pdfjs/viewer');
|
||||
?>
|
||||
|
|
|
@ -1432,7 +1432,7 @@ var DocumentOutlineView = function documentOutlineView(outline) {
|
|||
queue.push({parent: itemsDiv, items: item.items});
|
||||
}
|
||||
|
||||
levelData.parent.appendChild(div);
|
||||
// levelData.parent.appendChild(div);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1751,10 +1751,9 @@ function updateThumbViewArea() {
|
|||
}
|
||||
|
||||
window.addEventListener('resize', function webViewerResize(evt) {
|
||||
if (PDFView.initialized &&
|
||||
if (PDFView.initialized && PDFView.active &&
|
||||
(document.getElementById('pageWidthOption').selected ||
|
||||
document.getElementById('pageFitOption').selected ||
|
||||
document.getElementById('pageAutoOption').selected))
|
||||
document.getElementById('pageFitOption').selected ))
|
||||
PDFView.parseScale(document.getElementById('scaleSelect').value);
|
||||
updateViewarea();
|
||||
});
|
||||
|
@ -1788,8 +1787,8 @@ window.addEventListener('change', function webViewerChange(evt) {
|
|||
document.title = file.name;
|
||||
|
||||
// URL does not reflect proper document location - hiding some icons.
|
||||
document.getElementById('viewBookmark').setAttribute('hidden', 'true');
|
||||
document.getElementById('download').setAttribute('hidden', 'true');
|
||||
// document.getElementById('viewBookmark').setAttribute('hidden', 'true');
|
||||
// document.getElementById('download').setAttribute('hidden', 'true');
|
||||
}, true);
|
||||
|
||||
function selectScaleOption(value) {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('files_sharing');
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
$user = OCP\USER::getUser();
|
||||
// TODO translations
|
||||
$type = (strpos($_POST['file'], '.') === false) ? 'folder' : 'file';
|
||||
|
@ -9,5 +11,3 @@ $link = $_POST['link'];
|
|||
$text = $user.' shared the '.$type.' '.$_POST['file'].' with you. It is available for download here: '.$link;
|
||||
$fromaddress = OCP\Config::getUserValue($user, 'settings', 'email', 'sharing-noreply@'.OCP\Util::getServerHost());
|
||||
OC_Mail::send($_POST['toaddress'], $_POST['toaddress'], $subject, $text, $fromaddress, $user);
|
||||
|
||||
?>
|
||||
|
|
|
@ -64,5 +64,3 @@ while ($path != $userDirectory) {
|
|||
}
|
||||
|
||||
OCP\JSON::success(array('data' => $item));
|
||||
|
||||
?>
|
||||
|
|
|
@ -20,5 +20,3 @@ if ($rows = OC_Share::getMySharedItems()) {
|
|||
}
|
||||
|
||||
OCP\JSON::success(array('data' => $items));
|
||||
|
||||
?>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
OCP\JSON::checkAppEnabled('files_sharing');
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
$source = '/'.OCP\USER::getUser().'/files'.$_POST['source'];
|
||||
$uid_shared_with = $_POST['uid_shared_with'];
|
||||
|
@ -9,5 +10,3 @@ $permissions = $_POST['permissions'];
|
|||
OC_Share::setPermissions($source, $uid_shared_with, $permissions);
|
||||
|
||||
OCP\JSON::success();
|
||||
|
||||
?>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
OCP\JSON::checkAppEnabled('files_sharing');
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
$userDirectory = '/'.OCP\USER::getUser().'/files';
|
||||
$sources = explode(';', $_POST['sources']);
|
||||
|
@ -34,5 +35,3 @@ foreach ($sources as $source) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -7,5 +7,3 @@ if ($_POST['resharing'] == true) {
|
|||
} else {
|
||||
OCP\Config::setAppValue('files_sharing', 'resharing', 'no');
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -2,11 +2,10 @@
|
|||
|
||||
OCP\JSON::checkAppEnabled('files_sharing');
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
$source = '/'.OCP\USER::getUser().'/files'.$_POST['source'];
|
||||
$uid_shared_with = $_POST['uid_shared_with'];
|
||||
OC_Share::unshare($source, $uid_shared_with);
|
||||
|
||||
OCP\JSON::success();
|
||||
|
||||
?>
|
||||
|
|
|
@ -28,5 +28,3 @@ $users[] = "</optgroup>";
|
|||
$groups[] = "</optgroup>";
|
||||
$users = array_merge($users, $groups);
|
||||
OCP\JSON::encodedPrint($users);
|
||||
|
||||
?>
|
||||
|
|
|
@ -86,4 +86,3 @@ if (isset($_GET['token']) && $source = OC_Share::getSource($_GET['token'])) {
|
|||
$tmpl->printPage();
|
||||
die();
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -513,5 +513,3 @@ class OC_Share {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -33,5 +33,3 @@ OCP\Util::addscript("files_sharing", "list");
|
|||
$tmpl = new OCP\Template("files_sharing", "list", "user");
|
||||
$tmpl->assign("shared_items", OC_Share::getMySharedItems());
|
||||
$tmpl->printPage();
|
||||
|
||||
?>
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
// Check if we are a user
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::callCheck();
|
||||
|
||||
// Get paramteres
|
||||
$filecontents = isset($_POST['filecontents']) ? $_POST['filecontents'] : false;
|
||||
|
|
|
@ -4,4 +4,3 @@ OCP\Util::addStyle( 'files_texteditor', 'DroidSansMono/stylesheet' );
|
|||
OCP\Util::addStyle( 'files_texteditor', 'style' );
|
||||
OCP\Util::addscript( 'files_texteditor', 'editor');
|
||||
OCP\Util::addscript( 'files_texteditor', 'aceeditor/ace');
|
||||
?>
|
||||
|
|
|
@ -7,5 +7,3 @@ if (OCP\Config::getSystemValue('versions', 'true')=='true') {
|
|||
} else {
|
||||
OCP\Config::setSystemValue('versions', 'true');
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -71,5 +71,3 @@ if ( isset( $_GET['path'] ) ) {
|
|||
}
|
||||
|
||||
$tmpl->printPage( );
|
||||
|
||||
?>
|
||||
|
|
|
@ -30,43 +30,41 @@ class Hooks {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Erase versions of deleted file
|
||||
* @param array
|
||||
*
|
||||
* This function is connected to the delete signal of OC_Filesystem
|
||||
* cleanup the versions directory if the actual file gets deleted
|
||||
*/
|
||||
public static function remove_hook($params) {
|
||||
$rel_path = $params['path'];
|
||||
$abs_path = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$rel_path.'.v';
|
||||
if(Storage::isversioned($rel_path)) {
|
||||
$versions = Storage::getVersions($rel_path);
|
||||
foreach ($versions as $v){
|
||||
unlink($abs_path . $v['version']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief rename/move versions of renamed/moved files
|
||||
* @param array with oldpath and newpath
|
||||
*
|
||||
* This function is connected to the rename signal of OC_Filesystem and adjust the name and location
|
||||
* of the stored versions along the actual file
|
||||
*/
|
||||
public static function rename_hook($params) {
|
||||
$rel_oldpath = $params['oldpath'];
|
||||
$abs_oldpath = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$rel_oldpath.'.v';
|
||||
$abs_newpath = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$params['newpath'].'.v';
|
||||
if(Storage::isversioned($rel_oldpath)) {
|
||||
$versions = Storage::getVersions($rel_oldpath);
|
||||
foreach ($versions as $v){
|
||||
rename($abs_oldpath.$v['version'], $abs_newpath.$v['version']);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @brief Erase versions of deleted file
|
||||
* @param array
|
||||
*
|
||||
* This function is connected to the delete signal of OC_Filesystem
|
||||
* cleanup the versions directory if the actual file gets deleted
|
||||
*/
|
||||
public static function remove_hook($params) {
|
||||
$rel_path = $params['path'];
|
||||
$abs_path = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$rel_path.'.v';
|
||||
if(Storage::isversioned($rel_path)) {
|
||||
$versions = Storage::getVersions($rel_path);
|
||||
foreach ($versions as $v){
|
||||
unlink($abs_path . $v['version']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief rename/move versions of renamed/moved files
|
||||
* @param array with oldpath and newpath
|
||||
*
|
||||
* This function is connected to the rename signal of OC_Filesystem and adjust the name and location
|
||||
* of the stored versions along the actual file
|
||||
*/
|
||||
public static function rename_hook($params) {
|
||||
$rel_oldpath = $params['oldpath'];
|
||||
$abs_oldpath = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$rel_oldpath.'.v';
|
||||
$abs_newpath = \OCP\Config::getSystemValue('datadirectory').'/'.\OCP\User::getUser()."/versions".$params['newpath'].'.v';
|
||||
if(Storage::isversioned($rel_oldpath)) {
|
||||
$versions = Storage::getVersions($rel_oldpath);
|
||||
foreach ($versions as $v){
|
||||
rename($abs_oldpath.$v['version'], $abs_newpath.$v['version']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
|
@ -33,7 +33,7 @@ class Storage {
|
|||
const DEFAULTFOLDER='versions';
|
||||
const DEFAULTBLACKLIST='avi mp3 mpg mp4 ctmp';
|
||||
const DEFAULTMAXFILESIZE=1048576; // 10MB
|
||||
const DEFAULTMININTERVAL=1; // 2 min
|
||||
const DEFAULTMININTERVAL=60; // 1 min
|
||||
const DEFAULTMAXVERSIONS=50;
|
||||
|
||||
private $view;
|
||||
|
@ -239,10 +239,9 @@ class Storage {
|
|||
$versions[$i]['version'] = ( end( $parts ) );
|
||||
|
||||
// if file with modified date exists, flag it in array as currently enabled version
|
||||
$curFile['fileName'] = basename( $parts[0] );
|
||||
$curFile['filePath'] = \OCP\Config::getSystemValue('datadirectory').\OC_Filesystem::getRoot().'/'.$curFile['fileName'];
|
||||
|
||||
( \md5_file( $ma ) == \md5_file( $curFile['filePath'] ) ? $versions[$i]['fileMatch'] = 1 : $versions[$i]['fileMatch'] = 0 );
|
||||
$files_view = \OCP\Files::getStorage('files');
|
||||
$local_file = $files_view->getLocalFile($filename);
|
||||
( \md5_file( $ma ) == \md5_file( $local_file ) ? $versions[$i]['fileMatch'] = 1 : $versions[$i]['fileMatch'] = 0 );
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -7,4 +7,3 @@ OCP\Util::addscript( 'files_versions', 'versions' );
|
|||
$tmpl = new OCP\Template( 'files_versions', 'settings');
|
||||
|
||||
return $tmpl->fetchPage();
|
||||
?>
|
||||
|
|
|
@ -28,5 +28,3 @@ OCP\JSON::checkAppEnabled('gallery');
|
|||
OC_Gallery_Album::create(OCP\USER::getUser(), $_GET['album_name']);
|
||||
|
||||
OCP\JSON::success(array('name' => $_GET['album_name']));
|
||||
|
||||
?>
|
||||
|
|
|
@ -186,4 +186,3 @@ if ($_GET['operation']) {
|
|||
OCP\JSON::error(array('cause' => 'Unknown operation'));
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* ownCloud - gallery application
|
||||
*
|
||||
* @author Ike Devolder
|
||||
* @copyright 2012 Ike Devolder
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 3 of the License, or any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('gallery');
|
||||
|
||||
$img = $_GET['img'];
|
||||
|
||||
$image = OC_Gallery_Photo::getViewImage($img);
|
||||
if ($image) {
|
||||
OCP\Response::enableCaching(3600 * 24); // 24 hour
|
||||
$image->show();
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
#gallerycontent { margin-top: 2.8em; overflow: visible; }
|
||||
#g-settings {position: absolute; left 13.5em; top: 0;}
|
||||
#g-settings {position: absolute; left: 13.5em; top: 0;}
|
||||
div#controls input[type=button] { -webkit-transition: opacity 0.5s ease-in-out; -moz-transition: opacity 0.5s ease-in-out; -o-transition: opacity 0.5s ease-in-out; opacity: 1; position:absolute; right:13.5em; top:0em; }
|
||||
input[type=button]:disabled { opacity: 0.5 }
|
||||
.ui-dialog tr {background-color: #eee;}
|
||||
.ui-dialog input {width: 90%;}
|
||||
|
||||
div.gallery_div {position:relative; display: inline-block; height: 152px; width: 150px; margin: 5px;}
|
||||
div.gallery_div {position:relative; display: inline-block; height: 150px; width: 150px; margin: 5px;}
|
||||
div.miniature_border {position:absolute; height: 150px; -moz-transition-duration: 0.2s; -o-transition-duration:0.2s; -webkit-transition-duration: .2s; background-position: 50%;}
|
||||
div.line {display:inline-block; border: 0; width: auto; height: 160px}
|
||||
div.gallery_div img{position:absolute; top: 1; left: 0; -moz-transition-duration: 0.3s; -o-transition-duration:0.3s; -webkit-transition-duration: 0.3s; height:150px; width: auto;}
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
|
||||
Supersized - Fullscreen Slideshow jQuery Plugin
|
||||
Version : 3.2.7
|
||||
Site : www.buildinternet.com/project/supersized
|
||||
|
||||
Author : Sam Dunn
|
||||
Company : One Mighty Roar (www.onemightyroar.com)
|
||||
License : MIT License / GPL License
|
||||
|
||||
*/
|
||||
#supersized-holder #supersized-loader { display:none; position:absolute; top:50%; left:50%; z-index:0; width:60px; height:60px; margin:-30px 0 0 -30px; text-indent:-999em; background:url('%appswebroot%/gallery/img/supersized/progress.gif') no-repeat center center;}
|
||||
|
||||
#supersized-holder #supersized { visibility:hidden; display:block; position:fixed; left:0; top:0; overflow:hidden; z-index:200; height:100%; width:100%; }
|
||||
#supersized-holder #supersized img { width:auto; height:auto; position:relative; display:none; outline:none; border:none; }
|
||||
#supersized-holder #supersized.speed img { -ms-interpolation-mode:nearest-neighbor; image-rendering: -moz-crisp-edges; } /*Speed*/
|
||||
#supersized-holder #supersized.quality img { -ms-interpolation-mode:bicubic; image-rendering: optimizeQuality; } /*Quality*/
|
||||
|
||||
#supersized-holder #supersized li { display:block; list-style:none; z-index:150; position:fixed; overflow:hidden; top:0; left:0; width:100%; height:100%; background:#111; }
|
||||
#supersized-holder #supersized a { width:100%; height:100%; display:block; }
|
||||
#supersized-holder #supersized li.prevslide { z-index:160; }
|
||||
#supersized-holder #supersized li.activeslide { z-index:170; }
|
||||
#supersized-holder #supersized li.image-loading { background:#111 url('%appswebroot%/gallery/img/supersized/progress.gif') no-repeat center center; width:100%; height:100%; }
|
||||
#supersized-holder #supersized li.image-loading img{ visibility:hidden; }
|
||||
#supersized-holder #supersized li.prevslide img, #supersized-holder #supersized li.activeslide img{ display:inline; }
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
|
||||
Supersized - Fullscreen Slideshow jQuery Plugin
|
||||
Version : 3.2.7
|
||||
Site : www.buildinternet.com/project/supersized
|
||||
|
||||
Theme : Shutter 1.2
|
||||
Author : Sam Dunn
|
||||
Company : One Mighty Roar (www.onemightyroar.com)
|
||||
License : MIT License / GPL License
|
||||
|
||||
*/
|
||||
|
||||
/* Controls Bar
|
||||
----------------------------*/
|
||||
#slideshow-content #slideshow-controls-wrapper { margin:0 auto; height:42px; width:100%; bottom:0px; left:0; z-index:204; background:url('%appswebroot%/gallery/img/supersized/nav-bg.png') repeat-x; position:fixed; }
|
||||
#slideshow-content #slideshow-controls { overflow:hidden; height:100%; position:relative; text-align:left; z-index:205; }
|
||||
#slideshow-content #slidecounter { float:left; color:#999; font:14px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:#000 0 -1px 0; margin:0px 10px 0 15px; line-height:42px; }
|
||||
#slideshow-content #slidecaption { overflow:hidden; float:left; color:#FFF; font:400 14px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:#000 1px 1px 2px; margin:0 20px 0 0; line-height:42px; }
|
||||
|
||||
/*#navigation { float:right; margin:0px 20px 0 0; }*/
|
||||
#slideshow-content #play-button{ float:left; margin-top:1px;border-right:1px solid #333; background:url('%appswebroot%/gallery/img/supersized/bg-hover.png') repeat-x 0 44px; }
|
||||
#slideshow-content #play-button:hover{ background-position:0 1px; cursor:pointer; }
|
||||
|
||||
#slideshow-content #prevslide, #nextslide{ position:fixed; height:43px; width:43px; top:50%; margin-top:-21px; opacity:0.6; z-index:204; }
|
||||
#slideshow-content #prevslide{ left:10px; background:url('%appswebroot%/gallery/img/supersized/back.png'); }
|
||||
#slideshow-content #nextslide{ right:10px; background:url('%appswebroot%/gallery/img/supersized/forward.png'); }
|
||||
#slideshow-content #prevslide:active, #nextslide:active{ margin-top:-19px; }
|
||||
#slideshow-content #prevslide:hover, #nextslide:hover{ cursor:pointer; }
|
||||
|
||||
#slideshow-content ul#slide-list{ padding:15px 0; float:left; position:absolute; left:50%; }
|
||||
#slideshow-content ul#slide-list li{ list-style:none; width:12px; height:12px; float:left; margin:0 5px 0 0; }
|
||||
#slideshow-content ul#slide-list li.current-slide a, ul#slide-list li.current-slide a:hover{ background-position:0 0px; }
|
||||
#slideshow-content ul#slide-list li a{ display:block; width:12px; height:12px; background:url('%appswebroot%/gallery/img/supersized/nav-dot.png') no-repeat 0 -24px; }
|
||||
#slideshow-content ul#slide-list li a:hover{ background-position:0 -12px; cursor:pointer; }
|
||||
|
||||
#slideshow-content #tray-button{ float:right; margin-top:1px; border-left:1px solid #333; background:url('%appswebroot%/gallery/img/supersized/bg-hover.png') repeat-x 0 44px; }
|
||||
#slideshow-content #tray-button:hover{ background-position:0 1px; cursor:pointer; }
|
||||
|
||||
|
||||
/* Progress Bar
|
||||
----------------------------*/
|
||||
#slideshow-content #progress-back{ z-index:205; position:fixed; bottom:42px; left:0; height:8px; width:100%; background:url('%appswebroot%/gallery/img/supersized/progress-back.png') repeat-x; }
|
||||
#slideshow-content #progress-bar{ position:relative; height:8px; width:100%; background:url('%appswebroot%/gallery/img/supersized/progress-bar.png') repeat-x; }
|
||||
|
||||
|
||||
/* Thumbnail Navigation
|
||||
----------------------------*/
|
||||
#slideshow-content #nextthumb, #slideshow-content #prevthumb { z-index:202; display:none; position:fixed; bottom:61px; height:75px; width:100px; overflow:hidden; background:#ddd; border:1px solid #fff; -webkit-box-shadow:0 0 5px #000; }
|
||||
#slideshow-content #nextthumb { right:12px; }
|
||||
#slideshow-content #prevthumb { left:12px; }
|
||||
#slideshow-content #nextthumb img, #slideshow-content #prevthumb img { width:150px; height:auto; }
|
||||
#slideshow-content #nextthumb:active, #slideshow-content #prevthumb:active { bottom:59px; }
|
||||
#slideshow-content #nextthumb:hover, #slideshow-content #prevthumb:hover { cursor:pointer; }
|
||||
|
||||
|
||||
/* Thumbnail Tray
|
||||
----------------------------*/
|
||||
#slideshow-content #thumb-tray{ position:fixed; z-index:203; bottom:0; left:0; background:url('%appswebroot%/gallery/img/supersized/bg-black.png'); height:150px; width:100%; overflow:hidden; text-align:center; -moz-box-shadow: 0px 0px 4px #000; -webkit-box-shadow: 0px 0px 4px #000; box-shadow: 0px 0px 4px #000; }
|
||||
|
||||
#slideshow-content #thumb-back, #slideshow-content #thumb-forward{ position:absolute; z-index:5; bottom:42px; height:108px; width:40px; }
|
||||
#slideshow-content #thumb-back{ left:0; background: url('%appswebroot%/gallery/img/supersized/thumb-back.png') no-repeat center center;}
|
||||
#slideshow-content #thumb-forward{ right:0; background:url('%appswebroot%/gallery/img/supersized/thumb-forward.png') no-repeat center center;}
|
||||
#slideshow-content #thumb-back:hover, #slideshow-content #thumb-forward:hover{ cursor:pointer; background-color:rgba(256,256,256, 0.1); }
|
||||
#slideshow-content #thumb-back:hover{ border-right:1px solid rgba(256,256,256, 0.2); }
|
||||
#slideshow-content #thumb-forward:hover{ border-left:1px solid rgba(256,256,256, 0.2); }
|
||||
|
||||
|
||||
#slideshow-content ul#thumb-list{ display:inline-block; list-style:none; position:relative; left:0px; padding:0 0px; }
|
||||
#slideshow-content ul#thumb-list li{ background:#111; list-style:none; display:inline; width:150px; height:108px; overflow:hidden; float:left; margin:0; }
|
||||
#slideshow-content ul#thumb-list li img { width:200px; height:auto; opacity:0.5; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; filter:alpha(opacity=60); -webkit-transition: all 100ms ease-in-out; -moz-transition: all 100ms ease-in-out; -o-transition: all 100ms ease-in-out; -ms-transition: all 100ms ease-in-out; transition: all 100ms ease-in-out; }
|
||||
#slideshow-content ul#thumb-list li.current-thumb img, #slideshow-content ul#thumb-list li:hover img{ opacity:1; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); }
|
||||
#slideshow-content ul#thumb-list li:hover{ cursor:pointer; }
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 960 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 995 B |