Commit c872a3a8 authored by Jonny Bradley's avatar Jonny Bradley

[KIL] Remove redundant textareasize.* (replaced by resize toolbar buttons in...

[KIL] Remove redundant textareasize.* (replaced by resize toolbar buttons in Tiki 4.0, and resizable textareas in Tiki 5.0)
parent 49049987
......@@ -4374,7 +4374,6 @@ templates/styles/strasa/tiki-view_blog_post.tpl -text
templates/styles/thenews/index.php -text
templates/styles/tikinewt/index.php -text
templates/styles/twist/index.php -text
templates/textareasize.tpl -text
templates/tiki-action_calendar.tpl -text
templates/tiki-admin-include-ads.tpl -text
templates/tiki-admin-include-anchors.tpl -text
......@@ -4818,7 +4817,6 @@ templates_c/index.php -text
tests/.htaccess -text
tests/index.php -text
tests/testfile.txt -text
/textareasize.php -text
/tiki-action_calendar.php -text
/tiki-admin.php -text
/tiki-admin_actionlog.php -text
......
......@@ -478,7 +478,6 @@ if ($comments_offset > 0) {
if (!isset($forum_mode) || $forum_mode == 'n') {
$defaultRows = $prefs['default_rows_textarea_comment'];
include_once("textareasize.php");
}
if ( ! isset($forum_mode) || $forum_mode == 'n' ) {
......
......@@ -994,30 +994,6 @@ function confirmTheLink(theLink, theMsg)
return is_confirmed;
}
/** \brief: modif a textarea dimension
* \elementId = textarea idea
* \height = nb pixels to add to the height (the number can be negative)
* \width = nb pixels to add to the width
* \formid = form id (needs to have 2 input rows and cols
**/
function textareasize(elementId, height, width, formId) {
textarea = $(getElementById(elementId))[0];
form1 = textarea.form;
if (textarea && height !== 0 && textarea.rows + height > 5) {
textarea.rows += height;
if (form1.rows) {
form1.rows.value = textarea.rows;
}
}
if (textarea && width !== 0 && textarea.cols + width > 10) {
textarea.cols += width;
if (form1.cols) {
form1.cols.value = textarea.cols;
}
}
}
/** \brief: insert img tag in textarea
*
*/
......
{* $Id$ *}
{* \brief: the 4 buttoms to change a textarea size (only one per form)
* \param: $area_name = the textarea id
* \param: $formId = the form id
* the form needs 2 hidden input named 'rows' and 'cols' to remember the settings for a preview
*}
{if $prefs.javascript_enabled eq 'y'}
<a href="javascript:textareasize('{$area_name}', +10, 0, '{$formId}')" onclick="javascript:needToConfirm = false" title="{tr}Enlarge area height{/tr}">{icon _id='arrow_out' alt="{tr}Enlarge area height{/tr}"}</a> &nbsp;
<a href="javascript:textareasize('{$area_name}', -10, 0, '{$formId}')" onclick="javascript:needToConfirm = false" title="{tr}Reduce area height{/tr}">{icon _id='arrow_in' alt="{tr}Reduce area height{/tr}"}</a>
{/if}
......@@ -60,8 +60,7 @@
<tr class="formcolor">
<td>
{tr}Content{/tr}:<br />
{include file='textareasize.tpl' area_name='htmlcode' formId='editpageform'}
{tr}Content{/tr}:
</td>
<td>
<textarea name="content" id="htmlcode" rows="25" style="width:95%;">{$info.content|escape}</textarea>
......
......@@ -53,12 +53,10 @@
</tr>
<tr>
<td colspan="2" class="editblogform">
<td class="editblogform">
{tr}Body:{/tr}
</td>
</tr>
<tr>
<td colspan="2" class="editblogform">
<td class="editblogform">
{textarea id='blogedit' class="wikiedit" name="data"}{$data}{/textarea}
</td>
</tr>
......
......@@ -380,11 +380,6 @@
</tr>
<tr class="formcolor">
<td>{tr}Description{/tr}
{if $edit}
<br /><br />
{include file='textareasize.tpl' area_name="editwiki" formId="editcalitem"}<br /><br />
{/if}
</td><td>
{if $edit}
{toolbars area_name="save[description]"}
......
......@@ -35,8 +35,6 @@
<tr class="editblogform">
<td>
<label for="blog-desc">{tr}Description{/tr}</label>
<br />
{include file='textareasize.tpl' area_name='blog-desc' formId='blog-edit-form'}
</td>
<td>
<textarea class="wikiedit" name="description" id="blog-desc" rows="{$rows}" cols="{$cols}" wrap="virtual">{$description|escape}</textarea>
......@@ -107,8 +105,6 @@
<tr class="editblogform">
<td>
<label for="blogs-heading">{tr}Blog heading{/tr}</label>
<br />
{include file='textareasize.tpl' area_name='blogs-heading' formId='blog-edit-form'}
</td>
<td>
<textarea name="heading" id="blogs-heading" rows='10' cols='{$cols}'>{$heading|escape}</textarea>
......@@ -130,8 +126,6 @@
<tr class="editblogform">
<td>
<label for="blogs-post-heading">{tr}Blog post heading{/tr}</label>
<br />
{include file='textareasize.tpl' area_name='blogs-post-heading' formId='blog-post-edit-form'}
</td>
<td>
<textarea name="post_heading" id="blogs-post_heading" rows='10' cols='{$cols}'>{$post_heading|escape}</textarea>
......
......@@ -31,7 +31,7 @@
<input type="hidden" name="galleryId" value="{$galleryId|escape}" />
<table class="normal">
<tr><td class="formcolor">{tr}Name{/tr}:</td><td class="formcolor"><input type="text" name="name" value="{$name|escape}"/></td></tr>
<tr><td class="formcolor">{tr}Description{/tr}:<br />{include file='textareasize.tpl' area_name='gal-desc' formId='gal-edit-form'}</td><td class="formcolor"><textarea rows="{$rows}" cols="{$cols}" name="description" id="gal-desc">{$description|escape}</textarea></td></tr>
<tr><td class="formcolor">{tr}Description{/tr}:</td><td class="formcolor"><textarea rows="{$rows}" cols="{$cols}" name="description" id="gal-desc">{$description|escape}</textarea></td></tr>
{if $tiki_p_admin_galleries eq 'y'}
<tr><td class="formcolor">{tr}Gallery is visible to non-admin users?{/tr}</td><td class="formcolor"><input type="checkbox" name="visible" {if $visible eq 'y'}checked="checked"{/if} /></td></tr>
{* If a user can create a gallery, but doesn't have tiki_p_admin_galleries the new gallery needs to be visible. *}
......
......@@ -228,8 +228,6 @@
<tr class="formcolor">
<td class="formcolor" id="txtcol1">
{tr}Data Txt:{/tr}
<br /><br />
{include file='textareasize.tpl' area_name='editwikitxt' formId='editpageform'}
</td>
<td class="formcolor" id="txtcol2" >
<textarea id='editwikitxt' name="datatxt" rows="{$rows}" cols="{$cols}">{$datatxt|escape}</textarea>
......@@ -240,8 +238,6 @@
<td class="formcolor" id="clipcol1">
{tr}Article Clip (read only):{/tr}
<input type="submit" name="clipArticles" value="{tr}Clip Now{/tr}" class="wikiaction tips" title="{tr}Clip Articles{/tr}" onclick="needToConfirm=false" />
<br /><br />
{include file='textareasize.tpl' area_name='articlecliptxt' formId='editpageform'}
</td>
<td class="formcolor" id="clipcol2" >
{tr}To include the article clipping into your newsletter, cut and paste it into the contents.{/tr}
......
......@@ -61,8 +61,6 @@
<tr class="formcolor">
<td class="formcolor">
{tr}Your message{/tr}
<br /><br />
{include file='textareasize.tpl' area_name='comment' formId='share-form'}
</td>
<td class="formcolor">
......
......@@ -65,8 +65,6 @@
<tr class="formcolor">
<td class="formcolor">
{tr}Your comment{/tr}
<br /><br />
{include file='textareasize.tpl' area_name='comment' formId='tellafriend'}
</td>
<td class="formcolor">
......
......@@ -142,8 +142,7 @@
<input type="hidden" name="commentId" value="{$commentId|escape}" />
<table class="normal">
<tr class="formcolor"><td>{tr}Title:{/tr}</td><td><input type="text" name="comment_title" value="{$comment_title|escape}"/></td></tr>
<tr class="formcolor"><td>{tr}Comment{/tr}:<br />
{include file='textareasize.tpl' area_name='comment_data' formId='commentform' ToolbarSet='Tiki'}</td>
<tr class="formcolor"><td>{tr}Comment{/tr}:</td>
<td><textarea rows="{if empty($rows)}4{else}{$rows}{/if}" cols="{if empty($cols)}50{else}{$cols}{/if}" name="comment_data" id="comment_data">{$comment_data|escape}</textarea>
</td></tr>
{if !$user and $prefs.feature_antibot eq 'y'}
......
<?php
// (c) Copyright 2002-2010 by authors of the Tiki Wiki/CMS/Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
/* \brief: 4 buttoms to change a textArea size - works with textareaSize.tpl template
* \param: $defaultRows - optional : the number of rows by default
* \comment: the cols nb is managed by a javascript program to optimize the display perf (seems to work generally with browsers)
* the rows nb is managed by a redisplayed of the page to be effective on different browsers and different styles (specially with floating div column)
*/
//this script may only be included - so its better to die if called directly.
//smarty is not there - we need setup
require_once('tiki-setup.php');
$access->check_script($_SERVER["SCRIPT_NAME"],basename(__FILE__));
$rows = isset($_REQUEST['rows'])? $_REQUEST['rows']: (isset($defaultRows)?$defaultRows: 20);
// the rows modification is managed by a javascript program
// is ok: for IE6, firebird 0.6, opera 7.23, NN7
// is doesn't work for other browser, must be managed as rows input
$smarty->assign('rows', (int) $rows);
$cols = isset($_REQUEST['cols'])? $_REQUEST['cols']: 80;
if (isset($_REQUEST['enlargeW']) || isset($_REQUEST['enlargeW_x']))
$cols += 20;
elseif ((isset($_REQUEST['reduceW']) || isset($_REQUEST['reduceW_x'])) && $cols >= 40)
$cols -= 20;
$smarty->assign('cols', (int) $cols);
......@@ -175,7 +175,6 @@ $smarty->assign_by_ref('cant_pages', $channels["cant"]);
// wysiwyg decision
include 'lib/setup/editmode.php';
$smarty->assign_by_ref('channels', $channels["data"]);
include_once ("textareasize.php");
ask_ticket('admin-content-templates');
global $wikilib;
include_once ('lib/wiki/wikilib.php');
......
......@@ -9,7 +9,6 @@ require_once ('tiki-setup.php');
include_once ('lib/htmlpages/htmlpageslib.php');
$access->check_feature('feature_html_pages');
$access->check_permission('tiki_p_edit_html_pages');
include_once ("textareasize.php");
if (!isset($_REQUEST["pageName"])) {
$_REQUEST["pageName"] = '';
}
......
......@@ -230,7 +230,6 @@ if ($contribution_needed) {
}
include_once ('tiki-section_options.php');
include_once ("textareasize.php");
if ($prefs['feature_contribution'] == 'y') {
include_once ('contribution.php');
......
......@@ -751,8 +751,6 @@ include_once ('tiki-section_options.php');
setcookie('tab',$cookietab);
$smarty->assign('cookietab',$cookietab);
include_once("textareasize.php");
ask_ticket('calendar');
include_once('tiki-jscalendar.php');
......
......@@ -487,8 +487,6 @@ if ($prefs['feature_theme_control'] == 'y') {
$headerlib->add_cssfile('css/calendar.css',20);
include_once("textareasize.php");
$smarty->assign('referer', empty($_SERVER['HTTP_REFERER']) ? 'tiki-calendar.php' : $_SERVER['HTTP_REFERER']);
$smarty->assign('myurl', 'tiki-calendar_edit_item.php');
$smarty->assign('id', $id);
......
......@@ -523,8 +523,6 @@ $smarty->assign('siteTimeZone', $prefs['display_timezone']);
include_once ('tiki-section_options.php');
include_once("textareasize.php");
global $wikilib; include_once('lib/wiki/wikilib.php');
$plugins = $wikilib->list_plugins(true, 'body');
$smarty->assign_by_ref('plugins', $plugins);
......
......@@ -174,7 +174,6 @@ $cat_objid = $blogId;
include_once ("categorize_list.php");
$defaultRows = 5;
include_once("textareasize.php");
ask_ticket('edit-blog');
......
......@@ -444,8 +444,6 @@ $smarty->assign('publishDateSite', $publishDate);
$smarty->assign('expireDateSite', $expireDate);
$smarty->assign('siteTimeZone', $prefs['display_timezone']);
include_once("textareasize.php");
global $wikilib; include_once('lib/wiki/wikilib.php');
$plugins = $wikilib->list_plugins(true, 'body');
$smarty->assign_by_ref('plugins', $plugins);
......
......@@ -99,7 +99,6 @@ $smarty->assign('referer', $_REQUEST['referer']);
$section = $_REQUEST['type'];
include_once ('tiki-section_options.php');
include_once("textareasize.php");
ask_ticket('edit-wiki-section');
$smarty->assign('mid', 'tiki-edit_wiki_section.tpl');
$smarty->display("tiki.tpl");
......@@ -115,7 +115,6 @@ $smarty->assign_by_ref('channels', $channels["data"]);
$suggested = $faqlib->list_suggested_questions(0, -1, 'created_desc', '', $_REQUEST["faqId"]);
$smarty->assign_by_ref('suggested', $suggested["data"]);
include_once("textareasize.php");
include_once ('tiki-section_options.php');
ask_ticket('faq-questions');
......
......@@ -420,7 +420,6 @@ include_once ("categorize_list.php");
include_once ("freetag_list.php");
$defaultRows = 5;
include_once("textareasize.php");
include_once ('tiki-section_options.php');
ask_ticket('galleries');
......
......@@ -221,8 +221,6 @@ if ($prefs['feature_user_watches'] == 'y') {
$foo = parse_url($_SERVER["REQUEST_URI"]);
$foo1 = str_replace("tiki-map_edit.php", "tiki-map.php", $foo["path"]);
$smarty->assign('url_browse', $tikilib->httpPrefix() . $foo1);
include_once ("textareasize.php");
$smarty->assign('toolbarscant', $toolbars["cant"]);
ask_ticket('edit-map');
$section = 'maps';
include_once ('tiki-section_options.php');
......
......@@ -561,7 +561,6 @@ $tpls = $nllib->list_tpls();
if (count($tpls) > 0) {
$smarty->assign_by_ref('tpls', $tpls);
}
include_once ("textareasize.php");
include_once ('tiki-section_options.php');
setcookie('tab', $_REQUEST['cookietab']);
$smarty->assign('cookietab', $_REQUEST['cookietab']);
......
......@@ -89,8 +89,6 @@ if (empty($_REQUEST['report']) || $_REQUEST['report'] != 'y') {
}
$smarty->assign('report',$_REQUEST['report']);
include_once ("textareasize.php");
$errors = array();
$ok=true;
......
......@@ -47,8 +47,6 @@ if (isset($_REQUEST["ans"])) {
if ($error_msg == '') header('Location: tiki-list_surveys.php');
}
include_once ('tiki-section_options.php');
include_once ('textareasize.php');
$smarty->assign('toolbarscant', $toolbars["cant"]);
ask_ticket('take-survey');
// Display the template
$smarty->assign('error_msg', $error_msg);
......
......@@ -42,7 +42,6 @@ if (strstr($_REQUEST['url'], 'tiki-tell_a_friend.php')) {
$url_for_friend = $tikilib->httpPrefix( true ) . $_REQUEST['url'];
$smarty->assign('url', $_REQUEST['url']);
$smarty->assign('prefix', $tikilib->httpPrefix( true ));
include_once ("textareasize.php");
$errors = array();
if (isset($_REQUEST['send'])) {
check_ticket('tell-a-friend');
......
......@@ -34,7 +34,6 @@ $smarty->assign('comp_array_p', $comp_array_p);
if (!isset($_REQUEST['taskId'])) {
$_REQUEST['taskId'] = 0;
}
$smarty->assign('toolbarscant', $toolbars["cant"]);
//default values for show options
if (!isset($_SESSION['show_trash'])) $_SESSION['show_trash'] = false;
if (!isset($_SESSION['show_completed'])) $_SESSION['show_completed'] = true;
......
......@@ -376,7 +376,6 @@ if ($prefs['feature_freetags'] == 'y') {
}
}
$defaultRows = $prefs['default_rows_textarea_forum'];
include_once ("textareasize.php");
if ($prefs['feature_mobile'] == 'y' && isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'mobile') {
include_once ("lib/hawhaw/hawtikilib.php");
HAWTIKI_view_forum($forum_info['name'], $comments_coms, $tiki_p_forum_read, $comments_offset, $comments_maxRecords, $comments_cant);
......
......@@ -301,7 +301,6 @@ if (isset($_SESSION['feedbacks'])) {
unset($_SESSION['feedbacks']);
}
$defaultRows = $prefs['default_rows_textarea_forumthread'];
include_once ("textareasize.php");
$smarty->assign('forum_mode', 'y');
if ($prefs['feature_mobile'] == 'y' && isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'mobile') {
include_once ("lib/hawhaw/hawtikilib.php");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment