Skip to content

Commit

Permalink
Update to 1.0
Browse files Browse the repository at this point in the history
* Now button open a link in new window.
* Configuration moved to local config.inc.php.
* Added support of a skin "classic".
  • Loading branch information
san4op committed Jul 18, 2017
1 parent cc57f9b commit 4628999
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 32 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
CHANGELOG
=========

RELEASE 1.0
-----------
* Now button open a link in new window.
* Configuration moved to local config.inc.php.
* Added support of a skin "classic".

RELEASE 0.1
-----------
* First release
* First release.
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
Cloud Button (Roundcube Webmail Plugin)
==========
=======================================
Plugin to add button in taskbar to open cloud storage.

Plugin to add button to open cloud storage.

Configuration Options
---------------------

Set the following options directly in Roundcube's config file (example):
```php
$config['cloud_button_title'] = 'Cloud'; // Button text
$config['cloud_button_url'] = 'https://cloud.example.com'; // URL to cloud storage
```
Configuration
-------------
Rename config.inc.php.dist to config.inc.php and edit it.
32 changes: 16 additions & 16 deletions cloud_button.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?php
/**
* Cloud Button
* Roundcube Plugin Cloud Button
* Plugin to add button in taskbar to open cloud storage.
*
* Plugin to add button to open cloud storage.
*
* @date 2017-03-14
* @version 0.1
* @author Alexander Pushkin
* @url https://github.com/san4op/roundcube_cloud_button
* @licence GNU GPLv3
* @version 1.0
* @author Alexander Pushkin <[email protected]>
* @copyright Copyright (c) 2017, Alexander Pushkin
* @link https://github.com/san4op/roundcube_cloud_button
* @license GNU General Public License, version 3
*/

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

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

if (!$this->url) {
return;
}

$this->add_texts('localization/', true);
$this->include_stylesheet($this->local_skin_path() . '/cloud_button.css');
$this->add_texts('localization/', true);
$this->load_config();

$this->add_button(array(
'href' => $this->url,
'class' => 'button-cloud',
'classsel' => 'button-cloud button-selected',
'innerclass' => 'button-inner',
'label' => $this->title,
'label' => ($this->title != '' ? $this->title : 'cloud_button.cloud'),
'href' => $this->url,
'target' => '_blank',
'class' => 'button-cloud',
'classsel' => 'button-cloud button-selected',
'innerclass' => 'button-inner'
), 'taskbar');
}

}

?>
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "san4op/cloud_button",
"type": "roundcube-plugin",
"description": "Plugin to add button to open cloud storage.",
"keywords": ["button","cloud"],
"description": "Plugin to add button in taskbar to open cloud storage.",
"keywords": ["button","cloud","taskbar"],
"homepage": "https://github.com/san4op/roundcube_cloud_button",
"license": "GPL-3.0+",
"version": "0.1",
"license": "GPL-3.0",
"version": "1.0",
"authors": [
{
"name": "Alexander Pushkin",
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions skins/classic/cloud_button.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#taskbar a.button-cloud {
background: url(images/cloud.png) 0 2px no-repeat;
}
1 change: 1 addition & 0 deletions skins/classic/cloud_button.min.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#taskbar a.button-cloud{background:url(images/cloud.png) 0 2px no-repeat}
Binary file added skins/classic/images/cloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions skins/larry/cloud_button.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4628999

Please sign in to comment.