cvs: doc-editor /js main.js /js/locale fr.js

From: Date: Sun, 19 Apr 2009 07:58:42 +0000
Subject: cvs: doc-editor /js main.js /js/locale fr.js
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-3791@lists.php.net to get a copy of this message
yannick Sun Apr 19 07:58:42 2009 UTC Modified files: /doc-editor/js/locale fr.js /doc-editor/js main.js Log: - Remove subMenu "Open the same file in LANG" in the contextMenu of a file from AllFiles when we are in Search mode - Add number of found files of a search in AllFiles http://cvs.php.net/viewvc.cgi/doc-editor/js/locale/fr.js?r1=1.9&r2=1.10&diff_format=u Index: doc-editor/js/locale/fr.js diff -u doc-editor/js/locale/fr.js:1.9 doc-editor/js/locale/fr.js:1.10 --- doc-editor/js/locale/fr.js:1.9 Sat Apr 18 22:16:53 2009 +++ doc-editor/js/locale/fr.js Sun Apr 19 07:58:42 2009 @@ -123,8 +123,9 @@ i18n["Posted by"] = "Proposé par"; i18n["This action will <b>reject</b> this patch, send an email to his author and close this tab."] = "Cette action va <b>rejeter</b> ce patch, envoyer un email à son auteur et fermer cet onglet."; i18n["This action will accept this patch, send an email to his author, save the file and close this tab."] = "Cette action va accepter ce patch, envoyer un email à son auteur et fermer cet onglet."; -i18n["Search result"] = "Résultat de la recherche"; +i18n["Search result: {0}"] = "Résultat de la recherche : {0}"; i18n["Search: "] = "Recherche : "; +i18n["Your search must contain at least 3 characters"] = "Votre recherche doit comporter au moins 3 caractères"; // Main Menu i18n["Main Menu"] = "Menu principal"; http://cvs.php.net/viewvc.cgi/doc-editor/js/main.js?r1=1.43&r2=1.44&diff_format=u Index: doc-editor/js/main.js diff -u doc-editor/js/main.js:1.43 doc-editor/js/main.js:1.44 --- doc-editor/js/main.js:1.43 Sat Apr 18 22:16:53 2009 +++ doc-editor/js/main.js Sun Apr 19 07:58:42 2009 @@ -6405,16 +6405,25 @@ var v = this.getValue(); - if( v == '' || v.length < 3) { return; } + if( v == '' || v.length < 3) { + this.markInvalid(_('Your search must contain at least 3 characters')); + return; + } + + this.clearInvalid(); this.triggers[0].show(); - this.scope.treeAllFiles.root.setText(_('Search result')); this.scope.treeAllFiles.loader = new Ext.tree.TreeLoader({ baseParams:{search:v, task: 'getAllFiles'}, dataUrl: './php/controller.php' }); - this.scope.treeAllFiles.root.reload(); + + this.scope.treeAllFiles.root.reload(function() { + + this.phpDoc.treeAllFiles.root.setText(String.format(_('Search result: {0}'), this.phpDoc.treeAllFiles.root.childNodes.length)); + + }); } }) @@ -6423,7 +6432,7 @@ scope: this, contextmenu: function(node, e){ - var menu, expandSubMenu, FileName, FilePath, t, FileLang, OtherFileLibel, OtherFilePath; + var menu, expandSubMenu, FileName, FilePath, t, FileLang, OtherFileSubMenu, OtherFileLibel, OtherFilePath; node.select(); if (node.attributes.type === 'folder' || node.isRoot ) { @@ -6452,27 +6461,42 @@ } else if (node.attributes.type === 'file') { - FileName = node.attributes.text; - FilePath = node.attributes.id; + if( node.attributes.from !== 'search' ) { - // CleanUp the path - t = FilePath.split('/'); - t.shift(); - t.shift(); - t.pop(); - - FileLang = t[0]; - t.shift(); + FileName = node.attributes.text; + FilePath = node.attributes.id; - FilePath = t.join('/') + '/'; + // CleanUp the path + t = FilePath.split('/'); + t.shift(); + t.shift(); + t.pop(); + + FileLang = t[0]; + t.shift(); - if( FileLang === 'en' ) { - OtherFileLibel = String.format(_('Open the same file in <b>{0}</b>'), this.userLang); - OtherFilePath = this.userLang+FilePath; + FilePath = t.join('/') + '/'; + + if( FileLang === 'en' ) { + OtherFileLibel = String.format(_('Open the same file in <b>{0}</b>'), this.userLang); + OtherFilePath = this.userLang+FilePath; + + } else { + OtherFileLibel = String.format(_('Open the same file in <b>{0}</b>'), 'en'); + OtherFilePath = 'en'+FilePath; + } + + OtherFileSubMenu = { + text: OtherFileLibel, + iconCls: 'iconTabNeedReviewed', + scope: this, + handler: function() { + this.openFile(OtherFilePath, FileName); + } + }; } else { - OtherFileLibel = String.format(_('Open the same file in <b>{0}</b>'), 'en'); - OtherFilePath = 'en'+FilePath; + OtherFileSubMenu=''; } menu = new Ext.menu.Menu({ @@ -6483,14 +6507,7 @@ handler: function() { this.treeAllFiles.fireEvent('dblclick', node); } - },{ - text: OtherFileLibel, - iconCls: 'iconTabNeedReviewed', - scope: this, - handler: function() { - this.openFile(OtherFilePath, FileName); - } - }] + },OtherFileSubMenu] }); menu.showAt(e.getXY());

« previous php.doc.cvs (#3791) next »