Loading...
 
Skip to main content

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
(0)
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="#" onclick="javascript:document.getElementById('txtPage').value = '{$page.pageName|escape:'javascript'}';"

+<tr><td><a href="#" onclick="javascript:document.getElementById('txtPage').value = '{$page.pageName|escape:'javascript'}'; javascript: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" onblur="javascript: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+
Please demonstrate your bug on show2.tiki.org
Demonstrate Bug (older Tiki versions)
Ticket ID
2988
Created
Sunday 17 January, 2010 20:39:50 UTC
by oys
LastModif
Sunday 17 January, 2010 21:17:27 UTC


Show PHP error messages