xlawrence 2005/06/14 13:26:58 CEST
Modified files: core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/ContextMenu context-menu.js core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaImager dialog.html utils.js core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaLinker dialog.html utils.js core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaLinker/lang en.js fr.js core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/ObjectManager utils.js core/src/webapp/jsp/jahia/htmleditors/xinha utils.jsp xinha_htmleditor.jsp Log: Corrected "multilangue bug" that prevented the editor from loading ressource bundles other than in French Revision Changes Path 1.2 +0 -0 jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/ContextMenu/context-menu.js http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/ContextMenu/context-menu.js.diff?r1=1.1&r2=1.2&f=h 1.2 +1 -1 jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaImager/dialog.html http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaImager/dialog.html.diff?r1=1.1&r2=1.2&f=h 1.2 +3 -0 jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaImager/utils.js http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaImager/utils.js.diff?r1=1.1&r2=1.2&f=h 1.4 +6 -5 jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaLinker/dialog.html http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaLinker/dialog.html.diff?r1=1.3&r2=1.4&f=h 1.3 +5 -1 jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaLinker/lang/en.js http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaLinker/lang/en.js.diff?r1=1.2&r2=1.3&f=h 1.3 +7 -3 jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaLinker/lang/fr.js http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaLinker/lang/fr.js.diff?r1=1.2&r2=1.3&f=h 1.8 +5 -1 jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaLinker/utils.js http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaLinker/utils.js.diff?r1=1.7&r2=1.8&f=h 1.2 +4 -0 jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/ObjectManager/utils.js http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/ObjectManager/utils.js.diff?r1=1.1&r2=1.2&f=h 1.6 +11 -9 jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/utils.jsp http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/utils.jsp.diff?r1=1.5&r2=1.6&f=h 1.7 +1 -1 jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/xinha_htmleditor.jsp http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/xinha_htmleditor.jsp.diff?r1=1.6&r2=1.7&f=h Index: context-menu.js =================================================================== RCS file: /home/cvs/repository/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/ContextMenu/context-menu.js,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- context-menu.js 26 May 2005 15:11:54 -0000 1.1 +++ context-menu.js 14 Jun 2005 11:26:56 -0000 1.2 @@ -6,7 +6,7 @@ // Distributed under the same terms as HTMLArea itself. // This notice MUST stay intact for use (see license.txt). // -// $Id: context-menu.js,v 1.1 2005/05/26 15:11:54 xlawrence Exp $ +// $Id: context-menu.js,v 1.2 2005/06/14 11:26:56 xlawrence Exp $ HTMLArea.loadStyle("menu.css", "ContextMenu"); Index: dialog.html =================================================================== RCS file: /home/cvs/repository/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaImager/dialog.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- dialog.html 26 May 2005 14:41:37 -0000 1.1 +++ dialog.html 14 Jun 2005 11:26:56 -0000 1.2 @@ -88,7 +88,7 @@ <br /> <div style="text-align:left"> <input type="button" id="i18n_ok" value="Ok" onclick="Set()" /> - <input type="button" id="i18n_cancel" value="cancel" onclick="onCancel()" /> + <input type="button" id="i18n_cancel" value="Cancel" onclick="onCancel()" /> </div> </div> <br /> Index: utils.js =================================================================== RCS file: /home/cvs/repository/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaImager/utils.js,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- utils.js 26 May 2005 14:41:37 -0000 1.1 +++ utils.js 14 Jun 2005 11:26:56 -0000 1.2 @@ -2,10 +2,13 @@ var basePath = ""; function Init() { + var lang = window.opener._editor_lang || 'en'; + window.resizeTo(800, 600); __dlg_init(); window.resizeTo(800, 600); + if(lang != 'en') __translate("JahiaImager"); Index: dialog.html =================================================================== RCS file: /home/cvs/repository/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaLinker/dialog.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- dialog.html 13 Jun 2005 13:04:15 -0000 1.3 +++ dialog.html 14 Jun 2005 11:26:57 -0000 1.4 @@ -13,6 +13,7 @@ // Original Author - Bernhard Pfeifer [EMAIL PROTECTED] _editor_url = window.opener._editor_url || '../'; +_editor_lang = window.opener._editor_lang || 'en'; JahiaLinker = window.opener.JahiaLinker; // load the JahiaExtractor plugin and lang file ;-) // center on parent @@ -116,7 +117,7 @@ <div style="text-align:right"> <input type="button" id="i18n_ok" value="Ok" onclick="Set()" /> <input type="button" id="i18n_clear" value="Remove link" onclick="removeLink();" /> - <input type="button" id="i18n_cancel" value="cancel" onclick="onCancel()" /> + <input type="button" id="i18n_cancel" value="Cancel" onclick="onCancel()" /> </div> </div> </td> @@ -124,10 +125,10 @@ <tr> <td> (*): <span id="i18n_legend_access">Pages with less rights than the current field</span> - <span class="active">Green</span>: <span id="i18n_legend_active">Active pages</span><br/> - <span class="waiting">Orange</span>: <span id="i18n_legend_waiting">Waiting pages</span> - <span class="staging">Red</span>: <span id="i18n_legend_staging">Staging pages</span> - <span class="markForDeleted">Bleue</span>: <span id="i18n_legend_mfdelete">Mark For Delete pages</span> + <span class="active"><span id="i18n_green">Green</span></span>: <span id="i18n_legend_active">Active pages</span><br/> + <span class="waiting"><span id="i18n_orange">Orange</span></span>: <span id="i18n_legend_waiting">Waiting pages</span> + <span class="staging"><span id="i18n_red">Red</span></span>: <span id="i18n_legend_staging">Staging pages</span> + <span class="markForDeleted"><span id="i18n_bleue">Bleue</span></span>: <span id="i18n_legend_mfdelete">Mark For Delete pages</span> </td> </tr> </form> Index: utils.js =================================================================== RCS file: /home/cvs/repository/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaLinker/utils.js,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- utils.js 13 Jun 2005 13:04:15 -0000 1.7 +++ utils.js 14 Jun 2005 11:26:57 -0000 1.8 @@ -1,10 +1,14 @@ var tablesList = ['urltable','mailtable', 'internaltable']; -function Init() { +function Init() +{ + var lang = window.opener._editor_lang || 'en'; window.resizeTo(800, 600); __dlg_init(); window.resizeTo(800, 600); + + if(lang != 'en') __translate("JahiaLinker"); dTree = new dTree("dTree", _editor_url + 'plugins/JahiaLinker/dTree/'); Index: en.js =================================================================== RCS file: /home/cvs/repository/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaLinker/lang/en.js,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- en.js 13 Jun 2005 13:04:15 -0000 1.2 +++ en.js 14 Jun 2005 11:26:57 -0000 1.3 @@ -28,5 +28,9 @@ "legend_waiting" : "Waiting pages", "legend_staging" : "Staging pages", "legend_active" : "Active pages", - "legend_mfdelete" : "Mark For Delete pages" + "legend_mfdelete" : "Mark For Delete pages", + "red" : "Red", + "green" : "Green", + "orange" : "Orange", + "bleue" : "Bleue" }; \ No newline at end of file Index: fr.js =================================================================== RCS file: /home/cvs/repository/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/JahiaLinker/lang/fr.js,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- fr.js 13 Jun 2005 13:04:15 -0000 1.2 +++ fr.js 14 Jun 2005 11:26:57 -0000 1.3 @@ -24,9 +24,13 @@ "ok" : "Ok", "cancel" : "Annuler", "clear" : "Supprimer le lien", - "legend_access" : "Pages ayant moins de droits que le champ courant ", + "legend_access" : "Pages ayant moins de droits que le champ courant ", "legend_waiting" : "Pages approuvées ", - "legend_staging" : "Pages éditées ", + "legend_staging" : "Pages éditées ", "legend_active" : "Pages publiées", - "legend_mfdelete" : "Pages à supprimer" + "legend_mfdelete" : "Pages à supprimer", + "red" : "Rouge", + "green" : "Vert", + "orange" : "Orange", + "bleue" : "Bleu" }; \ No newline at end of file Index: utils.js =================================================================== RCS file: /home/cvs/repository/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/plugins/ObjectManager/utils.js,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- utils.js 26 May 2005 15:23:56 -0000 1.1 +++ utils.js 14 Jun 2005 11:26:57 -0000 1.2 @@ -66,9 +66,13 @@ function Init() { + var lang = window.opener._editor_lang || 'en'; + window.resizeTo(800, 600); __dlg_init(); window.resizeTo(800, 600); + + if(lang != 'en') __translate("ObjectManager"); var objectHtml = '<ul>'; Index: utils.jsp =================================================================== RCS file: /home/cvs/repository/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/utils.jsp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- utils.jsp 13 Jun 2005 13:04:16 -0000 1.5 +++ utils.jsp 14 Jun 2005 11:26:58 -0000 1.6 @@ -46,9 +46,8 @@ return "file"; } -public String expandOne(DAVFileAccess fileObject, int level) { +public String expandOne(DAVFileAccess fileObject, int level, String lang) { StringBuffer html = new StringBuffer(); - String expand = ""; if (fileObject != null) { TreeSet sortedResources = new TreeSet(new Comparator() { public int compare(Object o1, Object o2) { @@ -66,14 +65,17 @@ sortedResources.addAll(fileObject.getChildren()); Iterator iter = sortedResources.iterator(); + String expand; while (iter.hasNext()) { DAVFileAccess curDf = (DAVFileAccess)iter.next(); if (!excludeList.contains(curDf.getName().toLowerCase()) && curDf.hasPermission(DAVFileAccess.READ)) { String pathDisplay = curDf.getName(); - for (int i = 0; i < pathSearch.length; i++) { - if (pathDisplay.equals(pathSearch[i])) { - pathDisplay = pathReplace[i]; + if (lang.equals("fr")) { + for (int i = 0; i < pathSearch.length; i++) { + if (pathDisplay.equals(pathSearch[i])) { + pathDisplay = pathReplace[i]; + } } } expand = curDf.getPath(); @@ -86,7 +88,7 @@ .append(",\'").append(pathDisplay).append("\','").append(expand) .append("'],"); counterOperations++; - html.append(expandOne(curDf, level + 1)); + html.append(expandOne(curDf, level + 1, lang)); } } } @@ -170,14 +172,14 @@ return fileSize; } -public String getFilesToJs(ParamBean jParams ) { +public String getFilesToJs(ParamBean jParams, String lang ) { StringBuffer html = new StringBuffer(); html.append("[[0,0,\'root\','/'],"); excludeList.add("actions"); excludeList.add("mygroups"); excludeList.add("groups"); DAVFileAccess df = JahiaWebdavBaseService.getInstance().getDAVFileAccess(jParams, "/"); - html.append(expandOne(df, 1)); + html.append(expandOne(df, 1, lang)); html = html.deleteCharAt(html.length() - 1); html.append("]"); return html.toString(); @@ -235,7 +237,7 @@ if (thePage != null) { final int pageId = thePage.getID(); - if (pageTitle.equals("N/A")) { + if ( "N/A".equals(pageTitle) ) { if ("fr".equals(currentLanguageCode)) { pageTitle = new StringBuffer().append("Pas de titre [pid = "). append(pageId).append("]").toString(); Index: xinha_htmleditor.jsp =================================================================== RCS file: /home/cvs/repository/jahia/core/src/webapp/jsp/jahia/htmleditors/xinha/xinha_htmleditor.jsp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- xinha_htmleditor.jsp 13 Jun 2005 13:04:16 -0000 1.6 +++ xinha_htmleditor.jsp 14 Jun 2005 11:26:58 -0000 1.7 @@ -137,7 +137,7 @@ pageContent = "null"; } - files = getFilesToJs(jParams); + files = getFilesToJs(jParams, currentLanguageCode); if (files != null && !files.equals("")) { files = files.trim(); if (!files.startsWith("["))