Skip to content

Commit

Permalink
V2.9.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Mar 11, 2016
1 parent 63f62b4 commit b0cac4b
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ php:
matrix:
allow_failures:
- php: 7.0
fast_finish: true

env:
global:
- MOODLE_BRANCH=MOODLE_30_STABLE
- IGNORE_PATHS=amd/build,amd/src/bootstrap.js,amd/src/fitvids.js,javascript/syntaxhighlighter_3_0_83/
# Ignore custom.css until CSSlint can be instructed to ignore lines for '[[setting:customcss]]'.
- IGNORE_PATHS=amd/build
- IGNORE_NAMES=*.txt
matrix:
- DB=pgsql
Expand Down
4 changes: 4 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Version Information
===================
Version 2.9.1.1
1. Improvements for ARIA.
2. Style improvements.

Version 2.9.1
1. First stable version. Works on M3.0 too.

Expand Down
18 changes: 11 additions & 7 deletions block_theme_selector.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public function get_content() {
$selectdataarray['data-url'] = $pageurl;
$selectdataarray['data-urlparams'] = (strpos($pageurl, '?') === false) ? 1 : 2;
}
$selectdataarray['aria-labelledby'] = 'themeselectorselectlabel';
$this->page->requires->js_call_amd('block_theme_selector/block_theme_selector', 'init', array());

// Add a dropdown to switch themes.
Expand All @@ -79,15 +80,17 @@ public function get_content() {
unset($options['bootstrapbase']);
$current = $this->page->theme->name;
}
$select = html_writer::select($options, 'choose', $current, false, $selectdataarray);
$this->content->text .= get_string('changetheme', 'block_theme_selector').': '.$select;
$this->content->text .= html_writer::start_tag('div', array('class' => 'themeselectorselect'));
$this->content->text .= html_writer::tag('label', get_string('changetheme', 'block_theme_selector'),
array('id' => 'themeselectorselectlabel'));
$this->content->text .= html_writer::select($options, 'choose', $current, false, $selectdataarray);
$this->content->text .= html_writer::end_tag('div');

$this->content->text .= '<br /><br />';

$this->content->text .= html_writer::start_tag('form', array('action' => new moodle_url('/theme/index.php'),
'method' => 'post'));
if (has_capability('moodle/site:config', $coursecontext)) {
// Add a button to reset theme caches.
$this->content->text .= html_writer::start_tag('div', array('class' => 'themeselectorreset'));
$this->content->text .= html_writer::start_tag('form', array('action' => new moodle_url('/theme/index.php'),
'method' => 'post'));
$this->content->text .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'sesskey',
'value' => sesskey()));
$this->content->text .= html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'reset',
Expand All @@ -96,8 +99,9 @@ public function get_content() {
'value' => 'default'));
$this->content->text .= html_writer::tag('button', get_string('resetthemecache', 'block_theme_selector'),
array('type' => 'submit'));
$this->content->text .= html_writer::end_tag('form');
$this->content->text .= html_writer::end_tag('div');
}
$this->content->text .= html_writer::end_tag('form');

$this->content->text .= '<br />';
} else if ($CFG->block_theme_selector_urlswitch == 1) {
Expand Down
2 changes: 1 addition & 1 deletion lang/en/block_theme_selector.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/

$string['pluginname'] = 'Theme selector';
$string['changetheme'] = 'Change theme';
$string['changetheme'] = 'Change theme:';
$string['resetthemecache'] = 'Reset theme cache';
$string['theme_selector:addinstance'] = 'Add a new Theme Selector block';
$string['theme_selector:myaddinstance'] = 'Add a new Theme Selector block to Dashboard';
Expand Down
5 changes: 5 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.block_theme_selector label#themeselectorselectlabel { display: inline; vertical-align: middle; }
.dir-ltr .block_theme_selector label#themeselectorselectlabel { margin-right: 4px; }
.dir-rtl .block_theme_selector label#themeselectorselectlabel { margin-left: 4px; }
.block_theme_selector .themeselectorselect select { margin-bottom: 0; }
.block_theme_selector .themeselectorreset button { margin: 10px 0 0; }
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

defined('MOODLE_INTERNAL') || die;

$plugin->release = '2.9.1';
$plugin->version = 2015082102; // The current plugin version (Date: YYYYMMDDXX)
$plugin->release = '2.9.1.1';
$plugin->version = 2015082103; // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires = 2015051100.00; // 2.9 (Build: 20150511).
$plugin->maturity = MATURITY_STABLE;
$plugin->component = 'block_theme_selector'; // Full name of the plugin (used for diagnostics)

0 comments on commit b0cac4b

Please sign in to comment.