Skip to content

Commit

Permalink
Item13530: fix positioning of modal dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Jul 17, 2015
1 parent aa506b4 commit 50030f3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
5 changes: 3 additions & 2 deletions data/System/EditChapterPlugin.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="" date="1418733168" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" comment="" date="1437150138" format="1.1" version="1"}%
---+!! %TOPIC%
%SHORTDESCRIPTION%

Expand Down Expand Up @@ -132,11 +132,12 @@ Many thanks to the following sponsors for supporting this work:
* Set SHORTDESCRIPTION = An easy section editing facility
-->
| Plugin Author(s): | Michael Daum |
| Copyright ©: | 2008-2014, Michael Daum http://michaeldaumconsulting.com |
| Copyright ©: | 2008-2015, Michael Daum http://michaeldaumconsulting.com |
| License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 17 Jul 2015: | fix positioning of modal dialog |
| 16 Dec 2014: | make it cope with async page loads |
| 04 Apr 2014: | improve cleaning up link titles |
| 12 Dec 2013: | properly unlock cancelled edits |
Expand Down
6 changes: 3 additions & 3 deletions lib/Foswiki/Plugins/EditChapterPlugin.pm
@@ -1,6 +1,6 @@
# Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
#
# Copyright (C) 2008-2014 Michael Daum http://michaeldaumconsulting.com
# Copyright (C) 2008-2015 Michael Daum http://michaeldaumconsulting.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand All @@ -23,8 +23,8 @@ use Foswiki::Plugins();
use Foswiki::Plugins::JQueryPlugin ();
use Foswiki::Contrib::JsonRpcContrib ();

our $VERSION = '4.70';
our $RELEASE = '4.70';
our $VERSION = '4.71';
our $RELEASE = '4.71';
our $NO_PREFS_IN_TOPIC = 1;
our $SHORTDESCRIPTION = 'An easy sectional edit facility';
our $core;
Expand Down
4 changes: 2 additions & 2 deletions lib/Foswiki/Plugins/EditChapterPlugin/Core.pm
@@ -1,6 +1,6 @@
# Plugin for Foswiki - The Free and Open Source Wiki, http://foswiki.org/
#
# Copyright (C) 2008-2014 Michael Daum http://michaeldaumconsulting.com
# Copyright (C) 2008-2015 Michael Daum http://michaeldaumconsulting.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
Expand Down Expand Up @@ -45,7 +45,7 @@ sub new {
'<img src="%PUBURLPATH%/%SYSTEMWEB%/EditChapterPlugin/pencil.png" height="16" width="16" />';
my $editLabelFormat =
Foswiki::Func::getPreferencesValue("EDITCHAPTERPLUGIN_EDITLABELFORMAT") ||
'<span id="$id" class="ecpHeading"> $heading <noautolink><a href="#" class="ecpEdit" title="$title" data-web="$web" data-topic="$topic" data-from="$from" data-to="$to">$img</a></noautolink></span>';
'<span id="$id" class="ecpHeading">$heading <noautolink><a href="#" class="ecpEdit" title="$title" data-web="$web" data-topic="$topic" data-from="$from" data-to="$to">$img</a></noautolink></span>';

my $wikiName = Foswiki::Func::getWikiName();

Expand Down
7 changes: 3 additions & 4 deletions pub/System/EditChapterPlugin/ecpjavascript.uncompressed.js
Expand Up @@ -62,13 +62,12 @@ jQuery(function($) {
//alert(json.error.message);
}
});
$dialog.dialog("close").remove();
});

// focus textarea
setTimeout(function() {
$dialog.find(".natedit").focus();
}, 500);
window.setTimeout(function() {
$dialog.dialog({position: {my:'center', at:'center', of:window}});
});

// concat before submit
$this.addClass("ecpInitedForm").submit(function() {
Expand Down
2 changes: 1 addition & 1 deletion templates/edit.chapter.tmpl
Expand Up @@ -10,7 +10,7 @@
<input type="hidden" name="t" value="%GMTIME{"$epoch"}%" />
<input type="hidden" name="redirectto" value="%SCRIPTURL{"view"}%/%WEB%/%TOPIC%#%URLPARAM{"id"}%" />
<textarea name="beforetext" style="display:none" >%EXTRACTCHAPTER{before="%URLPARAM{"from" default="0"}%" encode="on"}%</textarea>
<textarea name="chapter" class="foswikiTextarea natedit" rows="%EDITBOXHEIGHT%" cols="%EDITBOXWIDTH%" wrap="virtual">%EXTRACTCHAPTER{from="%URLPARAM{"from" default="0"}%" to="%URLPARAM{"to"}%" encode="on"}%</textarea>
<textarea name="chapter" autofocus class="foswikiTextarea natedit" rows="%EDITBOXHEIGHT%" cols="%EDITBOXWIDTH%" wrap="virtual">%EXTRACTCHAPTER{from="%URLPARAM{"from" default="0"}%" to="%URLPARAM{"to"}%" encode="on"}%</textarea>
<textarea name="aftertext" style="display:none">%EXTRACTCHAPTER{after="%URLPARAM{"to"}%" encode="on"}%</textarea>
<textarea name="text" style="display:none" >%EXTRACTCHAPTER{encode="on"}%</textarea>
<input type="hidden" name="from" value="%URLPARAM{"from" default="0"}%" />
Expand Down

0 comments on commit 50030f3

Please sign in to comment.