cvs: doc-editor / TODO /js main.js main_min.js /js/ui/component BugsGrid.js CheckBuildPrompt.js CheckDoc.js CommitLogPrompt.js CommitPrompt.js
EmailPrompt.js ErrorFileGrid.js FilePanel.js LocalMailGrid.js MainMenu.js NotInENGrid.js PendingCommitGrid.js PendingPatchGrid.js PendingReviewGrid.js
RepositoryTree.js StaleFileGrid.js SummaryGrid.js SystemUpdatePrompt.js TranslationGraph.js TranslatorGrid.js /js/ui/task AcceptPatchTask.js
CVSCommitTask.js CheckBuildTask.js CheckFileTask.js ClearLocalChangeTask.js GetFileTask.js LoadConfigTask.js MarkDeleteTask.js PingTask.js
RejectPatchTask.js SaveENFileTask.js SaveLangFileTask.js SavePatchTask.js SystemUpdateTask.js UpdateConfTask.js
| From: | Chan Ka Shing | Date: | Fri, 03 Jul 2009 04:11:11 +0000 |
| Subject: | cvs: doc-editor / TODO /js main.js main_min.js /js/ui/component BugsGrid.js CheckBuildPrompt.js CheckDoc.js CommitLogPrompt.js CommitPrompt.js EmailPrompt.js ErrorFileGrid.js FilePanel.js LocalMailGrid.js MainMenu.js NotInENGrid.js PendingCommitGrid.js PendingPatchGrid.js PendingReviewGrid.js RepositoryTree.js StaleFileGrid.js SummaryGrid.js SystemUpdatePrompt.js TranslationGraph.js TranslatorGrid.js /js/ui/task AcceptPatchTask.js CVSCommitTask.js CheckBuildTask.js CheckFileTask.js ClearLocalChangeTask.js GetFileTask.js LoadConfigTask.js MarkDeleteTask.js PingTask.js RejectPatchTask.js SaveENFileTask.js SaveLangFileTask.js SavePatchTask.js SystemUpdateTask.js UpdateConfTask.js |
||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4318@lists.php.net to get a copy of this message | ||
mrkschan Fri Jul 3 04:11:11 2009 UTC
Added files:
/doc-editor/js/ui/component CheckBuildPrompt.js CommitLogPrompt.js
CommitPrompt.js EmailPrompt.js
SystemUpdatePrompt.js
/doc-editor/js/ui/task CheckBuildTask.js CVSCommitTask.js
SystemUpdateTask.js
Modified files:
/doc-editor/js/ui/component BugsGrid.js CheckDoc.js
ErrorFileGrid.js FilePanel.js
LocalMailGrid.js MainMenu.js
NotInENGrid.js PendingCommitGrid.js
PendingPatchGrid.js
PendingReviewGrid.js RepositoryTree.js
StaleFileGrid.js SummaryGrid.js
TranslationGraph.js TranslatorGrid.js
/doc-editor/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
/doc-editor/js main.js main_min.js
/doc-editor TODO
Log:
modification/fix:
* apply singleton pattern to all unique component, singleton component can be obtained by
ui.component.XXX.getInstance()
* file panel exclude 'home' & 'end' key as modifying keys
* file panel string concat using string.join() instead of operator +
main.js cleanup:
* migrated phpDoc.saveLangFile into ui/component/FilePanel.js
* migrated repositoryContextMenu into ui/component/RepositoryTree.js
* sendEmail is now wrapped in ui/component/EmailPrompt.js
* WinCheckBuild is now wrapped in ui/component/CheckBuildPrompt and ui/task/CheckBuildTask.js
* WinUpdate is now wrapped in ui/component/SystemUpdatePrompt and ui/task/SystemUpdateTask
* WinCommit is now wrapped in ui/component/CommitPrompt and ui/task/CVSCommitTask.js;
CommitLog management is now in ui/component/CommitLogPrompt
http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/BugsGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/BugsGrid.js diff -u doc-editor/js/ui/component/BugsGrid.js:1.2 doc-editor/js/ui/component/BugsGrid.js:1.3 --- doc-editor/js/ui/component/BugsGrid.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/BugsGrid.js Fri Jul 3 04:11:09 2009 @@ -137,7 +137,14 @@ } }); -ui.component.BugsGrid.reload = function() +// singleton +ui.component._BugsGrid.instance = null; +ui.component.BugsGrid.getInstance = function(config) { - ui.component._BugsGrid.store.reload(); + if (!ui.component._BugsGrid.instance) { + if (!config) config = {}; + ui.component._BugsGrid.instance = new ui.component.BugsGrid(config); + } + return ui.component._BugsGrid.instance; } + http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/CheckDoc.js?r1=1.3&r2=1.4&diff_format=u Index: doc-editor/js/ui/component/CheckDoc.js diff -u doc-editor/js/ui/component/CheckDoc.js:1.3 doc-editor/js/ui/component/CheckDoc.js:1.4 --- doc-editor/js/ui/component/CheckDoc.js:1.3 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/CheckDoc.js Fri Jul 3 04:11:09 2009 @@ -182,7 +182,7 @@ }, rowdblclick : function(grid, rowIndex, e) { - ui.component.RepositoryTree.instance.openFile( + ui.component.RepositoryTree.getInstance().openFile( 'en' + grid.fpath, grid.store.getAt(rowIndex).data.file ); @@ -221,7 +221,7 @@ }; } - ui.component.RepositoryTree.instance.openFile( + ui.component.RepositoryTree.getInstance().openFile( phpDoc.filePendingOpen[0].fpath, phpDoc.filePendingOpen[0].fname ); @@ -248,7 +248,7 @@ }; } - ui.component.RepositoryTree.instance.openFile( + ui.component.RepositoryTree.getInstance().openFile( phpDoc.filePendingOpen[0].fpath, phpDoc.filePendingOpen[0].fname ); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/ErrorFileGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/ErrorFileGrid.js diff -u doc-editor/js/ui/component/ErrorFileGrid.js:1.2 doc-editor/js/ui/component/ErrorFileGrid.js:1.3 --- doc-editor/js/ui/component/ErrorFileGrid.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/ErrorFileGrid.js Fri Jul 3 04:11:09 2009 @@ -356,7 +356,6 @@ initComponent : function() { - ui.component.ErrorFileGrid.instance = this; Ext.apply(this, { store : new ui.component._ErrorFileGrid.store({ @@ -392,7 +391,7 @@ { this.setValue(''); this.triggers[0].hide(); - ui.component.ErrorFileGrid.instance.store.clearFilter(); + ui.component._ErrorFileGrid.instance.store.clearFilter(); }, onTrigger2Click : function() { @@ -406,7 +405,7 @@ } this.clearInvalid(); this.triggers[0].show(); - ui.component.ErrorFileGrid.instance.store.filter('maintainer', v); + ui.component._ErrorFileGrid.instance.store.filter('maintainer', v); } }) ] @@ -414,4 +413,14 @@ ui.component.ErrorFileGrid.superclass.initComponent.call(this); } }); -ui.component.ErrorFileGrid.prototype.instance = null; + +// singleton +ui.component._ErrorFileGrid.instance = null; +ui.component.ErrorFileGrid.getInstance = function(config) +{ + if (!ui.component._ErrorFileGrid.instance) { + if (!config) config = {}; + ui.component._ErrorFileGrid.instance = new ui.component.ErrorFileGrid(config); + } + return ui.component._ErrorFileGrid.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/FilePanel.js?r1=1.3&r2=1.4&diff_format=u Index: doc-editor/js/ui/component/FilePanel.js diff -u doc-editor/js/ui/component/FilePanel.js:1.3 doc-editor/js/ui/component/FilePanel.js:1.4 --- doc-editor/js/ui/component/FilePanel.js:1.3 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/FilePanel.js Fri Jul 3 04:11:09 2009 @@ -74,22 +74,24 @@ 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><!-- }}} -->" + [ + " <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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -102,31 +104,33 @@ 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><!-- }}} -->" + [ + "\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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -139,13 +143,15 @@ 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><!-- }}} -->" + [ + "\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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -158,12 +164,14 @@ 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" + [ + "\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" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -176,12 +184,14 @@ 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><!-- }}} -->" + [ + "\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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -194,29 +204,31 @@ 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><!-- }}} -->" + [ + "\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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -229,37 +241,39 @@ 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><!-- }}} -->" + [ + "\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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -272,19 +286,21 @@ 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><!-- }}} -->" + [ + "\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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -297,16 +313,18 @@ 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><!-- }}} -->" + [ + "\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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -352,12 +370,14 @@ { Ext.DomHelper.insertHtml( 'beforeBegin', c.el.dom, - '<div style="display: inline;" class="x-statusbar">' + - '<span class="x-status-text-panel">' + _('Line: ') + - '<span id="' + id_prefix + '-status-line-' + this.fid + '">-</span></span>' + - ' <span class="x-status-text-panel">' + _('Col: ') + - '<span id="' + id_prefix + '-status-col-' + this.fid + '">-</span></span>' + - '</div> ' + [ + '<div style="display: inline;" class="x-statusbar">', + '<span class="x-status-text-panel">', _('Line: '), + '<span id="', id_prefix, '-status-line-', this.fid, '">-</span></span>', + ' <span class="x-status-text-panel">', _('Col: '), + '<span id="', id_prefix, '-status-col-', this.fid, '">-</span></span>', + '</div> ' + ].join('') ); } } @@ -366,12 +386,14 @@ height : 21, baseCls : '', bodyStyle : 'padding-top:5px;', - html : '<div style="display: inline;" class="x-statusbar">' + - '<span class="x-status-text-panel">' + _('Line: ') + - '<span id="' + id_prefix + '-status-line-' + this.fid + '">-</span></span>' + - ' <span class="x-status-text-panel">' + _('Col: ') + - '<span id="' + id_prefix + '-status-col-' + this.fid + '">-</span></span>' + - '</div> ' + html : [ + '<div style="display: inline;" class="x-statusbar">', + '<span class="x-status-text-panel">', _('Line: '), + '<span id="', id_prefix, '-status-line-', this.fid, '">-</span></span>', + ' <span class="x-status-text-panel">', _('Col: '), + '<span id="', id_prefix, '-status-col-', this.fid, '">-</span></span>', + '</div> ' + ].join('') }]; if (!this.readOnly) { @@ -437,10 +459,52 @@ } else { - phpDoc.saveLangFile( - this.prefix, this.ftype, this.fid, this.fpath, this.fname, - this.lang, this.storeRecord - ); + if (this.prefix === 'AF') { + 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 + }); + return; + } + Ext.MessageBox.show({ + title : _('Confirm'), + msg : _('Do you want to check for error before saving?'), + icon : Ext.MessageBox.INFO, + buttons : Ext.MessageBox.YESNOCANCEL, + scope : this, + fn : function (btn) + { + if (btn === 'no') { + + 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 + }); + + } else if (btn === 'yes') { + + new ui.task.CheckFileTask({ + prefix : this.prefix, + ftype : this.ftype, + fid : this.fid, + fpath : this.fpath, + fname : this.fname, + lang : this.lang, + storeRecord : this.storeRecord + }); // include SaveLangFileTask when no err + } + } + }); } } }, { @@ -517,6 +581,7 @@ // 38 = arrow up; 40 = arrow down; 37 = arrow left; 39 = arrow right; // 34 = pageDown; 33 = pageUp; 27 = esc; 17 = CRTL; 16 = ALT; 67 = CTRL+C + // 35 = end; 36 = home if ( keyCode !== 27 && keyCode !== 33 && keyCode !== 34 @@ -527,6 +592,8 @@ && keyCode !== 17 && keyCode !== 16 && keyCode !== 67 + && keyCode !== 35 + && keyCode !== 36 ) { if (!Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified) { // Add an [modified] in title http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/LocalMailGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/LocalMailGrid.js diff -u doc-editor/js/ui/component/LocalMailGrid.js:1.2 doc-editor/js/ui/component/LocalMailGrid.js:1.3 --- doc-editor/js/ui/component/LocalMailGrid.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/LocalMailGrid.js Fri Jul 3 04:11:09 2009 @@ -146,7 +146,13 @@ } }); -ui.component.LocalMailGrid.reload = function() +// singleton +ui.component._LocalMailGrid.instance = null; +ui.component.LocalMailGrid.getInstance = function(config) { - ui.component._LocalMailGrid.store.reload(); + if (!ui.component._LocalMailGrid.instance) { + if (!config) config = {}; + ui.component._LocalMailGrid.instance = new ui.component.LocalMailGrid(config); + } + return ui.component._LocalMailGrid.instance; } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/MainMenu.js?r1=1.3&r2=1.4&diff_format=u Index: doc-editor/js/ui/component/MainMenu.js diff -u doc-editor/js/ui/component/MainMenu.js:1.3 doc-editor/js/ui/component/MainMenu.js:1.4 --- doc-editor/js/ui/component/MainMenu.js:1.3 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/MainMenu.js Fri Jul 3 04:11:09 2009 @@ -18,12 +18,48 @@ text : _('Refresh all data'), disabled : (phpDoc.userLogin === 'cvsread') ? true : false, iconCls : 'refresh', - handler : phpDoc.WinUpdate // TODO + handler : function() + { + // We test if there is an update in progress or not + 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(response) + { + // Remove wait msg + Ext.getBody().unmask(); + + var o = Ext.util.JSON.decode(response.responseText); + + if( o.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 { + new ui.component.SystemUpdatePrompt().show(Ext.get('acc-need-update')); + } + } + }); + } }, { text : _('Check Build'), disabled : (phpDoc.userLogin === 'cvsread') ? true : false, iconCls : 'checkBuild', - handler : phpDoc.WinCheckBuild // TODO + handler : function() + { + new ui.component.CheckBuildPrompt().show( + Ext.get('acc-need-update') + ); + } }, { text : _('EN tools'), handler : function() { return false }, http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/NotInENGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/NotInENGrid.js diff -u doc-editor/js/ui/component/NotInENGrid.js:1.2 doc-editor/js/ui/component/NotInENGrid.js:1.3 --- doc-editor/js/ui/component/NotInENGrid.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/NotInENGrid.js Fri Jul 3 04:11:09 2009 @@ -136,7 +136,6 @@ initComponent : function() { - ui.component.NotInENGrid.instance = this; Ext.apply(this, { store : new ui.component._NotInENGrid.store({ @@ -150,4 +149,14 @@ ui.component.NotInENGrid.superclass.initComponent.call(this); } }); -ui.component.NotInENGrid.prototype.instance = null; + +// singleton +ui.component._NotInENGrid.instance = null; +ui.component.NotInENGrid.getInstance = function(config) +{ + if (!ui.component._NotInENGrid.instance) { + if (!config) config = {}; + ui.component._NotInENGrid.instance = new ui.component.NotInENGrid(config); + } + return ui.component._NotInENGrid.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/PendingCommitGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/PendingCommitGrid.js diff -u doc-editor/js/ui/component/PendingCommitGrid.js:1.2 doc-editor/js/ui/component/PendingCommitGrid.js:1.3 --- doc-editor/js/ui/component/PendingCommitGrid.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/PendingCommitGrid.js Fri Jul 3 04:11:09 2009 @@ -122,7 +122,20 @@ iconCls : 'iconCommitFileCvs', handler : function() { - phpDoc.WinCommit(true, this.rowIdx); + var record = ui.component.PendingCommitGrid.getInstance().store.getAt(this.rowIdx), + fdbid = record.data.id, + fpath = record.data.path, + fname = record.data.name, + fid = Ext.util.md5(fpath + fname); + + new ui.component.CommitPrompt({ + files : [{ + fid : fid, + fpath : fpath, + fname : fname, + fdbid : fdbid + }] + }).show(); } }, { scope : this, @@ -130,7 +143,28 @@ iconCls : 'iconCommitFileCvs', handler : function() { - phpDoc.WinCommit(false, '', 'by me'); + var files = [], + grid = ui.component.PendingCommitGrid.getInstance(); + + grid.store.each(function(record) + { + if (record.data.by === phpDoc.userLogin) { + var fdbid = record.data.id, + fpath = record.data.path, + fname = record.data.name, + fid = Ext.util.md5(fpath + fname); + files.push({ + fid : fid, + fpath : fpath, + fname : fname, + fdbid : fdbid + }); + } + }); + + new ui.component.CommitPrompt({ + files : files + }).show(); } }, { scope : this, @@ -138,7 +172,26 @@ iconCls : 'iconCommitFileCvs', handler : function() { - phpDoc.WinCommit(false); + var files = [], + grid = ui.component.PendingCommitGrid.getInstance(); + + grid.store.each(function(record) + { + var fdbid = record.data.id, + fpath = record.data.path, + fname = record.data.name, + fid = Ext.util.md5(fpath + fname); + files.push({ + fid : fid, + fpath : fpath, + fname : fname, + fdbid : fdbid + }); + }); + + new ui.component.CommitPrompt({ + files : files + }).show(); } }] }) @@ -327,7 +380,7 @@ FileName = storeRecord.data.name; if (FileType === 'update') { - ui.component.RepositoryTree.instance.openFile(FilePath, FileName); + ui.component.RepositoryTree.getInstance().openFile(FilePath, FileName); } if (FileType === 'delete') { @@ -343,7 +396,6 @@ initComponent : function() { - ui.component.PendingCommitGrid.instance = this; Ext.apply(this, { store : new ui.component._PendingCommitGrid.store({ @@ -384,4 +436,14 @@ } } }); -ui.component.PendingCommitGrid.prototype.instance = null; + +// singleton +ui.component._PendingCommitGrid.instance = null; +ui.component.PendingCommitGrid.getInstance = function(config) +{ + if (!ui.component._PendingCommitGrid.instance) { + if (!config) config = {}; + ui.component._PendingCommitGrid.instance = new ui.component.PendingCommitGrid(config); + } + return ui.component._PendingCommitGrid.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/PendingPatchGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/PendingPatchGrid.js diff -u doc-editor/js/ui/component/PendingPatchGrid.js:1.2 doc-editor/js/ui/component/PendingPatchGrid.js:1.3 --- doc-editor/js/ui/component/PendingPatchGrid.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/PendingPatchGrid.js Fri Jul 3 04:11:09 2009 @@ -286,7 +286,6 @@ initComponent : function() { - ui.component.PendingPatchGrid.instance = this; Ext.apply(this, { store : new ui.component._PendingPatchGrid.store({ @@ -300,4 +299,14 @@ ui.component.PendingPatchGrid.superclass.initComponent.call(this); } }); -ui.component.PendingPatchGrid.prototype.instance = null; + +// singleton +ui.component._PendingPatchGrid.instance = null; +ui.component.PendingPatchGrid.getInstance = function(config) +{ + if (!ui.component._PendingPatchGrid.instance) { + if (!config) config = {}; + ui.component._PendingPatchGrid.instance = new ui.component.PendingPatchGrid(config); + } + return ui.component._PendingPatchGrid.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/PendingReviewGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/PendingReviewGrid.js diff -u doc-editor/js/ui/component/PendingReviewGrid.js:1.2 doc-editor/js/ui/component/PendingReviewGrid.js:1.3 --- doc-editor/js/ui/component/PendingReviewGrid.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/PendingReviewGrid.js Fri Jul 3 04:11:09 2009 @@ -191,7 +191,7 @@ } // Start the first - ui.component.RepositoryTree.instance.openFile( + ui.component.RepositoryTree.getInstance().openFile( phpDoc.filePendingOpen[0].fpath, phpDoc.filePendingOpen[0].fname ); @@ -376,7 +376,6 @@ initComponent : function() { - ui.component.PendingReviewGrid.instance = this; Ext.apply(this, { store : new ui.component._PendingReviewGrid.store({ @@ -409,7 +408,7 @@ { this.setValue(''); this.triggers[0].hide(); - ui.component.PendingReviewGrid.instance.store.clearFilter(); + ui.component._PendingReviewGrid.instance.store.clearFilter(); }, onTrigger2Click : function() { @@ -423,7 +422,7 @@ } this.clearInvalid(); this.triggers[0].show(); - ui.component.PendingReviewGrid.instance.store.filter('maintainer', v); + ui.component._PendingReviewGrid.instance.store.filter('maintainer', v); } }) ] @@ -431,4 +430,14 @@ ui.component.PendingReviewGrid.superclass.initComponent.call(this); } }); -ui.component.PendingReviewGrid.prototype.instance = null; + +// singleton +ui.component._PendingReviewGrid.instance = null; +ui.component.PendingReviewGrid.getInstance = function(config) +{ + if (!ui.component._PendingReviewGrid.instance) { + if (!config) config = {}; + ui.component._PendingReviewGrid.instance = new ui.component.PendingReviewGrid(config); + } + return ui.component._PendingReviewGrid.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/RepositoryTree.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/RepositoryTree.js diff -u doc-editor/js/ui/component/RepositoryTree.js:1.2 doc-editor/js/ui/component/RepositoryTree.js:1.3 --- doc-editor/js/ui/component/RepositoryTree.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/RepositoryTree.js Fri Jul 3 04:11:09 2009 @@ -16,6 +16,97 @@ baseParams : { task : 'getAllFiles' } }); +Ext.namespace('ui.component._RepositoryTree.menu'); +// RepositoryTree folder context menu +// config - { node } +ui.component._RepositoryTree.menu.folder = function(config) +{ + Ext.apply(this, config); + this.init(); + ui.component._RepositoryTree.menu.folder.superclass.constructor.call(this); +} +Ext.extend(ui.component._RepositoryTree.menu.folder, Ext.menu.Menu, +{ + init : function() + { + Ext.apply(this, + { + items : [{ + text : (this.node.isExpanded()) + ? '<b>' + _('Collapse') + '</b>' + : '<b>' + _('Expand') + '</b>', + iconCls : 'iconFolderClose', + scope : this, + handler : function() + { + if (this.node.isExpanded()) this.node.collapse(); + else this.node.expand(); + } + }] + }); + } +}); + +// RepositoryTree file context menu +// config - { node } +ui.component._RepositoryTree.menu.file = function(config) +{ + Ext.apply(this, config); + this.init(); + ui.component._RepositoryTree.menu.file.superclass.constructor.call(this); +} +Ext.extend(ui.component._RepositoryTree.menu.file, Ext.menu.Menu, +{ + init : function() + { + var FileName = this.node.attributes.text, + t = this.node.attributes.id.split('/'), + FileLang, FilePath; + + t.shift(); + t.shift(); + t.pop(); + + FileLang = t.shift(); + FilePath = t.join('/') + '/'; + + Ext.apply(this, + { + items : [{ + text : '<b>'+_('Edit in a new Tab')+'</b>', + iconCls : 'iconTabNeedReviewed', + scope : this, + handler : function() + { + ui.component._RepositoryTree.instance.fireEvent('dblclick', this.node); + } + }, { + hidden : (this.node.attributes.from === 'search'), + text : (FileLang === 'en') + ? String.format( + _('Open the same file in <b>{0}</b>'), + Ext.util.Format.uppercase(phpDoc.userLang)) + : String.format( + _('Open the same file in <b>{0}</b>'), 'EN'), + iconCls : 'iconTabNeedReviewed', + scope : this, + handler : function() + { + if (FileLang === 'en') { + ui.component._RepositoryTree.instance.openFile( + phpDoc.userLang + '/' + FilePath, FileName + ); + } else { + ui.component._RepositoryTree.instance.openFile( + 'en/' + FilePath, FileName + ); + } + } + }] + }); + } +}); + //------------------------------------------------------------------------------ // RepositoryTree ui.component.RepositoryTree = Ext.extend(Ext.tree.TreePanel, @@ -34,7 +125,16 @@ contextmenu : function(node, e) { node.select(); - phpDoc.repositoryContextMenu(node).showAt(e.getXY()); + + if (node.attributes.type === 'folder' || node.isRoot) { + new ui.component._RepositoryTree.menu.folder({ + node : node + }).showAt(e.getXY()); + } else if (node.attributes.type === 'file') { + new ui.component._RepositoryTree.menu.file({ + node : node + }).showAt(e.getXY()); + } }, dblclick : function(node, e) { @@ -143,7 +243,6 @@ 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( @@ -160,7 +259,6 @@ initComponent : function() { - ui.component.RepositoryTree.instance = this; Ext.apply(this, { tbar:[ @@ -184,7 +282,7 @@ }, onTrigger1Click : function() { - var instance = ui.component.RepositoryTree.instance; + var instance = ui.component._RepositoryTree.instance; this.setValue(''); this.triggers[0].hide(); instance.root.setText(_('Repository')); @@ -195,7 +293,7 @@ }, onTrigger2Click: function() { - var instance = ui.component.RepositoryTree.instance, + var instance = ui.component._RepositoryTree.instance, v = this.getValue(); if( v == '' || v.length < 3) { @@ -231,11 +329,6 @@ 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) @@ -256,7 +349,6 @@ node.childNodes[i].ensureVisible(); node.childNodes[i].ui.highlight(); this.fireEvent('dblclick', node.childNodes[i]); - Ext.getBody().unmask(); } } } @@ -264,5 +356,14 @@ this.root.expand(false, true, cb.createDelegate(this)); } }); -ui.component.RepositoryTree.prototype.instance = null; +// singleton +ui.component._RepositoryTree.instance = null; +ui.component.RepositoryTree.getInstance = function(config) +{ + if (!ui.component._RepositoryTree.instance) { + if (!config) config = {}; + ui.component._RepositoryTree.instance = new ui.component.RepositoryTree(config); + } + return ui.component._RepositoryTree.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/StaleFileGrid.js?r1=1.3&r2=1.4&diff_format=u Index: doc-editor/js/ui/component/StaleFileGrid.js diff -u doc-editor/js/ui/component/StaleFileGrid.js:1.3 doc-editor/js/ui/component/StaleFileGrid.js:1.4 --- doc-editor/js/ui/component/StaleFileGrid.js:1.3 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/StaleFileGrid.js Fri Jul 3 04:11:09 2009 @@ -320,7 +320,6 @@ initComponent : function() { - ui.component.StaleFileGrid.instance = this; ui.component._StaleFileGrid.columns[2].header = String.format( _('{0} revision'), Ext.util.Format.uppercase(phpDoc.userLang) ); @@ -358,7 +357,7 @@ { this.setValue(''); this.triggers[0].hide(); - ui.component.StaleFileGrid.instance.store.clearFilter(); + ui.component._StaleFileGrid.instance.store.clearFilter(); }, onTrigger2Click: function() { @@ -372,7 +371,7 @@ } this.clearInvalid(); this.triggers[0].show(); - ui.component.StaleFileGrid.instance.store.filter('maintainer', v); + ui.component._StaleFileGrid.instance.store.filter('maintainer', v); } }) ] @@ -380,4 +379,14 @@ ui.component.StaleFileGrid.superclass.initComponent.call(this); } }); -ui.component.StaleFileGrid.prototype.instance = null; + +// singleton +ui.component._StaleFileGrid.instance = null; +ui.component.StaleFileGrid.getInstance = function(config) +{ + if (!ui.component._StaleFileGrid.instance) { + if (!config) config = {}; + ui.component._StaleFileGrid.instance = new ui.component.StaleFileGrid(config); + } + return ui.component._StaleFileGrid.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/SummaryGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/SummaryGrid.js diff -u doc-editor/js/ui/component/SummaryGrid.js:1.1 doc-editor/js/ui/component/SummaryGrid.js:1.2 --- doc-editor/js/ui/component/SummaryGrid.js:1.1 Thu Jun 4 07:12:32 2009 +++ doc-editor/js/ui/component/SummaryGrid.js Fri Jul 3 04:11:10 2009 @@ -142,7 +142,13 @@ } }); -ui.component.SummaryGrid.reload = function() +// singleton +ui.component._SummaryGrid.instance = null; +ui.component.SummaryGrid.getInstance = function(config) { - ui.component._SummaryGrid.store.reload(); + if (!ui.component._SummaryGrid.instance) { + if (!config) config = {}; + ui.component._SummaryGrid.instance = new ui.component.SummaryGrid(config); + } + return ui.component._SummaryGrid.instance; } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/TranslationGraph.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/TranslationGraph.js diff -u doc-editor/js/ui/component/TranslationGraph.js:1.1 doc-editor/js/ui/component/TranslationGraph.js:1.2 --- doc-editor/js/ui/component/TranslationGraph.js:1.1 Thu Jun 4 07:12:32 2009 +++ doc-editor/js/ui/component/TranslationGraph.js Fri Jul 3 04:11:10 2009 @@ -1,4 +1,4 @@ -Ext.namespace('ui','ui.component'); +Ext.namespace('ui','ui.component','ui.component._TranslationGraph'); ui.component.TranslationGraph = Ext.extend(Ext.Panel, { @@ -30,3 +30,14 @@ } } }); + +// singleton +ui.component._TranslationGraph.instance = null; +ui.component.TranslationGraph.getInstance = function(config) +{ + if (!ui.component._TranslationGraph.instance) { + if (!config) config = {}; + ui.component._TranslationGraph.instance = new ui.component.TranslationGraph(config); + } + return ui.component._TranslationGraph.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/TranslatorGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/TranslatorGrid.js diff -u doc-editor/js/ui/component/TranslatorGrid.js:1.1 doc-editor/js/ui/component/TranslatorGrid.js:1.2 --- doc-editor/js/ui/component/TranslatorGrid.js:1.1 Thu Jun 4 07:12:32 2009 +++ doc-editor/js/ui/component/TranslatorGrid.js Fri Jul 3 04:11:10 2009 @@ -171,7 +171,10 @@ grid.getSelectionModel().selectRow(rowIndex); - phpDoc.sendEmail(TranslatorName, TranslatorEmail); + new ui.component.EmailPrompt({ + name : TranslatorName, + email : TranslatorEmail + }).show(); }, rowcontextmenu: function(grid, rowIndex, e) { @@ -187,14 +190,20 @@ iconCls : 'iconSendEmail', handler : function() { - phpDoc.sendEmail(TranslatorName, TranslatorEmail); + new ui.component.EmailPrompt({ + name : TranslatorName, + email : TranslatorEmail + }).show(); } }, '-', { 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'); + new ui.component.EmailPrompt({ + name : 'Php Doc Team ' + phpDoc.userLang, + email : 'doc-' + phpDoc.userLang + '@lists.php.net' + }).show(); } }] }).showAt(e.getXY()); @@ -202,7 +211,13 @@ } }); -ui.component.TranslatorGrid.reload = function() +// singleton +ui.component._TranslatorGrid.instance = null; +ui.component.TranslatorGrid.getInstance = function(config) { - ui.component._TranslatorGrid.store.reload(); + if (!ui.component._TranslatorGrid.instance) { + if (!config) config = {}; + ui.component._TranslatorGrid.instance = new ui.component.TranslatorGrid(config); + } + return ui.component._TranslatorGrid.instance; } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/AcceptPatchTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/AcceptPatchTask.js diff -u doc-editor/js/ui/task/AcceptPatchTask.js:1.2 doc-editor/js/ui/task/AcceptPatchTask.js:1.3 --- doc-editor/js/ui/task/AcceptPatchTask.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/AcceptPatchTask.js Fri Jul 3 04:11:10 2009 @@ -41,10 +41,10 @@ success : function(response) { var o = Ext.util.JSON.decode(response.responseText), - grid = ui.component.PendingPatchGrid.instance; + grid = ui.component.PendingPatchGrid.getInstance(); // Add this files into storePendingCommit - ui.component.PendingCommitGrid.instance.addRecord( + ui.component.PendingCommitGrid.getInstance().addRecord( o.id, this.fpath, this.fname, 'update' ); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/CheckFileTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/CheckFileTask.js diff -u doc-editor/js/ui/task/CheckFileTask.js:1.2 doc-editor/js/ui/task/CheckFileTask.js:1.3 --- doc-editor/js/ui/task/CheckFileTask.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/CheckFileTask.js Fri Jul 3 04:11:10 2009 @@ -5,6 +5,11 @@ { Ext.apply(this,config); + if (phpDoc.userLogin === 'cvsread') { + phpDoc.winForbidden(); + return; + } + Ext.getBody().mask( '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + _('Checking for error. Please, wait...') http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/ClearLocalChangeTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/ClearLocalChangeTask.js diff -u doc-editor/js/ui/task/ClearLocalChangeTask.js:1.2 doc-editor/js/ui/task/ClearLocalChangeTask.js:1.3 --- doc-editor/js/ui/task/ClearLocalChangeTask.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/ClearLocalChangeTask.js Fri Jul 3 04:11:10 2009 @@ -40,23 +40,24 @@ // 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(); + ui.component.StaleFileGrid.getInstance().store.reload(); + ui.component.ErrorFileGrid.getInstance().store.reload(); + ui.component.PendingReviewGrid.getInstance().store.reload(); } + var pending_commit_grid = ui.component.PendingCommitGrid.getInstance(); // We delete from this store - ui.component.PendingCommitGrid.instance.store.remove(this.storeRecord); + pending_commit_grid.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 + pending_commit_grid.store.fireEvent( + 'add', pending_commit_grid.store ); // We try to search in others stores if this file is marked as needCommit // trow storeNotInEn - ui.component.NotInENGrid.instance.store.each( + ui.component.NotInENGrid.getInstance().store.each( function(record) { if ((phpDoc.userLang+record.data.path) === this.fpath @@ -69,7 +70,7 @@ ); // trow storeFilesNeedReviewed - ui.component.PendingReviewGrid.instance.store.each( + ui.component.PendingReviewGrid.getInstance().store.each( function(record) { if ((phpDoc.userLang+record.data.path) === this.fpath @@ -82,7 +83,7 @@ ); // trow StaleFile store - ui.component.StaleFileGrid.instance.store.each( + ui.component.StaleFileGrid.getInstance().store.each( function(record) { if ((phpDoc.userLang+record.data.path) === this.fpath @@ -95,7 +96,7 @@ ); // trow FileError - ui.component.ErrorFileGrid.instance.store.each( + ui.component.ErrorFileGrid.getInstance().store.each( function(record) { if ((phpDoc.userLang+record.data.path) === this.fpath @@ -108,7 +109,7 @@ ); // find open node in All Files modules - var node = ui.component.RepositoryTree.instance.getNodeById('//'+this.fpath+this.fname); + var node = ui.component.RepositoryTree.getInstance().getNodeById('//'+this.fpath+this.fname); if (node) { node.getUI().removeClass('modified'); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/GetFileTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/GetFileTask.js diff -u doc-editor/js/ui/task/GetFileTask.js:1.1 doc-editor/js/ui/task/GetFileTask.js:1.2 --- doc-editor/js/ui/task/GetFileTask.js:1.1 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/GetFileTask.js Fri Jul 3 04:11:10 2009 @@ -36,7 +36,7 @@ phpDoc.filePendingOpen.shift(); if (phpDoc.filePendingOpen[0]) { if (phpDoc.filePendingOpen[0].fpath) { - ui.component.RepositoryTree.instance.openFile( + ui.component.RepositoryTree.getInstance().openFile( phpDoc.filePendingOpen[0].fpath, phpDoc.filePendingOpen[0].fname ); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/LoadConfigTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/LoadConfigTask.js diff -u doc-editor/js/ui/task/LoadConfigTask.js:1.1 doc-editor/js/ui/task/LoadConfigTask.js:1.2 --- doc-editor/js/ui/task/LoadConfigTask.js:1.1 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/LoadConfigTask.js Fri Jul 3 04:11:10 2009 @@ -34,9 +34,6 @@ 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/MarkDeleteTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/MarkDeleteTask.js diff -u doc-editor/js/ui/task/MarkDeleteTask.js:1.2 doc-editor/js/ui/task/MarkDeleteTask.js:1.3 --- doc-editor/js/ui/task/MarkDeleteTask.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/MarkDeleteTask.js Fri Jul 3 04:11:10 2009 @@ -29,7 +29,7 @@ var o = Ext.util.JSON.decode(response.responseText); Ext.getBody().unmask(); - ui.component.PendingCommitGrid.instance.addRecord( + ui.component.PendingCommitGrid.getInstance().addRecord( o.id, phpDoc.userLang + this.fpath, this.fname, 'delete' ); this.storeRecord.set('needcommit', true); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/PingTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/PingTask.js diff -u doc-editor/js/ui/task/PingTask.js:1.2 doc-editor/js/ui/task/PingTask.js:1.3 --- doc-editor/js/ui/task/PingTask.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/PingTask.js Fri Jul 3 04:11:10 2009 @@ -1,8 +1,7 @@ -Ext.namespace('ui', 'ui.task'); +Ext.namespace('ui', 'ui.task', 'ui.task._PingTask'); ui.task.PingTask = function() { - ui.task.PingTask.instance = this; this.task = new Ext.util.DelayedTask(function() { XHR({ @@ -32,17 +31,24 @@ }); this.task.delay(30000); }, this); +} - // delegate - this.delay = function(delay, newFn, newScope, newArgs) - { - this.task.delay(delay, newFn, newScope, newArgs); - }; +// delegates +ui.task.PingTask.prototype.delay = function(delay, newFn, newScope, newArgs) +{ + this.task.delay(delay, newFn, newScope, newArgs); +}; +ui.task.PingTask.prototype.cancel = function() +{ + this.task.cancel(); +}; - // delegate - this.cancel = function() - { - this.task.cancel(); - }; +// singleton +ui.task._PingTask.instance = null; +ui.task.PingTask.getInstance = function() +{ + if (!ui.task._PingTask.instance) { + ui.task._PingTask.instance = new ui.task.PingTask(); + } + return ui.task._PingTask.instance; } -ui.task.PingTask.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/RejectPatchTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/RejectPatchTask.js diff -u doc-editor/js/ui/task/RejectPatchTask.js:1.2 doc-editor/js/ui/task/RejectPatchTask.js:1.3 --- doc-editor/js/ui/task/RejectPatchTask.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/RejectPatchTask.js Fri Jul 3 04:11:10 2009 @@ -27,7 +27,7 @@ }, success : function(response) { - var grid = ui.component.PendingPatchGrid.instance; + var grid = ui.component.PendingPatchGrid.getInstance(); // Remove this patch from the PendingPatchStore grid.store.remove(this.storeRecord); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/SaveENFileTask.js?r1=1.3&r2=1.4&diff_format=u Index: doc-editor/js/ui/task/SaveENFileTask.js diff -u doc-editor/js/ui/task/SaveENFileTask.js:1.3 doc-editor/js/ui/task/SaveENFileTask.js:1.4 --- doc-editor/js/ui/task/SaveENFileTask.js:1.3 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/SaveENFileTask.js Fri Jul 3 04:11:10 2009 @@ -50,7 +50,7 @@ } // Add this files into storePendingCommit - ui.component.PendingCommitGrid.instance.addRecord( + ui.component.PendingCommitGrid.getInstance().addRecord( o.id, 'en' + this.fpath, this.fname, 'update' ); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/SaveLangFileTask.js?r1=1.3&r2=1.4&diff_format=u Index: doc-editor/js/ui/task/SaveLangFileTask.js diff -u doc-editor/js/ui/task/SaveLangFileTask.js:1.3 doc-editor/js/ui/task/SaveLangFileTask.js:1.4 --- doc-editor/js/ui/task/SaveLangFileTask.js:1.3 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/SaveLangFileTask.js Fri Jul 3 04:11:10 2009 @@ -5,6 +5,11 @@ { Ext.apply(this, config); + if (phpDoc.userLogin === 'cvsread') { + phpDoc.winForbidden(); + return; + } + var id_prefix = this.prefix + '-' + this.ftype, msg = Ext.MessageBox.wait(_('Saving data...')); @@ -51,7 +56,7 @@ } // Add this files into storePendingCommit - ui.component.PendingCommitGrid.instance.addRecord( + ui.component.PendingCommitGrid.getInstance().addRecord( o.id, this.lang + this.fpath, this.fname, 'update' ); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/SavePatchTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/SavePatchTask.js diff -u doc-editor/js/ui/task/SavePatchTask.js:1.1 doc-editor/js/ui/task/SavePatchTask.js:1.2 --- doc-editor/js/ui/task/SavePatchTask.js:1.1 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/SavePatchTask.js Fri Jul 3 04:11:10 2009 @@ -39,7 +39,7 @@ success : function(response) { var o = Ext.util.JSON.decode(response.responseText), - grid = ui.component.PendingPatchGrid.instance; + grid = ui.component.PendingPatchGrid.getInstance(); // Add this files into storePendingPatch grid.store.insert(0, http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/UpdateConfTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/UpdateConfTask.js diff -u doc-editor/js/ui/task/UpdateConfTask.js:1.1 doc-editor/js/ui/task/UpdateConfTask.js:1.2 --- doc-editor/js/ui/task/UpdateConfTask.js:1.1 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/UpdateConfTask.js Fri Jul 3 04:11:10 2009 @@ -32,7 +32,7 @@ break; case 'conf_error_skipnbliteraltag': phpDoc.userConf.conf_error_skipnbliteraltag = "" + this.value + ""; - ui.component.ErrorFileGrid.instance.store.reload(); + ui.component.ErrorFileGrid.getInstance().store.reload(); break; case 'conf_error_scrollbars': phpDoc.userConf.conf_error_scrollbars = "" + this.value + ""; http://cvs.php.net/viewvc.cgi/doc-editor/js/main.js?r1=1.64&r2=1.65&diff_format=u Index: doc-editor/js/main.js diff -u doc-editor/js/main.js:1.64 doc-editor/js/main.js:1.65 --- doc-editor/js/main.js:1.64 Fri Jun 26 10:29:45 2009 +++ doc-editor/js/main.js Fri Jul 3 04:11:10 2009 @@ -4,15 +4,12 @@ Ext.BLANK_IMAGE_URL = 'js/extjs/resources/images/default/s.gif'; return { - // Store - storeCommitLogMessage: '', // - // Variable userLogin : null, userLang : null, appName : 'PhpDocumentation Online Editor', appVer : '0.2', - uiRevision : '$Revision: 1.64 $', + uiRevision : '$Revision: 1.65 $', userConf : { 'conf_needupdate_diff' : 'using-exec', @@ -55,88 +52,6 @@ ); }, - loadDataStore: function() - { - // Store : Commit log - this.storeCommitLogMessage = new Ext.data.Store({ - //autoLoad: true, - 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(prefix, ftype, fid, fpath, fname, lang, record) - { - if (this.userLogin === 'cvsread') { - this.winForbidden(); - return; - } - - if (prefix === 'AF') { - new ui.task.SaveLangFileTask({ - prefix : prefix, - ftype : ftype, - fid : fid, - fpath : fpath, - fname : fname, - lang : lang, - storeRecord : record - }); - 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 (btn) - { - if (btn === 'no') { - - new ui.task.SaveLangFileTask({ - prefix : prefix, - ftype : ftype, - fid : fid, - fpath : fpath, - fname : fname, - lang : lang, - storeRecord : record - }); - - } else if (btn === 'yes') { - - new ui.task.CheckFileTask({ - prefix : prefix, - ftype : ftype, - fid : fid, - fpath : fpath, - fname : fname, - lang : lang, - storeRecord : record - }); // include SaveLangFileTask when no err - } - } - }); - - }, - // Need confirm if we want to close a tab and the content have been modified. removeTabEvent : function(tabpanel, tab) { @@ -198,978 +113,20 @@ } }, - WinCommit : function(singleFile, rowIndex, choice) - { - var win, btn, FileDBID, FileID, FilePath, FileName, node, TreeSorter; - - btn = Ext.get('acc-need-update'); - - if (!win) { - win = 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(combo, record, numIndex){ - Ext.getCmp('form-commit-message-log').setValue(record.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 tools'), - handler: function(){ - - var textArea, cm, winManage; - - function formatText(value){ - return value.split("\n").join("<br/>"); - } - - textArea = new Ext.form.TextArea({ - grow: true, - growMin: 120 - }); - - cm = new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(), { - id: 'GridManageLog', - header: _('Log message'), - dataIndex: 'text', - renderer: formatText, - editor: new Ext.Editor(textArea, { - shadow: false, - autoSize: true, - listeners: { - scope: this, - complete: function(editor, newValue, OldValue){ - - var messID = editor.record.data.id; - - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'saveLogMessage', - messID : messID, - mess : newValue - }, - success : function(response) - { - this.storeCommitLogMessage.getById(messID).commit(); - }, - failure : function(response) - { - this.winForbidden(); - } - }); - } - } - }) - - }]); - - // - winManage = 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: cm, - sm: new Ext.grid.RowSelectionModel({ - singleSelect: true - }), - autoExpandColumn: 'GridManageLog', - listeners: { - scope: this, - rowcontextmenu: function(grid, rowIndex, e){ - - grid.getSelectionModel().selectRow(rowIndex); - - var menu = 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(rowIndex).data.id - }, - success : function(response) - { - this.storeCommitLogMessage.remove(this.storeCommitLogMessage.getAt(rowIndex)); - }, - failure : function(response) - { - this.winForbidden(); - } - }); - } - }] - }); - menu.showAt(e.getXY()); - } - } - }], - buttons: [{ - text: _('Close'), - handler: function(){ - winManage.close(); - } - }], - listeners: { - scope: this, - close: function(){ - this.storeCommitLogMessage.reload(); - } - } - }); - winManage.show(); - - } - }], - buttons: [{ - scope: this, - text: _('Submit'), - id: 'win-commit-btn-submit', - handler: function(){ - - var files, NeedToBeClose, checkNode, paneID_FE, paneID_FNU, paneID_FNR, tmp = [], paneID, libelNeedToBeClose = '', i; - - // If the user is cvsread, we don't commit anything - if (this.userLogin === 'cvsread') { - - // Close this window - win.close(); - - this.winForbidden(); - - return; - } - - // Check if there is some tab open with a file who need to be committed - files = Ext.getCmp('tree-panel').getValue(); - NeedToBeClose = []; - - for (i = 0; i < files.length; i = i + 1) { - - checkNode = Ext.getCmp('tree-panel').getNodeById(files[i]).attributes; - - paneID_FE = 'FE-' + Ext.util.md5('FE-' + checkNode.FilePath + checkNode.FileName); - paneID_FNU = 'FNU-' + Ext.util.md5('FNU-' + checkNode.FilePath + checkNode.FileName); - paneID_FNR = 'FNR-' + Ext.util.md5('FNR-' + checkNode.FilePath + checkNode.FileName); - - if (Ext.getCmp('main-panel').findById(paneID_FE) || - Ext.getCmp('main-panel').findById(paneID_FNU) || - Ext.getCmp('main-panel').findById(paneID_FNR)) { - - if (Ext.getCmp('main-panel').findById(paneID_FE)) { - paneID = paneID_FE; - } - if (Ext.getCmp('main-panel').findById(paneID_FNU)) { - paneID = paneID_FNU; - } - if (Ext.getCmp('main-panel').findById(paneID_FNR)) { - paneID = paneID_FNR; - } - - tmp[0] = paneID; - tmp[1] = checkNode.FileName; - - NeedToBeClose.push(tmp); - } - - } - - if (NeedToBeClose.length > 0) { - - for (i = 0; i < NeedToBeClose.length; i = i + 1) { - libelNeedToBeClose += NeedToBeClose[i][1] + '<br/>'; - } - - Ext.MessageBox.show({ - scope: this, - title: 'Warning', - msg: (NeedToBeClose.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 ?'), NeedToBeClose.length, libelNeedToBeClose) : String.format(_('There is {0} file to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?'), NeedToBeClose.length, libelNeedToBeClose), - icon: Ext.MessageBox.INFO, - buttons: Ext.MessageBox.YESNOCANCEL, - fn: function(btn){ - if (btn === 'yes') { - - for (i = 0; i < NeedToBeClose.length; i = i + 1) { - Ext.getCmp('main-panel').remove(NeedToBeClose[i][0]); - } - - this.WinCommitLastStep(files, this); - } - else { - return; - } - } - }); - - } - else { - this.WinCommitLastStep(files, this); - } - return; - - } - }, { - text: _('Close'), - id: 'win-commit-btn-close', - handler: function(){ - win.close(); - } - }] - }); - } - - win.show(btn); - - var grid = ui.component.PendingCommitGrid.instance; - // Load files to commit - if (singleFile) { - // Just the current file - 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({ - id: 'need-commit-' + FileID, - text: FilePath + FileName, - FileDBID: FileDBID, - FilePath: FilePath, - FileName: FileName, - leaf: true, - checked: true, - uiProvider: Ext.ux.tree.CheckTreeNodeUI - }); - - Ext.getCmp('tree-panel').getRootNode().appendChild(node); - - } else { - - // in files Need Update - grid.store.each(function(record){ - - if (choice && choice === 'by me' && record.data.by !== this.userLogin) { - } - else { - - FileDBID = record.data.id; - FilePath = record.data.path; - FileName = record.data.name; - FileID = Ext.util.md5(FilePath + FileName); - - node = new Ext.tree.TreeNode({ - id: 'need-commit-' + FileID, - text: FilePath + FileName, - FileDBID: FileDBID, - FilePath: FilePath, - FileName: FileName, - leaf: true, - checked: true, - uiProvider: Ext.ux.tree.CheckTreeNodeUI - }); - - Ext.getCmp('tree-panel').getRootNode().appendChild(node); - } - - }, this); - - // We sort the node alphabetically - TreeSorter = new Ext.tree.TreeSorter(Ext.getCmp('tree-panel'), {}); - TreeSorter.doSort(Ext.getCmp('tree-panel').getRootNode()); - } - - - }, // WinCommit - - WinCommitLastStep : function(files, scope) - { - Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait until commit...')); - - var nodes = [], node, LogMessage, i; - - // Go for Cvs commit - for (i = 0; i < files.length; i = i + 1) { - - node = Ext.getCmp('tree-panel').getNodeById(files[i]); - nodes.push(node.attributes.FileDBID); - } - - // Get log message - LogMessage = Ext.getCmp('form-commit-message-log').getValue(); - - // Close this window - Ext.getCmp('winCvsCommit').close(); - - XHR({ - url : './php/controller.php', - params : { - task : 'cvsCommit', - nodes : Ext.util.JSON.encode(nodes), - logMessage : LogMessage - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - Ext.getBody().unmask(); - - // Display commit output message - var winStatus = new Ext.Window({ - title : _('Status'), - width : 450, - height : 350, - resizable : false, - modal : true, - autoScroll : true, - bodyStyle : 'background-color: white; padding: 5px;', - html : o.mess.join("<br/>"), - buttons : [{ - text : _('Close'), - handler : function() - { - winStatus.close(); - } - }] - }); - winStatus.show(); - - Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait...')); - - // Apply modification - XHR({ - url : './php/controller.php', - params : { - task : 'onSuccesCommit', - nodes : Ext.util.JSON.encode(nodes), - logMessage : LogMessage - }, - success : function(response) - { - if (scope.userLang != 'en') { - // Reload Files error data - ui.component.ErrorFileGrid.instance.store.reload(); - - // Reload Files Need reviewed - ui.component.PendingReviewGrid.instance.store.reload(); - - // Reload Files Need Update - ui.component.StaleFileGrid.instance.store.reload(); - } - - ui.component.PendingCommitGrid.instance.store.reload(); - - // Reload translators data - ui.component.TranslatorGrid.reload(); - - // Reload summary data - ui.component.SummaryGrid.reload(); - - Ext.getBody().unmask(); - } - }); - } - }); - - }, // WinCommitLastStep - - WinUpdate : function() - { - // Update of Cvs and apply all tools. - var win, btn; - - function RefreshStep1(scope){ - - // We need to stop pin test during this update - 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 : scope, - url : './php/controller.php', - params : { - task: 'updateRepository' - }, - success : function(response) - { - // Normally, this never succes ! ;) - Ext.get('wizard-step-1').replaceClass('wizard-step-working', 'wizard-step-done'); - Ext.get('wizard-step-1.1').replaceClass('wizard-show', 'wizard-wait'); - RefreshStep2(scope); - }, - failure: function(response) - { - - var o = Ext.util.JSON.decode(response.responseText); - - if (o && o.success === false) { - win.close(); - this.winForbidden(); - } else { - // If update take over 30sec (max Keep-Alive time), we are on failure ! - function checkLockFile(){ - XHR({ - scope : scope, - url : './php/controller.php', - params : { - task : 'checkLockFile', - lockFile : 'lock_update_repository' - }, - success : function(response) - { - wizardDelayUpdate.delay(5000); - }, - failure : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - if (o && o.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'); - - // Goto step2 - RefreshStep2(this); - } else { - wizardDelayUpdate.delay(5000); - } - } - }); - - } - - // We check ever XX secondes if checkout is finish, or not. - var wizardDelayUpdate = new Ext.util.DelayedTask(function(){ - checkLockFile(); - }); - wizardDelayUpdate.delay(5000); - - } - - - - } - }); - - } // RefreshStep1() - function RefreshStep2(scope){ - Ext.get('wizard-step-2').replaceClass('wizard-step-before', 'wizard-step-working'); - XHR({ - scope : scope, - url : './php/controller.php', - params : { - task: 'applyTools' - }, - success : function(response) - { - Ext.get('wizard-step-2').replaceClass('wizard-step-working', 'wizard-step-done'); - RefreshStep3(this); - }, - failure : function(response) - { - // If the first pass take over 30 sec., we check the lock file - function checkLockFile2(){ - XHR({ - scope : scope, - url : './php/controller.php', - params : { - task : 'checkLockFile', - lockFile : 'lock_apply_tools' - }, - success : function(response) - { - wizardDelayApplyTools.delay(5000); - }, - failure : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - if (o && o.success === false) { - Ext.get('wizard-step-2').replaceClass('wizard-step-working', 'wizard-step-done'); - RefreshStep3(this); - } else { - wizardDelayApplyTools.delay(5000); - } - } - }); - } - - // We check ever XX secondes if applaying tools is finish, or not. - var wizardDelayApplyTools = new Ext.util.DelayedTask(function(){ - checkLockFile2(); - }); - wizardDelayApplyTools.delay(5000); - - } - }); - - } // RefreshStep2() - function RefreshStep3(scope){ - - Ext.get('wizard-step-3').replaceClass('wizard-step-before', 'wizard-step-working'); - - if (phpDoc.userLang != 'en') { - // Reload all data on this page - 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'); - - // Re-enable Finish button - Ext.getCmp('btn-start-refresh').setIconClass('finishRefresh'); - Ext.getCmp('btn-start-refresh').setText(_('Finish !')); - Ext.getCmp('btn-start-refresh').setHandler(function(){ - win.close(); - }); - Ext.getCmp('btn-start-refresh').enable(); - - // Re-enable TaskPing - ui.task.PingTask.instance.delay(30000); - - // Re-enable win's close button - win.tools.close.setVisible(true); - - } // RefreshStep3() - btn = Ext.get('acc-need-update'); - - if (!win) { - win = 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(){ - - // Desable start button - Ext.getCmp('btn-start-refresh').disable(); - - // Desable the close button for this win - win.tools.close.setVisible(false); - - // Set 'in progress' - Ext.getDom('lastUpdateTime').innerHTML = _('update in progress...'); - - // Start Step 1 - RefreshStep1(this); - - } - }] - }); - } - - - // We test if there is an update in progress or not - 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(response) - { - // Remove wait msg - Ext.getBody().unmask(); - - var o = Ext.util.JSON.decode(response.responseText); - - if( o.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 { - win.show(btn); - } - } - }); - - }, // Winupdate - - WinCheckBuild : function() - { - var win, btn; - - btn = Ext.get('acc-need-update'); - - function displayMess(scope){ - - XHR({ - scope : scope, - url : './php/controller.php', - params : { - task : 'getLogFile', - file : 'log_check_build' - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - // Re-enable TaskPing - ui.task.PingTask.instance.delay(30000); - - // Display - 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">'+o.mess+'</div>' - }); - Ext.getCmp('main-panel').setActiveTab('check_build_panel'); - } - }); - } - - if (!win) { - win = 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 choice = Ext.getCmp('option-xml-details').checked; - - win.close(); - 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 - ui.task.PingTask.instance.cancel(); - - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'checkBuild', - xmlDetails : choice - }, - success : function(response) - { - Ext.getBody().unmask(); - displayMess(this); - }, - failure : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - if (o && o.success === false) { - // Re-enable TaskPing - ui.task.PingTask.instance.delay(30000); - Ext.getBody().unmask(); - this.winForbidden(); - } else { - // If this take over 30sec (max Keep-Alive time), we are on failure ! - - function checkLockFile(scope){ - XHR({ - scope : scope, - url : './php/controller.php', - params : { - task : 'checkLockFile', - lockFile : 'lock_check_build' - }, - success : function(response) - { - builcheckDelay.delay(5000); - }, - failure : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - if (o && o.success === false) { - Ext.getBody().unmask(); - displayMess(this); - } else { - builcheckDelay.delay(5000); - } - } - }); - - } - - // We check ever XX secondes if the check build is finish, or not. - var builcheckDelay = new Ext.util.DelayedTask(function(){ - checkLockFile(this); - }, this); - builcheckDelay.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' - }] - - }); - } - win.show(btn); - - - }, //WinCheckBuild - - sendEmail : function(TranslatorName, TranslatorEmail) - { - var form, win; - - form = 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: '"' + TranslatorName + '" <' + TranslatorEmail + '>' - }, { - fieldLabel: _('Subject'), - name: 'subject', - anchor: '100%' - }, { - xtype: 'textarea', - hideLabel: true, - name: 'msg', - anchor: '100% -53' - }] - }); - - win = 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: form, - iconCls: 'iconSendEmail', - - buttons: [{ - text: _('Send'), - handler: function(){ - - var v = form.getForm().getValues(); - - XHR({ - url : './php/controller.php', - params : { - task : 'sendEmail', - to : v.to, - subject : v.subject, - msg : v.msg - }, - success : function(response) - { - win.close(); - Ext.MessageBox.alert(_('Status'), String.format(_('Email sent to {0} with success!'), TranslatorName)); - } - }); - - } - }, { - text: _('Cancel'), - handler: function(){ - win.close(); - } - }] - }); - - win.show(); - - }, //sendEmail - - repositoryContextMenu : function(node) - { - // repository tree context menu handler - var t, FileName, FilePath, FileLang; - - if (node.attributes.type === 'folder' || node.isRoot) { - - return new Ext.menu.Menu({ - items: [{ - text : (node.isExpanded()) - ? '<b>' + _('Collapse') + '</b>' - : '<b>' + _('Expand') + '</b>', - iconCls : 'iconFolderClose', - handler : function() - { - if (node.isExpanded()) node.collapse(); - else node.expand(); - } - }] - }); - - } else if (node.attributes.type === 'file') { - - FileName = node.attributes.text; - FilePath = node.attributes.id; - - // CleanUp the path - t = FilePath.split('/'); - t.shift(); - t.shift(); - t.pop(); - - FileLang = t.shift(); - FilePath = t.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', node); - } - }, { - hidden : (node.attributes.from === 'search'), - scope : this, - text : (FileLang === '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 (FileLang === 'en') { - this.openFile(this.userLang + '/' + FilePath, FileName); - } else { - this.openFile('en/' + FilePath, FileName); - } - } - }] - }); - } - }, - drawInterface: function() { // We keel alive our session by sending a ping every minute - new ui.task.PingTask().delay(30000); // start after 1 minute. + ui.task.PingTask.getInstance().delay(30000); // start after 1 minute. var mainMenu = new ui.component.MainMenu(), mainContent = (this.userLang === 'en') ? [ - new ui.component.LocalMailGrid() + ui.component.LocalMailGrid.getInstance() ] : [ - new ui.component.SummaryGrid(), - new ui.component.TranslatorGrid(), - new ui.component.LocalMailGrid(), - new ui.component.BugsGrid(), - new ui.component.TranslationGraph() + ui.component.SummaryGrid.getInstance(), + ui.component.TranslatorGrid.getInstance(), + ui.component.LocalMailGrid.getInstance(), + ui.component.BugsGrid.getInstance(), + ui.component.TranslationGraph.getInstance() ]; new Ext.Viewport({ layout : 'border', @@ -1210,7 +167,7 @@ layout : 'fit', iconCls : 'FilesNeedUpdate', hidden : (this.userLang === 'en'), - items : [ new ui.component.StaleFileGrid() ], + items : [ ui.component.StaleFileGrid.getInstance() ], collapsed : true, listeners : { expand : function(panel) @@ -1225,7 +182,7 @@ layout : 'fit', iconCls : 'FilesError', hidden : (this.userLang === 'en'), - items : [ new ui.component.ErrorFileGrid() ], + items : [ ui.component.ErrorFileGrid.getInstance() ], collapsed : true, listeners : { expand : function(panel) @@ -1240,7 +197,7 @@ layout : 'fit', iconCls : 'FilesNeedReviewed', hidden : (this.userLang === 'en'), - items : [ new ui.component.PendingReviewGrid() ], + items : [ ui.component.PendingReviewGrid.getInstance() ], collapsed : true, listeners : { expand : function(panel) @@ -1255,14 +212,14 @@ layout : 'fit', iconCls : 'NotInEn', hidden : (this.userLang === 'en'), - items : [ new ui.component.NotInENGrid() ], + items : [ ui.component.NotInENGrid.getInstance() ], collapsed : true }, { id : 'acc-all-files', title : _('All files'), layout : 'fit', iconCls : 'AllFiles', - items : [ new ui.component.RepositoryTree() ], + items : [ ui.component.RepositoryTree.getInstance() ], collapsed : true, listeners : { expand : function(panel) @@ -1276,14 +233,14 @@ title : _('Pending for commit') + ' - <em id="acc-pendingCommit-nb">0</em>', layout : 'fit', iconCls : 'PendingCommit', - items : [ new ui.component.PendingCommitGrid() ], + items : [ ui.component.PendingCommitGrid.getInstance() ], 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() ], + items : [ ui.component.PendingPatchGrid.getInstance() ], collapsed : true }] }] @@ -1340,7 +297,7 @@ // Direct access to a file as cvsread if (directAccess) { - this.openFile( + ui.component.RepositoryTree.getInstance().openFile( directAccess.lang + directAccess.path, directAccess.name ); http://cvs.php.net/viewvc.cgi/doc-editor/js/main_min.js?r1=1.7&r2=1.8&diff_format=u Index: doc-editor/js/main_min.js diff -u doc-editor/js/main_min.js:1.7 doc-editor/js/main_min.js:1.8 --- doc-editor/js/main_min.js:1.7 Fri Jun 26 10:29:45 2009 +++ doc-editor/js/main_min.js Fri Jul 3 04:11:10 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);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 +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.getInstance();ui.component.PendingCommitGrid.getInstance().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._CheckBuildTask");ui.task._CheckBu! ildTask.display=function(){XHR({url:"./php/controller.php",params:{tas k:"getLogFile",file:"log_check_build"},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.getBody().unmask();ui.task.PingTask.getInstance().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">'+b.mess+"</div>"});Ext.getCmp("main-panel").setActiveTab("check_build_panel")}})};ui.task._CheckBuildTask.poll=new Ext.util.DelayedTask(function(){XHR({url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_check_build"},success:function(a){ui.task._CheckBuildTask.poll.delay(5000)},failure:function(a){var b=Ext.util.JSON.decode(a.responseText);if(b&&b.success===false){new ui.task._CheckBuildTask.display()}else{ui.task._CheckBuildTask.poll.delay(5000)}}})});ui.task.CheckBuildTask=function(a){Ext.getB! ody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait until the build is checked..."));ui.task.PingTask.getInstance().cancel();XHR({url:"./php/controller.php",params:{task:"checkBuild",xmlDetails:Ext.getCmp("option-xml-details").checked},success:function(b){new ui.task._CheckBuildTask.display()},failure:function(b){var c=Ext.util.JSON.decode(b.responseText);if(c&&c.success===false){ui.task.PingTask.getInstance().delay(30000);Ext.getBody().unmask();phpDoc.winForbidden()}else{ui.task._CheckBuildTask.poll.delay(5000)}}})};Ext.namespace("ui","ui.task");ui.task.CheckFileTask=function(a){Ext.apply(this,a);if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}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,FileConte! nt: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.winForb! idden();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(d){if(phpDoc.userLang==="en"){ui.component.StaleFileGrid.getInstance().store.reload();ui.component.ErrorFileGrid.getInstance().store.reload();ui.component.PendingReviewGrid.getInstance().store.reload()}var c=ui.component.PendingCommitGrid.getInstance();c.store.remove(this.storeRecord);c.store.fireEvent("add",c.store);ui.component.NotInENGrid.getIns! tance().store.each(function(f){if((phpDoc.userLang+f.data.path)===this ..fpath&&f.data.name===this.fname){f.set("needcommit",false)}},this);ui.component.PendingReviewGrid.getInstance().store.each(function(f){if((phpDoc.userLang+f.data.path)===this.fpath&&f.data.name===this.fname){f.set("needcommit",false)}},this);ui.component.StaleFileGrid.getInstance().store.each(function(f){if((phpDoc.userLang+f.data.path)===this.fpath&&f.data.name===this.fname){f.set("needcommit",false)}},this);ui.component.ErrorFileGrid.getInstance().store.each(function(f){if((phpDoc.userLang+f.data.path)===this.fpath&&f.data.name===this.fname){f.set("needcommit",false)}},this);var e=ui.component.RepositoryTree.getInstance().getNodeById("//"+this.fpath+this.fname);if(e){e.getUI().removeClass("modified")}Ext.getBody().unmask()},failure:function(c){Ext.getBody().unmask();phpDoc.winForbidden()}})}},this)};Ext.namespace("ui","ui.task","ui.task._CVSCommitTask");ui.task._CVSCommitTask.commit=function(e){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: m! iddle;" /> '+_("Please, wait until commit..."));var a=[],d,c;for(var b=0;b<e.length;b=b+1){d=Ext.getCmp("commit-tree-panel").getNodeById(e[b]);a.push(d.attributes.FileDBID)}c=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:c},success:function(f){var g=Ext.util.JSON.decode(f.responseText);Ext.getBody().unmask();new Ext.Window({title:_("Status"),width:450,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:g.mess.join("<br/>"),buttons:[{text:_("Close"),handler:function(){this.ownerCt.close()}}]}).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:c},success:function(h){if(phpDoc.userLang!="en"){ui.component.ErrorFileGr! id.getInstance().store.reload();ui.component.PendingReviewGrid.getInst ance().store.reload();ui.component.StaleFileGrid.getInstance().store.reload()}ui.component.PendingCommitGrid.getInstance().store.reload();ui.component.TranslatorGrid.getInstance().store.reload();ui.component.SummaryGrid.getInstance().store.reload();Ext.getBody().unmask()}})}})};ui.task.CVSCommitTask=function(){if(phpDoc.userLogin==="cvsread"){Ext.getCmp("winCvsCommit").close();phpDochis.winForbidden();return}var a=Ext.getCmp("commit-tree-panel").getValue(),e=new Array(),g,j,b,c,h,f="";for(var d=0;d<a.length;++d){g=Ext.getCmp("commit-tree-panel").getNodeById(a[d]).attributes;j="FE-"+Ext.util.md5("FE-"+g.FilePath+g.FileName);b="FNU-"+Ext.util.md5("FNU-"+g.FilePath+g.FileName);c="FNR-"+Ext.util.md5("FNR-"+g.FilePath+g.FileName);if(Ext.getCmp("main-panel").findById(j)||Ext.getCmp("main-panel").findById(b)||Ext.getCmp("main-panel").findById(c)){if(Ext.getCmp("main-panel").findById(j)){h=j}if(Ext.getCmp("main-panel").findById(b)){h=b}if(Ext.getCmp("main-panel").findById(c)){h=c}e.! push([h,g.FileName])}}if(e.length>0){for(var d=0;d<e.length;++d){f+=e[d][1]+"<br/>"}Ext.MessageBox.show({title:"Warning",icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,msg:(e.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 ?"),e.length,f):String.format(_("There is {0} file to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?"),e.length,f),fn:function(k){if(k==="yes"){for(var i=0;i<e.length;++i){Ext.getCmp("main-panel").remove(e[i][0])}ui.task._CVSCommitTask.commit(a)}}})}else{ui.task._CVSCommitTask.commit(a)}};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:func! tion(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.getInstance().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/controller.php",params:{task:"getConf"},success:function(b){var c=Ext.decode(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.c! onf_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.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="ve! rtical-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.getInstance().addRecord(d.id,phpDoc.userLang+this.fpath,this.fname,"delete");this.storeRecord.set("needcommit",true)}})}},this)};Ext.namespace("ui","ui.task","ui.task._PingTask");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)};ui.task.PingTask.prototype.delay=function(b,d,c,a){this.! task.delay(b,d,c,a)};ui.task.PingTask.prototype.cancel=function(){this.task.cancel()};ui.task._PingTask.instance=null;ui.task.PingTask.getInstance=function(){if(!ui.task._PingTask.instance){ui.task._PingTask.instance=new ui.task.PingTask()}return ui.task._PingTask.instance};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.getInstance();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.na! mespace("ui","ui.task");ui.task.SaveENFileTask=function(b){Ext.apply(t his,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.prefix==="FNR"){this.storeRecord.set("needcommit",true)}if(this.prefix==="AF"){this.storeRecord.getUI().addClass("modified")}ui.component.PendingCommitGrid.getInstance().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+"-P! ANEL-"+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);if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}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.sto! reRecord.set("needcommit",true);this.storeRecord.set("maintainer",e.ma intainer);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.getInstance().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.responseText),e=ui.component.PendingPatchGrid.getInstance();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.namespa! ce("ui","ui.task","ui.task._SystemUpdateTask");ui.task._SystemUpdateTa sk.refresh_ui=function(){Ext.get("wizard-step-3").replaceClass("wizard-step-before","wizard-step-working");if(phpDoc.userLang!="en"){ui.component.StaleFileGrid.getInstance().store.reload();ui.component.ErrorFileGrid.getInstance().store.reload();ui.component.TranslatorGrid.getInstance().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(){Ext.getCmp("sys-update-win").close()});Ext.getCmp("btn-start-refresh").enable();ui.task.PingTask.getInstance().delay(30000);Ext.getCmp("sys-update-win").tools.close.setVisible(true)};ui.task._SystemUpdateTask.poll_apply_tool=new Ext.util.DelayedTask(function(){XHR({url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_apply_tools"},success:function(a){ui.task._SystemUpdateTask.poll_apply_tool.delay(5000)},failure:fu! nction(a){var b=Ext.util.JSON.decode(a.responseText);if(b&&b.success===false){Ext.get("wizard-step-2").replaceClass("wizard-step-working","wizard-step-done");new ui.task._SystemUpdateTask.refresh_ui()}else{ui.task._SystemUpdateTask.poll_apply_tool.delay(5000)}}})});ui.task._SystemUpdateTask.apply_tool=function(){Ext.get("wizard-step-2").replaceClass("wizard-step-before","wizard-step-working");XHR({url:"./php/controller.php",params:{task:"applyTools"},success:function(a){Ext.get("wizard-step-2").replaceClass("wizard-step-working","wizard-step-done");new ui.task._SystemUpdateTask.refresh_ui()},failure:function(a){ui.task._SystemUpdateTask.poll_apply_tool.delay(5000)}})};ui.task._SystemUpdateTask.cvs_poll=new Ext.util.DelayedTask(function(){XHR({url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_update_repository"},success:function(a){ui.task._SystemUpdateTask.cvs_poll.delay(5000)},failure:function(a){var b=Ext.util.JSON.decode(a.responseText);if(b&&b.succe! ss===false){Ext.get("wizard-step-1").replaceClass("wizard-step-working ","wizard-step-done");Ext.get("wizard-step-1.1").replaceClass("wizard-show","wizard-wait");new ui.task._SystemUpdateTask.apply_tool()}else{ui.task._SystemUpdateTask.cvs_poll.delay(5000)}}})});ui.task.SystemUpdateTask=function(){ui.task.PingTask.getInstance().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({url:"./php/controller.php",params:{task:"updateRepository"},success:function(a){Ext.get("wizard-step-1").replaceClass("wizard-step-working","wizard-step-done");Ext.get("wizard-step-1.1").replaceClass("wizard-show","wizard-wait");new ui.task._SystemUpdateTask.apply_tool()},failure:function(a){var b=Ext.util.JSON.decode(a.responseText);if(b&&b.success===false){Ext.getCmp("sys-update-win").close();phpDoc.winForbidden()}else{ui.task._SystemUpdateTask.cvs_poll.delay(5000)}}})};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.getInstance().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.val! ue+"";break;case"conf_allfiles_displaylog":phpDoc.userConf.conf_allfil es_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.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",totalP! roperty:"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.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:"openI! nTab",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.userLang),tbar:[{tooltip:_("Refresh this grid"),iconCls:"refresh",handler:function(){ui.component.BugsGrid.reload()}}]});ui.component.BugsGrid.superclass.initComponent.call(this)}});ui.component._BugsGrid.instance=null;ui.component.BugsGrid.getInstance=function(a){if(!ui.component._BugsGrid.instance)! {if(!a){a={}}ui.component._BugsGrid.instance=new ui.component.BugsGrid (a)}return ui.component._BugsGrid.instance};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:"l! ang",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.CheckBuildPrompt=Ext.extend(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:[{id:"win-check-build-btn-submit",text:_("Go !"),handler:function(){new ui.task.CheckBuildTask();this.ownerCt.close()}}],initComponent:function(){Ext.apply(this,{items:[{xtype:"panel",mod! al:false,baseCls:"x-plain",bodyStyle:"padding:5px 5px 0",html:_("You'r e about to check the build via this command:")+"<br/><br/>/usr/bin/php configure.php --with-lang="+phpDoc.userLang+"<br><br>"},{xtype:"checkbox",id:"option-xml-details",name:"option-xml-details",checked:false,hideLabel:true,boxLabel:_("Enable detailed XML error messages")}]});ui.component.CheckBuildPrompt.superclass.initComponent.call(this)}});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:"chec! k_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._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-se! lected-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.getInstance().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(var b=0;b<a.getCount();++b){phpDoc.filePendingOpen[b]={fpath:"en"+c.fpath,fname:a.getAt(b).data.file}}ui.component.RepositoryTree.getInstance().openFile(phpDoc.filePendingOpen[0].fpath,phpDoc.filePendingOpen[0].fname);c.close()}},{text:"Open selected files",id:"check-doc-btn-ope! n-selected-files",disabled:true,handler:function(){var c=Ext.getCmp("c heck-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.getInstance().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:{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.c! omponent._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._CommitLogPrompt");ui.component._CommitLogPrompt.store=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"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"text",mapping:"text"}]))});ui.component._CommitLogPrompt.cm=new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),{id:"log_msg",header:_("Log message"),dataIndex:"text",renderer:function(a){return a.split("\n").join("<br/>")},editor:new Ext.Editor(new Ext.form.TextArea({grow:true,growMin:120}),{sh! adow:false,autoSize:true,listeners:{complete:function(c,d,b){var a=c.r ecord.data.id;XHR({url:"./php/controller.php",params:{task:"saveLogMessage",messID:a,mess:d},success:function(e){ui.component._CommitLogPrompt.store.getById(a).commit()},failure:function(e){phpDoc.winForbidden()}})}}})}]);ui.component._CommitLogPrompt.sm=new Ext.grid.RowSelectionModel({singleSelect:true});ui.component._CommitLogPrompt.menu=function(a){Ext.apply(this,a);this.init();ui.component._CommitLogPrompt.menu.superclass.constructor.call(this)};Ext.extend(ui.component._CommitLogPrompt.menu,Ext.menu.Menu,{init:function(){var a=ui.component._CommitLogPrompt.store;Ext.apply(this,{items:[{text:_("Delete this Log Message"),iconCls:"iconDelete",handler:function(){XHR({url:"./php/controller.php",params:{task:"deleteLogMessage",messID:a.getAt(rowIndex).data.id},success:function(b){a.remove(a.getAt(rowIndex))},failure:function(b){phpDoc.winForbidden()}})}}]})}});ui.component._CommitLogPrompt.grid=Ext.extend(Ext.grid.EditorGridPanel,{loadMask:true,autoExpandColumn:"log_msg",cm:ui! .component._CommitLogPrompt.cm,sm:ui.component._CommitLogPrompt.sm,store:ui.component._CommitLogPrompt.store,listeners:{rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c);new ui.component._CommitLogPrompt.menu().showAt(b.getXY())}}});ui.component.CommitLogPrompt=Ext.extend(Ext.Window,{id:"commit-log-win",title:_("Manage Log Message"),iconCls:"winManageLog",width:650,height:350,layout:"fit",resizable:false,modal:true,autoScroll:true,html:'<div class="diff-content"></div>',buttons:[{text:_("Close"),handler:function(){this.ownerCt.close()}}],listeners:{close:function(){ui.component._CommitLogPrompt.store.reload()}},initComponent:function(){Ext.apply(this,{items:[new ui.component._CommitLogPrompt.grid()],});ui.component.CommitLogPrompt.superclass.initComponent.call(this)}});ui.component.CommitLogPrompt.store=ui.component._CommitLogPrompt.store;Ext.namespace("ui","ui.component");ui.component.CommitPrompt=Ext.extend(Ext.Window,{id:"winCvsCommit",layout:"form",title! :_("CVS commit"),closable:false,width:400,height:480,resizable:false,m odal:true,bodyStyle:"padding:5px 5px 0",labelAlign:"top",tools:[{id:"gear",qtip:_("Configure this tools"),handler:function(){new ui.component.CommitLogPrompt().show()}}],buttons:[{id:"win-commit-btn-submit",text:_("Submit"),handler:function(){new ui.task.CVSCommitTask()}},{id:"win-commit-btn-close",text:_("Close"),handler:function(){Ext.getCmp("winCvsCommit").close()}}],initComponent:function(){var a=new Ext.tree.TreeNode({text:"root",expanded:true});for(var b=0;b<this.files.length;++b){a.appendChild(new Ext.tree.TreeNode({id:"need-commit-"+this.files[b].fid,text:this.files[b].fpath+this.files[b].fname,FileDBID:this.files[b].fdbid,FilePath:this.files[b].fpath,FileName:this.files[b].fname,leaf:true,checked:true}))}Ext.apply(this,{items:[{xtype:"checktreepanel",id:"commit-tree-panel",anchor:"100%",height:180,autoScroll:true,rootVisible:false,root:a},{xtype:"combo",name:"first2",fieldLabel:_("Older messages"),editable:false,anchor:"100%",store:ui.component.CommitLogPrompt.store! ,triggerAction:"all",tpl:'<tpl for="."><div class="x-combo-list-item">{[values.text.split("\n").join("<br/>")]}</div></tpl>',valueField:"id",displayField:"text",listeners:{render:function(c){c.store.load()},select:function(e,c,d){Ext.getCmp("form-commit-message-log").setValue(c.data.text)}}},{xtype:"textarea",id:"form-commit-message-log",name:"first3",fieldLabel:_("Log message"),anchor:"100%",height:150,value:""}]});ui.component.CommitPrompt.superclass.initComponent.call(this)}});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,{singleSe! lect:false,header:"",width:22,listeners:{beforerowselect:function(b){v ar 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.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;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: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._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.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-card-"+c[0].data.id)}}});ui.component._EditorConf.themeStore=new Ext.data.SimpleStore({fields:["themeFile",{name:"themeN! ame",type:"string"}],data:[["themes/black/css/xtheme-black.css",_("Bla ck")],["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:u! i.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:f! alse,boxLabel:_("Using diff -kk -u command line"),inputValue:"using-ex ec",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.component._EditorConf.card2.superclass.initComponent.call(this)}});ui.component._EditorConf.card3=Ext.extend(Ext.form.FormPanel,{id:"conf-card-3",bodyStyle:"padding: 10px;",initComponent:fun! ction(){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._Ed itorConf.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({item:"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.userConf.conf_patch_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){n! ew ui.task.UpdateConfTask({item:"conf_patch_scrollbars",value:a.getVal ue()})}}},{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._EditorConf.menuDefEn)}else{ui.component._EditorConf.menuStore.loadData(ui.component._EditorConf.menuDefNonEn)}Ext.apply(this,{items:[{id:"confMenu",region:"west",width:190,autoScroll:true,it! ems:[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._EmailPrompt");ui.component.EmailPrompt=Ext.extend(Ext.Window,{title:_("Send an email"),width:500,height:300,minWidth:300,minHeight:200,layout:"fit",plain:true,bodyStyle:"padding:5px;",buttonAlign:"center",iconCls:"iconSendEmail",buttons:[{text:_("Send"),handler:function(){var a=this.ownerCt.findByType("form").shift().getForm().getValues();XHR({scope:this,url:"./php/controller.php",params:{task:"sendEma! il",to:a.to,subject:a.subject,msg:a.msg},success:function(b){this.owne rCt.close();Ext.MessageBox.alert(_("Status"),String.format(_("Email sent to {0} with success!"),this.ownerCt.name))}})}},{text:_("Cancel"),handler:function(){this.ownerCt.close()}}],initComponent:function(){Ext.apply(this,{items:new Ext.form.FormPanel({url:"save-form.php",baseCls:"x-plain",labelWidth:55,defaultType:"textfield",items:[{name:"to",fieldLabel:_("Send To"),readOnly:true,anchor:"100%",value:'"'+this.name+'" <'+this.email+">"},{name:"subject",fieldLabel:_("Subject"),anchor:"100%"},{name:"msg",xtype:"textarea",hideLabel:true,anchor:"100% -53"}]})});ui.component.EmailPrompt.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=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" 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,rowIdx:f,lang:phpDoc.user! Lang,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-LA! NG",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-des! c")}}else{Ext.getCmp("main-panel").setActiveTab("FE-"+g)}}},initCompon ent: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();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.component.ErrorFileGrid.superclass.initComponent.call(this)}});ui.com! ponent._ErrorFileGrid.instance=null;ui.component.ErrorFileGrid.getInstance=function(a){if(!ui.component._ErrorFileGrid.instance){if(!a){a={}}ui.component._ErrorFileGrid.instance=new ui.component.ErrorFileGrid(a)}return ui.component._ErrorFileGrid.instance};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.compon! ent._FilePanel.tbar.menu");ui.component._FilePanel.tbar.menu.lang=func tion(a){Ext.apply(this,a);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()}}]})})}});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.Men! u({items:[{scope:this,text:_("Description section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(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><!-- }}} -->"].join(""));Ext.getCm! p(this.comp_id).focus()}},{scope:this,text:_("Parameters section"),han dler: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.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><!-- }}} -->"].join(""));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.ret! urnvalues;\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><!-- }}} -->"].join(""));Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Error 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="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"].join(""));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\n","Information specific to! unicode, from the PHP 6 changes.\r\n","</para>\r\n","</refsect1><!-- }}} -->"].join(""));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.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><!-- }}} -->"].join(""));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="exampl! es"><!-- {{{ -->\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><!-- }}} -->"].join(""));Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Notes section"),handler:! function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCurs orPosition());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\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><!-- }}} -->"].join(""));Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("SeeAlso 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="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><!-- }}} -->"].join(""));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("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> "].join(""))}}}]:[{xtype:"panel",height:21,baseCl! s:"",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> "].join("")}];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>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(a+"-FILE-"+this.fid).reIndentAll()}}]:[{id:a+"-PANEL-btn-sav! e-"+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{if(this.prefix==="AF"){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});return}Ext.MessageBox.show({title:_("Confirm"),msg:_("Do you want to check for error before saving?"),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,scope:this,fn:function(b){if(b==="no"){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})}else{if(b==="yes"){new ui.task.CheckFileTask({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:this.fpath,fname:this.fname,lang:this.lang,storeRecord:this.storeR! ecord})}}}})}}},{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")?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+"."+thi! s.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+"-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&&e!==35&&e!==36){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+"-P! ANEL-btn-saveas-"+this.fid).enable();Ext.get(a+"-PANEL-btn-saveas-"+th is.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:"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.component._LocalMailGrid.columns,sm:new Ext.g! rid.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(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.LocalM! ailGrid.reload()}}]});ui.component.LocalMailGrid.superclass.initComponent.call(this)}});ui.component._LocalMailGrid.instance=null;ui.component.LocalMailGrid.getInstance=function(a){if(!ui.component._LocalMailGrid.instance){if(!a){a={}}ui.component._LocalMailGrid.instance=new ui.component.LocalMailGrid(a)}return ui.component._LocalMailGrid.instance};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:function(){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(a){Ext.getBody().unmask();var ! b=Ext.util.JSON.decode(a.responseText);if(b.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{new ui.component.SystemUpdatePrompt().show(Ext.get("acc-need-update"))}}})}},{text:_("Check Build"),disabled:(phpDoc.userLogin==="cvsread")?true:false,iconCls:"checkBuild",handler:function(){new ui.component.CheckBuildPrompt().show(Ext.get("acc-need-update"))}},{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/lo! ading.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: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:"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._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:fu nction(){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(){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.instance=null;ui.component.NotInENGrid.getInstance=function! (a){if(!ui.component._NotInENGrid.instance){if(!a){a={}}ui.component._NotInENGrid.instance=new ui.component.NotInENGrid(a)}return ui.component._NotInENGrid.instance};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(){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("pa! tch-email-alert").getValue()});this.close()}},{scope:this,text:_("Canc el"),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.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:t! rue,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["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",d! isabled:(phpDoc.userLogin==="cvsread"),handler:function(){return false },menu:new Ext.menu.Menu({items:[{scope:this,text:_("...this file"),iconCls:"iconCommitFileCvs",handler:function(){var a=ui.component.PendingCommitGrid.getInstance().store.getAt(this.rowIdx),c=a.data.id,b=a.data.path,e=a.data.name,d=Ext.util.md5(b+e);new ui.component.CommitPrompt({files:[{fid:d,fpath:b,fname:e,fdbid:c}]}).show()}},{scope:this,text:_("...all files modified by me"),iconCls:"iconCommitFileCvs",handler:function(){var b=[],a=ui.component.PendingCommitGrid.getInstance();a.store.each(function(c){if(c.data.by===phpDoc.userLogin){var e=c.data.id,d=c.data.path,g=c.data.name,f=Ext.util.md5(d+g);b.push({fid:f,fpath:d,fname:g,fdbid:e})}});new ui.component.CommitPrompt({files:b}).show()}},{scope:this,text:_("...all files modified"),iconCls:"iconCommitFileCvs",handler:function(){var b=[],a=ui.component.PendingCommitGrid.getInstance();a.store.each(function(c){var e=c.data.id,d=c.data.path,g=c.data.name,f=Ext.util.md5(d+g);b.push({fid:f,fpath:d,fname:g,fdbid:e})});new ui.com! ponent.CommitPrompt({files:b}).show()}}]})})}});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:"ge tDiff",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._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.men! u.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"){ui.component.RepositoryTree.getInstance(). openFile(d,a)}if(b==="delete"){new ui.task.ClearLocalChangeTask({storeRecord:f,ftype:b,fpath:d,fname:a})}}},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)},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.instance=null;ui.component.PendingCommitGrid.getInstance=function(a){if(!ui.component._PendingCommitGrid.instance){if(!a){a={}}ui.component._PendingCommitGrid.instance=new ui.component.PendingCommitGrid(a)}return ui.component._PendingCommitGrid.instance};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:"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._PendingPatchGri! d.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)})}}]})}});ui.component.PendingPatchGrid=Ext.extend(Ext.grid.GridPanel,{store:ui.component._PendingPatchGrid.store,columns:ui.component._PendingPatchGrid.columns,view:ui.component._PendingPatchGri! d.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,typ e:"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",syncS! croll: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)}});ui.component._PendingPatchGrid.instance=null;ui.component.PendingPatchGrid.getInstance=function(a){if(!ui.component._PendingPatchGrid.instance){if(!a){a={}}ui.component._PendingPatchGrid.instance=new ui.component.PendingPatchGrid(a)}return ui.component._PendingPatchGrid.instance};Ext.namespace("ui","ui.component","ui.component._PendingReviewGrid");ui.component._PendingReviewGrid.store=Ext.extend(Ext.! data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",total Property:"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"}},e! mptyText:'<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,FileNa! me:this.fname},success:function(a){var b=Ext.util.JSON.decode(a.respon seText);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="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.getInstance().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._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.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:u! i.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,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,fna! me: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.use! rLang!=="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.instance=null;ui.component.PendingReviewGrid.getInstance=function(a){if(!ui.component._PendingReviewGrid.instance){if(!a! ){a={}}ui.component._PendingReviewGrid.instance=new ui.component.PendingReviewGrid(a)}return ui.component._PendingReviewGrid.instance};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"}});Ext.namespace("ui.component._RepositoryTree.menu");ui.component._RepositoryTree.menu.folder=function(a){Ext.apply(this,a);this.init();ui.component._RepositoryTree.menu.folder.superclass.constructor.call(this)};Ext.extend(ui.component._RepositoryTree.menu.folder,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{text:(this.node.isExpanded())?"<b>"+_("Collapse")+"</b>":"<b>"+_("Expand")+"</b>",iconCls:"iconFolderClose",scope:this,handler:function(){if(this.node.isExpanded()){this.node.collapse()}else{this.node.expand()}}}]})}});ui.component._Rep! ositoryTree.menu.file=function(a){Ext.apply(this,a);this.init();ui.com ponent._RepositoryTree.menu.file.superclass.constructor.call(this)};Ext.extend(ui.component._RepositoryTree.menu.file,Ext.menu.Menu,{init:function(){var a=this.node.attributes.text,b=this.node.attributes.id.split("/"),d,c;b.shift();b.shift();b.pop();d=b.shift();c=b.join("/")+"/";Ext.apply(this,{items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"iconTabNeedReviewed",scope:this,handler:function(){ui.component._RepositoryTree.instance.fireEvent("dblclick",this.node)}},{hidden:(this.node.attributes.from==="search"),text:(d==="en")?String.format(_("Open the same file in <b>{0}</b>"),Ext.util.Format.uppercase(phpDoc.userLang)):String.format(_("Open the same file in <b>{0}</b>"),"EN"),iconCls:"iconTabNeedReviewed",scope:this,handler:function(){if(d==="en"){ui.component._RepositoryTree.instance.openFile(phpDoc.userLang+"/"+c,a)}else{ui.component._RepositoryTree.instance.openFile("en/"+c,a)}}}]})}});ui.component.RepositoryTree=Ext.extend(Ext.tree.TreePanel,{animate:true,enable! DD: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();if(a.attributes.type==="folder"||a.isRoot){new ui.component._RepositoryTree.menu.folder({node:a}).showAt(b.getXY())}else{if(a.attributes.type==="file"){new ui.component._RepositoryTree.menu.file({node: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",bo! dyBorder:false,split:true,collapsible:true,collapsed:true,width:375,it ems:{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("main-panel").setActiveTab("AF-"+i)}else{Ext.getCmp("main-panel").setActiveTab("AF-"+i);if(phpDoc.filePendingOpen[0]){if(phpDoc.filePendingOpen[0]){if(phpDoc.filePendingOpen[0].fpath){this.openFile(phpDoc.filePendingOpen[0].fpath,phpDoc.filePendingOpen[0].fname)}}}}}}},initComponent:function(){Ext.apply(this,{tbar:[_("Search: ")," ",new Ext.form.TwinTri! ggerField({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(){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.g! etCmp("acc-all-files").expand();var b=c.split("/"),a=function(f){f.ens ureVisible();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])}}}};this.root.expand(false,true,a.createDelegate(this))}});ui.component._RepositoryTree.instance=null;ui.component.RepositoryTree.getInstance=function(a){if(!ui.component._RepositoryTree.instance){if(!a){a={}}ui.component._RepositoryTree.instance=new ui.component.RepositoryTree(a)}return ui.component._RepositoryTree.instance};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",mappi! ng:"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")+'" : "'+_("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:"revi! sion"},{header:_("Maintainer"),width:45,sortable:true,dataIndex:"maint ainer"},{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, wai! t..."));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(ph! pDoc.userConf.conf_needupdate_diff==="using-viewvc"){k=ui.component.Vi ewVCDiff}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: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-PA! NEL-"+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_scrollbars"})]});Ext.getCmp("main-panel").setActiveTab("FNU-"+d)}else{Ext.getCmp("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-fi lter",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.instance=null;ui.component.StaleFileGrid.getInstance=function(a){if(!ui.component._StaleFileGrid.instance){if(!a){a={}}ui.component._StaleFileGrid.instance=new ui.component.StaleFileGrid(a)}return ui.component._StaleFileGrid.instance};Ext.namespac! e("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;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.RowN! umberer(),{id:"StatusType",header:_("File status type"),width:180,sort able: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("a! cc-need-update").expand()}}},initComponent:function(){Ext.apply(this,{iconCls:"flag-"+phpDoc.userLang,});ui.component.SummaryGrid.superclass.initComponent.call(this)}});ui.component._SummaryGrid.instance=null;ui.component.SummaryGrid.getInstance=function(a){if(!ui.component._SummaryGrid.instance){if(!a){a={}}ui.component._SummaryGrid.instance=new ui.component.SummaryGrid(a)}return ui.component._SummaryGrid.instance};Ext.namespace("ui","ui.component");ui.component.SystemUpdatePrompt=Ext.extend(Ext.Window,{id:"sys-update-win",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-ste! p-3" class="wizard-step-before">',_("Reload data"),"</div>"].join(""), buttons:[{id:"btn-start-refresh",text:_("Start"),iconCls:"startRefresh",handler:function(){Ext.getCmp("btn-start-refresh").disable();this.ownerCt.tools.close.setVisible(false);Ext.getDom("lastUpdateTime").innerHTML=_("update in progress...");new ui.task.SystemUpdateTask()}}]});Ext.namespace("ui","ui.component","ui.component._TranslationGraph");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"}}});ui.component._TranslationGraph.instance=null;ui.component.TranslationGrap! h.getInstance=function(a){if(!ui.component._TranslationGraph.instance){if(!a){a={}}ui.component._TranslationGraph.instance=new ui.component.TranslationGraph(a)}return ui.component._TranslationGraph.instance};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._T ranslatorGrid.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_sumR! enderer,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:"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);new ui.component.EmailPrompt({name:b,email:a}).show()},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>"+Strin g.format(_("Send an email to {0}"),b)+"</b>",iconCls:"iconSendEmail",handler:function(){new ui.component.EmailPrompt({name:b,email:a}).show()}},"-",{text:String.format(_("Send an email to the {0}"),"doc-"+phpDoc.userLang+"@lists.php.net"),iconCls:"iconSendEmail",handler:function(){new ui.component.EmailPrompt({name:"Php Doc Team "+phpDoc.userLang,email:"doc-"+phpDoc.userLang+"@lists.php.net"}).show()}}]}).showAt(d.getXY())}}});ui.component._TranslatorGrid.instance=null;ui.component.TranslatorGrid.getInstance=function(a){if(!ui.component._TranslatorGrid.instance){if(!a){a={}}ui.component._TranslatorGrid.instance=new ui.component.TranslatorGrid(a)}return ui.component._TranslatorGrid.instance};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.ne! t/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{userLogin:null,userLang:null,appName:"PhpDocumentation Online Editor",appVer:"0.2",uiRevision:"$Revision: 1.8 $",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."))},remo! veTabEvent:function(d,e){var b,c,f,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.removeTabEvent,this)}}});return false}else{return true}}else{return true}},drawInterface:function(){ui.task! .PingTask.getInstance().delay(30000);var b=new ui.component.MainMenu(),a=(this.userLang==="en")?[ui.component.LocalMailGrid.getInstance()]:[ui.component.SummaryGrid.getInstance(),ui.component.TranslatorGrid.getInstance(),ui.component.LocalMailGrid.getInstance(),ui.component.BugsGrid.getInstance(),ui.component.TranslationGraph.getInstance()];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==="e! n"),items:[ui.component.StaleFileGrid.getInstance()],collapsed:true,li steners:{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",iconCls:"FilesError",hidden:(this.userLang==="en"),items:[ui.component.ErrorFileGrid.getInstance()],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:[ui.component.PendingReviewGrid.getInstance()],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:[ui.component.NotInENGrid.getInstance()],collapsed:true},{id:"acc-all-files",title:_("All files"),layout:"fit",iconCls:"AllFiles",items:[ui.component.Repository! Tree.getInstance()],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:[ui.component.PendingCommitGrid.getInstance()],collapsed:true},{id:"acc-need-pendingPatch",title:_("Pending Patch")+' - <em id="acc-pendingPatch-nb">0</em>',layout:"fit",iconCls:"PendingPatch",items:[ui.component.PendingPatchGrid.getInstance()],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="lastUpdateTi me">{0}</em>'),"-")+"</h3></div></div>"},{xtype:"tabpanel",activeTab:0,plain:true,autoScroll:true,height:400,border:false,items:a,defaults:{border:true},layoutOnTabChange:true}]}]}]});Ext.get("loading").remove();Ext.fly("loading-mask").fadeOut({remove:true});if(directAccess){ui.component.RepositoryTree.getInstance().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.12&r2=1.13&diff_format=u Index: doc-editor/TODO diff -u doc-editor/TODO:1.12 doc-editor/TODO:1.13 --- doc-editor/TODO:1.12 Fri Jun 26 10:29:45 2009 +++ doc-editor/TODO Fri Jul 3 04:11:10 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.12 $ keyword (in comments, about popup, ..) +* Use the $Revision: 1.13 $ 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) @@ -40,19 +40,11 @@ * Automatic upgrade - Add an automatic system to upgrade dataBase (when it's needed) uppon the application version number. (idea by Richard Quadling) -* ClearLocalChange - - clear local change attempt to open en file which may not exist (class.php line 1884). JSON response would contain the php-warning message. - JAVASCRIPT: =========== -* Clean up the namespaces -* Split main.js to several objects & files (to be discussed) * 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 @@ -66,3 +58,20 @@ - DocBook - ReST - PO files (gettext) + +BUGS: +===== + +* ClearLocalChange + - clear local change attempt to open en file which may not exist (class.php line 1884). + JSON response would contain the php-warning message that breaks javascript. + +* onSuccesCommit + - when committing file, the function attempt to open en file which may not exist (ExtJsController.php line 623). + JSON response would contain the php-warning message that breaks javascript. + +* Saving patch / file + - when a file is saved, file.new is created. when a patch is saved, file.new is replaced by file.###.patch + Some ui component may issue a diff between file & file.new but sometimes file.new is removed as .patch + +* reopening file-diff (context-menu diff) in main-panel tab crashes extjs http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/CheckBuildPrompt.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/CheckBuildPrompt.js +++ doc-editor/js/ui/component/CheckBuildPrompt.js Ext.namespace('ui','ui.component'); ui.component.CheckBuildPrompt = Ext.extend(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 : [{ id : 'win-check-build-btn-submit', text : _('Go !'), handler : function() { new ui.task.CheckBuildTask(); this.ownerCt.close(); } }], initComponent : function() { Ext.apply(this, { items : [{ xtype : 'panel', modal : false, 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=' + phpDoc.userLang + '<br><br>' }, { xtype : 'checkbox', id : 'option-xml-details', name : 'option-xml-details', checked : false, hideLabel : true, boxLabel : _('Enable detailed XML error messages') }] }); ui.component.CheckBuildPrompt.superclass.initComponent.call(this); } }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/CommitLogPrompt.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/CommitLogPrompt.js +++ doc-editor/js/ui/component/CommitLogPrompt.js Ext.namespace('ui','ui.component','ui.component._CommitLogPrompt'); ui.component._CommitLogPrompt.store = 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' }, Ext.data.Record.create([ { name : 'id', mapping : 'id' }, { name : 'text', mapping : 'text' } ]) ) }); ui.component._CommitLogPrompt.cm = new Ext.grid.ColumnModel([ new Ext.grid.RowNumberer(), { id : 'log_msg', header : _('Log message'), dataIndex : 'text', renderer : function(value) { return value.split("\n").join("<br/>"); }, editor : new Ext.Editor( new Ext.form.TextArea({ grow : true, growMin : 120 }), { shadow : false, autoSize : true, listeners : { complete : function(editor, newValue, OldValue) { var messID = editor.record.data.id; XHR({ url : './php/controller.php', params : { task : 'saveLogMessage', messID : messID, mess : newValue }, success : function(response) { ui.component._CommitLogPrompt.store.getById(messID).commit(); }, failure : function(response) { phpDoc.winForbidden(); } }); } } } ) } ]); ui.component._CommitLogPrompt.sm = new Ext.grid.RowSelectionModel({ singleSelect: true }); ui.component._CommitLogPrompt.menu = function(config) { Ext.apply(this, config); this.init(); ui.component._CommitLogPrompt.menu.superclass.constructor.call(this); } Ext.extend(ui.component._CommitLogPrompt.menu, Ext.menu.Menu, { init : function() { var store = ui.component._CommitLogPrompt.store; Ext.apply(this, { items : [{ text : _('Delete this Log Message'), iconCls : 'iconDelete', handler : function() { XHR({ url : './php/controller.php', params : { task : 'deleteLogMessage', messID : store.getAt(rowIndex).data.id }, success : function(response) { store.remove(store.getAt(rowIndex)); }, failure : function(response) { phpDoc.winForbidden(); } }); } }] }); } }); ui.component._CommitLogPrompt.grid = Ext.extend(Ext.grid.EditorGridPanel, { loadMask : true, autoExpandColumn : 'log_msg', cm : ui.component._CommitLogPrompt.cm, sm : ui.component._CommitLogPrompt.sm, store : ui.component._CommitLogPrompt.store, listeners : { rowcontextmenu : function(grid, rowIndex, e) { grid.getSelectionModel().selectRow(rowIndex); new ui.component._CommitLogPrompt.menu().showAt(e.getXY()); } } }); ui.component.CommitLogPrompt = Ext.extend(Ext.Window, { id : 'commit-log-win', title : _('Manage Log Message'), iconCls : 'winManageLog', width : 650, height : 350, layout : 'fit', resizable : false, modal : true, autoScroll : true, html : '<div class="diff-content"></div>', buttons : [{ text : _('Close'), handler : function() { this.ownerCt.close(); } }], listeners : { close : function() { ui.component._CommitLogPrompt.store.reload(); } }, initComponent : function() { Ext.apply(this, { items : [new ui.component._CommitLogPrompt.grid()], }); ui.component.CommitLogPrompt.superclass.initComponent.call(this); } }); ui.component.CommitLogPrompt.store = ui.component._CommitLogPrompt.store; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/CommitPrompt.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/CommitPrompt.js +++ doc-editor/js/ui/component/CommitPrompt.js Ext.namespace('ui','ui.component'); // config - { files: {fid, fpath, fname, fdbid} } ui.component.CommitPrompt = Ext.extend(Ext.Window, { id : 'winCvsCommit', layout : 'form', title : _('CVS commit'), closable : false, width : 400, height : 480, resizable : false, modal : true, bodyStyle : 'padding:5px 5px 0', labelAlign : 'top', tools: [{ id : 'gear', qtip : _('Configure this tools'), handler : function() { new ui.component.CommitLogPrompt().show(); } }], buttons : [{ id : 'win-commit-btn-submit', text : _('Submit'), handler : function() { new ui.task.CVSCommitTask(); } }, { id : 'win-commit-btn-close', text : _('Close'), handler : function() { Ext.getCmp('winCvsCommit').close(); } }], initComponent : function() { var root = new Ext.tree.TreeNode({ text : 'root', expanded : true }); for (var i = 0; i < this.files.length; ++i) { root.appendChild( new Ext.tree.TreeNode({ id : 'need-commit-' + this.files[i].fid, text : this.files[i].fpath + this.files[i].fname, FileDBID : this.files[i].fdbid, FilePath : this.files[i].fpath, FileName : this.files[i].fname, leaf : true, checked : true }) ); } Ext.apply(this, { items : [{ xtype : 'checktreepanel', id : 'commit-tree-panel', anchor : '100%', height : 180, autoScroll : true, rootVisible : false, root : root }, { xtype : 'combo', name : 'first2', fieldLabel : _('Older messages'), editable : false, anchor : '100%', store : ui.component.CommitLogPrompt.store, triggerAction : 'all', tpl : '<tpl for="."><div class="x-combo-list-item">{[values.text.split("\n").join("<br/>")]}</div></tpl>', valueField : 'id', displayField : 'text', listeners : { render : function(combo) { combo.store.load(); }, select : function(combo, record, numIndex) { Ext.getCmp('form-commit-message-log').setValue(record.data.text); } } }, { xtype : 'textarea', id : 'form-commit-message-log', name : 'first3', fieldLabel : _('Log message'), anchor : '100%', height : 150, value : '' }] }); ui.component.CommitPrompt.superclass.initComponent.call(this); } }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/EmailPrompt.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/EmailPrompt.js +++ doc-editor/js/ui/component/EmailPrompt.js Ext.namespace('ui','ui.component','ui.component._EmailPrompt'); // config - { name, email } ui.component.EmailPrompt = Ext.extend(Ext.Window, { title : _('Send an email'), width : 500, height : 300, minWidth : 300, minHeight : 200, layout : 'fit', plain : true, bodyStyle : 'padding:5px;', buttonAlign : 'center', iconCls : 'iconSendEmail', buttons : [{ text : _('Send'), handler : function() { var values = this.ownerCt.findByType('form').shift() .getForm().getValues(); XHR({ scope : this, url : './php/controller.php', params : { task : 'sendEmail', to : values.to, subject : values.subject, msg : values.msg }, success : function(response) { this.ownerCt.close(); Ext.MessageBox.alert( _('Status'), String.format(_('Email sent to {0} with success!'), this.ownerCt.name) ); } }); } }, { text : _('Cancel'), handler : function() { this.ownerCt.close(); } }], initComponent : function() { Ext.apply(this, { items : new Ext.form.FormPanel({ url : 'save-form.php', baseCls : 'x-plain', labelWidth : 55, defaultType : 'textfield', items : [{ name : 'to', fieldLabel : _('Send To'), readOnly : true, anchor : '100%', value : '"' + this.name + '" <' + this.email + '>' }, { name : 'subject', fieldLabel : _('Subject'), anchor : '100%' }, { name : 'msg', xtype : 'textarea', hideLabel : true, anchor : '100% -53' }] }) }); ui.component.EmailPrompt.superclass.initComponent.call(this); } }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/SystemUpdatePrompt.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/SystemUpdatePrompt.js +++ doc-editor/js/ui/component/SystemUpdatePrompt.js Ext.namespace('ui','ui.component'); ui.component.SystemUpdatePrompt = Ext.extend(Ext.Window, { id : 'sys-update-win', 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>' ].join(''), buttons : [{ id : 'btn-start-refresh', text : _('Start'), iconCls : 'startRefresh', handler : function() { // Disable start button Ext.getCmp('btn-start-refresh').disable(); // Disable the close button for this win this.ownerCt.tools.close.setVisible(false); // Set 'in progress' Ext.getDom('lastUpdateTime').innerHTML = _('update in progress...'); new ui.task.SystemUpdateTask(); } }] }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/CheckBuildTask.js?view=markup&rev=1.1 Index: doc-editor/js/ui/task/CheckBuildTask.js +++ doc-editor/js/ui/task/CheckBuildTask.js Ext.namespace('ui','ui.task','ui.task._CheckBuildTask'); ui.task._CheckBuildTask.display = function() { XHR({ url : './php/controller.php', params : { task : 'getLogFile', file : 'log_check_build' }, success : function(response) { var o = Ext.util.JSON.decode(response.responseText); Ext.getBody().unmask(); // Re-enable TaskPing ui.task.PingTask.getInstance().delay(30000); // Display 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">' + o.mess + '</div>' }); Ext.getCmp('main-panel').setActiveTab('check_build_panel'); } }); } ui.task._CheckBuildTask.poll = new Ext.util.DelayedTask(function() { XHR({ url : './php/controller.php', params : { task : 'checkLockFile', lockFile : 'lock_check_build' }, success : function(response) { ui.task._CheckBuildTask.poll.delay(5000); }, failure : function(response) { var o = Ext.util.JSON.decode(response.responseText); if (o && o.success === false) { new ui.task._CheckBuildTask.display(); } else { ui.task._CheckBuildTask.poll.delay(5000); } } }); }); ui.task.CheckBuildTask = function(config) { Ext.getBody().mask( '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + _('Please, wait until the build is checked...') ); // We need to stop ping test during this process ui.task.PingTask.getInstance().cancel(); XHR({ url : './php/controller.php', params : { task : 'checkBuild', xmlDetails : Ext.getCmp('option-xml-details').checked }, success : function(response) { new ui.task._CheckBuildTask.display(); }, failure : function(response) { var o = Ext.util.JSON.decode(response.responseText); if (o && o.success === false) { // Re-enable TaskPing ui.task.PingTask.getInstance().delay(30000); Ext.getBody().unmask(); phpDoc.winForbidden(); } else { // take over 30sec (max Keep-Alive time) // poll every XX secondes if the check build is finish ui.task._CheckBuildTask.poll.delay(5000); } } }); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/CVSCommitTask.js?view=markup&rev=1.1 Index: doc-editor/js/ui/task/CVSCommitTask.js +++ doc-editor/js/ui/task/CVSCommitTask.js Ext.namespace('ui','ui.task','ui.task._CVSCommitTask'); ui.task._CVSCommitTask.commit = function(files) { Ext.getBody().mask( '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + _('Please, wait until commit...') ); var nodes = [], node, LogMessage; // Go for Cvs commit for (var i = 0; i < files.length; i = i + 1) { node = Ext.getCmp('commit-tree-panel').getNodeById(files[i]); nodes.push(node.attributes.FileDBID); } // Get log message LogMessage = Ext.getCmp('form-commit-message-log').getValue(); // Close this window Ext.getCmp('winCvsCommit').close(); XHR({ url : './php/controller.php', params : { task : 'cvsCommit', nodes : Ext.util.JSON.encode(nodes), logMessage : LogMessage }, success : function(response) { var o = Ext.util.JSON.decode(response.responseText); Ext.getBody().unmask(); // Display commit output message new Ext.Window({ title : _('Status'), width : 450, height : 350, resizable : false, modal : true, autoScroll : true, bodyStyle : 'background-color: white; padding: 5px;', html : o.mess.join("<br/>"), buttons : [{ text : _('Close'), handler : function() { this.ownerCt.close(); } }] }).show(); Ext.getBody().mask( '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + _('Please, wait...') ); // Apply modification XHR({ url : './php/controller.php', params : { task : 'onSuccesCommit', nodes : Ext.util.JSON.encode(nodes), logMessage : LogMessage }, success : function(response) { if (phpDoc.userLang != 'en') { ui.component.ErrorFileGrid.getInstance().store.reload(); ui.component.PendingReviewGrid.getInstance().store.reload(); ui.component.StaleFileGrid.getInstance().store.reload(); } ui.component.PendingCommitGrid.getInstance().store.reload(); ui.component.TranslatorGrid.getInstance().store.reload(); ui.component.SummaryGrid.getInstance().store.reload(); Ext.getBody().unmask(); } }); } }); } ui.task.CVSCommitTask = function() { // If the user is cvsread, we don't commit anything if (phpDoc.userLogin === 'cvsread') { Ext.getCmp('winCvsCommit').close(); phpDochis.winForbidden(); return; } var files = Ext.getCmp('commit-tree-panel').getValue(), NeedToBeClose = new Array(), checkNode, paneID_FE, paneID_FNU, paneID_FNR, paneID, labelNeedToBeClose = ''; for (var i = 0; i < files.length; ++i) { checkNode = Ext.getCmp('commit-tree-panel').getNodeById(files[i]).attributes; paneID_FE = 'FE-' + Ext.util.md5('FE-' + checkNode.FilePath + checkNode.FileName); paneID_FNU = 'FNU-' + Ext.util.md5('FNU-' + checkNode.FilePath + checkNode.FileName); paneID_FNR = 'FNR-' + Ext.util.md5('FNR-' + checkNode.FilePath + checkNode.FileName); if ( Ext.getCmp('main-panel').findById(paneID_FE) || Ext.getCmp('main-panel').findById(paneID_FNU) || Ext.getCmp('main-panel').findById(paneID_FNR) ) { if (Ext.getCmp('main-panel').findById(paneID_FE)) { paneID = paneID_FE; } if (Ext.getCmp('main-panel').findById(paneID_FNU)) { paneID = paneID_FNU; } if (Ext.getCmp('main-panel').findById(paneID_FNR)) { paneID = paneID_FNR; } NeedToBeClose.push([paneID, checkNode.FileName]); } } if (NeedToBeClose.length > 0) { for (var i = 0; i < NeedToBeClose.length; ++i) { labelNeedToBeClose += NeedToBeClose[i][1] + '<br/>'; } Ext.MessageBox.show({ title : 'Warning', icon : Ext.MessageBox.INFO, buttons : Ext.MessageBox.YESNOCANCEL, msg : (NeedToBeClose.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 ?'), NeedToBeClose.length, labelNeedToBeClose) : String.format( _('There is {0} file to close before commit.<br><br>' + '{1}<br/><br/>Would you like I close it for you ?'), NeedToBeClose.length, labelNeedToBeClose), fn : function(btn) { if (btn === 'yes') { for (var j = 0; j < NeedToBeClose.length; ++j) { Ext.getCmp('main-panel').remove(NeedToBeClose[j][0]); } ui.task._CVSCommitTask.commit(files); } } }); } else { ui.task._CVSCommitTask.commit(files); } } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/SystemUpdateTask.js?view=markup&rev=1.1 Index: doc-editor/js/ui/task/SystemUpdateTask.js +++ doc-editor/js/ui/task/SystemUpdateTask.js Ext.namespace('ui','ui.task','ui.task._SystemUpdateTask'); ui.task._SystemUpdateTask.refresh_ui = function() { Ext.get('wizard-step-3').replaceClass('wizard-step-before', 'wizard-step-working'); if (phpDoc.userLang != 'en') { // Reload all data on this page ui.component.StaleFileGrid.getInstance().store.reload(); ui.component.ErrorFileGrid.getInstance().store.reload(); ui.component.TranslatorGrid.getInstance().store.reload(); } Ext.get('wizard-step-3').replaceClass('wizard-step-working', 'wizard-step-done'); // Re-enable Finish button Ext.getCmp('btn-start-refresh').setIconClass('finishRefresh'); Ext.getCmp('btn-start-refresh').setText(_('Finish !')); Ext.getCmp('btn-start-refresh').setHandler(function() { Ext.getCmp('sys-update-win').close(); }); Ext.getCmp('btn-start-refresh').enable(); // Re-enable TaskPing ui.task.PingTask.getInstance().delay(30000); // Re-enable win's close button Ext.getCmp('sys-update-win').tools.close.setVisible(true); } ui.task._SystemUpdateTask.poll_apply_tool = new Ext.util.DelayedTask(function() { XHR({ url : './php/controller.php', params : { task : 'checkLockFile', lockFile : 'lock_apply_tools' }, success : function(response) { ui.task._SystemUpdateTask.poll_apply_tool.delay(5000); }, failure : function(response) { var o = Ext.util.JSON.decode(response.responseText); if (o && o.success === false) { Ext.get('wizard-step-2').replaceClass('wizard-step-working', 'wizard-step-done'); new ui.task._SystemUpdateTask.refresh_ui(); } else { ui.task._SystemUpdateTask.poll_apply_tool.delay(5000); } } }); }); ui.task._SystemUpdateTask.apply_tool = function() { Ext.get('wizard-step-2').replaceClass('wizard-step-before', 'wizard-step-working'); XHR({ url : './php/controller.php', params : { task: 'applyTools' }, success : function(response) { Ext.get('wizard-step-2').replaceClass('wizard-step-working', 'wizard-step-done'); new ui.task._SystemUpdateTask.refresh_ui(); }, failure : function(response) { ui.task._SystemUpdateTask.poll_apply_tool.delay(5000); } }); } ui.task._SystemUpdateTask.cvs_poll = new Ext.util.DelayedTask(function() { XHR({ url : './php/controller.php', params : { task : 'checkLockFile', lockFile : 'lock_update_repository' }, success : function(response) { ui.task._SystemUpdateTask.cvs_poll.delay(5000); }, failure : function(response) { var o = Ext.util.JSON.decode(response.responseText); if (o && o.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'); new ui.task._SystemUpdateTask.apply_tool(); } else { ui.task._SystemUpdateTask.cvs_poll.delay(5000); } } }); }); ui.task.SystemUpdateTask = function() { ui.task.PingTask.getInstance().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({ url : './php/controller.php', params : { task: 'updateRepository' }, success : function(response) { Ext.get('wizard-step-1').replaceClass('wizard-step-working', 'wizard-step-done'); Ext.get('wizard-step-1.1').replaceClass('wizard-show', 'wizard-wait'); new ui.task._SystemUpdateTask.apply_tool(); }, failure: function(response) { var o = Ext.util.JSON.decode(response.responseText); if (o && o.success === false) { Ext.getCmp('sys-update-win').close(); phpDoc.winForbidden(); } else { ui.task._SystemUpdateTask.cvs_poll.delay(5000); } } }); }
http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/BugsGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/BugsGrid.js diff -u doc-editor/js/ui/component/BugsGrid.js:1.2 doc-editor/js/ui/component/BugsGrid.js:1.3 --- doc-editor/js/ui/component/BugsGrid.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/BugsGrid.js Fri Jul 3 04:11:09 2009 @@ -137,7 +137,14 @@ } }); -ui.component.BugsGrid.reload = function() +// singleton +ui.component._BugsGrid.instance = null; +ui.component.BugsGrid.getInstance = function(config) { - ui.component._BugsGrid.store.reload(); + if (!ui.component._BugsGrid.instance) { + if (!config) config = {}; + ui.component._BugsGrid.instance = new ui.component.BugsGrid(config); + } + return ui.component._BugsGrid.instance; } + http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/CheckDoc.js?r1=1.3&r2=1.4&diff_format=u Index: doc-editor/js/ui/component/CheckDoc.js diff -u doc-editor/js/ui/component/CheckDoc.js:1.3 doc-editor/js/ui/component/CheckDoc.js:1.4 --- doc-editor/js/ui/component/CheckDoc.js:1.3 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/CheckDoc.js Fri Jul 3 04:11:09 2009 @@ -182,7 +182,7 @@ }, rowdblclick : function(grid, rowIndex, e) { - ui.component.RepositoryTree.instance.openFile( + ui.component.RepositoryTree.getInstance().openFile( 'en' + grid.fpath, grid.store.getAt(rowIndex).data.file ); @@ -221,7 +221,7 @@ }; } - ui.component.RepositoryTree.instance.openFile( + ui.component.RepositoryTree.getInstance().openFile( phpDoc.filePendingOpen[0].fpath, phpDoc.filePendingOpen[0].fname ); @@ -248,7 +248,7 @@ }; } - ui.component.RepositoryTree.instance.openFile( + ui.component.RepositoryTree.getInstance().openFile( phpDoc.filePendingOpen[0].fpath, phpDoc.filePendingOpen[0].fname ); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/ErrorFileGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/ErrorFileGrid.js diff -u doc-editor/js/ui/component/ErrorFileGrid.js:1.2 doc-editor/js/ui/component/ErrorFileGrid.js:1.3 --- doc-editor/js/ui/component/ErrorFileGrid.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/ErrorFileGrid.js Fri Jul 3 04:11:09 2009 @@ -356,7 +356,6 @@ initComponent : function() { - ui.component.ErrorFileGrid.instance = this; Ext.apply(this, { store : new ui.component._ErrorFileGrid.store({ @@ -392,7 +391,7 @@ { this.setValue(''); this.triggers[0].hide(); - ui.component.ErrorFileGrid.instance.store.clearFilter(); + ui.component._ErrorFileGrid.instance.store.clearFilter(); }, onTrigger2Click : function() { @@ -406,7 +405,7 @@ } this.clearInvalid(); this.triggers[0].show(); - ui.component.ErrorFileGrid.instance.store.filter('maintainer', v); + ui.component._ErrorFileGrid.instance.store.filter('maintainer', v); } }) ] @@ -414,4 +413,14 @@ ui.component.ErrorFileGrid.superclass.initComponent.call(this); } }); -ui.component.ErrorFileGrid.prototype.instance = null; + +// singleton +ui.component._ErrorFileGrid.instance = null; +ui.component.ErrorFileGrid.getInstance = function(config) +{ + if (!ui.component._ErrorFileGrid.instance) { + if (!config) config = {}; + ui.component._ErrorFileGrid.instance = new ui.component.ErrorFileGrid(config); + } + return ui.component._ErrorFileGrid.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/FilePanel.js?r1=1.3&r2=1.4&diff_format=u Index: doc-editor/js/ui/component/FilePanel.js diff -u doc-editor/js/ui/component/FilePanel.js:1.3 doc-editor/js/ui/component/FilePanel.js:1.4 --- doc-editor/js/ui/component/FilePanel.js:1.3 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/FilePanel.js Fri Jul 3 04:11:09 2009 @@ -74,22 +74,24 @@ 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><!-- }}} -->" + [ + " <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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -102,31 +104,33 @@ 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><!-- }}} -->" + [ + "\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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -139,13 +143,15 @@ 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><!-- }}} -->" + [ + "\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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -158,12 +164,14 @@ 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" + [ + "\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" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -176,12 +184,14 @@ 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><!-- }}} -->" + [ + "\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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -194,29 +204,31 @@ 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><!-- }}} -->" + [ + "\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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -229,37 +241,39 @@ 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><!-- }}} -->" + [ + "\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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -272,19 +286,21 @@ 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><!-- }}} -->" + [ + "\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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -297,16 +313,18 @@ 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><!-- }}} -->" + [ + "\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><!-- }}} -->" + ].join('') ); Ext.getCmp(this.comp_id).focus(); } @@ -352,12 +370,14 @@ { Ext.DomHelper.insertHtml( 'beforeBegin', c.el.dom, - '<div style="display: inline;" class="x-statusbar">' + - '<span class="x-status-text-panel">' + _('Line: ') + - '<span id="' + id_prefix + '-status-line-' + this.fid + '">-</span></span>' + - ' <span class="x-status-text-panel">' + _('Col: ') + - '<span id="' + id_prefix + '-status-col-' + this.fid + '">-</span></span>' + - '</div> ' + [ + '<div style="display: inline;" class="x-statusbar">', + '<span class="x-status-text-panel">', _('Line: '), + '<span id="', id_prefix, '-status-line-', this.fid, '">-</span></span>', + ' <span class="x-status-text-panel">', _('Col: '), + '<span id="', id_prefix, '-status-col-', this.fid, '">-</span></span>', + '</div> ' + ].join('') ); } } @@ -366,12 +386,14 @@ height : 21, baseCls : '', bodyStyle : 'padding-top:5px;', - html : '<div style="display: inline;" class="x-statusbar">' + - '<span class="x-status-text-panel">' + _('Line: ') + - '<span id="' + id_prefix + '-status-line-' + this.fid + '">-</span></span>' + - ' <span class="x-status-text-panel">' + _('Col: ') + - '<span id="' + id_prefix + '-status-col-' + this.fid + '">-</span></span>' + - '</div> ' + html : [ + '<div style="display: inline;" class="x-statusbar">', + '<span class="x-status-text-panel">', _('Line: '), + '<span id="', id_prefix, '-status-line-', this.fid, '">-</span></span>', + ' <span class="x-status-text-panel">', _('Col: '), + '<span id="', id_prefix, '-status-col-', this.fid, '">-</span></span>', + '</div> ' + ].join('') }]; if (!this.readOnly) { @@ -437,10 +459,52 @@ } else { - phpDoc.saveLangFile( - this.prefix, this.ftype, this.fid, this.fpath, this.fname, - this.lang, this.storeRecord - ); + if (this.prefix === 'AF') { + 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 + }); + return; + } + Ext.MessageBox.show({ + title : _('Confirm'), + msg : _('Do you want to check for error before saving?'), + icon : Ext.MessageBox.INFO, + buttons : Ext.MessageBox.YESNOCANCEL, + scope : this, + fn : function (btn) + { + if (btn === 'no') { + + 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 + }); + + } else if (btn === 'yes') { + + new ui.task.CheckFileTask({ + prefix : this.prefix, + ftype : this.ftype, + fid : this.fid, + fpath : this.fpath, + fname : this.fname, + lang : this.lang, + storeRecord : this.storeRecord + }); // include SaveLangFileTask when no err + } + } + }); } } }, { @@ -517,6 +581,7 @@ // 38 = arrow up; 40 = arrow down; 37 = arrow left; 39 = arrow right; // 34 = pageDown; 33 = pageUp; 27 = esc; 17 = CRTL; 16 = ALT; 67 = CTRL+C + // 35 = end; 36 = home if ( keyCode !== 27 && keyCode !== 33 && keyCode !== 34 @@ -527,6 +592,8 @@ && keyCode !== 17 && keyCode !== 16 && keyCode !== 67 + && keyCode !== 35 + && keyCode !== 36 ) { if (!Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified) { // Add an [modified] in title http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/LocalMailGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/LocalMailGrid.js diff -u doc-editor/js/ui/component/LocalMailGrid.js:1.2 doc-editor/js/ui/component/LocalMailGrid.js:1.3 --- doc-editor/js/ui/component/LocalMailGrid.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/LocalMailGrid.js Fri Jul 3 04:11:09 2009 @@ -146,7 +146,13 @@ } }); -ui.component.LocalMailGrid.reload = function() +// singleton +ui.component._LocalMailGrid.instance = null; +ui.component.LocalMailGrid.getInstance = function(config) { - ui.component._LocalMailGrid.store.reload(); + if (!ui.component._LocalMailGrid.instance) { + if (!config) config = {}; + ui.component._LocalMailGrid.instance = new ui.component.LocalMailGrid(config); + } + return ui.component._LocalMailGrid.instance; } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/MainMenu.js?r1=1.3&r2=1.4&diff_format=u Index: doc-editor/js/ui/component/MainMenu.js diff -u doc-editor/js/ui/component/MainMenu.js:1.3 doc-editor/js/ui/component/MainMenu.js:1.4 --- doc-editor/js/ui/component/MainMenu.js:1.3 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/MainMenu.js Fri Jul 3 04:11:09 2009 @@ -18,12 +18,48 @@ text : _('Refresh all data'), disabled : (phpDoc.userLogin === 'cvsread') ? true : false, iconCls : 'refresh', - handler : phpDoc.WinUpdate // TODO + handler : function() + { + // We test if there is an update in progress or not + 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(response) + { + // Remove wait msg + Ext.getBody().unmask(); + + var o = Ext.util.JSON.decode(response.responseText); + + if( o.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 { + new ui.component.SystemUpdatePrompt().show(Ext.get('acc-need-update')); + } + } + }); + } }, { text : _('Check Build'), disabled : (phpDoc.userLogin === 'cvsread') ? true : false, iconCls : 'checkBuild', - handler : phpDoc.WinCheckBuild // TODO + handler : function() + { + new ui.component.CheckBuildPrompt().show( + Ext.get('acc-need-update') + ); + } }, { text : _('EN tools'), handler : function() { return false }, http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/NotInENGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/NotInENGrid.js diff -u doc-editor/js/ui/component/NotInENGrid.js:1.2 doc-editor/js/ui/component/NotInENGrid.js:1.3 --- doc-editor/js/ui/component/NotInENGrid.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/NotInENGrid.js Fri Jul 3 04:11:09 2009 @@ -136,7 +136,6 @@ initComponent : function() { - ui.component.NotInENGrid.instance = this; Ext.apply(this, { store : new ui.component._NotInENGrid.store({ @@ -150,4 +149,14 @@ ui.component.NotInENGrid.superclass.initComponent.call(this); } }); -ui.component.NotInENGrid.prototype.instance = null; + +// singleton +ui.component._NotInENGrid.instance = null; +ui.component.NotInENGrid.getInstance = function(config) +{ + if (!ui.component._NotInENGrid.instance) { + if (!config) config = {}; + ui.component._NotInENGrid.instance = new ui.component.NotInENGrid(config); + } + return ui.component._NotInENGrid.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/PendingCommitGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/PendingCommitGrid.js diff -u doc-editor/js/ui/component/PendingCommitGrid.js:1.2 doc-editor/js/ui/component/PendingCommitGrid.js:1.3 --- doc-editor/js/ui/component/PendingCommitGrid.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/PendingCommitGrid.js Fri Jul 3 04:11:09 2009 @@ -122,7 +122,20 @@ iconCls : 'iconCommitFileCvs', handler : function() { - phpDoc.WinCommit(true, this.rowIdx); + var record = ui.component.PendingCommitGrid.getInstance().store.getAt(this.rowIdx), + fdbid = record.data.id, + fpath = record.data.path, + fname = record.data.name, + fid = Ext.util.md5(fpath + fname); + + new ui.component.CommitPrompt({ + files : [{ + fid : fid, + fpath : fpath, + fname : fname, + fdbid : fdbid + }] + }).show(); } }, { scope : this, @@ -130,7 +143,28 @@ iconCls : 'iconCommitFileCvs', handler : function() { - phpDoc.WinCommit(false, '', 'by me'); + var files = [], + grid = ui.component.PendingCommitGrid.getInstance(); + + grid.store.each(function(record) + { + if (record.data.by === phpDoc.userLogin) { + var fdbid = record.data.id, + fpath = record.data.path, + fname = record.data.name, + fid = Ext.util.md5(fpath + fname); + files.push({ + fid : fid, + fpath : fpath, + fname : fname, + fdbid : fdbid + }); + } + }); + + new ui.component.CommitPrompt({ + files : files + }).show(); } }, { scope : this, @@ -138,7 +172,26 @@ iconCls : 'iconCommitFileCvs', handler : function() { - phpDoc.WinCommit(false); + var files = [], + grid = ui.component.PendingCommitGrid.getInstance(); + + grid.store.each(function(record) + { + var fdbid = record.data.id, + fpath = record.data.path, + fname = record.data.name, + fid = Ext.util.md5(fpath + fname); + files.push({ + fid : fid, + fpath : fpath, + fname : fname, + fdbid : fdbid + }); + }); + + new ui.component.CommitPrompt({ + files : files + }).show(); } }] }) @@ -327,7 +380,7 @@ FileName = storeRecord.data.name; if (FileType === 'update') { - ui.component.RepositoryTree.instance.openFile(FilePath, FileName); + ui.component.RepositoryTree.getInstance().openFile(FilePath, FileName); } if (FileType === 'delete') { @@ -343,7 +396,6 @@ initComponent : function() { - ui.component.PendingCommitGrid.instance = this; Ext.apply(this, { store : new ui.component._PendingCommitGrid.store({ @@ -384,4 +436,14 @@ } } }); -ui.component.PendingCommitGrid.prototype.instance = null; + +// singleton +ui.component._PendingCommitGrid.instance = null; +ui.component.PendingCommitGrid.getInstance = function(config) +{ + if (!ui.component._PendingCommitGrid.instance) { + if (!config) config = {}; + ui.component._PendingCommitGrid.instance = new ui.component.PendingCommitGrid(config); + } + return ui.component._PendingCommitGrid.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/PendingPatchGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/PendingPatchGrid.js diff -u doc-editor/js/ui/component/PendingPatchGrid.js:1.2 doc-editor/js/ui/component/PendingPatchGrid.js:1.3 --- doc-editor/js/ui/component/PendingPatchGrid.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/PendingPatchGrid.js Fri Jul 3 04:11:09 2009 @@ -286,7 +286,6 @@ initComponent : function() { - ui.component.PendingPatchGrid.instance = this; Ext.apply(this, { store : new ui.component._PendingPatchGrid.store({ @@ -300,4 +299,14 @@ ui.component.PendingPatchGrid.superclass.initComponent.call(this); } }); -ui.component.PendingPatchGrid.prototype.instance = null; + +// singleton +ui.component._PendingPatchGrid.instance = null; +ui.component.PendingPatchGrid.getInstance = function(config) +{ + if (!ui.component._PendingPatchGrid.instance) { + if (!config) config = {}; + ui.component._PendingPatchGrid.instance = new ui.component.PendingPatchGrid(config); + } + return ui.component._PendingPatchGrid.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/PendingReviewGrid.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/PendingReviewGrid.js diff -u doc-editor/js/ui/component/PendingReviewGrid.js:1.2 doc-editor/js/ui/component/PendingReviewGrid.js:1.3 --- doc-editor/js/ui/component/PendingReviewGrid.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/PendingReviewGrid.js Fri Jul 3 04:11:09 2009 @@ -191,7 +191,7 @@ } // Start the first - ui.component.RepositoryTree.instance.openFile( + ui.component.RepositoryTree.getInstance().openFile( phpDoc.filePendingOpen[0].fpath, phpDoc.filePendingOpen[0].fname ); @@ -376,7 +376,6 @@ initComponent : function() { - ui.component.PendingReviewGrid.instance = this; Ext.apply(this, { store : new ui.component._PendingReviewGrid.store({ @@ -409,7 +408,7 @@ { this.setValue(''); this.triggers[0].hide(); - ui.component.PendingReviewGrid.instance.store.clearFilter(); + ui.component._PendingReviewGrid.instance.store.clearFilter(); }, onTrigger2Click : function() { @@ -423,7 +422,7 @@ } this.clearInvalid(); this.triggers[0].show(); - ui.component.PendingReviewGrid.instance.store.filter('maintainer', v); + ui.component._PendingReviewGrid.instance.store.filter('maintainer', v); } }) ] @@ -431,4 +430,14 @@ ui.component.PendingReviewGrid.superclass.initComponent.call(this); } }); -ui.component.PendingReviewGrid.prototype.instance = null; + +// singleton +ui.component._PendingReviewGrid.instance = null; +ui.component.PendingReviewGrid.getInstance = function(config) +{ + if (!ui.component._PendingReviewGrid.instance) { + if (!config) config = {}; + ui.component._PendingReviewGrid.instance = new ui.component.PendingReviewGrid(config); + } + return ui.component._PendingReviewGrid.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/RepositoryTree.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/component/RepositoryTree.js diff -u doc-editor/js/ui/component/RepositoryTree.js:1.2 doc-editor/js/ui/component/RepositoryTree.js:1.3 --- doc-editor/js/ui/component/RepositoryTree.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/RepositoryTree.js Fri Jul 3 04:11:09 2009 @@ -16,6 +16,97 @@ baseParams : { task : 'getAllFiles' } }); +Ext.namespace('ui.component._RepositoryTree.menu'); +// RepositoryTree folder context menu +// config - { node } +ui.component._RepositoryTree.menu.folder = function(config) +{ + Ext.apply(this, config); + this.init(); + ui.component._RepositoryTree.menu.folder.superclass.constructor.call(this); +} +Ext.extend(ui.component._RepositoryTree.menu.folder, Ext.menu.Menu, +{ + init : function() + { + Ext.apply(this, + { + items : [{ + text : (this.node.isExpanded()) + ? '<b>' + _('Collapse') + '</b>' + : '<b>' + _('Expand') + '</b>', + iconCls : 'iconFolderClose', + scope : this, + handler : function() + { + if (this.node.isExpanded()) this.node.collapse(); + else this.node.expand(); + } + }] + }); + } +}); + +// RepositoryTree file context menu +// config - { node } +ui.component._RepositoryTree.menu.file = function(config) +{ + Ext.apply(this, config); + this.init(); + ui.component._RepositoryTree.menu.file.superclass.constructor.call(this); +} +Ext.extend(ui.component._RepositoryTree.menu.file, Ext.menu.Menu, +{ + init : function() + { + var FileName = this.node.attributes.text, + t = this.node.attributes.id.split('/'), + FileLang, FilePath; + + t.shift(); + t.shift(); + t.pop(); + + FileLang = t.shift(); + FilePath = t.join('/') + '/'; + + Ext.apply(this, + { + items : [{ + text : '<b>'+_('Edit in a new Tab')+'</b>', + iconCls : 'iconTabNeedReviewed', + scope : this, + handler : function() + { + ui.component._RepositoryTree.instance.fireEvent('dblclick', this.node); + } + }, { + hidden : (this.node.attributes.from === 'search'), + text : (FileLang === 'en') + ? String.format( + _('Open the same file in <b>{0}</b>'), + Ext.util.Format.uppercase(phpDoc.userLang)) + : String.format( + _('Open the same file in <b>{0}</b>'), 'EN'), + iconCls : 'iconTabNeedReviewed', + scope : this, + handler : function() + { + if (FileLang === 'en') { + ui.component._RepositoryTree.instance.openFile( + phpDoc.userLang + '/' + FilePath, FileName + ); + } else { + ui.component._RepositoryTree.instance.openFile( + 'en/' + FilePath, FileName + ); + } + } + }] + }); + } +}); + //------------------------------------------------------------------------------ // RepositoryTree ui.component.RepositoryTree = Ext.extend(Ext.tree.TreePanel, @@ -34,7 +125,16 @@ contextmenu : function(node, e) { node.select(); - phpDoc.repositoryContextMenu(node).showAt(e.getXY()); + + if (node.attributes.type === 'folder' || node.isRoot) { + new ui.component._RepositoryTree.menu.folder({ + node : node + }).showAt(e.getXY()); + } else if (node.attributes.type === 'file') { + new ui.component._RepositoryTree.menu.file({ + node : node + }).showAt(e.getXY()); + } }, dblclick : function(node, e) { @@ -143,7 +243,6 @@ 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( @@ -160,7 +259,6 @@ initComponent : function() { - ui.component.RepositoryTree.instance = this; Ext.apply(this, { tbar:[ @@ -184,7 +282,7 @@ }, onTrigger1Click : function() { - var instance = ui.component.RepositoryTree.instance; + var instance = ui.component._RepositoryTree.instance; this.setValue(''); this.triggers[0].hide(); instance.root.setText(_('Repository')); @@ -195,7 +293,7 @@ }, onTrigger2Click: function() { - var instance = ui.component.RepositoryTree.instance, + var instance = ui.component._RepositoryTree.instance, v = this.getValue(); if( v == '' || v.length < 3) { @@ -231,11 +329,6 @@ 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) @@ -256,7 +349,6 @@ node.childNodes[i].ensureVisible(); node.childNodes[i].ui.highlight(); this.fireEvent('dblclick', node.childNodes[i]); - Ext.getBody().unmask(); } } } @@ -264,5 +356,14 @@ this.root.expand(false, true, cb.createDelegate(this)); } }); -ui.component.RepositoryTree.prototype.instance = null; +// singleton +ui.component._RepositoryTree.instance = null; +ui.component.RepositoryTree.getInstance = function(config) +{ + if (!ui.component._RepositoryTree.instance) { + if (!config) config = {}; + ui.component._RepositoryTree.instance = new ui.component.RepositoryTree(config); + } + return ui.component._RepositoryTree.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/StaleFileGrid.js?r1=1.3&r2=1.4&diff_format=u Index: doc-editor/js/ui/component/StaleFileGrid.js diff -u doc-editor/js/ui/component/StaleFileGrid.js:1.3 doc-editor/js/ui/component/StaleFileGrid.js:1.4 --- doc-editor/js/ui/component/StaleFileGrid.js:1.3 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/component/StaleFileGrid.js Fri Jul 3 04:11:09 2009 @@ -320,7 +320,6 @@ initComponent : function() { - ui.component.StaleFileGrid.instance = this; ui.component._StaleFileGrid.columns[2].header = String.format( _('{0} revision'), Ext.util.Format.uppercase(phpDoc.userLang) ); @@ -358,7 +357,7 @@ { this.setValue(''); this.triggers[0].hide(); - ui.component.StaleFileGrid.instance.store.clearFilter(); + ui.component._StaleFileGrid.instance.store.clearFilter(); }, onTrigger2Click: function() { @@ -372,7 +371,7 @@ } this.clearInvalid(); this.triggers[0].show(); - ui.component.StaleFileGrid.instance.store.filter('maintainer', v); + ui.component._StaleFileGrid.instance.store.filter('maintainer', v); } }) ] @@ -380,4 +379,14 @@ ui.component.StaleFileGrid.superclass.initComponent.call(this); } }); -ui.component.StaleFileGrid.prototype.instance = null; + +// singleton +ui.component._StaleFileGrid.instance = null; +ui.component.StaleFileGrid.getInstance = function(config) +{ + if (!ui.component._StaleFileGrid.instance) { + if (!config) config = {}; + ui.component._StaleFileGrid.instance = new ui.component.StaleFileGrid(config); + } + return ui.component._StaleFileGrid.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/SummaryGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/SummaryGrid.js diff -u doc-editor/js/ui/component/SummaryGrid.js:1.1 doc-editor/js/ui/component/SummaryGrid.js:1.2 --- doc-editor/js/ui/component/SummaryGrid.js:1.1 Thu Jun 4 07:12:32 2009 +++ doc-editor/js/ui/component/SummaryGrid.js Fri Jul 3 04:11:10 2009 @@ -142,7 +142,13 @@ } }); -ui.component.SummaryGrid.reload = function() +// singleton +ui.component._SummaryGrid.instance = null; +ui.component.SummaryGrid.getInstance = function(config) { - ui.component._SummaryGrid.store.reload(); + if (!ui.component._SummaryGrid.instance) { + if (!config) config = {}; + ui.component._SummaryGrid.instance = new ui.component.SummaryGrid(config); + } + return ui.component._SummaryGrid.instance; } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/TranslationGraph.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/TranslationGraph.js diff -u doc-editor/js/ui/component/TranslationGraph.js:1.1 doc-editor/js/ui/component/TranslationGraph.js:1.2 --- doc-editor/js/ui/component/TranslationGraph.js:1.1 Thu Jun 4 07:12:32 2009 +++ doc-editor/js/ui/component/TranslationGraph.js Fri Jul 3 04:11:10 2009 @@ -1,4 +1,4 @@ -Ext.namespace('ui','ui.component'); +Ext.namespace('ui','ui.component','ui.component._TranslationGraph'); ui.component.TranslationGraph = Ext.extend(Ext.Panel, { @@ -30,3 +30,14 @@ } } }); + +// singleton +ui.component._TranslationGraph.instance = null; +ui.component.TranslationGraph.getInstance = function(config) +{ + if (!ui.component._TranslationGraph.instance) { + if (!config) config = {}; + ui.component._TranslationGraph.instance = new ui.component.TranslationGraph(config); + } + return ui.component._TranslationGraph.instance; +} http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/TranslatorGrid.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/component/TranslatorGrid.js diff -u doc-editor/js/ui/component/TranslatorGrid.js:1.1 doc-editor/js/ui/component/TranslatorGrid.js:1.2 --- doc-editor/js/ui/component/TranslatorGrid.js:1.1 Thu Jun 4 07:12:32 2009 +++ doc-editor/js/ui/component/TranslatorGrid.js Fri Jul 3 04:11:10 2009 @@ -171,7 +171,10 @@ grid.getSelectionModel().selectRow(rowIndex); - phpDoc.sendEmail(TranslatorName, TranslatorEmail); + new ui.component.EmailPrompt({ + name : TranslatorName, + email : TranslatorEmail + }).show(); }, rowcontextmenu: function(grid, rowIndex, e) { @@ -187,14 +190,20 @@ iconCls : 'iconSendEmail', handler : function() { - phpDoc.sendEmail(TranslatorName, TranslatorEmail); + new ui.component.EmailPrompt({ + name : TranslatorName, + email : TranslatorEmail + }).show(); } }, '-', { 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'); + new ui.component.EmailPrompt({ + name : 'Php Doc Team ' + phpDoc.userLang, + email : 'doc-' + phpDoc.userLang + '@lists.php.net' + }).show(); } }] }).showAt(e.getXY()); @@ -202,7 +211,13 @@ } }); -ui.component.TranslatorGrid.reload = function() +// singleton +ui.component._TranslatorGrid.instance = null; +ui.component.TranslatorGrid.getInstance = function(config) { - ui.component._TranslatorGrid.store.reload(); + if (!ui.component._TranslatorGrid.instance) { + if (!config) config = {}; + ui.component._TranslatorGrid.instance = new ui.component.TranslatorGrid(config); + } + return ui.component._TranslatorGrid.instance; } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/AcceptPatchTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/AcceptPatchTask.js diff -u doc-editor/js/ui/task/AcceptPatchTask.js:1.2 doc-editor/js/ui/task/AcceptPatchTask.js:1.3 --- doc-editor/js/ui/task/AcceptPatchTask.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/AcceptPatchTask.js Fri Jul 3 04:11:10 2009 @@ -41,10 +41,10 @@ success : function(response) { var o = Ext.util.JSON.decode(response.responseText), - grid = ui.component.PendingPatchGrid.instance; + grid = ui.component.PendingPatchGrid.getInstance(); // Add this files into storePendingCommit - ui.component.PendingCommitGrid.instance.addRecord( + ui.component.PendingCommitGrid.getInstance().addRecord( o.id, this.fpath, this.fname, 'update' ); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/CheckFileTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/CheckFileTask.js diff -u doc-editor/js/ui/task/CheckFileTask.js:1.2 doc-editor/js/ui/task/CheckFileTask.js:1.3 --- doc-editor/js/ui/task/CheckFileTask.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/CheckFileTask.js Fri Jul 3 04:11:10 2009 @@ -5,6 +5,11 @@ { Ext.apply(this,config); + if (phpDoc.userLogin === 'cvsread') { + phpDoc.winForbidden(); + return; + } + Ext.getBody().mask( '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + _('Checking for error. Please, wait...') http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/ClearLocalChangeTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/ClearLocalChangeTask.js diff -u doc-editor/js/ui/task/ClearLocalChangeTask.js:1.2 doc-editor/js/ui/task/ClearLocalChangeTask.js:1.3 --- doc-editor/js/ui/task/ClearLocalChangeTask.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/ClearLocalChangeTask.js Fri Jul 3 04:11:10 2009 @@ -40,23 +40,24 @@ // 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(); + ui.component.StaleFileGrid.getInstance().store.reload(); + ui.component.ErrorFileGrid.getInstance().store.reload(); + ui.component.PendingReviewGrid.getInstance().store.reload(); } + var pending_commit_grid = ui.component.PendingCommitGrid.getInstance(); // We delete from this store - ui.component.PendingCommitGrid.instance.store.remove(this.storeRecord); + pending_commit_grid.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 + pending_commit_grid.store.fireEvent( + 'add', pending_commit_grid.store ); // We try to search in others stores if this file is marked as needCommit // trow storeNotInEn - ui.component.NotInENGrid.instance.store.each( + ui.component.NotInENGrid.getInstance().store.each( function(record) { if ((phpDoc.userLang+record.data.path) === this.fpath @@ -69,7 +70,7 @@ ); // trow storeFilesNeedReviewed - ui.component.PendingReviewGrid.instance.store.each( + ui.component.PendingReviewGrid.getInstance().store.each( function(record) { if ((phpDoc.userLang+record.data.path) === this.fpath @@ -82,7 +83,7 @@ ); // trow StaleFile store - ui.component.StaleFileGrid.instance.store.each( + ui.component.StaleFileGrid.getInstance().store.each( function(record) { if ((phpDoc.userLang+record.data.path) === this.fpath @@ -95,7 +96,7 @@ ); // trow FileError - ui.component.ErrorFileGrid.instance.store.each( + ui.component.ErrorFileGrid.getInstance().store.each( function(record) { if ((phpDoc.userLang+record.data.path) === this.fpath @@ -108,7 +109,7 @@ ); // find open node in All Files modules - var node = ui.component.RepositoryTree.instance.getNodeById('//'+this.fpath+this.fname); + var node = ui.component.RepositoryTree.getInstance().getNodeById('//'+this.fpath+this.fname); if (node) { node.getUI().removeClass('modified'); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/GetFileTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/GetFileTask.js diff -u doc-editor/js/ui/task/GetFileTask.js:1.1 doc-editor/js/ui/task/GetFileTask.js:1.2 --- doc-editor/js/ui/task/GetFileTask.js:1.1 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/GetFileTask.js Fri Jul 3 04:11:10 2009 @@ -36,7 +36,7 @@ phpDoc.filePendingOpen.shift(); if (phpDoc.filePendingOpen[0]) { if (phpDoc.filePendingOpen[0].fpath) { - ui.component.RepositoryTree.instance.openFile( + ui.component.RepositoryTree.getInstance().openFile( phpDoc.filePendingOpen[0].fpath, phpDoc.filePendingOpen[0].fname ); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/LoadConfigTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/LoadConfigTask.js diff -u doc-editor/js/ui/task/LoadConfigTask.js:1.1 doc-editor/js/ui/task/LoadConfigTask.js:1.2 --- doc-editor/js/ui/task/LoadConfigTask.js:1.1 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/LoadConfigTask.js Fri Jul 3 04:11:10 2009 @@ -34,9 +34,6 @@ 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/MarkDeleteTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/MarkDeleteTask.js diff -u doc-editor/js/ui/task/MarkDeleteTask.js:1.2 doc-editor/js/ui/task/MarkDeleteTask.js:1.3 --- doc-editor/js/ui/task/MarkDeleteTask.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/MarkDeleteTask.js Fri Jul 3 04:11:10 2009 @@ -29,7 +29,7 @@ var o = Ext.util.JSON.decode(response.responseText); Ext.getBody().unmask(); - ui.component.PendingCommitGrid.instance.addRecord( + ui.component.PendingCommitGrid.getInstance().addRecord( o.id, phpDoc.userLang + this.fpath, this.fname, 'delete' ); this.storeRecord.set('needcommit', true); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/PingTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/PingTask.js diff -u doc-editor/js/ui/task/PingTask.js:1.2 doc-editor/js/ui/task/PingTask.js:1.3 --- doc-editor/js/ui/task/PingTask.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/PingTask.js Fri Jul 3 04:11:10 2009 @@ -1,8 +1,7 @@ -Ext.namespace('ui', 'ui.task'); +Ext.namespace('ui', 'ui.task', 'ui.task._PingTask'); ui.task.PingTask = function() { - ui.task.PingTask.instance = this; this.task = new Ext.util.DelayedTask(function() { XHR({ @@ -32,17 +31,24 @@ }); this.task.delay(30000); }, this); +} - // delegate - this.delay = function(delay, newFn, newScope, newArgs) - { - this.task.delay(delay, newFn, newScope, newArgs); - }; +// delegates +ui.task.PingTask.prototype.delay = function(delay, newFn, newScope, newArgs) +{ + this.task.delay(delay, newFn, newScope, newArgs); +}; +ui.task.PingTask.prototype.cancel = function() +{ + this.task.cancel(); +}; - // delegate - this.cancel = function() - { - this.task.cancel(); - }; +// singleton +ui.task._PingTask.instance = null; +ui.task.PingTask.getInstance = function() +{ + if (!ui.task._PingTask.instance) { + ui.task._PingTask.instance = new ui.task.PingTask(); + } + return ui.task._PingTask.instance; } -ui.task.PingTask.prototype.instance = null; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/RejectPatchTask.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/ui/task/RejectPatchTask.js diff -u doc-editor/js/ui/task/RejectPatchTask.js:1.2 doc-editor/js/ui/task/RejectPatchTask.js:1.3 --- doc-editor/js/ui/task/RejectPatchTask.js:1.2 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/RejectPatchTask.js Fri Jul 3 04:11:10 2009 @@ -27,7 +27,7 @@ }, success : function(response) { - var grid = ui.component.PendingPatchGrid.instance; + var grid = ui.component.PendingPatchGrid.getInstance(); // Remove this patch from the PendingPatchStore grid.store.remove(this.storeRecord); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/SaveENFileTask.js?r1=1.3&r2=1.4&diff_format=u Index: doc-editor/js/ui/task/SaveENFileTask.js diff -u doc-editor/js/ui/task/SaveENFileTask.js:1.3 doc-editor/js/ui/task/SaveENFileTask.js:1.4 --- doc-editor/js/ui/task/SaveENFileTask.js:1.3 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/SaveENFileTask.js Fri Jul 3 04:11:10 2009 @@ -50,7 +50,7 @@ } // Add this files into storePendingCommit - ui.component.PendingCommitGrid.instance.addRecord( + ui.component.PendingCommitGrid.getInstance().addRecord( o.id, 'en' + this.fpath, this.fname, 'update' ); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/SaveLangFileTask.js?r1=1.3&r2=1.4&diff_format=u Index: doc-editor/js/ui/task/SaveLangFileTask.js diff -u doc-editor/js/ui/task/SaveLangFileTask.js:1.3 doc-editor/js/ui/task/SaveLangFileTask.js:1.4 --- doc-editor/js/ui/task/SaveLangFileTask.js:1.3 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/SaveLangFileTask.js Fri Jul 3 04:11:10 2009 @@ -5,6 +5,11 @@ { Ext.apply(this, config); + if (phpDoc.userLogin === 'cvsread') { + phpDoc.winForbidden(); + return; + } + var id_prefix = this.prefix + '-' + this.ftype, msg = Ext.MessageBox.wait(_('Saving data...')); @@ -51,7 +56,7 @@ } // Add this files into storePendingCommit - ui.component.PendingCommitGrid.instance.addRecord( + ui.component.PendingCommitGrid.getInstance().addRecord( o.id, this.lang + this.fpath, this.fname, 'update' ); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/SavePatchTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/SavePatchTask.js diff -u doc-editor/js/ui/task/SavePatchTask.js:1.1 doc-editor/js/ui/task/SavePatchTask.js:1.2 --- doc-editor/js/ui/task/SavePatchTask.js:1.1 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/SavePatchTask.js Fri Jul 3 04:11:10 2009 @@ -39,7 +39,7 @@ success : function(response) { var o = Ext.util.JSON.decode(response.responseText), - grid = ui.component.PendingPatchGrid.instance; + grid = ui.component.PendingPatchGrid.getInstance(); // Add this files into storePendingPatch grid.store.insert(0, http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/UpdateConfTask.js?r1=1.1&r2=1.2&diff_format=u Index: doc-editor/js/ui/task/UpdateConfTask.js diff -u doc-editor/js/ui/task/UpdateConfTask.js:1.1 doc-editor/js/ui/task/UpdateConfTask.js:1.2 --- doc-editor/js/ui/task/UpdateConfTask.js:1.1 Fri Jun 26 10:29:44 2009 +++ doc-editor/js/ui/task/UpdateConfTask.js Fri Jul 3 04:11:10 2009 @@ -32,7 +32,7 @@ break; case 'conf_error_skipnbliteraltag': phpDoc.userConf.conf_error_skipnbliteraltag = "" + this.value + ""; - ui.component.ErrorFileGrid.instance.store.reload(); + ui.component.ErrorFileGrid.getInstance().store.reload(); break; case 'conf_error_scrollbars': phpDoc.userConf.conf_error_scrollbars = "" + this.value + ""; http://cvs.php.net/viewvc.cgi/doc-editor/js/main.js?r1=1.64&r2=1.65&diff_format=u Index: doc-editor/js/main.js diff -u doc-editor/js/main.js:1.64 doc-editor/js/main.js:1.65 --- doc-editor/js/main.js:1.64 Fri Jun 26 10:29:45 2009 +++ doc-editor/js/main.js Fri Jul 3 04:11:10 2009 @@ -4,15 +4,12 @@ Ext.BLANK_IMAGE_URL = 'js/extjs/resources/images/default/s.gif'; return { - // Store - storeCommitLogMessage: '', // - // Variable userLogin : null, userLang : null, appName : 'PhpDocumentation Online Editor', appVer : '0.2', - uiRevision : '$Revision: 1.64 $', + uiRevision : '$Revision: 1.65 $', userConf : { 'conf_needupdate_diff' : 'using-exec', @@ -55,88 +52,6 @@ ); }, - loadDataStore: function() - { - // Store : Commit log - this.storeCommitLogMessage = new Ext.data.Store({ - //autoLoad: true, - 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(prefix, ftype, fid, fpath, fname, lang, record) - { - if (this.userLogin === 'cvsread') { - this.winForbidden(); - return; - } - - if (prefix === 'AF') { - new ui.task.SaveLangFileTask({ - prefix : prefix, - ftype : ftype, - fid : fid, - fpath : fpath, - fname : fname, - lang : lang, - storeRecord : record - }); - 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 (btn) - { - if (btn === 'no') { - - new ui.task.SaveLangFileTask({ - prefix : prefix, - ftype : ftype, - fid : fid, - fpath : fpath, - fname : fname, - lang : lang, - storeRecord : record - }); - - } else if (btn === 'yes') { - - new ui.task.CheckFileTask({ - prefix : prefix, - ftype : ftype, - fid : fid, - fpath : fpath, - fname : fname, - lang : lang, - storeRecord : record - }); // include SaveLangFileTask when no err - } - } - }); - - }, - // Need confirm if we want to close a tab and the content have been modified. removeTabEvent : function(tabpanel, tab) { @@ -198,978 +113,20 @@ } }, - WinCommit : function(singleFile, rowIndex, choice) - { - var win, btn, FileDBID, FileID, FilePath, FileName, node, TreeSorter; - - btn = Ext.get('acc-need-update'); - - if (!win) { - win = 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(combo, record, numIndex){ - Ext.getCmp('form-commit-message-log').setValue(record.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 tools'), - handler: function(){ - - var textArea, cm, winManage; - - function formatText(value){ - return value.split("\n").join("<br/>"); - } - - textArea = new Ext.form.TextArea({ - grow: true, - growMin: 120 - }); - - cm = new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(), { - id: 'GridManageLog', - header: _('Log message'), - dataIndex: 'text', - renderer: formatText, - editor: new Ext.Editor(textArea, { - shadow: false, - autoSize: true, - listeners: { - scope: this, - complete: function(editor, newValue, OldValue){ - - var messID = editor.record.data.id; - - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'saveLogMessage', - messID : messID, - mess : newValue - }, - success : function(response) - { - this.storeCommitLogMessage.getById(messID).commit(); - }, - failure : function(response) - { - this.winForbidden(); - } - }); - } - } - }) - - }]); - - // - winManage = 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: cm, - sm: new Ext.grid.RowSelectionModel({ - singleSelect: true - }), - autoExpandColumn: 'GridManageLog', - listeners: { - scope: this, - rowcontextmenu: function(grid, rowIndex, e){ - - grid.getSelectionModel().selectRow(rowIndex); - - var menu = 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(rowIndex).data.id - }, - success : function(response) - { - this.storeCommitLogMessage.remove(this.storeCommitLogMessage.getAt(rowIndex)); - }, - failure : function(response) - { - this.winForbidden(); - } - }); - } - }] - }); - menu.showAt(e.getXY()); - } - } - }], - buttons: [{ - text: _('Close'), - handler: function(){ - winManage.close(); - } - }], - listeners: { - scope: this, - close: function(){ - this.storeCommitLogMessage.reload(); - } - } - }); - winManage.show(); - - } - }], - buttons: [{ - scope: this, - text: _('Submit'), - id: 'win-commit-btn-submit', - handler: function(){ - - var files, NeedToBeClose, checkNode, paneID_FE, paneID_FNU, paneID_FNR, tmp = [], paneID, libelNeedToBeClose = '', i; - - // If the user is cvsread, we don't commit anything - if (this.userLogin === 'cvsread') { - - // Close this window - win.close(); - - this.winForbidden(); - - return; - } - - // Check if there is some tab open with a file who need to be committed - files = Ext.getCmp('tree-panel').getValue(); - NeedToBeClose = []; - - for (i = 0; i < files.length; i = i + 1) { - - checkNode = Ext.getCmp('tree-panel').getNodeById(files[i]).attributes; - - paneID_FE = 'FE-' + Ext.util.md5('FE-' + checkNode.FilePath + checkNode.FileName); - paneID_FNU = 'FNU-' + Ext.util.md5('FNU-' + checkNode.FilePath + checkNode.FileName); - paneID_FNR = 'FNR-' + Ext.util.md5('FNR-' + checkNode.FilePath + checkNode.FileName); - - if (Ext.getCmp('main-panel').findById(paneID_FE) || - Ext.getCmp('main-panel').findById(paneID_FNU) || - Ext.getCmp('main-panel').findById(paneID_FNR)) { - - if (Ext.getCmp('main-panel').findById(paneID_FE)) { - paneID = paneID_FE; - } - if (Ext.getCmp('main-panel').findById(paneID_FNU)) { - paneID = paneID_FNU; - } - if (Ext.getCmp('main-panel').findById(paneID_FNR)) { - paneID = paneID_FNR; - } - - tmp[0] = paneID; - tmp[1] = checkNode.FileName; - - NeedToBeClose.push(tmp); - } - - } - - if (NeedToBeClose.length > 0) { - - for (i = 0; i < NeedToBeClose.length; i = i + 1) { - libelNeedToBeClose += NeedToBeClose[i][1] + '<br/>'; - } - - Ext.MessageBox.show({ - scope: this, - title: 'Warning', - msg: (NeedToBeClose.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 ?'), NeedToBeClose.length, libelNeedToBeClose) : String.format(_('There is {0} file to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?'), NeedToBeClose.length, libelNeedToBeClose), - icon: Ext.MessageBox.INFO, - buttons: Ext.MessageBox.YESNOCANCEL, - fn: function(btn){ - if (btn === 'yes') { - - for (i = 0; i < NeedToBeClose.length; i = i + 1) { - Ext.getCmp('main-panel').remove(NeedToBeClose[i][0]); - } - - this.WinCommitLastStep(files, this); - } - else { - return; - } - } - }); - - } - else { - this.WinCommitLastStep(files, this); - } - return; - - } - }, { - text: _('Close'), - id: 'win-commit-btn-close', - handler: function(){ - win.close(); - } - }] - }); - } - - win.show(btn); - - var grid = ui.component.PendingCommitGrid.instance; - // Load files to commit - if (singleFile) { - // Just the current file - 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({ - id: 'need-commit-' + FileID, - text: FilePath + FileName, - FileDBID: FileDBID, - FilePath: FilePath, - FileName: FileName, - leaf: true, - checked: true, - uiProvider: Ext.ux.tree.CheckTreeNodeUI - }); - - Ext.getCmp('tree-panel').getRootNode().appendChild(node); - - } else { - - // in files Need Update - grid.store.each(function(record){ - - if (choice && choice === 'by me' && record.data.by !== this.userLogin) { - } - else { - - FileDBID = record.data.id; - FilePath = record.data.path; - FileName = record.data.name; - FileID = Ext.util.md5(FilePath + FileName); - - node = new Ext.tree.TreeNode({ - id: 'need-commit-' + FileID, - text: FilePath + FileName, - FileDBID: FileDBID, - FilePath: FilePath, - FileName: FileName, - leaf: true, - checked: true, - uiProvider: Ext.ux.tree.CheckTreeNodeUI - }); - - Ext.getCmp('tree-panel').getRootNode().appendChild(node); - } - - }, this); - - // We sort the node alphabetically - TreeSorter = new Ext.tree.TreeSorter(Ext.getCmp('tree-panel'), {}); - TreeSorter.doSort(Ext.getCmp('tree-panel').getRootNode()); - } - - - }, // WinCommit - - WinCommitLastStep : function(files, scope) - { - Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait until commit...')); - - var nodes = [], node, LogMessage, i; - - // Go for Cvs commit - for (i = 0; i < files.length; i = i + 1) { - - node = Ext.getCmp('tree-panel').getNodeById(files[i]); - nodes.push(node.attributes.FileDBID); - } - - // Get log message - LogMessage = Ext.getCmp('form-commit-message-log').getValue(); - - // Close this window - Ext.getCmp('winCvsCommit').close(); - - XHR({ - url : './php/controller.php', - params : { - task : 'cvsCommit', - nodes : Ext.util.JSON.encode(nodes), - logMessage : LogMessage - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - Ext.getBody().unmask(); - - // Display commit output message - var winStatus = new Ext.Window({ - title : _('Status'), - width : 450, - height : 350, - resizable : false, - modal : true, - autoScroll : true, - bodyStyle : 'background-color: white; padding: 5px;', - html : o.mess.join("<br/>"), - buttons : [{ - text : _('Close'), - handler : function() - { - winStatus.close(); - } - }] - }); - winStatus.show(); - - Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Please, wait...')); - - // Apply modification - XHR({ - url : './php/controller.php', - params : { - task : 'onSuccesCommit', - nodes : Ext.util.JSON.encode(nodes), - logMessage : LogMessage - }, - success : function(response) - { - if (scope.userLang != 'en') { - // Reload Files error data - ui.component.ErrorFileGrid.instance.store.reload(); - - // Reload Files Need reviewed - ui.component.PendingReviewGrid.instance.store.reload(); - - // Reload Files Need Update - ui.component.StaleFileGrid.instance.store.reload(); - } - - ui.component.PendingCommitGrid.instance.store.reload(); - - // Reload translators data - ui.component.TranslatorGrid.reload(); - - // Reload summary data - ui.component.SummaryGrid.reload(); - - Ext.getBody().unmask(); - } - }); - } - }); - - }, // WinCommitLastStep - - WinUpdate : function() - { - // Update of Cvs and apply all tools. - var win, btn; - - function RefreshStep1(scope){ - - // We need to stop pin test during this update - 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 : scope, - url : './php/controller.php', - params : { - task: 'updateRepository' - }, - success : function(response) - { - // Normally, this never succes ! ;) - Ext.get('wizard-step-1').replaceClass('wizard-step-working', 'wizard-step-done'); - Ext.get('wizard-step-1.1').replaceClass('wizard-show', 'wizard-wait'); - RefreshStep2(scope); - }, - failure: function(response) - { - - var o = Ext.util.JSON.decode(response.responseText); - - if (o && o.success === false) { - win.close(); - this.winForbidden(); - } else { - // If update take over 30sec (max Keep-Alive time), we are on failure ! - function checkLockFile(){ - XHR({ - scope : scope, - url : './php/controller.php', - params : { - task : 'checkLockFile', - lockFile : 'lock_update_repository' - }, - success : function(response) - { - wizardDelayUpdate.delay(5000); - }, - failure : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - if (o && o.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'); - - // Goto step2 - RefreshStep2(this); - } else { - wizardDelayUpdate.delay(5000); - } - } - }); - - } - - // We check ever XX secondes if checkout is finish, or not. - var wizardDelayUpdate = new Ext.util.DelayedTask(function(){ - checkLockFile(); - }); - wizardDelayUpdate.delay(5000); - - } - - - - } - }); - - } // RefreshStep1() - function RefreshStep2(scope){ - Ext.get('wizard-step-2').replaceClass('wizard-step-before', 'wizard-step-working'); - XHR({ - scope : scope, - url : './php/controller.php', - params : { - task: 'applyTools' - }, - success : function(response) - { - Ext.get('wizard-step-2').replaceClass('wizard-step-working', 'wizard-step-done'); - RefreshStep3(this); - }, - failure : function(response) - { - // If the first pass take over 30 sec., we check the lock file - function checkLockFile2(){ - XHR({ - scope : scope, - url : './php/controller.php', - params : { - task : 'checkLockFile', - lockFile : 'lock_apply_tools' - }, - success : function(response) - { - wizardDelayApplyTools.delay(5000); - }, - failure : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - if (o && o.success === false) { - Ext.get('wizard-step-2').replaceClass('wizard-step-working', 'wizard-step-done'); - RefreshStep3(this); - } else { - wizardDelayApplyTools.delay(5000); - } - } - }); - } - - // We check ever XX secondes if applaying tools is finish, or not. - var wizardDelayApplyTools = new Ext.util.DelayedTask(function(){ - checkLockFile2(); - }); - wizardDelayApplyTools.delay(5000); - - } - }); - - } // RefreshStep2() - function RefreshStep3(scope){ - - Ext.get('wizard-step-3').replaceClass('wizard-step-before', 'wizard-step-working'); - - if (phpDoc.userLang != 'en') { - // Reload all data on this page - 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'); - - // Re-enable Finish button - Ext.getCmp('btn-start-refresh').setIconClass('finishRefresh'); - Ext.getCmp('btn-start-refresh').setText(_('Finish !')); - Ext.getCmp('btn-start-refresh').setHandler(function(){ - win.close(); - }); - Ext.getCmp('btn-start-refresh').enable(); - - // Re-enable TaskPing - ui.task.PingTask.instance.delay(30000); - - // Re-enable win's close button - win.tools.close.setVisible(true); - - } // RefreshStep3() - btn = Ext.get('acc-need-update'); - - if (!win) { - win = 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(){ - - // Desable start button - Ext.getCmp('btn-start-refresh').disable(); - - // Desable the close button for this win - win.tools.close.setVisible(false); - - // Set 'in progress' - Ext.getDom('lastUpdateTime').innerHTML = _('update in progress...'); - - // Start Step 1 - RefreshStep1(this); - - } - }] - }); - } - - - // We test if there is an update in progress or not - 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(response) - { - // Remove wait msg - Ext.getBody().unmask(); - - var o = Ext.util.JSON.decode(response.responseText); - - if( o.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 { - win.show(btn); - } - } - }); - - }, // Winupdate - - WinCheckBuild : function() - { - var win, btn; - - btn = Ext.get('acc-need-update'); - - function displayMess(scope){ - - XHR({ - scope : scope, - url : './php/controller.php', - params : { - task : 'getLogFile', - file : 'log_check_build' - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - // Re-enable TaskPing - ui.task.PingTask.instance.delay(30000); - - // Display - 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">'+o.mess+'</div>' - }); - Ext.getCmp('main-panel').setActiveTab('check_build_panel'); - } - }); - } - - if (!win) { - win = 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 choice = Ext.getCmp('option-xml-details').checked; - - win.close(); - 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 - ui.task.PingTask.instance.cancel(); - - XHR({ - scope : this, - url : './php/controller.php', - params : { - task : 'checkBuild', - xmlDetails : choice - }, - success : function(response) - { - Ext.getBody().unmask(); - displayMess(this); - }, - failure : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - - if (o && o.success === false) { - // Re-enable TaskPing - ui.task.PingTask.instance.delay(30000); - Ext.getBody().unmask(); - this.winForbidden(); - } else { - // If this take over 30sec (max Keep-Alive time), we are on failure ! - - function checkLockFile(scope){ - XHR({ - scope : scope, - url : './php/controller.php', - params : { - task : 'checkLockFile', - lockFile : 'lock_check_build' - }, - success : function(response) - { - builcheckDelay.delay(5000); - }, - failure : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - if (o && o.success === false) { - Ext.getBody().unmask(); - displayMess(this); - } else { - builcheckDelay.delay(5000); - } - } - }); - - } - - // We check ever XX secondes if the check build is finish, or not. - var builcheckDelay = new Ext.util.DelayedTask(function(){ - checkLockFile(this); - }, this); - builcheckDelay.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' - }] - - }); - } - win.show(btn); - - - }, //WinCheckBuild - - sendEmail : function(TranslatorName, TranslatorEmail) - { - var form, win; - - form = 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: '"' + TranslatorName + '" <' + TranslatorEmail + '>' - }, { - fieldLabel: _('Subject'), - name: 'subject', - anchor: '100%' - }, { - xtype: 'textarea', - hideLabel: true, - name: 'msg', - anchor: '100% -53' - }] - }); - - win = 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: form, - iconCls: 'iconSendEmail', - - buttons: [{ - text: _('Send'), - handler: function(){ - - var v = form.getForm().getValues(); - - XHR({ - url : './php/controller.php', - params : { - task : 'sendEmail', - to : v.to, - subject : v.subject, - msg : v.msg - }, - success : function(response) - { - win.close(); - Ext.MessageBox.alert(_('Status'), String.format(_('Email sent to {0} with success!'), TranslatorName)); - } - }); - - } - }, { - text: _('Cancel'), - handler: function(){ - win.close(); - } - }] - }); - - win.show(); - - }, //sendEmail - - repositoryContextMenu : function(node) - { - // repository tree context menu handler - var t, FileName, FilePath, FileLang; - - if (node.attributes.type === 'folder' || node.isRoot) { - - return new Ext.menu.Menu({ - items: [{ - text : (node.isExpanded()) - ? '<b>' + _('Collapse') + '</b>' - : '<b>' + _('Expand') + '</b>', - iconCls : 'iconFolderClose', - handler : function() - { - if (node.isExpanded()) node.collapse(); - else node.expand(); - } - }] - }); - - } else if (node.attributes.type === 'file') { - - FileName = node.attributes.text; - FilePath = node.attributes.id; - - // CleanUp the path - t = FilePath.split('/'); - t.shift(); - t.shift(); - t.pop(); - - FileLang = t.shift(); - FilePath = t.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', node); - } - }, { - hidden : (node.attributes.from === 'search'), - scope : this, - text : (FileLang === '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 (FileLang === 'en') { - this.openFile(this.userLang + '/' + FilePath, FileName); - } else { - this.openFile('en/' + FilePath, FileName); - } - } - }] - }); - } - }, - drawInterface: function() { // We keel alive our session by sending a ping every minute - new ui.task.PingTask().delay(30000); // start after 1 minute. + ui.task.PingTask.getInstance().delay(30000); // start after 1 minute. var mainMenu = new ui.component.MainMenu(), mainContent = (this.userLang === 'en') ? [ - new ui.component.LocalMailGrid() + ui.component.LocalMailGrid.getInstance() ] : [ - new ui.component.SummaryGrid(), - new ui.component.TranslatorGrid(), - new ui.component.LocalMailGrid(), - new ui.component.BugsGrid(), - new ui.component.TranslationGraph() + ui.component.SummaryGrid.getInstance(), + ui.component.TranslatorGrid.getInstance(), + ui.component.LocalMailGrid.getInstance(), + ui.component.BugsGrid.getInstance(), + ui.component.TranslationGraph.getInstance() ]; new Ext.Viewport({ layout : 'border', @@ -1210,7 +167,7 @@ layout : 'fit', iconCls : 'FilesNeedUpdate', hidden : (this.userLang === 'en'), - items : [ new ui.component.StaleFileGrid() ], + items : [ ui.component.StaleFileGrid.getInstance() ], collapsed : true, listeners : { expand : function(panel) @@ -1225,7 +182,7 @@ layout : 'fit', iconCls : 'FilesError', hidden : (this.userLang === 'en'), - items : [ new ui.component.ErrorFileGrid() ], + items : [ ui.component.ErrorFileGrid.getInstance() ], collapsed : true, listeners : { expand : function(panel) @@ -1240,7 +197,7 @@ layout : 'fit', iconCls : 'FilesNeedReviewed', hidden : (this.userLang === 'en'), - items : [ new ui.component.PendingReviewGrid() ], + items : [ ui.component.PendingReviewGrid.getInstance() ], collapsed : true, listeners : { expand : function(panel) @@ -1255,14 +212,14 @@ layout : 'fit', iconCls : 'NotInEn', hidden : (this.userLang === 'en'), - items : [ new ui.component.NotInENGrid() ], + items : [ ui.component.NotInENGrid.getInstance() ], collapsed : true }, { id : 'acc-all-files', title : _('All files'), layout : 'fit', iconCls : 'AllFiles', - items : [ new ui.component.RepositoryTree() ], + items : [ ui.component.RepositoryTree.getInstance() ], collapsed : true, listeners : { expand : function(panel) @@ -1276,14 +233,14 @@ title : _('Pending for commit') + ' - <em id="acc-pendingCommit-nb">0</em>', layout : 'fit', iconCls : 'PendingCommit', - items : [ new ui.component.PendingCommitGrid() ], + items : [ ui.component.PendingCommitGrid.getInstance() ], 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() ], + items : [ ui.component.PendingPatchGrid.getInstance() ], collapsed : true }] }] @@ -1340,7 +297,7 @@ // Direct access to a file as cvsread if (directAccess) { - this.openFile( + ui.component.RepositoryTree.getInstance().openFile( directAccess.lang + directAccess.path, directAccess.name ); http://cvs.php.net/viewvc.cgi/doc-editor/js/main_min.js?r1=1.7&r2=1.8&diff_format=u Index: doc-editor/js/main_min.js diff -u doc-editor/js/main_min.js:1.7 doc-editor/js/main_min.js:1.8 --- doc-editor/js/main_min.js:1.7 Fri Jun 26 10:29:45 2009 +++ doc-editor/js/main_min.js Fri Jul 3 04:11:10 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);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 +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.getInstance();ui.component.PendingCommitGrid.getInstance().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._CheckBuildTask");ui.task._CheckBu! ildTask.display=function(){XHR({url:"./php/controller.php",params:{tas k:"getLogFile",file:"log_check_build"},success:function(a){var b=Ext.util.JSON.decode(a.responseText);Ext.getBody().unmask();ui.task.PingTask.getInstance().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">'+b.mess+"</div>"});Ext.getCmp("main-panel").setActiveTab("check_build_panel")}})};ui.task._CheckBuildTask.poll=new Ext.util.DelayedTask(function(){XHR({url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_check_build"},success:function(a){ui.task._CheckBuildTask.poll.delay(5000)},failure:function(a){var b=Ext.util.JSON.decode(a.responseText);if(b&&b.success===false){new ui.task._CheckBuildTask.display()}else{ui.task._CheckBuildTask.poll.delay(5000)}}})});ui.task.CheckBuildTask=function(a){Ext.getB! ody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait until the build is checked..."));ui.task.PingTask.getInstance().cancel();XHR({url:"./php/controller.php",params:{task:"checkBuild",xmlDetails:Ext.getCmp("option-xml-details").checked},success:function(b){new ui.task._CheckBuildTask.display()},failure:function(b){var c=Ext.util.JSON.decode(b.responseText);if(c&&c.success===false){ui.task.PingTask.getInstance().delay(30000);Ext.getBody().unmask();phpDoc.winForbidden()}else{ui.task._CheckBuildTask.poll.delay(5000)}}})};Ext.namespace("ui","ui.task");ui.task.CheckFileTask=function(a){Ext.apply(this,a);if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}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,FileConte! nt: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.winForb! idden();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(d){if(phpDoc.userLang==="en"){ui.component.StaleFileGrid.getInstance().store.reload();ui.component.ErrorFileGrid.getInstance().store.reload();ui.component.PendingReviewGrid.getInstance().store.reload()}var c=ui.component.PendingCommitGrid.getInstance();c.store.remove(this.storeRecord);c.store.fireEvent("add",c.store);ui.component.NotInENGrid.getIns! tance().store.each(function(f){if((phpDoc.userLang+f.data.path)===this ..fpath&&f.data.name===this.fname){f.set("needcommit",false)}},this);ui.component.PendingReviewGrid.getInstance().store.each(function(f){if((phpDoc.userLang+f.data.path)===this.fpath&&f.data.name===this.fname){f.set("needcommit",false)}},this);ui.component.StaleFileGrid.getInstance().store.each(function(f){if((phpDoc.userLang+f.data.path)===this.fpath&&f.data.name===this.fname){f.set("needcommit",false)}},this);ui.component.ErrorFileGrid.getInstance().store.each(function(f){if((phpDoc.userLang+f.data.path)===this.fpath&&f.data.name===this.fname){f.set("needcommit",false)}},this);var e=ui.component.RepositoryTree.getInstance().getNodeById("//"+this.fpath+this.fname);if(e){e.getUI().removeClass("modified")}Ext.getBody().unmask()},failure:function(c){Ext.getBody().unmask();phpDoc.winForbidden()}})}},this)};Ext.namespace("ui","ui.task","ui.task._CVSCommitTask");ui.task._CVSCommitTask.commit=function(e){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: m! iddle;" /> '+_("Please, wait until commit..."));var a=[],d,c;for(var b=0;b<e.length;b=b+1){d=Ext.getCmp("commit-tree-panel").getNodeById(e[b]);a.push(d.attributes.FileDBID)}c=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:c},success:function(f){var g=Ext.util.JSON.decode(f.responseText);Ext.getBody().unmask();new Ext.Window({title:_("Status"),width:450,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:g.mess.join("<br/>"),buttons:[{text:_("Close"),handler:function(){this.ownerCt.close()}}]}).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:c},success:function(h){if(phpDoc.userLang!="en"){ui.component.ErrorFileGr! id.getInstance().store.reload();ui.component.PendingReviewGrid.getInst ance().store.reload();ui.component.StaleFileGrid.getInstance().store.reload()}ui.component.PendingCommitGrid.getInstance().store.reload();ui.component.TranslatorGrid.getInstance().store.reload();ui.component.SummaryGrid.getInstance().store.reload();Ext.getBody().unmask()}})}})};ui.task.CVSCommitTask=function(){if(phpDoc.userLogin==="cvsread"){Ext.getCmp("winCvsCommit").close();phpDochis.winForbidden();return}var a=Ext.getCmp("commit-tree-panel").getValue(),e=new Array(),g,j,b,c,h,f="";for(var d=0;d<a.length;++d){g=Ext.getCmp("commit-tree-panel").getNodeById(a[d]).attributes;j="FE-"+Ext.util.md5("FE-"+g.FilePath+g.FileName);b="FNU-"+Ext.util.md5("FNU-"+g.FilePath+g.FileName);c="FNR-"+Ext.util.md5("FNR-"+g.FilePath+g.FileName);if(Ext.getCmp("main-panel").findById(j)||Ext.getCmp("main-panel").findById(b)||Ext.getCmp("main-panel").findById(c)){if(Ext.getCmp("main-panel").findById(j)){h=j}if(Ext.getCmp("main-panel").findById(b)){h=b}if(Ext.getCmp("main-panel").findById(c)){h=c}e.! push([h,g.FileName])}}if(e.length>0){for(var d=0;d<e.length;++d){f+=e[d][1]+"<br/>"}Ext.MessageBox.show({title:"Warning",icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,msg:(e.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 ?"),e.length,f):String.format(_("There is {0} file to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?"),e.length,f),fn:function(k){if(k==="yes"){for(var i=0;i<e.length;++i){Ext.getCmp("main-panel").remove(e[i][0])}ui.task._CVSCommitTask.commit(a)}}})}else{ui.task._CVSCommitTask.commit(a)}};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:func! tion(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.getInstance().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/controller.php",params:{task:"getConf"},success:function(b){var c=Ext.decode(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.c! onf_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.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="ve! rtical-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.getInstance().addRecord(d.id,phpDoc.userLang+this.fpath,this.fname,"delete");this.storeRecord.set("needcommit",true)}})}},this)};Ext.namespace("ui","ui.task","ui.task._PingTask");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)};ui.task.PingTask.prototype.delay=function(b,d,c,a){this.! task.delay(b,d,c,a)};ui.task.PingTask.prototype.cancel=function(){this.task.cancel()};ui.task._PingTask.instance=null;ui.task.PingTask.getInstance=function(){if(!ui.task._PingTask.instance){ui.task._PingTask.instance=new ui.task.PingTask()}return ui.task._PingTask.instance};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.getInstance();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.na! mespace("ui","ui.task");ui.task.SaveENFileTask=function(b){Ext.apply(t his,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.prefix==="FNR"){this.storeRecord.set("needcommit",true)}if(this.prefix==="AF"){this.storeRecord.getUI().addClass("modified")}ui.component.PendingCommitGrid.getInstance().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+"-P! ANEL-"+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);if(phpDoc.userLogin==="cvsread"){phpDoc.winForbidden();return}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.sto! reRecord.set("needcommit",true);this.storeRecord.set("maintainer",e.ma intainer);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.getInstance().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.responseText),e=ui.component.PendingPatchGrid.getInstance();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.namespa! ce("ui","ui.task","ui.task._SystemUpdateTask");ui.task._SystemUpdateTa sk.refresh_ui=function(){Ext.get("wizard-step-3").replaceClass("wizard-step-before","wizard-step-working");if(phpDoc.userLang!="en"){ui.component.StaleFileGrid.getInstance().store.reload();ui.component.ErrorFileGrid.getInstance().store.reload();ui.component.TranslatorGrid.getInstance().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(){Ext.getCmp("sys-update-win").close()});Ext.getCmp("btn-start-refresh").enable();ui.task.PingTask.getInstance().delay(30000);Ext.getCmp("sys-update-win").tools.close.setVisible(true)};ui.task._SystemUpdateTask.poll_apply_tool=new Ext.util.DelayedTask(function(){XHR({url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_apply_tools"},success:function(a){ui.task._SystemUpdateTask.poll_apply_tool.delay(5000)},failure:fu! nction(a){var b=Ext.util.JSON.decode(a.responseText);if(b&&b.success===false){Ext.get("wizard-step-2").replaceClass("wizard-step-working","wizard-step-done");new ui.task._SystemUpdateTask.refresh_ui()}else{ui.task._SystemUpdateTask.poll_apply_tool.delay(5000)}}})});ui.task._SystemUpdateTask.apply_tool=function(){Ext.get("wizard-step-2").replaceClass("wizard-step-before","wizard-step-working");XHR({url:"./php/controller.php",params:{task:"applyTools"},success:function(a){Ext.get("wizard-step-2").replaceClass("wizard-step-working","wizard-step-done");new ui.task._SystemUpdateTask.refresh_ui()},failure:function(a){ui.task._SystemUpdateTask.poll_apply_tool.delay(5000)}})};ui.task._SystemUpdateTask.cvs_poll=new Ext.util.DelayedTask(function(){XHR({url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_update_repository"},success:function(a){ui.task._SystemUpdateTask.cvs_poll.delay(5000)},failure:function(a){var b=Ext.util.JSON.decode(a.responseText);if(b&&b.succe! ss===false){Ext.get("wizard-step-1").replaceClass("wizard-step-working ","wizard-step-done");Ext.get("wizard-step-1.1").replaceClass("wizard-show","wizard-wait");new ui.task._SystemUpdateTask.apply_tool()}else{ui.task._SystemUpdateTask.cvs_poll.delay(5000)}}})});ui.task.SystemUpdateTask=function(){ui.task.PingTask.getInstance().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({url:"./php/controller.php",params:{task:"updateRepository"},success:function(a){Ext.get("wizard-step-1").replaceClass("wizard-step-working","wizard-step-done");Ext.get("wizard-step-1.1").replaceClass("wizard-show","wizard-wait");new ui.task._SystemUpdateTask.apply_tool()},failure:function(a){var b=Ext.util.JSON.decode(a.responseText);if(b&&b.success===false){Ext.getCmp("sys-update-win").close();phpDoc.winForbidden()}else{ui.task._SystemUpdateTask.cvs_poll.delay(5000)}}})};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.getInstance().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.val! ue+"";break;case"conf_allfiles_displaylog":phpDoc.userConf.conf_allfil es_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.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",totalP! roperty:"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.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:"openI! nTab",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.userLang),tbar:[{tooltip:_("Refresh this grid"),iconCls:"refresh",handler:function(){ui.component.BugsGrid.reload()}}]});ui.component.BugsGrid.superclass.initComponent.call(this)}});ui.component._BugsGrid.instance=null;ui.component.BugsGrid.getInstance=function(a){if(!ui.component._BugsGrid.instance)! {if(!a){a={}}ui.component._BugsGrid.instance=new ui.component.BugsGrid (a)}return ui.component._BugsGrid.instance};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:"l! ang",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.CheckBuildPrompt=Ext.extend(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:[{id:"win-check-build-btn-submit",text:_("Go !"),handler:function(){new ui.task.CheckBuildTask();this.ownerCt.close()}}],initComponent:function(){Ext.apply(this,{items:[{xtype:"panel",mod! al:false,baseCls:"x-plain",bodyStyle:"padding:5px 5px 0",html:_("You'r e about to check the build via this command:")+"<br/><br/>/usr/bin/php configure.php --with-lang="+phpDoc.userLang+"<br><br>"},{xtype:"checkbox",id:"option-xml-details",name:"option-xml-details",checked:false,hideLabel:true,boxLabel:_("Enable detailed XML error messages")}]});ui.component.CheckBuildPrompt.superclass.initComponent.call(this)}});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:"chec! k_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._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-se! lected-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.getInstance().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(var b=0;b<a.getCount();++b){phpDoc.filePendingOpen[b]={fpath:"en"+c.fpath,fname:a.getAt(b).data.file}}ui.component.RepositoryTree.getInstance().openFile(phpDoc.filePendingOpen[0].fpath,phpDoc.filePendingOpen[0].fname);c.close()}},{text:"Open selected files",id:"check-doc-btn-ope! n-selected-files",disabled:true,handler:function(){var c=Ext.getCmp("c heck-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.getInstance().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:{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.c! omponent._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._CommitLogPrompt");ui.component._CommitLogPrompt.store=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"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"text",mapping:"text"}]))});ui.component._CommitLogPrompt.cm=new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),{id:"log_msg",header:_("Log message"),dataIndex:"text",renderer:function(a){return a.split("\n").join("<br/>")},editor:new Ext.Editor(new Ext.form.TextArea({grow:true,growMin:120}),{sh! adow:false,autoSize:true,listeners:{complete:function(c,d,b){var a=c.r ecord.data.id;XHR({url:"./php/controller.php",params:{task:"saveLogMessage",messID:a,mess:d},success:function(e){ui.component._CommitLogPrompt.store.getById(a).commit()},failure:function(e){phpDoc.winForbidden()}})}}})}]);ui.component._CommitLogPrompt.sm=new Ext.grid.RowSelectionModel({singleSelect:true});ui.component._CommitLogPrompt.menu=function(a){Ext.apply(this,a);this.init();ui.component._CommitLogPrompt.menu.superclass.constructor.call(this)};Ext.extend(ui.component._CommitLogPrompt.menu,Ext.menu.Menu,{init:function(){var a=ui.component._CommitLogPrompt.store;Ext.apply(this,{items:[{text:_("Delete this Log Message"),iconCls:"iconDelete",handler:function(){XHR({url:"./php/controller.php",params:{task:"deleteLogMessage",messID:a.getAt(rowIndex).data.id},success:function(b){a.remove(a.getAt(rowIndex))},failure:function(b){phpDoc.winForbidden()}})}}]})}});ui.component._CommitLogPrompt.grid=Ext.extend(Ext.grid.EditorGridPanel,{loadMask:true,autoExpandColumn:"log_msg",cm:ui! .component._CommitLogPrompt.cm,sm:ui.component._CommitLogPrompt.sm,store:ui.component._CommitLogPrompt.store,listeners:{rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c);new ui.component._CommitLogPrompt.menu().showAt(b.getXY())}}});ui.component.CommitLogPrompt=Ext.extend(Ext.Window,{id:"commit-log-win",title:_("Manage Log Message"),iconCls:"winManageLog",width:650,height:350,layout:"fit",resizable:false,modal:true,autoScroll:true,html:'<div class="diff-content"></div>',buttons:[{text:_("Close"),handler:function(){this.ownerCt.close()}}],listeners:{close:function(){ui.component._CommitLogPrompt.store.reload()}},initComponent:function(){Ext.apply(this,{items:[new ui.component._CommitLogPrompt.grid()],});ui.component.CommitLogPrompt.superclass.initComponent.call(this)}});ui.component.CommitLogPrompt.store=ui.component._CommitLogPrompt.store;Ext.namespace("ui","ui.component");ui.component.CommitPrompt=Ext.extend(Ext.Window,{id:"winCvsCommit",layout:"form",title! :_("CVS commit"),closable:false,width:400,height:480,resizable:false,m odal:true,bodyStyle:"padding:5px 5px 0",labelAlign:"top",tools:[{id:"gear",qtip:_("Configure this tools"),handler:function(){new ui.component.CommitLogPrompt().show()}}],buttons:[{id:"win-commit-btn-submit",text:_("Submit"),handler:function(){new ui.task.CVSCommitTask()}},{id:"win-commit-btn-close",text:_("Close"),handler:function(){Ext.getCmp("winCvsCommit").close()}}],initComponent:function(){var a=new Ext.tree.TreeNode({text:"root",expanded:true});for(var b=0;b<this.files.length;++b){a.appendChild(new Ext.tree.TreeNode({id:"need-commit-"+this.files[b].fid,text:this.files[b].fpath+this.files[b].fname,FileDBID:this.files[b].fdbid,FilePath:this.files[b].fpath,FileName:this.files[b].fname,leaf:true,checked:true}))}Ext.apply(this,{items:[{xtype:"checktreepanel",id:"commit-tree-panel",anchor:"100%",height:180,autoScroll:true,rootVisible:false,root:a},{xtype:"combo",name:"first2",fieldLabel:_("Older messages"),editable:false,anchor:"100%",store:ui.component.CommitLogPrompt.store! ,triggerAction:"all",tpl:'<tpl for="."><div class="x-combo-list-item">{[values.text.split("\n").join("<br/>")]}</div></tpl>',valueField:"id",displayField:"text",listeners:{render:function(c){c.store.load()},select:function(e,c,d){Ext.getCmp("form-commit-message-log").setValue(c.data.text)}}},{xtype:"textarea",id:"form-commit-message-log",name:"first3",fieldLabel:_("Log message"),anchor:"100%",height:150,value:""}]});ui.component.CommitPrompt.superclass.initComponent.call(this)}});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,{singleSe! lect:false,header:"",width:22,listeners:{beforerowselect:function(b){v ar 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.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;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: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._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.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-card-"+c[0].data.id)}}});ui.component._EditorConf.themeStore=new Ext.data.SimpleStore({fields:["themeFile",{name:"themeN! ame",type:"string"}],data:[["themes/black/css/xtheme-black.css",_("Bla ck")],["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:u! i.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:f! alse,boxLabel:_("Using diff -kk -u command line"),inputValue:"using-ex ec",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.component._EditorConf.card2.superclass.initComponent.call(this)}});ui.component._EditorConf.card3=Ext.extend(Ext.form.FormPanel,{id:"conf-card-3",bodyStyle:"padding: 10px;",initComponent:fun! ction(){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._Ed itorConf.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({item:"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.userConf.conf_patch_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){n! ew ui.task.UpdateConfTask({item:"conf_patch_scrollbars",value:a.getVal ue()})}}},{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._EditorConf.menuDefEn)}else{ui.component._EditorConf.menuStore.loadData(ui.component._EditorConf.menuDefNonEn)}Ext.apply(this,{items:[{id:"confMenu",region:"west",width:190,autoScroll:true,it! ems:[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._EmailPrompt");ui.component.EmailPrompt=Ext.extend(Ext.Window,{title:_("Send an email"),width:500,height:300,minWidth:300,minHeight:200,layout:"fit",plain:true,bodyStyle:"padding:5px;",buttonAlign:"center",iconCls:"iconSendEmail",buttons:[{text:_("Send"),handler:function(){var a=this.ownerCt.findByType("form").shift().getForm().getValues();XHR({scope:this,url:"./php/controller.php",params:{task:"sendEma! il",to:a.to,subject:a.subject,msg:a.msg},success:function(b){this.owne rCt.close();Ext.MessageBox.alert(_("Status"),String.format(_("Email sent to {0} with success!"),this.ownerCt.name))}})}},{text:_("Cancel"),handler:function(){this.ownerCt.close()}}],initComponent:function(){Ext.apply(this,{items:new Ext.form.FormPanel({url:"save-form.php",baseCls:"x-plain",labelWidth:55,defaultType:"textfield",items:[{name:"to",fieldLabel:_("Send To"),readOnly:true,anchor:"100%",value:'"'+this.name+'" <'+this.email+">"},{name:"subject",fieldLabel:_("Subject"),anchor:"100%"},{name:"msg",xtype:"textarea",hideLabel:true,anchor:"100% -53"}]})});ui.component.EmailPrompt.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=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" 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,rowIdx:f,lang:phpDoc.user! Lang,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-LA! NG",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-des! c")}}else{Ext.getCmp("main-panel").setActiveTab("FE-"+g)}}},initCompon ent: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();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.component.ErrorFileGrid.superclass.initComponent.call(this)}});ui.com! ponent._ErrorFileGrid.instance=null;ui.component.ErrorFileGrid.getInstance=function(a){if(!ui.component._ErrorFileGrid.instance){if(!a){a={}}ui.component._ErrorFileGrid.instance=new ui.component.ErrorFileGrid(a)}return ui.component._ErrorFileGrid.instance};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.compon! ent._FilePanel.tbar.menu");ui.component._FilePanel.tbar.menu.lang=func tion(a){Ext.apply(this,a);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()}}]})})}});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.Men! u({items:[{scope:this,text:_("Description section"),handler:function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCursorPosition());Ext.getCmp(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><!-- }}} -->"].join(""));Ext.getCm! p(this.comp_id).focus()}},{scope:this,text:_("Parameters section"),han dler: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.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><!-- }}} -->"].join(""));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.ret! urnvalues;\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><!-- }}} -->"].join(""));Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Error 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="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"].join(""));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\n","Information specific to! unicode, from the PHP 6 changes.\r\n","</para>\r\n","</refsect1><!-- }}} -->"].join(""));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.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><!-- }}} -->"].join(""));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="exampl! es"><!-- {{{ -->\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><!-- }}} -->"].join(""));Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("Notes section"),handler:! function(){var a=Ext.util.JSON.decode(Ext.getCmp(this.comp_id).getCurs orPosition());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\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><!-- }}} -->"].join(""));Ext.getCmp(this.comp_id).focus()}},{scope:this,text:_("SeeAlso 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="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><!-- }}} -->"].join(""));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("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> "].join(""))}}}]:[{xtype:"panel",height:21,baseCl! s:"",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> "].join("")}];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>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(a+"-FILE-"+this.fid).reIndentAll()}}]:[{id:a+"-PANEL-btn-sav! e-"+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{if(this.prefix==="AF"){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});return}Ext.MessageBox.show({title:_("Confirm"),msg:_("Do you want to check for error before saving?"),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,scope:this,fn:function(b){if(b==="no"){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})}else{if(b==="yes"){new ui.task.CheckFileTask({prefix:this.prefix,ftype:this.ftype,fid:this.fid,fpath:this.fpath,fname:this.fname,lang:this.lang,storeRecord:this.storeR! ecord})}}}})}}},{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")?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+"."+thi! s.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+"-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&&e!==35&&e!==36){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+"-P! ANEL-btn-saveas-"+this.fid).enable();Ext.get(a+"-PANEL-btn-saveas-"+th is.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:"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.component._LocalMailGrid.columns,sm:new Ext.g! rid.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(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.LocalM! ailGrid.reload()}}]});ui.component.LocalMailGrid.superclass.initComponent.call(this)}});ui.component._LocalMailGrid.instance=null;ui.component.LocalMailGrid.getInstance=function(a){if(!ui.component._LocalMailGrid.instance){if(!a){a={}}ui.component._LocalMailGrid.instance=new ui.component.LocalMailGrid(a)}return ui.component._LocalMailGrid.instance};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:function(){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(a){Ext.getBody().unmask();var ! b=Ext.util.JSON.decode(a.responseText);if(b.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{new ui.component.SystemUpdatePrompt().show(Ext.get("acc-need-update"))}}})}},{text:_("Check Build"),disabled:(phpDoc.userLogin==="cvsread")?true:false,iconCls:"checkBuild",handler:function(){new ui.component.CheckBuildPrompt().show(Ext.get("acc-need-update"))}},{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/lo! ading.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: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:"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._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:fu nction(){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(){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.instance=null;ui.component.NotInENGrid.getInstance=function! (a){if(!ui.component._NotInENGrid.instance){if(!a){a={}}ui.component._NotInENGrid.instance=new ui.component.NotInENGrid(a)}return ui.component._NotInENGrid.instance};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(){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("pa! tch-email-alert").getValue()});this.close()}},{scope:this,text:_("Canc el"),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.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:t! rue,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["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",d! isabled:(phpDoc.userLogin==="cvsread"),handler:function(){return false },menu:new Ext.menu.Menu({items:[{scope:this,text:_("...this file"),iconCls:"iconCommitFileCvs",handler:function(){var a=ui.component.PendingCommitGrid.getInstance().store.getAt(this.rowIdx),c=a.data.id,b=a.data.path,e=a.data.name,d=Ext.util.md5(b+e);new ui.component.CommitPrompt({files:[{fid:d,fpath:b,fname:e,fdbid:c}]}).show()}},{scope:this,text:_("...all files modified by me"),iconCls:"iconCommitFileCvs",handler:function(){var b=[],a=ui.component.PendingCommitGrid.getInstance();a.store.each(function(c){if(c.data.by===phpDoc.userLogin){var e=c.data.id,d=c.data.path,g=c.data.name,f=Ext.util.md5(d+g);b.push({fid:f,fpath:d,fname:g,fdbid:e})}});new ui.component.CommitPrompt({files:b}).show()}},{scope:this,text:_("...all files modified"),iconCls:"iconCommitFileCvs",handler:function(){var b=[],a=ui.component.PendingCommitGrid.getInstance();a.store.each(function(c){var e=c.data.id,d=c.data.path,g=c.data.name,f=Ext.util.md5(d+g);b.push({fid:f,fpath:d,fname:g,fdbid:e})});new ui.com! ponent.CommitPrompt({files:b}).show()}}]})})}});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:"ge tDiff",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._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.men! u.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"){ui.component.RepositoryTree.getInstance(). openFile(d,a)}if(b==="delete"){new ui.task.ClearLocalChangeTask({storeRecord:f,ftype:b,fpath:d,fname:a})}}},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)},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.instance=null;ui.component.PendingCommitGrid.getInstance=function(a){if(!ui.component._PendingCommitGrid.instance){if(!a){a={}}ui.component._PendingCommitGrid.instance=new ui.component.PendingCommitGrid(a)}return ui.component._PendingCommitGrid.instance};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:"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._PendingPatchGri! d.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)})}}]})}});ui.component.PendingPatchGrid=Ext.extend(Ext.grid.GridPanel,{store:ui.component._PendingPatchGrid.store,columns:ui.component._PendingPatchGrid.columns,view:ui.component._PendingPatchGri! d.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,typ e:"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",syncS! croll: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)}});ui.component._PendingPatchGrid.instance=null;ui.component.PendingPatchGrid.getInstance=function(a){if(!ui.component._PendingPatchGrid.instance){if(!a){a={}}ui.component._PendingPatchGrid.instance=new ui.component.PendingPatchGrid(a)}return ui.component._PendingPatchGrid.instance};Ext.namespace("ui","ui.component","ui.component._PendingReviewGrid");ui.component._PendingReviewGrid.store=Ext.extend(Ext.! data.GroupingStore,{reader:new Ext.data.JsonReader({root:"Items",total Property:"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"}},e! mptyText:'<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,FileNa! me:this.fname},success:function(a){var b=Ext.util.JSON.decode(a.respon seText);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="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.getInstance().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._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.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:u! i.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,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,fna! me: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.use! rLang!=="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.instance=null;ui.component.PendingReviewGrid.getInstance=function(a){if(!ui.component._PendingReviewGrid.instance){if(!a! ){a={}}ui.component._PendingReviewGrid.instance=new ui.component.PendingReviewGrid(a)}return ui.component._PendingReviewGrid.instance};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"}});Ext.namespace("ui.component._RepositoryTree.menu");ui.component._RepositoryTree.menu.folder=function(a){Ext.apply(this,a);this.init();ui.component._RepositoryTree.menu.folder.superclass.constructor.call(this)};Ext.extend(ui.component._RepositoryTree.menu.folder,Ext.menu.Menu,{init:function(){Ext.apply(this,{items:[{text:(this.node.isExpanded())?"<b>"+_("Collapse")+"</b>":"<b>"+_("Expand")+"</b>",iconCls:"iconFolderClose",scope:this,handler:function(){if(this.node.isExpanded()){this.node.collapse()}else{this.node.expand()}}}]})}});ui.component._Rep! ositoryTree.menu.file=function(a){Ext.apply(this,a);this.init();ui.com ponent._RepositoryTree.menu.file.superclass.constructor.call(this)};Ext.extend(ui.component._RepositoryTree.menu.file,Ext.menu.Menu,{init:function(){var a=this.node.attributes.text,b=this.node.attributes.id.split("/"),d,c;b.shift();b.shift();b.pop();d=b.shift();c=b.join("/")+"/";Ext.apply(this,{items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"iconTabNeedReviewed",scope:this,handler:function(){ui.component._RepositoryTree.instance.fireEvent("dblclick",this.node)}},{hidden:(this.node.attributes.from==="search"),text:(d==="en")?String.format(_("Open the same file in <b>{0}</b>"),Ext.util.Format.uppercase(phpDoc.userLang)):String.format(_("Open the same file in <b>{0}</b>"),"EN"),iconCls:"iconTabNeedReviewed",scope:this,handler:function(){if(d==="en"){ui.component._RepositoryTree.instance.openFile(phpDoc.userLang+"/"+c,a)}else{ui.component._RepositoryTree.instance.openFile("en/"+c,a)}}}]})}});ui.component.RepositoryTree=Ext.extend(Ext.tree.TreePanel,{animate:true,enable! DD: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();if(a.attributes.type==="folder"||a.isRoot){new ui.component._RepositoryTree.menu.folder({node:a}).showAt(b.getXY())}else{if(a.attributes.type==="file"){new ui.component._RepositoryTree.menu.file({node: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",bo! dyBorder:false,split:true,collapsible:true,collapsed:true,width:375,it ems:{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("main-panel").setActiveTab("AF-"+i)}else{Ext.getCmp("main-panel").setActiveTab("AF-"+i);if(phpDoc.filePendingOpen[0]){if(phpDoc.filePendingOpen[0]){if(phpDoc.filePendingOpen[0].fpath){this.openFile(phpDoc.filePendingOpen[0].fpath,phpDoc.filePendingOpen[0].fname)}}}}}}},initComponent:function(){Ext.apply(this,{tbar:[_("Search: ")," ",new Ext.form.TwinTri! ggerField({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(){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.g! etCmp("acc-all-files").expand();var b=c.split("/"),a=function(f){f.ens ureVisible();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])}}}};this.root.expand(false,true,a.createDelegate(this))}});ui.component._RepositoryTree.instance=null;ui.component.RepositoryTree.getInstance=function(a){if(!ui.component._RepositoryTree.instance){if(!a){a={}}ui.component._RepositoryTree.instance=new ui.component.RepositoryTree(a)}return ui.component._RepositoryTree.instance};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",mappi! ng:"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")+'" : "'+_("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:"revi! sion"},{header:_("Maintainer"),width:45,sortable:true,dataIndex:"maint ainer"},{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, wai! t..."));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(ph! pDoc.userConf.conf_needupdate_diff==="using-viewvc"){k=ui.component.Vi ewVCDiff}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: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-PA! NEL-"+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_scrollbars"})]});Ext.getCmp("main-panel").setActiveTab("FNU-"+d)}else{Ext.getCmp("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-fi lter",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.instance=null;ui.component.StaleFileGrid.getInstance=function(a){if(!ui.component._StaleFileGrid.instance){if(!a){a={}}ui.component._StaleFileGrid.instance=new ui.component.StaleFileGrid(a)}return ui.component._StaleFileGrid.instance};Ext.namespac! e("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;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.RowN! umberer(),{id:"StatusType",header:_("File status type"),width:180,sort able: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("a! cc-need-update").expand()}}},initComponent:function(){Ext.apply(this,{iconCls:"flag-"+phpDoc.userLang,});ui.component.SummaryGrid.superclass.initComponent.call(this)}});ui.component._SummaryGrid.instance=null;ui.component.SummaryGrid.getInstance=function(a){if(!ui.component._SummaryGrid.instance){if(!a){a={}}ui.component._SummaryGrid.instance=new ui.component.SummaryGrid(a)}return ui.component._SummaryGrid.instance};Ext.namespace("ui","ui.component");ui.component.SystemUpdatePrompt=Ext.extend(Ext.Window,{id:"sys-update-win",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-ste! p-3" class="wizard-step-before">',_("Reload data"),"</div>"].join(""), buttons:[{id:"btn-start-refresh",text:_("Start"),iconCls:"startRefresh",handler:function(){Ext.getCmp("btn-start-refresh").disable();this.ownerCt.tools.close.setVisible(false);Ext.getDom("lastUpdateTime").innerHTML=_("update in progress...");new ui.task.SystemUpdateTask()}}]});Ext.namespace("ui","ui.component","ui.component._TranslationGraph");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"}}});ui.component._TranslationGraph.instance=null;ui.component.TranslationGrap! h.getInstance=function(a){if(!ui.component._TranslationGraph.instance){if(!a){a={}}ui.component._TranslationGraph.instance=new ui.component.TranslationGraph(a)}return ui.component._TranslationGraph.instance};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._T ranslatorGrid.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_sumR! enderer,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:"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);new ui.component.EmailPrompt({name:b,email:a}).show()},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>"+Strin g.format(_("Send an email to {0}"),b)+"</b>",iconCls:"iconSendEmail",handler:function(){new ui.component.EmailPrompt({name:b,email:a}).show()}},"-",{text:String.format(_("Send an email to the {0}"),"doc-"+phpDoc.userLang+"@lists.php.net"),iconCls:"iconSendEmail",handler:function(){new ui.component.EmailPrompt({name:"Php Doc Team "+phpDoc.userLang,email:"doc-"+phpDoc.userLang+"@lists.php.net"}).show()}}]}).showAt(d.getXY())}}});ui.component._TranslatorGrid.instance=null;ui.component.TranslatorGrid.getInstance=function(a){if(!ui.component._TranslatorGrid.instance){if(!a){a={}}ui.component._TranslatorGrid.instance=new ui.component.TranslatorGrid(a)}return ui.component._TranslatorGrid.instance};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.ne! t/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{userLogin:null,userLang:null,appName:"PhpDocumentation Online Editor",appVer:"0.2",uiRevision:"$Revision: 1.8 $",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."))},remo! veTabEvent:function(d,e){var b,c,f,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.removeTabEvent,this)}}});return false}else{return true}}else{return true}},drawInterface:function(){ui.task! .PingTask.getInstance().delay(30000);var b=new ui.component.MainMenu(),a=(this.userLang==="en")?[ui.component.LocalMailGrid.getInstance()]:[ui.component.SummaryGrid.getInstance(),ui.component.TranslatorGrid.getInstance(),ui.component.LocalMailGrid.getInstance(),ui.component.BugsGrid.getInstance(),ui.component.TranslationGraph.getInstance()];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==="e! n"),items:[ui.component.StaleFileGrid.getInstance()],collapsed:true,li steners:{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",iconCls:"FilesError",hidden:(this.userLang==="en"),items:[ui.component.ErrorFileGrid.getInstance()],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:[ui.component.PendingReviewGrid.getInstance()],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:[ui.component.NotInENGrid.getInstance()],collapsed:true},{id:"acc-all-files",title:_("All files"),layout:"fit",iconCls:"AllFiles",items:[ui.component.Repository! Tree.getInstance()],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:[ui.component.PendingCommitGrid.getInstance()],collapsed:true},{id:"acc-need-pendingPatch",title:_("Pending Patch")+' - <em id="acc-pendingPatch-nb">0</em>',layout:"fit",iconCls:"PendingPatch",items:[ui.component.PendingPatchGrid.getInstance()],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="lastUpdateTi me">{0}</em>'),"-")+"</h3></div></div>"},{xtype:"tabpanel",activeTab:0,plain:true,autoScroll:true,height:400,border:false,items:a,defaults:{border:true},layoutOnTabChange:true}]}]}]});Ext.get("loading").remove();Ext.fly("loading-mask").fadeOut({remove:true});if(directAccess){ui.component.RepositoryTree.getInstance().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.12&r2=1.13&diff_format=u Index: doc-editor/TODO diff -u doc-editor/TODO:1.12 doc-editor/TODO:1.13 --- doc-editor/TODO:1.12 Fri Jun 26 10:29:45 2009 +++ doc-editor/TODO Fri Jul 3 04:11:10 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.12 $ keyword (in comments, about popup, ..) +* Use the $Revision: 1.13 $ 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) @@ -40,19 +40,11 @@ * Automatic upgrade - Add an automatic system to upgrade dataBase (when it's needed) uppon the application version number. (idea by Richard Quadling) -* ClearLocalChange - - clear local change attempt to open en file which may not exist (class.php line 1884). JSON response would contain the php-warning message. - JAVASCRIPT: =========== -* Clean up the namespaces -* Split main.js to several objects & files (to be discussed) * 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 @@ -66,3 +58,20 @@ - DocBook - ReST - PO files (gettext) + +BUGS: +===== + +* ClearLocalChange + - clear local change attempt to open en file which may not exist (class.php line 1884). + JSON response would contain the php-warning message that breaks javascript. + +* onSuccesCommit + - when committing file, the function attempt to open en file which may not exist (ExtJsController.php line 623). + JSON response would contain the php-warning message that breaks javascript. + +* Saving patch / file + - when a file is saved, file.new is created. when a patch is saved, file.new is replaced by file.###.patch + Some ui component may issue a diff between file & file.new but sometimes file.new is removed as .patch + +* reopening file-diff (context-menu diff) in main-panel tab crashes extjs http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/CheckBuildPrompt.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/CheckBuildPrompt.js +++ doc-editor/js/ui/component/CheckBuildPrompt.js Ext.namespace('ui','ui.component'); ui.component.CheckBuildPrompt = Ext.extend(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 : [{ id : 'win-check-build-btn-submit', text : _('Go !'), handler : function() { new ui.task.CheckBuildTask(); this.ownerCt.close(); } }], initComponent : function() { Ext.apply(this, { items : [{ xtype : 'panel', modal : false, 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=' + phpDoc.userLang + '<br><br>' }, { xtype : 'checkbox', id : 'option-xml-details', name : 'option-xml-details', checked : false, hideLabel : true, boxLabel : _('Enable detailed XML error messages') }] }); ui.component.CheckBuildPrompt.superclass.initComponent.call(this); } }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/CommitLogPrompt.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/CommitLogPrompt.js +++ doc-editor/js/ui/component/CommitLogPrompt.js Ext.namespace('ui','ui.component','ui.component._CommitLogPrompt'); ui.component._CommitLogPrompt.store = 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' }, Ext.data.Record.create([ { name : 'id', mapping : 'id' }, { name : 'text', mapping : 'text' } ]) ) }); ui.component._CommitLogPrompt.cm = new Ext.grid.ColumnModel([ new Ext.grid.RowNumberer(), { id : 'log_msg', header : _('Log message'), dataIndex : 'text', renderer : function(value) { return value.split("\n").join("<br/>"); }, editor : new Ext.Editor( new Ext.form.TextArea({ grow : true, growMin : 120 }), { shadow : false, autoSize : true, listeners : { complete : function(editor, newValue, OldValue) { var messID = editor.record.data.id; XHR({ url : './php/controller.php', params : { task : 'saveLogMessage', messID : messID, mess : newValue }, success : function(response) { ui.component._CommitLogPrompt.store.getById(messID).commit(); }, failure : function(response) { phpDoc.winForbidden(); } }); } } } ) } ]); ui.component._CommitLogPrompt.sm = new Ext.grid.RowSelectionModel({ singleSelect: true }); ui.component._CommitLogPrompt.menu = function(config) { Ext.apply(this, config); this.init(); ui.component._CommitLogPrompt.menu.superclass.constructor.call(this); } Ext.extend(ui.component._CommitLogPrompt.menu, Ext.menu.Menu, { init : function() { var store = ui.component._CommitLogPrompt.store; Ext.apply(this, { items : [{ text : _('Delete this Log Message'), iconCls : 'iconDelete', handler : function() { XHR({ url : './php/controller.php', params : { task : 'deleteLogMessage', messID : store.getAt(rowIndex).data.id }, success : function(response) { store.remove(store.getAt(rowIndex)); }, failure : function(response) { phpDoc.winForbidden(); } }); } }] }); } }); ui.component._CommitLogPrompt.grid = Ext.extend(Ext.grid.EditorGridPanel, { loadMask : true, autoExpandColumn : 'log_msg', cm : ui.component._CommitLogPrompt.cm, sm : ui.component._CommitLogPrompt.sm, store : ui.component._CommitLogPrompt.store, listeners : { rowcontextmenu : function(grid, rowIndex, e) { grid.getSelectionModel().selectRow(rowIndex); new ui.component._CommitLogPrompt.menu().showAt(e.getXY()); } } }); ui.component.CommitLogPrompt = Ext.extend(Ext.Window, { id : 'commit-log-win', title : _('Manage Log Message'), iconCls : 'winManageLog', width : 650, height : 350, layout : 'fit', resizable : false, modal : true, autoScroll : true, html : '<div class="diff-content"></div>', buttons : [{ text : _('Close'), handler : function() { this.ownerCt.close(); } }], listeners : { close : function() { ui.component._CommitLogPrompt.store.reload(); } }, initComponent : function() { Ext.apply(this, { items : [new ui.component._CommitLogPrompt.grid()], }); ui.component.CommitLogPrompt.superclass.initComponent.call(this); } }); ui.component.CommitLogPrompt.store = ui.component._CommitLogPrompt.store; http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/CommitPrompt.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/CommitPrompt.js +++ doc-editor/js/ui/component/CommitPrompt.js Ext.namespace('ui','ui.component'); // config - { files: {fid, fpath, fname, fdbid} } ui.component.CommitPrompt = Ext.extend(Ext.Window, { id : 'winCvsCommit', layout : 'form', title : _('CVS commit'), closable : false, width : 400, height : 480, resizable : false, modal : true, bodyStyle : 'padding:5px 5px 0', labelAlign : 'top', tools: [{ id : 'gear', qtip : _('Configure this tools'), handler : function() { new ui.component.CommitLogPrompt().show(); } }], buttons : [{ id : 'win-commit-btn-submit', text : _('Submit'), handler : function() { new ui.task.CVSCommitTask(); } }, { id : 'win-commit-btn-close', text : _('Close'), handler : function() { Ext.getCmp('winCvsCommit').close(); } }], initComponent : function() { var root = new Ext.tree.TreeNode({ text : 'root', expanded : true }); for (var i = 0; i < this.files.length; ++i) { root.appendChild( new Ext.tree.TreeNode({ id : 'need-commit-' + this.files[i].fid, text : this.files[i].fpath + this.files[i].fname, FileDBID : this.files[i].fdbid, FilePath : this.files[i].fpath, FileName : this.files[i].fname, leaf : true, checked : true }) ); } Ext.apply(this, { items : [{ xtype : 'checktreepanel', id : 'commit-tree-panel', anchor : '100%', height : 180, autoScroll : true, rootVisible : false, root : root }, { xtype : 'combo', name : 'first2', fieldLabel : _('Older messages'), editable : false, anchor : '100%', store : ui.component.CommitLogPrompt.store, triggerAction : 'all', tpl : '<tpl for="."><div class="x-combo-list-item">{[values.text.split("\n").join("<br/>")]}</div></tpl>', valueField : 'id', displayField : 'text', listeners : { render : function(combo) { combo.store.load(); }, select : function(combo, record, numIndex) { Ext.getCmp('form-commit-message-log').setValue(record.data.text); } } }, { xtype : 'textarea', id : 'form-commit-message-log', name : 'first3', fieldLabel : _('Log message'), anchor : '100%', height : 150, value : '' }] }); ui.component.CommitPrompt.superclass.initComponent.call(this); } }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/EmailPrompt.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/EmailPrompt.js +++ doc-editor/js/ui/component/EmailPrompt.js Ext.namespace('ui','ui.component','ui.component._EmailPrompt'); // config - { name, email } ui.component.EmailPrompt = Ext.extend(Ext.Window, { title : _('Send an email'), width : 500, height : 300, minWidth : 300, minHeight : 200, layout : 'fit', plain : true, bodyStyle : 'padding:5px;', buttonAlign : 'center', iconCls : 'iconSendEmail', buttons : [{ text : _('Send'), handler : function() { var values = this.ownerCt.findByType('form').shift() .getForm().getValues(); XHR({ scope : this, url : './php/controller.php', params : { task : 'sendEmail', to : values.to, subject : values.subject, msg : values.msg }, success : function(response) { this.ownerCt.close(); Ext.MessageBox.alert( _('Status'), String.format(_('Email sent to {0} with success!'), this.ownerCt.name) ); } }); } }, { text : _('Cancel'), handler : function() { this.ownerCt.close(); } }], initComponent : function() { Ext.apply(this, { items : new Ext.form.FormPanel({ url : 'save-form.php', baseCls : 'x-plain', labelWidth : 55, defaultType : 'textfield', items : [{ name : 'to', fieldLabel : _('Send To'), readOnly : true, anchor : '100%', value : '"' + this.name + '" <' + this.email + '>' }, { name : 'subject', fieldLabel : _('Subject'), anchor : '100%' }, { name : 'msg', xtype : 'textarea', hideLabel : true, anchor : '100% -53' }] }) }); ui.component.EmailPrompt.superclass.initComponent.call(this); } }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/SystemUpdatePrompt.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/SystemUpdatePrompt.js +++ doc-editor/js/ui/component/SystemUpdatePrompt.js Ext.namespace('ui','ui.component'); ui.component.SystemUpdatePrompt = Ext.extend(Ext.Window, { id : 'sys-update-win', 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>' ].join(''), buttons : [{ id : 'btn-start-refresh', text : _('Start'), iconCls : 'startRefresh', handler : function() { // Disable start button Ext.getCmp('btn-start-refresh').disable(); // Disable the close button for this win this.ownerCt.tools.close.setVisible(false); // Set 'in progress' Ext.getDom('lastUpdateTime').innerHTML = _('update in progress...'); new ui.task.SystemUpdateTask(); } }] }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/CheckBuildTask.js?view=markup&rev=1.1 Index: doc-editor/js/ui/task/CheckBuildTask.js +++ doc-editor/js/ui/task/CheckBuildTask.js Ext.namespace('ui','ui.task','ui.task._CheckBuildTask'); ui.task._CheckBuildTask.display = function() { XHR({ url : './php/controller.php', params : { task : 'getLogFile', file : 'log_check_build' }, success : function(response) { var o = Ext.util.JSON.decode(response.responseText); Ext.getBody().unmask(); // Re-enable TaskPing ui.task.PingTask.getInstance().delay(30000); // Display 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">' + o.mess + '</div>' }); Ext.getCmp('main-panel').setActiveTab('check_build_panel'); } }); } ui.task._CheckBuildTask.poll = new Ext.util.DelayedTask(function() { XHR({ url : './php/controller.php', params : { task : 'checkLockFile', lockFile : 'lock_check_build' }, success : function(response) { ui.task._CheckBuildTask.poll.delay(5000); }, failure : function(response) { var o = Ext.util.JSON.decode(response.responseText); if (o && o.success === false) { new ui.task._CheckBuildTask.display(); } else { ui.task._CheckBuildTask.poll.delay(5000); } } }); }); ui.task.CheckBuildTask = function(config) { Ext.getBody().mask( '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + _('Please, wait until the build is checked...') ); // We need to stop ping test during this process ui.task.PingTask.getInstance().cancel(); XHR({ url : './php/controller.php', params : { task : 'checkBuild', xmlDetails : Ext.getCmp('option-xml-details').checked }, success : function(response) { new ui.task._CheckBuildTask.display(); }, failure : function(response) { var o = Ext.util.JSON.decode(response.responseText); if (o && o.success === false) { // Re-enable TaskPing ui.task.PingTask.getInstance().delay(30000); Ext.getBody().unmask(); phpDoc.winForbidden(); } else { // take over 30sec (max Keep-Alive time) // poll every XX secondes if the check build is finish ui.task._CheckBuildTask.poll.delay(5000); } } }); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/CVSCommitTask.js?view=markup&rev=1.1 Index: doc-editor/js/ui/task/CVSCommitTask.js +++ doc-editor/js/ui/task/CVSCommitTask.js Ext.namespace('ui','ui.task','ui.task._CVSCommitTask'); ui.task._CVSCommitTask.commit = function(files) { Ext.getBody().mask( '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + _('Please, wait until commit...') ); var nodes = [], node, LogMessage; // Go for Cvs commit for (var i = 0; i < files.length; i = i + 1) { node = Ext.getCmp('commit-tree-panel').getNodeById(files[i]); nodes.push(node.attributes.FileDBID); } // Get log message LogMessage = Ext.getCmp('form-commit-message-log').getValue(); // Close this window Ext.getCmp('winCvsCommit').close(); XHR({ url : './php/controller.php', params : { task : 'cvsCommit', nodes : Ext.util.JSON.encode(nodes), logMessage : LogMessage }, success : function(response) { var o = Ext.util.JSON.decode(response.responseText); Ext.getBody().unmask(); // Display commit output message new Ext.Window({ title : _('Status'), width : 450, height : 350, resizable : false, modal : true, autoScroll : true, bodyStyle : 'background-color: white; padding: 5px;', html : o.mess.join("<br/>"), buttons : [{ text : _('Close'), handler : function() { this.ownerCt.close(); } }] }).show(); Ext.getBody().mask( '<img src="themes/img/loading.gif" style="vertical-align: middle;" /> ' + _('Please, wait...') ); // Apply modification XHR({ url : './php/controller.php', params : { task : 'onSuccesCommit', nodes : Ext.util.JSON.encode(nodes), logMessage : LogMessage }, success : function(response) { if (phpDoc.userLang != 'en') { ui.component.ErrorFileGrid.getInstance().store.reload(); ui.component.PendingReviewGrid.getInstance().store.reload(); ui.component.StaleFileGrid.getInstance().store.reload(); } ui.component.PendingCommitGrid.getInstance().store.reload(); ui.component.TranslatorGrid.getInstance().store.reload(); ui.component.SummaryGrid.getInstance().store.reload(); Ext.getBody().unmask(); } }); } }); } ui.task.CVSCommitTask = function() { // If the user is cvsread, we don't commit anything if (phpDoc.userLogin === 'cvsread') { Ext.getCmp('winCvsCommit').close(); phpDochis.winForbidden(); return; } var files = Ext.getCmp('commit-tree-panel').getValue(), NeedToBeClose = new Array(), checkNode, paneID_FE, paneID_FNU, paneID_FNR, paneID, labelNeedToBeClose = ''; for (var i = 0; i < files.length; ++i) { checkNode = Ext.getCmp('commit-tree-panel').getNodeById(files[i]).attributes; paneID_FE = 'FE-' + Ext.util.md5('FE-' + checkNode.FilePath + checkNode.FileName); paneID_FNU = 'FNU-' + Ext.util.md5('FNU-' + checkNode.FilePath + checkNode.FileName); paneID_FNR = 'FNR-' + Ext.util.md5('FNR-' + checkNode.FilePath + checkNode.FileName); if ( Ext.getCmp('main-panel').findById(paneID_FE) || Ext.getCmp('main-panel').findById(paneID_FNU) || Ext.getCmp('main-panel').findById(paneID_FNR) ) { if (Ext.getCmp('main-panel').findById(paneID_FE)) { paneID = paneID_FE; } if (Ext.getCmp('main-panel').findById(paneID_FNU)) { paneID = paneID_FNU; } if (Ext.getCmp('main-panel').findById(paneID_FNR)) { paneID = paneID_FNR; } NeedToBeClose.push([paneID, checkNode.FileName]); } } if (NeedToBeClose.length > 0) { for (var i = 0; i < NeedToBeClose.length; ++i) { labelNeedToBeClose += NeedToBeClose[i][1] + '<br/>'; } Ext.MessageBox.show({ title : 'Warning', icon : Ext.MessageBox.INFO, buttons : Ext.MessageBox.YESNOCANCEL, msg : (NeedToBeClose.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 ?'), NeedToBeClose.length, labelNeedToBeClose) : String.format( _('There is {0} file to close before commit.<br><br>' + '{1}<br/><br/>Would you like I close it for you ?'), NeedToBeClose.length, labelNeedToBeClose), fn : function(btn) { if (btn === 'yes') { for (var j = 0; j < NeedToBeClose.length; ++j) { Ext.getCmp('main-panel').remove(NeedToBeClose[j][0]); } ui.task._CVSCommitTask.commit(files); } } }); } else { ui.task._CVSCommitTask.commit(files); } } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/task/SystemUpdateTask.js?view=markup&rev=1.1 Index: doc-editor/js/ui/task/SystemUpdateTask.js +++ doc-editor/js/ui/task/SystemUpdateTask.js Ext.namespace('ui','ui.task','ui.task._SystemUpdateTask'); ui.task._SystemUpdateTask.refresh_ui = function() { Ext.get('wizard-step-3').replaceClass('wizard-step-before', 'wizard-step-working'); if (phpDoc.userLang != 'en') { // Reload all data on this page ui.component.StaleFileGrid.getInstance().store.reload(); ui.component.ErrorFileGrid.getInstance().store.reload(); ui.component.TranslatorGrid.getInstance().store.reload(); } Ext.get('wizard-step-3').replaceClass('wizard-step-working', 'wizard-step-done'); // Re-enable Finish button Ext.getCmp('btn-start-refresh').setIconClass('finishRefresh'); Ext.getCmp('btn-start-refresh').setText(_('Finish !')); Ext.getCmp('btn-start-refresh').setHandler(function() { Ext.getCmp('sys-update-win').close(); }); Ext.getCmp('btn-start-refresh').enable(); // Re-enable TaskPing ui.task.PingTask.getInstance().delay(30000); // Re-enable win's close button Ext.getCmp('sys-update-win').tools.close.setVisible(true); } ui.task._SystemUpdateTask.poll_apply_tool = new Ext.util.DelayedTask(function() { XHR({ url : './php/controller.php', params : { task : 'checkLockFile', lockFile : 'lock_apply_tools' }, success : function(response) { ui.task._SystemUpdateTask.poll_apply_tool.delay(5000); }, failure : function(response) { var o = Ext.util.JSON.decode(response.responseText); if (o && o.success === false) { Ext.get('wizard-step-2').replaceClass('wizard-step-working', 'wizard-step-done'); new ui.task._SystemUpdateTask.refresh_ui(); } else { ui.task._SystemUpdateTask.poll_apply_tool.delay(5000); } } }); }); ui.task._SystemUpdateTask.apply_tool = function() { Ext.get('wizard-step-2').replaceClass('wizard-step-before', 'wizard-step-working'); XHR({ url : './php/controller.php', params : { task: 'applyTools' }, success : function(response) { Ext.get('wizard-step-2').replaceClass('wizard-step-working', 'wizard-step-done'); new ui.task._SystemUpdateTask.refresh_ui(); }, failure : function(response) { ui.task._SystemUpdateTask.poll_apply_tool.delay(5000); } }); } ui.task._SystemUpdateTask.cvs_poll = new Ext.util.DelayedTask(function() { XHR({ url : './php/controller.php', params : { task : 'checkLockFile', lockFile : 'lock_update_repository' }, success : function(response) { ui.task._SystemUpdateTask.cvs_poll.delay(5000); }, failure : function(response) { var o = Ext.util.JSON.decode(response.responseText); if (o && o.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'); new ui.task._SystemUpdateTask.apply_tool(); } else { ui.task._SystemUpdateTask.cvs_poll.delay(5000); } } }); }); ui.task.SystemUpdateTask = function() { ui.task.PingTask.getInstance().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({ url : './php/controller.php', params : { task: 'updateRepository' }, success : function(response) { Ext.get('wizard-step-1').replaceClass('wizard-step-working', 'wizard-step-done'); Ext.get('wizard-step-1.1').replaceClass('wizard-show', 'wizard-wait'); new ui.task._SystemUpdateTask.apply_tool(); }, failure: function(response) { var o = Ext.util.JSON.decode(response.responseText); if (o && o.success === false) { Ext.getCmp('sys-update-win').close(); phpDoc.winForbidden(); } else { ui.task._SystemUpdateTask.cvs_poll.delay(5000); } } }); }