cvs: doc-editor / TODO /js main.js main_min.js /js/ui/component BugsGrid.js CVSLogGrid.js CheckDoc.js EditorConf.js ErrorFileGrid.js FilePanel.js
LocalMailGrid.js MainMenu.js NotInENGrid.js PatchPrompt.js PendingCommitGrid.js PendingPatchGrid.js PendingReviewGrid.js RepositoryTree.js
StaleFileGrid.js /js/ui/task AcceptPatchTask.js CheckFileTask.js ClearLocalChangeTask.js GetFileTask.js LoadConfigTask.js MarkDeleteTask.js
PingTask.js RejectPatchTask.js SaveENFileTask.js SaveLangFileTask.js SavePatchTask.js UpdateConfTask.js /js/ux Ext.ux.CodeMirror.js
| From: | Chan Ka Shing | Date: | Fri, 26 Jun 2009 10:29:45 +0000 |
| Subject: | cvs: doc-editor / TODO /js main.js main_min.js /js/ui/component BugsGrid.js CVSLogGrid.js CheckDoc.js EditorConf.js ErrorFileGrid.js FilePanel.js LocalMailGrid.js MainMenu.js NotInENGrid.js PatchPrompt.js PendingCommitGrid.js PendingPatchGrid.js PendingReviewGrid.js RepositoryTree.js StaleFileGrid.js /js/ui/task AcceptPatchTask.js CheckFileTask.js ClearLocalChangeTask.js GetFileTask.js LoadConfigTask.js MarkDeleteTask.js PingTask.js RejectPatchTask.js SaveENFileTask.js SaveLangFileTask.js SavePatchTask.js UpdateConfTask.js /js/ux Ext.ux.CodeMirror.js |
||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4250@lists.php.net to get a copy of this message | ||
mrkschan Fri Jun 26 10:29:45 2009 UTC
Added files:
/doc-editor/js/ui/task GetFileTask.js LoadConfigTask.js
SavePatchTask.js UpdateConfTask.js
Modified files:
/doc-editor/js/ui/component BugsGrid.js CheckDoc.js CVSLogGrid.js
EditorConf.js ErrorFileGrid.js
FilePanel.js LocalMailGrid.js
MainMenu.js NotInENGrid.js
PatchPrompt.js PendingCommitGrid.js
PendingPatchGrid.js
PendingReviewGrid.js RepositoryTree.js
StaleFileGrid.js
/doc-editor/js/ui/task AcceptPatchTask.js CheckFileTask.js
ClearLocalChangeTask.js MarkDeleteTask.js
PingTask.js RejectPatchTask.js
SaveENFileTask.js SaveLangFileTask.js
/doc-editor/js/ux Ext.ux.CodeMirror.js
/doc-editor/js main.js main_min.js
/doc-editor TODO
Log:
modification/fix:
* fix CodeMirror cannot display the end of vertical scroll [bug in last commit]
* FilePendingOpen queue is now storing { fpath, fname } object instead of plain array
* created static reference for singleton components, dependency on phpDoc.xxx are removed and
use ui.component.xxx.instance instead
* created static reference for PingTask, dependency on phpDoc.TaskPing is removed
* remove .run() in task/*.js
* fix openning multiple files will stop when some files already opened
main.js cleanup:
* load configuration task is wrapped in ui/task/LoadConfigTask.js
* menuMarkupEN & menuMarkupLANG is now wrapped in ui/component/FilePanel.js
* newTabCheckDoc, newTabBuildStatus, winConf, winAbout is now wrapped in
ui/component/MainMenu.js
* getFile is now wrapped in ui/task/GetFileTask.js
* confUpdate is now wrapped in ui/task/UpdateConfTask.js
* winDiff moved into CVSLogGrid.js
* newTabMailing moved into LocalMailGrid.js
* newTabBugs moved into BugsGrid.js
* addToPendingPatch is now wrapped in ui/task/SavePatchTask.js
* addToPeningCommit moved into PendingCommitGrid.js
http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/BugsGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/BugsGrid.js diff -u doc-editor/js/ui/component/BugsGrid.js:1.1 doc-editor/js/ui/component/BugsGrid.js:1.2 --- doc-editor/js/ui/component/BugsGrid.js:1.1 Thu Jun 4 07:12:32 2009 +++ doc-editor/js/ui/component/BugsGrid.js Fri Jun 26 10:29:44 2009 @@ -82,11 +82,7 @@ iconCls : 'openInTab', handler : function() { - var BugsId = grid.store.getAt(rowIndex).data.id, - BugsUrl = grid.store.getAt(rowIndex).data.link, - BugsTitle = grid.store.getAt(rowIndex).data.title; - - phpDoc.NewTabBugs(BugsId, BugsUrl, BugsTitle); + grid.fireEvent('rowdblclick', grid, rowIndex, e); } }, '-', { text : _('Refresh this grid'), @@ -104,7 +100,22 @@ BugsUrl = grid.store.getAt(rowIndex).data.link, BugsTitle = grid.store.getAt(rowIndex).data.title; - phpDoc.NewTabBugs(BugsId, BugsUrl, BugsTitle); + Ext.getCmp('main-panel').add({ + id : 'mifp_bugs_' + BugsId, + xtype : 'iframepanel', + title : _('Loading...'), + tabTip : BugsTitle, + iconCls : 'iconBugs', + loadMask : true, + defaultSrc : BugsUrl, + listeners : { + documentloaded : function(frame) + { + frame.ownerCt.setTitle(Ext.util.Format.substr(BugsTitle, 0, 20) + '...'); + } + } + }); + Ext.getCmp('main-panel').setActiveTab('mifp_bugs_' + BugsId); } }, http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/CheckDoc.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/CheckDoc.js diff -u doc-editor/js/ui/component/CheckDoc.js:1.2 doc-editor/js/ui/component/CheckDoc.js:1.3 --- doc-editor/js/ui/component/CheckDoc.js:1.2 Mon Jun 15 07:04:53 2009 +++ doc-editor/js/ui/component/CheckDoc.js Fri Jun 26 10:29:44 2009 @@ -182,7 +182,7 @@ }, rowdblclick : function(grid, rowIndex, e) { - phpDoc.openFile( + ui.component.RepositoryTree.instance.openFile( 'en' + grid.fpath, grid.store.getAt(rowIndex).data.file ); @@ -206,32 +206,29 @@ autoScroll : true, layout : 'fit', buttons : [{ - /* scope : this, Note: scope does not work here */ text : 'Open all files', handler : function() { var win = Ext.getCmp('check-doc-file-win'), store = ui.component._CheckDoc.fs; - //~ TODO - use Object in FilePendingOpen-Queue instead of Array - phpDoc.filePendingOpen = []; + phpDoc.filePendingOpen = new Array(); for (var i = 0; i < store.getCount(); ++i) { - phpDoc.filePendingOpen[i] = [ - 'en' + win.fpath, - store.getAt(i).data.file - ]; + phpDoc.filePendingOpen[i] = { + fpath : 'en' + win.fpath, + fname : store.getAt(i).data.file + }; } - phpDoc.openFile( - phpDoc.filePendingOpen[0][0], - phpDoc.filePendingOpen[0][1] + ui.component.RepositoryTree.instance.openFile( + phpDoc.filePendingOpen[0].fpath, + phpDoc.filePendingOpen[0].fname ); win.close(); } }, { - /* scope : this, Note: scope does not work here */ text : 'Open selected files', id : 'check-doc-btn-open-selected-files', disabled : true, @@ -242,18 +239,18 @@ .getSelectionModel() .getSelections(); - phpDoc.filePendingOpen = []; + phpDoc.filePendingOpen = new Array(); for (var i = 0; i < r.length; ++i) { - phpDoc.filePendingOpen[i] = [ - 'en' + win.fpath, - r[i].data.file - ]; + phpDoc.filePendingOpen[i] = { + fpath : 'en' + win.fpath, + fname : r[i].data.file + }; } - phpDoc.openFile( - phpDoc.filePendingOpen[0][0], - phpDoc.filePendingOpen[0][1] + ui.component.RepositoryTree.instance.openFile( + phpDoc.filePendingOpen[0].fpath, + phpDoc.filePendingOpen[0].fname ); win.close(); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/CVSLogGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/CVSLogGrid.js diff -u doc-editor/js/ui/component/CVSLogGrid.js:1.1 doc-editor/js/ui/component/CVSLogGrid.js:1.2 --- doc-editor/js/ui/component/CVSLogGrid.js:1.1 Mon Jun 15 07:04:53 2009 +++ doc-editor/js/ui/component/CVSLogGrid.js Fri Jun 26 10:29:44 2009 @@ -155,7 +155,45 @@ rev1 = s[0].data.revision, rev2 = s[1].data.revision; - phpDoc.winDiff(this.fpath, this.fname, rev1, rev2); + Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Finding the diff. Please, wait...')); + + // Load diff data + XHR({ + url : './php/controller.php', + params : { + task : 'getDiff2', + FilePath : this.fpath, + FileName : this.fname, + Rev1 : rev1, + Rev2 : rev2 + }, + success : function(response) + { + var o = Ext.util.JSON.decode(response.responseText); + + Ext.getBody().unmask(); + + // We display in diff window + var winStatus = new Ext.Window({ + title : String.format(_('Diff between {0} & {1}'), rev1, rev2), + width : 650, + height : 350, + resizable : false, + modal : true, + autoScroll : true, + bodyStyle : 'background-color: white; padding: 5px;', + html : '<div class="diff-content">' + o.content + '</div>', + buttons : [{ + text : 'Close', + handler : function() + { + winStatus.close(); + } + }] + }); + winStatus.show(); + } + }); } }, { scope : this, http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/EditorConf.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/EditorConf.js diff -u doc-editor/js/ui/component/EditorConf.js:1.1 doc-editor/js/ui/component/EditorConf.js:1.2 --- doc-editor/js/ui/component/EditorConf.js:1.1 Tue Jun 2 05:08:35 2009 +++ doc-editor/js/ui/component/EditorConf.js Fri Jun 26 10:29:44 2009 @@ -118,7 +118,10 @@ var hrefTheme = c.getValue(); Ext.get('appTheme').dom.href = hrefTheme; - phpDoc.confUpdate('conf_theme', hrefTheme); + new ui.task.UpdateConfTask({ + item : 'conf_theme', + value : hrefTheme + }); } } }] @@ -155,7 +158,10 @@ check : function(field) { if (field.checked) { - phpDoc.confUpdate('conf_needupdate_diff', field.getRawValue()); + new ui.task.UpdateConfTask({ + item : 'conf_needupdate_diff', + value : field.getRawValue() + }); } } } @@ -170,7 +176,10 @@ check : function(field) { if (field.checked) { - phpDoc.confUpdate('conf_needupdate_diff', field.getRawValue()); + new ui.task.UpdateConfTask({ + item : 'conf_needupdate_diff', + value : field.getRawValue() + }); } } } @@ -190,7 +199,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_needupdate_scrollbars', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_needupdate_scrollbars', + value : field.getValue() + }); } } }, { @@ -202,7 +214,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_needupdate_displaylog', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_needupdate_displaylog', + value : field.getValue() + }); } } }] @@ -237,7 +252,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_error_skipnbliteraltag', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_error_skipnbliteraltag', + value : field.getValue() + }); } } }] @@ -256,7 +274,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_error_scrollbars', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_error_scrollbars', + value : field.getValue() + }); } } }, { @@ -268,7 +289,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_error_displaylog', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_error_displaylog', + value : field.getValue() + }); } } }] @@ -303,7 +327,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_reviewed_scrollbars', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_reviewed_scrollbars', + value : field.getValue() + }); } } }, { @@ -315,7 +342,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_reviewed_displaylog', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_reviewed_displaylog', + value : field.getValue() + }); } } }] @@ -350,7 +380,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_allfiles_displaylog', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_allfiles_displaylog', + value : field.getValue() + }); } } }] @@ -385,7 +418,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_patch_scrollbars', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_patch_scrollbars', + value : field.getValue() + }); } } }, { @@ -397,7 +433,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_patch_displaylog', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_patch_displaylog', + value : field.getValue() + }); } } }] http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/ErrorFileGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/ErrorFileGrid.js diff -u doc-editor/js/ui/component/ErrorFileGrid.js:1.1 doc-editor/js/ui/component/ErrorFileGrid.js:1.2 --- doc-editor/js/ui/component/ErrorFileGrid.js:1.1 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/ErrorFileGrid.js Fri Jun 26 10:29:44 2009 @@ -356,6 +356,7 @@ initComponent : function() { + ui.component.ErrorFileGrid.instance = this; Ext.apply(this, { store : new ui.component._ErrorFileGrid.store({ @@ -391,7 +392,7 @@ { this.setValue(''); this.triggers[0].hide(); - phpDoc.errorFileGrid.store.clearFilter(); + ui.component.ErrorFileGrid.instance.store.clearFilter(); }, onTrigger2Click : function() { @@ -405,7 +406,7 @@ } this.clearInvalid(); this.triggers[0].show(); - phpDoc.errorFileGrid.store.filter('maintainer', v); + ui.component.ErrorFileGrid.instance.store.filter('maintainer', v); } }) ] @@ -413,3 +414,4 @@ ui.component.ErrorFileGrid.superclass.initComponent.call(this); } }); +ui.component.ErrorFileGrid.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/FilePanel.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/FilePanel.js diff -u doc-editor/js/ui/component/FilePanel.js:1.2 doc-editor/js/ui/component/FilePanel.js:1.3 --- doc-editor/js/ui/component/FilePanel.js:1.2 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/FilePanel.js Fri Jun 26 10:29:44 2009 @@ -1,4 +1,320 @@ -Ext.namespace('ui','ui.component'); +Ext.namespace('ui','ui.component','ui.component._FilePanel'); + +//------------------------------------------------------------------------------ +// FilePanel internals +Ext.namespace('ui.component._FilePanel.tbar.menu'); +// FilePanel editor menu for LangFile +// config - { comp_id } +ui.component._FilePanel.tbar.menu.lang = function(config) +{ + Ext.apply(this, config); + this.init(); + ui.component._FilePanel.tbar.menu.lang.superclass.constructor.call(this); +} +Ext.extend(ui.component._FilePanel.tbar.menu.lang, Ext.Toolbar.Button, +{ + text : _('MarkUp'), + iconCls : 'iconInsertCode', + init : function() + { + Ext.apply(this, + { + menu : new Ext.menu.Menu({ + items : [{ + scope : this, + text : _('Reviewed tag'), + handler : function() + { + Ext.getCmp(this.comp_id).insertIntoLine( + 2, 'end', "\n<!-- Reviewed: no -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Revcheck tag'), + handler : function() + { + Ext.getCmp(this.comp_id).insertIntoLine( + 2, "end", + "\n<!-- EN-Revision: 1.XX Maintainer: " + + phpDoc.userLogin + " Status: ready -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }] + }) + }); + } +}); + +// FilePanel editor menu for ENFile +// config - { comp_id } +ui.component._FilePanel.tbar.menu.en = function(config) +{ + Ext.apply(this, config); + this.init(); + ui.component._FilePanel.tbar.menu.en.superclass.constructor.call(this); +} +Ext.extend(ui.component._FilePanel.tbar.menu.en, Ext.Toolbar.Button, +{ + text : _('MarkUp'), + iconCls : 'iconInsertCode', + init : function() + { + Ext.apply(this, + { + menu : new Ext.menu.Menu({ + items : [{ + scope : this, + text : _('Description section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + " <refsect1 role=\"description\"><!-- {{{ -->\r\n " + + "&reftitle.description;\r\n " + + "<methodsynopsis>\r\n " + + "<!-- Example: All functions have this -->\r\n " + + "<type>thereturned type</type><methodname>func_name</methodname>\r\n " + + "<!-- Example: Required parameter -->\r\n " + + "<methodparam><type>param1type</type><parameter>firstparameter</parameter></methodparam>\r\n " + + "<!-- Example: Optional parameter, also by reference -->\r\n " + + "<methodparam choice=\"opt\"><type>int</type><parameter role=\"reference\">secondparameter</parameter></methodparam>\r\n " + + "<!-- Example: If no methodparams exist (void), use this -->\r\n " + + "<void />\r\n " + + "</methodsynopsis>\r\n " + + "<para>\r\n " + + "The function description goes here.\r\n " + + "</para>\r\n " + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Parameters section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"parameters\"><!-- {{{ -->\r\n" + + "&reftitle.parameters;\r\n" + + "<para>\r\n" + + "<variablelist>\r\n" + + "<varlistentry>\r\n" + + "<term><parameter>firstparameter</parameter></term>\r\n" + + "<listitem>\r\n" + + "<para>\r\n" + + "Its description\r\n" + + "</para>\r\n" + + "</listitem>\r\n" + + "</varlistentry>\r\n" + + "<varlistentry>\r\n" + + "<term>\r\n" + + "<parameter>secondparameter</parameter>\r\n" + + "</term>\r\n" + + "<listitem>\r\n" + + "<para>\r\n" + + "Its description\r\n" + + "</para>\r\n" + + "</listitem>\r\n" + + "</varlistentry>\r\n" + + "</variablelist>\r\n" + + "</para>\r\n" + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Return section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"returnvalues\"><!-- {{{ -->\r\n" + + "&reftitle.returnvalues;\r\n" + + "<para>\r\n" + + "What this function returns, first on success, then failure.\r\n" + + "If simply true on success and false on failure, just use &return.success; here.\r\n" + + "</para>\r\n" + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Error section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"errors\"><!-- {{{ -->\r\n" + + "&reftitle.errors;\r\n" + + "<para>\r\n" + + "When does this function issue E_* level errors, and/or throw exceptions.\r\n" + + "</para>\r\n" + + "</refsect1><!-- }}} -->\r\n" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Unicode section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"unicode\"><!-- {{{ -->\r\n" + + "&reftitle.unicode;\r\n" + + "<para>\r\n" + + "Information specific to unicode, from the PHP 6 changes.\r\n" + + "</para>\r\n" + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Changelog section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"changelog\"><!-- {{{ -->\r\n" + + "&reftitle.changelog;\r\n" + + "<para>\r\n" + + "<informaltable>\r\n" + + "<tgroup cols=\"2\">\r\n" + + "<thead>\r\n" + + "<row>\r\n" + + "<entry>&Version;</entry>\r\n" + + "<entry>&Description;</entry>\r\n" + + "</row>\r\n" + + "</thead>\r\n" + + "<tbody>\r\n" + + "<row>\r\n" + + "<entry>Enter the version of change here</entry>\r\n" + + "<entry>\r\n" + + "Describe the change\r\n" + + "</entry>\r\n" + + "</row>\r\n" + + "</tbody>\r\n" + + "</tgroup>\r\n" + + "</informaltable>\r\n" + + "</para>\r\n" + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Examples section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"examples\"><!-- {{{ -->\r\n" + + "&reftitle.examples;\r\n" + + "<para>\r\n" + + "<example xml:id=\"function-name.example.basic\"><!-- {{{ -->\r\n" + + "<title><function>function-name</function> example</title>\r\n" + + "<para>\r\n" + + "Any text that describes the purpose of the example, or what\r\n" + + "goes on in the example should be here. (Inside the <example> tag, not out).\r\n" + + "</para>\r\n" + + "<programlisting role=\"php\">\r\n" + + "<![CDATA[\r\n" + + "<?php\r\n" + + "if ($anexample === true) {\r\n" + + "echo 'Use the PEAR Coding standards';\r\n" + + "}\r\n" + + "if ($thereisoutput === 'and it is multiple lines') {\r\n" + + "echo 'Use a screen like we did below';\r\n" + + "}\r\n" + + "?>\r\n" + + "]]>\r\n" + + "</programlisting>\r\n" + + "&example.outputs.similar;\r\n" + + "<screen>\r\n" + + "<![CDATA[\r\n" + + "Use the PEAR Coding standards\r\n" + + "Use a screen like we did below\r\n" + + "]]>\r\n" + + "</screen>\r\n" + + "</example><!-- }}} -->\r\n" + + "</para>\r\n" + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Notes section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"notes\"><!-- {{{ -->\r\n" + + "&reftitle.notes;\r\n" + + "<caution>\r\n" + + "<para>\r\n" + + "Any notes that don't fit anywhere else should go here.\r\n" + + "90% of the time, notes, warnings or cautions are better placed in the\r\n" + + "parameters section. Consider that before using this section!\r\n" + + "</para>\r\n" + + "</caution>\r\n" + + "¬e.language-construct;\r\n" + + "¬e.not-bin-safe;\r\n" + + "¬e.registerglobals;\r\n" + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('SeeAlso section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"seealso\"><!-- {{{ -->\r\n" + + "&reftitle.seealso;\r\n" + + "<para>\r\n" + + "<simplelist>\r\n" + + "<member><function>somefunc</function></member>\r\n" + + "<member><function>another_func</function></member>\r\n" + + "<member>The <link linkend=\"something\">something appendix</link></member>\r\n" + + "</simplelist>\r\n" + + "</para>\r\n" + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }] + }) + }); + } +}); //------------------------------------------------------------------------------ // FilePanel @@ -59,99 +375,104 @@ }]; if (!this.readOnly) { - this.tbar = (this.isPatch) ? [{ - id : id_prefix + '-PANEL-btn-save-' + this.fid, - scope : this, - tooltip : _('<b>Accept</b> this patch and <b>Save</b> the file'), - iconCls : 'saveFile', - handler : function() + this.tbar = (this.isPatch) ? [ + // patch file pane tbar { - new ui.task.AcceptPatchTask({ - fid : this.fid, - fpath : this.fpath, - fname : this.fname, - fuid : this.fuid, - storeRecord : this.storeRecord - }).run(); - } - }, { - id : id_prefix + '-PANEL-btn-reject-' + this.fid, - scope : this, - tooltip : _('<b>Reject</b> this patch'), - iconCls : 'iconPageDelete', - handler : function() - { - new ui.task.RejectPatchTask({ - fid : this.fid, - fuid : this.fuid, - storeRecord : this.storeRecord - }).run(); - } - }, '-', { - scope : this, - tooltip : _('<b>Re-indent</b> all this file'), - iconCls : 'iconIndent', - handler : function() - { - Ext.getCmp(id_prefix + '-FILE-' + this.fid).reIndentAll(); - } - }] : [{ - id : id_prefix + '-PANEL-btn-save-' + this.fid, - scope : this, - tooltip : _('<b>Save</b> this file'), - iconCls : 'saveFile', - disabled : true, - handler : function() - { - if (this.lang === 'en') { - - new ui.task.SaveENFileTask({ - prefix : this.prefix, - ftype : this.ftype, + id : id_prefix + '-PANEL-btn-save-' + this.fid, + scope : this, + tooltip : _('<b>Accept</b> this patch and <b>Save</b> the file'), + iconCls : 'saveFile', + handler : function() + { + new ui.task.AcceptPatchTask({ fid : this.fid, fpath : this.fpath, fname : this.fname, + fuid : this.fuid, storeRecord : this.storeRecord - }).run(); - - } else { - - phpDoc.saveLangFile( - this.prefix, this.ftype, this.fid, this.fpath, this.fname, - this.lang, this.storeRecord, (this.prefix === 'AF') - ); + }); + } + }, { + id : id_prefix + '-PANEL-btn-reject-' + this.fid, + scope : this, + tooltip : _('<b>Reject</b> this patch'), + iconCls : 'iconPageDelete', + handler : function() + { + new ui.task.RejectPatchTask({ + fid : this.fid, + fuid : this.fuid, + storeRecord : this.storeRecord + }); + } + }, '-', { + scope : this, + tooltip : _('<b>Re-indent</b> all this file'), + iconCls : 'iconIndent', + handler : function() + { + Ext.getCmp(id_prefix + '-FILE-' + this.fid).reIndentAll(); } } - }, { - id : id_prefix + '-PANEL-btn-saveas-' + this.fid, - scope : this, - tooltip : _('<b>Save as</b> a patch'), - iconCls : 'saveAsFile', - disabled : true, - handler : function() - { - new ui.component.PatchPrompt({ - prefix : this.prefix, - ftype : this.ftype, - fid : this.fid, - fpath : this.fpath, - fname : this.fname, - lang : this.lang, - defaultEmail : (phpDoc.userLogin !== 'cvsread') - ? phpDoc.userLogin + '@php.net' : '' - }).show(); - } - }, '-', { - scope : this, - tooltip : _('<b>Re-indent</b> all this file'), - iconCls : 'iconIndent', - handler : function() + ] : [ + // en/lang file pane tbar { - Ext.getCmp(id_prefix + '-FILE-' + this.fid).reIndentAll(); - } - }, (this.lang === 'en') - ? phpDoc.menuMarkupEN(id_prefix + '-FILE-' + this.fid) - : phpDoc.menuMarkupLANG(id_prefix + '-FILE-' + this.fid, phpDoc) + id : id_prefix + '-PANEL-btn-save-' + this.fid, + scope : this, + tooltip : _('<b>Save</b> this file'), + iconCls : 'saveFile', + disabled : true, + handler : function() + { + if (this.lang === 'en') { + + new ui.task.SaveENFileTask({ + prefix : this.prefix, + ftype : this.ftype, + fid : this.fid, + fpath : this.fpath, + fname : this.fname, + storeRecord : this.storeRecord + }); + + } else { + + phpDoc.saveLangFile( + this.prefix, this.ftype, this.fid, this.fpath, this.fname, + this.lang, this.storeRecord + ); + } + } + }, { + id : id_prefix + '-PANEL-btn-saveas-' + this.fid, + scope : this, + tooltip : _('<b>Save as</b> a patch'), + iconCls : 'saveAsFile', + disabled : true, + handler : function() + { + new ui.component.PatchPrompt({ + prefix : this.prefix, + ftype : this.ftype, + fid : this.fid, + fpath : this.fpath, + fname : this.fname, + lang : this.lang, + defaultEmail : (phpDoc.userLogin !== 'cvsread') + ? phpDoc.userLogin + '@php.net' : '' + }).show(); + } + }, '-', { + scope : this, + tooltip : _('<b>Re-indent</b> all this file'), + iconCls : 'iconIndent', + handler : function() + { + Ext.getCmp(id_prefix + '-FILE-' + this.fid).reIndentAll(); + } + }, (this.lang === 'en') + ? new ui.component._FilePanel.tbar.menu.en({ comp_id : id_prefix + '-FILE-' + this.fid }) + : new ui.component._FilePanel.tbar.menu.lang({ comp_id : id_prefix + '-FILE-' + this.fid }) ]; } else { this.tbar = [{}]; // empty tbar for readonly file @@ -170,17 +491,17 @@ scope : this, initialize : function() { - if (this.isPatch) { - phpDoc.getFile( - this.fid, this.fpath, this.fname + '.' + this.fuid + '.patch', - id_prefix + '-PANEL-', id_prefix + '-FILE-' - ); - } else { - phpDoc.getFile( - this.fid, this.lang + this.fpath, this.fname, - id_prefix + '-PANEL-', id_prefix + '-FILE-' - ); - } + new ui.task.GetFileTask({ + prefix : this.prefix, + ftype : this.ftype, + fid : this.fid, + fpath : (this.isPatch) + ? this.fpath + : this.lang + this.fpath, + fname : (this.isPatch) + ? this.fname + '.' + this.fuid + '.patch' + : this.fname + }); }, cmchange : function(keyCode, charCode, obj) { http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/LocalMailGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/LocalMailGrid.js diff -u doc-editor/js/ui/component/LocalMailGrid.js:1.1 doc-editor/js/ui/component/LocalMailGrid.js:1.2 --- doc-editor/js/ui/component/LocalMailGrid.js:1.1 Thu Jun 4 07:12:32 2009 +++ doc-editor/js/ui/component/LocalMailGrid.js Fri Jun 26 10:29:44 2009 @@ -80,10 +80,6 @@ }, rowcontextmenu : function(grid, rowIndex, e) { - var MailId = grid.store.getAt(rowIndex).data.pubDate, - MailUrl = grid.store.getAt(rowIndex).data.link, - MailTitle = grid.store.getAt(rowIndex).data.title; - grid.getSelectionModel().selectRow(rowIndex); new Ext.menu.Menu({ @@ -93,7 +89,7 @@ iconCls : 'openInTab', handler : function() { - phpDoc.NewTabMailing(MailId, MailUrl, MailTitle); + grid.fireEvent('rowdblclick', grid, rowIndex, e); } }, '-', { text : _('Refresh this grid'), @@ -111,7 +107,24 @@ MailUrl = grid.store.getAt(rowIndex).data.link, MailTitle = grid.store.getAt(rowIndex).data.title; - phpDoc.NewTabMailing(MailId, MailUrl, MailTitle); + Ext.getCmp('main-panel').add({ + xtype : 'iframepanel', + id : 'mifp_' + MailId, + title : _('Loading...'), + tabTip : MailTitle, + iconCls : 'home-mailing-title', + loadMask : true, + defaultSrc : MailUrl, + listeners : { + documentloaded : function(frame) + { + frame.ownerCt.setTitle( + Ext.util.Format.substr(MailTitle, 0, 20) + '...' + ); + } + } + }); + Ext.getCmp('main-panel').setActiveTab('mifp_' + MailId); } }, http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/MainMenu.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/MainMenu.js diff -u doc-editor/js/ui/component/MainMenu.js:1.2 doc-editor/js/ui/component/MainMenu.js:1.3 --- doc-editor/js/ui/component/MainMenu.js:1.2 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/MainMenu.js Fri Jun 26 10:29:44 2009 @@ -18,12 +18,12 @@ text : _('Refresh all data'), disabled : (phpDoc.userLogin === 'cvsread') ? true : false, iconCls : 'refresh', - handler : phpDoc.WinUpdate + handler : phpDoc.WinUpdate // TODO }, { text : _('Check Build'), disabled : (phpDoc.userLogin === 'cvsread') ? true : false, iconCls : 'checkBuild', - handler : phpDoc.WinCheckBuild + handler : phpDoc.WinCheckBuild // TODO }, { text : _('EN tools'), handler : function() { return false }, @@ -31,11 +31,55 @@ items : [{ text : _('Translation build status'), iconCls : 'BuildStatus', - handler : phpDoc.newTabBuildStatus + handler : function() + { + var tab = Ext.getCmp('tab-build-status'); + + if (tab === undefined ) { + // if tab not exist, create new tab + Ext.getCmp('main-panel').add({ + id : 'tab-build-status', + title : _('Translation build status'), + iconCls : 'BuildStatus', + layout : 'fit', + closable : true, + html : 'nothing' + }); + tab = Ext.getCmp('tab-build-status'); + } + + if (tab.items) tab.removeAll(true); + tab.add(new ui.component.BuildStatus()); + tab.doLayout(); // render the grid + + Ext.getCmp('main-panel').setActiveTab('tab-build-status'); + } }, { text : _('Script Check doc'), iconCls : 'CheckDoc', - handler : phpDoc.newTabCheckDoc + handler : function() + { + var tab = Ext.getCmp('tab-check-doc'); + + if (tab === undefined) { + // if tab not exist, create new tab + Ext.getCmp('main-panel').add({ + id : 'tab-check-doc', + title : 'Check Doc', + iconCls : 'CheckDoc', + layout : 'fit', + closable : true, + html : 'nothing' + }); + tab = Ext.getCmp('tab-check-doc'); + } + + if (tab.items) tab.removeAll(true); + tab.add(new ui.component.CheckDoc()); + tab.doLayout(); // render the grid + + Ext.getCmp('main-panel').setActiveTab('tab-check-doc'); + } }] }) }, '-', { @@ -43,7 +87,10 @@ iconCls : 'iconConf', tooltip : '<b>Configure</b> this tool', id : 'winconf-btn', - handler : phpDoc.WinConf + handler : function() + { + new ui.component.EditorConf().show(Ext.get('winconf-btn')); + } }, '-', { text : _('Erase my personal data'), disabled : (phpDoc.userLogin === 'cvsread') ? true : false, @@ -108,7 +155,7 @@ iconCls : 'iconHelp', handler : function() { - phpDoc.WinAbout(); + new ui.component.About().show(Ext.get('winabout-btn')); } }] }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/NotInENGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/NotInENGrid.js diff -u doc-editor/js/ui/component/NotInENGrid.js:1.1 doc-editor/js/ui/component/NotInENGrid.js:1.2 --- doc-editor/js/ui/component/NotInENGrid.js:1.1 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/NotInENGrid.js Fri Jun 26 10:29:44 2009 @@ -130,12 +130,13 @@ fpath : FilePath, fname : FileName, storeRecord : storeRecord - }).run(); + }); } }, initComponent : function() { + ui.component.NotInENGrid.instance = this; Ext.apply(this, { store : new ui.component._NotInENGrid.store({ @@ -149,3 +150,4 @@ ui.component.NotInENGrid.superclass.initComponent.call(this); } }); +ui.component.NotInENGrid.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/PatchPrompt.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/PatchPrompt.js diff -u doc-editor/js/ui/component/PatchPrompt.js:1.1 doc-editor/js/ui/component/PatchPrompt.js:1.2 --- doc-editor/js/ui/component/PatchPrompt.js:1.1 Mon Jun 15 07:04:53 2009 +++ doc-editor/js/ui/component/PatchPrompt.js Fri Jun 26 10:29:44 2009 @@ -37,48 +37,14 @@ text : _('Save'), handler : function() { - var email = Ext.getCmp('patch-email-alert').getValue(), - msg = Ext.MessageBox.wait(_('Saving data as a patch...')) - id_prefix = this.prefix + '-' + this.ftype; - - Ext.getCmp(id_prefix + '-PANEL-btn-saveas-' + this.fid).disable(); - Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified = false; - Ext.getCmp(id_prefix + '-PANEL-' + this.fid).setTitle( - Ext.getCmp(id_prefix + '-PANEL-' + this.fid).originTitle - ); - - if ( (this.prefix === 'AF') - || (this.lang === 'en' && Ext.getCmp(this.prefix+'-LANG-FILE-'+this.fid).isModified === false) - || (this.lang !== 'en' && Ext.getCmp(this.prefix+'-EN-FILE-'+this.fid).isModified === false) - ) { - Ext.getCmp(this.prefix + '-' + this.fid).setTitle( - Ext.getCmp(this.prefix + '-' + this.fid).originTitle - ); - } - - // We save this patch - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'saveFile', - filePath : this.fpath, - fileName : this.fname, - fileLang : this.lang, - fileContent : Ext.getCmp(id_prefix + '-FILE-' + this.fid).getCode(), - type : 'patch', - emailAlert : email - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - // Add this files into storePendingPatch - phpDoc.addToPendingPatch(this.lang + this.fpath, this.fname, o.uniqId); - - // Remove wait msg - msg.hide(); - } + new ui.task.SavePatchTask({ + prefix : this.prefix, + fid : this.fid, + ftype : this.ftype, + lang : this.lang, + fpath : this.fpath, + fname : this.fname, + email : Ext.getCmp('patch-email-alert').getValue() }); this.close(); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/PendingCommitGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/PendingCommitGrid.js diff -u doc-editor/js/ui/component/PendingCommitGrid.js:1.1 doc-editor/js/ui/component/PendingCommitGrid.js:1.2 --- doc-editor/js/ui/component/PendingCommitGrid.js:1.1 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/PendingCommitGrid.js Fri Jun 26 10:29:44 2009 @@ -236,7 +236,7 @@ ftype : 'update', fpath : this.fpath, fname : this.fname - }).run(); + }); } }, '-', new ui.component._PendingCommitGrid.menu.common({ rowIdx : this.rowIdx @@ -327,7 +327,7 @@ FileName = storeRecord.data.name; if (FileType === 'update') { - phpDoc.openFile(FilePath, FileName); + ui.component.RepositoryTree.instance.openFile(FilePath, FileName); } if (FileType === 'delete') { @@ -336,13 +336,14 @@ ftype : FileType, fpath : FilePath, fname : FileName - }).run(); + }); } } }, initComponent : function() { + ui.component.PendingCommitGrid.instance = this; Ext.apply(this, { store : new ui.component._PendingCommitGrid.store({ @@ -354,5 +355,33 @@ }) }); ui.component.PendingCommitGrid.superclass.initComponent.call(this); + }, + + addRecord : function(fid, fpath, fname, type) + { + var exist = false; + + this.store.each(function(r) + { + if (r.data.path === fpath && r.data.name === fname) { + exist = true; + } + }); + + if (!exist) { + // if not exist, add to store + this.store.insert(0, + new this.store.recordType({ + id : fid, + path : fpath, + name : fname, + by : phpDoc.userLogin, + date : new Date(), + type : type + }) + ); + this.store.groupBy('path', true); // regroup + } } }); +ui.component.PendingCommitGrid.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/PendingPatchGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/PendingPatchGrid.js diff -u doc-editor/js/ui/component/PendingPatchGrid.js:1.1 doc-editor/js/ui/component/PendingPatchGrid.js:1.2 --- doc-editor/js/ui/component/PendingPatchGrid.js:1.1 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/PendingPatchGrid.js Fri Jun 26 10:29:44 2009 @@ -118,7 +118,7 @@ fid : this.fid, fuid : this.fuid, storeRecord : this.grid.store.getAt(this.rowIdx) - }).run(); + }); } }] }); @@ -286,6 +286,7 @@ initComponent : function() { + ui.component.PendingPatchGrid.instance = this; Ext.apply(this, { store : new ui.component._PendingPatchGrid.store({ @@ -299,3 +300,4 @@ ui.component.PendingPatchGrid.superclass.initComponent.call(this); } }); +ui.component.PendingPatchGrid.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/PendingReviewGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/PendingReviewGrid.js diff -u doc-editor/js/ui/component/PendingReviewGrid.js:1.1 doc-editor/js/ui/component/PendingReviewGrid.js:1.2 --- doc-editor/js/ui/component/PendingReviewGrid.js:1.1 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/PendingReviewGrid.js Fri Jun 26 10:29:44 2009 @@ -184,16 +184,16 @@ phpDoc.filePendingOpen = new Array(); for (var i = 0; i < o.files.length; i = i + 1) { - phpDoc.filePendingOpen[i] = [ - phpDoc.userLang + o.files[i].path, - o.files[i].name - ]; + phpDoc.filePendingOpen[i] = { + fpath : phpDoc.userLang + o.files[i].path, + fname : o.files[i].name + }; } // Start the first - phpDoc.openFile( - phpDoc.filePendingOpen[0][0], - phpDoc.filePendingOpen[0][1] + ui.component.RepositoryTree.instance.openFile( + phpDoc.filePendingOpen[0].fpath, + phpDoc.filePendingOpen[0].fname ); Ext.getBody().unmask(); @@ -376,6 +376,7 @@ initComponent : function() { + ui.component.PendingReviewGrid.instance = this; Ext.apply(this, { store : new ui.component._PendingReviewGrid.store({ @@ -408,7 +409,7 @@ { this.setValue(''); this.triggers[0].hide(); - phpDoc.pendingReviewGrid.store.clearFilter(); + ui.component.PendingReviewGrid.instance.store.clearFilter(); }, onTrigger2Click : function() { @@ -422,7 +423,7 @@ } this.clearInvalid(); this.triggers[0].show(); - phpDoc.pendingReviewGrid.store.filter('maintainer', v); + ui.component.PendingReviewGrid.instance.store.filter('maintainer', v); } }) ] @@ -430,3 +431,4 @@ ui.component.PendingReviewGrid.superclass.initComponent.call(this); } }); +ui.component.PendingReviewGrid.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/RepositoryTree.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/RepositoryTree.js diff -u doc-editor/js/ui/component/RepositoryTree.js:1.1 doc-editor/js/ui/component/RepositoryTree.js:1.2 --- doc-editor/js/ui/component/RepositoryTree.js:1.1 Mon Jun 15 07:04:53 2009 +++ doc-editor/js/ui/component/RepositoryTree.js Fri Jun 26 10:29:44 2009 @@ -141,6 +141,18 @@ } else { // This tab already exist. We focus it. Ext.getCmp('main-panel').setActiveTab('AF-' + FileID); + // if opening multiple files, dequeue and continue + if (phpDoc.filePendingOpen[0]) { + log(phpDoc.filePendingOpen.shift()); + if (phpDoc.filePendingOpen[0]) { + if (phpDoc.filePendingOpen[0].fpath) { + this.openFile( + phpDoc.filePendingOpen[0].fpath, + phpDoc.filePendingOpen[0].fname + ); + } + } + } } } } @@ -148,6 +160,7 @@ initComponent : function() { + ui.component.RepositoryTree.instance = this; Ext.apply(this, { tbar:[ @@ -171,17 +184,19 @@ }, onTrigger1Click : function() { + var instance = ui.component.RepositoryTree.instance; this.setValue(''); this.triggers[0].hide(); - phpDoc.treeAllFiles.root.setText(_('Repository')); + instance.root.setText(_('Repository')); // clear search - delete phpDoc.treeAllFiles.loader.baseParams.search; - phpDoc.treeAllFiles.root.reload(); + delete instance.loader.baseParams.search; + instance.root.reload(); }, onTrigger2Click: function() { - var v = this.getValue(); + var instance = ui.component.RepositoryTree.instance, + v = this.getValue(); if( v == '' || v.length < 3) { this.markInvalid(_('Your search must contain at least 3 characters')); @@ -192,13 +207,13 @@ this.triggers[0].show(); // carry search - phpDoc.treeAllFiles.loader.baseParams.search = v; - phpDoc.treeAllFiles.root.reload(function() + instance.loader.baseParams.search = v; + instance.root.reload(function() { - phpDoc.treeAllFiles.root.setText( + instance.root.setText( String.format( _('Search result: {0}'), - phpDoc.treeAllFiles.root.childNodes.length + instance.root.childNodes.length ) ); }); @@ -212,5 +227,42 @@ new Ext.tree.TreeSorter(this, { folderSort : true }); + }, + + openFile : function(fpath, fname) + { + Ext.getBody().mask( + '<img src="themes/img/loading.gif" ' + + 'style="vertical-align: middle;" /> ' + + _('Please, wait...') + ); + Ext.getCmp('acc-all-files').expand(); + + var t = fpath.split('/'), cb = function(node) + { + node.ensureVisible(); + if (t[0] && t[0] !== '') { + // walk into childs + for (var i = 0; i < node.childNodes.length; ++i) { + if (node.childNodes[i].text === t[0]) { + t.shift(); + node.childNodes[i].expand(false, true, cb.createDelegate(this)); + } + } + } else { + // leaf node + for (var i = 0; i < node.childNodes.length; ++i) { + if (node.childNodes[i].text === fname) { + node.childNodes[i].ensureVisible(); + node.childNodes[i].ui.highlight(); + this.fireEvent('dblclick', node.childNodes[i]); + Ext.getBody().unmask(); + } + } + } + } + this.root.expand(false, true, cb.createDelegate(this)); } }); +ui.component.RepositoryTree.prototype.instance = null; + http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/StaleFileGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/StaleFileGrid.js diff -u doc-editor/js/ui/component/StaleFileGrid.js:1.2 doc-editor/js/ui/component/StaleFileGrid.js:1.3 --- doc-editor/js/ui/component/StaleFileGrid.js:1.2 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/StaleFileGrid.js Fri Jun 26 10:29:44 2009 @@ -320,6 +320,7 @@ initComponent : function() { + ui.component.StaleFileGrid.instance = this; ui.component._StaleFileGrid.columns[2].header = String.format( _('{0} revision'), Ext.util.Format.uppercase(phpDoc.userLang) ); @@ -357,7 +358,7 @@ { this.setValue(''); this.triggers[0].hide(); - phpDoc.staleFileGrid.store.clearFilter(); + ui.component.StaleFileGrid.instance.store.clearFilter(); }, onTrigger2Click: function() { @@ -371,7 +372,7 @@ } this.clearInvalid(); this.triggers[0].show(); - phpDoc.staleFileGrid.store.filter('maintainer', v); + ui.component.StaleFileGrid.instance.store.filter('maintainer', v); } }) ] @@ -379,3 +380,4 @@ ui.component.StaleFileGrid.superclass.initComponent.call(this); } }); +ui.component.StaleFileGrid.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/AcceptPatchTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/AcceptPatchTask.js diff -u doc-editor/js/ui/task/AcceptPatchTask.js:1.1 doc-editor/js/ui/task/AcceptPatchTask.js:1.2 --- doc-editor/js/ui/task/AcceptPatchTask.js:1.1 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/ui/task/AcceptPatchTask.js Fri Jun 26 10:29:44 2009 @@ -5,80 +5,79 @@ { Ext.apply(this, config); - this.run = function() - { - if (phpDoc.userLogin === 'cvsread') { - phpDoc.winForbidden(); - return; - } - - Ext.MessageBox.confirm( - _('Confirm'), - _('This action will accept this patch, send an email to his author, save the file and close this tab.'), - function(btn) - { - if (btn === 'yes') { - Ext.getCmp('PP-PATCH-PANEL-btn-save-' + this.fid).disable(); - Ext.getCmp('PP-PATCH-FILE-' + this.fid).isModified = false; - Ext.getCmp('PP-PATCH-PANEL-' + this.fid).setTitle( - Ext.getCmp('PP-PATCH-PANEL-' + this.fid).originTitle - ); - Ext.getCmp('PP-' + this.fid).setTitle( - Ext.getCmp('PP-' + this.fid).originTitle - ); - - var msg = Ext.MessageBox.wait(_('Saving data...')); - - // We save LANG File - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'saveFile', - filePath : this.fpath, - fileName : this.fname, - fileLang : 'all', - fileContent : Ext.getCmp('PP-PATCH-FILE-' + this.fid).getCode() - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - // Add this files into storePendingCommit - phpDoc.addToPendingCommit(o.id, this.fpath, this.fname, 'update'); - - // Remove this patch from the PendingPatchStore - phpDoc.pendingPatchGrid.store.remove(this.storeRecord); - - // We fire event add to update the file count - phpDoc.pendingPatchGrid.store.fireEvent('add', phpDoc.pendingPatchGrid.store); - - // We need to send an accept patch email, delete .patch file, and remove this patch from dataBase - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'afterPatchAccept', - PatchUniqID : this.fuid - } - }); - - // Remove wait msg - msg.hide(); - - // Remove this tab - Ext.getCmp('main-panel').remove('PP-' + this.fid); - }, - failure : function(response) { - // Remove wait msg - msg.hide(); - //~ phpDoc.winForbidden(); // use failure prompt? - } - }); - } // btn = yes - }, this // scope - ); + if (phpDoc.userLogin === 'cvsread') { + phpDoc.winForbidden(); + return; } + + Ext.MessageBox.confirm( + _('Confirm'), + _('This action will accept this patch, send an email to his author, save the file and close this tab.'), + function(btn) + { + if (btn === 'yes') { + Ext.getCmp('PP-PATCH-PANEL-btn-save-' + this.fid).disable(); + Ext.getCmp('PP-PATCH-FILE-' + this.fid).isModified = false; + Ext.getCmp('PP-PATCH-PANEL-' + this.fid).setTitle( + Ext.getCmp('PP-PATCH-PANEL-' + this.fid).originTitle + ); + Ext.getCmp('PP-' + this.fid).setTitle( + Ext.getCmp('PP-' + this.fid).originTitle + ); + + var msg = Ext.MessageBox.wait(_('Saving data...')); + + // We save LANG File + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'saveFile', + filePath : this.fpath, + fileName : this.fname, + fileLang : 'all', + fileContent : Ext.getCmp('PP-PATCH-FILE-' + this.fid).getCode() + }, + success : function(response) + { + var o = Ext.util.JSON.decode(response.responseText), + grid = ui.component.PendingPatchGrid.instance; + + // Add this files into storePendingCommit + ui.component.PendingCommitGrid.instance.addRecord( + o.id, this.fpath, this.fname, 'update' + ); + + // Remove this patch from the PendingPatchStore + grid.store.remove(this.storeRecord); + + // We fire event add to update the file count + grid.store.fireEvent('add', grid.store); + + // We need to send an accept patch email, delete .patch file, and remove this patch from dataBase + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'afterPatchAccept', + PatchUniqID : this.fuid + } + }); + + // Remove wait msg + msg.hide(); + + // Remove this tab + Ext.getCmp('main-panel').remove('PP-' + this.fid); + }, + failure : function(response) { + // Remove wait msg + msg.hide(); + } + }); + } // btn = yes + }, this // scope + ); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/CheckFileTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/CheckFileTask.js diff -u doc-editor/js/ui/task/CheckFileTask.js:1.1 doc-editor/js/ui/task/CheckFileTask.js:1.2 --- doc-editor/js/ui/task/CheckFileTask.js:1.1 Mon Jun 15 07:04:54 2009 +++ doc-editor/js/ui/task/CheckFileTask.js Fri Jun 26 10:29:44 2009 @@ -5,75 +5,72 @@ { Ext.apply(this,config); - this.run = function() - { - Ext.getBody().mask( - '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + - _('Checking for error. Please, wait...') - ); - - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'checkFileError', - FilePath : this.fpath, - FileName : this.fname, - FileLang : this.lang, - FileContent : Ext.getCmp(this.prefix + '-' + this.ftype + - '-FILE-' + this.fid).getCode() - }, - success : function(response) - { - Ext.getBody().unmask(); - - var o = Ext.util.JSON.decode(response.responseText); - - // If there is some errors, we display this - if (o.error && o.error_first !== '-No error-') { - - Ext.getCmp('main-panel').add({ - id : 'FE-help-' + this.fid, - title : 'Error in ' + this.fname, - iconCls : 'FilesError', - closable : true, - autoScroll : true, - autoLoad : './error_type.php?dir=' + - this.fpath + '&file=' + this.fname - }); - - Ext.getCmp('main-panel').setActiveTab('FE-help-' + this.fid); - - } else { - // If there is no error, we display an information message - Ext.MessageBox.show({ - title : _('Check for errors'), - msg : _('There is no error.'), - buttons : Ext.MessageBox.OK, - icon : Ext.MessageBox.INFO - }); - } - - // Now, We save LANG File - new ui.task.SaveLangFileTask({ - prefix : this.prefix, - ftype : this.ftype, - fid : this.fid, - fpath : this.fpath, - fname : this.fname, - lang : this.lang, - storeRecord : this.storeRecord - }).run(); - - if (this.prefix === 'FE') { - // We must reload the iframe of error description - Ext.getCmp(this.prefix + '-error-type-' + this.fid).setSrc( - './error_type.php?dir=' + this.fpath + - '&file=' + this.fname + - '&nocache=' + new Date().getTime() - ); - } + Ext.getBody().mask( + '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + + _('Checking for error. Please, wait...') + ); + + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'checkFileError', + FilePath : this.fpath, + FileName : this.fname, + FileLang : this.lang, + FileContent : Ext.getCmp(this.prefix + '-' + this.ftype + + '-FILE-' + this.fid).getCode() + }, + success : function(response) + { + Ext.getBody().unmask(); + + var o = Ext.util.JSON.decode(response.responseText); + + // If there is some errors, we display this + if (o.error && o.error_first !== '-No error-') { + + Ext.getCmp('main-panel').add({ + id : 'FE-help-' + this.fid, + title : 'Error in ' + this.fname, + iconCls : 'FilesError', + closable : true, + autoScroll : true, + autoLoad : './error_type.php?dir=' + + this.fpath + '&file=' + this.fname + }); + + Ext.getCmp('main-panel').setActiveTab('FE-help-' + this.fid); + + } else { + // If there is no error, we display an information message + Ext.MessageBox.show({ + title : _('Check for errors'), + msg : _('There is no error.'), + buttons : Ext.MessageBox.OK, + icon : Ext.MessageBox.INFO + }); } - }); - } + + // Now, We save LANG File + new ui.task.SaveLangFileTask({ + prefix : this.prefix, + ftype : this.ftype, + fid : this.fid, + fpath : this.fpath, + fname : this.fname, + lang : this.lang, + storeRecord : this.storeRecord + }); + + if (this.prefix === 'FE') { + // We must reload the iframe of error description + Ext.getCmp(this.prefix + '-error-type-' + this.fid).setSrc( + './error_type.php?dir=' + this.fpath + + '&file=' + this.fname + + '&nocache=' + new Date().getTime() + ); + } + } + }); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/ClearLocalChangeTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/ClearLocalChangeTask.js diff -u doc-editor/js/ui/task/ClearLocalChangeTask.js:1.1 doc-editor/js/ui/task/ClearLocalChangeTask.js:1.2 --- doc-editor/js/ui/task/ClearLocalChangeTask.js:1.1 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/ui/task/ClearLocalChangeTask.js Fri Jun 26 10:29:44 2009 @@ -5,125 +5,123 @@ { Ext.apply(this, config); - this.run = function() - { - if (phpDoc.userLogin === 'cvsread') { - phpDoc.winForbidden(); - return; - } - - Ext.MessageBox.confirm( - _('Confirm'), - _('This action will clear your local modification and take back this file from his original stats.<br/>You need confirm.'), - function(btn) - { - if (btn === 'yes') { - Ext.getBody().mask( - '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + - _('Please, wait...') - ); - - // Before clear local change, we close the file if there is open - if (Ext.getCmp('main-panel').findById('FNU-' + Ext.util.md5('FNU-' + this.fpath + this.fname))) { - Ext.getCmp('main-panel').remove('FNU-' + Ext.util.md5('FNU-' + this.fpath + this.fname)); - } + if (phpDoc.userLogin === 'cvsread') { + phpDoc.winForbidden(); + return; + } - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'clearLocalChange', - FileType : this.ftype, - FilePath : this.fpath, - FileName : this.fname - }, - success : function(response) - { - // clear local change success - - if (phpDoc.userLang === 'en') { - // We reload all store - phpDoc.staleFileGrid.store.reload(); - phpDoc.errorFileGrid.store.reload(); - phpDoc.storeFilesNeedReviewed.reload(); - } - - // We delete from this store - phpDoc.pendingCommitGrid.store.remove(this.storeRecord); - - // We fire event add to update the file count - phpDoc.pendingCommitGrid.store.fireEvent('add', phpDoc.pendingCommitGrid.store); - - // We try to search in others stores if this file is marked as needCommit - - // trow storeNotInEn - phpDoc.notInENGrid.store.each( - function(record) - { - if ((phpDoc.userLang+record.data.path) === this.fpath - && record.data.name === this.fname - ) { - record.set('needcommit', false); - } - }, - this - ); - - // trow storeFilesNeedReviewed - phpDoc.storeFilesNeedReviewed.each( - function(record) - { - if ((phpDoc.userLang+record.data.path) === this.fpath - && record.data.name === this.fname - ) { - record.set('needcommit', false); - } - }, - this - ); - - // trow StaleFile store - phpDoc.staleFileGrid.store.each( - function(record) - { - if ((phpDoc.userLang+record.data.path) === this.fpath - && record.data.name === this.fname - ) { - record.set('needcommit', false); - } - }, - this - ); - - // trow FileError - phpDoc.errorFileGrid.store.each( - function(record) - { - if ((phpDoc.userLang+record.data.path) === this.fpath - && record.data.name === this.fname - ) { - record.set('needcommit', false); - } - }, - this - ); - - // find open node in All Files modules - var node = phpDoc.treeAllFiles.getNodeById('//'+this.fpath+this.fname); - if (node) { - node.getUI().removeClass('modified'); - } - Ext.getBody().unmask(); - }, - failure : function(response) - { - // clear local change failure - Ext.getBody().unmask(); - phpDoc.winForbidden(); - } - }); + Ext.MessageBox.confirm( + _('Confirm'), + _('This action will clear your local modification and take back this file from his original stats.<br/>You need confirm.'), + function(btn) + { + if (btn === 'yes') { + Ext.getBody().mask( + '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + + _('Please, wait...') + ); + + // Before clear local change, we close the file if there is open + if (Ext.getCmp('main-panel').findById('FNU-' + Ext.util.md5('FNU-' + this.fpath + this.fname))) { + Ext.getCmp('main-panel').remove('FNU-' + Ext.util.md5('FNU-' + this.fpath + this.fname)); } - }, this - ); - } + + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'clearLocalChange', + FileType : this.ftype, + FilePath : this.fpath, + FileName : this.fname + }, + success : function(response) + { + // clear local change success + if (phpDoc.userLang === 'en') { + // We reload all store + ui.component.StaleFileGrid.instance.store.reload(); + ui.component.ErrorFileGrid.instance.store.reload(); + ui.component.PendingReviewGrid.instance.store.reload(); + } + + // We delete from this store + ui.component.PendingCommitGrid.instance.store.remove(this.storeRecord); + + // We fire event add to update the file count + ui.component.PendingCommitGrid.instance.store.fireEvent( + 'add', ui.component.PendingCommitGrid.instance.store + ); + + // We try to search in others stores if this file is marked as needCommit + + // trow storeNotInEn + ui.component.NotInENGrid.instance.store.each( + function(record) + { + if ((phpDoc.userLang+record.data.path) === this.fpath + && record.data.name === this.fname + ) { + record.set('needcommit', false); + } + }, + this + ); + + // trow storeFilesNeedReviewed + ui.component.PendingReviewGrid.instance.store.each( + function(record) + { + if ((phpDoc.userLang+record.data.path) === this.fpath + && record.data.name === this.fname + ) { + record.set('needcommit', false); + } + }, + this + ); + + // trow StaleFile store + ui.component.StaleFileGrid.instance.store.each( + function(record) + { + if ((phpDoc.userLang+record.data.path) === this.fpath + && record.data.name === this.fname + ) { + record.set('needcommit', false); + } + }, + this + ); + + // trow FileError + ui.component.ErrorFileGrid.instance.store.each( + function(record) + { + if ((phpDoc.userLang+record.data.path) === this.fpath + && record.data.name === this.fname + ) { + record.set('needcommit', false); + } + }, + this + ); + + // find open node in All Files modules + var node = ui.component.RepositoryTree.instance.getNodeById('//'+this.fpath+this.fname); + if (node) { + node.getUI().removeClass('modified'); + } + Ext.getBody().unmask(); + }, + failure : function(response) + { + // clear local change failure + Ext.getBody().unmask(); + phpDoc.winForbidden(); + } + }); + } + }, this + ); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/MarkDeleteTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/MarkDeleteTask.js diff -u doc-editor/js/ui/task/MarkDeleteTask.js:1.1 doc-editor/js/ui/task/MarkDeleteTask.js:1.2 --- doc-editor/js/ui/task/MarkDeleteTask.js:1.1 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/ui/task/MarkDeleteTask.js Fri Jun 26 10:29:44 2009 @@ -5,38 +5,37 @@ { Ext.apply(this, config); - this.run = function() - { - Ext.MessageBox.confirm( - _('Confirm'), - _('This action will mark this file as need deleted.<br/><br/>You need commit this change to take it effect.<br/><br/>Please, confirm this action.'), - function(btn) - { - if (btn === 'yes') { - Ext.getBody().mask( - '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + - _('Please, wait...') - ); + Ext.MessageBox.confirm( + _('Confirm'), + _('This action will mark this file as need deleted.<br/><br/>You need commit this change to take it effect.<br/><br/>Please, confirm this action.'), + function(btn) + { + if (btn === 'yes') { + Ext.getBody().mask( + '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + + _('Please, wait...') + ); - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'markAsNeedDelete', - FilePath : this.fpath, - FileName : this.fname - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'markAsNeedDelete', + FilePath : this.fpath, + FileName : this.fname + }, + success : function(response) + { + var o = Ext.util.JSON.decode(response.responseText); - Ext.getBody().unmask(); - phpDoc.addToPendingCommit( o.id, phpDoc.userLang + this.fpath, this.fname, 'delete' ); - this.storeRecord.set('needcommit', true); - } - }); - } - }, this - ); - } + Ext.getBody().unmask(); + ui.component.PendingCommitGrid.instance.addRecord( + o.id, phpDoc.userLang + this.fpath, this.fname, 'delete' + ); + this.storeRecord.set('needcommit', true); + } + }); + } + }, this + ); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/PingTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/PingTask.js diff -u doc-editor/js/ui/task/PingTask.js:1.1 doc-editor/js/ui/task/PingTask.js:1.2 --- doc-editor/js/ui/task/PingTask.js:1.1 Mon Jun 15 07:04:54 2009 +++ doc-editor/js/ui/task/PingTask.js Fri Jun 26 10:29:44 2009 @@ -2,6 +2,7 @@ ui.task.PingTask = function() { + ui.task.PingTask.instance = this; this.task = new Ext.util.DelayedTask(function() { XHR({ @@ -44,3 +45,4 @@ this.task.cancel(); }; } +ui.task.PingTask.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/RejectPatchTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/RejectPatchTask.js diff -u doc-editor/js/ui/task/RejectPatchTask.js:1.1 doc-editor/js/ui/task/RejectPatchTask.js:1.2 --- doc-editor/js/ui/task/RejectPatchTask.js:1.1 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/ui/task/RejectPatchTask.js Fri Jun 26 10:29:44 2009 @@ -5,50 +5,48 @@ { Ext.apply(this,config); - this.run = function() - { - if (phpDoc.userLogin === 'cvsread') { - phpDoc.winForbidden(); - return; - } + if (phpDoc.userLogin === 'cvsread') { + phpDoc.winForbidden(); + return; + } - Ext.MessageBox.confirm( - _('Confirm'), - _('This action will <b>reject</b> this patch, send an email to his author and close this tab.'), - function (btn) - { - if (btn === 'yes') { - var msg = Ext.MessageBox.wait(_('Please, wait...')); + Ext.MessageBox.confirm( + _('Confirm'), + _('This action will <b>reject</b> this patch, send an email to his author and close this tab.'), + function (btn) + { + if (btn === 'yes') { + var msg = Ext.MessageBox.wait(_('Please, wait...')); - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'afterPatchReject', - PatchUniqID : this.fuid - }, - success : function(response) - { - // Remove this patch from the PendingPatchStore - phpDoc.pendingPatchGrid.store.remove(this.storeRecord); + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'afterPatchReject', + PatchUniqID : this.fuid + }, + success : function(response) + { + var grid = ui.component.PendingPatchGrid.instance; + // Remove this patch from the PendingPatchStore + grid.store.remove(this.storeRecord); - // We fire event add to update the file count - phpDoc.pendingPatchGrid.store.fireEvent('add', phpDoc.pendingPatchGrid.store); + // We fire event add to update the file count + grid.store.fireEvent('add', grid.store); - // Remove this tab - Ext.getCmp('main-panel').remove('PP-' + this.fid); - // Remove wait msg - msg.hide(); - }, - failure : function(response) - { - // Remove wait msg - msg.hide(); - phpDoc.winForbidden(); - } - }); - } // btn = yes - }, this // scope - ); - } + // Remove this tab + Ext.getCmp('main-panel').remove('PP-' + this.fid); + // Remove wait msg + msg.hide(); + }, + failure : function(response) + { + // Remove wait msg + msg.hide(); + phpDoc.winForbidden(); + } + }); + } // btn = yes + }, this // scope + ); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/SaveENFileTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/SaveENFileTask.js diff -u doc-editor/js/ui/task/SaveENFileTask.js:1.2 doc-editor/js/ui/task/SaveENFileTask.js:1.3 --- doc-editor/js/ui/task/SaveENFileTask.js:1.2 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/ui/task/SaveENFileTask.js Fri Jun 26 10:29:44 2009 @@ -5,77 +5,76 @@ { Ext.apply(this, config); - this.run = function() - { - var id_prefix = this.prefix + '-' + this.ftype, - msg = Ext.MessageBox.wait(_('Saving data...')); + var id_prefix = this.prefix + '-' + this.ftype, + msg = Ext.MessageBox.wait(_('Saving data...')); - if (phpDoc.userLogin === 'cvsread') { - msg.hide(); - phpDoc.winForbidden(); - return; - } + if (phpDoc.userLogin === 'cvsread') { + msg.hide(); + phpDoc.winForbidden(); + return; + } + + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'saveFile', + filePath : this.fpath, + fileName : this.fname, + fileLang : 'en', + fileContent : Ext.getCmp(this.prefix + '-' + this.ftype + + '-FILE-' + this.fid).getCode() + }, + success : function(response) + { + var o = Ext.util.JSON.decode(response.responseText); + + if (this.prefix === 'FNU') { + // Update our store + this.storeRecord.set('en_revision', '1.' + o.en_revision); + this.storeRecord.set('needcommit', true); + } + + if (this.prefix === 'FE') { + // Update our store + this.storeRecord.set('needcommit', true); + } + + if (this.prefix === 'FNR') { + // Update our store + this.storeRecord.set('needcommit', true); + } + + if (this.prefix === 'AF') { + this.storeRecord.getUI().addClass('modified'); // tree node + } - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'saveFile', - filePath : this.fpath, - fileName : this.fname, - fileLang : 'en', - fileContent : Ext.getCmp(this.prefix + '-' + this.ftype + - '-FILE-' + this.fid).getCode() - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - if (this.prefix === 'FNU') { - // Update our store - this.storeRecord.set('en_revision', '1.' + o.en_revision); - this.storeRecord.set('needcommit', true); - } - - if (this.prefix === 'FE') { - // Update our store - this.storeRecord.set('needcommit', true); - } - - if (this.prefix === 'FNR') { - // Update our store - this.storeRecord.set('needcommit', true); - } - - if (this.prefix === 'AF') { - this.storeRecord.getUI().addClass('modified'); // tree node - } - - // Add this files into storePendingCommit - phpDoc.addToPendingCommit(o.id, 'en' + this.fpath, this.fname, 'update'); - - // reset file - Ext.getCmp(id_prefix + '-PANEL-btn-save-' + this.fid).disable(); - Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified = false; - Ext.getCmp(id_prefix + '-PANEL-' + this.fid).setTitle( - Ext.getCmp(id_prefix + '-PANEL-' + this.fid).originTitle + // Add this files into storePendingCommit + ui.component.PendingCommitGrid.instance.addRecord( + o.id, 'en' + this.fpath, this.fname, 'update' + ); + + // reset file + Ext.getCmp(id_prefix + '-PANEL-btn-save-' + this.fid).disable(); + Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified = false; + Ext.getCmp(id_prefix + '-PANEL-' + this.fid).setTitle( + Ext.getCmp(id_prefix + '-PANEL-' + this.fid).originTitle + ); + if (this.ftype === 'ALL' || !Ext.getCmp(this.prefix + '-LANG-FILE-' + this.fid).isModified) { + // reset tab-panel + Ext.getCmp(this.prefix + '-' + this.fid).setTitle( + Ext.getCmp(this.prefix + '-' + this.fid).originTitle ); - if (this.ftype === 'ALL' || !Ext.getCmp(this.prefix + '-LANG-FILE-' + this.fid).isModified) { - // reset tab-panel - Ext.getCmp(this.prefix + '-' + this.fid).setTitle( - Ext.getCmp(this.prefix + '-' + this.fid).originTitle - ); - } - - // Remove wait msg - msg.hide(); - }, - failure : function(response) - { - // Remove wait msg - msg.hide(); - phpDoc.winForbidden(); } - }); - } + + // Remove wait msg + msg.hide(); + }, + failure : function(response) + { + // Remove wait msg + msg.hide(); + phpDoc.winForbidden(); + } + }); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/SaveLangFileTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/SaveLangFileTask.js diff -u doc-editor/js/ui/task/SaveLangFileTask.js:1.2 doc-editor/js/ui/task/SaveLangFileTask.js:1.3 --- doc-editor/js/ui/task/SaveLangFileTask.js:1.2 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/ui/task/SaveLangFileTask.js Fri Jun 26 10:29:44 2009 @@ -5,78 +5,77 @@ { Ext.apply(this, config); - this.run = function() - { - var id_prefix = this.prefix + '-' + this.ftype, - msg = Ext.MessageBox.wait(_('Saving data...')); - - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'saveFile', - filePath : this.fpath, - fileName : this.fname, - fileLang : this.lang, - fileContent : Ext.getCmp(this.prefix + '-' + this.ftype + - '-FILE-' + this.fid).getCode() - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - if (this.prefix === 'FE') { - // Update our store - this.storeRecord.set('needcommit', true); - this.storeRecord.set('maintainer', o.maintainer); - this.storeRecord.commit(); - } - - if (this.prefix === 'FNU') { - // Update our store - this.storeRecord.set('revision', '1.' + o.new_revision); - this.storeRecord.set('needcommit', true); - this.storeRecord.set('maintainer', o.maintainer); - this.storeRecord.commit(); - } - - if (this.prefix === 'FNR') { - // Update our store - this.storeRecord.set('needcommit', true); - this.storeRecord.set('maintainer', o.maintainer); - this.storeRecord.set('reviewed', o.reviewed); - this.storeRecord.commit(); - } - - if (this.prefix === 'AF') { - this.storeRecord.getUI().addClass('modified'); // tree node - } - - // Add this files into storePendingCommit - phpDoc.addToPendingCommit(o.id, this.lang + this.fpath, this.fname, 'update'); - - // reset file - Ext.getCmp(id_prefix + '-PANEL-btn-save-' + this.fid).disable(); - Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified = false; - Ext.getCmp(id_prefix + '-PANEL-' + this.fid).setTitle( - Ext.getCmp(id_prefix + '-PANEL-' + this.fid).originTitle + var id_prefix = this.prefix + '-' + this.ftype, + msg = Ext.MessageBox.wait(_('Saving data...')); + + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'saveFile', + filePath : this.fpath, + fileName : this.fname, + fileLang : this.lang, + fileContent : Ext.getCmp(this.prefix + '-' + this.ftype + + '-FILE-' + this.fid).getCode() + }, + success : function(response) + { + var o = Ext.util.JSON.decode(response.responseText); + + if (this.prefix === 'FE') { + // Update our store + this.storeRecord.set('needcommit', true); + this.storeRecord.set('maintainer', o.maintainer); + this.storeRecord.commit(); + } + + if (this.prefix === 'FNU') { + // Update our store + this.storeRecord.set('revision', '1.' + o.new_revision); + this.storeRecord.set('needcommit', true); + this.storeRecord.set('maintainer', o.maintainer); + this.storeRecord.commit(); + } + + if (this.prefix === 'FNR') { + // Update our store + this.storeRecord.set('needcommit', true); + this.storeRecord.set('maintainer', o.maintainer); + this.storeRecord.set('reviewed', o.reviewed); + this.storeRecord.commit(); + } + + if (this.prefix === 'AF') { + this.storeRecord.getUI().addClass('modified'); // tree node + } + + // Add this files into storePendingCommit + ui.component.PendingCommitGrid.instance.addRecord( + o.id, this.lang + this.fpath, this.fname, 'update' + ); + + // reset file + Ext.getCmp(id_prefix + '-PANEL-btn-save-' + this.fid).disable(); + Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified = false; + Ext.getCmp(id_prefix + '-PANEL-' + this.fid).setTitle( + Ext.getCmp(id_prefix + '-PANEL-' + this.fid).originTitle + ); + if (this.ftype === 'ALL' || !Ext.getCmp(this.prefix + '-EN-FILE-' + this.fid).isModified) { + // reset tab-panel + Ext.getCmp(this.prefix + '-' + this.fid).setTitle( + Ext.getCmp(this.prefix + '-' + this.fid).originTitle ); - if (this.ftype === 'ALL' || !Ext.getCmp(this.prefix + '-EN-FILE-' + this.fid).isModified) { - // reset tab-panel - Ext.getCmp(this.prefix + '-' + this.fid).setTitle( - Ext.getCmp(this.prefix + '-' + this.fid).originTitle - ); - } - - // Remove wait msg - msg.hide(); - }, - failure : function(response) - { - // Remove wait msg - msg.hide(); - phpDoc.winForbidden(); } - }); - } + + // Remove wait msg + msg.hide(); + }, + failure : function(response) + { + // Remove wait msg + msg.hide(); + phpDoc.winForbidden(); + } + }); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ux/Ext.ux.CodeMirror.js?r1=1.4&r2=1.5&diff_format=u Index: doc-editor/js/ux/Ext.ux.CodeMirror.js diff -u doc-editor/js/ux/Ext.ux.CodeMirror.js:1.4 doc-editor/js/ux/Ext.ux.CodeMirror.js:1.5 --- doc-editor/js/ux/Ext.ux.CodeMirror.js:1.4 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/ux/Ext.ux.CodeMirror.js Fri Jun 26 10:29:44 2009 @@ -48,7 +48,7 @@ }, resize: function() { - this.mirror.frame.style.height = this.ownerCt.lastSize.height+"px"; + this.mirror.frame.style.height = this.ownerCt.lastSize.height - 79 +"px"; }, onInit: function() { http://cvs.php.net/viewvc.cgi/doc-editor/js/main.js?r1=1.63&r2=1.64&diff_format=u Index: doc-editor/js/main.js diff -u doc-editor/js/main.js:1.63 doc-editor/js/main.js:1.64 --- doc-editor/js/main.js:1.63 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/main.js Fri Jun 26 10:29:45 2009 @@ -4,20 +4,17 @@ Ext.BLANK_IMAGE_URL = 'js/extjs/resources/images/default/s.gif'; return { - // Task - TaskPing : '', - // Store storeCommitLogMessage: '', // // Variable - userLogin : '', - userLang : '', + userLogin : null, + userLang : null, appName : 'PhpDocumentation Online Editor', appVer : '0.2', - uiRevision : '$Revision: 1.63 $', + uiRevision : '$Revision: 1.64 $', - userConf: { + userConf : { 'conf_needupdate_diff' : 'using-exec', 'conf_needupdate_scrollbars' : true, 'conf_needupdate_displaylog' : false, @@ -37,65 +34,20 @@ 'conf_theme' : 'themes/empty.css' }, - // Accordin contents - treeAllFiles : '', - staleFileGrid : '', - errorFileGrid : '', - pendingPatchGrid : '', - pendingCommitGrid : '', - pendingReviewGrid : '', - - filePendingOpen: '', + filePendingOpen : '', init : function() { // Stop default contextmenu on all this app - Ext.getBody().on('contextmenu', function(e){ + Ext.getBody().on('contextmenu', function(e) { e.stopEvent(); }, this); // We load the configuration for this user - XHR({ - url : './php/controller.php', - params : { task : 'getConf' }, - scope : this, - success : function(response) - { - var o = Ext.decode(response.responseText); - - this.userLogin = o.mess.userLogin; - this.userLang = o.mess.userLang; - - this.userConf.conf_needupdate_diff = o.mess.userConf.conf_needupdate_diff; - this.userConf.conf_needupdate_scrollbars = o.mess.userConf.conf_needupdate_scrollbars; - this.userConf.conf_needupdate_displaylog = o.mess.userConf.conf_needupdate_displaylog; - - this.userConf.conf_error_skipnbliteraltag = o.mess.userConf.conf_error_skipnbliteraltag; - this.userConf.conf_error_scrollbars = o.mess.userConf.conf_error_scrollbars; - this.userConf.conf_error_displaylog = o.mess.userConf.conf_error_displaylog; - - this.userConf.conf_reviewed_scrollbars = o.mess.userConf.conf_reviewed_scrollbars; - this.userConf.conf_reviewed_displaylog = o.mess.userConf.conf_reviewed_displaylog; - - this.userConf.conf_allfiles_displaylog = o.mess.userConf.conf_allfiles_displaylog; - - this.userConf.conf_patch_scrollbars = o.mess.userConf.conf_patch_scrollbars; - this.userConf.conf_patch_displaylog = o.mess.userConf.conf_patch_displaylog; - - //For the theme, we apply this. - this.userConf.conf_theme = o.mess.userConf.conf_theme; - Ext.get('appTheme').dom.href = this.userConf.conf_theme; - - // Load datastore - this.loadDataStore(); - - // Draw the interface - this.drawInterface(); - } - }); - }, // init + new ui.task.LoadConfigTask(); + }, - winForbidden: function() + winForbidden : function() { Ext.MessageBox.alert( _('Forbidden'), @@ -103,122 +55,8 @@ ); }, - menuMarkupLANG: function(panel, scope){ - - var menu, subMenu; - - subMenu = new Ext.menu.Menu({ - items: [{ - text: _('Reviewed tag'), - handler: function(){ - Ext.getCmp(panel).insertIntoLine(2, 'end', "\n<!-- Reviewed: no -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Revcheck tag'), - handler: function(){ - Ext.getCmp(panel).insertIntoLine(2, "end", "\n<!-- EN-Revision: 1.XX Maintainer: " + scope.userLogin + " Status: ready -->"); - Ext.getCmp(panel).focus(); - } - }] - }); - - menu = { - text: _('MarkUp'), - iconCls: 'iconInsertCode', - menu: subMenu - }; - return menu; - }, // menuMarkupLANG - menuMarkupEN: function(panel){ - - var menu, subMenu; - - subMenu = new Ext.menu.Menu({ - items: [{ - text: _('Description section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, " <refsect1 role=\"description\"><!-- {{{ -->\r\n &reftitle.description;\r\n <methodsynopsis>\r\n <!-- Example: All functions have this -->\r\n <type>thereturned type</type><methodname>func_name</methodname>\r\n <!-- Example: Required parameter -->\r\n <methodparam><type>param1type</type><parameter>firstparameter</parameter></methodparam>\r\n <!-- Example: Optional parameter, also by reference -->\r\n <methodparam choice=\"opt\"><type>int</type><parameter role=\"reference\">secondparameter</parameter></methodparam>\r\n <!-- Example: If no methodparams exist (void), use this -->\r\n <void />\r\n </methodsynopsis>\r\n <para>\r\n The function description goes here.\r\n </para>\r\n </refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Parameters section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"parameters\"><!-- {{{ -->\r\n&reftitle.parameters;\r\n<para>\r\n<variablelist>\r\n<varlistentry>\r\n<term><parameter>firstparameter</parameter></term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n<varlistentry>\r\n<term>\r\n<parameter>secondparameter</parameter>\r\n</term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n</variablelist>\r\n</para>\r\n</refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Return section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"returnvalues\"><!-- {{{ -->\r\n&reftitle.returnvalues;\r\n<para>\r\nWhat this function returns, first on success, then failure.\r\nIf simply true on success and false on failure, just use &return.success; here.\r\n</para>\r\n</refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Error section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"errors\"><!-- {{{ -->\r\n&reftitle.errors;\r\n<para>\r\nWhen does this function issue E_* level errors, and/or throw exceptions.\r\n</para>\r\n</refsect1><!-- }}} -->\r\n"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Unicode section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"unicode\"><!-- {{{ -->\r\n&reftitle.unicode;\r\n<para>\r\nInformation specific to unicode, from the PHP 6 changes.\r\n</para>\r\n</refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Changelog section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"changelog\"><!-- {{{ -->\r\n&reftitle.changelog;\r\n<para>\r\n<informaltable>\r\n<tgroup cols=\"2\">\r\n<thead>\r\n<row>\r\n<entry>&Version;</entry>\r\n<entry>&Description;</entry>\r\n</row>\r\n</thead>\r\n<tbody>\r\n<row>\r\n<entry>Enter the version of change here</entry>\r\n<entry>\r\nDescribe the change\r\n</entry>\r\n</row>\r\n</tbody>\r\n</tgroup>\r\n</informaltable>\r\n</para>\r\n</refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Examples section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"examples\"><!-- {{{ -->\r\n&reftitle.examples;\r\n<para>\r\n<example xml:id=\"function-name.example.basic\"><!-- {{{ -->\r\n<title><function>function-name</function> example</title>\r\n<para>\r\nAny text that describes the purpose of the example, or what\r\ngoes on in the example should be here. (Inside the <example> tag, not out).\r\n</para>\r\n<programlisting role=\"php\">\r\n<![CDATA[\r\n<?php\r\nif ($anexample === true) {\r\necho 'Use the PEAR Coding standards';\r\n}\r\nif ($thereisoutput === 'and it is multiple lines') {\r\necho 'Use a screen like we did below';\r\n}\r\n?>\r\n]]>\r\n</programlisting>\r\n&example.outputs.similar;\r\n<screen>\r\n<![CDATA[\r\nUse the PEAR Coding standards\r\nUse a screen like we did below\r\n]]>\r\n</screen>\r\n</example><!-- }}} -->\r\n</para>\r\n</refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Notes section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"notes\"><!-- {{{ -->\r\n&reftitle.notes;\r\n<caution>\r\n<para>\r\nAny notes that don't fit anywhere else should go here.\r\n90% of the time, notes, warnings or cautions are better placed in the\r\nparameters section. Consider that before using this section!\r\n</para>\r\n</caution>\r\n¬e.language-construct;\r\n¬e.not-bin-safe;\r\n¬e.registerglobals;\r\n</refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('SeeAlso section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"seealso\"><!-- {{{ -->\r\n&reftitle.seealso;\r\n<para>\r\n<simplelist>\r\n<member><function>somefunc</function></member>\r\n<member><function>another_func</function></member>\r\n<member>The <link linkend=\"something\">something appendix</link></member>\r\n</simplelist>\r\n</para>\r\n</refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }] - }); - - menu = { - text: _('MarkUp'), - iconCls: 'iconInsertCode', - menu: subMenu - }; - return menu; - }, // menuMarkupEN - loadDataStore: function(){ - + loadDataStore: function() + { // Store : Commit log this.storeCommitLogMessage = new Ext.data.Store({ //autoLoad: true, @@ -241,101 +79,25 @@ }]) }); - },// loadDataStore - - newTabCheckDoc : function() - { - var tab = Ext.getCmp('tab-check-doc'); - - if (tab === undefined) { - // if tab not exist, create new tab - Ext.getCmp('main-panel').add({ - id : 'tab-check-doc', - title : 'Check Doc', - iconCls : 'CheckDoc', - layout : 'fit', - closable : true, - html : 'nothing' - }); - tab = Ext.getCmp('tab-check-doc'); - } - - if (tab.items) tab.removeAll(true); - tab.add(new ui.component.CheckDoc()); - tab.doLayout(); // render the grid - - Ext.getCmp('main-panel').setActiveTab('tab-check-doc'); }, - newTabBuildStatus : function() + saveLangFile : function(prefix, ftype, fid, fpath, fname, lang, record) { - var tab = Ext.getCmp('tab-build-status'); - - if (tab === undefined ) { - // if tab not exist, create new tab - Ext.getCmp('main-panel').add({ - id : 'tab-build-status', - title : _('Translation build status'), - iconCls : 'BuildStatus', - layout : 'fit', - closable : true, - html : 'nothing' - }); - tab = Ext.getCmp('tab-build-status'); + if (this.userLogin === 'cvsread') { + this.winForbidden(); + return; } - if (tab.items) tab.removeAll(true); - tab.add(new ui.component.BuildStatus()); - tab.doLayout(); // render the grid - - Ext.getCmp('main-panel').setActiveTab('tab-build-status'); - }, - - openFile: function(FilePath, FileName) - { - Ext.getCmp('acc-all-files').expand(); - - var t = FilePath.split('/'); - - function GoToNode(node, scope) { - - node.expand(false, true, function(node){ - - var i; - - node.ensureVisible(); - if (t[0] && t[0] !== '') { - // walk into childs - for (i = 0; i < node.childNodes.length; i = i + 1) { - - if (node.childNodes[i].text === t[0]) { - t.shift(); - GoToNode(node.childNodes[i], scope); - } - } - - } - else { - // walk into childs - // leaf node - for (i = 0; i < node.childNodes.length; i = i + 1) { - if (node.childNodes[i].text === FileName) { - node.childNodes[i].ensureVisible(); - node.childNodes[i].ui.highlight(); - scope.treeAllFiles.fireEvent('dblclick', node.childNodes[i]); - } - } - } + if (prefix === 'AF') { + new ui.task.SaveLangFileTask({ + prefix : prefix, + ftype : ftype, + fid : fid, + fpath : fpath, + fname : fname, + lang : lang, + storeRecord : record }); - } - - GoToNode(this.treeAllFiles.root, this); - }, //openFile - - saveLangFile: function(prefix, ftype, fid, fpath, fname, lang, record) - { - if (this.userLogin === 'cvsread') { - this.winForbidden(); return; } @@ -356,7 +118,7 @@ fname : fname, lang : lang, storeRecord : record - }).run(); + }); } else if (btn === 'yes') { @@ -368,194 +130,17 @@ fname : fname, lang : lang, storeRecord : record - }).run(); // include SaveLangFileTask when no err + }); // include SaveLangFileTask when no err } } }); }, - getFile: function(FileID, FilePath, FileName, Panel1, Panel2) - { - // Mask the panel - Ext.get(Panel1 + FileID).mask( - '<img src="themes/img/loading.gif" ' + - 'style="vertical-align: middle;" /> '+ - _('Loading...') - ); - - // We load the File - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'getFile', - FilePath : FilePath, - FileName : FileName - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - Ext.getCmp(Panel2 + FileID).setCode(o.content); - Ext.get(Panel1 + FileID).unmask(); - }, - callback : function() - { - // Reviewed function to open all files of an extension - if (this.filePendingOpen[0]) { - this.filePendingOpen.shift(); - if (this.filePendingOpen[0]) { - if (this.filePendingOpen[0][0]) { - this.openFile(this.filePendingOpen[0][0], this.filePendingOpen[0][1]); - } - } - } - } - }); - }, // getFile - - addToPendingPatch : function(FilePath, FileName, uniqID) - { - var dt, r; - - // Add this files into storePendingCommit - dt = new Date(); - - r = new this.pendingPatchGrid.store.recordType({ - id: Ext.id('', ''), - path: FilePath, - name: FileName, - by: this.userLogin, - uniqID: uniqID, - date: dt - }); - this.pendingPatchGrid.store.insert(0, r); - - }, //addToPendingPatch - - addToPendingCommit : function(FileID, FilePath, FileName, type) - { - var alReady, dt, r1; - - alReady = false; - // Check if this file is not already into this store - this.pendingCommitGrid.store.each(function(r){ - - if (r.data.path === FilePath && r.data.name === FileName) { - alReady = true; - } - - }); - - if (!alReady) { - // Add this files into storePendingCommit - dt = new Date(); - - r1 = new this.pendingCommitGrid.store.recordType({ - id: FileID, - path: FilePath, - name: FileName, - by: this.userLogin, - date: dt, - type: type - }); - this.pendingCommitGrid.store.insert(0, r1); - this.pendingCommitGrid.store.groupBy('path', true); - } - - }, //addToPendingCommit - - NewTabBugs : function(BugsId, BugsUrl, BugsTitle) - { - Ext.getCmp('main-panel').add({ - id : 'mifp_bugs_' + BugsId, - xtype : 'iframepanel', - title : _('Loading...'), - tabTip : BugsTitle, - iconCls : 'iconBugs', - loadMask : true, - defaultSrc : BugsUrl, - listeners : { - 'documentloaded' : function(frame) - { - frame.ownerCt.setTitle(Ext.util.Format.substr(BugsTitle, 0, 20) + '...'); - } - } - }); - Ext.getCmp('main-panel').setActiveTab('mifp_bugs_' + BugsId); - }, - - NewTabMailing: function(MailId, MailUrl, MailTitle) - { - Ext.getCmp('main-panel').add({ - xtype: 'iframepanel', - id: 'mifp_' + MailId, - title: _('Loading...'), - tabTip: MailTitle, - iconCls: 'home-mailing-title', - loadMask: true, - defaultSrc: MailUrl, - listeners: { - 'documentloaded': function(frame){ - frame.ownerCt.setTitle(Ext.util.Format.substr(MailTitle, 0, 20) + '...'); - } - } - }); - Ext.getCmp('main-panel').setActiveTab('mifp_' + MailId); - - }, //NewTabMailing - - winDiff : function(FilePath, FileName, rev1, rev2) - { - Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Finding the diff. Please, wait...')); - - // Load diff data - XHR({ - url : './php/controller.php', - params : { - task : 'getDiff2', - FilePath : FilePath, - FileName : FileName, - Rev1 : rev1, - Rev2 : rev2 - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - Ext.getBody().unmask(); - - // We display in diff window - var winStatus = new Ext.Window({ - title : String.format(_('Diff between {0} & {1}'), rev1, rev2), - width : 650, - height : 350, - resizable : false, - modal : true, - autoScroll : true, - bodyStyle : 'background-color: white; padding: 5px;', - html : '<div class="diff-content">' + o.content + '</div>', - buttons : [{ - text : 'Close', - handler : function() - { - winStatus.close(); - } - }] - }); - winStatus.show(); - } - }); - - }, //winDiff - // Need confirm if we want to close a tab and the content have been modified. removeTabEvent : function(tabpanel, tab) { - var stateLang, stateEn, state, PanType; - - PanType = tab.id.split('-'); + var stateLang, stateEn, state, PanType = tab.id.split('-'); if ((PanType[0] === 'FE' || PanType[0] === 'FNU' || PanType[0] === 'FNR' || PanType[0] === 'PP' || PanType[0] === 'AF') && PanType[1] !== 'help') { @@ -588,14 +173,15 @@ } if (stateEn || stateLang || state) { - Ext.Msg.show({ - scope: this, - title: _('Confirm'), - msg: _('This file has been modified without being saved.<br/>Do you really want to close?'), - buttons: Ext.Msg.YESNO, - icon: Ext.Msg.QUESTION, - fn: function(btn, text){ + scope : this, + title : _('Confirm'), + msg : _('This file has been modified without being saved.<br/>' + + 'Do you really want to close?'), + buttons : Ext.Msg.YESNO, + icon : Ext.Msg.QUESTION, + fn : function(btn, text) + { if (btn === 'yes') { tabpanel.un('beforeremove', this.removeTabEvent, this); tabpanel.remove(tab); @@ -603,14 +189,14 @@ } } }); + return false; } else { return true; } - return false; } else { return true; } - }, //removeTabEvent + }, WinCommit : function(singleFile, rowIndex, choice) { @@ -899,14 +485,13 @@ win.show(btn); + var grid = ui.component.PendingCommitGrid.instance; // Load files to commit if (singleFile) { - // Just the current file - - FileDBID = this.pendingCommitGrid.store.getAt(rowIndex).data.id; - FilePath = this.pendingCommitGrid.store.getAt(rowIndex).data.path; - FileName = this.pendingCommitGrid.store.getAt(rowIndex).data.name; + FileDBID = grid.store.getAt(rowIndex).data.id; + FilePath = grid.store.getAt(rowIndex).data.path; + FileName = grid.store.getAt(rowIndex).data.name; FileID = Ext.util.md5(FilePath + FileName); node = new Ext.tree.TreeNode({ @@ -922,11 +507,10 @@ Ext.getCmp('tree-panel').getRootNode().appendChild(node); - } - else { + } else { // in files Need Update - this.pendingCommitGrid.store.each(function(record){ + grid.store.each(function(record){ if (choice && choice === 'by me' && record.data.by !== this.userLogin) { } @@ -1027,16 +611,16 @@ { if (scope.userLang != 'en') { // Reload Files error data - scope.errorFileGrid.store.reload(); + ui.component.ErrorFileGrid.instance.store.reload(); // Reload Files Need reviewed - scope.pendingReviewGrid.store.reload(); + ui.component.PendingReviewGrid.instance.store.reload(); // Reload Files Need Update - scope.staleFileGrid.store.reload(); + ui.component.StaleFileGrid.instance.store.reload(); } - scope.pendingCommitGrid.store.reload(); + ui.component.PendingCommitGrid.instance.store.reload(); // Reload translators data ui.component.TranslatorGrid.reload(); @@ -1051,15 +635,16 @@ }); }, // WinCommitLastStep - WinUpdate: function(){ + WinUpdate : function() + { // Update of Cvs and apply all tools. var win, btn; function RefreshStep1(scope){ // We need to stop pin test during this update - phpDoc.TaskPing.cancel(); + ui.task.PingTask.instance.cancel(); Ext.get('wizard-step-1').replaceClass('wizard-step-before', 'wizard-step-working'); Ext.get('wizard-step-1.1').replaceClass('wizard-wait', 'wizard-show'); @@ -1187,9 +772,9 @@ if (phpDoc.userLang != 'en') { // Reload all data on this page - phpDoc.staleFileGrid.store.reload(); + ui.component.StaleFileGrid.instance.store.reload(); ui.component.TranslatorGrid.reload(); - phpDoc.errorFileGrid.store.reload(); + ui.component.ErrorFileGrid.instance.store.reload(); } Ext.get('wizard-step-3').replaceClass('wizard-step-working', 'wizard-step-done'); @@ -1203,7 +788,7 @@ Ext.getCmp('btn-start-refresh').enable(); // Re-enable TaskPing - phpDoc.TaskPing.delay(30000); + ui.task.PingTask.instance.delay(30000); // Re-enable win's close button win.tools.close.setVisible(true); @@ -1279,8 +864,9 @@ }); }, // Winupdate - WinCheckBuild: function(){ + WinCheckBuild : function() + { var win, btn; btn = Ext.get('acc-need-update'); @@ -1299,7 +885,7 @@ var o = Ext.util.JSON.decode(response.responseText); // Re-enable TaskPing - phpDoc.TaskPing.delay(30000); + ui.task.PingTask.instance.delay(30000); // Display if ( Ext.getCmp('main-panel').findById('check_build_panel') ) { @@ -1343,7 +929,7 @@ Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait until the build is checked...')); // We need to stop pin test during this process - phpDoc.TaskPing.cancel(); + ui.task.PingTask.instance.cancel(); XHR({ scope : this, @@ -1363,7 +949,7 @@ if (o && o.success === false) { // Re-enable TaskPing - phpDoc.TaskPing.delay(30000); + ui.task.PingTask.instance.delay(30000); Ext.getBody().unmask(); this.winForbidden(); } else { @@ -1428,78 +1014,6 @@ }, //WinCheckBuild - WinConf : function() - { - new ui.component.EditorConf() - .show(Ext.get('winconf-btn')); - - }, //WinConf - - confUpdate: function(item, v) - { - // Apply modification in DB - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'confUpdate', - item : item, - value : v - }, - success : function(response) - { - // Update userConf object - if (item === "conf_theme") { - this.userConf.conf_theme = v; - } - if (item === "conf_needupdate_diff") { - this.userConf.conf_needupdate_diff = v; - } - if (item === "conf_needupdate_scrollbars") { - this.userConf.conf_needupdate_scrollbars = "" + v + ""; - } - if (item === "conf_needupdate_displaylog") { - this.userConf.conf_needupdate_displaylog = "" + v + ""; - } - - if (item === "conf_error_skipnbliteraltag") { - this.userConf.conf_error_skipnbliteraltag = "" + v + ""; - this.errorFileGrid.store.reload(); - } - if (item === "conf_error_scrollbars") { - this.userConf.conf_error_scrollbars = "" + v + ""; - } - if (item === "conf_error_displaylog") { - this.userConf.conf_error_displaylog = "" + v + ""; - } - - if (item === "conf_reviewed_scrollbars") { - this.userConf.conf_reviewed_scrollbars = "" + v + ""; - } - if (item === "conf_reviewed_displaylog") { - this.userConf.conf_reviewed_displaylog = "" + v + ""; - } - - if (item === "conf_allfiles_displaylog") { - this.userConf.conf_allfiles_displaylog = "" + v + ""; - } - - if (item === "conf_patch_scrollbars") { - this.userConf.conf_patch_scrollbars = "" + v + ""; - } - if (item === "conf_patch_displaylog") { - this.userConf.conf_patch_displaylog = "" + v + ""; - } - } - }); - }, //confUpdate - - WinAbout : function() - { - new ui.component.About() - .show(Ext.get('winabout-btn')); - }, //WinAbout - sendEmail : function(TranslatorName, TranslatorEmail) { var form, win; @@ -1617,7 +1131,7 @@ iconCls : 'iconTabNeedReviewed', handler : function() { - phpDoc.treeAllFiles.fireEvent('dblclick', node); + ui.component.RepositoryTree.instance.fireEvent('dblclick', node); } }, { hidden : (node.attributes.from === 'search'), @@ -1644,35 +1158,20 @@ drawInterface: function() { - var gridSummary, gridTranslators, gridMailing, gridBugs, graphPanel, MainWindow, mainMenu, mainContent; - // We keel alive our session by sending a ping every minute - phpDoc.TaskPing = new ui.task.PingTask(); - phpDoc.TaskPing.delay(30000); // start after 1 minute. - - this.staleFileGrid = new ui.component.StaleFileGrid(); - this.errorFileGrid = new ui.component.ErrorFileGrid(); - this.pendingPatchGrid = new ui.component.PendingPatchGrid(); - this.notInENGrid = new ui.component.NotInENGrid(); - this.pendingCommitGrid = new ui.component.PendingCommitGrid(); - this.pendingReviewGrid = new ui.component.PendingReviewGrid(); - this.treeAllFiles = new ui.component.RepositoryTree(); - - gridSummary = new ui.component.SummaryGrid(); - gridTranslators = new ui.component.TranslatorGrid(); - gridMailing = new ui.component.LocalMailGrid(); - gridBugs = new ui.component.BugsGrid(); - graphPanel = new ui.component.TranslationGraph(); - mainMenu = new ui.component.MainMenu(); - - if (this.userLang === 'en') { - mainContent = [gridMailing]; - } else { - mainContent = [gridSummary, gridTranslators, gridMailing, gridBugs, graphPanel]; - } + new ui.task.PingTask().delay(30000); // start after 1 minute. - // Our main window as a viewport - MainWindow = new Ext.Viewport({ + var mainMenu = new ui.component.MainMenu(), + mainContent = (this.userLang === 'en') ? [ + new ui.component.LocalMailGrid() + ] : [ + new ui.component.SummaryGrid(), + new ui.component.TranslatorGrid(), + new ui.component.LocalMailGrid(), + new ui.component.BugsGrid(), + new ui.component.TranslationGraph() + ]; + new Ext.Viewport({ layout : 'border', items : [{ // logo @@ -1711,7 +1210,7 @@ layout : 'fit', iconCls : 'FilesNeedUpdate', hidden : (this.userLang === 'en'), - items : [this.staleFileGrid], + items : [ new ui.component.StaleFileGrid() ], collapsed : true, listeners : { expand : function(panel) @@ -1726,7 +1225,7 @@ layout : 'fit', iconCls : 'FilesError', hidden : (this.userLang === 'en'), - items : [this.errorFileGrid], + items : [ new ui.component.ErrorFileGrid() ], collapsed : true, listeners : { expand : function(panel) @@ -1741,7 +1240,7 @@ layout : 'fit', iconCls : 'FilesNeedReviewed', hidden : (this.userLang === 'en'), - items : [this.pendingReviewGrid], + items : [ new ui.component.PendingReviewGrid() ], collapsed : true, listeners : { expand : function(panel) @@ -1756,14 +1255,14 @@ layout : 'fit', iconCls : 'NotInEn', hidden : (this.userLang === 'en'), - items : [this.notInENGrid], + items : [ new ui.component.NotInENGrid() ], collapsed : true }, { id : 'acc-all-files', title : _('All files'), layout : 'fit', iconCls : 'AllFiles', - items : [this.treeAllFiles], + items : [ new ui.component.RepositoryTree() ], collapsed : true, listeners : { expand : function(panel) @@ -1777,14 +1276,14 @@ title : _('Pending for commit') + ' - <em id="acc-pendingCommit-nb">0</em>', layout : 'fit', iconCls : 'PendingCommit', - items : [this.pendingCommitGrid], + items : [ new ui.component.PendingCommitGrid() ], collapsed : true }, { id : 'acc-need-pendingPatch', title : _('Pending Patch') + ' - <em id="acc-pendingPatch-nb">0</em>', layout : 'fit', iconCls : 'PendingPatch', - items : [this.pendingPatchGrid], + items : [ new ui.component.PendingPatchGrid() ], collapsed : true }] }] @@ -1841,7 +1340,10 @@ // Direct access to a file as cvsread if (directAccess) { - this.openFile(directAccess.lang + directAccess.path, directAccess.name); + this.openFile( + directAccess.lang + directAccess.path, + directAccess.name + ); } } // drawInterface }; // Return http://cvs.php.net/viewvc.cgi/doc-editor/js/main_min.js?r1=1.6&r2=1.7&diff_format=u Index: doc-editor/js/main_min.js diff -u doc-editor/js/main_min.js:1.6 doc-editor/js/main_min.js:1.7 --- doc-editor/js/main_min.js:1.6 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/main_min.js Fri Jun 26 10:29:45 2009 @@ -1 +1 @@ -function log(){if(console){console.log.apply(this,arguments)}}function _(a){try{var c=i18n[a];if(c===undefined){c=a;log("FIX ME : i18n not found for the string: "+a)}return c}catch(b){return a}}function XHR(c){var b=c.success,d=c.failure,a=c.callback;c.failure=c.success=Ext.emptyFn;c.callback=function(g,j,f){var i=null;try{i=Ext.decode(f.responseText)}catch(h){log("Invalid XHR JSON Response:"+f.responseText)}if(j&&i&&i.success){if(b!==undefined){Ext.callback(b,c.scope,[f,g])}}else{if(d!==undefined){Ext.callback(d,c.scope,[f,g])}}if(a!==undefined){Ext.callback(a,c.scope,[g,j,f])}};Ext.Ajax.request(c)}Ext.namespace("ui","ui.task");ui.task.AcceptPatchTask=function(a){Ext.apply(this,a);this.run=function(){if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}Ext.MessageBox.confirm(_("Confirm"),_("This action will accept this patch, send an email to his author, save the file and close this tab."),function(b){if(b==="yes"){Ext.getCmp("PP-PATCH-PANEL-btn-save-"+this.fid).d! isable();Ext.getCmp("PP-PATCH-FILE-"+this.fid).isModified=false;Ext.getCmp("PP-PATCH-PANEL-"+this.fid).setTitle(Ext.getCmp("PP-PATCH-PANEL-"+this.fid).originTitle);Ext.getCmp("PP-"+this.fid).setTitle(Ext.getCmp("PP-"+this.fid).originTitle);var c=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:"all",fileContent:Ext.getCmp("PP-PATCH-FILE-"+this.fid).getCode()},success:function(d){var e=Ext.util.JSON.decode(d.responseText);phpDoc.addToPendingCommit(e.id,this.fpath,this.fname,"update");phpDoc.pendingPatchGrid.store.remove(this.storeRecord);phpDoc.pendingPatchGrid.store.fireEvent("add",phpDoc.pendingPatchGrid.store);XHR({scope:this,url:"./php/controller.php",params:{task:"afterPatchAccept",PatchUniqID:this.fuid}});c.hide();Ext.getCmp("main-panel").remove("PP-"+this.fid)},failure:function(d){c.hide()}})}},this)}};Ext.namespace("ui","ui.task");ui.task.CheckFileTask=function! (a){Ext.apply(this,a);this.run=function(){Ext.getBody().mask('<img src ="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Checking for error. Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"checkFileError",FilePath:this.fpath,FileName:this.fname,FileLang:this.lang,FileContent:Ext.getCmp(this.prefix+"-"+this.ftype+"-FILE-"+this.fid).getCode()},success:function(b){Ext.getBody().unmask();var c=Ext.util.JSON.decode(b.responseText);if(c.error&&c.error_first!=="-No error-"){Ext.getCmp("main-panel").add({id:"FE-help-"+this.fid,title:"Error in "+this.fname,iconCls:"FilesError",closable:true,autoScroll:true,autoLoad:"./error_type.php?dir="+this.fpath+"&file="+this.fname});Ext.getCmp("main-panel").setActiveTab("FE-help-"+this.fid)}else{Ext.MessageBox.show({title:_("Check for errors"),msg:_("There is no error."),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO})}new ui.task.SaveLangFileTask({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:this.fpath,fname:this.fname,lang:this.lang,storeRecord:this.storeR! ecord}).run();if(this.prefix==="FE"){Ext.getCmp(this.prefix+"-error-type-"+this.fid).setSrc("./error_type.php?dir="+this.fpath+"&file="+this.fname+"&nocache="+new Date().getTime())}}})}};Ext.namespace("ui","ui.task");ui.task.ClearLocalChangeTask=function(a){Ext.apply(this,a);this.run=function(){if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}Ext.MessageBox.confirm(_("Confirm"),_("This action will clear your local modification and take back this file from his original stats.<br/>You need confirm."),function(b){if(b==="yes"){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));if(Ext.getCmp("main-panel").findById("FNU-"+Ext.util.md5("FNU-"+this.fpath+this.fname))){Ext.getCmp("main-panel").remove("FNU-"+Ext.util.md5("FNU-"+this.fpath+this.fname))}XHR({scope:this,url:"./php/controller.php",params:{task:"clearLocalChange",FileType:this.ftype,FilePath:this.fpath,FileName:this.fname},success:function(c){if(p! hpDoc.userLang==="en"){phpDoc.staleFileGrid.store.reload();phpDoc.erro rFileGrid.store.reload();phpDoc.storeFilesNeedReviewed.reload()}phpDoc.pendingCommitGrid.store.remove(this.storeRecord);phpDoc.pendingCommitGrid.store.fireEvent("add",phpDoc.pendingCommitGrid.store);phpDoc.notInENGrid.store.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);phpDoc.storeFilesNeedReviewed.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);phpDoc.staleFileGrid.store.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);phpDoc.errorFileGrid.store.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);var d=phpDoc.treeAllFiles.getNodeById("//"+this.fpath+this.fname);if(d){d.getUI().removeClass("modified")}Ext.getBody().unmask()},failure:function(c){Ext.getBody().unmask();phpDoc.winFo! rbidden()}})}},this)}};Ext.namespace("ui","ui.task");ui.task.MarkDeleteTask=function(a){Ext.apply(this,a);this.run=function(){Ext.MessageBox.confirm(_("Confirm"),_("This action will mark this file as need deleted.<br/><br/>You need commit this change to take it effect.<br/><br/>Please, confirm this action."),function(b){if(b==="yes"){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"markAsNeedDelete",FilePath:this.fpath,FileName:this.fname},success:function(c){var d=Ext.util.JSON.decode(c.responseText);Ext.getBody().unmask();phpDoc.addToPendingCommit(d.id,phpDoc.userLang+this.fpath,this.fname,"delete");this.storeRecord.set("needcommit",true)}})}},this)}};Ext.namespace("ui","ui.task");ui.task.PingTask=function(){this.task=new Ext.util.DelayedTask(function(){XHR({url:"./php/controller.php",params:{task:"ping"},success:function(a){var c=Ext.util.JSON.decode(a! .responseText);if(c.ping!=="pong"){window.location.href="./"}else{if(c ..lastupdate==="in_progress"){Ext.getDom("lastUpdateTime").innerHTML=_("update in progress...")}else{var b=Date.parseDate(c.lastupdate,"Y-m-d H:i:s");Ext.getDom("lastUpdateTime").innerHTML=b.format(_("Y-m-d, H:i"))}}},failure:function(){window.location.href="./"}});this.task.delay(30000)},this);this.delay=function(b,d,c,a){this.task.delay(b,d,c,a)};this.cancel=function(){this.task.cancel()}};Ext.namespace("ui","ui.task");ui.task.RejectPatchTask=function(a){Ext.apply(this,a);this.run=function(){if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}Ext.MessageBox.confirm(_("Confirm"),_("This action will <b>reject</b> this patch, send an email to his author and close this tab."),function(b){if(b==="yes"){var c=Ext.MessageBox.wait(_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"afterPatchReject",PatchUniqID:this.fuid},success:function(d){phpDoc.pendingPatchGrid.store.remove(this.storeRecord);phpDoc.pendingPatchGrid.store.fireEvent("add",phpD! oc.pendingPatchGrid.store);Ext.getCmp("main-panel").remove("PP-"+this.fid);c.hide()},failure:function(d){c.hide();phpDoc.winForbidden()}})}},this)}};Ext.namespace("ui","ui.task");ui.task.SaveENFileTask=function(a){Ext.apply(this,a);this.run=function(){var b=this.prefix+"-"+this.ftype,c=Ext.MessageBox.wait(_("Saving data..."));if(phpDoc.userLogin==="cvsread"){c.hide();phpDoc.winForbidden();return}XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:"en",fileContent:Ext.getCmp(this.prefix+"-"+this.ftype+"-FILE-"+this.fid).getCode()},success:function(d){var e=Ext.util.JSON.decode(d.responseText);if(this.prefix==="FNU"){this.storeRecord.set("en_revision","1."+e.en_revision);this.storeRecord.set("needcommit",true)}if(this.prefix==="FE"){this.storeRecord.set("needcommit",true)}if(this.prefix==="FNR"){this.storeRecord.set("needcommit",true)}if(this.prefix==="AF"){this.storeRecord.getUI().addClass("modified")}phpDoc.add! ToPendingCommit(e.id,"en"+this.fpath,this.fname,"update");Ext.getCmp(b +"-PANEL-btn-save-"+this.fid).disable();Ext.getCmp(b+"-FILE-"+this.fid).isModified=false;Ext.getCmp(b+"-PANEL-"+this.fid).setTitle(Ext.getCmp(b+"-PANEL-"+this.fid).originTitle);if(this.ftype==="ALL"||!Ext.getCmp(this.prefix+"-LANG-FILE-"+this.fid).isModified){Ext.getCmp(this.prefix+"-"+this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle)}c.hide()},failure:function(d){c.hide();phpDoc.winForbidden()}})}};Ext.namespace("ui","ui.task");ui.task.SaveLangFileTask=function(a){Ext.apply(this,a);this.run=function(){var b=this.prefix+"-"+this.ftype,c=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:this.lang,fileContent:Ext.getCmp(this.prefix+"-"+this.ftype+"-FILE-"+this.fid).getCode()},success:function(d){var e=Ext.util.JSON.decode(d.responseText);if(this.prefix==="FE"){this.storeRecord.set("needcommit",true);this.storeRecord.set("maintainer",e.maintainer);this.s! toreRecord.commit()}if(this.prefix==="FNU"){this.storeRecord.set("revision","1."+e.new_revision);this.storeRecord.set("needcommit",true);this.storeRecord.set("maintainer",e.maintainer);this.storeRecord.commit()}if(this.prefix==="FNR"){this.storeRecord.set("needcommit",true);this.storeRecord.set("maintainer",e.maintainer);this.storeRecord.set("reviewed",e.reviewed);this.storeRecord.commit()}if(this.prefix==="AF"){this.storeRecord.getUI().addClass("modified")}phpDoc.addToPendingCommit(e.id,this.lang+this.fpath,this.fname,"update");Ext.getCmp(b+"-PANEL-btn-save-"+this.fid).disable();Ext.getCmp(b+"-FILE-"+this.fid).isModified=false;Ext.getCmp(b+"-PANEL-"+this.fid).setTitle(Ext.getCmp(b+"-PANEL-"+this.fid).originTitle);if(this.ftype==="ALL"||!Ext.getCmp(this.prefix+"-EN-FILE-"+this.fid).isModified){Ext.getCmp(this.prefix+"-"+this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle)}c.hide()},failure:function(d){c.hide();phpDoc.winForbidden()}})}};Ext.namespace("ui","u! i.component");ui.component.About=Ext.extend(Ext.Window,{id:"win-about" ,iconCls:"iconHelp",layout:"fit",width:515,height:320,modal:true,plain:true,bodyStyle:"color:#000",buttons:[{text:_("Close"),handler:function(){Ext.getCmp("win-about").close()}}],initComponent:function(){Ext.apply(this,{title:String.format(_("About {0}"),phpDoc.appName),items:{xtype:"tabpanel",activeTab:0,autoTabs:true,border:false,defaults:{autoScroll:true},items:[{title:_("About"),html:'<div id="phd-oe-about"><img src="themes/img/logo.png" alt="'+phpDoc.appName+'" /></div><div id="phd-oe-about-info">'+phpDoc.appName+" ver "+phpDoc.appVer+"<br/>UI: "+phpDoc.uiRevision+"<br/> Copyright © 2008-2009 The PHP Group<br/>"+_("Author:")+' <a href="mailto:yannick@php.net">Yannick Torrès</a> '+_('and <a href="http://cvs.php.net/viewvc.cgi/doc-editor/" target="_blank">others</a>')+"</div>"},{title:_("Credits"),bodyStyle:"padding:15px",html:'<div id="phd-oe-credit"><ul><li><a href="http://extjs.com" target="_blank">ExtJs Team</a><div class="phd-oe-credit-info">'+_("Javascri! pt FrameWork")+'</div></li><li><a href="http://marijn.haverbeke.nl/codemirror/" target="_blank">CodeMirror</a><div class="phd-oe-credit-info">'+_("Code editor")+'</div></li><li><a href="http://famfamfam.com" target="_blank">famfamfam.com</a><div class="phd-oe-credit-info">'+_("Icon pack")+"</div></li></ul></div>"},{title:_("License"),autoLoad:{url:"./LICENSE"}}]}});ui.component.About.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._BugsGrid");ui.component._BugsGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getOpenBugs"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"title",mapping:"title"},{name:"link",mapping:"link"},{name:"description",mapping:"description"}]))});ui.component._BugsGrid.columns=[{id:"GridBugTitle",header:"Title",sortable:true,dataIndex:"title"}];ui.component._BugsGrid.view! =new Ext.grid.GridView({forceFit:true,emptyText:_("No open Bugs"),enab leRowBody:true,getRowClass:function(a,d,c,b){c.body='<p class="bug-desc">'+a.data.description+"</p>";return"x-grid3-row-expanded"}});ui.component.BugsGrid=Ext.extend(Ext.grid.GridPanel,{iconCls:"iconBugs",loadMask:true,stripeRows:true,autoHeight:true,width:800,autoExpandColumn:"GridBugTitle",store:ui.component._BugsGrid.store,columns:ui.component._BugsGrid.columns,view:ui.component._BugsGrid.view,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),listeners:{render:function(a){a.store.load.defer(20,a.store)},rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c);new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+_("Open in a new Tab")+"</b>",iconCls:"openInTab",handler:function(){var d=a.store.getAt(c).data.id,e=a.store.getAt(c).data.link,f=a.store.getAt(c).data.title;phpDoc.NewTabBugs(d,e,f)}},"-",{text:_("Refresh this grid"),iconCls:"refresh",handler:function(){a.store.reload()}}]}).showAt(b.getXY())},rowdblclick:function(c,g,f){var a=c.store.getAt(g).data.id! ,b=c.store.getAt(g).data.link,d=c.store.getAt(g).data.title;phpDoc.NewTabBugs(a,b,d)}},initComponent:function(){Ext.apply(this,{title:String.format(_("Open bugs for {0}"),"doc-"+phpDoc.userLang),tbar:[{tooltip:_("Refresh this grid"),iconCls:"refresh",handler:function(){ui.component.BugsGrid.reload()}}]});ui.component.BugsGrid.superclass.initComponent.call(this)}});ui.component.BugsGrid.reload=function(){ui.component._BugsGrid.store.reload()};Ext.namespace("ui","ui.component","ui.component._BuildStatus");ui.component._BuildStatus.ds=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getBuildStatusData"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"lang",mapping:"lang"},{name:"date",mapping:"date",type:"date",dateFormat:"Y-m-d H:i:s"},{name:"status",mapping:"status",type:"int"}]))});ui.component._BuildStatus.ds.setDefaultSort("date","desc");ui! .component._BuildStatus.rendererLanguage=function(a){return'<div class ="flag flag-'+a+'">'+a+"</div>"};ui.component._BuildStatus.rendererStatus=function(a){if(a===0){return"Nok"}else{return"Ok"}};ui.component._BuildStatus.columns=[{id:"date",header:_("Date"),sortable:true,dataIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))},{header:_("Language"),width:45,sortable:true,dataIndex:"lang",renderer:ui.component._BuildStatus.rendererLanguage},{header:_("Status"),width:45,sortable:true,dataIndex:"status",renderer:ui.component._BuildStatus.rendererStatus}];ui.component.BuildStatus=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"date",store:ui.component._BuildStatus.ds,columns:ui.component._BuildStatus.columns,view:new Ext.grid.GridView({forceFit:true,getRowClass:function(a,d,c,b){if(a.data.status===0){return"summary_3"}}}),listeners:{scope:this,render:function(a){a.store.load.defer(20,a.store)}}});Ext.namespace("ui","ui.component","ui.component._CheckDoc");ui.component._CheckDoc.ds=new Ext.data.Store! ({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getCheckDocData"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"extension",mapping:"extension"},{name:"check_oldstyle",mapping:"check_oldstyle",type:"int"},{name:"check_undoc",mapping:"check_undoc",type:"int"},{name:"check_roleerror",mapping:"check_roleerror",type:"int"},{name:"check_badorder",mapping:"check_badorder",type:"int"},{name:"check_noseealso",mapping:"check_noseealso",type:"int"},{name:"check_noreturnvalues",mapping:"check_noreturnvalues",type:"int"},{name:"check_noparameters",mapping:"check_noparameters",type:"int"},{name:"check_noexamples",mapping:"check_noexamples",type:"int"},{name:"check_noerrors",mapping:"check_noerrors",type:"int"}]))});ui.component._CheckDoc.ds.setDefaultSort("extension","asc");ui.component._CheckDoc.renderer=function(b,a){if(b>0){a.css="check_do! c_cell";return b}else{return}};ui.component._CheckDoc.columns=[new Ext ..grid.RowNumberer(),{id:"extension",header:"Extension",sortable:true,dataIndex:"extension"},{header:"Not documented",width:45,sortable:true,dataIndex:"check_undoc",renderer:ui.component._CheckDoc.renderer},{header:"Old style",width:45,sortable:true,dataIndex:"check_oldstyle",renderer:ui.component._CheckDoc.renderer},{header:"Bad refsect1 order",width:45,sortable:true,dataIndex:"check_badorder",renderer:ui.component._CheckDoc.renderer},{header:"No parameters",width:45,sortable:true,dataIndex:"check_noparameters",renderer:ui.component._CheckDoc.renderer},{header:"No return values",width:45,sortable:true,dataIndex:"check_noreturnvalues",renderer:ui.component._CheckDoc.renderer},{header:"No examples",width:45,sortable:true,dataIndex:"check_noexamples",renderer:ui.component._CheckDoc.renderer},{header:"No errors section",width:45,sortable:true,dataIndex:"check_noerrors",renderer:ui.component._CheckDoc.renderer},{header:"No see also",width:45,sortable:true,dataIndex:"check_noseeal! so",renderer:ui.component._CheckDoc.renderer},{header:"Refsect1 role error",width:45,sortable:true,dataIndex:"check_roleerror",renderer:ui.component._CheckDoc.renderer}];ui.component._CheckDoc.fs=new Ext.data.SimpleStore({fields:[{name:"id"},{name:"file"}]});ui.component._CheckDoc.FileGrid=Ext.extend(Ext.grid.GridPanel,{id:"check-doc-file-grid",store:ui.component._CheckDoc.fs,loadMask:true,bodyBorder:false,autoExpandColumn:"file",sm:new Ext.grid.RowSelectionModel({listeners:{rowselect:function(c,b,a){Ext.getCmp("check-doc-btn-open-selected-files").enable()}}}),columns:[new Ext.grid.RowNumberer(),{id:"file",header:"Files",sortable:true,dataIndex:"file"}],listeners:{rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c)},rowdblclick:function(a,c,b){phpDoc.openFile("en"+a.fpath,a.store.getAt(c).data.file);Ext.getCmp("check-doc-file-win").close()}}});ui.component._CheckDoc.FileWin=Ext.extend(Ext.Window,{id:"check-doc-file-win",title:_("Files"),width:450,height:350,la! belWidth:50,resizable:false,modal:true,autoScroll:true,layout:"fit",bu ttons:[{text:"Open all files",handler:function(){var c=Ext.getCmp("check-doc-file-win"),a=ui.component._CheckDoc.fs;phpDoc.filePendingOpen=[];for(var b=0;b<a.getCount();++b){phpDoc.filePendingOpen[b]=["en"+c.fpath,a.getAt(b).data.file]}phpDoc.openFile(phpDoc.filePendingOpen[0][0],phpDoc.filePendingOpen[0][1]);c.close()}},{text:"Open selected files",id:"check-doc-btn-open-selected-files",disabled:true,handler:function(){var c=Ext.getCmp("check-doc-file-win"),b=Ext.getCmp("check-doc-file-grid").getSelectionModel().getSelections();phpDoc.filePendingOpen=[];for(var a=0;a<b.length;++a){phpDoc.filePendingOpen[a]=["en"+c.fpath,b[a].data.file]}phpDoc.openFile(phpDoc.filePendingOpen[0][0],phpDoc.filePendingOpen[0][1]);c.close()}}]});ui.component.CheckDoc=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,store:ui.component._CheckDoc.ds,columns:ui.component._CheckDoc.columns,autoExpandColumn:"extension",sm:new Ext.grid.CellSelectionModel({singleSelect:true}),view:new Ext.gr! id.GridView({forceFit:true}),listeners:{render:function(a){a.store.load.defer(20,a.store)},celldblclick:function(c,i,d,h){var a=c.getStore().getAt(i),g=c.getColumnModel().getDataIndex(d),f=a.get(g),b=a.data.path;if(Ext.num(f,false)&&f!=0){XHR({url:"./php/controller.php",params:{task:"getCheckDocFiles",path:b,errorType:g},success:function(e){var k=Ext.decode(e.responseText);ui.component._CheckDoc.fs.removeAll();for(var j=0;j<k.files.length;++j){ui.component._CheckDoc.fs.insert(0,new ui.component._CheckDoc.fs.recordType({id:j,file:k.files[j].name}))}ui.component._CheckDoc.fs.sort("file","asc");new ui.component._CheckDoc.FileWin({fpath:b,items:[new ui.component._CheckDoc.FileGrid({fpath:b})]}).show()}})}}}});Ext.namespace("ui","ui.component","ui.component._CVSLogGrid");ui.component._CVSLogGrid.store=Ext.extend(Ext.data.Store,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"revision",mapping:"! revision"},{name:"date",mapping:"date",type:"date",dateFormat:"Y/m/d H :i:s"},{name:"author",mapping:"author"},{name:"content",mapping:"content"}]))});ui.component._CVSLogGrid.sm=Ext.extend(Ext.grid.CheckboxSelectionModel,{singleSelect:false,header:"",width:22,listeners:{beforerowselect:function(b){var a=b.getCount();if(a===2){return false}},rowselect:function(b){var a=b.getCount();if(a===2){Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).enable();Ext.get(b.prefix+"-PANEL-btn-log-"+b.fid).frame("3F8538")}else{Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).disable()}},rowdeselect:function(b){var a=b.getCount();if(a===2){Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).enable();Ext.get(b.prefix+"-PANEL-btn-log-"+b.fid).frame("3F8538")}else{Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).disable()}}}});ui.component._CVSLogGrid.columns=[{id:"id",header:"Rev.",width:40,sortable:false,dataIndex:"revision"},{header:"Content",width:130,sortable:true,dataIndex:"content"},{header:"By",width:50,sortable:true,dataIndex:"author"},{header:"Date",width:85,sortable:true,d! ataIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))}];ui.component.CVSLogGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,autoScroll:true,bodyBorder:false,autoExpandColumn:"content",initComponent:function(){var d=new ui.component._CVSLogGrid.sm({fid:this.fid,prefix:this.prefix}),a=new ui.component._CVSLogGrid.store({autoLoad:this.loadStore,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:this.fpath,File:this.fname}}),c=[];c.push(d);for(var b=0;b<ui.component._CVSLogGrid.columns.length;++b){c.push(ui.component._CVSLogGrid.columns[b])}a.setDefaultSort("date","desc");Ext.apply(this,{sm:d,store:a,columns:c,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,id:this.prefix+"-PANEL-btn-log-"+this.fid,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",disabled:true,handler:function(){var g=this.getSelectionModel().getSelections(),f=g[0].data.revision,e=g[1].data.revision;phpDoc.winDiff(this.fpath,this.fname,! f,e)}},{scope:this,id:this.prefix+"-PANEL-btn-refreshlog-"+this.fid,to oltip:"<b>Load/Refresh</b> revisions",iconCls:"refresh",handler:function(){this.store.reload()}}]});ui.component.CVSLogGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._EditorConf");ui.component._EditorConf.tplMenu=new Ext.XTemplate('<tpl for=".">','<div class="thumb-wrap" id="tplMenu-{id}">','<div class="thumb"><img src="themes/img/{img}" title=""></div>',"<span>{label}</span>","</div>","</tpl>");ui.component._EditorConf.tplMenu.compile();ui.component._EditorConf.menuDefEn=[["1","go-home.png",_("Main")],["5","view-list-tree.png",_('Module "All files"')],["6","view-media-playlist.png",_('Module "Pending Patch"')]];ui.component._EditorConf.menuDefNonEn=[["1","go-home.png",_("Main")],["2","edit-redo.png",_('Module "Files Need Update"')],["3","dialog-cancel.png",_('Module "Files with Error"')],["4","document-properties.png",_('Module "Files need Reviewed"')],["5","view-list-tree.png",_('Module "All files"')],["6","view-media-playlist.p! ng",_('Module "Pending Patch"')]];ui.component._EditorConf.menuStore=new Ext.data.SimpleStore({id:0,fields:[{name:"id"},{name:"img"},{name:"label"}]});ui.component._EditorConf.viewMenu=Ext.extend(Ext.DataView,{id:"conf-menu-view",tpl:ui.component._EditorConf.tplMenu,singleSelect:true,overClass:"x-view-over",itemSelector:"div.thumb-wrap",store:ui.component._EditorConf.menuStore,listeners:{selectionchange:function(b,a){var c=b.getSelectedRecords();Ext.getCmp("confCard").layout.setActiveItem("conf-card-"+c[0].data.id)}}});ui.component._EditorConf.themeStore=new Ext.data.SimpleStore({fields:["themeFile",{name:"themeName",type:"string"}],data:[["themes/black/css/xtheme-black.css",_("Black")],["themes/empty.css",_("Default")],["themes/darkgray/css/xtheme-darkgray.css",_("DarkGray")],["js/extjs/resources/css/xtheme-gray.css",_("Gray")],["themes/gray-extend/css/xtheme-gray-extend.css",_("Gray Extend")],["themes/indigo/css/xtheme-indigo.css",_("Indigo")],["themes/midnight/css/xtheme! -midnight.css",_("Midnight")],["themes/olive/css/xtheme-olive.css",_(" Olive")],["themes/purple/css/xtheme-purple.css",_("Purple")],["js/extjs/resources/css/xtheme-slate.css",_("Slate")],["themes/silverCherry/css/xtheme-silverCherry.css",_("SilverCherry")]]});ui.component._EditorConf.card1=Ext.extend(Ext.form.FormPanel,{id:"conf-card-1",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Themes"),autoHeight:true,defaults:{hideLabel:true},items:[{xtype:"combo",id:"conf-combo-theme",valueField:"themeFile",displayField:"themeName",triggerAction:"all",mode:"local",forceSelection:true,editable:false,value:phpDoc.userConf.conf_theme,store:ui.component._EditorConf.themeStore,listeners:{render:function(){Ext.getCmp("conf-combo-theme").store.sort("themeName")},select:function(e,a,b){var d=e.getValue();Ext.get("appTheme").dom.href=d;phpDoc.confUpdate("conf_theme",d)}}}]}]});ui.component._EditorConf.card1.superclass.initComponent.call(this)}});ui.component._EditorConf.card2=Ext.extend(Ext.form.FormPanel,{i! d:"conf-card-2",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Diff view"),autoHeight:true,defaults:{hideLabel:true},defaultType:"radio",items:[{name:"conf_needupdate_diff",checked:(phpDoc.userConf.conf_needupdate_diff==="using-viewvc")?true:false,boxLabel:_("Using ViewVc from php web site"),inputValue:"using-viewvc",listeners:{check:function(a){if(a.checked){phpDoc.confUpdate("conf_needupdate_diff",a.getRawValue())}}}},{name:"conf_needupdate_diff",checked:(phpDoc.userConf.conf_needupdate_diff==="using-exec")?true:false,boxLabel:_("Using diff -kk -u command line"),inputValue:"using-exec",listeners:{check:function(a){if(a.checked){phpDoc.confUpdate("conf_needupdate_diff",a.getRawValue())}}}}]},{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_needupdate_scrollbars",checked:(phpDoc.userConf.conf_needupdate_scrollbars==="true")?true:false,boxLabel:_("Syn! chronize scroll bars"),listeners:{check:function(a){phpDoc.confUpdate( "conf_needupdate_scrollbars",a.getValue())}}},{name:"conf_needupdate_displaylog",checked:(phpDoc.userConf.conf_needupdate_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_needupdate_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card2.superclass.initComponent.call(this)}});ui.component._EditorConf.card3=Ext.extend(Ext.form.FormPanel,{id:"conf-card-3",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Error type"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_error_skipnbliteraltag",checked:(phpDoc.userConf.conf_error_skipnbliteraltag==="true")?true:false,boxLabel:_("Skip nbLiteralTag error"),listeners:{check:function(a){phpDoc.confUpdate("conf_error_skipnbliteraltag",a.getValue())}}}]},{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"! checkbox",items:[{name:"conf_error_scrollbars",checked:(phpDoc.userConf.conf_error_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){phpDoc.confUpdate("conf_error_scrollbars",a.getValue())}}},{name:"conf_error_displaylog",checked:(phpDoc.userConf.conf_error_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_error_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card3.superclass.initComponent.call(this)}});ui.component._EditorConf.card4=Ext.extend(Ext.form.FormPanel,{id:"conf-card-4",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_reviewed_scrollbars",checked:(phpDoc.userConf.conf_reviewed_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check! :function(a){phpDoc.confUpdate("conf_reviewed_scrollbars",a.getValue() )}}},{name:"conf_reviewed_displaylog",checked:(phpDoc.userConf.conf_reviewed_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_reviewed_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card4.superclass.initComponent.call(this)}});ui.component._EditorConf.card5=Ext.extend(Ext.form.FormPanel,{id:"conf-card-5",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_allfiles_displaylog",checked:(phpDoc.userConf.conf_allfiles_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_allfiles_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card5.superclass.initComponent.call(this)}});ui.component._EditorConf.card6=Ext.extend(Ext.form! .FormPanel,{id:"conf-card-6",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_patch_scrollbars",checked:(phpDoc.userConf.conf_patch_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){phpDoc.confUpdate("conf_patch_scrollbars",a.getValue())}}},{name:"conf_patch_displaylog",checked:(phpDoc.userConf.conf_patch_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_patch_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card6.superclass.initComponent.call(this)}});ui.component.EditorConf=Ext.extend(Ext.Window,{id:"win-conf",layout:"border",width:550,height:400,iconCls:"iconConf",title:_("Configuration"),modal:true,plain:true,buttons:[{text:_("Close"),handler:function(){Ext.getCmp("win-! conf").close()}}],listeners:{show:function(){var a=Ext.getCmp("conf-me nu-view");a.select(a.getNode(0))}},initComponent:function(){if(phpDoc.userLang==="en"){ui.component._EditorConf.menuStore.loadData(ui.component._EditorConf.menuDefEn)}else{ui.component._EditorConf.menuStore.loadData(ui.component._EditorConf.menuDefNonEn)}Ext.apply(this,{items:[{id:"confMenu",region:"west",width:190,autoScroll:true,items:[new ui.component._EditorConf.viewMenu()]},{id:"confCard",region:"center",layout:"slide",width:375,frame:true,activeItem:0,bbar:new Ext.StatusBar({defaultText:_("All changes take effect immediately"),defaultIconCls:"confStatusBar"}),items:[new ui.component._EditorConf.card1(),new ui.component._EditorConf.card2(),new ui.component._EditorConf.card3(),new ui.component._EditorConf.card4(),new ui.component._EditorConf.card5(),new ui.component._EditorConf.card6()]}]});ui.component.EditorConf.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._ErrorFileGrid");ui.component._ErrorFileGrid.store=Ext.extend(Ext.data.G! roupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"maintainer",mapping:"maintainer"},{name:"type",mapping:"type"},{name:"value_en",mapping:"value_en"},{name:"value_lang",mapping:"value_lang"},{name:"needcommit",mapping:"needcommit"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-error-nb").innerHTML=a.getCount()}}});ui.component._ErrorFileGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Type"),width:45,sortable:true,dataIndex:"type"},{header:_("Maintainer"),width:45,sortable:true,dataIndex:"maintainer"},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._ErrorFileGrid.view=new Ext.grid.GroupingView({emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>",forceFit:true,groupTextTpl:'{[values.rs[0].d! ata["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Fil es")+'" : "'+_("File")+'"]})',getRowClass:function(a,d,c,b){if(a.data.needcommit){return"file-need-commit"}}});ui.component._ErrorFileGrid.menu=function(a){Ext.apply(this,a);this.init();ui.component._ErrorFileGrid.menu.superclass.constructor.call(this)};Ext.extend(ui.component._ErrorFileGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"FilesError",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},{scope:this,hidden:this.hideCommit,text:("View Diff"),iconCls:"iconViewDiff",handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext.get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" styl! e="vertical-align: middle;" />'+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:this.lang+this.fpath,FileName:this.fname},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}},"-",{text:_("About error type"),iconCls:"iconHelp",handler:function(){if(!Ext.getCmp("main-panel").findById("FE-help")){Ext.getCmp("main-panel").add({id:"FE-help",title:_("About error type"),iconCls:"iconHelp",closable:true,autoScroll:true,autoLoad:"./error_type.php"});Ext.getCmp("main-panel").setActiveTab("FE-help")}else{Ext.getCmp("main-panel").setActiveTab("FE-help")}}}]})}});ui.component.ErrorFileGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",view:ui.component._ErrorFileGrid.view,columns:ui.component._ErrorFileGrid.columns,listeners:{render:function(a){a.view.refresh()},rowcontextmenu:func! tion(b,f,d){var c=b.store.getAt(f).data.path,a=b.store.getAt(f).data.n ame;b.getSelectionModel().selectRow(f);new ui.component._ErrorFileGrid.menu({hideCommit:(b.store.getAt(f).data.needcommit===false),grid:b,event:d,rowIdx:f,lang:phpDoc.userLang,fpath:c,fname:a}).showAt(d.getXY())},rowdblclick:function(c,i,h){var f=c.store.getAt(i),d=f.data.path,a=f.data.name,g=Ext.util.md5("FE-"+phpDoc.userLang+d+a),b=[];if(!Ext.getCmp("main-panel").findById("FE-"+g)){b=[];c.store.each(function(e){if(e.data.path===d&&e.data.name===a&&!b[e.data.type]){b.push(e.data.type)}});Ext.getCmp("main-panel").add({id:"FE-"+g,title:a,layout:"border",iconCls:"iconTabError",closable:true,originTitle:a,defaults:{split:true},tabTip:String.format(_("File with error : in {0}"),d),items:[{xtype:"panel",id:"FE-error-desc-"+g,region:"north",layout:"fit",title:_("Error description"),height:150,collapsible:true,collapsed:true,items:{xtype:"iframepanel",id:"FE-error-type-"+g,loadMask:true,defaultSrc:"./error_type.php?dir="+d+"&file="+a}},{region:"west",xtype:"panel",title:_("CvsLog")! ,collapsible:true,collapsed:true,layout:"fit",bodyBorder:false,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[new ui.component.CVSLogGrid({layout:"fit",title:phpDoc.userLang,prefix:"FE-LANG",fid:g,fpath:phpDoc.userLang+d,fname:a,loadStore:(phpDoc.userConf.conf_error_displaylog==="true")}),new ui.component.CVSLogGrid({layout:"fit",title:"en",prefix:"FE-EN",fid:g,fpath:"en"+d,fname:a,loadStore:(phpDoc.userConf.conf_error_displaylog==="true")})]}},new ui.component.FilePanel({id:"FE-LANG-PANEL-"+g,region:"center",title:String.format(_("{0} File: "),phpDoc.userLang)+d+a,prefix:"FE",ftype:"LANG",fid:g,fpath:d,fname:a,lang:phpDoc.userLang,parser:"xml",storeRecord:f,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_error_scrollbars"}),new ui.component.FilePanel({id:"FE-EN-PANEL-"+g,region:"east",width:575,title:_("en File: ")+d+a,prefix:"FE",ftype:"EN",fid:g,fpath:d,fname:a,lang:"en",parser:"xml",storeRecord:f,syncScroll:tr! ue,syncScrollConf:"conf_error_scrollbars"})]});Ext.getCmp("main-panel" ).setActiveTab("FE-"+g);if(Ext.getCmp("FE-"+g).getLayout().north.collapsedEl){Ext.getCmp("FE-"+g).getLayout().north.collapsedEl.addClass("x-layout-collapsed-east-error-desc")}}else{Ext.getCmp("main-panel").setActiveTab("FE-"+g)}}},initComponent:function(){Ext.apply(this,{store:new ui.component._ErrorFileGrid.store({autoLoad:(phpDoc.userLang!=="en"),proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesError"}}),tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FE-filter",width:180,hideTrigger1:true,enableKeyEvents:true,validateOnBlur:false,validationEvent:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();phpDoc.errorFileGrid.store.clearFilter()},onTrigger2Click:function(){var a=this.getValue();if(a==""||a.length<3){this.markInvalid(_("Your filter must con! tain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();phpDoc.errorFileGrid.store.filter("maintainer",a)}})]});ui.component.ErrorFileGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component");ui.component.ExecDiff=Ext.extend(Ext.Panel,{layout:"fit",title:_("Diff From cvs"),height:150,autoScroll:true,collapsed:true,listeners:{render:function(){XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff2",FilePath:"en"+this.fpath,FileName:this.fname,Rev1:this.rev1,Rev2:this.rev2},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get(this.prefix+"-diff-"+this.fid).dom.innerHTML=b.content}})}},initComponent:function(){Ext.apply(this,{html:'<div id="'+this.prefix+"-diff-"+this.fid+'" class="diff-content"></div>',});ui.component.ExecDiff.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component");ui.component.FilePanel=Ext.extend(Ext.form.FormPanel,{activeScroll:false,initComponent:function(){var a=! this.prefix+"-"+this.ftype;this.bbar=(this.syncScrollCB)?[{xtype:"chec kbox",name:"conf_needupdate_scrollbars",hideLabel:true,checked:(phpDoc.userConf[this.syncScrollConf]==="true"),boxLabel:_("Synchronize scroll bars"),listeners:{scope:this,check:function(b){phpDoc.confUpdate(this.syncScrollConf,b.getValue())},render:function(b){Ext.DomHelper.insertHtml("beforeBegin",b.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="'+a+"-status-line-"+this.fid+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="'+a+"-status-col-"+this.fid+'">-</span></span></div> ')}}}]:[{xtype:"panel",height:21,baseCls:"",bodyStyle:"padding-top:5px;",html:'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="'+a+"-status-line-"+this.fid+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="'+a+"-status-col-"+this.fid+'">-</span></span></div> '}];if(!this.readOnl! y){this.tbar=(this.isPatch)?[{id:a+"-PANEL-btn-save-"+this.fid,scope:this,tooltip:_("<b>Accept</b> this patch and <b>Save</b> the file"),iconCls:"saveFile",handler:function(){new ui.task.AcceptPatchTask({fid:this.fid,fpath:this.fpath,fname:this.fname,fuid:this.fuid,storeRecord:this.storeRecord}).run()}},{id:a+"-PANEL-btn-reject-"+this.fid,scope:this,tooltip:_("<b>Reject</b> this patch"),iconCls:"iconPageDelete",handler:function(){new ui.task.RejectPatchTask({fid:this.fid,fuid:this.fuid,storeRecord:this.storeRecord}).run()}},"-",{scope:this,tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp(a+"-FILE-"+this.fid).reIndentAll()}}]:[{id:a+"-PANEL-btn-save-"+this.fid,scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",disabled:true,handler:function(){if(this.lang==="en"){new ui.task.SaveENFileTask({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:this.fpath,fname:this.fname,storeRecord:this.storeRecord}).run()}else{ph! pDoc.saveLangFile(this.prefix,this.ftype,this.fid,this.fpath,this.fnam e,this.lang,this.storeRecord,(this.prefix==="AF"))}}},{id:a+"-PANEL-btn-saveas-"+this.fid,scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",disabled:true,handler:function(){new ui.component.PatchPrompt({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:this.fpath,fname:this.fname,lang:this.lang,defaultEmail:(phpDoc.userLogin!=="cvsread")?phpDoc.userLogin+"@php.net":""}).show()}},"-",{scope:this,tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp(a+"-FILE-"+this.fid).reIndentAll()}},(this.lang==="en")?phpDoc.menuMarkupEN(a+"-FILE-"+this.fid):phpDoc.menuMarkupLANG(a+"-FILE-"+this.fid,phpDoc)]}else{this.tbar=[{}]}Ext.apply(this,{originTitle:this.title,items:[{xtype:"codemirror",id:a+"-FILE-"+this.fid,readOnly:this.readOnly,parser:this.parser,isModified:false,listeners:{scope:this,initialize:function(){if(this.isPatch){phpDoc.getFile(this.fid,this.fpath,this.fname+"."+this.fuid+".patch",a+"-PANEL-",a+"-FILE-")}els! e{phpDoc.getFile(this.fid,this.lang+this.fpath,this.fname,a+"-PANEL-",a+"-FILE-")}},cmchange:function(e,c,d){if(e===116){return}var b=Ext.util.JSON.decode(Ext.getCmp(a+"-FILE-"+this.fid).getCursorPosition());Ext.get(a+"-status-line-"+this.fid).dom.innerHTML=b.line;Ext.get(a+"-status-col-"+this.fid).dom.innerHTML=b.caracter;if(e!==27&&e!==33&&e!==34&&e!==37&&e!==38&&e!==39&&e!==40&&e!==17&&e!==16&&e!==67){if(!Ext.getCmp(a+"-FILE-"+this.fid).isModified){Ext.getCmp(a+"-PANEL-"+this.fid).setTitle(Ext.getCmp(a+"-PANEL-"+this.fid).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp(this.prefix+"-"+this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp(a+"-PANEL-btn-save-"+this.fid).enable();Ext.get(a+"-PANEL-btn-save-"+this.fid).frame("3F8538");if(this.isPatch){Ext.getCmp(a+"-PANEL-btn-reject-"+this.fid).enable();Ext.get(a+"-PANEL-btn-reject-"+this.fid)! .frame("3F8538")}else{Ext.getCmp(a+"-PANEL-btn-saveas-"+this.fid).enab le();Ext.get(a+"-PANEL-btn-saveas-"+this.fid).frame("3F8538")}Ext.getCmp(a+"-FILE-"+this.fid).isModified=true}}},cmcursormove:function(){var b=Ext.util.JSON.decode(Ext.getCmp(a+"-FILE-"+this.fid).getCursorPosition());Ext.get(a+"-status-line-"+this.fid).dom.innerHTML=b.line;Ext.get(a+"-status-col-"+this.fid).dom.innerHTML=b.caracter},cmscroll:function(e){if(this.syncScroll&&phpDoc.userConf[this.syncScrollConf]==="true"){var c;switch(this.ftype){case"EN":c=this.prefix+"-LANG";break;case"LANG":c=this.prefix+"-EN";break;case"PATCH":c=this.prefix+"-ORIGIN";break;case"ORIGIN":c=this.prefix+"-PATCH";break}var d=Ext.getCmp(c+"-PANEL-"+this.fid),b=Ext.getCmp(c+"-FILE-"+this.fid);if(d.activeScroll===false){this.activeScroll=true;b.scrollTo(e)}else{d.activeScroll=false}}}}}]});ui.component.FilePanel.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._LocalMailGrid");ui.component._LocalMailGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({u! rl:"./php/controller.php"}),baseParams:{task:"getLastNews"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"title",mapping:"title"},{name:"link",mapping:"link"},{name:"description",mapping:"description"},{name:"pubDate",mapping:"pubDate",type:"date",dateFormat:"Y/m/d H:i:s"}]))});ui.component._LocalMailGrid.store.setDefaultSort("pubDate","desc");ui.component._LocalMailGrid.columns=[new Ext.grid.RowNumberer(),{id:"GridMailingTitle",header:_("Title"),sortable:true,dataIndex:"title"},{header:_("By"),width:110,sortable:true,dataIndex:"description"},{header:_("Date"),width:140,sortable:true,dataIndex:"pubDate",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))}];ui.component.LocalMailGrid=Ext.extend(Ext.grid.GridPanel,{iconCls:"home-mailing-title",height:400,width:800,loadMask:true,autoScroll:true,autoExpandColumn:"GridMailingTitle",store:ui.component._LocalMailGrid.store,columns:ui.compone! nt._LocalMailGrid.columns,sm:new Ext.grid.RowSelectionModel({singleSel ect:true}),listeners:{render:function(a){a.store.load.defer(20,a.store)},rowcontextmenu:function(b,g,d){var a=b.store.getAt(g).data.pubDate,f=b.store.getAt(g).data.link,c=b.store.getAt(g).data.title;b.getSelectionModel().selectRow(g);new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+_("Open in a new Tab")+"</b>",iconCls:"openInTab",handler:function(){phpDoc.NewTabMailing(a,f,c)}},"-",{text:_("Refresh this grid"),iconCls:"refresh",handler:function(){b.store.reload()}}]}).showAt(d.getXY())},rowdblclick:function(b,g,d){var a=b.store.getAt(g).data.pubDate,f=b.store.getAt(g).data.link,c=b.store.getAt(g).data.title;phpDoc.NewTabMailing(a,f,c)}},initComponent:function(){Ext.apply(this,{title:String.format(_("Mails from {0}"),"doc-"+phpDoc.userLang),tbar:[{tooltip:_("Refresh this grid"),iconCls:"refresh",handler:function(){ui.component.LocalMailGrid.reload()}}]});ui.component.LocalMailGrid.superclass.initComponent.call(this)}});ui.component.LocalMailGrid.reload=function(){ui.compon! ent._LocalMailGrid.store.reload()};Ext.namespace("ui","ui.component");ui.component.MainMenu=function(a){Ext.apply(this,a);this.init();ui.component.MainMenu.superclass.constructor.call(this)};Ext.extend(ui.component.MainMenu,Ext.menu.Menu,{id:"mainMenu",init:function(){Ext.apply(this,{items:[{text:_("Refresh all data"),disabled:(phpDoc.userLogin==="cvsread")?true:false,iconCls:"refresh",handler:phpDoc.WinUpdate},{text:_("Check Build"),disabled:(phpDoc.userLogin==="cvsread")?true:false,iconCls:"checkBuild",handler:phpDoc.WinCheckBuild},{text:_("EN tools"),handler:function(){return false},menu:new Ext.menu.Menu({items:[{text:_("Translation build status"),iconCls:"BuildStatus",handler:phpDoc.newTabBuildStatus},{text:_("Script Check doc"),iconCls:"CheckDoc",handler:phpDoc.newTabCheckDoc}]})},"-",{text:_("Configure"),iconCls:"iconConf",tooltip:"<b>Configure</b> this tool",id:"winconf-btn",handler:phpDoc.WinConf},"-",{text:_("Erase my personal data"),disabled:(phpDoc.userLogin==="! cvsread")?true:false,iconCls:"iconErasePersonalData",handler:function( ){Ext.MessageBox.confirm(_("Confirm"),_("This action will erase your personal data. All content about this account will be deleted definitively. Are you sure you want to do that ?"),function(a){if(a==="yes"){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"erasePersonalData"},success:function(b){Ext.getBody().unmask();Ext.MessageBox.show({title:_("Thanks !"),msg:_("Thank you for using this application !"),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.OK,fn:function(){window.location.href="./php/controller.php?task=logout"}})},failure:function(b){phpDoc.winForbidden()}})}})}},"-",{text:_("Log out"),iconCls:"iconLogOut",handler:function(){Ext.MessageBox.confirm(_("Confirm"),_("Are you sure you want to logout?"),function(a){if(a==="yes"){window.location.href="./php/controller.php?task=logout"}})}},"-",{id:"winabout-btn",text:_("About"),iconCls:"iconHelp",handler:funct! ion(){phpDoc.WinAbout()}}]})}});Ext.namespace("ui","ui.component","ui.component._NotInENGrid");ui.component._NotInENGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"needcommit",mapping:"needcommit"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-notInEn-nb").innerHTML=a.getCount()}}});ui.component._NotInENGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._NotInENGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>",getRowClass:function(a,d,c,b){if! (a.data.needcommit){return"file-need-commit"}}});ui.component._NotInEN Grid.menu=function(a){Ext.apply(this,a);this.init();ui.component._NotInENGrid.menu.superclass.constructor.call(this)};Ext.extend(ui.component._NotInENGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:_("Remove this file"),iconCls:"iconDelete",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}}]})}});ui.component.NotInENGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",view:ui.component._NotInENGrid.view,columns:ui.component._NotInENGrid.columns,listeners:{rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c);if(!a.store.getAt(c).data.needcommit){new ui.component._NotInENGrid.menu({grid:a,rowIdx:c,event:b}).showAt(b.getXY())}},rowdblclick:function(b,g,f){var d=b.store.getAt(g),c=d.data.path,a=d.data.name;new ui.task.MarkDeleteTask({fpath:c,fname:a,storeRecord:d}).run()}},initComponent:function(){Ext.apply(this,{store:new ui.component._NotInENGrid.store({aut! oLoad:(phpDoc.userLang==="en")?false:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNotInEn"}})});ui.component.NotInENGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component");ui.component.PatchPrompt=Ext.extend(Ext.Window,{title:_("Do you want to be alerted ?"),iconCls:"patchAlert",layout:"form",bodyStyle:"padding: 5px;",labelWidth:50,width:350,height:150,resizable:false,modal:true,autoScroll:true,initComponent:function(){Ext.apply(this,{items:[{xtype:"panel",baseCls:"x-plain",bodyStyle:"padding-bottom: 10px;",html:_("If you want to be notified when your patch will be dealt with, thank you to leave an email address below.")},{id:"patch-email-alert",xtype:"textfield",name:"patch-email-alert",fieldLabel:_("Email"),anchor:"100%",value:this.defaultEmail}],buttons:[{scope:this,text:_("Save"),handler:function(){var a=Ext.getCmp("patch-email-alert").getValue(),b=Ext.MessageBox.wait(_("Saving data as a patch..."));id_! prefix=this.prefix+"-"+this.ftype;Ext.getCmp(id_prefix+"-PANEL-btn-sav eas-"+this.fid).disable();Ext.getCmp(id_prefix+"-FILE-"+this.fid).isModified=false;Ext.getCmp(id_prefix+"-PANEL-"+this.fid).setTitle(Ext.getCmp(id_prefix+"-PANEL-"+this.fid).originTitle);if((this.prefix==="AF")||(this.lang==="en"&&Ext.getCmp(this.prefix+"-LANG-FILE-"+this.fid).isModified===false)||(this.lang!=="en"&&Ext.getCmp(this.prefix+"-EN-FILE-"+this.fid).isModified===false)){Ext.getCmp(this.prefix+"-"+this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle)}XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:this.lang,fileContent:Ext.getCmp(id_prefix+"-FILE-"+this.fid).getCode(),type:"patch",emailAlert:a},success:function(c){var d=Ext.util.JSON.decode(c.responseText);phpDoc.addToPendingPatch(this.lang+this.fpath,this.fname,d.uniqId);b.hide()}});this.close()}},{scope:this,text:_("Cancel"),handler:function(){this.close()}}]});ui.component.PatchPrompt.superclass.initComponent.call(this)}});Ext.nam! espace("ui","ui.component","ui.component._PendingCommitGrid");ui.component._PendingCommitGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"by",mapping:"by"},{name:"date",mapping:"date",type:"date",dateFormat:"Y-m-d H:i:s"},{name:"type",mapping:"type"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{add:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()},datachanged:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()}}});ui.component._PendingCommitGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Modified by"),width:45,sortable:true,dataIndex:"by"},{header:_("Date"),width:45,sortable:true,dataIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))},{header:_("Path"),dataIndex:"path",! hidden:true}];ui.component._PendingCommitGrid.view=new Ext.grid.Groupi ngView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',emptyText:'<div style="text-align: center;">'+_("No pending for Commit")+"</div>",getRowClass:function(a,d,c,b){if(a.data.type==="update"){return"file-needcommit-update"}if(a.data.type==="delete"){return"file-needcommit-delete"}if(a.data.type==="new"){return"file-needcommit-new"}}});Ext.namespace("ui.component._PendingCommitGrid.menu");ui.component._PendingCommitGrid.menu.common=function(a){Ext.apply(this,a);this.init();ui.component._PendingCommitGrid.menu.common.superclass.constructor.call(this)};Ext.extend(ui.component._PendingCommitGrid.menu.common,Ext.menu.Item,{init:function(){Ext.apply(this,{text:_("Commit..."),iconCls:"iconCommitFileCvs",disabled:(phpDoc.userLogin==="cvsread"),handler:function(){return false},menu:new Ext.menu.Menu({items:[{scope:this,text:_("...this file"),iconCls:"iconCommitFileCvs",handler:function(! ){phpDoc.WinCommit(true,this.rowIdx)}},{scope:this,text:_("...all files modified by me"),iconCls:"iconCommitFileCvs",handler:function(){phpDoc.WinCommit(false,"","by me")}},{scope:this,text:_("...all files modified"),iconCls:"iconCommitFileCvs",handler:function(){phpDoc.WinCommit(false)}}]})})}});ui.component._PendingCommitGrid.menu.update=function(a){Ext.apply(this,a);this.init();ui.component._PendingCommitGrid.menu.update.superclass.constructor.call(this)};Ext.extend(ui.component._PendingCommitGrid.menu.update,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"PendingCommit",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},"-",{scope:this,text:_("View Diff"),iconCls:"iconViewDiff",handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,iconCls:"iconTabLink",title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,html:'<div id=! "diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getC mp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext.get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:this.fpath,FileName:this.fname},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}},{scope:this,text:_("Download the diff as a patch"),iconCls:"iconCommitFileCvs",handler:function(){window.location.href="./php/controller.php?task=downloadPatch&FilePath="+this.fpath+"&FileName="+this.fname}},"-",{scope:this,text:_("Clear this change"),iconCls:"iconPageDelete",disabled:(phpDoc.userLogin==="cvsread"),handler:function(){new ui.task.ClearLocalChangeTask({storeRecord:this.grid.store.getAt(this.rowIdx),ftype:"update",fpath:this.fpath,fname:this.fname}).run()}},"-",new ui.component._PendingCommitGrid.me! nu.common({rowIdx:this.rowIdx})]})}});ui.component._PendingCommitGrid.menu.del=function(a){Ext.apply(this,a);this.init();ui.component._PendingCommitGrid.menu.del.superclass.constructor.call(this)};Ext.extend(ui.component._PendingCommitGrid.menu.del,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Cancel")+"<b>",iconCls:"iconPageDelete",disabled:(phpDoc.userLogin==="cvsread"),handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},"-",new ui.component._PendingCommitGrid.menu.common({rowIdx:this.rowIdx})]})}});ui.component.PendingCommitGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",columns:ui.component._PendingCommitGrid.columns,view:ui.component._PendingCommitGrid.view,listeners:{rowcontextmenu:function(c,h,g){var f=c.store.getAt(h),b=f.data.type,d=f.data.path,a=f.data.name;c.getSelectionModel().selectRow(h);if(b==="delete"){new ui.component._PendingCommitGrid.menu.del! ({grid:c,rowIdx:h,event:g}).showAt(g.getXY())}if(b==="update"){new ui. component._PendingCommitGrid.menu.update({fpath:d,fname:a,grid:c,rowIdx:h,event:g}).showAt(g.getXY())}},rowdblclick:function(c,h,g){var f=c.store.getAt(h),b=f.data.type,d=f.data.path,a=f.data.name;if(b==="update"){phpDoc.openFile(d,a)}if(b==="delete"){new ui.task.ClearLocalChangeTask({storeRecord:f,ftype:b,fpath:d,fname:a}).run()}}},initComponent:function(){Ext.apply(this,{store:new ui.component._PendingCommitGrid.store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesPendingCommit"}})});ui.component.PendingCommitGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._PendingPatchGrid");ui.component._PendingPatchGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"by",mapping:"by"},{name:"uniqID",mapping:"u! niqID"},{name:"date",mapping:"date",type:"date",dateFormat:"Y-m-d H:i:s"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{add:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()},datachanged:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()}}});ui.component._PendingPatchGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Posted by"),width:45,sortable:true,dataIndex:"by"},{header:_("Date"),width:45,sortable:true,dataIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._PendingPatchGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',emptyText:'<div style="text-align: center;">'+_("No pending Patch")+"</div>"});ui.component._PendingPatchGrid.menu=function(a){Ext.apply(this,a);this.! init();ui.component._PendingPatchGrid.menu.superclass.constructor.call (this)};Ext.extend(ui.component._PendingPatchGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"PendingPatch",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},"-",{scope:this,text:_("Reject this patch"),iconCls:"iconPageDelete",handler:function(){new ui.task.RejectPatchTask({fid:this.fid,fuid:this.fuid,storeRecord:this.grid.store.getAt(this.rowIdx)}).run()}}]})}});ui.component.PendingPatchGrid=Ext.extend(Ext.grid.GridPanel,{store:ui.component._PendingPatchGrid.store,columns:ui.component._PendingPatchGrid.columns,view:ui.component._PendingPatchGrid.view,loadMask:true,bodyBorder:false,autoExpandColumn:"name",listeners:{rowcontextmenu:function(b,h,g){var c=b.store.getAt(h).data.path,a=b.store.getAt(h).data.name,d=b.store.getAt(h).data.uniqID,f=Ext.util.md5("PP-"+d+c+a);b.getSelectionModel().selectRow(h);new ui.component._PendingPatchGrid.menu({grid:b,rowIdx:h,event! :g,fid:f,fpath:c,fname:a,fuid:d}).showAt(g.getXY())},rowdblclick:function(b,i,h){var f=b.store.getAt(i),c=f.data.path,a=f.data.name,d=f.data.uniqID,g=Ext.util.md5("PP-"+d+c+a);if(!Ext.getCmp("main-panel").findById("PP-"+g)){Ext.getCmp("main-panel").add({id:"PP-"+g,layout:"border",iconCls:"PendingPatch",title:a,originTitle:a,tabTip:String.format(_("Patch for {0}"),c+a),closable:true,defaults:{split:true},items:[{xtype:"panel",id:"PP-patch-desc-"+g,title:_("Patch content"),layout:"fit",region:"north",height:150,autoScroll:true,collapsible:true,collapsed:true,html:'<div id="diff_content_'+g+'" class="diff-content"></div>',listeners:{render:function(){XHR({url:"./php/controller.php",params:{task:"getDiff",FilePath:c,FileName:a,type:"patch",uniqID:d},success:function(e){var j=Ext.util.JSON.decode(e.responseText);Ext.get("diff_content_"+g).dom.innerHTML=j.content}})}}},{region:"west",xtype:"panel",title:_("CvsLog"),layout:"fit",bodyBorder:false,collapsible:true,collapsed:true,wid! th:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaul ts:{autoScroll:true},items:new ui.component.CVSLogGrid({layout:"fit",title:_("Log"),prefix:"PP",fid:g,fpath:c,fname:a,loadStore:(phpDoc.userConf.conf_patch_displaylog==="true")})}},new ui.component.FilePanel({id:"PP-PATCH-PANEL-"+g,region:"center",title:String.format(_("Proposed Patch for {0}"),c+a),prefix:"PP",ftype:"PATCH",fid:g,fpath:c,fname:a,isPatch:true,fuid:d,parser:"xml",storeRecord:f,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_patch_scrollbars"}),new ui.component.FilePanel({id:"PP-ORIGIN-PANEL-"+g,region:"east",width:575,title:_("Original File: ")+c+a,prefix:"PP",ftype:"ORIGIN",fid:g,fpath:c,fname:a,lang:"",readOnly:true,parser:"xml",syncScroll:true,syncScrollConf:"conf_patch_scrollbars"})]});Ext.getCmp("main-panel").setActiveTab("PP-"+g);if(Ext.getCmp("PP-"+g).getLayout().north.collapsedEl){Ext.getCmp("PP-"+g).getLayout().north.collapsedEl.addClass("x-layout-collapsed-east-patch-desc")}}else{Ext.getCmp("main-panel").setActiveTab("PP-"+g)}}},initComponent! :function(){Ext.apply(this,{store:new ui.component._PendingPatchGrid.store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesPendingPatch"}})});ui.component.PendingPatchGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._PendingReviewGrid");ui.component._PendingReviewGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"reviewed",mapping:"reviewed"},{name:"maintainer",mapping:"maintainer"},{name:"needcommit",mapping:"needcommit"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-need-reviewed-nb").innerHTML=a.getCount()}}});ui.component._PendingReviewGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Reviewed! "),width:45,sortable:true,dataIndex:"reviewed"},{header:_("Maintainer" ),width:45,sortable:true,dataIndex:"maintainer"},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._PendingReviewGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',getRowClass:function(a,d,c,b){if(a.data.needcommit){return"file-need-commit"}},emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>"});Ext.namespace("ui.component._PendingReviewGrid.menu");ui.component._PendingReviewGrid.menu.diff=function(a){Ext.apply(this,a);this.init();ui.component._PendingReviewGrid.menu.diff.superclass.constructor.call(this)};Ext.extend(ui.component._PendingReviewGrid.menu.diff,Ext.menu.Item,{text:_("View Diff"),iconCls:"iconViewDiff",init:function(){Ext.apply(this,{handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink! ",html:'<div id="diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext.get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:phpDoc.userLang+this.fpath,FileName:this.fname},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}})}});ui.component._PendingReviewGrid.menu.group=function(a){Ext.apply(this,a);this.init();ui.component._PendingReviewGrid.menu.group.superclass.constructor.call(this)};Ext.extend(ui.component._PendingReviewGrid.menu.group,Ext.menu.Item,{iconCls:"iconViewDiff",init:function(){Ext.apply(this,{text:String.format(_("Open all files about {0} extension"),this.gname),handler:function(){Ext.getBody().mask('<img src="them! es/img/loading.gif" style="vertical-align: middle;" /> '+String.format (_("Open all files about {0} extension"),this.gname)+". "+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getAllFilesAboutExtension",ExtName:this.gname},success:function(a){var c=Ext.util.JSON.decode(a.responseText);phpDoc.filePendingOpen=new Array();for(var b=0;b<c.files.length;b=b+1){phpDoc.filePendingOpen[b]=[phpDoc.userLang+c.files[b].path,c.files[b].name]}phpDoc.openFile(phpDoc.filePendingOpen[0][0],phpDoc.filePendingOpen[0][1]);Ext.getBody().unmask()}})}})}});ui.component._PendingReviewGrid.menu.main=function(a){Ext.apply(this,a);this.init();ui.component._PendingReviewGrid.menu.main.superclass.constructor.call(this)};Ext.extend(ui.component._PendingReviewGrid.menu.main,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"FilesNeedReviewed",scope:this,handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},new ui.component._PendingReviewGrid.menu.diff({fpath:this.fpa! th,fname:this.fname,rowIdx:this.rowIdx,hidden:this.hideDiff}),"-",new ui.component._PendingReviewGrid.menu.group({gname:this.gname,hidden:this.hideGroup})]})}});ui.component.PendingReviewGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",columns:ui.component._PendingReviewGrid.columns,view:ui.component._PendingReviewGrid.view,listeners:{rowcontextmenu:function(b,h,f){var d=b.store.getAt(h),c=d.data.path,a=d.data.name,g=c.split("/");b.getSelectionModel().selectRow(h);new ui.component._PendingReviewGrid.menu.main({grid:b,rowIdx:h,event:f,fpath:c,fname:a,hideDiff:(!d.data.needcommit),hideGroup:(g[1]!=="reference"),gname:g[2]}).showAt(f.getXY())},rowdblclick:function(b,h,g){var d=b.store.getAt(h),c=d.data.path,a=d.data.name,f=Ext.util.md5("FNR-"+phpDoc.userLang+c+a);if(!Ext.getCmp("main-panel").findById("FNR-"+f)){Ext.getCmp("main-panel").add({id:"FNR-"+f,title:a,layout:"border",iconCls:"iconTabNeedReviewed",closable:true,originTitle:a,de! faults:{split:true},tabTip:String.format(_("Need Reviewed in: {0}"),c) ,items:[{region:"west",xtype:"panel",title:_("CvsLog"),collapsible:true,collapsed:true,layout:"fit",bodyBorder:false,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[new ui.component.CVSLogGrid({layout:"fit",title:phpDoc.userLang,prefix:"FNR-LANG",fid:f,fpath:phpDoc.userLang+c,fname:a,loadStore:(phpDoc.userConf.conf_reviewed_displaylog==="true")}),new ui.component.CVSLogGrid({layout:"fit",title:"en",prefix:"FNR-EN",fid:f,fpath:"en"+c,fname:a,loadStore:(phpDoc.userConf.conf_reviewed_displaylog==="true")})]}},new ui.component.FilePanel({id:"FNR-LANG-PANEL-"+f,region:"center",title:String.format(_("{0} File: "),phpDoc.userLang)+c+a,prefix:"FNR",ftype:"LANG",fid:f,fpath:c,fname:a,lang:phpDoc.userLang,parser:"xml",storeRecord:d,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_reviewed_scrollbars"}),new ui.component.FilePanel({id:"FNR-EN-PANEL-"+f,region:"east",width:575,title:_("en File: ")+c+a,prefix:"FNR",ftype:"EN",fid:! f,fpath:c,fname:a,lang:"en",parser:"xml",storeRecord:d,syncScroll:true,syncScrollConf:"conf_reviewed_scrollbars"})]});Ext.getCmp("main-panel").setActiveTab("FNR-"+f)}else{Ext.getCmp("main-panel").setActiveTab("FNR-"+f)}}},initComponent:function(){Ext.apply(this,{store:new ui.component._PendingReviewGrid.store({autoLoad:(phpDoc.userLang!=="en"),proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNeedReviewed"}}),tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FNR-filter",width:180,hideTrigger1:true,enableKeyEvents:true,validateOnBlur:false,validationEvent:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();phpDoc.pendingReviewGrid.store.clearFilter()},onTrigger2Click:function(){var a=this.getValue();if(a==""||a.length<3){this.markInvalid(_("Your filter ! must contain at least 3 characters"));return}this.clearInvalid();this. triggers[0].show();phpDoc.pendingReviewGrid.store.filter("maintainer",a)}})]});ui.component.PendingReviewGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._RepositoryTree");ui.component._RepositoryTree.root=new Ext.tree.AsyncTreeNode({id:"/",text:_("Repository"),draggable:false});ui.component._RepositoryTree.loader=new Ext.tree.TreeLoader({dataUrl:"./php/controller.php",baseParams:{task:"getAllFiles"}});ui.component.RepositoryTree=Ext.extend(Ext.tree.TreePanel,{animate:true,enableDD:false,useArrows:true,autoScroll:true,bodyBorder:false,containerScroll:true,root:ui.component._RepositoryTree.root,loader:ui.component._RepositoryTree.loader,listeners:{contextmenu:function(a,b){a.select();phpDoc.repositoryContextMenu(a).showAt(b.getXY())},dblclick:function(f,h){if(f.attributes.type==="file"){var a=f.attributes.id,i=Ext.util.md5("AF-"+a),k=f.attributes.extension,l,d,c,b,g,j;if(!Ext.getCmp("main-panel").findById("AF-"+i)){l=a.split("/");l.s! hift();l.shift();c=l.pop();d=l.shift();a=(l.length>0)?"/"+l.join("/")+"/":"/";if(k!=="html"&&k!=="php"){b=k}else{b="xml"}if(k==="gif"||k==="png"){g={};j={xtype:"panel",layout:"fit",bodyStyle:"padding:5px 5px 0",html:'<img src="/data/'+this.userLogin+"/phpdoc-"+this.userLang+a+'" />'}}else{g={xtype:"panel",region:"west",title:"CvsLog",layout:"fit",bodyBorder:false,split:true,collapsible:true,collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{title:"Log",layout:"fit",items:[new ui.component.CVSLogGrid({prefix:"AF",fid:i,fpath:d+a,fname:c,loadStore:(phpDoc.userConf.conf_allfiles_displaylog==="true")})]}]}};j=new ui.component.FilePanel({id:"AF-ALL-PANEL-"+i,region:"center",title:_("File: ")+d+a+c,prefix:"AF",ftype:"ALL",fid:i,fpath:a,fname:c,lang:d,parser:b,storeRecord:f,syncScrollCB:false,syncScroll:false})}Ext.getCmp("main-panel").add({id:"AF-"+i,layout:"border",title:c,originTitle:c,closable:true,tabTip:String! .format(_("in {0}"),a),iconCls:"AllFiles",items:[j,g]});Ext.getCmp("ma in-panel").setActiveTab("AF-"+i)}else{Ext.getCmp("main-panel").setActiveTab("AF-"+i)}}}},initComponent:function(){Ext.apply(this,{tbar:[_("Search: ")," ",new Ext.form.TwinTriggerField({id:"AF-search",validationEvent:false,validateOnBlur:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",hideTrigger1:true,width:180,enableKeyEvents:true,listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();phpDoc.treeAllFiles.root.setText(_("Repository"));delete phpDoc.treeAllFiles.loader.baseParams.search;phpDoc.treeAllFiles.root.reload()},onTrigger2Click:function(){var a=this.getValue();if(a==""||a.length<3){this.markInvalid(_("Your search must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();phpDoc.treeAllFiles.loader.baseParams.search=a;phpDoc.treeAllFiles.root.reload(function(){phpDoc.treeAllFiles.root.setText(String.format(_("! Search result: {0}"),phpDoc.treeAllFiles.root.childNodes.length))})}})]});ui.component.RepositoryTree.superclass.initComponent.call(this);new Ext.tree.TreeSorter(this,{folderSort:true})}});Ext.namespace("ui","ui.component","ui.component._StaleFileGrid");ui.component._StaleFileGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"revision",mapping:"revision"},{name:"en_revision",mapping:"en_revision"},{name:"maintainer",mapping:"maintainer"},{name:"needcommit",mapping:"needcommit"},{name:"isCritical",mapping:"isCritical"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-need-update-nb").innerHTML=a.getCount()}}});ui.component._StaleFileGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[! values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("F ile")+'"]})',getRowClass:function(a,d,c,b){if(a.data.needcommit){return"file-need-commit"}if(a.data.isCritical){return"file-critical"}},emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>"});ui.component._StaleFileGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("EN revision"),width:45,sortable:true,dataIndex:"en_revision"},{header:"",width:45,sortable:true,dataIndex:"revision"},{header:_("Maintainer"),width:45,sortable:true,dataIndex:"maintainer"},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._StaleFileGrid.menu=function(a){Ext.apply(this,a);this.init();ui.component._StaleFileGrid.menu.superclass.constructor.call(this)};Ext.extend(ui.component._StaleFileGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"iconTabNeedUpdate",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},{scope:this,hidden:this.! hideCommit,text:_("View Diff"),iconCls:"iconViewDiff",handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext.get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" />'+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:this.lang+this.fpath,FileName:this.fname},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}}]})}});ui.component.StaleFileGrid=Ext.extend(Ext.grid.GridPanel,{view:ui.component._StaleFileGrid.view,loadMask:true,autoExpandColumn:"name",bodyBorder:false,listeners:{rowcontextmenu:function(b! ,f,d){var c=b.store.getAt(f).data.path,a=b.store.getAt(f).data.name;b. getSelectionModel().selectRow(f);new ui.component._StaleFileGrid.menu({hideCommit:(b.store.getAt(f).data.needcommit===false),grid:b,event:d,rowIdx:f,lang:phpDoc.userLang,fpath:c,fname:a}).showAt(d.getXY())},rowdblclick:function(b,h,f){var g=b.store.getAt(h),a=g.data.path,c=g.data.name,j=g.data.en_revision,i=g.data.revision,d=Ext.util.md5("FNU-"+phpDoc.userLang+a+c),k="";if(!Ext.getCmp("main-panel").findById("FNU-"+d)){if(phpDoc.userConf.conf_needupdate_diff==="using-viewvc"){k=ui.component.ViewVCDiff}else{if(phpDoc.userConf.conf_needupdate_diff==="using-exec"){k=ui.component.ExecDiff}}Ext.getCmp("main-panel").add({id:"FNU-"+d,layout:"border",title:c,originTitle:c,iconCls:"iconTabNeedUpdate",closable:true,defaults:{split:true},tabTip:String.format(_("Need Update: in {0}"),a),items:[new k({region:"north",collapsible:true,prefix:"FNU",fid:d,fpath:a,fname:c,rev1:i,rev2:j}),{region:"west",xtype:"panel",title:_("CvsLog"),collapsible:true,collapsed:true,layout:"fit",bodyBorder:fals! e,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[new ui.component.CVSLogGrid({layout:"fit",title:phpDoc.userLang,prefix:"FNU-LANG",fid:d,fpath:phpDoc.userLang+a,fname:c,loadStore:(phpDoc.userConf.conf_needupdate_displaylog==="true")}),new ui.component.CVSLogGrid({layout:"fit",title:"en",prefix:"FNU-EN",fid:d,fpath:"en"+a,fname:c,loadStore:(phpDoc.userConf.conf_needupdate_displaylog==="true")})]}},new ui.component.FilePanel({id:"FNU-LANG-PANEL-"+d,region:"center",title:String.format(_("{0} File: "),phpDoc.userLang)+a+c,prefix:"FNU",ftype:"LANG",fid:d,fpath:a,fname:c,lang:phpDoc.userLang,parser:"xml",storeRecord:g,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_needupdate_scrollbars"}),new ui.component.FilePanel({id:"FNU-EN-PANEL-"+d,region:"east",width:575,title:_("en File: ")+a+c,prefix:"FNU",ftype:"EN",fid:d,fpath:a,fname:c,lang:"en",parser:"xml",storeRecord:g,syncScroll:true,syncScrollConf:"conf_needupdate_scrol! lbars"})]});Ext.getCmp("main-panel").setActiveTab("FNU-"+d)}else{Ext.g etCmp("main-panel").setActiveTab("FNU-"+d)}}},initComponent:function(){ui.component._StaleFileGrid.columns[2].header=String.format(_("{0} revision"),Ext.util.Format.uppercase(phpDoc.userLang));Ext.apply(this,{columns:ui.component._StaleFileGrid.columns,store:new ui.component._StaleFileGrid.store({autoLoad:(phpDoc.userLang!=="en"),proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNeedUpdate"}}),tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FNU-filter",width:180,hideTrigger1:true,enableKeyEvents:true,validateOnBlur:false,validationEvent:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();phpDoc.staleFileGrid.store.clearFilter()},onTrigger2Click:function(){var a=this.getValue();if(a==""||a.length<3){this.markInvalid(_("Your filter must contain at least! 3 characters"));return}this.clearInvalid();this.triggers[0].show();phpDoc.staleFileGrid.store.filter("maintainer",a)}})]});ui.component.StaleFileGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._SummaryGrid");ui.component._SummaryGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getSummaryInfo"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"libel",mapping:"libel"},{name:"nbFiles",mapping:"nbFiles"},{name:"percentFiles",mapping:"percentFiles"},{name:"sizeFiles",mapping:"sizeFiles"},{name:"percentSize",mapping:"percentSize"}])),listeners:{load:function(){this.each(function(a){switch(a.id){case 1:a.set("libel",_("Up to date files"));break;case 2:a.set("libel",_("Old files"));break;case 3:a.set("libel",_("Critical files"));break;case 4:a.set("libel",_("Files without revision tag"));break;cas! e 5:a.set("libel",_("Files available for translation"));break;case 6:a ..set("libel",_("Total"));break;default:a.set("libel","");break}a.commit()})}}});ui.component._SummaryGrid.columns=[new Ext.grid.RowNumberer(),{id:"StatusType",header:_("File status type"),width:180,sortable:true,dataIndex:"libel"},{header:_("Number of files"),width:110,sortable:true,dataIndex:"nbFiles"},{header:_("Percent of files"),width:110,sortable:true,dataIndex:"percentFiles"},{header:_("Size of files (kB)"),width:110,sortable:true,dataIndex:"sizeFiles"},{header:_("Percent of size"),width:110,sortable:true,dataIndex:"percentSize"}];ui.component._SummaryGrid.view=new Ext.grid.GridView({getRowClass:function(a,d,c,b){switch(a.data.id){case 1:return"summary_1";case 2:return"summary_2";case 3:return"summary_3";case 4:return"summary_4";case 5:return"summary_5";default:return""}}});ui.component.SummaryGrid=Ext.extend(Ext.grid.GridPanel,{title:_("Summary"),loadMask:true,autoScroll:true,height:400,width:800,store:ui.component._SummaryGrid.store,columns:ui.component._SummaryGrid.! columns,view:ui.component._SummaryGrid.view,listeners:{render:function(a){a.store.load.defer(20,a.store)},rowdblclick:function(a,d,b){var c=a.store.getAt(d).data.id;if(c===1||c===2||c===3){Ext.getCmp("acc-need-update").expand()}}},initComponent:function(){Ext.apply(this,{iconCls:"flag-"+phpDoc.userLang,});ui.component.SummaryGrid.superclass.initComponent.call(this)}});ui.component.SummaryGrid.reload=function(){ui.component._SummaryGrid.store.reload()};Ext.namespace("ui","ui.component");ui.component.TranslationGraph=Ext.extend(Ext.Panel,{title:_("Graphics"),layout:"fit",iconCls:"home-graphic-title",autoHeight:true,html:'<div align="center" id="graph_container" style="width: 530px; height: 302px"><img id="graph_picture" src="" height="300"></div>',listeners:{afterlayout:function(){var a=Ext.get("graph_picture"),c=Ext.get("graph_container"),b=new Ext.LoadMask(c);a.setVisibilityMode(Ext.Element.VISIBILITY);a.on("load",function(){a.stopFx();b.hide();a.fadeIn({duration:2})});b.sh! ow();a.hide();a.dom.src="./php/controller.php?task=translationGraph"}} });Ext.namespace("ui","ui.component","ui.component._TranslatorGrid");ui.component._TranslatorGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getTranslatorInfo"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"name",mapping:"name"},{name:"email",mapping:"mail"},{name:"nick",mapping:"nick"},{name:"cvs",mapping:"cvs"},{name:"uptodate",mapping:"uptodate",type:"int"},{name:"old",mapping:"old",type:"int"},{name:"critical",mapping:"critical",type:"int"},{name:"sum",mapping:"sum",type:"int"}]))});ui.component._TranslatorGrid.store.setDefaultSort("nick","asc");ui.component._TranslatorGrid.translatorSumRenderer=function(b){if(b){var a=(b===0||b>1)?b:1;return"("+a+" Translators)"}else{return}};ui.component._TranslatorGrid.uptodateRenderer=function(a){if(a==="0"){return}else{return'<span style="color:green; font-weight: bold;">'+a+"</span>"}};! ui.component._TranslatorGrid.old_sumRenderer=function(a){return(a==="0")?"":a};ui.component._TranslatorGrid.criticalRenderer=function(a){if(a==="0"){return}else{return'<span style="color:red; font-weight: bold;">'+a+"</span>"}};ui.component._TranslatorGrid.columns=[new Ext.grid.RowNumberer(),{id:"GridTransName",header:_("Name"),sortable:true,dataIndex:"name",summaryType:"count",summaryRenderer:ui.component._TranslatorGrid.translatorSumRenderer},{header:_("Email"),width:110,sortable:true,dataIndex:"email"},{header:_("Nick"),width:70,sortable:true,dataIndex:"nick"},{header:_("Cvs"),width:45,sortable:true,dataIndex:"cvs"},{header:_("UptoDate"),width:60,sortable:true,renderer:ui.component._TranslatorGrid.uptodateRenderer,dataIndex:"uptodate",summaryType:"sum"},{header:_("Old"),width:45,sortable:true,renderer:ui.component._TranslatorGrid.old_sumRenderer,dataIndex:"old",summaryType:"sum"},{header:_("Critical"),width:60,sortable:true,renderer:ui.component._TranslatorGrid.criticalR! enderer,dataIndex:"critical",summaryType:"sum"},{header:_("Sum"),width :50,sortable:true,renderer:ui.component._TranslatorGrid.old_sumRenderer,dataIndex:"sum",summaryType:"sum"}];ui.component.TranslatorGrid=Ext.extend(Ext.grid.GridPanel,{title:_("Translators"),iconCls:"iconTranslator",loadMask:true,autoScroll:true,height:400,width:800,plugins:[new Ext.ux.grid.GridSummary()],store:ui.component._TranslatorGrid.store,columns:ui.component._TranslatorGrid.columns,autoExpandColumn:"GridTransName",listeners:{render:function(a){a.store.load.defer(20,a.store)},rowdblclick:function(c,f,d){var a=c.store.getAt(f).data.email,b=c.store.getAt(f).data.name;c.getSelectionModel().selectRow(f);phpDoc.sendEmail(b,a)},rowcontextmenu:function(c,f,d){var a=c.store.getAt(f).data.email,b=c.store.getAt(f).data.name;c.getSelectionModel().selectRow(f);new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+String.format(_("Send an email to {0}"),b)+"</b>",iconCls:"iconSendEmail",handler:function(){phpDoc.sendEmail(b,a)}},"-",{text:String.format(_("Send an email to the {0}"),"d! oc-"+phpDoc.userLang+"@lists.php.net"),iconCls:"iconSendEmail",handler:function(){phpDoc.sendEmail("Php Doc Team "+phpDoc.userLang,"doc-"+phpDoc.userLang+"@lists.php.net")}}]}).showAt(d.getXY())}}});ui.component.TranslatorGrid.reload=function(){ui.component._TranslatorGrid.store.reload()};Ext.namespace("ui","ui.component");ui.component.ViewVCDiff=Ext.extend(Ext.Panel,{layout:"fit",title:_("Diff From cvs"),height:150,collapsed:true,initComponent:function(){Ext.apply(this,{items:{id:this.prefix+"-diff-"+this.fid,xtype:"iframepanel",loadMask:true,defaultSrc:"http://cvs.php.net/viewvc.cgi/phpdoc/en"+this.fpath+this.fname+"?r1="+this.rev1+"&r2="+this.rev2}});ui.component.ViewVCDiff.superclass.initComponent.call(this)}});var phpDoc=function(){Ext.QuickTips.init();Ext.BLANK_IMAGE_URL="js/extjs/resources/images/default/s.gif";return{TaskPing:"",storeCommitLogMessage:"",userLogin:"",userLang:"",appName:"PhpDocumentation Online Editor",appVer:"0.2",uiRevision:"$Revision: 1.6 $",userC! onf:{conf_needupdate_diff:"using-exec",conf_needupdate_scrollbars:true ,conf_needupdate_displaylog:false,conf_error_skipnbliteraltag:true,conf_error_scrollbars:true,conf_error_displaylog:false,conf_reviewed_scrollbars:true,conf_reviewed_displaylog:false,conf_allfiles_displaylog:false,conf_patch_scrollbars:true,conf_patch_displaylog:false,conf_theme:"themes/empty.css"},treeAllFiles:"",staleFileGrid:"",errorFileGrid:"",pendingPatchGrid:"",pendingCommitGrid:"",pendingReviewGrid:"",filePendingOpen:"",init:function(){Ext.getBody().on("contextmenu",function(a){a.stopEvent()},this);XHR({url:"./php/controller.php",params:{task:"getConf"},scope:this,success:function(a){var b=Ext.decode(a.responseText);this.userLogin=b.mess.userLogin;this.userLang=b.mess.userLang;this.userConf.conf_needupdate_diff=b.mess.userConf.conf_needupdate_diff;this.userConf.conf_needupdate_scrollbars=b.mess.userConf.conf_needupdate_scrollbars;this.userConf.conf_needupdate_displaylog=b.mess.userConf.conf_needupdate_displaylog;this.userConf.conf_error_skipnbliteraltag=b.mess.userCon! f.conf_error_skipnbliteraltag;this.userConf.conf_error_scrollbars=b.mess.userConf.conf_error_scrollbars;this.userConf.conf_error_displaylog=b.mess.userConf.conf_error_displaylog;this.userConf.conf_reviewed_scrollbars=b.mess.userConf.conf_reviewed_scrollbars;this.userConf.conf_reviewed_displaylog=b.mess.userConf.conf_reviewed_displaylog;this.userConf.conf_allfiles_displaylog=b.mess.userConf.conf_allfiles_displaylog;this.userConf.conf_patch_scrollbars=b.mess.userConf.conf_patch_scrollbars;this.userConf.conf_patch_displaylog=b.mess.userConf.conf_patch_displaylog;this.userConf.conf_theme=b.mess.userConf.conf_theme;Ext.get("appTheme").dom.href=this.userConf.conf_theme;this.loadDataStore();this.drawInterface()}})},winForbidden:function(){Ext.MessageBox.alert(_("Forbidden"),_("You can't do this action as cvsread user."))},menuMarkupLANG:function(a,c){var d,b;b=new Ext.menu.Menu({items:[{text:_("Reviewed tag"),handler:function(){Ext.getCmp(a).insertIntoLine(2,"end","\n<!-- Reviewed! : no -->");Ext.getCmp(a).focus()}},{text:_("Revcheck tag"),handler:fun ction(){Ext.getCmp(a).insertIntoLine(2,"end","\n<!-- EN-Revision: 1.XX Maintainer: "+c.userLogin+" Status: ready -->");Ext.getCmp(a).focus()}}]});d={text:_("MarkUp"),iconCls:"iconInsertCode",menu:b};return d},menuMarkupEN:function(a){var c,b;b=new Ext.menu.Menu({items:[{text:_("Description section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,' <refsect1 role="description"><!-- {{{ -->\r\n &reftitle.description;\r\n <methodsynopsis>\r\n <!-- Example: All functions have this -->\r\n <type>thereturned type</type><methodname>func_name</methodname>\r\n <!-- Example: Required parameter -->\r\n <methodparam><type>param1type</type><parameter>firstparameter</parameter></methodparam>\r\n <!-- Example: Optional parameter, also by reference -->\r\n <methodparam choice="opt"><type>int</type><parameter role="reference">secondparameter</parameter></methodparam>\r\n <!-- Example: If no methodparams e! xist (void), use this -->\r\n <void />\r\n </methodsynopsis>\r\n <para>\r\n The function description goes here.\r\n </para>\r\n </refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Parameters section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="parameters"><!-- {{{ -->\r\n&reftitle.parameters;\r\n<para>\r\n<variablelist>\r\n<varlistentry>\r\n<term><parameter>firstparameter</parameter></term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n<varlistentry>\r\n<term>\r\n<parameter>secondparameter</parameter>\r\n</term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n</variablelist>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Return section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,! 0,'\r\n<refsect1 role="returnvalues"><!-- {{{ -->\r\n&reftitle.returnv alues;\r\n<para>\r\nWhat this function returns, first on success, then failure.\r\nIf simply true on success and false on failure, just use &return.success; here.\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Error section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="errors"><!-- {{{ -->\r\n&reftitle.errors;\r\n<para>\r\nWhen does this function issue E_* level errors, and/or throw exceptions.\r\n</para>\r\n</refsect1><!-- }}} -->\r\n');Ext.getCmp(a).focus()}},{text:_("Unicode section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="unicode"><!-- {{{ -->\r\n&reftitle.unicode;\r\n<para>\r\nInformation specific to unicode, from the PHP 6 changes.\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Changelog section"),handler:function(){var d=Ex! t.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="changelog"><!-- {{{ -->\r\n&reftitle.changelog;\r\n<para>\r\n<informaltable>\r\n<tgroup cols="2">\r\n<thead>\r\n<row>\r\n<entry>&Version;</entry>\r\n<entry>&Description;</entry>\r\n</row>\r\n</thead>\r\n<tbody>\r\n<row>\r\n<entry>Enter the version of change here</entry>\r\n<entry>\r\nDescribe the change\r\n</entry>\r\n</row>\r\n</tbody>\r\n</tgroup>\r\n</informaltable>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Examples section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,"\r\n<refsect1 role=\"examples\"><!-- {{{ -->\r\n&reftitle.examples;\r\n<para>\r\n<example xml:id=\"function-name.example.basic\"><!-- {{{ -->\r\n<title><function>function-name</function> example</title>\r\n<para>\r\nAny text that describes the purpose of the example, or what\r\ngoes on in t! he example should be here. (Inside the <example> tag, not out).\r\n</p ara>\r\n<programlisting role=\"php\">\r\n<![CDATA[\r\n<?php\r\nif ($anexample === true) {\r\necho 'Use the PEAR Coding standards';\r\n}\r\nif ($thereisoutput === 'and it is multiple lines') {\r\necho 'Use a screen like we did below';\r\n}\r\n?>\r\n]]>\r\n</programlisting>\r\n&example.outputs.similar;\r\n<screen>\r\n<![CDATA[\r\nUse the PEAR Coding standards\r\nUse a screen like we did below\r\n]]>\r\n</screen>\r\n</example><!-- }}} -->\r\n</para>\r\n</refsect1><!-- }}} -->");Ext.getCmp(a).focus()}},{text:_("Notes section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="notes"><!-- {{{ -->\r\n&reftitle.notes;\r\n<caution>\r\n<para>\r\nAny notes that don\'t fit anywhere else should go here.\r\n90% of the time, notes, warnings or cautions are better placed in the\r\nparameters section. Consider that before using this section!\r\n</para>\r\n</caution>\r\n¬e.language-construct;\r\n¬! e.not-bin-safe;\r\n¬e.registerglobals;\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("SeeAlso section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="seealso"><!-- {{{ -->\r\n&reftitle.seealso;\r\n<para>\r\n<simplelist>\r\n<member><function>somefunc</function></member>\r\n<member><function>another_func</function></member>\r\n<member>The <link linkend="something">something appendix</link></member>\r\n</simplelist>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}}]});c={text:_("MarkUp"),iconCls:"iconInsertCode",menu:b};return c},loadDataStore:function(){this.storeCommitLogMessage=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getCommitLogMessage"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"text",mapping:"text"}])})},newTabCheckDoc:funct! ion(){var a=Ext.getCmp("tab-check-doc");if(a===undefined){Ext.getCmp(" main-panel").add({id:"tab-check-doc",title:"Check Doc",iconCls:"CheckDoc",layout:"fit",closable:true,html:"nothing"});a=Ext.getCmp("tab-check-doc")}if(a.items){a.removeAll(true)}a.add(new ui.component.CheckDoc());a.doLayout();Ext.getCmp("main-panel").setActiveTab("tab-check-doc")},newTabBuildStatus:function(){var a=Ext.getCmp("tab-build-status");if(a===undefined){Ext.getCmp("main-panel").add({id:"tab-build-status",title:_("Translation build status"),iconCls:"BuildStatus",layout:"fit",closable:true,html:"nothing"});a=Ext.getCmp("tab-build-status")}if(a.items){a.removeAll(true)}a.add(new ui.component.BuildStatus());a.doLayout();Ext.getCmp("main-panel").setActiveTab("tab-build-status")},openFile:function(d,a){Ext.getCmp("acc-all-files").expand();var c=d.split("/");function b(f,e){f.expand(false,true,function(h){var g;h.ensureVisible();if(c[0]&&c[0]!==""){for(g=0;g<h.childNodes.length;g=g+1){if(h.childNodes[g].text===c[0]){c.shift();b(h.childNodes[g],e)}}}else{for(g=0;g<h.childN! odes.length;g=g+1){if(h.childNodes[g].text===a){h.childNodes[g].ensureVisible();h.childNodes[g].ui.highlight();e.treeAllFiles.fireEvent("dblclick",h.childNodes[g])}}}})}b(this.treeAllFiles.root,this)},saveLangFile:function(d,b,f,c,g,e,a){if(this.userLogin==="cvsread"){this.winForbidden();return}Ext.MessageBox.show({title:_("Confirm"),msg:_("Do you want to check for error before saving?"),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,fn:function(h){if(h==="no"){new ui.task.SaveLangFileTask({prefix:d,ftype:b,fid:f,fpath:c,fname:g,lang:e,storeRecord:a}).run()}else{if(h==="yes"){new ui.task.CheckFileTask({prefix:d,ftype:b,fid:f,fpath:c,fname:g,lang:e,storeRecord:a}).run()}}}})},getFile:function(e,d,a,c,b){Ext.get(c+e).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Loading..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getFile",FilePath:d,FileName:a},success:function(f){var g=Ext.util.JSON.decode(f.responseText);Ext.! getCmp(b+e).setCode(g.content);Ext.get(c+e).unmask()},callback:functio n(){if(this.filePendingOpen[0]){this.filePendingOpen.shift();if(this.filePendingOpen[0]){if(this.filePendingOpen[0][0]){this.openFile(this.filePendingOpen[0][0],this.filePendingOpen[0][1])}}}}})},addToPendingPatch:function(b,a,e){var d,c;d=new Date();c=new this.pendingPatchGrid.store.recordType({id:Ext.id("",""),path:b,name:a,by:this.userLogin,uniqID:e,date:d});this.pendingPatchGrid.store.insert(0,c)},addToPendingCommit:function(g,e,a,d){var c,f,b;c=false;this.pendingCommitGrid.store.each(function(h){if(h.data.path===e&&h.data.name===a){c=true}});if(!c){f=new Date();b=new this.pendingCommitGrid.store.recordType({id:g,path:e,name:a,by:this.userLogin,date:f,type:d});this.pendingCommitGrid.store.insert(0,b);this.pendingCommitGrid.store.groupBy("path",true)}},NewTabBugs:function(a,b,c){Ext.getCmp("main-panel").add({id:"mifp_bugs_"+a,xtype:"iframepanel",title:_("Loading..."),tabTip:c,iconCls:"iconBugs",loadMask:true,defaultSrc:b,listeners:{documentloaded:function(d){d.ownerCt.set! Title(Ext.util.Format.substr(c,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_bugs_"+a)},NewTabMailing:function(a,c,b){Ext.getCmp("main-panel").add({xtype:"iframepanel",id:"mifp_"+a,title:_("Loading..."),tabTip:b,iconCls:"home-mailing-title",loadMask:true,defaultSrc:c,listeners:{documentloaded:function(d){d.ownerCt.setTitle(Ext.util.Format.substr(b,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_"+a)},winDiff:function(d,b,c,a){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Finding the diff. Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getDiff2",FilePath:d,FileName:b,Rev1:c,Rev2:a},success:function(f){var g=Ext.util.JSON.decode(f.responseText);Ext.getBody().unmask();var e=new Ext.Window({title:String.format(_("Diff between {0} & {1}"),c,a),width:650,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:'<div class="diff-content! ">'+g.content+"</div>",buttons:[{text:"Close",handler:function(){e.clo se()}}]});e.show()}})},removeTabEvent:function(d,e){var b,c,f,a;a=e.id.split("-");if((a[0]==="FE"||a[0]==="FNU"||a[0]==="FNR"||a[0]==="PP"||a[0]==="AF")&&a[1]!=="help"){if(a[0]==="FE"){b=Ext.getCmp("FE-LANG-FILE-"+a[1]).isModified}if(a[0]==="FNU"){b=Ext.getCmp("FNU-LANG-FILE-"+a[1]).isModified}if(a[0]==="FNR"){b=Ext.getCmp("FNR-LANG-FILE-"+a[1]).isModified}if(a[0]==="FE"){c=Ext.getCmp("FE-EN-FILE-"+a[1]).isModified}if(a[0]==="FNU"){c=Ext.getCmp("FNU-EN-FILE-"+a[1]).isModified}if(a[0]==="FNR"){c=Ext.getCmp("FNR-EN-FILE-"+a[1]).isModified}if(a[0]==="PP"){f=Ext.getCmp("PP-PATCH-FILE-"+a[1]).isModified}if(a[0]==="AF"){f=Ext.getCmp("AF-ALL-FILE-"+a[1]).isModified}if(c||b||f){Ext.Msg.show({scope:this,title:_("Confirm"),msg:_("This file has been modified without being saved.<br/>Do you really want to close?"),buttons:Ext.Msg.YESNO,icon:Ext.Msg.QUESTION,fn:function(g,h){if(g==="yes"){d.un("beforeremove",this.removeTabEvent,this);d.remove(e);d.addListener("beforeremove",this.removeTa! bEvent,this)}}})}else{return true}return false}else{return true}},WinCommit:function(j,i,e){var f,c,k,g,a,b,d,h;c=Ext.get("acc-need-update");if(!f){f=new Ext.Window({scope:this,id:"winCvsCommit",title:_("CVS commit"),closable:false,layout:"form",width:400,height:480,resizable:false,modal:true,bodyStyle:"padding:5px 5px 0",labelAlign:"top",items:[{xtype:"checktreepanel",id:"tree-panel",anchor:"100%",height:180,autoScroll:true,rootVisible:false,root:{text:"root",expanded:true,children:[]}},{scope:this,xtype:"combo",fieldLabel:_("Older messages"),editable:false,name:"first2",anchor:"100%",store:this.storeCommitLogMessage,triggerAction:"all",tpl:'<tpl for="."><div class="x-combo-list-item">{[values.text.split("\n").join("<br/>")]}</div></tpl>',valueField:"id",displayField:"text",listeners:{scope:this,render:function(){this.storeCommitLogMessage.load()},select:function(n,l,m){Ext.getCmp("form-commit-message-log").setValue(l.data.text)}}},{xtype:"textarea",id:"form-commit-message! -log",fieldLabel:_("Log message"),name:"first3",anchor:"100%",height:1 50,value:""}],tools:[{scope:this,id:"gear",qtip:_("Configure this tools"),handler:function(){var o,m,n;function l(p){return p.split("\n").join("<br/>")}o=new Ext.form.TextArea({grow:true,growMin:120});m=new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),{id:"GridManageLog",header:_("Log message"),dataIndex:"text",renderer:l,editor:new Ext.Editor(o,{shadow:false,autoSize:true,listeners:{scope:this,complete:function(r,s,q){var p=r.record.data.id;XHR({scope:this,url:"./php/controller.php",params:{task:"saveLogMessage",messID:p,mess:s},success:function(t){this.storeCommitLogMessage.getById(p).commit()},failure:function(t){this.winForbidden()}})}}})}]);n=new Ext.Window({title:_("Manage Log Message"),iconCls:"winManageLog",width:650,height:350,layout:"fit",resizable:false,modal:true,autoScroll:true,html:'<div class="diff-content"></div>',items:[{xtype:"editorgrid",store:this.storeCommitLogMessage,loadMask:true,cm:m,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),autoExpan! dColumn:"GridManageLog",listeners:{scope:this,rowcontextmenu:function(p,s,q){p.getSelectionModel().selectRow(s);var r=new Ext.menu.Menu({items:[{text:_("Delete this Log Message"),iconCls:"iconDelete",scope:this,handler:function(){XHR({scope:this,url:"./php/controller.php",params:{task:"deleteLogMessage",messID:this.storeCommitLogMessage.getAt(s).data.id},success:function(t){this.storeCommitLogMessage.remove(this.storeCommitLogMessage.getAt(s))},failure:function(t){this.winForbidden()}})}}]});r.showAt(q.getXY())}}}],buttons:[{text:_("Close"),handler:function(){n.close()}}],listeners:{scope:this,close:function(){this.storeCommitLogMessage.reload()}}});n.show()}}],buttons:[{scope:this,text:_("Submit"),id:"win-commit-btn-submit",handler:function(){var l,p,s,u,m,n,q=[],t,r="",o;if(this.userLogin==="cvsread"){f.close();this.winForbidden();return}l=Ext.getCmp("tree-panel").getValue();p=[];for(o=0;o<l.length;o=o+1){s=Ext.getCmp("tree-panel").getNodeById(l[o]).attributes;u="FE-"+Ext! .util.md5("FE-"+s.FilePath+s.FileName);m="FNU-"+Ext.util.md5("FNU-"+s. FilePath+s.FileName);n="FNR-"+Ext.util.md5("FNR-"+s.FilePath+s.FileName);if(Ext.getCmp("main-panel").findById(u)||Ext.getCmp("main-panel").findById(m)||Ext.getCmp("main-panel").findById(n)){if(Ext.getCmp("main-panel").findById(u)){t=u}if(Ext.getCmp("main-panel").findById(m)){t=m}if(Ext.getCmp("main-panel").findById(n)){t=n}q[0]=t;q[1]=s.FileName;p.push(q)}}if(p.length>0){for(o=0;o<p.length;o=o+1){r+=p[o][1]+"<br/>"}Ext.MessageBox.show({scope:this,title:"Warning",msg:(p.length>1)?String.format(_("There is {0} files to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?"),p.length,r):String.format(_("There is {0} file to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?"),p.length,r),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,fn:function(v){if(v==="yes"){for(o=0;o<p.length;o=o+1){Ext.getCmp("main-panel").remove(p[o][0])}this.WinCommitLastStep(l,this)}else{return}}})}else{this.WinCommitLastStep(l,this)}return}! },{text:_("Close"),id:"win-commit-btn-close",handler:function(){f.close()}}]})}f.show(c);if(j){k=this.pendingCommitGrid.store.getAt(i).data.id;a=this.pendingCommitGrid.store.getAt(i).data.path;b=this.pendingCommitGrid.store.getAt(i).data.name;g=Ext.util.md5(a+b);d=new Ext.tree.TreeNode({id:"need-commit-"+g,text:a+b,FileDBID:k,FilePath:a,FileName:b,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(d)}else{this.pendingCommitGrid.store.each(function(l){if(e&&e==="by me"&&l.data.by!==this.userLogin){}else{k=l.data.id;a=l.data.path;b=l.data.name;g=Ext.util.md5(a+b);d=new Ext.tree.TreeNode({id:"need-commit-"+g,text:a+b,FileDBID:k,FilePath:a,FileName:b,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(d)}},this);h=new Ext.tree.TreeSorter(Ext.getCmp("tree-panel"),{});h.doSort(Ext.getCmp("tree-panel").getRootNode())}},WinCommitLastStep:function(f,c){Ext.g! etBody().mask('<img src="themes/img/loading.gif" style="vertical-align : middle;" /> '+_("Please, wait until commit..."));var a=[],e,d,b;for(b=0;b<f.length;b=b+1){e=Ext.getCmp("tree-panel").getNodeById(f[b]);a.push(e.attributes.FileDBID)}d=Ext.getCmp("form-commit-message-log").getValue();Ext.getCmp("winCvsCommit").close();XHR({url:"./php/controller.php",params:{task:"cvsCommit",nodes:Ext.util.JSON.encode(a),logMessage:d},success:function(h){var i=Ext.util.JSON.decode(h.responseText);Ext.getBody().unmask();var g=new Ext.Window({title:_("Status"),width:450,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:i.mess.join("<br/>"),buttons:[{text:_("Close"),handler:function(){g.close()}}]});g.show();Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"onSuccesCommit",nodes:Ext.util.JSON.encode(a),logMessage:d},success:function(j){if(c.userLang!="en"){c.errorFileGrid.store.reload();c.pendin! gReviewGrid.store.reload();c.staleFileGrid.store.reload()}c.pendingCommitGrid.store.reload();ui.component.TranslatorGrid.reload();ui.component.SummaryGrid.reload();Ext.getBody().unmask()}})}})},WinUpdate:function(){var e,d;function c(f){phpDoc.TaskPing.cancel();Ext.get("wizard-step-1").replaceClass("wizard-step-before","wizard-step-working");Ext.get("wizard-step-1.1").replaceClass("wizard-wait","wizard-show");XHR({scope:f,url:"./php/controller.php",params:{task:"updateRepository"},success:function(g){Ext.get("wizard-step-1").replaceClass("wizard-step-working","wizard-step-done");Ext.get("wizard-step-1.1").replaceClass("wizard-show","wizard-wait");b(f)},failure:function(h){var j=Ext.util.JSON.decode(h.responseText);if(j&&j.success===false){e.close();this.winForbidden()}else{function i(){XHR({scope:f,url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_update_repository"},success:function(k){g.delay(5000)},failure:function(k){var l=Ext.util.JSON.decode(k.res! ponseText);if(l&&l.success===false){Ext.get("wizard-step-1").replaceCl ass("wizard-step-working","wizard-step-done");Ext.get("wizard-step-1.1").replaceClass("wizard-show","wizard-wait");b(this)}else{g.delay(5000)}}})}var g=new Ext.util.DelayedTask(function(){i()});g.delay(5000)}}})}function b(f){Ext.get("wizard-step-2").replaceClass("wizard-step-before","wizard-step-working");XHR({scope:f,url:"./php/controller.php",params:{task:"applyTools"},success:function(g){Ext.get("wizard-step-2").replaceClass("wizard-step-working","wizard-step-done");a(this)},failure:function(h){function i(){XHR({scope:f,url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_apply_tools"},success:function(j){g.delay(5000)},failure:function(j){var k=Ext.util.JSON.decode(j.responseText);if(k&&k.success===false){Ext.get("wizard-step-2").replaceClass("wizard-step-working","wizard-step-done");a(this)}else{g.delay(5000)}}})}var g=new Ext.util.DelayedTask(function(){i()});g.delay(5000)}})}function a(f){Ext.get("wizard-step-3").replaceClass("wizard-step-before","w! izard-step-working");if(phpDoc.userLang!="en"){phpDoc.staleFileGrid.store.reload();ui.component.TranslatorGrid.reload();phpDoc.errorFileGrid.store.reload()}Ext.get("wizard-step-3").replaceClass("wizard-step-working","wizard-step-done");Ext.getCmp("btn-start-refresh").setIconClass("finishRefresh");Ext.getCmp("btn-start-refresh").setText(_("Finish !"));Ext.getCmp("btn-start-refresh").setHandler(function(){e.close()});Ext.getCmp("btn-start-refresh").enable();phpDoc.TaskPing.delay(30000);e.tools.close.setVisible(true)}d=Ext.get("acc-need-update");if(!e){e=new Ext.Window({title:_("Refresh all data"),layout:"form",width:300,height:200,resizable:false,modal:true,bodyStyle:"padding:15px 15px 0",iconCls:"refresh",html:'<div id="wizard-step-1" class="wizard-step-before">'+_("Update all files from Cvs")+'</div><div id="wizard-step-1.1" class="wizard-wait">'+_("This may take time. Thank you for your patience...")+'</div><div id="wizard-step-2" class="wizard-step-before">'+_("Apply all ! tools")+'</div><div id="wizard-step-3" class="wizard-step-before">'+_( "Reload data")+"</div>",buttons:[{scope:this,text:_("Start"),id:"btn-start-refresh",iconCls:"startRefresh",handler:function(){Ext.getCmp("btn-start-refresh").disable();e.tools.close.setVisible(false);Ext.getDom("lastUpdateTime").innerHTML=_("update in progress...");c(this)}}]})}Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Verify if there is an update in progress. Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getLastUpdate"},success:function(f){Ext.getBody().unmask();var g=Ext.util.JSON.decode(f.responseText);if(g.lastupdate==="in_progress"){Ext.MessageBox.show({title:_("Status"),msg:_("There is currently an update in progress.<br/>You can't perform an update now."),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO})}else{e.show(d)}}})},WinCheckBuild:function(){var c,a;a=Ext.get("acc-need-update");function b(d){XHR({scope:d,url:"./php/controller.php",params:{task:"getLogFile",file:"log_check_build"},success:! function(e){var f=Ext.util.JSON.decode(e.responseText);phpDoc.TaskPing.delay(30000);if(Ext.getCmp("main-panel").findById("check_build_panel")){Ext.getCmp("main-panel").remove("check_build_panel")}Ext.getCmp("main-panel").add({xtype:"panel",id:"check_build_panel",title:_("Check Build Result"),closable:true,autoScroll:true,iconCls:"checkBuild",html:'<div class="check-build-content">'+f.mess+"</div>"});Ext.getCmp("main-panel").setActiveTab("check_build_panel")}})}if(!c){c=new Ext.Window({title:_("Check Build"),iconCls:"checkBuild",layout:"form",width:350,height:200,resizable:false,modal:true,bodyStyle:"padding:5px 5px 0",labelAlign:"top",buttons:[{scope:this,text:_("Go !"),id:"win-check-build-btn-submit",handler:function(){var d=Ext.getCmp("option-xml-details").checked;c.close();Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait until the build is checked..."));phpDoc.TaskPing.cancel();XHR({scope:this,url:"./php/controlle! r.php",params:{task:"checkBuild",xmlDetails:d},success:function(e){Ext ..getBody().unmask();b(this)},failure:function(e){var h=Ext.util.JSON.decode(e.responseText);if(h&&h.success===false){phpDoc.TaskPing.delay(30000);Ext.getBody().unmask();this.winForbidden()}else{function f(i){XHR({scope:i,url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_check_build"},success:function(j){g.delay(5000)},failure:function(j){var k=Ext.util.JSON.decode(j.responseText);if(k&&k.success===false){Ext.getBody().unmask();b(this)}else{g.delay(5000)}}})}var g=new Ext.util.DelayedTask(function(){f(this)},this);g.delay(5000)}}})}}],items:[{xtype:"panel",baseCls:"x-plain",bodyStyle:"padding:5px 5px 0",html:_("You're about to check the build via this command:")+"<br/><br/>/usr/bin/php configure.php --with-lang="+this.userLang+"<br><br>",modal:false},{xtype:"checkbox",hideLabel:true,checked:false,boxLabel:_("Enable detailed XML error messages"),name:"option-xml-details",id:"option-xml-details"}]})}c.show(a)},WinConf:function(){new ui.component.EditorConf(! ).show(Ext.get("winconf-btn"))},confUpdate:function(b,a){XHR({scope:this,url:"./php/controller.php",params:{task:"confUpdate",item:b,value:a},success:function(c){if(b==="conf_theme"){this.userConf.conf_theme=a}if(b==="conf_needupdate_diff"){this.userConf.conf_needupdate_diff=a}if(b==="conf_needupdate_scrollbars"){this.userConf.conf_needupdate_scrollbars=""+a+""}if(b==="conf_needupdate_displaylog"){this.userConf.conf_needupdate_displaylog=""+a+""}if(b==="conf_error_skipnbliteraltag"){this.userConf.conf_error_skipnbliteraltag=""+a+"";this.errorFileGrid.store.reload()}if(b==="conf_error_scrollbars"){this.userConf.conf_error_scrollbars=""+a+""}if(b==="conf_error_displaylog"){this.userConf.conf_error_displaylog=""+a+""}if(b==="conf_reviewed_scrollbars"){this.userConf.conf_reviewed_scrollbars=""+a+""}if(b==="conf_reviewed_displaylog"){this.userConf.conf_reviewed_displaylog=""+a+""}if(b==="conf_allfiles_displaylog"){this.userConf.conf_allfiles_displaylog=""+a+""}if(b==="conf_patch! _scrollbars"){this.userConf.conf_patch_scrollbars=""+a+""}if(b==="conf _patch_displaylog"){this.userConf.conf_patch_displaylog=""+a+""}}})},WinAbout:function(){new ui.component.About().show(Ext.get("winabout-btn"))},sendEmail:function(b,a){var c,d;c=new Ext.form.FormPanel({baseCls:"x-plain",labelWidth:55,url:"save-form.php",defaultType:"textfield",items:[{fieldLabel:_("Send To"),name:"to",readOnly:true,anchor:"100%",value:'"'+b+'" <'+a+">"},{fieldLabel:_("Subject"),name:"subject",anchor:"100%"},{xtype:"textarea",hideLabel:true,name:"msg",anchor:"100% -53"}]});d=new Ext.Window({title:_("Send an email"),width:500,height:300,minWidth:300,minHeight:200,layout:"fit",plain:true,bodyStyle:"padding:5px;",buttonAlign:"center",items:c,iconCls:"iconSendEmail",buttons:[{text:_("Send"),handler:function(){var e=c.getForm().getValues();XHR({url:"./php/controller.php",params:{task:"sendEmail",to:e.to,subject:e.subject,msg:e.msg},success:function(f){d.close();Ext.MessageBox.alert(_("Status"),String.format(_("Email sent to {0} with success!"),b))}})}},{text:_("C! ancel"),handler:function(){d.close()}}]});d.show()},repositoryContextMenu:function(e){var b,a,c,d;if(e.attributes.type==="folder"||e.isRoot){return new Ext.menu.Menu({items:[{text:(e.isExpanded())?"<b>"+_("Collapse")+"</b>":"<b>"+_("Expand")+"</b>",iconCls:"iconFolderClose",handler:function(){if(e.isExpanded()){e.collapse()}else{e.expand()}}}]})}else{if(e.attributes.type==="file"){a=e.attributes.text;c=e.attributes.id;b=c.split("/");b.shift();b.shift();b.pop();d=b.shift();c=b.join("/")+"/";return new Ext.menu.Menu({items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"iconTabNeedReviewed",handler:function(){phpDoc.treeAllFiles.fireEvent("dblclick",e)}},{hidden:(e.attributes.from==="search"),scope:this,text:(d==="en")?String.format(_("Open the same file in <b>{0}</b>"),Ext.util.Format.uppercase(this.userLang)):String.format(_("Open the same file in <b>{0}</b>"),"EN"),iconCls:"iconTabNeedReviewed",handler:function(){if(d==="en"){this.openFile(this.userLang+"/"+! c,a)}else{this.openFile("en/"+c,a)}}}]})}}},drawInterface:function(){v ar g,d,a,f,e,h,c,b;phpDoc.TaskPing=new ui.task.PingTask();phpDoc.TaskPing.delay(30000);this.staleFileGrid=new ui.component.StaleFileGrid();this.errorFileGrid=new ui.component.ErrorFileGrid();this.pendingPatchGrid=new ui.component.PendingPatchGrid();this.notInENGrid=new ui.component.NotInENGrid();this.pendingCommitGrid=new ui.component.PendingCommitGrid();this.pendingReviewGrid=new ui.component.PendingReviewGrid();this.treeAllFiles=new ui.component.RepositoryTree();g=new ui.component.SummaryGrid();d=new ui.component.TranslatorGrid();a=new ui.component.LocalMailGrid();f=new ui.component.BugsGrid();e=new ui.component.TranslationGraph();c=new ui.component.MainMenu();if(this.userLang==="en"){b=[a]}else{b=[g,d,a,f,e]}h=new Ext.Viewport({layout:"border",items:[{region:"north",html:'<h1 class="x-panel-header"><img src="themes/img/mini_php.png" style="vertical-align: middle;" /> '+this.appName+"</h1>",autoHeight:true,border:false,margins:"0 0 5 0"},{region:"west",collapsib! le:true,collapseMode:"mini",animate:true,split:true,layout:"fit",width:300,autoScroll:true,items:[{layout:"accordion",animate:true,bodyBorder:false,border:false,tbar:[{text:_("Main Menu"),iconCls:"MainMenu",menu:c}],items:[{id:"acc-need-update",title:_("Files Need Update")+' - <em id="acc-need-update-nb">0</em>',layout:"fit",iconCls:"FilesNeedUpdate",hidden:(this.userLang==="en"),items:[this.staleFileGrid],collapsed:true,listeners:{expand:function(i){Ext.getCmp("FNU-filter").wrap.setWidth(200)}}},{id:"acc-error",title:_("Error in current translation")+' - <em id="acc-error-nb">0</em>',layout:"fit",iconCls:"FilesError",hidden:(this.userLang==="en"),items:[this.errorFileGrid],collapsed:true,listeners:{expand:function(i){Ext.getCmp("FE-filter").wrap.setWidth(200)}}},{id:"acc-need-reviewed",title:_("Files Need Reviewed")+' - <em id="acc-need-reviewed-nb">0</em>',layout:"fit",iconCls:"FilesNeedReviewed",hidden:(this.userLang==="en"),items:[this.pendingReviewGrid],collapsed:true,! listeners:{expand:function(i){Ext.getCmp("FNR-filter").wrap.setWidth(2 00)}}},{id:"acc-notInEn",title:_("Not in EN tree")+' - <em id="acc-notInEn-nb">0</em>',layout:"fit",iconCls:"NotInEn",hidden:(this.userLang==="en"),items:[this.notInENGrid],collapsed:true},{id:"acc-all-files",title:_("All files"),layout:"fit",iconCls:"AllFiles",items:[this.treeAllFiles],collapsed:true,listeners:{expand:function(i){Ext.getCmp("AF-search").wrap.setWidth(200)}}},{id:"acc-need-pendingCommit",title:_("Pending for commit")+' - <em id="acc-pendingCommit-nb">0</em>',layout:"fit",iconCls:"PendingCommit",items:[this.pendingCommitGrid],collapsed:true},{id:"acc-need-pendingPatch",title:_("Pending Patch")+' - <em id="acc-pendingPatch-nb">0</em>',layout:"fit",iconCls:"PendingPatch",items:[this.pendingPatchGrid],collapsed:true}]}]},{xtype:"tabpanel",id:"main-panel",region:"center",activeTab:0,enableTabScroll:true,layoutOnTabChange:true,plugins:new Ext.ux.TabCloseMenu(),listeners:{scope:this,beforeremove:this.removeTabEvent},items:[{xtype:"panel",id:"MainInfoTabPanel",title! :_("Home"),baseCls:"MainInfoTabPanel",autoScroll:true,plain:true,items:[{xtype:"panel",border:false,html:'<div class="res-block"><div class="res-block-inner"><h3>'+String.format(_("Connected as <em>{0}</em>"),this.userLogin)+"<br/><br/>"+String.format(_('Last data update: <em id="lastUpdateTime">{0}</em>'),"-")+"</h3></div></div>"},{xtype:"tabpanel",activeTab:0,plain:true,autoScroll:true,height:400,border:false,items:b,defaults:{border:true},layoutOnTabChange:true}]}]}]});Ext.get("loading").remove();Ext.fly("loading-mask").fadeOut({remove:true});if(directAccess){this.openFile(directAccess.lang+directAccess.path,directAccess.name)}}}}();Ext.EventManager.onDocumentReady(phpDoc.init,phpDoc,true); \ No newline at end of file +function log(){if(console){console.log.apply(this,arguments)}}function _(a){try{var c=i18n[a];if(c===undefined){c=a;log("FIX ME : i18n not found for the string: "+a)}return c}catch(b){return a}}function XHR(c){var b=c.success,d=c.failure,a=c.callback;c.failure=c.success=Ext.emptyFn;c.callback=function(g,j,f){var i=null;try{i=Ext.decode(f.responseText)}catch(h){log("Invalid XHR JSON Response:"+f.responseText)}if(j&&i&&i.success){if(b!==undefined){Ext.callback(b,c.scope,[f,g])}}else{if(d!==undefined){Ext.callback(d,c.scope,[f,g])}}if(a!==undefined){Ext.callback(a,c.scope,[g,j,f])}};Ext.Ajax.request(c)}Ext.namespace("ui","ui.task");ui.task.AcceptPatchTask=function(a){Ext.apply(this,a);if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}Ext.MessageBox.confirm(_("Confirm"),_("This action will accept this patch, send an email to his author, save the file and close this tab."),function(b){if(b==="yes"){Ext.getCmp("PP-PATCH-PANEL-btn-save-"+this.fid).disable();Ext.getCmp(! "PP-PATCH-FILE-"+this.fid).isModified=false;Ext.getCmp("PP-PATCH-PANEL-"+this.fid).setTitle(Ext.getCmp("PP-PATCH-PANEL-"+this.fid).originTitle);Ext.getCmp("PP-"+this.fid).setTitle(Ext.getCmp("PP-"+this.fid).originTitle);var c=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:"all",fileContent:Ext.getCmp("PP-PATCH-FILE-"+this.fid).getCode()},success:function(d){var f=Ext.util.JSON.decode(d.responseText),e=ui.component.PendingPatchGrid.instance;ui.component.PendingCommitGrid.instance.addRecord(f.id,this.fpath,this.fname,"update");e.store.remove(this.storeRecord);e.store.fireEvent("add",e.store);XHR({scope:this,url:"./php/controller.php",params:{task:"afterPatchAccept",PatchUniqID:this.fuid}});c.hide();Ext.getCmp("main-panel").remove("PP-"+this.fid)},failure:function(d){c.hide()}})}},this)};Ext.namespace("ui","ui.task");ui.task.CheckFileTask=function(a){Ext.apply(this,a);! Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical- align: middle;" /> '+_("Checking for error. Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"checkFileError",FilePath:this.fpath,FileName:this.fname,FileLang:this.lang,FileContent:Ext.getCmp(this.prefix+"-"+this.ftype+"-FILE-"+this.fid).getCode()},success:function(b){Ext.getBody().unmask();var c=Ext.util.JSON.decode(b.responseText);if(c.error&&c.error_first!=="-No error-"){Ext.getCmp("main-panel").add({id:"FE-help-"+this.fid,title:"Error in "+this.fname,iconCls:"FilesError",closable:true,autoScroll:true,autoLoad:"./error_type.php?dir="+this.fpath+"&file="+this.fname});Ext.getCmp("main-panel").setActiveTab("FE-help-"+this.fid)}else{Ext.MessageBox.show({title:_("Check for errors"),msg:_("There is no error."),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO})}new ui.task.SaveLangFileTask({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:this.fpath,fname:this.fname,lang:this.lang,storeRecord:this.storeRecord});if(this.prefix==="FE"){Ext.getCmp(! this.prefix+"-error-type-"+this.fid).setSrc("./error_type.php?dir="+this.fpath+"&file="+this.fname+"&nocache="+new Date().getTime())}}})};Ext.namespace("ui","ui.task");ui.task.ClearLocalChangeTask=function(a){Ext.apply(this,a);if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}Ext.MessageBox.confirm(_("Confirm"),_("This action will clear your local modification and take back this file from his original stats.<br/>You need confirm."),function(b){if(b==="yes"){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));if(Ext.getCmp("main-panel").findById("FNU-"+Ext.util.md5("FNU-"+this.fpath+this.fname))){Ext.getCmp("main-panel").remove("FNU-"+Ext.util.md5("FNU-"+this.fpath+this.fname))}XHR({scope:this,url:"./php/controller.php",params:{task:"clearLocalChange",FileType:this.ftype,FilePath:this.fpath,FileName:this.fname},success:function(c){if(phpDoc.userLang==="en"){ui.component.StaleFileGrid.instance.store.relo! ad();ui.component.ErrorFileGrid.instance.store.reload();ui.component.P endingReviewGrid.instance.store.reload()}ui.component.PendingCommitGrid.instance.store.remove(this.storeRecord);ui.component.PendingCommitGrid.instance.store.fireEvent("add",ui.component.PendingCommitGrid.instance.store);ui.component.NotInENGrid.instance.store.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);ui.component.PendingReviewGrid.instance.store.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);ui.component.StaleFileGrid.instance.store.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);ui.component.ErrorFileGrid.instance.store.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);var d=ui.component.RepositoryTree.instance.getNodeById("//"+this.fpath+this.fname);if(d){d.getUI().rem! oveClass("modified")}Ext.getBody().unmask()},failure:function(c){Ext.getBody().unmask();phpDoc.winForbidden()}})}},this)};Ext.namespace("ui","ui.task");ui.task.GetFileTask=function(b){Ext.apply(this,b);var a=this.prefix+"-"+this.ftype;Ext.get(a+"-PANEL-"+this.fid).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Loading..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getFile",FilePath:this.fpath,FileName:this.fname},success:function(c){var d=Ext.util.JSON.decode(c.responseText);Ext.getCmp(a+"-FILE-"+this.fid).setCode(d.content);Ext.get(a+"-PANEL-"+this.fid).unmask()},callback:function(){if(phpDoc.filePendingOpen[0]){phpDoc.filePendingOpen.shift();if(phpDoc.filePendingOpen[0]){if(phpDoc.filePendingOpen[0].fpath){ui.component.RepositoryTree.instance.openFile(phpDoc.filePendingOpen[0].fpath,phpDoc.filePendingOpen[0].fname)}}}}})};Ext.namespace("ui","ui.task");ui.task.LoadConfigTask=function(a){Ext.apply(this,a);XHR({url:"./php/cont! roller.php",params:{task:"getConf"},success:function(b){var c=Ext.deco de(b.responseText);phpDoc.userLogin=c.mess.userLogin;phpDoc.userLang=c.mess.userLang;phpDoc.userConf.conf_needupdate_diff=c.mess.userConf.conf_needupdate_diff;phpDoc.userConf.conf_needupdate_scrollbars=c.mess.userConf.conf_needupdate_scrollbars;phpDoc.userConf.conf_needupdate_displaylog=c.mess.userConf.conf_needupdate_displaylog;phpDoc.userConf.conf_error_skipnbliteraltag=c.mess.userConf.conf_error_skipnbliteraltag;phpDoc.userConf.conf_error_scrollbars=c.mess.userConf.conf_error_scrollbars;phpDoc.userConf.conf_error_displaylog=c.mess.userConf.conf_error_displaylog;phpDoc.userConf.conf_reviewed_scrollbars=c.mess.userConf.conf_reviewed_scrollbars;phpDoc.userConf.conf_reviewed_displaylog=c.mess.userConf.conf_reviewed_displaylog;phpDoc.userConf.conf_allfiles_displaylog=c.mess.userConf.conf_allfiles_displaylog;phpDoc.userConf.conf_patch_scrollbars=c.mess.userConf.conf_patch_scrollbars;phpDoc.userConf.conf_patch_displaylog=c.mess.userConf.conf_patch_displaylog;phpDoc.userConf.conf! _theme=c.mess.userConf.conf_theme;Ext.get("appTheme").dom.href=phpDoc.userConf.conf_theme;phpDoc.loadDataStore();phpDoc.drawInterface()}})};Ext.namespace("ui","ui.task");ui.task.MarkDeleteTask=function(a){Ext.apply(this,a);Ext.MessageBox.confirm(_("Confirm"),_("This action will mark this file as need deleted.<br/><br/>You need commit this change to take it effect.<br/><br/>Please, confirm this action."),function(b){if(b==="yes"){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"markAsNeedDelete",FilePath:this.fpath,FileName:this.fname},success:function(c){var d=Ext.util.JSON.decode(c.responseText);Ext.getBody().unmask();ui.component.PendingCommitGrid.instance.addRecord(d.id,phpDoc.userLang+this.fpath,this.fname,"delete");this.storeRecord.set("needcommit",true)}})}},this)};Ext.namespace("ui","ui.task");ui.task.PingTask=function(){ui.task.PingTask.instance=t! his;this.task=new Ext.util.DelayedTask(function(){XHR({url:"./php/cont roller.php",params:{task:"ping"},success:function(a){var c=Ext.util.JSON.decode(a.responseText);if(c.ping!=="pong"){window.location.href="./"}else{if(c.lastupdate==="in_progress"){Ext.getDom("lastUpdateTime").innerHTML=_("update in progress...")}else{var b=Date.parseDate(c.lastupdate,"Y-m-d H:i:s");Ext.getDom("lastUpdateTime").innerHTML=b.format(_("Y-m-d, H:i"))}}},failure:function(){window.location.href="./"}});this.task.delay(30000)},this);this.delay=function(b,d,c,a){this.task.delay(b,d,c,a)};this.cancel=function(){this.task.cancel()}};ui.task.PingTask.prototype.instance=null;Ext.namespace("ui","ui.task");ui.task.RejectPatchTask=function(a){Ext.apply(this,a);if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}Ext.MessageBox.confirm(_("Confirm"),_("This action will <b>reject</b> this patch, send an email to his author and close this tab."),function(b){if(b==="yes"){var c=Ext.MessageBox.wait(_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{! task:"afterPatchReject",PatchUniqID:this.fuid},success:function(d){var e=ui.component.PendingPatchGrid.instance;e.store.remove(this.storeRecord);e.store.fireEvent("add",e.store);Ext.getCmp("main-panel").remove("PP-"+this.fid);c.hide()},failure:function(d){c.hide();phpDoc.winForbidden()}})}},this)};Ext.namespace("ui","ui.task");ui.task.SaveENFileTask=function(b){Ext.apply(this,b);var a=this.prefix+"-"+this.ftype,c=Ext.MessageBox.wait(_("Saving data..."));if(phpDoc.userLogin==="cvsread"){c.hide();phpDoc.winForbidden();return}XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:"en",fileContent:Ext.getCmp(this.prefix+"-"+this.ftype+"-FILE-"+this.fid).getCode()},success:function(d){var e=Ext.util.JSON.decode(d.responseText);if(this.prefix==="FNU"){this.storeRecord.set("en_revision","1."+e.en_revision);this.storeRecord.set("needcommit",true)}if(this.prefix==="FE"){this.storeRecord.set("needcommit",true)}if(this.prefi! x==="FNR"){this.storeRecord.set("needcommit",true)}if(this.prefix==="A F"){this.storeRecord.getUI().addClass("modified")}ui.component.PendingCommitGrid.instance.addRecord(e.id,"en"+this.fpath,this.fname,"update");Ext.getCmp(a+"-PANEL-btn-save-"+this.fid).disable();Ext.getCmp(a+"-FILE-"+this.fid).isModified=false;Ext.getCmp(a+"-PANEL-"+this.fid).setTitle(Ext.getCmp(a+"-PANEL-"+this.fid).originTitle);if(this.ftype==="ALL"||!Ext.getCmp(this.prefix+"-LANG-FILE-"+this.fid).isModified){Ext.getCmp(this.prefix+"-"+this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle)}c.hide()},failure:function(d){c.hide();phpDoc.winForbidden()}})};Ext.namespace("ui","ui.task");ui.task.SaveLangFileTask=function(b){Ext.apply(this,b);var a=this.prefix+"-"+this.ftype,c=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:this.lang,fileContent:Ext.getCmp(this.prefix+"-"+this.ftype+"-FILE-"+this.fid).getCode()},success:function(d){var e=Ext.util.JSON.decode(! d.responseText);if(this.prefix==="FE"){this.storeRecord.set("needcommit",true);this.storeRecord.set("maintainer",e.maintainer);this.storeRecord.commit()}if(this.prefix==="FNU"){this.storeRecord.set("revision","1."+e.new_revision);this.storeRecord.set("needcommit",true);this.storeRecord.set("maintainer",e.maintainer);this.storeRecord.commit()}if(this.prefix==="FNR"){this.storeRecord.set("needcommit",true);this.storeRecord.set("maintainer",e.maintainer);this.storeRecord.set("reviewed",e.reviewed);this.storeRecord.commit()}if(this.prefix==="AF"){this.storeRecord.getUI().addClass("modified")}ui.component.PendingCommitGrid.instance.addRecord(e.id,this.lang+this.fpath,this.fname,"update");Ext.getCmp(a+"-PANEL-btn-save-"+this.fid).disable();Ext.getCmp(a+"-FILE-"+this.fid).isModified=false;Ext.getCmp(a+"-PANEL-"+this.fid).setTitle(Ext.getCmp(a+"-PANEL-"+this.fid).originTitle);if(this.ftype==="ALL"||!Ext.getCmp(this.prefix+"-EN-FILE-"+this.fid).isModified){Ext.getCmp(this.prefix+"-"! +this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle)} c.hide()},failure:function(d){c.hide();phpDoc.winForbidden()}})};Ext.namespace("ui","ui.task");ui.task.SavePatchTask=function(b){Ext.apply(this,b);var a=this.prefix+"-"+this.ftype,c=Ext.MessageBox.wait(_("Saving data as a patch..."));Ext.getCmp(a+"-PANEL-btn-saveas-"+this.fid).disable();Ext.getCmp(a+"-FILE-"+this.fid).isModified=false;Ext.getCmp(a+"-PANEL-"+this.fid).setTitle(Ext.getCmp(a+"-PANEL-"+this.fid).originTitle);if((this.prefix==="AF")||(this.lang==="en"&&Ext.getCmp(this.prefix+"-LANG-FILE-"+this.fid).isModified===false)||(this.lang!=="en"&&Ext.getCmp(this.prefix+"-EN-FILE-"+this.fid).isModified===false)){Ext.getCmp(this.prefix+"-"+this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle)}XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:this.lang,fileContent:Ext.getCmp(a+"-FILE-"+this.fid).getCode(),type:"patch",emailAlert:this.email},success:function(d){var f=Ext.util.JSON.decode(d.respon! seText),e=ui.component.PendingPatchGrid.instance;e.store.insert(0,new e.store.recordType({id:Ext.id("",""),path:this.lang+this.fpath,name:this.fname,by:phpDoc.userLogin,uniqID:f.uniqId,date:new Date()}));c.hide()}})};Ext.namespace("ui","ui.task");ui.task.UpdateConfTask=function(a){Ext.apply(this,a);XHR({scope:this,url:"./php/controller.php",params:{task:"confUpdate",item:this.item,value:this.value},success:function(b){switch(this.item){case"conf_theme":phpDoc.userConf.conf_theme=this.value;break;case"conf_needupdate_diff":phpDoc.userConf.conf_needupdate_diff=this.value;break;case"conf_needupdate_scrollbars":phpDoc.userConf.conf_needupdate_scrollbars=""+this.value+"";break;case"conf_needupdate_displaylog":phpDoc.userConf.conf_needupdate_displaylog=""+this.value+"";break;case"conf_error_skipnbliteraltag":phpDoc.userConf.conf_error_skipnbliteraltag=""+this.value+"";ui.component.ErrorFileGrid.instance.store.reload();break;case"conf_error_scrollbars":phpDoc.userConf.conf_error_s! crollbars=""+this.value+"";break;case"conf_error_displaylog":phpDoc.us erConf.conf_error_displaylog=""+this.value+"";break;case"conf_reviewed_scrollbars":phpDoc.userConf.conf_reviewed_scrollbars=""+this.value+"";break;case"conf_reviewed_displaylog":phpDoc.userConf.conf_reviewed_displaylog=""+this.value+"";break;case"conf_allfiles_displaylog":phpDoc.userConf.conf_allfiles_displaylog=""+this.value+"";break;case"conf_patch_scrollbars":phpDoc.userConf.conf_patch_scrollbars=""+this.value+"";break;case"conf_patch_displaylog":phpDoc.userConf.conf_patch_displaylog=""+this.value+"";break}}})};Ext.namespace("ui","ui.component");ui.component.About=Ext.extend(Ext.Window,{id:"win-about",iconCls:"iconHelp",layout:"fit",width:515,height:320,modal:true,plain:true,bodyStyle:"color:#000",buttons:[{text:_("Close"),handler:function(){Ext.getCmp("win-about").close()}}],initComponent:function(){Ext.apply(this,{title:String.format(_("About {0}"),phpDoc.appName),items:{xtype:"tabpanel",activeTab:0,autoTabs:true,border:false,defaults:{autoScroll:true},items:[{title:_("! About"),html:'<div id="phd-oe-about"><img src="themes/img/logo.png" alt="'+phpDoc.appName+'" /></div><div id="phd-oe-about-info">'+phpDoc.appName+" ver "+phpDoc.appVer+"<br/>UI: "+phpDoc.uiRevision+"<br/> Copyright © 2008-2009 The PHP Group<br/>"+_("Author:")+' <a href="mailto:yannick@php.net">Yannick Torrès</a> '+_('and <a href="http://cvs.php.net/viewvc.cgi/doc-editor/" target="_blank">others</a>')+"</div>"},{title:_("Credits"),bodyStyle:"padding:15px",html:'<div id="phd-oe-credit"><ul><li><a href="http://extjs.com" target="_blank">ExtJs Team</a><div class="phd-oe-credit-info">'+_("Javascript FrameWork")+'</div></li><li><a href="http://marijn.haverbeke.nl/codemirror/" target="_blank">CodeMirror</a><div class="phd-oe-credit-info">'+_("Code editor")+'</div></li><li><a href="http://famfamfam.com" target="_blank">famfamfam.com</a><div class="phd-oe-credit-info">'+_("Icon pack")+"</div></li></ul></div>"},{title:_("License"),autoLoad:{url:"./LICENSE"}}]}});ui.compon! ent.About.superclass.initComponent.call(this)}});Ext.namespace("ui","u i.component","ui.component._BugsGrid");ui.component._BugsGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getOpenBugs"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"title",mapping:"title"},{name:"link",mapping:"link"},{name:"description",mapping:"description"}]))});ui.component._BugsGrid.columns=[{id:"GridBugTitle",header:"Title",sortable:true,dataIndex:"title"}];ui.component._BugsGrid.view=new Ext.grid.GridView({forceFit:true,emptyText:_("No open Bugs"),enableRowBody:true,getRowClass:function(a,d,c,b){c.body='<p class="bug-desc">'+a.data.description+"</p>";return"x-grid3-row-expanded"}});ui.component.BugsGrid=Ext.extend(Ext.grid.GridPanel,{iconCls:"iconBugs",loadMask:true,stripeRows:true,autoHeight:true,width:800,autoExpandColumn:"GridBugTitle",store:ui.component._BugsGrid.store,columns:ui.component._BugsGrid.columns,view:ui.com! ponent._BugsGrid.view,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),listeners:{render:function(a){a.store.load.defer(20,a.store)},rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c);new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+_("Open in a new Tab")+"</b>",iconCls:"openInTab",handler:function(){a.fireEvent("rowdblclick",a,c,b)}},"-",{text:_("Refresh this grid"),iconCls:"refresh",handler:function(){a.store.reload()}}]}).showAt(b.getXY())},rowdblclick:function(c,g,f){var a=c.store.getAt(g).data.id,b=c.store.getAt(g).data.link,d=c.store.getAt(g).data.title;Ext.getCmp("main-panel").add({id:"mifp_bugs_"+a,xtype:"iframepanel",title:_("Loading..."),tabTip:d,iconCls:"iconBugs",loadMask:true,defaultSrc:b,listeners:{documentloaded:function(e){e.ownerCt.setTitle(Ext.util.Format.substr(d,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_bugs_"+a)}},initComponent:function(){Ext.apply(this,{title:String.format(_("Open bugs for {0}"),"doc-"+phpDoc.u! serLang),tbar:[{tooltip:_("Refresh this grid"),iconCls:"refresh",handl er:function(){ui.component.BugsGrid.reload()}}]});ui.component.BugsGrid.superclass.initComponent.call(this)}});ui.component.BugsGrid.reload=function(){ui.component._BugsGrid.store.reload()};Ext.namespace("ui","ui.component","ui.component._BuildStatus");ui.component._BuildStatus.ds=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getBuildStatusData"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"lang",mapping:"lang"},{name:"date",mapping:"date",type:"date",dateFormat:"Y-m-d H:i:s"},{name:"status",mapping:"status",type:"int"}]))});ui.component._BuildStatus.ds.setDefaultSort("date","desc");ui.component._BuildStatus.rendererLanguage=function(a){return'<div class="flag flag-'+a+'">'+a+"</div>"};ui.component._BuildStatus.rendererStatus=function(a){if(a===0){return"Nok"}else{return"Ok"}};ui.component._BuildStatus.columns=[{id:"date",header:_("Date"! ),sortable:true,dataIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))},{header:_("Language"),width:45,sortable:true,dataIndex:"lang",renderer:ui.component._BuildStatus.rendererLanguage},{header:_("Status"),width:45,sortable:true,dataIndex:"status",renderer:ui.component._BuildStatus.rendererStatus}];ui.component.BuildStatus=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"date",store:ui.component._BuildStatus.ds,columns:ui.component._BuildStatus.columns,view:new Ext.grid.GridView({forceFit:true,getRowClass:function(a,d,c,b){if(a.data.status===0){return"summary_3"}}}),listeners:{scope:this,render:function(a){a.store.load.defer(20,a.store)}}});Ext.namespace("ui","ui.component","ui.component._CheckDoc");ui.component._CheckDoc.ds=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getCheckDocData"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Re! cord.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{na me:"extension",mapping:"extension"},{name:"check_oldstyle",mapping:"check_oldstyle",type:"int"},{name:"check_undoc",mapping:"check_undoc",type:"int"},{name:"check_roleerror",mapping:"check_roleerror",type:"int"},{name:"check_badorder",mapping:"check_badorder",type:"int"},{name:"check_noseealso",mapping:"check_noseealso",type:"int"},{name:"check_noreturnvalues",mapping:"check_noreturnvalues",type:"int"},{name:"check_noparameters",mapping:"check_noparameters",type:"int"},{name:"check_noexamples",mapping:"check_noexamples",type:"int"},{name:"check_noerrors",mapping:"check_noerrors",type:"int"}]))});ui.component._CheckDoc.ds.setDefaultSort("extension","asc");ui.component._CheckDoc.renderer=function(b,a){if(b>0){a.css="check_doc_cell";return b}else{return}};ui.component._CheckDoc.columns=[new Ext.grid.RowNumberer(),{id:"extension",header:"Extension",sortable:true,dataIndex:"extension"},{header:"Not documented",width:45,sortable:true,dataIndex:"check_undoc",renderer:ui.component._! CheckDoc.renderer},{header:"Old style",width:45,sortable:true,dataIndex:"check_oldstyle",renderer:ui.component._CheckDoc.renderer},{header:"Bad refsect1 order",width:45,sortable:true,dataIndex:"check_badorder",renderer:ui.component._CheckDoc.renderer},{header:"No parameters",width:45,sortable:true,dataIndex:"check_noparameters",renderer:ui.component._CheckDoc.renderer},{header:"No return values",width:45,sortable:true,dataIndex:"check_noreturnvalues",renderer:ui.component._CheckDoc.renderer},{header:"No examples",width:45,sortable:true,dataIndex:"check_noexamples",renderer:ui.component._CheckDoc.renderer},{header:"No errors section",width:45,sortable:true,dataIndex:"check_noerrors",renderer:ui.component._CheckDoc.renderer},{header:"No see also",width:45,sortable:true,dataIndex:"check_noseealso",renderer:ui.component._CheckDoc.renderer},{header:"Refsect1 role error",width:45,sortable:true,dataIndex:"check_roleerror",renderer:ui.component._CheckDoc.renderer}];ui.component._Ch! eckDoc.fs=new Ext.data.SimpleStore({fields:[{name:"id"},{name:"file"}] });ui.component._CheckDoc.FileGrid=Ext.extend(Ext.grid.GridPanel,{id:"check-doc-file-grid",store:ui.component._CheckDoc.fs,loadMask:true,bodyBorder:false,autoExpandColumn:"file",sm:new Ext.grid.RowSelectionModel({listeners:{rowselect:function(c,b,a){Ext.getCmp("check-doc-btn-open-selected-files").enable()}}}),columns:[new Ext.grid.RowNumberer(),{id:"file",header:"Files",sortable:true,dataIndex:"file"}],listeners:{rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c)},rowdblclick:function(a,c,b){ui.component.RepositoryTree.instance.openFile("en"+a.fpath,a.store.getAt(c).data.file);Ext.getCmp("check-doc-file-win").close()}}});ui.component._CheckDoc.FileWin=Ext.extend(Ext.Window,{id:"check-doc-file-win",title:_("Files"),width:450,height:350,labelWidth:50,resizable:false,modal:true,autoScroll:true,layout:"fit",buttons:[{text:"Open all files",handler:function(){var c=Ext.getCmp("check-doc-file-win"),a=ui.component._CheckDoc.fs;phpDoc.filePendingOpen=new Array();for(va! r b=0;b<a.getCount();++b){phpDoc.filePendingOpen[b]={fpath:"en"+c.fpath,fname:a.getAt(b).data.file}}ui.component.RepositoryTree.instance.openFile(phpDoc.filePendingOpen[0].fpath,phpDoc.filePendingOpen[0].fname);c.close()}},{text:"Open selected files",id:"check-doc-btn-open-selected-files",disabled:true,handler:function(){var c=Ext.getCmp("check-doc-file-win"),b=Ext.getCmp("check-doc-file-grid").getSelectionModel().getSelections();phpDoc.filePendingOpen=new Array();for(var a=0;a<b.length;++a){phpDoc.filePendingOpen[a]={fpath:"en"+c.fpath,fname:b[a].data.file}}ui.component.RepositoryTree.instance.openFile(phpDoc.filePendingOpen[0].fpath,phpDoc.filePendingOpen[0].fname);c.close()}}]});ui.component.CheckDoc=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,store:ui.component._CheckDoc.ds,columns:ui.component._CheckDoc.columns,autoExpandColumn:"extension",sm:new Ext.grid.CellSelectionModel({singleSelect:true}),view:new Ext.grid.GridView({forceFit:true}),listeners:{re! nder:function(a){a.store.load.defer(20,a.store)},celldblclick:function (c,i,d,h){var a=c.getStore().getAt(i),g=c.getColumnModel().getDataIndex(d),f=a.get(g),b=a.data.path;if(Ext.num(f,false)&&f!=0){XHR({url:"./php/controller.php",params:{task:"getCheckDocFiles",path:b,errorType:g},success:function(e){var k=Ext.decode(e.responseText);ui.component._CheckDoc.fs.removeAll();for(var j=0;j<k.files.length;++j){ui.component._CheckDoc.fs.insert(0,new ui.component._CheckDoc.fs.recordType({id:j,file:k.files[j].name}))}ui.component._CheckDoc.fs.sort("file","asc");new ui.component._CheckDoc.FileWin({fpath:b,items:[new ui.component._CheckDoc.FileGrid({fpath:b})]}).show()}})}}}});Ext.namespace("ui","ui.component","ui.component._CVSLogGrid");ui.component._CVSLogGrid.store=Ext.extend(Ext.data.Store,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"revision",mapping:"revision"},{name:"date",mapping:"date",type:"date",dateFormat:"Y/m/d H:i:s"},{name:"author",mapping:"author"},{na! me:"content",mapping:"content"}]))});ui.component._CVSLogGrid.sm=Ext.extend(Ext.grid.CheckboxSelectionModel,{singleSelect:false,header:"",width:22,listeners:{beforerowselect:function(b){var a=b.getCount();if(a===2){return false}},rowselect:function(b){var a=b.getCount();if(a===2){Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).enable();Ext.get(b.prefix+"-PANEL-btn-log-"+b.fid).frame("3F8538")}else{Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).disable()}},rowdeselect:function(b){var a=b.getCount();if(a===2){Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).enable();Ext.get(b.prefix+"-PANEL-btn-log-"+b.fid).frame("3F8538")}else{Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).disable()}}}});ui.component._CVSLogGrid.columns=[{id:"id",header:"Rev.",width:40,sortable:false,dataIndex:"revision"},{header:"Content",width:130,sortable:true,dataIndex:"content"},{header:"By",width:50,sortable:true,dataIndex:"author"},{header:"Date",width:85,sortable:true,dataIndex:"date",renderer:Ext.util.Format.d! ateRenderer(_("Y-m-d, H:i"))}];ui.component.CVSLogGrid=Ext.extend(Ext. grid.GridPanel,{loadMask:true,autoScroll:true,bodyBorder:false,autoExpandColumn:"content",initComponent:function(){var d=new ui.component._CVSLogGrid.sm({fid:this.fid,prefix:this.prefix}),a=new ui.component._CVSLogGrid.store({autoLoad:this.loadStore,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:this.fpath,File:this.fname}}),c=[];c.push(d);for(var b=0;b<ui.component._CVSLogGrid.columns.length;++b){c.push(ui.component._CVSLogGrid.columns[b])}a.setDefaultSort("date","desc");Ext.apply(this,{sm:d,store:a,columns:c,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,id:this.prefix+"-PANEL-btn-log-"+this.fid,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",disabled:true,handler:function(){var g=this.getSelectionModel().getSelections(),f=g[0].data.revision,e=g[1].data.revision;Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Finding the diff. Please, wait..."));XHR({url:"./php/con! troller.php",params:{task:"getDiff2",FilePath:this.fpath,FileName:this.fname,Rev1:f,Rev2:e},success:function(i){var j=Ext.util.JSON.decode(i.responseText);Ext.getBody().unmask();var h=new Ext.Window({title:String.format(_("Diff between {0} & {1}"),f,e),width:650,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:'<div class="diff-content">'+j.content+"</div>",buttons:[{text:"Close",handler:function(){h.close()}}]});h.show()}})}},{scope:this,id:this.prefix+"-PANEL-btn-refreshlog-"+this.fid,tooltip:"<b>Load/Refresh</b> revisions",iconCls:"refresh",handler:function(){this.store.reload()}}]});ui.component.CVSLogGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._EditorConf");ui.component._EditorConf.tplMenu=new Ext.XTemplate('<tpl for=".">','<div class="thumb-wrap" id="tplMenu-{id}">','<div class="thumb"><img src="themes/img/{img}" title=""></div>',"<span>{label}</span>","</div>"! ,"</tpl>");ui.component._EditorConf.tplMenu.compile();ui.component._Ed itorConf.menuDefEn=[["1","go-home.png",_("Main")],["5","view-list-tree.png",_('Module "All files"')],["6","view-media-playlist.png",_('Module "Pending Patch"')]];ui.component._EditorConf.menuDefNonEn=[["1","go-home.png",_("Main")],["2","edit-redo.png",_('Module "Files Need Update"')],["3","dialog-cancel.png",_('Module "Files with Error"')],["4","document-properties.png",_('Module "Files need Reviewed"')],["5","view-list-tree.png",_('Module "All files"')],["6","view-media-playlist.png",_('Module "Pending Patch"')]];ui.component._EditorConf.menuStore=new Ext.data.SimpleStore({id:0,fields:[{name:"id"},{name:"img"},{name:"label"}]});ui.component._EditorConf.viewMenu=Ext.extend(Ext.DataView,{id:"conf-menu-view",tpl:ui.component._EditorConf.tplMenu,singleSelect:true,overClass:"x-view-over",itemSelector:"div.thumb-wrap",store:ui.component._EditorConf.menuStore,listeners:{selectionchange:function(b,a){var c=b.getSelectedRecords();Ext.getCmp("confCard").layout.setActiveItem("conf-car! d-"+c[0].data.id)}}});ui.component._EditorConf.themeStore=new Ext.data.SimpleStore({fields:["themeFile",{name:"themeName",type:"string"}],data:[["themes/black/css/xtheme-black.css",_("Black")],["themes/empty.css",_("Default")],["themes/darkgray/css/xtheme-darkgray.css",_("DarkGray")],["js/extjs/resources/css/xtheme-gray.css",_("Gray")],["themes/gray-extend/css/xtheme-gray-extend.css",_("Gray Extend")],["themes/indigo/css/xtheme-indigo.css",_("Indigo")],["themes/midnight/css/xtheme-midnight.css",_("Midnight")],["themes/olive/css/xtheme-olive.css",_("Olive")],["themes/purple/css/xtheme-purple.css",_("Purple")],["js/extjs/resources/css/xtheme-slate.css",_("Slate")],["themes/silverCherry/css/xtheme-silverCherry.css",_("SilverCherry")]]});ui.component._EditorConf.card1=Ext.extend(Ext.form.FormPanel,{id:"conf-card-1",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Themes"),autoHeight:true,defaults:{hideLabel:true},items:[{xtyp! e:"combo",id:"conf-combo-theme",valueField:"themeFile",displayField:"t hemeName",triggerAction:"all",mode:"local",forceSelection:true,editable:false,value:phpDoc.userConf.conf_theme,store:ui.component._EditorConf.themeStore,listeners:{render:function(){Ext.getCmp("conf-combo-theme").store.sort("themeName")},select:function(e,a,b){var d=e.getValue();Ext.get("appTheme").dom.href=d;new ui.task.UpdateConfTask({item:"conf_theme",value:d})}}}]}]});ui.component._EditorConf.card1.superclass.initComponent.call(this)}});ui.component._EditorConf.card2=Ext.extend(Ext.form.FormPanel,{id:"conf-card-2",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Diff view"),autoHeight:true,defaults:{hideLabel:true},defaultType:"radio",items:[{name:"conf_needupdate_diff",checked:(phpDoc.userConf.conf_needupdate_diff==="using-viewvc")?true:false,boxLabel:_("Using ViewVc from php web site"),inputValue:"using-viewvc",listeners:{check:function(a){if(a.checked){new ui.task.UpdateConfTask({item:"conf_needupdate_diff",value:a.! getRawValue()})}}}},{name:"conf_needupdate_diff",checked:(phpDoc.userConf.conf_needupdate_diff==="using-exec")?true:false,boxLabel:_("Using diff -kk -u command line"),inputValue:"using-exec",listeners:{check:function(a){if(a.checked){new ui.task.UpdateConfTask({item:"conf_needupdate_diff",value:a.getRawValue()})}}}}]},{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_needupdate_scrollbars",checked:(phpDoc.userConf.conf_needupdate_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_needupdate_scrollbars",value:a.getValue()})}}},{name:"conf_needupdate_displaylog",checked:(phpDoc.userConf.conf_needupdate_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_needupdate_displaylog",value:a.getValue()})}}}]}]});ui.co! mponent._EditorConf.card2.superclass.initComponent.call(this)}});ui.co mponent._EditorConf.card3=Ext.extend(Ext.form.FormPanel,{id:"conf-card-3",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Error type"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_error_skipnbliteraltag",checked:(phpDoc.userConf.conf_error_skipnbliteraltag==="true")?true:false,boxLabel:_("Skip nbLiteralTag error"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_error_skipnbliteraltag",value:a.getValue()})}}}]},{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_error_scrollbars",checked:(phpDoc.userConf.conf_error_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_error_scrollbars",value:a.getValue()})}}},{name:"conf_error_displaylog",checked:(phpDoc.userConf.conf_error_displaylog==="true")?true:false,boxLabel:_! ("Automatically load the log when displaying the file"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_error_displaylog",value:a.getValue()})}}}]}]});ui.component._EditorConf.card3.superclass.initComponent.call(this)}});ui.component._EditorConf.card4=Ext.extend(Ext.form.FormPanel,{id:"conf-card-4",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_reviewed_scrollbars",checked:(phpDoc.userConf.conf_reviewed_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_reviewed_scrollbars",value:a.getValue()})}}},{name:"conf_reviewed_displaylog",checked:(phpDoc.userConf.conf_reviewed_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){new ui.task.UpdateConfTask({ite! m:"conf_reviewed_displaylog",value:a.getValue()})}}}]}]});ui.component .._EditorConf.card4.superclass.initComponent.call(this)}});ui.component._EditorConf.card5=Ext.extend(Ext.form.FormPanel,{id:"conf-card-5",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_allfiles_displaylog",checked:(phpDoc.userConf.conf_allfiles_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_allfiles_displaylog",value:a.getValue()})}}}]}]});ui.component._EditorConf.card5.superclass.initComponent.call(this)}});ui.component._EditorConf.card6=Ext.extend(Ext.form.FormPanel,{id:"conf-card-6",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_patch_scrollbars",checked:(phpDoc.use! rConf.conf_patch_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_patch_scrollbars",value:a.getValue()})}}},{name:"conf_patch_displaylog",checked:(phpDoc.userConf.conf_patch_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_patch_displaylog",value:a.getValue()})}}}]}]});ui.component._EditorConf.card6.superclass.initComponent.call(this)}});ui.component.EditorConf=Ext.extend(Ext.Window,{id:"win-conf",layout:"border",width:550,height:400,iconCls:"iconConf",title:_("Configuration"),modal:true,plain:true,buttons:[{text:_("Close"),handler:function(){Ext.getCmp("win-conf").close()}}],listeners:{show:function(){var a=Ext.getCmp("conf-menu-view");a.select(a.getNode(0))}},initComponent:function(){if(phpDoc.userLang==="en"){ui.component._EditorConf.menuStore.loadData(ui.component._Ed! itorConf.menuDefEn)}else{ui.component._EditorConf.menuStore.loadData(u i.component._EditorConf.menuDefNonEn)}Ext.apply(this,{items:[{id:"confMenu",region:"west",width:190,autoScroll:true,items:[new ui.component._EditorConf.viewMenu()]},{id:"confCard",region:"center",layout:"slide",width:375,frame:true,activeItem:0,bbar:new Ext.StatusBar({defaultText:_("All changes take effect immediately"),defaultIconCls:"confStatusBar"}),items:[new ui.component._EditorConf.card1(),new ui.component._EditorConf.card2(),new ui.component._EditorConf.card3(),new ui.component._EditorConf.card4(),new ui.component._EditorConf.card5(),new ui.component._EditorConf.card6()]}]});ui.component.EditorConf.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._ErrorFileGrid");ui.component._ErrorFileGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"maintainer"! ,mapping:"maintainer"},{name:"type",mapping:"type"},{name:"value_en",mapping:"value_en"},{name:"value_lang",mapping:"value_lang"},{name:"needcommit",mapping:"needcommit"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-error-nb").innerHTML=a.getCount()}}});ui.component._ErrorFileGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Type"),width:45,sortable:true,dataIndex:"type"},{header:_("Maintainer"),width:45,sortable:true,dataIndex:"maintainer"},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._ErrorFileGrid.view=new Ext.grid.GroupingView({emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>",forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',getRowClass:function(a,d,c,b){if(a.data.needcommit){return"file-need-commit"}}});ui.component._ErrorFileGrid.menu=fun! ction(a){Ext.apply(this,a);this.init();ui.component._ErrorFileGrid.men u.superclass.constructor.call(this)};Ext.extend(ui.component._ErrorFileGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"FilesError",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},{scope:this,hidden:this.hideCommit,text:("View Diff"),iconCls:"iconViewDiff",handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext.get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" />'+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:this.lang+this.fpath,FileName:this.fname},success:function(a){var b=Ext.util.JSON.decode! (a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}},"-",{text:_("About error type"),iconCls:"iconHelp",handler:function(){if(!Ext.getCmp("main-panel").findById("FE-help")){Ext.getCmp("main-panel").add({id:"FE-help",title:_("About error type"),iconCls:"iconHelp",closable:true,autoScroll:true,autoLoad:"./error_type.php"});Ext.getCmp("main-panel").setActiveTab("FE-help")}else{Ext.getCmp("main-panel").setActiveTab("FE-help")}}}]})}});ui.component.ErrorFileGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",view:ui.component._ErrorFileGrid.view,columns:ui.component._ErrorFileGrid.columns,listeners:{render:function(a){a.view.refresh()},rowcontextmenu:function(b,f,d){var c=b.store.getAt(f).data.path,a=b.store.getAt(f).data.name;b.getSelectionModel().selectRow(f);new ui.component._ErrorFileGrid.menu({hideCommit:(b.store.getAt(f).data.needcommit===false),grid:b,event:d,r! owIdx:f,lang:phpDoc.userLang,fpath:c,fname:a}).showAt(d.getXY())},rowd blclick:function(c,i,h){var f=c.store.getAt(i),d=f.data.path,a=f.data.name,g=Ext.util.md5("FE-"+phpDoc.userLang+d+a),b=[];if(!Ext.getCmp("main-panel").findById("FE-"+g)){b=[];c.store.each(function(e){if(e.data.path===d&&e.data.name===a&&!b[e.data.type]){b.push(e.data.type)}});Ext.getCmp("main-panel").add({id:"FE-"+g,title:a,layout:"border",iconCls:"iconTabError",closable:true,originTitle:a,defaults:{split:true},tabTip:String.format(_("File with error : in {0}"),d),items:[{xtype:"panel",id:"FE-error-desc-"+g,region:"north",layout:"fit",title:_("Error description"),height:150,collapsible:true,collapsed:true,items:{xtype:"iframepanel",id:"FE-error-type-"+g,loadMask:true,defaultSrc:"./error_type.php?dir="+d+"&file="+a}},{region:"west",xtype:"panel",title:_("CvsLog"),collapsible:true,collapsed:true,layout:"fit",bodyBorder:false,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[new ui.component.CVSLogGrid({layout:"fit",title:phpDo! c.userLang,prefix:"FE-LANG",fid:g,fpath:phpDoc.userLang+d,fname:a,loadStore:(phpDoc.userConf.conf_error_displaylog==="true")}),new ui.component.CVSLogGrid({layout:"fit",title:"en",prefix:"FE-EN",fid:g,fpath:"en"+d,fname:a,loadStore:(phpDoc.userConf.conf_error_displaylog==="true")})]}},new ui.component.FilePanel({id:"FE-LANG-PANEL-"+g,region:"center",title:String.format(_("{0} File: "),phpDoc.userLang)+d+a,prefix:"FE",ftype:"LANG",fid:g,fpath:d,fname:a,lang:phpDoc.userLang,parser:"xml",storeRecord:f,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_error_scrollbars"}),new ui.component.FilePanel({id:"FE-EN-PANEL-"+g,region:"east",width:575,title:_("en File: ")+d+a,prefix:"FE",ftype:"EN",fid:g,fpath:d,fname:a,lang:"en",parser:"xml",storeRecord:f,syncScroll:true,syncScrollConf:"conf_error_scrollbars"})]});Ext.getCmp("main-panel").setActiveTab("FE-"+g);if(Ext.getCmp("FE-"+g).getLayout().north.collapsedEl){Ext.getCmp("FE-"+g).getLayout().north.collapsedEl.addClass("x-layout-! collapsed-east-error-desc")}}else{Ext.getCmp("main-panel").setActiveTa b("FE-"+g)}}},initComponent:function(){ui.component.ErrorFileGrid.instance=this;Ext.apply(this,{store:new ui.component._ErrorFileGrid.store({autoLoad:(phpDoc.userLang!=="en"),proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesError"}}),tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FE-filter",width:180,hideTrigger1:true,enableKeyEvents:true,validateOnBlur:false,validationEvent:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();ui.component.ErrorFileGrid.instance.store.clearFilter()},onTrigger2Click:function(){var a=this.getValue();if(a==""||a.length<3){this.markInvalid(_("Your filter must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();ui.component.ErrorFileGrid.instance.store.filter("maintainer",a)}})]});ui.compon! ent.ErrorFileGrid.superclass.initComponent.call(this)}});ui.component.ErrorFileGrid.prototype.instance=null;Ext.namespace("ui","ui.component");ui.component.ExecDiff=Ext.extend(Ext.Panel,{layout:"fit",title:_("Diff From cvs"),height:150,autoScroll:true,collapsed:true,listeners:{render:function(){XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff2",FilePath:"en"+this.fpath,FileName:this.fname,Rev1:this.rev1,Rev2:this.rev2},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get(this.prefix+"-diff-"+this.fid).dom.innerHTML=b.content}})}},initComponent:function(){Ext.apply(this,{html:'<div id="'+this.prefix+"-diff-"+this.fid+'" class="diff-content"></div>',});ui.component.ExecDiff.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._FilePanel");Ext.namespace("ui.component._FilePanel.tbar.menu");ui.component._FilePanel.tbar.menu.lang=function(a){Ext.apply(this,a);this.init();ui.component._FilePanel.tbar.menu.lang.su! perclass.constructor.call(this)};Ext.extend(ui.component._FilePanel.tb ar.menu.lang,Ext.Toolbar.Button,{text:_("MarkUp"),iconCls:"iconInsertCode",init:function(){Ext.apply(this,{menu:new Ext.menu.Menu({items:[{scope:this,text:_("Reviewed tag"),handler:function(){Ext.getCmp(this.comp_id).insertIntoLine(2,"end","\n<!-- Reviewed: no -->");Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Revcheck tag"),handler:function(){Ext.getCmp(this.comp_id).insertIntoLine(2,"end","\n<!-- EN-Revision: 1.XX Maintainer: "+phpDoc.userLogin+" Status: ready -->");Ext.getCmp(this.comp_id).focus()}}]})})}});ui.component._FilePanel.tbar.menu.en=function(a){Ext.apply(this,a);this.init();ui.component._FilePanel.tbar.menu.en.superclass.constructor.call(this)};Ext.extend(ui.component._FilePanel.tbar.menu.en,Ext.Toolbar.Button,{text:_("MarkUp"),iconCls:"iconInsertCode",init:function(){Ext.apply(this,{menu:new Ext.menu.Menu({items:[{scope:this,text:_("Description section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.g! etCmp(this.comp_id).insertIntoLine(a.line,0,' <refsect1 role="description"><!-- {{{ -->\r\n &reftitle.description;\r\n <methodsynopsis>\r\n <!-- Example: All functions have this -->\r\n <type>thereturned type</type><methodname>func_name</methodname>\r\n <!-- Example: Required parameter -->\r\n <methodparam><type>param1type</type><parameter>firstparameter</parameter></methodparam>\r\n <!-- Example: Optional parameter, also by reference -->\r\n <methodparam choice="opt"><type>int</type><parameter role="reference">secondparameter</parameter></methodparam>\r\n <!-- Example: If no methodparams exist (void), use this -->\r\n <void />\r\n </methodsynopsis>\r\n <para>\r\n The function description goes here.\r\n </para>\r\n </refsect1><!-- }}} -->');Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Parameters section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line! ,0,'\r\n<refsect1 role="parameters"><!-- {{{ -->\r\n&reftitle.paramete rs;\r\n<para>\r\n<variablelist>\r\n<varlistentry>\r\n<term><parameter>firstparameter</parameter></term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n<varlistentry>\r\n<term>\r\n<parameter>secondparameter</parameter>\r\n</term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n</variablelist>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Return section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line,0,'\r\n<refsect1 role="returnvalues"><!-- {{{ -->\r\n&reftitle.returnvalues;\r\n<para>\r\nWhat this function returns, first on success, then failure.\r\nIf simply true on success and false on failure, just use &return.success; here.\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Error section"),handler:functi! on(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line,0,'\r\n<refsect1 role="errors"><!-- {{{ -->\r\n&reftitle.errors;\r\n<para>\r\nWhen does this function issue E_* level errors, and/or throw exceptions.\r\n</para>\r\n</refsect1><!-- }}} -->\r\n');Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Unicode section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line,0,'\r\n<refsect1 role="unicode"><!-- {{{ -->\r\n&reftitle.unicode;\r\n<para>\r\nInformation specific to unicode, from the PHP 6 changes.\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Changelog section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line,0,'\r\n<refsect1 role="changelog"><!-- {{{ -->\r\n&reftitle.chang! elog;\r\n<para>\r\n<informaltable>\r\n<tgroup cols="2">\r\n<thead>\r\n <row>\r\n<entry>&Version;</entry>\r\n<entry>&Description;</entry>\r\n</row>\r\n</thead>\r\n<tbody>\r\n<row>\r\n<entry>Enter the version of change here</entry>\r\n<entry>\r\nDescribe the change\r\n</entry>\r\n</row>\r\n</tbody>\r\n</tgroup>\r\n</informaltable>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Examples section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line,0,"\r\n<refsect1 role=\"examples\"><!-- {{{ -->\r\n&reftitle.examples;\r\n<para>\r\n<example xml:id=\"function-name.example.basic\"><!-- {{{ -->\r\n<title><function>function-name</function> example</title>\r\n<para>\r\nAny text that describes the purpose of the example, or what\r\ngoes on in the example should be here. (Inside the <example> tag, not out).\r\n</para>\r\n<programlisting role=\"php\">\r\n<![CDATA[\r\n<?php\r\nif ($anexample === true) {\r\necho 'Use the PEAR ! Coding standards';\r\n}\r\nif ($thereisoutput === 'and it is multiple lines') {\r\necho 'Use a screen like we did below';\r\n}\r\n?>\r\n]]>\r\n</programlisting>\r\n&example.outputs.similar;\r\n<screen>\r\n<![CDATA[\r\nUse the PEAR Coding standards\r\nUse a screen like we did below\r\n]]>\r\n</screen>\r\n</example><!-- }}} -->\r\n</para>\r\n</refsect1><!-- }}} -->");Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Notes section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line,0,'\r\n<refsect1 role="notes"><!-- {{{ -->\r\n&reftitle.notes;\r\n<caution>\r\n<para>\r\nAny notes that don\'t fit anywhere else should go here.\r\n90% of the time, notes, warnings or cautions are better placed in the\r\nparameters section. Consider that before using this section!\r\n</para>\r\n</caution>\r\n¬e.language-construct;\r\n¬e.not-bin-safe;\r\n¬e.registerglobals;\r\n</refsect1><!-- }}} --! >');Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("SeeAlso sec tion"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line,0,'\r\n<refsect1 role="seealso"><!-- {{{ -->\r\n&reftitle.seealso;\r\n<para>\r\n<simplelist>\r\n<member><function>somefunc</function></member>\r\n<member><function>another_func</function></member>\r\n<member>The <link linkend="something">something appendix</link></member>\r\n</simplelist>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(this.comp_id).focus()}}]})})}});ui.component.FilePanel=Ext.extend(Ext.form.FormPanel,{activeScroll:false,initComponent:function(){var a=this.prefix+"-"+this.ftype;this.bbar=(this.syncScrollCB)?[{xtype:"checkbox",name:"conf_needupdate_scrollbars",hideLabel:true,checked:(phpDoc.userConf[this.syncScrollConf]==="true"),boxLabel:_("Synchronize scroll bars"),listeners:{scope:this,check:function(b){phpDoc.confUpdate(this.syncScrollConf,b.getValue())},render:function(b){Ext.DomHelper.insertHtml("beforeBeg! in",b.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="'+a+"-status-line-"+this.fid+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="'+a+"-status-col-"+this.fid+'">-</span></span></div> ')}}}]:[{xtype:"panel",height:21,baseCls:"",bodyStyle:"padding-top:5px;",html:'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="'+a+"-status-line-"+this.fid+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="'+a+"-status-col-"+this.fid+'">-</span></span></div> '}];if(!this.readOnly){this.tbar=(this.isPatch)?[{id:a+"-PANEL-btn-save-"+this.fid,scope:this,tooltip:_("<b>Accept</b> this patch and <b>Save</b> the file"),iconCls:"saveFile",handler:function(){new ui.task.AcceptPatchTask({fid:this.fid,fpath:this.fpath,fname:this.fname,fuid:this.fuid,storeRecord:this.storeRecord}! )}},{id:a+"-PANEL-btn-reject-"+this.fid,scope:this,tooltip:_("<b>Rejec t</b> this patch"),iconCls:"iconPageDelete",handler:function(){new ui.task.RejectPatchTask({fid:this.fid,fuid:this.fuid,storeRecord:this.storeRecord})}},"-",{scope:this,tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp(a+"-FILE-"+this.fid).reIndentAll()}}]:[{id:a+"-PANEL-btn-save-"+this.fid,scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",disabled:true,handler:function(){if(this.lang==="en"){new ui.task.SaveENFileTask({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:this.fpath,fname:this.fname,storeRecord:this.storeRecord})}else{phpDoc.saveLangFile(this.prefix,this.ftype,this.fid,this.fpath,this.fname,this.lang,this.storeRecord)}}},{id:a+"-PANEL-btn-saveas-"+this.fid,scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",disabled:true,handler:function(){new ui.component.PatchPrompt({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:this.fpath,fname:this.fname,lang:this.lang,defaultEmail:(ph! pDoc.userLogin!=="cvsread")?phpDoc.userLogin+"@php.net":""}).show()}},"-",{scope:this,tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp(a+"-FILE-"+this.fid).reIndentAll()}},(this.lang==="en")?new ui.component._FilePanel.tbar.menu.en({comp_id:a+"-FILE-"+this.fid}):new ui.component._FilePanel.tbar.menu.lang({comp_id:a+"-FILE-"+this.fid})]}else{this.tbar=[{}]}Ext.apply(this,{originTitle:this.title,items:[{xtype:"codemirror",id:a+"-FILE-"+this.fid,readOnly:this.readOnly,parser:this.parser,isModified:false,listeners:{scope:this,initialize:function(){new ui.task.GetFileTask({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:(this.isPatch)?this.fpath:this.lang+this.fpath,fname:(this.isPatch)?this.fname+"."+this.fuid+".patch":this.fname})},cmchange:function(e,c,d){if(e===116){return}var b=Ext.util.JSON.decode(Ext.getCmp(a+"-FILE-"+this.fid).getCursorPosition());Ext.get(a+"-status-line-"+this.fid).dom.innerHTML=b.line;Ext.get(a+"-sta! tus-col-"+this.fid).dom.innerHTML=b.caracter;if(e!==27&&e!==33&&e!==34 &&e!==37&&e!==38&&e!==39&&e!==40&&e!==17&&e!==16&&e!==67){if(!Ext.getCmp(a+"-FILE-"+this.fid).isModified){Ext.getCmp(a+"-PANEL-"+this.fid).setTitle(Ext.getCmp(a+"-PANEL-"+this.fid).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp(this.prefix+"-"+this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp(a+"-PANEL-btn-save-"+this.fid).enable();Ext.get(a+"-PANEL-btn-save-"+this.fid).frame("3F8538");if(this.isPatch){Ext.getCmp(a+"-PANEL-btn-reject-"+this.fid).enable();Ext.get(a+"-PANEL-btn-reject-"+this.fid).frame("3F8538")}else{Ext.getCmp(a+"-PANEL-btn-saveas-"+this.fid).enable();Ext.get(a+"-PANEL-btn-saveas-"+this.fid).frame("3F8538")}Ext.getCmp(a+"-FILE-"+this.fid).isModified=true}}},cmcursormove:function(){var b=Ext.util.JSON.decode(Ext.getCmp(a+"-FILE-"+this.fid).getCursorPosition());Ext.get(a+"-status-line-"+this.fid).dom.innerHTML=b.line;Ext.get! (a+"-status-col-"+this.fid).dom.innerHTML=b.caracter},cmscroll:function(e){if(this.syncScroll&&phpDoc.userConf[this.syncScrollConf]==="true"){var c;switch(this.ftype){case"EN":c=this.prefix+"-LANG";break;case"LANG":c=this.prefix+"-EN";break;case"PATCH":c=this.prefix+"-ORIGIN";break;case"ORIGIN":c=this.prefix+"-PATCH";break}var d=Ext.getCmp(c+"-PANEL-"+this.fid),b=Ext.getCmp(c+"-FILE-"+this.fid);if(d.activeScroll===false){this.activeScroll=true;b.scrollTo(e)}else{d.activeScroll=false}}}}}]});ui.component.FilePanel.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._LocalMailGrid");ui.component._LocalMailGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLastNews"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"title",mapping:"title"},{name:"link",mapping:"link"},{name:"description",mapping:"desc! ription"},{name:"pubDate",mapping:"pubDate",type:"date",dateFormat:"Y/ m/d H:i:s"}]))});ui.component._LocalMailGrid.store.setDefaultSort("pubDate","desc");ui.component._LocalMailGrid.columns=[new Ext.grid.RowNumberer(),{id:"GridMailingTitle",header:_("Title"),sortable:true,dataIndex:"title"},{header:_("By"),width:110,sortable:true,dataIndex:"description"},{header:_("Date"),width:140,sortable:true,dataIndex:"pubDate",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))}];ui.component.LocalMailGrid=Ext.extend(Ext.grid.GridPanel,{iconCls:"home-mailing-title",height:400,width:800,loadMask:true,autoScroll:true,autoExpandColumn:"GridMailingTitle",store:ui.component._LocalMailGrid.store,columns:ui.component._LocalMailGrid.columns,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),listeners:{render:function(a){a.store.load.defer(20,a.store)},rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c);new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+_("Open in a new Tab")+"</b>",iconCls:"openInTab",handler:function(){a.fireEvent("rowdblcli! ck",a,c,b)}},"-",{text:_("Refresh this grid"),iconCls:"refresh",handler:function(){a.store.reload()}}]}).showAt(b.getXY())},rowdblclick:function(b,g,d){var a=b.store.getAt(g).data.pubDate,f=b.store.getAt(g).data.link,c=b.store.getAt(g).data.title;Ext.getCmp("main-panel").add({xtype:"iframepanel",id:"mifp_"+a,title:_("Loading..."),tabTip:c,iconCls:"home-mailing-title",loadMask:true,defaultSrc:f,listeners:{documentloaded:function(e){e.ownerCt.setTitle(Ext.util.Format.substr(c,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_"+a)}},initComponent:function(){Ext.apply(this,{title:String.format(_("Mails from {0}"),"doc-"+phpDoc.userLang),tbar:[{tooltip:_("Refresh this grid"),iconCls:"refresh",handler:function(){ui.component.LocalMailGrid.reload()}}]});ui.component.LocalMailGrid.superclass.initComponent.call(this)}});ui.component.LocalMailGrid.reload=function(){ui.component._LocalMailGrid.store.reload()};Ext.namespace("ui","ui.component");ui.component.MainMenu=function! (a){Ext.apply(this,a);this.init();ui.component.MainMenu.superclass.con structor.call(this)};Ext.extend(ui.component.MainMenu,Ext.menu.Menu,{id:"mainMenu",init:function(){Ext.apply(this,{items:[{text:_("Refresh all data"),disabled:(phpDoc.userLogin==="cvsread")?true:false,iconCls:"refresh",handler:phpDoc.WinUpdate},{text:_("Check Build"),disabled:(phpDoc.userLogin==="cvsread")?true:false,iconCls:"checkBuild",handler:phpDoc.WinCheckBuild},{text:_("EN tools"),handler:function(){return false},menu:new Ext.menu.Menu({items:[{text:_("Translation build status"),iconCls:"BuildStatus",handler:function(){var a=Ext.getCmp("tab-build-status");if(a===undefined){Ext.getCmp("main-panel").add({id:"tab-build-status",title:_("Translation build status"),iconCls:"BuildStatus",layout:"fit",closable:true,html:"nothing"});a=Ext.getCmp("tab-build-status")}if(a.items){a.removeAll(true)}a.add(new ui.component.BuildStatus());a.doLayout();Ext.getCmp("main-panel").setActiveTab("tab-build-status")}},{text:_("Script Check doc"),iconCls:"CheckDoc",handler:function(){var a=Ext! .getCmp("tab-check-doc");if(a===undefined){Ext.getCmp("main-panel").add({id:"tab-check-doc",title:"Check Doc",iconCls:"CheckDoc",layout:"fit",closable:true,html:"nothing"});a=Ext.getCmp("tab-check-doc")}if(a.items){a.removeAll(true)}a.add(new ui.component.CheckDoc());a.doLayout();Ext.getCmp("main-panel").setActiveTab("tab-check-doc")}}]})},"-",{text:_("Configure"),iconCls:"iconConf",tooltip:"<b>Configure</b> this tool",id:"winconf-btn",handler:function(){new ui.component.EditorConf().show(Ext.get("winconf-btn"))}},"-",{text:_("Erase my personal data"),disabled:(phpDoc.userLogin==="cvsread")?true:false,iconCls:"iconErasePersonalData",handler:function(){Ext.MessageBox.confirm(_("Confirm"),_("This action will erase your personal data. All content about this account will be deleted definitively. Are you sure you want to do that ?"),function(a){if(a==="yes"){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({url:! "./php/controller.php",params:{task:"erasePersonalData"},success:funct ion(b){Ext.getBody().unmask();Ext.MessageBox.show({title:_("Thanks !"),msg:_("Thank you for using this application !"),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.OK,fn:function(){window.location.href="./php/controller.php?task=logout"}})},failure:function(b){phpDoc.winForbidden()}})}})}},"-",{text:_("Log out"),iconCls:"iconLogOut",handler:function(){Ext.MessageBox.confirm(_("Confirm"),_("Are you sure you want to logout?"),function(a){if(a==="yes"){window.location.href="./php/controller.php?task=logout"}})}},"-",{id:"winabout-btn",text:_("About"),iconCls:"iconHelp",handler:function(){new ui.component.About().show(Ext.get("winabout-btn"))}}]})}});Ext.namespace("ui","ui.component","ui.component._NotInENGrid");ui.component._NotInENGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"needcommi! t",mapping:"needcommit"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-notInEn-nb").innerHTML=a.getCount()}}});ui.component._NotInENGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._NotInENGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>",getRowClass:function(a,d,c,b){if(a.data.needcommit){return"file-need-commit"}}});ui.component._NotInENGrid.menu=function(a){Ext.apply(this,a);this.init();ui.component._NotInENGrid.menu.superclass.constructor.call(this)};Ext.extend(ui.component._NotInENGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:_("Remove this file"),iconCls:"iconDelete",handler:function(){! this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}}] })}});ui.component.NotInENGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",view:ui.component._NotInENGrid.view,columns:ui.component._NotInENGrid.columns,listeners:{rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c);if(!a.store.getAt(c).data.needcommit){new ui.component._NotInENGrid.menu({grid:a,rowIdx:c,event:b}).showAt(b.getXY())}},rowdblclick:function(b,g,f){var d=b.store.getAt(g),c=d.data.path,a=d.data.name;new ui.task.MarkDeleteTask({fpath:c,fname:a,storeRecord:d})}},initComponent:function(){ui.component.NotInENGrid.instance=this;Ext.apply(this,{store:new ui.component._NotInENGrid.store({autoLoad:(phpDoc.userLang==="en")?false:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNotInEn"}})});ui.component.NotInENGrid.superclass.initComponent.call(this)}});ui.component.NotInENGrid.prototype.instance=null;Ext.namespace("ui","ui.component");ui.component.PatchPrompt=Ext.extend(Ext.W! indow,{title:_("Do you want to be alerted ?"),iconCls:"patchAlert",layout:"form",bodyStyle:"padding: 5px;",labelWidth:50,width:350,height:150,resizable:false,modal:true,autoScroll:true,initComponent:function(){Ext.apply(this,{items:[{xtype:"panel",baseCls:"x-plain",bodyStyle:"padding-bottom: 10px;",html:_("If you want to be notified when your patch will be dealt with, thank you to leave an email address below.")},{id:"patch-email-alert",xtype:"textfield",name:"patch-email-alert",fieldLabel:_("Email"),anchor:"100%",value:this.defaultEmail}],buttons:[{scope:this,text:_("Save"),handler:function(){new ui.task.SavePatchTask({prefix:this.prefix,fid:this.fid,ftype:this.ftype,lang:this.lang,fpath:this.fpath,fname:this.fname,email:Ext.getCmp("patch-email-alert").getValue()});this.close()}},{scope:this,text:_("Cancel"),handler:function(){this.close()}}]});ui.component.PatchPrompt.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._PendingCommitGrid! ");ui.component._PendingCommitGrid.store=Ext.extend(Ext.data.GroupingS tore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"by",mapping:"by"},{name:"date",mapping:"date",type:"date",dateFormat:"Y-m-d H:i:s"},{name:"type",mapping:"type"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{add:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()},datachanged:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()}}});ui.component._PendingCommitGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Modified by"),width:45,sortable:true,dataIndex:"by"},{header:_("Date"),width:45,sortable:true,dataIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._PendingCommitGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["pat! h"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',emptyText:'<div style="text-align: center;">'+_("No pending for Commit")+"</div>",getRowClass:function(a,d,c,b){if(a.data.type==="update"){return"file-needcommit-update"}if(a.data.type==="delete"){return"file-needcommit-delete"}if(a.data.type==="new"){return"file-needcommit-new"}}});Ext.namespace("ui.component._PendingCommitGrid.menu");ui.component._PendingCommitGrid.menu.common=function(a){Ext.apply(this,a);this.init();ui.component._PendingCommitGrid.menu.common.superclass.constructor.call(this)};Ext.extend(ui.component._PendingCommitGrid.menu.common,Ext.menu.Item,{init:function(){Ext.apply(this,{text:_("Commit..."),iconCls:"iconCommitFileCvs",disabled:(phpDoc.userLogin==="cvsread"),handler:function(){return false},menu:new Ext.menu.Menu({items:[{scope:this,text:_("...this file"),iconCls:"iconCommitFileCvs",handler:function(){phpDoc.WinCommit(true,this.rowIdx)}},{scope:this,text:_("! ...all files modified by me"),iconCls:"iconCommitFileCvs",handler:func tion(){phpDoc.WinCommit(false,"","by me")}},{scope:this,text:_("...all files modified"),iconCls:"iconCommitFileCvs",handler:function(){phpDoc.WinCommit(false)}}]})})}});ui.component._PendingCommitGrid.menu.update=function(a){Ext.apply(this,a);this.init();ui.component._PendingCommitGrid.menu.update.superclass.constructor.call(this)};Ext.extend(ui.component._PendingCommitGrid.menu.update,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"PendingCommit",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},"-",{scope:this,text:_("View Diff"),iconCls:"iconViewDiff",handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,iconCls:"iconTabLink",title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,html:'<div id="diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext! .get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:this.fpath,FileName:this.fname},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}},{scope:this,text:_("Download the diff as a patch"),iconCls:"iconCommitFileCvs",handler:function(){window.location.href="./php/controller.php?task=downloadPatch&FilePath="+this.fpath+"&FileName="+this.fname}},"-",{scope:this,text:_("Clear this change"),iconCls:"iconPageDelete",disabled:(phpDoc.userLogin==="cvsread"),handler:function(){new ui.task.ClearLocalChangeTask({storeRecord:this.grid.store.getAt(this.rowIdx),ftype:"update",fpath:this.fpath,fname:this.fname})}},"-",new ui.component._PendingCommitGrid.menu.common({rowIdx:this.rowIdx})]})}});ui.component._PendingCommit! Grid.menu.del=function(a){Ext.apply(this,a);this.init();ui.component._ PendingCommitGrid.menu.del.superclass.constructor.call(this)};Ext.extend(ui.component._PendingCommitGrid.menu.del,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Cancel")+"<b>",iconCls:"iconPageDelete",disabled:(phpDoc.userLogin==="cvsread"),handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},"-",new ui.component._PendingCommitGrid.menu.common({rowIdx:this.rowIdx})]})}});ui.component.PendingCommitGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",columns:ui.component._PendingCommitGrid.columns,view:ui.component._PendingCommitGrid.view,listeners:{rowcontextmenu:function(c,h,g){var f=c.store.getAt(h),b=f.data.type,d=f.data.path,a=f.data.name;c.getSelectionModel().selectRow(h);if(b==="delete"){new ui.component._PendingCommitGrid.menu.del({grid:c,rowIdx:h,event:g}).showAt(g.getXY())}if(b==="update"){new ui.component._PendingCommitGrid.menu.update({fpath:d,fname:a,grid:c,r! owIdx:h,event:g}).showAt(g.getXY())}},rowdblclick:function(c,h,g){var f=c.store.getAt(h),b=f.data.type,d=f.data.path,a=f.data.name;if(b==="update"){ui.component.RepositoryTree.instance.openFile(d,a)}if(b==="delete"){new ui.task.ClearLocalChangeTask({storeRecord:f,ftype:b,fpath:d,fname:a})}}},initComponent:function(){ui.component.PendingCommitGrid.instance=this;Ext.apply(this,{store:new ui.component._PendingCommitGrid.store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesPendingCommit"}})});ui.component.PendingCommitGrid.superclass.initComponent.call(this)},addRecord:function(d,a,e,c){var b=false;this.store.each(function(f){if(f.data.path===a&&f.data.name===e){b=true}});if(!b){this.store.insert(0,new this.store.recordType({id:d,path:a,name:e,by:phpDoc.userLogin,date:new Date(),type:c}));this.store.groupBy("path",true)}}});ui.component.PendingCommitGrid.prototype.instance=null;Ext.namespace("ui","ui.component","ui.component.! _PendingPatchGrid");ui.component._PendingPatchGrid.store=Ext.extend(Ex t.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"by",mapping:"by"},{name:"uniqID",mapping:"uniqID"},{name:"date",mapping:"date",type:"date",dateFormat:"Y-m-d H:i:s"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{add:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()},datachanged:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()}}});ui.component._PendingPatchGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Posted by"),width:45,sortable:true,dataIndex:"by"},{header:_("Date"),width:45,sortable:true,dataIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._PendingPatchGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.r! s[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',emptyText:'<div style="text-align: center;">'+_("No pending Patch")+"</div>"});ui.component._PendingPatchGrid.menu=function(a){Ext.apply(this,a);this.init();ui.component._PendingPatchGrid.menu.superclass.constructor.call(this)};Ext.extend(ui.component._PendingPatchGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"PendingPatch",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},"-",{scope:this,text:_("Reject this patch"),iconCls:"iconPageDelete",handler:function(){new ui.task.RejectPatchTask({fid:this.fid,fuid:this.fuid,storeRecord:this.grid.store.getAt(this.rowIdx)})}}]})}});ui.component.PendingPatchGrid=Ext.extend(Ext.grid.GridPanel,{store:ui.component._PendingPatchGrid.store,columns:ui.component._PendingPatchGrid.columns,view:ui.component._PendingPatchGrid! .view,loadMask:true,bodyBorder:false,autoExpandColumn:"name",listeners :{rowcontextmenu:function(b,h,g){var c=b.store.getAt(h).data.path,a=b.store.getAt(h).data.name,d=b.store.getAt(h).data.uniqID,f=Ext.util.md5("PP-"+d+c+a);b.getSelectionModel().selectRow(h);new ui.component._PendingPatchGrid.menu({grid:b,rowIdx:h,event:g,fid:f,fpath:c,fname:a,fuid:d}).showAt(g.getXY())},rowdblclick:function(b,i,h){var f=b.store.getAt(i),c=f.data.path,a=f.data.name,d=f.data.uniqID,g=Ext.util.md5("PP-"+d+c+a);if(!Ext.getCmp("main-panel").findById("PP-"+g)){Ext.getCmp("main-panel").add({id:"PP-"+g,layout:"border",iconCls:"PendingPatch",title:a,originTitle:a,tabTip:String.format(_("Patch for {0}"),c+a),closable:true,defaults:{split:true},items:[{xtype:"panel",id:"PP-patch-desc-"+g,title:_("Patch content"),layout:"fit",region:"north",height:150,autoScroll:true,collapsible:true,collapsed:true,html:'<div id="diff_content_'+g+'" class="diff-content"></div>',listeners:{render:function(){XHR({url:"./php/controller.php",params:{task:"getDiff",FilePath:c,FileName:a,type:! "patch",uniqID:d},success:function(e){var j=Ext.util.JSON.decode(e.responseText);Ext.get("diff_content_"+g).dom.innerHTML=j.content}})}}},{region:"west",xtype:"panel",title:_("CvsLog"),layout:"fit",bodyBorder:false,collapsible:true,collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:new ui.component.CVSLogGrid({layout:"fit",title:_("Log"),prefix:"PP",fid:g,fpath:c,fname:a,loadStore:(phpDoc.userConf.conf_patch_displaylog==="true")})}},new ui.component.FilePanel({id:"PP-PATCH-PANEL-"+g,region:"center",title:String.format(_("Proposed Patch for {0}"),c+a),prefix:"PP",ftype:"PATCH",fid:g,fpath:c,fname:a,isPatch:true,fuid:d,parser:"xml",storeRecord:f,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_patch_scrollbars"}),new ui.component.FilePanel({id:"PP-ORIGIN-PANEL-"+g,region:"east",width:575,title:_("Original File: ")+c+a,prefix:"PP",ftype:"ORIGIN",fid:g,fpath:c,fname:a,lang:"",readOnly:true,parser:"xml",syncSc! roll:true,syncScrollConf:"conf_patch_scrollbars"})]});Ext.getCmp("main -panel").setActiveTab("PP-"+g);if(Ext.getCmp("PP-"+g).getLayout().north.collapsedEl){Ext.getCmp("PP-"+g).getLayout().north.collapsedEl.addClass("x-layout-collapsed-east-patch-desc")}}else{Ext.getCmp("main-panel").setActiveTab("PP-"+g)}}},initComponent:function(){ui.component.PendingPatchGrid.instance=this;Ext.apply(this,{store:new ui.component._PendingPatchGrid.store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesPendingPatch"}})});ui.component.PendingPatchGrid.superclass.initComponent.call(this)}});ui.component.PendingPatchGrid.prototype.instance=null;Ext.namespace("ui","ui.component","ui.component._PendingReviewGrid");ui.component._PendingReviewGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"reviewed",mapping:"reviewed"},{name:"mainta! iner",mapping:"maintainer"},{name:"needcommit",mapping:"needcommit"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-need-reviewed-nb").innerHTML=a.getCount()}}});ui.component._PendingReviewGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Reviewed"),width:45,sortable:true,dataIndex:"reviewed"},{header:_("Maintainer"),width:45,sortable:true,dataIndex:"maintainer"},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._PendingReviewGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',getRowClass:function(a,d,c,b){if(a.data.needcommit){return"file-need-commit"}},emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>"});Ext.namespace("ui.component._PendingReviewGrid.menu");ui.component._PendingReviewGrid.menu.diff=function(a){Ext.ap! ply(this,a);this.init();ui.component._PendingReviewGrid.menu.diff.supe rclass.constructor.call(this)};Ext.extend(ui.component._PendingReviewGrid.menu.diff,Ext.menu.Item,{text:_("View Diff"),iconCls:"iconViewDiff",init:function(){Ext.apply(this,{handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext.get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:phpDoc.userLang+this.fpath,FileName:this.fname},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}})}});ui.component._PendingReviewGrid.menu.group=function(a){Ext.appl! y(this,a);this.init();ui.component._PendingReviewGrid.menu.group.superclass.constructor.call(this)};Ext.extend(ui.component._PendingReviewGrid.menu.group,Ext.menu.Item,{iconCls:"iconViewDiff",init:function(){Ext.apply(this,{text:String.format(_("Open all files about {0} extension"),this.gname),handler:function(){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+String.format(_("Open all files about {0} extension"),this.gname)+". "+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getAllFilesAboutExtension",ExtName:this.gname},success:function(a){var c=Ext.util.JSON.decode(a.responseText);phpDoc.filePendingOpen=new Array();for(var b=0;b<c.files.length;b=b+1){phpDoc.filePendingOpen[b]={fpath:phpDoc.userLang+c.files[b].path,fname:c.files[b].name}}ui.component.RepositoryTree.instance.openFile(phpDoc.filePendingOpen[0].fpath,phpDoc.filePendingOpen[0].fname);Ext.getBody().unmask()}})}})}});ui.component._PendingReviewGrid.! menu.main=function(a){Ext.apply(this,a);this.init();ui.component._Pend ingReviewGrid.menu.main.superclass.constructor.call(this)};Ext.extend(ui.component._PendingReviewGrid.menu.main,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"FilesNeedReviewed",scope:this,handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},new ui.component._PendingReviewGrid.menu.diff({fpath:this.fpath,fname:this.fname,rowIdx:this.rowIdx,hidden:this.hideDiff}),"-",new ui.component._PendingReviewGrid.menu.group({gname:this.gname,hidden:this.hideGroup})]})}});ui.component.PendingReviewGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",columns:ui.component._PendingReviewGrid.columns,view:ui.component._PendingReviewGrid.view,listeners:{rowcontextmenu:function(b,h,f){var d=b.store.getAt(h),c=d.data.path,a=d.data.name,g=c.split("/");b.getSelectionModel().selectRow(h);new ui.component._PendingReviewGrid.menu.main({grid:b,rowIdx:h,event:f,fpath:c,fn! ame:a,hideDiff:(!d.data.needcommit),hideGroup:(g[1]!=="reference"),gname:g[2]}).showAt(f.getXY())},rowdblclick:function(b,h,g){var d=b.store.getAt(h),c=d.data.path,a=d.data.name,f=Ext.util.md5("FNR-"+phpDoc.userLang+c+a);if(!Ext.getCmp("main-panel").findById("FNR-"+f)){Ext.getCmp("main-panel").add({id:"FNR-"+f,title:a,layout:"border",iconCls:"iconTabNeedReviewed",closable:true,originTitle:a,defaults:{split:true},tabTip:String.format(_("Need Reviewed in: {0}"),c),items:[{region:"west",xtype:"panel",title:_("CvsLog"),collapsible:true,collapsed:true,layout:"fit",bodyBorder:false,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[new ui.component.CVSLogGrid({layout:"fit",title:phpDoc.userLang,prefix:"FNR-LANG",fid:f,fpath:phpDoc.userLang+c,fname:a,loadStore:(phpDoc.userConf.conf_reviewed_displaylog==="true")}),new ui.component.CVSLogGrid({layout:"fit",title:"en",prefix:"FNR-EN",fid:f,fpath:"en"+c,fname:a,loadStore:(phpDoc.userCo! nf.conf_reviewed_displaylog==="true")})]}},new ui.component.FilePanel( {id:"FNR-LANG-PANEL-"+f,region:"center",title:String.format(_("{0} File: "),phpDoc.userLang)+c+a,prefix:"FNR",ftype:"LANG",fid:f,fpath:c,fname:a,lang:phpDoc.userLang,parser:"xml",storeRecord:d,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_reviewed_scrollbars"}),new ui.component.FilePanel({id:"FNR-EN-PANEL-"+f,region:"east",width:575,title:_("en File: ")+c+a,prefix:"FNR",ftype:"EN",fid:f,fpath:c,fname:a,lang:"en",parser:"xml",storeRecord:d,syncScroll:true,syncScrollConf:"conf_reviewed_scrollbars"})]});Ext.getCmp("main-panel").setActiveTab("FNR-"+f)}else{Ext.getCmp("main-panel").setActiveTab("FNR-"+f)}}},initComponent:function(){ui.component.PendingReviewGrid.instance=this;Ext.apply(this,{store:new ui.component._PendingReviewGrid.store({autoLoad:(phpDoc.userLang!=="en"),proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNeedReviewed"}}),tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FNR-filter",width:180,hideTrigger1:true,! enableKeyEvents:true,validateOnBlur:false,validationEvent:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();ui.component.PendingReviewGrid.instance.store.clearFilter()},onTrigger2Click:function(){var a=this.getValue();if(a==""||a.length<3){this.markInvalid(_("Your filter must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();ui.component.PendingReviewGrid.instance.store.filter("maintainer",a)}})]});ui.component.PendingReviewGrid.superclass.initComponent.call(this)}});ui.component.PendingReviewGrid.prototype.instance=null;Ext.namespace("ui","ui.component","ui.component._RepositoryTree");ui.component._RepositoryTree.root=new Ext.tree.AsyncTreeNode({id:"/",text:_("Repository"),draggable:false});ui.component._RepositoryTree.loader=new Ext.tree.TreeLoader({dataUrl:! "./php/controller.php",baseParams:{task:"getAllFiles"}});ui.component. RepositoryTree=Ext.extend(Ext.tree.TreePanel,{animate:true,enableDD:false,useArrows:true,autoScroll:true,bodyBorder:false,containerScroll:true,root:ui.component._RepositoryTree.root,loader:ui.component._RepositoryTree.loader,listeners:{contextmenu:function(a,b){a.select();phpDoc.repositoryContextMenu(a).showAt(b.getXY())},dblclick:function(f,h){if(f.attributes.type==="file"){var a=f.attributes.id,i=Ext.util.md5("AF-"+a),k=f.attributes.extension,l,d,c,b,g,j;if(!Ext.getCmp("main-panel").findById("AF-"+i)){l=a.split("/");l.shift();l.shift();c=l.pop();d=l.shift();a=(l.length>0)?"/"+l.join("/")+"/":"/";if(k!=="html"&&k!=="php"){b=k}else{b="xml"}if(k==="gif"||k==="png"){g={};j={xtype:"panel",layout:"fit",bodyStyle:"padding:5px 5px 0",html:'<img src="/data/'+this.userLogin+"/phpdoc-"+this.userLang+a+'" />'}}else{g={xtype:"panel",region:"west",title:"CvsLog",layout:"fit",bodyBorder:false,split:true,collapsible:true,collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosi! tion:"bottom",defaults:{autoScroll:true},items:[{title:"Log",layout:"fit",items:[new ui.component.CVSLogGrid({prefix:"AF",fid:i,fpath:d+a,fname:c,loadStore:(phpDoc.userConf.conf_allfiles_displaylog==="true")})]}]}};j=new ui.component.FilePanel({id:"AF-ALL-PANEL-"+i,region:"center",title:_("File: ")+d+a+c,prefix:"AF",ftype:"ALL",fid:i,fpath:a,fname:c,lang:d,parser:b,storeRecord:f,syncScrollCB:false,syncScroll:false})}Ext.getCmp("main-panel").add({id:"AF-"+i,layout:"border",title:c,originTitle:c,closable:true,tabTip:String.format(_("in {0}"),a),iconCls:"AllFiles",items:[j,g]});Ext.getCmp("main-panel").setActiveTab("AF-"+i)}else{Ext.getCmp("main-panel").setActiveTab("AF-"+i);if(phpDoc.filePendingOpen[0]){log(phpDoc.filePendingOpen.shift());if(phpDoc.filePendingOpen[0]){if(phpDoc.filePendingOpen[0].fpath){this.openFile(phpDoc.filePendingOpen[0].fpath,phpDoc.filePendingOpen[0].fname)}}}}}}},initComponent:function(){ui.component.RepositoryTree.instance=this;Ext.apply(this,{tbar:[! _("Search: ")," ",new Ext.form.TwinTriggerField({id:"AF-search",valida tionEvent:false,validateOnBlur:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",hideTrigger1:true,width:180,enableKeyEvents:true,listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){var a=ui.component.RepositoryTree.instance;this.setValue("");this.triggers[0].hide();a.root.setText(_("Repository"));delete a.loader.baseParams.search;a.root.reload()},onTrigger2Click:function(){var a=ui.component.RepositoryTree.instance,b=this.getValue();if(b==""||b.length<3){this.markInvalid(_("Your search must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();a.loader.baseParams.search=b;a.root.reload(function(){a.root.setText(String.format(_("Search result: {0}"),a.root.childNodes.length))})}})]});ui.component.RepositoryTree.superclass.initComponent.call(this);new Ext.tree.TreeSorter(this,{folderSort:true})},openFile:function(c,d){Ext.getBody().mask('<img src="themes/img! /loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));Ext.getCmp("acc-all-files").expand();var b=c.split("/"),a=function(f){f.ensureVisible();if(b[0]&&b[0]!==""){for(var e=0;e<f.childNodes.length;++e){if(f.childNodes[e].text===b[0]){b.shift();f.childNodes[e].expand(false,true,a.createDelegate(this))}}}else{for(var e=0;e<f.childNodes.length;++e){if(f.childNodes[e].text===d){f.childNodes[e].ensureVisible();f.childNodes[e].ui.highlight();this.fireEvent("dblclick",f.childNodes[e]);Ext.getBody().unmask()}}}};this.root.expand(false,true,a.createDelegate(this))}});ui.component.RepositoryTree.prototype.instance=null;Ext.namespace("ui","ui.component","ui.component._StaleFileGrid");ui.component._StaleFileGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"revision",mapping:"revision! "},{name:"en_revision",mapping:"en_revision"},{name:"maintainer",mappi ng:"maintainer"},{name:"needcommit",mapping:"needcommit"},{name:"isCritical",mapping:"isCritical"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-need-update-nb").innerHTML=a.getCount()}}});ui.component._StaleFileGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',getRowClass:function(a,d,c,b){if(a.data.needcommit){return"file-need-commit"}if(a.data.isCritical){return"file-critical"}},emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>"});ui.component._StaleFileGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("EN revision"),width:45,sortable:true,dataIndex:"en_revision"},{header:"",width:45,sortable:true,dataIndex:"revision"},{header:_("Maintainer"),width:45,sortable:true,dataIndex:"maintainer"},{header:_("Path"),dataIndex:"path",hid! den:true}];ui.component._StaleFileGrid.menu=function(a){Ext.apply(this,a);this.init();ui.component._StaleFileGrid.menu.superclass.constructor.call(this)};Ext.extend(ui.component._StaleFileGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"iconTabNeedUpdate",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},{scope:this,hidden:this.hideCommit,text:_("View Diff"),iconCls:"iconViewDiff",handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext.get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" />'+_("Please, wait..."));XHR({scope:this,url:"./php/controller! .php",params:{task:"getDiff",FilePath:this.lang+this.fpath,FileName:th is.fname},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}}]})}});ui.component.StaleFileGrid=Ext.extend(Ext.grid.GridPanel,{view:ui.component._StaleFileGrid.view,loadMask:true,autoExpandColumn:"name",bodyBorder:false,listeners:{rowcontextmenu:function(b,f,d){var c=b.store.getAt(f).data.path,a=b.store.getAt(f).data.name;b.getSelectionModel().selectRow(f);new ui.component._StaleFileGrid.menu({hideCommit:(b.store.getAt(f).data.needcommit===false),grid:b,event:d,rowIdx:f,lang:phpDoc.userLang,fpath:c,fname:a}).showAt(d.getXY())},rowdblclick:function(b,h,f){var g=b.store.getAt(h),a=g.data.path,c=g.data.name,j=g.data.en_revision,i=g.data.revision,d=Ext.util.md5("FNU-"+phpDoc.userLang+a+c),k="";if(!Ext.getCmp("main-panel").findById("FNU-"+d)){if(phpDoc.userConf.conf_needupdate_diff==="using-viewvc"){k=ui.component.ViewVCDiff}else{if(phpDoc.userConf.conf_needupda! te_diff==="using-exec"){k=ui.component.ExecDiff}}Ext.getCmp("main-panel").add({id:"FNU-"+d,layout:"border",title:c,originTitle:c,iconCls:"iconTabNeedUpdate",closable:true,defaults:{split:true},tabTip:String.format(_("Need Update: in {0}"),a),items:[new k({region:"north",collapsible:true,prefix:"FNU",fid:d,fpath:a,fname:c,rev1:i,rev2:j}),{region:"west",xtype:"panel",title:_("CvsLog"),collapsible:true,collapsed:true,layout:"fit",bodyBorder:false,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[new ui.component.CVSLogGrid({layout:"fit",title:phpDoc.userLang,prefix:"FNU-LANG",fid:d,fpath:phpDoc.userLang+a,fname:c,loadStore:(phpDoc.userConf.conf_needupdate_displaylog==="true")}),new ui.component.CVSLogGrid({layout:"fit",title:"en",prefix:"FNU-EN",fid:d,fpath:"en"+a,fname:c,loadStore:(phpDoc.userConf.conf_needupdate_displaylog==="true")})]}},new ui.component.FilePanel({id:"FNU-LANG-PANEL-"+d,region:"center",title:String.format(_! ("{0} File: "),phpDoc.userLang)+a+c,prefix:"FNU",ftype:"LANG",fid:d,fp ath:a,fname:c,lang:phpDoc.userLang,parser:"xml",storeRecord:g,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_needupdate_scrollbars"}),new ui.component.FilePanel({id:"FNU-EN-PANEL-"+d,region:"east",width:575,title:_("en File: ")+a+c,prefix:"FNU",ftype:"EN",fid:d,fpath:a,fname:c,lang:"en",parser:"xml",storeRecord:g,syncScroll:true,syncScrollConf:"conf_needupdate_scrollbars"})]});Ext.getCmp("main-panel").setActiveTab("FNU-"+d)}else{Ext.getCmp("main-panel").setActiveTab("FNU-"+d)}}},initComponent:function(){ui.component.StaleFileGrid.instance=this;ui.component._StaleFileGrid.columns[2].header=String.format(_("{0} revision"),Ext.util.Format.uppercase(phpDoc.userLang));Ext.apply(this,{columns:ui.component._StaleFileGrid.columns,store:new ui.component._StaleFileGrid.store({autoLoad:(phpDoc.userLang!=="en"),proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNeedUpdate"}}),tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FNU-filter"! ,width:180,hideTrigger1:true,enableKeyEvents:true,validateOnBlur:false,validationEvent:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();ui.component.StaleFileGrid.instance.store.clearFilter()},onTrigger2Click:function(){var a=this.getValue();if(a==""||a.length<3){this.markInvalid(_("Your filter must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();ui.component.StaleFileGrid.instance.store.filter("maintainer",a)}})]});ui.component.StaleFileGrid.superclass.initComponent.call(this)}});ui.component.StaleFileGrid.prototype.instance=null;Ext.namespace("ui","ui.component","ui.component._SummaryGrid");ui.component._SummaryGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getSummaryInfo"},reader:new Ext.data.J! sonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Reco rd.create([{name:"id",mapping:"id"},{name:"libel",mapping:"libel"},{name:"nbFiles",mapping:"nbFiles"},{name:"percentFiles",mapping:"percentFiles"},{name:"sizeFiles",mapping:"sizeFiles"},{name:"percentSize",mapping:"percentSize"}])),listeners:{load:function(){this.each(function(a){switch(a.id){case 1:a.set("libel",_("Up to date files"));break;case 2:a.set("libel",_("Old files"));break;case 3:a.set("libel",_("Critical files"));break;case 4:a.set("libel",_("Files without revision tag"));break;case 5:a.set("libel",_("Files available for translation"));break;case 6:a.set("libel",_("Total"));break;default:a.set("libel","");break}a.commit()})}}});ui.component._SummaryGrid.columns=[new Ext.grid.RowNumberer(),{id:"StatusType",header:_("File status type"),width:180,sortable:true,dataIndex:"libel"},{header:_("Number of files"),width:110,sortable:true,dataIndex:"nbFiles"},{header:_("Percent of files"),width:110,sortable:true,dataIndex:"percentFiles"},{header:_("Size of files (kB)"),widt! h:110,sortable:true,dataIndex:"sizeFiles"},{header:_("Percent of size"),width:110,sortable:true,dataIndex:"percentSize"}];ui.component._SummaryGrid.view=new Ext.grid.GridView({getRowClass:function(a,d,c,b){switch(a.data.id){case 1:return"summary_1";case 2:return"summary_2";case 3:return"summary_3";case 4:return"summary_4";case 5:return"summary_5";default:return""}}});ui.component.SummaryGrid=Ext.extend(Ext.grid.GridPanel,{title:_("Summary"),loadMask:true,autoScroll:true,height:400,width:800,store:ui.component._SummaryGrid.store,columns:ui.component._SummaryGrid.columns,view:ui.component._SummaryGrid.view,listeners:{render:function(a){a.store.load.defer(20,a.store)},rowdblclick:function(a,d,b){var c=a.store.getAt(d).data.id;if(c===1||c===2||c===3){Ext.getCmp("acc-need-update").expand()}}},initComponent:function(){Ext.apply(this,{iconCls:"flag-"+phpDoc.userLang,});ui.component.SummaryGrid.superclass.initComponent.call(this)}});ui.component.SummaryGrid.reload=function(){ui.com! ponent._SummaryGrid.store.reload()};Ext.namespace("ui","ui.component") ;ui.component.TranslationGraph=Ext.extend(Ext.Panel,{title:_("Graphics"),layout:"fit",iconCls:"home-graphic-title",autoHeight:true,html:'<div align="center" id="graph_container" style="width: 530px; height: 302px"><img id="graph_picture" src="" height="300"></div>',listeners:{afterlayout:function(){var a=Ext.get("graph_picture"),c=Ext.get("graph_container"),b=new Ext.LoadMask(c);a.setVisibilityMode(Ext.Element.VISIBILITY);a.on("load",function(){a.stopFx();b.hide();a.fadeIn({duration:2})});b.show();a.hide();a.dom.src="./php/controller.php?task=translationGraph"}}});Ext.namespace("ui","ui.component","ui.component._TranslatorGrid");ui.component._TranslatorGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getTranslatorInfo"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"name",mapping:"name"},{name:"email",mapping:"mail"},{name:"nick",m! apping:"nick"},{name:"cvs",mapping:"cvs"},{name:"uptodate",mapping:"uptodate",type:"int"},{name:"old",mapping:"old",type:"int"},{name:"critical",mapping:"critical",type:"int"},{name:"sum",mapping:"sum",type:"int"}]))});ui.component._TranslatorGrid.store.setDefaultSort("nick","asc");ui.component._TranslatorGrid.translatorSumRenderer=function(b){if(b){var a=(b===0||b>1)?b:1;return"("+a+" Translators)"}else{return}};ui.component._TranslatorGrid.uptodateRenderer=function(a){if(a==="0"){return}else{return'<span style="color:green; font-weight: bold;">'+a+"</span>"}};ui.component._TranslatorGrid.old_sumRenderer=function(a){return(a==="0")?"":a};ui.component._TranslatorGrid.criticalRenderer=function(a){if(a==="0"){return}else{return'<span style="color:red; font-weight: bold;">'+a+"</span>"}};ui.component._TranslatorGrid.columns=[new Ext.grid.RowNumberer(),{id:"GridTransName",header:_("Name"),sortable:true,dataIndex:"name",summaryType:"count",summaryRenderer:ui.component._Translato! rGrid.translatorSumRenderer},{header:_("Email"),width:110,sortable:tru e,dataIndex:"email"},{header:_("Nick"),width:70,sortable:true,dataIndex:"nick"},{header:_("Cvs"),width:45,sortable:true,dataIndex:"cvs"},{header:_("UptoDate"),width:60,sortable:true,renderer:ui.component._TranslatorGrid.uptodateRenderer,dataIndex:"uptodate",summaryType:"sum"},{header:_("Old"),width:45,sortable:true,renderer:ui.component._TranslatorGrid.old_sumRenderer,dataIndex:"old",summaryType:"sum"},{header:_("Critical"),width:60,sortable:true,renderer:ui.component._TranslatorGrid.criticalRenderer,dataIndex:"critical",summaryType:"sum"},{header:_("Sum"),width:50,sortable:true,renderer:ui.component._TranslatorGrid.old_sumRenderer,dataIndex:"sum",summaryType:"sum"}];ui.component.TranslatorGrid=Ext.extend(Ext.grid.GridPanel,{title:_("Translators"),iconCls:"iconTranslator",loadMask:true,autoScroll:true,height:400,width:800,plugins:[new Ext.ux.grid.GridSummary()],store:ui.component._TranslatorGrid.store,columns:ui.component._TranslatorGrid.columns,autoExpandColumn:"GridTransNa! me",listeners:{render:function(a){a.store.load.defer(20,a.store)},rowdblclick:function(c,f,d){var a=c.store.getAt(f).data.email,b=c.store.getAt(f).data.name;c.getSelectionModel().selectRow(f);phpDoc.sendEmail(b,a)},rowcontextmenu:function(c,f,d){var a=c.store.getAt(f).data.email,b=c.store.getAt(f).data.name;c.getSelectionModel().selectRow(f);new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+String.format(_("Send an email to {0}"),b)+"</b>",iconCls:"iconSendEmail",handler:function(){phpDoc.sendEmail(b,a)}},"-",{text:String.format(_("Send an email to the {0}"),"doc-"+phpDoc.userLang+"@lists.php.net"),iconCls:"iconSendEmail",handler:function(){phpDoc.sendEmail("Php Doc Team "+phpDoc.userLang,"doc-"+phpDoc.userLang+"@lists.php.net")}}]}).showAt(d.getXY())}}});ui.component.TranslatorGrid.reload=function(){ui.component._TranslatorGrid.store.reload()};Ext.namespace("ui","ui.component");ui.component.ViewVCDiff=Ext.extend(Ext.Panel,{layout:"fit",title:_("Diff From cvs"),height:150,! collapsed:true,initComponent:function(){Ext.apply(this,{items:{id:this ..prefix+"-diff-"+this.fid,xtype:"iframepanel",loadMask:true,defaultSrc:"http://cvs.php.net/viewvc.cgi/phpdoc/en"+this.fpath+this.fname+"?r1="+this.rev1+"&r2="+this.rev2}});ui.component.ViewVCDiff.superclass.initComponent.call(this)}});var phpDoc=function(){Ext.QuickTips.init();Ext.BLANK_IMAGE_URL="js/extjs/resources/images/default/s.gif";return{storeCommitLogMessage:"",userLogin:null,userLang:null,appName:"PhpDocumentation Online Editor",appVer:"0.2",uiRevision:"$Revision: 1.7 $",userConf:{conf_needupdate_diff:"using-exec",conf_needupdate_scrollbars:true,conf_needupdate_displaylog:false,conf_error_skipnbliteraltag:true,conf_error_scrollbars:true,conf_error_displaylog:false,conf_reviewed_scrollbars:true,conf_reviewed_displaylog:false,conf_allfiles_displaylog:false,conf_patch_scrollbars:true,conf_patch_displaylog:false,conf_theme:"themes/empty.css"},filePendingOpen:"",init:function(){Ext.getBody().on("contextmenu",function(a){a.stopEvent()},this);new ui.task.LoadConfigTask()},! winForbidden:function(){Ext.MessageBox.alert(_("Forbidden"),_("You can't do this action as cvsread user."))},loadDataStore:function(){this.storeCommitLogMessage=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getCommitLogMessage"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"text",mapping:"text"}])})},saveLangFile:function(d,b,f,c,g,e,a){if(this.userLogin==="cvsread"){this.winForbidden();return}if(d==="AF"){new ui.task.SaveLangFileTask({prefix:d,ftype:b,fid:f,fpath:c,fname:g,lang:e,storeRecord:a});return}Ext.MessageBox.show({title:_("Confirm"),msg:_("Do you want to check for error before saving?"),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,fn:function(h){if(h==="no"){new ui.task.SaveLangFileTask({prefix:d,ftype:b,fid:f,fpath:c,fname:g,lang:e,storeRecord:a})}else{if(h==="yes"){new ui.task.CheckFileTask({prefix:d,ftype:b,fid:f,fpath:c,fname:g,lan! g:e,storeRecord:a})}}}})},removeTabEvent:function(d,e){var b,c,f,a=e.i d.split("-");if((a[0]==="FE"||a[0]==="FNU"||a[0]==="FNR"||a[0]==="PP"||a[0]==="AF")&&a[1]!=="help"){if(a[0]==="FE"){b=Ext.getCmp("FE-LANG-FILE-"+a[1]).isModified}if(a[0]==="FNU"){b=Ext.getCmp("FNU-LANG-FILE-"+a[1]).isModified}if(a[0]==="FNR"){b=Ext.getCmp("FNR-LANG-FILE-"+a[1]).isModified}if(a[0]==="FE"){c=Ext.getCmp("FE-EN-FILE-"+a[1]).isModified}if(a[0]==="FNU"){c=Ext.getCmp("FNU-EN-FILE-"+a[1]).isModified}if(a[0]==="FNR"){c=Ext.getCmp("FNR-EN-FILE-"+a[1]).isModified}if(a[0]==="PP"){f=Ext.getCmp("PP-PATCH-FILE-"+a[1]).isModified}if(a[0]==="AF"){f=Ext.getCmp("AF-ALL-FILE-"+a[1]).isModified}if(c||b||f){Ext.Msg.show({scope:this,title:_("Confirm"),msg:_("This file has been modified without being saved.<br/>Do you really want to close?"),buttons:Ext.Msg.YESNO,icon:Ext.Msg.QUESTION,fn:function(g,h){if(g==="yes"){d.un("beforeremove",this.removeTabEvent,this);d.remove(e);d.addListener("beforeremove",this.removeTabEvent,this)}}});return false}else{return true}}else{return true}},Wi! nCommit:function(k,j,f){var g,d,l,h,b,c,e,i;d=Ext.get("acc-need-update");if(!g){g=new Ext.Window({scope:this,id:"winCvsCommit",title:_("CVS commit"),closable:false,layout:"form",width:400,height:480,resizable:false,modal:true,bodyStyle:"padding:5px 5px 0",labelAlign:"top",items:[{xtype:"checktreepanel",id:"tree-panel",anchor:"100%",height:180,autoScroll:true,rootVisible:false,root:{text:"root",expanded:true,children:[]}},{scope:this,xtype:"combo",fieldLabel:_("Older messages"),editable:false,name:"first2",anchor:"100%",store:this.storeCommitLogMessage,triggerAction:"all",tpl:'<tpl for="."><div class="x-combo-list-item">{[values.text.split("\n").join("<br/>")]}</div></tpl>',valueField:"id",displayField:"text",listeners:{scope:this,render:function(){this.storeCommitLogMessage.load()},select:function(o,m,n){Ext.getCmp("form-commit-message-log").setValue(m.data.text)}}},{xtype:"textarea",id:"form-commit-message-log",fieldLabel:_("Log message"),name:"first3",anchor:"100%",height! :150,value:""}],tools:[{scope:this,id:"gear",qtip:_("Configure this to ols"),handler:function(){var p,n,o;function m(q){return q.split("\n").join("<br/>")}p=new Ext.form.TextArea({grow:true,growMin:120});n=new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),{id:"GridManageLog",header:_("Log message"),dataIndex:"text",renderer:m,editor:new Ext.Editor(p,{shadow:false,autoSize:true,listeners:{scope:this,complete:function(s,t,r){var q=s.record.data.id;XHR({scope:this,url:"./php/controller.php",params:{task:"saveLogMessage",messID:q,mess:t},success:function(u){this.storeCommitLogMessage.getById(q).commit()},failure:function(u){this.winForbidden()}})}}})}]);o=new Ext.Window({title:_("Manage Log Message"),iconCls:"winManageLog",width:650,height:350,layout:"fit",resizable:false,modal:true,autoScroll:true,html:'<div class="diff-content"></div>',items:[{xtype:"editorgrid",store:this.storeCommitLogMessage,loadMask:true,cm:n,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),autoExpandColumn:"GridManageLog",listeners:{scope:this,rowcontextmenu:functio! n(q,t,r){q.getSelectionModel().selectRow(t);var s=new Ext.menu.Menu({items:[{text:_("Delete this Log Message"),iconCls:"iconDelete",scope:this,handler:function(){XHR({scope:this,url:"./php/controller.php",params:{task:"deleteLogMessage",messID:this.storeCommitLogMessage.getAt(t).data.id},success:function(u){this.storeCommitLogMessage.remove(this.storeCommitLogMessage.getAt(t))},failure:function(u){this.winForbidden()}})}}]});s.showAt(r.getXY())}}}],buttons:[{text:_("Close"),handler:function(){o.close()}}],listeners:{scope:this,close:function(){this.storeCommitLogMessage.reload()}}});o.show()}}],buttons:[{scope:this,text:_("Submit"),id:"win-commit-btn-submit",handler:function(){var m,q,t,v,n,o,r=[],u,s="",p;if(this.userLogin==="cvsread"){g.close();this.winForbidden();return}m=Ext.getCmp("tree-panel").getValue();q=[];for(p=0;p<m.length;p=p+1){t=Ext.getCmp("tree-panel").getNodeById(m[p]).attributes;v="FE-"+Ext.util.md5("FE-"+t.FilePath+t.FileName);n="FNU-"+Ext.util.md5("FNU-"+! t.FilePath+t.FileName);o="FNR-"+Ext.util.md5("FNR-"+t.FilePath+t.FileN ame);if(Ext.getCmp("main-panel").findById(v)||Ext.getCmp("main-panel").findById(n)||Ext.getCmp("main-panel").findById(o)){if(Ext.getCmp("main-panel").findById(v)){u=v}if(Ext.getCmp("main-panel").findById(n)){u=n}if(Ext.getCmp("main-panel").findById(o)){u=o}r[0]=u;r[1]=t.FileName;q.push(r)}}if(q.length>0){for(p=0;p<q.length;p=p+1){s+=q[p][1]+"<br/>"}Ext.MessageBox.show({scope:this,title:"Warning",msg:(q.length>1)?String.format(_("There is {0} files to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?"),q.length,s):String.format(_("There is {0} file to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?"),q.length,s),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,fn:function(w){if(w==="yes"){for(p=0;p<q.length;p=p+1){Ext.getCmp("main-panel").remove(q[p][0])}this.WinCommitLastStep(m,this)}else{return}}})}else{this.WinCommitLastStep(m,this)}return}},{text:_("Close"),id:"win-commit-btn-close",handler:function(){g.cl! ose()}}]})}g.show(d);var a=ui.component.PendingCommitGrid.instance;if(k){l=a.store.getAt(j).data.id;b=a.store.getAt(j).data.path;c=a.store.getAt(j).data.name;h=Ext.util.md5(b+c);e=new Ext.tree.TreeNode({id:"need-commit-"+h,text:b+c,FileDBID:l,FilePath:b,FileName:c,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(e)}else{a.store.each(function(m){if(f&&f==="by me"&&m.data.by!==this.userLogin){}else{l=m.data.id;b=m.data.path;c=m.data.name;h=Ext.util.md5(b+c);e=new Ext.tree.TreeNode({id:"need-commit-"+h,text:b+c,FileDBID:l,FilePath:b,FileName:c,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(e)}},this);i=new Ext.tree.TreeSorter(Ext.getCmp("tree-panel"),{});i.doSort(Ext.getCmp("tree-panel").getRootNode())}},WinCommitLastStep:function(f,c){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait unti! l commit..."));var a=[],e,d,b;for(b=0;b<f.length;b=b+1){e=Ext.getCmp(" tree-panel").getNodeById(f[b]);a.push(e.attributes.FileDBID)}d=Ext.getCmp("form-commit-message-log").getValue();Ext.getCmp("winCvsCommit").close();XHR({url:"./php/controller.php",params:{task:"cvsCommit",nodes:Ext.util.JSON.encode(a),logMessage:d},success:function(h){var i=Ext.util.JSON.decode(h.responseText);Ext.getBody().unmask();var g=new Ext.Window({title:_("Status"),width:450,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:i.mess.join("<br/>"),buttons:[{text:_("Close"),handler:function(){g.close()}}]});g.show();Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"onSuccesCommit",nodes:Ext.util.JSON.encode(a),logMessage:d},success:function(j){if(c.userLang!="en"){ui.component.ErrorFileGrid.instance.store.reload();ui.component.PendingReviewGrid.instance.store.reload();ui.component.StaleFileGrid.instance.sto! re.reload()}ui.component.PendingCommitGrid.instance.store.reload();ui.component.TranslatorGrid.reload();ui.component.SummaryGrid.reload();Ext.getBody().unmask()}})}})},WinUpdate:function(){var e,d;function c(f){ui.task.PingTask.instance.cancel();Ext.get("wizard-step-1").replaceClass("wizard-step-before","wizard-step-working");Ext.get("wizard-step-1.1").replaceClass("wizard-wait","wizard-show");XHR({scope:f,url:"./php/controller.php",params:{task:"updateRepository"},success:function(g){Ext.get("wizard-step-1").replaceClass("wizard-step-working","wizard-step-done");Ext.get("wizard-step-1.1").replaceClass("wizard-show","wizard-wait");b(f)},failure:function(h){var j=Ext.util.JSON.decode(h.responseText);if(j&&j.success===false){e.close();this.winForbidden()}else{function i(){XHR({scope:f,url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_update_repository"},success:function(k){g.delay(5000)},failure:function(k){var l=Ext.util.JSON.decode(k.responseText);if(l&! &l.success===false){Ext.get("wizard-step-1").replaceClass("wizard-step -working","wizard-step-done");Ext.get("wizard-step-1.1").replaceClass("wizard-show","wizard-wait");b(this)}else{g.delay(5000)}}})}var g=new Ext.util.DelayedTask(function(){i()});g.delay(5000)}}})}function b(f){Ext.get("wizard-step-2").replaceClass("wizard-step-before","wizard-step-working");XHR({scope:f,url:"./php/controller.php",params:{task:"applyTools"},success:function(g){Ext.get("wizard-step-2").replaceClass("wizard-step-working","wizard-step-done");a(this)},failure:function(h){function i(){XHR({scope:f,url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_apply_tools"},success:function(j){g.delay(5000)},failure:function(j){var k=Ext.util.JSON.decode(j.responseText);if(k&&k.success===false){Ext.get("wizard-step-2").replaceClass("wizard-step-working","wizard-step-done");a(this)}else{g.delay(5000)}}})}var g=new Ext.util.DelayedTask(function(){i()});g.delay(5000)}})}function a(f){Ext.get("wizard-step-3").replaceClass("wizard-step-before","wizard-step-worki! ng");if(phpDoc.userLang!="en"){ui.component.StaleFileGrid.instance.store.reload();ui.component.TranslatorGrid.reload();ui.component.ErrorFileGrid.instance.store.reload()}Ext.get("wizard-step-3").replaceClass("wizard-step-working","wizard-step-done");Ext.getCmp("btn-start-refresh").setIconClass("finishRefresh");Ext.getCmp("btn-start-refresh").setText(_("Finish !"));Ext.getCmp("btn-start-refresh").setHandler(function(){e.close()});Ext.getCmp("btn-start-refresh").enable();ui.task.PingTask.instance.delay(30000);e.tools.close.setVisible(true)}d=Ext.get("acc-need-update");if(!e){e=new Ext.Window({title:_("Refresh all data"),layout:"form",width:300,height:200,resizable:false,modal:true,bodyStyle:"padding:15px 15px 0",iconCls:"refresh",html:'<div id="wizard-step-1" class="wizard-step-before">'+_("Update all files from Cvs")+'</div><div id="wizard-step-1.1" class="wizard-wait">'+_("This may take time. Thank you for your patience...")+'</div><div id="wizard-step-2" class="wizard-step! -before">'+_("Apply all tools")+'</div><div id="wizard-step-3" class=" wizard-step-before">'+_("Reload data")+"</div>",buttons:[{scope:this,text:_("Start"),id:"btn-start-refresh",iconCls:"startRefresh",handler:function(){Ext.getCmp("btn-start-refresh").disable();e.tools.close.setVisible(false);Ext.getDom("lastUpdateTime").innerHTML=_("update in progress...");c(this)}}]})}Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Verify if there is an update in progress. Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getLastUpdate"},success:function(f){Ext.getBody().unmask();var g=Ext.util.JSON.decode(f.responseText);if(g.lastupdate==="in_progress"){Ext.MessageBox.show({title:_("Status"),msg:_("There is currently an update in progress.<br/>You can't perform an update now."),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO})}else{e.show(d)}}})},WinCheckBuild:function(){var c,a;a=Ext.get("acc-need-update");function b(d){XHR({scope:d,url:"./php/controller.php",params:{task:"getLogFile",file:"lo! g_check_build"},success:function(e){var f=Ext.util.JSON.decode(e.responseText);ui.task.PingTask.instance.delay(30000);if(Ext.getCmp("main-panel").findById("check_build_panel")){Ext.getCmp("main-panel").remove("check_build_panel")}Ext.getCmp("main-panel").add({xtype:"panel",id:"check_build_panel",title:_("Check Build Result"),closable:true,autoScroll:true,iconCls:"checkBuild",html:'<div class="check-build-content">'+f.mess+"</div>"});Ext.getCmp("main-panel").setActiveTab("check_build_panel")}})}if(!c){c=new Ext.Window({title:_("Check Build"),iconCls:"checkBuild",layout:"form",width:350,height:200,resizable:false,modal:true,bodyStyle:"padding:5px 5px 0",labelAlign:"top",buttons:[{scope:this,text:_("Go !"),id:"win-check-build-btn-submit",handler:function(){var d=Ext.getCmp("option-xml-details").checked;c.close();Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait until the build is checked..."));ui.task.PingTask.instance.c! ancel();XHR({scope:this,url:"./php/controller.php",params:{task:"check Build",xmlDetails:d},success:function(e){Ext.getBody().unmask();b(this)},failure:function(e){var h=Ext.util.JSON.decode(e.responseText);if(h&&h.success===false){ui.task.PingTask.instance.delay(30000);Ext.getBody().unmask();this.winForbidden()}else{function f(i){XHR({scope:i,url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_check_build"},success:function(j){g.delay(5000)},failure:function(j){var k=Ext.util.JSON.decode(j.responseText);if(k&&k.success===false){Ext.getBody().unmask();b(this)}else{g.delay(5000)}}})}var g=new Ext.util.DelayedTask(function(){f(this)},this);g.delay(5000)}}})}}],items:[{xtype:"panel",baseCls:"x-plain",bodyStyle:"padding:5px 5px 0",html:_("You're about to check the build via this command:")+"<br/><br/>/usr/bin/php configure.php --with-lang="+this.userLang+"<br><br>",modal:false},{xtype:"checkbox",hideLabel:true,checked:false,boxLabel:_("Enable detailed XML error messages"),name:"option-xml-details",id:"option-xml-details"}]})}c.sh! ow(a)},sendEmail:function(b,a){var c,d;c=new Ext.form.FormPanel({baseCls:"x-plain",labelWidth:55,url:"save-form.php",defaultType:"textfield",items:[{fieldLabel:_("Send To"),name:"to",readOnly:true,anchor:"100%",value:'"'+b+'" <'+a+">"},{fieldLabel:_("Subject"),name:"subject",anchor:"100%"},{xtype:"textarea",hideLabel:true,name:"msg",anchor:"100% -53"}]});d=new Ext.Window({title:_("Send an email"),width:500,height:300,minWidth:300,minHeight:200,layout:"fit",plain:true,bodyStyle:"padding:5px;",buttonAlign:"center",items:c,iconCls:"iconSendEmail",buttons:[{text:_("Send"),handler:function(){var e=c.getForm().getValues();XHR({url:"./php/controller.php",params:{task:"sendEmail",to:e.to,subject:e.subject,msg:e.msg},success:function(f){d.close();Ext.MessageBox.alert(_("Status"),String.format(_("Email sent to {0} with success!"),b))}})}},{text:_("Cancel"),handler:function(){d.close()}}]});d.show()},repositoryContextMenu:function(e){var b,a,c,d;if(e.attributes.type==="folder"||e.isRo! ot){return new Ext.menu.Menu({items:[{text:(e.isExpanded())?"<b>"+_("C ollapse")+"</b>":"<b>"+_("Expand")+"</b>",iconCls:"iconFolderClose",handler:function(){if(e.isExpanded()){e.collapse()}else{e.expand()}}}]})}else{if(e.attributes.type==="file"){a=e.attributes.text;c=e.attributes.id;b=c.split("/");b.shift();b.shift();b.pop();d=b.shift();c=b.join("/")+"/";return new Ext.menu.Menu({items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"iconTabNeedReviewed",handler:function(){ui.component.RepositoryTree.instance.fireEvent("dblclick",e)}},{hidden:(e.attributes.from==="search"),scope:this,text:(d==="en")?String.format(_("Open the same file in <b>{0}</b>"),Ext.util.Format.uppercase(this.userLang)):String.format(_("Open the same file in <b>{0}</b>"),"EN"),iconCls:"iconTabNeedReviewed",handler:function(){if(d==="en"){this.openFile(this.userLang+"/"+c,a)}else{this.openFile("en/"+c,a)}}}]})}}},drawInterface:function(){new ui.task.PingTask().delay(30000);var b=new ui.component.MainMenu(),a=(this.userLang==="en")?[new ui.component.LocalMail! Grid()]:[new ui.component.SummaryGrid(),new ui.component.TranslatorGrid(),new ui.component.LocalMailGrid(),new ui.component.BugsGrid(),new ui.component.TranslationGraph()];new Ext.Viewport({layout:"border",items:[{region:"north",html:'<h1 class="x-panel-header"><img src="themes/img/mini_php.png" style="vertical-align: middle;" /> '+this.appName+"</h1>",autoHeight:true,border:false,margins:"0 0 5 0"},{region:"west",collapsible:true,collapseMode:"mini",animate:true,split:true,layout:"fit",width:300,autoScroll:true,items:[{layout:"accordion",animate:true,bodyBorder:false,border:false,tbar:[{text:_("Main Menu"),iconCls:"MainMenu",menu:b}],items:[{id:"acc-need-update",title:_("Files Need Update")+' - <em id="acc-need-update-nb">0</em>',layout:"fit",iconCls:"FilesNeedUpdate",hidden:(this.userLang==="en"),items:[new ui.component.StaleFileGrid()],collapsed:true,listeners:{expand:function(c){Ext.getCmp("FNU-filter").wrap.setWidth(200)}}},{id:"acc-error",title:_("Error in ! current translation")+' - <em id="acc-error-nb">0</em>',layout:"fit",i conCls:"FilesError",hidden:(this.userLang==="en"),items:[new ui.component.ErrorFileGrid()],collapsed:true,listeners:{expand:function(c){Ext.getCmp("FE-filter").wrap.setWidth(200)}}},{id:"acc-need-reviewed",title:_("Files Need Reviewed")+' - <em id="acc-need-reviewed-nb">0</em>',layout:"fit",iconCls:"FilesNeedReviewed",hidden:(this.userLang==="en"),items:[new ui.component.PendingReviewGrid()],collapsed:true,listeners:{expand:function(c){Ext.getCmp("FNR-filter").wrap.setWidth(200)}}},{id:"acc-notInEn",title:_("Not in EN tree")+' - <em id="acc-notInEn-nb">0</em>',layout:"fit",iconCls:"NotInEn",hidden:(this.userLang==="en"),items:[new ui.component.NotInENGrid()],collapsed:true},{id:"acc-all-files",title:_("All files"),layout:"fit",iconCls:"AllFiles",items:[new ui.component.RepositoryTree()],collapsed:true,listeners:{expand:function(c){Ext.getCmp("AF-search").wrap.setWidth(200)}}},{id:"acc-need-pendingCommit",title:_("Pending for commit")+' - <em id="acc-pendingCommit-nb">0</em>'! ,layout:"fit",iconCls:"PendingCommit",items:[new ui.component.PendingCommitGrid()],collapsed:true},{id:"acc-need-pendingPatch",title:_("Pending Patch")+' - <em id="acc-pendingPatch-nb">0</em>',layout:"fit",iconCls:"PendingPatch",items:[new ui.component.PendingPatchGrid()],collapsed:true}]}]},{xtype:"tabpanel",id:"main-panel",region:"center",activeTab:0,enableTabScroll:true,layoutOnTabChange:true,plugins:new Ext.ux.TabCloseMenu(),listeners:{scope:this,beforeremove:this.removeTabEvent},items:[{xtype:"panel",id:"MainInfoTabPanel",title:_("Home"),baseCls:"MainInfoTabPanel",autoScroll:true,plain:true,items:[{xtype:"panel",border:false,html:'<div class="res-block"><div class="res-block-inner"><h3>'+String.format(_("Connected as <em>{0}</em>"),this.userLogin)+"<br/><br/>"+String.format(_('Last data update: <em id="lastUpdateTime">{0}</em>'),"-")+"</h3></div></div>"},{xtype:"tabpanel",activeTab:0,plain:true,autoScroll:true,height:400,border:false,items:a,defaults:{border:true},layo! utOnTabChange:true}]}]}]});Ext.get("loading").remove();Ext.fly("loadin g-mask").fadeOut({remove:true});if(directAccess){this.openFile(directAccess.lang+directAccess.path,directAccess.name)}}}}();Ext.EventManager.onDocumentReady(phpDoc.init,phpDoc,true); \ No newline at end of file http://cvs.php.net/viewvc.cgi/doc-editor/TODO?r1=1.11&r2=1.12&diff_format=u Index: doc-editor/TODO diff -u doc-editor/TODO:1.11 doc-editor/TODO:1.12 --- doc-editor/TODO:1.11 Mon Jun 15 07:04:54 2009 +++ doc-editor/TODO Fri Jun 26 10:29:45 2009 @@ -4,7 +4,7 @@ * Dedicate a wiki page to the doc-editor (and move this TODO there) * Take a decision once and for all about the app name, and its spelling * Take a decision about the license, and update all the files accordingly -* Use the $Revision: 1.11 $ keyword (in comments, about popup, ..) +* Use the $Revision: 1.12 $ keyword (in comments, about popup, ..) * Allow use for other systems - Other PHP Projects (peardoc, gtkdocs, php-src/README*, phpweb/reST/) - Other VCS Systems (SVN, GIT) @@ -34,7 +34,7 @@ * Translation Status - At the current time, the french translation graph is useless/unreadable. We need to find a better way to display the information - + * Implement i18n * Automatic upgrade @@ -48,12 +48,13 @@ * Clean up the namespaces * Split main.js to several objects & files (to be discussed) -* Use Object in FilePendingOpen Queue instead of Array * Implement RTL where appropriate * Decide whether XHR abstraction could be used (refer bug report from yannick) * Remove dependency on '-ALL-' id token for 'AF' panel in removetab handler * Merge SaveEnFile with SaveLangFile if possible * Move repositoryContextMenu from main.js to ui/component/RepositoryTree +* Generalize Diff?? cvs-log-diff, cvs-file-diff, patch-file-diff, pending-commit-file-diff +* adjust diff-panel id convention to prevent mixing different diff-panel USER INTERFACE: =============== http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/GetFileTask.js?view=markup&rev=1.1 Index: doc-editor/js/ui/task/GetFileTask.js +++ doc-editor/js/ui/task/GetFileTask.js Ext.namespace('ui','ui.task'); // config - { prefix, ftype, fid, fpath, fname } ui.task.GetFileTask = function(config) { Ext.apply(this, config); var id_prefix = this.prefix + '-' + this.ftype; // Mask the panel Ext.get(id_prefix + '-PANEL-' + this.fid).mask( '<img src="themes/img/loading.gif" ' + 'style="vertical-align: middle;" /> '+ _('Loading...') ); // We load the File XHR({ scope : this, url : './php/controller.php', params : { task : 'getFile', FilePath : this.fpath, FileName : this.fname }, success : function(response) { var o = Ext.util.JSON.decode(response.responseText); Ext.getCmp(id_prefix + '-FILE-' + this.fid).setCode(o.content); Ext.get(id_prefix + '-PANEL-' + this.fid).unmask(); }, callback : function() { // Reviewed function to open all files of an extension if (phpDoc.filePendingOpen[0]) { phpDoc.filePendingOpen.shift(); if (phpDoc.filePendingOpen[0]) { if (phpDoc.filePendingOpen[0].fpath) { ui.component.RepositoryTree.instance.openFile( phpDoc.filePendingOpen[0].fpath, phpDoc.filePendingOpen[0].fname ); } } } } }); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/LoadConfigTask.js?view=markup&rev=1.1 Index: doc-editor/js/ui/task/LoadConfigTask.js +++ doc-editor/js/ui/task/LoadConfigTask.js Ext.namespace('ui','ui.task'); ui.task.LoadConfigTask = function(config) { Ext.apply(this, config); XHR({ url : './php/controller.php', params : { task : 'getConf' }, success : function(response) { var o = Ext.decode(response.responseText); phpDoc.userLogin = o.mess.userLogin; phpDoc.userLang = o.mess.userLang; phpDoc.userConf.conf_needupdate_diff = o.mess.userConf.conf_needupdate_diff; phpDoc.userConf.conf_needupdate_scrollbars = o.mess.userConf.conf_needupdate_scrollbars; phpDoc.userConf.conf_needupdate_displaylog = o.mess.userConf.conf_needupdate_displaylog; phpDoc.userConf.conf_error_skipnbliteraltag = o.mess.userConf.conf_error_skipnbliteraltag; phpDoc.userConf.conf_error_scrollbars = o.mess.userConf.conf_error_scrollbars; phpDoc.userConf.conf_error_displaylog = o.mess.userConf.conf_error_displaylog; phpDoc.userConf.conf_reviewed_scrollbars = o.mess.userConf.conf_reviewed_scrollbars; phpDoc.userConf.conf_reviewed_displaylog = o.mess.userConf.conf_reviewed_displaylog; phpDoc.userConf.conf_allfiles_displaylog = o.mess.userConf.conf_allfiles_displaylog; phpDoc.userConf.conf_patch_scrollbars = o.mess.userConf.conf_patch_scrollbars; phpDoc.userConf.conf_patch_displaylog = o.mess.userConf.conf_patch_displaylog; //For the theme, we apply this. phpDoc.userConf.conf_theme = o.mess.userConf.conf_theme; Ext.get('appTheme').dom.href = phpDoc.userConf.conf_theme; // Load datastore phpDoc.loadDataStore(); // Draw the interface phpDoc.drawInterface(); } }); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/SavePatchTask.js?view=markup&rev=1.1 Index: doc-editor/js/ui/task/SavePatchTask.js +++ doc-editor/js/ui/task/SavePatchTask.js Ext.namespace('ui','ui.task'); // config - { prefix, ftype, fpath, fname, fid, lang, email } ui.task.SavePatchTask = function(config) { Ext.apply(this, config); var id_prefix = this.prefix + '-' + this.ftype, msg = Ext.MessageBox.wait(_('Saving data as a patch...')); Ext.getCmp(id_prefix + '-PANEL-btn-saveas-' + this.fid).disable(); Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified = false; Ext.getCmp(id_prefix + '-PANEL-' + this.fid).setTitle( Ext.getCmp(id_prefix + '-PANEL-' + this.fid).originTitle ); if ( (this.prefix === 'AF') || (this.lang === 'en' && Ext.getCmp(this.prefix+'-LANG-FILE-'+this.fid).isModified === false) || (this.lang !== 'en' && Ext.getCmp(this.prefix+'-EN-FILE-'+this.fid).isModified === false) ) { Ext.getCmp(this.prefix + '-' + this.fid).setTitle( Ext.getCmp(this.prefix + '-' + this.fid).originTitle ); } // We save this patch XHR({ scope : this, url : './php/controller.php', params : { task : 'saveFile', filePath : this.fpath, fileName : this.fname, fileLang : this.lang, fileContent : Ext.getCmp(id_prefix + '-FILE-' + this.fid).getCode(), type : 'patch', emailAlert : this.email }, success : function(response) { var o = Ext.util.JSON.decode(response.responseText), grid = ui.component.PendingPatchGrid.instance; // Add this files into storePendingPatch grid.store.insert(0, new grid.store.recordType({ id : Ext.id('', ''), path : this.lang + this.fpath, name : this.fname, by : phpDoc.userLogin, uniqID : o.uniqId, date : new Date() }) ); // Remove wait msg msg.hide(); } }); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/UpdateConfTask.js?view=markup&rev=1.1 Index: doc-editor/js/ui/task/UpdateConfTask.js +++ doc-editor/js/ui/task/UpdateConfTask.js Ext.namespace('ui','ui.task'); // config - { item, value } ui.task.UpdateConfTask = function(config) { Ext.apply(this, config); // Apply modification in DB XHR({ scope : this, url : './php/controller.php', params : { task : 'confUpdate', item : this.item, value : this.value }, success : function(response) { // Update userConf object switch (this.item) { case 'conf_theme' : phpDoc.userConf.conf_theme = this.value; break; case 'conf_needupdate_diff' : phpDoc.userConf.conf_needupdate_diff = this.value; break; case 'conf_needupdate_scrollbars': phpDoc.userConf.conf_needupdate_scrollbars = "" + this.value + ""; break; case 'conf_needupdate_displaylog': phpDoc.userConf.conf_needupdate_displaylog = "" + this.value + ""; break; case 'conf_error_skipnbliteraltag': phpDoc.userConf.conf_error_skipnbliteraltag = "" + this.value + ""; ui.component.ErrorFileGrid.instance.store.reload(); break; case 'conf_error_scrollbars': phpDoc.userConf.conf_error_scrollbars = "" + this.value + ""; break; case 'conf_error_displaylog': phpDoc.userConf.conf_error_displaylog = "" + this.value + ""; break; case 'conf_reviewed_scrollbars': phpDoc.userConf.conf_reviewed_scrollbars = "" + this.value + ""; break; case 'conf_reviewed_displaylog': phpDoc.userConf.conf_reviewed_displaylog = "" + this.value + ""; break; case 'conf_allfiles_displaylog': phpDoc.userConf.conf_allfiles_displaylog = "" + this.value + ""; break; case 'conf_patch_scrollbars': phpDoc.userConf.conf_patch_scrollbars = "" + this.value + ""; break; case 'conf_patch_displaylog': phpDoc.userConf.conf_patch_displaylog = "" + this.value + ""; break; } } }); }
http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/BugsGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/BugsGrid.js diff -u doc-editor/js/ui/component/BugsGrid.js:1.1 doc-editor/js/ui/component/BugsGrid.js:1.2 --- doc-editor/js/ui/component/BugsGrid.js:1.1 Thu Jun 4 07:12:32 2009 +++ doc-editor/js/ui/component/BugsGrid.js Fri Jun 26 10:29:44 2009 @@ -82,11 +82,7 @@ iconCls : 'openInTab', handler : function() { - var BugsId = grid.store.getAt(rowIndex).data.id, - BugsUrl = grid.store.getAt(rowIndex).data.link, - BugsTitle = grid.store.getAt(rowIndex).data.title; - - phpDoc.NewTabBugs(BugsId, BugsUrl, BugsTitle); + grid.fireEvent('rowdblclick', grid, rowIndex, e); } }, '-', { text : _('Refresh this grid'), @@ -104,7 +100,22 @@ BugsUrl = grid.store.getAt(rowIndex).data.link, BugsTitle = grid.store.getAt(rowIndex).data.title; - phpDoc.NewTabBugs(BugsId, BugsUrl, BugsTitle); + Ext.getCmp('main-panel').add({ + id : 'mifp_bugs_' + BugsId, + xtype : 'iframepanel', + title : _('Loading...'), + tabTip : BugsTitle, + iconCls : 'iconBugs', + loadMask : true, + defaultSrc : BugsUrl, + listeners : { + documentloaded : function(frame) + { + frame.ownerCt.setTitle(Ext.util.Format.substr(BugsTitle, 0, 20) + '...'); + } + } + }); + Ext.getCmp('main-panel').setActiveTab('mifp_bugs_' + BugsId); } }, http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/CheckDoc.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/CheckDoc.js diff -u doc-editor/js/ui/component/CheckDoc.js:1.2 doc-editor/js/ui/component/CheckDoc.js:1.3 --- doc-editor/js/ui/component/CheckDoc.js:1.2 Mon Jun 15 07:04:53 2009 +++ doc-editor/js/ui/component/CheckDoc.js Fri Jun 26 10:29:44 2009 @@ -182,7 +182,7 @@ }, rowdblclick : function(grid, rowIndex, e) { - phpDoc.openFile( + ui.component.RepositoryTree.instance.openFile( 'en' + grid.fpath, grid.store.getAt(rowIndex).data.file ); @@ -206,32 +206,29 @@ autoScroll : true, layout : 'fit', buttons : [{ - /* scope : this, Note: scope does not work here */ text : 'Open all files', handler : function() { var win = Ext.getCmp('check-doc-file-win'), store = ui.component._CheckDoc.fs; - //~ TODO - use Object in FilePendingOpen-Queue instead of Array - phpDoc.filePendingOpen = []; + phpDoc.filePendingOpen = new Array(); for (var i = 0; i < store.getCount(); ++i) { - phpDoc.filePendingOpen[i] = [ - 'en' + win.fpath, - store.getAt(i).data.file - ]; + phpDoc.filePendingOpen[i] = { + fpath : 'en' + win.fpath, + fname : store.getAt(i).data.file + }; } - phpDoc.openFile( - phpDoc.filePendingOpen[0][0], - phpDoc.filePendingOpen[0][1] + ui.component.RepositoryTree.instance.openFile( + phpDoc.filePendingOpen[0].fpath, + phpDoc.filePendingOpen[0].fname ); win.close(); } }, { - /* scope : this, Note: scope does not work here */ text : 'Open selected files', id : 'check-doc-btn-open-selected-files', disabled : true, @@ -242,18 +239,18 @@ .getSelectionModel() .getSelections(); - phpDoc.filePendingOpen = []; + phpDoc.filePendingOpen = new Array(); for (var i = 0; i < r.length; ++i) { - phpDoc.filePendingOpen[i] = [ - 'en' + win.fpath, - r[i].data.file - ]; + phpDoc.filePendingOpen[i] = { + fpath : 'en' + win.fpath, + fname : r[i].data.file + }; } - phpDoc.openFile( - phpDoc.filePendingOpen[0][0], - phpDoc.filePendingOpen[0][1] + ui.component.RepositoryTree.instance.openFile( + phpDoc.filePendingOpen[0].fpath, + phpDoc.filePendingOpen[0].fname ); win.close(); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/CVSLogGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/CVSLogGrid.js diff -u doc-editor/js/ui/component/CVSLogGrid.js:1.1 doc-editor/js/ui/component/CVSLogGrid.js:1.2 --- doc-editor/js/ui/component/CVSLogGrid.js:1.1 Mon Jun 15 07:04:53 2009 +++ doc-editor/js/ui/component/CVSLogGrid.js Fri Jun 26 10:29:44 2009 @@ -155,7 +155,45 @@ rev1 = s[0].data.revision, rev2 = s[1].data.revision; - phpDoc.winDiff(this.fpath, this.fname, rev1, rev2); + Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Finding the diff. Please, wait...')); + + // Load diff data + XHR({ + url : './php/controller.php', + params : { + task : 'getDiff2', + FilePath : this.fpath, + FileName : this.fname, + Rev1 : rev1, + Rev2 : rev2 + }, + success : function(response) + { + var o = Ext.util.JSON.decode(response.responseText); + + Ext.getBody().unmask(); + + // We display in diff window + var winStatus = new Ext.Window({ + title : String.format(_('Diff between {0} & {1}'), rev1, rev2), + width : 650, + height : 350, + resizable : false, + modal : true, + autoScroll : true, + bodyStyle : 'background-color: white; padding: 5px;', + html : '<div class="diff-content">' + o.content + '</div>', + buttons : [{ + text : 'Close', + handler : function() + { + winStatus.close(); + } + }] + }); + winStatus.show(); + } + }); } }, { scope : this, http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/EditorConf.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/EditorConf.js diff -u doc-editor/js/ui/component/EditorConf.js:1.1 doc-editor/js/ui/component/EditorConf.js:1.2 --- doc-editor/js/ui/component/EditorConf.js:1.1 Tue Jun 2 05:08:35 2009 +++ doc-editor/js/ui/component/EditorConf.js Fri Jun 26 10:29:44 2009 @@ -118,7 +118,10 @@ var hrefTheme = c.getValue(); Ext.get('appTheme').dom.href = hrefTheme; - phpDoc.confUpdate('conf_theme', hrefTheme); + new ui.task.UpdateConfTask({ + item : 'conf_theme', + value : hrefTheme + }); } } }] @@ -155,7 +158,10 @@ check : function(field) { if (field.checked) { - phpDoc.confUpdate('conf_needupdate_diff', field.getRawValue()); + new ui.task.UpdateConfTask({ + item : 'conf_needupdate_diff', + value : field.getRawValue() + }); } } } @@ -170,7 +176,10 @@ check : function(field) { if (field.checked) { - phpDoc.confUpdate('conf_needupdate_diff', field.getRawValue()); + new ui.task.UpdateConfTask({ + item : 'conf_needupdate_diff', + value : field.getRawValue() + }); } } } @@ -190,7 +199,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_needupdate_scrollbars', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_needupdate_scrollbars', + value : field.getValue() + }); } } }, { @@ -202,7 +214,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_needupdate_displaylog', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_needupdate_displaylog', + value : field.getValue() + }); } } }] @@ -237,7 +252,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_error_skipnbliteraltag', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_error_skipnbliteraltag', + value : field.getValue() + }); } } }] @@ -256,7 +274,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_error_scrollbars', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_error_scrollbars', + value : field.getValue() + }); } } }, { @@ -268,7 +289,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_error_displaylog', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_error_displaylog', + value : field.getValue() + }); } } }] @@ -303,7 +327,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_reviewed_scrollbars', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_reviewed_scrollbars', + value : field.getValue() + }); } } }, { @@ -315,7 +342,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_reviewed_displaylog', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_reviewed_displaylog', + value : field.getValue() + }); } } }] @@ -350,7 +380,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_allfiles_displaylog', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_allfiles_displaylog', + value : field.getValue() + }); } } }] @@ -385,7 +418,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_patch_scrollbars', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_patch_scrollbars', + value : field.getValue() + }); } } }, { @@ -397,7 +433,10 @@ listeners : { check : function(field) { - phpDoc.confUpdate('conf_patch_displaylog', field.getValue()); + new ui.task.UpdateConfTask({ + item : 'conf_patch_displaylog', + value : field.getValue() + }); } } }] http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/ErrorFileGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/ErrorFileGrid.js diff -u doc-editor/js/ui/component/ErrorFileGrid.js:1.1 doc-editor/js/ui/component/ErrorFileGrid.js:1.2 --- doc-editor/js/ui/component/ErrorFileGrid.js:1.1 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/ErrorFileGrid.js Fri Jun 26 10:29:44 2009 @@ -356,6 +356,7 @@ initComponent : function() { + ui.component.ErrorFileGrid.instance = this; Ext.apply(this, { store : new ui.component._ErrorFileGrid.store({ @@ -391,7 +392,7 @@ { this.setValue(''); this.triggers[0].hide(); - phpDoc.errorFileGrid.store.clearFilter(); + ui.component.ErrorFileGrid.instance.store.clearFilter(); }, onTrigger2Click : function() { @@ -405,7 +406,7 @@ } this.clearInvalid(); this.triggers[0].show(); - phpDoc.errorFileGrid.store.filter('maintainer', v); + ui.component.ErrorFileGrid.instance.store.filter('maintainer', v); } }) ] @@ -413,3 +414,4 @@ ui.component.ErrorFileGrid.superclass.initComponent.call(this); } }); +ui.component.ErrorFileGrid.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/FilePanel.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/FilePanel.js diff -u doc-editor/js/ui/component/FilePanel.js:1.2 doc-editor/js/ui/component/FilePanel.js:1.3 --- doc-editor/js/ui/component/FilePanel.js:1.2 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/FilePanel.js Fri Jun 26 10:29:44 2009 @@ -1,4 +1,320 @@ -Ext.namespace('ui','ui.component'); +Ext.namespace('ui','ui.component','ui.component._FilePanel'); + +//------------------------------------------------------------------------------ +// FilePanel internals +Ext.namespace('ui.component._FilePanel.tbar.menu'); +// FilePanel editor menu for LangFile +// config - { comp_id } +ui.component._FilePanel.tbar.menu.lang = function(config) +{ + Ext.apply(this, config); + this.init(); + ui.component._FilePanel.tbar.menu.lang.superclass.constructor.call(this); +} +Ext.extend(ui.component._FilePanel.tbar.menu.lang, Ext.Toolbar.Button, +{ + text : _('MarkUp'), + iconCls : 'iconInsertCode', + init : function() + { + Ext.apply(this, + { + menu : new Ext.menu.Menu({ + items : [{ + scope : this, + text : _('Reviewed tag'), + handler : function() + { + Ext.getCmp(this.comp_id).insertIntoLine( + 2, 'end', "\n<!-- Reviewed: no -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Revcheck tag'), + handler : function() + { + Ext.getCmp(this.comp_id).insertIntoLine( + 2, "end", + "\n<!-- EN-Revision: 1.XX Maintainer: " + + phpDoc.userLogin + " Status: ready -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }] + }) + }); + } +}); + +// FilePanel editor menu for ENFile +// config - { comp_id } +ui.component._FilePanel.tbar.menu.en = function(config) +{ + Ext.apply(this, config); + this.init(); + ui.component._FilePanel.tbar.menu.en.superclass.constructor.call(this); +} +Ext.extend(ui.component._FilePanel.tbar.menu.en, Ext.Toolbar.Button, +{ + text : _('MarkUp'), + iconCls : 'iconInsertCode', + init : function() + { + Ext.apply(this, + { + menu : new Ext.menu.Menu({ + items : [{ + scope : this, + text : _('Description section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + " <refsect1 role=\"description\"><!-- {{{ -->\r\n " + + "&reftitle.description;\r\n " + + "<methodsynopsis>\r\n " + + "<!-- Example: All functions have this -->\r\n " + + "<type>thereturned type</type><methodname>func_name</methodname>\r\n " + + "<!-- Example: Required parameter -->\r\n " + + "<methodparam><type>param1type</type><parameter>firstparameter</parameter></methodparam>\r\n " + + "<!-- Example: Optional parameter, also by reference -->\r\n " + + "<methodparam choice=\"opt\"><type>int</type><parameter role=\"reference\">secondparameter</parameter></methodparam>\r\n " + + "<!-- Example: If no methodparams exist (void), use this -->\r\n " + + "<void />\r\n " + + "</methodsynopsis>\r\n " + + "<para>\r\n " + + "The function description goes here.\r\n " + + "</para>\r\n " + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Parameters section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"parameters\"><!-- {{{ -->\r\n" + + "&reftitle.parameters;\r\n" + + "<para>\r\n" + + "<variablelist>\r\n" + + "<varlistentry>\r\n" + + "<term><parameter>firstparameter</parameter></term>\r\n" + + "<listitem>\r\n" + + "<para>\r\n" + + "Its description\r\n" + + "</para>\r\n" + + "</listitem>\r\n" + + "</varlistentry>\r\n" + + "<varlistentry>\r\n" + + "<term>\r\n" + + "<parameter>secondparameter</parameter>\r\n" + + "</term>\r\n" + + "<listitem>\r\n" + + "<para>\r\n" + + "Its description\r\n" + + "</para>\r\n" + + "</listitem>\r\n" + + "</varlistentry>\r\n" + + "</variablelist>\r\n" + + "</para>\r\n" + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Return section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"returnvalues\"><!-- {{{ -->\r\n" + + "&reftitle.returnvalues;\r\n" + + "<para>\r\n" + + "What this function returns, first on success, then failure.\r\n" + + "If simply true on success and false on failure, just use &return.success; here.\r\n" + + "</para>\r\n" + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Error section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"errors\"><!-- {{{ -->\r\n" + + "&reftitle.errors;\r\n" + + "<para>\r\n" + + "When does this function issue E_* level errors, and/or throw exceptions.\r\n" + + "</para>\r\n" + + "</refsect1><!-- }}} -->\r\n" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Unicode section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"unicode\"><!-- {{{ -->\r\n" + + "&reftitle.unicode;\r\n" + + "<para>\r\n" + + "Information specific to unicode, from the PHP 6 changes.\r\n" + + "</para>\r\n" + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Changelog section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"changelog\"><!-- {{{ -->\r\n" + + "&reftitle.changelog;\r\n" + + "<para>\r\n" + + "<informaltable>\r\n" + + "<tgroup cols=\"2\">\r\n" + + "<thead>\r\n" + + "<row>\r\n" + + "<entry>&Version;</entry>\r\n" + + "<entry>&Description;</entry>\r\n" + + "</row>\r\n" + + "</thead>\r\n" + + "<tbody>\r\n" + + "<row>\r\n" + + "<entry>Enter the version of change here</entry>\r\n" + + "<entry>\r\n" + + "Describe the change\r\n" + + "</entry>\r\n" + + "</row>\r\n" + + "</tbody>\r\n" + + "</tgroup>\r\n" + + "</informaltable>\r\n" + + "</para>\r\n" + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Examples section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"examples\"><!-- {{{ -->\r\n" + + "&reftitle.examples;\r\n" + + "<para>\r\n" + + "<example xml:id=\"function-name.example.basic\"><!-- {{{ -->\r\n" + + "<title><function>function-name</function> example</title>\r\n" + + "<para>\r\n" + + "Any text that describes the purpose of the example, or what\r\n" + + "goes on in the example should be here. (Inside the <example> tag, not out).\r\n" + + "</para>\r\n" + + "<programlisting role=\"php\">\r\n" + + "<![CDATA[\r\n" + + "<?php\r\n" + + "if ($anexample === true) {\r\n" + + "echo 'Use the PEAR Coding standards';\r\n" + + "}\r\n" + + "if ($thereisoutput === 'and it is multiple lines') {\r\n" + + "echo 'Use a screen like we did below';\r\n" + + "}\r\n" + + "?>\r\n" + + "]]>\r\n" + + "</programlisting>\r\n" + + "&example.outputs.similar;\r\n" + + "<screen>\r\n" + + "<![CDATA[\r\n" + + "Use the PEAR Coding standards\r\n" + + "Use a screen like we did below\r\n" + + "]]>\r\n" + + "</screen>\r\n" + + "</example><!-- }}} -->\r\n" + + "</para>\r\n" + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('Notes section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"notes\"><!-- {{{ -->\r\n" + + "&reftitle.notes;\r\n" + + "<caution>\r\n" + + "<para>\r\n" + + "Any notes that don't fit anywhere else should go here.\r\n" + + "90% of the time, notes, warnings or cautions are better placed in the\r\n" + + "parameters section. Consider that before using this section!\r\n" + + "</para>\r\n" + + "</caution>\r\n" + + "¬e.language-construct;\r\n" + + "¬e.not-bin-safe;\r\n" + + "¬e.registerglobals;\r\n" + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }, { + scope : this, + text : _('SeeAlso section'), + handler : function() + { + var position = Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition()); + + Ext.getCmp(this.comp_id).insertIntoLine( + position.line, 0, + "\r\n<refsect1 role=\"seealso\"><!-- {{{ -->\r\n" + + "&reftitle.seealso;\r\n" + + "<para>\r\n" + + "<simplelist>\r\n" + + "<member><function>somefunc</function></member>\r\n" + + "<member><function>another_func</function></member>\r\n" + + "<member>The <link linkend=\"something\">something appendix</link></member>\r\n" + + "</simplelist>\r\n" + + "</para>\r\n" + + "</refsect1><!-- }}} -->" + ); + Ext.getCmp(this.comp_id).focus(); + } + }] + }) + }); + } +}); //------------------------------------------------------------------------------ // FilePanel @@ -59,99 +375,104 @@ }]; if (!this.readOnly) { - this.tbar = (this.isPatch) ? [{ - id : id_prefix + '-PANEL-btn-save-' + this.fid, - scope : this, - tooltip : _('<b>Accept</b> this patch and <b>Save</b> the file'), - iconCls : 'saveFile', - handler : function() + this.tbar = (this.isPatch) ? [ + // patch file pane tbar { - new ui.task.AcceptPatchTask({ - fid : this.fid, - fpath : this.fpath, - fname : this.fname, - fuid : this.fuid, - storeRecord : this.storeRecord - }).run(); - } - }, { - id : id_prefix + '-PANEL-btn-reject-' + this.fid, - scope : this, - tooltip : _('<b>Reject</b> this patch'), - iconCls : 'iconPageDelete', - handler : function() - { - new ui.task.RejectPatchTask({ - fid : this.fid, - fuid : this.fuid, - storeRecord : this.storeRecord - }).run(); - } - }, '-', { - scope : this, - tooltip : _('<b>Re-indent</b> all this file'), - iconCls : 'iconIndent', - handler : function() - { - Ext.getCmp(id_prefix + '-FILE-' + this.fid).reIndentAll(); - } - }] : [{ - id : id_prefix + '-PANEL-btn-save-' + this.fid, - scope : this, - tooltip : _('<b>Save</b> this file'), - iconCls : 'saveFile', - disabled : true, - handler : function() - { - if (this.lang === 'en') { - - new ui.task.SaveENFileTask({ - prefix : this.prefix, - ftype : this.ftype, + id : id_prefix + '-PANEL-btn-save-' + this.fid, + scope : this, + tooltip : _('<b>Accept</b> this patch and <b>Save</b> the file'), + iconCls : 'saveFile', + handler : function() + { + new ui.task.AcceptPatchTask({ fid : this.fid, fpath : this.fpath, fname : this.fname, + fuid : this.fuid, storeRecord : this.storeRecord - }).run(); - - } else { - - phpDoc.saveLangFile( - this.prefix, this.ftype, this.fid, this.fpath, this.fname, - this.lang, this.storeRecord, (this.prefix === 'AF') - ); + }); + } + }, { + id : id_prefix + '-PANEL-btn-reject-' + this.fid, + scope : this, + tooltip : _('<b>Reject</b> this patch'), + iconCls : 'iconPageDelete', + handler : function() + { + new ui.task.RejectPatchTask({ + fid : this.fid, + fuid : this.fuid, + storeRecord : this.storeRecord + }); + } + }, '-', { + scope : this, + tooltip : _('<b>Re-indent</b> all this file'), + iconCls : 'iconIndent', + handler : function() + { + Ext.getCmp(id_prefix + '-FILE-' + this.fid).reIndentAll(); } } - }, { - id : id_prefix + '-PANEL-btn-saveas-' + this.fid, - scope : this, - tooltip : _('<b>Save as</b> a patch'), - iconCls : 'saveAsFile', - disabled : true, - handler : function() - { - new ui.component.PatchPrompt({ - prefix : this.prefix, - ftype : this.ftype, - fid : this.fid, - fpath : this.fpath, - fname : this.fname, - lang : this.lang, - defaultEmail : (phpDoc.userLogin !== 'cvsread') - ? phpDoc.userLogin + '@php.net' : '' - }).show(); - } - }, '-', { - scope : this, - tooltip : _('<b>Re-indent</b> all this file'), - iconCls : 'iconIndent', - handler : function() + ] : [ + // en/lang file pane tbar { - Ext.getCmp(id_prefix + '-FILE-' + this.fid).reIndentAll(); - } - }, (this.lang === 'en') - ? phpDoc.menuMarkupEN(id_prefix + '-FILE-' + this.fid) - : phpDoc.menuMarkupLANG(id_prefix + '-FILE-' + this.fid, phpDoc) + id : id_prefix + '-PANEL-btn-save-' + this.fid, + scope : this, + tooltip : _('<b>Save</b> this file'), + iconCls : 'saveFile', + disabled : true, + handler : function() + { + if (this.lang === 'en') { + + new ui.task.SaveENFileTask({ + prefix : this.prefix, + ftype : this.ftype, + fid : this.fid, + fpath : this.fpath, + fname : this.fname, + storeRecord : this.storeRecord + }); + + } else { + + phpDoc.saveLangFile( + this.prefix, this.ftype, this.fid, this.fpath, this.fname, + this.lang, this.storeRecord + ); + } + } + }, { + id : id_prefix + '-PANEL-btn-saveas-' + this.fid, + scope : this, + tooltip : _('<b>Save as</b> a patch'), + iconCls : 'saveAsFile', + disabled : true, + handler : function() + { + new ui.component.PatchPrompt({ + prefix : this.prefix, + ftype : this.ftype, + fid : this.fid, + fpath : this.fpath, + fname : this.fname, + lang : this.lang, + defaultEmail : (phpDoc.userLogin !== 'cvsread') + ? phpDoc.userLogin + '@php.net' : '' + }).show(); + } + }, '-', { + scope : this, + tooltip : _('<b>Re-indent</b> all this file'), + iconCls : 'iconIndent', + handler : function() + { + Ext.getCmp(id_prefix + '-FILE-' + this.fid).reIndentAll(); + } + }, (this.lang === 'en') + ? new ui.component._FilePanel.tbar.menu.en({ comp_id : id_prefix + '-FILE-' + this.fid }) + : new ui.component._FilePanel.tbar.menu.lang({ comp_id : id_prefix + '-FILE-' + this.fid }) ]; } else { this.tbar = [{}]; // empty tbar for readonly file @@ -170,17 +491,17 @@ scope : this, initialize : function() { - if (this.isPatch) { - phpDoc.getFile( - this.fid, this.fpath, this.fname + '.' + this.fuid + '.patch', - id_prefix + '-PANEL-', id_prefix + '-FILE-' - ); - } else { - phpDoc.getFile( - this.fid, this.lang + this.fpath, this.fname, - id_prefix + '-PANEL-', id_prefix + '-FILE-' - ); - } + new ui.task.GetFileTask({ + prefix : this.prefix, + ftype : this.ftype, + fid : this.fid, + fpath : (this.isPatch) + ? this.fpath + : this.lang + this.fpath, + fname : (this.isPatch) + ? this.fname + '.' + this.fuid + '.patch' + : this.fname + }); }, cmchange : function(keyCode, charCode, obj) { http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/LocalMailGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/LocalMailGrid.js diff -u doc-editor/js/ui/component/LocalMailGrid.js:1.1 doc-editor/js/ui/component/LocalMailGrid.js:1.2 --- doc-editor/js/ui/component/LocalMailGrid.js:1.1 Thu Jun 4 07:12:32 2009 +++ doc-editor/js/ui/component/LocalMailGrid.js Fri Jun 26 10:29:44 2009 @@ -80,10 +80,6 @@ }, rowcontextmenu : function(grid, rowIndex, e) { - var MailId = grid.store.getAt(rowIndex).data.pubDate, - MailUrl = grid.store.getAt(rowIndex).data.link, - MailTitle = grid.store.getAt(rowIndex).data.title; - grid.getSelectionModel().selectRow(rowIndex); new Ext.menu.Menu({ @@ -93,7 +89,7 @@ iconCls : 'openInTab', handler : function() { - phpDoc.NewTabMailing(MailId, MailUrl, MailTitle); + grid.fireEvent('rowdblclick', grid, rowIndex, e); } }, '-', { text : _('Refresh this grid'), @@ -111,7 +107,24 @@ MailUrl = grid.store.getAt(rowIndex).data.link, MailTitle = grid.store.getAt(rowIndex).data.title; - phpDoc.NewTabMailing(MailId, MailUrl, MailTitle); + Ext.getCmp('main-panel').add({ + xtype : 'iframepanel', + id : 'mifp_' + MailId, + title : _('Loading...'), + tabTip : MailTitle, + iconCls : 'home-mailing-title', + loadMask : true, + defaultSrc : MailUrl, + listeners : { + documentloaded : function(frame) + { + frame.ownerCt.setTitle( + Ext.util.Format.substr(MailTitle, 0, 20) + '...' + ); + } + } + }); + Ext.getCmp('main-panel').setActiveTab('mifp_' + MailId); } }, http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/MainMenu.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/MainMenu.js diff -u doc-editor/js/ui/component/MainMenu.js:1.2 doc-editor/js/ui/component/MainMenu.js:1.3 --- doc-editor/js/ui/component/MainMenu.js:1.2 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/MainMenu.js Fri Jun 26 10:29:44 2009 @@ -18,12 +18,12 @@ text : _('Refresh all data'), disabled : (phpDoc.userLogin === 'cvsread') ? true : false, iconCls : 'refresh', - handler : phpDoc.WinUpdate + handler : phpDoc.WinUpdate // TODO }, { text : _('Check Build'), disabled : (phpDoc.userLogin === 'cvsread') ? true : false, iconCls : 'checkBuild', - handler : phpDoc.WinCheckBuild + handler : phpDoc.WinCheckBuild // TODO }, { text : _('EN tools'), handler : function() { return false }, @@ -31,11 +31,55 @@ items : [{ text : _('Translation build status'), iconCls : 'BuildStatus', - handler : phpDoc.newTabBuildStatus + handler : function() + { + var tab = Ext.getCmp('tab-build-status'); + + if (tab === undefined ) { + // if tab not exist, create new tab + Ext.getCmp('main-panel').add({ + id : 'tab-build-status', + title : _('Translation build status'), + iconCls : 'BuildStatus', + layout : 'fit', + closable : true, + html : 'nothing' + }); + tab = Ext.getCmp('tab-build-status'); + } + + if (tab.items) tab.removeAll(true); + tab.add(new ui.component.BuildStatus()); + tab.doLayout(); // render the grid + + Ext.getCmp('main-panel').setActiveTab('tab-build-status'); + } }, { text : _('Script Check doc'), iconCls : 'CheckDoc', - handler : phpDoc.newTabCheckDoc + handler : function() + { + var tab = Ext.getCmp('tab-check-doc'); + + if (tab === undefined) { + // if tab not exist, create new tab + Ext.getCmp('main-panel').add({ + id : 'tab-check-doc', + title : 'Check Doc', + iconCls : 'CheckDoc', + layout : 'fit', + closable : true, + html : 'nothing' + }); + tab = Ext.getCmp('tab-check-doc'); + } + + if (tab.items) tab.removeAll(true); + tab.add(new ui.component.CheckDoc()); + tab.doLayout(); // render the grid + + Ext.getCmp('main-panel').setActiveTab('tab-check-doc'); + } }] }) }, '-', { @@ -43,7 +87,10 @@ iconCls : 'iconConf', tooltip : '<b>Configure</b> this tool', id : 'winconf-btn', - handler : phpDoc.WinConf + handler : function() + { + new ui.component.EditorConf().show(Ext.get('winconf-btn')); + } }, '-', { text : _('Erase my personal data'), disabled : (phpDoc.userLogin === 'cvsread') ? true : false, @@ -108,7 +155,7 @@ iconCls : 'iconHelp', handler : function() { - phpDoc.WinAbout(); + new ui.component.About().show(Ext.get('winabout-btn')); } }] }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/NotInENGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/NotInENGrid.js diff -u doc-editor/js/ui/component/NotInENGrid.js:1.1 doc-editor/js/ui/component/NotInENGrid.js:1.2 --- doc-editor/js/ui/component/NotInENGrid.js:1.1 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/NotInENGrid.js Fri Jun 26 10:29:44 2009 @@ -130,12 +130,13 @@ fpath : FilePath, fname : FileName, storeRecord : storeRecord - }).run(); + }); } }, initComponent : function() { + ui.component.NotInENGrid.instance = this; Ext.apply(this, { store : new ui.component._NotInENGrid.store({ @@ -149,3 +150,4 @@ ui.component.NotInENGrid.superclass.initComponent.call(this); } }); +ui.component.NotInENGrid.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/PatchPrompt.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/PatchPrompt.js diff -u doc-editor/js/ui/component/PatchPrompt.js:1.1 doc-editor/js/ui/component/PatchPrompt.js:1.2 --- doc-editor/js/ui/component/PatchPrompt.js:1.1 Mon Jun 15 07:04:53 2009 +++ doc-editor/js/ui/component/PatchPrompt.js Fri Jun 26 10:29:44 2009 @@ -37,48 +37,14 @@ text : _('Save'), handler : function() { - var email = Ext.getCmp('patch-email-alert').getValue(), - msg = Ext.MessageBox.wait(_('Saving data as a patch...')) - id_prefix = this.prefix + '-' + this.ftype; - - Ext.getCmp(id_prefix + '-PANEL-btn-saveas-' + this.fid).disable(); - Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified = false; - Ext.getCmp(id_prefix + '-PANEL-' + this.fid).setTitle( - Ext.getCmp(id_prefix + '-PANEL-' + this.fid).originTitle - ); - - if ( (this.prefix === 'AF') - || (this.lang === 'en' && Ext.getCmp(this.prefix+'-LANG-FILE-'+this.fid).isModified === false) - || (this.lang !== 'en' && Ext.getCmp(this.prefix+'-EN-FILE-'+this.fid).isModified === false) - ) { - Ext.getCmp(this.prefix + '-' + this.fid).setTitle( - Ext.getCmp(this.prefix + '-' + this.fid).originTitle - ); - } - - // We save this patch - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'saveFile', - filePath : this.fpath, - fileName : this.fname, - fileLang : this.lang, - fileContent : Ext.getCmp(id_prefix + '-FILE-' + this.fid).getCode(), - type : 'patch', - emailAlert : email - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - // Add this files into storePendingPatch - phpDoc.addToPendingPatch(this.lang + this.fpath, this.fname, o.uniqId); - - // Remove wait msg - msg.hide(); - } + new ui.task.SavePatchTask({ + prefix : this.prefix, + fid : this.fid, + ftype : this.ftype, + lang : this.lang, + fpath : this.fpath, + fname : this.fname, + email : Ext.getCmp('patch-email-alert').getValue() }); this.close(); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/PendingCommitGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/PendingCommitGrid.js diff -u doc-editor/js/ui/component/PendingCommitGrid.js:1.1 doc-editor/js/ui/component/PendingCommitGrid.js:1.2 --- doc-editor/js/ui/component/PendingCommitGrid.js:1.1 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/PendingCommitGrid.js Fri Jun 26 10:29:44 2009 @@ -236,7 +236,7 @@ ftype : 'update', fpath : this.fpath, fname : this.fname - }).run(); + }); } }, '-', new ui.component._PendingCommitGrid.menu.common({ rowIdx : this.rowIdx @@ -327,7 +327,7 @@ FileName = storeRecord.data.name; if (FileType === 'update') { - phpDoc.openFile(FilePath, FileName); + ui.component.RepositoryTree.instance.openFile(FilePath, FileName); } if (FileType === 'delete') { @@ -336,13 +336,14 @@ ftype : FileType, fpath : FilePath, fname : FileName - }).run(); + }); } } }, initComponent : function() { + ui.component.PendingCommitGrid.instance = this; Ext.apply(this, { store : new ui.component._PendingCommitGrid.store({ @@ -354,5 +355,33 @@ }) }); ui.component.PendingCommitGrid.superclass.initComponent.call(this); + }, + + addRecord : function(fid, fpath, fname, type) + { + var exist = false; + + this.store.each(function(r) + { + if (r.data.path === fpath && r.data.name === fname) { + exist = true; + } + }); + + if (!exist) { + // if not exist, add to store + this.store.insert(0, + new this.store.recordType({ + id : fid, + path : fpath, + name : fname, + by : phpDoc.userLogin, + date : new Date(), + type : type + }) + ); + this.store.groupBy('path', true); // regroup + } } }); +ui.component.PendingCommitGrid.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/PendingPatchGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/PendingPatchGrid.js diff -u doc-editor/js/ui/component/PendingPatchGrid.js:1.1 doc-editor/js/ui/component/PendingPatchGrid.js:1.2 --- doc-editor/js/ui/component/PendingPatchGrid.js:1.1 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/PendingPatchGrid.js Fri Jun 26 10:29:44 2009 @@ -118,7 +118,7 @@ fid : this.fid, fuid : this.fuid, storeRecord : this.grid.store.getAt(this.rowIdx) - }).run(); + }); } }] }); @@ -286,6 +286,7 @@ initComponent : function() { + ui.component.PendingPatchGrid.instance = this; Ext.apply(this, { store : new ui.component._PendingPatchGrid.store({ @@ -299,3 +300,4 @@ ui.component.PendingPatchGrid.superclass.initComponent.call(this); } }); +ui.component.PendingPatchGrid.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/PendingReviewGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/PendingReviewGrid.js diff -u doc-editor/js/ui/component/PendingReviewGrid.js:1.1 doc-editor/js/ui/component/PendingReviewGrid.js:1.2 --- doc-editor/js/ui/component/PendingReviewGrid.js:1.1 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/PendingReviewGrid.js Fri Jun 26 10:29:44 2009 @@ -184,16 +184,16 @@ phpDoc.filePendingOpen = new Array(); for (var i = 0; i < o.files.length; i = i + 1) { - phpDoc.filePendingOpen[i] = [ - phpDoc.userLang + o.files[i].path, - o.files[i].name - ]; + phpDoc.filePendingOpen[i] = { + fpath : phpDoc.userLang + o.files[i].path, + fname : o.files[i].name + }; } // Start the first - phpDoc.openFile( - phpDoc.filePendingOpen[0][0], - phpDoc.filePendingOpen[0][1] + ui.component.RepositoryTree.instance.openFile( + phpDoc.filePendingOpen[0].fpath, + phpDoc.filePendingOpen[0].fname ); Ext.getBody().unmask(); @@ -376,6 +376,7 @@ initComponent : function() { + ui.component.PendingReviewGrid.instance = this; Ext.apply(this, { store : new ui.component._PendingReviewGrid.store({ @@ -408,7 +409,7 @@ { this.setValue(''); this.triggers[0].hide(); - phpDoc.pendingReviewGrid.store.clearFilter(); + ui.component.PendingReviewGrid.instance.store.clearFilter(); }, onTrigger2Click : function() { @@ -422,7 +423,7 @@ } this.clearInvalid(); this.triggers[0].show(); - phpDoc.pendingReviewGrid.store.filter('maintainer', v); + ui.component.PendingReviewGrid.instance.store.filter('maintainer', v); } }) ] @@ -430,3 +431,4 @@ ui.component.PendingReviewGrid.superclass.initComponent.call(this); } }); +ui.component.PendingReviewGrid.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/RepositoryTree.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/RepositoryTree.js diff -u doc-editor/js/ui/component/RepositoryTree.js:1.1 doc-editor/js/ui/component/RepositoryTree.js:1.2 --- doc-editor/js/ui/component/RepositoryTree.js:1.1 Mon Jun 15 07:04:53 2009 +++ doc-editor/js/ui/component/RepositoryTree.js Fri Jun 26 10:29:44 2009 @@ -141,6 +141,18 @@ } else { // This tab already exist. We focus it. Ext.getCmp('main-panel').setActiveTab('AF-' + FileID); + // if opening multiple files, dequeue and continue + if (phpDoc.filePendingOpen[0]) { + log(phpDoc.filePendingOpen.shift()); + if (phpDoc.filePendingOpen[0]) { + if (phpDoc.filePendingOpen[0].fpath) { + this.openFile( + phpDoc.filePendingOpen[0].fpath, + phpDoc.filePendingOpen[0].fname + ); + } + } + } } } } @@ -148,6 +160,7 @@ initComponent : function() { + ui.component.RepositoryTree.instance = this; Ext.apply(this, { tbar:[ @@ -171,17 +184,19 @@ }, onTrigger1Click : function() { + var instance = ui.component.RepositoryTree.instance; this.setValue(''); this.triggers[0].hide(); - phpDoc.treeAllFiles.root.setText(_('Repository')); + instance.root.setText(_('Repository')); // clear search - delete phpDoc.treeAllFiles.loader.baseParams.search; - phpDoc.treeAllFiles.root.reload(); + delete instance.loader.baseParams.search; + instance.root.reload(); }, onTrigger2Click: function() { - var v = this.getValue(); + var instance = ui.component.RepositoryTree.instance, + v = this.getValue(); if( v == '' || v.length < 3) { this.markInvalid(_('Your search must contain at least 3 characters')); @@ -192,13 +207,13 @@ this.triggers[0].show(); // carry search - phpDoc.treeAllFiles.loader.baseParams.search = v; - phpDoc.treeAllFiles.root.reload(function() + instance.loader.baseParams.search = v; + instance.root.reload(function() { - phpDoc.treeAllFiles.root.setText( + instance.root.setText( String.format( _('Search result: {0}'), - phpDoc.treeAllFiles.root.childNodes.length + instance.root.childNodes.length ) ); }); @@ -212,5 +227,42 @@ new Ext.tree.TreeSorter(this, { folderSort : true }); + }, + + openFile : function(fpath, fname) + { + Ext.getBody().mask( + '<img src="themes/img/loading.gif" ' + + 'style="vertical-align: middle;" /> ' + + _('Please, wait...') + ); + Ext.getCmp('acc-all-files').expand(); + + var t = fpath.split('/'), cb = function(node) + { + node.ensureVisible(); + if (t[0] && t[0] !== '') { + // walk into childs + for (var i = 0; i < node.childNodes.length; ++i) { + if (node.childNodes[i].text === t[0]) { + t.shift(); + node.childNodes[i].expand(false, true, cb.createDelegate(this)); + } + } + } else { + // leaf node + for (var i = 0; i < node.childNodes.length; ++i) { + if (node.childNodes[i].text === fname) { + node.childNodes[i].ensureVisible(); + node.childNodes[i].ui.highlight(); + this.fireEvent('dblclick', node.childNodes[i]); + Ext.getBody().unmask(); + } + } + } + } + this.root.expand(false, true, cb.createDelegate(this)); } }); +ui.component.RepositoryTree.prototype.instance = null; + http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/StaleFileGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/StaleFileGrid.js diff -u doc-editor/js/ui/component/StaleFileGrid.js:1.2 doc-editor/js/ui/component/StaleFileGrid.js:1.3 --- doc-editor/js/ui/component/StaleFileGrid.js:1.2 Sun Jun 21 13:33:12 2009 +++ doc-editor/js/ui/component/StaleFileGrid.js Fri Jun 26 10:29:44 2009 @@ -320,6 +320,7 @@ initComponent : function() { + ui.component.StaleFileGrid.instance = this; ui.component._StaleFileGrid.columns[2].header = String.format( _('{0} revision'), Ext.util.Format.uppercase(phpDoc.userLang) ); @@ -357,7 +358,7 @@ { this.setValue(''); this.triggers[0].hide(); - phpDoc.staleFileGrid.store.clearFilter(); + ui.component.StaleFileGrid.instance.store.clearFilter(); }, onTrigger2Click: function() { @@ -371,7 +372,7 @@ } this.clearInvalid(); this.triggers[0].show(); - phpDoc.staleFileGrid.store.filter('maintainer', v); + ui.component.StaleFileGrid.instance.store.filter('maintainer', v); } }) ] @@ -379,3 +380,4 @@ ui.component.StaleFileGrid.superclass.initComponent.call(this); } }); +ui.component.StaleFileGrid.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/AcceptPatchTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/AcceptPatchTask.js diff -u doc-editor/js/ui/task/AcceptPatchTask.js:1.1 doc-editor/js/ui/task/AcceptPatchTask.js:1.2 --- doc-editor/js/ui/task/AcceptPatchTask.js:1.1 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/ui/task/AcceptPatchTask.js Fri Jun 26 10:29:44 2009 @@ -5,80 +5,79 @@ { Ext.apply(this, config); - this.run = function() - { - if (phpDoc.userLogin === 'cvsread') { - phpDoc.winForbidden(); - return; - } - - Ext.MessageBox.confirm( - _('Confirm'), - _('This action will accept this patch, send an email to his author, save the file and close this tab.'), - function(btn) - { - if (btn === 'yes') { - Ext.getCmp('PP-PATCH-PANEL-btn-save-' + this.fid).disable(); - Ext.getCmp('PP-PATCH-FILE-' + this.fid).isModified = false; - Ext.getCmp('PP-PATCH-PANEL-' + this.fid).setTitle( - Ext.getCmp('PP-PATCH-PANEL-' + this.fid).originTitle - ); - Ext.getCmp('PP-' + this.fid).setTitle( - Ext.getCmp('PP-' + this.fid).originTitle - ); - - var msg = Ext.MessageBox.wait(_('Saving data...')); - - // We save LANG File - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'saveFile', - filePath : this.fpath, - fileName : this.fname, - fileLang : 'all', - fileContent : Ext.getCmp('PP-PATCH-FILE-' + this.fid).getCode() - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - // Add this files into storePendingCommit - phpDoc.addToPendingCommit(o.id, this.fpath, this.fname, 'update'); - - // Remove this patch from the PendingPatchStore - phpDoc.pendingPatchGrid.store.remove(this.storeRecord); - - // We fire event add to update the file count - phpDoc.pendingPatchGrid.store.fireEvent('add', phpDoc.pendingPatchGrid.store); - - // We need to send an accept patch email, delete .patch file, and remove this patch from dataBase - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'afterPatchAccept', - PatchUniqID : this.fuid - } - }); - - // Remove wait msg - msg.hide(); - - // Remove this tab - Ext.getCmp('main-panel').remove('PP-' + this.fid); - }, - failure : function(response) { - // Remove wait msg - msg.hide(); - //~ phpDoc.winForbidden(); // use failure prompt? - } - }); - } // btn = yes - }, this // scope - ); + if (phpDoc.userLogin === 'cvsread') { + phpDoc.winForbidden(); + return; } + + Ext.MessageBox.confirm( + _('Confirm'), + _('This action will accept this patch, send an email to his author, save the file and close this tab.'), + function(btn) + { + if (btn === 'yes') { + Ext.getCmp('PP-PATCH-PANEL-btn-save-' + this.fid).disable(); + Ext.getCmp('PP-PATCH-FILE-' + this.fid).isModified = false; + Ext.getCmp('PP-PATCH-PANEL-' + this.fid).setTitle( + Ext.getCmp('PP-PATCH-PANEL-' + this.fid).originTitle + ); + Ext.getCmp('PP-' + this.fid).setTitle( + Ext.getCmp('PP-' + this.fid).originTitle + ); + + var msg = Ext.MessageBox.wait(_('Saving data...')); + + // We save LANG File + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'saveFile', + filePath : this.fpath, + fileName : this.fname, + fileLang : 'all', + fileContent : Ext.getCmp('PP-PATCH-FILE-' + this.fid).getCode() + }, + success : function(response) + { + var o = Ext.util.JSON.decode(response.responseText), + grid = ui.component.PendingPatchGrid.instance; + + // Add this files into storePendingCommit + ui.component.PendingCommitGrid.instance.addRecord( + o.id, this.fpath, this.fname, 'update' + ); + + // Remove this patch from the PendingPatchStore + grid.store.remove(this.storeRecord); + + // We fire event add to update the file count + grid.store.fireEvent('add', grid.store); + + // We need to send an accept patch email, delete .patch file, and remove this patch from dataBase + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'afterPatchAccept', + PatchUniqID : this.fuid + } + }); + + // Remove wait msg + msg.hide(); + + // Remove this tab + Ext.getCmp('main-panel').remove('PP-' + this.fid); + }, + failure : function(response) { + // Remove wait msg + msg.hide(); + } + }); + } // btn = yes + }, this // scope + ); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/CheckFileTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/CheckFileTask.js diff -u doc-editor/js/ui/task/CheckFileTask.js:1.1 doc-editor/js/ui/task/CheckFileTask.js:1.2 --- doc-editor/js/ui/task/CheckFileTask.js:1.1 Mon Jun 15 07:04:54 2009 +++ doc-editor/js/ui/task/CheckFileTask.js Fri Jun 26 10:29:44 2009 @@ -5,75 +5,72 @@ { Ext.apply(this,config); - this.run = function() - { - Ext.getBody().mask( - '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + - _('Checking for error. Please, wait...') - ); - - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'checkFileError', - FilePath : this.fpath, - FileName : this.fname, - FileLang : this.lang, - FileContent : Ext.getCmp(this.prefix + '-' + this.ftype + - '-FILE-' + this.fid).getCode() - }, - success : function(response) - { - Ext.getBody().unmask(); - - var o = Ext.util.JSON.decode(response.responseText); - - // If there is some errors, we display this - if (o.error && o.error_first !== '-No error-') { - - Ext.getCmp('main-panel').add({ - id : 'FE-help-' + this.fid, - title : 'Error in ' + this.fname, - iconCls : 'FilesError', - closable : true, - autoScroll : true, - autoLoad : './error_type.php?dir=' + - this.fpath + '&file=' + this.fname - }); - - Ext.getCmp('main-panel').setActiveTab('FE-help-' + this.fid); - - } else { - // If there is no error, we display an information message - Ext.MessageBox.show({ - title : _('Check for errors'), - msg : _('There is no error.'), - buttons : Ext.MessageBox.OK, - icon : Ext.MessageBox.INFO - }); - } - - // Now, We save LANG File - new ui.task.SaveLangFileTask({ - prefix : this.prefix, - ftype : this.ftype, - fid : this.fid, - fpath : this.fpath, - fname : this.fname, - lang : this.lang, - storeRecord : this.storeRecord - }).run(); - - if (this.prefix === 'FE') { - // We must reload the iframe of error description - Ext.getCmp(this.prefix + '-error-type-' + this.fid).setSrc( - './error_type.php?dir=' + this.fpath + - '&file=' + this.fname + - '&nocache=' + new Date().getTime() - ); - } + Ext.getBody().mask( + '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + + _('Checking for error. Please, wait...') + ); + + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'checkFileError', + FilePath : this.fpath, + FileName : this.fname, + FileLang : this.lang, + FileContent : Ext.getCmp(this.prefix + '-' + this.ftype + + '-FILE-' + this.fid).getCode() + }, + success : function(response) + { + Ext.getBody().unmask(); + + var o = Ext.util.JSON.decode(response.responseText); + + // If there is some errors, we display this + if (o.error && o.error_first !== '-No error-') { + + Ext.getCmp('main-panel').add({ + id : 'FE-help-' + this.fid, + title : 'Error in ' + this.fname, + iconCls : 'FilesError', + closable : true, + autoScroll : true, + autoLoad : './error_type.php?dir=' + + this.fpath + '&file=' + this.fname + }); + + Ext.getCmp('main-panel').setActiveTab('FE-help-' + this.fid); + + } else { + // If there is no error, we display an information message + Ext.MessageBox.show({ + title : _('Check for errors'), + msg : _('There is no error.'), + buttons : Ext.MessageBox.OK, + icon : Ext.MessageBox.INFO + }); } - }); - } + + // Now, We save LANG File + new ui.task.SaveLangFileTask({ + prefix : this.prefix, + ftype : this.ftype, + fid : this.fid, + fpath : this.fpath, + fname : this.fname, + lang : this.lang, + storeRecord : this.storeRecord + }); + + if (this.prefix === 'FE') { + // We must reload the iframe of error description + Ext.getCmp(this.prefix + '-error-type-' + this.fid).setSrc( + './error_type.php?dir=' + this.fpath + + '&file=' + this.fname + + '&nocache=' + new Date().getTime() + ); + } + } + }); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/ClearLocalChangeTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/ClearLocalChangeTask.js diff -u doc-editor/js/ui/task/ClearLocalChangeTask.js:1.1 doc-editor/js/ui/task/ClearLocalChangeTask.js:1.2 --- doc-editor/js/ui/task/ClearLocalChangeTask.js:1.1 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/ui/task/ClearLocalChangeTask.js Fri Jun 26 10:29:44 2009 @@ -5,125 +5,123 @@ { Ext.apply(this, config); - this.run = function() - { - if (phpDoc.userLogin === 'cvsread') { - phpDoc.winForbidden(); - return; - } - - Ext.MessageBox.confirm( - _('Confirm'), - _('This action will clear your local modification and take back this file from his original stats.<br/>You need confirm.'), - function(btn) - { - if (btn === 'yes') { - Ext.getBody().mask( - '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + - _('Please, wait...') - ); - - // Before clear local change, we close the file if there is open - if (Ext.getCmp('main-panel').findById('FNU-' + Ext.util.md5('FNU-' + this.fpath + this.fname))) { - Ext.getCmp('main-panel').remove('FNU-' + Ext.util.md5('FNU-' + this.fpath + this.fname)); - } + if (phpDoc.userLogin === 'cvsread') { + phpDoc.winForbidden(); + return; + } - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'clearLocalChange', - FileType : this.ftype, - FilePath : this.fpath, - FileName : this.fname - }, - success : function(response) - { - // clear local change success - - if (phpDoc.userLang === 'en') { - // We reload all store - phpDoc.staleFileGrid.store.reload(); - phpDoc.errorFileGrid.store.reload(); - phpDoc.storeFilesNeedReviewed.reload(); - } - - // We delete from this store - phpDoc.pendingCommitGrid.store.remove(this.storeRecord); - - // We fire event add to update the file count - phpDoc.pendingCommitGrid.store.fireEvent('add', phpDoc.pendingCommitGrid.store); - - // We try to search in others stores if this file is marked as needCommit - - // trow storeNotInEn - phpDoc.notInENGrid.store.each( - function(record) - { - if ((phpDoc.userLang+record.data.path) === this.fpath - && record.data.name === this.fname - ) { - record.set('needcommit', false); - } - }, - this - ); - - // trow storeFilesNeedReviewed - phpDoc.storeFilesNeedReviewed.each( - function(record) - { - if ((phpDoc.userLang+record.data.path) === this.fpath - && record.data.name === this.fname - ) { - record.set('needcommit', false); - } - }, - this - ); - - // trow StaleFile store - phpDoc.staleFileGrid.store.each( - function(record) - { - if ((phpDoc.userLang+record.data.path) === this.fpath - && record.data.name === this.fname - ) { - record.set('needcommit', false); - } - }, - this - ); - - // trow FileError - phpDoc.errorFileGrid.store.each( - function(record) - { - if ((phpDoc.userLang+record.data.path) === this.fpath - && record.data.name === this.fname - ) { - record.set('needcommit', false); - } - }, - this - ); - - // find open node in All Files modules - var node = phpDoc.treeAllFiles.getNodeById('//'+this.fpath+this.fname); - if (node) { - node.getUI().removeClass('modified'); - } - Ext.getBody().unmask(); - }, - failure : function(response) - { - // clear local change failure - Ext.getBody().unmask(); - phpDoc.winForbidden(); - } - }); + Ext.MessageBox.confirm( + _('Confirm'), + _('This action will clear your local modification and take back this file from his original stats.<br/>You need confirm.'), + function(btn) + { + if (btn === 'yes') { + Ext.getBody().mask( + '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + + _('Please, wait...') + ); + + // Before clear local change, we close the file if there is open + if (Ext.getCmp('main-panel').findById('FNU-' + Ext.util.md5('FNU-' + this.fpath + this.fname))) { + Ext.getCmp('main-panel').remove('FNU-' + Ext.util.md5('FNU-' + this.fpath + this.fname)); } - }, this - ); - } + + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'clearLocalChange', + FileType : this.ftype, + FilePath : this.fpath, + FileName : this.fname + }, + success : function(response) + { + // clear local change success + if (phpDoc.userLang === 'en') { + // We reload all store + ui.component.StaleFileGrid.instance.store.reload(); + ui.component.ErrorFileGrid.instance.store.reload(); + ui.component.PendingReviewGrid.instance.store.reload(); + } + + // We delete from this store + ui.component.PendingCommitGrid.instance.store.remove(this.storeRecord); + + // We fire event add to update the file count + ui.component.PendingCommitGrid.instance.store.fireEvent( + 'add', ui.component.PendingCommitGrid.instance.store + ); + + // We try to search in others stores if this file is marked as needCommit + + // trow storeNotInEn + ui.component.NotInENGrid.instance.store.each( + function(record) + { + if ((phpDoc.userLang+record.data.path) === this.fpath + && record.data.name === this.fname + ) { + record.set('needcommit', false); + } + }, + this + ); + + // trow storeFilesNeedReviewed + ui.component.PendingReviewGrid.instance.store.each( + function(record) + { + if ((phpDoc.userLang+record.data.path) === this.fpath + && record.data.name === this.fname + ) { + record.set('needcommit', false); + } + }, + this + ); + + // trow StaleFile store + ui.component.StaleFileGrid.instance.store.each( + function(record) + { + if ((phpDoc.userLang+record.data.path) === this.fpath + && record.data.name === this.fname + ) { + record.set('needcommit', false); + } + }, + this + ); + + // trow FileError + ui.component.ErrorFileGrid.instance.store.each( + function(record) + { + if ((phpDoc.userLang+record.data.path) === this.fpath + && record.data.name === this.fname + ) { + record.set('needcommit', false); + } + }, + this + ); + + // find open node in All Files modules + var node = ui.component.RepositoryTree.instance.getNodeById('//'+this.fpath+this.fname); + if (node) { + node.getUI().removeClass('modified'); + } + Ext.getBody().unmask(); + }, + failure : function(response) + { + // clear local change failure + Ext.getBody().unmask(); + phpDoc.winForbidden(); + } + }); + } + }, this + ); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/MarkDeleteTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/MarkDeleteTask.js diff -u doc-editor/js/ui/task/MarkDeleteTask.js:1.1 doc-editor/js/ui/task/MarkDeleteTask.js:1.2 --- doc-editor/js/ui/task/MarkDeleteTask.js:1.1 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/ui/task/MarkDeleteTask.js Fri Jun 26 10:29:44 2009 @@ -5,38 +5,37 @@ { Ext.apply(this, config); - this.run = function() - { - Ext.MessageBox.confirm( - _('Confirm'), - _('This action will mark this file as need deleted.<br/><br/>You need commit this change to take it effect.<br/><br/>Please, confirm this action.'), - function(btn) - { - if (btn === 'yes') { - Ext.getBody().mask( - '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + - _('Please, wait...') - ); + Ext.MessageBox.confirm( + _('Confirm'), + _('This action will mark this file as need deleted.<br/><br/>You need commit this change to take it effect.<br/><br/>Please, confirm this action.'), + function(btn) + { + if (btn === 'yes') { + Ext.getBody().mask( + '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + + _('Please, wait...') + ); - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'markAsNeedDelete', - FilePath : this.fpath, - FileName : this.fname - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'markAsNeedDelete', + FilePath : this.fpath, + FileName : this.fname + }, + success : function(response) + { + var o = Ext.util.JSON.decode(response.responseText); - Ext.getBody().unmask(); - phpDoc.addToPendingCommit( o.id, phpDoc.userLang + this.fpath, this.fname, 'delete' ); - this.storeRecord.set('needcommit', true); - } - }); - } - }, this - ); - } + Ext.getBody().unmask(); + ui.component.PendingCommitGrid.instance.addRecord( + o.id, phpDoc.userLang + this.fpath, this.fname, 'delete' + ); + this.storeRecord.set('needcommit', true); + } + }); + } + }, this + ); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/PingTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/PingTask.js diff -u doc-editor/js/ui/task/PingTask.js:1.1 doc-editor/js/ui/task/PingTask.js:1.2 --- doc-editor/js/ui/task/PingTask.js:1.1 Mon Jun 15 07:04:54 2009 +++ doc-editor/js/ui/task/PingTask.js Fri Jun 26 10:29:44 2009 @@ -2,6 +2,7 @@ ui.task.PingTask = function() { + ui.task.PingTask.instance = this; this.task = new Ext.util.DelayedTask(function() { XHR({ @@ -44,3 +45,4 @@ this.task.cancel(); }; } +ui.task.PingTask.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/RejectPatchTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/RejectPatchTask.js diff -u doc-editor/js/ui/task/RejectPatchTask.js:1.1 doc-editor/js/ui/task/RejectPatchTask.js:1.2 --- doc-editor/js/ui/task/RejectPatchTask.js:1.1 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/ui/task/RejectPatchTask.js Fri Jun 26 10:29:44 2009 @@ -5,50 +5,48 @@ { Ext.apply(this,config); - this.run = function() - { - if (phpDoc.userLogin === 'cvsread') { - phpDoc.winForbidden(); - return; - } + if (phpDoc.userLogin === 'cvsread') { + phpDoc.winForbidden(); + return; + } - Ext.MessageBox.confirm( - _('Confirm'), - _('This action will <b>reject</b> this patch, send an email to his author and close this tab.'), - function (btn) - { - if (btn === 'yes') { - var msg = Ext.MessageBox.wait(_('Please, wait...')); + Ext.MessageBox.confirm( + _('Confirm'), + _('This action will <b>reject</b> this patch, send an email to his author and close this tab.'), + function (btn) + { + if (btn === 'yes') { + var msg = Ext.MessageBox.wait(_('Please, wait...')); - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'afterPatchReject', - PatchUniqID : this.fuid - }, - success : function(response) - { - // Remove this patch from the PendingPatchStore - phpDoc.pendingPatchGrid.store.remove(this.storeRecord); + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'afterPatchReject', + PatchUniqID : this.fuid + }, + success : function(response) + { + var grid = ui.component.PendingPatchGrid.instance; + // Remove this patch from the PendingPatchStore + grid.store.remove(this.storeRecord); - // We fire event add to update the file count - phpDoc.pendingPatchGrid.store.fireEvent('add', phpDoc.pendingPatchGrid.store); + // We fire event add to update the file count + grid.store.fireEvent('add', grid.store); - // Remove this tab - Ext.getCmp('main-panel').remove('PP-' + this.fid); - // Remove wait msg - msg.hide(); - }, - failure : function(response) - { - // Remove wait msg - msg.hide(); - phpDoc.winForbidden(); - } - }); - } // btn = yes - }, this // scope - ); - } + // Remove this tab + Ext.getCmp('main-panel').remove('PP-' + this.fid); + // Remove wait msg + msg.hide(); + }, + failure : function(response) + { + // Remove wait msg + msg.hide(); + phpDoc.winForbidden(); + } + }); + } // btn = yes + }, this // scope + ); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/SaveENFileTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/SaveENFileTask.js diff -u doc-editor/js/ui/task/SaveENFileTask.js:1.2 doc-editor/js/ui/task/SaveENFileTask.js:1.3 --- doc-editor/js/ui/task/SaveENFileTask.js:1.2 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/ui/task/SaveENFileTask.js Fri Jun 26 10:29:44 2009 @@ -5,77 +5,76 @@ { Ext.apply(this, config); - this.run = function() - { - var id_prefix = this.prefix + '-' + this.ftype, - msg = Ext.MessageBox.wait(_('Saving data...')); + var id_prefix = this.prefix + '-' + this.ftype, + msg = Ext.MessageBox.wait(_('Saving data...')); - if (phpDoc.userLogin === 'cvsread') { - msg.hide(); - phpDoc.winForbidden(); - return; - } + if (phpDoc.userLogin === 'cvsread') { + msg.hide(); + phpDoc.winForbidden(); + return; + } + + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'saveFile', + filePath : this.fpath, + fileName : this.fname, + fileLang : 'en', + fileContent : Ext.getCmp(this.prefix + '-' + this.ftype + + '-FILE-' + this.fid).getCode() + }, + success : function(response) + { + var o = Ext.util.JSON.decode(response.responseText); + + if (this.prefix === 'FNU') { + // Update our store + this.storeRecord.set('en_revision', '1.' + o.en_revision); + this.storeRecord.set('needcommit', true); + } + + if (this.prefix === 'FE') { + // Update our store + this.storeRecord.set('needcommit', true); + } + + if (this.prefix === 'FNR') { + // Update our store + this.storeRecord.set('needcommit', true); + } + + if (this.prefix === 'AF') { + this.storeRecord.getUI().addClass('modified'); // tree node + } - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'saveFile', - filePath : this.fpath, - fileName : this.fname, - fileLang : 'en', - fileContent : Ext.getCmp(this.prefix + '-' + this.ftype + - '-FILE-' + this.fid).getCode() - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - if (this.prefix === 'FNU') { - // Update our store - this.storeRecord.set('en_revision', '1.' + o.en_revision); - this.storeRecord.set('needcommit', true); - } - - if (this.prefix === 'FE') { - // Update our store - this.storeRecord.set('needcommit', true); - } - - if (this.prefix === 'FNR') { - // Update our store - this.storeRecord.set('needcommit', true); - } - - if (this.prefix === 'AF') { - this.storeRecord.getUI().addClass('modified'); // tree node - } - - // Add this files into storePendingCommit - phpDoc.addToPendingCommit(o.id, 'en' + this.fpath, this.fname, 'update'); - - // reset file - Ext.getCmp(id_prefix + '-PANEL-btn-save-' + this.fid).disable(); - Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified = false; - Ext.getCmp(id_prefix + '-PANEL-' + this.fid).setTitle( - Ext.getCmp(id_prefix + '-PANEL-' + this.fid).originTitle + // Add this files into storePendingCommit + ui.component.PendingCommitGrid.instance.addRecord( + o.id, 'en' + this.fpath, this.fname, 'update' + ); + + // reset file + Ext.getCmp(id_prefix + '-PANEL-btn-save-' + this.fid).disable(); + Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified = false; + Ext.getCmp(id_prefix + '-PANEL-' + this.fid).setTitle( + Ext.getCmp(id_prefix + '-PANEL-' + this.fid).originTitle + ); + if (this.ftype === 'ALL' || !Ext.getCmp(this.prefix + '-LANG-FILE-' + this.fid).isModified) { + // reset tab-panel + Ext.getCmp(this.prefix + '-' + this.fid).setTitle( + Ext.getCmp(this.prefix + '-' + this.fid).originTitle ); - if (this.ftype === 'ALL' || !Ext.getCmp(this.prefix + '-LANG-FILE-' + this.fid).isModified) { - // reset tab-panel - Ext.getCmp(this.prefix + '-' + this.fid).setTitle( - Ext.getCmp(this.prefix + '-' + this.fid).originTitle - ); - } - - // Remove wait msg - msg.hide(); - }, - failure : function(response) - { - // Remove wait msg - msg.hide(); - phpDoc.winForbidden(); } - }); - } + + // Remove wait msg + msg.hide(); + }, + failure : function(response) + { + // Remove wait msg + msg.hide(); + phpDoc.winForbidden(); + } + }); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/SaveLangFileTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/SaveLangFileTask.js diff -u doc-editor/js/ui/task/SaveLangFileTask.js:1.2 doc-editor/js/ui/task/SaveLangFileTask.js:1.3 --- doc-editor/js/ui/task/SaveLangFileTask.js:1.2 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/ui/task/SaveLangFileTask.js Fri Jun 26 10:29:44 2009 @@ -5,78 +5,77 @@ { Ext.apply(this, config); - this.run = function() - { - var id_prefix = this.prefix + '-' + this.ftype, - msg = Ext.MessageBox.wait(_('Saving data...')); - - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'saveFile', - filePath : this.fpath, - fileName : this.fname, - fileLang : this.lang, - fileContent : Ext.getCmp(this.prefix + '-' + this.ftype + - '-FILE-' + this.fid).getCode() - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - if (this.prefix === 'FE') { - // Update our store - this.storeRecord.set('needcommit', true); - this.storeRecord.set('maintainer', o.maintainer); - this.storeRecord.commit(); - } - - if (this.prefix === 'FNU') { - // Update our store - this.storeRecord.set('revision', '1.' + o.new_revision); - this.storeRecord.set('needcommit', true); - this.storeRecord.set('maintainer', o.maintainer); - this.storeRecord.commit(); - } - - if (this.prefix === 'FNR') { - // Update our store - this.storeRecord.set('needcommit', true); - this.storeRecord.set('maintainer', o.maintainer); - this.storeRecord.set('reviewed', o.reviewed); - this.storeRecord.commit(); - } - - if (this.prefix === 'AF') { - this.storeRecord.getUI().addClass('modified'); // tree node - } - - // Add this files into storePendingCommit - phpDoc.addToPendingCommit(o.id, this.lang + this.fpath, this.fname, 'update'); - - // reset file - Ext.getCmp(id_prefix + '-PANEL-btn-save-' + this.fid).disable(); - Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified = false; - Ext.getCmp(id_prefix + '-PANEL-' + this.fid).setTitle( - Ext.getCmp(id_prefix + '-PANEL-' + this.fid).originTitle + var id_prefix = this.prefix + '-' + this.ftype, + msg = Ext.MessageBox.wait(_('Saving data...')); + + XHR({ + scope : this, + url : './php/controller.php', + params : { + task : 'saveFile', + filePath : this.fpath, + fileName : this.fname, + fileLang : this.lang, + fileContent : Ext.getCmp(this.prefix + '-' + this.ftype + + '-FILE-' + this.fid).getCode() + }, + success : function(response) + { + var o = Ext.util.JSON.decode(response.responseText); + + if (this.prefix === 'FE') { + // Update our store + this.storeRecord.set('needcommit', true); + this.storeRecord.set('maintainer', o.maintainer); + this.storeRecord.commit(); + } + + if (this.prefix === 'FNU') { + // Update our store + this.storeRecord.set('revision', '1.' + o.new_revision); + this.storeRecord.set('needcommit', true); + this.storeRecord.set('maintainer', o.maintainer); + this.storeRecord.commit(); + } + + if (this.prefix === 'FNR') { + // Update our store + this.storeRecord.set('needcommit', true); + this.storeRecord.set('maintainer', o.maintainer); + this.storeRecord.set('reviewed', o.reviewed); + this.storeRecord.commit(); + } + + if (this.prefix === 'AF') { + this.storeRecord.getUI().addClass('modified'); // tree node + } + + // Add this files into storePendingCommit + ui.component.PendingCommitGrid.instance.addRecord( + o.id, this.lang + this.fpath, this.fname, 'update' + ); + + // reset file + Ext.getCmp(id_prefix + '-PANEL-btn-save-' + this.fid).disable(); + Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified = false; + Ext.getCmp(id_prefix + '-PANEL-' + this.fid).setTitle( + Ext.getCmp(id_prefix + '-PANEL-' + this.fid).originTitle + ); + if (this.ftype === 'ALL' || !Ext.getCmp(this.prefix + '-EN-FILE-' + this.fid).isModified) { + // reset tab-panel + Ext.getCmp(this.prefix + '-' + this.fid).setTitle( + Ext.getCmp(this.prefix + '-' + this.fid).originTitle ); - if (this.ftype === 'ALL' || !Ext.getCmp(this.prefix + '-EN-FILE-' + this.fid).isModified) { - // reset tab-panel - Ext.getCmp(this.prefix + '-' + this.fid).setTitle( - Ext.getCmp(this.prefix + '-' + this.fid).originTitle - ); - } - - // Remove wait msg - msg.hide(); - }, - failure : function(response) - { - // Remove wait msg - msg.hide(); - phpDoc.winForbidden(); } - }); - } + + // Remove wait msg + msg.hide(); + }, + failure : function(response) + { + // Remove wait msg + msg.hide(); + phpDoc.winForbidden(); + } + }); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ux/Ext.ux.CodeMirror.js?r1=1.4&r2=1.5&diff_format=u Index: doc-editor/js/ux/Ext.ux.CodeMirror.js diff -u doc-editor/js/ux/Ext.ux.CodeMirror.js:1.4 doc-editor/js/ux/Ext.ux.CodeMirror.js:1.5 --- doc-editor/js/ux/Ext.ux.CodeMirror.js:1.4 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/ux/Ext.ux.CodeMirror.js Fri Jun 26 10:29:44 2009 @@ -48,7 +48,7 @@ }, resize: function() { - this.mirror.frame.style.height = this.ownerCt.lastSize.height+"px"; + this.mirror.frame.style.height = this.ownerCt.lastSize.height - 79 +"px"; }, onInit: function() { http://cvs.php.net/viewvc.cgi/doc-editor/js/main.js?r1=1.63&r2=1.64&diff_format=u Index: doc-editor/js/main.js diff -u doc-editor/js/main.js:1.63 doc-editor/js/main.js:1.64 --- doc-editor/js/main.js:1.63 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/main.js Fri Jun 26 10:29:45 2009 @@ -4,20 +4,17 @@ Ext.BLANK_IMAGE_URL = 'js/extjs/resources/images/default/s.gif'; return { - // Task - TaskPing : '', - // Store storeCommitLogMessage: '', // // Variable - userLogin : '', - userLang : '', + userLogin : null, + userLang : null, appName : 'PhpDocumentation Online Editor', appVer : '0.2', - uiRevision : '$Revision: 1.63 $', + uiRevision : '$Revision: 1.64 $', - userConf: { + userConf : { 'conf_needupdate_diff' : 'using-exec', 'conf_needupdate_scrollbars' : true, 'conf_needupdate_displaylog' : false, @@ -37,65 +34,20 @@ 'conf_theme' : 'themes/empty.css' }, - // Accordin contents - treeAllFiles : '', - staleFileGrid : '', - errorFileGrid : '', - pendingPatchGrid : '', - pendingCommitGrid : '', - pendingReviewGrid : '', - - filePendingOpen: '', + filePendingOpen : '', init : function() { // Stop default contextmenu on all this app - Ext.getBody().on('contextmenu', function(e){ + Ext.getBody().on('contextmenu', function(e) { e.stopEvent(); }, this); // We load the configuration for this user - XHR({ - url : './php/controller.php', - params : { task : 'getConf' }, - scope : this, - success : function(response) - { - var o = Ext.decode(response.responseText); - - this.userLogin = o.mess.userLogin; - this.userLang = o.mess.userLang; - - this.userConf.conf_needupdate_diff = o.mess.userConf.conf_needupdate_diff; - this.userConf.conf_needupdate_scrollbars = o.mess.userConf.conf_needupdate_scrollbars; - this.userConf.conf_needupdate_displaylog = o.mess.userConf.conf_needupdate_displaylog; - - this.userConf.conf_error_skipnbliteraltag = o.mess.userConf.conf_error_skipnbliteraltag; - this.userConf.conf_error_scrollbars = o.mess.userConf.conf_error_scrollbars; - this.userConf.conf_error_displaylog = o.mess.userConf.conf_error_displaylog; - - this.userConf.conf_reviewed_scrollbars = o.mess.userConf.conf_reviewed_scrollbars; - this.userConf.conf_reviewed_displaylog = o.mess.userConf.conf_reviewed_displaylog; - - this.userConf.conf_allfiles_displaylog = o.mess.userConf.conf_allfiles_displaylog; - - this.userConf.conf_patch_scrollbars = o.mess.userConf.conf_patch_scrollbars; - this.userConf.conf_patch_displaylog = o.mess.userConf.conf_patch_displaylog; - - //For the theme, we apply this. - this.userConf.conf_theme = o.mess.userConf.conf_theme; - Ext.get('appTheme').dom.href = this.userConf.conf_theme; - - // Load datastore - this.loadDataStore(); - - // Draw the interface - this.drawInterface(); - } - }); - }, // init + new ui.task.LoadConfigTask(); + }, - winForbidden: function() + winForbidden : function() { Ext.MessageBox.alert( _('Forbidden'), @@ -103,122 +55,8 @@ ); }, - menuMarkupLANG: function(panel, scope){ - - var menu, subMenu; - - subMenu = new Ext.menu.Menu({ - items: [{ - text: _('Reviewed tag'), - handler: function(){ - Ext.getCmp(panel).insertIntoLine(2, 'end', "\n<!-- Reviewed: no -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Revcheck tag'), - handler: function(){ - Ext.getCmp(panel).insertIntoLine(2, "end", "\n<!-- EN-Revision: 1.XX Maintainer: " + scope.userLogin + " Status: ready -->"); - Ext.getCmp(panel).focus(); - } - }] - }); - - menu = { - text: _('MarkUp'), - iconCls: 'iconInsertCode', - menu: subMenu - }; - return menu; - }, // menuMarkupLANG - menuMarkupEN: function(panel){ - - var menu, subMenu; - - subMenu = new Ext.menu.Menu({ - items: [{ - text: _('Description section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, " <refsect1 role=\"description\"><!-- {{{ -->\r\n &reftitle.description;\r\n <methodsynopsis>\r\n <!-- Example: All functions have this -->\r\n <type>thereturned type</type><methodname>func_name</methodname>\r\n <!-- Example: Required parameter -->\r\n <methodparam><type>param1type</type><parameter>firstparameter</parameter></methodparam>\r\n <!-- Example: Optional parameter, also by reference -->\r\n <methodparam choice=\"opt\"><type>int</type><parameter role=\"reference\">secondparameter</parameter></methodparam>\r\n <!-- Example: If no methodparams exist (void), use this -->\r\n <void />\r\n </methodsynopsis>\r\n <para>\r\n The function description goes here.\r\n </para>\r\n </refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Parameters section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"parameters\"><!-- {{{ -->\r\n&reftitle.parameters;\r\n<para>\r\n<variablelist>\r\n<varlistentry>\r\n<term><parameter>firstparameter</parameter></term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n<varlistentry>\r\n<term>\r\n<parameter>secondparameter</parameter>\r\n</term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n</variablelist>\r\n</para>\r\n</refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Return section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"returnvalues\"><!-- {{{ -->\r\n&reftitle.returnvalues;\r\n<para>\r\nWhat this function returns, first on success, then failure.\r\nIf simply true on success and false on failure, just use &return.success; here.\r\n</para>\r\n</refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Error section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"errors\"><!-- {{{ -->\r\n&reftitle.errors;\r\n<para>\r\nWhen does this function issue E_* level errors, and/or throw exceptions.\r\n</para>\r\n</refsect1><!-- }}} -->\r\n"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Unicode section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"unicode\"><!-- {{{ -->\r\n&reftitle.unicode;\r\n<para>\r\nInformation specific to unicode, from the PHP 6 changes.\r\n</para>\r\n</refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Changelog section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"changelog\"><!-- {{{ -->\r\n&reftitle.changelog;\r\n<para>\r\n<informaltable>\r\n<tgroup cols=\"2\">\r\n<thead>\r\n<row>\r\n<entry>&Version;</entry>\r\n<entry>&Description;</entry>\r\n</row>\r\n</thead>\r\n<tbody>\r\n<row>\r\n<entry>Enter the version of change here</entry>\r\n<entry>\r\nDescribe the change\r\n</entry>\r\n</row>\r\n</tbody>\r\n</tgroup>\r\n</informaltable>\r\n</para>\r\n</refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Examples section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"examples\"><!-- {{{ -->\r\n&reftitle.examples;\r\n<para>\r\n<example xml:id=\"function-name.example.basic\"><!-- {{{ -->\r\n<title><function>function-name</function> example</title>\r\n<para>\r\nAny text that describes the purpose of the example, or what\r\ngoes on in the example should be here. (Inside the <example> tag, not out).\r\n</para>\r\n<programlisting role=\"php\">\r\n<![CDATA[\r\n<?php\r\nif ($anexample === true) {\r\necho 'Use the PEAR Coding standards';\r\n}\r\nif ($thereisoutput === 'and it is multiple lines') {\r\necho 'Use a screen like we did below';\r\n}\r\n?>\r\n]]>\r\n</programlisting>\r\n&example.outputs.similar;\r\n<screen>\r\n<![CDATA[\r\nUse the PEAR Coding standards\r\nUse a screen like we did below\r\n]]>\r\n</screen>\r\n</example><!-- }}} -->\r\n</para>\r\n</refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('Notes section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"notes\"><!-- {{{ -->\r\n&reftitle.notes;\r\n<caution>\r\n<para>\r\nAny notes that don't fit anywhere else should go here.\r\n90% of the time, notes, warnings or cautions are better placed in the\r\nparameters section. Consider that before using this section!\r\n</para>\r\n</caution>\r\n¬e.language-construct;\r\n¬e.not-bin-safe;\r\n¬e.registerglobals;\r\n</refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }, { - text: _('SeeAlso section'), - handler: function(){ - var position = Ext.util.JSON.decode(Ext.getCmp(panel).getCursorPosition()); - - Ext.getCmp(panel).insertIntoLine(position.line, 0, "\r\n<refsect1 role=\"seealso\"><!-- {{{ -->\r\n&reftitle.seealso;\r\n<para>\r\n<simplelist>\r\n<member><function>somefunc</function></member>\r\n<member><function>another_func</function></member>\r\n<member>The <link linkend=\"something\">something appendix</link></member>\r\n</simplelist>\r\n</para>\r\n</refsect1><!-- }}} -->"); - Ext.getCmp(panel).focus(); - } - }] - }); - - menu = { - text: _('MarkUp'), - iconCls: 'iconInsertCode', - menu: subMenu - }; - return menu; - }, // menuMarkupEN - loadDataStore: function(){ - + loadDataStore: function() + { // Store : Commit log this.storeCommitLogMessage = new Ext.data.Store({ //autoLoad: true, @@ -241,101 +79,25 @@ }]) }); - },// loadDataStore - - newTabCheckDoc : function() - { - var tab = Ext.getCmp('tab-check-doc'); - - if (tab === undefined) { - // if tab not exist, create new tab - Ext.getCmp('main-panel').add({ - id : 'tab-check-doc', - title : 'Check Doc', - iconCls : 'CheckDoc', - layout : 'fit', - closable : true, - html : 'nothing' - }); - tab = Ext.getCmp('tab-check-doc'); - } - - if (tab.items) tab.removeAll(true); - tab.add(new ui.component.CheckDoc()); - tab.doLayout(); // render the grid - - Ext.getCmp('main-panel').setActiveTab('tab-check-doc'); }, - newTabBuildStatus : function() + saveLangFile : function(prefix, ftype, fid, fpath, fname, lang, record) { - var tab = Ext.getCmp('tab-build-status'); - - if (tab === undefined ) { - // if tab not exist, create new tab - Ext.getCmp('main-panel').add({ - id : 'tab-build-status', - title : _('Translation build status'), - iconCls : 'BuildStatus', - layout : 'fit', - closable : true, - html : 'nothing' - }); - tab = Ext.getCmp('tab-build-status'); + if (this.userLogin === 'cvsread') { + this.winForbidden(); + return; } - if (tab.items) tab.removeAll(true); - tab.add(new ui.component.BuildStatus()); - tab.doLayout(); // render the grid - - Ext.getCmp('main-panel').setActiveTab('tab-build-status'); - }, - - openFile: function(FilePath, FileName) - { - Ext.getCmp('acc-all-files').expand(); - - var t = FilePath.split('/'); - - function GoToNode(node, scope) { - - node.expand(false, true, function(node){ - - var i; - - node.ensureVisible(); - if (t[0] && t[0] !== '') { - // walk into childs - for (i = 0; i < node.childNodes.length; i = i + 1) { - - if (node.childNodes[i].text === t[0]) { - t.shift(); - GoToNode(node.childNodes[i], scope); - } - } - - } - else { - // walk into childs - // leaf node - for (i = 0; i < node.childNodes.length; i = i + 1) { - if (node.childNodes[i].text === FileName) { - node.childNodes[i].ensureVisible(); - node.childNodes[i].ui.highlight(); - scope.treeAllFiles.fireEvent('dblclick', node.childNodes[i]); - } - } - } + if (prefix === 'AF') { + new ui.task.SaveLangFileTask({ + prefix : prefix, + ftype : ftype, + fid : fid, + fpath : fpath, + fname : fname, + lang : lang, + storeRecord : record }); - } - - GoToNode(this.treeAllFiles.root, this); - }, //openFile - - saveLangFile: function(prefix, ftype, fid, fpath, fname, lang, record) - { - if (this.userLogin === 'cvsread') { - this.winForbidden(); return; } @@ -356,7 +118,7 @@ fname : fname, lang : lang, storeRecord : record - }).run(); + }); } else if (btn === 'yes') { @@ -368,194 +130,17 @@ fname : fname, lang : lang, storeRecord : record - }).run(); // include SaveLangFileTask when no err + }); // include SaveLangFileTask when no err } } }); }, - getFile: function(FileID, FilePath, FileName, Panel1, Panel2) - { - // Mask the panel - Ext.get(Panel1 + FileID).mask( - '<img src="themes/img/loading.gif" ' + - 'style="vertical-align: middle;" /> '+ - _('Loading...') - ); - - // We load the File - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'getFile', - FilePath : FilePath, - FileName : FileName - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - Ext.getCmp(Panel2 + FileID).setCode(o.content); - Ext.get(Panel1 + FileID).unmask(); - }, - callback : function() - { - // Reviewed function to open all files of an extension - if (this.filePendingOpen[0]) { - this.filePendingOpen.shift(); - if (this.filePendingOpen[0]) { - if (this.filePendingOpen[0][0]) { - this.openFile(this.filePendingOpen[0][0], this.filePendingOpen[0][1]); - } - } - } - } - }); - }, // getFile - - addToPendingPatch : function(FilePath, FileName, uniqID) - { - var dt, r; - - // Add this files into storePendingCommit - dt = new Date(); - - r = new this.pendingPatchGrid.store.recordType({ - id: Ext.id('', ''), - path: FilePath, - name: FileName, - by: this.userLogin, - uniqID: uniqID, - date: dt - }); - this.pendingPatchGrid.store.insert(0, r); - - }, //addToPendingPatch - - addToPendingCommit : function(FileID, FilePath, FileName, type) - { - var alReady, dt, r1; - - alReady = false; - // Check if this file is not already into this store - this.pendingCommitGrid.store.each(function(r){ - - if (r.data.path === FilePath && r.data.name === FileName) { - alReady = true; - } - - }); - - if (!alReady) { - // Add this files into storePendingCommit - dt = new Date(); - - r1 = new this.pendingCommitGrid.store.recordType({ - id: FileID, - path: FilePath, - name: FileName, - by: this.userLogin, - date: dt, - type: type - }); - this.pendingCommitGrid.store.insert(0, r1); - this.pendingCommitGrid.store.groupBy('path', true); - } - - }, //addToPendingCommit - - NewTabBugs : function(BugsId, BugsUrl, BugsTitle) - { - Ext.getCmp('main-panel').add({ - id : 'mifp_bugs_' + BugsId, - xtype : 'iframepanel', - title : _('Loading...'), - tabTip : BugsTitle, - iconCls : 'iconBugs', - loadMask : true, - defaultSrc : BugsUrl, - listeners : { - 'documentloaded' : function(frame) - { - frame.ownerCt.setTitle(Ext.util.Format.substr(BugsTitle, 0, 20) + '...'); - } - } - }); - Ext.getCmp('main-panel').setActiveTab('mifp_bugs_' + BugsId); - }, - - NewTabMailing: function(MailId, MailUrl, MailTitle) - { - Ext.getCmp('main-panel').add({ - xtype: 'iframepanel', - id: 'mifp_' + MailId, - title: _('Loading...'), - tabTip: MailTitle, - iconCls: 'home-mailing-title', - loadMask: true, - defaultSrc: MailUrl, - listeners: { - 'documentloaded': function(frame){ - frame.ownerCt.setTitle(Ext.util.Format.substr(MailTitle, 0, 20) + '...'); - } - } - }); - Ext.getCmp('main-panel').setActiveTab('mifp_' + MailId); - - }, //NewTabMailing - - winDiff : function(FilePath, FileName, rev1, rev2) - { - Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Finding the diff. Please, wait...')); - - // Load diff data - XHR({ - url : './php/controller.php', - params : { - task : 'getDiff2', - FilePath : FilePath, - FileName : FileName, - Rev1 : rev1, - Rev2 : rev2 - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - Ext.getBody().unmask(); - - // We display in diff window - var winStatus = new Ext.Window({ - title : String.format(_('Diff between {0} & {1}'), rev1, rev2), - width : 650, - height : 350, - resizable : false, - modal : true, - autoScroll : true, - bodyStyle : 'background-color: white; padding: 5px;', - html : '<div class="diff-content">' + o.content + '</div>', - buttons : [{ - text : 'Close', - handler : function() - { - winStatus.close(); - } - }] - }); - winStatus.show(); - } - }); - - }, //winDiff - // Need confirm if we want to close a tab and the content have been modified. removeTabEvent : function(tabpanel, tab) { - var stateLang, stateEn, state, PanType; - - PanType = tab.id.split('-'); + var stateLang, stateEn, state, PanType = tab.id.split('-'); if ((PanType[0] === 'FE' || PanType[0] === 'FNU' || PanType[0] === 'FNR' || PanType[0] === 'PP' || PanType[0] === 'AF') && PanType[1] !== 'help') { @@ -588,14 +173,15 @@ } if (stateEn || stateLang || state) { - Ext.Msg.show({ - scope: this, - title: _('Confirm'), - msg: _('This file has been modified without being saved.<br/>Do you really want to close?'), - buttons: Ext.Msg.YESNO, - icon: Ext.Msg.QUESTION, - fn: function(btn, text){ + scope : this, + title : _('Confirm'), + msg : _('This file has been modified without being saved.<br/>' + + 'Do you really want to close?'), + buttons : Ext.Msg.YESNO, + icon : Ext.Msg.QUESTION, + fn : function(btn, text) + { if (btn === 'yes') { tabpanel.un('beforeremove', this.removeTabEvent, this); tabpanel.remove(tab); @@ -603,14 +189,14 @@ } } }); + return false; } else { return true; } - return false; } else { return true; } - }, //removeTabEvent + }, WinCommit : function(singleFile, rowIndex, choice) { @@ -899,14 +485,13 @@ win.show(btn); + var grid = ui.component.PendingCommitGrid.instance; // Load files to commit if (singleFile) { - // Just the current file - - FileDBID = this.pendingCommitGrid.store.getAt(rowIndex).data.id; - FilePath = this.pendingCommitGrid.store.getAt(rowIndex).data.path; - FileName = this.pendingCommitGrid.store.getAt(rowIndex).data.name; + FileDBID = grid.store.getAt(rowIndex).data.id; + FilePath = grid.store.getAt(rowIndex).data.path; + FileName = grid.store.getAt(rowIndex).data.name; FileID = Ext.util.md5(FilePath + FileName); node = new Ext.tree.TreeNode({ @@ -922,11 +507,10 @@ Ext.getCmp('tree-panel').getRootNode().appendChild(node); - } - else { + } else { // in files Need Update - this.pendingCommitGrid.store.each(function(record){ + grid.store.each(function(record){ if (choice && choice === 'by me' && record.data.by !== this.userLogin) { } @@ -1027,16 +611,16 @@ { if (scope.userLang != 'en') { // Reload Files error data - scope.errorFileGrid.store.reload(); + ui.component.ErrorFileGrid.instance.store.reload(); // Reload Files Need reviewed - scope.pendingReviewGrid.store.reload(); + ui.component.PendingReviewGrid.instance.store.reload(); // Reload Files Need Update - scope.staleFileGrid.store.reload(); + ui.component.StaleFileGrid.instance.store.reload(); } - scope.pendingCommitGrid.store.reload(); + ui.component.PendingCommitGrid.instance.store.reload(); // Reload translators data ui.component.TranslatorGrid.reload(); @@ -1051,15 +635,16 @@ }); }, // WinCommitLastStep - WinUpdate: function(){ + WinUpdate : function() + { // Update of Cvs and apply all tools. var win, btn; function RefreshStep1(scope){ // We need to stop pin test during this update - phpDoc.TaskPing.cancel(); + ui.task.PingTask.instance.cancel(); Ext.get('wizard-step-1').replaceClass('wizard-step-before', 'wizard-step-working'); Ext.get('wizard-step-1.1').replaceClass('wizard-wait', 'wizard-show'); @@ -1187,9 +772,9 @@ if (phpDoc.userLang != 'en') { // Reload all data on this page - phpDoc.staleFileGrid.store.reload(); + ui.component.StaleFileGrid.instance.store.reload(); ui.component.TranslatorGrid.reload(); - phpDoc.errorFileGrid.store.reload(); + ui.component.ErrorFileGrid.instance.store.reload(); } Ext.get('wizard-step-3').replaceClass('wizard-step-working', 'wizard-step-done'); @@ -1203,7 +788,7 @@ Ext.getCmp('btn-start-refresh').enable(); // Re-enable TaskPing - phpDoc.TaskPing.delay(30000); + ui.task.PingTask.instance.delay(30000); // Re-enable win's close button win.tools.close.setVisible(true); @@ -1279,8 +864,9 @@ }); }, // Winupdate - WinCheckBuild: function(){ + WinCheckBuild : function() + { var win, btn; btn = Ext.get('acc-need-update'); @@ -1299,7 +885,7 @@ var o = Ext.util.JSON.decode(response.responseText); // Re-enable TaskPing - phpDoc.TaskPing.delay(30000); + ui.task.PingTask.instance.delay(30000); // Display if ( Ext.getCmp('main-panel').findById('check_build_panel') ) { @@ -1343,7 +929,7 @@ Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait until the build is checked...')); // We need to stop pin test during this process - phpDoc.TaskPing.cancel(); + ui.task.PingTask.instance.cancel(); XHR({ scope : this, @@ -1363,7 +949,7 @@ if (o && o.success === false) { // Re-enable TaskPing - phpDoc.TaskPing.delay(30000); + ui.task.PingTask.instance.delay(30000); Ext.getBody().unmask(); this.winForbidden(); } else { @@ -1428,78 +1014,6 @@ }, //WinCheckBuild - WinConf : function() - { - new ui.component.EditorConf() - .show(Ext.get('winconf-btn')); - - }, //WinConf - - confUpdate: function(item, v) - { - // Apply modification in DB - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'confUpdate', - item : item, - value : v - }, - success : function(response) - { - // Update userConf object - if (item === "conf_theme") { - this.userConf.conf_theme = v; - } - if (item === "conf_needupdate_diff") { - this.userConf.conf_needupdate_diff = v; - } - if (item === "conf_needupdate_scrollbars") { - this.userConf.conf_needupdate_scrollbars = "" + v + ""; - } - if (item === "conf_needupdate_displaylog") { - this.userConf.conf_needupdate_displaylog = "" + v + ""; - } - - if (item === "conf_error_skipnbliteraltag") { - this.userConf.conf_error_skipnbliteraltag = "" + v + ""; - this.errorFileGrid.store.reload(); - } - if (item === "conf_error_scrollbars") { - this.userConf.conf_error_scrollbars = "" + v + ""; - } - if (item === "conf_error_displaylog") { - this.userConf.conf_error_displaylog = "" + v + ""; - } - - if (item === "conf_reviewed_scrollbars") { - this.userConf.conf_reviewed_scrollbars = "" + v + ""; - } - if (item === "conf_reviewed_displaylog") { - this.userConf.conf_reviewed_displaylog = "" + v + ""; - } - - if (item === "conf_allfiles_displaylog") { - this.userConf.conf_allfiles_displaylog = "" + v + ""; - } - - if (item === "conf_patch_scrollbars") { - this.userConf.conf_patch_scrollbars = "" + v + ""; - } - if (item === "conf_patch_displaylog") { - this.userConf.conf_patch_displaylog = "" + v + ""; - } - } - }); - }, //confUpdate - - WinAbout : function() - { - new ui.component.About() - .show(Ext.get('winabout-btn')); - }, //WinAbout - sendEmail : function(TranslatorName, TranslatorEmail) { var form, win; @@ -1617,7 +1131,7 @@ iconCls : 'iconTabNeedReviewed', handler : function() { - phpDoc.treeAllFiles.fireEvent('dblclick', node); + ui.component.RepositoryTree.instance.fireEvent('dblclick', node); } }, { hidden : (node.attributes.from === 'search'), @@ -1644,35 +1158,20 @@ drawInterface: function() { - var gridSummary, gridTranslators, gridMailing, gridBugs, graphPanel, MainWindow, mainMenu, mainContent; - // We keel alive our session by sending a ping every minute - phpDoc.TaskPing = new ui.task.PingTask(); - phpDoc.TaskPing.delay(30000); // start after 1 minute. - - this.staleFileGrid = new ui.component.StaleFileGrid(); - this.errorFileGrid = new ui.component.ErrorFileGrid(); - this.pendingPatchGrid = new ui.component.PendingPatchGrid(); - this.notInENGrid = new ui.component.NotInENGrid(); - this.pendingCommitGrid = new ui.component.PendingCommitGrid(); - this.pendingReviewGrid = new ui.component.PendingReviewGrid(); - this.treeAllFiles = new ui.component.RepositoryTree(); - - gridSummary = new ui.component.SummaryGrid(); - gridTranslators = new ui.component.TranslatorGrid(); - gridMailing = new ui.component.LocalMailGrid(); - gridBugs = new ui.component.BugsGrid(); - graphPanel = new ui.component.TranslationGraph(); - mainMenu = new ui.component.MainMenu(); - - if (this.userLang === 'en') { - mainContent = [gridMailing]; - } else { - mainContent = [gridSummary, gridTranslators, gridMailing, gridBugs, graphPanel]; - } + new ui.task.PingTask().delay(30000); // start after 1 minute. - // Our main window as a viewport - MainWindow = new Ext.Viewport({ + var mainMenu = new ui.component.MainMenu(), + mainContent = (this.userLang === 'en') ? [ + new ui.component.LocalMailGrid() + ] : [ + new ui.component.SummaryGrid(), + new ui.component.TranslatorGrid(), + new ui.component.LocalMailGrid(), + new ui.component.BugsGrid(), + new ui.component.TranslationGraph() + ]; + new Ext.Viewport({ layout : 'border', items : [{ // logo @@ -1711,7 +1210,7 @@ layout : 'fit', iconCls : 'FilesNeedUpdate', hidden : (this.userLang === 'en'), - items : [this.staleFileGrid], + items : [ new ui.component.StaleFileGrid() ], collapsed : true, listeners : { expand : function(panel) @@ -1726,7 +1225,7 @@ layout : 'fit', iconCls : 'FilesError', hidden : (this.userLang === 'en'), - items : [this.errorFileGrid], + items : [ new ui.component.ErrorFileGrid() ], collapsed : true, listeners : { expand : function(panel) @@ -1741,7 +1240,7 @@ layout : 'fit', iconCls : 'FilesNeedReviewed', hidden : (this.userLang === 'en'), - items : [this.pendingReviewGrid], + items : [ new ui.component.PendingReviewGrid() ], collapsed : true, listeners : { expand : function(panel) @@ -1756,14 +1255,14 @@ layout : 'fit', iconCls : 'NotInEn', hidden : (this.userLang === 'en'), - items : [this.notInENGrid], + items : [ new ui.component.NotInENGrid() ], collapsed : true }, { id : 'acc-all-files', title : _('All files'), layout : 'fit', iconCls : 'AllFiles', - items : [this.treeAllFiles], + items : [ new ui.component.RepositoryTree() ], collapsed : true, listeners : { expand : function(panel) @@ -1777,14 +1276,14 @@ title : _('Pending for commit') + ' - <em id="acc-pendingCommit-nb">0</em>', layout : 'fit', iconCls : 'PendingCommit', - items : [this.pendingCommitGrid], + items : [ new ui.component.PendingCommitGrid() ], collapsed : true }, { id : 'acc-need-pendingPatch', title : _('Pending Patch') + ' - <em id="acc-pendingPatch-nb">0</em>', layout : 'fit', iconCls : 'PendingPatch', - items : [this.pendingPatchGrid], + items : [ new ui.component.PendingPatchGrid() ], collapsed : true }] }] @@ -1841,7 +1340,10 @@ // Direct access to a file as cvsread if (directAccess) { - this.openFile(directAccess.lang + directAccess.path, directAccess.name); + this.openFile( + directAccess.lang + directAccess.path, + directAccess.name + ); } } // drawInterface }; // Return http://cvs.php.net/viewvc.cgi/doc-editor/js/main_min.js?r1=1.6&r2=1.7&diff_format=u Index: doc-editor/js/main_min.js diff -u doc-editor/js/main_min.js:1.6 doc-editor/js/main_min.js:1.7 --- doc-editor/js/main_min.js:1.6 Sun Jun 21 13:33:13 2009 +++ doc-editor/js/main_min.js Fri Jun 26 10:29:45 2009 @@ -1 +1 @@ -function log(){if(console){console.log.apply(this,arguments)}}function _(a){try{var c=i18n[a];if(c===undefined){c=a;log("FIX ME : i18n not found for the string: "+a)}return c}catch(b){return a}}function XHR(c){var b=c.success,d=c.failure,a=c.callback;c.failure=c.success=Ext.emptyFn;c.callback=function(g,j,f){var i=null;try{i=Ext.decode(f.responseText)}catch(h){log("Invalid XHR JSON Response:"+f.responseText)}if(j&&i&&i.success){if(b!==undefined){Ext.callback(b,c.scope,[f,g])}}else{if(d!==undefined){Ext.callback(d,c.scope,[f,g])}}if(a!==undefined){Ext.callback(a,c.scope,[g,j,f])}};Ext.Ajax.request(c)}Ext.namespace("ui","ui.task");ui.task.AcceptPatchTask=function(a){Ext.apply(this,a);this.run=function(){if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}Ext.MessageBox.confirm(_("Confirm"),_("This action will accept this patch, send an email to his author, save the file and close this tab."),function(b){if(b==="yes"){Ext.getCmp("PP-PATCH-PANEL-btn-save-"+this.fid).d! isable();Ext.getCmp("PP-PATCH-FILE-"+this.fid).isModified=false;Ext.getCmp("PP-PATCH-PANEL-"+this.fid).setTitle(Ext.getCmp("PP-PATCH-PANEL-"+this.fid).originTitle);Ext.getCmp("PP-"+this.fid).setTitle(Ext.getCmp("PP-"+this.fid).originTitle);var c=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:"all",fileContent:Ext.getCmp("PP-PATCH-FILE-"+this.fid).getCode()},success:function(d){var e=Ext.util.JSON.decode(d.responseText);phpDoc.addToPendingCommit(e.id,this.fpath,this.fname,"update");phpDoc.pendingPatchGrid.store.remove(this.storeRecord);phpDoc.pendingPatchGrid.store.fireEvent("add",phpDoc.pendingPatchGrid.store);XHR({scope:this,url:"./php/controller.php",params:{task:"afterPatchAccept",PatchUniqID:this.fuid}});c.hide();Ext.getCmp("main-panel").remove("PP-"+this.fid)},failure:function(d){c.hide()}})}},this)}};Ext.namespace("ui","ui.task");ui.task.CheckFileTask=function! (a){Ext.apply(this,a);this.run=function(){Ext.getBody().mask('<img src ="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Checking for error. Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"checkFileError",FilePath:this.fpath,FileName:this.fname,FileLang:this.lang,FileContent:Ext.getCmp(this.prefix+"-"+this.ftype+"-FILE-"+this.fid).getCode()},success:function(b){Ext.getBody().unmask();var c=Ext.util.JSON.decode(b.responseText);if(c.error&&c.error_first!=="-No error-"){Ext.getCmp("main-panel").add({id:"FE-help-"+this.fid,title:"Error in "+this.fname,iconCls:"FilesError",closable:true,autoScroll:true,autoLoad:"./error_type.php?dir="+this.fpath+"&file="+this.fname});Ext.getCmp("main-panel").setActiveTab("FE-help-"+this.fid)}else{Ext.MessageBox.show({title:_("Check for errors"),msg:_("There is no error."),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO})}new ui.task.SaveLangFileTask({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:this.fpath,fname:this.fname,lang:this.lang,storeRecord:this.storeR! ecord}).run();if(this.prefix==="FE"){Ext.getCmp(this.prefix+"-error-type-"+this.fid).setSrc("./error_type.php?dir="+this.fpath+"&file="+this.fname+"&nocache="+new Date().getTime())}}})}};Ext.namespace("ui","ui.task");ui.task.ClearLocalChangeTask=function(a){Ext.apply(this,a);this.run=function(){if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}Ext.MessageBox.confirm(_("Confirm"),_("This action will clear your local modification and take back this file from his original stats.<br/>You need confirm."),function(b){if(b==="yes"){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));if(Ext.getCmp("main-panel").findById("FNU-"+Ext.util.md5("FNU-"+this.fpath+this.fname))){Ext.getCmp("main-panel").remove("FNU-"+Ext.util.md5("FNU-"+this.fpath+this.fname))}XHR({scope:this,url:"./php/controller.php",params:{task:"clearLocalChange",FileType:this.ftype,FilePath:this.fpath,FileName:this.fname},success:function(c){if(p! hpDoc.userLang==="en"){phpDoc.staleFileGrid.store.reload();phpDoc.erro rFileGrid.store.reload();phpDoc.storeFilesNeedReviewed.reload()}phpDoc.pendingCommitGrid.store.remove(this.storeRecord);phpDoc.pendingCommitGrid.store.fireEvent("add",phpDoc.pendingCommitGrid.store);phpDoc.notInENGrid.store.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);phpDoc.storeFilesNeedReviewed.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);phpDoc.staleFileGrid.store.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);phpDoc.errorFileGrid.store.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);var d=phpDoc.treeAllFiles.getNodeById("//"+this.fpath+this.fname);if(d){d.getUI().removeClass("modified")}Ext.getBody().unmask()},failure:function(c){Ext.getBody().unmask();phpDoc.winFo! rbidden()}})}},this)}};Ext.namespace("ui","ui.task");ui.task.MarkDeleteTask=function(a){Ext.apply(this,a);this.run=function(){Ext.MessageBox.confirm(_("Confirm"),_("This action will mark this file as need deleted.<br/><br/>You need commit this change to take it effect.<br/><br/>Please, confirm this action."),function(b){if(b==="yes"){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"markAsNeedDelete",FilePath:this.fpath,FileName:this.fname},success:function(c){var d=Ext.util.JSON.decode(c.responseText);Ext.getBody().unmask();phpDoc.addToPendingCommit(d.id,phpDoc.userLang+this.fpath,this.fname,"delete");this.storeRecord.set("needcommit",true)}})}},this)}};Ext.namespace("ui","ui.task");ui.task.PingTask=function(){this.task=new Ext.util.DelayedTask(function(){XHR({url:"./php/controller.php",params:{task:"ping"},success:function(a){var c=Ext.util.JSON.decode(a! .responseText);if(c.ping!=="pong"){window.location.href="./"}else{if(c ..lastupdate==="in_progress"){Ext.getDom("lastUpdateTime").innerHTML=_("update in progress...")}else{var b=Date.parseDate(c.lastupdate,"Y-m-d H:i:s");Ext.getDom("lastUpdateTime").innerHTML=b.format(_("Y-m-d, H:i"))}}},failure:function(){window.location.href="./"}});this.task.delay(30000)},this);this.delay=function(b,d,c,a){this.task.delay(b,d,c,a)};this.cancel=function(){this.task.cancel()}};Ext.namespace("ui","ui.task");ui.task.RejectPatchTask=function(a){Ext.apply(this,a);this.run=function(){if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}Ext.MessageBox.confirm(_("Confirm"),_("This action will <b>reject</b> this patch, send an email to his author and close this tab."),function(b){if(b==="yes"){var c=Ext.MessageBox.wait(_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"afterPatchReject",PatchUniqID:this.fuid},success:function(d){phpDoc.pendingPatchGrid.store.remove(this.storeRecord);phpDoc.pendingPatchGrid.store.fireEvent("add",phpD! oc.pendingPatchGrid.store);Ext.getCmp("main-panel").remove("PP-"+this.fid);c.hide()},failure:function(d){c.hide();phpDoc.winForbidden()}})}},this)}};Ext.namespace("ui","ui.task");ui.task.SaveENFileTask=function(a){Ext.apply(this,a);this.run=function(){var b=this.prefix+"-"+this.ftype,c=Ext.MessageBox.wait(_("Saving data..."));if(phpDoc.userLogin==="cvsread"){c.hide();phpDoc.winForbidden();return}XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:"en",fileContent:Ext.getCmp(this.prefix+"-"+this.ftype+"-FILE-"+this.fid).getCode()},success:function(d){var e=Ext.util.JSON.decode(d.responseText);if(this.prefix==="FNU"){this.storeRecord.set("en_revision","1."+e.en_revision);this.storeRecord.set("needcommit",true)}if(this.prefix==="FE"){this.storeRecord.set("needcommit",true)}if(this.prefix==="FNR"){this.storeRecord.set("needcommit",true)}if(this.prefix==="AF"){this.storeRecord.getUI().addClass("modified")}phpDoc.add! ToPendingCommit(e.id,"en"+this.fpath,this.fname,"update");Ext.getCmp(b +"-PANEL-btn-save-"+this.fid).disable();Ext.getCmp(b+"-FILE-"+this.fid).isModified=false;Ext.getCmp(b+"-PANEL-"+this.fid).setTitle(Ext.getCmp(b+"-PANEL-"+this.fid).originTitle);if(this.ftype==="ALL"||!Ext.getCmp(this.prefix+"-LANG-FILE-"+this.fid).isModified){Ext.getCmp(this.prefix+"-"+this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle)}c.hide()},failure:function(d){c.hide();phpDoc.winForbidden()}})}};Ext.namespace("ui","ui.task");ui.task.SaveLangFileTask=function(a){Ext.apply(this,a);this.run=function(){var b=this.prefix+"-"+this.ftype,c=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:this.lang,fileContent:Ext.getCmp(this.prefix+"-"+this.ftype+"-FILE-"+this.fid).getCode()},success:function(d){var e=Ext.util.JSON.decode(d.responseText);if(this.prefix==="FE"){this.storeRecord.set("needcommit",true);this.storeRecord.set("maintainer",e.maintainer);this.s! toreRecord.commit()}if(this.prefix==="FNU"){this.storeRecord.set("revision","1."+e.new_revision);this.storeRecord.set("needcommit",true);this.storeRecord.set("maintainer",e.maintainer);this.storeRecord.commit()}if(this.prefix==="FNR"){this.storeRecord.set("needcommit",true);this.storeRecord.set("maintainer",e.maintainer);this.storeRecord.set("reviewed",e.reviewed);this.storeRecord.commit()}if(this.prefix==="AF"){this.storeRecord.getUI().addClass("modified")}phpDoc.addToPendingCommit(e.id,this.lang+this.fpath,this.fname,"update");Ext.getCmp(b+"-PANEL-btn-save-"+this.fid).disable();Ext.getCmp(b+"-FILE-"+this.fid).isModified=false;Ext.getCmp(b+"-PANEL-"+this.fid).setTitle(Ext.getCmp(b+"-PANEL-"+this.fid).originTitle);if(this.ftype==="ALL"||!Ext.getCmp(this.prefix+"-EN-FILE-"+this.fid).isModified){Ext.getCmp(this.prefix+"-"+this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle)}c.hide()},failure:function(d){c.hide();phpDoc.winForbidden()}})}};Ext.namespace("ui","u! i.component");ui.component.About=Ext.extend(Ext.Window,{id:"win-about" ,iconCls:"iconHelp",layout:"fit",width:515,height:320,modal:true,plain:true,bodyStyle:"color:#000",buttons:[{text:_("Close"),handler:function(){Ext.getCmp("win-about").close()}}],initComponent:function(){Ext.apply(this,{title:String.format(_("About {0}"),phpDoc.appName),items:{xtype:"tabpanel",activeTab:0,autoTabs:true,border:false,defaults:{autoScroll:true},items:[{title:_("About"),html:'<div id="phd-oe-about"><img src="themes/img/logo.png" alt="'+phpDoc.appName+'" /></div><div id="phd-oe-about-info">'+phpDoc.appName+" ver "+phpDoc.appVer+"<br/>UI: "+phpDoc.uiRevision+"<br/> Copyright © 2008-2009 The PHP Group<br/>"+_("Author:")+' <a href="mailto:yannick@php.net">Yannick Torrès</a> '+_('and <a href="http://cvs.php.net/viewvc.cgi/doc-editor/" target="_blank">others</a>')+"</div>"},{title:_("Credits"),bodyStyle:"padding:15px",html:'<div id="phd-oe-credit"><ul><li><a href="http://extjs.com" target="_blank">ExtJs Team</a><div class="phd-oe-credit-info">'+_("Javascri! pt FrameWork")+'</div></li><li><a href="http://marijn.haverbeke.nl/codemirror/" target="_blank">CodeMirror</a><div class="phd-oe-credit-info">'+_("Code editor")+'</div></li><li><a href="http://famfamfam.com" target="_blank">famfamfam.com</a><div class="phd-oe-credit-info">'+_("Icon pack")+"</div></li></ul></div>"},{title:_("License"),autoLoad:{url:"./LICENSE"}}]}});ui.component.About.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._BugsGrid");ui.component._BugsGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getOpenBugs"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"title",mapping:"title"},{name:"link",mapping:"link"},{name:"description",mapping:"description"}]))});ui.component._BugsGrid.columns=[{id:"GridBugTitle",header:"Title",sortable:true,dataIndex:"title"}];ui.component._BugsGrid.view! =new Ext.grid.GridView({forceFit:true,emptyText:_("No open Bugs"),enab leRowBody:true,getRowClass:function(a,d,c,b){c.body='<p class="bug-desc">'+a.data.description+"</p>";return"x-grid3-row-expanded"}});ui.component.BugsGrid=Ext.extend(Ext.grid.GridPanel,{iconCls:"iconBugs",loadMask:true,stripeRows:true,autoHeight:true,width:800,autoExpandColumn:"GridBugTitle",store:ui.component._BugsGrid.store,columns:ui.component._BugsGrid.columns,view:ui.component._BugsGrid.view,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),listeners:{render:function(a){a.store.load.defer(20,a.store)},rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c);new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+_("Open in a new Tab")+"</b>",iconCls:"openInTab",handler:function(){var d=a.store.getAt(c).data.id,e=a.store.getAt(c).data.link,f=a.store.getAt(c).data.title;phpDoc.NewTabBugs(d,e,f)}},"-",{text:_("Refresh this grid"),iconCls:"refresh",handler:function(){a.store.reload()}}]}).showAt(b.getXY())},rowdblclick:function(c,g,f){var a=c.store.getAt(g).data.id! ,b=c.store.getAt(g).data.link,d=c.store.getAt(g).data.title;phpDoc.NewTabBugs(a,b,d)}},initComponent:function(){Ext.apply(this,{title:String.format(_("Open bugs for {0}"),"doc-"+phpDoc.userLang),tbar:[{tooltip:_("Refresh this grid"),iconCls:"refresh",handler:function(){ui.component.BugsGrid.reload()}}]});ui.component.BugsGrid.superclass.initComponent.call(this)}});ui.component.BugsGrid.reload=function(){ui.component._BugsGrid.store.reload()};Ext.namespace("ui","ui.component","ui.component._BuildStatus");ui.component._BuildStatus.ds=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getBuildStatusData"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"lang",mapping:"lang"},{name:"date",mapping:"date",type:"date",dateFormat:"Y-m-d H:i:s"},{name:"status",mapping:"status",type:"int"}]))});ui.component._BuildStatus.ds.setDefaultSort("date","desc");ui! .component._BuildStatus.rendererLanguage=function(a){return'<div class ="flag flag-'+a+'">'+a+"</div>"};ui.component._BuildStatus.rendererStatus=function(a){if(a===0){return"Nok"}else{return"Ok"}};ui.component._BuildStatus.columns=[{id:"date",header:_("Date"),sortable:true,dataIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))},{header:_("Language"),width:45,sortable:true,dataIndex:"lang",renderer:ui.component._BuildStatus.rendererLanguage},{header:_("Status"),width:45,sortable:true,dataIndex:"status",renderer:ui.component._BuildStatus.rendererStatus}];ui.component.BuildStatus=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"date",store:ui.component._BuildStatus.ds,columns:ui.component._BuildStatus.columns,view:new Ext.grid.GridView({forceFit:true,getRowClass:function(a,d,c,b){if(a.data.status===0){return"summary_3"}}}),listeners:{scope:this,render:function(a){a.store.load.defer(20,a.store)}}});Ext.namespace("ui","ui.component","ui.component._CheckDoc");ui.component._CheckDoc.ds=new Ext.data.Store! ({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getCheckDocData"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"extension",mapping:"extension"},{name:"check_oldstyle",mapping:"check_oldstyle",type:"int"},{name:"check_undoc",mapping:"check_undoc",type:"int"},{name:"check_roleerror",mapping:"check_roleerror",type:"int"},{name:"check_badorder",mapping:"check_badorder",type:"int"},{name:"check_noseealso",mapping:"check_noseealso",type:"int"},{name:"check_noreturnvalues",mapping:"check_noreturnvalues",type:"int"},{name:"check_noparameters",mapping:"check_noparameters",type:"int"},{name:"check_noexamples",mapping:"check_noexamples",type:"int"},{name:"check_noerrors",mapping:"check_noerrors",type:"int"}]))});ui.component._CheckDoc.ds.setDefaultSort("extension","asc");ui.component._CheckDoc.renderer=function(b,a){if(b>0){a.css="check_do! c_cell";return b}else{return}};ui.component._CheckDoc.columns=[new Ext ..grid.RowNumberer(),{id:"extension",header:"Extension",sortable:true,dataIndex:"extension"},{header:"Not documented",width:45,sortable:true,dataIndex:"check_undoc",renderer:ui.component._CheckDoc.renderer},{header:"Old style",width:45,sortable:true,dataIndex:"check_oldstyle",renderer:ui.component._CheckDoc.renderer},{header:"Bad refsect1 order",width:45,sortable:true,dataIndex:"check_badorder",renderer:ui.component._CheckDoc.renderer},{header:"No parameters",width:45,sortable:true,dataIndex:"check_noparameters",renderer:ui.component._CheckDoc.renderer},{header:"No return values",width:45,sortable:true,dataIndex:"check_noreturnvalues",renderer:ui.component._CheckDoc.renderer},{header:"No examples",width:45,sortable:true,dataIndex:"check_noexamples",renderer:ui.component._CheckDoc.renderer},{header:"No errors section",width:45,sortable:true,dataIndex:"check_noerrors",renderer:ui.component._CheckDoc.renderer},{header:"No see also",width:45,sortable:true,dataIndex:"check_noseeal! so",renderer:ui.component._CheckDoc.renderer},{header:"Refsect1 role error",width:45,sortable:true,dataIndex:"check_roleerror",renderer:ui.component._CheckDoc.renderer}];ui.component._CheckDoc.fs=new Ext.data.SimpleStore({fields:[{name:"id"},{name:"file"}]});ui.component._CheckDoc.FileGrid=Ext.extend(Ext.grid.GridPanel,{id:"check-doc-file-grid",store:ui.component._CheckDoc.fs,loadMask:true,bodyBorder:false,autoExpandColumn:"file",sm:new Ext.grid.RowSelectionModel({listeners:{rowselect:function(c,b,a){Ext.getCmp("check-doc-btn-open-selected-files").enable()}}}),columns:[new Ext.grid.RowNumberer(),{id:"file",header:"Files",sortable:true,dataIndex:"file"}],listeners:{rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c)},rowdblclick:function(a,c,b){phpDoc.openFile("en"+a.fpath,a.store.getAt(c).data.file);Ext.getCmp("check-doc-file-win").close()}}});ui.component._CheckDoc.FileWin=Ext.extend(Ext.Window,{id:"check-doc-file-win",title:_("Files"),width:450,height:350,la! belWidth:50,resizable:false,modal:true,autoScroll:true,layout:"fit",bu ttons:[{text:"Open all files",handler:function(){var c=Ext.getCmp("check-doc-file-win"),a=ui.component._CheckDoc.fs;phpDoc.filePendingOpen=[];for(var b=0;b<a.getCount();++b){phpDoc.filePendingOpen[b]=["en"+c.fpath,a.getAt(b).data.file]}phpDoc.openFile(phpDoc.filePendingOpen[0][0],phpDoc.filePendingOpen[0][1]);c.close()}},{text:"Open selected files",id:"check-doc-btn-open-selected-files",disabled:true,handler:function(){var c=Ext.getCmp("check-doc-file-win"),b=Ext.getCmp("check-doc-file-grid").getSelectionModel().getSelections();phpDoc.filePendingOpen=[];for(var a=0;a<b.length;++a){phpDoc.filePendingOpen[a]=["en"+c.fpath,b[a].data.file]}phpDoc.openFile(phpDoc.filePendingOpen[0][0],phpDoc.filePendingOpen[0][1]);c.close()}}]});ui.component.CheckDoc=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,store:ui.component._CheckDoc.ds,columns:ui.component._CheckDoc.columns,autoExpandColumn:"extension",sm:new Ext.grid.CellSelectionModel({singleSelect:true}),view:new Ext.gr! id.GridView({forceFit:true}),listeners:{render:function(a){a.store.load.defer(20,a.store)},celldblclick:function(c,i,d,h){var a=c.getStore().getAt(i),g=c.getColumnModel().getDataIndex(d),f=a.get(g),b=a.data.path;if(Ext.num(f,false)&&f!=0){XHR({url:"./php/controller.php",params:{task:"getCheckDocFiles",path:b,errorType:g},success:function(e){var k=Ext.decode(e.responseText);ui.component._CheckDoc.fs.removeAll();for(var j=0;j<k.files.length;++j){ui.component._CheckDoc.fs.insert(0,new ui.component._CheckDoc.fs.recordType({id:j,file:k.files[j].name}))}ui.component._CheckDoc.fs.sort("file","asc");new ui.component._CheckDoc.FileWin({fpath:b,items:[new ui.component._CheckDoc.FileGrid({fpath:b})]}).show()}})}}}});Ext.namespace("ui","ui.component","ui.component._CVSLogGrid");ui.component._CVSLogGrid.store=Ext.extend(Ext.data.Store,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"revision",mapping:"! revision"},{name:"date",mapping:"date",type:"date",dateFormat:"Y/m/d H :i:s"},{name:"author",mapping:"author"},{name:"content",mapping:"content"}]))});ui.component._CVSLogGrid.sm=Ext.extend(Ext.grid.CheckboxSelectionModel,{singleSelect:false,header:"",width:22,listeners:{beforerowselect:function(b){var a=b.getCount();if(a===2){return false}},rowselect:function(b){var a=b.getCount();if(a===2){Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).enable();Ext.get(b.prefix+"-PANEL-btn-log-"+b.fid).frame("3F8538")}else{Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).disable()}},rowdeselect:function(b){var a=b.getCount();if(a===2){Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).enable();Ext.get(b.prefix+"-PANEL-btn-log-"+b.fid).frame("3F8538")}else{Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).disable()}}}});ui.component._CVSLogGrid.columns=[{id:"id",header:"Rev.",width:40,sortable:false,dataIndex:"revision"},{header:"Content",width:130,sortable:true,dataIndex:"content"},{header:"By",width:50,sortable:true,dataIndex:"author"},{header:"Date",width:85,sortable:true,d! ataIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))}];ui.component.CVSLogGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,autoScroll:true,bodyBorder:false,autoExpandColumn:"content",initComponent:function(){var d=new ui.component._CVSLogGrid.sm({fid:this.fid,prefix:this.prefix}),a=new ui.component._CVSLogGrid.store({autoLoad:this.loadStore,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:this.fpath,File:this.fname}}),c=[];c.push(d);for(var b=0;b<ui.component._CVSLogGrid.columns.length;++b){c.push(ui.component._CVSLogGrid.columns[b])}a.setDefaultSort("date","desc");Ext.apply(this,{sm:d,store:a,columns:c,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,id:this.prefix+"-PANEL-btn-log-"+this.fid,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",disabled:true,handler:function(){var g=this.getSelectionModel().getSelections(),f=g[0].data.revision,e=g[1].data.revision;phpDoc.winDiff(this.fpath,this.fname,! f,e)}},{scope:this,id:this.prefix+"-PANEL-btn-refreshlog-"+this.fid,to oltip:"<b>Load/Refresh</b> revisions",iconCls:"refresh",handler:function(){this.store.reload()}}]});ui.component.CVSLogGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._EditorConf");ui.component._EditorConf.tplMenu=new Ext.XTemplate('<tpl for=".">','<div class="thumb-wrap" id="tplMenu-{id}">','<div class="thumb"><img src="themes/img/{img}" title=""></div>',"<span>{label}</span>","</div>","</tpl>");ui.component._EditorConf.tplMenu.compile();ui.component._EditorConf.menuDefEn=[["1","go-home.png",_("Main")],["5","view-list-tree.png",_('Module "All files"')],["6","view-media-playlist.png",_('Module "Pending Patch"')]];ui.component._EditorConf.menuDefNonEn=[["1","go-home.png",_("Main")],["2","edit-redo.png",_('Module "Files Need Update"')],["3","dialog-cancel.png",_('Module "Files with Error"')],["4","document-properties.png",_('Module "Files need Reviewed"')],["5","view-list-tree.png",_('Module "All files"')],["6","view-media-playlist.p! ng",_('Module "Pending Patch"')]];ui.component._EditorConf.menuStore=new Ext.data.SimpleStore({id:0,fields:[{name:"id"},{name:"img"},{name:"label"}]});ui.component._EditorConf.viewMenu=Ext.extend(Ext.DataView,{id:"conf-menu-view",tpl:ui.component._EditorConf.tplMenu,singleSelect:true,overClass:"x-view-over",itemSelector:"div.thumb-wrap",store:ui.component._EditorConf.menuStore,listeners:{selectionchange:function(b,a){var c=b.getSelectedRecords();Ext.getCmp("confCard").layout.setActiveItem("conf-card-"+c[0].data.id)}}});ui.component._EditorConf.themeStore=new Ext.data.SimpleStore({fields:["themeFile",{name:"themeName",type:"string"}],data:[["themes/black/css/xtheme-black.css",_("Black")],["themes/empty.css",_("Default")],["themes/darkgray/css/xtheme-darkgray.css",_("DarkGray")],["js/extjs/resources/css/xtheme-gray.css",_("Gray")],["themes/gray-extend/css/xtheme-gray-extend.css",_("Gray Extend")],["themes/indigo/css/xtheme-indigo.css",_("Indigo")],["themes/midnight/css/xtheme! -midnight.css",_("Midnight")],["themes/olive/css/xtheme-olive.css",_(" Olive")],["themes/purple/css/xtheme-purple.css",_("Purple")],["js/extjs/resources/css/xtheme-slate.css",_("Slate")],["themes/silverCherry/css/xtheme-silverCherry.css",_("SilverCherry")]]});ui.component._EditorConf.card1=Ext.extend(Ext.form.FormPanel,{id:"conf-card-1",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Themes"),autoHeight:true,defaults:{hideLabel:true},items:[{xtype:"combo",id:"conf-combo-theme",valueField:"themeFile",displayField:"themeName",triggerAction:"all",mode:"local",forceSelection:true,editable:false,value:phpDoc.userConf.conf_theme,store:ui.component._EditorConf.themeStore,listeners:{render:function(){Ext.getCmp("conf-combo-theme").store.sort("themeName")},select:function(e,a,b){var d=e.getValue();Ext.get("appTheme").dom.href=d;phpDoc.confUpdate("conf_theme",d)}}}]}]});ui.component._EditorConf.card1.superclass.initComponent.call(this)}});ui.component._EditorConf.card2=Ext.extend(Ext.form.FormPanel,{i! d:"conf-card-2",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Diff view"),autoHeight:true,defaults:{hideLabel:true},defaultType:"radio",items:[{name:"conf_needupdate_diff",checked:(phpDoc.userConf.conf_needupdate_diff==="using-viewvc")?true:false,boxLabel:_("Using ViewVc from php web site"),inputValue:"using-viewvc",listeners:{check:function(a){if(a.checked){phpDoc.confUpdate("conf_needupdate_diff",a.getRawValue())}}}},{name:"conf_needupdate_diff",checked:(phpDoc.userConf.conf_needupdate_diff==="using-exec")?true:false,boxLabel:_("Using diff -kk -u command line"),inputValue:"using-exec",listeners:{check:function(a){if(a.checked){phpDoc.confUpdate("conf_needupdate_diff",a.getRawValue())}}}}]},{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_needupdate_scrollbars",checked:(phpDoc.userConf.conf_needupdate_scrollbars==="true")?true:false,boxLabel:_("Syn! chronize scroll bars"),listeners:{check:function(a){phpDoc.confUpdate( "conf_needupdate_scrollbars",a.getValue())}}},{name:"conf_needupdate_displaylog",checked:(phpDoc.userConf.conf_needupdate_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_needupdate_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card2.superclass.initComponent.call(this)}});ui.component._EditorConf.card3=Ext.extend(Ext.form.FormPanel,{id:"conf-card-3",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Error type"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_error_skipnbliteraltag",checked:(phpDoc.userConf.conf_error_skipnbliteraltag==="true")?true:false,boxLabel:_("Skip nbLiteralTag error"),listeners:{check:function(a){phpDoc.confUpdate("conf_error_skipnbliteraltag",a.getValue())}}}]},{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"! checkbox",items:[{name:"conf_error_scrollbars",checked:(phpDoc.userConf.conf_error_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){phpDoc.confUpdate("conf_error_scrollbars",a.getValue())}}},{name:"conf_error_displaylog",checked:(phpDoc.userConf.conf_error_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_error_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card3.superclass.initComponent.call(this)}});ui.component._EditorConf.card4=Ext.extend(Ext.form.FormPanel,{id:"conf-card-4",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_reviewed_scrollbars",checked:(phpDoc.userConf.conf_reviewed_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check! :function(a){phpDoc.confUpdate("conf_reviewed_scrollbars",a.getValue() )}}},{name:"conf_reviewed_displaylog",checked:(phpDoc.userConf.conf_reviewed_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_reviewed_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card4.superclass.initComponent.call(this)}});ui.component._EditorConf.card5=Ext.extend(Ext.form.FormPanel,{id:"conf-card-5",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_allfiles_displaylog",checked:(phpDoc.userConf.conf_allfiles_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_allfiles_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card5.superclass.initComponent.call(this)}});ui.component._EditorConf.card6=Ext.extend(Ext.form! .FormPanel,{id:"conf-card-6",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_patch_scrollbars",checked:(phpDoc.userConf.conf_patch_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){phpDoc.confUpdate("conf_patch_scrollbars",a.getValue())}}},{name:"conf_patch_displaylog",checked:(phpDoc.userConf.conf_patch_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_patch_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card6.superclass.initComponent.call(this)}});ui.component.EditorConf=Ext.extend(Ext.Window,{id:"win-conf",layout:"border",width:550,height:400,iconCls:"iconConf",title:_("Configuration"),modal:true,plain:true,buttons:[{text:_("Close"),handler:function(){Ext.getCmp("win-! conf").close()}}],listeners:{show:function(){var a=Ext.getCmp("conf-me nu-view");a.select(a.getNode(0))}},initComponent:function(){if(phpDoc.userLang==="en"){ui.component._EditorConf.menuStore.loadData(ui.component._EditorConf.menuDefEn)}else{ui.component._EditorConf.menuStore.loadData(ui.component._EditorConf.menuDefNonEn)}Ext.apply(this,{items:[{id:"confMenu",region:"west",width:190,autoScroll:true,items:[new ui.component._EditorConf.viewMenu()]},{id:"confCard",region:"center",layout:"slide",width:375,frame:true,activeItem:0,bbar:new Ext.StatusBar({defaultText:_("All changes take effect immediately"),defaultIconCls:"confStatusBar"}),items:[new ui.component._EditorConf.card1(),new ui.component._EditorConf.card2(),new ui.component._EditorConf.card3(),new ui.component._EditorConf.card4(),new ui.component._EditorConf.card5(),new ui.component._EditorConf.card6()]}]});ui.component.EditorConf.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._ErrorFileGrid");ui.component._ErrorFileGrid.store=Ext.extend(Ext.data.G! roupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"maintainer",mapping:"maintainer"},{name:"type",mapping:"type"},{name:"value_en",mapping:"value_en"},{name:"value_lang",mapping:"value_lang"},{name:"needcommit",mapping:"needcommit"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-error-nb").innerHTML=a.getCount()}}});ui.component._ErrorFileGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Type"),width:45,sortable:true,dataIndex:"type"},{header:_("Maintainer"),width:45,sortable:true,dataIndex:"maintainer"},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._ErrorFileGrid.view=new Ext.grid.GroupingView({emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>",forceFit:true,groupTextTpl:'{[values.rs[0].d! ata["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Fil es")+'" : "'+_("File")+'"]})',getRowClass:function(a,d,c,b){if(a.data.needcommit){return"file-need-commit"}}});ui.component._ErrorFileGrid.menu=function(a){Ext.apply(this,a);this.init();ui.component._ErrorFileGrid.menu.superclass.constructor.call(this)};Ext.extend(ui.component._ErrorFileGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"FilesError",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},{scope:this,hidden:this.hideCommit,text:("View Diff"),iconCls:"iconViewDiff",handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext.get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" styl! e="vertical-align: middle;" />'+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:this.lang+this.fpath,FileName:this.fname},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}},"-",{text:_("About error type"),iconCls:"iconHelp",handler:function(){if(!Ext.getCmp("main-panel").findById("FE-help")){Ext.getCmp("main-panel").add({id:"FE-help",title:_("About error type"),iconCls:"iconHelp",closable:true,autoScroll:true,autoLoad:"./error_type.php"});Ext.getCmp("main-panel").setActiveTab("FE-help")}else{Ext.getCmp("main-panel").setActiveTab("FE-help")}}}]})}});ui.component.ErrorFileGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",view:ui.component._ErrorFileGrid.view,columns:ui.component._ErrorFileGrid.columns,listeners:{render:function(a){a.view.refresh()},rowcontextmenu:func! tion(b,f,d){var c=b.store.getAt(f).data.path,a=b.store.getAt(f).data.n ame;b.getSelectionModel().selectRow(f);new ui.component._ErrorFileGrid.menu({hideCommit:(b.store.getAt(f).data.needcommit===false),grid:b,event:d,rowIdx:f,lang:phpDoc.userLang,fpath:c,fname:a}).showAt(d.getXY())},rowdblclick:function(c,i,h){var f=c.store.getAt(i),d=f.data.path,a=f.data.name,g=Ext.util.md5("FE-"+phpDoc.userLang+d+a),b=[];if(!Ext.getCmp("main-panel").findById("FE-"+g)){b=[];c.store.each(function(e){if(e.data.path===d&&e.data.name===a&&!b[e.data.type]){b.push(e.data.type)}});Ext.getCmp("main-panel").add({id:"FE-"+g,title:a,layout:"border",iconCls:"iconTabError",closable:true,originTitle:a,defaults:{split:true},tabTip:String.format(_("File with error : in {0}"),d),items:[{xtype:"panel",id:"FE-error-desc-"+g,region:"north",layout:"fit",title:_("Error description"),height:150,collapsible:true,collapsed:true,items:{xtype:"iframepanel",id:"FE-error-type-"+g,loadMask:true,defaultSrc:"./error_type.php?dir="+d+"&file="+a}},{region:"west",xtype:"panel",title:_("CvsLog")! ,collapsible:true,collapsed:true,layout:"fit",bodyBorder:false,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[new ui.component.CVSLogGrid({layout:"fit",title:phpDoc.userLang,prefix:"FE-LANG",fid:g,fpath:phpDoc.userLang+d,fname:a,loadStore:(phpDoc.userConf.conf_error_displaylog==="true")}),new ui.component.CVSLogGrid({layout:"fit",title:"en",prefix:"FE-EN",fid:g,fpath:"en"+d,fname:a,loadStore:(phpDoc.userConf.conf_error_displaylog==="true")})]}},new ui.component.FilePanel({id:"FE-LANG-PANEL-"+g,region:"center",title:String.format(_("{0} File: "),phpDoc.userLang)+d+a,prefix:"FE",ftype:"LANG",fid:g,fpath:d,fname:a,lang:phpDoc.userLang,parser:"xml",storeRecord:f,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_error_scrollbars"}),new ui.component.FilePanel({id:"FE-EN-PANEL-"+g,region:"east",width:575,title:_("en File: ")+d+a,prefix:"FE",ftype:"EN",fid:g,fpath:d,fname:a,lang:"en",parser:"xml",storeRecord:f,syncScroll:tr! ue,syncScrollConf:"conf_error_scrollbars"})]});Ext.getCmp("main-panel" ).setActiveTab("FE-"+g);if(Ext.getCmp("FE-"+g).getLayout().north.collapsedEl){Ext.getCmp("FE-"+g).getLayout().north.collapsedEl.addClass("x-layout-collapsed-east-error-desc")}}else{Ext.getCmp("main-panel").setActiveTab("FE-"+g)}}},initComponent:function(){Ext.apply(this,{store:new ui.component._ErrorFileGrid.store({autoLoad:(phpDoc.userLang!=="en"),proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesError"}}),tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FE-filter",width:180,hideTrigger1:true,enableKeyEvents:true,validateOnBlur:false,validationEvent:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();phpDoc.errorFileGrid.store.clearFilter()},onTrigger2Click:function(){var a=this.getValue();if(a==""||a.length<3){this.markInvalid(_("Your filter must con! tain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();phpDoc.errorFileGrid.store.filter("maintainer",a)}})]});ui.component.ErrorFileGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component");ui.component.ExecDiff=Ext.extend(Ext.Panel,{layout:"fit",title:_("Diff From cvs"),height:150,autoScroll:true,collapsed:true,listeners:{render:function(){XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff2",FilePath:"en"+this.fpath,FileName:this.fname,Rev1:this.rev1,Rev2:this.rev2},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get(this.prefix+"-diff-"+this.fid).dom.innerHTML=b.content}})}},initComponent:function(){Ext.apply(this,{html:'<div id="'+this.prefix+"-diff-"+this.fid+'" class="diff-content"></div>',});ui.component.ExecDiff.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component");ui.component.FilePanel=Ext.extend(Ext.form.FormPanel,{activeScroll:false,initComponent:function(){var a=! this.prefix+"-"+this.ftype;this.bbar=(this.syncScrollCB)?[{xtype:"chec kbox",name:"conf_needupdate_scrollbars",hideLabel:true,checked:(phpDoc.userConf[this.syncScrollConf]==="true"),boxLabel:_("Synchronize scroll bars"),listeners:{scope:this,check:function(b){phpDoc.confUpdate(this.syncScrollConf,b.getValue())},render:function(b){Ext.DomHelper.insertHtml("beforeBegin",b.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="'+a+"-status-line-"+this.fid+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="'+a+"-status-col-"+this.fid+'">-</span></span></div> ')}}}]:[{xtype:"panel",height:21,baseCls:"",bodyStyle:"padding-top:5px;",html:'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="'+a+"-status-line-"+this.fid+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="'+a+"-status-col-"+this.fid+'">-</span></span></div> '}];if(!this.readOnl! y){this.tbar=(this.isPatch)?[{id:a+"-PANEL-btn-save-"+this.fid,scope:this,tooltip:_("<b>Accept</b> this patch and <b>Save</b> the file"),iconCls:"saveFile",handler:function(){new ui.task.AcceptPatchTask({fid:this.fid,fpath:this.fpath,fname:this.fname,fuid:this.fuid,storeRecord:this.storeRecord}).run()}},{id:a+"-PANEL-btn-reject-"+this.fid,scope:this,tooltip:_("<b>Reject</b> this patch"),iconCls:"iconPageDelete",handler:function(){new ui.task.RejectPatchTask({fid:this.fid,fuid:this.fuid,storeRecord:this.storeRecord}).run()}},"-",{scope:this,tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp(a+"-FILE-"+this.fid).reIndentAll()}}]:[{id:a+"-PANEL-btn-save-"+this.fid,scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",disabled:true,handler:function(){if(this.lang==="en"){new ui.task.SaveENFileTask({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:this.fpath,fname:this.fname,storeRecord:this.storeRecord}).run()}else{ph! pDoc.saveLangFile(this.prefix,this.ftype,this.fid,this.fpath,this.fnam e,this.lang,this.storeRecord,(this.prefix==="AF"))}}},{id:a+"-PANEL-btn-saveas-"+this.fid,scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",disabled:true,handler:function(){new ui.component.PatchPrompt({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:this.fpath,fname:this.fname,lang:this.lang,defaultEmail:(phpDoc.userLogin!=="cvsread")?phpDoc.userLogin+"@php.net":""}).show()}},"-",{scope:this,tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp(a+"-FILE-"+this.fid).reIndentAll()}},(this.lang==="en")?phpDoc.menuMarkupEN(a+"-FILE-"+this.fid):phpDoc.menuMarkupLANG(a+"-FILE-"+this.fid,phpDoc)]}else{this.tbar=[{}]}Ext.apply(this,{originTitle:this.title,items:[{xtype:"codemirror",id:a+"-FILE-"+this.fid,readOnly:this.readOnly,parser:this.parser,isModified:false,listeners:{scope:this,initialize:function(){if(this.isPatch){phpDoc.getFile(this.fid,this.fpath,this.fname+"."+this.fuid+".patch",a+"-PANEL-",a+"-FILE-")}els! e{phpDoc.getFile(this.fid,this.lang+this.fpath,this.fname,a+"-PANEL-",a+"-FILE-")}},cmchange:function(e,c,d){if(e===116){return}var b=Ext.util.JSON.decode(Ext.getCmp(a+"-FILE-"+this.fid).getCursorPosition());Ext.get(a+"-status-line-"+this.fid).dom.innerHTML=b.line;Ext.get(a+"-status-col-"+this.fid).dom.innerHTML=b.caracter;if(e!==27&&e!==33&&e!==34&&e!==37&&e!==38&&e!==39&&e!==40&&e!==17&&e!==16&&e!==67){if(!Ext.getCmp(a+"-FILE-"+this.fid).isModified){Ext.getCmp(a+"-PANEL-"+this.fid).setTitle(Ext.getCmp(a+"-PANEL-"+this.fid).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp(this.prefix+"-"+this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp(a+"-PANEL-btn-save-"+this.fid).enable();Ext.get(a+"-PANEL-btn-save-"+this.fid).frame("3F8538");if(this.isPatch){Ext.getCmp(a+"-PANEL-btn-reject-"+this.fid).enable();Ext.get(a+"-PANEL-btn-reject-"+this.fid)! .frame("3F8538")}else{Ext.getCmp(a+"-PANEL-btn-saveas-"+this.fid).enab le();Ext.get(a+"-PANEL-btn-saveas-"+this.fid).frame("3F8538")}Ext.getCmp(a+"-FILE-"+this.fid).isModified=true}}},cmcursormove:function(){var b=Ext.util.JSON.decode(Ext.getCmp(a+"-FILE-"+this.fid).getCursorPosition());Ext.get(a+"-status-line-"+this.fid).dom.innerHTML=b.line;Ext.get(a+"-status-col-"+this.fid).dom.innerHTML=b.caracter},cmscroll:function(e){if(this.syncScroll&&phpDoc.userConf[this.syncScrollConf]==="true"){var c;switch(this.ftype){case"EN":c=this.prefix+"-LANG";break;case"LANG":c=this.prefix+"-EN";break;case"PATCH":c=this.prefix+"-ORIGIN";break;case"ORIGIN":c=this.prefix+"-PATCH";break}var d=Ext.getCmp(c+"-PANEL-"+this.fid),b=Ext.getCmp(c+"-FILE-"+this.fid);if(d.activeScroll===false){this.activeScroll=true;b.scrollTo(e)}else{d.activeScroll=false}}}}}]});ui.component.FilePanel.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._LocalMailGrid");ui.component._LocalMailGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({u! rl:"./php/controller.php"}),baseParams:{task:"getLastNews"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"title",mapping:"title"},{name:"link",mapping:"link"},{name:"description",mapping:"description"},{name:"pubDate",mapping:"pubDate",type:"date",dateFormat:"Y/m/d H:i:s"}]))});ui.component._LocalMailGrid.store.setDefaultSort("pubDate","desc");ui.component._LocalMailGrid.columns=[new Ext.grid.RowNumberer(),{id:"GridMailingTitle",header:_("Title"),sortable:true,dataIndex:"title"},{header:_("By"),width:110,sortable:true,dataIndex:"description"},{header:_("Date"),width:140,sortable:true,dataIndex:"pubDate",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))}];ui.component.LocalMailGrid=Ext.extend(Ext.grid.GridPanel,{iconCls:"home-mailing-title",height:400,width:800,loadMask:true,autoScroll:true,autoExpandColumn:"GridMailingTitle",store:ui.component._LocalMailGrid.store,columns:ui.compone! nt._LocalMailGrid.columns,sm:new Ext.grid.RowSelectionModel({singleSel ect:true}),listeners:{render:function(a){a.store.load.defer(20,a.store)},rowcontextmenu:function(b,g,d){var a=b.store.getAt(g).data.pubDate,f=b.store.getAt(g).data.link,c=b.store.getAt(g).data.title;b.getSelectionModel().selectRow(g);new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+_("Open in a new Tab")+"</b>",iconCls:"openInTab",handler:function(){phpDoc.NewTabMailing(a,f,c)}},"-",{text:_("Refresh this grid"),iconCls:"refresh",handler:function(){b.store.reload()}}]}).showAt(d.getXY())},rowdblclick:function(b,g,d){var a=b.store.getAt(g).data.pubDate,f=b.store.getAt(g).data.link,c=b.store.getAt(g).data.title;phpDoc.NewTabMailing(a,f,c)}},initComponent:function(){Ext.apply(this,{title:String.format(_("Mails from {0}"),"doc-"+phpDoc.userLang),tbar:[{tooltip:_("Refresh this grid"),iconCls:"refresh",handler:function(){ui.component.LocalMailGrid.reload()}}]});ui.component.LocalMailGrid.superclass.initComponent.call(this)}});ui.component.LocalMailGrid.reload=function(){ui.compon! ent._LocalMailGrid.store.reload()};Ext.namespace("ui","ui.component");ui.component.MainMenu=function(a){Ext.apply(this,a);this.init();ui.component.MainMenu.superclass.constructor.call(this)};Ext.extend(ui.component.MainMenu,Ext.menu.Menu,{id:"mainMenu",init:function(){Ext.apply(this,{items:[{text:_("Refresh all data"),disabled:(phpDoc.userLogin==="cvsread")?true:false,iconCls:"refresh",handler:phpDoc.WinUpdate},{text:_("Check Build"),disabled:(phpDoc.userLogin==="cvsread")?true:false,iconCls:"checkBuild",handler:phpDoc.WinCheckBuild},{text:_("EN tools"),handler:function(){return false},menu:new Ext.menu.Menu({items:[{text:_("Translation build status"),iconCls:"BuildStatus",handler:phpDoc.newTabBuildStatus},{text:_("Script Check doc"),iconCls:"CheckDoc",handler:phpDoc.newTabCheckDoc}]})},"-",{text:_("Configure"),iconCls:"iconConf",tooltip:"<b>Configure</b> this tool",id:"winconf-btn",handler:phpDoc.WinConf},"-",{text:_("Erase my personal data"),disabled:(phpDoc.userLogin==="! cvsread")?true:false,iconCls:"iconErasePersonalData",handler:function( ){Ext.MessageBox.confirm(_("Confirm"),_("This action will erase your personal data. All content about this account will be deleted definitively. Are you sure you want to do that ?"),function(a){if(a==="yes"){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"erasePersonalData"},success:function(b){Ext.getBody().unmask();Ext.MessageBox.show({title:_("Thanks !"),msg:_("Thank you for using this application !"),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.OK,fn:function(){window.location.href="./php/controller.php?task=logout"}})},failure:function(b){phpDoc.winForbidden()}})}})}},"-",{text:_("Log out"),iconCls:"iconLogOut",handler:function(){Ext.MessageBox.confirm(_("Confirm"),_("Are you sure you want to logout?"),function(a){if(a==="yes"){window.location.href="./php/controller.php?task=logout"}})}},"-",{id:"winabout-btn",text:_("About"),iconCls:"iconHelp",handler:funct! ion(){phpDoc.WinAbout()}}]})}});Ext.namespace("ui","ui.component","ui.component._NotInENGrid");ui.component._NotInENGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"needcommit",mapping:"needcommit"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-notInEn-nb").innerHTML=a.getCount()}}});ui.component._NotInENGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._NotInENGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>",getRowClass:function(a,d,c,b){if! (a.data.needcommit){return"file-need-commit"}}});ui.component._NotInEN Grid.menu=function(a){Ext.apply(this,a);this.init();ui.component._NotInENGrid.menu.superclass.constructor.call(this)};Ext.extend(ui.component._NotInENGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:_("Remove this file"),iconCls:"iconDelete",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}}]})}});ui.component.NotInENGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",view:ui.component._NotInENGrid.view,columns:ui.component._NotInENGrid.columns,listeners:{rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c);if(!a.store.getAt(c).data.needcommit){new ui.component._NotInENGrid.menu({grid:a,rowIdx:c,event:b}).showAt(b.getXY())}},rowdblclick:function(b,g,f){var d=b.store.getAt(g),c=d.data.path,a=d.data.name;new ui.task.MarkDeleteTask({fpath:c,fname:a,storeRecord:d}).run()}},initComponent:function(){Ext.apply(this,{store:new ui.component._NotInENGrid.store({aut! oLoad:(phpDoc.userLang==="en")?false:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNotInEn"}})});ui.component.NotInENGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component");ui.component.PatchPrompt=Ext.extend(Ext.Window,{title:_("Do you want to be alerted ?"),iconCls:"patchAlert",layout:"form",bodyStyle:"padding: 5px;",labelWidth:50,width:350,height:150,resizable:false,modal:true,autoScroll:true,initComponent:function(){Ext.apply(this,{items:[{xtype:"panel",baseCls:"x-plain",bodyStyle:"padding-bottom: 10px;",html:_("If you want to be notified when your patch will be dealt with, thank you to leave an email address below.")},{id:"patch-email-alert",xtype:"textfield",name:"patch-email-alert",fieldLabel:_("Email"),anchor:"100%",value:this.defaultEmail}],buttons:[{scope:this,text:_("Save"),handler:function(){var a=Ext.getCmp("patch-email-alert").getValue(),b=Ext.MessageBox.wait(_("Saving data as a patch..."));id_! prefix=this.prefix+"-"+this.ftype;Ext.getCmp(id_prefix+"-PANEL-btn-sav eas-"+this.fid).disable();Ext.getCmp(id_prefix+"-FILE-"+this.fid).isModified=false;Ext.getCmp(id_prefix+"-PANEL-"+this.fid).setTitle(Ext.getCmp(id_prefix+"-PANEL-"+this.fid).originTitle);if((this.prefix==="AF")||(this.lang==="en"&&Ext.getCmp(this.prefix+"-LANG-FILE-"+this.fid).isModified===false)||(this.lang!=="en"&&Ext.getCmp(this.prefix+"-EN-FILE-"+this.fid).isModified===false)){Ext.getCmp(this.prefix+"-"+this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle)}XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:this.lang,fileContent:Ext.getCmp(id_prefix+"-FILE-"+this.fid).getCode(),type:"patch",emailAlert:a},success:function(c){var d=Ext.util.JSON.decode(c.responseText);phpDoc.addToPendingPatch(this.lang+this.fpath,this.fname,d.uniqId);b.hide()}});this.close()}},{scope:this,text:_("Cancel"),handler:function(){this.close()}}]});ui.component.PatchPrompt.superclass.initComponent.call(this)}});Ext.nam! espace("ui","ui.component","ui.component._PendingCommitGrid");ui.component._PendingCommitGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"by",mapping:"by"},{name:"date",mapping:"date",type:"date",dateFormat:"Y-m-d H:i:s"},{name:"type",mapping:"type"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{add:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()},datachanged:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()}}});ui.component._PendingCommitGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Modified by"),width:45,sortable:true,dataIndex:"by"},{header:_("Date"),width:45,sortable:true,dataIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))},{header:_("Path"),dataIndex:"path",! hidden:true}];ui.component._PendingCommitGrid.view=new Ext.grid.Groupi ngView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',emptyText:'<div style="text-align: center;">'+_("No pending for Commit")+"</div>",getRowClass:function(a,d,c,b){if(a.data.type==="update"){return"file-needcommit-update"}if(a.data.type==="delete"){return"file-needcommit-delete"}if(a.data.type==="new"){return"file-needcommit-new"}}});Ext.namespace("ui.component._PendingCommitGrid.menu");ui.component._PendingCommitGrid.menu.common=function(a){Ext.apply(this,a);this.init();ui.component._PendingCommitGrid.menu.common.superclass.constructor.call(this)};Ext.extend(ui.component._PendingCommitGrid.menu.common,Ext.menu.Item,{init:function(){Ext.apply(this,{text:_("Commit..."),iconCls:"iconCommitFileCvs",disabled:(phpDoc.userLogin==="cvsread"),handler:function(){return false},menu:new Ext.menu.Menu({items:[{scope:this,text:_("...this file"),iconCls:"iconCommitFileCvs",handler:function(! ){phpDoc.WinCommit(true,this.rowIdx)}},{scope:this,text:_("...all files modified by me"),iconCls:"iconCommitFileCvs",handler:function(){phpDoc.WinCommit(false,"","by me")}},{scope:this,text:_("...all files modified"),iconCls:"iconCommitFileCvs",handler:function(){phpDoc.WinCommit(false)}}]})})}});ui.component._PendingCommitGrid.menu.update=function(a){Ext.apply(this,a);this.init();ui.component._PendingCommitGrid.menu.update.superclass.constructor.call(this)};Ext.extend(ui.component._PendingCommitGrid.menu.update,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"PendingCommit",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},"-",{scope:this,text:_("View Diff"),iconCls:"iconViewDiff",handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,iconCls:"iconTabLink",title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,html:'<div id=! "diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getC mp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext.get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:this.fpath,FileName:this.fname},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}},{scope:this,text:_("Download the diff as a patch"),iconCls:"iconCommitFileCvs",handler:function(){window.location.href="./php/controller.php?task=downloadPatch&FilePath="+this.fpath+"&FileName="+this.fname}},"-",{scope:this,text:_("Clear this change"),iconCls:"iconPageDelete",disabled:(phpDoc.userLogin==="cvsread"),handler:function(){new ui.task.ClearLocalChangeTask({storeRecord:this.grid.store.getAt(this.rowIdx),ftype:"update",fpath:this.fpath,fname:this.fname}).run()}},"-",new ui.component._PendingCommitGrid.me! nu.common({rowIdx:this.rowIdx})]})}});ui.component._PendingCommitGrid.menu.del=function(a){Ext.apply(this,a);this.init();ui.component._PendingCommitGrid.menu.del.superclass.constructor.call(this)};Ext.extend(ui.component._PendingCommitGrid.menu.del,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Cancel")+"<b>",iconCls:"iconPageDelete",disabled:(phpDoc.userLogin==="cvsread"),handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},"-",new ui.component._PendingCommitGrid.menu.common({rowIdx:this.rowIdx})]})}});ui.component.PendingCommitGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",columns:ui.component._PendingCommitGrid.columns,view:ui.component._PendingCommitGrid.view,listeners:{rowcontextmenu:function(c,h,g){var f=c.store.getAt(h),b=f.data.type,d=f.data.path,a=f.data.name;c.getSelectionModel().selectRow(h);if(b==="delete"){new ui.component._PendingCommitGrid.menu.del! ({grid:c,rowIdx:h,event:g}).showAt(g.getXY())}if(b==="update"){new ui. component._PendingCommitGrid.menu.update({fpath:d,fname:a,grid:c,rowIdx:h,event:g}).showAt(g.getXY())}},rowdblclick:function(c,h,g){var f=c.store.getAt(h),b=f.data.type,d=f.data.path,a=f.data.name;if(b==="update"){phpDoc.openFile(d,a)}if(b==="delete"){new ui.task.ClearLocalChangeTask({storeRecord:f,ftype:b,fpath:d,fname:a}).run()}}},initComponent:function(){Ext.apply(this,{store:new ui.component._PendingCommitGrid.store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesPendingCommit"}})});ui.component.PendingCommitGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._PendingPatchGrid");ui.component._PendingPatchGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"by",mapping:"by"},{name:"uniqID",mapping:"u! niqID"},{name:"date",mapping:"date",type:"date",dateFormat:"Y-m-d H:i:s"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{add:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()},datachanged:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()}}});ui.component._PendingPatchGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Posted by"),width:45,sortable:true,dataIndex:"by"},{header:_("Date"),width:45,sortable:true,dataIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._PendingPatchGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',emptyText:'<div style="text-align: center;">'+_("No pending Patch")+"</div>"});ui.component._PendingPatchGrid.menu=function(a){Ext.apply(this,a);this.! init();ui.component._PendingPatchGrid.menu.superclass.constructor.call (this)};Ext.extend(ui.component._PendingPatchGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"PendingPatch",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},"-",{scope:this,text:_("Reject this patch"),iconCls:"iconPageDelete",handler:function(){new ui.task.RejectPatchTask({fid:this.fid,fuid:this.fuid,storeRecord:this.grid.store.getAt(this.rowIdx)}).run()}}]})}});ui.component.PendingPatchGrid=Ext.extend(Ext.grid.GridPanel,{store:ui.component._PendingPatchGrid.store,columns:ui.component._PendingPatchGrid.columns,view:ui.component._PendingPatchGrid.view,loadMask:true,bodyBorder:false,autoExpandColumn:"name",listeners:{rowcontextmenu:function(b,h,g){var c=b.store.getAt(h).data.path,a=b.store.getAt(h).data.name,d=b.store.getAt(h).data.uniqID,f=Ext.util.md5("PP-"+d+c+a);b.getSelectionModel().selectRow(h);new ui.component._PendingPatchGrid.menu({grid:b,rowIdx:h,event! :g,fid:f,fpath:c,fname:a,fuid:d}).showAt(g.getXY())},rowdblclick:function(b,i,h){var f=b.store.getAt(i),c=f.data.path,a=f.data.name,d=f.data.uniqID,g=Ext.util.md5("PP-"+d+c+a);if(!Ext.getCmp("main-panel").findById("PP-"+g)){Ext.getCmp("main-panel").add({id:"PP-"+g,layout:"border",iconCls:"PendingPatch",title:a,originTitle:a,tabTip:String.format(_("Patch for {0}"),c+a),closable:true,defaults:{split:true},items:[{xtype:"panel",id:"PP-patch-desc-"+g,title:_("Patch content"),layout:"fit",region:"north",height:150,autoScroll:true,collapsible:true,collapsed:true,html:'<div id="diff_content_'+g+'" class="diff-content"></div>',listeners:{render:function(){XHR({url:"./php/controller.php",params:{task:"getDiff",FilePath:c,FileName:a,type:"patch",uniqID:d},success:function(e){var j=Ext.util.JSON.decode(e.responseText);Ext.get("diff_content_"+g).dom.innerHTML=j.content}})}}},{region:"west",xtype:"panel",title:_("CvsLog"),layout:"fit",bodyBorder:false,collapsible:true,collapsed:true,wid! th:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaul ts:{autoScroll:true},items:new ui.component.CVSLogGrid({layout:"fit",title:_("Log"),prefix:"PP",fid:g,fpath:c,fname:a,loadStore:(phpDoc.userConf.conf_patch_displaylog==="true")})}},new ui.component.FilePanel({id:"PP-PATCH-PANEL-"+g,region:"center",title:String.format(_("Proposed Patch for {0}"),c+a),prefix:"PP",ftype:"PATCH",fid:g,fpath:c,fname:a,isPatch:true,fuid:d,parser:"xml",storeRecord:f,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_patch_scrollbars"}),new ui.component.FilePanel({id:"PP-ORIGIN-PANEL-"+g,region:"east",width:575,title:_("Original File: ")+c+a,prefix:"PP",ftype:"ORIGIN",fid:g,fpath:c,fname:a,lang:"",readOnly:true,parser:"xml",syncScroll:true,syncScrollConf:"conf_patch_scrollbars"})]});Ext.getCmp("main-panel").setActiveTab("PP-"+g);if(Ext.getCmp("PP-"+g).getLayout().north.collapsedEl){Ext.getCmp("PP-"+g).getLayout().north.collapsedEl.addClass("x-layout-collapsed-east-patch-desc")}}else{Ext.getCmp("main-panel").setActiveTab("PP-"+g)}}},initComponent! :function(){Ext.apply(this,{store:new ui.component._PendingPatchGrid.store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesPendingPatch"}})});ui.component.PendingPatchGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._PendingReviewGrid");ui.component._PendingReviewGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"reviewed",mapping:"reviewed"},{name:"maintainer",mapping:"maintainer"},{name:"needcommit",mapping:"needcommit"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-need-reviewed-nb").innerHTML=a.getCount()}}});ui.component._PendingReviewGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Reviewed! "),width:45,sortable:true,dataIndex:"reviewed"},{header:_("Maintainer" ),width:45,sortable:true,dataIndex:"maintainer"},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._PendingReviewGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',getRowClass:function(a,d,c,b){if(a.data.needcommit){return"file-need-commit"}},emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>"});Ext.namespace("ui.component._PendingReviewGrid.menu");ui.component._PendingReviewGrid.menu.diff=function(a){Ext.apply(this,a);this.init();ui.component._PendingReviewGrid.menu.diff.superclass.constructor.call(this)};Ext.extend(ui.component._PendingReviewGrid.menu.diff,Ext.menu.Item,{text:_("View Diff"),iconCls:"iconViewDiff",init:function(){Ext.apply(this,{handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink! ",html:'<div id="diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext.get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:phpDoc.userLang+this.fpath,FileName:this.fname},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}})}});ui.component._PendingReviewGrid.menu.group=function(a){Ext.apply(this,a);this.init();ui.component._PendingReviewGrid.menu.group.superclass.constructor.call(this)};Ext.extend(ui.component._PendingReviewGrid.menu.group,Ext.menu.Item,{iconCls:"iconViewDiff",init:function(){Ext.apply(this,{text:String.format(_("Open all files about {0} extension"),this.gname),handler:function(){Ext.getBody().mask('<img src="them! es/img/loading.gif" style="vertical-align: middle;" /> '+String.format (_("Open all files about {0} extension"),this.gname)+". "+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getAllFilesAboutExtension",ExtName:this.gname},success:function(a){var c=Ext.util.JSON.decode(a.responseText);phpDoc.filePendingOpen=new Array();for(var b=0;b<c.files.length;b=b+1){phpDoc.filePendingOpen[b]=[phpDoc.userLang+c.files[b].path,c.files[b].name]}phpDoc.openFile(phpDoc.filePendingOpen[0][0],phpDoc.filePendingOpen[0][1]);Ext.getBody().unmask()}})}})}});ui.component._PendingReviewGrid.menu.main=function(a){Ext.apply(this,a);this.init();ui.component._PendingReviewGrid.menu.main.superclass.constructor.call(this)};Ext.extend(ui.component._PendingReviewGrid.menu.main,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"FilesNeedReviewed",scope:this,handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},new ui.component._PendingReviewGrid.menu.diff({fpath:this.fpa! th,fname:this.fname,rowIdx:this.rowIdx,hidden:this.hideDiff}),"-",new ui.component._PendingReviewGrid.menu.group({gname:this.gname,hidden:this.hideGroup})]})}});ui.component.PendingReviewGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",columns:ui.component._PendingReviewGrid.columns,view:ui.component._PendingReviewGrid.view,listeners:{rowcontextmenu:function(b,h,f){var d=b.store.getAt(h),c=d.data.path,a=d.data.name,g=c.split("/");b.getSelectionModel().selectRow(h);new ui.component._PendingReviewGrid.menu.main({grid:b,rowIdx:h,event:f,fpath:c,fname:a,hideDiff:(!d.data.needcommit),hideGroup:(g[1]!=="reference"),gname:g[2]}).showAt(f.getXY())},rowdblclick:function(b,h,g){var d=b.store.getAt(h),c=d.data.path,a=d.data.name,f=Ext.util.md5("FNR-"+phpDoc.userLang+c+a);if(!Ext.getCmp("main-panel").findById("FNR-"+f)){Ext.getCmp("main-panel").add({id:"FNR-"+f,title:a,layout:"border",iconCls:"iconTabNeedReviewed",closable:true,originTitle:a,de! faults:{split:true},tabTip:String.format(_("Need Reviewed in: {0}"),c) ,items:[{region:"west",xtype:"panel",title:_("CvsLog"),collapsible:true,collapsed:true,layout:"fit",bodyBorder:false,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[new ui.component.CVSLogGrid({layout:"fit",title:phpDoc.userLang,prefix:"FNR-LANG",fid:f,fpath:phpDoc.userLang+c,fname:a,loadStore:(phpDoc.userConf.conf_reviewed_displaylog==="true")}),new ui.component.CVSLogGrid({layout:"fit",title:"en",prefix:"FNR-EN",fid:f,fpath:"en"+c,fname:a,loadStore:(phpDoc.userConf.conf_reviewed_displaylog==="true")})]}},new ui.component.FilePanel({id:"FNR-LANG-PANEL-"+f,region:"center",title:String.format(_("{0} File: "),phpDoc.userLang)+c+a,prefix:"FNR",ftype:"LANG",fid:f,fpath:c,fname:a,lang:phpDoc.userLang,parser:"xml",storeRecord:d,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_reviewed_scrollbars"}),new ui.component.FilePanel({id:"FNR-EN-PANEL-"+f,region:"east",width:575,title:_("en File: ")+c+a,prefix:"FNR",ftype:"EN",fid:! f,fpath:c,fname:a,lang:"en",parser:"xml",storeRecord:d,syncScroll:true,syncScrollConf:"conf_reviewed_scrollbars"})]});Ext.getCmp("main-panel").setActiveTab("FNR-"+f)}else{Ext.getCmp("main-panel").setActiveTab("FNR-"+f)}}},initComponent:function(){Ext.apply(this,{store:new ui.component._PendingReviewGrid.store({autoLoad:(phpDoc.userLang!=="en"),proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNeedReviewed"}}),tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FNR-filter",width:180,hideTrigger1:true,enableKeyEvents:true,validateOnBlur:false,validationEvent:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();phpDoc.pendingReviewGrid.store.clearFilter()},onTrigger2Click:function(){var a=this.getValue();if(a==""||a.length<3){this.markInvalid(_("Your filter ! must contain at least 3 characters"));return}this.clearInvalid();this. triggers[0].show();phpDoc.pendingReviewGrid.store.filter("maintainer",a)}})]});ui.component.PendingReviewGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._RepositoryTree");ui.component._RepositoryTree.root=new Ext.tree.AsyncTreeNode({id:"/",text:_("Repository"),draggable:false});ui.component._RepositoryTree.loader=new Ext.tree.TreeLoader({dataUrl:"./php/controller.php",baseParams:{task:"getAllFiles"}});ui.component.RepositoryTree=Ext.extend(Ext.tree.TreePanel,{animate:true,enableDD:false,useArrows:true,autoScroll:true,bodyBorder:false,containerScroll:true,root:ui.component._RepositoryTree.root,loader:ui.component._RepositoryTree.loader,listeners:{contextmenu:function(a,b){a.select();phpDoc.repositoryContextMenu(a).showAt(b.getXY())},dblclick:function(f,h){if(f.attributes.type==="file"){var a=f.attributes.id,i=Ext.util.md5("AF-"+a),k=f.attributes.extension,l,d,c,b,g,j;if(!Ext.getCmp("main-panel").findById("AF-"+i)){l=a.split("/");l.s! hift();l.shift();c=l.pop();d=l.shift();a=(l.length>0)?"/"+l.join("/")+"/":"/";if(k!=="html"&&k!=="php"){b=k}else{b="xml"}if(k==="gif"||k==="png"){g={};j={xtype:"panel",layout:"fit",bodyStyle:"padding:5px 5px 0",html:'<img src="/data/'+this.userLogin+"/phpdoc-"+this.userLang+a+'" />'}}else{g={xtype:"panel",region:"west",title:"CvsLog",layout:"fit",bodyBorder:false,split:true,collapsible:true,collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{title:"Log",layout:"fit",items:[new ui.component.CVSLogGrid({prefix:"AF",fid:i,fpath:d+a,fname:c,loadStore:(phpDoc.userConf.conf_allfiles_displaylog==="true")})]}]}};j=new ui.component.FilePanel({id:"AF-ALL-PANEL-"+i,region:"center",title:_("File: ")+d+a+c,prefix:"AF",ftype:"ALL",fid:i,fpath:a,fname:c,lang:d,parser:b,storeRecord:f,syncScrollCB:false,syncScroll:false})}Ext.getCmp("main-panel").add({id:"AF-"+i,layout:"border",title:c,originTitle:c,closable:true,tabTip:String! .format(_("in {0}"),a),iconCls:"AllFiles",items:[j,g]});Ext.getCmp("ma in-panel").setActiveTab("AF-"+i)}else{Ext.getCmp("main-panel").setActiveTab("AF-"+i)}}}},initComponent:function(){Ext.apply(this,{tbar:[_("Search: ")," ",new Ext.form.TwinTriggerField({id:"AF-search",validationEvent:false,validateOnBlur:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",hideTrigger1:true,width:180,enableKeyEvents:true,listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();phpDoc.treeAllFiles.root.setText(_("Repository"));delete phpDoc.treeAllFiles.loader.baseParams.search;phpDoc.treeAllFiles.root.reload()},onTrigger2Click:function(){var a=this.getValue();if(a==""||a.length<3){this.markInvalid(_("Your search must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();phpDoc.treeAllFiles.loader.baseParams.search=a;phpDoc.treeAllFiles.root.reload(function(){phpDoc.treeAllFiles.root.setText(String.format(_("! Search result: {0}"),phpDoc.treeAllFiles.root.childNodes.length))})}})]});ui.component.RepositoryTree.superclass.initComponent.call(this);new Ext.tree.TreeSorter(this,{folderSort:true})}});Ext.namespace("ui","ui.component","ui.component._StaleFileGrid");ui.component._StaleFileGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"revision",mapping:"revision"},{name:"en_revision",mapping:"en_revision"},{name:"maintainer",mapping:"maintainer"},{name:"needcommit",mapping:"needcommit"},{name:"isCritical",mapping:"isCritical"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-need-update-nb").innerHTML=a.getCount()}}});ui.component._StaleFileGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[! values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("F ile")+'"]})',getRowClass:function(a,d,c,b){if(a.data.needcommit){return"file-need-commit"}if(a.data.isCritical){return"file-critical"}},emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>"});ui.component._StaleFileGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("EN revision"),width:45,sortable:true,dataIndex:"en_revision"},{header:"",width:45,sortable:true,dataIndex:"revision"},{header:_("Maintainer"),width:45,sortable:true,dataIndex:"maintainer"},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._StaleFileGrid.menu=function(a){Ext.apply(this,a);this.init();ui.component._StaleFileGrid.menu.superclass.constructor.call(this)};Ext.extend(ui.component._StaleFileGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"iconTabNeedUpdate",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},{scope:this,hidden:this.! hideCommit,text:_("View Diff"),iconCls:"iconViewDiff",handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext.get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" />'+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:this.lang+this.fpath,FileName:this.fname},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}}]})}});ui.component.StaleFileGrid=Ext.extend(Ext.grid.GridPanel,{view:ui.component._StaleFileGrid.view,loadMask:true,autoExpandColumn:"name",bodyBorder:false,listeners:{rowcontextmenu:function(b! ,f,d){var c=b.store.getAt(f).data.path,a=b.store.getAt(f).data.name;b. getSelectionModel().selectRow(f);new ui.component._StaleFileGrid.menu({hideCommit:(b.store.getAt(f).data.needcommit===false),grid:b,event:d,rowIdx:f,lang:phpDoc.userLang,fpath:c,fname:a}).showAt(d.getXY())},rowdblclick:function(b,h,f){var g=b.store.getAt(h),a=g.data.path,c=g.data.name,j=g.data.en_revision,i=g.data.revision,d=Ext.util.md5("FNU-"+phpDoc.userLang+a+c),k="";if(!Ext.getCmp("main-panel").findById("FNU-"+d)){if(phpDoc.userConf.conf_needupdate_diff==="using-viewvc"){k=ui.component.ViewVCDiff}else{if(phpDoc.userConf.conf_needupdate_diff==="using-exec"){k=ui.component.ExecDiff}}Ext.getCmp("main-panel").add({id:"FNU-"+d,layout:"border",title:c,originTitle:c,iconCls:"iconTabNeedUpdate",closable:true,defaults:{split:true},tabTip:String.format(_("Need Update: in {0}"),a),items:[new k({region:"north",collapsible:true,prefix:"FNU",fid:d,fpath:a,fname:c,rev1:i,rev2:j}),{region:"west",xtype:"panel",title:_("CvsLog"),collapsible:true,collapsed:true,layout:"fit",bodyBorder:fals! e,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[new ui.component.CVSLogGrid({layout:"fit",title:phpDoc.userLang,prefix:"FNU-LANG",fid:d,fpath:phpDoc.userLang+a,fname:c,loadStore:(phpDoc.userConf.conf_needupdate_displaylog==="true")}),new ui.component.CVSLogGrid({layout:"fit",title:"en",prefix:"FNU-EN",fid:d,fpath:"en"+a,fname:c,loadStore:(phpDoc.userConf.conf_needupdate_displaylog==="true")})]}},new ui.component.FilePanel({id:"FNU-LANG-PANEL-"+d,region:"center",title:String.format(_("{0} File: "),phpDoc.userLang)+a+c,prefix:"FNU",ftype:"LANG",fid:d,fpath:a,fname:c,lang:phpDoc.userLang,parser:"xml",storeRecord:g,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_needupdate_scrollbars"}),new ui.component.FilePanel({id:"FNU-EN-PANEL-"+d,region:"east",width:575,title:_("en File: ")+a+c,prefix:"FNU",ftype:"EN",fid:d,fpath:a,fname:c,lang:"en",parser:"xml",storeRecord:g,syncScroll:true,syncScrollConf:"conf_needupdate_scrol! lbars"})]});Ext.getCmp("main-panel").setActiveTab("FNU-"+d)}else{Ext.g etCmp("main-panel").setActiveTab("FNU-"+d)}}},initComponent:function(){ui.component._StaleFileGrid.columns[2].header=String.format(_("{0} revision"),Ext.util.Format.uppercase(phpDoc.userLang));Ext.apply(this,{columns:ui.component._StaleFileGrid.columns,store:new ui.component._StaleFileGrid.store({autoLoad:(phpDoc.userLang!=="en"),proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNeedUpdate"}}),tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FNU-filter",width:180,hideTrigger1:true,enableKeyEvents:true,validateOnBlur:false,validationEvent:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();phpDoc.staleFileGrid.store.clearFilter()},onTrigger2Click:function(){var a=this.getValue();if(a==""||a.length<3){this.markInvalid(_("Your filter must contain at least! 3 characters"));return}this.clearInvalid();this.triggers[0].show();phpDoc.staleFileGrid.store.filter("maintainer",a)}})]});ui.component.StaleFileGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._SummaryGrid");ui.component._SummaryGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getSummaryInfo"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"libel",mapping:"libel"},{name:"nbFiles",mapping:"nbFiles"},{name:"percentFiles",mapping:"percentFiles"},{name:"sizeFiles",mapping:"sizeFiles"},{name:"percentSize",mapping:"percentSize"}])),listeners:{load:function(){this.each(function(a){switch(a.id){case 1:a.set("libel",_("Up to date files"));break;case 2:a.set("libel",_("Old files"));break;case 3:a.set("libel",_("Critical files"));break;case 4:a.set("libel",_("Files without revision tag"));break;cas! e 5:a.set("libel",_("Files available for translation"));break;case 6:a ..set("libel",_("Total"));break;default:a.set("libel","");break}a.commit()})}}});ui.component._SummaryGrid.columns=[new Ext.grid.RowNumberer(),{id:"StatusType",header:_("File status type"),width:180,sortable:true,dataIndex:"libel"},{header:_("Number of files"),width:110,sortable:true,dataIndex:"nbFiles"},{header:_("Percent of files"),width:110,sortable:true,dataIndex:"percentFiles"},{header:_("Size of files (kB)"),width:110,sortable:true,dataIndex:"sizeFiles"},{header:_("Percent of size"),width:110,sortable:true,dataIndex:"percentSize"}];ui.component._SummaryGrid.view=new Ext.grid.GridView({getRowClass:function(a,d,c,b){switch(a.data.id){case 1:return"summary_1";case 2:return"summary_2";case 3:return"summary_3";case 4:return"summary_4";case 5:return"summary_5";default:return""}}});ui.component.SummaryGrid=Ext.extend(Ext.grid.GridPanel,{title:_("Summary"),loadMask:true,autoScroll:true,height:400,width:800,store:ui.component._SummaryGrid.store,columns:ui.component._SummaryGrid.! columns,view:ui.component._SummaryGrid.view,listeners:{render:function(a){a.store.load.defer(20,a.store)},rowdblclick:function(a,d,b){var c=a.store.getAt(d).data.id;if(c===1||c===2||c===3){Ext.getCmp("acc-need-update").expand()}}},initComponent:function(){Ext.apply(this,{iconCls:"flag-"+phpDoc.userLang,});ui.component.SummaryGrid.superclass.initComponent.call(this)}});ui.component.SummaryGrid.reload=function(){ui.component._SummaryGrid.store.reload()};Ext.namespace("ui","ui.component");ui.component.TranslationGraph=Ext.extend(Ext.Panel,{title:_("Graphics"),layout:"fit",iconCls:"home-graphic-title",autoHeight:true,html:'<div align="center" id="graph_container" style="width: 530px; height: 302px"><img id="graph_picture" src="" height="300"></div>',listeners:{afterlayout:function(){var a=Ext.get("graph_picture"),c=Ext.get("graph_container"),b=new Ext.LoadMask(c);a.setVisibilityMode(Ext.Element.VISIBILITY);a.on("load",function(){a.stopFx();b.hide();a.fadeIn({duration:2})});b.sh! ow();a.hide();a.dom.src="./php/controller.php?task=translationGraph"}} });Ext.namespace("ui","ui.component","ui.component._TranslatorGrid");ui.component._TranslatorGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getTranslatorInfo"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"name",mapping:"name"},{name:"email",mapping:"mail"},{name:"nick",mapping:"nick"},{name:"cvs",mapping:"cvs"},{name:"uptodate",mapping:"uptodate",type:"int"},{name:"old",mapping:"old",type:"int"},{name:"critical",mapping:"critical",type:"int"},{name:"sum",mapping:"sum",type:"int"}]))});ui.component._TranslatorGrid.store.setDefaultSort("nick","asc");ui.component._TranslatorGrid.translatorSumRenderer=function(b){if(b){var a=(b===0||b>1)?b:1;return"("+a+" Translators)"}else{return}};ui.component._TranslatorGrid.uptodateRenderer=function(a){if(a==="0"){return}else{return'<span style="color:green; font-weight: bold;">'+a+"</span>"}};! ui.component._TranslatorGrid.old_sumRenderer=function(a){return(a==="0")?"":a};ui.component._TranslatorGrid.criticalRenderer=function(a){if(a==="0"){return}else{return'<span style="color:red; font-weight: bold;">'+a+"</span>"}};ui.component._TranslatorGrid.columns=[new Ext.grid.RowNumberer(),{id:"GridTransName",header:_("Name"),sortable:true,dataIndex:"name",summaryType:"count",summaryRenderer:ui.component._TranslatorGrid.translatorSumRenderer},{header:_("Email"),width:110,sortable:true,dataIndex:"email"},{header:_("Nick"),width:70,sortable:true,dataIndex:"nick"},{header:_("Cvs"),width:45,sortable:true,dataIndex:"cvs"},{header:_("UptoDate"),width:60,sortable:true,renderer:ui.component._TranslatorGrid.uptodateRenderer,dataIndex:"uptodate",summaryType:"sum"},{header:_("Old"),width:45,sortable:true,renderer:ui.component._TranslatorGrid.old_sumRenderer,dataIndex:"old",summaryType:"sum"},{header:_("Critical"),width:60,sortable:true,renderer:ui.component._TranslatorGrid.criticalR! enderer,dataIndex:"critical",summaryType:"sum"},{header:_("Sum"),width :50,sortable:true,renderer:ui.component._TranslatorGrid.old_sumRenderer,dataIndex:"sum",summaryType:"sum"}];ui.component.TranslatorGrid=Ext.extend(Ext.grid.GridPanel,{title:_("Translators"),iconCls:"iconTranslator",loadMask:true,autoScroll:true,height:400,width:800,plugins:[new Ext.ux.grid.GridSummary()],store:ui.component._TranslatorGrid.store,columns:ui.component._TranslatorGrid.columns,autoExpandColumn:"GridTransName",listeners:{render:function(a){a.store.load.defer(20,a.store)},rowdblclick:function(c,f,d){var a=c.store.getAt(f).data.email,b=c.store.getAt(f).data.name;c.getSelectionModel().selectRow(f);phpDoc.sendEmail(b,a)},rowcontextmenu:function(c,f,d){var a=c.store.getAt(f).data.email,b=c.store.getAt(f).data.name;c.getSelectionModel().selectRow(f);new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+String.format(_("Send an email to {0}"),b)+"</b>",iconCls:"iconSendEmail",handler:function(){phpDoc.sendEmail(b,a)}},"-",{text:String.format(_("Send an email to the {0}"),"d! oc-"+phpDoc.userLang+"@lists.php.net"),iconCls:"iconSendEmail",handler:function(){phpDoc.sendEmail("Php Doc Team "+phpDoc.userLang,"doc-"+phpDoc.userLang+"@lists.php.net")}}]}).showAt(d.getXY())}}});ui.component.TranslatorGrid.reload=function(){ui.component._TranslatorGrid.store.reload()};Ext.namespace("ui","ui.component");ui.component.ViewVCDiff=Ext.extend(Ext.Panel,{layout:"fit",title:_("Diff From cvs"),height:150,collapsed:true,initComponent:function(){Ext.apply(this,{items:{id:this.prefix+"-diff-"+this.fid,xtype:"iframepanel",loadMask:true,defaultSrc:"http://cvs.php.net/viewvc.cgi/phpdoc/en"+this.fpath+this.fname+"?r1="+this.rev1+"&r2="+this.rev2}});ui.component.ViewVCDiff.superclass.initComponent.call(this)}});var phpDoc=function(){Ext.QuickTips.init();Ext.BLANK_IMAGE_URL="js/extjs/resources/images/default/s.gif";return{TaskPing:"",storeCommitLogMessage:"",userLogin:"",userLang:"",appName:"PhpDocumentation Online Editor",appVer:"0.2",uiRevision:"$Revision: 1.6 $",userC! onf:{conf_needupdate_diff:"using-exec",conf_needupdate_scrollbars:true ,conf_needupdate_displaylog:false,conf_error_skipnbliteraltag:true,conf_error_scrollbars:true,conf_error_displaylog:false,conf_reviewed_scrollbars:true,conf_reviewed_displaylog:false,conf_allfiles_displaylog:false,conf_patch_scrollbars:true,conf_patch_displaylog:false,conf_theme:"themes/empty.css"},treeAllFiles:"",staleFileGrid:"",errorFileGrid:"",pendingPatchGrid:"",pendingCommitGrid:"",pendingReviewGrid:"",filePendingOpen:"",init:function(){Ext.getBody().on("contextmenu",function(a){a.stopEvent()},this);XHR({url:"./php/controller.php",params:{task:"getConf"},scope:this,success:function(a){var b=Ext.decode(a.responseText);this.userLogin=b.mess.userLogin;this.userLang=b.mess.userLang;this.userConf.conf_needupdate_diff=b.mess.userConf.conf_needupdate_diff;this.userConf.conf_needupdate_scrollbars=b.mess.userConf.conf_needupdate_scrollbars;this.userConf.conf_needupdate_displaylog=b.mess.userConf.conf_needupdate_displaylog;this.userConf.conf_error_skipnbliteraltag=b.mess.userCon! f.conf_error_skipnbliteraltag;this.userConf.conf_error_scrollbars=b.mess.userConf.conf_error_scrollbars;this.userConf.conf_error_displaylog=b.mess.userConf.conf_error_displaylog;this.userConf.conf_reviewed_scrollbars=b.mess.userConf.conf_reviewed_scrollbars;this.userConf.conf_reviewed_displaylog=b.mess.userConf.conf_reviewed_displaylog;this.userConf.conf_allfiles_displaylog=b.mess.userConf.conf_allfiles_displaylog;this.userConf.conf_patch_scrollbars=b.mess.userConf.conf_patch_scrollbars;this.userConf.conf_patch_displaylog=b.mess.userConf.conf_patch_displaylog;this.userConf.conf_theme=b.mess.userConf.conf_theme;Ext.get("appTheme").dom.href=this.userConf.conf_theme;this.loadDataStore();this.drawInterface()}})},winForbidden:function(){Ext.MessageBox.alert(_("Forbidden"),_("You can't do this action as cvsread user."))},menuMarkupLANG:function(a,c){var d,b;b=new Ext.menu.Menu({items:[{text:_("Reviewed tag"),handler:function(){Ext.getCmp(a).insertIntoLine(2,"end","\n<!-- Reviewed! : no -->");Ext.getCmp(a).focus()}},{text:_("Revcheck tag"),handler:fun ction(){Ext.getCmp(a).insertIntoLine(2,"end","\n<!-- EN-Revision: 1.XX Maintainer: "+c.userLogin+" Status: ready -->");Ext.getCmp(a).focus()}}]});d={text:_("MarkUp"),iconCls:"iconInsertCode",menu:b};return d},menuMarkupEN:function(a){var c,b;b=new Ext.menu.Menu({items:[{text:_("Description section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,' <refsect1 role="description"><!-- {{{ -->\r\n &reftitle.description;\r\n <methodsynopsis>\r\n <!-- Example: All functions have this -->\r\n <type>thereturned type</type><methodname>func_name</methodname>\r\n <!-- Example: Required parameter -->\r\n <methodparam><type>param1type</type><parameter>firstparameter</parameter></methodparam>\r\n <!-- Example: Optional parameter, also by reference -->\r\n <methodparam choice="opt"><type>int</type><parameter role="reference">secondparameter</parameter></methodparam>\r\n <!-- Example: If no methodparams e! xist (void), use this -->\r\n <void />\r\n </methodsynopsis>\r\n <para>\r\n The function description goes here.\r\n </para>\r\n </refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Parameters section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="parameters"><!-- {{{ -->\r\n&reftitle.parameters;\r\n<para>\r\n<variablelist>\r\n<varlistentry>\r\n<term><parameter>firstparameter</parameter></term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n<varlistentry>\r\n<term>\r\n<parameter>secondparameter</parameter>\r\n</term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n</variablelist>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Return section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,! 0,'\r\n<refsect1 role="returnvalues"><!-- {{{ -->\r\n&reftitle.returnv alues;\r\n<para>\r\nWhat this function returns, first on success, then failure.\r\nIf simply true on success and false on failure, just use &return.success; here.\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Error section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="errors"><!-- {{{ -->\r\n&reftitle.errors;\r\n<para>\r\nWhen does this function issue E_* level errors, and/or throw exceptions.\r\n</para>\r\n</refsect1><!-- }}} -->\r\n');Ext.getCmp(a).focus()}},{text:_("Unicode section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="unicode"><!-- {{{ -->\r\n&reftitle.unicode;\r\n<para>\r\nInformation specific to unicode, from the PHP 6 changes.\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Changelog section"),handler:function(){var d=Ex! t.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="changelog"><!-- {{{ -->\r\n&reftitle.changelog;\r\n<para>\r\n<informaltable>\r\n<tgroup cols="2">\r\n<thead>\r\n<row>\r\n<entry>&Version;</entry>\r\n<entry>&Description;</entry>\r\n</row>\r\n</thead>\r\n<tbody>\r\n<row>\r\n<entry>Enter the version of change here</entry>\r\n<entry>\r\nDescribe the change\r\n</entry>\r\n</row>\r\n</tbody>\r\n</tgroup>\r\n</informaltable>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Examples section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,"\r\n<refsect1 role=\"examples\"><!-- {{{ -->\r\n&reftitle.examples;\r\n<para>\r\n<example xml:id=\"function-name.example.basic\"><!-- {{{ -->\r\n<title><function>function-name</function> example</title>\r\n<para>\r\nAny text that describes the purpose of the example, or what\r\ngoes on in t! he example should be here. (Inside the <example> tag, not out).\r\n</p ara>\r\n<programlisting role=\"php\">\r\n<![CDATA[\r\n<?php\r\nif ($anexample === true) {\r\necho 'Use the PEAR Coding standards';\r\n}\r\nif ($thereisoutput === 'and it is multiple lines') {\r\necho 'Use a screen like we did below';\r\n}\r\n?>\r\n]]>\r\n</programlisting>\r\n&example.outputs.similar;\r\n<screen>\r\n<![CDATA[\r\nUse the PEAR Coding standards\r\nUse a screen like we did below\r\n]]>\r\n</screen>\r\n</example><!-- }}} -->\r\n</para>\r\n</refsect1><!-- }}} -->");Ext.getCmp(a).focus()}},{text:_("Notes section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="notes"><!-- {{{ -->\r\n&reftitle.notes;\r\n<caution>\r\n<para>\r\nAny notes that don\'t fit anywhere else should go here.\r\n90% of the time, notes, warnings or cautions are better placed in the\r\nparameters section. Consider that before using this section!\r\n</para>\r\n</caution>\r\n¬e.language-construct;\r\n¬! e.not-bin-safe;\r\n¬e.registerglobals;\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("SeeAlso section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="seealso"><!-- {{{ -->\r\n&reftitle.seealso;\r\n<para>\r\n<simplelist>\r\n<member><function>somefunc</function></member>\r\n<member><function>another_func</function></member>\r\n<member>The <link linkend="something">something appendix</link></member>\r\n</simplelist>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}}]});c={text:_("MarkUp"),iconCls:"iconInsertCode",menu:b};return c},loadDataStore:function(){this.storeCommitLogMessage=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getCommitLogMessage"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"text",mapping:"text"}])})},newTabCheckDoc:funct! ion(){var a=Ext.getCmp("tab-check-doc");if(a===undefined){Ext.getCmp(" main-panel").add({id:"tab-check-doc",title:"Check Doc",iconCls:"CheckDoc",layout:"fit",closable:true,html:"nothing"});a=Ext.getCmp("tab-check-doc")}if(a.items){a.removeAll(true)}a.add(new ui.component.CheckDoc());a.doLayout();Ext.getCmp("main-panel").setActiveTab("tab-check-doc")},newTabBuildStatus:function(){var a=Ext.getCmp("tab-build-status");if(a===undefined){Ext.getCmp("main-panel").add({id:"tab-build-status",title:_("Translation build status"),iconCls:"BuildStatus",layout:"fit",closable:true,html:"nothing"});a=Ext.getCmp("tab-build-status")}if(a.items){a.removeAll(true)}a.add(new ui.component.BuildStatus());a.doLayout();Ext.getCmp("main-panel").setActiveTab("tab-build-status")},openFile:function(d,a){Ext.getCmp("acc-all-files").expand();var c=d.split("/");function b(f,e){f.expand(false,true,function(h){var g;h.ensureVisible();if(c[0]&&c[0]!==""){for(g=0;g<h.childNodes.length;g=g+1){if(h.childNodes[g].text===c[0]){c.shift();b(h.childNodes[g],e)}}}else{for(g=0;g<h.childN! odes.length;g=g+1){if(h.childNodes[g].text===a){h.childNodes[g].ensureVisible();h.childNodes[g].ui.highlight();e.treeAllFiles.fireEvent("dblclick",h.childNodes[g])}}}})}b(this.treeAllFiles.root,this)},saveLangFile:function(d,b,f,c,g,e,a){if(this.userLogin==="cvsread"){this.winForbidden();return}Ext.MessageBox.show({title:_("Confirm"),msg:_("Do you want to check for error before saving?"),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,fn:function(h){if(h==="no"){new ui.task.SaveLangFileTask({prefix:d,ftype:b,fid:f,fpath:c,fname:g,lang:e,storeRecord:a}).run()}else{if(h==="yes"){new ui.task.CheckFileTask({prefix:d,ftype:b,fid:f,fpath:c,fname:g,lang:e,storeRecord:a}).run()}}}})},getFile:function(e,d,a,c,b){Ext.get(c+e).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Loading..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getFile",FilePath:d,FileName:a},success:function(f){var g=Ext.util.JSON.decode(f.responseText);Ext.! getCmp(b+e).setCode(g.content);Ext.get(c+e).unmask()},callback:functio n(){if(this.filePendingOpen[0]){this.filePendingOpen.shift();if(this.filePendingOpen[0]){if(this.filePendingOpen[0][0]){this.openFile(this.filePendingOpen[0][0],this.filePendingOpen[0][1])}}}}})},addToPendingPatch:function(b,a,e){var d,c;d=new Date();c=new this.pendingPatchGrid.store.recordType({id:Ext.id("",""),path:b,name:a,by:this.userLogin,uniqID:e,date:d});this.pendingPatchGrid.store.insert(0,c)},addToPendingCommit:function(g,e,a,d){var c,f,b;c=false;this.pendingCommitGrid.store.each(function(h){if(h.data.path===e&&h.data.name===a){c=true}});if(!c){f=new Date();b=new this.pendingCommitGrid.store.recordType({id:g,path:e,name:a,by:this.userLogin,date:f,type:d});this.pendingCommitGrid.store.insert(0,b);this.pendingCommitGrid.store.groupBy("path",true)}},NewTabBugs:function(a,b,c){Ext.getCmp("main-panel").add({id:"mifp_bugs_"+a,xtype:"iframepanel",title:_("Loading..."),tabTip:c,iconCls:"iconBugs",loadMask:true,defaultSrc:b,listeners:{documentloaded:function(d){d.ownerCt.set! Title(Ext.util.Format.substr(c,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_bugs_"+a)},NewTabMailing:function(a,c,b){Ext.getCmp("main-panel").add({xtype:"iframepanel",id:"mifp_"+a,title:_("Loading..."),tabTip:b,iconCls:"home-mailing-title",loadMask:true,defaultSrc:c,listeners:{documentloaded:function(d){d.ownerCt.setTitle(Ext.util.Format.substr(b,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_"+a)},winDiff:function(d,b,c,a){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Finding the diff. Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getDiff2",FilePath:d,FileName:b,Rev1:c,Rev2:a},success:function(f){var g=Ext.util.JSON.decode(f.responseText);Ext.getBody().unmask();var e=new Ext.Window({title:String.format(_("Diff between {0} & {1}"),c,a),width:650,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:'<div class="diff-content! ">'+g.content+"</div>",buttons:[{text:"Close",handler:function(){e.clo se()}}]});e.show()}})},removeTabEvent:function(d,e){var b,c,f,a;a=e.id.split("-");if((a[0]==="FE"||a[0]==="FNU"||a[0]==="FNR"||a[0]==="PP"||a[0]==="AF")&&a[1]!=="help"){if(a[0]==="FE"){b=Ext.getCmp("FE-LANG-FILE-"+a[1]).isModified}if(a[0]==="FNU"){b=Ext.getCmp("FNU-LANG-FILE-"+a[1]).isModified}if(a[0]==="FNR"){b=Ext.getCmp("FNR-LANG-FILE-"+a[1]).isModified}if(a[0]==="FE"){c=Ext.getCmp("FE-EN-FILE-"+a[1]).isModified}if(a[0]==="FNU"){c=Ext.getCmp("FNU-EN-FILE-"+a[1]).isModified}if(a[0]==="FNR"){c=Ext.getCmp("FNR-EN-FILE-"+a[1]).isModified}if(a[0]==="PP"){f=Ext.getCmp("PP-PATCH-FILE-"+a[1]).isModified}if(a[0]==="AF"){f=Ext.getCmp("AF-ALL-FILE-"+a[1]).isModified}if(c||b||f){Ext.Msg.show({scope:this,title:_("Confirm"),msg:_("This file has been modified without being saved.<br/>Do you really want to close?"),buttons:Ext.Msg.YESNO,icon:Ext.Msg.QUESTION,fn:function(g,h){if(g==="yes"){d.un("beforeremove",this.removeTabEvent,this);d.remove(e);d.addListener("beforeremove",this.removeTa! bEvent,this)}}})}else{return true}return false}else{return true}},WinCommit:function(j,i,e){var f,c,k,g,a,b,d,h;c=Ext.get("acc-need-update");if(!f){f=new Ext.Window({scope:this,id:"winCvsCommit",title:_("CVS commit"),closable:false,layout:"form",width:400,height:480,resizable:false,modal:true,bodyStyle:"padding:5px 5px 0",labelAlign:"top",items:[{xtype:"checktreepanel",id:"tree-panel",anchor:"100%",height:180,autoScroll:true,rootVisible:false,root:{text:"root",expanded:true,children:[]}},{scope:this,xtype:"combo",fieldLabel:_("Older messages"),editable:false,name:"first2",anchor:"100%",store:this.storeCommitLogMessage,triggerAction:"all",tpl:'<tpl for="."><div class="x-combo-list-item">{[values.text.split("\n").join("<br/>")]}</div></tpl>',valueField:"id",displayField:"text",listeners:{scope:this,render:function(){this.storeCommitLogMessage.load()},select:function(n,l,m){Ext.getCmp("form-commit-message-log").setValue(l.data.text)}}},{xtype:"textarea",id:"form-commit-message! -log",fieldLabel:_("Log message"),name:"first3",anchor:"100%",height:1 50,value:""}],tools:[{scope:this,id:"gear",qtip:_("Configure this tools"),handler:function(){var o,m,n;function l(p){return p.split("\n").join("<br/>")}o=new Ext.form.TextArea({grow:true,growMin:120});m=new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),{id:"GridManageLog",header:_("Log message"),dataIndex:"text",renderer:l,editor:new Ext.Editor(o,{shadow:false,autoSize:true,listeners:{scope:this,complete:function(r,s,q){var p=r.record.data.id;XHR({scope:this,url:"./php/controller.php",params:{task:"saveLogMessage",messID:p,mess:s},success:function(t){this.storeCommitLogMessage.getById(p).commit()},failure:function(t){this.winForbidden()}})}}})}]);n=new Ext.Window({title:_("Manage Log Message"),iconCls:"winManageLog",width:650,height:350,layout:"fit",resizable:false,modal:true,autoScroll:true,html:'<div class="diff-content"></div>',items:[{xtype:"editorgrid",store:this.storeCommitLogMessage,loadMask:true,cm:m,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),autoExpan! dColumn:"GridManageLog",listeners:{scope:this,rowcontextmenu:function(p,s,q){p.getSelectionModel().selectRow(s);var r=new Ext.menu.Menu({items:[{text:_("Delete this Log Message"),iconCls:"iconDelete",scope:this,handler:function(){XHR({scope:this,url:"./php/controller.php",params:{task:"deleteLogMessage",messID:this.storeCommitLogMessage.getAt(s).data.id},success:function(t){this.storeCommitLogMessage.remove(this.storeCommitLogMessage.getAt(s))},failure:function(t){this.winForbidden()}})}}]});r.showAt(q.getXY())}}}],buttons:[{text:_("Close"),handler:function(){n.close()}}],listeners:{scope:this,close:function(){this.storeCommitLogMessage.reload()}}});n.show()}}],buttons:[{scope:this,text:_("Submit"),id:"win-commit-btn-submit",handler:function(){var l,p,s,u,m,n,q=[],t,r="",o;if(this.userLogin==="cvsread"){f.close();this.winForbidden();return}l=Ext.getCmp("tree-panel").getValue();p=[];for(o=0;o<l.length;o=o+1){s=Ext.getCmp("tree-panel").getNodeById(l[o]).attributes;u="FE-"+Ext! .util.md5("FE-"+s.FilePath+s.FileName);m="FNU-"+Ext.util.md5("FNU-"+s. FilePath+s.FileName);n="FNR-"+Ext.util.md5("FNR-"+s.FilePath+s.FileName);if(Ext.getCmp("main-panel").findById(u)||Ext.getCmp("main-panel").findById(m)||Ext.getCmp("main-panel").findById(n)){if(Ext.getCmp("main-panel").findById(u)){t=u}if(Ext.getCmp("main-panel").findById(m)){t=m}if(Ext.getCmp("main-panel").findById(n)){t=n}q[0]=t;q[1]=s.FileName;p.push(q)}}if(p.length>0){for(o=0;o<p.length;o=o+1){r+=p[o][1]+"<br/>"}Ext.MessageBox.show({scope:this,title:"Warning",msg:(p.length>1)?String.format(_("There is {0} files to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?"),p.length,r):String.format(_("There is {0} file to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?"),p.length,r),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,fn:function(v){if(v==="yes"){for(o=0;o<p.length;o=o+1){Ext.getCmp("main-panel").remove(p[o][0])}this.WinCommitLastStep(l,this)}else{return}}})}else{this.WinCommitLastStep(l,this)}return}! },{text:_("Close"),id:"win-commit-btn-close",handler:function(){f.close()}}]})}f.show(c);if(j){k=this.pendingCommitGrid.store.getAt(i).data.id;a=this.pendingCommitGrid.store.getAt(i).data.path;b=this.pendingCommitGrid.store.getAt(i).data.name;g=Ext.util.md5(a+b);d=new Ext.tree.TreeNode({id:"need-commit-"+g,text:a+b,FileDBID:k,FilePath:a,FileName:b,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(d)}else{this.pendingCommitGrid.store.each(function(l){if(e&&e==="by me"&&l.data.by!==this.userLogin){}else{k=l.data.id;a=l.data.path;b=l.data.name;g=Ext.util.md5(a+b);d=new Ext.tree.TreeNode({id:"need-commit-"+g,text:a+b,FileDBID:k,FilePath:a,FileName:b,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(d)}},this);h=new Ext.tree.TreeSorter(Ext.getCmp("tree-panel"),{});h.doSort(Ext.getCmp("tree-panel").getRootNode())}},WinCommitLastStep:function(f,c){Ext.g! etBody().mask('<img src="themes/img/loading.gif" style="vertical-align : middle;" /> '+_("Please, wait until commit..."));var a=[],e,d,b;for(b=0;b<f.length;b=b+1){e=Ext.getCmp("tree-panel").getNodeById(f[b]);a.push(e.attributes.FileDBID)}d=Ext.getCmp("form-commit-message-log").getValue();Ext.getCmp("winCvsCommit").close();XHR({url:"./php/controller.php",params:{task:"cvsCommit",nodes:Ext.util.JSON.encode(a),logMessage:d},success:function(h){var i=Ext.util.JSON.decode(h.responseText);Ext.getBody().unmask();var g=new Ext.Window({title:_("Status"),width:450,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:i.mess.join("<br/>"),buttons:[{text:_("Close"),handler:function(){g.close()}}]});g.show();Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"onSuccesCommit",nodes:Ext.util.JSON.encode(a),logMessage:d},success:function(j){if(c.userLang!="en"){c.errorFileGrid.store.reload();c.pendin! gReviewGrid.store.reload();c.staleFileGrid.store.reload()}c.pendingCommitGrid.store.reload();ui.component.TranslatorGrid.reload();ui.component.SummaryGrid.reload();Ext.getBody().unmask()}})}})},WinUpdate:function(){var e,d;function c(f){phpDoc.TaskPing.cancel();Ext.get("wizard-step-1").replaceClass("wizard-step-before","wizard-step-working");Ext.get("wizard-step-1.1").replaceClass("wizard-wait","wizard-show");XHR({scope:f,url:"./php/controller.php",params:{task:"updateRepository"},success:function(g){Ext.get("wizard-step-1").replaceClass("wizard-step-working","wizard-step-done");Ext.get("wizard-step-1.1").replaceClass("wizard-show","wizard-wait");b(f)},failure:function(h){var j=Ext.util.JSON.decode(h.responseText);if(j&&j.success===false){e.close();this.winForbidden()}else{function i(){XHR({scope:f,url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_update_repository"},success:function(k){g.delay(5000)},failure:function(k){var l=Ext.util.JSON.decode(k.res! ponseText);if(l&&l.success===false){Ext.get("wizard-step-1").replaceCl ass("wizard-step-working","wizard-step-done");Ext.get("wizard-step-1.1").replaceClass("wizard-show","wizard-wait");b(this)}else{g.delay(5000)}}})}var g=new Ext.util.DelayedTask(function(){i()});g.delay(5000)}}})}function b(f){Ext.get("wizard-step-2").replaceClass("wizard-step-before","wizard-step-working");XHR({scope:f,url:"./php/controller.php",params:{task:"applyTools"},success:function(g){Ext.get("wizard-step-2").replaceClass("wizard-step-working","wizard-step-done");a(this)},failure:function(h){function i(){XHR({scope:f,url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_apply_tools"},success:function(j){g.delay(5000)},failure:function(j){var k=Ext.util.JSON.decode(j.responseText);if(k&&k.success===false){Ext.get("wizard-step-2").replaceClass("wizard-step-working","wizard-step-done");a(this)}else{g.delay(5000)}}})}var g=new Ext.util.DelayedTask(function(){i()});g.delay(5000)}})}function a(f){Ext.get("wizard-step-3").replaceClass("wizard-step-before","w! izard-step-working");if(phpDoc.userLang!="en"){phpDoc.staleFileGrid.store.reload();ui.component.TranslatorGrid.reload();phpDoc.errorFileGrid.store.reload()}Ext.get("wizard-step-3").replaceClass("wizard-step-working","wizard-step-done");Ext.getCmp("btn-start-refresh").setIconClass("finishRefresh");Ext.getCmp("btn-start-refresh").setText(_("Finish !"));Ext.getCmp("btn-start-refresh").setHandler(function(){e.close()});Ext.getCmp("btn-start-refresh").enable();phpDoc.TaskPing.delay(30000);e.tools.close.setVisible(true)}d=Ext.get("acc-need-update");if(!e){e=new Ext.Window({title:_("Refresh all data"),layout:"form",width:300,height:200,resizable:false,modal:true,bodyStyle:"padding:15px 15px 0",iconCls:"refresh",html:'<div id="wizard-step-1" class="wizard-step-before">'+_("Update all files from Cvs")+'</div><div id="wizard-step-1.1" class="wizard-wait">'+_("This may take time. Thank you for your patience...")+'</div><div id="wizard-step-2" class="wizard-step-before">'+_("Apply all ! tools")+'</div><div id="wizard-step-3" class="wizard-step-before">'+_( "Reload data")+"</div>",buttons:[{scope:this,text:_("Start"),id:"btn-start-refresh",iconCls:"startRefresh",handler:function(){Ext.getCmp("btn-start-refresh").disable();e.tools.close.setVisible(false);Ext.getDom("lastUpdateTime").innerHTML=_("update in progress...");c(this)}}]})}Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Verify if there is an update in progress. Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getLastUpdate"},success:function(f){Ext.getBody().unmask();var g=Ext.util.JSON.decode(f.responseText);if(g.lastupdate==="in_progress"){Ext.MessageBox.show({title:_("Status"),msg:_("There is currently an update in progress.<br/>You can't perform an update now."),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO})}else{e.show(d)}}})},WinCheckBuild:function(){var c,a;a=Ext.get("acc-need-update");function b(d){XHR({scope:d,url:"./php/controller.php",params:{task:"getLogFile",file:"log_check_build"},success:! function(e){var f=Ext.util.JSON.decode(e.responseText);phpDoc.TaskPing.delay(30000);if(Ext.getCmp("main-panel").findById("check_build_panel")){Ext.getCmp("main-panel").remove("check_build_panel")}Ext.getCmp("main-panel").add({xtype:"panel",id:"check_build_panel",title:_("Check Build Result"),closable:true,autoScroll:true,iconCls:"checkBuild",html:'<div class="check-build-content">'+f.mess+"</div>"});Ext.getCmp("main-panel").setActiveTab("check_build_panel")}})}if(!c){c=new Ext.Window({title:_("Check Build"),iconCls:"checkBuild",layout:"form",width:350,height:200,resizable:false,modal:true,bodyStyle:"padding:5px 5px 0",labelAlign:"top",buttons:[{scope:this,text:_("Go !"),id:"win-check-build-btn-submit",handler:function(){var d=Ext.getCmp("option-xml-details").checked;c.close();Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait until the build is checked..."));phpDoc.TaskPing.cancel();XHR({scope:this,url:"./php/controlle! r.php",params:{task:"checkBuild",xmlDetails:d},success:function(e){Ext ..getBody().unmask();b(this)},failure:function(e){var h=Ext.util.JSON.decode(e.responseText);if(h&&h.success===false){phpDoc.TaskPing.delay(30000);Ext.getBody().unmask();this.winForbidden()}else{function f(i){XHR({scope:i,url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_check_build"},success:function(j){g.delay(5000)},failure:function(j){var k=Ext.util.JSON.decode(j.responseText);if(k&&k.success===false){Ext.getBody().unmask();b(this)}else{g.delay(5000)}}})}var g=new Ext.util.DelayedTask(function(){f(this)},this);g.delay(5000)}}})}}],items:[{xtype:"panel",baseCls:"x-plain",bodyStyle:"padding:5px 5px 0",html:_("You're about to check the build via this command:")+"<br/><br/>/usr/bin/php configure.php --with-lang="+this.userLang+"<br><br>",modal:false},{xtype:"checkbox",hideLabel:true,checked:false,boxLabel:_("Enable detailed XML error messages"),name:"option-xml-details",id:"option-xml-details"}]})}c.show(a)},WinConf:function(){new ui.component.EditorConf(! ).show(Ext.get("winconf-btn"))},confUpdate:function(b,a){XHR({scope:this,url:"./php/controller.php",params:{task:"confUpdate",item:b,value:a},success:function(c){if(b==="conf_theme"){this.userConf.conf_theme=a}if(b==="conf_needupdate_diff"){this.userConf.conf_needupdate_diff=a}if(b==="conf_needupdate_scrollbars"){this.userConf.conf_needupdate_scrollbars=""+a+""}if(b==="conf_needupdate_displaylog"){this.userConf.conf_needupdate_displaylog=""+a+""}if(b==="conf_error_skipnbliteraltag"){this.userConf.conf_error_skipnbliteraltag=""+a+"";this.errorFileGrid.store.reload()}if(b==="conf_error_scrollbars"){this.userConf.conf_error_scrollbars=""+a+""}if(b==="conf_error_displaylog"){this.userConf.conf_error_displaylog=""+a+""}if(b==="conf_reviewed_scrollbars"){this.userConf.conf_reviewed_scrollbars=""+a+""}if(b==="conf_reviewed_displaylog"){this.userConf.conf_reviewed_displaylog=""+a+""}if(b==="conf_allfiles_displaylog"){this.userConf.conf_allfiles_displaylog=""+a+""}if(b==="conf_patch! _scrollbars"){this.userConf.conf_patch_scrollbars=""+a+""}if(b==="conf _patch_displaylog"){this.userConf.conf_patch_displaylog=""+a+""}}})},WinAbout:function(){new ui.component.About().show(Ext.get("winabout-btn"))},sendEmail:function(b,a){var c,d;c=new Ext.form.FormPanel({baseCls:"x-plain",labelWidth:55,url:"save-form.php",defaultType:"textfield",items:[{fieldLabel:_("Send To"),name:"to",readOnly:true,anchor:"100%",value:'"'+b+'" <'+a+">"},{fieldLabel:_("Subject"),name:"subject",anchor:"100%"},{xtype:"textarea",hideLabel:true,name:"msg",anchor:"100% -53"}]});d=new Ext.Window({title:_("Send an email"),width:500,height:300,minWidth:300,minHeight:200,layout:"fit",plain:true,bodyStyle:"padding:5px;",buttonAlign:"center",items:c,iconCls:"iconSendEmail",buttons:[{text:_("Send"),handler:function(){var e=c.getForm().getValues();XHR({url:"./php/controller.php",params:{task:"sendEmail",to:e.to,subject:e.subject,msg:e.msg},success:function(f){d.close();Ext.MessageBox.alert(_("Status"),String.format(_("Email sent to {0} with success!"),b))}})}},{text:_("C! ancel"),handler:function(){d.close()}}]});d.show()},repositoryContextMenu:function(e){var b,a,c,d;if(e.attributes.type==="folder"||e.isRoot){return new Ext.menu.Menu({items:[{text:(e.isExpanded())?"<b>"+_("Collapse")+"</b>":"<b>"+_("Expand")+"</b>",iconCls:"iconFolderClose",handler:function(){if(e.isExpanded()){e.collapse()}else{e.expand()}}}]})}else{if(e.attributes.type==="file"){a=e.attributes.text;c=e.attributes.id;b=c.split("/");b.shift();b.shift();b.pop();d=b.shift();c=b.join("/")+"/";return new Ext.menu.Menu({items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"iconTabNeedReviewed",handler:function(){phpDoc.treeAllFiles.fireEvent("dblclick",e)}},{hidden:(e.attributes.from==="search"),scope:this,text:(d==="en")?String.format(_("Open the same file in <b>{0}</b>"),Ext.util.Format.uppercase(this.userLang)):String.format(_("Open the same file in <b>{0}</b>"),"EN"),iconCls:"iconTabNeedReviewed",handler:function(){if(d==="en"){this.openFile(this.userLang+"/"+! c,a)}else{this.openFile("en/"+c,a)}}}]})}}},drawInterface:function(){v ar g,d,a,f,e,h,c,b;phpDoc.TaskPing=new ui.task.PingTask();phpDoc.TaskPing.delay(30000);this.staleFileGrid=new ui.component.StaleFileGrid();this.errorFileGrid=new ui.component.ErrorFileGrid();this.pendingPatchGrid=new ui.component.PendingPatchGrid();this.notInENGrid=new ui.component.NotInENGrid();this.pendingCommitGrid=new ui.component.PendingCommitGrid();this.pendingReviewGrid=new ui.component.PendingReviewGrid();this.treeAllFiles=new ui.component.RepositoryTree();g=new ui.component.SummaryGrid();d=new ui.component.TranslatorGrid();a=new ui.component.LocalMailGrid();f=new ui.component.BugsGrid();e=new ui.component.TranslationGraph();c=new ui.component.MainMenu();if(this.userLang==="en"){b=[a]}else{b=[g,d,a,f,e]}h=new Ext.Viewport({layout:"border",items:[{region:"north",html:'<h1 class="x-panel-header"><img src="themes/img/mini_php.png" style="vertical-align: middle;" /> '+this.appName+"</h1>",autoHeight:true,border:false,margins:"0 0 5 0"},{region:"west",collapsib! le:true,collapseMode:"mini",animate:true,split:true,layout:"fit",width:300,autoScroll:true,items:[{layout:"accordion",animate:true,bodyBorder:false,border:false,tbar:[{text:_("Main Menu"),iconCls:"MainMenu",menu:c}],items:[{id:"acc-need-update",title:_("Files Need Update")+' - <em id="acc-need-update-nb">0</em>',layout:"fit",iconCls:"FilesNeedUpdate",hidden:(this.userLang==="en"),items:[this.staleFileGrid],collapsed:true,listeners:{expand:function(i){Ext.getCmp("FNU-filter").wrap.setWidth(200)}}},{id:"acc-error",title:_("Error in current translation")+' - <em id="acc-error-nb">0</em>',layout:"fit",iconCls:"FilesError",hidden:(this.userLang==="en"),items:[this.errorFileGrid],collapsed:true,listeners:{expand:function(i){Ext.getCmp("FE-filter").wrap.setWidth(200)}}},{id:"acc-need-reviewed",title:_("Files Need Reviewed")+' - <em id="acc-need-reviewed-nb">0</em>',layout:"fit",iconCls:"FilesNeedReviewed",hidden:(this.userLang==="en"),items:[this.pendingReviewGrid],collapsed:true,! listeners:{expand:function(i){Ext.getCmp("FNR-filter").wrap.setWidth(2 00)}}},{id:"acc-notInEn",title:_("Not in EN tree")+' - <em id="acc-notInEn-nb">0</em>',layout:"fit",iconCls:"NotInEn",hidden:(this.userLang==="en"),items:[this.notInENGrid],collapsed:true},{id:"acc-all-files",title:_("All files"),layout:"fit",iconCls:"AllFiles",items:[this.treeAllFiles],collapsed:true,listeners:{expand:function(i){Ext.getCmp("AF-search").wrap.setWidth(200)}}},{id:"acc-need-pendingCommit",title:_("Pending for commit")+' - <em id="acc-pendingCommit-nb">0</em>',layout:"fit",iconCls:"PendingCommit",items:[this.pendingCommitGrid],collapsed:true},{id:"acc-need-pendingPatch",title:_("Pending Patch")+' - <em id="acc-pendingPatch-nb">0</em>',layout:"fit",iconCls:"PendingPatch",items:[this.pendingPatchGrid],collapsed:true}]}]},{xtype:"tabpanel",id:"main-panel",region:"center",activeTab:0,enableTabScroll:true,layoutOnTabChange:true,plugins:new Ext.ux.TabCloseMenu(),listeners:{scope:this,beforeremove:this.removeTabEvent},items:[{xtype:"panel",id:"MainInfoTabPanel",title! :_("Home"),baseCls:"MainInfoTabPanel",autoScroll:true,plain:true,items:[{xtype:"panel",border:false,html:'<div class="res-block"><div class="res-block-inner"><h3>'+String.format(_("Connected as <em>{0}</em>"),this.userLogin)+"<br/><br/>"+String.format(_('Last data update: <em id="lastUpdateTime">{0}</em>'),"-")+"</h3></div></div>"},{xtype:"tabpanel",activeTab:0,plain:true,autoScroll:true,height:400,border:false,items:b,defaults:{border:true},layoutOnTabChange:true}]}]}]});Ext.get("loading").remove();Ext.fly("loading-mask").fadeOut({remove:true});if(directAccess){this.openFile(directAccess.lang+directAccess.path,directAccess.name)}}}}();Ext.EventManager.onDocumentReady(phpDoc.init,phpDoc,true); \ No newline at end of file +function log(){if(console){console.log.apply(this,arguments)}}function _(a){try{var c=i18n[a];if(c===undefined){c=a;log("FIX ME : i18n not found for the string: "+a)}return c}catch(b){return a}}function XHR(c){var b=c.success,d=c.failure,a=c.callback;c.failure=c.success=Ext.emptyFn;c.callback=function(g,j,f){var i=null;try{i=Ext.decode(f.responseText)}catch(h){log("Invalid XHR JSON Response:"+f.responseText)}if(j&&i&&i.success){if(b!==undefined){Ext.callback(b,c.scope,[f,g])}}else{if(d!==undefined){Ext.callback(d,c.scope,[f,g])}}if(a!==undefined){Ext.callback(a,c.scope,[g,j,f])}};Ext.Ajax.request(c)}Ext.namespace("ui","ui.task");ui.task.AcceptPatchTask=function(a){Ext.apply(this,a);if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}Ext.MessageBox.confirm(_("Confirm"),_("This action will accept this patch, send an email to his author, save the file and close this tab."),function(b){if(b==="yes"){Ext.getCmp("PP-PATCH-PANEL-btn-save-"+this.fid).disable();Ext.getCmp(! "PP-PATCH-FILE-"+this.fid).isModified=false;Ext.getCmp("PP-PATCH-PANEL-"+this.fid).setTitle(Ext.getCmp("PP-PATCH-PANEL-"+this.fid).originTitle);Ext.getCmp("PP-"+this.fid).setTitle(Ext.getCmp("PP-"+this.fid).originTitle);var c=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:"all",fileContent:Ext.getCmp("PP-PATCH-FILE-"+this.fid).getCode()},success:function(d){var f=Ext.util.JSON.decode(d.responseText),e=ui.component.PendingPatchGrid.instance;ui.component.PendingCommitGrid.instance.addRecord(f.id,this.fpath,this.fname,"update");e.store.remove(this.storeRecord);e.store.fireEvent("add",e.store);XHR({scope:this,url:"./php/controller.php",params:{task:"afterPatchAccept",PatchUniqID:this.fuid}});c.hide();Ext.getCmp("main-panel").remove("PP-"+this.fid)},failure:function(d){c.hide()}})}},this)};Ext.namespace("ui","ui.task");ui.task.CheckFileTask=function(a){Ext.apply(this,a);! Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical- align: middle;" /> '+_("Checking for error. Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"checkFileError",FilePath:this.fpath,FileName:this.fname,FileLang:this.lang,FileContent:Ext.getCmp(this.prefix+"-"+this.ftype+"-FILE-"+this.fid).getCode()},success:function(b){Ext.getBody().unmask();var c=Ext.util.JSON.decode(b.responseText);if(c.error&&c.error_first!=="-No error-"){Ext.getCmp("main-panel").add({id:"FE-help-"+this.fid,title:"Error in "+this.fname,iconCls:"FilesError",closable:true,autoScroll:true,autoLoad:"./error_type.php?dir="+this.fpath+"&file="+this.fname});Ext.getCmp("main-panel").setActiveTab("FE-help-"+this.fid)}else{Ext.MessageBox.show({title:_("Check for errors"),msg:_("There is no error."),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO})}new ui.task.SaveLangFileTask({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:this.fpath,fname:this.fname,lang:this.lang,storeRecord:this.storeRecord});if(this.prefix==="FE"){Ext.getCmp(! this.prefix+"-error-type-"+this.fid).setSrc("./error_type.php?dir="+this.fpath+"&file="+this.fname+"&nocache="+new Date().getTime())}}})};Ext.namespace("ui","ui.task");ui.task.ClearLocalChangeTask=function(a){Ext.apply(this,a);if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}Ext.MessageBox.confirm(_("Confirm"),_("This action will clear your local modification and take back this file from his original stats.<br/>You need confirm."),function(b){if(b==="yes"){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));if(Ext.getCmp("main-panel").findById("FNU-"+Ext.util.md5("FNU-"+this.fpath+this.fname))){Ext.getCmp("main-panel").remove("FNU-"+Ext.util.md5("FNU-"+this.fpath+this.fname))}XHR({scope:this,url:"./php/controller.php",params:{task:"clearLocalChange",FileType:this.ftype,FilePath:this.fpath,FileName:this.fname},success:function(c){if(phpDoc.userLang==="en"){ui.component.StaleFileGrid.instance.store.relo! ad();ui.component.ErrorFileGrid.instance.store.reload();ui.component.P endingReviewGrid.instance.store.reload()}ui.component.PendingCommitGrid.instance.store.remove(this.storeRecord);ui.component.PendingCommitGrid.instance.store.fireEvent("add",ui.component.PendingCommitGrid.instance.store);ui.component.NotInENGrid.instance.store.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);ui.component.PendingReviewGrid.instance.store.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);ui.component.StaleFileGrid.instance.store.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);ui.component.ErrorFileGrid.instance.store.each(function(e){if((phpDoc.userLang+e.data.path)===this.fpath&&e.data.name===this.fname){e.set("needcommit",false)}},this);var d=ui.component.RepositoryTree.instance.getNodeById("//"+this.fpath+this.fname);if(d){d.getUI().rem! oveClass("modified")}Ext.getBody().unmask()},failure:function(c){Ext.getBody().unmask();phpDoc.winForbidden()}})}},this)};Ext.namespace("ui","ui.task");ui.task.GetFileTask=function(b){Ext.apply(this,b);var a=this.prefix+"-"+this.ftype;Ext.get(a+"-PANEL-"+this.fid).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Loading..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getFile",FilePath:this.fpath,FileName:this.fname},success:function(c){var d=Ext.util.JSON.decode(c.responseText);Ext.getCmp(a+"-FILE-"+this.fid).setCode(d.content);Ext.get(a+"-PANEL-"+this.fid).unmask()},callback:function(){if(phpDoc.filePendingOpen[0]){phpDoc.filePendingOpen.shift();if(phpDoc.filePendingOpen[0]){if(phpDoc.filePendingOpen[0].fpath){ui.component.RepositoryTree.instance.openFile(phpDoc.filePendingOpen[0].fpath,phpDoc.filePendingOpen[0].fname)}}}}})};Ext.namespace("ui","ui.task");ui.task.LoadConfigTask=function(a){Ext.apply(this,a);XHR({url:"./php/cont! roller.php",params:{task:"getConf"},success:function(b){var c=Ext.deco de(b.responseText);phpDoc.userLogin=c.mess.userLogin;phpDoc.userLang=c.mess.userLang;phpDoc.userConf.conf_needupdate_diff=c.mess.userConf.conf_needupdate_diff;phpDoc.userConf.conf_needupdate_scrollbars=c.mess.userConf.conf_needupdate_scrollbars;phpDoc.userConf.conf_needupdate_displaylog=c.mess.userConf.conf_needupdate_displaylog;phpDoc.userConf.conf_error_skipnbliteraltag=c.mess.userConf.conf_error_skipnbliteraltag;phpDoc.userConf.conf_error_scrollbars=c.mess.userConf.conf_error_scrollbars;phpDoc.userConf.conf_error_displaylog=c.mess.userConf.conf_error_displaylog;phpDoc.userConf.conf_reviewed_scrollbars=c.mess.userConf.conf_reviewed_scrollbars;phpDoc.userConf.conf_reviewed_displaylog=c.mess.userConf.conf_reviewed_displaylog;phpDoc.userConf.conf_allfiles_displaylog=c.mess.userConf.conf_allfiles_displaylog;phpDoc.userConf.conf_patch_scrollbars=c.mess.userConf.conf_patch_scrollbars;phpDoc.userConf.conf_patch_displaylog=c.mess.userConf.conf_patch_displaylog;phpDoc.userConf.conf! _theme=c.mess.userConf.conf_theme;Ext.get("appTheme").dom.href=phpDoc.userConf.conf_theme;phpDoc.loadDataStore();phpDoc.drawInterface()}})};Ext.namespace("ui","ui.task");ui.task.MarkDeleteTask=function(a){Ext.apply(this,a);Ext.MessageBox.confirm(_("Confirm"),_("This action will mark this file as need deleted.<br/><br/>You need commit this change to take it effect.<br/><br/>Please, confirm this action."),function(b){if(b==="yes"){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"markAsNeedDelete",FilePath:this.fpath,FileName:this.fname},success:function(c){var d=Ext.util.JSON.decode(c.responseText);Ext.getBody().unmask();ui.component.PendingCommitGrid.instance.addRecord(d.id,phpDoc.userLang+this.fpath,this.fname,"delete");this.storeRecord.set("needcommit",true)}})}},this)};Ext.namespace("ui","ui.task");ui.task.PingTask=function(){ui.task.PingTask.instance=t! his;this.task=new Ext.util.DelayedTask(function(){XHR({url:"./php/cont roller.php",params:{task:"ping"},success:function(a){var c=Ext.util.JSON.decode(a.responseText);if(c.ping!=="pong"){window.location.href="./"}else{if(c.lastupdate==="in_progress"){Ext.getDom("lastUpdateTime").innerHTML=_("update in progress...")}else{var b=Date.parseDate(c.lastupdate,"Y-m-d H:i:s");Ext.getDom("lastUpdateTime").innerHTML=b.format(_("Y-m-d, H:i"))}}},failure:function(){window.location.href="./"}});this.task.delay(30000)},this);this.delay=function(b,d,c,a){this.task.delay(b,d,c,a)};this.cancel=function(){this.task.cancel()}};ui.task.PingTask.prototype.instance=null;Ext.namespace("ui","ui.task");ui.task.RejectPatchTask=function(a){Ext.apply(this,a);if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}Ext.MessageBox.confirm(_("Confirm"),_("This action will <b>reject</b> this patch, send an email to his author and close this tab."),function(b){if(b==="yes"){var c=Ext.MessageBox.wait(_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{! task:"afterPatchReject",PatchUniqID:this.fuid},success:function(d){var e=ui.component.PendingPatchGrid.instance;e.store.remove(this.storeRecord);e.store.fireEvent("add",e.store);Ext.getCmp("main-panel").remove("PP-"+this.fid);c.hide()},failure:function(d){c.hide();phpDoc.winForbidden()}})}},this)};Ext.namespace("ui","ui.task");ui.task.SaveENFileTask=function(b){Ext.apply(this,b);var a=this.prefix+"-"+this.ftype,c=Ext.MessageBox.wait(_("Saving data..."));if(phpDoc.userLogin==="cvsread"){c.hide();phpDoc.winForbidden();return}XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:"en",fileContent:Ext.getCmp(this.prefix+"-"+this.ftype+"-FILE-"+this.fid).getCode()},success:function(d){var e=Ext.util.JSON.decode(d.responseText);if(this.prefix==="FNU"){this.storeRecord.set("en_revision","1."+e.en_revision);this.storeRecord.set("needcommit",true)}if(this.prefix==="FE"){this.storeRecord.set("needcommit",true)}if(this.prefi! x==="FNR"){this.storeRecord.set("needcommit",true)}if(this.prefix==="A F"){this.storeRecord.getUI().addClass("modified")}ui.component.PendingCommitGrid.instance.addRecord(e.id,"en"+this.fpath,this.fname,"update");Ext.getCmp(a+"-PANEL-btn-save-"+this.fid).disable();Ext.getCmp(a+"-FILE-"+this.fid).isModified=false;Ext.getCmp(a+"-PANEL-"+this.fid).setTitle(Ext.getCmp(a+"-PANEL-"+this.fid).originTitle);if(this.ftype==="ALL"||!Ext.getCmp(this.prefix+"-LANG-FILE-"+this.fid).isModified){Ext.getCmp(this.prefix+"-"+this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle)}c.hide()},failure:function(d){c.hide();phpDoc.winForbidden()}})};Ext.namespace("ui","ui.task");ui.task.SaveLangFileTask=function(b){Ext.apply(this,b);var a=this.prefix+"-"+this.ftype,c=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:this.lang,fileContent:Ext.getCmp(this.prefix+"-"+this.ftype+"-FILE-"+this.fid).getCode()},success:function(d){var e=Ext.util.JSON.decode(! d.responseText);if(this.prefix==="FE"){this.storeRecord.set("needcommit",true);this.storeRecord.set("maintainer",e.maintainer);this.storeRecord.commit()}if(this.prefix==="FNU"){this.storeRecord.set("revision","1."+e.new_revision);this.storeRecord.set("needcommit",true);this.storeRecord.set("maintainer",e.maintainer);this.storeRecord.commit()}if(this.prefix==="FNR"){this.storeRecord.set("needcommit",true);this.storeRecord.set("maintainer",e.maintainer);this.storeRecord.set("reviewed",e.reviewed);this.storeRecord.commit()}if(this.prefix==="AF"){this.storeRecord.getUI().addClass("modified")}ui.component.PendingCommitGrid.instance.addRecord(e.id,this.lang+this.fpath,this.fname,"update");Ext.getCmp(a+"-PANEL-btn-save-"+this.fid).disable();Ext.getCmp(a+"-FILE-"+this.fid).isModified=false;Ext.getCmp(a+"-PANEL-"+this.fid).setTitle(Ext.getCmp(a+"-PANEL-"+this.fid).originTitle);if(this.ftype==="ALL"||!Ext.getCmp(this.prefix+"-EN-FILE-"+this.fid).isModified){Ext.getCmp(this.prefix+"-"! +this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle)} c.hide()},failure:function(d){c.hide();phpDoc.winForbidden()}})};Ext.namespace("ui","ui.task");ui.task.SavePatchTask=function(b){Ext.apply(this,b);var a=this.prefix+"-"+this.ftype,c=Ext.MessageBox.wait(_("Saving data as a patch..."));Ext.getCmp(a+"-PANEL-btn-saveas-"+this.fid).disable();Ext.getCmp(a+"-FILE-"+this.fid).isModified=false;Ext.getCmp(a+"-PANEL-"+this.fid).setTitle(Ext.getCmp(a+"-PANEL-"+this.fid).originTitle);if((this.prefix==="AF")||(this.lang==="en"&&Ext.getCmp(this.prefix+"-LANG-FILE-"+this.fid).isModified===false)||(this.lang!=="en"&&Ext.getCmp(this.prefix+"-EN-FILE-"+this.fid).isModified===false)){Ext.getCmp(this.prefix+"-"+this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle)}XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:this.fpath,fileName:this.fname,fileLang:this.lang,fileContent:Ext.getCmp(a+"-FILE-"+this.fid).getCode(),type:"patch",emailAlert:this.email},success:function(d){var f=Ext.util.JSON.decode(d.respon! seText),e=ui.component.PendingPatchGrid.instance;e.store.insert(0,new e.store.recordType({id:Ext.id("",""),path:this.lang+this.fpath,name:this.fname,by:phpDoc.userLogin,uniqID:f.uniqId,date:new Date()}));c.hide()}})};Ext.namespace("ui","ui.task");ui.task.UpdateConfTask=function(a){Ext.apply(this,a);XHR({scope:this,url:"./php/controller.php",params:{task:"confUpdate",item:this.item,value:this.value},success:function(b){switch(this.item){case"conf_theme":phpDoc.userConf.conf_theme=this.value;break;case"conf_needupdate_diff":phpDoc.userConf.conf_needupdate_diff=this.value;break;case"conf_needupdate_scrollbars":phpDoc.userConf.conf_needupdate_scrollbars=""+this.value+"";break;case"conf_needupdate_displaylog":phpDoc.userConf.conf_needupdate_displaylog=""+this.value+"";break;case"conf_error_skipnbliteraltag":phpDoc.userConf.conf_error_skipnbliteraltag=""+this.value+"";ui.component.ErrorFileGrid.instance.store.reload();break;case"conf_error_scrollbars":phpDoc.userConf.conf_error_s! crollbars=""+this.value+"";break;case"conf_error_displaylog":phpDoc.us erConf.conf_error_displaylog=""+this.value+"";break;case"conf_reviewed_scrollbars":phpDoc.userConf.conf_reviewed_scrollbars=""+this.value+"";break;case"conf_reviewed_displaylog":phpDoc.userConf.conf_reviewed_displaylog=""+this.value+"";break;case"conf_allfiles_displaylog":phpDoc.userConf.conf_allfiles_displaylog=""+this.value+"";break;case"conf_patch_scrollbars":phpDoc.userConf.conf_patch_scrollbars=""+this.value+"";break;case"conf_patch_displaylog":phpDoc.userConf.conf_patch_displaylog=""+this.value+"";break}}})};Ext.namespace("ui","ui.component");ui.component.About=Ext.extend(Ext.Window,{id:"win-about",iconCls:"iconHelp",layout:"fit",width:515,height:320,modal:true,plain:true,bodyStyle:"color:#000",buttons:[{text:_("Close"),handler:function(){Ext.getCmp("win-about").close()}}],initComponent:function(){Ext.apply(this,{title:String.format(_("About {0}"),phpDoc.appName),items:{xtype:"tabpanel",activeTab:0,autoTabs:true,border:false,defaults:{autoScroll:true},items:[{title:_("! About"),html:'<div id="phd-oe-about"><img src="themes/img/logo.png" alt="'+phpDoc.appName+'" /></div><div id="phd-oe-about-info">'+phpDoc.appName+" ver "+phpDoc.appVer+"<br/>UI: "+phpDoc.uiRevision+"<br/> Copyright © 2008-2009 The PHP Group<br/>"+_("Author:")+' <a href="mailto:yannick@php.net">Yannick Torrès</a> '+_('and <a href="http://cvs.php.net/viewvc.cgi/doc-editor/" target="_blank">others</a>')+"</div>"},{title:_("Credits"),bodyStyle:"padding:15px",html:'<div id="phd-oe-credit"><ul><li><a href="http://extjs.com" target="_blank">ExtJs Team</a><div class="phd-oe-credit-info">'+_("Javascript FrameWork")+'</div></li><li><a href="http://marijn.haverbeke.nl/codemirror/" target="_blank">CodeMirror</a><div class="phd-oe-credit-info">'+_("Code editor")+'</div></li><li><a href="http://famfamfam.com" target="_blank">famfamfam.com</a><div class="phd-oe-credit-info">'+_("Icon pack")+"</div></li></ul></div>"},{title:_("License"),autoLoad:{url:"./LICENSE"}}]}});ui.compon! ent.About.superclass.initComponent.call(this)}});Ext.namespace("ui","u i.component","ui.component._BugsGrid");ui.component._BugsGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getOpenBugs"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"title",mapping:"title"},{name:"link",mapping:"link"},{name:"description",mapping:"description"}]))});ui.component._BugsGrid.columns=[{id:"GridBugTitle",header:"Title",sortable:true,dataIndex:"title"}];ui.component._BugsGrid.view=new Ext.grid.GridView({forceFit:true,emptyText:_("No open Bugs"),enableRowBody:true,getRowClass:function(a,d,c,b){c.body='<p class="bug-desc">'+a.data.description+"</p>";return"x-grid3-row-expanded"}});ui.component.BugsGrid=Ext.extend(Ext.grid.GridPanel,{iconCls:"iconBugs",loadMask:true,stripeRows:true,autoHeight:true,width:800,autoExpandColumn:"GridBugTitle",store:ui.component._BugsGrid.store,columns:ui.component._BugsGrid.columns,view:ui.com! ponent._BugsGrid.view,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),listeners:{render:function(a){a.store.load.defer(20,a.store)},rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c);new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+_("Open in a new Tab")+"</b>",iconCls:"openInTab",handler:function(){a.fireEvent("rowdblclick",a,c,b)}},"-",{text:_("Refresh this grid"),iconCls:"refresh",handler:function(){a.store.reload()}}]}).showAt(b.getXY())},rowdblclick:function(c,g,f){var a=c.store.getAt(g).data.id,b=c.store.getAt(g).data.link,d=c.store.getAt(g).data.title;Ext.getCmp("main-panel").add({id:"mifp_bugs_"+a,xtype:"iframepanel",title:_("Loading..."),tabTip:d,iconCls:"iconBugs",loadMask:true,defaultSrc:b,listeners:{documentloaded:function(e){e.ownerCt.setTitle(Ext.util.Format.substr(d,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_bugs_"+a)}},initComponent:function(){Ext.apply(this,{title:String.format(_("Open bugs for {0}"),"doc-"+phpDoc.u! serLang),tbar:[{tooltip:_("Refresh this grid"),iconCls:"refresh",handl er:function(){ui.component.BugsGrid.reload()}}]});ui.component.BugsGrid.superclass.initComponent.call(this)}});ui.component.BugsGrid.reload=function(){ui.component._BugsGrid.store.reload()};Ext.namespace("ui","ui.component","ui.component._BuildStatus");ui.component._BuildStatus.ds=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getBuildStatusData"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"lang",mapping:"lang"},{name:"date",mapping:"date",type:"date",dateFormat:"Y-m-d H:i:s"},{name:"status",mapping:"status",type:"int"}]))});ui.component._BuildStatus.ds.setDefaultSort("date","desc");ui.component._BuildStatus.rendererLanguage=function(a){return'<div class="flag flag-'+a+'">'+a+"</div>"};ui.component._BuildStatus.rendererStatus=function(a){if(a===0){return"Nok"}else{return"Ok"}};ui.component._BuildStatus.columns=[{id:"date",header:_("Date"! ),sortable:true,dataIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))},{header:_("Language"),width:45,sortable:true,dataIndex:"lang",renderer:ui.component._BuildStatus.rendererLanguage},{header:_("Status"),width:45,sortable:true,dataIndex:"status",renderer:ui.component._BuildStatus.rendererStatus}];ui.component.BuildStatus=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"date",store:ui.component._BuildStatus.ds,columns:ui.component._BuildStatus.columns,view:new Ext.grid.GridView({forceFit:true,getRowClass:function(a,d,c,b){if(a.data.status===0){return"summary_3"}}}),listeners:{scope:this,render:function(a){a.store.load.defer(20,a.store)}}});Ext.namespace("ui","ui.component","ui.component._CheckDoc");ui.component._CheckDoc.ds=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getCheckDocData"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Re! cord.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{na me:"extension",mapping:"extension"},{name:"check_oldstyle",mapping:"check_oldstyle",type:"int"},{name:"check_undoc",mapping:"check_undoc",type:"int"},{name:"check_roleerror",mapping:"check_roleerror",type:"int"},{name:"check_badorder",mapping:"check_badorder",type:"int"},{name:"check_noseealso",mapping:"check_noseealso",type:"int"},{name:"check_noreturnvalues",mapping:"check_noreturnvalues",type:"int"},{name:"check_noparameters",mapping:"check_noparameters",type:"int"},{name:"check_noexamples",mapping:"check_noexamples",type:"int"},{name:"check_noerrors",mapping:"check_noerrors",type:"int"}]))});ui.component._CheckDoc.ds.setDefaultSort("extension","asc");ui.component._CheckDoc.renderer=function(b,a){if(b>0){a.css="check_doc_cell";return b}else{return}};ui.component._CheckDoc.columns=[new Ext.grid.RowNumberer(),{id:"extension",header:"Extension",sortable:true,dataIndex:"extension"},{header:"Not documented",width:45,sortable:true,dataIndex:"check_undoc",renderer:ui.component._! CheckDoc.renderer},{header:"Old style",width:45,sortable:true,dataIndex:"check_oldstyle",renderer:ui.component._CheckDoc.renderer},{header:"Bad refsect1 order",width:45,sortable:true,dataIndex:"check_badorder",renderer:ui.component._CheckDoc.renderer},{header:"No parameters",width:45,sortable:true,dataIndex:"check_noparameters",renderer:ui.component._CheckDoc.renderer},{header:"No return values",width:45,sortable:true,dataIndex:"check_noreturnvalues",renderer:ui.component._CheckDoc.renderer},{header:"No examples",width:45,sortable:true,dataIndex:"check_noexamples",renderer:ui.component._CheckDoc.renderer},{header:"No errors section",width:45,sortable:true,dataIndex:"check_noerrors",renderer:ui.component._CheckDoc.renderer},{header:"No see also",width:45,sortable:true,dataIndex:"check_noseealso",renderer:ui.component._CheckDoc.renderer},{header:"Refsect1 role error",width:45,sortable:true,dataIndex:"check_roleerror",renderer:ui.component._CheckDoc.renderer}];ui.component._Ch! eckDoc.fs=new Ext.data.SimpleStore({fields:[{name:"id"},{name:"file"}] });ui.component._CheckDoc.FileGrid=Ext.extend(Ext.grid.GridPanel,{id:"check-doc-file-grid",store:ui.component._CheckDoc.fs,loadMask:true,bodyBorder:false,autoExpandColumn:"file",sm:new Ext.grid.RowSelectionModel({listeners:{rowselect:function(c,b,a){Ext.getCmp("check-doc-btn-open-selected-files").enable()}}}),columns:[new Ext.grid.RowNumberer(),{id:"file",header:"Files",sortable:true,dataIndex:"file"}],listeners:{rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c)},rowdblclick:function(a,c,b){ui.component.RepositoryTree.instance.openFile("en"+a.fpath,a.store.getAt(c).data.file);Ext.getCmp("check-doc-file-win").close()}}});ui.component._CheckDoc.FileWin=Ext.extend(Ext.Window,{id:"check-doc-file-win",title:_("Files"),width:450,height:350,labelWidth:50,resizable:false,modal:true,autoScroll:true,layout:"fit",buttons:[{text:"Open all files",handler:function(){var c=Ext.getCmp("check-doc-file-win"),a=ui.component._CheckDoc.fs;phpDoc.filePendingOpen=new Array();for(va! r b=0;b<a.getCount();++b){phpDoc.filePendingOpen[b]={fpath:"en"+c.fpath,fname:a.getAt(b).data.file}}ui.component.RepositoryTree.instance.openFile(phpDoc.filePendingOpen[0].fpath,phpDoc.filePendingOpen[0].fname);c.close()}},{text:"Open selected files",id:"check-doc-btn-open-selected-files",disabled:true,handler:function(){var c=Ext.getCmp("check-doc-file-win"),b=Ext.getCmp("check-doc-file-grid").getSelectionModel().getSelections();phpDoc.filePendingOpen=new Array();for(var a=0;a<b.length;++a){phpDoc.filePendingOpen[a]={fpath:"en"+c.fpath,fname:b[a].data.file}}ui.component.RepositoryTree.instance.openFile(phpDoc.filePendingOpen[0].fpath,phpDoc.filePendingOpen[0].fname);c.close()}}]});ui.component.CheckDoc=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,store:ui.component._CheckDoc.ds,columns:ui.component._CheckDoc.columns,autoExpandColumn:"extension",sm:new Ext.grid.CellSelectionModel({singleSelect:true}),view:new Ext.grid.GridView({forceFit:true}),listeners:{re! nder:function(a){a.store.load.defer(20,a.store)},celldblclick:function (c,i,d,h){var a=c.getStore().getAt(i),g=c.getColumnModel().getDataIndex(d),f=a.get(g),b=a.data.path;if(Ext.num(f,false)&&f!=0){XHR({url:"./php/controller.php",params:{task:"getCheckDocFiles",path:b,errorType:g},success:function(e){var k=Ext.decode(e.responseText);ui.component._CheckDoc.fs.removeAll();for(var j=0;j<k.files.length;++j){ui.component._CheckDoc.fs.insert(0,new ui.component._CheckDoc.fs.recordType({id:j,file:k.files[j].name}))}ui.component._CheckDoc.fs.sort("file","asc");new ui.component._CheckDoc.FileWin({fpath:b,items:[new ui.component._CheckDoc.FileGrid({fpath:b})]}).show()}})}}}});Ext.namespace("ui","ui.component","ui.component._CVSLogGrid");ui.component._CVSLogGrid.store=Ext.extend(Ext.data.Store,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"revision",mapping:"revision"},{name:"date",mapping:"date",type:"date",dateFormat:"Y/m/d H:i:s"},{name:"author",mapping:"author"},{na! me:"content",mapping:"content"}]))});ui.component._CVSLogGrid.sm=Ext.extend(Ext.grid.CheckboxSelectionModel,{singleSelect:false,header:"",width:22,listeners:{beforerowselect:function(b){var a=b.getCount();if(a===2){return false}},rowselect:function(b){var a=b.getCount();if(a===2){Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).enable();Ext.get(b.prefix+"-PANEL-btn-log-"+b.fid).frame("3F8538")}else{Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).disable()}},rowdeselect:function(b){var a=b.getCount();if(a===2){Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).enable();Ext.get(b.prefix+"-PANEL-btn-log-"+b.fid).frame("3F8538")}else{Ext.getCmp(b.prefix+"-PANEL-btn-log-"+b.fid).disable()}}}});ui.component._CVSLogGrid.columns=[{id:"id",header:"Rev.",width:40,sortable:false,dataIndex:"revision"},{header:"Content",width:130,sortable:true,dataIndex:"content"},{header:"By",width:50,sortable:true,dataIndex:"author"},{header:"Date",width:85,sortable:true,dataIndex:"date",renderer:Ext.util.Format.d! ateRenderer(_("Y-m-d, H:i"))}];ui.component.CVSLogGrid=Ext.extend(Ext. grid.GridPanel,{loadMask:true,autoScroll:true,bodyBorder:false,autoExpandColumn:"content",initComponent:function(){var d=new ui.component._CVSLogGrid.sm({fid:this.fid,prefix:this.prefix}),a=new ui.component._CVSLogGrid.store({autoLoad:this.loadStore,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:this.fpath,File:this.fname}}),c=[];c.push(d);for(var b=0;b<ui.component._CVSLogGrid.columns.length;++b){c.push(ui.component._CVSLogGrid.columns[b])}a.setDefaultSort("date","desc");Ext.apply(this,{sm:d,store:a,columns:c,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,id:this.prefix+"-PANEL-btn-log-"+this.fid,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",disabled:true,handler:function(){var g=this.getSelectionModel().getSelections(),f=g[0].data.revision,e=g[1].data.revision;Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Finding the diff. Please, wait..."));XHR({url:"./php/con! troller.php",params:{task:"getDiff2",FilePath:this.fpath,FileName:this.fname,Rev1:f,Rev2:e},success:function(i){var j=Ext.util.JSON.decode(i.responseText);Ext.getBody().unmask();var h=new Ext.Window({title:String.format(_("Diff between {0} & {1}"),f,e),width:650,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:'<div class="diff-content">'+j.content+"</div>",buttons:[{text:"Close",handler:function(){h.close()}}]});h.show()}})}},{scope:this,id:this.prefix+"-PANEL-btn-refreshlog-"+this.fid,tooltip:"<b>Load/Refresh</b> revisions",iconCls:"refresh",handler:function(){this.store.reload()}}]});ui.component.CVSLogGrid.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._EditorConf");ui.component._EditorConf.tplMenu=new Ext.XTemplate('<tpl for=".">','<div class="thumb-wrap" id="tplMenu-{id}">','<div class="thumb"><img src="themes/img/{img}" title=""></div>',"<span>{label}</span>","</div>"! ,"</tpl>");ui.component._EditorConf.tplMenu.compile();ui.component._Ed itorConf.menuDefEn=[["1","go-home.png",_("Main")],["5","view-list-tree.png",_('Module "All files"')],["6","view-media-playlist.png",_('Module "Pending Patch"')]];ui.component._EditorConf.menuDefNonEn=[["1","go-home.png",_("Main")],["2","edit-redo.png",_('Module "Files Need Update"')],["3","dialog-cancel.png",_('Module "Files with Error"')],["4","document-properties.png",_('Module "Files need Reviewed"')],["5","view-list-tree.png",_('Module "All files"')],["6","view-media-playlist.png",_('Module "Pending Patch"')]];ui.component._EditorConf.menuStore=new Ext.data.SimpleStore({id:0,fields:[{name:"id"},{name:"img"},{name:"label"}]});ui.component._EditorConf.viewMenu=Ext.extend(Ext.DataView,{id:"conf-menu-view",tpl:ui.component._EditorConf.tplMenu,singleSelect:true,overClass:"x-view-over",itemSelector:"div.thumb-wrap",store:ui.component._EditorConf.menuStore,listeners:{selectionchange:function(b,a){var c=b.getSelectedRecords();Ext.getCmp("confCard").layout.setActiveItem("conf-car! d-"+c[0].data.id)}}});ui.component._EditorConf.themeStore=new Ext.data.SimpleStore({fields:["themeFile",{name:"themeName",type:"string"}],data:[["themes/black/css/xtheme-black.css",_("Black")],["themes/empty.css",_("Default")],["themes/darkgray/css/xtheme-darkgray.css",_("DarkGray")],["js/extjs/resources/css/xtheme-gray.css",_("Gray")],["themes/gray-extend/css/xtheme-gray-extend.css",_("Gray Extend")],["themes/indigo/css/xtheme-indigo.css",_("Indigo")],["themes/midnight/css/xtheme-midnight.css",_("Midnight")],["themes/olive/css/xtheme-olive.css",_("Olive")],["themes/purple/css/xtheme-purple.css",_("Purple")],["js/extjs/resources/css/xtheme-slate.css",_("Slate")],["themes/silverCherry/css/xtheme-silverCherry.css",_("SilverCherry")]]});ui.component._EditorConf.card1=Ext.extend(Ext.form.FormPanel,{id:"conf-card-1",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Themes"),autoHeight:true,defaults:{hideLabel:true},items:[{xtyp! e:"combo",id:"conf-combo-theme",valueField:"themeFile",displayField:"t hemeName",triggerAction:"all",mode:"local",forceSelection:true,editable:false,value:phpDoc.userConf.conf_theme,store:ui.component._EditorConf.themeStore,listeners:{render:function(){Ext.getCmp("conf-combo-theme").store.sort("themeName")},select:function(e,a,b){var d=e.getValue();Ext.get("appTheme").dom.href=d;new ui.task.UpdateConfTask({item:"conf_theme",value:d})}}}]}]});ui.component._EditorConf.card1.superclass.initComponent.call(this)}});ui.component._EditorConf.card2=Ext.extend(Ext.form.FormPanel,{id:"conf-card-2",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Diff view"),autoHeight:true,defaults:{hideLabel:true},defaultType:"radio",items:[{name:"conf_needupdate_diff",checked:(phpDoc.userConf.conf_needupdate_diff==="using-viewvc")?true:false,boxLabel:_("Using ViewVc from php web site"),inputValue:"using-viewvc",listeners:{check:function(a){if(a.checked){new ui.task.UpdateConfTask({item:"conf_needupdate_diff",value:a.! getRawValue()})}}}},{name:"conf_needupdate_diff",checked:(phpDoc.userConf.conf_needupdate_diff==="using-exec")?true:false,boxLabel:_("Using diff -kk -u command line"),inputValue:"using-exec",listeners:{check:function(a){if(a.checked){new ui.task.UpdateConfTask({item:"conf_needupdate_diff",value:a.getRawValue()})}}}}]},{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_needupdate_scrollbars",checked:(phpDoc.userConf.conf_needupdate_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_needupdate_scrollbars",value:a.getValue()})}}},{name:"conf_needupdate_displaylog",checked:(phpDoc.userConf.conf_needupdate_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_needupdate_displaylog",value:a.getValue()})}}}]}]});ui.co! mponent._EditorConf.card2.superclass.initComponent.call(this)}});ui.co mponent._EditorConf.card3=Ext.extend(Ext.form.FormPanel,{id:"conf-card-3",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Error type"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_error_skipnbliteraltag",checked:(phpDoc.userConf.conf_error_skipnbliteraltag==="true")?true:false,boxLabel:_("Skip nbLiteralTag error"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_error_skipnbliteraltag",value:a.getValue()})}}}]},{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_error_scrollbars",checked:(phpDoc.userConf.conf_error_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_error_scrollbars",value:a.getValue()})}}},{name:"conf_error_displaylog",checked:(phpDoc.userConf.conf_error_displaylog==="true")?true:false,boxLabel:_! ("Automatically load the log when displaying the file"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_error_displaylog",value:a.getValue()})}}}]}]});ui.component._EditorConf.card3.superclass.initComponent.call(this)}});ui.component._EditorConf.card4=Ext.extend(Ext.form.FormPanel,{id:"conf-card-4",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_reviewed_scrollbars",checked:(phpDoc.userConf.conf_reviewed_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_reviewed_scrollbars",value:a.getValue()})}}},{name:"conf_reviewed_displaylog",checked:(phpDoc.userConf.conf_reviewed_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){new ui.task.UpdateConfTask({ite! m:"conf_reviewed_displaylog",value:a.getValue()})}}}]}]});ui.component .._EditorConf.card4.superclass.initComponent.call(this)}});ui.component._EditorConf.card5=Ext.extend(Ext.form.FormPanel,{id:"conf-card-5",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_allfiles_displaylog",checked:(phpDoc.userConf.conf_allfiles_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_allfiles_displaylog",value:a.getValue()})}}}]}]});ui.component._EditorConf.card5.superclass.initComponent.call(this)}});ui.component._EditorConf.card6=Ext.extend(Ext.form.FormPanel,{id:"conf-card-6",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_patch_scrollbars",checked:(phpDoc.use! rConf.conf_patch_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_patch_scrollbars",value:a.getValue()})}}},{name:"conf_patch_displaylog",checked:(phpDoc.userConf.conf_patch_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){new ui.task.UpdateConfTask({item:"conf_patch_displaylog",value:a.getValue()})}}}]}]});ui.component._EditorConf.card6.superclass.initComponent.call(this)}});ui.component.EditorConf=Ext.extend(Ext.Window,{id:"win-conf",layout:"border",width:550,height:400,iconCls:"iconConf",title:_("Configuration"),modal:true,plain:true,buttons:[{text:_("Close"),handler:function(){Ext.getCmp("win-conf").close()}}],listeners:{show:function(){var a=Ext.getCmp("conf-menu-view");a.select(a.getNode(0))}},initComponent:function(){if(phpDoc.userLang==="en"){ui.component._EditorConf.menuStore.loadData(ui.component._Ed! itorConf.menuDefEn)}else{ui.component._EditorConf.menuStore.loadData(u i.component._EditorConf.menuDefNonEn)}Ext.apply(this,{items:[{id:"confMenu",region:"west",width:190,autoScroll:true,items:[new ui.component._EditorConf.viewMenu()]},{id:"confCard",region:"center",layout:"slide",width:375,frame:true,activeItem:0,bbar:new Ext.StatusBar({defaultText:_("All changes take effect immediately"),defaultIconCls:"confStatusBar"}),items:[new ui.component._EditorConf.card1(),new ui.component._EditorConf.card2(),new ui.component._EditorConf.card3(),new ui.component._EditorConf.card4(),new ui.component._EditorConf.card5(),new ui.component._EditorConf.card6()]}]});ui.component.EditorConf.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._ErrorFileGrid");ui.component._ErrorFileGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"maintainer"! ,mapping:"maintainer"},{name:"type",mapping:"type"},{name:"value_en",mapping:"value_en"},{name:"value_lang",mapping:"value_lang"},{name:"needcommit",mapping:"needcommit"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-error-nb").innerHTML=a.getCount()}}});ui.component._ErrorFileGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Type"),width:45,sortable:true,dataIndex:"type"},{header:_("Maintainer"),width:45,sortable:true,dataIndex:"maintainer"},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._ErrorFileGrid.view=new Ext.grid.GroupingView({emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>",forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',getRowClass:function(a,d,c,b){if(a.data.needcommit){return"file-need-commit"}}});ui.component._ErrorFileGrid.menu=fun! ction(a){Ext.apply(this,a);this.init();ui.component._ErrorFileGrid.men u.superclass.constructor.call(this)};Ext.extend(ui.component._ErrorFileGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"FilesError",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},{scope:this,hidden:this.hideCommit,text:("View Diff"),iconCls:"iconViewDiff",handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext.get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" />'+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:this.lang+this.fpath,FileName:this.fname},success:function(a){var b=Ext.util.JSON.decode! (a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}},"-",{text:_("About error type"),iconCls:"iconHelp",handler:function(){if(!Ext.getCmp("main-panel").findById("FE-help")){Ext.getCmp("main-panel").add({id:"FE-help",title:_("About error type"),iconCls:"iconHelp",closable:true,autoScroll:true,autoLoad:"./error_type.php"});Ext.getCmp("main-panel").setActiveTab("FE-help")}else{Ext.getCmp("main-panel").setActiveTab("FE-help")}}}]})}});ui.component.ErrorFileGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",view:ui.component._ErrorFileGrid.view,columns:ui.component._ErrorFileGrid.columns,listeners:{render:function(a){a.view.refresh()},rowcontextmenu:function(b,f,d){var c=b.store.getAt(f).data.path,a=b.store.getAt(f).data.name;b.getSelectionModel().selectRow(f);new ui.component._ErrorFileGrid.menu({hideCommit:(b.store.getAt(f).data.needcommit===false),grid:b,event:d,r! owIdx:f,lang:phpDoc.userLang,fpath:c,fname:a}).showAt(d.getXY())},rowd blclick:function(c,i,h){var f=c.store.getAt(i),d=f.data.path,a=f.data.name,g=Ext.util.md5("FE-"+phpDoc.userLang+d+a),b=[];if(!Ext.getCmp("main-panel").findById("FE-"+g)){b=[];c.store.each(function(e){if(e.data.path===d&&e.data.name===a&&!b[e.data.type]){b.push(e.data.type)}});Ext.getCmp("main-panel").add({id:"FE-"+g,title:a,layout:"border",iconCls:"iconTabError",closable:true,originTitle:a,defaults:{split:true},tabTip:String.format(_("File with error : in {0}"),d),items:[{xtype:"panel",id:"FE-error-desc-"+g,region:"north",layout:"fit",title:_("Error description"),height:150,collapsible:true,collapsed:true,items:{xtype:"iframepanel",id:"FE-error-type-"+g,loadMask:true,defaultSrc:"./error_type.php?dir="+d+"&file="+a}},{region:"west",xtype:"panel",title:_("CvsLog"),collapsible:true,collapsed:true,layout:"fit",bodyBorder:false,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[new ui.component.CVSLogGrid({layout:"fit",title:phpDo! c.userLang,prefix:"FE-LANG",fid:g,fpath:phpDoc.userLang+d,fname:a,loadStore:(phpDoc.userConf.conf_error_displaylog==="true")}),new ui.component.CVSLogGrid({layout:"fit",title:"en",prefix:"FE-EN",fid:g,fpath:"en"+d,fname:a,loadStore:(phpDoc.userConf.conf_error_displaylog==="true")})]}},new ui.component.FilePanel({id:"FE-LANG-PANEL-"+g,region:"center",title:String.format(_("{0} File: "),phpDoc.userLang)+d+a,prefix:"FE",ftype:"LANG",fid:g,fpath:d,fname:a,lang:phpDoc.userLang,parser:"xml",storeRecord:f,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_error_scrollbars"}),new ui.component.FilePanel({id:"FE-EN-PANEL-"+g,region:"east",width:575,title:_("en File: ")+d+a,prefix:"FE",ftype:"EN",fid:g,fpath:d,fname:a,lang:"en",parser:"xml",storeRecord:f,syncScroll:true,syncScrollConf:"conf_error_scrollbars"})]});Ext.getCmp("main-panel").setActiveTab("FE-"+g);if(Ext.getCmp("FE-"+g).getLayout().north.collapsedEl){Ext.getCmp("FE-"+g).getLayout().north.collapsedEl.addClass("x-layout-! collapsed-east-error-desc")}}else{Ext.getCmp("main-panel").setActiveTa b("FE-"+g)}}},initComponent:function(){ui.component.ErrorFileGrid.instance=this;Ext.apply(this,{store:new ui.component._ErrorFileGrid.store({autoLoad:(phpDoc.userLang!=="en"),proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesError"}}),tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FE-filter",width:180,hideTrigger1:true,enableKeyEvents:true,validateOnBlur:false,validationEvent:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();ui.component.ErrorFileGrid.instance.store.clearFilter()},onTrigger2Click:function(){var a=this.getValue();if(a==""||a.length<3){this.markInvalid(_("Your filter must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();ui.component.ErrorFileGrid.instance.store.filter("maintainer",a)}})]});ui.compon! ent.ErrorFileGrid.superclass.initComponent.call(this)}});ui.component.ErrorFileGrid.prototype.instance=null;Ext.namespace("ui","ui.component");ui.component.ExecDiff=Ext.extend(Ext.Panel,{layout:"fit",title:_("Diff From cvs"),height:150,autoScroll:true,collapsed:true,listeners:{render:function(){XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff2",FilePath:"en"+this.fpath,FileName:this.fname,Rev1:this.rev1,Rev2:this.rev2},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get(this.prefix+"-diff-"+this.fid).dom.innerHTML=b.content}})}},initComponent:function(){Ext.apply(this,{html:'<div id="'+this.prefix+"-diff-"+this.fid+'" class="diff-content"></div>',});ui.component.ExecDiff.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._FilePanel");Ext.namespace("ui.component._FilePanel.tbar.menu");ui.component._FilePanel.tbar.menu.lang=function(a){Ext.apply(this,a);this.init();ui.component._FilePanel.tbar.menu.lang.su! perclass.constructor.call(this)};Ext.extend(ui.component._FilePanel.tb ar.menu.lang,Ext.Toolbar.Button,{text:_("MarkUp"),iconCls:"iconInsertCode",init:function(){Ext.apply(this,{menu:new Ext.menu.Menu({items:[{scope:this,text:_("Reviewed tag"),handler:function(){Ext.getCmp(this.comp_id).insertIntoLine(2,"end","\n<!-- Reviewed: no -->");Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Revcheck tag"),handler:function(){Ext.getCmp(this.comp_id).insertIntoLine(2,"end","\n<!-- EN-Revision: 1.XX Maintainer: "+phpDoc.userLogin+" Status: ready -->");Ext.getCmp(this.comp_id).focus()}}]})})}});ui.component._FilePanel.tbar.menu.en=function(a){Ext.apply(this,a);this.init();ui.component._FilePanel.tbar.menu.en.superclass.constructor.call(this)};Ext.extend(ui.component._FilePanel.tbar.menu.en,Ext.Toolbar.Button,{text:_("MarkUp"),iconCls:"iconInsertCode",init:function(){Ext.apply(this,{menu:new Ext.menu.Menu({items:[{scope:this,text:_("Description section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.g! etCmp(this.comp_id).insertIntoLine(a.line,0,' <refsect1 role="description"><!-- {{{ -->\r\n &reftitle.description;\r\n <methodsynopsis>\r\n <!-- Example: All functions have this -->\r\n <type>thereturned type</type><methodname>func_name</methodname>\r\n <!-- Example: Required parameter -->\r\n <methodparam><type>param1type</type><parameter>firstparameter</parameter></methodparam>\r\n <!-- Example: Optional parameter, also by reference -->\r\n <methodparam choice="opt"><type>int</type><parameter role="reference">secondparameter</parameter></methodparam>\r\n <!-- Example: If no methodparams exist (void), use this -->\r\n <void />\r\n </methodsynopsis>\r\n <para>\r\n The function description goes here.\r\n </para>\r\n </refsect1><!-- }}} -->');Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Parameters section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line! ,0,'\r\n<refsect1 role="parameters"><!-- {{{ -->\r\n&reftitle.paramete rs;\r\n<para>\r\n<variablelist>\r\n<varlistentry>\r\n<term><parameter>firstparameter</parameter></term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n<varlistentry>\r\n<term>\r\n<parameter>secondparameter</parameter>\r\n</term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n</variablelist>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Return section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line,0,'\r\n<refsect1 role="returnvalues"><!-- {{{ -->\r\n&reftitle.returnvalues;\r\n<para>\r\nWhat this function returns, first on success, then failure.\r\nIf simply true on success and false on failure, just use &return.success; here.\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Error section"),handler:functi! on(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line,0,'\r\n<refsect1 role="errors"><!-- {{{ -->\r\n&reftitle.errors;\r\n<para>\r\nWhen does this function issue E_* level errors, and/or throw exceptions.\r\n</para>\r\n</refsect1><!-- }}} -->\r\n');Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Unicode section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line,0,'\r\n<refsect1 role="unicode"><!-- {{{ -->\r\n&reftitle.unicode;\r\n<para>\r\nInformation specific to unicode, from the PHP 6 changes.\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Changelog section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line,0,'\r\n<refsect1 role="changelog"><!-- {{{ -->\r\n&reftitle.chang! elog;\r\n<para>\r\n<informaltable>\r\n<tgroup cols="2">\r\n<thead>\r\n <row>\r\n<entry>&Version;</entry>\r\n<entry>&Description;</entry>\r\n</row>\r\n</thead>\r\n<tbody>\r\n<row>\r\n<entry>Enter the version of change here</entry>\r\n<entry>\r\nDescribe the change\r\n</entry>\r\n</row>\r\n</tbody>\r\n</tgroup>\r\n</informaltable>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Examples section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line,0,"\r\n<refsect1 role=\"examples\"><!-- {{{ -->\r\n&reftitle.examples;\r\n<para>\r\n<example xml:id=\"function-name.example.basic\"><!-- {{{ -->\r\n<title><function>function-name</function> example</title>\r\n<para>\r\nAny text that describes the purpose of the example, or what\r\ngoes on in the example should be here. (Inside the <example> tag, not out).\r\n</para>\r\n<programlisting role=\"php\">\r\n<![CDATA[\r\n<?php\r\nif ($anexample === true) {\r\necho 'Use the PEAR ! Coding standards';\r\n}\r\nif ($thereisoutput === 'and it is multiple lines') {\r\necho 'Use a screen like we did below';\r\n}\r\n?>\r\n]]>\r\n</programlisting>\r\n&example.outputs.similar;\r\n<screen>\r\n<![CDATA[\r\nUse the PEAR Coding standards\r\nUse a screen like we did below\r\n]]>\r\n</screen>\r\n</example><!-- }}} -->\r\n</para>\r\n</refsect1><!-- }}} -->");Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Notes section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line,0,'\r\n<refsect1 role="notes"><!-- {{{ -->\r\n&reftitle.notes;\r\n<caution>\r\n<para>\r\nAny notes that don\'t fit anywhere else should go here.\r\n90% of the time, notes, warnings or cautions are better placed in the\r\nparameters section. Consider that before using this section!\r\n</para>\r\n</caution>\r\n¬e.language-construct;\r\n¬e.not-bin-safe;\r\n¬e.registerglobals;\r\n</refsect1><!-- }}} --! >');Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("SeeAlso sec tion"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(this.comp_id).insertIntoLine(a.line,0,'\r\n<refsect1 role="seealso"><!-- {{{ -->\r\n&reftitle.seealso;\r\n<para>\r\n<simplelist>\r\n<member><function>somefunc</function></member>\r\n<member><function>another_func</function></member>\r\n<member>The <link linkend="something">something appendix</link></member>\r\n</simplelist>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(this.comp_id).focus()}}]})})}});ui.component.FilePanel=Ext.extend(Ext.form.FormPanel,{activeScroll:false,initComponent:function(){var a=this.prefix+"-"+this.ftype;this.bbar=(this.syncScrollCB)?[{xtype:"checkbox",name:"conf_needupdate_scrollbars",hideLabel:true,checked:(phpDoc.userConf[this.syncScrollConf]==="true"),boxLabel:_("Synchronize scroll bars"),listeners:{scope:this,check:function(b){phpDoc.confUpdate(this.syncScrollConf,b.getValue())},render:function(b){Ext.DomHelper.insertHtml("beforeBeg! in",b.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="'+a+"-status-line-"+this.fid+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="'+a+"-status-col-"+this.fid+'">-</span></span></div> ')}}}]:[{xtype:"panel",height:21,baseCls:"",bodyStyle:"padding-top:5px;",html:'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="'+a+"-status-line-"+this.fid+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="'+a+"-status-col-"+this.fid+'">-</span></span></div> '}];if(!this.readOnly){this.tbar=(this.isPatch)?[{id:a+"-PANEL-btn-save-"+this.fid,scope:this,tooltip:_("<b>Accept</b> this patch and <b>Save</b> the file"),iconCls:"saveFile",handler:function(){new ui.task.AcceptPatchTask({fid:this.fid,fpath:this.fpath,fname:this.fname,fuid:this.fuid,storeRecord:this.storeRecord}! )}},{id:a+"-PANEL-btn-reject-"+this.fid,scope:this,tooltip:_("<b>Rejec t</b> this patch"),iconCls:"iconPageDelete",handler:function(){new ui.task.RejectPatchTask({fid:this.fid,fuid:this.fuid,storeRecord:this.storeRecord})}},"-",{scope:this,tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp(a+"-FILE-"+this.fid).reIndentAll()}}]:[{id:a+"-PANEL-btn-save-"+this.fid,scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",disabled:true,handler:function(){if(this.lang==="en"){new ui.task.SaveENFileTask({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:this.fpath,fname:this.fname,storeRecord:this.storeRecord})}else{phpDoc.saveLangFile(this.prefix,this.ftype,this.fid,this.fpath,this.fname,this.lang,this.storeRecord)}}},{id:a+"-PANEL-btn-saveas-"+this.fid,scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",disabled:true,handler:function(){new ui.component.PatchPrompt({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:this.fpath,fname:this.fname,lang:this.lang,defaultEmail:(ph! pDoc.userLogin!=="cvsread")?phpDoc.userLogin+"@php.net":""}).show()}},"-",{scope:this,tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp(a+"-FILE-"+this.fid).reIndentAll()}},(this.lang==="en")?new ui.component._FilePanel.tbar.menu.en({comp_id:a+"-FILE-"+this.fid}):new ui.component._FilePanel.tbar.menu.lang({comp_id:a+"-FILE-"+this.fid})]}else{this.tbar=[{}]}Ext.apply(this,{originTitle:this.title,items:[{xtype:"codemirror",id:a+"-FILE-"+this.fid,readOnly:this.readOnly,parser:this.parser,isModified:false,listeners:{scope:this,initialize:function(){new ui.task.GetFileTask({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:(this.isPatch)?this.fpath:this.lang+this.fpath,fname:(this.isPatch)?this.fname+"."+this.fuid+".patch":this.fname})},cmchange:function(e,c,d){if(e===116){return}var b=Ext.util.JSON.decode(Ext.getCmp(a+"-FILE-"+this.fid).getCursorPosition());Ext.get(a+"-status-line-"+this.fid).dom.innerHTML=b.line;Ext.get(a+"-sta! tus-col-"+this.fid).dom.innerHTML=b.caracter;if(e!==27&&e!==33&&e!==34 &&e!==37&&e!==38&&e!==39&&e!==40&&e!==17&&e!==16&&e!==67){if(!Ext.getCmp(a+"-FILE-"+this.fid).isModified){Ext.getCmp(a+"-PANEL-"+this.fid).setTitle(Ext.getCmp(a+"-PANEL-"+this.fid).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp(this.prefix+"-"+this.fid).setTitle(Ext.getCmp(this.prefix+"-"+this.fid).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp(a+"-PANEL-btn-save-"+this.fid).enable();Ext.get(a+"-PANEL-btn-save-"+this.fid).frame("3F8538");if(this.isPatch){Ext.getCmp(a+"-PANEL-btn-reject-"+this.fid).enable();Ext.get(a+"-PANEL-btn-reject-"+this.fid).frame("3F8538")}else{Ext.getCmp(a+"-PANEL-btn-saveas-"+this.fid).enable();Ext.get(a+"-PANEL-btn-saveas-"+this.fid).frame("3F8538")}Ext.getCmp(a+"-FILE-"+this.fid).isModified=true}}},cmcursormove:function(){var b=Ext.util.JSON.decode(Ext.getCmp(a+"-FILE-"+this.fid).getCursorPosition());Ext.get(a+"-status-line-"+this.fid).dom.innerHTML=b.line;Ext.get! (a+"-status-col-"+this.fid).dom.innerHTML=b.caracter},cmscroll:function(e){if(this.syncScroll&&phpDoc.userConf[this.syncScrollConf]==="true"){var c;switch(this.ftype){case"EN":c=this.prefix+"-LANG";break;case"LANG":c=this.prefix+"-EN";break;case"PATCH":c=this.prefix+"-ORIGIN";break;case"ORIGIN":c=this.prefix+"-PATCH";break}var d=Ext.getCmp(c+"-PANEL-"+this.fid),b=Ext.getCmp(c+"-FILE-"+this.fid);if(d.activeScroll===false){this.activeScroll=true;b.scrollTo(e)}else{d.activeScroll=false}}}}}]});ui.component.FilePanel.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._LocalMailGrid");ui.component._LocalMailGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLastNews"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"title",mapping:"title"},{name:"link",mapping:"link"},{name:"description",mapping:"desc! ription"},{name:"pubDate",mapping:"pubDate",type:"date",dateFormat:"Y/ m/d H:i:s"}]))});ui.component._LocalMailGrid.store.setDefaultSort("pubDate","desc");ui.component._LocalMailGrid.columns=[new Ext.grid.RowNumberer(),{id:"GridMailingTitle",header:_("Title"),sortable:true,dataIndex:"title"},{header:_("By"),width:110,sortable:true,dataIndex:"description"},{header:_("Date"),width:140,sortable:true,dataIndex:"pubDate",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))}];ui.component.LocalMailGrid=Ext.extend(Ext.grid.GridPanel,{iconCls:"home-mailing-title",height:400,width:800,loadMask:true,autoScroll:true,autoExpandColumn:"GridMailingTitle",store:ui.component._LocalMailGrid.store,columns:ui.component._LocalMailGrid.columns,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),listeners:{render:function(a){a.store.load.defer(20,a.store)},rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c);new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+_("Open in a new Tab")+"</b>",iconCls:"openInTab",handler:function(){a.fireEvent("rowdblcli! ck",a,c,b)}},"-",{text:_("Refresh this grid"),iconCls:"refresh",handler:function(){a.store.reload()}}]}).showAt(b.getXY())},rowdblclick:function(b,g,d){var a=b.store.getAt(g).data.pubDate,f=b.store.getAt(g).data.link,c=b.store.getAt(g).data.title;Ext.getCmp("main-panel").add({xtype:"iframepanel",id:"mifp_"+a,title:_("Loading..."),tabTip:c,iconCls:"home-mailing-title",loadMask:true,defaultSrc:f,listeners:{documentloaded:function(e){e.ownerCt.setTitle(Ext.util.Format.substr(c,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_"+a)}},initComponent:function(){Ext.apply(this,{title:String.format(_("Mails from {0}"),"doc-"+phpDoc.userLang),tbar:[{tooltip:_("Refresh this grid"),iconCls:"refresh",handler:function(){ui.component.LocalMailGrid.reload()}}]});ui.component.LocalMailGrid.superclass.initComponent.call(this)}});ui.component.LocalMailGrid.reload=function(){ui.component._LocalMailGrid.store.reload()};Ext.namespace("ui","ui.component");ui.component.MainMenu=function! (a){Ext.apply(this,a);this.init();ui.component.MainMenu.superclass.con structor.call(this)};Ext.extend(ui.component.MainMenu,Ext.menu.Menu,{id:"mainMenu",init:function(){Ext.apply(this,{items:[{text:_("Refresh all data"),disabled:(phpDoc.userLogin==="cvsread")?true:false,iconCls:"refresh",handler:phpDoc.WinUpdate},{text:_("Check Build"),disabled:(phpDoc.userLogin==="cvsread")?true:false,iconCls:"checkBuild",handler:phpDoc.WinCheckBuild},{text:_("EN tools"),handler:function(){return false},menu:new Ext.menu.Menu({items:[{text:_("Translation build status"),iconCls:"BuildStatus",handler:function(){var a=Ext.getCmp("tab-build-status");if(a===undefined){Ext.getCmp("main-panel").add({id:"tab-build-status",title:_("Translation build status"),iconCls:"BuildStatus",layout:"fit",closable:true,html:"nothing"});a=Ext.getCmp("tab-build-status")}if(a.items){a.removeAll(true)}a.add(new ui.component.BuildStatus());a.doLayout();Ext.getCmp("main-panel").setActiveTab("tab-build-status")}},{text:_("Script Check doc"),iconCls:"CheckDoc",handler:function(){var a=Ext! .getCmp("tab-check-doc");if(a===undefined){Ext.getCmp("main-panel").add({id:"tab-check-doc",title:"Check Doc",iconCls:"CheckDoc",layout:"fit",closable:true,html:"nothing"});a=Ext.getCmp("tab-check-doc")}if(a.items){a.removeAll(true)}a.add(new ui.component.CheckDoc());a.doLayout();Ext.getCmp("main-panel").setActiveTab("tab-check-doc")}}]})},"-",{text:_("Configure"),iconCls:"iconConf",tooltip:"<b>Configure</b> this tool",id:"winconf-btn",handler:function(){new ui.component.EditorConf().show(Ext.get("winconf-btn"))}},"-",{text:_("Erase my personal data"),disabled:(phpDoc.userLogin==="cvsread")?true:false,iconCls:"iconErasePersonalData",handler:function(){Ext.MessageBox.confirm(_("Confirm"),_("This action will erase your personal data. All content about this account will be deleted definitively. Are you sure you want to do that ?"),function(a){if(a==="yes"){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({url:! "./php/controller.php",params:{task:"erasePersonalData"},success:funct ion(b){Ext.getBody().unmask();Ext.MessageBox.show({title:_("Thanks !"),msg:_("Thank you for using this application !"),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.OK,fn:function(){window.location.href="./php/controller.php?task=logout"}})},failure:function(b){phpDoc.winForbidden()}})}})}},"-",{text:_("Log out"),iconCls:"iconLogOut",handler:function(){Ext.MessageBox.confirm(_("Confirm"),_("Are you sure you want to logout?"),function(a){if(a==="yes"){window.location.href="./php/controller.php?task=logout"}})}},"-",{id:"winabout-btn",text:_("About"),iconCls:"iconHelp",handler:function(){new ui.component.About().show(Ext.get("winabout-btn"))}}]})}});Ext.namespace("ui","ui.component","ui.component._NotInENGrid");ui.component._NotInENGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"needcommi! t",mapping:"needcommit"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-notInEn-nb").innerHTML=a.getCount()}}});ui.component._NotInENGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._NotInENGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>",getRowClass:function(a,d,c,b){if(a.data.needcommit){return"file-need-commit"}}});ui.component._NotInENGrid.menu=function(a){Ext.apply(this,a);this.init();ui.component._NotInENGrid.menu.superclass.constructor.call(this)};Ext.extend(ui.component._NotInENGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:_("Remove this file"),iconCls:"iconDelete",handler:function(){! this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}}] })}});ui.component.NotInENGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",view:ui.component._NotInENGrid.view,columns:ui.component._NotInENGrid.columns,listeners:{rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c);if(!a.store.getAt(c).data.needcommit){new ui.component._NotInENGrid.menu({grid:a,rowIdx:c,event:b}).showAt(b.getXY())}},rowdblclick:function(b,g,f){var d=b.store.getAt(g),c=d.data.path,a=d.data.name;new ui.task.MarkDeleteTask({fpath:c,fname:a,storeRecord:d})}},initComponent:function(){ui.component.NotInENGrid.instance=this;Ext.apply(this,{store:new ui.component._NotInENGrid.store({autoLoad:(phpDoc.userLang==="en")?false:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNotInEn"}})});ui.component.NotInENGrid.superclass.initComponent.call(this)}});ui.component.NotInENGrid.prototype.instance=null;Ext.namespace("ui","ui.component");ui.component.PatchPrompt=Ext.extend(Ext.W! indow,{title:_("Do you want to be alerted ?"),iconCls:"patchAlert",layout:"form",bodyStyle:"padding: 5px;",labelWidth:50,width:350,height:150,resizable:false,modal:true,autoScroll:true,initComponent:function(){Ext.apply(this,{items:[{xtype:"panel",baseCls:"x-plain",bodyStyle:"padding-bottom: 10px;",html:_("If you want to be notified when your patch will be dealt with, thank you to leave an email address below.")},{id:"patch-email-alert",xtype:"textfield",name:"patch-email-alert",fieldLabel:_("Email"),anchor:"100%",value:this.defaultEmail}],buttons:[{scope:this,text:_("Save"),handler:function(){new ui.task.SavePatchTask({prefix:this.prefix,fid:this.fid,ftype:this.ftype,lang:this.lang,fpath:this.fpath,fname:this.fname,email:Ext.getCmp("patch-email-alert").getValue()});this.close()}},{scope:this,text:_("Cancel"),handler:function(){this.close()}}]});ui.component.PatchPrompt.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._PendingCommitGrid! ");ui.component._PendingCommitGrid.store=Ext.extend(Ext.data.GroupingS tore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"by",mapping:"by"},{name:"date",mapping:"date",type:"date",dateFormat:"Y-m-d H:i:s"},{name:"type",mapping:"type"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{add:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()},datachanged:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()}}});ui.component._PendingCommitGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Modified by"),width:45,sortable:true,dataIndex:"by"},{header:_("Date"),width:45,sortable:true,dataIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._PendingCommitGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["pat! h"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',emptyText:'<div style="text-align: center;">'+_("No pending for Commit")+"</div>",getRowClass:function(a,d,c,b){if(a.data.type==="update"){return"file-needcommit-update"}if(a.data.type==="delete"){return"file-needcommit-delete"}if(a.data.type==="new"){return"file-needcommit-new"}}});Ext.namespace("ui.component._PendingCommitGrid.menu");ui.component._PendingCommitGrid.menu.common=function(a){Ext.apply(this,a);this.init();ui.component._PendingCommitGrid.menu.common.superclass.constructor.call(this)};Ext.extend(ui.component._PendingCommitGrid.menu.common,Ext.menu.Item,{init:function(){Ext.apply(this,{text:_("Commit..."),iconCls:"iconCommitFileCvs",disabled:(phpDoc.userLogin==="cvsread"),handler:function(){return false},menu:new Ext.menu.Menu({items:[{scope:this,text:_("...this file"),iconCls:"iconCommitFileCvs",handler:function(){phpDoc.WinCommit(true,this.rowIdx)}},{scope:this,text:_("! ...all files modified by me"),iconCls:"iconCommitFileCvs",handler:func tion(){phpDoc.WinCommit(false,"","by me")}},{scope:this,text:_("...all files modified"),iconCls:"iconCommitFileCvs",handler:function(){phpDoc.WinCommit(false)}}]})})}});ui.component._PendingCommitGrid.menu.update=function(a){Ext.apply(this,a);this.init();ui.component._PendingCommitGrid.menu.update.superclass.constructor.call(this)};Ext.extend(ui.component._PendingCommitGrid.menu.update,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"PendingCommit",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},"-",{scope:this,text:_("View Diff"),iconCls:"iconViewDiff",handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,iconCls:"iconTabLink",title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,html:'<div id="diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext! .get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:this.fpath,FileName:this.fname},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}},{scope:this,text:_("Download the diff as a patch"),iconCls:"iconCommitFileCvs",handler:function(){window.location.href="./php/controller.php?task=downloadPatch&FilePath="+this.fpath+"&FileName="+this.fname}},"-",{scope:this,text:_("Clear this change"),iconCls:"iconPageDelete",disabled:(phpDoc.userLogin==="cvsread"),handler:function(){new ui.task.ClearLocalChangeTask({storeRecord:this.grid.store.getAt(this.rowIdx),ftype:"update",fpath:this.fpath,fname:this.fname})}},"-",new ui.component._PendingCommitGrid.menu.common({rowIdx:this.rowIdx})]})}});ui.component._PendingCommit! Grid.menu.del=function(a){Ext.apply(this,a);this.init();ui.component._ PendingCommitGrid.menu.del.superclass.constructor.call(this)};Ext.extend(ui.component._PendingCommitGrid.menu.del,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Cancel")+"<b>",iconCls:"iconPageDelete",disabled:(phpDoc.userLogin==="cvsread"),handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},"-",new ui.component._PendingCommitGrid.menu.common({rowIdx:this.rowIdx})]})}});ui.component.PendingCommitGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",columns:ui.component._PendingCommitGrid.columns,view:ui.component._PendingCommitGrid.view,listeners:{rowcontextmenu:function(c,h,g){var f=c.store.getAt(h),b=f.data.type,d=f.data.path,a=f.data.name;c.getSelectionModel().selectRow(h);if(b==="delete"){new ui.component._PendingCommitGrid.menu.del({grid:c,rowIdx:h,event:g}).showAt(g.getXY())}if(b==="update"){new ui.component._PendingCommitGrid.menu.update({fpath:d,fname:a,grid:c,r! owIdx:h,event:g}).showAt(g.getXY())}},rowdblclick:function(c,h,g){var f=c.store.getAt(h),b=f.data.type,d=f.data.path,a=f.data.name;if(b==="update"){ui.component.RepositoryTree.instance.openFile(d,a)}if(b==="delete"){new ui.task.ClearLocalChangeTask({storeRecord:f,ftype:b,fpath:d,fname:a})}}},initComponent:function(){ui.component.PendingCommitGrid.instance=this;Ext.apply(this,{store:new ui.component._PendingCommitGrid.store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesPendingCommit"}})});ui.component.PendingCommitGrid.superclass.initComponent.call(this)},addRecord:function(d,a,e,c){var b=false;this.store.each(function(f){if(f.data.path===a&&f.data.name===e){b=true}});if(!b){this.store.insert(0,new this.store.recordType({id:d,path:a,name:e,by:phpDoc.userLogin,date:new Date(),type:c}));this.store.groupBy("path",true)}}});ui.component.PendingCommitGrid.prototype.instance=null;Ext.namespace("ui","ui.component","ui.component.! _PendingPatchGrid");ui.component._PendingPatchGrid.store=Ext.extend(Ex t.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"by",mapping:"by"},{name:"uniqID",mapping:"uniqID"},{name:"date",mapping:"date",type:"date",dateFormat:"Y-m-d H:i:s"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{add:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()},datachanged:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()}}});ui.component._PendingPatchGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Posted by"),width:45,sortable:true,dataIndex:"by"},{header:_("Date"),width:45,sortable:true,dataIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._PendingPatchGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.r! s[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',emptyText:'<div style="text-align: center;">'+_("No pending Patch")+"</div>"});ui.component._PendingPatchGrid.menu=function(a){Ext.apply(this,a);this.init();ui.component._PendingPatchGrid.menu.superclass.constructor.call(this)};Ext.extend(ui.component._PendingPatchGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"PendingPatch",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},"-",{scope:this,text:_("Reject this patch"),iconCls:"iconPageDelete",handler:function(){new ui.task.RejectPatchTask({fid:this.fid,fuid:this.fuid,storeRecord:this.grid.store.getAt(this.rowIdx)})}}]})}});ui.component.PendingPatchGrid=Ext.extend(Ext.grid.GridPanel,{store:ui.component._PendingPatchGrid.store,columns:ui.component._PendingPatchGrid.columns,view:ui.component._PendingPatchGrid! .view,loadMask:true,bodyBorder:false,autoExpandColumn:"name",listeners :{rowcontextmenu:function(b,h,g){var c=b.store.getAt(h).data.path,a=b.store.getAt(h).data.name,d=b.store.getAt(h).data.uniqID,f=Ext.util.md5("PP-"+d+c+a);b.getSelectionModel().selectRow(h);new ui.component._PendingPatchGrid.menu({grid:b,rowIdx:h,event:g,fid:f,fpath:c,fname:a,fuid:d}).showAt(g.getXY())},rowdblclick:function(b,i,h){var f=b.store.getAt(i),c=f.data.path,a=f.data.name,d=f.data.uniqID,g=Ext.util.md5("PP-"+d+c+a);if(!Ext.getCmp("main-panel").findById("PP-"+g)){Ext.getCmp("main-panel").add({id:"PP-"+g,layout:"border",iconCls:"PendingPatch",title:a,originTitle:a,tabTip:String.format(_("Patch for {0}"),c+a),closable:true,defaults:{split:true},items:[{xtype:"panel",id:"PP-patch-desc-"+g,title:_("Patch content"),layout:"fit",region:"north",height:150,autoScroll:true,collapsible:true,collapsed:true,html:'<div id="diff_content_'+g+'" class="diff-content"></div>',listeners:{render:function(){XHR({url:"./php/controller.php",params:{task:"getDiff",FilePath:c,FileName:a,type:! "patch",uniqID:d},success:function(e){var j=Ext.util.JSON.decode(e.responseText);Ext.get("diff_content_"+g).dom.innerHTML=j.content}})}}},{region:"west",xtype:"panel",title:_("CvsLog"),layout:"fit",bodyBorder:false,collapsible:true,collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:new ui.component.CVSLogGrid({layout:"fit",title:_("Log"),prefix:"PP",fid:g,fpath:c,fname:a,loadStore:(phpDoc.userConf.conf_patch_displaylog==="true")})}},new ui.component.FilePanel({id:"PP-PATCH-PANEL-"+g,region:"center",title:String.format(_("Proposed Patch for {0}"),c+a),prefix:"PP",ftype:"PATCH",fid:g,fpath:c,fname:a,isPatch:true,fuid:d,parser:"xml",storeRecord:f,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_patch_scrollbars"}),new ui.component.FilePanel({id:"PP-ORIGIN-PANEL-"+g,region:"east",width:575,title:_("Original File: ")+c+a,prefix:"PP",ftype:"ORIGIN",fid:g,fpath:c,fname:a,lang:"",readOnly:true,parser:"xml",syncSc! roll:true,syncScrollConf:"conf_patch_scrollbars"})]});Ext.getCmp("main -panel").setActiveTab("PP-"+g);if(Ext.getCmp("PP-"+g).getLayout().north.collapsedEl){Ext.getCmp("PP-"+g).getLayout().north.collapsedEl.addClass("x-layout-collapsed-east-patch-desc")}}else{Ext.getCmp("main-panel").setActiveTab("PP-"+g)}}},initComponent:function(){ui.component.PendingPatchGrid.instance=this;Ext.apply(this,{store:new ui.component._PendingPatchGrid.store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesPendingPatch"}})});ui.component.PendingPatchGrid.superclass.initComponent.call(this)}});ui.component.PendingPatchGrid.prototype.instance=null;Ext.namespace("ui","ui.component","ui.component._PendingReviewGrid");ui.component._PendingReviewGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"reviewed",mapping:"reviewed"},{name:"mainta! iner",mapping:"maintainer"},{name:"needcommit",mapping:"needcommit"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-need-reviewed-nb").innerHTML=a.getCount()}}});ui.component._PendingReviewGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Reviewed"),width:45,sortable:true,dataIndex:"reviewed"},{header:_("Maintainer"),width:45,sortable:true,dataIndex:"maintainer"},{header:_("Path"),dataIndex:"path",hidden:true}];ui.component._PendingReviewGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',getRowClass:function(a,d,c,b){if(a.data.needcommit){return"file-need-commit"}},emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>"});Ext.namespace("ui.component._PendingReviewGrid.menu");ui.component._PendingReviewGrid.menu.diff=function(a){Ext.ap! ply(this,a);this.init();ui.component._PendingReviewGrid.menu.diff.supe rclass.constructor.call(this)};Ext.extend(ui.component._PendingReviewGrid.menu.diff,Ext.menu.Item,{text:_("View Diff"),iconCls:"iconViewDiff",init:function(){Ext.apply(this,{handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext.get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:phpDoc.userLang+this.fpath,FileName:this.fname},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}})}});ui.component._PendingReviewGrid.menu.group=function(a){Ext.appl! y(this,a);this.init();ui.component._PendingReviewGrid.menu.group.superclass.constructor.call(this)};Ext.extend(ui.component._PendingReviewGrid.menu.group,Ext.menu.Item,{iconCls:"iconViewDiff",init:function(){Ext.apply(this,{text:String.format(_("Open all files about {0} extension"),this.gname),handler:function(){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+String.format(_("Open all files about {0} extension"),this.gname)+". "+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getAllFilesAboutExtension",ExtName:this.gname},success:function(a){var c=Ext.util.JSON.decode(a.responseText);phpDoc.filePendingOpen=new Array();for(var b=0;b<c.files.length;b=b+1){phpDoc.filePendingOpen[b]={fpath:phpDoc.userLang+c.files[b].path,fname:c.files[b].name}}ui.component.RepositoryTree.instance.openFile(phpDoc.filePendingOpen[0].fpath,phpDoc.filePendingOpen[0].fname);Ext.getBody().unmask()}})}})}});ui.component._PendingReviewGrid.! menu.main=function(a){Ext.apply(this,a);this.init();ui.component._Pend ingReviewGrid.menu.main.superclass.constructor.call(this)};Ext.extend(ui.component._PendingReviewGrid.menu.main,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"FilesNeedReviewed",scope:this,handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},new ui.component._PendingReviewGrid.menu.diff({fpath:this.fpath,fname:this.fname,rowIdx:this.rowIdx,hidden:this.hideDiff}),"-",new ui.component._PendingReviewGrid.menu.group({gname:this.gname,hidden:this.hideGroup})]})}});ui.component.PendingReviewGrid=Ext.extend(Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,autoExpandColumn:"name",columns:ui.component._PendingReviewGrid.columns,view:ui.component._PendingReviewGrid.view,listeners:{rowcontextmenu:function(b,h,f){var d=b.store.getAt(h),c=d.data.path,a=d.data.name,g=c.split("/");b.getSelectionModel().selectRow(h);new ui.component._PendingReviewGrid.menu.main({grid:b,rowIdx:h,event:f,fpath:c,fn! ame:a,hideDiff:(!d.data.needcommit),hideGroup:(g[1]!=="reference"),gname:g[2]}).showAt(f.getXY())},rowdblclick:function(b,h,g){var d=b.store.getAt(h),c=d.data.path,a=d.data.name,f=Ext.util.md5("FNR-"+phpDoc.userLang+c+a);if(!Ext.getCmp("main-panel").findById("FNR-"+f)){Ext.getCmp("main-panel").add({id:"FNR-"+f,title:a,layout:"border",iconCls:"iconTabNeedReviewed",closable:true,originTitle:a,defaults:{split:true},tabTip:String.format(_("Need Reviewed in: {0}"),c),items:[{region:"west",xtype:"panel",title:_("CvsLog"),collapsible:true,collapsed:true,layout:"fit",bodyBorder:false,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[new ui.component.CVSLogGrid({layout:"fit",title:phpDoc.userLang,prefix:"FNR-LANG",fid:f,fpath:phpDoc.userLang+c,fname:a,loadStore:(phpDoc.userConf.conf_reviewed_displaylog==="true")}),new ui.component.CVSLogGrid({layout:"fit",title:"en",prefix:"FNR-EN",fid:f,fpath:"en"+c,fname:a,loadStore:(phpDoc.userCo! nf.conf_reviewed_displaylog==="true")})]}},new ui.component.FilePanel( {id:"FNR-LANG-PANEL-"+f,region:"center",title:String.format(_("{0} File: "),phpDoc.userLang)+c+a,prefix:"FNR",ftype:"LANG",fid:f,fpath:c,fname:a,lang:phpDoc.userLang,parser:"xml",storeRecord:d,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_reviewed_scrollbars"}),new ui.component.FilePanel({id:"FNR-EN-PANEL-"+f,region:"east",width:575,title:_("en File: ")+c+a,prefix:"FNR",ftype:"EN",fid:f,fpath:c,fname:a,lang:"en",parser:"xml",storeRecord:d,syncScroll:true,syncScrollConf:"conf_reviewed_scrollbars"})]});Ext.getCmp("main-panel").setActiveTab("FNR-"+f)}else{Ext.getCmp("main-panel").setActiveTab("FNR-"+f)}}},initComponent:function(){ui.component.PendingReviewGrid.instance=this;Ext.apply(this,{store:new ui.component._PendingReviewGrid.store({autoLoad:(phpDoc.userLang!=="en"),proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNeedReviewed"}}),tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FNR-filter",width:180,hideTrigger1:true,! enableKeyEvents:true,validateOnBlur:false,validationEvent:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();ui.component.PendingReviewGrid.instance.store.clearFilter()},onTrigger2Click:function(){var a=this.getValue();if(a==""||a.length<3){this.markInvalid(_("Your filter must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();ui.component.PendingReviewGrid.instance.store.filter("maintainer",a)}})]});ui.component.PendingReviewGrid.superclass.initComponent.call(this)}});ui.component.PendingReviewGrid.prototype.instance=null;Ext.namespace("ui","ui.component","ui.component._RepositoryTree");ui.component._RepositoryTree.root=new Ext.tree.AsyncTreeNode({id:"/",text:_("Repository"),draggable:false});ui.component._RepositoryTree.loader=new Ext.tree.TreeLoader({dataUrl:! "./php/controller.php",baseParams:{task:"getAllFiles"}});ui.component. RepositoryTree=Ext.extend(Ext.tree.TreePanel,{animate:true,enableDD:false,useArrows:true,autoScroll:true,bodyBorder:false,containerScroll:true,root:ui.component._RepositoryTree.root,loader:ui.component._RepositoryTree.loader,listeners:{contextmenu:function(a,b){a.select();phpDoc.repositoryContextMenu(a).showAt(b.getXY())},dblclick:function(f,h){if(f.attributes.type==="file"){var a=f.attributes.id,i=Ext.util.md5("AF-"+a),k=f.attributes.extension,l,d,c,b,g,j;if(!Ext.getCmp("main-panel").findById("AF-"+i)){l=a.split("/");l.shift();l.shift();c=l.pop();d=l.shift();a=(l.length>0)?"/"+l.join("/")+"/":"/";if(k!=="html"&&k!=="php"){b=k}else{b="xml"}if(k==="gif"||k==="png"){g={};j={xtype:"panel",layout:"fit",bodyStyle:"padding:5px 5px 0",html:'<img src="/data/'+this.userLogin+"/phpdoc-"+this.userLang+a+'" />'}}else{g={xtype:"panel",region:"west",title:"CvsLog",layout:"fit",bodyBorder:false,split:true,collapsible:true,collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosi! tion:"bottom",defaults:{autoScroll:true},items:[{title:"Log",layout:"fit",items:[new ui.component.CVSLogGrid({prefix:"AF",fid:i,fpath:d+a,fname:c,loadStore:(phpDoc.userConf.conf_allfiles_displaylog==="true")})]}]}};j=new ui.component.FilePanel({id:"AF-ALL-PANEL-"+i,region:"center",title:_("File: ")+d+a+c,prefix:"AF",ftype:"ALL",fid:i,fpath:a,fname:c,lang:d,parser:b,storeRecord:f,syncScrollCB:false,syncScroll:false})}Ext.getCmp("main-panel").add({id:"AF-"+i,layout:"border",title:c,originTitle:c,closable:true,tabTip:String.format(_("in {0}"),a),iconCls:"AllFiles",items:[j,g]});Ext.getCmp("main-panel").setActiveTab("AF-"+i)}else{Ext.getCmp("main-panel").setActiveTab("AF-"+i);if(phpDoc.filePendingOpen[0]){log(phpDoc.filePendingOpen.shift());if(phpDoc.filePendingOpen[0]){if(phpDoc.filePendingOpen[0].fpath){this.openFile(phpDoc.filePendingOpen[0].fpath,phpDoc.filePendingOpen[0].fname)}}}}}}},initComponent:function(){ui.component.RepositoryTree.instance=this;Ext.apply(this,{tbar:[! _("Search: ")," ",new Ext.form.TwinTriggerField({id:"AF-search",valida tionEvent:false,validateOnBlur:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",hideTrigger1:true,width:180,enableKeyEvents:true,listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){var a=ui.component.RepositoryTree.instance;this.setValue("");this.triggers[0].hide();a.root.setText(_("Repository"));delete a.loader.baseParams.search;a.root.reload()},onTrigger2Click:function(){var a=ui.component.RepositoryTree.instance,b=this.getValue();if(b==""||b.length<3){this.markInvalid(_("Your search must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();a.loader.baseParams.search=b;a.root.reload(function(){a.root.setText(String.format(_("Search result: {0}"),a.root.childNodes.length))})}})]});ui.component.RepositoryTree.superclass.initComponent.call(this);new Ext.tree.TreeSorter(this,{folderSort:true})},openFile:function(c,d){Ext.getBody().mask('<img src="themes/img! /loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));Ext.getCmp("acc-all-files").expand();var b=c.split("/"),a=function(f){f.ensureVisible();if(b[0]&&b[0]!==""){for(var e=0;e<f.childNodes.length;++e){if(f.childNodes[e].text===b[0]){b.shift();f.childNodes[e].expand(false,true,a.createDelegate(this))}}}else{for(var e=0;e<f.childNodes.length;++e){if(f.childNodes[e].text===d){f.childNodes[e].ensureVisible();f.childNodes[e].ui.highlight();this.fireEvent("dblclick",f.childNodes[e]);Ext.getBody().unmask()}}}};this.root.expand(false,true,a.createDelegate(this))}});ui.component.RepositoryTree.prototype.instance=null;Ext.namespace("ui","ui.component","ui.component._StaleFileGrid");ui.component._StaleFileGrid.store=Ext.extend(Ext.data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"revision",mapping:"revision! "},{name:"en_revision",mapping:"en_revision"},{name:"maintainer",mappi ng:"maintainer"},{name:"needcommit",mapping:"needcommit"},{name:"isCritical",mapping:"isCritical"}])),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-need-update-nb").innerHTML=a.getCount()}}});ui.component._StaleFileGrid.view=new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',getRowClass:function(a,d,c,b){if(a.data.needcommit){return"file-need-commit"}if(a.data.isCritical){return"file-critical"}},emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>"});ui.component._StaleFileGrid.columns=[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("EN revision"),width:45,sortable:true,dataIndex:"en_revision"},{header:"",width:45,sortable:true,dataIndex:"revision"},{header:_("Maintainer"),width:45,sortable:true,dataIndex:"maintainer"},{header:_("Path"),dataIndex:"path",hid! den:true}];ui.component._StaleFileGrid.menu=function(a){Ext.apply(this,a);this.init();ui.component._StaleFileGrid.menu.superclass.constructor.call(this)};Ext.extend(ui.component._StaleFileGrid.menu,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"iconTabNeedUpdate",handler:function(){this.grid.fireEvent("rowdblclick",this.grid,this.rowIdx,this.event)}},{scope:this,hidden:this.hideCommit,text:_("View Diff"),iconCls:"iconViewDiff",handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+this.rowIdx,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+this.rowIdx+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+this.rowIdx);Ext.get("diff_panel_"+this.rowIdx).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" />'+_("Please, wait..."));XHR({scope:this,url:"./php/controller! .php",params:{task:"getDiff",FilePath:this.lang+this.fpath,FileName:th is.fname},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.get("diff_content_"+this.rowIdx).dom.innerHTML=b.content;Ext.get("diff_panel_"+this.rowIdx).unmask()}})}}]})}});ui.component.StaleFileGrid=Ext.extend(Ext.grid.GridPanel,{view:ui.component._StaleFileGrid.view,loadMask:true,autoExpandColumn:"name",bodyBorder:false,listeners:{rowcontextmenu:function(b,f,d){var c=b.store.getAt(f).data.path,a=b.store.getAt(f).data.name;b.getSelectionModel().selectRow(f);new ui.component._StaleFileGrid.menu({hideCommit:(b.store.getAt(f).data.needcommit===false),grid:b,event:d,rowIdx:f,lang:phpDoc.userLang,fpath:c,fname:a}).showAt(d.getXY())},rowdblclick:function(b,h,f){var g=b.store.getAt(h),a=g.data.path,c=g.data.name,j=g.data.en_revision,i=g.data.revision,d=Ext.util.md5("FNU-"+phpDoc.userLang+a+c),k="";if(!Ext.getCmp("main-panel").findById("FNU-"+d)){if(phpDoc.userConf.conf_needupdate_diff==="using-viewvc"){k=ui.component.ViewVCDiff}else{if(phpDoc.userConf.conf_needupda! te_diff==="using-exec"){k=ui.component.ExecDiff}}Ext.getCmp("main-panel").add({id:"FNU-"+d,layout:"border",title:c,originTitle:c,iconCls:"iconTabNeedUpdate",closable:true,defaults:{split:true},tabTip:String.format(_("Need Update: in {0}"),a),items:[new k({region:"north",collapsible:true,prefix:"FNU",fid:d,fpath:a,fname:c,rev1:i,rev2:j}),{region:"west",xtype:"panel",title:_("CvsLog"),collapsible:true,collapsed:true,layout:"fit",bodyBorder:false,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[new ui.component.CVSLogGrid({layout:"fit",title:phpDoc.userLang,prefix:"FNU-LANG",fid:d,fpath:phpDoc.userLang+a,fname:c,loadStore:(phpDoc.userConf.conf_needupdate_displaylog==="true")}),new ui.component.CVSLogGrid({layout:"fit",title:"en",prefix:"FNU-EN",fid:d,fpath:"en"+a,fname:c,loadStore:(phpDoc.userConf.conf_needupdate_displaylog==="true")})]}},new ui.component.FilePanel({id:"FNU-LANG-PANEL-"+d,region:"center",title:String.format(_! ("{0} File: "),phpDoc.userLang)+a+c,prefix:"FNU",ftype:"LANG",fid:d,fp ath:a,fname:c,lang:phpDoc.userLang,parser:"xml",storeRecord:g,syncScrollCB:true,syncScroll:true,syncScrollConf:"conf_needupdate_scrollbars"}),new ui.component.FilePanel({id:"FNU-EN-PANEL-"+d,region:"east",width:575,title:_("en File: ")+a+c,prefix:"FNU",ftype:"EN",fid:d,fpath:a,fname:c,lang:"en",parser:"xml",storeRecord:g,syncScroll:true,syncScrollConf:"conf_needupdate_scrollbars"})]});Ext.getCmp("main-panel").setActiveTab("FNU-"+d)}else{Ext.getCmp("main-panel").setActiveTab("FNU-"+d)}}},initComponent:function(){ui.component.StaleFileGrid.instance=this;ui.component._StaleFileGrid.columns[2].header=String.format(_("{0} revision"),Ext.util.Format.uppercase(phpDoc.userLang));Ext.apply(this,{columns:ui.component._StaleFileGrid.columns,store:new ui.component._StaleFileGrid.store({autoLoad:(phpDoc.userLang!=="en"),proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNeedUpdate"}}),tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FNU-filter"! ,width:180,hideTrigger1:true,enableKeyEvents:true,validateOnBlur:false,validationEvent:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",listeners:{keypress:function(b,a){if(a.getKey()==a.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();ui.component.StaleFileGrid.instance.store.clearFilter()},onTrigger2Click:function(){var a=this.getValue();if(a==""||a.length<3){this.markInvalid(_("Your filter must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();ui.component.StaleFileGrid.instance.store.filter("maintainer",a)}})]});ui.component.StaleFileGrid.superclass.initComponent.call(this)}});ui.component.StaleFileGrid.prototype.instance=null;Ext.namespace("ui","ui.component","ui.component._SummaryGrid");ui.component._SummaryGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getSummaryInfo"},reader:new Ext.data.J! sonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Reco rd.create([{name:"id",mapping:"id"},{name:"libel",mapping:"libel"},{name:"nbFiles",mapping:"nbFiles"},{name:"percentFiles",mapping:"percentFiles"},{name:"sizeFiles",mapping:"sizeFiles"},{name:"percentSize",mapping:"percentSize"}])),listeners:{load:function(){this.each(function(a){switch(a.id){case 1:a.set("libel",_("Up to date files"));break;case 2:a.set("libel",_("Old files"));break;case 3:a.set("libel",_("Critical files"));break;case 4:a.set("libel",_("Files without revision tag"));break;case 5:a.set("libel",_("Files available for translation"));break;case 6:a.set("libel",_("Total"));break;default:a.set("libel","");break}a.commit()})}}});ui.component._SummaryGrid.columns=[new Ext.grid.RowNumberer(),{id:"StatusType",header:_("File status type"),width:180,sortable:true,dataIndex:"libel"},{header:_("Number of files"),width:110,sortable:true,dataIndex:"nbFiles"},{header:_("Percent of files"),width:110,sortable:true,dataIndex:"percentFiles"},{header:_("Size of files (kB)"),widt! h:110,sortable:true,dataIndex:"sizeFiles"},{header:_("Percent of size"),width:110,sortable:true,dataIndex:"percentSize"}];ui.component._SummaryGrid.view=new Ext.grid.GridView({getRowClass:function(a,d,c,b){switch(a.data.id){case 1:return"summary_1";case 2:return"summary_2";case 3:return"summary_3";case 4:return"summary_4";case 5:return"summary_5";default:return""}}});ui.component.SummaryGrid=Ext.extend(Ext.grid.GridPanel,{title:_("Summary"),loadMask:true,autoScroll:true,height:400,width:800,store:ui.component._SummaryGrid.store,columns:ui.component._SummaryGrid.columns,view:ui.component._SummaryGrid.view,listeners:{render:function(a){a.store.load.defer(20,a.store)},rowdblclick:function(a,d,b){var c=a.store.getAt(d).data.id;if(c===1||c===2||c===3){Ext.getCmp("acc-need-update").expand()}}},initComponent:function(){Ext.apply(this,{iconCls:"flag-"+phpDoc.userLang,});ui.component.SummaryGrid.superclass.initComponent.call(this)}});ui.component.SummaryGrid.reload=function(){ui.com! ponent._SummaryGrid.store.reload()};Ext.namespace("ui","ui.component") ;ui.component.TranslationGraph=Ext.extend(Ext.Panel,{title:_("Graphics"),layout:"fit",iconCls:"home-graphic-title",autoHeight:true,html:'<div align="center" id="graph_container" style="width: 530px; height: 302px"><img id="graph_picture" src="" height="300"></div>',listeners:{afterlayout:function(){var a=Ext.get("graph_picture"),c=Ext.get("graph_container"),b=new Ext.LoadMask(c);a.setVisibilityMode(Ext.Element.VISIBILITY);a.on("load",function(){a.stopFx();b.hide();a.fadeIn({duration:2})});b.show();a.hide();a.dom.src="./php/controller.php?task=translationGraph"}}});Ext.namespace("ui","ui.component","ui.component._TranslatorGrid");ui.component._TranslatorGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getTranslatorInfo"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"name",mapping:"name"},{name:"email",mapping:"mail"},{name:"nick",m! apping:"nick"},{name:"cvs",mapping:"cvs"},{name:"uptodate",mapping:"uptodate",type:"int"},{name:"old",mapping:"old",type:"int"},{name:"critical",mapping:"critical",type:"int"},{name:"sum",mapping:"sum",type:"int"}]))});ui.component._TranslatorGrid.store.setDefaultSort("nick","asc");ui.component._TranslatorGrid.translatorSumRenderer=function(b){if(b){var a=(b===0||b>1)?b:1;return"("+a+" Translators)"}else{return}};ui.component._TranslatorGrid.uptodateRenderer=function(a){if(a==="0"){return}else{return'<span style="color:green; font-weight: bold;">'+a+"</span>"}};ui.component._TranslatorGrid.old_sumRenderer=function(a){return(a==="0")?"":a};ui.component._TranslatorGrid.criticalRenderer=function(a){if(a==="0"){return}else{return'<span style="color:red; font-weight: bold;">'+a+"</span>"}};ui.component._TranslatorGrid.columns=[new Ext.grid.RowNumberer(),{id:"GridTransName",header:_("Name"),sortable:true,dataIndex:"name",summaryType:"count",summaryRenderer:ui.component._Translato! rGrid.translatorSumRenderer},{header:_("Email"),width:110,sortable:tru e,dataIndex:"email"},{header:_("Nick"),width:70,sortable:true,dataIndex:"nick"},{header:_("Cvs"),width:45,sortable:true,dataIndex:"cvs"},{header:_("UptoDate"),width:60,sortable:true,renderer:ui.component._TranslatorGrid.uptodateRenderer,dataIndex:"uptodate",summaryType:"sum"},{header:_("Old"),width:45,sortable:true,renderer:ui.component._TranslatorGrid.old_sumRenderer,dataIndex:"old",summaryType:"sum"},{header:_("Critical"),width:60,sortable:true,renderer:ui.component._TranslatorGrid.criticalRenderer,dataIndex:"critical",summaryType:"sum"},{header:_("Sum"),width:50,sortable:true,renderer:ui.component._TranslatorGrid.old_sumRenderer,dataIndex:"sum",summaryType:"sum"}];ui.component.TranslatorGrid=Ext.extend(Ext.grid.GridPanel,{title:_("Translators"),iconCls:"iconTranslator",loadMask:true,autoScroll:true,height:400,width:800,plugins:[new Ext.ux.grid.GridSummary()],store:ui.component._TranslatorGrid.store,columns:ui.component._TranslatorGrid.columns,autoExpandColumn:"GridTransNa! me",listeners:{render:function(a){a.store.load.defer(20,a.store)},rowdblclick:function(c,f,d){var a=c.store.getAt(f).data.email,b=c.store.getAt(f).data.name;c.getSelectionModel().selectRow(f);phpDoc.sendEmail(b,a)},rowcontextmenu:function(c,f,d){var a=c.store.getAt(f).data.email,b=c.store.getAt(f).data.name;c.getSelectionModel().selectRow(f);new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+String.format(_("Send an email to {0}"),b)+"</b>",iconCls:"iconSendEmail",handler:function(){phpDoc.sendEmail(b,a)}},"-",{text:String.format(_("Send an email to the {0}"),"doc-"+phpDoc.userLang+"@lists.php.net"),iconCls:"iconSendEmail",handler:function(){phpDoc.sendEmail("Php Doc Team "+phpDoc.userLang,"doc-"+phpDoc.userLang+"@lists.php.net")}}]}).showAt(d.getXY())}}});ui.component.TranslatorGrid.reload=function(){ui.component._TranslatorGrid.store.reload()};Ext.namespace("ui","ui.component");ui.component.ViewVCDiff=Ext.extend(Ext.Panel,{layout:"fit",title:_("Diff From cvs"),height:150,! collapsed:true,initComponent:function(){Ext.apply(this,{items:{id:this ..prefix+"-diff-"+this.fid,xtype:"iframepanel",loadMask:true,defaultSrc:"http://cvs.php.net/viewvc.cgi/phpdoc/en"+this.fpath+this.fname+"?r1="+this.rev1+"&r2="+this.rev2}});ui.component.ViewVCDiff.superclass.initComponent.call(this)}});var phpDoc=function(){Ext.QuickTips.init();Ext.BLANK_IMAGE_URL="js/extjs/resources/images/default/s.gif";return{storeCommitLogMessage:"",userLogin:null,userLang:null,appName:"PhpDocumentation Online Editor",appVer:"0.2",uiRevision:"$Revision: 1.7 $",userConf:{conf_needupdate_diff:"using-exec",conf_needupdate_scrollbars:true,conf_needupdate_displaylog:false,conf_error_skipnbliteraltag:true,conf_error_scrollbars:true,conf_error_displaylog:false,conf_reviewed_scrollbars:true,conf_reviewed_displaylog:false,conf_allfiles_displaylog:false,conf_patch_scrollbars:true,conf_patch_displaylog:false,conf_theme:"themes/empty.css"},filePendingOpen:"",init:function(){Ext.getBody().on("contextmenu",function(a){a.stopEvent()},this);new ui.task.LoadConfigTask()},! winForbidden:function(){Ext.MessageBox.alert(_("Forbidden"),_("You can't do this action as cvsread user."))},loadDataStore:function(){this.storeCommitLogMessage=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getCommitLogMessage"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"text",mapping:"text"}])})},saveLangFile:function(d,b,f,c,g,e,a){if(this.userLogin==="cvsread"){this.winForbidden();return}if(d==="AF"){new ui.task.SaveLangFileTask({prefix:d,ftype:b,fid:f,fpath:c,fname:g,lang:e,storeRecord:a});return}Ext.MessageBox.show({title:_("Confirm"),msg:_("Do you want to check for error before saving?"),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,fn:function(h){if(h==="no"){new ui.task.SaveLangFileTask({prefix:d,ftype:b,fid:f,fpath:c,fname:g,lang:e,storeRecord:a})}else{if(h==="yes"){new ui.task.CheckFileTask({prefix:d,ftype:b,fid:f,fpath:c,fname:g,lan! g:e,storeRecord:a})}}}})},removeTabEvent:function(d,e){var b,c,f,a=e.i d.split("-");if((a[0]==="FE"||a[0]==="FNU"||a[0]==="FNR"||a[0]==="PP"||a[0]==="AF")&&a[1]!=="help"){if(a[0]==="FE"){b=Ext.getCmp("FE-LANG-FILE-"+a[1]).isModified}if(a[0]==="FNU"){b=Ext.getCmp("FNU-LANG-FILE-"+a[1]).isModified}if(a[0]==="FNR"){b=Ext.getCmp("FNR-LANG-FILE-"+a[1]).isModified}if(a[0]==="FE"){c=Ext.getCmp("FE-EN-FILE-"+a[1]).isModified}if(a[0]==="FNU"){c=Ext.getCmp("FNU-EN-FILE-"+a[1]).isModified}if(a[0]==="FNR"){c=Ext.getCmp("FNR-EN-FILE-"+a[1]).isModified}if(a[0]==="PP"){f=Ext.getCmp("PP-PATCH-FILE-"+a[1]).isModified}if(a[0]==="AF"){f=Ext.getCmp("AF-ALL-FILE-"+a[1]).isModified}if(c||b||f){Ext.Msg.show({scope:this,title:_("Confirm"),msg:_("This file has been modified without being saved.<br/>Do you really want to close?"),buttons:Ext.Msg.YESNO,icon:Ext.Msg.QUESTION,fn:function(g,h){if(g==="yes"){d.un("beforeremove",this.removeTabEvent,this);d.remove(e);d.addListener("beforeremove",this.removeTabEvent,this)}}});return false}else{return true}}else{return true}},Wi! nCommit:function(k,j,f){var g,d,l,h,b,c,e,i;d=Ext.get("acc-need-update");if(!g){g=new Ext.Window({scope:this,id:"winCvsCommit",title:_("CVS commit"),closable:false,layout:"form",width:400,height:480,resizable:false,modal:true,bodyStyle:"padding:5px 5px 0",labelAlign:"top",items:[{xtype:"checktreepanel",id:"tree-panel",anchor:"100%",height:180,autoScroll:true,rootVisible:false,root:{text:"root",expanded:true,children:[]}},{scope:this,xtype:"combo",fieldLabel:_("Older messages"),editable:false,name:"first2",anchor:"100%",store:this.storeCommitLogMessage,triggerAction:"all",tpl:'<tpl for="."><div class="x-combo-list-item">{[values.text.split("\n").join("<br/>")]}</div></tpl>',valueField:"id",displayField:"text",listeners:{scope:this,render:function(){this.storeCommitLogMessage.load()},select:function(o,m,n){Ext.getCmp("form-commit-message-log").setValue(m.data.text)}}},{xtype:"textarea",id:"form-commit-message-log",fieldLabel:_("Log message"),name:"first3",anchor:"100%",height! :150,value:""}],tools:[{scope:this,id:"gear",qtip:_("Configure this to ols"),handler:function(){var p,n,o;function m(q){return q.split("\n").join("<br/>")}p=new Ext.form.TextArea({grow:true,growMin:120});n=new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),{id:"GridManageLog",header:_("Log message"),dataIndex:"text",renderer:m,editor:new Ext.Editor(p,{shadow:false,autoSize:true,listeners:{scope:this,complete:function(s,t,r){var q=s.record.data.id;XHR({scope:this,url:"./php/controller.php",params:{task:"saveLogMessage",messID:q,mess:t},success:function(u){this.storeCommitLogMessage.getById(q).commit()},failure:function(u){this.winForbidden()}})}}})}]);o=new Ext.Window({title:_("Manage Log Message"),iconCls:"winManageLog",width:650,height:350,layout:"fit",resizable:false,modal:true,autoScroll:true,html:'<div class="diff-content"></div>',items:[{xtype:"editorgrid",store:this.storeCommitLogMessage,loadMask:true,cm:n,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),autoExpandColumn:"GridManageLog",listeners:{scope:this,rowcontextmenu:functio! n(q,t,r){q.getSelectionModel().selectRow(t);var s=new Ext.menu.Menu({items:[{text:_("Delete this Log Message"),iconCls:"iconDelete",scope:this,handler:function(){XHR({scope:this,url:"./php/controller.php",params:{task:"deleteLogMessage",messID:this.storeCommitLogMessage.getAt(t).data.id},success:function(u){this.storeCommitLogMessage.remove(this.storeCommitLogMessage.getAt(t))},failure:function(u){this.winForbidden()}})}}]});s.showAt(r.getXY())}}}],buttons:[{text:_("Close"),handler:function(){o.close()}}],listeners:{scope:this,close:function(){this.storeCommitLogMessage.reload()}}});o.show()}}],buttons:[{scope:this,text:_("Submit"),id:"win-commit-btn-submit",handler:function(){var m,q,t,v,n,o,r=[],u,s="",p;if(this.userLogin==="cvsread"){g.close();this.winForbidden();return}m=Ext.getCmp("tree-panel").getValue();q=[];for(p=0;p<m.length;p=p+1){t=Ext.getCmp("tree-panel").getNodeById(m[p]).attributes;v="FE-"+Ext.util.md5("FE-"+t.FilePath+t.FileName);n="FNU-"+Ext.util.md5("FNU-"+! t.FilePath+t.FileName);o="FNR-"+Ext.util.md5("FNR-"+t.FilePath+t.FileN ame);if(Ext.getCmp("main-panel").findById(v)||Ext.getCmp("main-panel").findById(n)||Ext.getCmp("main-panel").findById(o)){if(Ext.getCmp("main-panel").findById(v)){u=v}if(Ext.getCmp("main-panel").findById(n)){u=n}if(Ext.getCmp("main-panel").findById(o)){u=o}r[0]=u;r[1]=t.FileName;q.push(r)}}if(q.length>0){for(p=0;p<q.length;p=p+1){s+=q[p][1]+"<br/>"}Ext.MessageBox.show({scope:this,title:"Warning",msg:(q.length>1)?String.format(_("There is {0} files to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?"),q.length,s):String.format(_("There is {0} file to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?"),q.length,s),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,fn:function(w){if(w==="yes"){for(p=0;p<q.length;p=p+1){Ext.getCmp("main-panel").remove(q[p][0])}this.WinCommitLastStep(m,this)}else{return}}})}else{this.WinCommitLastStep(m,this)}return}},{text:_("Close"),id:"win-commit-btn-close",handler:function(){g.cl! ose()}}]})}g.show(d);var a=ui.component.PendingCommitGrid.instance;if(k){l=a.store.getAt(j).data.id;b=a.store.getAt(j).data.path;c=a.store.getAt(j).data.name;h=Ext.util.md5(b+c);e=new Ext.tree.TreeNode({id:"need-commit-"+h,text:b+c,FileDBID:l,FilePath:b,FileName:c,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(e)}else{a.store.each(function(m){if(f&&f==="by me"&&m.data.by!==this.userLogin){}else{l=m.data.id;b=m.data.path;c=m.data.name;h=Ext.util.md5(b+c);e=new Ext.tree.TreeNode({id:"need-commit-"+h,text:b+c,FileDBID:l,FilePath:b,FileName:c,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(e)}},this);i=new Ext.tree.TreeSorter(Ext.getCmp("tree-panel"),{});i.doSort(Ext.getCmp("tree-panel").getRootNode())}},WinCommitLastStep:function(f,c){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait unti! l commit..."));var a=[],e,d,b;for(b=0;b<f.length;b=b+1){e=Ext.getCmp(" tree-panel").getNodeById(f[b]);a.push(e.attributes.FileDBID)}d=Ext.getCmp("form-commit-message-log").getValue();Ext.getCmp("winCvsCommit").close();XHR({url:"./php/controller.php",params:{task:"cvsCommit",nodes:Ext.util.JSON.encode(a),logMessage:d},success:function(h){var i=Ext.util.JSON.decode(h.responseText);Ext.getBody().unmask();var g=new Ext.Window({title:_("Status"),width:450,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:i.mess.join("<br/>"),buttons:[{text:_("Close"),handler:function(){g.close()}}]});g.show();Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"onSuccesCommit",nodes:Ext.util.JSON.encode(a),logMessage:d},success:function(j){if(c.userLang!="en"){ui.component.ErrorFileGrid.instance.store.reload();ui.component.PendingReviewGrid.instance.store.reload();ui.component.StaleFileGrid.instance.sto! re.reload()}ui.component.PendingCommitGrid.instance.store.reload();ui.component.TranslatorGrid.reload();ui.component.SummaryGrid.reload();Ext.getBody().unmask()}})}})},WinUpdate:function(){var e,d;function c(f){ui.task.PingTask.instance.cancel();Ext.get("wizard-step-1").replaceClass("wizard-step-before","wizard-step-working");Ext.get("wizard-step-1.1").replaceClass("wizard-wait","wizard-show");XHR({scope:f,url:"./php/controller.php",params:{task:"updateRepository"},success:function(g){Ext.get("wizard-step-1").replaceClass("wizard-step-working","wizard-step-done");Ext.get("wizard-step-1.1").replaceClass("wizard-show","wizard-wait");b(f)},failure:function(h){var j=Ext.util.JSON.decode(h.responseText);if(j&&j.success===false){e.close();this.winForbidden()}else{function i(){XHR({scope:f,url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_update_repository"},success:function(k){g.delay(5000)},failure:function(k){var l=Ext.util.JSON.decode(k.responseText);if(l&! &l.success===false){Ext.get("wizard-step-1").replaceClass("wizard-step -working","wizard-step-done");Ext.get("wizard-step-1.1").replaceClass("wizard-show","wizard-wait");b(this)}else{g.delay(5000)}}})}var g=new Ext.util.DelayedTask(function(){i()});g.delay(5000)}}})}function b(f){Ext.get("wizard-step-2").replaceClass("wizard-step-before","wizard-step-working");XHR({scope:f,url:"./php/controller.php",params:{task:"applyTools"},success:function(g){Ext.get("wizard-step-2").replaceClass("wizard-step-working","wizard-step-done");a(this)},failure:function(h){function i(){XHR({scope:f,url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_apply_tools"},success:function(j){g.delay(5000)},failure:function(j){var k=Ext.util.JSON.decode(j.responseText);if(k&&k.success===false){Ext.get("wizard-step-2").replaceClass("wizard-step-working","wizard-step-done");a(this)}else{g.delay(5000)}}})}var g=new Ext.util.DelayedTask(function(){i()});g.delay(5000)}})}function a(f){Ext.get("wizard-step-3").replaceClass("wizard-step-before","wizard-step-worki! ng");if(phpDoc.userLang!="en"){ui.component.StaleFileGrid.instance.store.reload();ui.component.TranslatorGrid.reload();ui.component.ErrorFileGrid.instance.store.reload()}Ext.get("wizard-step-3").replaceClass("wizard-step-working","wizard-step-done");Ext.getCmp("btn-start-refresh").setIconClass("finishRefresh");Ext.getCmp("btn-start-refresh").setText(_("Finish !"));Ext.getCmp("btn-start-refresh").setHandler(function(){e.close()});Ext.getCmp("btn-start-refresh").enable();ui.task.PingTask.instance.delay(30000);e.tools.close.setVisible(true)}d=Ext.get("acc-need-update");if(!e){e=new Ext.Window({title:_("Refresh all data"),layout:"form",width:300,height:200,resizable:false,modal:true,bodyStyle:"padding:15px 15px 0",iconCls:"refresh",html:'<div id="wizard-step-1" class="wizard-step-before">'+_("Update all files from Cvs")+'</div><div id="wizard-step-1.1" class="wizard-wait">'+_("This may take time. Thank you for your patience...")+'</div><div id="wizard-step-2" class="wizard-step! -before">'+_("Apply all tools")+'</div><div id="wizard-step-3" class=" wizard-step-before">'+_("Reload data")+"</div>",buttons:[{scope:this,text:_("Start"),id:"btn-start-refresh",iconCls:"startRefresh",handler:function(){Ext.getCmp("btn-start-refresh").disable();e.tools.close.setVisible(false);Ext.getDom("lastUpdateTime").innerHTML=_("update in progress...");c(this)}}]})}Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Verify if there is an update in progress. Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getLastUpdate"},success:function(f){Ext.getBody().unmask();var g=Ext.util.JSON.decode(f.responseText);if(g.lastupdate==="in_progress"){Ext.MessageBox.show({title:_("Status"),msg:_("There is currently an update in progress.<br/>You can't perform an update now."),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO})}else{e.show(d)}}})},WinCheckBuild:function(){var c,a;a=Ext.get("acc-need-update");function b(d){XHR({scope:d,url:"./php/controller.php",params:{task:"getLogFile",file:"lo! g_check_build"},success:function(e){var f=Ext.util.JSON.decode(e.responseText);ui.task.PingTask.instance.delay(30000);if(Ext.getCmp("main-panel").findById("check_build_panel")){Ext.getCmp("main-panel").remove("check_build_panel")}Ext.getCmp("main-panel").add({xtype:"panel",id:"check_build_panel",title:_("Check Build Result"),closable:true,autoScroll:true,iconCls:"checkBuild",html:'<div class="check-build-content">'+f.mess+"</div>"});Ext.getCmp("main-panel").setActiveTab("check_build_panel")}})}if(!c){c=new Ext.Window({title:_("Check Build"),iconCls:"checkBuild",layout:"form",width:350,height:200,resizable:false,modal:true,bodyStyle:"padding:5px 5px 0",labelAlign:"top",buttons:[{scope:this,text:_("Go !"),id:"win-check-build-btn-submit",handler:function(){var d=Ext.getCmp("option-xml-details").checked;c.close();Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait until the build is checked..."));ui.task.PingTask.instance.c! ancel();XHR({scope:this,url:"./php/controller.php",params:{task:"check Build",xmlDetails:d},success:function(e){Ext.getBody().unmask();b(this)},failure:function(e){var h=Ext.util.JSON.decode(e.responseText);if(h&&h.success===false){ui.task.PingTask.instance.delay(30000);Ext.getBody().unmask();this.winForbidden()}else{function f(i){XHR({scope:i,url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_check_build"},success:function(j){g.delay(5000)},failure:function(j){var k=Ext.util.JSON.decode(j.responseText);if(k&&k.success===false){Ext.getBody().unmask();b(this)}else{g.delay(5000)}}})}var g=new Ext.util.DelayedTask(function(){f(this)},this);g.delay(5000)}}})}}],items:[{xtype:"panel",baseCls:"x-plain",bodyStyle:"padding:5px 5px 0",html:_("You're about to check the build via this command:")+"<br/><br/>/usr/bin/php configure.php --with-lang="+this.userLang+"<br><br>",modal:false},{xtype:"checkbox",hideLabel:true,checked:false,boxLabel:_("Enable detailed XML error messages"),name:"option-xml-details",id:"option-xml-details"}]})}c.sh! ow(a)},sendEmail:function(b,a){var c,d;c=new Ext.form.FormPanel({baseCls:"x-plain",labelWidth:55,url:"save-form.php",defaultType:"textfield",items:[{fieldLabel:_("Send To"),name:"to",readOnly:true,anchor:"100%",value:'"'+b+'" <'+a+">"},{fieldLabel:_("Subject"),name:"subject",anchor:"100%"},{xtype:"textarea",hideLabel:true,name:"msg",anchor:"100% -53"}]});d=new Ext.Window({title:_("Send an email"),width:500,height:300,minWidth:300,minHeight:200,layout:"fit",plain:true,bodyStyle:"padding:5px;",buttonAlign:"center",items:c,iconCls:"iconSendEmail",buttons:[{text:_("Send"),handler:function(){var e=c.getForm().getValues();XHR({url:"./php/controller.php",params:{task:"sendEmail",to:e.to,subject:e.subject,msg:e.msg},success:function(f){d.close();Ext.MessageBox.alert(_("Status"),String.format(_("Email sent to {0} with success!"),b))}})}},{text:_("Cancel"),handler:function(){d.close()}}]});d.show()},repositoryContextMenu:function(e){var b,a,c,d;if(e.attributes.type==="folder"||e.isRo! ot){return new Ext.menu.Menu({items:[{text:(e.isExpanded())?"<b>"+_("C ollapse")+"</b>":"<b>"+_("Expand")+"</b>",iconCls:"iconFolderClose",handler:function(){if(e.isExpanded()){e.collapse()}else{e.expand()}}}]})}else{if(e.attributes.type==="file"){a=e.attributes.text;c=e.attributes.id;b=c.split("/");b.shift();b.shift();b.pop();d=b.shift();c=b.join("/")+"/";return new Ext.menu.Menu({items:[{scope:this,text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"iconTabNeedReviewed",handler:function(){ui.component.RepositoryTree.instance.fireEvent("dblclick",e)}},{hidden:(e.attributes.from==="search"),scope:this,text:(d==="en")?String.format(_("Open the same file in <b>{0}</b>"),Ext.util.Format.uppercase(this.userLang)):String.format(_("Open the same file in <b>{0}</b>"),"EN"),iconCls:"iconTabNeedReviewed",handler:function(){if(d==="en"){this.openFile(this.userLang+"/"+c,a)}else{this.openFile("en/"+c,a)}}}]})}}},drawInterface:function(){new ui.task.PingTask().delay(30000);var b=new ui.component.MainMenu(),a=(this.userLang==="en")?[new ui.component.LocalMail! Grid()]:[new ui.component.SummaryGrid(),new ui.component.TranslatorGrid(),new ui.component.LocalMailGrid(),new ui.component.BugsGrid(),new ui.component.TranslationGraph()];new Ext.Viewport({layout:"border",items:[{region:"north",html:'<h1 class="x-panel-header"><img src="themes/img/mini_php.png" style="vertical-align: middle;" /> '+this.appName+"</h1>",autoHeight:true,border:false,margins:"0 0 5 0"},{region:"west",collapsible:true,collapseMode:"mini",animate:true,split:true,layout:"fit",width:300,autoScroll:true,items:[{layout:"accordion",animate:true,bodyBorder:false,border:false,tbar:[{text:_("Main Menu"),iconCls:"MainMenu",menu:b}],items:[{id:"acc-need-update",title:_("Files Need Update")+' - <em id="acc-need-update-nb">0</em>',layout:"fit",iconCls:"FilesNeedUpdate",hidden:(this.userLang==="en"),items:[new ui.component.StaleFileGrid()],collapsed:true,listeners:{expand:function(c){Ext.getCmp("FNU-filter").wrap.setWidth(200)}}},{id:"acc-error",title:_("Error in ! current translation")+' - <em id="acc-error-nb">0</em>',layout:"fit",i conCls:"FilesError",hidden:(this.userLang==="en"),items:[new ui.component.ErrorFileGrid()],collapsed:true,listeners:{expand:function(c){Ext.getCmp("FE-filter").wrap.setWidth(200)}}},{id:"acc-need-reviewed",title:_("Files Need Reviewed")+' - <em id="acc-need-reviewed-nb">0</em>',layout:"fit",iconCls:"FilesNeedReviewed",hidden:(this.userLang==="en"),items:[new ui.component.PendingReviewGrid()],collapsed:true,listeners:{expand:function(c){Ext.getCmp("FNR-filter").wrap.setWidth(200)}}},{id:"acc-notInEn",title:_("Not in EN tree")+' - <em id="acc-notInEn-nb">0</em>',layout:"fit",iconCls:"NotInEn",hidden:(this.userLang==="en"),items:[new ui.component.NotInENGrid()],collapsed:true},{id:"acc-all-files",title:_("All files"),layout:"fit",iconCls:"AllFiles",items:[new ui.component.RepositoryTree()],collapsed:true,listeners:{expand:function(c){Ext.getCmp("AF-search").wrap.setWidth(200)}}},{id:"acc-need-pendingCommit",title:_("Pending for commit")+' - <em id="acc-pendingCommit-nb">0</em>'! ,layout:"fit",iconCls:"PendingCommit",items:[new ui.component.PendingCommitGrid()],collapsed:true},{id:"acc-need-pendingPatch",title:_("Pending Patch")+' - <em id="acc-pendingPatch-nb">0</em>',layout:"fit",iconCls:"PendingPatch",items:[new ui.component.PendingPatchGrid()],collapsed:true}]}]},{xtype:"tabpanel",id:"main-panel",region:"center",activeTab:0,enableTabScroll:true,layoutOnTabChange:true,plugins:new Ext.ux.TabCloseMenu(),listeners:{scope:this,beforeremove:this.removeTabEvent},items:[{xtype:"panel",id:"MainInfoTabPanel",title:_("Home"),baseCls:"MainInfoTabPanel",autoScroll:true,plain:true,items:[{xtype:"panel",border:false,html:'<div class="res-block"><div class="res-block-inner"><h3>'+String.format(_("Connected as <em>{0}</em>"),this.userLogin)+"<br/><br/>"+String.format(_('Last data update: <em id="lastUpdateTime">{0}</em>'),"-")+"</h3></div></div>"},{xtype:"tabpanel",activeTab:0,plain:true,autoScroll:true,height:400,border:false,items:a,defaults:{border:true},layo! utOnTabChange:true}]}]}]});Ext.get("loading").remove();Ext.fly("loadin g-mask").fadeOut({remove:true});if(directAccess){this.openFile(directAccess.lang+directAccess.path,directAccess.name)}}}}();Ext.EventManager.onDocumentReady(phpDoc.init,phpDoc,true); \ No newline at end of file http://cvs.php.net/viewvc.cgi/doc-editor/TODO?r1=1.11&r2=1.12&diff_format=u Index: doc-editor/TODO diff -u doc-editor/TODO:1.11 doc-editor/TODO:1.12 --- doc-editor/TODO:1.11 Mon Jun 15 07:04:54 2009 +++ doc-editor/TODO Fri Jun 26 10:29:45 2009 @@ -4,7 +4,7 @@ * Dedicate a wiki page to the doc-editor (and move this TODO there) * Take a decision once and for all about the app name, and its spelling * Take a decision about the license, and update all the files accordingly -* Use the $Revision: 1.11 $ keyword (in comments, about popup, ..) +* Use the $Revision: 1.12 $ keyword (in comments, about popup, ..) * Allow use for other systems - Other PHP Projects (peardoc, gtkdocs, php-src/README*, phpweb/reST/) - Other VCS Systems (SVN, GIT) @@ -34,7 +34,7 @@ * Translation Status - At the current time, the french translation graph is useless/unreadable. We need to find a better way to display the information - + * Implement i18n * Automatic upgrade @@ -48,12 +48,13 @@ * Clean up the namespaces * Split main.js to several objects & files (to be discussed) -* Use Object in FilePendingOpen Queue instead of Array * Implement RTL where appropriate * Decide whether XHR abstraction could be used (refer bug report from yannick) * Remove dependency on '-ALL-' id token for 'AF' panel in removetab handler * Merge SaveEnFile with SaveLangFile if possible * Move repositoryContextMenu from main.js to ui/component/RepositoryTree +* Generalize Diff?? cvs-log-diff, cvs-file-diff, patch-file-diff, pending-commit-file-diff +* adjust diff-panel id convention to prevent mixing different diff-panel USER INTERFACE: =============== http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/GetFileTask.js?view=markup&rev=1.1 Index: doc-editor/js/ui/task/GetFileTask.js +++ doc-editor/js/ui/task/GetFileTask.js Ext.namespace('ui','ui.task'); // config - { prefix, ftype, fid, fpath, fname } ui.task.GetFileTask = function(config) { Ext.apply(this, config); var id_prefix = this.prefix + '-' + this.ftype; // Mask the panel Ext.get(id_prefix + '-PANEL-' + this.fid).mask( '<img src="themes/img/loading.gif" ' + 'style="vertical-align: middle;" /> '+ _('Loading...') ); // We load the File XHR({ scope : this, url : './php/controller.php', params : { task : 'getFile', FilePath : this.fpath, FileName : this.fname }, success : function(response) { var o = Ext.util.JSON.decode(response.responseText); Ext.getCmp(id_prefix + '-FILE-' + this.fid).setCode(o.content); Ext.get(id_prefix + '-PANEL-' + this.fid).unmask(); }, callback : function() { // Reviewed function to open all files of an extension if (phpDoc.filePendingOpen[0]) { phpDoc.filePendingOpen.shift(); if (phpDoc.filePendingOpen[0]) { if (phpDoc.filePendingOpen[0].fpath) { ui.component.RepositoryTree.instance.openFile( phpDoc.filePendingOpen[0].fpath, phpDoc.filePendingOpen[0].fname ); } } } } }); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/LoadConfigTask.js?view=markup&rev=1.1 Index: doc-editor/js/ui/task/LoadConfigTask.js +++ doc-editor/js/ui/task/LoadConfigTask.js Ext.namespace('ui','ui.task'); ui.task.LoadConfigTask = function(config) { Ext.apply(this, config); XHR({ url : './php/controller.php', params : { task : 'getConf' }, success : function(response) { var o = Ext.decode(response.responseText); phpDoc.userLogin = o.mess.userLogin; phpDoc.userLang = o.mess.userLang; phpDoc.userConf.conf_needupdate_diff = o.mess.userConf.conf_needupdate_diff; phpDoc.userConf.conf_needupdate_scrollbars = o.mess.userConf.conf_needupdate_scrollbars; phpDoc.userConf.conf_needupdate_displaylog = o.mess.userConf.conf_needupdate_displaylog; phpDoc.userConf.conf_error_skipnbliteraltag = o.mess.userConf.conf_error_skipnbliteraltag; phpDoc.userConf.conf_error_scrollbars = o.mess.userConf.conf_error_scrollbars; phpDoc.userConf.conf_error_displaylog = o.mess.userConf.conf_error_displaylog; phpDoc.userConf.conf_reviewed_scrollbars = o.mess.userConf.conf_reviewed_scrollbars; phpDoc.userConf.conf_reviewed_displaylog = o.mess.userConf.conf_reviewed_displaylog; phpDoc.userConf.conf_allfiles_displaylog = o.mess.userConf.conf_allfiles_displaylog; phpDoc.userConf.conf_patch_scrollbars = o.mess.userConf.conf_patch_scrollbars; phpDoc.userConf.conf_patch_displaylog = o.mess.userConf.conf_patch_displaylog; //For the theme, we apply this. phpDoc.userConf.conf_theme = o.mess.userConf.conf_theme; Ext.get('appTheme').dom.href = phpDoc.userConf.conf_theme; // Load datastore phpDoc.loadDataStore(); // Draw the interface phpDoc.drawInterface(); } }); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/SavePatchTask.js?view=markup&rev=1.1 Index: doc-editor/js/ui/task/SavePatchTask.js +++ doc-editor/js/ui/task/SavePatchTask.js Ext.namespace('ui','ui.task'); // config - { prefix, ftype, fpath, fname, fid, lang, email } ui.task.SavePatchTask = function(config) { Ext.apply(this, config); var id_prefix = this.prefix + '-' + this.ftype, msg = Ext.MessageBox.wait(_('Saving data as a patch...')); Ext.getCmp(id_prefix + '-PANEL-btn-saveas-' + this.fid).disable(); Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified = false; Ext.getCmp(id_prefix + '-PANEL-' + this.fid).setTitle( Ext.getCmp(id_prefix + '-PANEL-' + this.fid).originTitle ); if ( (this.prefix === 'AF') || (this.lang === 'en' && Ext.getCmp(this.prefix+'-LANG-FILE-'+this.fid).isModified === false) || (this.lang !== 'en' && Ext.getCmp(this.prefix+'-EN-FILE-'+this.fid).isModified === false) ) { Ext.getCmp(this.prefix + '-' + this.fid).setTitle( Ext.getCmp(this.prefix + '-' + this.fid).originTitle ); } // We save this patch XHR({ scope : this, url : './php/controller.php', params : { task : 'saveFile', filePath : this.fpath, fileName : this.fname, fileLang : this.lang, fileContent : Ext.getCmp(id_prefix + '-FILE-' + this.fid).getCode(), type : 'patch', emailAlert : this.email }, success : function(response) { var o = Ext.util.JSON.decode(response.responseText), grid = ui.component.PendingPatchGrid.instance; // Add this files into storePendingPatch grid.store.insert(0, new grid.store.recordType({ id : Ext.id('', ''), path : this.lang + this.fpath, name : this.fname, by : phpDoc.userLogin, uniqID : o.uniqId, date : new Date() }) ); // Remove wait msg msg.hide(); } }); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/UpdateConfTask.js?view=markup&rev=1.1 Index: doc-editor/js/ui/task/UpdateConfTask.js +++ doc-editor/js/ui/task/UpdateConfTask.js Ext.namespace('ui','ui.task'); // config - { item, value } ui.task.UpdateConfTask = function(config) { Ext.apply(this, config); // Apply modification in DB XHR({ scope : this, url : './php/controller.php', params : { task : 'confUpdate', item : this.item, value : this.value }, success : function(response) { // Update userConf object switch (this.item) { case 'conf_theme' : phpDoc.userConf.conf_theme = this.value; break; case 'conf_needupdate_diff' : phpDoc.userConf.conf_needupdate_diff = this.value; break; case 'conf_needupdate_scrollbars': phpDoc.userConf.conf_needupdate_scrollbars = "" + this.value + ""; break; case 'conf_needupdate_displaylog': phpDoc.userConf.conf_needupdate_displaylog = "" + this.value + ""; break; case 'conf_error_skipnbliteraltag': phpDoc.userConf.conf_error_skipnbliteraltag = "" + this.value + ""; ui.component.ErrorFileGrid.instance.store.reload(); break; case 'conf_error_scrollbars': phpDoc.userConf.conf_error_scrollbars = "" + this.value + ""; break; case 'conf_error_displaylog': phpDoc.userConf.conf_error_displaylog = "" + this.value + ""; break; case 'conf_reviewed_scrollbars': phpDoc.userConf.conf_reviewed_scrollbars = "" + this.value + ""; break; case 'conf_reviewed_displaylog': phpDoc.userConf.conf_reviewed_displaylog = "" + this.value + ""; break; case 'conf_allfiles_displaylog': phpDoc.userConf.conf_allfiles_displaylog = "" + this.value + ""; break; case 'conf_patch_scrollbars': phpDoc.userConf.conf_patch_scrollbars = "" + this.value + ""; break; case 'conf_patch_displaylog': phpDoc.userConf.conf_patch_displaylog = "" + this.value + ""; break; } } }); }