Automatically fill in Page Name field when creating new links fck
- Status
- Closed
- Subject
- Automatically fill in Page Name field when creating new links fck
- Version
- 4.x
5.x - Category
- Usability
- Patch
- Less than 30-minutes fix
- Feature
- WYSIWYG (What You See is What You Get)
- Submitted by
- oys
- Volunteered to solve
- oys
- Lastmod by
- Philippe Cloutier
- Rating
- Description
Some users don't want to understand the difference between "Page Name" and Link when creating an internal link.
This attached patch makes the Page Name field automatically fill in whenever the Link field is changed. The patch was made against tw 4.1.
I think it should be up for debate if both these fields are necessary. Many users of the WYSIWYG feature may be new to the concept of creating links. Less is simpler, and I vote for removing one of these fields.
P.S. Sorry about spamming the mailinglist with this request. Next time I will only submit patch here.
- Solution
fck_tikilink.tpl.orig 2010-01-17 20:45:10.559642152 +0100 +++ fck_tikilink.tpl 2010-01-17 20:53:59.429624619 +0100@@ -122,7 +122,7 @@ function Ok() {
<br /><table cellpadding="0" cellspacing="0" border="0" width="100%"> {foreach item=page from=$listpages} -<tr><td><a href="#" on
+<tr><td><a href="#" onclick="ja vascript:document.getElementById('txtPage').value = '{$page.pageName|escape:'javascript'}';" click="ja vascript:document.getElementById('txtPage').value = '{$page.pageName|escape:'javascript'}'; ja vascript:document.getElementById('txtTitle').value = '{$page.pageName|escape:'javascript'}';" title="{if $page.description}{$page.description}{else}{$page.pageName}{/if}" class="wikilink">{$page.pageName}</a> </td><td style="color:#999;"> {$page.description} @@ -134,7 +134,7 @@ title="{if $page.description}{$page.desc </tr> <tr> <td nowrap>Link{/tr}Â </td> - <td width="100%" style="align:right;"><input id="txtTitle" style="WIDTH: 98%" type="text" name="txtTitle"></td> + <td width="100%" style="align:right;"><input id="txtTitle" style="WIDTH: 98%" type="text" name="txtTitle" on blur="ja vascript:document.getElementById('txtPage').value = getElementById('txtTitle').value;"></td> </tr> <tr> <td nowrap>Page name{/tr}Â </td> - Importance
- 9 high
- Easy to solve?
- 8
- Priority
- 72
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is currently unavailableUnable to connect to show.tikiwiki.org. Please let us know of the problem so that we can do something about it. Thanks.
- Ticket ID
- 2988
- Created
- Sunday 17 January, 2010 20:39:50 UTC
by oys - LastModif
- Sunday 17 January, 2010 21:17:27 UTC