Skip to content

Commit

Permalink
Item14312: don't destroy dialogs on close
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Jan 30, 2017
1 parent d307965 commit 6c8cda0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
8 changes: 4 additions & 4 deletions JQueryPlugin/data/System/JQueryUIDialog.txt
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1481544450" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1485768381" format="1.1" version="1"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+!! %TOPIC%

Expand Down Expand Up @@ -81,7 +81,7 @@ When the button is clicked:

---++ Parameters

Parameters can be set using HTML5 data (data-<name>)
Parameters can be set using HTML5 data (=data-<name>=)

| *Name* | *Description* | *Default* |
| width | width of the dialog | 300 |
Expand Down Expand Up @@ -137,7 +137,7 @@ $("#mydialog").bind("dialogclose", function() {
---+++ Drop-down login dialog
<a href="#dialog" class="jqUIDialogLink">Login</a>

<div id="dialog" title="%MAKETEXT{"Login"}%" class="jqUIDialog {modal:true, position:'center top', width:'auto', show: {effect: 'drop', direction: 'up', duration:'fast'}, hide:{ effect: 'drop', direction: 'up', duration:'fast' }}">
<div id="dialog" title="%MAKETEXT{"Login"}%" class="jqUIDialog" data-modal="true" data-position='{"at":"top"}' data-width="auto" data-show='{"effect":"drop", "direction":"up", "duration":"fast"}' data-hide='{"effect":"drop", "direction":"up", "duration":"fast"}'>
<table class='foswikiLayoutTable'>
<tr>
<th>%MAKETEXT{"Name:"}%</th>
Expand All @@ -158,7 +158,7 @@ $("#mydialog").bind("dialogclose", function() {

<verbatim class="tml">
%STARTSECTION{"dialog"}%
<div title="From Ajax call" class="jqUIDialog { modal:true, resizable:true, draggable:true, height:300, width:600}">
<div title="From Ajax call" class="jqUIDialog" data-modal="true" data-resizable="true" data-draggable="true" data-height="300" data-width="600">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore
et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip
ex ea commodo consequat.
Expand Down
2 changes: 1 addition & 1 deletion JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/UI/DIALOG.pm
Expand Up @@ -46,7 +46,7 @@ sub new {
__END__
Foswiki - The Free and Open Source Wiki, http://foswiki.org/
Copyright (C) 2010-2016 Foswiki Contributors. Foswiki Contributors
Copyright (C) 2010-2017 Foswiki Contributors. Foswiki Contributors
are listed in the AUTHORS file in the root of this distribution.
NOTE: Please extend that file, not this notice.
Expand Down
Expand Up @@ -8,10 +8,7 @@ jQuery(function($) {
draggable:false,
resizable:false,
closeOnEscape:false,
show:'fade',
close: function() {
$(this).dialog("destroy").remove();
}
show:'fade'
};

// dialog
Expand Down

0 comments on commit 6c8cda0

Please sign in to comment.