Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F9785577
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/plugins/owncloud/owncloud.php b/plugins/owncloud/owncloud.php
index 2b05f3fc..d847cc3d 100644
--- a/plugins/owncloud/owncloud.php
+++ b/plugins/owncloud/owncloud.php
@@ -1,89 +1,84 @@
<?php
/**
* OwnCloud Plugin
*
* @author Aleksander 'A.L.E.C' Machniak <machniak@kolabsys.com>
* @licence GNU AGPL
*
* Configuration (see config.inc.php.dist)
*
*/
class owncloud extends rcube_plugin
{
// all task excluding 'login' and 'logout'
public $task = '?(?!login|logout).*';
// we've got no ajax handlers
public $noajax = true;
// skip frames
public $noframe = true;
function init()
{
$rcmail = rcmail::get_instance();
// requires kolab_auth plugin
if (empty($_SESSION['kolab_uid'])) {
return;
}
$this->add_texts('localization/', false);
// register task
$this->register_task('owncloud');
// register actions
$this->register_action('index', array($this, 'action'));
$this->register_action('redirect', array($this, 'redirect'));
// add taskbar button
$this->add_button(array(
- 'name' => 'owncloud',
+ 'command' => 'owncloud',
'class' => 'button-owncloud',
+ 'classsel' => 'button-owncloud button-selected',
+ 'innerclass' => 'button-inner',
'label' => 'owncloud.owncloud',
- 'href' => './?_task=owncloud',
- 'onclick' => sprintf("return %s.command('owncloud')", JS_OBJECT_NAME)
), 'taskbar');
- $rcmail->output->add_script(
- JS_OBJECT_NAME . ".enable_command('owncloud', true);\n" .
- JS_OBJECT_NAME . ".owncloud = function () { location.href = './?_task=owncloud'; }",
- 'head');
-
$skin = $rcmail->config->get('skin');
if (!file_exists($this->home."/skins/$skin/owncloud.css")) {
$skin = 'default';
}
// add style for taskbar button (must be here) and Help UI
$this->include_stylesheet("skins/$skin/owncloud.css");
}
function action()
{
$rcmail = rcmail::get_instance();
$rcmail->output->add_handlers(array('owncloudframe' => array($this, 'frame')));
$rcmail->output->set_pagetitle($this->gettext('owncloud'));
$rcmail->output->send('owncloud.owncloud');
}
function frame()
{
$rcmail = rcmail::get_instance();
$this->load_config();
$src = $rcmail->config->get('owncloud_url');
$user = $_SESSION['kolab_uid']; // requires kolab_auth plugin
$pass = $rcmail->decrypt($_SESSION['password']);
$src = preg_replace('/^(https?:\/\/)/',
'\\1' . urlencode($user) . ':' . urlencode($pass) . '@', $src);
return '<iframe id="owncloudframe" width="100%" height="100%" frameborder="0"'
.' src="' . $src. '"></iframe>';
}
}
diff --git a/plugins/owncloud/skins/larry/cloud.png b/plugins/owncloud/skins/larry/cloud.png
new file mode 100644
index 00000000..7ad3cd96
Binary files /dev/null and b/plugins/owncloud/skins/larry/cloud.png differ
diff --git a/plugins/owncloud/skins/larry/owncloud.css b/plugins/owncloud/skins/larry/owncloud.css
new file mode 100644
index 00000000..1e9aa891
--- /dev/null
+++ b/plugins/owncloud/skins/larry/owncloud.css
@@ -0,0 +1,14 @@
+/***** ownCloud plugin styles *****/
+
+#taskbar a.button-owncloud span.button-inner
+{
+ background: url(cloud.png) 5px 5px no-repeat;
+ height: 14px;
+}
+
+#taskbar a.button-owncloud:hover span.button-inner,
+#taskbar a.button-owncloud.button-selected span.button-inner
+{
+ background: url(cloud.png) 5px -16px no-repeat;
+ height: 14px;
+}
diff --git a/plugins/owncloud/skins/larry/templates/owncloud.html b/plugins/owncloud/skins/larry/templates/owncloud.html
new file mode 100644
index 00000000..8b3f470a
--- /dev/null
+++ b/plugins/owncloud/skins/larry/templates/owncloud.html
@@ -0,0 +1,20 @@
+<roundcube:object name="doctype" value="html5" />
+<html>
+<head>
+<title><roundcube:object name="pagetitle" /></title>
+<roundcube:include file="/includes/links.html" />
+<link rel="stylesheet" type="text/css" href="/this/owncloud.css" />
+<link rel="stylesheet" type="text/css" href="/settings.css" />
+</head>
+<body class="noscroll">
+
+<roundcube:include file="/includes/header.html" />
+
+<div id="mainscreen" class="offset uibox" style="overflow: hidden">
+ <roundcube:object name="owncloudframe" />
+</div>
+
+<roundcube:include file="/includes/footer.html" />
+
+</body>
+</html>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Aug 17, 6:11 PM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1257447
Default Alt Text
(4 KB)
Attached To
Mode
R14 roundcubemail-plugins-kolab
Attached
Detach File
Event Timeline
Log In to Comment