View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Support us on Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - How store long texts (solved) - ProjeQtOr
 
 

How store long texts (solved)

More
13 Jun 2014 14:28 - 13 Jun 2014 16:05 #1 by Jean-Luc
Migrating from other product, I added a column to a table in 'text' format to receive long text data (until more than 32kB in old software), but if the field is displayed, it's only on one line (which scroll with cursor) and no input is possible !

Varchar is too limited to be useable…

How to do ? Help !
Last edit: 13 Jun 2014 16:05 by Jean-Luc.

Please Log in or Create an account to join the conversation.

More
13 Jun 2014 14:38 - 13 Jun 2014 14:38 #2 by babynus
Replied by babynus on topic How store long texts
Not planned to use long texts.

Babynus
Administrator of ProjeQtOr web site
Last edit: 13 Jun 2014 14:38 by babynus.

Please Log in or Create an account to join the conversation.

More
13 Jun 2014 14:44 #3 by Jean-Luc
Replied by Jean-Luc on topic How store long texts
I understand, but I need to know how (and where) change code in Projeqtor to accept text format. It is displayed, no ? even if bad, so it is possible to do.

« Impossible n’est pas français. » ;)

Please Log in or Create an account to join the conversation.

More
13 Jun 2014 15:14 #4 by babynus
Replied by babynus on topic How store long texts
take into account your new format in /view/objectDetail.php

Babynus
Administrator of ProjeQtOr web site

Please Log in or Create an account to join the conversation.

More
13 Jun 2014 15:30 - 13 Jun 2014 15:42 #5 by Jean-Luc
Replied by Jean-Luc on topic How store long texts
I had a look on that module.

Apparently, it should be sufficient to enforce $dataLength value depending on $dataType. :)

I'll come back with results after tests.
Coming back with results :

After lines 372-373
$dataType = $obj->getDataType($col);
$dataLength = $obj->getDataLength($col);
I added
if ($dataType=='text')
	$dataLength = 65535 ;

That works ! :woohoo:

But I don't know yet what's the display when the field is filled with dozen and dozen of lines…
Last edit: 13 Jun 2014 15:42 by Jean-Luc.

Please Log in or Create an account to join the conversation.

More
13 Jun 2014 15:52 - 13 Jun 2014 16:04 #6 by Jean-Luc
Replied by Jean-Luc on topic How store long texts
OK, very long texts give a big window. Functional but not very comfortable.

So it needs to have a scrollbar for the field beyond N lines rather than the scrollbar of the global display window.

Possible to define in the same module ?
Yes !
In block beginning with
} else if ($dataLength > 100 and ! array_key_exists('testingMode', $_REQUEST) ){
(around line 1034)
I change
echo ' rows="2" style="width: ' . $largeWidth . 'px;' . $specificStyle . '" ';
to
echo ' rows="2" style="width: ' . $largeWidth . 'px;' . $specificStyle . ';max-height:300px;" ';

… and now I've an input field with its own scrollbar beyond 23 lines. :)

Problem solved.
Last edit: 13 Jun 2014 16:04 by Jean-Luc.

Please Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.036 seconds

Cookies settings

×

Functional Cookies

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Please login to see yours activities!

Other cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.