Skip to content

Commit 1a47760

Browse files
committed
Merge branch 'development'
2 parents abce5d3 + 756eed1 commit 1a47760

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ This plugin provide on pop-up show feature of diff.
1212

1313
## Compatibility
1414

15-
Redmine 3.2 or 3.3 or 3.4 stable
15+
Redmine 3.2 or 3.3 or 3.4 or 4.0 stable
1616

1717
Tested on:
1818

1919
* 3.2.2
2020
* 3.3.0
21-
* 3.4.3
21+
* 3.4.8
22+
* 4.0.1
2223

2324
## Installation
2425

assets/javascripts/wiki_popup.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
function replaceWikiSubmitButton()
22
{
3-
$("button.wiki-popup, #project_id, #id").replaceAll($("#content > form > input.small")).filter("button.wiki-popup").show().on("click", function(){
3+
$("#project_id, #id").insertBefore("#content > form > table");
4+
$("button.wiki-popup").replaceAll($("#content > form input[type='submit']")).filter("button.wiki-popup").show().on("click", function(){
45
//on top dialog
56
var dlgName = "#diffpopup" + $("input[name='version_from']:checked").val() + "_" + $("input[name='version']:checked").val();
67
if ($(dlgName).size() == 1)
@@ -10,7 +11,7 @@ function replaceWikiSubmitButton()
1011
}
1112

1213
//show dialog
13-
var diffUrl = $(this).attr("url") + $(this).parent("form").serialize();
14+
var diffUrl = $(this).attr("url") + $(this).parents("form").serialize();
1415
$.get(diffUrl, function (data) {
1516
var params = q_to_hash(decodeURIComponent(this.url).split("?")[1].split("&"));
1617
var popupId = "diffpopup" + params["version_from"] + "_" + params["version"];
@@ -47,4 +48,4 @@ function q_to_hash(param){
4748
hs[kv[0]]=kv[1];
4849
}
4950
return hs;
50-
}
51+
}

init.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
require_dependency 'redmine_diff_popup/patches/user_preference_patch'
44

55

6-
ActionDispatch::Callbacks.to_prepare do
6+
reloader = defined?(ActiveSupport::Reloader) ? ActiveSupport::Reloader : ActionDispatch::Reloader
7+
reloader.to_prepare do
78
unless UserPreference.included_modules.include?(RedmineDiffPopup::Patches::UserPreferencePatch)
89
UserPreference.send :prepend, RedmineDiffPopup::Patches::UserPreferencePatch
910
end
@@ -18,7 +19,7 @@
1819
name 'Redmine Diff Popup plugin'
1920
author 'Ryuta Tobita'
2021
description 'This plugin provide on pop-up show feature of diff.'
21-
version '2.1.0'
22+
version '2.2.0'
2223
url 'https://github.com/GEROMAX/redmine_diff_popup'
2324
author_url 'https://github.com/GEROMAX'
2425
permission :wiki_popup, {:wiki_popup => [:wiki_diff]}, :public => true

0 commit comments

Comments
 (0)