Skip to content

Commit 4628999

Browse files
committed
Update to 1.0
* Now button open a link in new window. * Configuration moved to local config.inc.php. * Added support of a skin "classic".
1 parent cc57f9b commit 4628999

9 files changed

Lines changed: 37 additions & 32 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
CHANGELOG
22
=========
33

4+
RELEASE 1.0
5+
-----------
6+
* Now button open a link in new window.
7+
* Configuration moved to local config.inc.php.
8+
* Added support of a skin "classic".
9+
410
RELEASE 0.1
511
-----------
6-
* First release
12+
* First release.

README.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
Cloud Button (Roundcube Webmail Plugin)
2-
==========
2+
=======================================
3+
Plugin to add button in taskbar to open cloud storage.
34

4-
Plugin to add button to open cloud storage.
5-
6-
Configuration Options
7-
---------------------
8-
9-
Set the following options directly in Roundcube's config file (example):
10-
```php
11-
$config['cloud_button_title'] = 'Cloud'; // Button text
12-
$config['cloud_button_url'] = 'https://cloud.example.com'; // URL to cloud storage
13-
```
5+
Configuration
6+
-------------
7+
Rename config.inc.php.dist to config.inc.php and edit it.

cloud_button.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
<?php
22
/**
3-
* Cloud Button
3+
* Roundcube Plugin Cloud Button
4+
* Plugin to add button in taskbar to open cloud storage.
45
*
5-
* Plugin to add button to open cloud storage.
6-
*
7-
* @date 2017-03-14
8-
* @version 0.1
9-
* @author Alexander Pushkin
10-
* @url https://github.com/san4op/roundcube_cloud_button
11-
* @licence GNU GPLv3
6+
* @version 1.0
7+
* @author Alexander Pushkin <san4op@icloud.com>
8+
* @copyright Copyright (c) 2017, Alexander Pushkin
9+
* @link https://github.com/san4op/roundcube_cloud_button
10+
* @license GNU General Public License, version 3
1211
*/
1312

1413
class cloud_button extends rcube_plugin
@@ -20,25 +19,26 @@ function init()
2019
{
2120
$rcmail = rcube::get_instance();
2221

23-
$this->title = $rcmail->config->get('cloud_button_title', 'cloud_button.cloud');
22+
$this->title = $rcmail->config->get('cloud_button_title', '');
2423
$this->url = $rcmail->config->get('cloud_button_url', '');
2524

2625
if (!$this->url) {
2726
return;
2827
}
2928

30-
$this->add_texts('localization/', true);
3129
$this->include_stylesheet($this->local_skin_path() . '/cloud_button.css');
30+
$this->add_texts('localization/', true);
31+
$this->load_config();
3232

3333
$this->add_button(array(
34-
'href' => $this->url,
35-
'class' => 'button-cloud',
36-
'classsel' => 'button-cloud button-selected',
37-
'innerclass' => 'button-inner',
38-
'label' => $this->title,
34+
'label' => ($this->title != '' ? $this->title : 'cloud_button.cloud'),
35+
'href' => $this->url,
36+
'target' => '_blank',
37+
'class' => 'button-cloud',
38+
'classsel' => 'button-cloud button-selected',
39+
'innerclass' => 'button-inner'
3940
), 'taskbar');
4041
}
41-
4242
}
4343

4444
?>

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "san4op/cloud_button",
33
"type": "roundcube-plugin",
4-
"description": "Plugin to add button to open cloud storage.",
5-
"keywords": ["button","cloud"],
4+
"description": "Plugin to add button in taskbar to open cloud storage.",
5+
"keywords": ["button","cloud","taskbar"],
66
"homepage": "https://github.com/san4op/roundcube_cloud_button",
7-
"license": "GPL-3.0+",
8-
"version": "0.1",
7+
"license": "GPL-3.0",
8+
"version": "1.0",
99
"authors": [
1010
{
1111
"name": "Alexander Pushkin",

skins/classic/cloud_button.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#taskbar a.button-cloud {
2+
background: url(images/cloud.png) 0 2px no-repeat;
3+
}

skins/classic/cloud_button.min.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#taskbar a.button-cloud{background:url(images/cloud.png) 0 2px no-repeat}

skins/classic/images/cloud.png

1.48 KB
Loading

skins/larry/cloud_button.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)