Skip to content

Commit

Permalink
Merge pull request #96 from farend/support-redmine6
Browse files Browse the repository at this point in the history
Support redmine6
  • Loading branch information
ishikawa999 authored Nov 12, 2024
2 parents a4ddbe7 + 2d20c8b commit 096d968
Show file tree
Hide file tree
Showing 21 changed files with 19 additions and 739 deletions.
6 changes: 3 additions & 3 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ $ git clone -b redmine4.2 https://github.com/farend/redmine_theme_farend_bleucla

- Redmine5.0.n、Redmine5.1.nの場合
```bash
$ git clone https://github.com/farend/redmine_theme_farend_bleuclair.git public/themes/bleuclair
$ git clone -b redmine5.1 https://github.com/farend/redmine_theme_farend_bleuclair.git public/themes/bleuclair
```

- RedMica 3.0、Redmine trunkの場合 ※ インストールディレクトリが変わります
- Redmine6以降、Redmine trunkの場合 ※ インストールディレクトリが変わります
```bash
$ git clone -b support-propshaft https://github.com/farend/redmine_theme_farend_bleuclair.git themes/bleuclair
$ git clone https://github.com/farend/redmine_theme_farend_bleuclair.git themes/bleuclair
```

**Gitが利用できない環境の場合:**
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ $ git clone -b redmine4.2 https://github.com/farend/redmine_theme_farend_bleucla

- For Redmine 5.0, Redmine 5.1
```bash
$ git clone https://github.com/farend/redmine_theme_farend_bleuclair.git public/themes/bleuclair
$ git clone -b redmine5.1 https://github.com/farend/redmine_theme_farend_bleuclair.git public/themes/bleuclair
```

- For RedMica 3.0, Redmine trunk
- For RedMica 6.0, Redmine trunk
```bash
$ git clone -b support-propshaft https://github.com/farend/redmine_theme_farend_bleuclair.git themes/bleuclair
$ git clone https://github.com/farend/redmine_theme_farend_bleuclair.git themes/bleuclair
```

**In an environment where Git is not available:**
Expand Down
87 changes: 0 additions & 87 deletions javascripts/theme.js

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

2 changes: 1 addition & 1 deletion javascripts/theme.js.map

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions package-lock.json

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

88 changes: 0 additions & 88 deletions src/scripts/bleuclair.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,91 +38,3 @@ $(function(){
});
});
});

// Function based on https://www.redmine.org/issues/21808#note-27 patch.
// collapsible sidebar jQuery plugin
(function($) {
// main container this is applied to
var main;
// triggers show/hide
var button;
// the key to use in local storage
// this will later be expanded using the current controller and action to
// allow for different sidebar states for different pages
var localStorageKey;
// true if local storage is available
var canUseLocalStorage = function(){
try {
if('localStorage' in window){
localStorage.setItem('redmine.test.storage', 'ok');
var item = localStorage.getItem('redmine.test.storage');
localStorage.removeItem('redmine.test.storage');
if(item === 'ok') return true;
}
} catch (err) {}
return false;
}();
// function to set current sidebar state
var setState = function(state){
if(canUseLocalStorage){
localStorage.setItem(localStorageKey, state);
}
};
var applyState = function(){
if(main.hasClass('visible-sidebar')){
setState('visible');
} else {
setState('hidden');
}
};
var setupToggleButton = function(){
button = $('#sidebar-switch-button');
button.click(function(e){
main.addClass("animate");
main.toggleClass('visible-sidebar');
applyState();
e.preventDefault();
return false;
});
applyState();
};
$.fn.collapsibleSidebar = function() {
main = this;
// determine previously stored sidebar state for this page
if(canUseLocalStorage) {
// determine current controller/action pair and use them as storage key
var bodyClass = $('body').attr('class');
if(bodyClass){
try {
localStorageKey = 'redmine-sidebar-state-' + bodyClass.split(/\s+/).filter(function(s){
return s.match(/(action|controller)-.*/);
}).sort().join('-');
} catch(e) {
// in case of error (probably IE8), continue with the default key.
localStorageKey = 'redmine-sidebar-state';
}
}
var storedState = localStorage.getItem(localStorageKey);
main.toggleClass('visible-sidebar', (storedState === 'visible' || !storedState));
} else {
main.toggleClass('visible-sidebar', true);
}
// draw the toggle button once the DOM is complete
$(document).ready(setupToggleButton);
};
}(jQuery));

window.addEventListener('DOMContentLoaded', function () {
if (!$('#main').hasClass('nosidebar')) {
if ($('#sidebar-switch-panel').length == 0) {
$('#content').prepend('<div id="sidebar-switch-panel"><a id="sidebar-switch-button" href="#"></a></div>');
}
try {
$('#main').collapsibleSidebar();
} catch(e) {
$('#main').toggleClass('visible-sidebar', true);
$('div#sidebar-switch-panel').remove();
console.error(e);
}
}
});
4 changes: 0 additions & 4 deletions src/styles/bleuclair.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import 'foundation/mixins';
@import 'foundation/variables';

@import 'components/scaffolding';
Expand All @@ -19,6 +18,3 @@
@import 'components/documents';
@import 'components/repositories';
@import 'components/activities';
@import 'components/gantts';
@import 'components/icon';
@import 'components/jstoolbar';
8 changes: 0 additions & 8 deletions src/styles/components/_gantts.scss

This file was deleted.

Loading

0 comments on commit 096d968

Please sign in to comment.