Skip to content

Commit

Permalink
Item11742:Item11917:Item11746:
Browse files Browse the repository at this point in the history
   * removed pointless css from innerfade
   * removed all jqueries prior to 1.7.1
   * improved docu on ui::dialog and jquery.tmpl
   * improved ui::dialog initializer
   * fixed border radius for blockUIs



git-svn-id: http://svn.foswiki.org/trunk@15116 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Jul 9, 2012
1 parent c4f8703 commit 7779032
Show file tree
Hide file tree
Showing 22 changed files with 93 additions and 99,309 deletions.
4 changes: 2 additions & 2 deletions JQueryPlugin/data/System/JQueryTmpl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function getMovies(genre, skip, top) {
jsonp: "$callback",
error: function(xhr, msg) {
$.unblockUI();
$("#errorMessage").append("<div class='foswikiErrorMessage'>Error: "+msg+"</div>");
$("#movieMessage").append("<div class='foswikiErrorMessage'>Error: "+msg+"</div>");
},
success: function( data ) {
var movies = data.d;
Expand All @@ -136,7 +136,7 @@ function getGenres() {
},
jsonp: "$callback",
error: function(xhr, msg) {
$("#errorMessage").append("<div class='foswikiErrorMessage'>Error: "+msg+"</div>");
$("#movieMessage").append("<div class='foswikiErrorMessage'>Error: "+msg+"</div>");
},
success: function( data ) {
var genres = data.d;
Expand Down
80 changes: 70 additions & 10 deletions JQueryPlugin/data/System/JQueryUIDialog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1320084362" format="1.1" version="1"}%
%META:TOPICINFO{author="micha" date="1341832780" format="1.1" reprev="3" version="3"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+!! %TOPIC%

Expand Down Expand Up @@ -86,18 +86,78 @@ When the button is clicked:
* If the &lt;a&gt; element has the =jqUIDialogSubmit= class, then a form defined in the dialog box will be submitted.
* If the &lt;a&gt; element has an href attribute, then the specified page will be loaded.

---++ Parameters

Parameters can be set using JQueryMetadata.

| *Name* | *Description* | *Default* |
| width | width of the dialog | 300 |
| height | height of the dialog | auto |
| autoOpen | boolean flag to either open the dialog when loaded (true) or delay opening it until the user says so (false) | false |
| draggable | boolean flag to make the dialog draggable | false |
| resizable | boolean flag to make the dialog resizable | false |
| closeOnEscape | boolean flag to let the user close the dialog using the ESC key | false |
| show | animation to be used to display the dialog | fade |
| hide | animation to be used to hide the dialog | |
| modal | If set to true, the dialog will have modal behavior; other items on the page will be disabled (i.e. cannot be interacted with). Modal dialogs create an overlay below the dialog but above other page elements. | false |
| position | Specifies where the dialog should be displayed, e.g. 'center', 'left', 'right', 'top', 'bottom', [350,100], ['right','top'] | center |

See the plugin's homepage for more.

---++ Events

Events are fired on different occasions during the lifetime of a dialog.

| *Name* | *Event* | *Description* |
| create | dialogcreate | This event is triggered when dialog is created |
| open | dialogopen | This event is triggered when the dialog is opened. |
| beforeClose | dialogbeforeclose | This event is triggered when a dialog attempts to close. If the beforeClose event handler (callback function) returns false, the close will be prevented. |
| focus | dialogfocus | This event is triggered when the dialog gains focus. |
| dragStart | dialogdragstart | This event is triggered at the beginning of the dialog being dragged. |
| drag | dialogdrag | This event is triggered when the dialog is dragged. |
| dragStop | dialogdragstop | This event is triggered after the dialog has been dragged. |
| resizeStart | dialogresizestart | This event is triggered at the beginning of the dialog being resized. |
| resize | dialogresize | This event is triggered when the dialog is resized. |
| resizeStop | dialogresizestop | This event is triggered after the dialog has been resized. |
| close | dialogclose | This event is triggered when the dialog is closed. |

A custom event handler can either be registered when creating the dialog:

<verbatim class="tml">
<div class="jqUIDialog {open: functon() {myOpen.call(this);}}"></div>
</verbatim>

... or by binding it afterwards using a jQuery way like =$("selector").bind(event, function)=
to register an event to a dom node.

<verbatim class="js">
<script>
$("#mydialog").bind("dialogclose", function() {
alert("got a dialogclose event");
});
</script>
</verbatim>

---++ Examples
%JQREQUIRE{"ui::dialog, ui::button"}%

---+++ Dialog defined inline
<a href="#dialog" class="jqUIDialogLink">Open Dialog</a>

<div id="dialog" title="Inline Dialog" class="jqUIDialog {draggable:true}">
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.
<a class="jqUIDialogButton jqUIDialogClose {icon:'ui-icon-circle-check'}">%MAKETEXT{"Ok"}%</a>
<a class="jqUIDialogButton jqUIDialogClose {icon:'ui-icon-cancel'}">%MAKETEXT{"Cancel"}%</a>
---+++ Drop-down login dialog
<a href="#dialog" class="jqUIDialogLink">Login</a>

<div id="dialog" title="%MAKETEXT{"Login"}%" class="jqUIDialog {modal:true, position:'center', width:'auto', show: {effect: 'drop', direction: 'up', duration:'fast'}, hide:{ effect: 'drop', direction: 'up', duration:'fast' }}">
<!-- position:'top' would be nicer but doesn't work for some reasons -->
<table class='foswikiLayoutTable'>
<tr>
<th>%MAKETEXT{"Name"}%:</th>
<td><input type="text" size="50" name="name" class="foswikiInputField" /></td>
</tr>
<tr>
<th>%MAKETEXT{"Password"}%:</th>
<td><input type="password" size="50" name="password" class="foswikiInputField" /></td>
</tr>
</table>
<a class="jqUIDialogButton jqUIDialogClose {icon:'ui-icon-circle-check'}">%MAKETEXT{"Come on in"}%</a>
<a class="jqUIDialogButton jqUIDialogClose {icon:'ui-icon-cancel'}">%MAKETEXT{"Never mind"}%</a>
</div>

---+++ Dialog fetched asynchronously
Expand Down
4 changes: 0 additions & 4 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/Config.spec
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ $Foswiki::cfg{JQueryPlugin}{NoConflict} = 0;
$Foswiki::cfg{JQueryPlugin}{DefaultPlugins} = '';

# **SELECT jquery-1.7.2, jquery-1.7.1**
# Foswiki also ships jquery-1.4.3, jquery-1.4.4, jquery-1.5, jquery-1.5.1,
# jquery-1.5.2, jquery-1.6.1, jquery-1.6.2, jquery-1.6.3, jquery-1.6.4,
# jquery-1.7. However these older versions are deprecated and will be removed
# from the JQueryPlugin package soon.
$Foswiki::cfg{JQueryPlugin}{JQueryVersion} = 'jquery-1.7.2';

# **SELECT ,base, flickr, foswiki, lightness, redmond, smoothness**
Expand Down
1 change: 0 additions & 1 deletion JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/INNERFADE.pm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ sub new {
version => '20080214',
author => 'Torsten Baldes',
homepage => 'http://medienfreunde.com/lab/innerfade',
css => ['jquery.innerfade.css'],
javascript => [ 'jquery.innerfade.js', 'jquery.innerfade.init.js' ],
dependencies => [ 'metadata', 'livequery' ],
),
Expand Down
36 changes: 0 additions & 36 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -269,39 +269,6 @@ pub/System/JQueryPlugin/i18n/Makefile 0644
pub/System/JQueryPlugin/images/nobody.gif 0644
pub/System/JQueryPlugin/images/spinner_arrows.gif 0644
pub/System/JQueryPlugin/images/spinner.gif 0644
pub/System/JQueryPlugin/jquery-1.4.2.js 0644
pub/System/JQueryPlugin/jquery-1.4.2.js.gz 0644
pub/System/JQueryPlugin/jquery-1.4.2.uncompressed.js 0644
pub/System/JQueryPlugin/jquery-1.4.3.js 0644
pub/System/JQueryPlugin/jquery-1.4.3.js.gz 0644
pub/System/JQueryPlugin/jquery-1.4.3.uncompressed.js 0644
pub/System/JQueryPlugin/jquery-1.4.4.js 0644
pub/System/JQueryPlugin/jquery-1.4.4.js.gz 0644
pub/System/JQueryPlugin/jquery-1.4.4.uncompressed.js 0644
pub/System/JQueryPlugin/jquery-1.5.1.js 0644
pub/System/JQueryPlugin/jquery-1.5.1.js.gz 0644
pub/System/JQueryPlugin/jquery-1.5.1.uncompressed.js 0644
pub/System/JQueryPlugin/jquery-1.5.2.js 0644
pub/System/JQueryPlugin/jquery-1.5.2.js.gz 0644
pub/System/JQueryPlugin/jquery-1.5.2.uncompressed.js 0644
pub/System/JQueryPlugin/jquery-1.5.js 0644
pub/System/JQueryPlugin/jquery-1.5.js.gz 0644
pub/System/JQueryPlugin/jquery-1.5.uncompressed.js 0644
pub/System/JQueryPlugin/jquery-1.6.1.js 0644
pub/System/JQueryPlugin/jquery-1.6.1.js.gz 0644
pub/System/JQueryPlugin/jquery-1.6.1.uncompressed.js 0644
pub/System/JQueryPlugin/jquery-1.6.2.js 0644
pub/System/JQueryPlugin/jquery-1.6.2.js.gz 0644
pub/System/JQueryPlugin/jquery-1.6.2.uncompressed.js 0644
pub/System/JQueryPlugin/jquery-1.6.3.js 0644
pub/System/JQueryPlugin/jquery-1.6.3.js.gz 0644
pub/System/JQueryPlugin/jquery-1.6.3.uncompressed.js 0644
pub/System/JQueryPlugin/jquery-1.6.4.js 0644
pub/System/JQueryPlugin/jquery-1.6.4.js.gz 0644
pub/System/JQueryPlugin/jquery-1.6.4.uncompressed.js 0644
pub/System/JQueryPlugin/jquery-1.7.js 0644
pub/System/JQueryPlugin/jquery-1.7.js.gz 0644
pub/System/JQueryPlugin/jquery-1.7.uncompressed.js 0644
pub/System/JQueryPlugin/jquery-1.7.1.js 0644
pub/System/JQueryPlugin/jquery-1.7.1.js.gz 0644
pub/System/JQueryPlugin/jquery-1.7.1.uncompressed.js 0644
Expand Down Expand Up @@ -446,14 +413,11 @@ pub/System/JQueryPlugin/plugins/hoverintent/jquery.hoverIntent.js 0644
pub/System/JQueryPlugin/plugins/hoverintent/jquery.hoverIntent.js.gz 0644
pub/System/JQueryPlugin/plugins/hoverintent/jquery.hoverIntent.uncompressed.js 0644
pub/System/JQueryPlugin/plugins/hoverintent/Makefile 0644
pub/System/JQueryPlugin/plugins/innerfade/jquery.innerfade.css 0644
pub/System/JQueryPlugin/plugins/innerfade/jquery.innerfade.css.gz 0644
pub/System/JQueryPlugin/plugins/innerfade/jquery.innerfade.init.js 0644
pub/System/JQueryPlugin/plugins/innerfade/jquery.innerfade.init.js.gz 0644
pub/System/JQueryPlugin/plugins/innerfade/jquery.innerfade.init.uncompressed.js 0644
pub/System/JQueryPlugin/plugins/innerfade/jquery.innerfade.js 0644
pub/System/JQueryPlugin/plugins/innerfade/jquery.innerfade.js.gz 0644
pub/System/JQueryPlugin/plugins/innerfade/jquery.innerfade.uncompressed.css 0644
pub/System/JQueryPlugin/plugins/innerfade/jquery.innerfade.uncompressed.js 0644
pub/System/JQueryPlugin/plugins/innerfade/Makefile 0644
pub/System/JQueryPlugin/plugins/livequery/jquery.livequery.js 0644
Expand Down
Loading

0 comments on commit 7779032

Please sign in to comment.