Feature #1355
RCP: X.X, add an Edition to Concordance hyperlink
Statut: | Closed | Début: | 21/05/2015 | |
---|---|---|---|---|
Priorité: | Normal | Echéance: | ||
Assigné à: | - | % réalisé: | 100% |
|
Catégorie: | UI / Link / Command | Temps passé: | - | |
Version cible: | TXM 0.7.8 |
Description
Allow user to link a sequence of words from an edition page to its concordance.
Solution 1 - implemented in TXM 0.7.7 beta2¶
- get the words sequence string from the browser selection
- build a CQP query with that sequence
- call concordance
Use the "evaluate" SWT browser Javascript API method with the following Javascript code:
static String SCRIPT01 = "var html = \"\";"+ "if (typeof window.getSelection != \"undefined\") {"+ "var sel = window.getSelection();"+ "if (sel.rangeCount) {"+ "var container = document.createElement(\"div\");"+ "for (var i = 0, len = sel.rangeCount; i < len; ++i) {"+ "container.appendChild(sel.getRangeAt(i).cloneContents());"+ "}"+ "html = container.innerHTML;"+ "}"+ "} else if (typeof document.selection != \"undefined\") {"+ "if (document.selection.type == \"Text\") {"+ "html = document.selection.createRange().htmlText;"+ "}" + "}" + "return html";
Solution 1 bis¶
Do the same thing with the SynopticEditionEditor.
implemented for TXM 0.7.8
Demandes liées
Historique
#1 Mis à jour par Matthieu Decorde il y a plus de 10 ans
- Description mis à jour (diff)
#2 Mis à jour par Matthieu Decorde il y a plus de 10 ans
- % réalisé changé de 0 à 20
#3 Mis à jour par Matthieu Decorde il y a environ 10 ans
- Version cible changé de TXM 0.7.8 à TXM 0.8.0a (split/restructuration)
#4 Mis à jour par Matthieu Decorde il y a plus de 9 ans
- Description mis à jour (diff)
#5 Mis à jour par Matthieu Decorde il y a environ 9 ans
- Description mis à jour (diff)
- Version cible changé de TXM 0.8.0a (split/restructuration) à TXM 0.7.8
#6 Mis à jour par Matthieu Decorde il y a environ 9 ans
- % réalisé changé de 20 à 70
only the first edition can call the SendToConcordance command
#7 Mis à jour par Matthieu Decorde il y a environ 9 ans
- Description mis à jour (diff)
#8 Mis à jour par Sebastien Jacquot il y a plus de 8 ans
I confirm it works only in the first edition.
Also the context menu entry should not be active/visible if no text is selected (eg. when clicking on a facs image).
#9 Mis à jour par Sebastien Jacquot il y a presque 7 ans
- Statut changé de New à Closed
- % réalisé changé de 70 à 100