Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
cc8dcacb
Commit
cc8dcacb
authored
10 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
New: DolEditor can accepts percent instead of nb of cols for textarea
mode.
parent
33ac8cc5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/core/class/doleditor.class.php
+3
-3
3 additions, 3 deletions
htdocs/core/class/doleditor.class.php
with
3 additions
and
3 deletions
htdocs/core/class/doleditor.class.php
+
3
−
3
View file @
cc8dcacb
...
...
@@ -60,7 +60,7 @@ class DolEditor
* @param int $uselocalbrowser Enabled to add links to local object with local browser. If false, only external images can be added in content.
* @param int $okforextendededitor True=Allow usage of extended editor tool (like fckeditor)
* @param int $rows Size of rows for textarea tool
* @param int $cols Size of cols for textarea tool
* @param int $cols Size of cols for textarea tool
(textarea number of cols or %)
* @param int $readonly 0=Read/Edit, 1=Read only
*/
function
__construct
(
$htmlname
,
$content
,
$width
=
''
,
$height
=
200
,
$toolbarname
=
'Basic'
,
$toolbarlocation
=
'In'
,
$toolbarstartexpanded
=
false
,
$uselocalbrowser
=
true
,
$okforextendededitor
=
true
,
$rows
=
0
,
$cols
=
0
,
$readonly
=
0
)
...
...
@@ -129,7 +129,7 @@ class DolEditor
$this
->
toolbarname
=
$shorttoolbarname
;
$this
->
toolbarstartexpanded
=
$toolbarstartexpanded
;
$this
->
rows
=
max
(
ROWS_3
,
$rows
);
$this
->
cols
=
max
(
40
,
$cols
);
$this
->
cols
=
(
preg_match
(
'/%/'
,
$cols
)
?
$cols
:
max
(
40
,
$cols
));
// If $cols is a percent, we keep it, otherwise, we take max
$this
->
height
=
$height
;
$this
->
width
=
$width
;
}
...
...
@@ -160,7 +160,7 @@ class DolEditor
{
$found
=
1
;
//$out.= '<textarea id="'.$this->htmlname.'" name="'.$this->htmlname.'" rows="'.$this->rows.'" cols="'.$this->cols.'"'.($this->readonly?' disabled="disabled"':'').' class="flat">';
$out
.
=
'<textarea id="'
.
$this
->
htmlname
.
'" name="'
.
$this
->
htmlname
.
'" rows="'
.
$this
->
rows
.
'" cols="'
.
$this
->
cols
.
'" class="flat">'
;
$out
.
=
'<textarea id="'
.
$this
->
htmlname
.
'" name="'
.
$this
->
htmlname
.
'" rows="'
.
$this
->
rows
.
'"
'
.
(
preg_match
(
'/%/'
,
$this
->
cols
)
?
' style="width: '
.
$this
->
cols
.
'"'
:
'
cols="'
.
$this
->
cols
.
'"
'
)
.
'
class="flat">'
;
$out
.
=
$this
->
content
;
$out
.
=
'</textarea>'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment