Skip to content

Commit

Permalink
Fixed wikicipher button issue
Browse files Browse the repository at this point in the history
Incremented version
  • Loading branch information
sleroux-keep committed Apr 13, 2015
1 parent 542f51b commit 6597cbb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions assets/javascripts/jstoolbar/wikicipher.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@ jsToolBar.prototype.elements.wikicipher = {

window.onload=function(){
var warn = document.getElementsByClassName('flash warning');
var isWiki = "/Wiki/edit";
var wikiEdit = "/edit";
var wiki = "wiki";
if (warn.length>0){
document.getElementsByClassName('jstb_wikicipher')[0].hide();
}
if(window.location.pathname.indexOf(isWiki, window.location.pathname.length - isWiki.length) !== -1){
var pathName = window.location.pathname;
if(
(pathName.indexOf(wiki)>=0 && pathName.indexOf(wikiEdit, pathName.length - wikiEdit.length) !== -1)
||
(pathName.indexOf(wiki, pathName.length - wiki.length) !== -1)
){
// nothing to do...
}else{
//hide wikicipher toolbar buttons
Expand Down
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
author 'Sébastien Leroux'
author_url 'mailto:[email protected]'
description 'This plugin adds the ability to encrypt section of text'
version '0.0.8'
version '0.0.10'
url 'https://github.com/keeps/redmine_wikicipher'
end

Expand Down

0 comments on commit 6597cbb

Please sign in to comment.