summaryrefslogtreecommitdiffstats
path: root/user_guide_src
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-06-16 20:21:46 +0200
committerAndrey Andreev <narf@bofh.bg>2012-06-16 20:21:46 +0200
commit81c3208b79cca353b27ecd4bdf00d4b6e7c91b2c (patch)
tree3e94270175f77a660e92b5a97813a4c018d8519d /user_guide_src
parentf0a8410a5cbe080b377ec352320872d27ce7d91f (diff)
anchor_popup() improvements
Diffstat (limited to 'user_guide_src')
-rw-r--r--user_guide_src/source/changelog.rst5
-rw-r--r--user_guide_src/source/helpers/url_helper.rst26
2 files changed, 21 insertions, 10 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 542c47396..dd6fa4603 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -53,7 +53,10 @@ Release Date: Not Released
- :doc:`Date Helper <helpers/date_helper>` function now() now works with all timezone strings supported by PHP.
- ``create_captcha()`` accepts additional colors parameter, allowing for color customization.
- - ``url_title()`` will now trim extra dashes from beginning and end.
+ - :doc:`URL Helper <helpers/url_helper>` changes include:
+ - ``url_title()`` will now trim extra dashes from beginning and end.
+ - ``anchor_popup()`` will now fill the "href" attribute with the URL and its JS code will return false instead.
+ - Added JS window name support to ``anchor_popup()`` function.
- Added XHTML Basic 1.1 doctype to :doc:`HTML Helper <helpers/html_helper>`.
- Changed ``humanize()`` to include a second param for the separator.
- Refactored ``plural()`` and ``singular()`` to avoid double pluralization and support more words.
diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst
index e6d51b22b..3c91fd5dd 100644
--- a/user_guide_src/source/helpers/url_helper.rst
+++ b/user_guide_src/source/helpers/url_helper.rst
@@ -168,19 +168,20 @@ browser settings. Here is an example with attributes
::
- $atts = array(               
- 'width'      => '800',               
- 'height'     => '600',               
- 'scrollbars' => 'yes',               
- 'status'     => 'yes',               
- 'resizable'  => 'yes',               
- 'screenx'    => '0',               
- 'screeny'    => '0'             
+ $atts = array(
+ 'width' => '800',
+ 'height' => '600',
+ 'scrollbars' => 'yes',
+ 'status'      => 'yes',
+ 'resizable'   => 'yes',
+ 'screenx'     => '0',
+ 'screeny'     => '0',
+ 'window_name' => '_blank'
);
echo anchor_popup('news/local/123', 'Click Me!', $atts);
-Note: The above attributes are the function defaults so you only need to
+.. note:: The above attributes are the function defaults so you only need to
set the ones that are different from what you need. If you want the
function to use all of its defaults simply pass an empty array in the
third parameter
@@ -189,6 +190,13 @@ third parameter
echo anchor_popup('news/local/123', 'Click Me!', array());
+.. note:: The 'window_name' is not really an attribute, but an argument to
+ the JavaScript `window.open() <http://www.w3schools.com/jsref/met_win_open.asp>`
+ method, which accepts either a window name or a window target.
+
+.. note:: Any other attribute than the listed above will be parsed as an
+ HTML attribute to the anchor tag.
+
mailto()
========