Skip to content

Commit

Permalink
Item13206: docu updates; fixing examples
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelDaum committed Sep 6, 2016
1 parent 36a9ba4 commit 5001db0
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
5 changes: 2 additions & 3 deletions JQueryPlugin/data/System/JQueryFluidFont.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1456220586" format="1.1" version="1"}% %META:TOPICINFO{author="ProjectContributor" comment="" date="1473163788" format="1.1" version="1"}%
%META:TOPICPARENT{name="JQueryPlugin"}% %META:TOPICPARENT{name="JQueryPlugin"}%
---+ %TOPIC% ---+ %TOPIC%
%JQPLUGINS{"fluidfont" %JQPLUGINS{"fluidfont"
Expand Down Expand Up @@ -45,9 +45,8 @@ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam facilisis neque i
| data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data | data |
</div> </div>



%IF{"$'fluidfont'='on'" %IF{"$'fluidfont'='on'"
then="$percntADDTOZONE{\"script\" topic=\"%WEB%.%TOPIC%\" section=\"fluidfont\"}$percnt then="$percntADDTOZONE{\"script\" requires=\"JQUERYPLUGIN::FLUIDFONT\" topic=\"%WEB%.%TOPIC%\" section=\"fluidfont\"}$percnt
Fluid font is activated. Try to resize the browser window." Fluid font is activated. Try to resize the browser window."
else="<a href='%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?fluidfont=on'>Click here</a> else="<a href='%SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?fluidfont=on'>Click here</a>
to activate fluid font for all of this page." to activate fluid font for all of this page."
Expand Down
10 changes: 8 additions & 2 deletions JQueryPlugin/data/System/JQueryPlugin.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" comment="" date="1460294027" format="1.1" version="1"}% %META:TOPICINFO{author="ProjectContributor" comment="" date="1473163788" format="1.1" version="1"}%
---+!! %TOPIC% ---+!! %TOPIC%
%FORMFIELD{"Description"}% %FORMFIELD{"Description"}%


Expand Down Expand Up @@ -125,6 +125,12 @@ required for Foswiki 1.1 or later.


---++ Change History ---++ Change History
%TABLE{columnwidths="7em" tablewidth="100%"}% %TABLE{columnwidths="7em" tablewidth="100%"}%
| 06 Sep 2016: | (7.10) - Item14121: reimplement jquery.stars using SVGs now; \
- Item14120: remove outdate compression tools; \
- Item13206: upgrade to jquery-ui; added jQuery-1.12.4 / jQuery-2.2.4; \
- Item14122: upgrade to fontawesome 4.6.3; \
- Item14123: fixed =foswiki.getPubUrlPath()= using an uninitialized parameter; \
- Item14124: make skin of a jquery.loader backend configurable |
| 10 Apr 2016: | (7.04) - Item14042: it's jquery-1.12.3 not jquey-1.12.3 | | 10 Apr 2016: | (7.04) - Item14042: it's jquery-1.12.3 not jquey-1.12.3 |
| 06 Apr 2016: | (7.03) - Item14042: added jQuery-1.12.3 / jQuery-2.2.3 | | 06 Apr 2016: | (7.03) - Item14042: added jQuery-1.12.3 / jQuery-2.2.3 |
| 04 Apr 2016: | (7.02) - Item14024: fix issue with JSON::XS 3.02 in some environments | | 04 Apr 2016: | (7.02) - Item14024: fix issue with JSON::XS 3.02 in some environments |
Expand Down Expand Up @@ -358,7 +364,7 @@ required for Foswiki 1.1 or later.


%META:FORM{name="PackageForm"}% %META:FORM{name="PackageForm"}%
%META:FIELD{name="Author" title="Author" value="ProjectContributor"}% %META:FIELD{name="Author" title="Author" value="ProjectContributor"}%
%META:FIELD{name="Copyright" title="Copyright" value="2007-2016 Foswiki Contributors http://foswiki.org"}% %META:FIELD{name="Copyright" title="Copyright" value="2007-2016 Foswiki Contributors https://foswiki.org"}%
%META:FIELD{name="Description" title="Description" value="%25$SHORTDESCRIPTION%25"}% %META:FIELD{name="Description" title="Description" value="%25$SHORTDESCRIPTION%25"}%
%META:FIELD{name="Home" title="Home" value="Foswiki:Extensions/%25$ROOTMODULE%25"}% %META:FIELD{name="Home" title="Home" value="Foswiki:Extensions/%25$ROOTMODULE%25"}%
%META:FIELD{name="License" title="License" value="GPL"}% %META:FIELD{name="License" title="License" value="GPL"}%
Expand Down
16 changes: 8 additions & 8 deletions JQueryPlugin/data/System/JQueryRender.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1456220586" format="1.1" version="1"}% %META:TOPICINFO{author="ProjectContributor" comment="" date="1473163832" format="1.1" version="1"}%
%META:TOPICPARENT{name="JQueryPlugin"}% %META:TOPICPARENT{name="JQueryPlugin"}%
---+!! %TOPIC% ---+!! %TOPIC%


Expand Down Expand Up @@ -74,7 +74,7 @@ See how this works out:
</p> </p>
</script> </script>


<script> %ADDTOZONE{"script" requires="JQUERYPLUGIN::RENDER" id="%TOPIC%::PERSONS" text="<script type='text/javascript'>
var arrayOfPersons = [ var arrayOfPersons = [
{ {
firstName:'David', firstName:'David',
Expand All @@ -99,9 +99,9 @@ var arrayOfPersons = [
]; ];


jQuery(function($) { jQuery(function($) {
$("#container1").html($("#personTemplate1").render(arrayOfPersons)); $('#container1').html($('#personTemplate1').render(arrayOfPersons));
}); });
</script> </script>"}%


Whenever you'd like to use a different layout for the same data just use a different template. No big deal. Whenever you'd like to use a different layout for the same data just use a different template. No big deal.
Imagine doing the same using DOM plumbing... Imagine doing the same using DOM plumbing...
Expand All @@ -118,11 +118,11 @@ Imagine doing the same using DOM plumbing...
<li>{{:firstName}} {{:lastName}}</li> <li>{{:firstName}} {{:lastName}}</li>
</script> </script>


<script> %ADDTOZONE{"script" requires="JQUERYPLUGIN::RENDER" id="%TOPIC%::INIT" text="<script type='text/javascript'>
jQuery(function($) { jQuery(function($) {
$("#container2").html($("#personTemplate2").render(arrayOfPersons)); $('#container2').html($('#personTemplate2').render(arrayOfPersons));
}); });
</script> </script>"}%


---++ Further reading ---++ Further reading


Expand Down Expand Up @@ -160,4 +160,4 @@ and return the rendered template.
| ={{<nop>!-- ... --}}= | comments to templates, or commenting out sections of a template | ={{!-- this is a comment --}}= | | ={{<nop>!-- ... --}}= | comments to templates, or commenting out sections of a template | ={{!-- this is a comment --}}= |




%META:FILEATTACHMENT{name="logo-jsr.png" attr="h" comment="" date="1456220586" size="1241" user="ProjectContributor" version="1"}% %META:FILEATTACHMENT{name="logo-jsr.png" attr="h" comment="" date="1473163859" size="1241" user="ProjectContributor" version="1"}%
4 changes: 2 additions & 2 deletions JQueryPlugin/data/System/VarPOPUPWINDOW.txt
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1456220586" format="1.1" version="1"}% %META:TOPICINFO{author="ProjectContributor" comment="" date="1473163788" format="1.1" version="1"}%
%META:TOPICPARENT{name="Macros"}% %META:TOPICPARENT{name="Macros"}%
---+ POPUPWINDOW -- opens a topic or url in a new window ---+ POPUPWINDOW -- opens a topic or url in a new window
---++ Parameters ---++ Parameters
Expand All @@ -22,7 +22,7 @@
| =createnew= | Create a new window for each popup? | ="1"= | | =createnew= | Create a new window for each popup? | ="1"= |
---++ Examples ---++ Examples
* Example with topic link: <pre class="tml">%<nop>POPUPWINDOW{"%BASETOPIC%" label="Open this topic in a new window"}%</pre> Generates: %POPUPWINDOW{"%BASETOPIC%" label="Open this topic in a new window"}% * Example with topic link: <pre class="tml">%<nop>POPUPWINDOW{"%BASETOPIC%" label="Open this topic in a new window"}%</pre> Generates: %POPUPWINDOW{"%BASETOPIC%" label="Open this topic in a new window"}%
* Example with URL: <pre class="tml">%<nop>POPUPWINDOW{url="http://foswiki.org"}%</pre> Generates: %POPUPWINDOW{url="http://foswiki.org"}% * Example with URL: <pre class="tml">%<nop>POPUPWINDOW{url="https://foswiki.org"}%</pre> Generates: %POPUPWINDOW{url="https://foswiki.org"}%
* Enable =POPUPWINDOW= by writing =%<nop>JQREQUIRE{"popupwindow"}%= on the page * Enable =POPUPWINDOW= by writing =%<nop>JQREQUIRE{"popupwindow"}%= on the page
%STOPINCLUDE% %STOPINCLUDE%
<!--%JQREQUIRE{"chili"}%--> <!--%JQREQUIRE{"chili"}%-->

0 comments on commit 5001db0

Please sign in to comment.