Skip to content

Commit

Permalink
Item12678: properly unlock cancelled chapter edits
Browse files Browse the repository at this point in the history
Item12583: revert to simple floats in $VERSION



git-svn-id: http://svn.foswiki.org/trunk/EditChapterPlugin@17135 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Dec 11, 2013
1 parent af10d8f commit 61f8185
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
1 change: 1 addition & 0 deletions data/System/EditChapterPlugin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ Many thanks to the following sponsors for supporting this work:
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 12 Dec 2013: | properly unlock cancelled edits |
| 06 Nov 2013: | prevent !WikiWords being expanded in HTML attributes |
| 02 Sep 2013: | improved javscript click behavior editing chapters; fixed html markup displayed un-rendered in the modal dialog's title bar |
| 13 Aug 2013: | check access rights before locking a topic; removed check for <nop>oldIEs |
Expand Down
4 changes: 2 additions & 2 deletions lib/Foswiki/Plugins/EditChapterPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ use Foswiki::Plugins();
use Foswiki::Plugins::JQueryPlugin ();
use Foswiki::Contrib::JsonRpcContrib ();

our $VERSION = '4.62';
our $RELEASE = '4.62';
our $VERSION = '4.63';
our $RELEASE = '4.63';
our $NO_PREFS_IN_TOPIC = 1;
our $SHORTDESCRIPTION = 'An easy sectional edit facility';
our $core;
Expand Down
9 changes: 7 additions & 2 deletions pub/System/EditChapterPlugin/ecpjavascript.uncompressed.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jQuery(function($) {
topic = $this.find("input[name='topic']").val(),
$dialog = $this.parent();

$dialog.bind("cancel", function() {
$dialog.on("dialogclose", function(ev) {
$.jsonRpc(foswiki.getPreference("SCRIPTURL")+"/jsonrpc", {
namespace: "EditChapterPlugin",
method: "unlock",
Expand All @@ -62,9 +62,14 @@ jQuery(function($) {
//alert(json.error.message);
}
});
$dialog.dialog("close");
$dialog.dialog("close").remove();
});

// focus textarea
setTimeout(function() {
$dialog.find(".natedit").focus();
}, 500);

// concat before submit
$this.addClass("ecpInitedForm").submit(function() {
var before = $this.find('[name=beforetext]'),
Expand Down
4 changes: 2 additions & 2 deletions pub/System/EditChapterPlugin/ecpstyles.uncompressed.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
display:none;
}

.ecpForm .natEditTextArea {
width:98%;
.ecpForm textarea {
width:100%;
margin:0px;
}
.foswikiToc .ecpHeading img {
Expand Down
6 changes: 3 additions & 3 deletions templates/edit.chapter.tmpl
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
%TMPL:INCLUDE{"edit"}%<!-- template: edit.chapter.tmpl -->
%TMPL:INCLUDE{"editjavascript"}%

%TMPL:DEF{"dialog::params"}%alsoResize:'textarea.foswikiTextarea', modal:true, draggable:true, resizable:true, width:800%TMPL:END%
%TMPL:DEF{"dialog::params::animated"}%alsoResize:'textarea.foswikiTextarea', modal:true, draggable:true, resizable:true, width:800, show: {effect: 'drop', direction: 'up', duration:'fast'}, hide:{ effect: 'drop', direction: 'up', duration:'fast' }%TMPL:END%
%TMPL:DEF{"dialog::params"}%alsoResize:'textarea.foswikiTextarea', modal:true, draggable:true, resizable:true, width:855%TMPL:END%
%TMPL:DEF{"dialog::params::animated"}%alsoResize:'textarea.foswikiTextarea', modal:true, draggable:true, resizable:true, width:855, show: {effect: 'drop', direction: 'up', duration:'fast'}, hide:{ effect: 'drop', direction: 'up', duration:'fast' }%TMPL:END%

%TMPL:DEF{"dialog"}%<div class="jqUIDialog {%TMPL:P{"dialog::params"}%}" title="%MAKETEXT{"Edit chapter '[_1]'" args="%URLPARAM{"title" default="%URLPARAM{"from"}%"}%"}%">
<form name="EditForm" action="%SCRIPTURLPATH{"save"}%" method="post" class="ecpForm">
<input type="hidden" name="topic" value="%WEB%.%TOPIC%" />
<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="jqFocus foswikiTextarea natEditTextArea natedit" rows="%EDITBOXHEIGHT%" cols="%EDITBOXWIDTH%" wrap="virtual">%EXTRACTCHAPTER{from="%URLPARAM{"from" default="0"}%" to="%URLPARAM{"to"}%" 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="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 61f8185

Please sign in to comment.