Kipcool has submitted this change and it was merged.
Change subject: fixed truncation
......................................................................
fixed truncation
Change-Id: If052d809a151cbec9c7cabaf132b657bac6d4df6
---
M OmegaWiki/Editor.php
M OmegaWiki/OmegaWikiEditors.php
2 files changed, 7 insertions(+), 6 deletions(-)
Approvals:
Kipcool: Verified; Looks good to me, approved
diff --git a/OmegaWiki/Editor.php b/OmegaWiki/Editor.php
index 2ba72ce..d5e7812 100644
--- a/OmegaWiki/Editor.php
+++ b/OmegaWiki/Editor.php
@@ -1297,12 +1297,13 @@
// getting the truncated definition
if ( ( $this->truncateAt > 0 ) && ( strlen( $definition ) >
$this->truncateAt ) ) {
$escapedDefinition = htmlspecialchars( $definition );
- $spancontent = htmlspecialchars( mb_substr(
$definition, 0, $this->truncateAt ) ) . wfMessage( 'ellipsis' )->text();
- $definition = Html::element( 'span', array( 'title' =>
$escapedDefinition ), $spancontent );
+ $shortdef = htmlspecialchars( mb_substr( $definition,
0, $this->truncateAt ) ) . wfMessage( 'ellipsis' )->text();
+
+ $htmlDefinition = Html::element('span', array( 'class'
=> 'defheader', 'title' => $escapedDefinition ), $shortdef );
+ } else {
+ // normal situation, no truncation
+ $htmlDefinition = Html::element('span', array( 'class'
=> 'defheader' ), $definition );
}
-
- $htmlDefinition = Html::element('span', array( 'class' =>
'defheader' ), $definition );
-
// setting the definition as meta description for the page
if ( $isMetaDescSet == 0 ) {
$wgOut->addMeta( 'Description', $definition );
diff --git a/OmegaWiki/OmegaWikiEditors.php b/OmegaWiki/OmegaWikiEditors.php
index 1287e4e..d74dc1f 100644
--- a/OmegaWiki/OmegaWikiEditors.php
+++ b/OmegaWiki/OmegaWikiEditors.php
@@ -815,7 +815,7 @@
$insideExpression = true;
$definedMeaningEditor = getDefinedMeaningEditor( $viewInformation,
$insideExpression );
- $definedMeaningCaptionEditor = new DefinedMeaningHeaderEditor(
$o->definedMeaningId, 75 );
+ $definedMeaningCaptionEditor = new DefinedMeaningHeaderEditor(
$o->definedMeaningId, 0 );
$definedMeaningCaptionEditor->setAddText( wfMessage(
'ow_NewExactMeaning' )->text() );
$expressionMeaningsEditor = new RecordSetListEditor( $attribute, new
SimplePermissionController( true ), new ShowEditFieldChecker( true ), new
AllowAddController( $allowAdd ), false, $allowAdd, new
ExpressionMeaningController( ), 3, false );
--
To view, visit https://gerrit.wikimedia.org/r/69906
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If052d809a151cbec9c7cabaf132b657bac6d4df6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: Kipcool <[email protected]>
Gerrit-Reviewer: Kipcool <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits