Skip to content

Commit

Permalink
Item13123: Add PLACEHOLDER for topic selector
Browse files Browse the repository at this point in the history
Useful to display the current value of a selected topic.
  • Loading branch information
gac410 committed Nov 29, 2014
1 parent 0203b40 commit 7552c13
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 4 additions & 2 deletions JQueryPlugin/data/System/JQueryAjaxHelper.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1403006917" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1417294557" format="1.1" version="1"}%
%META:TOPICPARENT{name="JQueryPlugin"}%
---+!! %TOPIC%
%JQREQUIRE{"chili, ui, ui::autocomplete" warn="off"}%
Expand All @@ -17,6 +17,7 @@ example, the [[#Topic_selector][Topic selector]] example can be used
in your own topics to define an HTML form input with the name =newtopic=
by putting this in your topic:
<verbatim class="tml">
%JQREQUIRE{"ui::autocomplete"}%
%INCLUDE{
"%SYSTEMWEB%.JQueryAjaxHelper"
section="topicselector"
Expand All @@ -42,11 +43,12 @@ loads the =topic= section of this topic, which expands to the topic list.
*INCLUDE Parameters*
* =INPUT_NAME=: name (and id) of HTML input field
* =INPUT_VALUE=: preselected value
* =PLACEHOLDER=: example value
* =EXCLUDE=: exclude expression to filter out unwanted topics, see the
=excludetopic= parameter in VarSEARCH
<verbatim class="tml">
%STARTSECTION{"topicselector"}%<!-- topicselector -->
<input type="text" class="foswikiInputField" name="%INPUT_NAME%" id="%INPUT_NAME%" autocomplete="%SCRIPTURL{"view"}%/%SYSTEMWEB%/JQueryAjaxHelper?section=topic;skin=text;contenttype=application/json;baseweb=%BASEWEB%;%IF{"defined EXCLUDE" then="exclude=%EXCLUDE%"}%" size="60" value="%IF{"defined INPUT_VALUE" then="%INPUT_VALUE%"}%" />
<input type="text" class="foswikiInputField" name="%INPUT_NAME%" id="%INPUT_NAME%" %IF{"defined PLACEHOLDER" then="placeholder=%PLACEHOLDER%"}% autocomplete="%SCRIPTURL{"view"}%/%SYSTEMWEB%/JQueryAjaxHelper?section=topic;skin=text;contenttype=application/json;baseweb=%BASEWEB%;%IF{"defined EXCLUDE" then="exclude=%EXCLUDE%"}%" size="60" value="%IF{"defined INPUT_VALUE" then="%INPUT_VALUE%"}%" />
<!-- //topicselector -->%ENDSECTION{"topicselector"}%
</verbatim>

Expand Down
3 changes: 2 additions & 1 deletion JQueryPlugin/data/System/JQueryPlugin.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%META:TOPICINFO{author="ProjectContributor" date="1416833502" format="1.1" version="1"}%
%META:TOPICINFO{author="ProjectContributor" date="1417294557" format="1.1" version="1"}%
---+!! %TOPIC%
<!--
* Set SHORTDESCRIPTION = jQuery <nop>JavaScript library for Foswiki
Expand Down Expand Up @@ -126,6 +126,7 @@ reduce bandwidth and speed up interactive performance.
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order -->&nbsp; |
| 29 Nov 2014: | (6.01) - Item13123: Add PLACEHOLDER parameter to JQueryAjaxHelper topic selector. |
| 25 Sep 2014: | (6.00) - Item13030: deprecate jquery.tmpl; added jsrender and a template loader |
| 06 Jun 2014: | (5.11) - Item12933: make filtered characters configurable in JQueryWikiWord |
| 21 Feb 2014: | (5.10) - Item12734: added jQuery-1.11, jQuery-2.10, jquery-ui-1.10.4; \
Expand Down
4 changes: 2 additions & 2 deletions JQueryPlugin/lib/Foswiki/Plugins/JQueryPlugin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Container for jQuery and plugins
use Foswiki::Plugins ();
use Foswiki::Plugins::JQueryPlugin::Plugins ();

our $VERSION = '6.00_003';
our $RELEASE = '6.00_003';
our $VERSION = '6.00_004';
our $RELEASE = '6.00_004';
our $SHORTDESCRIPTION = 'jQuery <nop>JavaScript library for Foswiki';
our $NO_PREFS_IN_TOPIC = 1;

Expand Down

0 comments on commit 7552c13

Please sign in to comment.