cvs: doc-editor / TODO index.php /js main.js main_min.js /js/ui/component BuildStatus.js CheckDoc.js EditorConf.js /scripts/utils compress-js.sh
| From: | Chan Ka Shing | Date: | Tue, 02 Jun 2009 05:08:36 +0000 |
| Subject: | cvs: doc-editor / TODO index.php /js main.js main_min.js /js/ui/component BuildStatus.js CheckDoc.js EditorConf.js /scripts/utils compress-js.sh | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-4097@lists.php.net to get a copy of this message | ||
mrkschan Tue Jun 2 05:08:36 2009 UTC
Added files:
/doc-editor/js/ui/component BuildStatus.js CheckDoc.js
EditorConf.js
/doc-editor/scripts/utils compress-js.sh
Modified files:
/doc-editor/js main.js main_min.js
/doc-editor index.php TODO
Log:
modification/fix:
- ui userConf.conf_theme is not refreshed after theme change success
- BuildStatus tab is re-opened without care. Closing re-opened BuildStatus tab will crash extjs
- CheckDoc tab is re-opened without care. Closing re-opened CheckDoc tab will crash extjs
- index.php includes compressed main_min.js instead of main.js, few hundred k-bytes saved in
http transfer
- included shell script for yuicompressor
- updated TODO list
main.js cleanup:
- doc-editor config window
* config window is now wrapped in js/ui/component/EditorConf.js
- doc-editor build status grid
* build status grid is now wrapped in js/ui/component/BuildStatus.js
- doc-editor check doc grid
* check doc grid is now wrapped in js/ui/component/CheckDoc.js
http://cvs.php.net/viewvc.cgi/doc-editor/js/main.js?r1=1.59&r2=1.60&diff_format=u Index: doc-editor/js/main.js diff -u doc-editor/js/main.js:1.59 doc-editor/js/main.js:1.60 --- doc-editor/js/main.js:1.59 Tue May 26 07:23:00 2009 +++ doc-editor/js/main.js Tue Jun 2 05:08:35 2009 @@ -26,7 +26,7 @@ userLang: '', appName: 'PhpDocumentation Online Editor', appVer: '0.2', - uiRevision: '$Revision: 1.59 $', + uiRevision: '$Revision: 1.60 $', userConf: { 'conf_needupdate_diff': 'using-exec', @@ -103,8 +103,12 @@ }); }, // init - winForbidden: function(){ - Ext.MessageBox.alert(_('Forbidden'), _('You can\'t do this action as cvsread user.')); + winForbidden: function() + { + Ext.MessageBox.alert( + _('Forbidden'), + _('You can\'t do this action as cvsread user.') + ); }, menuMarkupLANG: function(panel, scope){ @@ -699,408 +703,63 @@ }, this); - }, // loadDataStore - newTabCheckDoc: function(){ - - var ds, grid, renderer; + },// loadDataStore - // The store - 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' - }, [{ - name: 'id', - mapping: 'id' - }, { - name: 'path', - mapping: 'path' - }, { - name: 'extension', - mapping: 'extension' - }, { - name: 'check_oldstyle', - mapping: 'check_oldstyle', - type: 'int' - }, { - name: 'check_undoc', - mapping: 'check_undoc', - type: 'int' - }, { - name: 'check_roleerror', - mapping: 'check_roleerror', - type: 'int' - }, { - name: 'check_badorder', - mapping: 'check_badorder', - type: 'int' - }, { - name: 'check_noseealso', - mapping: 'check_noseealso', - type: 'int' - }, { - name: 'check_noreturnvalues', - mapping: 'check_noreturnvalues', - type: 'int' - }, { - name: 'check_noparameters', - mapping: 'check_noparameters', - type: 'int' - }, { - name: 'check_noexamples', - mapping: 'check_noexamples', - type: 'int' - }, { - name: 'check_noerrors', - mapping: 'check_noerrors', - type: 'int' - }]) - }); - ds.setDefaultSort('extension', 'asc'); + newTabCheckDoc : function() + { + var tab = Ext.getCmp('tab-check-doc'); - renderer = function(value, metadata, record, rowIndex, colIndex, store){ - if (value > 0) { - metadata.css = 'check_doc_cell'; - return value; - } - else { - return; - } + if (tab === undefined) { + // if tab not exist, create new tab + Ext.getCmp('main-panel').add({ + id : 'tab-check-doc', + title : 'Check Doc', + iconCls : 'CheckDoc', + layout : 'fit', + closable : true, + html : 'nothing' + }); + tab = Ext.getCmp('tab-check-doc'); } + if (tab.items) tab.removeAll(true); + tab.add(new ui.component.CheckDoc()); + tab.doLayout(); // render the grid - // The grid - grid = new Ext.grid.GridPanel({ - store: ds, - loadMask: true, - sm: new Ext.grid.CellSelectionModel({ - singleSelect: true - }), - columns: [new Ext.grid.RowNumberer(), { - id: 'extension', - header: "Extension", - sortable: true, - dataIndex: 'extension' - }, { - header: "Not documented", - width: 45, - sortable: true, - dataIndex: 'check_undoc', - renderer: renderer - }, { - header: "Old style", - width: 45, - sortable: true, - dataIndex: 'check_oldstyle', - renderer: renderer - }, { - header: "Bad refsect1 order", - width: 45, - sortable: true, - dataIndex: 'check_badorder', - renderer: renderer - }, { - header: "No parameters", - width: 45, - sortable: true, - dataIndex: 'check_noparameters', - renderer: renderer - }, { - header: "No return values", - width: 45, - sortable: true, - dataIndex: 'check_noreturnvalues', - renderer: renderer - }, { - header: "No examples", - width: 45, - sortable: true, - dataIndex: 'check_noexamples', - renderer: renderer - }, { - header: "No errors section", - width: 45, - sortable: true, - dataIndex: 'check_noerrors', - renderer: renderer - }, { - header: "No see also", - width: 45, - sortable: true, - dataIndex: 'check_noseealso', - renderer: renderer - }, { - header: "Refsect1 role error", - width: 45, - sortable: true, - dataIndex: 'check_roleerror', - renderer: renderer - }], - view: new Ext.grid.GridView({ - forceFit: true - }), - autoExpandColumn: 'extension', - bodyBorder: false, - listeners: { - scope: this, - render: function(grid){ - grid.store.load.defer(20, grid.store); - }, - celldblclick: function(grid, rowIndex, columnIndex, e){ - - var record, errorType, data, path; - - record = grid.getStore().getAt(rowIndex); - errorType = grid.getColumnModel().getDataIndex(columnIndex); - data = record.get(errorType); - path = record.data.path; - - if (Ext.num(data, false) && data != 0) { - - // open checkdoc grid - XHR({ - url : './php/controller.php', - params : { - task : 'getCheckDocFiles', - path : path, - errorType : errorType - }, - scope : this, - success : function(response) - { - // Must choose the file - var o = Ext.decode(response.responseText); - - // store - var storeFiles = new Ext.data.SimpleStore({ - fields: [ { - name: 'id' - }, { - name: 'file' - } ] - }); - - for (var i = 0; i < o.files.length; ++i) { - - var r = new storeFiles.recordType({ - id : i, - file : o.files[i].name - }); - storeFiles.insert(0, r); - } - storeFiles.sort('file', 'asc'); - - // Grid - var gridFiles = new Ext.grid.GridPanel({ - store : storeFiles, - loadMask : true, - sm : new Ext.grid.RowSelectionModel({ - listeners : { - rowselect : function(sm, rowIndex, record) - { - Ext.getCmp('check-doc-btn-open-selected-files').enable(); - } - } - }), - columns: [ new Ext.grid.RowNumberer(), { - id : 'file', - header : "Files", - sortable : true, - dataIndex : 'file' - } ], - autoExpandColumn : 'file', - bodyBorder : false, - listeners : { - scope : this, - rowcontextmenu : function(grid, rowIndex, e) - { - grid.getSelectionModel().selectRow(rowIndex); - }, - rowdblclick: function(grid, rowIndex, e) - { - var name = storeFiles.getAt(rowIndex).data.file; - win.close(); - this.openFile('en' + path, name); - } - } - }); - - win = new Ext.Window({ - title : _('Files'), - width : 450, - height : 350, - resizable : false, - modal : true, - autoScroll : true, - labelWidth : 50, - layout : 'fit', - items : [gridFiles], - buttons : [{ - scope : this, - text : 'Open all files', - handler : function() - { - win.close(); - - this.filePendingOpen = []; - - for (i = 0; i < o.files.length; i = i + 1) { - this.filePendingOpen[i] = ['en' + path, o.files[i].name]; - } - - // Start the first - this.openFile(this.filePendingOpen[0][0], this.filePendingOpen[0][1]); - } - }, { - scope : this, - text : 'Open selected files', - id : 'check-doc-btn-open-selected-files', - disabled : true, - handler : function() - { - win.close(); - - this.filePendingOpen = []; - - var r = gridFiles.getSelectionModel().getSelections(); - - for (i = 0; i < r.length; i = i + 1) { - this.filePendingOpen[i] = ['en' + path, r[i].data.file]; - } - - // Start the first - this.openFile(this.filePendingOpen[0][0], this.filePendingOpen[0][1]); - } - }] - }); - win.show(); - } - }); - } // data is not empty - } - - } - }); - - Ext.getCmp('main-panel').add({ - closable: true, - title: 'Check Doc', - iconCls: 'CheckDoc', - id: 'tab-check-doc', - layout: 'fit', - items: [grid] - }); Ext.getCmp('main-panel').setActiveTab('tab-check-doc'); - }, // newTabCheckDoc - newTabBuildStatus: function(){ - - var ds, grid; - - // The store - 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' - }, [{ - 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' - }]) - }); - ds.setDefaultSort('date', 'desc'); + }, - // The grid + newTabBuildStatus : function() + { + var tab = Ext.getCmp('tab-build-status'); - function rendererLanguage(val) { - return '<div class="flag flag-' + val + '">' + val + '</div>'; - } - function rendererStatus(val) { - if( val === 0 ) return 'Nok'; - else return 'Ok'; + if (tab === undefined ) { + // if tab not exist, create new tab + Ext.getCmp('main-panel').add({ + id : 'tab-build-status', + title : _('Translation build status'), + iconCls : 'BuildStatus', + layout : 'fit', + closable : true, + html : 'nothing' + }); + tab = Ext.getCmp('tab-build-status'); } - grid = new Ext.grid.GridPanel({ - store: ds, - loadMask: true, - 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: rendererLanguage - }, { - header: _("Status"), - width: 45, - sortable: true, - dataIndex: 'status', - renderer: rendererStatus - }], - view: new Ext.grid.GridView({ - forceFit: true, - getRowClass: function(record, numIndex, rowParams, store){ - if (record.data.status === 0) { - return 'summary_3'; - } - } - }), - autoExpandColumn: 'date', - bodyBorder: false, - listeners: { - scope: this, - render: function(grid){ - grid.store.load.defer(20, grid.store); - } - } - }); + if (tab.items) tab.removeAll(true); + tab.add(new ui.component.BuildStatus()); + tab.doLayout(); // render the grid - Ext.getCmp('main-panel').add({ - closable: true, - title: _('Translation build status'), - iconCls: 'BuildStatus', - id: 'tab-build-status', - layout: 'fit', - items: [grid] - }); Ext.getCmp('main-panel').setActiveTab('tab-build-status'); - }, // newTabBuildStatus - openFile: function(FilePath, FileName){ + }, + openFile: function(FilePath, FileName) + { Ext.getCmp('acc-all-files').expand(); var t = FilePath.split('/'); - function GoToNode(node, scope){ + function GoToNode(node, scope) { node.expand(false, true, function(node){ @@ -1120,6 +779,7 @@ } else { // walk into childs + // leaf node for (i = 0; i < node.childNodes.length; i = i + 1) { if (node.childNodes[i].text === FileName) { node.childNodes[i].ensureVisible(); @@ -1734,8 +1394,8 @@ }); }, //saveLangFile - getFile: function(FileID, FilePath, FileName, Panel1, Panel2){ - + getFile: function(FileID, FilePath, FileName, Panel1, Panel2) + { // Mask the panel Ext.get(Panel1 + FileID).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Loading...')); @@ -1779,7 +1439,6 @@ } } } - } }); @@ -2817,367 +2476,16 @@ }, //WinCheckBuild - WinConf: function(){ - - var winConf, viewMenu, storeMenu, storeData, tplMenu; - - if (!winConf) { - 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>'); - tplMenu.compile(); - - if (this.userLang === 'en') { - storeData = [['1', 'go-home.png', _('Main')], ['5', 'view-list-tree.png', _('Module "All files"')], ['6', 'view-media-playlist.png', _('Module "Pending Patch"')]]; - } - else { - storeData = [['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"')]]; - } - - storeMenu = new Ext.data.SimpleStore({ - id: 0, - fields: [{ - name: 'id' - }, { - name: 'img' - }, { - name: 'label' - }] - }); - storeMenu.loadData(storeData); - - viewMenu = new Ext.DataView({ - tpl: tplMenu, - singleSelect: true, - overClass: 'x-view-over', - itemSelector: 'div.thumb-wrap', - store: storeMenu, - listeners: { - selectionchange: function(view, selec){ - var r = view.getSelectedRecords(); - Ext.getCmp('confCard').layout.setActiveItem('conf-card-' + r[0].data.id); - } - } - }); - - winConf = new Ext.Window({ - scope: this, - layout: 'border', - width: 550, - height: 400, - iconCls: 'iconConf', - modal: true, - title: _('Configuration'), - plain: true, - closeAction: 'hide', - listeners: { - show: function(){ - viewMenu.select(viewMenu.getNode(0)); - } - }, - items: [{ - scope: this, - region: 'west', - width: 190, - id: 'confMenu', - autoScroll: true, - items: viewMenu - }, { - scope: this, - layout: 'slide', - region: 'center', - id: 'confCard', - width: 375, - frame: true, - activeItem: 0, - bbar: new Ext.StatusBar({ - defaultText: _('All changes take effect immediately'), - defaultIconCls: 'confStatusBar' - }), - items: [{ - scope: this, - id: 'conf-card-1', - xtype: 'form', - bodyStyle: 'padding: 10px;', - items: [{ - xtype: 'fieldset', - title: _('Themes'), - autoHeight: true, - defaults: { - hideLabel: true - }, - items: [{ - xtype: 'combo', - id: 'conf-combo-theme', - store: 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')]] - }), - valueField: 'themeFile', - displayField: 'themeName', - triggerAction: 'all', - mode: 'local', - forceSelection: true, - editable: false, - fieldLabel: 'fieldlabel', - value: this.userConf.conf_theme, - listeners: { - scope: this, - render: function() { - Ext.getCmp('conf-combo-theme').store.sort('themeName'); - }, - select: function(c, record, numIndex){ - var hrefTheme = c.getValue(); - Ext.get('appTheme').dom.href = hrefTheme; - this.confUpdate('conf_theme', hrefTheme); - } - } - - }] - }] - }, { - scope: this, - id: 'conf-card-2', - xtype: 'form', - bodyStyle: 'padding: 10px;', - items: [{ - xtype: 'fieldset', - title: _('Diff view'), - autoHeight: true, - defaults: { - hideLabel: true - }, - defaultType: 'radio', - items: [{ - scope: this, - checked: (this.userConf.conf_needupdate_diff === "using-viewvc") ? true : false, - boxLabel: _('Using ViewVc from php web site'), - name: 'conf_needupdate_diff', - inputValue: 'using-viewvc', - listeners: { - scope: this, - check: function(f){ - if (f.checked) { - this.confUpdate('conf_needupdate_diff', f.getRawValue()); - } - } - } - }, { - checked: (this.userConf.conf_needupdate_diff === "using-exec") ? true : false, - boxLabel: _('Using diff -kk -u command line'), - name: 'conf_needupdate_diff', - inputValue: 'using-exec', - listeners: { - scope: this, - check: function(f){ - if (f.checked) { - this.confUpdate('conf_needupdate_diff', f.getRawValue()); - } - } - } - }] - }, { - xtype: 'fieldset', - title: _('Editor'), - autoHeight: true, - defaults: { - hideLabel: true - }, - defaultType: 'checkbox', - items: [{ - scope: this, - checked: (this.userConf.conf_needupdate_scrollbars === "true") ? true : false, - boxLabel: _('Synchronize scroll bars'), - name: 'conf_needupdate_scrollbars', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_needupdate_scrollbars', f.getValue()); - } - } - },{ - scope: this, - checked: (this.userConf.conf_needupdate_displaylog === "true") ? true : false, - boxLabel: _('Automatically load the log when displaying the file'), - name: 'conf_needupdate_displaylog', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_needupdate_displaylog', f.getValue()); - } - } - }] - }] + WinConf : function() + { + new ui.component.EditorConf() + .show(Ext.get('winconf-btn')); - }, { - id: 'conf-card-3', - xtype: 'form', - bodyStyle: 'padding: 10px;', - items: [{ - xtype: 'fieldset', - title: _('Error type'), - autoHeight: true, - defaults: { - hideLabel: true - }, - defaultType: 'checkbox', - items: [{ - scope: this, - checked: (this.userConf.conf_error_skipnbliteraltag === "true") ? true : false, - boxLabel: _('Skip nbLiteralTag error'), - name: 'conf_error_skipnbliteraltag', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_error_skipnbliteraltag', f.getValue()); - } - } - }] - }, { - xtype: 'fieldset', - title: _('Editor'), - autoHeight: true, - defaults: { - hideLabel: true - }, - defaultType: 'checkbox', - items: [{ - scope: this, - checked: (this.userConf.conf_error_scrollbars === "true") ? true : false, - boxLabel: _('Synchronize scroll bars'), - name: 'conf_error_scrollbars', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_error_scrollbars', f.getValue()); - } - } - },{ - scope: this, - checked: (this.userConf.conf_error_displaylog === "true") ? true : false, - boxLabel: _('Automatically load the log when displaying the file'), - name: 'conf_error_displaylog', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_error_displaylog', f.getValue()); - } - } - }] - }] - }, { - id: 'conf-card-4', - xtype: 'form', - bodyStyle: 'padding: 10px;', - items: [{ - xtype: 'fieldset', - title: _('Editor'), - autoHeight: true, - defaults: { - hideLabel: true - }, - defaultType: 'checkbox', - items: [{ - scope: this, - checked: (this.userConf.conf_reviewed_scrollbars === "true") ? true : false, - boxLabel: _('Synchronize scroll bars'), - name: 'conf_reviewed_scrollbars', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_reviewed_scrollbars', f.getValue()); - } - } - },{ - scope: this, - checked: (this.userConf.conf_reviewed_displaylog === "true") ? true : false, - boxLabel: _('Automatically load the log when displaying the file'), - name: 'conf_reviewed_displaylog', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_reviewed_displaylog', f.getValue()); - } - } - }] - }] - }, { - id: 'conf-card-5', - xtype: 'form', - bodyStyle: 'padding: 10px;', - items: [{ - xtype: 'fieldset', - title: _('Editor'), - autoHeight: true, - defaults: { - hideLabel: true - }, - defaultType: 'checkbox', - items: [{ - scope: this, - checked: (this.userConf.conf_allfiles_displaylog === "true") ? true : false, - boxLabel: _('Automatically load the log when displaying the file'), - name: 'conf_allfiles_displaylog', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_allfiles_displaylog', f.getValue()); - } - } - }] - }] - }, { - id: 'conf-card-6', - xtype: 'form', - bodyStyle: 'padding: 10px;', - items: [{ - xtype: 'fieldset', - title: _('Editor'), - autoHeight: true, - defaults: { - hideLabel: true - }, - defaultType: 'checkbox', - items: [{ - scope: this, - checked: (this.userConf.conf_patch_scrollbars === "true") ? true : false, - boxLabel: _('Synchronize scroll bars'), - name: 'conf_patch_scrollbars', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_patch_scrollbars', f.getValue()); - } - } - }, { - scope: this, - checked: (this.userConf.conf_patch_displaylog === "true") ? true : false, - boxLabel: _('Automatically load the log when displaying the file'), - name: 'conf_patch_displaylog', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_patch_displaylog', f.getValue()); - } - } - }] - }] - }] - }], - buttons: [{ - text: _('Close'), - handler: function(){ - winConf.hide(); - } - }] - }); - } - winConf.show(Ext.get('winconf-btn')); }, //WinConf - confUpdate: function(item, v){ + confUpdate: function(item, v) + { // Apply modification in DB XHR({ scope : this, @@ -3190,6 +2498,9 @@ success : function(response) { // Update userConf object + if (item === "conf_theme") { + this.userConf.conf_theme = v; + } if (item === "conf_needupdate_diff") { this.userConf.conf_needupdate_diff = v; } @@ -3230,8 +2541,8 @@ } } }); - }, //confUpdate + WinAbout: function(){ var winAbout; http://cvs.php.net/viewvc.cgi/doc-editor/js/main_min.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/main_min.js diff -u doc-editor/js/main_min.js:1.2 doc-editor/js/main_min.js:1.3 --- doc-editor/js/main_min.js:1.2 Sun Mar 29 02:44:06 2009 +++ doc-editor/js/main_min.js Tue Jun 2 05:08:35 2009 @@ -1 +1 @@ -var phpDoc=function(){Ext.QuickTips.init();Ext.BLANK_IMAGE_URL="/extjs/resources/images/default/s.gif";return{TaskPing:"",storeCommitLogMessage:"",storeFilesError:"",storeFilesNeedUpdate:"",storeFilesNeedReviewed:"",storePendingCommit:"",storePendingPatch:"",storeMailing:"",storeBugs:"",storeTranslators:"",storeSummary:"",userLoggin:"",userLang:"",appName:"PhpDocumentation Online Editor",appVer:"0.2",userConf:{conf_needupdate_diff:"using-exec",conf_needupdate_scrollbars:true,conf_error_skipnbliteraltag:true,conf_error_scrollbars:true,conf_reviewed_scrollbars:true,conf_patch_scrollbars:true,conf_theme:"xtheme-default.css"},treeAllFiles:"",treeSort:"",treeAllFilesRoot:"",filePendingOpen:"",init:function(){Ext.getBody().on("contextmenu",function(a){a.stopEvent()},this);Ext.Ajax.request({scope:this,url:"./php/controller.php",params:{task:"get-conf"},success:function(a){var b=Ext.util.JSON.decode(a.responseText);if(b.success){this.userLoggin=b.mess.userLoggin;this.userLang=b.mes! s.userLang;this.userConf.conf_needupdate_diff=b.mess.userConf.conf_needupdate_diff;this.userConf.conf_needupdate_scrollbars=b.mess.userConf.conf_needupdate_scrollbars;this.userConf.conf_error_skipnbliteraltag=b.mess.userConf.conf_error_skipnbliteraltag;this.userConf.conf_error_scrollbars=b.mess.userConf.conf_error_scrollbars;this.userConf.conf_reviewed_scrollbars=b.mess.userConf.conf_reviewed_scrollbars;this.userConf.conf_theme=b.mess.userConf.conf_theme;Ext.util.CSS.swapStyleSheet("appTheme",this.userConf.conf_theme);this.loadDataStore();this.drawInterface()}}})},loadDataStore:function(){this.storeCommitLogMessage=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-commit-log-message"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"text",mapping:"text"}])});this.storeFilesError=new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/cont! roller.php"}),baseParams:{task:"GetFilesError"},reader:new Ext.data.Js onReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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()}}});this.storeFilesNeedUpdate=new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"GetFilesNeedUpdate"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"revision",mapping:"revision"},{name:"en_revision",mapping:"en_revision"},{name:"maintainer",mapping:"maintainer"},{name:"needcommit",mapping:"needcommit"},{name:"isCritical",map! ping:"isCritical"}]),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-need-update-nb").innerHTML=a.getCount()}}});this.storePendingCommit=new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"GetFilesPendingCommit"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"by",mapping:"by"},{name:"date",mapping:"date"}]),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()},add:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()}}});this.storePendingPatch=new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"GetFilesPendingPatch"},reader:new Ext.data.JsonReader({root! :"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{n ame:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"by",mapping:"by"},{name:"uniqID",mapping:"uniqID"},{name:"date",mapping:"date"}]),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()},add:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()}}});this.storeFilesNeedReviewed=new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"GetFilesNeedReviewed"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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()}}});this.stor! eMailing=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-mailing-info"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});this.storeMailing.setDefaultSort("pubDate","desc");this.storeBugs=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-open-bugs"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"title",mapping:"title"},{name:"link",mapping:"link"},{name:"description",mapping:"description"}])});this.storeTranslators=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-translator-info"},reader:new Ext.data.JsonReader({root:"Items",totalPr! operty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"name",mappi ng:"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"}])});this.storeTranslators.setDefaultSort("nick","asc");this.storeSummary=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-summary-info"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"libel",mapping:"libel"},{name:"nbFiles",mapping:"nbFiles"},{name:"percentFiles",mapping:"percentFiles"},{name:"sizeFiles",mapping:"sizeFiles"},{name:"percentSize",mapping:"percentSize"}])})},openFile:function(d,a){Ext.getCmp("acc-all-files").expand();var c=d.split("/");function b(f,e){f.expand(false,true,function(h){var g;h.ensureVisible();if(c[0]&&c[0]!==""){for(g=0;g<h.childNodes.length;g=g+1){if(h.childNodes[g].tex! t===c[0]){c.shift();b(h.childNodes[g],e)}}}else{for(g=0;g<h.childNodes.length;g=g+1){if(h.childNodes[g].text===a){h.childNodes[g].ensureVisible();h.childNodes[g].ui.highlight();e.treeAllFiles.fireEvent("dblclick",h.childNodes[g])}}}})}b(this.treeAllFilesRoot,this)},rejectPatch:function(f,d,a,e,g,c){function b(h){if(h==="yes"){var i=Ext.MessageBox.wait("Please, wait...");Ext.Ajax.request({scope:c,url:"../php/controller.php",params:{task:"after-patch-reject",PatchUniqID:e},success:function(){this.storePendingPatch.remove(this.storePendingPatch.getAt(g));this.storePendingPatch.fireEvent("add",this.storePendingPatch);Ext.getCmp("main-panel").remove("PP-"+f);i.hide()}})}}Ext.MessageBox.confirm("Confirm","This action will <b>reject</b> this patch, send an email to his author and close this tab.",b,c)},saveFileViaPatch:function(e,c,a,d,g,b){function f(h){if(h==="yes"){Ext.getCmp("PP-PATCH-PANEL-btn-save-"+e).disable();Ext.getCmp("PP-PATCH-"+e).isModified=false;Ext.getCmp("PP-PATCH! -PANEL-"+e).setTitle(Ext.getCmp("PP-PATCH-PANEL-"+e).originTitle);Ext. getCmp("PP-"+e).setTitle(Ext.getCmp("PP-"+e).originTitle);var i=Ext.MessageBox.wait("Saving data...");Ext.Ajax.request({scope:b,url:"../php/controller.php",params:{task:"save-file",filePath:c,fileName:a,fileLang:"all",fileContent:Ext.getCmp("PP-PATCH-"+e).getCode()},success:function(k,j){var l=Ext.util.JSON.decode(k.responseText);if(l.success){this.addToPendingCommit(c,a);this.storePendingPatch.remove(this.storePendingPatch.getAt(g));this.storePendingPatch.fireEvent("add",this.storePendingPatch);Ext.Ajax.request({scope:b,url:"../php/controller.php",params:{task:"after-patch-accept",PatchUniqID:d}});i.hide();Ext.getCmp("main-panel").remove("PP-"+e)}}})}}Ext.MessageBox.confirm("Confirm","This action will accept this patch, send an email to his author, save the file and close this tab.",f,b)},saveEnFile:function(e,c,a,d,g,b){Ext.getCmp(d+"-EN-PANEL-btn-save-"+e).disable();Ext.getCmp(d+"-"+e).isModifiedEn=false;Ext.getCmp(d+"-EN-PANEL-"+e).setTitle(Ext.getCmp(d+"-EN-PANEL-"+e).o! riginTitle);if(!Ext.getCmp(d+"-"+e).isModifiedEn&&!Ext.getCmp(d+"-"+e).isModifiedLang){Ext.getCmp(d+"-"+e).setTitle(Ext.getCmp(d+"-"+e).originTitle)}var f=Ext.MessageBox.wait("Saving data...");Ext.Ajax.request({scope:b,url:"../php/controller.php",params:{task:"save-file",filePath:c,fileName:a,fileLang:"en",fileContent:Ext.getCmp(d+"-EN-"+e).getCode()},success:function(i,h){var j=Ext.util.JSON.decode(i.responseText);if(j.success){if(d==="FNU"){this.storeFilesNeedUpdate.getAt(g).set("en_revision","1."+j.en_revision);this.storeFilesNeedUpdate.getAt(g).set("needcommit",true)}if(d==="FE"){this.storeFilesError.getAt(g).set("needcommit",true)}if(d==="FNR"){this.storeFilesNeedReviewed.getAt(g).set("needcommit",true)}this.addToPendingCommit("en"+c,a);f.hide()}}})},savePatch:function(d,g,a,c,h,i){var b,f,e;if(d==="en"){b="-EN"}else{if(d==="all"){b=""}else{b="-LANG"}}if(i.userLoggin!=="cvsread"){f=i.userLoggin+"@php.net"}e=new Ext.Window({title:"Do you want to be alerted ?",iconCls:"p! atchAlert",width:350,height:150,resizable:false,modal:true,autoScroll: true,bodyStyle:"padding: 5px;",layout:"form",labelWidth:50,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."},{xtype:"textfield",fieldLabel:"Email",name:"patch-email-alert",anchor:"100%",value:f}],buttons:[{text:"Save",handler:function(){var j,k;j=this.ownerCt.items.items[1].getValue();k=Ext.MessageBox.wait("Saving data as a patch...");e.close();if(d!=="all"){Ext.getCmp(h+b+"-PANEL-btn-saveas-"+g).disable();Ext.getCmp(h+b+"-"+g).isModifiedLang=false;Ext.getCmp(h+b+"-PANEL-"+g).setTitle(Ext.getCmp(h+b+"-PANEL-"+g).originTitle);Ext.getCmp(h+"-"+g).setTitle(Ext.getCmp(h+"-"+g).originTitle)}else{Ext.getCmp("AF-PANEL-btn-saveas-"+g).disable();Ext.getCmp("AF-FILE-"+g).isModified=false;Ext.getCmp("AF-PANEL-"+g).setTitle(Ext.getCmp("AF-PANEL-"+g).originTitle);Ext.getCmp("AF-"+g).setTitle(Ext.getCmp("AF-"+g).originTitle)}Ext.Ajax.request({scope:i,ur! l:"../php/controller.php",params:{task:"save-file",filePath:a,fileName:c,fileLang:d,fileContent:(d!=="all")?Ext.getCmp(h+b+"-"+g).getCode():Ext.getCmp("AF-FILE-"+g).getCode(),type:"patch",emailAlert:j},success:function(m,l){var n=Ext.util.JSON.decode(m.responseText);if(n.success){if(d!=="all"){this.addToPendingPatch(d+a,c,n.uniqID)}else{this.addToPendingPatch(a,c,n.uniqID)}k.hide()}}})}},{text:"Cancel",handler:function(){e.close()}}]});e.show()},saveLangFile:function(f,d,b,e,g,c){function a(h){if(h==="no"){Ext.getCmp(e+"-LANG-PANEL-btn-save-"+f).disable();Ext.getCmp(e+"-"+f).isModifiedLang=false;Ext.getCmp(e+"-LANG-PANEL-"+f).setTitle(Ext.getCmp(e+"-LANG-PANEL-"+f).originTitle);if(!Ext.getCmp(e+"-"+f).isModifiedEn&&!Ext.getCmp(e+"-"+f).isModifiedLang){Ext.getCmp(e+"-"+f).setTitle(Ext.getCmp(e+"-"+f).originTitle)}var i=Ext.MessageBox.wait("Saving data...");Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"save-file",filePath:d,fileName:b,fileLang:this.us! erLang,fileContent:Ext.getCmp(e+"-LANG-"+f).getCode()},success:functio n(k,j){var l=Ext.util.JSON.decode(k.responseText);if(l.success){if(e==="FE"){this.storeFilesError.getAt(g).set("needcommit",true);this.storeFilesError.getAt(g).set("maintainer",l.maintainer)}if(e==="FNU"){this.storeFilesNeedUpdate.getAt(g).set("revision","1."+l.new_revision);this.storeFilesNeedUpdate.getAt(g).set("needcommit",true);this.storeFilesNeedUpdate.getAt(g).set("maintainer",l.maintainer)}if(e==="FNR"){this.storeFilesNeedReviewed.getAt(g).set("needcommit",true);this.storeFilesNeedReviewed.getAt(g).set("maintainer",l.maintainer);this.storeFilesNeedReviewed.getAt(g).set("reviewed",l.reviewed)}this.addToPendingCommit(this.userLang+d,b);i.hide()}}})}else{if(h==="yes"){Ext.getBody().mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Checking for error. Please, wait...');Ext.getCmp(e+"-LANG-PANEL-btn-save-"+f).disable();Ext.getCmp(e+"-"+f).isModifiedLang=false;Ext.getCmp(e+"-LANG-PANEL-"+f).setTitle(Ext.getCmp(e+"-LANG-PANEL-"+f).originTitle);if(!Ext.getC! mp(e+"-"+f).isModifiedEn&&!Ext.getCmp(e+"-"+f).isModifiedLang){Ext.getCmp(e+"-"+f).setTitle(Ext.getCmp(e+"-"+f).originTitle)}Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"check-file-error",FilePath:d,FileName:b,FileLang:this.userLang,FileContent:Ext.getCmp(e+"-LANG-"+f).getCode()},success:function(k,j){Ext.getBody().unmask();var l=Ext.util.JSON.decode(k.responseText);if(l.success){if(l.error&&l.error_first!=="-No error-"){Ext.getCmp("main-panel").add({closable:true,title:"Error in "+b,iconCls:"FilesError",id:"FE-help-"+f,autoScroll:true,autoLoad:"/error_type.php?dir="+d+"&file="+b});Ext.getCmp("main-panel").setActiveTab("FE-help-"+f);this.storeFilesError.reload()}else{Ext.MessageBox.show({title:"Check for errors",msg:"There is no error.",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO})}Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"save-file",filePath:d,fileName:b,fileLang:this.userLang,fileContent:Ext.getCmp(e+"-LANG-"+f! ).getCode()},success:function(n,m){var p=Ext.util.JSON.decode(n.respon seText);if(p.success){if(e==="FE"){this.storeFilesError.getAt(g).set("needcommit",true);this.storeFilesError.getAt(g).set("maintainer",p.maintainer)}if(e==="FNU"){this.storeFilesNeedUpdate.getAt(g).set("revision","1."+p.new_revision);this.storeFilesNeedUpdate.getAt(g).set("needcommit",true);this.storeFilesNeedUpdate.getAt(g).set("maintainer",p.maintainer)}if(e==="FNR"){this.storeFilesNeedReviewed.getAt(g).set("needcommit",true);this.storeFilesNeedReviewed.getAt(g).set("maintainer",p.maintainer);this.storeFilesNeedReviewed.getAt(g).set("reviewed",p.reviewed)}this.addToPendingCommit(this.userLang+d,b)}}});if(e==="FE"){Ext.getCmp(e+"-error-type-"+f).setSrc("/error_type.php?dir="+d+"&file="+b+"&nocache="+new Date().getTime())}}}})}}}Ext.MessageBox.show({scope:c,title:"Confirm",msg:"Do you want to check for error before saving ?",icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,fn:a})},getFile:function(e,d,a,c,b){Ext.get(c+e).mask('<img src="/img/loading.gif" style="ve! rtical-align: middle;" /> Loading...');Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"get-file",FilePath:d,FileName:a},success:function(h,g){var i,f;i=Ext.util.JSON.decode(h.responseText);if(i.success){Ext.getCmp(b+e).setCode(i.content);Ext.get(c+e).unmask();if(c==="FE-LANG-PANEL-"||c==="FNR-LANG-PANEL-"||c==="FNR-EN-PANEL-"||c==="AF-PANEL-"){f=Ext.getCmp(c+e).getSize();f.height=f.height+1;Ext.getCmp(c+e).setSize(f);Ext.getCmp(c+e).fireEvent("resize")}}},callback:function(){if(this.filePendingOpen[0]){this.filePendingOpen.shift();if(this.filePendingOpen[0]){if(this.filePendingOpen[0][0]){this.openFile(this.filePendingOpen[0][0],this.filePendingOpen[0][1])}}}}})},addToPendingPatch:function(b,a,e){var d,c;d=new Date();c=new this.storePendingPatch.recordType({id:Ext.id("",""),path:b,name:a,by:this.userLoggin,uniqID:e,date:d.format("Y-m-d H:i:s")});this.storePendingPatch.insert(0,c)},addToPendingCommit:function(d,a){var c,e,b;c=false;this.storePendingCom! mit.each(function(f){if(f.data.path===d&&f.data.name===a){c=true}});if (!c){e=new Date();b=new this.storePendingCommit.recordType({id:Ext.id("",""),path:d,name:a,by:this.userLoggin,date:e.format("Y-m-d H:i:s")});this.storePendingCommit.insert(0,b)}},rendererNumUptodate:function(a){if(a==="0"){return}else{return'<span style="color:green; font-weight: bold;">'+a+"</span>"}},rendererNumCritical:function(a){if(a==="0"){return}else{return'<span style="color:red; font-weight: bold;">'+a+"</span>"}},rendererTotalTranslator:function(a,c,b){return a?((a===0||a>1)?"("+a+" Translators)":"(1 Translator)"):""},rendererSum:function(a){return(a==="0")?"":a},NewTabBugs:function(a,b,c){Ext.getCmp("main-panel").add({xtype:"iframepanel",id:"mifp_bugs_"+a,title:"Loading...",tabTip:c,iconCls:"iconBugs",loadMask:true,defaultSrc:b,listeners:{documentloaded:function(d){d.ownerCt.setTitle(Ext.util.Format.substr(c,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_bugs_"+a)},NewTabMailing:function(a,c,b){Ext.getCmp("main-panel").add({xtype:"iframepanel",id:"mi! fp_"+a,title:"Loading...",tabTip:b,iconCls:"home-mailing-title",loadMask:true,defaultSrc:c,listeners:{documentloaded:function(d){d.ownerCt.setTitle(Ext.util.Format.substr(b,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_"+a)},winDiff:function(d,b,c,a){Ext.getBody().mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Finding the diff. Please, wait...');Ext.Ajax.request({url:"./php/controller.php",params:{task:"get-diff2",FilePath:d,FileName:b,Rev1:c,Rev2:a},success:function(f){var g,e;g=Ext.util.JSON.decode(f.responseText);if(g.success){Ext.getBody().unmask();e=new Ext.Window({title:"Diff between "+c+" & "+a,width:650,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:'<div class="diff-content">'+g.content+"</div>",buttons:[{text:"Close",handler:function(){e.close()}}]});e.show()}},failure:function(){}})},removeTabEvent:function(d,e){var b,c,f,a;a=e.id.split("-");if((a[0]==="FE"||a[0]==! ="FNU"||a[0]==="FNR"||a[0]==="PP")&&a[1]!=="help"){if(a[0]==="FE"){b=E xt.getCmp("FE-"+a[1]).isModifiedLang}if(a[0]==="FNU"){b=Ext.getCmp("FNU-"+a[1]).isModifiedLang}if(a[0]==="FNR"){b=Ext.getCmp("FNR-"+a[1]).isModifiedLang}if(a[0]==="FE"){c=Ext.getCmp("FE-"+a[1]).isModifiedEn}if(a[0]==="FNU"){c=Ext.getCmp("FNU-"+a[1]).isModifiedEn}if(a[0]==="FNR"){c=Ext.getCmp("FNR-"+a[1]).isModifiedEn}if(a[0]==="PP"){f=Ext.getCmp("PP-PATCH-"+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)}}})}else{return true}return false}else{return true}},WinCommit:function(i,h,e){var f,c,g,a,b,d;c=Ext.get("acc-need-update");if(!f){f=new Ext.Window({scope:this,id:"winCvsCommit",title:"CVS commit",closable:false,layout:"form",width:400,height:480,resizable:false,modal:true,bodyStyle! :"padding:5px 5px 0",labelAlign:"top",items:[{xtype:"checktreepanel",id:"tree-panel",anchor:"100%",height:180,autoScroll:true,rootVisible:false,root:{text:"root",expanded:true,children:[]}},{scope:this,xtype:"combo",fieldLabel:"Older messages",editable:false,name:"first2",anchor:"100%",store:this.storeCommitLogMessage,triggerAction:"all",tpl:'<tpl for="."><div class="x-combo-list-item">{[values.text.split("\n").join("<br/>")]}</div></tpl>',valueField:"id",displayField:"text",listeners:{scope:this,render:function(){this.storeCommitLogMessage.load()},select:function(l,j,k){Ext.getCmp("form-commit-message-log").setValue(j.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 m,k,l;function j(n){return n.split("\n").join("<br/>")}m=new Ext.form.TextArea({grow:true,growMin:120});k=new Ext.grid.ColumnModel([new Ext.grid.! RowNumberer(),{id:"GridManageLog",header:"Log Message",dataIndex:"text ",renderer:j,editor:new Ext.Editor(m,{shadow:false,autoSize:true,listeners:{scope:this,complete:function(p,q,o){var n=p.record.data.id;Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"save-LogMessage",messID:n,mess:q},success:function(s,r){var t=Ext.util.JSON.decode(s.responseText);if(t.success){this.storeCommitLogMessage.getById(n).commit()}}})}}})}]);l=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:k,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),autoExpandColumn:"GridManageLog",listeners:{scope:this,rowcontextmenu:function(n,q,o){o.stopEvent();n.getSelectionModel().selectRow(q);var p=new Ext.menu.Menu({items:[{text:"Delete this Log Message",iconCls:"iconDelete",scope:this,handler:function(){Ext.Ajax.request({scope:this,url:"../php/co! ntroller.php",params:{task:"delete-LogMessage",messID:this.storeCommitLogMessage.getAt(q).data.id},success:function(s,r){var t=Ext.util.JSON.decode(s.responseText);if(t.success){this.storeCommitLogMessage.remove(this.storeCommitLogMessage.getAt(q))}}})}}]});p.showAt(o.getXY())}}}],buttons:[{text:"Close",handler:function(){l.close()}}],listeners:{scope:this,close:function(){this.storeCommitLogMessage.reload()}}});l.show()}}],buttons:[{scope:this,text:"Submit",id:"win-commit-btn-submit",handler:function(){var j,n,q,s,k,l,o=[],r,p="",m;if(this.userLoggin==="cvsread"){f.close();Ext.MessageBox.show({title:"Cvsread restriction",msg:"You are logging in with Cvsread account.<br><br>You can't commit anything with this account.",icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.OK});return}j=Ext.getCmp("tree-panel").getValue();n=[];for(m=0;m<j.length;m=m+1){q=Ext.getCmp("tree-panel").getNodeById(j[m]).attributes;s="FE-"+Ext.util.md5("FE-"+q.FilePath+q.FileName);k="FNU-"+Ext.util.md5("F! NU-"+q.FilePath+q.FileName);l="FNR-"+Ext.util.md5("FNR-"+q.FilePath+q. FileName);if(Ext.getCmp("main-panel").findById(s)||Ext.getCmp("main-panel").findById(k)||Ext.getCmp("main-panel").findById(l)){if(Ext.getCmp("main-panel").findById(s)){r=s}if(Ext.getCmp("main-panel").findById(k)){r=k}if(Ext.getCmp("main-panel").findById(l)){r=l}o[0]=r;o[1]=q.FileName;n.push(o)}}if(n.length>0){for(m=0;m<n.length;m=m+1){p+=n[m][1]+"<br>"}Ext.MessageBox.show({scope:this,title:"Warning",msg:"There is "+n.length+" file"+((n.length>1)?"s":"")+" to close before commit.<br><br>"+p+"<br><br>Would you like I close it for you ?",icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,fn:function(t){if(t==="yes"){for(m=0;m<n.length;m=m+1){Ext.getCmp("main-panel").remove(n[m][0])}this.WinCommitLastStep(j,this)}else{return}}})}else{this.WinCommitLastStep(j,this)}return}},{text:"Close",id:"win-commit-btn-close",handler:function(){f.close()}}]})}f.show(c);if(i){a=this.storePendingCommit.getAt(h).data.path;b=this.storePendingCommit.getAt(h).data.name;g=Ext.util.md5(a+b);! d=new Ext.tree.TreeNode({id:"need-commit-"+g,text:a+b,FilePath:a,FileName:b,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(d)}else{this.storePendingCommit.each(function(j){if(e&&e==="by me"&&j.data.by!==this.userLoggin){}else{a=j.data.path;b=j.data.name;g=Ext.util.md5(a+b);d=new Ext.tree.TreeNode({id:"need-commit-"+g,text:a+b,FilePath:a,FileName:b,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(d)}},this)}},WinCommitLastStep:function(g,d){Ext.getBody().mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Please, wait until commit...');var a=[],f,c,e,b;for(b=0;b<g.length;b=b+1){f=Ext.getCmp("tree-panel").getNodeById(g[b]);c=[];c[0]=f.attributes.FilePath;c[1]=f.attributes.FileName;a.push(c)}e=Ext.getCmp("form-commit-message-log").getValue();Ext.getCmp("winCvsCommit").close();Ext.Ajax.request({url:"../php/controller.php",params:! {task:"cvs-commit",nodes:Ext.util.JSON.encode(a),logMessage:e},success :function(i){var j,h;j=Ext.util.JSON.decode(i.responseText);if(j.success){Ext.getBody().unmask();h=new Ext.Window({title:"Status",width:450,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:j.mess.join("<br>"),buttons:[{text:"Close",handler:function(){h.close()}}]});h.show();Ext.Ajax.request({url:"../php/controller.php",params:{task:"on-succes-commit",nodes:Ext.util.JSON.encode(a),logMessage:e},success:function(k){d.storeFilesError.reload();d.storeFilesNeedReviewed.reload();d.storeFilesNeedUpdate.reload();d.storePendingCommit.reload();d.storeTranslators.reload();d.storeSummary.reload()}})}else{}}})},WinUpdate:function(){var e,d;function c(f){f.TaskPing.cancel();Ext.get("wizard-step-1").replaceClass("wizard-step-before","wizard-step-working");Ext.get("wizard-step-1.1").replaceClass("wizard-wait","wizard-show");Ext.Ajax.request({scope:f,url:"../php/controller.php",params:{task:"update-repo"},success:function(g){var h=! Ext.util.JSON.decode(g.responseText);if(h.success){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(){function h(){Ext.Ajax.request({scope:f,url:"../php/controller.php",params:{task:"check-lock-file",lockFile:"lock_update_repository"},success:function(i){var j=Ext.util.JSON.decode(i.responseText);if(!j.success){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)}},failure:function(){g.delay(5000)}})}var g=new Ext.util.DelayedTask(function(){h()});g.delay(5000)}})}function b(f){Ext.get("wizard-step-2").replaceClass("wizard-step-before","wizard-step-working");Ext.Ajax.request({scope:f,url:"../php/controller.php",params:{task:"apply-tools"},success:function(g){var h=Ext.util.JSON.decode(g.responseText);if(h.success){Ext.get("wizard-s! tep-2").replaceClass("wizard-step-working","wizard-step-done");a(this) }},failure:function(){function h(){Ext.Ajax.request({scope:f,url:"../php/controller.php",params:{task:"check-lock-file",lockFile:"lock_apply_tools"},success:function(i){var j=Ext.util.JSON.decode(i.responseText);if(!j.success){Ext.get("wizard-step-2").replaceClass("wizard-step-working","wizard-step-done");a(this)}else{g.delay(5000)}},failure:function(){g.delay(5000)}})}var g=new Ext.util.DelayedTask(function(){h()});g.delay(5000)}})}function a(f){Ext.get("wizard-step-3").replaceClass("wizard-step-before","wizard-step-working");f.storeFilesNeedUpdate.reload();f.storeTranslators.reload();f.storeFilesError.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();f.TaskPing.delay(30000);e.tools.close.setVisible(true)}d=Ext.get("ac! c-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);c(this)}}]})}e.show(d)},WinCheckBuild:function(){var c,a;a=Ext.get("acc-need-update");function b(d){Ext.Ajax.request({scope:d,url:"./php/controller.php",params:{task:"get-logfile",file:"log_check_build"},success:function(f){var g,e;g=Ext.util.JSON.decode(f.responseText);if(g.success){this.TaskPing.delay(! 30000);e=new Ext.Window({title:"Status",width:450,height:350,resizable :false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:g.mess,buttons:[{text:"Close",handler:function(){e.close()}}]});e.show()}}})}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="/img/loading.gif" style="vertical-align: middle;" /> Please, wait until the build is checked...');this.TaskPing.cancel();Ext.Ajax.request({scope:this,url:"./php/controller.php",params:{task:"check-build",xmlDetails:d},success:function(e){var f=Ext.util.JSON.decode(e.responseText);if(f.success){Ext.getBody().unmask();b(this)}},failure:function(g){function e(){Ext.Ajax.request({url:"../php/controller.php",params:{task:"check-lock-file",lockFile:"lock_check_build"},success:f! unction(h){var i=Ext.util.JSON.decode(h.responseText);if(!i.success){Ext.getBody().unmask();b()}else{f.delay(5000)}},failure:function(){f.delay(5000)}})}var f=new Ext.util.DelayedTask(function(){e()});f.delay(5000)}})}}],items:[{xtype:"panel",baseCls:"x-plain",bodyStyle:"padding:5px 5px 0",html:"You're about to check the build via this command :<br/><br/>/usr/bin/php configure.php --with-lang="+this.userLang+"<br><br>",modal:false},{xtype:"checkbox",hideLabel:true,checked:false,boxLabel:"Enable detailed XML error messages",name:"option-xml-details",id:"option-xml-details"}]})}c.show(a)},WinConf:function(){var a,c,e,d,b;if(!a){b=new Ext.XTemplate('<tpl for=".">','<div class="thumb-wrap" id="tplMenu-{id}">','<div class="thumb"><img src="/img/{img}" title=""></div>',"<span>{label}</span></div>","</tpl>");b.compile();d=[["1","go-home.png","Main"],["2","edit-redo.png",'Module "Files Need Update"'],["3","dialog-cancel.png",'Module "Files with Error"'],["4","document-properties.pn! g",'Module "Files need Reviewed"'],["5","view-media-playlist.png",'Mod ule "Pending Patch"']];e=new Ext.data.SimpleStore({id:0,fields:[{name:"id"},{name:"img"},{name:"label"}]});e.loadData(d);c=new Ext.DataView({tpl:b,singleSelect:true,overClass:"x-view-over",itemSelector:"div.thumb-wrap",store:e,listeners:{selectionchange:function(f,g){var h=f.getSelectedRecords();Ext.getCmp("confCard").layout.setActiveItem("conf-card-"+h[0].data.id)}}});a=new Ext.Window({scope:this,layout:"border",width:550,height:400,iconCls:"iconConf",modal:true,title:"Configuration",plain:true,closeAction:"hide",listeners:{show:function(){c.select(c.getNode(0))}},items:[{scope:this,region:"west",width:190,id:"confMenu",autoScroll:true,items:c},{scope:this,layout:"slide",region:"center",id:"confCard",width:375,frame:true,activeItem:0,bbar:new Ext.StatusBar({defaultText:"All changes take effect immediately",defaultIconCls:"confStatusBar"}),items:[{scope:this,id:"conf-card-1",xtype:"form",bodyStyle:"padding: 10px;",items:[{xtype:"fieldset",title:"Themes",autoHeight:true,defau! lts:{hideLabel:true},items:[{xtype:"combo",store:new Ext.data.SimpleStore({fields:["themeFile",{name:"themeName",type:"string"}],data:[["/themes/black/css/xtheme-black.css","Black"],["xtheme-default.css","Default"],["/themes/darkgray/css/xtheme-darkgray.css","DarkGray"],["/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"],["/extjs/resources/css/xtheme-slate.css","Slate"],["/themes/silverCherry/css/xtheme-silverCherry.css","SilverCherry"]]}),valueField:"themeFile",displayField:"themeName",triggerAction:"all",mode:"local",forceSelection:true,editable:false,fieldLabel:"fieldlabel",value:this.userConf.conf_theme,listeners:{scope:this,select:function(h,f,g){Ext.util.CSS.swapStyleSheet("appTheme",h.getValue());this.confUp! date("conf_theme",h.getValue())}}}]}]},{scope:this,id:"conf-card-2",xt ype:"form",bodyStyle:"padding: 10px;",items:[{xtype:"fieldset",title:"Diff view",autoHeight:true,defaults:{hideLabel:true},defaultType:"radio",items:[{scope:this,checked:(this.userConf.conf_needupdate_diff==="using-viewvc")?true:false,boxLabel:"Using ViewVc from php web site",name:"conf_needupdate_diff",inputValue:"using-viewvc",listeners:{scope:this,check:function(g){if(g.checked){this.confUpdate("conf_needupdate_diff",g.getRawValue())}}}},{checked:(this.userConf.conf_needupdate_diff==="using-exec")?true:false,boxLabel:"Using diff -kk -u command line",name:"conf_needupdate_diff",inputValue:"using-exec",listeners:{scope:this,check:function(g){if(g.checked){this.confUpdate("conf_needupdate_diff",g.getRawValue())}}}}]},{xtype:"fieldset",title:"Editor",autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{scope:this,checked:(this.userConf.conf_needupdate_scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_needupdate_scrollbars",liste! ners:{scope:this,check:function(g){this.confUpdate("conf_needupdate_scrollbars",g.getValue())}}}]}]},{id:"conf-card-3",xtype:"form",bodyStyle:"padding: 10px;",items:[{xtype:"fieldset",title:"Error type",autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{scope:this,checked:(this.userConf.conf_error_skipnbliteraltag==="true")?true:false,boxLabel:"Skip nbLiteralTag error",name:"conf_error_skipnbliteraltag",listeners:{scope:this,check:function(g){this.confUpdate("conf_error_skipnbliteraltag",g.getValue())}}}]},{xtype:"fieldset",title:"Editor",autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{scope:this,checked:(this.userConf.conf_error_scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_error_scrollbars",listeners:{scope:this,check:function(g){this.confUpdate("conf_error_scrollbars",g.getValue())}}}]}]},{id:"conf-card-4",xtype:"form",bodyStyle:"padding: 10px;",items:[{xtype:"fieldset",title:"Editor",autoHeig! ht:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{scope :this,checked:(this.userConf.conf_reviewed_scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_reviewed_scrollbars",listeners:{scope:this,check:function(g){this.confUpdate("conf_reviewed_scrollbars",g.getValue())}}}]}]},{id:"conf-card-5",xtype:"form",bodyStyle:"padding: 10px;",items:[{xtype:"fieldset",title:"Editor",autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{scope:this,checked:(this.userConf.conf_patch_scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_patch_scrollbars",listeners:{scope:this,check:function(g){this.confUpdate("conf_patch_scrollbars",g.getValue())}}}]}]}]}],buttons:[{text:"Close",handler:function(){a.hide()}}]})}a.show(Ext.get("winconf-btn"))},confUpdate:function(b,a){Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"conf-update",item:b,value:a},success:function(c){if(b==="conf_needupdate_diff"){this.userConf.conf_needupdate_diff=a}if(b==="conf_needupdate_sc! rollbars"){this.userConf.conf_needupdate_scrollbars=""+a+""}if(b==="conf_error_skipnbliteraltag"){this.userConf.conf_error_skipnbliteraltag=""+a+"";this.storeFilesError.reload()}if(b==="conf_error_scrollbars"){this.userConf.conf_error_scrollbars=""+a+""}if(b==="conf_reviewed_scrollbars"){this.userConf.conf_reviewed_scrollbars=""+a+""}if(b==="conf_patch_scrollbars"){this.userConf.conf_patch_scrollbars=""+a+""}}})},WinAbout:function(){var a;if(!a){a=new Ext.Window({layout:"fit",width:515,height:320,iconCls:"iconHelp",modal:true,title:"About "+this.appName,closeAction:"hide",plain:true,bodyStyle:"color:#000",items:new Ext.TabPanel({autoTabs:true,activeTab:0,border:false,defaults:{autoScroll:true},items:[{title:"About",html:'<div id="phd-oe-about"><img src="/img/logo.png" alt="'+this.appName+'" /></div><div id="phd-oe-about-info">'+this.appName+" ver "+this.appVer+' (c) 2008-2009, Yannick Torrèss - <a href="mailto:yannick@php.net">yannick@php.net</a></div>'},{title:"Cred! its",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_LGPL_v2.txt"}}]}),buttons:[{text:"Close",handler:function(){a.hide()}}]})}a.show(Ext.get("winabout-btn"))},sendEmail:function(b,a){var c,d;c=new Ext.form.FormPanel({baseCls:"x-plain",labelWidth:55,url:"save-form.php",defaultType:"textfield",items:[{fieldLabel:"Send To",name:"to",readOnly:true,anchor:"100%",value:'"'+b+'" <'+a+">"},{fieldLabel:"Subject",name:"subject",anchor:"100%"},{xtype:"textarea",hideLabel:true,name:"msg",anchor:"100% -53"}]});d=new Ext.Window({title:"Send an email",width:500,height:300,minWidth:300,minHeight:200,layout:"fit",plain:t! rue,bodyStyle:"padding:5px;",buttonAlign:"center",items:c,iconCls:"iconSendEmail",buttons:[{text:"Send",handler:function(){var e=c.getForm().getValues();Ext.Ajax.request({url:"./php/controller.php",params:{task:"send-email",to:e.to,subject:e.subject,msg:e.msg},success:function(f){var g=Ext.util.JSON.decode(f.responseText);if(g.success){d.close();Ext.MessageBox.alert("Status","Email sent to "+b+" with success!")}},failure:function(){}})}},{text:"Cancel",handler:function(){d.close()}}]});d.show()},drawInterface:function(){var j,l,a,c,h,g,f,i,e,k,b,d;this.TaskPing=new Ext.util.DelayedTask(function(){Ext.Ajax.request({url:"./php/controller.php",params:{task:"ping"},success:function(m){if(m.responseText!=="pong"){window.location.href="/login.php"}},failure:function(){window.location.href="/login.php"}});this.TaskPing.delay(30000)},this);this.TaskPing.delay(30000);j=new Ext.grid.GridPanel({store:this.storeFilesError,loadMask:true,columns:[{id:"name",header:"Files",sortable:true,d! ataIndex:"name"},{header:"Maintainer",width:45,sortable:true,dataIndex :"maintainer"},{header:"Type",width:45,sortable:true,dataIndex:"type"},{header:"Path",dataIndex:"path",hidden:true}],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(m,p,o,n){if(m.data.needcommit){return"file-need-commit"}}}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,render:function(m){j.view.refresh()},rowdblclick:function(o,y,u){var n,p,v,t,w,m,s,r,q,z,x;n=this.storeFilesError.getAt(y).data.path;p=this.storeFilesError.getAt(y).data.name;v=Ext.util.md5("FE-"+this.userLang+n+p);t=this.storeFilesError.getAt(y).data.needcommit;if(!Ext.getCmp("main-panel").findById("FE-"+v)){w=[];this.storeFilesError.each(function(A){if(A.data.path===n&&A.data.name===p){if(!w[A.data.type]){w.push(A.data.type)}}});m=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php! /controller.php"}),baseParams:{task:"get-log",Path:this.userLang+n,File:p},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});m.setDefaultSort("date","desc");s=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-log",Path:"en"+n,File:p},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});s.setDefaultSort("date","desc");r=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(B){var A=B.getCount();if(A===2){retur! n false}},rowselect:function(B){var A=B.getCount();if(A===2){Ext.getCm p("FE-PANEL-btn-logLang-"+v).enable();Ext.get("FE-PANEL-btn-logLang-"+v).frame("3F8538")}else{Ext.getCmp("FE-PANEL-btn-logLang-"+v).disable()}},rowdeselect:function(B){var A=B.getCount();if(A===2){Ext.getCmp("FE-PANEL-btn-logLang-"+v).enable();Ext.get("FE-PANEL-btn-logLang-"+v).frame("3F8538")}else{Ext.getCmp("FE-PANEL-btn-logLang-"+v).disable()}}}});q=new Ext.grid.GridPanel({store:m,loadMask:true,columns:[r,{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")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:r,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"FE-PANEL-btn-logLang-"+v,disabled:true,handler:function(){var C,B,A;C=r.getSelections();B=C[0].! data.revision;A=C[1].data.revision;this.winDiff(this.userLang+n,p,B,A)}}]});z=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",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("FE-PANEL-btn-logEn-"+v).enable();Ext.get("FE-PANEL-btn-logEn-"+v).frame("3F8538")}else{Ext.getCmp("FE-PANEL-btn-logEn-"+v).disable()}},rowdeselect:function(B){var A=B.getCount();if(A===2){Ext.getCmp("FE-PANEL-btn-logEn-"+v).enable();Ext.get("FE-PANEL-btn-logEn-"+v).frame("3F8538")}else{Ext.getCmp("FE-PANEL-btn-logEn-"+v).disable()}}}});x=new Ext.grid.GridPanel({store:s,loadMask:true,columns:[z,{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! ")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:z, view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"FE-PANEL-btn-logEn-"+v,disabled:true,handler:function(){var C,B,A;C=z.getSelections();B=C[0].data.revision;A=C[1].data.revision;this.winDiff("en"+n,p,B,A)}}]});Ext.getCmp("main-panel").add({closable:true,title:p,originTitle:p,tabTip:"File with error : in "+n,iconCls:"iconTabError",id:"FE-"+v,isModifiedLang:false,isModifiedEn:false,layout:"border",defaults:{collapsible:true,split:true},items:[{xtype:"panel",layout:"fit",region:"north",title:"Error description",id:"FE-error-desc-"+v,height:150,collapsed:true,items:{xtype:"iframepanel",id:"FE-error-type-"+v,loadMask:true,defaultSrc:"/error_type.php?dir="+n+"&file="+p}},{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:this.userLang,items:[q]},{layout:"f! it",title:"En",items:[x]}]}},{title:this.userLang+" File: "+n+p,originTitle:this.userLang+" File: "+n+p,collapsible:false,id:"FE-LANG-PANEL-"+v,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"FE-LANG-"+v,listeners:{scope:this,initialize:function(A){this.getFile(v,this.userLang+n,p,"FE-LANG-PANEL-","FE-LANG-")},cmcursormove:function(){var A=Ext.util.JSON.decode(Ext.getCmp("FE-LANG-"+v).getCursorPosition());Ext.get("FE-LANG-status-line-"+v).dom.innerHTML=A.line;Ext.get("FE-LANG-status-col-"+v).dom.innerHTML=A.caracter},cmchange:function(D,B,C){var A=Ext.util.JSON.decode(Ext.getCmp("FE-LANG-"+v).getCursorPosition());Ext.get("FE-LANG-status-line-"+v).dom.innerHTML=A.line;Ext.get("FE-LANG-status-col-"+v).dom.innerHTML=A.caracter;if(D!==27&&D!==33&&D!==34&&D!==37&&D!==38&&D!==39&&D!==40&&D!==17&&D!==16&&D!==67){if(!Ext.getCmp("FE-"+v).isModifiedLang){Ext.getCmp("FE-LANG-PANEL-"+v).setTitle(Ext.getCmp("FE-LANG-PANEL-"+v).originTitle+' <span s! tyle="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCm p("FE-"+v).setTitle(Ext.getCmp("FE-"+v).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FE-LANG-PANEL-btn-save-"+v).enable();Ext.get("FE-LANG-PANEL-btn-save-"+v).frame("3F8538");Ext.getCmp("FE-LANG-PANEL-btn-saveas-"+v).enable();Ext.get("FE-LANG-PANEL-btn-saveas-"+v).frame("3F8538");Ext.getCmp("FE-"+v).isModifiedLang=true}}},cmscroll:function(A){if(this.userConf.conf_error_scrollbars==="true"){Ext.getCmp("FE-EN-"+v).scrollTo(A)}}}}],bbar:[{scope:this,xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_error_scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_error_scrollbars",listeners:{scope:this,check:function(A){this.confUpdate("conf_error_scrollbars",A.getValue())},render:function(A){Ext.DomHelper.insertHtml("beforeBegin",A.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">Line: <span id="FE-LANG-status-line-'+v+'">-</span></span> <span class="x-status-te! xt-panel">Col: <span id="FE-LANG-status-col-'+v+'">-</span></span></div> ')}}}],tbar:[{scope:this,tooltip:"<b>Save</b> this file",iconCls:"saveFile",id:"FE-LANG-PANEL-btn-save-"+v,disabled:true,handler:function(){this.saveLangFile(v,n,p,"FE",y,this)}},{scope:this,tooltip:"<b>Save as</b> a patch",iconCls:"saveAsFile",id:"FE-LANG-PANEL-btn-saveas-"+v,disabled:true,handler:function(){this.savePatch(this.userLang,v,n,p,"FE",this)}},"->",{tooltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:function(){Ext.getCmp("FE-LANG-"+v).reIndentAll()}}]},{title:"En File: "+n+p,originTitle:"En File: "+n+p,collapsible:false,id:"FE-EN-PANEL-"+v,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"FE-EN-"+v,listeners:{scope:this,initialize:function(A){this.getFile(v,"en"+n,p,"FE-EN-PANEL-","FE-EN-")},cmchange:function(D,B,C){var A=Ext.util.JSON.decode(Ext.getCmp("FE-EN-"+v).getCursorPosition());Ext.get("FE-EN-status-line-"+v).dom.innerHT! ML=A.line;Ext.get("FE-EN-status-col-"+v).dom.innerHTML=A.caracter;if(D !==27&&D!==33&&D!==34&&D!==37&&D!==38&&D!==39&&D!==40&&D!==17&&D!==16&&D!==67){if(!Ext.getCmp("FE-"+v).isModifiedEn){Ext.getCmp("FE-EN-PANEL-"+v).setTitle(Ext.getCmp("FE-EN-PANEL-"+v).originTitle+' <span style="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCmp("FE-"+v).setTitle(Ext.getCmp("FE-"+v).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FE-EN-PANEL-btn-save-"+v).enable();Ext.get("FE-EN-PANEL-btn-save-"+v).frame("3F8538");Ext.getCmp("FE-EN-PANEL-btn-saveas-"+v).enable();Ext.get("FE-EN-PANEL-btn-saveas-"+v).frame("3F8538");Ext.getCmp("FE-"+v).isModifiedEn=true}}},cmscroll:function(A){if(this.userConf.conf_error_scrollbars==="true"){Ext.getCmp("FE-LANG-"+v).scrollTo(A)}},cmcursormove:function(B){var A=Ext.util.JSON.decode(Ext.getCmp("FE-EN-"+v).getCursorPosition());Ext.get("FE-EN-status-line-"+v).dom.innerHTML=A.line;Ext.get("FE-EN-status-col-"+v).dom.innerHTML=A.caracter}}}],bbar:[{scope:this,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="FE-EN-status-line-'+v+'">-</span></span> <span class="x-status-text-panel">Col: <span id="FE-EN-status-col-'+v+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:"<b>Save</b> this file",iconCls:"saveFile",id:"FE-EN-PANEL-btn-save-"+v,disabled:true,handler:function(){this.saveEnFile(v,n,p,"FE",y,this)}},{scope:this,tooltip:"<b>Save as</b> a patch",iconCls:"saveAsFile",id:"FE-EN-PANEL-btn-saveas-"+v,disabled:true,handler:function(){this.savePatch("en",v,n,p,"FE",this)}},"->",{tooltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:function(){Ext.getCmp("FE-EN-"+v).reIndentAll()}}]}]});Ext.getCmp("main-panel").setActiveTab("FE-"+v);if(Ext.getCmp("FE-"+v).getLayout().north.collapsedEl){Ext.getCmp("FE-"+v).getLayout().north.collapsedEl.addClass("x-layout-collapsed-east-error-desc")}}else{Ext.getCmp("ma! in-panel").setActiveTab("FE-"+v)}},rowcontextmenu:function(o,t,r){var p,m,q,n="",s;o.getSelectionModel().selectRow(t);p=this.storeFilesError.getAt(t).data.path;m=this.storeFilesError.getAt(t).data.name;q=Ext.util.md5("FE-"+p+m);if(this.storeFilesError.getAt(t).data.needcommit){n={text:"View Diff",iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+t,title:"Diff",tabTip:"Diff",closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+t+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+t);Ext.get("diff_panel_"+t).mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Please, Wait...');Ext.Ajax.request({scope:this,url:"./php/controller.php",params:{task:"get-diff",FilePath:this.userLang+p,FileName:m},success:function(u){var v=Ext.util.JSON.decode(u.responseText);if(v.success){Ext.get("diff_content_"+t).dom.innerHTML=v.content;Ext.get("diff_panel_"+t).unmask()}},failure:function(){}})}}}s=new Ext.menu.Menu({items:! [{text:"<b>Edit in a new Tab</b>",iconCls:"FilesError",scope:this,handler:function(){j.fireEvent("rowdblclick",o,t,r)}},n,"-",{text:"About error type",iconCls:"iconHelp",scope:this,handler:function(){Ext.getCmp("main-panel").add({closable:true,title:"About error type",iconCls:"iconHelp",id:"FE-help-"+q,autoScroll:true,autoLoad:"/error_type.php"});Ext.getCmp("main-panel").setActiveTab("FE-help-"+q)}}]});s.showAt(r.getXY())}}});l=new Ext.grid.GridPanel({store:this.storeFilesNeedUpdate,loadMask:true,columns:[{id:"name",header:"Files",sortable:true,dataIndex:"name"},{header:"EN revision",width:45,sortable:true,dataIndex:"en_revision"},{header:Ext.util.Format.uppercase(this.userLang)+" revision",width:45,sortable:true,dataIndex:"revision"},{header:"Maintainer",width:45,sortable:true,dataIndex:"maintainer"},{header:"Path",dataIndex:"path",hidden:true}],view:new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.lengt! h > 1 ? "Files" : "File"]})',getRowClass:function(m,p,o,n){if(m.data.n eedcommit){return"file-need-commit"}if(m.data.isCritical){return"file-critical"}},emptyText:'<div style="text-align: center;">No Files</div>'}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,rowcontextmenu:function(o,s,q){var p,m,n="",r;p=this.storeFilesNeedUpdate.getAt(s).data.path;m=this.storeFilesNeedUpdate.getAt(s).data.name;o.getSelectionModel().selectRow(s);if(this.storeFilesNeedUpdate.getAt(s).data.needcommit){n={text:"View Diff",iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+s,title:"Diff",tabTip:"Diff",closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+s+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+s);Ext.get("diff_panel_"+s).mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Please, Wait...');Ext.Ajax.request({url:"./php/controller.php",params:{task:"get-diff",FilePath:this.userLang+p,FileName:m! },success:function(t){var u=Ext.util.JSON.decode(t.responseText);if(u.success){Ext.get("diff_content_"+s).dom.innerHTML=u.content;Ext.get("diff_panel_"+s).unmask()}},failure:function(){}})}}}r=new Ext.menu.Menu({items:[{text:"<b>Edit in a new Tab</b>",iconCls:"iconTabNeedUpdate",scope:this,handler:function(){l.fireEvent("rowdblclick",o,s,q)}},n]});q.stopEvent();r.showAt(q.getXY())},rowdblclick:function(o,x,v){var n,p,z,y,t,u,m,s,r,q,B,w,A;n=this.storeFilesNeedUpdate.getAt(x).data.path;p=this.storeFilesNeedUpdate.getAt(x).data.name;z=this.storeFilesNeedUpdate.getAt(x).data.en_revision;y=this.storeFilesNeedUpdate.getAt(x).data.revision;t=this.storeFilesNeedUpdate.getAt(x).data.needcommit;u=Ext.util.md5("FNU-"+this.userLang+n+p);if(!Ext.getCmp("main-panel").findById("FNU-"+u)){m=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-log",Path:this.userLang+n,File:p},reader:new Ext.data.JsonReader({root:"Items",totalPro! perty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"revision",ma pping:"revision"},{name:"date",mapping:"date",type:"date",dateFormat:"Y/m/d H:i:s"},{name:"author",mapping:"author"},{name:"content",mapping:"content"}])});m.setDefaultSort("date","desc");s=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-log",Path:"en"+n,File:p},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});s.setDefaultSort("date","desc");r=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(D){var C=D.getCount();if(C===2){return false}},rowselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNU-PANEL-btn-logLang-"+u).enable();Ext.get("FNU-PANEL-btn-logLang-"+u).frame("3F8538")}else{Ext.getCmp("FNU-PANEL-btn-logLang! -"+u).disable()}},rowdeselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNU-PANEL-btn-logLang-"+u).enable();Ext.get("FNU-PANEL-btn-logLang-"+u).frame("3F8538")}else{Ext.getCmp("FNU-PANEL-btn-logLang-"+u).disable()}}}});q=new Ext.grid.GridPanel({store:m,loadMask:true,columns:[r,{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")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:r,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"FNU-PANEL-btn-logLang-"+u,disabled:true,handler:function(){var E,D,C;E=r.getSelections();D=E[0].data.revision;C=E[1].data.revision;this.winDiff(this.userLang+n,p,D,C)}}]});B=new Ext.grid.CheckboxSelectionModel({single! Select:false,width:22,header:"",listeners:{beforerowselect:function(D) {var C=D.getCount();if(C===2){return false}},rowselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNU-PANEL-btn-logEn-"+u).enable();Ext.get("FNU-PANEL-btn-logEn-"+u).frame("3F8538")}else{Ext.getCmp("FNU-PANEL-btn-logEn-"+u).disable()}},rowdeselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNU-PANEL-btn-logEn-"+u).enable();Ext.get("FNU-PANEL-btn-logEn-"+u).frame("3F8538")}else{Ext.getCmp("FNU-PANEL-btn-logEn-"+u).disable()}}}});w=new Ext.grid.GridPanel({store:s,loadMask:true,columns:[B,{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")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:B,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",! id:"FNU-PANEL-btn-logEn-"+u,disabled:true,handler:function(){var E,D,C;E=B.getSelections();D=E[0].data.revision;C=E[1].data.revision;this.winDiff("en"+n,p,D,C)}}]});if(this.userConf.conf_needupdate_diff==="using-viewvc"){A={xtype:"panel",layout:"fit",region:"north",title:"Diff From cvs",height:150,collapsed:true,items:{xtype:"iframepanel",id:"FNU-diff-"+u,loadMask:true,defaultSrc:"http://cvs.php.net/viewvc.cgi/phpdoc/en"+n+p+"?r1="+y+"&r2="+z}}}else{if(this.userConf.conf_needupdate_diff==="using-exec"){A={xtype:"panel",layout:"fit",region:"north",title:"Diff From cvs",height:150,autoScroll:true,collapsed:true,html:'<div id="FNU-diff-'+u+'" class="diff-content"></div>',listeners:{render:function(){Ext.Ajax.request({url:"./php/controller.php",params:{task:"get-diff2",FilePath:"en"+n,FileName:p,Rev2:y,Rev1:z},success:function(C){var D=Ext.util.JSON.decode(C.responseText);if(D.success){Ext.get("FNU-diff-"+u).dom.innerHTML=D.content}},failure:function(){}})}}}}}Ext.getCmp("main-! panel").add({closable:true,title:p,originTitle:p,tabTip:"Need Update : in "+n,iconCls:"iconTabNeedUpdate",id:"FNU-"+u,isModifiedLang:false,isModifiedEn:false,layout:"border",defaults:{collapsible:true,split:true},items:[A,{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:this.userLang,items:[q]},{layout:"fit",title:"En",items:[w]}]}},{scope:this,title:this.userLang+" File: "+n+p,originTitle:this.userLang+" File: "+n+p,collapsible:false,id:"FNU-LANG-PANEL-"+u,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"FNU-LANG-"+u,listeners:{scope:this,initialize:function(){this.getFile(u,this.userLang+n,p,"FNU-LANG-PANEL-","FNU-LANG-")},cmcursormove:function(){var C=Ext.util.JSON.decode(Ext.getCmp("FNU-LANG-"+u).getCursorPosition());Ext.get("FNU-LANG-status-line-"+u).dom.innerHTML=C.line;Ext.get("FNU-LANG-status-col-"+u).dom.innerHTML=C.caracter},cmchange:func! tion(F,D,E){var C=Ext.util.JSON.decode(Ext.getCmp("FNU-LANG-"+u).getCursorPosition());Ext.get("FNU-LANG-status-line-"+u).dom.innerHTML=C.line;Ext.get("FNU-LANG-status-col-"+u).dom.innerHTML=C.caracter;if(F!==27&&F!==33&&F!==34&&F!==37&&F!==38&&F!==39&&F!==40&&F!==17&&F!==16&&F!==67){if(!Ext.getCmp("FNU-"+u).isModifiedLang){Ext.getCmp("FNU-LANG-PANEL-"+u).setTitle(Ext.getCmp("FNU-LANG-PANEL-"+u).originTitle+' <span style="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCmp("FNU-"+u).setTitle(Ext.getCmp("FNU-"+u).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNU-LANG-PANEL-btn-save-"+u).enable();Ext.get("FNU-LANG-PANEL-btn-save-"+u).frame("3F8538");Ext.getCmp("FNU-LANG-PANEL-btn-saveas-"+u).enable();Ext.get("FNU-LANG-PANEL-btn-saveas-"+u).frame("3F8538");Ext.getCmp("FNU-"+u).isModifiedLang=true}}},cmscroll:function(C){if(this.userConf.conf_needupdate_scrollbars==="true"){Ext.getCmp("FNU-EN-"+u).scrollTo(C)}}}}],bbar:[{scope:this,! xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_needupdate _scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_needupdate_scrollbars",listeners:{scope:this,check:function(C){this.confUpdate("conf_needupdate_scrollbars",C.getValue())},render:function(C){Ext.DomHelper.insertHtml("beforeBegin",C.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">Line: <span id="FNU-LANG-status-line-'+u+'">-</span></span> <span class="x-status-text-panel">Col: <span id="FNU-LANG-status-col-'+u+'">-</span></span></div> ')}}}],tbar:[{scope:this,tooltip:"<b>Save</b> this file",iconCls:"saveFile",id:"FNU-LANG-PANEL-btn-save-"+u,disabled:true,handler:function(){this.saveLangFile(u,n,p,"FNU",x,this)}},{scope:this,tooltip:"<b>Save as</b> a patch",iconCls:"saveAsFile",id:"FNU-LANG-PANEL-btn-saveas-"+u,disabled:true,handler:function(){this.savePatch(this.userLang,u,n,p,"FNU",this)}},"->",{tooltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:function(){Ext.g! etCmp("FNU-LANG-"+u).reIndentAll()}},{tooltip:"Insert <b>Reviewed</b> tag",text:"Reviewed tag",iconCls:"iconInsertCode",handler:function(){Ext.getCmp("FNU-LANG-"+u).insertIntoLine(2,"end","\n<!-- Reviewed: no -->");Ext.getCmp("FNU-LANG-"+u).focus()}},{tooltip:"Insert <b>Revcheck</b> tag",text:"Rev tag",iconCls:"iconInsertCode",handler:function(){Ext.getCmp("FNU-LANG-"+u).insertIntoLine(2,"end","\n<!-- EN-Revision: 1.XX Maintainer: "+this.userLoggin+" Status: ready -->");Ext.getCmp("FNU-LANG-"+u).focus()}}]},{title:"En File: "+n+p,originTitle:"En File: "+n+p,collapsible:false,id:"FNU-EN-PANEL-"+u,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"FNU-EN-"+u,listeners:{scope:this,initialize:function(){this.getFile(u,"en"+n,p,"FNU-EN-PANEL-","FNU-EN-")},cmchange:function(F,D,E){var C=Ext.util.JSON.decode(Ext.getCmp("FNU-EN-"+u).getCursorPosition());Ext.get("FNU-EN-status-line-"+u).dom.innerHTML=C.line;Ext.get("FNU-EN-status-col-"+u).dom.innerHTML! =C.caracter;if(F!==27&&F!==33&&F!==34&&F!==37&&F!==38&&F!==39&&F!==40& &F!==17&&F!==16&&F!==67){if(!Ext.getCmp("FNU-"+u).isModifiedEn){Ext.getCmp("FNU-EN-PANEL-"+u).setTitle(Ext.getCmp("FNU-EN-PANEL-"+u).originTitle+' <span style="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCmp("FNU-"+u).setTitle(Ext.getCmp("FNU-"+u).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNU-EN-PANEL-btn-save-"+u).enable();Ext.get("FNU-EN-PANEL-btn-save-"+u).frame("3F8538");Ext.getCmp("FNU-EN-PANEL-btn-saveas-"+u).enable();Ext.get("FNU-EN-PANEL-btn-saveas-"+u).frame("3F8538");Ext.getCmp("FNU-"+u).isModifiedEn=true}}},cmscroll:function(C){if(this.userConf.conf_needupdate_scrollbars==="true"){Ext.getCmp("FNU-LANG-"+u).scrollTo(C)}},cmcursormove:function(D){var C=Ext.util.JSON.decode(Ext.getCmp("FNU-EN-"+u).getCursorPosition());Ext.get("FNU-EN-status-line-"+u).dom.innerHTML=C.line;Ext.get("FNU-EN-status-col-"+u).dom.innerHTML=C.caracter}}}],bbar:[{scope:this,xtype:"panel",height:21,baseCls:"",bodyStyle:"padding-top:5px;",h! tml:'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">Line: <span id="FNU-EN-status-line-'+u+'">-</span></span> <span class="x-status-text-panel">Col: <span id="FNU-EN-status-col-'+u+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:"<b>Save</b> this file",iconCls:"saveFile",id:"FNU-EN-PANEL-btn-save-"+u,disabled:true,handler:function(){this.saveEnFile(u,n,p,"FNU",x,this)}},{scope:this,tooltip:"<b>Save as</b> a patch",iconCls:"saveAsFile",id:"FNU-EN-PANEL-btn-saveas-"+u,disabled:true,handler:function(){this.savePatch("en",u,n,p,"FNU",this)}},"->",{tooltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:function(){Ext.getCmp("FNU-EN-"+u).reIndentAll()}}]}]});Ext.getCmp("main-panel").setActiveTab("FNU-"+u)}else{Ext.getCmp("main-panel").setActiveTab("FNU-"+u)}}}});a=new Ext.grid.GridPanel({store:this.storePendingPatch,loadMask:true,columns:[{id:"name",header:"Files",sortable:true,dataIndex:"name"},{hea! der:"Posted by",width:45,sortable:true,dataIndex:"by"},{header:"Date", width:45,sortable:true,dataIndex:"date"},{header:"Path",dataIndex:"path",hidden:true}],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>'}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,rowcontextmenu:function(n,t,r){var o,m,p,q,s;o=this.storePendingPatch.getAt(t).data.path;m=this.storePendingPatch.getAt(t).data.name;p=this.storePendingPatch.getAt(t).data.uniqID;q=Ext.util.md5("PP-"+p+o+m);n.getSelectionModel().selectRow(t);s=new Ext.menu.Menu({items:[{text:"<b>Edit in a new Tab</b>",iconCls:"PendingPatch",scope:this,handler:function(){a.fireEvent("rowdblclick",n,t,r)}},"-",{text:"Reject this patch",iconCls:"iconPageDelete",scope:this,handler:function(){this.rejectPatch(q,o,m,p,t,this)}}]});s.showAt(r.getXY())},rowdblclick:function(n,u,s){var m,o,v,t,r,q,p;m=this.storePendingPatch.getAt! (u).data.path;o=this.storePendingPatch.getAt(u).data.name;v=this.storePendingPatch.getAt(u).data.uniqID;t=Ext.util.md5("PP-"+v+m+o);if(!Ext.getCmp("main-panel").findById("FE-"+t)){r=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-log",Path:m,File:o},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});r.setDefaultSort("date","desc");q=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(x){var w=x.getCount();if(w===2){return false}},rowselect:function(x){var w=x.getCount();if(w===2){Ext.getCmp("PP-PANEL-btn-log-"+t).enable();Ext.get("PP-PANEL-btn-log-"+t).frame("3F8538")}else{Ext.getCmp("PP-PANEL-btn-log-"+t).disable()}},rowdesele! ct:function(x){var w=x.getCount();if(w===2){Ext.getCmp("PP-PANEL-btn-l og-"+t).enable();Ext.get("PP-PANEL-btn-log-"+t).frame("3F8538")}else{Ext.getCmp("PP-PANEL-btn-log-"+t).disable()}}}});p=new Ext.grid.GridPanel({store:r,loadMask:true,columns:[q,{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")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:q,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"PP-PANEL-btn-log-"+t,disabled:true,handler:function(){var y,x,w;y=q.getSelections();x=y[0].data.revision;w=y[1].data.revision;this.winDiff(m,o,x,w)}}]});Ext.getCmp("main-panel").add({closable:true,title:o,originTitle:o,tabTip:"Patch for "+m+o,iconCls:"PendingPatch",id:"PP-"+t,layout:"border",defaults:{collapsible:true,split:true! },items:[{xtype:"panel",layout:"fit",region:"north",title:"Patch content",id:"PP-patch-desc-"+t,height:150,autoScroll:true,collapsed:true,html:'<div id="diff_content_'+t+'" class="diff-content"></div>',listeners:{render:function(){Ext.Ajax.request({scope:this,url:"./php/controller.php",params:{task:"get-diff",FilePath:m,FileName:o,type:"patch",uniqID:v},success:function(w){var x=Ext.util.JSON.decode(w.responseText);if(x.success){Ext.get("diff_content_"+t).dom.innerHTML=x.content}},failure:function(){}})}}},{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:"Log",items:[p]}]}},{title:"Proposed Patch for "+m+o,originTitle:"Proposed Patch for "+m+o,collapsible:false,id:"PP-PATCH-PANEL-"+t,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"PP-PATCH-"+t,isModified:false,listeners:{scope:! this,initialize:function(w){this.getFile(t,m,o+"."+v+".patch","PP-PATC H-PANEL-","PP-PATCH-")},cmcursormove:function(){var w=Ext.util.JSON.decode(Ext.getCmp("PP-PATCH-"+t).getCursorPosition());Ext.get("PP-PATCH-status-line-"+t).dom.innerHTML=w.line;Ext.get("PP-PATCH-status-col-"+t).dom.innerHTML=w.caracter},cmchange:function(z,x,y){var w=Ext.util.JSON.decode(Ext.getCmp("PP-PATCH-"+t).getCursorPosition());Ext.get("PP-PATCH-status-line-"+t).dom.innerHTML=w.line;Ext.get("PP-PATCH-status-col-"+t).dom.innerHTML=w.caracter;if(z!==27&&z!==33&&z!==34&&z!==37&&z!==38&&z!==39&&z!==40&&z!==17&&z!==16&&z!==67){if(!Ext.getCmp("PP-PATCH-"+t).isModified){Ext.getCmp("PP-PATCH-PANEL-"+t).setTitle(Ext.getCmp("PP-PATCH-PANEL-"+t).originTitle+' <span style="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCmp("PP-"+t).setTitle(Ext.getCmp("PP-"+t).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("PP-PATCH-"+t).isModified=true}}},cmscroll:function(w){if(this.userConf.conf_patch_scrollbars==="true"){Ext.getCmp("PP-ORIGIN-"+t)! .scrollTo(w)}}}}],bbar:[{scope:this,xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_patch_scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_patch_scrollbars",listeners:{scope:this,check:function(w){this.confUpdate("conf_patch_scrollbars",w.getValue())},render:function(w){Ext.DomHelper.insertHtml("beforeBegin",w.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">Line: <span id="PP-PATCH-status-line-'+t+'">-</span></span> <span class="x-status-text-panel">Col: <span id="PP-PATCH-status-col-'+t+'">-</span></span></div> ')}}}],tbar:[{scope:this,tooltip:"<b>Accept</b> this patch and <b>Save</b> the file",iconCls:"saveFile",id:"PP-PATCH-PANEL-btn-save-"+t,handler:function(){this.saveFileViaPatch(t,m,o,v,u,this)}},{scope:this,tooltip:"<b>Reject</b> this patch",iconCls:"iconPageDelete",id:"PP-PATCH-PANEL-btn-reject-"+t,handler:function(){this.rejectPatch(t,m,o,v,u,this)}},"->",{to! oltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:fu nction(){Ext.getCmp("PP-PATCH-"+t).reIndentAll()}}]},{title:"Original File: "+m+o,originTitle:"Original File: "+m+o,collapsible:false,id:"PP-ORIGIN-PANEL-"+t,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"PP-ORIGIN-"+t,readOnly:true,listeners:{scope:this,initialize:function(w){this.getFile(t,m,o,"PP-ORIGIN-PANEL-","PP-ORIGIN-")},cmscroll:function(w){if(this.userConf.conf_patch_scrollbars==="true"){Ext.getCmp("PP-PATCH-"+t).scrollTo(w)}},cmcursormove:function(x){var w=Ext.util.JSON.decode(Ext.getCmp("PP-ORIGIN-"+t).getCursorPosition());Ext.get("PP-ORIGIN-status-line-"+t).dom.innerHTML=w.line;Ext.get("PP-ORIGIN-status-col-"+t).dom.innerHTML=w.caracter}}}],bbar:[{scope:this,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="PP-ORIGIN-status-line-'+t+'">-</span></span> <span class="x-status-text-panel">Col: <span id=! "PP-ORIGIN-status-col-'+t+'">-</span></span></div> '}],tbar:[{}]}]});Ext.getCmp("main-panel").setActiveTab("PP-"+t);if(Ext.getCmp("PP-"+t).getLayout().north.collapsedEl){Ext.getCmp("PP-"+t).getLayout().north.collapsedEl.addClass("x-layout-collapsed-east-patch-desc")}}}}});c=new Ext.grid.GridPanel({store:this.storePendingCommit,loadMask:true,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"},{header:"Path",dataIndex:"path",hidden:true}],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>'}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,rowcontextmenu:function(n,r,p){var o,m,q;o=this.storePendingCommit.getAt(r).data.path;m=this.storePendingCom! mit.getAt(r).data.name;n.getSelectionModel().selectRow(r);q=new Ext.me nu.Menu({items:[{text:"<b>Edit in a new Tab</b>",iconCls:"PendingCommit",scope:this,handler:function(){c.fireEvent("rowdblclick",n,r,p)}},"-",{text:"View Diff",iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+r,title:"Diff",tabTip:"Diff",closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+r+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+r);Ext.get("diff_panel_"+r).mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Please, Wait...');Ext.Ajax.request({url:"./php/controller.php",params:{task:"get-diff",FilePath:o,FileName:m},success:function(s){var t=Ext.util.JSON.decode(s.responseText);if(t.success){Ext.get("diff_content_"+r).dom.innerHTML=t.content;Ext.get("diff_panel_"+r).unmask()}},failure:function(){}})}},{text:"Download the diff as a patch",iconCls:"iconCommitFileCvs",scope:this,handler:function(){window.location.href="./d! l_Patch.php?FilePath="+o+"&FileName="+m}},"-",{text:"Clear this change",iconCls:"iconPageDelete",scope:this,handler:function(){function s(t){if(t==="yes"){if(Ext.getCmp("main-panel").findById("FNU-"+Ext.util.md5("FNU-"+o+m))){Ext.getCmp("main-panel").remove("FNU-"+Ext.util.md5("FNU-"+o+m))}Ext.Ajax.request({scope:this,url:"./php/controller.php",params:{task:"clear-local-change",FilePath:o,FileName:m},success:function(u){var v=Ext.util.JSON.decode(u.responseText);if(v.success){this.storeFilesNeedUpdate.reload();this.storeFilesError.reload();this.storeFilesNeedReviewed.reload();this.storePendingCommit.remove(this.storePendingCommit.getAt(r));this.storePendingCommit.fireEvent("add",this.storePendingCommit)}},failure:function(){}})}}Ext.MessageBox.confirm("Confirm","This action will clear your local modification and take back this file from his original stats.<br/>You need confirm.",s,this)}},"-",{text:"Commit...",iconCls:"iconCommitFileCvs",scope:this,menu:new Ext.menu.Menu({i! tems:[{text:"...this file",iconCls:"iconCommitFileCvs",scope:this,hand ler:function(){this.WinCommit(true,r)}},{text:"...all files modified by me",iconCls:"iconCommitFileCvs",scope:this,handler:function(){this.WinCommit(false,"","by me")}},{text:"...all files modified",iconCls:"iconCommitFileCvs",scope:this,handler:function(){this.WinCommit(false)}}]})}]});q.showAt(p.getXY())},rowdblclick:function(n,q,p){var o,m;o=this.storePendingCommit.getAt(q).data.path;m=this.storePendingCommit.getAt(q).data.name;this.openFile(o,m)}}});h=new Ext.grid.GridPanel({store:this.storeFilesNeedReviewed,loadMask:true,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}],view:new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "Files" : "File"]})',getRowClass:function(m,p,o,n){if(m.data.needcommit){re! turn"file-need-commit"}},emptyText:'<div style="text-align: center;">No files</div>'}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,rowcontextmenu:function(n,t,r){var m,p,s,o="",v="",u,q;n.getSelectionModel().selectRow(t);m=this.storeFilesNeedReviewed.getAt(t).data.path;p=this.storeFilesNeedReviewed.getAt(t).data.name;s=Ext.util.md5("FNR-"+this.userLang+m+p);if(this.storeFilesNeedReviewed.getAt(t).data.needcommit){o={text:"View Diff",iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+t,title:"Diff",tabTip:"Diff",closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+t+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+t);Ext.get("diff_panel_"+t).mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Please, Wait...');Ext.Ajax.request({scope:this,url:"./php/controller.php",params:{task:"get-diff",FilePath:this.userLang+m! ,FileName:p},success:function(w){var x=Ext.util.JSON.decode(w.response Text);if(x.success){Ext.get("diff_content_"+t).dom.innerHTML=x.content;Ext.get("diff_panel_"+t).unmask()}},failure:function(){}})}}}u=m.split("/");if(u[1]==="reference"){v={text:"Open all files about "+u[2]+" extension",iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getBody().mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Open all files about '+u[2]+" extension. Please, wait...");Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"all-files-about-extension",ExtName:u[2]},success:function(y,x){var z,w;z=Ext.util.JSON.decode(y.responseText);this.filePendingOpen=[];for(w=0;w<z.files.length;w=w+1){this.filePendingOpen[w]=[this.userLang+z.files[w].path,z.files[w].name]}this.openFile(this.filePendingOpen[0][0],this.filePendingOpen[0][1]);Ext.getBody().unmask()}})}}}q=new Ext.menu.Menu({scope:this,items:[{text:"<b>Edit in a new Tab</b>",iconCls:"FilesNeedReviewed",scope:this,handler:function(){h.fireEvent("rowdblclick",n,t,r)}},o,"! -",v]});r.stopEvent();q.showAt(r.getXY())},rowdblclick:function(o,y,v){var n,p,s,u,w,m,t,r,q,z,x;n=this.storeFilesNeedReviewed.getAt(y).data.path;p=this.storeFilesNeedReviewed.getAt(y).data.name;s=this.storeFilesNeedReviewed.getAt(y).data.reviewed;u=this.storeFilesNeedReviewed.getAt(y).data.needcommit;w=Ext.util.md5("FNR-"+this.userLang+n+p);if(!Ext.getCmp("main-panel").findById("FNR-"+w)){m=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-log",Path:this.userLang+n,File:p},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});m.setDefaultSort("date","desc");t=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-log",Path:"en"+n,F! ile:p},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbI tems",id:"id"},[{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"}])});t.setDefaultSort("date","desc");r=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",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("FNR-PANEL-btn-logLang-"+w).enable();Ext.get("FNR-PANEL-btn-logLang-"+w).frame("3F8538")}else{Ext.getCmp("FNR-PANEL-btn-logLang-"+w).disable()}},rowdeselect:function(B){var A=B.getCount();if(A===2){Ext.getCmp("FNR-PANEL-btn-logLang-"+w).enable();Ext.get("FNR-PANEL-btn-logLang-"+w).frame("3F8538")}else{Ext.getCmp("FNR-PANEL-btn-logLang-"+w).disable()}}}});q=new Ext.grid.GridPanel({store:m,loadMask:true,columns:[r,{id:"id",header:"Rev.",width:40,sortable:false,dataIndex:"revision"},{header:"Content",width:130,sortab! le: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")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:r,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"FNR-PANEL-btn-logLang-"+w,disabled:true,handler:function(){var C,B,A;C=r.getSelections();B=C[0].data.revision;A=C[1].data.revision;this.winDiff(this.userLang+n,p,B,A)}}]});z=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",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("FNR-PANEL-btn-logEn-"+w).enable();Ext.get("FNR-PANEL-btn-logEn-"+w).frame("3F8538")}else{Ext.getCmp("FNR-PANEL-btn-logEn-"+w).disable()}},rowdeselect:function(B){var A=B.getCount();if(A===2){Ext.getCmp("FNR-PANEL-b! tn-logEn-"+w).enable();Ext.get("FNR-PANEL-btn-logEn-"+w).frame("3F8538 ")}else{Ext.getCmp("FNR-PANEL-btn-logEn-"+w).disable()}}}});x=new Ext.grid.GridPanel({store:t,loadMask:true,columns:[z,{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")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:z,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"FNR-PANEL-btn-logEn-"+w,disabled:true,handler:function(){var C,B,A;C=z.getSelections();B=C[0].data.revision;A=C[1].data.revision;this.winDiff("en"+n,p,B,A)}}]});Ext.getCmp("main-panel").add({closable:true,title:p,originTitle:p,tabTip:"Need Reviewed : in "+n,iconCls:"iconTabNeedReviewed",id:"FNR-"+w,isModifiedLang:false,isModifiedEn:false,layout:"border",defaults:{collapsible:true,split! :true},items:[{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:this.userLang,items:[q]},{layout:"fit",title:"En",items:[x]}]}},{title:this.userLang+" File: "+n+p,originTitle:this.userLang+" File: "+n+p,collapsible:false,id:"FNR-LANG-PANEL-"+w,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"FNR-LANG-"+w,listeners:{scope:this,initialize:function(){this.getFile(w,this.userLang+n,p,"FNR-LANG-PANEL-","FNR-LANG-")},cmcursormove:function(B){var A=Ext.util.JSON.decode(Ext.getCmp("FNR-LANG-"+w).getCursorPosition());Ext.get("FNR-LANG-status-line-"+w).dom.innerHTML=A.line;Ext.get("FNR-LANG-status-col-"+w).dom.innerHTML=A.caracter},cmchange:function(D,B,C){var A=Ext.util.JSON.decode(Ext.getCmp("FNR-LANG-"+w).getCursorPosition());Ext.get("FNR-LANG-status-line-"+w).dom.innerHTML=A.line;Ext.g! et("FNR-LANG-status-col-"+w).dom.innerHTML=A.caracter;if(D!==27&&D!==3 3&&D!==34&&D!==37&&D!==38&&D!==39&&D!==40&&D!==17&&D!==16&&D!==67){if(!Ext.getCmp("FNR-"+w).isModifiedLang){Ext.getCmp("FNR-LANG-PANEL-"+w).setTitle(Ext.getCmp("FNR-LANG-PANEL-"+w).originTitle+' <span style="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCmp("FNR-"+w).setTitle(Ext.getCmp("FNR-"+w).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNR-LANG-PANEL-btn-save-"+w).enable();Ext.get("FNR-LANG-PANEL-btn-save-"+w).frame("3F8538");Ext.getCmp("FNR-LANG-PANEL-btn-saveas-"+w).enable();Ext.get("FNR-LANG-PANEL-btn-saveas-"+w).frame("3F8538");Ext.getCmp("FNR-"+w).isModifiedLang=true}}},cmscroll:function(A){if(this.userConf.conf_reviewed_scrollbars==="true"){Ext.getCmp("FNR-EN-"+w).scrollTo(A)}}}}],bbar:[{scope:this,xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_reviewed_scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_reviewed_scrollbars",listeners:{scope:this,check:function(A){this.confUpd! ate("conf_reviewed_scrollbars",A.getValue())},render:function(A){Ext.DomHelper.insertHtml("beforeBegin",A.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">Line: <span id="FNR-LANG-status-line-'+w+'">-</span></span> <span class="x-status-text-panel">Col: <span id="FNR-LANG-status-col-'+w+'">-</span></span></div> ')}}}],tbar:[{scope:this,tooltip:"<b>Save</b> this file",iconCls:"saveFile",id:"FNR-LANG-PANEL-btn-save-"+w,disabled:true,handler:function(){this.saveLangFile(w,n,p,"FNR",y,this)}},{scope:this,tooltip:"<b>Save as</b> a patch",iconCls:"saveAsFile",id:"FNR-LANG-PANEL-btn-saveas-"+w,disabled:true,handler:function(){this.savePatch(this.userLang,w,n,p,"FNR",this)}},"->",{tooltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:function(){Ext.getCmp("FNR-LANG-"+w).reIndentAll()}},{tooltip:"Insert <b>Reviewed</b> tag",text:"Reviewed tag",iconCls:"iconInsertCode",handler:function(){Ext.getCmp("FNR-! LANG-"+w).insertIntoLine(2,"end","\n<!-- Reviewed: no -->");Ext.getCmp ("FNR-LANG-"+w).focus()}},{tooltip:"Insert <b>Revcheck</b> tag",text:"Rev tag",iconCls:"iconInsertCode",handler:function(){Ext.getCmp("FNR-LANG-"+w).insertIntoLine(2,"end","\n<!-- EN-Revision: 1.XX Maintainer: "+this.userLoggin+" Status: ready -->");Ext.getCmp("FNR-LANG-"+w).focus()}}]},{title:"En File: "+n+p,originTitle:"En File: "+n+p,collapsible:false,id:"FNR-EN-PANEL-"+w,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"FNR-EN-"+w,listeners:{scope:this,initialize:function(){this.getFile(w,"en"+n,p,"FNR-EN-PANEL-","FNR-EN-")},cmchange:function(D,B,C){var A=Ext.util.JSON.decode(Ext.getCmp("FNR-EN-"+w).getCursorPosition());Ext.get("FNR-EN-status-line-"+w).dom.innerHTML=A.line;Ext.get("FNR-EN-status-col-"+w).dom.innerHTML=A.caracter;if(D!==27&&D!==33&&D!==34&&D!==37&&D!==38&&D!==39&&D!==40&&D!==17&&D!==16&&D!==67){if(!Ext.getCmp("FNR-"+w).isModifiedEn){Ext.getCmp("FNR-EN-PANEL-"+w).setTitle(Ext.getCmp("FNR-EN-PANEL-"+w).originTitle+' <span sty! le="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCmp("FNR-"+w).setTitle(Ext.getCmp("FNR-"+w).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNR-EN-PANEL-btn-save-"+w).enable();Ext.get("FNR-EN-PANEL-btn-save-"+w).frame("3F8538");Ext.getCmp("FNR-EN-PANEL-btn-saveas-"+w).enable();Ext.get("FNR-EN-PANEL-btn-saveas-"+w).frame("3F8538");Ext.getCmp("FNR-"+w).isModifiedEn=true}}},cmscroll:function(A){if(this.userConf.conf_reviewed_scrollbars==="true"){Ext.getCmp("FNR-LANG-"+w).scrollTo(A)}},cmcursormove:function(B){var A=Ext.util.JSON.decode(Ext.getCmp("FNR-EN-"+w).getCursorPosition());Ext.get("FNR-EN-status-line-"+w).dom.innerHTML=A.line;Ext.get("FNR-EN-status-col-"+w).dom.innerHTML=A.caracter}}}],bbar:[{scope:this,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="FNR-EN-status-line-'+w+'">-</span></span>  ! ;<span class="x-status-text-panel">Col: <span id="FNR-EN-status-col-'+ w+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:"<b>Save</b> this file",iconCls:"saveFile",id:"FNR-EN-PANEL-btn-save-"+w,disabled:true,handler:function(){this.saveEnFile(w,n,p,"FNR",y,this)}},{scope:this,tooltip:"<b>Save as</b> a patch",iconCls:"saveAsFile",id:"FNR-EN-PANEL-btn-saveas-"+w,disabled:true,handler:function(){this.savePatch("en",w,n,p,"FNR",this)}},"->",{tooltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:function(){Ext.getCmp("FNR-EN-"+w).reIndentAll()}}]}]});Ext.getCmp("main-panel").setActiveTab("FNR-"+w)}else{Ext.getCmp("main-panel").setActiveTab("FNR-"+w)}}}});g=new Ext.grid.GridPanel({title:"Summary",iconCls:"flag-"+this.userLang,store:this.storeSummary,loadMask:true,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:"per! centFiles"},{header:"Size of files (kB)",width:110,sortable:true,dataIndex:"sizeFiles"},{header:"Percent of size",width:110,sortable:true,dataIndex:"percentSize"}],autoScroll:true,height:400,width:800,view:new Ext.grid.GridView({getRowClass:function(m,p,o,n){if(m.data.id===1){return"summary_1"}if(m.data.id===2){return"summary_2"}if(m.data.id===3){return"summary_3"}if(m.data.id===4){return"summary_4"}if(m.data.id===5){return"summary_5"}}}),listeners:{scope:this,render:function(m){m.store.load()}}});f=new Ext.grid.GridPanel({title:"Translators",iconCls:"iconTranslator",store:this.storeTranslators,loadMask:true,columns:[new Ext.grid.RowNumberer(),{id:"GridTransName",header:"Name",sortable:true,dataIndex:"name",summaryType:"count",summaryRenderer:this.rendererTotalTranslator},{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:this.rendererNumUptodate,dataIndex:"uptodate",summaryTy pe:"sum"},{header:"Old",width:45,sortable:true,renderer:this.rendererSum,dataIndex:"old",summaryType:"sum"},{header:"Critical",width:60,sortable:true,renderer:this.rendererNumCritical,dataIndex:"critical",summaryType:"sum"},{header:"Sum",width:50,sortable:true,renderer:this.rendererSum,dataIndex:"sum",summaryType:"sum"}],plugins:[new Ext.ux.grid.GridSummary()],autoScroll:true,autoExpandColumn:"GridTransName",height:400,width:800,listeners:{scope:this,render:function(){this.storeTranslators.load()},rowdblclick:function(o,q,p){var m,n;o.getSelectionModel().selectRow(q);m=this.storeTranslators.getAt(q).data.email;n=this.storeTranslators.getAt(q).data.name;this.sendEmail(n,m)},rowcontextmenu:function(o,r,p){var m,n,q;o.getSelectionModel().selectRow(r);m=this.storeTranslators.getAt(r).data.email;n=this.storeTranslators.getAt(r).data.name;q=new Ext.menu.Menu({id:"submenu",items:[{scope:this,text:"<b>Send an email to "+n+"</b>",iconCls:"iconSendEmail",handler:function(){this.sendEm! ail(n,m)}},"-",{scope:this,text:"Send an email to the doc-"+this.userLang+"@lists.php.net",iconCls:"iconSendEmail",handler:function(){this.sendEmail("Php Doc Team "+this.userLang,"doc-"+this.userLang+"@lists.php.net")}}]});q.showAt(p.getXY())}}});i=new Ext.grid.GridPanel({store:this.storeMailing,title:"Mails from doc-"+this.userLang,iconCls:"home-mailing-title",loadMask:true,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")}],autoScroll:true,height:400,width:800,autoExpandColumn:"GridMailingTitle",sm:new Ext.grid.RowSelectionModel({singleSelect:true}),tbar:[{scope:this,tooltip:"Refresh this grid",iconCls:"refresh",handler:function(){this.storeMailing.reload()}}],listeners:{scope:this,render:function(){this.storeMailing.load()},rowcontextmenu:functi! on(m,p,n){var o;m.getSelectionModel().selectRow(p);o=new Ext.menu.Menu ({id:"submenu",items:[{text:"<b>Open in a new Tab</b>",iconCls:"openInTab",scope:this,handler:function(){i.fireEvent("rowdblclick",m,p,n)}},"-",{text:"Refresh this grid",iconCls:"refresh",scope:this,handler:function(){this.storeMailing.reload()}}]});o.showAt(n.getXY())},rowdblclick:function(n,r,p){var m,q,o;m=this.storeMailing.getAt(r).data.pubDate;q=this.storeMailing.getAt(r).data.link;o=this.storeMailing.getAt(r).data.title;this.NewTabMailing(m,q,o)}}});e=new Ext.grid.GridPanel({store:this.storeBugs,title:"Open bugs for doc-"+this.userLang,iconCls:"iconBugs",loadMask:true,columns:[{id:"GridBugTitle",header:"Title",sortable:true,dataIndex:"title"}],stripeRows:true,autoHeight:true,viewConfig:{emptyText:"No open Bugs",forceFit:true,enableRowBody:true,getRowClass:function(m,q,o,n){o.body='<p class="bug-desc">'+m.data.description+"</p>";return"x-grid3-row-expanded"}},autoExpandColumn:"GridBugTitle",sm:new Ext.grid.RowSelectionModel({singleSelect:true}),width:800,tbar:[{scope:th! is,tooltip:"Refresh this grid",iconCls:"refresh",handler:function(){this.storeBugs.reload()}}],listeners:{scope:this,render:function(){this.storeBugs.load()},rowcontextmenu:function(m,p,n){var o;m.getSelectionModel().selectRow(p);o=new Ext.menu.Menu({id:"submenu",items:[{text:"<b>Open in a new Tab</b>",iconCls:"openInTab",scope:this,handler:function(){e.fireEvent("rowdblclick",m,p,n)}},"-",{text:"Refresh this grid",iconCls:"refresh",scope:this,handler:function(){this.storeBugs.reload()}}]});o.showAt(n.getXY())},rowdblclick:function(o,r,q){var m,n,p;m=this.storeBugs.getAt(r).data.id;n=this.storeBugs.getAt(r).data.link;p=this.storeBugs.getAt(r).data.title;this.NewTabBugs(m,n,p)}}});k={title:"Graphics",layout:"fit",autoHeight:true,iconCls:"home-graphic-title",html:'<div align="center" id="graph_container" style="width: 530px; height: 302px"><img id="graph_picture" src="" height="300"></div>',listeners:{afterlayout:function(){var m,o,n;m=Ext.get("graph_picture");o=Ext.get("grap! h_container");m.setVisibilityMode(Ext.Element.VISIBILITY);n=new Ext.Lo adMask(o);m.on("load",function(){m.stopFx();n.hide();m.fadeIn({duration:2})});n.show();m.hide();m.dom.src="/php/image_info.php"}}};this.treeAllFiles=new Ext.tree.TreePanel({animate:true,autoScroll:true,useArrows:true,loader:new Ext.tree.TreeLoader({dataUrl:"./php/controller.php",baseParams:{task:"getAllFiles"}}),enableDD:false,containerScroll:true,bodyBorder:false,listeners:{scope:this,dblclick:function(q,v){var n,m,w,y,u,r,p,o,s,x;if(q.attributes.type==="file"){n=q.attributes.text;m=q.attributes.id;w=Ext.util.md5("AF-"+m+n);if(!Ext.getCmp("main-panel").findById("AF-"+w)){y=m.split("/");y.shift();y.shift();y.pop();m=y.join("/")+"/";u="xml";if(q.attributes.extension==="xml"){u="xml"}if(q.attributes.extension==="html"){u="html"}if(q.attributes.extension==="php"){u="php"}r=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-log",Path:m,File:n},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"i! d"},[{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"}])});r.setDefaultSort("date","desc");p=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(z){var t=z.getCount();if(t===2){return false}},rowselect:function(z){var t=z.getCount();if(t===2){Ext.getCmp("AF-PANEL-btn-log-"+w).enable();Ext.get("AF-PANEL-btn-log-"+w).frame("3F8538")}else{Ext.getCmp("AF-PANEL-btn-log-"+w).disable()}},rowdeselect:function(z){var t=z.getCount();if(t===2){Ext.getCmp("AF-PANEL-btn-log-"+w).enable();Ext.get("AF-PANEL-btn-log-"+w).frame("3F8538")}else{Ext.getCmp("AF-PANEL-btn-log-"+w).disable()}}}});o=new Ext.grid.GridPanel({store:r,id:"AF-PANEL-log-"+w,loadMask:true,columns:[p,{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"},{hea der:"Date",width:85,sortable:true,dataIndex:"date",renderer:Ext.util.Format.dateRenderer("Y/m/d, H:i")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:p,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"AF-PANEL-btn-log-"+w,disabled:true,handler:function(){var A,z,t;A=p.getSelections();z=A[0].data.revision;t=A[1].data.revision;this.winDiff(m,n,z,t)}}]});s={region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{scope:this,xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:"Log",items:[o]}]}};x={title:"File: "+m+n,originTitle:"File: "+m+n,collapsible:false,id:"AF-PANEL-"+w,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"AF-FILE-"+w,isModified:false,parser:u,listeners:{scope:this,initialize:function(){this.getFile(w,m,n,"AF-PANEL-","AF-FILE-")},cmchange! :function(B,z,A){var t=Ext.util.JSON.decode(Ext.getCmp("AF-FILE-"+w).getCursorPosition());Ext.get("AF-status-line-"+w).dom.innerHTML=t.line;Ext.get("AF-status-col-"+w).dom.innerHTML=t.caracter;if(B!==27&&B!==33&&B!==34&&B!==37&&B!==38&&B!==39&&B!==40&&B!==17&&B!==16&&B!==67){if(!Ext.getCmp("AF-FILE-"+w).isModified){Ext.getCmp("AF-PANEL-"+w).setTitle(Ext.getCmp("AF-PANEL-"+w).originTitle+' <span style="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCmp("AF-"+w).setTitle(Ext.getCmp("AF-"+w).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("AF-PANEL-btn-save-"+w).enable();Ext.get("AF-PANEL-btn-save-"+w).frame("3F8538");Ext.getCmp("AF-PANEL-btn-saveas-"+w).enable();Ext.get("AF-PANEL-btn-saveas-"+w).frame("3F8538");Ext.getCmp("AF-FILE-"+w).isModified=true}}},cmcursormove:function(){var t=Ext.util.JSON.decode(Ext.getCmp("AF-FILE-"+w).getCursorPosition());Ext.get("AF-status-line-"+w).dom.innerHTML=t.line;Ext.get("AF-status-col-"+w).dom.i! nnerHTML=t.caracter}}}],bbar:[{scope:this,xtype:"panel",height:21,base Cls:"",bodyStyle:"padding-top:5px;",html:'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">Line: <span id="AF-status-line-'+w+'">-</span></span> <span class="x-status-text-panel">Col: <span id="AF-status-col-'+w+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:"<b>Save</b> this file",iconCls:"saveFile",id:"AF-PANEL-btn-save-"+w,disabled:true,handler:function(){Ext.getCmp("AF-PANEL-btn-save-"+w).disable();Ext.getCmp("AF-FILE-"+w).isModified=false;Ext.getCmp("AF-PANEL-"+w).setTitle(Ext.getCmp("AF-PANEL-"+w).originTitle);Ext.getCmp("AF-"+w).setTitle(Ext.getCmp("AF-"+w).originTitle);var t=Ext.MessageBox.wait("Saving data...");Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"save-file",filePath:m,fileName:n,fileLang:"all",fileContent:Ext.getCmp("AF-FILE-"+w).getCode()},success:function(A,z){var B=Ext.util.JSON.decode(A.responseText);if(B.success){this.addToPendingCommit(m,n);t.hide()}}})}},{scope! :this,tooltip:"<b>Save as</b> a patch",iconCls:"saveAsFile",id:"AF-PANEL-btn-saveas-"+w,disabled:true,handler:function(){this.savePatch("all",w,m,n,"AF",this)}},"->",{tooltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:function(){Ext.getCmp("AF-FILE-"+w).reIndentAll()}}]};if(q.attributes.extension==="gif"||q.attributes.extension==="png"){x={xtype:"panel",layout:"fit",bodyStyle:"padding:5px 5px 0",html:'<img src="/data/'+this.userLoggin+"/phpdoc-"+this.userLang+m+'" />'};s={}}Ext.getCmp("main-panel").add({closable:true,title:n,originTitle:n,tabTip:"in "+m,iconCls:"AllFiles",id:"AF-"+w,layout:"border",defaults:{collapsible:true,split:true},items:[x,s]});Ext.getCmp("main-panel").setActiveTab("AF-"+w)}else{Ext.getCmp("main-panel").setActiveTab("AF-"+w)}}}}});this.treeSort=new Ext.tree.TreeSorter(this.treeAllFiles,{folderSort:true});this.treeAllFilesRoot=new Ext.tree.AsyncTreeNode({text:"Repository",draggable:false,id:"/"});this.treeAllFiles.setRootNode(this.tr! eeAllFilesRoot);b=new Ext.menu.Menu({id:"mainMenu",items:[{scope:this, text:"Refresh all data",iconCls:"refresh",tooltip:"<b>Refresh all data</b><br>Cvs update & apply all tools",handler:this.WinUpdate},{scope:this,text:"Check Build",iconCls:"checkBuild",tooltip:"<b>Check your build</b> using configure.php script",handler:this.WinCheckBuild},"-",{scope:this,text:"Configure",iconCls:"iconConf",tooltip:"<b>Configure</b> this tool",id:"winconf-btn",handler:this.WinConf},"-",{scope:this,text:"Erase my personal data",iconCls:"iconErasePersonalData",tooltip:"<b>Log out</b>",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(m){if(m==="yes"){Ext.getBody().mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Please, wait...');Ext.Ajax.request({url:"./php/controller.php",params:{task:"erase-personal-data"},success:function(n){Ext.getBody().unmask();var p=Ext.util.JSON.decode(n.responseText! );if(p.success){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="/logout.php"}})}}})}})}},"-",{text:"Log out",iconCls:"iconLogOut",tooltip:"<b>Log out</b>",handler:function(){Ext.MessageBox.confirm("Confirm","Are you sure you want to logout?",function(m){if(m==="yes"){window.location.href="/logout.php"}})}},"-",{scope:this,text:"About",iconCls:"iconHelp",tooltip:"<b>About</b><br/>"+this.appName,id:"winabout-btn",handler:function(){this.WinAbout()}}]});d=new Ext.Viewport({layout:"border",items:[{region:"north",html:'<h1 class="x-panel-header"><img src="/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,b! order:false,tbar:[{text:"Main Menu",iconCls:"MainMenu",menu:b}],items: [{title:'Files Need Update - <em id="acc-need-update-nb">0</em>',id:"acc-need-update",layout:"fit",iconCls:"FilesNeedUpdate",items:[l],collapsed:true},{title:'Error in current translation - <em id="acc-error-nb">0</em>',id:"acc-error",layout:"fit",iconCls:"FilesError",items:[j],collapsed:true},{title:'Files Need Reviewed - <em id="acc-need-reviewed-nb">0</em>',id:"acc-need-reviewed",layout:"fit",iconCls:"FilesNeedReviewed",items:[h],collapsed:true},{title:"All files",id:"acc-all-files",layout:"fit",iconCls:"AllFiles",items:[this.treeAllFiles],collapsed:true},{title:'Pending for commit - <em id="acc-pendingCommit-nb">0</em>',id:"acc-need-pendingCommit",layout:"fit",iconCls:"PendingCommit",items:[c],collapsed:true},{title:'Pending Patch - <em id="acc-pendingPatch-nb">0</em>',id:"acc-need-pendingPatch",layout:"fit",iconCls:"PendingPatch",items:[a],collapsed:true}]}]},{region:"center",xtype:"tabpanel",id:"main-panel",activeTab:0,enableTabScroll:true,plugins:new Ext.ux.TabCloseMe! nu(),listeners:{scope:this,beforeremove:this.removeTabEvent},items:[{title:"Home",baseCls:"MainInfoTabPanel",xtype:"panel",autoScroll:true,id:"MainInfoTabPanel",plain:true,items:[{xtype:"panel",border:false,html:'<div class="res-block"><div class="res-block-inner"><h3>Connected as <em>'+this.userLoggin+"</em></h3></div></div>"},{xtype:"tabpanel",activeTab:0,plain:true,autoScroll:true,height:400,border:false,defaults:{border:true},items:[g,f,i,e,k]}]}]}]})}}}();Ext.EventManager.onDocumentReady(phpDoc.init,phpDoc,true); +function log(a){if(console){console.log(a)}}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.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:functio n(a){a.store.load.defer(20,a.store)}}});Ext.namespace("ui","ui.component","ui.component._CheckDoc");ui.component._CheckDoc.ds=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getCheckDocData"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"extension",mapping:"extension"},{name:"check_oldstyle",mapping:"check_oldstyle",type:"int"},{name:"check_undoc",mapping:"check_undoc",type:"int"},{name:"check_roleerror",mapping:"check_roleerror",type:"int"},{name:"check_badorder",mapping:"check_badorder",type:"int"},{name:"check_noseealso",mapping:"check_noseealso",type:"int"},{name:"check_noreturnvalues",mapping:"check_noreturnvalues",type:"int"},{name:"check_noparameters",mapping:"check_noparameters",type:"int"},{name:"check_noexamples",mapping:"check_noexamples",type:"int"},{name:"check_noerrors",mapping:"check_noerrors",typ! e:"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.compo! nent._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-selected-files").enable()}}}),columns:[new Ext.grid.RowNumberer(),{id:"file",header:"Files",sortable:true,dataIndex:"file"}],listeners:{rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c)},rowdblclick:function(a,c,b){phpDoc.openFile("en"+a.filepath,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=[];for(var b=0;b<a.getCount();++b){phpDoc.filePendingOpen[b]=["en"+c.filepath,a.getAt(b).data.file]}phpDoc.openFile(phpDoc.filePendingOpen[0][0],phpDoc.filePendingOpen[0][1]);c.close()}},{text:"Open selected files",id:"check-doc-btn-open-selected-files",disabled:true,handler:function(){var c=Ext.getCmp("check-doc-file-win"),b=Ext.getCmp("check-doc-file-grid").getSelectionModel().getSelections();phpDoc.filePendingOpen=[];for(var a=0;a<b.length;++a){phpDoc.filePendingOpen[a]=["en"+c.filepath,b[a].data.file]}phpDoc.openFile(phpDoc.filePendingOpen[0][0],phpDoc.filePendingOpen[0][1]);c.close()}}]});ui.component.CheckDoc=Ext.extend! (Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,store:ui.component .._CheckDoc.ds,columns:ui.component._CheckDoc.columns,autoExpandColumn:"extension",sm:new Ext.grid.CellSelectionModel({singleSelect:true}),view:new Ext.grid.GridView({forceFit:true}),listeners:{render:function(a){a.store.load.defer(20,a.store)},celldblclick:function(b,i,c,h){var a=b.getStore().getAt(i),g=b.getColumnModel().getDataIndex(c),f=a.get(g),d=a.data.path;if(Ext.num(f,false)&&f!=0){XHR({url:"./php/controller.php",params:{task:"getCheckDocFiles",path:d,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({filepath:d,items:[new ui.component._CheckDoc.FileGrid({filepath:d})]}).show()}})}}}});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,singleSele! ct:true,overClass:"x-view-over",itemSelector:"div.thumb-wrap",store:ui ..component._EditorConf.menuStore,listeners:{selectionchange:function(b,a){var c=b.getSelectedRecords();Ext.getCmp("confCard").layout.setActiveItem("conf-card-"+c[0].data.id)}}});ui.component._EditorConf.themeStore=new Ext.data.SimpleStore({fields:["themeFile",{name:"themeName",type:"string"}],data:[["themes/black/css/xtheme-black.css",_("Black")],["themes/empty.css",_("Default")],["themes/darkgray/css/xtheme-darkgray.css",_("DarkGray")],["js/extjs/resources/css/xtheme-gray.css",_("Gray")],["themes/gray-extend/css/xtheme-gray-extend.css",_("Gray Extend")],["themes/indigo/css/xtheme-indigo.css",_("Indigo")],["themes/midnight/css/xtheme-midnight.css",_("Midnight")],["themes/olive/css/xtheme-olive.css",_("Olive")],["themes/purple/css/xtheme-purple.css",_("Purple")],["js/extjs/resources/css/xtheme-slate.css",_("Slate")],["themes/silverCherry/css/xtheme-silverCherry.css",_("SilverCherry")]]});ui.component._EditorConf.card1=Ext.extend(Ext.form.FormPanel,{id:"conf-card-1",bodyStyle:! "padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Themes"),autoHeight:true,defaults:{hideLabel:true},items:[{xtype:"combo",id:"conf-combo-theme",valueField:"themeFile",displayField:"themeName",triggerAction:"all",mode:"local",forceSelection:true,editable:false,value:phpDoc.userConf.conf_theme,store:ui.component._EditorConf.themeStore,listeners:{render:function(){Ext.getCmp("conf-combo-theme").store.sort("themeName")},select:function(e,a,b){var d=e.getValue();Ext.get("appTheme").dom.href=d;phpDoc.confUpdate("conf_theme",d)}}}]}]});ui.component._EditorConf.card1.superclass.initComponent.call(this)}});ui.component._EditorConf.card2=Ext.extend(Ext.form.FormPanel,{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){phpDoc.confUpdate("conf_needupdate_diff",a.getRawValue())}}}},{name:"conf_needupdate_diff",checked:(phpDoc.userConf.conf_needupdate_diff==="using-exec")?true:false,boxLabel:_("Using diff -kk -u command line"),inputValue:"using-exec",listeners:{check:function(a){if(a.checked){phpDoc.confUpdate("conf_needupdate_diff",a.getRawValue())}}}}]},{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_needupdate_scrollbars",checked:(phpDoc.userConf.conf_needupdate_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){phpDoc.confUpdate("conf_needupdate_scrollbars",a.getValue())}}},{name:"conf_needupdate_displaylog",checked:(phpDoc.userConf.conf_needupdate_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_needu! pdate_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card2.superclass.initComponent.call(this)}});ui.component._EditorConf.card3=Ext.extend(Ext.form.FormPanel,{id:"conf-card-3",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Error type"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_error_skipnbliteraltag",checked:(phpDoc.userConf.conf_error_skipnbliteraltag==="true")?true:false,boxLabel:_("Skip nbLiteralTag error"),listeners:{check:function(a){phpDoc.confUpdate("conf_error_skipnbliteraltag",a.getValue())}}}]},{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_error_scrollbars",checked:(phpDoc.userConf.conf_error_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){phpDoc.confUpdate("conf_error_scrollbars",a.getValue())}}},{name:"conf_error_displaylog",checke! d:(phpDoc.userConf.conf_error_displaylog==="true")?true:false,boxLabel :_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_error_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card3.superclass.initComponent.call(this)}});ui.component._EditorConf.card4=Ext.extend(Ext.form.FormPanel,{id:"conf-card-4",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_reviewed_scrollbars",checked:(phpDoc.userConf.conf_reviewed_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){phpDoc.confUpdate("conf_reviewed_scrollbars",a.getValue())}}},{name:"conf_reviewed_displaylog",checked:(phpDoc.userConf.conf_reviewed_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_reviewed_displaylog",a.getValue())}}}]}]});ui.comp! onent._EditorConf.card4.superclass.initComponent.call(this)}});ui.component._EditorConf.card5=Ext.extend(Ext.form.FormPanel,{id:"conf-card-5",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_allfiles_displaylog",checked:(phpDoc.userConf.conf_allfiles_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_allfiles_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card5.superclass.initComponent.call(this)}});ui.component._EditorConf.card6=Ext.extend(Ext.form.FormPanel,{id:"conf-card-6",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_patch_scrollbars",checked:(phpDoc.userConf.conf_patch! _scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars") ,listeners:{check:function(a){phpDoc.confUpdate("conf_patch_scrollbars",a.getValue())}}},{name:"conf_patch_displaylog",checked:(phpDoc.userConf.conf_patch_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_patch_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card6.superclass.initComponent.call(this)}});ui.component.EditorConf=Ext.extend(Ext.Window,{id:"win-conf",layout:"border",width:550,height:400,iconCls:"iconConf",title:_("Configuration"),modal:true,plain:true,buttons:[{text:_("Close"),handler:function(){Ext.getCmp("win-conf").close()}}],listeners:{show:function(){var a=Ext.getCmp("conf-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,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)}});var phpDoc=function(){Ext.QuickTips.init();Ext.BLANK_IMAGE_URL="js/extjs/resources/images/default/s.gif";return{TaskPing:"",storeCommitLogMessage:"",storeFilesError:"",storeFilesNeedUpdate:"",storeFilesNeedReviewed:"",storeNotInEn:"",storePendingCommit:"",storePendingPatch:"",storeMailing:"",storeBugs:"",storeTranslators:"",storeSummary:"",userLogin:"",userLang:"",appName:"PhpDocumentation Onli! ne Editor",appVer:"0.2",uiRevision:"$Revision: 1.3 $",userConf:{conf_n eedupdate_diff:"using-exec",conf_needupdate_scrollbars:true,conf_needupdate_displaylog:false,conf_error_skipnbliteraltag:true,conf_error_scrollbars:true,conf_error_displaylog:false,conf_reviewed_scrollbars:true,conf_reviewed_displaylog:false,conf_allfiles_displaylog:false,conf_patch_scrollbars:true,conf_patch_displaylog:false,conf_theme:"themes/empty.css"},treeAllFiles:"",treeSort:"",treeAllFilesRoot:"",filePendingOpen:"",init:function(){Ext.getBody().on("contextmenu",function(a){a.stopEvent()},this);XHR({url:"./php/controller.php",params:{task:"getConf"},scope:this,success:function(a){var b=Ext.decode(a.responseText);this.userLogin=b.mess.userLogin;this.userLang=b.mess.userLang;this.userConf.conf_needupdate_diff=b.mess.userConf.conf_needupdate_diff;this.userConf.conf_needupdate_scrollbars=b.mess.userConf.conf_needupdate_scrollbars;this.userConf.conf_needupdate_displaylog=b.mess.userConf.conf_needupdate_displaylog;this.userConf.conf_error_skipnbliteraltag=b.mess.userConf.con! f_error_skipnbliteraltag;this.userConf.conf_error_scrollbars=b.mess.userConf.conf_error_scrollbars;this.userConf.conf_error_displaylog=b.mess.userConf.conf_error_displaylog;this.userConf.conf_reviewed_scrollbars=b.mess.userConf.conf_reviewed_scrollbars;this.userConf.conf_reviewed_displaylog=b.mess.userConf.conf_reviewed_displaylog;this.userConf.conf_allfiles_displaylog=b.mess.userConf.conf_allfiles_displaylog;this.userConf.conf_patch_scrollbars=b.mess.userConf.conf_patch_scrollbars;this.userConf.conf_patch_displaylog=b.mess.userConf.conf_patch_displaylog;this.userConf.conf_theme=b.mess.userConf.conf_theme;Ext.get("appTheme").dom.href=this.userConf.conf_theme;this.loadDataStore();this.drawInterface()}})},winForbidden:function(){Ext.MessageBox.alert(_("Forbidden"),_("You can't do this action as cvsread user."))},menuMarkupLANG:function(a,c){var d,b;b=new Ext.menu.Menu({items:[{text:_("Reviewed tag"),handler:function(){Ext.getCmp(a).insertIntoLine(2,"end","\n<!-- Reviewed: no ! -->");Ext.getCmp(a).focus()}},{text:_("Revcheck tag"),handler:function (){Ext.getCmp(a).insertIntoLine(2,"end","\n<!-- EN-Revision: 1.XX Maintainer: "+c.userLogin+" Status: ready -->");Ext.getCmp(a).focus()}}]});d={text:_("MarkUp"),iconCls:"iconInsertCode",menu:b};return d},menuMarkupEN:function(a){var c,b;b=new Ext.menu.Menu({items:[{text:_("Description section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,' <refsect1 role="description"><!-- {{{ -->\r\n &reftitle.description;\r\n <methodsynopsis>\r\n <!-- Example: All functions have this -->\r\n <type>thereturned type</type><methodname>func_name</methodname>\r\n <!-- Example: Required parameter -->\r\n <methodparam><type>param1type</type><parameter>firstparameter</parameter></methodparam>\r\n <!-- Example: Optional parameter, also by reference -->\r\n <methodparam choice="opt"><type>int</type><parameter role="reference">secondparameter</parameter></methodparam>\r\n <!-- Example: If no methodparams 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(a).focus()}},{text:_("Parameters section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="parameters"><!-- {{{ -->\r\n&reftitle.parameters;\r\n<para>\r\n<variablelist>\r\n<varlistentry>\r\n<term><parameter>firstparameter</parameter></term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n<varlistentry>\r\n<term>\r\n<parameter>secondparameter</parameter>\r\n</term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n</variablelist>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Return section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r! \n<refsect1 role="returnvalues"><!-- {{{ -->\r\n&reftitle.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(a).focus()}},{text:_("Error section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="errors"><!-- {{{ -->\r\n&reftitle.errors;\r\n<para>\r\nWhen does this function issue E_* level errors, and/or throw exceptions.\r\n</para>\r\n</refsect1><!-- }}} -->\r\n');Ext.getCmp(a).focus()}},{text:_("Unicode section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="unicode"><!-- {{{ -->\r\n&reftitle.unicode;\r\n<para>\r\nInformation specific to unicode, from the PHP 6 changes.\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Changelog section"),handler:function(){var d=Ext.uti! l.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="changelog"><!-- {{{ -->\r\n&reftitle.changelog;\r\n<para>\r\n<informaltable>\r\n<tgroup cols="2">\r\n<thead>\r\n<row>\r\n<entry>&Version;</entry>\r\n<entry>&Description;</entry>\r\n</row>\r\n</thead>\r\n<tbody>\r\n<row>\r\n<entry>Enter the version of change here</entry>\r\n<entry>\r\nDescribe the change\r\n</entry>\r\n</row>\r\n</tbody>\r\n</tgroup>\r\n</informaltable>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Examples section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,"\r\n<refsect1 role=\"examples\"><!-- {{{ -->\r\n&reftitle.examples;\r\n<para>\r\n<example xml:id=\"function-name.example.basic\"><!-- {{{ -->\r\n<title><function>function-name</function> example</title>\r\n<para>\r\nAny text that describes the purpose of the example, or what\r\ngoes on in the ex! ample 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(a).focus()}},{text:_("Notes section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="notes"><!-- {{{ -->\r\n&reftitle.notes;\r\n<caution>\r\n<para>\r\nAny notes that don\'t fit anywhere else should go here.\r\n90% of the time, notes, warnings or cautions are better placed in the\r\nparameters section. Consider that before using this section!\r\n</para>\r\n</caution>\r\n¬e.language-construct;\r\n¬e.not! -bin-safe;\r\n¬e.registerglobals;\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("SeeAlso section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="seealso"><!-- {{{ -->\r\n&reftitle.seealso;\r\n<para>\r\n<simplelist>\r\n<member><function>somefunc</function></member>\r\n<member><function>another_func</function></member>\r\n<member>The <link linkend="something">something appendix</link></member>\r\n</simplelist>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}}]});c={text:_("MarkUp"),iconCls:"iconInsertCode",menu:b};return c},loadDataStore:function(){this.storeCommitLogMessage=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getCommitLogMessage"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"text",mapping:"text"}])});this.storeFilesError=new E! xt.data.GroupingStore({autoLoad:(this.userLang==="en")?false:true,prox y:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesError"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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()}}});this.storeFilesNeedUpdate=new Ext.data.GroupingStore({autoLoad:(this.userLang==="en")?false:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNeedUpdate"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"revision",mapping:"revision"},{name:! "en_revision",mapping:"en_revision"},{name:"maintainer",mapping:"maintainer"},{name:"needcommit",mapping:"needcommit"},{name:"isCritical",mapping:"isCritical"}]),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-need-update-nb").innerHTML=a.getCount()}}});this.storeFilesNeedReviewed=new Ext.data.GroupingStore({autoLoad:(this.userLang==="en")?false:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNeedReviewed"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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()}}});this.storeNotInEn=new Ext.data.Group! ingStore({autoLoad:(this.userLang==="en")?false:true,proxy:new Ext.dat a.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNotInEn"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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()},add:function(a){Ext.getDom("acc-notInEn-nb").innerHTML=a.getCount()}}});this.storePendingCommit=new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesPendingCommit"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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:{datachanged:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()},add:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()}}});this.storePendingPatch=new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesPendingPatch"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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:{datachanged:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()},add:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()}}});this.storeMailing=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:! "getLastNews"},reader:new Ext.data.JsonReader({root:"Items",totalPrope rty:"nbItems",id:"id"},[{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"}])});this.storeMailing.setDefaultSort("pubDate","desc");this.storeBugs=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"},[{name:"id",mapping:"id"},{name:"title",mapping:"title"},{name:"link",mapping:"link"},{name:"description",mapping:"description"}])});this.storeTranslators=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"},[{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"}])});this.storeTranslators.setDefaultSort("nick","asc");this.storeSummary=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"},[{name:"id",mapping:"id"},{name:"libel",mapping:"libel"},{name:"nbFiles",mapping:"nbFiles"},{name:"percentFiles",mapping:"percentFiles"},{name:"sizeFiles",mapping:"sizeFiles"},{name:"percentSize",mapping:"percentSize"}])});this.storeSummary.on("load",function(){this.storeSummary.each(function(a){if(a.id===1){a.set("libel",_("Up to date files"))}if(a.id===2){a.set("libel",_("Old files"))}if(a.id===3){a.set("libel",_("Critical files"))}if(a.id===4){a.set("libel",_("Files without revision tag"))}if(a.id===5){a.set("libel",_("Files available for translation"))}if(! a.id===6){a.set("libel",_("Total"))}a.commit()},this)},this)},newTabCh eckDoc: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")},newTabBuildStatus:function(){var a=Ext.getCmp("tab-build-status");if(a===undefined){Ext.getCmp("main-panel").add({id:"tab-build-status",title:_("Translation build status"),iconCls:"BuildStatus",layout:"fit",closable:true,html:"nothing"});a=Ext.getCmp("tab-build-status")}if(a.items){a.removeAll(true)}a.add(new ui.component.BuildStatus());a.doLayout();Ext.getCmp("main-panel").setActiveTab("tab-build-status")},openFile:function(d,a){Ext.getCmp("acc-all-files").expand();var c=d.split("/");function b(f,e){f.expand(false,true,function(h){var g;h.ensureVisible();if(c[0]&&c[0]!==""){for(g=0;g<h.childNodes.length;g=g+1){if(h.c! hildNodes[g].text===c[0]){c.shift();b(h.childNodes[g],e)}}}else{for(g=0;g<h.childNodes.length;g=g+1){if(h.childNodes[g].text===a){h.childNodes[g].ensureVisible();h.childNodes[g].ui.highlight();e.treeAllFiles.fireEvent("dblclick",h.childNodes[g])}}}})}b(this.treeAllFilesRoot,this)},clearLocalChange:function(b,e,a,f,d){if(d.userLogin==="cvsread"){d.winForbidden();return}function c(g){if(g==="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-"+e+a))){Ext.getCmp("main-panel").remove("FNU-"+Ext.util.md5("FNU-"+e+a))}XHR({url:"./php/controller.php",params:{task:"clearLocalChange",FileType:b,FilePath:e,FileName:a},scope:d,success:function(h){if(this.userLang==="en"){this.storeFilesNeedUpdate.reload();this.storeFilesError.reload();this.storeFilesNeedReviewed.reload()}this.storePendingCommit.remove(this.storePendingCommit.getAt(f));this.storePendingCommi! t.fireEvent("add",this.storePendingCommit);this.storeNotInEn.each(func tion(j){if((this.userLang+j.data.path)===e&&j.data.name===a){j.set("needcommit",false)}},this);this.storeFilesNeedReviewed.each(function(j){if((this.userLang+j.data.path)===e&&j.data.name===a){j.set("needcommit",false)}},this);this.storeFilesNeedUpdate.each(function(j){if((this.userLang+j.data.path)===e&&j.data.name===a){j.set("needcommit",false)}},this);this.storeFilesError.each(function(j){if((this.userLang+j.data.path)===e&&j.data.name===a){j.set("needcommit",false)}},this);var i=this.treeAllFiles.getNodeById("//"+e+a);if(i){i.getUI().removeClass("modified")}Ext.getBody().unmask()},failure:function(h){Ext.getBody().unmask();this.winForbidden()}})}}Ext.MessageBox.confirm(_("Confirm"),_("This action will clear your local modification and take back this file from his original stats.<br/>You need confirm."),c,d)},rejectPatch:function(f,d,a,e,g,c){if(c.userLogin==="cvsread"){this.winForbidden();return}function b(h){if(h==="yes"){var i=Ext.MessageBox.wait(_("Please, wait..."));! XHR({scope:c,url:"./php/controller.php",params:{task:"afterPatchReject",PatchUniqID:e},success:function(j){this.storePendingPatch.remove(this.storePendingPatch.getAt(g));this.storePendingPatch.fireEvent("add",this.storePendingPatch);Ext.getCmp("main-panel").remove("PP-"+f);i.hide()},failure:function(j){i.hide();this.winForbidden()}})}}Ext.MessageBox.confirm(_("Confirm"),_("This action will <b>reject</b> this patch, send an email to his author and close this tab."),b,c)},saveFileViaPatch:function(e,c,a,d,g,b){function f(h){if(h==="yes"){Ext.getCmp("PP-PATCH-PANEL-btn-save-"+e).disable();Ext.getCmp("PP-PATCH-"+e).isModified=false;Ext.getCmp("PP-PATCH-PANEL-"+e).setTitle(Ext.getCmp("PP-PATCH-PANEL-"+e).originTitle);Ext.getCmp("PP-"+e).setTitle(Ext.getCmp("PP-"+e).originTitle);var i=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:b,url:"./php/controller.php",params:{task:"saveFile",filePath:c,fileName:a,fileLang:"all",fileContent:Ext.getCmp("PP-PATCH-"+e).getCode()},success! :function(j){var k=Ext.util.JSON.decode(j.responseText);this.addToPend ingCommit(k.id,c,a,"update");this.storePendingPatch.remove(this.storePendingPatch.getAt(g));this.storePendingPatch.fireEvent("add",this.storePendingPatch);XHR({scope:b,url:"./php/controller.php",params:{task:"afterPatchAccept",PatchUniqID:d}});i.hide();Ext.getCmp("main-panel").remove("PP-"+e)},failure:function(j){i.hide();this.winForbidden()}})}}Ext.MessageBox.confirm(_("Confirm"),_("This action will accept this patch, send an email to his author, save the file and close this tab."),f,b)},saveEnFile:function(e,c,a,d,g,b){if(b.userLogin==="cvsread"){b.winForbidden();return}Ext.getCmp(d+"-EN-PANEL-btn-save-"+e).disable();Ext.getCmp(d+"-"+e).isModifiedEn=false;Ext.getCmp(d+"-EN-PANEL-"+e).setTitle(Ext.getCmp(d+"-EN-PANEL-"+e).originTitle);if(!Ext.getCmp(d+"-"+e).isModifiedEn&&!Ext.getCmp(d+"-"+e).isModifiedLang){Ext.getCmp(d+"-"+e).setTitle(Ext.getCmp(d+"-"+e).originTitle)}var f=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:b,url:"./php/controller.php",params:{task:"saveF! ile",filePath:c,fileName:a,fileLang:"en",fileContent:Ext.getCmp(d+"-EN-"+e).getCode()},success:function(h){var i=Ext.util.JSON.decode(h.responseText);if(d==="FNU"){this.storeFilesNeedUpdate.getAt(g).set("en_revision","1."+i.en_revision);this.storeFilesNeedUpdate.getAt(g).set("needcommit",true)}if(d==="FE"){this.storeFilesError.getAt(g).set("needcommit",true)}if(d==="FNR"){this.storeFilesNeedReviewed.getAt(g).set("needcommit",true)}this.addToPendingCommit(i.id,"en"+c,a,"update");f.hide()},failure:function(h){f.hide();this.winForbidden()}})},savePatch:function(d,g,a,c,h,i){var b,f,e;if(d==="en"){b="-EN"}else{if(d==="all"){b=""}else{b="-LANG"}}if(i.userLogin!=="cvsread"){f=i.userLogin+"@php.net"}e=new Ext.Window({title:_("Do you want to be alerted ?"),iconCls:"patchAlert",width:350,height:150,resizable:false,modal:true,autoScroll:true,bodyStyle:"padding: 5px;",layout:"form",labelWidth:50,items:[{xtype:"panel",baseCls:"x-plain",bodyStyle:"padding-bottom: 10px;",html:_("If you w! ant to be notified when your patch will be dealt with, thank you to le ave an email address below.")},{xtype:"textfield",fieldLabel:_("Email"),name:"patch-email-alert",anchor:"100%",value:f}],buttons:[{text:_("Save"),handler:function(){var j,k;j=this.ownerCt.items.items[1].getValue();k=Ext.MessageBox.wait(_("Saving data as a patch..."));e.close();if(d!=="all"){Ext.getCmp(h+b+"-PANEL-btn-saveas-"+g).disable();Ext.getCmp(h+b+"-"+g).isModifiedLang=false;Ext.getCmp(h+b+"-PANEL-"+g).setTitle(Ext.getCmp(h+b+"-PANEL-"+g).originTitle);Ext.getCmp(h+"-"+g).setTitle(Ext.getCmp(h+"-"+g).originTitle)}else{Ext.getCmp("AF-PANEL-btn-saveas-"+g).disable();Ext.getCmp("AF-FILE-"+g).isModified=false;Ext.getCmp("AF-PANEL-"+g).setTitle(Ext.getCmp("AF-PANEL-"+g).originTitle);Ext.getCmp("AF-"+g).setTitle(Ext.getCmp("AF-"+g).originTitle)}XHR({scope:i,url:"./php/controller.php",params:{task:"saveFile",filePath:a,fileName:c,fileLang:d,fileContent:(d!=="all")?Ext.getCmp(h+b+"-"+g).getCode():Ext.getCmp("AF-FILE-"+g).getCode(),type:"patch",emailAlert:j},success:function(l){! var m=Ext.util.JSON.decode(l.responseText);if(d!=="all"){this.addToPendingPatch(d+a,c,m.uniqId)}else{this.addToPendingPatch(a,c,m.uniqId)}k.hide()}})}},{text:_("Cancel"),handler:function(){e.close()}}]});e.show()},saveLangFile:function(f,d,b,e,g,c){if(c.userLogin==="cvsread"){c.winForbidden();return}function a(h){if(h==="no"){Ext.getCmp(e+"-LANG-PANEL-btn-save-"+f).disable();Ext.getCmp(e+"-"+f).isModifiedLang=false;Ext.getCmp(e+"-LANG-PANEL-"+f).setTitle(Ext.getCmp(e+"-LANG-PANEL-"+f).originTitle);if(!Ext.getCmp(e+"-"+f).isModifiedEn&&!Ext.getCmp(e+"-"+f).isModifiedLang){Ext.getCmp(e+"-"+f).setTitle(Ext.getCmp(e+"-"+f).originTitle)}var i=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:d,fileName:b,fileLang:this.userLang,fileContent:Ext.getCmp(e+"-LANG-"+f).getCode()},success:function(j){var k=Ext.util.JSON.decode(j.responseText);if(e==="FE"){this.storeFilesError.getAt(g).set("needcommit",true);this.storeFi! lesError.getAt(g).set("maintainer",k.maintainer);this.storeFilesError. getAt(g).commit()}if(e==="FNU"){this.storeFilesNeedUpdate.getAt(g).set("revision","1."+k.new_revision);this.storeFilesNeedUpdate.getAt(g).set("needcommit",true);this.storeFilesNeedUpdate.getAt(g).set("maintainer",k.maintainer);this.storeFilesNeedUpdate.getAt(g).commit()}if(e==="FNR"){this.storeFilesNeedReviewed.getAt(g).set("needcommit",true);this.storeFilesNeedReviewed.getAt(g).set("maintainer",k.maintainer);this.storeFilesNeedReviewed.getAt(g).set("reviewed",k.reviewed);this.storeFilesNeedReviewed.getAt(g).commit()}this.addToPendingCommit(k.id,this.userLang+d,b,"update");i.hide()},failure:function(j){i.hide();this.winForbidden()}})}else{if(h==="yes"){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Checking for error. Please, wait..."));Ext.getCmp(e+"-LANG-PANEL-btn-save-"+f).disable();Ext.getCmp(e+"-"+f).isModifiedLang=false;Ext.getCmp(e+"-LANG-PANEL-"+f).setTitle(Ext.getCmp(e+"-LANG-PANEL-"+f).originTitle);if(!Ext.getCmp(e+"-"! +f).isModifiedEn&&!Ext.getCmp(e+"-"+f).isModifiedLang){Ext.getCmp(e+"-"+f).setTitle(Ext.getCmp(e+"-"+f).originTitle)}XHR({scope:this,url:"./php/controller.php",params:{task:"checkFileError",FilePath:d,FileName:b,FileLang:this.userLang,FileContent:Ext.getCmp(e+"-LANG-"+f).getCode()},success:function(j){Ext.getBody().unmask();var k=Ext.util.JSON.decode(j.responseText);if(k.error&&k.error_first!=="-No error-"){Ext.getCmp("main-panel").add({closable:true,title:"Error in "+b,iconCls:"FilesError",id:"FE-help-"+f,autoScroll:true,autoLoad:"./error_type.php?dir="+d+"&file="+b});Ext.getCmp("main-panel").setActiveTab("FE-help-"+f)}else{Ext.MessageBox.show({title:_("Check for errors"),msg:_("There is no error."),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO})}XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:d,fileName:b,fileLang:this.userLang,fileContent:Ext.getCmp(e+"-LANG-"+f).getCode()},success:function(l){var m=Ext.util.JSON.decode(l.responseText);if! (e==="FE"){this.storeFilesError.getAt(g).set("needcommit",true);this.s toreFilesError.getAt(g).set("maintainer",m.maintainer);this.storeFilesError.getAt(g).commit()}if(e==="FNU"){this.storeFilesNeedUpdate.getAt(g).set("revision","1."+m.new_revision);this.storeFilesNeedUpdate.getAt(g).set("needcommit",true);this.storeFilesNeedUpdate.getAt(g).set("maintainer",m.maintainer);this.storeFilesNeedUpdate.getAt(g).commit()}if(e==="FNR"){this.storeFilesNeedReviewed.getAt(g).set("needcommit",true);this.storeFilesNeedReviewed.getAt(g).set("maintainer",m.maintainer);this.storeFilesNeedReviewed.getAt(g).set("reviewed",m.reviewed);this.storeFilesNeedReviewed.getAt(g).commit()}this.addToPendingCommit(m.id,this.userLang+d,b,"update")},failure:function(l){this.winForbidden()}});if(e==="FE"){Ext.getCmp(e+"-error-type-"+f).setSrc("./error_type.php?dir="+d+"&file="+b+"&nocache="+new Date().getTime())}}})}}}Ext.MessageBox.show({scope:c,title:_("Confirm"),msg:_("Do you want to check for error before saving?"),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCE! L,fn:a})},getFile:function(e,d,a,c,b){Ext.get(c+e).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Loading..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getFile",FilePath:d,FileName:a},success:function(f){var h=Ext.util.JSON.decode(f.responseText);Ext.getCmp(b+e).setCode(h.content);Ext.get(c+e).unmask();if(c==="FE-LANG-PANEL-"||c==="FNR-LANG-PANEL-"||c==="FNR-EN-PANEL-"||c==="AF-PANEL-"){var g=Ext.getCmp(c+e).getSize();g.height=g.height+1;Ext.getCmp(c+e).setSize(g);Ext.getCmp(c+e).fireEvent("resize")}},callback:function(){if(this.filePendingOpen[0]){this.filePendingOpen.shift();if(this.filePendingOpen[0]){if(this.filePendingOpen[0][0]){this.openFile(this.filePendingOpen[0][0],this.filePendingOpen[0][1])}}}}})},addToPendingPatch:function(b,a,e){var d,c;d=new Date();c=new this.storePendingPatch.recordType({id:Ext.id("",""),path:b,name:a,by:this.userLogin,uniqID:e,date:d});this.storePendingPatch.insert(0,c)},addToPendingCommit:f! unction(g,e,a,d){var c,f,b;c=false;this.storePendingCommit.each(functi on(h){if(h.data.path===e&&h.data.name===a){c=true}});if(!c){f=new Date();b=new this.storePendingCommit.recordType({id:g,path:e,name:a,by:this.userLogin,date:f,type:d});this.storePendingCommit.insert(0,b);this.storePendingCommit.groupBy("path",true)}},rendererNumUptodate:function(a){if(a==="0"){return}else{return'<span style="color:green; font-weight: bold;">'+a+"</span>"}},rendererNumCritical:function(a){if(a==="0"){return}else{return'<span style="color:red; font-weight: bold;">'+a+"</span>"}},rendererTotalTranslator:function(a,c,b){return a?((a===0||a>1)?"("+a+" Translators)":"(1 Translator)"):""},rendererSum:function(a){return(a==="0")?"":a},NewTabBugs:function(a,b,c){Ext.getCmp("main-panel").add({xtype:"iframepanel",id:"mifp_bugs_"+a,title:_("Loading..."),tabTip:c,iconCls:"iconBugs",loadMask:true,defaultSrc:b,listeners:{documentloaded:function(d){d.ownerCt.setTitle(Ext.util.Format.substr(c,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_bugs_"+a)},NewTabMaili! ng:function(a,c,b){Ext.getCmp("main-panel").add({xtype:"iframepanel",id:"mifp_"+a,title:_("Loading..."),tabTip:b,iconCls:"home-mailing-title",loadMask:true,defaultSrc:c,listeners:{documentloaded:function(d){d.ownerCt.setTitle(Ext.util.Format.substr(b,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_"+a)},winDiff:function(d,b,c,a){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Finding the diff. Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getDiff2",FilePath:d,FileName:b,Rev1:c,Rev2:a},success:function(f){var g=Ext.util.JSON.decode(f.responseText);Ext.getBody().unmask();var e=new Ext.Window({title:String.format(_("Diff between {0} & {1}"),c,a),width:650,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:'<div class="diff-content">'+g.content+"</div>",buttons:[{text:"Close",handler:function(){e.close()}}]});e.show()}})},removeTabEvent:functi! on(d,e){var b,c,f,a;a=e.id.split("-");if((a[0]==="FE"||a[0]==="FNU"||a [0]==="FNR"||a[0]==="PP"||a[0]==="AF")&&a[1]!=="help"){if(a[0]==="FE"){b=Ext.getCmp("FE-"+a[1]).isModifiedLang}if(a[0]==="FNU"){b=Ext.getCmp("FNU-"+a[1]).isModifiedLang}if(a[0]==="FNR"){b=Ext.getCmp("FNR-"+a[1]).isModifiedLang}if(a[0]==="FE"){c=Ext.getCmp("FE-"+a[1]).isModifiedEn}if(a[0]==="FNU"){c=Ext.getCmp("FNU-"+a[1]).isModifiedEn}if(a[0]==="FNR"){c=Ext.getCmp("FNR-"+a[1]).isModifiedEn}if(a[0]==="PP"){f=Ext.getCmp("PP-PATCH-"+a[1]).isModified}if(a[0]==="AF"){f=Ext.getCmp("AF-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)}}})}else{return true}return false}else{return true}},WinCommit:function(j,i,e){var f,c,k,g,a,b,d,h;c=Ext.get("acc-need-update");if(!f){f=new Ext.W! indow({scope:this,id:"winCvsCommit",title:_("CVS commit"),closable:false,layout:"form",width:400,height:480,resizable:false,modal:true,bodyStyle:"padding:5px 5px 0",labelAlign:"top",items:[{xtype:"checktreepanel",id:"tree-panel",anchor:"100%",height:180,autoScroll:true,rootVisible:false,root:{text:"root",expanded:true,children:[]}},{scope:this,xtype:"combo",fieldLabel:_("Older messages"),editable:false,name:"first2",anchor:"100%",store:this.storeCommitLogMessage,triggerAction:"all",tpl:'<tpl for="."><div class="x-combo-list-item">{[values.text.split("\n").join("<br/>")]}</div></tpl>',valueField:"id",displayField:"text",listeners:{scope:this,render:function(){this.storeCommitLogMessage.load()},select:function(n,l,m){Ext.getCmp("form-commit-message-log").setValue(l.data.text)}}},{xtype:"textarea",id:"form-commit-message-log",fieldLabel:_("Log message"),name:"first3",anchor:"100%",height:150,value:""}],tools:[{scope:this,id:"gear",qtip:_("Configure this tools"),handler:functio! n(){var o,m,n;function l(p){return p.split("\n").join("<br/>")}o=new E xt.form.TextArea({grow:true,growMin:120});m=new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),{id:"GridManageLog",header:_("Log message"),dataIndex:"text",renderer:l,editor:new Ext.Editor(o,{shadow:false,autoSize:true,listeners:{scope:this,complete:function(r,s,q){var p=r.record.data.id;XHR({scope:this,url:"./php/controller.php",params:{task:"saveLogMessage",messID:p,mess:s},success:function(t){this.storeCommitLogMessage.getById(p).commit()},failure:function(t){this.winForbidden()}})}}})}]);n=new Ext.Window({title:_("Manage Log Message"),iconCls:"winManageLog",width:650,height:350,layout:"fit",resizable:false,modal:true,autoScroll:true,html:'<div class="diff-content"></div>',items:[{xtype:"editorgrid",store:this.storeCommitLogMessage,loadMask:true,cm:m,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),autoExpandColumn:"GridManageLog",listeners:{scope:this,rowcontextmenu:function(p,s,q){p.getSelectionModel().selectRow(s);var r=new Ext.menu.Menu({items:[{text:_("Delete! this Log Message"),iconCls:"iconDelete",scope:this,handler:function(){XHR({scope:this,url:"./php/controller.php",params:{task:"deleteLogMessage",messID:this.storeCommitLogMessage.getAt(s).data.id},success:function(t){this.storeCommitLogMessage.remove(this.storeCommitLogMessage.getAt(s))},failure:function(t){this.winForbidden()}})}}]});r.showAt(q.getXY())}}}],buttons:[{text:_("Close"),handler:function(){n.close()}}],listeners:{scope:this,close:function(){this.storeCommitLogMessage.reload()}}});n.show()}}],buttons:[{scope:this,text:_("Submit"),id:"win-commit-btn-submit",handler:function(){var l,p,s,u,m,n,q=[],t,r="",o;if(this.userLogin==="cvsread"){f.close();this.winForbidden();return}l=Ext.getCmp("tree-panel").getValue();p=[];for(o=0;o<l.length;o=o+1){s=Ext.getCmp("tree-panel").getNodeById(l[o]).attributes;u="FE-"+Ext.util.md5("FE-"+s.FilePath+s.FileName);m="FNU-"+Ext.util.md5("FNU-"+s.FilePath+s.FileName);n="FNR-"+Ext.util.md5("FNR-"+s.FilePath+s.FileName);if(Ext.getCmp("m! ain-panel").findById(u)||Ext.getCmp("main-panel").findById(m)||Ext.get Cmp("main-panel").findById(n)){if(Ext.getCmp("main-panel").findById(u)){t=u}if(Ext.getCmp("main-panel").findById(m)){t=m}if(Ext.getCmp("main-panel").findById(n)){t=n}q[0]=t;q[1]=s.FileName;p.push(q)}}if(p.length>0){for(o=0;o<p.length;o=o+1){r+=p[o][1]+"<br/>"}Ext.MessageBox.show({scope:this,title:"Warning",msg:(p.length>1)?String.format(_("There is {0} files to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?"),p.length,r):String.format(_("There is {0} file to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?"),p.length,r),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,fn:function(v){if(v==="yes"){for(o=0;o<p.length;o=o+1){Ext.getCmp("main-panel").remove(p[o][0])}this.WinCommitLastStep(l,this)}else{return}}})}else{this.WinCommitLastStep(l,this)}return}},{text:_("Close"),id:"win-commit-btn-close",handler:function(){f.close()}}]})}f.show(c);if(j){k=this.storePendingCommit.getAt(i).data.id;a=this.storePendingCo! mmit.getAt(i).data.path;b=this.storePendingCommit.getAt(i).data.name;g=Ext.util.md5(a+b);d=new Ext.tree.TreeNode({id:"need-commit-"+g,text:a+b,FileDBID:k,FilePath:a,FileName:b,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(d)}else{this.storePendingCommit.each(function(l){if(e&&e==="by me"&&l.data.by!==this.userLogin){}else{k=l.data.id;a=l.data.path;b=l.data.name;g=Ext.util.md5(a+b);d=new Ext.tree.TreeNode({id:"need-commit-"+g,text:a+b,FileDBID:k,FilePath:a,FileName:b,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(d)}},this);h=new Ext.tree.TreeSorter(Ext.getCmp("tree-panel"),{});h.doSort(Ext.getCmp("tree-panel").getRootNode())}},WinCommitLastStep:function(f,c){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait until commit..."));var a=[],e,d,b;for(b=0;b<f.length;b=b+1){e=Ext.getCmp("tre! e-panel").getNodeById(f[b]);a.push(e.attributes.FileDBID)}d=Ext.getCmp ("form-commit-message-log").getValue();Ext.getCmp("winCvsCommit").close();XHR({url:"./php/controller.php",params:{task:"cvsCommit",nodes:Ext.util.JSON.encode(a),logMessage:d},success:function(h){var i=Ext.util.JSON.decode(h.responseText);Ext.getBody().unmask();var g=new Ext.Window({title:_("Status"),width:450,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:i.mess.join("<br/>"),buttons:[{text:_("Close"),handler:function(){g.close()}}]});g.show();Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"onSuccesCommit",nodes:Ext.util.JSON.encode(a),logMessage:d},success:function(j){if(c.userLang!="en"){c.storeFilesError.reload();c.storeFilesNeedReviewed.reload();c.storeFilesNeedUpdate.reload()}c.storePendingCommit.reload();c.storeTranslators.reload();c.storeSummary.reload();Ext.getBody().unmask()}})}})},WinUpdate:fun! ction(){var e,d;function c(f){f.TaskPing.cancel();Ext.get("wizard-step-1").replaceClass("wizard-step-before","wizard-step-working");Ext.get("wizard-step-1.1").replaceClass("wizard-wait","wizard-show");XHR({scope:f,url:"./php/controller.php",params:{task:"updateRepository"},success:function(g){Ext.get("wizard-step-1").replaceClass("wizard-step-working","wizard-step-done");Ext.get("wizard-step-1.1").replaceClass("wizard-show","wizard-wait");b(f)},failure:function(h){var j=Ext.util.JSON.decode(h.responseText);if(j.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.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)}}})}va! r g=new Ext.util.DelayedTask(function(){i()});g.delay(5000)}}})}functi on 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.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-working");if(f.userLang!="en"){f.storeFilesNeedUpdate.reload();f.storeTranslators.reload();f.storeFilesError.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();f.TaskPing.delay(30000);e.tools.close.setVisible(true)}d=Ext.get("acc-need-update");if(!e){e=new Ext.Window({title:_("Refresh all data"),layout:"form",width:300,height:200,resizable:false,modal:true,bodyStyle:"padding:15px 15px 0",iconCls:"refresh",html:'<div id="wizard-step-1" class="wizard-step-before">'+_("Update all files from Cvs")+'</div><div id="wizard-step-1.1" class="wizard-wait">'+_("This may take time. Thank you for your patience...")+'</div><div id="wizard-step-2" class="wizard-step-before">'+_("Apply all tools")+'</div><div id="wizard-step-3" class="wizard-step-before">'+_("Reload data")+"</div>",buttons:[{scope:this,text:_("Start"),id:"btn-start-refresh",iconCls:"startRefresh",handler:function(){Ext.getCmp("btn-start-refresh").disable();e.tools.close.s! etVisible(false);Ext.getDom("lastUpdateTime").innerHTML=_("update in p rogress...");c(this)}}]})}Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Verify if there is an update in progress. Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getLastUpdate"},success:function(f){Ext.getBody().unmask();var g=Ext.util.JSON.decode(f.responseText);if(g.lastupdate==="in_progress"){Ext.MessageBox.show({title:_("Status"),msg:_("There is currently an update in progress.<br/>You can't perform an update now."),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO})}else{e.show(d)}}})},WinCheckBuild:function(){var c,a;a=Ext.get("acc-need-update");function b(d){XHR({scope:d,url:"./php/controller.php",params:{task:"getLogFile",file:"log_check_build"},success:function(e){var f=Ext.util.JSON.decode(e.responseText);this.TaskPing.delay(30000);if(Ext.getCmp("main-panel").findById("check_build_panel")){Ext.getCmp("main-panel").remove("check_build_panel")}Ext.getCmp("main-panel").add({xtype:"panel",id:"check_build! _panel",title:_("Check Build Result"),closable:true,autoScroll:true,iconCls:"checkBuild",html:'<div class="check-build-content">'+f.mess+"</div>"});Ext.getCmp("main-panel").setActiveTab("check_build_panel")}})}if(!c){c=new Ext.Window({title:_("Check Build"),iconCls:"checkBuild",layout:"form",width:350,height:200,resizable:false,modal:true,bodyStyle:"padding:5px 5px 0",labelAlign:"top",buttons:[{scope:this,text:_("Go !"),id:"win-check-build-btn-submit",handler:function(){var d=Ext.getCmp("option-xml-details").checked;c.close();Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait until the build is checked..."));this.TaskPing.cancel();XHR({scope:this,url:"./php/controller.php",params:{task:"checkBuild",xmlDetails:d},success:function(e){Ext.getBody().unmask();b(this)},failure:function(e){var h=Ext.util.JSON.decode(e.responseText);if(h.success===false){this.TaskPing.delay(30000);Ext.getBody().unmask();this.winForbidden()}els! e{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.success===false){Ext.getBody().unmask();b(this)}else{g.delay(5000)}}})}var g=new Ext.util.DelayedTask(function(){f(this)},this);g.delay(5000)}}})}}],items:[{xtype:"panel",baseCls:"x-plain",bodyStyle:"padding:5px 5px 0",html:_("You're about to check the build via this command:")+"<br/><br/>/usr/bin/php configure.php --with-lang="+this.userLang+"<br><br>",modal:false},{xtype:"checkbox",hideLabel:true,checked:false,boxLabel:_("Enable detailed XML error messages"),name:"option-xml-details",id:"option-xml-details"}]})}c.show(a)},WinConf:function(){new ui.component.EditorConf().show(Ext.get("winconf-btn"))},confUpdate:function(b,a){XHR({scope:this,url:"./php/controller.php",params:{task:"confUpdate",item:b,value:a},success:function(c){if(b==="conf_theme"){this.userConf.conf_theme=a}if(b==="conf_needupdate_diff"){this.userConf.conf_needu! pdate_diff=a}if(b==="conf_needupdate_scrollbars"){this.userConf.conf_needupdate_scrollbars=""+a+""}if(b==="conf_needupdate_displaylog"){this.userConf.conf_needupdate_displaylog=""+a+""}if(b==="conf_error_skipnbliteraltag"){this.userConf.conf_error_skipnbliteraltag=""+a+"";this.storeFilesError.reload()}if(b==="conf_error_scrollbars"){this.userConf.conf_error_scrollbars=""+a+""}if(b==="conf_error_displaylog"){this.userConf.conf_error_displaylog=""+a+""}if(b==="conf_reviewed_scrollbars"){this.userConf.conf_reviewed_scrollbars=""+a+""}if(b==="conf_reviewed_displaylog"){this.userConf.conf_reviewed_displaylog=""+a+""}if(b==="conf_allfiles_displaylog"){this.userConf.conf_allfiles_displaylog=""+a+""}if(b==="conf_patch_scrollbars"){this.userConf.conf_patch_scrollbars=""+a+""}if(b==="conf_patch_displaylog"){this.userConf.conf_patch_displaylog=""+a+""}}})},WinAbout:function(){var a;if(!a){a=new Ext.Window({layout:"fit",width:515,height:320,iconCls:"iconHelp",modal:true,title:String.fo! rmat(_("About {0}"),this.appName),closeAction:"hide",plain:true,bodySt yle:"color:#000",items:new Ext.TabPanel({autoTabs:true,activeTab:0,border:false,defaults:{autoScroll:true},items:[{title:_("About"),html:'<div id="phd-oe-about"><img src="themes/img/logo.png" alt="'+this.appName+'" /></div><div id="phd-oe-about-info">'+this.appName+" ver "+this.appVer+"<br/>UI: "+this.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-cr! edit-info">'+_("Icon pack")+"</div></li></ul></div>"},{title:_("License"),autoLoad:{url:"./LICENSE"}}]}),buttons:[{text:_("Close"),handler:function(){a.hide()}}]})}a.show(Ext.get("winabout-btn"))},sendEmail:function(b,a){var c,d;c=new Ext.form.FormPanel({baseCls:"x-plain",labelWidth:55,url:"save-form.php",defaultType:"textfield",items:[{fieldLabel:_("Send To"),name:"to",readOnly:true,anchor:"100%",value:'"'+b+'" <'+a+">"},{fieldLabel:_("Subject"),name:"subject",anchor:"100%"},{xtype:"textarea",hideLabel:true,name:"msg",anchor:"100% -53"}]});d=new Ext.Window({title:_("Send an email"),width:500,height:300,minWidth:300,minHeight:200,layout:"fit",plain:true,bodyStyle:"padding:5px;",buttonAlign:"center",items:c,iconCls:"iconSendEmail",buttons:[{text:_("Send"),handler:function(){var e=c.getForm().getValues();XHR({url:"./php/controller.php",params:{task:"sendEmail",to:e.to,subject:e.subject,msg:e.msg},success:function(f){d.close();Ext.MessageBox.alert(_("Status"),String.format(_("! Email sent to {0} with success!"),b))}})}},{text:_("Cancel"),handler:f unction(){d.close()}}]});d.show()},drawInterface:function(){var l,n,a,c,j,i,g,k,h,f,m,b,d,e;this.TaskPing=new Ext.util.DelayedTask(function(){XHR({url:"./php/controller.php",params:{task:"ping"},success:function(p){var r=Ext.util.JSON.decode(p.responseText);if(r.ping!=="pong"){window.location.href="./"}else{if(r.lastupdate==="in_progress"){Ext.getDom("lastUpdateTime").innerHTML=_("update in progress...")}else{var q=Date.parseDate(r.lastupdate,"Y-m-d H:i:s");Ext.getDom("lastUpdateTime").innerHTML=q.format(_("Y-m-d, H:i"))}}},failure:function(){window.location.href="./"}});this.TaskPing.delay(30000)},this);this.TaskPing.delay(30000);l=new Ext.grid.GridPanel({store:this.storeFilesError,loadMask:true,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}],view:new Ext.grid.GroupingView({em! ptyText:'<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(o,r,q,p){if(o.data.needcommit){return"file-need-commit"}}}),autoExpandColumn:"name",bodyBorder:false,tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FE-filter",validationEvent:false,validateOnBlur:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",hideTrigger1:true,width:180,scope:this,enableKeyEvents:true,listeners:{keypress:function(p,o){if(o.getKey()==o.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();this.scope.storeFilesError.clearFilter()},onTrigger2Click:function(){var o=this.getValue();if(o==""||o.length<3){this.markInvalid(_("Your filter must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();this.scope.storeFile! sError.filter("maintainer",o)}})],listeners:{scope:this,render:functio n(o){l.view.refresh()},rowdblclick:function(q,A,w){var p,r,x,v,y,o,u,t,s,B,z;p=this.storeFilesError.getAt(A).data.path;r=this.storeFilesError.getAt(A).data.name;x=Ext.util.md5("FE-"+this.userLang+p+r);v=this.storeFilesError.getAt(A).data.needcommit;if(!Ext.getCmp("main-panel").findById("FE-"+x)){y=[];this.storeFilesError.each(function(C){if(C.data.path===p&&C.data.name===r){if(!y[C.data.type]){y.push(C.data.type)}}});o=new Ext.data.Store({autoLoad:(this.userConf.conf_error_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:this.userLang+p,File:r},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});o.setDefaultSort("date","desc");u=new Ext.data.Store({autoLoad:(this.userConf.conf_err! or_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:"en"+p,File:r},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});u.setDefaultSort("date","desc");t=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(D){var C=D.getCount();if(C===2){return false}},rowselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FE-PANEL-btn-logLang-"+x).enable();Ext.get("FE-PANEL-btn-logLang-"+x).frame("3F8538")}else{Ext.getCmp("FE-PANEL-btn-logLang-"+x).disable()}},rowdeselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FE-PANEL-btn-logLang-"+x).enable();Ext.get("FE-PANEL-btn-logLang-"+x).frame("3F8538")}else{Ext.getCmp("FE-PA! NEL-btn-logLang-"+x).disable()}}}});s=new Ext.grid.GridPanel({store:o, loadMask:true,columns:[t,{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"))}],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:t,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:_("<b>View</b> the diff"),iconCls:"iconViewDiff",id:"FE-PANEL-btn-logLang-"+x,disabled:true,handler:function(){var E,D,C;E=t.getSelections();D=E[0].data.revision;C=E[1].data.revision;this.winDiff(this.userLang+p,r,D,C)}},{scope:this,tooltip:_("<b>Load/Refresh</b> revisions"),iconCls:"refresh",id:"FE-PANEL-btn-refreshlogLang-"+x,handler:function(){o.reload()}}]});B=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(D){var C=D.getCount();if(C===2){return ! false}},rowselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FE-PANEL-btn-logEn-"+x).enable();Ext.get("FE-PANEL-btn-logEn-"+x).frame("3F8538")}else{Ext.getCmp("FE-PANEL-btn-logEn-"+x).disable()}},rowdeselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FE-PANEL-btn-logEn-"+x).enable();Ext.get("FE-PANEL-btn-logEn-"+x).frame("3F8538")}else{Ext.getCmp("FE-PANEL-btn-logEn-"+x).disable()}}}});z=new Ext.grid.GridPanel({store:u,loadMask:true,columns:[B,{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"))}],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:B,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:_("<b>View</b> the diff"),iconCls:"iconViewDiff",id:"FE-PANEL-btn-logEn-"! +x,disabled:true,handler:function(){var E,D,C;E=B.getSelections();D=E[ 0].data.revision;C=E[1].data.revision;this.winDiff("en"+p,r,D,C)}},{scope:this,tooltip:_("<b>Load/Refresh</b> revisions"),iconCls:"refresh",id:"FE-PANEL-btn-refreshlogEn-"+x,handler:function(){u.reload()}}]});Ext.getCmp("main-panel").add({closable:true,title:r,originTitle:r,tabTip:String.format(_("File with error : in {0}"),p),iconCls:"iconTabError",id:"FE-"+x,isModifiedLang:false,isModifiedEn:false,layout:"border",defaults:{collapsible:true,split:true},items:[{xtype:"panel",layout:"fit",region:"north",title:_("Error description"),id:"FE-error-desc-"+x,height:150,collapsed:true,items:{xtype:"iframepanel",id:"FE-error-type-"+x,loadMask:true,defaultSrc:"./error_type.php?dir="+p+"&file="+r}},{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:this.userLang,items:[s]},{layout:"fit",title:"En",items:[z]}]}},{title:String.for! mat(_("{0} File: "),this.userLang)+p+r,originTitle:String.format(_("{0} File: "),this.userLang)+p+r,collapsible:false,id:"FE-LANG-PANEL-"+x,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"FE-LANG-"+x,listeners:{scope:this,initialize:function(C){this.getFile(x,this.userLang+p,r,"FE-LANG-PANEL-","FE-LANG-")},cmcursormove:function(){var C=Ext.util.JSON.decode(Ext.getCmp("FE-LANG-"+x).getCursorPosition());Ext.get("FE-LANG-status-line-"+x).dom.innerHTML=C.line;Ext.get("FE-LANG-status-col-"+x).dom.innerHTML=C.caracter},cmchange:function(F,D,E){var C=Ext.util.JSON.decode(Ext.getCmp("FE-LANG-"+x).getCursorPosition());Ext.get("FE-LANG-status-line-"+x).dom.innerHTML=C.line;Ext.get("FE-LANG-status-col-"+x).dom.innerHTML=C.caracter;if(F!==27&&F!==33&&F!==34&&F!==37&&F!==38&&F!==39&&F!==40&&F!==17&&F!==16&&F!==67){if(!Ext.getCmp("FE-"+x).isModifiedLang){Ext.getCmp("FE-LANG-PANEL-"+x).setTitle(Ext.getCmp("FE-LANG-PANEL-"+x).originTitle+' <span style! ="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext. getCmp("FE-"+x).setTitle(Ext.getCmp("FE-"+x).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FE-LANG-PANEL-btn-save-"+x).enable();Ext.get("FE-LANG-PANEL-btn-save-"+x).frame("3F8538");Ext.getCmp("FE-LANG-PANEL-btn-saveas-"+x).enable();Ext.get("FE-LANG-PANEL-btn-saveas-"+x).frame("3F8538");Ext.getCmp("FE-"+x).isModifiedLang=true}}},cmscroll:function(C){if(this.userConf.conf_error_scrollbars==="true"){Ext.getCmp("FE-EN-"+x).scrollTo(C)}}}}],bbar:[{scope:this,xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_error_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),name:"conf_error_scrollbars",listeners:{scope:this,check:function(C){this.confUpdate("conf_error_scrollbars",C.getValue())},render:function(C){Ext.DomHelper.insertHtml("beforeBegin",C.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="FE-LANG-status-line-'+x+'">-</span></span> <span c! lass="x-status-text-panel">'+_("Col: ")+'<span id="FE-LANG-status-col-'+x+'">-</span></span></div> ')}}}],tbar:[{scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",id:"FE-LANG-PANEL-btn-save-"+x,disabled:true,handler:function(){this.saveLangFile(x,p,r,"FE",A,this)}},{scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",id:"FE-LANG-PANEL-btn-saveas-"+x,disabled:true,handler:function(){this.savePatch(this.userLang,x,p,r,"FE",this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("FE-LANG-"+x).reIndentAll()}},this.menuMarkupLANG("FE-LANG-"+x,this)]},{title:_("En File: ")+p+r,originTitle:_("En File: ")+p+r,collapsible:false,id:"FE-EN-PANEL-"+x,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"FE-EN-"+x,listeners:{scope:this,initialize:function(C){this.getFile(x,"en"+p,r,"FE-EN-PANEL-","FE-EN-")},cmchange:function(F,D,E){var C=Ext.util.JSON.decode(Ext.getC! mp("FE-EN-"+x).getCursorPosition());Ext.get("FE-EN-status-line-"+x).do m.innerHTML=C.line;Ext.get("FE-EN-status-col-"+x).dom.innerHTML=C.caracter;if(F!==27&&F!==33&&F!==34&&F!==37&&F!==38&&F!==39&&F!==40&&F!==17&&F!==16&&F!==67){if(!Ext.getCmp("FE-"+x).isModifiedEn){Ext.getCmp("FE-EN-PANEL-"+x).setTitle(Ext.getCmp("FE-EN-PANEL-"+x).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp("FE-"+x).setTitle(Ext.getCmp("FE-"+x).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FE-EN-PANEL-btn-save-"+x).enable();Ext.get("FE-EN-PANEL-btn-save-"+x).frame("3F8538");Ext.getCmp("FE-EN-PANEL-btn-saveas-"+x).enable();Ext.get("FE-EN-PANEL-btn-saveas-"+x).frame("3F8538");Ext.getCmp("FE-"+x).isModifiedEn=true}}},cmscroll:function(C){if(this.userConf.conf_error_scrollbars==="true"){Ext.getCmp("FE-LANG-"+x).scrollTo(C)}},cmcursormove:function(D){var C=Ext.util.JSON.decode(Ext.getCmp("FE-EN-"+x).getCursorPosition());Ext.get("FE-EN-status-line-"+x).dom.innerHTML=C.line;Ext.get("FE-EN-statu! s-col-"+x).dom.innerHTML=C.caracter}}}],bbar:[{scope:this,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="FE-EN-status-line-'+x+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="FE-EN-status-col-'+x+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",id:"FE-EN-PANEL-btn-save-"+x,disabled:true,handler:function(){this.saveEnFile(x,p,r,"FE",A,this)}},{scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",id:"FE-EN-PANEL-btn-saveas-"+x,disabled:true,handler:function(){this.savePatch("en",x,p,r,"FE",this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("FE-EN-"+x).reIndentAll()}},this.menuMarkupEN("FE-EN-"+x)]}]});Ext.getCmp("main-panel").setActiveTab("FE-"+x);if(Ext.getCmp("FE-"+x).getL! ayout().north.collapsedEl){Ext.getCmp("FE-"+x).getLayout().north.colla psedEl.addClass("x-layout-collapsed-east-error-desc")}}else{Ext.getCmp("main-panel").setActiveTab("FE-"+x)}},rowcontextmenu:function(q,v,t){var r,o,s,p="",u;q.getSelectionModel().selectRow(v);r=this.storeFilesError.getAt(v).data.path;o=this.storeFilesError.getAt(v).data.name;s=Ext.util.md5("FE-"+r+o);if(this.storeFilesError.getAt(v).data.needcommit){p={text:_("View Diff"),iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+v,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+v+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+v);Ext.get("diff_panel_"+v).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.userLang+r,FileName:o},success:function(w){var x=Ext.util.JSON.decode(w.responseText);Ex! t.get("diff_content_"+v).dom.innerHTML=x.content;Ext.get("diff_panel_"+v).unmask()}})}}}u=new Ext.menu.Menu({items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"FilesError",scope:this,handler:function(){l.fireEvent("rowdblclick",q,v,t)}},p,"-",{text:_("About error type"),iconCls:"iconHelp",scope:this,handler:function(){if(!Ext.getCmp("main-panel").findById("FE-help")){Ext.getCmp("main-panel").add({closable:true,title:_("About error type"),iconCls:"iconHelp",id:"FE-help",autoScroll:true,autoLoad:"./error_type.php"});Ext.getCmp("main-panel").setActiveTab("FE-help")}else{Ext.getCmp("main-panel").setActiveTab("FE-help")}}}]});u.showAt(t.getXY())}}});n=new Ext.grid.GridPanel({store:this.storeFilesNeedUpdate,loadMask:true,columns:[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("EN revision"),width:45,sortable:true,dataIndex:"en_revision"},{header:String.format(_("{0} revision"),Ext.util.Format.uppercase(this.userLang)),width:45,sortable:true,dataInde! x:"revision"},{header:_("Maintainer"),width:45,sortable:true,dataIndex :"maintainer"},{header:_("Path"),dataIndex:"path",hidden:true}],view:new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',getRowClass:function(o,r,q,p){if(o.data.needcommit){return"file-need-commit"}if(o.data.isCritical){return"file-critical"}},emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>"}),autoExpandColumn:"name",bodyBorder:false,tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FNU-filter",validationEvent:false,validateOnBlur:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",hideTrigger1:true,width:180,scope:this,enableKeyEvents:true,listeners:{keypress:function(p,o){if(o.getKey()==o.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();this.scope.storeFilesNeedUpdate.clearFilter()},onTrigger2Click:function(){var o=this.getValue();if(o==""||o.leng! th<3){this.markInvalid(_("Your filter must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();this.scope.storeFilesNeedUpdate.filter("maintainer",o)}})],listeners:{scope:this,rowcontextmenu:function(q,u,s){var r,o,p="",t;r=this.storeFilesNeedUpdate.getAt(u).data.path;o=this.storeFilesNeedUpdate.getAt(u).data.name;q.getSelectionModel().selectRow(u);if(this.storeFilesNeedUpdate.getAt(u).data.needcommit){p={text:"View Diff",iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+u,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+u+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+u);Ext.get("diff_panel_"+u).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getDiff",FilePath:this.userLang+r,File! Name:o},success:function(v){var w=Ext.util.JSON.decode(v.responseText) ;Ext.get("diff_content_"+u).dom.innerHTML=w.content;Ext.get("diff_panel_"+u).unmask()}})}}}t=new Ext.menu.Menu({items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"iconTabNeedUpdate",scope:this,handler:function(){n.fireEvent("rowdblclick",q,u,s)}},p]});t.showAt(s.getXY())},rowdblclick:function(q,z,x){var p,r,B,A,v,w,o,u,t,s,D,y,C;p=this.storeFilesNeedUpdate.getAt(z).data.path;r=this.storeFilesNeedUpdate.getAt(z).data.name;B=this.storeFilesNeedUpdate.getAt(z).data.en_revision;A=this.storeFilesNeedUpdate.getAt(z).data.revision;v=this.storeFilesNeedUpdate.getAt(z).data.needcommit;w=Ext.util.md5("FNU-"+this.userLang+p+r);if(!Ext.getCmp("main-panel").findById("FNU-"+w)){o=new Ext.data.Store({autoLoad:(this.userConf.conf_needupdate_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:this.userLang+p,File:r},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});o.setDefaultSort("date","desc");u=new Ext.data.Store({autoLoad:(this.userConf.conf_needupdate_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:"en"+p,File:r},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});u.setDefaultSort("date","desc");t=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(F){var E=F.getCount();if(E===2){return false}},rowselect:function(F){var E=F.getCount();if(E===2){Ext.getCmp("FNU-PANEL-btn-logLang-"+w).enable();Ext.get("! FNU-PANEL-btn-logLang-"+w).frame("3F8538")}else{Ext.getCmp("FNU-PANEL- btn-logLang-"+w).disable()}},rowdeselect:function(F){var E=F.getCount();if(E===2){Ext.getCmp("FNU-PANEL-btn-logLang-"+w).enable();Ext.get("FNU-PANEL-btn-logLang-"+w).frame("3F8538")}else{Ext.getCmp("FNU-PANEL-btn-logLang-"+w).disable()}}}});s=new Ext.grid.GridPanel({store:o,loadMask:true,columns:[t,{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"))}],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:t,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:_("<b>View</b> the diff"),iconCls:"iconViewDiff",id:"FNU-PANEL-btn-logLang-"+w,disabled:true,handler:function(){var G,F,E;G=t.getSelections();F=G[0].data.revision;E=G[1].data.revision;this.winDiff(this.userLang+p,r,F,E)}},{scope:this,tooltip:! _("<b>Load/Refresh</b> revisions"),iconCls:"refresh",id:"FNU-PANEL-btn-refreshlogLang-"+w,handler:function(){o.reload()}}]});D=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(F){var E=F.getCount();if(E===2){return false}},rowselect:function(F){var E=F.getCount();if(E===2){Ext.getCmp("FNU-PANEL-btn-logEn-"+w).enable();Ext.get("FNU-PANEL-btn-logEn-"+w).frame("3F8538")}else{Ext.getCmp("FNU-PANEL-btn-logEn-"+w).disable()}},rowdeselect:function(F){var E=F.getCount();if(E===2){Ext.getCmp("FNU-PANEL-btn-logEn-"+w).enable();Ext.get("FNU-PANEL-btn-logEn-"+w).frame("3F8538")}else{Ext.getCmp("FNU-PANEL-btn-logEn-"+w).disable()}}}});y=new Ext.grid.GridPanel({store:u,loadMask:true,columns:[D,{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,da! taIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))} ],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:D,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:_("<b>View</b> the diff"),iconCls:"iconViewDiff",id:"FNU-PANEL-btn-logEn-"+w,disabled:true,handler:function(){var G,F,E;G=D.getSelections();F=G[0].data.revision;E=G[1].data.revision;this.winDiff("en"+p,r,F,E)}},{scope:this,tooltip:_("<b>Load/Refresh</b> revisions"),iconCls:"refresh",id:"FNU-PANEL-btn-refreshlogEn-"+w,handler:function(){u.reload()}}]});if(this.userConf.conf_needupdate_diff==="using-viewvc"){C={xtype:"panel",layout:"fit",region:"north",title:_("Diff From cvs"),height:150,collapsed:true,items:{xtype:"iframepanel",id:"FNU-diff-"+w,loadMask:true,defaultSrc:"http://cvs.php.net/viewvc.cgi/phpdoc/en"+p+r+"?r1="+A+"&r2="+B}}}else{if(this.userConf.conf_needupdate_diff==="using-exec"){C={xtype:"panel",layout:"fit",region:"north",title:_("Diff From cvs"),height:150,autoScroll:true,collapsed:true,html:'<div id="FNU-diff-'+w+'" class="di! ff-content"></div>',listeners:{render:function(){XHR({url:"./php/controller.php",params:{task:"getDiff2",FilePath:"en"+p,FileName:r,Rev2:A,Rev1:B},success:function(E){var F=Ext.util.JSON.decode(E.responseText);Ext.get("FNU-diff-"+w).dom.innerHTML=F.content}})}}}}}Ext.getCmp("main-panel").add({closable:true,title:r,originTitle:r,tabTip:String.format(_("Need Update: in {0}"),p),iconCls:"iconTabNeedUpdate",id:"FNU-"+w,isModifiedLang:false,isModifiedEn:false,layout:"border",defaults:{collapsible:true,split:true},items:[C,{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:_("CvsLog"),collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:this.userLang,items:[s]},{layout:"fit",title:"En",items:[y]}]}},{scope:this,title:String.format(_("{0} File: "),this.userLang)+p+r,originTitle:String.format(_("{0} File: "),this.userLang)+p+r,collapsible:false,id:"FNU-LANG-PANEL-"+w,region:"center",xty! pe:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"FN U-LANG-"+w,listeners:{scope:this,initialize:function(){this.getFile(w,this.userLang+p,r,"FNU-LANG-PANEL-","FNU-LANG-")},cmcursormove:function(){var E=Ext.util.JSON.decode(Ext.getCmp("FNU-LANG-"+w).getCursorPosition());Ext.get("FNU-LANG-status-line-"+w).dom.innerHTML=E.line;Ext.get("FNU-LANG-status-col-"+w).dom.innerHTML=E.caracter},cmchange:function(H,F,G){var E=Ext.util.JSON.decode(Ext.getCmp("FNU-LANG-"+w).getCursorPosition());Ext.get("FNU-LANG-status-line-"+w).dom.innerHTML=E.line;Ext.get("FNU-LANG-status-col-"+w).dom.innerHTML=E.caracter;if(H!==27&&H!==33&&H!==34&&H!==37&&H!==38&&H!==39&&H!==40&&H!==17&&H!==16&&H!==67){if(!Ext.getCmp("FNU-"+w).isModifiedLang){Ext.getCmp("FNU-LANG-PANEL-"+w).setTitle(Ext.getCmp("FNU-LANG-PANEL-"+w).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp("FNU-"+w).setTitle(Ext.getCmp("FNU-"+w).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNU-LANG-PANEL-btn-save! -"+w).enable();Ext.get("FNU-LANG-PANEL-btn-save-"+w).frame("3F8538");Ext.getCmp("FNU-LANG-PANEL-btn-saveas-"+w).enable();Ext.get("FNU-LANG-PANEL-btn-saveas-"+w).frame("3F8538");Ext.getCmp("FNU-"+w).isModifiedLang=true}}},cmscroll:function(E){if(this.userConf.conf_needupdate_scrollbars==="true"){Ext.getCmp("FNU-EN-"+w).scrollTo(E)}}}}],bbar:[{scope:this,xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_needupdate_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),name:"conf_needupdate_scrollbars",listeners:{scope:this,check:function(E){this.confUpdate("conf_needupdate_scrollbars",E.getValue())},render:function(E){Ext.DomHelper.insertHtml("beforeBegin",E.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="FNU-LANG-status-line-'+w+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="FNU-LANG-status-col-'+w+'">-</span></span></div> ')}}}],t! bar:[{scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile" ,id:"FNU-LANG-PANEL-btn-save-"+w,disabled:true,handler:function(){this.saveLangFile(w,p,r,"FNU",z,this)}},{scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",id:"FNU-LANG-PANEL-btn-saveas-"+w,disabled:true,handler:function(){this.savePatch(this.userLang,w,p,r,"FNU",this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("FNU-LANG-"+w).reIndentAll()}},this.menuMarkupLANG("FNU-LANG-"+w,this)]},{title:_("En File: ")+p+r,originTitle:_("En File: ")+p+r,collapsible:false,id:"FNU-EN-PANEL-"+w,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"FNU-EN-"+w,listeners:{scope:this,initialize:function(){this.getFile(w,"en"+p,r,"FNU-EN-PANEL-","FNU-EN-")},cmchange:function(H,F,G){var E=Ext.util.JSON.decode(Ext.getCmp("FNU-EN-"+w).getCursorPosition());Ext.get("FNU-EN-status-line-"+w).dom.innerHTML=E.line;Ext.get("FNU-EN-status-col-"+w).dom.innerHTML=E.caracter;if(H!==27&&H!==33&&H!==34&&H!==3! 7&&H!==38&&H!==39&&H!==40&&H!==17&&H!==16&&H!==67){if(!Ext.getCmp("FNU-"+w).isModifiedEn){Ext.getCmp("FNU-EN-PANEL-"+w).setTitle(Ext.getCmp("FNU-EN-PANEL-"+w).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp("FNU-"+w).setTitle(Ext.getCmp("FNU-"+w).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNU-EN-PANEL-btn-save-"+w).enable();Ext.get("FNU-EN-PANEL-btn-save-"+w).frame("3F8538");Ext.getCmp("FNU-EN-PANEL-btn-saveas-"+w).enable();Ext.get("FNU-EN-PANEL-btn-saveas-"+w).frame("3F8538");Ext.getCmp("FNU-"+w).isModifiedEn=true}}},cmscroll:function(E){if(this.userConf.conf_needupdate_scrollbars==="true"){Ext.getCmp("FNU-LANG-"+w).scrollTo(E)}},cmcursormove:function(F){var E=Ext.util.JSON.decode(Ext.getCmp("FNU-EN-"+w).getCursorPosition());Ext.get("FNU-EN-status-line-"+w).dom.innerHTML=E.line;Ext.get("FNU-EN-status-col-"+w).dom.innerHTML=E.caracter}}}],bbar:[{scope:this,xtype:"panel",height:21,baseC! ls:"",bodyStyle:"padding-top:5px;",html:'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="FNU-EN-status-line-'+w+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="FNU-EN-status-col-'+w+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",id:"FNU-EN-PANEL-btn-save-"+w,disabled:true,handler:function(){this.saveEnFile(w,p,r,"FNU",z,this)}},{scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",id:"FNU-EN-PANEL-btn-saveas-"+w,disabled:true,handler:function(){this.savePatch("en",w,p,r,"FNU",this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("FNU-EN-"+w).reIndentAll()}},this.menuMarkupEN("FNU-EN-"+w)]}]});Ext.getCmp("main-panel").setActiveTab("FNU-"+w)}else{Ext.getCmp("main-panel").setActiveTab("FNU-"+w)}}}});a=new Ext.grid.GridPanel({store:this.storePendingPatch,loadMask:true,columns:[{id:"name",header:_("Files"),sortable:tr! ue,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}],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>"}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,rowcontextmenu:function(p,v,t){var q,o,r,s,u;q=this.storePendingPatch.getAt(v).data.path;o=this.storePendingPatch.getAt(v).data.name;r=this.storePendingPatch.getAt(v).data.uniqID;s=Ext.util.md5("PP-"+r+q+o);p.getSelectionModel().selectRow(v);u=new Ext.menu.Menu({items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"PendingPatch",scope:this,handler:function(){a.fireEvent("rowdblclick",p,v,t)}},"-",{text:_("Reject this! patch"),iconCls:"iconPageDelete",scope:this,handler:function(){this.r ejectPatch(s,q,o,r,v,this)}}]});u.showAt(t.getXY())},rowdblclick:function(p,w,u){var o,q,x,v,t,s,r;o=this.storePendingPatch.getAt(w).data.path;q=this.storePendingPatch.getAt(w).data.name;x=this.storePendingPatch.getAt(w).data.uniqID;v=Ext.util.md5("PP-"+x+o+q);if(!Ext.getCmp("main-panel").findById("PP-"+v)){t=new Ext.data.Store({autoLoad:(this.userConf.conf_patch_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:o,File:q},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});t.setDefaultSort("date","desc");s=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(z){var y=z.getCount();if(y===2){return false}},rowselect:function(z! ){var y=z.getCount();if(y===2){Ext.getCmp("PP-PANEL-btn-log-"+v).enable();Ext.get("PP-PANEL-btn-log-"+v).frame("3F8538")}else{Ext.getCmp("PP-PANEL-btn-log-"+v).disable()}},rowdeselect:function(z){var y=z.getCount();if(y===2){Ext.getCmp("PP-PANEL-btn-log-"+v).enable();Ext.get("PP-PANEL-btn-log-"+v).frame("3F8538")}else{Ext.getCmp("PP-PANEL-btn-log-"+v).disable()}}}});r=new Ext.grid.GridPanel({store:t,loadMask:true,columns:[s,{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"))}],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:s,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:_("<b>View</b> the diff"),iconCls:"iconViewDiff",id:"PP-PANEL-btn-log-"+v,disabled:true,handler:function(){var A,! z,y;A=s.getSelections();z=A[0].data.revision;y=A[1].data.revision;this ..winDiff(o,q,z,y)}},{scope:this,tooltip:_("<b>Load/Refresh</b> revisions"),iconCls:"refresh",id:"PP-PANEL-btn-refreshlog-"+v,handler:function(){t.reload()}}]});Ext.getCmp("main-panel").add({closable:true,title:q,originTitle:q,tabTip:String.format(_("Patch for {0}"),o+q),iconCls:"PendingPatch",id:"PP-"+v,layout:"border",defaults:{collapsible:true,split:true},items:[{xtype:"panel",layout:"fit",region:"north",title:_("Patch content"),id:"PP-patch-desc-"+v,height:150,autoScroll:true,collapsed:true,html:'<div id="diff_content_'+v+'" class="diff-content"></div>',listeners:{render:function(){XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:o,FileName:q,type:"patch",uniqID:x},success:function(y){var z=Ext.util.JSON.decode(y.responseText);Ext.get("diff_content_"+v).dom.innerHTML=z.content}})}}},{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:_("CvsLog"),collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",default! s:{autoScroll:true},items:[{layout:"fit",title:"Log",items:[r]}]}},{title:String.format(_("Proposed Patch for {0}"),o+q),originTitle:String.format(_("Proposed Patch for {0}"),o+q),collapsible:false,id:"PP-PATCH-PANEL-"+v,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"PP-PATCH-"+v,isModified:false,listeners:{scope:this,initialize:function(y){this.getFile(v,o,q+"."+x+".patch","PP-PATCH-PANEL-","PP-PATCH-")},cmcursormove:function(){var y=Ext.util.JSON.decode(Ext.getCmp("PP-PATCH-"+v).getCursorPosition());Ext.get("PP-PATCH-status-line-"+v).dom.innerHTML=y.line;Ext.get("PP-PATCH-status-col-"+v).dom.innerHTML=y.caracter},cmchange:function(B,z,A){var y=Ext.util.JSON.decode(Ext.getCmp("PP-PATCH-"+v).getCursorPosition());Ext.get("PP-PATCH-status-line-"+v).dom.innerHTML=y.line;Ext.get("PP-PATCH-status-col-"+v).dom.innerHTML=y.caracter;if(B!==27&&B!==33&&B!==34&&B!==37&&B!==38&&B!==39&&B!==40&&B!==17&&B!==16&&B!==67){if(!Ext.getCmp("PP-PATCH-"+v! ).isModified){Ext.getCmp("PP-PATCH-PANEL-"+v).setTitle(Ext.getCmp("PP- PATCH-PANEL-"+v).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp("PP-"+v).setTitle(Ext.getCmp("PP-"+v).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("PP-PATCH-"+v).isModified=true}}},cmscroll:function(y){if(this.userConf.conf_patch_scrollbars==="true"){Ext.getCmp("PP-ORIGIN-"+v).scrollTo(y)}}}}],bbar:[{scope:this,xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_patch_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),name:"conf_patch_scrollbars",listeners:{scope:this,check:function(y){this.confUpdate("conf_patch_scrollbars",y.getValue())},render:function(y){Ext.DomHelper.insertHtml("beforeBegin",y.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="PP-PATCH-status-line-'+v+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="PP-PATCH-status-col-'+v+'">-</span></s! pan></div> ')}}}],tbar:[{scope:this,tooltip:_("<b>Accept</b> this patch and <b>Save</b> the file"),iconCls:"saveFile",id:"PP-PATCH-PANEL-btn-save-"+v,handler:function(){this.saveFileViaPatch(v,o,q,x,w,this)}},{scope:this,tooltip:_("<b>Reject</b> this patch"),iconCls:"iconPageDelete",id:"PP-PATCH-PANEL-btn-reject-"+v,handler:function(){this.rejectPatch(v,o,q,x,w,this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("PP-PATCH-"+v).reIndentAll()}}]},{title:_("Original File: ")+o+q,originTitle:_("Original File: ")+o+q,collapsible:false,id:"PP-ORIGIN-PANEL-"+v,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"PP-ORIGIN-"+v,readOnly:true,listeners:{scope:this,initialize:function(y){this.getFile(v,o,q,"PP-ORIGIN-PANEL-","PP-ORIGIN-")},cmscroll:function(y){if(this.userConf.conf_patch_scrollbars==="true"){Ext.getCmp("PP-PATCH-"+v).scrollTo(y)}},cmcursormove:function(z){var y=Ext.util.JSO! N.decode(Ext.getCmp("PP-ORIGIN-"+v).getCursorPosition());Ext.get("PP-O RIGIN-status-line-"+v).dom.innerHTML=y.line;Ext.get("PP-ORIGIN-status-col-"+v).dom.innerHTML=y.caracter}}}],bbar:[{scope:this,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="PP-ORIGIN-status-line-'+v+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="PP-ORIGIN-status-col-'+v+'">-</span></span></div> '}],tbar:[{}]}]});Ext.getCmp("main-panel").setActiveTab("PP-"+v);if(Ext.getCmp("PP-"+v).getLayout().north.collapsedEl){Ext.getCmp("PP-"+v).getLayout().north.collapsedEl.addClass("x-layout-collapsed-east-patch-desc")}}else{Ext.getCmp("main-panel").setActiveTab("PP-"+v)}}}});h=new Ext.grid.GridPanel({store:this.storeNotInEn,loadMask:true,columns:[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Path"),dataIndex:"path",hidden:true}],view:new Ext.grid.GroupingView({forceFit:true,groupT! extTpl:'{[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(o,r,q,p){if(o.data.needcommit){return"file-need-commit"}}}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,rowcontextmenu:function(o,r,p){o.getSelectionModel().selectRow(r);if(!this.storeNotInEn.getAt(r).data.needcommit){var q=new Ext.menu.Menu({items:[{text:_("Remove this file"),iconCls:"iconDelete",scope:this,handler:function(){h.fireEvent("rowdblclick",o,r,p)}}]});q.showAt(p.getXY())}},rowdblclick:function(q,u,t){var r,o,s;r=this.storeNotInEn.getAt(u).data.path;o=this.storeNotInEn.getAt(u).data.name;function p(v){if(v==="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:r,FileName:o},success:fun! ction(w){var x=Ext.util.JSON.decode(w.responseText);Ext.getBody().unma sk();this.addToPendingCommit(x.id,this.userLang+r,o,"delete");this.storeNotInEn.getAt(u).set("needcommit",true)}})}}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."),p,this)}}});c=new Ext.grid.GridPanel({store:this.storePendingCommit,loadMask:true,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}],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(o,r,q,p){if(o.data.type==="upda! te"){return"file-needcommit-update"}if(o.data.type==="delete"){return"file-needcommit-delete"}if(o.data.type==="new"){return"file-needcommit-new"}}}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,rowcontextmenu:function(r,v,t){var q,s,o,u,p;q=this.storePendingCommit.getAt(v).data.type;s=this.storePendingCommit.getAt(v).data.path;o=this.storePendingCommit.getAt(v).data.name;r.getSelectionModel().selectRow(v);p={text:_("Commit..."),iconCls:"iconCommitFileCvs",scope:this,handler:function(){return false},disabled:(this.userLogin==="cvsread")?true:false,menu:new Ext.menu.Menu({items:[{text:_("...this file"),iconCls:"iconCommitFileCvs",scope:this,handler:function(){this.WinCommit(true,v)}},{text:_("...all files modified by me"),iconCls:"iconCommitFileCvs",scope:this,handler:function(){this.WinCommit(false,"","by me")}},{text:_("...all files modified"),iconCls:"iconCommitFileCvs",scope:this,handler:function(){this.WinCommit(false)}}]})};if(q==="delete"){u=new Ext.! menu.Menu({items:[{text:"<b>"+_("Cancel")+"<b>",iconCls:"iconPageDelet e",disabled:(this.userLogin==="cvsread")?true:false,scope:this,handler:function(){c.fireEvent("rowdblclick",r,v,t)}},"-",p]})}if(q==="update"){u=new Ext.menu.Menu({items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"PendingCommit",scope:this,handler:function(){c.fireEvent("rowdblclick",r,v,t)}},"-",{text:_("View Diff"),iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+v,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+v+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+v);Ext.get("diff_panel_"+v).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getDiff",FilePath:s,FileName:o},success:function(w){var x=Ext.util.JSON.decode(w.responseText);Ext.get("diff_content_"+v).dom.innerHTML=x.content;Ext.get("diff_panel_"+v)! .unmask()}})}},{text:_("Download the diff as a patch"),iconCls:"iconCommitFileCvs",scope:this,handler:function(){window.location.href="./php/controller.php?task=downloadPatch&FilePath="+s+"&FileName="+o}},"-",{text:_("Clear this change"),iconCls:"iconPageDelete",disabled:(this.userLogin==="cvsread")?true:false,scope:this,handler:function(){this.clearLocalChange(q,s,o,v,this)}},"-",p]})}u.showAt(t.getXY())},rowdblclick:function(q,t,s){var p,r,o;p=this.storePendingCommit.getAt(t).data.type;r=this.storePendingCommit.getAt(t).data.path;o=this.storePendingCommit.getAt(t).data.name;if(p==="update"){this.openFile(r,o)}if(p==="delete"){this.clearLocalChange(p,r,o,t,this)}}}});j=new Ext.grid.GridPanel({store:this.storeFilesNeedReviewed,loadMask:true,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}],view:new Ext.grid.GroupingView({forceFit:true,grou pTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',getRowClass:function(o,r,q,p){if(o.data.needcommit){return"file-need-commit"}},emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>"}),autoExpandColumn:"name",bodyBorder:false,tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FNR-filter",validationEvent:false,validateOnBlur:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",hideTrigger1:true,width:180,scope:this,enableKeyEvents:true,listeners:{keypress:function(p,o){if(o.getKey()==o.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();this.scope.storeFilesNeedReviewed.clearFilter()},onTrigger2Click:function(){var o=this.getValue();if(o==""||o.length<3){this.markInvalid(_("Your filter must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();this.scope.storeFilesNeedRevi! ewed.filter("maintainer",o)}})],listeners:{scope:this,rowcontextmenu:function(p,v,t){var o,r,u,q="",x="",w,s;p.getSelectionModel().selectRow(v);o=this.storeFilesNeedReviewed.getAt(v).data.path;r=this.storeFilesNeedReviewed.getAt(v).data.name;u=Ext.util.md5("FNR-"+this.userLang+o+r);if(this.storeFilesNeedReviewed.getAt(v).data.needcommit){q={text:_("View Diff"),iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+v,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+v+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+v);Ext.get("diff_panel_"+v).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.userLang+o,FileName:r},success:function(y){var z=Ext.util.JSON.decode(y.responseText);Ext.get("diff! _content_"+v).dom.innerHTML=z.content;Ext.get("diff_panel_"+v).unmask( )}})}}}w=o.split("/");if(w[1]==="reference"){x={text:String.format(_("Open all files about {0} extension"),w[2]),iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+String.format(_("Open all files about {0} extension"),w[2])+". "+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getAllFilesAboutExtension",ExtName:w[2]},success:function(y){var A=Ext.util.JSON.decode(y.responseText);this.filePendingOpen=[];for(var z=0;z<A.files.length;z=z+1){this.filePendingOpen[z]=[this.userLang+A.files[z].path,A.files[z].name]}this.openFile(this.filePendingOpen[0][0],this.filePendingOpen[0][1]);Ext.getBody().unmask()}})}}}s=new Ext.menu.Menu({scope:this,items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"FilesNeedReviewed",scope:this,handler:function(){j.fireEvent("rowdblclick",p,v,t)}},q,"-",x]});s.showAt(t.getXY())},rowdblclick:function(q,A,x){var p,r,u,w,y,o,v,t,s! ,B,z;p=this.storeFilesNeedReviewed.getAt(A).data.path;r=this.storeFilesNeedReviewed.getAt(A).data.name;u=this.storeFilesNeedReviewed.getAt(A).data.reviewed;w=this.storeFilesNeedReviewed.getAt(A).data.needcommit;y=Ext.util.md5("FNR-"+this.userLang+p+r);if(!Ext.getCmp("main-panel").findById("FNR-"+y)){o=new Ext.data.Store({autoLoad:(this.userConf.conf_reviewed_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:this.userLang+p,File:r},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});o.setDefaultSort("date","desc");v=new Ext.data.Store({autoLoad:(this.userConf.conf_reviewed_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"g! etLog",Path:"en"+p,File:r},reader:new Ext.data.JsonReader({root:"Items ",totalProperty:"nbItems",id:"id"},[{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"}])});v.setDefaultSort("date","desc");t=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(D){var C=D.getCount();if(C===2){return false}},rowselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNR-PANEL-btn-logLang-"+y).enable();Ext.get("FNR-PANEL-btn-logLang-"+y).frame("3F8538")}else{Ext.getCmp("FNR-PANEL-btn-logLang-"+y).disable()}},rowdeselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNR-PANEL-btn-logLang-"+y).enable();Ext.get("FNR-PANEL-btn-logLang-"+y).frame("3F8538")}else{Ext.getCmp("FNR-PANEL-btn-logLang-"+y).disable()}}}});s=new Ext.grid.GridPanel({store:o,loadMask:true,columns:[t,{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"))}],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:t,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:_("<b>View</b> the diff"),iconCls:"iconViewDiff",id:"FNR-PANEL-btn-logLang-"+y,disabled:true,handler:function(){var E,D,C;E=t.getSelections();D=E[0].data.revision;C=E[1].data.revision;this.winDiff(this.userLang+p,r,D,C)}},{scope:this,tooltip:_("<b>Load/Refresh</b> revisions"),iconCls:"refresh",id:"FNR-PANEL-btn-refreshlogLang-"+y,handler:function(){o.reload()}}]});B=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(D){var C=D.getCount();if(C===2){return false}},rowselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNR-PANEL-btn-logEn-"+y).enable();! Ext.get("FNR-PANEL-btn-logEn-"+y).frame("3F8538")}else{Ext.getCmp("FNR -PANEL-btn-logEn-"+y).disable()}},rowdeselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNR-PANEL-btn-logEn-"+y).enable();Ext.get("FNR-PANEL-btn-logEn-"+y).frame("3F8538")}else{Ext.getCmp("FNR-PANEL-btn-logEn-"+y).disable()}}}});z=new Ext.grid.GridPanel({store:v,loadMask:true,columns:[B,{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"))}],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:B,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:_("<b>View</b> the diff"),iconCls:"iconViewDiff",id:"FNR-PANEL-btn-logEn-"+y,disabled:true,handler:function(){var E,D,C;E=B.getSelections();D=E[0].data.revision;C=E[1].data.revision;this.winDiff("en"+p,r,D,C)}},{scope:this,tooltip:_("<b>Load/R! efresh</b> revisions"),iconCls:"refresh",id:"FNR-PANEL-btn-refreshlogEn-"+y,handler:function(){v.reload()}}]});Ext.getCmp("main-panel").add({closable:true,title:r,originTitle:r,tabTip:String.format(_("Need Reviewed in: {0}"),p),iconCls:"iconTabNeedReviewed",id:"FNR-"+y,isModifiedLang:false,isModifiedEn:false,layout:"border",defaults:{collapsible:true,split:true},items:[{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:this.userLang,items:[s]},{layout:"fit",title:"En",items:[z]}]}},{title:String.format(_("{0} File: "),this.userLang)+p+r,originTitle:String.format(_("{0} File: "),this.userLang)+p+r,collapsible:false,id:"FNR-LANG-PANEL-"+y,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"FNR-LANG-"+y,listeners:{scope:this,initialize:function(){this.getFile(y,this.userLang+p,r,"FNR-LA! NG-PANEL-","FNR-LANG-")},cmcursormove:function(D){var C=Ext.util.JSON. decode(Ext.getCmp("FNR-LANG-"+y).getCursorPosition());Ext.get("FNR-LANG-status-line-"+y).dom.innerHTML=C.line;Ext.get("FNR-LANG-status-col-"+y).dom.innerHTML=C.caracter},cmchange:function(F,D,E){var C=Ext.util.JSON.decode(Ext.getCmp("FNR-LANG-"+y).getCursorPosition());Ext.get("FNR-LANG-status-line-"+y).dom.innerHTML=C.line;Ext.get("FNR-LANG-status-col-"+y).dom.innerHTML=C.caracter;if(F!==27&&F!==33&&F!==34&&F!==37&&F!==38&&F!==39&&F!==40&&F!==17&&F!==16&&F!==67){if(!Ext.getCmp("FNR-"+y).isModifiedLang){Ext.getCmp("FNR-LANG-PANEL-"+y).setTitle(Ext.getCmp("FNR-LANG-PANEL-"+y).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp("FNR-"+y).setTitle(Ext.getCmp("FNR-"+y).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNR-LANG-PANEL-btn-save-"+y).enable();Ext.get("FNR-LANG-PANEL-btn-save-"+y).frame("3F8538");Ext.getCmp("FNR-LANG-PANEL-btn-saveas-"+y).enable();Ext.get("FNR-LANG-PANEL-btn-saveas-"+y).fra! me("3F8538");Ext.getCmp("FNR-"+y).isModifiedLang=true}}},cmscroll:function(C){if(this.userConf.conf_reviewed_scrollbars==="true"){Ext.getCmp("FNR-EN-"+y).scrollTo(C)}}}}],bbar:[{scope:this,xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_reviewed_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),name:"conf_reviewed_scrollbars",listeners:{scope:this,check:function(C){this.confUpdate("conf_reviewed_scrollbars",C.getValue())},render:function(C){Ext.DomHelper.insertHtml("beforeBegin",C.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="FNR-LANG-status-line-'+y+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="FNR-LANG-status-col-'+y+'">-</span></span></div> ')}}}],tbar:[{scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",id:"FNR-LANG-PANEL-btn-save-"+y,disabled:true,handler:function(){this.saveLangFile(y,p,r,"FNR",A,this! )}},{scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFil e",id:"FNR-LANG-PANEL-btn-saveas-"+y,disabled:true,handler:function(){this.savePatch(this.userLang,y,p,r,"FNR",this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("FNR-LANG-"+y).reIndentAll()}},this.menuMarkupLANG("FNR-LANG-"+y,this)]},{title:_("En File: ")+p+r,originTitle:_("En File: ")+p+r,collapsible:false,id:"FNR-EN-PANEL-"+y,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"FNR-EN-"+y,listeners:{scope:this,initialize:function(){this.getFile(y,"en"+p,r,"FNR-EN-PANEL-","FNR-EN-")},cmchange:function(F,D,E){var C=Ext.util.JSON.decode(Ext.getCmp("FNR-EN-"+y).getCursorPosition());Ext.get("FNR-EN-status-line-"+y).dom.innerHTML=C.line;Ext.get("FNR-EN-status-col-"+y).dom.innerHTML=C.caracter;if(F!==27&&F!==33&&F!==34&&F!==37&&F!==38&&F!==39&&F!==40&&F!==17&&F!==16&&F!==67){if(!Ext.getCmp("FNR-"+y).isModifiedEn){Ext.getCmp("FNR-EN-PANEL-"+y).setTitle(Ext.getCmp("FNR-EN-PANEL-"+y).originTitle+'! <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp("FNR-"+y).setTitle(Ext.getCmp("FNR-"+y).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNR-EN-PANEL-btn-save-"+y).enable();Ext.get("FNR-EN-PANEL-btn-save-"+y).frame("3F8538");Ext.getCmp("FNR-EN-PANEL-btn-saveas-"+y).enable();Ext.get("FNR-EN-PANEL-btn-saveas-"+y).frame("3F8538");Ext.getCmp("FNR-"+y).isModifiedEn=true}}},cmscroll:function(C){if(this.userConf.conf_reviewed_scrollbars==="true"){Ext.getCmp("FNR-LANG-"+y).scrollTo(C)}},cmcursormove:function(D){var C=Ext.util.JSON.decode(Ext.getCmp("FNR-EN-"+y).getCursorPosition());Ext.get("FNR-EN-status-line-"+y).dom.innerHTML=C.line;Ext.get("FNR-EN-status-col-"+y).dom.innerHTML=C.caracter}}}],bbar:[{scope:this,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="FNR-EN-status-line-'+y+'! ">-</span></span> <span class="x-status-text-panel">'+_("Co l: ")+'<span id="FNR-EN-status-col-'+y+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",id:"FNR-EN-PANEL-btn-save-"+y,disabled:true,handler:function(){this.saveEnFile(y,p,r,"FNR",A,this)}},{scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",id:"FNR-EN-PANEL-btn-saveas-"+y,disabled:true,handler:function(){this.savePatch("en",y,p,r,"FNR",this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("FNR-EN-"+y).reIndentAll()}},this.menuMarkupEN("FNR-EN-"+y)]}]});Ext.getCmp("main-panel").setActiveTab("FNR-"+y)}else{Ext.getCmp("main-panel").setActiveTab("FNR-"+y)}}}});i=new Ext.grid.GridPanel({title:_("Summary"),iconCls:"flag-"+this.userLang,store:this.storeSummary,loadMask:true,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,d! ataIndex:"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"}],autoScroll:true,height:400,width:800,view:new Ext.grid.GridView({getRowClass:function(o,r,q,p){if(o.data.id===1){return"summary_1"}if(o.data.id===2){return"summary_2"}if(o.data.id===3){return"summary_3"}if(o.data.id===4){return"summary_4"}if(o.data.id===5){return"summary_5"}}}),listeners:{scope:this,render:function(o){o.store.load.defer(20,o.store)},rowdblclick:function(o,r,p){var q=o.store.getAt(r).data.id;if(q===1||q===2||q===3){Ext.getCmp("acc-need-update").expand()}}}});g=new Ext.grid.GridPanel({title:_("Translators"),iconCls:"iconTranslator",store:this.storeTranslators,loadMask:true,columns:[new Ext.grid.RowNumberer(),{id:"GridTransName",header:_("Name"),sortable:true,dataIndex:"name",summaryType:"count",summaryRend! erer:this.rendererTotalTranslator},{header:_("Email"),width:110,sortab le: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:this.rendererNumUptodate,dataIndex:"uptodate",summaryType:"sum"},{header:_("Old"),width:45,sortable:true,renderer:this.rendererSum,dataIndex:"old",summaryType:"sum"},{header:_("Critical"),width:60,sortable:true,renderer:this.rendererNumCritical,dataIndex:"critical",summaryType:"sum"},{header:_("Sum"),width:50,sortable:true,renderer:this.rendererSum,dataIndex:"sum",summaryType:"sum"}],plugins:[new Ext.ux.grid.GridSummary()],autoScroll:true,autoExpandColumn:"GridTransName",height:400,width:800,listeners:{scope:this,render:function(){this.storeTranslators.load.defer(20,this.storeTranslators)},rowdblclick:function(q,s,r){var o,p;q.getSelectionModel().selectRow(s);o=this.storeTranslators.getAt(s).data.email;p=this.storeTranslators.getAt(s).data.name;this.sendEmail(p,o)},rowcontextmenu:f! unction(q,t,r){var o,p,s;q.getSelectionModel().selectRow(t);o=this.storeTranslators.getAt(t).data.email;p=this.storeTranslators.getAt(t).data.name;s=new Ext.menu.Menu({id:"submenu",items:[{scope:this,text:"<b>"+String.format(_("Send an email to {0}"),p)+"</b>",iconCls:"iconSendEmail",handler:function(){this.sendEmail(p,o)}},"-",{scope:this,text:String.format(_("Send an email to the {0}"),"doc-"+this.userLang+"@lists.php.net"),iconCls:"iconSendEmail",handler:function(){this.sendEmail("Php Doc Team "+this.userLang,"doc-"+this.userLang+"@lists.php.net")}}]});s.showAt(r.getXY())}}});k=new Ext.grid.GridPanel({store:this.storeMailing,title:String.format(_("Mails from {0}"),"doc-"+this.userLang),iconCls:"home-mailing-title",loadMask:true,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:E! xt.util.Format.dateRenderer(_("Y-m-d, H:i"))}],autoScroll:true,height: 400,width:800,autoExpandColumn:"GridMailingTitle",sm:new Ext.grid.RowSelectionModel({singleSelect:true}),tbar:[{scope:this,tooltip:_("Refresh this grid"),iconCls:"refresh",handler:function(){this.storeMailing.reload()}}],listeners:{scope:this,render:function(){this.storeMailing.load.defer(20,this.storeMailing)},rowcontextmenu:function(o,r,p){var q;o.getSelectionModel().selectRow(r);q=new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+_("Open in a new Tab")+"</b>",iconCls:"openInTab",scope:this,handler:function(){k.fireEvent("rowdblclick",o,r,p)}},"-",{text:_("Refresh this grid"),iconCls:"refresh",scope:this,handler:function(){this.storeMailing.reload()}}]});q.showAt(p.getXY())},rowdblclick:function(p,t,r){var o,s,q;o=this.storeMailing.getAt(t).data.pubDate;s=this.storeMailing.getAt(t).data.link;q=this.storeMailing.getAt(t).data.title;this.NewTabMailing(o,s,q)}}});f=new Ext.grid.GridPanel({store:this.storeBugs,title:String.format(_("Open bugs for {0}"),"doc-"+this.userLang),i! conCls:"iconBugs",loadMask:true,columns:[{id:"GridBugTitle",header:"Title",sortable:true,dataIndex:"title"}],stripeRows:true,autoHeight:true,viewConfig:{emptyText:_("No open Bugs"),forceFit:true,enableRowBody:true,getRowClass:function(o,s,r,q){r.body='<p class="bug-desc">'+o.data.description+"</p>";return"x-grid3-row-expanded"}},autoExpandColumn:"GridBugTitle",sm:new Ext.grid.RowSelectionModel({singleSelect:true}),width:800,tbar:[{scope:this,tooltip:_("Refresh this grid"),iconCls:"refresh",handler:function(){this.storeBugs.reload()}}],listeners:{scope:this,render:function(){this.storeBugs.load.defer(20,this.storeBugs)},rowcontextmenu:function(o,r,p){var q;o.getSelectionModel().selectRow(r);q=new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+_("Open in a new Tab")+"</b>",iconCls:"openInTab",scope:this,handler:function(){f.fireEvent("rowdblclick",o,r,p)}},"-",{text:_("Refresh this grid"),iconCls:"refresh",scope:this,handler:function(){this.storeBugs.reload()}}]});q.showAt(p.! getXY())},rowdblclick:function(q,t,s){var o,p,r;o=this.storeBugs.getAt (t).data.id;p=this.storeBugs.getAt(t).data.link;r=this.storeBugs.getAt(t).data.title;this.NewTabBugs(o,p,r)}}});m={title:_("Graphics"),layout:"fit",autoHeight:true,iconCls:"home-graphic-title",html:'<div align="center" id="graph_container" style="width: 530px; height: 302px"><img id="graph_picture" src="" height="300"></div>',listeners:{afterlayout:function(){var o,q,p;o=Ext.get("graph_picture");q=Ext.get("graph_container");o.setVisibilityMode(Ext.Element.VISIBILITY);p=new Ext.LoadMask(q);o.on("load",function(){o.stopFx();p.hide();o.fadeIn({duration:2})});p.show();o.hide();o.dom.src="./php/controller.php?task=translationGraph"}}};this.treeAllFiles=new Ext.tree.TreePanel({animate:true,autoScroll:true,useArrows:true,loader:new Ext.tree.TreeLoader({dataUrl:"./php/controller.php",baseParams:{task:"getAllFiles"}}),enableDD:false,containerScroll:true,bodyBorder:false,tbar:[_("Search: ")," ",new Ext.form.TwinTriggerField({id:"AF-search",validationEvent:false,validateOnBlur:false,tr! igger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",hideTrigger1:true,width:180,scope:this,enableKeyEvents:true,listeners:{keypress:function(p,o){if(o.getKey()==o.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();this.scope.treeAllFiles.root.setText(_("Repository"));this.scope.treeAllFiles.loader=new Ext.tree.TreeLoader({baseParams:{task:"getAllFiles"},dataUrl:"./php/controller.php"});this.scope.treeAllFiles.root.reload()},onTrigger2Click:function(){var o=this.getValue();if(o==""||o.length<3){this.markInvalid(_("Your search must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();this.scope.treeAllFiles.loader=new Ext.tree.TreeLoader({baseParams:{search:o,task:"getAllFiles"},dataUrl:"./php/controller.php"});this.scope.treeAllFiles.root.reload(function(){this.phpDoc.treeAllFiles.root.setText(String.format(_("Search result: {0}"),this.phpDoc.treeAllFiles.root.childNodes.le! ngth))})}})],listeners:{scope:this,contextmenu:function(u,x){var r,p,q ,o,z,s,y,w,v;u.select();if(u.attributes.type==="folder"||u.isRoot){if(u.isExpanded()){p={text:"<b>"+_("Collapse")+"</b>",iconCls:"iconFolderClose",scope:this,handler:function(){u.collapse()}}}else{p={text:"<b>"+_("Expand")+"</b>",iconCls:"iconFolderClose",scope:this,handler:function(){u.expand()}}}r=new Ext.menu.Menu({items:[p]});r.showAt(x.getXY())}else{if(u.attributes.type==="file"){if(u.attributes.from!=="search"){q=u.attributes.text;o=u.attributes.id;z=o.split("/");z.shift();z.shift();z.pop();s=z[0];z.shift();o=z.join("/")+"/";if(s==="en"){w=String.format(_("Open the same file in <b>{0}</b>"),Ext.util.Format.uppercase(this.userLang));v=this.userLang+"/"+o}else{w=String.format(_("Open the same file in <b>{0}</b>"),"EN");v="en/"+o}y={text:w,iconCls:"iconTabNeedReviewed",scope:this,handler:function(){this.openFile(v,q)}}}else{y=""}r=new Ext.menu.Menu({items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"iconTabNeedReviewed",scope:this,handler:function(){this.treeAllFil! es.fireEvent("dblclick",u)}},y]});r.showAt(x.getXY())}}},dblclick:function(u,z){var r,p,o,A,C,y,w,s,q,x,B,v="";if(u.attributes.type==="file"){o=u.attributes.id;A=Ext.util.md5("AF-"+o);if(!Ext.getCmp("main-panel").findById("AF-"+A)){C=o.split("/");C.shift();C.shift();p=C[C.length-1];C.pop();r=C[0];o=C.join("/")+"/";if(r!=="en"){v=this.menuMarkupLANG("AF-FILE-"+A,this)}else{v=this.menuMarkupEN("AF-FILE-"+A)}y="xml";if(u.attributes.extension==="xml"){y="xml"}if(u.attributes.extension==="html"){y="html"}if(u.attributes.extension==="php"){y="php"}w=new Ext.data.Store({autoLoad:(this.userConf.conf_allfiles_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:o,File:p},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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:"c! ontent",mapping:"content"}])});w.setDefaultSort("date","desc");s=new E xt.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(D){var t=D.getCount();if(t===2){return false}},rowselect:function(D){var t=D.getCount();if(t===2){Ext.getCmp("AF-PANEL-btn-log-"+A).enable();Ext.get("AF-PANEL-btn-log-"+A).frame("3F8538")}else{Ext.getCmp("AF-PANEL-btn-log-"+A).disable()}},rowdeselect:function(D){var t=D.getCount();if(t===2){Ext.getCmp("AF-PANEL-btn-log-"+A).enable();Ext.get("AF-PANEL-btn-log-"+A).frame("3F8538")}else{Ext.getCmp("AF-PANEL-btn-log-"+A).disable()}}}});q=new Ext.grid.GridPanel({store:w,id:"AF-PANEL-log-"+A,loadMask:true,columns:[s,{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"))}],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:s,vi! ew:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"AF-PANEL-btn-log-"+A,disabled:true,handler:function(){var E,D,t;E=s.getSelections();D=E[0].data.revision;t=E[1].data.revision;this.winDiff(o,p,D,t)}},{scope:this,tooltip:"<b>Load/Refresh</b> revisions",iconCls:"refresh",id:"AF-PANEL-btn-refreshlog-"+A,handler:function(){w.reload()}}]});x={region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{scope:this,xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:"Log",items:[q]}]}};B={title:_("File: ")+o+p,originTitle:_("File: ")+o+p,collapsible:false,id:"AF-PANEL-"+A,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"AF-FILE-"+A,isModified:false,parser:y,listeners:{scope:this,initialize:function(){this.getFile(A,o,p,"AF-PANEL-","AF-FILE-")},cmchange:function(F,D,E){var t=Ext.util! .JSON.decode(Ext.getCmp("AF-FILE-"+A).getCursorPosition());Ext.get("AF -status-line-"+A).dom.innerHTML=t.line;Ext.get("AF-status-col-"+A).dom.innerHTML=t.caracter;if(F!==27&&F!==33&&F!==34&&F!==37&&F!==38&&F!==39&&F!==40&&F!==17&&F!==16&&F!==67){if(!Ext.getCmp("AF-FILE-"+A).isModified){Ext.getCmp("AF-PANEL-"+A).setTitle(Ext.getCmp("AF-PANEL-"+A).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp("AF-"+A).setTitle(Ext.getCmp("AF-"+A).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("AF-PANEL-btn-save-"+A).enable();Ext.get("AF-PANEL-btn-save-"+A).frame("3F8538");Ext.getCmp("AF-PANEL-btn-saveas-"+A).enable();Ext.get("AF-PANEL-btn-saveas-"+A).frame("3F8538");Ext.getCmp("AF-FILE-"+A).isModified=true}}},cmcursormove:function(){var t=Ext.util.JSON.decode(Ext.getCmp("AF-FILE-"+A).getCursorPosition());Ext.get("AF-status-line-"+A).dom.innerHTML=t.line;Ext.get("AF-status-col-"+A).dom.innerHTML=t.caracter}}}],bbar:[{scope:this,xtype:"panel",height:21,baseCls:"",bodyStyle:"paddi! ng-top:5px;",html:'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="AF-status-line-'+A+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="AF-status-col-'+A+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",id:"AF-PANEL-btn-save-"+A,disabled:true,handler:function(){Ext.getCmp("AF-PANEL-btn-save-"+A).disable();Ext.getCmp("AF-FILE-"+A).isModified=false;Ext.getCmp("AF-PANEL-"+A).setTitle(Ext.getCmp("AF-PANEL-"+A).originTitle);Ext.getCmp("AF-"+A).setTitle(Ext.getCmp("AF-"+A).originTitle);var t=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:o,fileName:p,fileLang:"all",fileContent:Ext.getCmp("AF-FILE-"+A).getCode()},success:function(D){var E=Ext.util.JSON.decode(D.responseText);u.getUI().addClass("modified");this.addToPendingCommit(E.id,o,p,"update");t.hid! e()},failure:function(D){t.hide();this.winForbidden()}})}},{scope:this ,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",id:"AF-PANEL-btn-saveas-"+A,disabled:true,handler:function(){this.savePatch("all",A,o,p,"AF",this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("AF-FILE-"+A).reIndentAll()}},v]};if(u.attributes.extension==="gif"||u.attributes.extension==="png"){B={xtype:"panel",layout:"fit",bodyStyle:"padding:5px 5px 0",html:'<img src="/data/'+this.userLogin+"/phpdoc-"+this.userLang+o+'" />'};x={}}Ext.getCmp("main-panel").add({closable:true,title:p,originTitle:p,tabTip:String.format(_("in {0}"),o),iconCls:"AllFiles",id:"AF-"+A,layout:"border",defaults:{collapsible:true,split:true},items:[B,x]});Ext.getCmp("main-panel").setActiveTab("AF-"+A)}else{Ext.getCmp("main-panel").setActiveTab("AF-"+A)}}}}});this.treeSort=new Ext.tree.TreeSorter(this.treeAllFiles,{folderSort:true});this.treeAllFilesRoot=new Ext.tree.AsyncTreeNode({text:_("Repository"),draggable:false,id:"/"});this.treeAllF! iles.setRootNode(this.treeAllFilesRoot);b=new Ext.menu.Menu({id:"mainMenu",items:[{scope:this,text:_("Refresh all data"),disabled:(this.userLogin==="cvsread")?true:false,iconCls:"refresh",handler:this.WinUpdate},{scope:this,text:_("Check Build"),disabled:(this.userLogin==="cvsread")?true:false,iconCls:"checkBuild",handler:this.WinCheckBuild},{scope:this,text:_("EN tools"),handler:function(){return false},menu:new Ext.menu.Menu({items:[{scope:this,text:_("Translation build status"),iconCls:"BuildStatus",handler:this.newTabBuildStatus},{scope:this,text:_("Script Check doc"),iconCls:"CheckDoc",handler:this.newTabCheckDoc}]})},"-",{scope:this,text:_("Configure"),iconCls:"iconConf",tooltip:"<b>Configure</b> this tool",id:"winconf-btn",handler:this.WinConf},"-",{scope:this,text:_("Erase my personal data"),disabled:(this.userLogin==="cvsread")?true:false,iconCls:"iconErasePersonalData",handler:function(){Ext.MessageBox.confirm(_("Confirm"),_("This action will erase your personal d! ata. All content about this account will be deleted definitively. Are you sure you want to do that ?"),function(o){if(o==="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:"erasePersonalData"},success:function(p){Ext.getBody().unmask();var q=Ext.util.JSON.decode(p.responseText);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(p){this.winForbidden()}})}},this)}},"-",{text:_("Log out"),iconCls:"iconLogOut",handler:function(){Ext.MessageBox.confirm(_("Confirm"),_("Are you sure you want to logout?"),function(o){if(o==="yes"){window.location.href="./php/controller.php?task=logout"}})}},"-",{scope:this,text:_("About"),iconCls:"iconHelp",id:"winabout-btn",handler:function(){this.WinAbout()}}]});if(this.userLang==="en"){e=[k]}else{e=[i,g,k,f,m]}d=ne! w 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:[{title:_("Files Need Update")+' - <em id="acc-need-update-nb">0</em>',id:"acc-need-update",layout:"fit",iconCls:"FilesNeedUpdate",hidden:(this.userLang==="en")?true:false,items:[n],collapsed:true,listeners:{expand:function(o){Ext.getCmp("FNU-filter").wrap.setWidth(200)}}},{title:_("Error in current translation")+' - <em id="acc-error-nb">0</em>',id:"acc-error",layout:"fit",iconCls:"FilesError",hidden:(this.userLang==="en")?true:false,items:[l],collapsed:true,listeners:{expand:function(o){Ext.getC! mp("FE-filter").wrap.setWidth(200)}}},{title:_("Files Need Reviewed")+ ' - <em id="acc-need-reviewed-nb">0</em>',id:"acc-need-reviewed",layout:"fit",iconCls:"FilesNeedReviewed",hidden:(this.userLang==="en")?true:false,items:[j],collapsed:true,listeners:{expand:function(o){Ext.getCmp("FNR-filter").wrap.setWidth(200)}}},{title:_("Not in EN tree")+' - <em id="acc-notInEn-nb">0</em>',id:"acc-notInEn",layout:"fit",iconCls:"NotInEn",hidden:(this.userLang==="en")?true:false,items:[h],collapsed:true},{title:_("All files"),id:"acc-all-files",layout:"fit",iconCls:"AllFiles",items:[this.treeAllFiles],collapsed:true,listeners:{expand:function(o){Ext.getCmp("AF-search").wrap.setWidth(200)}}},{title:_("Pending for commit")+' - <em id="acc-pendingCommit-nb">0</em>',id:"acc-need-pendingCommit",layout:"fit",iconCls:"PendingCommit",items:[c],collapsed:true},{title:_("Pending Patch")+' - <em id="acc-pendingPatch-nb">0</em>',id:"acc-need-pendingPatch",layout:"fit",iconCls:"PendingPatch",items:[a],collapsed:true}]}]},{region:"center",xtype:"tabpanel",id:"main-panel! ",activeTab:0,enableTabScroll:true,layoutOnTabChange:true,plugins:new Ext.ux.TabCloseMenu(),listeners:{scope:this,beforeremove:this.removeTabEvent},items:[{title:_("Home"),baseCls:"MainInfoTabPanel",xtype:"panel",autoScroll:true,id:"MainInfoTabPanel",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,defaults:{border:true},items:e}]}]}]});Ext.get("loading").remove();Ext.fly("loading-mask").fadeOut({remove:true});if(directAccess){this.openFile(directAccess.lang+directAccess.path,directAccess.name)}}}}();Ext.EventManager.onDocumentReady(phpDoc.init,phpDoc,true); \ No newline at end of file http://cvs.php.net/viewvc.cgi/doc-editor/index.php?r1=1.12&r2=1.13&diff_format=u Index: doc-editor/index.php diff -u doc-editor/index.php:1.12 doc-editor/index.php:1.13 --- doc-editor/index.php:1.12 Tue Apr 14 21:31:34 2009 +++ doc-editor/index.php Tue Jun 2 05:08:35 2009 @@ -14,6 +14,7 @@ echo jsCallTemplate('document.getElementById("loading-msg").innerHTML = "Loading UI Components...";'); echo jsLoadTemplate('js/extjs/ext-all.js'); echo jsCallTemplate('document.getElementById("loading-msg").innerHTML = "Initializing...";'); + echo jsLoadTemplate('js/util.js'); // TODO: REMOVE AFTER USING YUI-COMPRESSOR echo jsLoadTemplate('js/login_override.js'); echo jsLoadTemplate('js/login.js'); echo footerTemplate(); @@ -43,7 +44,8 @@ // Main app echo jsLoadi18nTemplate(); echo jsLoadTemplate('js/main_override.js'); -echo jsLoadTemplate('js/main.js'); +//~ echo jsLoadTemplate('js/main.js'); +echo jsLoadTemplate('js/main_min.js'); if (isset($_SESSION['directAccess']) && is_object($_SESSION['directAccess'])) { $directAccess = 'var directAccess = {"lang":"'.$_SESSION['directAccess']->lang.'", "path":"'.$_SESSION['directAccess']->path.'", "name":"'.$_SESSION['directAccess']->name.'"}'; @@ -53,4 +55,5 @@ } echo jsCallTemplate($directAccess); -echo footerTemplate(); \ No newline at end of file +echo footerTemplate(); + http://cvs.php.net/viewvc.cgi/doc-editor/TODO?r1=1.8&r2=1.9&diff_format=u Index: doc-editor/TODO diff -u doc-editor/TODO:1.8 doc-editor/TODO:1.9 --- doc-editor/TODO:1.8 Sat Apr 18 09:18:45 2009 +++ doc-editor/TODO Tue Jun 2 05:08:35 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.8 $ keyword (in comments, about popup, ..) +* Use the $Revision: 1.9 $ 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) @@ -45,6 +45,7 @@ * Clean up the namespaces * Split main.js to several objects & files (to be discussed) +* Use Object in FilePendingOpen Queue instead of Array * Implement RTL where appropriate USER INTERFACE: http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/BuildStatus.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/BuildStatus.js +++ doc-editor/js/ui/component/BuildStatus.js Ext.namespace('ui','ui.component','ui.component._BuildStatus'); //------------------------------------------------------------------------------ // BuildStatus Internals // BuildStatus Grid datastore 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'); // BuildStatus Grid language cell renderer ui.component._BuildStatus.rendererLanguage = function(value) { return '<div class="flag flag-' + value + '">' + value + '</div>'; } // BuildStatus Grid status cell renderer ui.component._BuildStatus.rendererStatus = function(value) { if (value === 0) { return 'Nok'; } else { return 'Ok'; } } // BuildStatus Grid columns definition 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 } ]; //------------------------------------------------------------------------------ // BuildStatus Grid 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(record, numIndex, rowParams, store) { if (record.data.status === 0) { return 'summary_3'; } } }), listeners : { scope : this, render : function(grid) { grid.store.load.defer(20, grid.store); } } }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/CheckDoc.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/CheckDoc.js +++ doc-editor/js/ui/component/CheckDoc.js Ext.namespace('ui','ui.component','ui.component._CheckDoc'); //------------------------------------------------------------------------------ // CheckDoc Internals // CheckDoc Grid datastore ui.component._CheckDoc.ds = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ url : './php/controller.php' }), baseParams : { task : 'getCheckDocData' }, reader : new Ext.data.JsonReader( { root : 'Items', totalProperty : 'nbItems', id : 'id' }, Ext.data.Record.create([ { name : 'id', mapping : 'id' }, { name : 'path', mapping : 'path' }, { name : 'extension', mapping : 'extension' }, { name : 'check_oldstyle', mapping : 'check_oldstyle', type : 'int' }, { name : 'check_undoc', mapping : 'check_undoc', type : 'int' }, { name : 'check_roleerror', mapping : 'check_roleerror', type : 'int' }, { name : 'check_badorder', mapping : 'check_badorder', type : 'int' }, { name : 'check_noseealso', mapping : 'check_noseealso', type : 'int' }, { name : 'check_noreturnvalues', mapping : 'check_noreturnvalues', type : 'int' }, { name : 'check_noparameters', mapping : 'check_noparameters', type : 'int' }, { name : 'check_noexamples', mapping : 'check_noexamples', type : 'int' }, { name : 'check_noerrors', mapping : 'check_noerrors', type : 'int' } ]) ) }); ui.component._CheckDoc.ds.setDefaultSort('extension', 'asc'); // CheckDoc Grid non-extension cell renderer ui.component._CheckDoc.renderer = function(value, metadata) { if (value > 0) { metadata.css = 'check_doc_cell'; return value; } else { return; } } // CheckDoc Grid columns definition 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 } ]; // CheckDoc File-Win Grid datastore ui.component._CheckDoc.fs = new Ext.data.SimpleStore({ fields: [{ name: 'id' }, { name: 'file' }] }); // CheckDoc Internal File-Win Grid // config::filepath - path to files in File-Win 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(sm, rowIndex, record) { 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(grid, rowIndex, e) { grid.getSelectionModel().selectRow(rowIndex); }, rowdblclick : function(grid, rowIndex, e) { phpDoc.openFile( 'en' + grid.filepath, grid.store.getAt(rowIndex).data.file ); Ext.getCmp('check-doc-file-win').close(); } } }); // CheckDoc Internal File-Win // config::filepath - path to files in File-Win 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 : [{ /* scope : this, Note: scope does not work here */ text : 'Open all files', handler : function() { var win = Ext.getCmp('check-doc-file-win'), store = ui.component._CheckDoc.fs; //~ TODO - use Object in FilePendingOpen-Queue instead of Array phpDoc.filePendingOpen = []; for (var i = 0; i < store.getCount(); ++i) { phpDoc.filePendingOpen[i] = [ 'en' + win.filepath, store.getAt(i).data.file ]; } phpDoc.openFile( phpDoc.filePendingOpen[0][0], phpDoc.filePendingOpen[0][1] ); win.close(); } }, { /* scope : this, Note: scope does not work here */ text : 'Open selected files', id : 'check-doc-btn-open-selected-files', disabled : true, handler : function() { var win = Ext.getCmp('check-doc-file-win'), r = Ext.getCmp('check-doc-file-grid') .getSelectionModel() .getSelections(); phpDoc.filePendingOpen = []; for (var i = 0; i < r.length; ++i) { phpDoc.filePendingOpen[i] = [ 'en' + win.filepath, r[i].data.file ]; } phpDoc.openFile( phpDoc.filePendingOpen[0][0], phpDoc.filePendingOpen[0][1] ); win.close(); } }] }); //------------------------------------------------------------------------------ // CheckDoc Grid 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(grid) { // on render, load data grid.store.load.defer(20, grid.store); }, celldblclick : function(grid, rowIndex, columnIndex, e) { var record = grid.getStore().getAt(rowIndex), errorType = grid.getColumnModel().getDataIndex(columnIndex), data = record.get(errorType), filepath = record.data.path; if (Ext.num(data, false) && data != 0) { // get checkdoc file via XHR // TODO - may change to use HttpProxy for DataStore // remove XHR, win.open() and load from proxy XHR({ url : './php/controller.php', params : { task : 'getCheckDocFiles', path : filepath, errorType : errorType }, success : function(response) { // Must choose the file var o = Ext.decode(response.responseText); // file store ui.component._CheckDoc.fs.removeAll(); for (var i = 0; i < o.files.length; ++i) { ui.component._CheckDoc.fs.insert( 0, new ui.component._CheckDoc.fs.recordType({ id : i, file : o.files[i].name }) ); } ui.component._CheckDoc.fs.sort('file', 'asc'); new ui.component._CheckDoc.FileWin({ filepath : filepath, items : [ new ui.component._CheckDoc.FileGrid({ filepath : filepath }) ] }).show(); } }); } // data is not empty } } }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/EditorConf.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/EditorConf.js +++ doc-editor/js/ui/component/EditorConf.js Ext.namespace('ui','ui.component','ui.component._EditorConf'); //------------------------------------------------------------------------------ // EditorConf Win internals // EditorConf Win-Menu template 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(); // EditorConf Win-Menu items definition for EN 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"')] ]; // EditorConf Win-Menu items definition for Non-EN 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"')] ]; // EditorConf Win-Menu items store ui.component._EditorConf.menuStore = new Ext.data.SimpleStore({ id : 0, fields : [ { name : 'id' }, { name : 'img' }, { name : 'label' } ] }); // EditorConf Win-Menu view 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(view, select) { var r = view.getSelectedRecords(); Ext.getCmp('confCard').layout.setActiveItem('conf-card-' + r[0].data.id); } } }); // doc-editor Theme datastore 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')] ] }); // EditorConf card1 - Theme Config ui.component._EditorConf.card1 = Ext.extend(Ext.form.FormPanel, { id : 'conf-card-1', bodyStyle : 'padding: 10px;', initComponent : function() { Ext.apply(this, { items : [{ xtype : 'fieldset', title : _('Themes'), autoHeight : true, defaults : { hideLabel: true }, items : [{ xtype : 'combo', id : 'conf-combo-theme', valueField : 'themeFile', displayField : 'themeName', triggerAction : 'all', mode : 'local', forceSelection : true, editable : false, value : phpDoc.userConf.conf_theme, store : ui.component._EditorConf.themeStore, listeners : { render : function() { Ext.getCmp('conf-combo-theme').store.sort('themeName'); }, select : function(c, record, numIndex) { var hrefTheme = c.getValue(); Ext.get('appTheme').dom.href = hrefTheme; phpDoc.confUpdate('conf_theme', hrefTheme); } } }] }] }); ui.component._EditorConf.card1.superclass.initComponent.call(this); } }); // EditorConf card2 - Module "Files Need Update" Config 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(field) { if (field.checked) { phpDoc.confUpdate('conf_needupdate_diff', field.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(field) { if (field.checked) { phpDoc.confUpdate('conf_needupdate_diff', field.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(field) { phpDoc.confUpdate('conf_needupdate_scrollbars', field.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(field) { phpDoc.confUpdate('conf_needupdate_displaylog', field.getValue()); } } }] }] }); ui.component._EditorConf.card2.superclass.initComponent.call(this); } }); // EditorConf card3 - Module "Files with Error" Config ui.component._EditorConf.card3 = Ext.extend(Ext.form.FormPanel, { id : 'conf-card-3', bodyStyle : 'padding: 10px;', initComponent : function() { Ext.apply(this, { items : [{ xtype : 'fieldset', title : _('Error type'), autoHeight : true, defaults : { hideLabel: true }, defaultType : 'checkbox', items : [{ name : 'conf_error_skipnbliteraltag', checked : (phpDoc.userConf.conf_error_skipnbliteraltag === "true") ? true : false, boxLabel : _('Skip nbLiteralTag error'), listeners : { check : function(field) { phpDoc.confUpdate('conf_error_skipnbliteraltag', field.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(field) { phpDoc.confUpdate('conf_error_scrollbars', field.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(field) { phpDoc.confUpdate('conf_error_displaylog', field.getValue()); } } }] }] }); ui.component._EditorConf.card3.superclass.initComponent.call(this); } }); // EditorConf card4 - Module "Files need Reviewed" Config 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(field) { phpDoc.confUpdate('conf_reviewed_scrollbars', field.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(field) { phpDoc.confUpdate('conf_reviewed_displaylog', field.getValue()); } } }] }] }); ui.component._EditorConf.card4.superclass.initComponent.call(this); } }); // EditorConf card5 - Module "All files" Config 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(field) { phpDoc.confUpdate('conf_allfiles_displaylog', field.getValue()); } } }] }] }); ui.component._EditorConf.card5.superclass.initComponent.call(this); } }); // EditorConf card6 - Module "Pending Patch" Config 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(field) { phpDoc.confUpdate('conf_patch_scrollbars', field.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(field) { phpDoc.confUpdate('conf_patch_displaylog', field.getValue()); } } }] }] }); ui.component._EditorConf.card6.superclass.initComponent.call(this); } }); //------------------------------------------------------------------------------ // EditorConf Win 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 view = Ext.getCmp('conf-menu-view'); view.select(view.getNode(0)); } }, initComponent : function() { if (phpDoc.userLang === 'en') { ui.component._EditorConf.menuStore.loadData(ui.component._EditorConf.menuDefEn); } else { ui.component._EditorConf.menuStore.loadData(ui.component._EditorConf.menuDefNonEn); } Ext.apply(this, { items : [{ id : 'confMenu', region : 'west', width : 190, autoScroll : true, items : [new ui.component._EditorConf.viewMenu()] }, { id : 'confCard', region : 'center', layout : 'slide', width : 375, frame : true, activeItem : 0, bbar : new Ext.StatusBar({ defaultText : _('All changes take effect immediately'), defaultIconCls : 'confStatusBar' }), items : [ new ui.component._EditorConf.card1(), new ui.component._EditorConf.card2(), new ui.component._EditorConf.card3(), new ui.component._EditorConf.card4(), new ui.component._EditorConf.card5(), new ui.component._EditorConf.card6() ] }] }); ui.component.EditorConf.superclass.initComponent.call(this); } }); http://cvs.php.net/viewvc.cgi/doc-editor/scripts/utils/compress-js.sh?view=markup&rev=1.1 Index: doc-editor/scripts/utils/compress-js.sh +++ doc-editor/scripts/utils/compress-js.sh pushd ../.. cat js/util.js js/ui/component/*.js js/main.js | java -jar scripts/utils/yuicompressor.jar --type js --verbose -o js/main_min.js popd
http://cvs.php.net/viewvc.cgi/doc-editor/js/main.js?r1=1.59&r2=1.60&diff_format=u Index: doc-editor/js/main.js diff -u doc-editor/js/main.js:1.59 doc-editor/js/main.js:1.60 --- doc-editor/js/main.js:1.59 Tue May 26 07:23:00 2009 +++ doc-editor/js/main.js Tue Jun 2 05:08:35 2009 @@ -26,7 +26,7 @@ userLang: '', appName: 'PhpDocumentation Online Editor', appVer: '0.2', - uiRevision: '$Revision: 1.59 $', + uiRevision: '$Revision: 1.60 $', userConf: { 'conf_needupdate_diff': 'using-exec', @@ -103,8 +103,12 @@ }); }, // init - winForbidden: function(){ - Ext.MessageBox.alert(_('Forbidden'), _('You can\'t do this action as cvsread user.')); + winForbidden: function() + { + Ext.MessageBox.alert( + _('Forbidden'), + _('You can\'t do this action as cvsread user.') + ); }, menuMarkupLANG: function(panel, scope){ @@ -699,408 +703,63 @@ }, this); - }, // loadDataStore - newTabCheckDoc: function(){ - - var ds, grid, renderer; + },// loadDataStore - // The store - 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' - }, [{ - name: 'id', - mapping: 'id' - }, { - name: 'path', - mapping: 'path' - }, { - name: 'extension', - mapping: 'extension' - }, { - name: 'check_oldstyle', - mapping: 'check_oldstyle', - type: 'int' - }, { - name: 'check_undoc', - mapping: 'check_undoc', - type: 'int' - }, { - name: 'check_roleerror', - mapping: 'check_roleerror', - type: 'int' - }, { - name: 'check_badorder', - mapping: 'check_badorder', - type: 'int' - }, { - name: 'check_noseealso', - mapping: 'check_noseealso', - type: 'int' - }, { - name: 'check_noreturnvalues', - mapping: 'check_noreturnvalues', - type: 'int' - }, { - name: 'check_noparameters', - mapping: 'check_noparameters', - type: 'int' - }, { - name: 'check_noexamples', - mapping: 'check_noexamples', - type: 'int' - }, { - name: 'check_noerrors', - mapping: 'check_noerrors', - type: 'int' - }]) - }); - ds.setDefaultSort('extension', 'asc'); + newTabCheckDoc : function() + { + var tab = Ext.getCmp('tab-check-doc'); - renderer = function(value, metadata, record, rowIndex, colIndex, store){ - if (value > 0) { - metadata.css = 'check_doc_cell'; - return value; - } - else { - return; - } + if (tab === undefined) { + // if tab not exist, create new tab + Ext.getCmp('main-panel').add({ + id : 'tab-check-doc', + title : 'Check Doc', + iconCls : 'CheckDoc', + layout : 'fit', + closable : true, + html : 'nothing' + }); + tab = Ext.getCmp('tab-check-doc'); } + if (tab.items) tab.removeAll(true); + tab.add(new ui.component.CheckDoc()); + tab.doLayout(); // render the grid - // The grid - grid = new Ext.grid.GridPanel({ - store: ds, - loadMask: true, - sm: new Ext.grid.CellSelectionModel({ - singleSelect: true - }), - columns: [new Ext.grid.RowNumberer(), { - id: 'extension', - header: "Extension", - sortable: true, - dataIndex: 'extension' - }, { - header: "Not documented", - width: 45, - sortable: true, - dataIndex: 'check_undoc', - renderer: renderer - }, { - header: "Old style", - width: 45, - sortable: true, - dataIndex: 'check_oldstyle', - renderer: renderer - }, { - header: "Bad refsect1 order", - width: 45, - sortable: true, - dataIndex: 'check_badorder', - renderer: renderer - }, { - header: "No parameters", - width: 45, - sortable: true, - dataIndex: 'check_noparameters', - renderer: renderer - }, { - header: "No return values", - width: 45, - sortable: true, - dataIndex: 'check_noreturnvalues', - renderer: renderer - }, { - header: "No examples", - width: 45, - sortable: true, - dataIndex: 'check_noexamples', - renderer: renderer - }, { - header: "No errors section", - width: 45, - sortable: true, - dataIndex: 'check_noerrors', - renderer: renderer - }, { - header: "No see also", - width: 45, - sortable: true, - dataIndex: 'check_noseealso', - renderer: renderer - }, { - header: "Refsect1 role error", - width: 45, - sortable: true, - dataIndex: 'check_roleerror', - renderer: renderer - }], - view: new Ext.grid.GridView({ - forceFit: true - }), - autoExpandColumn: 'extension', - bodyBorder: false, - listeners: { - scope: this, - render: function(grid){ - grid.store.load.defer(20, grid.store); - }, - celldblclick: function(grid, rowIndex, columnIndex, e){ - - var record, errorType, data, path; - - record = grid.getStore().getAt(rowIndex); - errorType = grid.getColumnModel().getDataIndex(columnIndex); - data = record.get(errorType); - path = record.data.path; - - if (Ext.num(data, false) && data != 0) { - - // open checkdoc grid - XHR({ - url : './php/controller.php', - params : { - task : 'getCheckDocFiles', - path : path, - errorType : errorType - }, - scope : this, - success : function(response) - { - // Must choose the file - var o = Ext.decode(response.responseText); - - // store - var storeFiles = new Ext.data.SimpleStore({ - fields: [ { - name: 'id' - }, { - name: 'file' - } ] - }); - - for (var i = 0; i < o.files.length; ++i) { - - var r = new storeFiles.recordType({ - id : i, - file : o.files[i].name - }); - storeFiles.insert(0, r); - } - storeFiles.sort('file', 'asc'); - - // Grid - var gridFiles = new Ext.grid.GridPanel({ - store : storeFiles, - loadMask : true, - sm : new Ext.grid.RowSelectionModel({ - listeners : { - rowselect : function(sm, rowIndex, record) - { - Ext.getCmp('check-doc-btn-open-selected-files').enable(); - } - } - }), - columns: [ new Ext.grid.RowNumberer(), { - id : 'file', - header : "Files", - sortable : true, - dataIndex : 'file' - } ], - autoExpandColumn : 'file', - bodyBorder : false, - listeners : { - scope : this, - rowcontextmenu : function(grid, rowIndex, e) - { - grid.getSelectionModel().selectRow(rowIndex); - }, - rowdblclick: function(grid, rowIndex, e) - { - var name = storeFiles.getAt(rowIndex).data.file; - win.close(); - this.openFile('en' + path, name); - } - } - }); - - win = new Ext.Window({ - title : _('Files'), - width : 450, - height : 350, - resizable : false, - modal : true, - autoScroll : true, - labelWidth : 50, - layout : 'fit', - items : [gridFiles], - buttons : [{ - scope : this, - text : 'Open all files', - handler : function() - { - win.close(); - - this.filePendingOpen = []; - - for (i = 0; i < o.files.length; i = i + 1) { - this.filePendingOpen[i] = ['en' + path, o.files[i].name]; - } - - // Start the first - this.openFile(this.filePendingOpen[0][0], this.filePendingOpen[0][1]); - } - }, { - scope : this, - text : 'Open selected files', - id : 'check-doc-btn-open-selected-files', - disabled : true, - handler : function() - { - win.close(); - - this.filePendingOpen = []; - - var r = gridFiles.getSelectionModel().getSelections(); - - for (i = 0; i < r.length; i = i + 1) { - this.filePendingOpen[i] = ['en' + path, r[i].data.file]; - } - - // Start the first - this.openFile(this.filePendingOpen[0][0], this.filePendingOpen[0][1]); - } - }] - }); - win.show(); - } - }); - } // data is not empty - } - - } - }); - - Ext.getCmp('main-panel').add({ - closable: true, - title: 'Check Doc', - iconCls: 'CheckDoc', - id: 'tab-check-doc', - layout: 'fit', - items: [grid] - }); Ext.getCmp('main-panel').setActiveTab('tab-check-doc'); - }, // newTabCheckDoc - newTabBuildStatus: function(){ - - var ds, grid; - - // The store - 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' - }, [{ - 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' - }]) - }); - ds.setDefaultSort('date', 'desc'); + }, - // The grid + newTabBuildStatus : function() + { + var tab = Ext.getCmp('tab-build-status'); - function rendererLanguage(val) { - return '<div class="flag flag-' + val + '">' + val + '</div>'; - } - function rendererStatus(val) { - if( val === 0 ) return 'Nok'; - else return 'Ok'; + if (tab === undefined ) { + // if tab not exist, create new tab + Ext.getCmp('main-panel').add({ + id : 'tab-build-status', + title : _('Translation build status'), + iconCls : 'BuildStatus', + layout : 'fit', + closable : true, + html : 'nothing' + }); + tab = Ext.getCmp('tab-build-status'); } - grid = new Ext.grid.GridPanel({ - store: ds, - loadMask: true, - 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: rendererLanguage - }, { - header: _("Status"), - width: 45, - sortable: true, - dataIndex: 'status', - renderer: rendererStatus - }], - view: new Ext.grid.GridView({ - forceFit: true, - getRowClass: function(record, numIndex, rowParams, store){ - if (record.data.status === 0) { - return 'summary_3'; - } - } - }), - autoExpandColumn: 'date', - bodyBorder: false, - listeners: { - scope: this, - render: function(grid){ - grid.store.load.defer(20, grid.store); - } - } - }); + if (tab.items) tab.removeAll(true); + tab.add(new ui.component.BuildStatus()); + tab.doLayout(); // render the grid - Ext.getCmp('main-panel').add({ - closable: true, - title: _('Translation build status'), - iconCls: 'BuildStatus', - id: 'tab-build-status', - layout: 'fit', - items: [grid] - }); Ext.getCmp('main-panel').setActiveTab('tab-build-status'); - }, // newTabBuildStatus - openFile: function(FilePath, FileName){ + }, + openFile: function(FilePath, FileName) + { Ext.getCmp('acc-all-files').expand(); var t = FilePath.split('/'); - function GoToNode(node, scope){ + function GoToNode(node, scope) { node.expand(false, true, function(node){ @@ -1120,6 +779,7 @@ } else { // walk into childs + // leaf node for (i = 0; i < node.childNodes.length; i = i + 1) { if (node.childNodes[i].text === FileName) { node.childNodes[i].ensureVisible(); @@ -1734,8 +1394,8 @@ }); }, //saveLangFile - getFile: function(FileID, FilePath, FileName, Panel1, Panel2){ - + getFile: function(FileID, FilePath, FileName, Panel1, Panel2) + { // Mask the panel Ext.get(Panel1 + FileID).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_('Loading...')); @@ -1779,7 +1439,6 @@ } } } - } }); @@ -2817,367 +2476,16 @@ }, //WinCheckBuild - WinConf: function(){ - - var winConf, viewMenu, storeMenu, storeData, tplMenu; - - if (!winConf) { - 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>'); - tplMenu.compile(); - - if (this.userLang === 'en') { - storeData = [['1', 'go-home.png', _('Main')], ['5', 'view-list-tree.png', _('Module "All files"')], ['6', 'view-media-playlist.png', _('Module "Pending Patch"')]]; - } - else { - storeData = [['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"')]]; - } - - storeMenu = new Ext.data.SimpleStore({ - id: 0, - fields: [{ - name: 'id' - }, { - name: 'img' - }, { - name: 'label' - }] - }); - storeMenu.loadData(storeData); - - viewMenu = new Ext.DataView({ - tpl: tplMenu, - singleSelect: true, - overClass: 'x-view-over', - itemSelector: 'div.thumb-wrap', - store: storeMenu, - listeners: { - selectionchange: function(view, selec){ - var r = view.getSelectedRecords(); - Ext.getCmp('confCard').layout.setActiveItem('conf-card-' + r[0].data.id); - } - } - }); - - winConf = new Ext.Window({ - scope: this, - layout: 'border', - width: 550, - height: 400, - iconCls: 'iconConf', - modal: true, - title: _('Configuration'), - plain: true, - closeAction: 'hide', - listeners: { - show: function(){ - viewMenu.select(viewMenu.getNode(0)); - } - }, - items: [{ - scope: this, - region: 'west', - width: 190, - id: 'confMenu', - autoScroll: true, - items: viewMenu - }, { - scope: this, - layout: 'slide', - region: 'center', - id: 'confCard', - width: 375, - frame: true, - activeItem: 0, - bbar: new Ext.StatusBar({ - defaultText: _('All changes take effect immediately'), - defaultIconCls: 'confStatusBar' - }), - items: [{ - scope: this, - id: 'conf-card-1', - xtype: 'form', - bodyStyle: 'padding: 10px;', - items: [{ - xtype: 'fieldset', - title: _('Themes'), - autoHeight: true, - defaults: { - hideLabel: true - }, - items: [{ - xtype: 'combo', - id: 'conf-combo-theme', - store: 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')]] - }), - valueField: 'themeFile', - displayField: 'themeName', - triggerAction: 'all', - mode: 'local', - forceSelection: true, - editable: false, - fieldLabel: 'fieldlabel', - value: this.userConf.conf_theme, - listeners: { - scope: this, - render: function() { - Ext.getCmp('conf-combo-theme').store.sort('themeName'); - }, - select: function(c, record, numIndex){ - var hrefTheme = c.getValue(); - Ext.get('appTheme').dom.href = hrefTheme; - this.confUpdate('conf_theme', hrefTheme); - } - } - - }] - }] - }, { - scope: this, - id: 'conf-card-2', - xtype: 'form', - bodyStyle: 'padding: 10px;', - items: [{ - xtype: 'fieldset', - title: _('Diff view'), - autoHeight: true, - defaults: { - hideLabel: true - }, - defaultType: 'radio', - items: [{ - scope: this, - checked: (this.userConf.conf_needupdate_diff === "using-viewvc") ? true : false, - boxLabel: _('Using ViewVc from php web site'), - name: 'conf_needupdate_diff', - inputValue: 'using-viewvc', - listeners: { - scope: this, - check: function(f){ - if (f.checked) { - this.confUpdate('conf_needupdate_diff', f.getRawValue()); - } - } - } - }, { - checked: (this.userConf.conf_needupdate_diff === "using-exec") ? true : false, - boxLabel: _('Using diff -kk -u command line'), - name: 'conf_needupdate_diff', - inputValue: 'using-exec', - listeners: { - scope: this, - check: function(f){ - if (f.checked) { - this.confUpdate('conf_needupdate_diff', f.getRawValue()); - } - } - } - }] - }, { - xtype: 'fieldset', - title: _('Editor'), - autoHeight: true, - defaults: { - hideLabel: true - }, - defaultType: 'checkbox', - items: [{ - scope: this, - checked: (this.userConf.conf_needupdate_scrollbars === "true") ? true : false, - boxLabel: _('Synchronize scroll bars'), - name: 'conf_needupdate_scrollbars', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_needupdate_scrollbars', f.getValue()); - } - } - },{ - scope: this, - checked: (this.userConf.conf_needupdate_displaylog === "true") ? true : false, - boxLabel: _('Automatically load the log when displaying the file'), - name: 'conf_needupdate_displaylog', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_needupdate_displaylog', f.getValue()); - } - } - }] - }] + WinConf : function() + { + new ui.component.EditorConf() + .show(Ext.get('winconf-btn')); - }, { - id: 'conf-card-3', - xtype: 'form', - bodyStyle: 'padding: 10px;', - items: [{ - xtype: 'fieldset', - title: _('Error type'), - autoHeight: true, - defaults: { - hideLabel: true - }, - defaultType: 'checkbox', - items: [{ - scope: this, - checked: (this.userConf.conf_error_skipnbliteraltag === "true") ? true : false, - boxLabel: _('Skip nbLiteralTag error'), - name: 'conf_error_skipnbliteraltag', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_error_skipnbliteraltag', f.getValue()); - } - } - }] - }, { - xtype: 'fieldset', - title: _('Editor'), - autoHeight: true, - defaults: { - hideLabel: true - }, - defaultType: 'checkbox', - items: [{ - scope: this, - checked: (this.userConf.conf_error_scrollbars === "true") ? true : false, - boxLabel: _('Synchronize scroll bars'), - name: 'conf_error_scrollbars', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_error_scrollbars', f.getValue()); - } - } - },{ - scope: this, - checked: (this.userConf.conf_error_displaylog === "true") ? true : false, - boxLabel: _('Automatically load the log when displaying the file'), - name: 'conf_error_displaylog', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_error_displaylog', f.getValue()); - } - } - }] - }] - }, { - id: 'conf-card-4', - xtype: 'form', - bodyStyle: 'padding: 10px;', - items: [{ - xtype: 'fieldset', - title: _('Editor'), - autoHeight: true, - defaults: { - hideLabel: true - }, - defaultType: 'checkbox', - items: [{ - scope: this, - checked: (this.userConf.conf_reviewed_scrollbars === "true") ? true : false, - boxLabel: _('Synchronize scroll bars'), - name: 'conf_reviewed_scrollbars', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_reviewed_scrollbars', f.getValue()); - } - } - },{ - scope: this, - checked: (this.userConf.conf_reviewed_displaylog === "true") ? true : false, - boxLabel: _('Automatically load the log when displaying the file'), - name: 'conf_reviewed_displaylog', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_reviewed_displaylog', f.getValue()); - } - } - }] - }] - }, { - id: 'conf-card-5', - xtype: 'form', - bodyStyle: 'padding: 10px;', - items: [{ - xtype: 'fieldset', - title: _('Editor'), - autoHeight: true, - defaults: { - hideLabel: true - }, - defaultType: 'checkbox', - items: [{ - scope: this, - checked: (this.userConf.conf_allfiles_displaylog === "true") ? true : false, - boxLabel: _('Automatically load the log when displaying the file'), - name: 'conf_allfiles_displaylog', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_allfiles_displaylog', f.getValue()); - } - } - }] - }] - }, { - id: 'conf-card-6', - xtype: 'form', - bodyStyle: 'padding: 10px;', - items: [{ - xtype: 'fieldset', - title: _('Editor'), - autoHeight: true, - defaults: { - hideLabel: true - }, - defaultType: 'checkbox', - items: [{ - scope: this, - checked: (this.userConf.conf_patch_scrollbars === "true") ? true : false, - boxLabel: _('Synchronize scroll bars'), - name: 'conf_patch_scrollbars', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_patch_scrollbars', f.getValue()); - } - } - }, { - scope: this, - checked: (this.userConf.conf_patch_displaylog === "true") ? true : false, - boxLabel: _('Automatically load the log when displaying the file'), - name: 'conf_patch_displaylog', - listeners: { - scope: this, - check: function(f){ - this.confUpdate('conf_patch_displaylog', f.getValue()); - } - } - }] - }] - }] - }], - buttons: [{ - text: _('Close'), - handler: function(){ - winConf.hide(); - } - }] - }); - } - winConf.show(Ext.get('winconf-btn')); }, //WinConf - confUpdate: function(item, v){ + confUpdate: function(item, v) + { // Apply modification in DB XHR({ scope : this, @@ -3190,6 +2498,9 @@ success : function(response) { // Update userConf object + if (item === "conf_theme") { + this.userConf.conf_theme = v; + } if (item === "conf_needupdate_diff") { this.userConf.conf_needupdate_diff = v; } @@ -3230,8 +2541,8 @@ } } }); - }, //confUpdate + WinAbout: function(){ var winAbout; http://cvs.php.net/viewvc.cgi/doc-editor/js/main_min.js?r1=1.2&r2=1.3&diff_format=u Index: doc-editor/js/main_min.js diff -u doc-editor/js/main_min.js:1.2 doc-editor/js/main_min.js:1.3 --- doc-editor/js/main_min.js:1.2 Sun Mar 29 02:44:06 2009 +++ doc-editor/js/main_min.js Tue Jun 2 05:08:35 2009 @@ -1 +1 @@ -var phpDoc=function(){Ext.QuickTips.init();Ext.BLANK_IMAGE_URL="/extjs/resources/images/default/s.gif";return{TaskPing:"",storeCommitLogMessage:"",storeFilesError:"",storeFilesNeedUpdate:"",storeFilesNeedReviewed:"",storePendingCommit:"",storePendingPatch:"",storeMailing:"",storeBugs:"",storeTranslators:"",storeSummary:"",userLoggin:"",userLang:"",appName:"PhpDocumentation Online Editor",appVer:"0.2",userConf:{conf_needupdate_diff:"using-exec",conf_needupdate_scrollbars:true,conf_error_skipnbliteraltag:true,conf_error_scrollbars:true,conf_reviewed_scrollbars:true,conf_patch_scrollbars:true,conf_theme:"xtheme-default.css"},treeAllFiles:"",treeSort:"",treeAllFilesRoot:"",filePendingOpen:"",init:function(){Ext.getBody().on("contextmenu",function(a){a.stopEvent()},this);Ext.Ajax.request({scope:this,url:"./php/controller.php",params:{task:"get-conf"},success:function(a){var b=Ext.util.JSON.decode(a.responseText);if(b.success){this.userLoggin=b.mess.userLoggin;this.userLang=b.mes! s.userLang;this.userConf.conf_needupdate_diff=b.mess.userConf.conf_needupdate_diff;this.userConf.conf_needupdate_scrollbars=b.mess.userConf.conf_needupdate_scrollbars;this.userConf.conf_error_skipnbliteraltag=b.mess.userConf.conf_error_skipnbliteraltag;this.userConf.conf_error_scrollbars=b.mess.userConf.conf_error_scrollbars;this.userConf.conf_reviewed_scrollbars=b.mess.userConf.conf_reviewed_scrollbars;this.userConf.conf_theme=b.mess.userConf.conf_theme;Ext.util.CSS.swapStyleSheet("appTheme",this.userConf.conf_theme);this.loadDataStore();this.drawInterface()}}})},loadDataStore:function(){this.storeCommitLogMessage=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-commit-log-message"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"text",mapping:"text"}])});this.storeFilesError=new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/cont! roller.php"}),baseParams:{task:"GetFilesError"},reader:new Ext.data.Js onReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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()}}});this.storeFilesNeedUpdate=new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"GetFilesNeedUpdate"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"revision",mapping:"revision"},{name:"en_revision",mapping:"en_revision"},{name:"maintainer",mapping:"maintainer"},{name:"needcommit",mapping:"needcommit"},{name:"isCritical",map! ping:"isCritical"}]),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-need-update-nb").innerHTML=a.getCount()}}});this.storePendingCommit=new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"GetFilesPendingCommit"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"by",mapping:"by"},{name:"date",mapping:"date"}]),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()},add:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()}}});this.storePendingPatch=new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"GetFilesPendingPatch"},reader:new Ext.data.JsonReader({root! :"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{n ame:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"by",mapping:"by"},{name:"uniqID",mapping:"uniqID"},{name:"date",mapping:"date"}]),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()},add:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()}}});this.storeFilesNeedReviewed=new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"GetFilesNeedReviewed"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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()}}});this.stor! eMailing=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-mailing-info"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});this.storeMailing.setDefaultSort("pubDate","desc");this.storeBugs=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-open-bugs"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"title",mapping:"title"},{name:"link",mapping:"link"},{name:"description",mapping:"description"}])});this.storeTranslators=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-translator-info"},reader:new Ext.data.JsonReader({root:"Items",totalPr! operty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"name",mappi ng:"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"}])});this.storeTranslators.setDefaultSort("nick","asc");this.storeSummary=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-summary-info"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"libel",mapping:"libel"},{name:"nbFiles",mapping:"nbFiles"},{name:"percentFiles",mapping:"percentFiles"},{name:"sizeFiles",mapping:"sizeFiles"},{name:"percentSize",mapping:"percentSize"}])})},openFile:function(d,a){Ext.getCmp("acc-all-files").expand();var c=d.split("/");function b(f,e){f.expand(false,true,function(h){var g;h.ensureVisible();if(c[0]&&c[0]!==""){for(g=0;g<h.childNodes.length;g=g+1){if(h.childNodes[g].tex! t===c[0]){c.shift();b(h.childNodes[g],e)}}}else{for(g=0;g<h.childNodes.length;g=g+1){if(h.childNodes[g].text===a){h.childNodes[g].ensureVisible();h.childNodes[g].ui.highlight();e.treeAllFiles.fireEvent("dblclick",h.childNodes[g])}}}})}b(this.treeAllFilesRoot,this)},rejectPatch:function(f,d,a,e,g,c){function b(h){if(h==="yes"){var i=Ext.MessageBox.wait("Please, wait...");Ext.Ajax.request({scope:c,url:"../php/controller.php",params:{task:"after-patch-reject",PatchUniqID:e},success:function(){this.storePendingPatch.remove(this.storePendingPatch.getAt(g));this.storePendingPatch.fireEvent("add",this.storePendingPatch);Ext.getCmp("main-panel").remove("PP-"+f);i.hide()}})}}Ext.MessageBox.confirm("Confirm","This action will <b>reject</b> this patch, send an email to his author and close this tab.",b,c)},saveFileViaPatch:function(e,c,a,d,g,b){function f(h){if(h==="yes"){Ext.getCmp("PP-PATCH-PANEL-btn-save-"+e).disable();Ext.getCmp("PP-PATCH-"+e).isModified=false;Ext.getCmp("PP-PATCH! -PANEL-"+e).setTitle(Ext.getCmp("PP-PATCH-PANEL-"+e).originTitle);Ext. getCmp("PP-"+e).setTitle(Ext.getCmp("PP-"+e).originTitle);var i=Ext.MessageBox.wait("Saving data...");Ext.Ajax.request({scope:b,url:"../php/controller.php",params:{task:"save-file",filePath:c,fileName:a,fileLang:"all",fileContent:Ext.getCmp("PP-PATCH-"+e).getCode()},success:function(k,j){var l=Ext.util.JSON.decode(k.responseText);if(l.success){this.addToPendingCommit(c,a);this.storePendingPatch.remove(this.storePendingPatch.getAt(g));this.storePendingPatch.fireEvent("add",this.storePendingPatch);Ext.Ajax.request({scope:b,url:"../php/controller.php",params:{task:"after-patch-accept",PatchUniqID:d}});i.hide();Ext.getCmp("main-panel").remove("PP-"+e)}}})}}Ext.MessageBox.confirm("Confirm","This action will accept this patch, send an email to his author, save the file and close this tab.",f,b)},saveEnFile:function(e,c,a,d,g,b){Ext.getCmp(d+"-EN-PANEL-btn-save-"+e).disable();Ext.getCmp(d+"-"+e).isModifiedEn=false;Ext.getCmp(d+"-EN-PANEL-"+e).setTitle(Ext.getCmp(d+"-EN-PANEL-"+e).o! riginTitle);if(!Ext.getCmp(d+"-"+e).isModifiedEn&&!Ext.getCmp(d+"-"+e).isModifiedLang){Ext.getCmp(d+"-"+e).setTitle(Ext.getCmp(d+"-"+e).originTitle)}var f=Ext.MessageBox.wait("Saving data...");Ext.Ajax.request({scope:b,url:"../php/controller.php",params:{task:"save-file",filePath:c,fileName:a,fileLang:"en",fileContent:Ext.getCmp(d+"-EN-"+e).getCode()},success:function(i,h){var j=Ext.util.JSON.decode(i.responseText);if(j.success){if(d==="FNU"){this.storeFilesNeedUpdate.getAt(g).set("en_revision","1."+j.en_revision);this.storeFilesNeedUpdate.getAt(g).set("needcommit",true)}if(d==="FE"){this.storeFilesError.getAt(g).set("needcommit",true)}if(d==="FNR"){this.storeFilesNeedReviewed.getAt(g).set("needcommit",true)}this.addToPendingCommit("en"+c,a);f.hide()}}})},savePatch:function(d,g,a,c,h,i){var b,f,e;if(d==="en"){b="-EN"}else{if(d==="all"){b=""}else{b="-LANG"}}if(i.userLoggin!=="cvsread"){f=i.userLoggin+"@php.net"}e=new Ext.Window({title:"Do you want to be alerted ?",iconCls:"p! atchAlert",width:350,height:150,resizable:false,modal:true,autoScroll: true,bodyStyle:"padding: 5px;",layout:"form",labelWidth:50,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."},{xtype:"textfield",fieldLabel:"Email",name:"patch-email-alert",anchor:"100%",value:f}],buttons:[{text:"Save",handler:function(){var j,k;j=this.ownerCt.items.items[1].getValue();k=Ext.MessageBox.wait("Saving data as a patch...");e.close();if(d!=="all"){Ext.getCmp(h+b+"-PANEL-btn-saveas-"+g).disable();Ext.getCmp(h+b+"-"+g).isModifiedLang=false;Ext.getCmp(h+b+"-PANEL-"+g).setTitle(Ext.getCmp(h+b+"-PANEL-"+g).originTitle);Ext.getCmp(h+"-"+g).setTitle(Ext.getCmp(h+"-"+g).originTitle)}else{Ext.getCmp("AF-PANEL-btn-saveas-"+g).disable();Ext.getCmp("AF-FILE-"+g).isModified=false;Ext.getCmp("AF-PANEL-"+g).setTitle(Ext.getCmp("AF-PANEL-"+g).originTitle);Ext.getCmp("AF-"+g).setTitle(Ext.getCmp("AF-"+g).originTitle)}Ext.Ajax.request({scope:i,ur! l:"../php/controller.php",params:{task:"save-file",filePath:a,fileName:c,fileLang:d,fileContent:(d!=="all")?Ext.getCmp(h+b+"-"+g).getCode():Ext.getCmp("AF-FILE-"+g).getCode(),type:"patch",emailAlert:j},success:function(m,l){var n=Ext.util.JSON.decode(m.responseText);if(n.success){if(d!=="all"){this.addToPendingPatch(d+a,c,n.uniqID)}else{this.addToPendingPatch(a,c,n.uniqID)}k.hide()}}})}},{text:"Cancel",handler:function(){e.close()}}]});e.show()},saveLangFile:function(f,d,b,e,g,c){function a(h){if(h==="no"){Ext.getCmp(e+"-LANG-PANEL-btn-save-"+f).disable();Ext.getCmp(e+"-"+f).isModifiedLang=false;Ext.getCmp(e+"-LANG-PANEL-"+f).setTitle(Ext.getCmp(e+"-LANG-PANEL-"+f).originTitle);if(!Ext.getCmp(e+"-"+f).isModifiedEn&&!Ext.getCmp(e+"-"+f).isModifiedLang){Ext.getCmp(e+"-"+f).setTitle(Ext.getCmp(e+"-"+f).originTitle)}var i=Ext.MessageBox.wait("Saving data...");Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"save-file",filePath:d,fileName:b,fileLang:this.us! erLang,fileContent:Ext.getCmp(e+"-LANG-"+f).getCode()},success:functio n(k,j){var l=Ext.util.JSON.decode(k.responseText);if(l.success){if(e==="FE"){this.storeFilesError.getAt(g).set("needcommit",true);this.storeFilesError.getAt(g).set("maintainer",l.maintainer)}if(e==="FNU"){this.storeFilesNeedUpdate.getAt(g).set("revision","1."+l.new_revision);this.storeFilesNeedUpdate.getAt(g).set("needcommit",true);this.storeFilesNeedUpdate.getAt(g).set("maintainer",l.maintainer)}if(e==="FNR"){this.storeFilesNeedReviewed.getAt(g).set("needcommit",true);this.storeFilesNeedReviewed.getAt(g).set("maintainer",l.maintainer);this.storeFilesNeedReviewed.getAt(g).set("reviewed",l.reviewed)}this.addToPendingCommit(this.userLang+d,b);i.hide()}}})}else{if(h==="yes"){Ext.getBody().mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Checking for error. Please, wait...');Ext.getCmp(e+"-LANG-PANEL-btn-save-"+f).disable();Ext.getCmp(e+"-"+f).isModifiedLang=false;Ext.getCmp(e+"-LANG-PANEL-"+f).setTitle(Ext.getCmp(e+"-LANG-PANEL-"+f).originTitle);if(!Ext.getC! mp(e+"-"+f).isModifiedEn&&!Ext.getCmp(e+"-"+f).isModifiedLang){Ext.getCmp(e+"-"+f).setTitle(Ext.getCmp(e+"-"+f).originTitle)}Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"check-file-error",FilePath:d,FileName:b,FileLang:this.userLang,FileContent:Ext.getCmp(e+"-LANG-"+f).getCode()},success:function(k,j){Ext.getBody().unmask();var l=Ext.util.JSON.decode(k.responseText);if(l.success){if(l.error&&l.error_first!=="-No error-"){Ext.getCmp("main-panel").add({closable:true,title:"Error in "+b,iconCls:"FilesError",id:"FE-help-"+f,autoScroll:true,autoLoad:"/error_type.php?dir="+d+"&file="+b});Ext.getCmp("main-panel").setActiveTab("FE-help-"+f);this.storeFilesError.reload()}else{Ext.MessageBox.show({title:"Check for errors",msg:"There is no error.",buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO})}Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"save-file",filePath:d,fileName:b,fileLang:this.userLang,fileContent:Ext.getCmp(e+"-LANG-"+f! ).getCode()},success:function(n,m){var p=Ext.util.JSON.decode(n.respon seText);if(p.success){if(e==="FE"){this.storeFilesError.getAt(g).set("needcommit",true);this.storeFilesError.getAt(g).set("maintainer",p.maintainer)}if(e==="FNU"){this.storeFilesNeedUpdate.getAt(g).set("revision","1."+p.new_revision);this.storeFilesNeedUpdate.getAt(g).set("needcommit",true);this.storeFilesNeedUpdate.getAt(g).set("maintainer",p.maintainer)}if(e==="FNR"){this.storeFilesNeedReviewed.getAt(g).set("needcommit",true);this.storeFilesNeedReviewed.getAt(g).set("maintainer",p.maintainer);this.storeFilesNeedReviewed.getAt(g).set("reviewed",p.reviewed)}this.addToPendingCommit(this.userLang+d,b)}}});if(e==="FE"){Ext.getCmp(e+"-error-type-"+f).setSrc("/error_type.php?dir="+d+"&file="+b+"&nocache="+new Date().getTime())}}}})}}}Ext.MessageBox.show({scope:c,title:"Confirm",msg:"Do you want to check for error before saving ?",icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,fn:a})},getFile:function(e,d,a,c,b){Ext.get(c+e).mask('<img src="/img/loading.gif" style="ve! rtical-align: middle;" /> Loading...');Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"get-file",FilePath:d,FileName:a},success:function(h,g){var i,f;i=Ext.util.JSON.decode(h.responseText);if(i.success){Ext.getCmp(b+e).setCode(i.content);Ext.get(c+e).unmask();if(c==="FE-LANG-PANEL-"||c==="FNR-LANG-PANEL-"||c==="FNR-EN-PANEL-"||c==="AF-PANEL-"){f=Ext.getCmp(c+e).getSize();f.height=f.height+1;Ext.getCmp(c+e).setSize(f);Ext.getCmp(c+e).fireEvent("resize")}}},callback:function(){if(this.filePendingOpen[0]){this.filePendingOpen.shift();if(this.filePendingOpen[0]){if(this.filePendingOpen[0][0]){this.openFile(this.filePendingOpen[0][0],this.filePendingOpen[0][1])}}}}})},addToPendingPatch:function(b,a,e){var d,c;d=new Date();c=new this.storePendingPatch.recordType({id:Ext.id("",""),path:b,name:a,by:this.userLoggin,uniqID:e,date:d.format("Y-m-d H:i:s")});this.storePendingPatch.insert(0,c)},addToPendingCommit:function(d,a){var c,e,b;c=false;this.storePendingCom! mit.each(function(f){if(f.data.path===d&&f.data.name===a){c=true}});if (!c){e=new Date();b=new this.storePendingCommit.recordType({id:Ext.id("",""),path:d,name:a,by:this.userLoggin,date:e.format("Y-m-d H:i:s")});this.storePendingCommit.insert(0,b)}},rendererNumUptodate:function(a){if(a==="0"){return}else{return'<span style="color:green; font-weight: bold;">'+a+"</span>"}},rendererNumCritical:function(a){if(a==="0"){return}else{return'<span style="color:red; font-weight: bold;">'+a+"</span>"}},rendererTotalTranslator:function(a,c,b){return a?((a===0||a>1)?"("+a+" Translators)":"(1 Translator)"):""},rendererSum:function(a){return(a==="0")?"":a},NewTabBugs:function(a,b,c){Ext.getCmp("main-panel").add({xtype:"iframepanel",id:"mifp_bugs_"+a,title:"Loading...",tabTip:c,iconCls:"iconBugs",loadMask:true,defaultSrc:b,listeners:{documentloaded:function(d){d.ownerCt.setTitle(Ext.util.Format.substr(c,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_bugs_"+a)},NewTabMailing:function(a,c,b){Ext.getCmp("main-panel").add({xtype:"iframepanel",id:"mi! fp_"+a,title:"Loading...",tabTip:b,iconCls:"home-mailing-title",loadMask:true,defaultSrc:c,listeners:{documentloaded:function(d){d.ownerCt.setTitle(Ext.util.Format.substr(b,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_"+a)},winDiff:function(d,b,c,a){Ext.getBody().mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Finding the diff. Please, wait...');Ext.Ajax.request({url:"./php/controller.php",params:{task:"get-diff2",FilePath:d,FileName:b,Rev1:c,Rev2:a},success:function(f){var g,e;g=Ext.util.JSON.decode(f.responseText);if(g.success){Ext.getBody().unmask();e=new Ext.Window({title:"Diff between "+c+" & "+a,width:650,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:'<div class="diff-content">'+g.content+"</div>",buttons:[{text:"Close",handler:function(){e.close()}}]});e.show()}},failure:function(){}})},removeTabEvent:function(d,e){var b,c,f,a;a=e.id.split("-");if((a[0]==="FE"||a[0]==! ="FNU"||a[0]==="FNR"||a[0]==="PP")&&a[1]!=="help"){if(a[0]==="FE"){b=E xt.getCmp("FE-"+a[1]).isModifiedLang}if(a[0]==="FNU"){b=Ext.getCmp("FNU-"+a[1]).isModifiedLang}if(a[0]==="FNR"){b=Ext.getCmp("FNR-"+a[1]).isModifiedLang}if(a[0]==="FE"){c=Ext.getCmp("FE-"+a[1]).isModifiedEn}if(a[0]==="FNU"){c=Ext.getCmp("FNU-"+a[1]).isModifiedEn}if(a[0]==="FNR"){c=Ext.getCmp("FNR-"+a[1]).isModifiedEn}if(a[0]==="PP"){f=Ext.getCmp("PP-PATCH-"+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)}}})}else{return true}return false}else{return true}},WinCommit:function(i,h,e){var f,c,g,a,b,d;c=Ext.get("acc-need-update");if(!f){f=new Ext.Window({scope:this,id:"winCvsCommit",title:"CVS commit",closable:false,layout:"form",width:400,height:480,resizable:false,modal:true,bodyStyle! :"padding:5px 5px 0",labelAlign:"top",items:[{xtype:"checktreepanel",id:"tree-panel",anchor:"100%",height:180,autoScroll:true,rootVisible:false,root:{text:"root",expanded:true,children:[]}},{scope:this,xtype:"combo",fieldLabel:"Older messages",editable:false,name:"first2",anchor:"100%",store:this.storeCommitLogMessage,triggerAction:"all",tpl:'<tpl for="."><div class="x-combo-list-item">{[values.text.split("\n").join("<br/>")]}</div></tpl>',valueField:"id",displayField:"text",listeners:{scope:this,render:function(){this.storeCommitLogMessage.load()},select:function(l,j,k){Ext.getCmp("form-commit-message-log").setValue(j.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 m,k,l;function j(n){return n.split("\n").join("<br/>")}m=new Ext.form.TextArea({grow:true,growMin:120});k=new Ext.grid.ColumnModel([new Ext.grid.! RowNumberer(),{id:"GridManageLog",header:"Log Message",dataIndex:"text ",renderer:j,editor:new Ext.Editor(m,{shadow:false,autoSize:true,listeners:{scope:this,complete:function(p,q,o){var n=p.record.data.id;Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"save-LogMessage",messID:n,mess:q},success:function(s,r){var t=Ext.util.JSON.decode(s.responseText);if(t.success){this.storeCommitLogMessage.getById(n).commit()}}})}}})}]);l=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:k,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),autoExpandColumn:"GridManageLog",listeners:{scope:this,rowcontextmenu:function(n,q,o){o.stopEvent();n.getSelectionModel().selectRow(q);var p=new Ext.menu.Menu({items:[{text:"Delete this Log Message",iconCls:"iconDelete",scope:this,handler:function(){Ext.Ajax.request({scope:this,url:"../php/co! ntroller.php",params:{task:"delete-LogMessage",messID:this.storeCommitLogMessage.getAt(q).data.id},success:function(s,r){var t=Ext.util.JSON.decode(s.responseText);if(t.success){this.storeCommitLogMessage.remove(this.storeCommitLogMessage.getAt(q))}}})}}]});p.showAt(o.getXY())}}}],buttons:[{text:"Close",handler:function(){l.close()}}],listeners:{scope:this,close:function(){this.storeCommitLogMessage.reload()}}});l.show()}}],buttons:[{scope:this,text:"Submit",id:"win-commit-btn-submit",handler:function(){var j,n,q,s,k,l,o=[],r,p="",m;if(this.userLoggin==="cvsread"){f.close();Ext.MessageBox.show({title:"Cvsread restriction",msg:"You are logging in with Cvsread account.<br><br>You can't commit anything with this account.",icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.OK});return}j=Ext.getCmp("tree-panel").getValue();n=[];for(m=0;m<j.length;m=m+1){q=Ext.getCmp("tree-panel").getNodeById(j[m]).attributes;s="FE-"+Ext.util.md5("FE-"+q.FilePath+q.FileName);k="FNU-"+Ext.util.md5("F! NU-"+q.FilePath+q.FileName);l="FNR-"+Ext.util.md5("FNR-"+q.FilePath+q. FileName);if(Ext.getCmp("main-panel").findById(s)||Ext.getCmp("main-panel").findById(k)||Ext.getCmp("main-panel").findById(l)){if(Ext.getCmp("main-panel").findById(s)){r=s}if(Ext.getCmp("main-panel").findById(k)){r=k}if(Ext.getCmp("main-panel").findById(l)){r=l}o[0]=r;o[1]=q.FileName;n.push(o)}}if(n.length>0){for(m=0;m<n.length;m=m+1){p+=n[m][1]+"<br>"}Ext.MessageBox.show({scope:this,title:"Warning",msg:"There is "+n.length+" file"+((n.length>1)?"s":"")+" to close before commit.<br><br>"+p+"<br><br>Would you like I close it for you ?",icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,fn:function(t){if(t==="yes"){for(m=0;m<n.length;m=m+1){Ext.getCmp("main-panel").remove(n[m][0])}this.WinCommitLastStep(j,this)}else{return}}})}else{this.WinCommitLastStep(j,this)}return}},{text:"Close",id:"win-commit-btn-close",handler:function(){f.close()}}]})}f.show(c);if(i){a=this.storePendingCommit.getAt(h).data.path;b=this.storePendingCommit.getAt(h).data.name;g=Ext.util.md5(a+b);! d=new Ext.tree.TreeNode({id:"need-commit-"+g,text:a+b,FilePath:a,FileName:b,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(d)}else{this.storePendingCommit.each(function(j){if(e&&e==="by me"&&j.data.by!==this.userLoggin){}else{a=j.data.path;b=j.data.name;g=Ext.util.md5(a+b);d=new Ext.tree.TreeNode({id:"need-commit-"+g,text:a+b,FilePath:a,FileName:b,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(d)}},this)}},WinCommitLastStep:function(g,d){Ext.getBody().mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Please, wait until commit...');var a=[],f,c,e,b;for(b=0;b<g.length;b=b+1){f=Ext.getCmp("tree-panel").getNodeById(g[b]);c=[];c[0]=f.attributes.FilePath;c[1]=f.attributes.FileName;a.push(c)}e=Ext.getCmp("form-commit-message-log").getValue();Ext.getCmp("winCvsCommit").close();Ext.Ajax.request({url:"../php/controller.php",params:! {task:"cvs-commit",nodes:Ext.util.JSON.encode(a),logMessage:e},success :function(i){var j,h;j=Ext.util.JSON.decode(i.responseText);if(j.success){Ext.getBody().unmask();h=new Ext.Window({title:"Status",width:450,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:j.mess.join("<br>"),buttons:[{text:"Close",handler:function(){h.close()}}]});h.show();Ext.Ajax.request({url:"../php/controller.php",params:{task:"on-succes-commit",nodes:Ext.util.JSON.encode(a),logMessage:e},success:function(k){d.storeFilesError.reload();d.storeFilesNeedReviewed.reload();d.storeFilesNeedUpdate.reload();d.storePendingCommit.reload();d.storeTranslators.reload();d.storeSummary.reload()}})}else{}}})},WinUpdate:function(){var e,d;function c(f){f.TaskPing.cancel();Ext.get("wizard-step-1").replaceClass("wizard-step-before","wizard-step-working");Ext.get("wizard-step-1.1").replaceClass("wizard-wait","wizard-show");Ext.Ajax.request({scope:f,url:"../php/controller.php",params:{task:"update-repo"},success:function(g){var h=! Ext.util.JSON.decode(g.responseText);if(h.success){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(){function h(){Ext.Ajax.request({scope:f,url:"../php/controller.php",params:{task:"check-lock-file",lockFile:"lock_update_repository"},success:function(i){var j=Ext.util.JSON.decode(i.responseText);if(!j.success){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)}},failure:function(){g.delay(5000)}})}var g=new Ext.util.DelayedTask(function(){h()});g.delay(5000)}})}function b(f){Ext.get("wizard-step-2").replaceClass("wizard-step-before","wizard-step-working");Ext.Ajax.request({scope:f,url:"../php/controller.php",params:{task:"apply-tools"},success:function(g){var h=Ext.util.JSON.decode(g.responseText);if(h.success){Ext.get("wizard-s! tep-2").replaceClass("wizard-step-working","wizard-step-done");a(this) }},failure:function(){function h(){Ext.Ajax.request({scope:f,url:"../php/controller.php",params:{task:"check-lock-file",lockFile:"lock_apply_tools"},success:function(i){var j=Ext.util.JSON.decode(i.responseText);if(!j.success){Ext.get("wizard-step-2").replaceClass("wizard-step-working","wizard-step-done");a(this)}else{g.delay(5000)}},failure:function(){g.delay(5000)}})}var g=new Ext.util.DelayedTask(function(){h()});g.delay(5000)}})}function a(f){Ext.get("wizard-step-3").replaceClass("wizard-step-before","wizard-step-working");f.storeFilesNeedUpdate.reload();f.storeTranslators.reload();f.storeFilesError.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();f.TaskPing.delay(30000);e.tools.close.setVisible(true)}d=Ext.get("ac! c-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);c(this)}}]})}e.show(d)},WinCheckBuild:function(){var c,a;a=Ext.get("acc-need-update");function b(d){Ext.Ajax.request({scope:d,url:"./php/controller.php",params:{task:"get-logfile",file:"log_check_build"},success:function(f){var g,e;g=Ext.util.JSON.decode(f.responseText);if(g.success){this.TaskPing.delay(! 30000);e=new Ext.Window({title:"Status",width:450,height:350,resizable :false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:g.mess,buttons:[{text:"Close",handler:function(){e.close()}}]});e.show()}}})}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="/img/loading.gif" style="vertical-align: middle;" /> Please, wait until the build is checked...');this.TaskPing.cancel();Ext.Ajax.request({scope:this,url:"./php/controller.php",params:{task:"check-build",xmlDetails:d},success:function(e){var f=Ext.util.JSON.decode(e.responseText);if(f.success){Ext.getBody().unmask();b(this)}},failure:function(g){function e(){Ext.Ajax.request({url:"../php/controller.php",params:{task:"check-lock-file",lockFile:"lock_check_build"},success:f! unction(h){var i=Ext.util.JSON.decode(h.responseText);if(!i.success){Ext.getBody().unmask();b()}else{f.delay(5000)}},failure:function(){f.delay(5000)}})}var f=new Ext.util.DelayedTask(function(){e()});f.delay(5000)}})}}],items:[{xtype:"panel",baseCls:"x-plain",bodyStyle:"padding:5px 5px 0",html:"You're about to check the build via this command :<br/><br/>/usr/bin/php configure.php --with-lang="+this.userLang+"<br><br>",modal:false},{xtype:"checkbox",hideLabel:true,checked:false,boxLabel:"Enable detailed XML error messages",name:"option-xml-details",id:"option-xml-details"}]})}c.show(a)},WinConf:function(){var a,c,e,d,b;if(!a){b=new Ext.XTemplate('<tpl for=".">','<div class="thumb-wrap" id="tplMenu-{id}">','<div class="thumb"><img src="/img/{img}" title=""></div>',"<span>{label}</span></div>","</tpl>");b.compile();d=[["1","go-home.png","Main"],["2","edit-redo.png",'Module "Files Need Update"'],["3","dialog-cancel.png",'Module "Files with Error"'],["4","document-properties.pn! g",'Module "Files need Reviewed"'],["5","view-media-playlist.png",'Mod ule "Pending Patch"']];e=new Ext.data.SimpleStore({id:0,fields:[{name:"id"},{name:"img"},{name:"label"}]});e.loadData(d);c=new Ext.DataView({tpl:b,singleSelect:true,overClass:"x-view-over",itemSelector:"div.thumb-wrap",store:e,listeners:{selectionchange:function(f,g){var h=f.getSelectedRecords();Ext.getCmp("confCard").layout.setActiveItem("conf-card-"+h[0].data.id)}}});a=new Ext.Window({scope:this,layout:"border",width:550,height:400,iconCls:"iconConf",modal:true,title:"Configuration",plain:true,closeAction:"hide",listeners:{show:function(){c.select(c.getNode(0))}},items:[{scope:this,region:"west",width:190,id:"confMenu",autoScroll:true,items:c},{scope:this,layout:"slide",region:"center",id:"confCard",width:375,frame:true,activeItem:0,bbar:new Ext.StatusBar({defaultText:"All changes take effect immediately",defaultIconCls:"confStatusBar"}),items:[{scope:this,id:"conf-card-1",xtype:"form",bodyStyle:"padding: 10px;",items:[{xtype:"fieldset",title:"Themes",autoHeight:true,defau! lts:{hideLabel:true},items:[{xtype:"combo",store:new Ext.data.SimpleStore({fields:["themeFile",{name:"themeName",type:"string"}],data:[["/themes/black/css/xtheme-black.css","Black"],["xtheme-default.css","Default"],["/themes/darkgray/css/xtheme-darkgray.css","DarkGray"],["/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"],["/extjs/resources/css/xtheme-slate.css","Slate"],["/themes/silverCherry/css/xtheme-silverCherry.css","SilverCherry"]]}),valueField:"themeFile",displayField:"themeName",triggerAction:"all",mode:"local",forceSelection:true,editable:false,fieldLabel:"fieldlabel",value:this.userConf.conf_theme,listeners:{scope:this,select:function(h,f,g){Ext.util.CSS.swapStyleSheet("appTheme",h.getValue());this.confUp! date("conf_theme",h.getValue())}}}]}]},{scope:this,id:"conf-card-2",xt ype:"form",bodyStyle:"padding: 10px;",items:[{xtype:"fieldset",title:"Diff view",autoHeight:true,defaults:{hideLabel:true},defaultType:"radio",items:[{scope:this,checked:(this.userConf.conf_needupdate_diff==="using-viewvc")?true:false,boxLabel:"Using ViewVc from php web site",name:"conf_needupdate_diff",inputValue:"using-viewvc",listeners:{scope:this,check:function(g){if(g.checked){this.confUpdate("conf_needupdate_diff",g.getRawValue())}}}},{checked:(this.userConf.conf_needupdate_diff==="using-exec")?true:false,boxLabel:"Using diff -kk -u command line",name:"conf_needupdate_diff",inputValue:"using-exec",listeners:{scope:this,check:function(g){if(g.checked){this.confUpdate("conf_needupdate_diff",g.getRawValue())}}}}]},{xtype:"fieldset",title:"Editor",autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{scope:this,checked:(this.userConf.conf_needupdate_scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_needupdate_scrollbars",liste! ners:{scope:this,check:function(g){this.confUpdate("conf_needupdate_scrollbars",g.getValue())}}}]}]},{id:"conf-card-3",xtype:"form",bodyStyle:"padding: 10px;",items:[{xtype:"fieldset",title:"Error type",autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{scope:this,checked:(this.userConf.conf_error_skipnbliteraltag==="true")?true:false,boxLabel:"Skip nbLiteralTag error",name:"conf_error_skipnbliteraltag",listeners:{scope:this,check:function(g){this.confUpdate("conf_error_skipnbliteraltag",g.getValue())}}}]},{xtype:"fieldset",title:"Editor",autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{scope:this,checked:(this.userConf.conf_error_scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_error_scrollbars",listeners:{scope:this,check:function(g){this.confUpdate("conf_error_scrollbars",g.getValue())}}}]}]},{id:"conf-card-4",xtype:"form",bodyStyle:"padding: 10px;",items:[{xtype:"fieldset",title:"Editor",autoHeig! ht:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{scope :this,checked:(this.userConf.conf_reviewed_scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_reviewed_scrollbars",listeners:{scope:this,check:function(g){this.confUpdate("conf_reviewed_scrollbars",g.getValue())}}}]}]},{id:"conf-card-5",xtype:"form",bodyStyle:"padding: 10px;",items:[{xtype:"fieldset",title:"Editor",autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{scope:this,checked:(this.userConf.conf_patch_scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_patch_scrollbars",listeners:{scope:this,check:function(g){this.confUpdate("conf_patch_scrollbars",g.getValue())}}}]}]}]}],buttons:[{text:"Close",handler:function(){a.hide()}}]})}a.show(Ext.get("winconf-btn"))},confUpdate:function(b,a){Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"conf-update",item:b,value:a},success:function(c){if(b==="conf_needupdate_diff"){this.userConf.conf_needupdate_diff=a}if(b==="conf_needupdate_sc! rollbars"){this.userConf.conf_needupdate_scrollbars=""+a+""}if(b==="conf_error_skipnbliteraltag"){this.userConf.conf_error_skipnbliteraltag=""+a+"";this.storeFilesError.reload()}if(b==="conf_error_scrollbars"){this.userConf.conf_error_scrollbars=""+a+""}if(b==="conf_reviewed_scrollbars"){this.userConf.conf_reviewed_scrollbars=""+a+""}if(b==="conf_patch_scrollbars"){this.userConf.conf_patch_scrollbars=""+a+""}}})},WinAbout:function(){var a;if(!a){a=new Ext.Window({layout:"fit",width:515,height:320,iconCls:"iconHelp",modal:true,title:"About "+this.appName,closeAction:"hide",plain:true,bodyStyle:"color:#000",items:new Ext.TabPanel({autoTabs:true,activeTab:0,border:false,defaults:{autoScroll:true},items:[{title:"About",html:'<div id="phd-oe-about"><img src="/img/logo.png" alt="'+this.appName+'" /></div><div id="phd-oe-about-info">'+this.appName+" ver "+this.appVer+' (c) 2008-2009, Yannick Torrèss - <a href="mailto:yannick@php.net">yannick@php.net</a></div>'},{title:"Cred! its",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_LGPL_v2.txt"}}]}),buttons:[{text:"Close",handler:function(){a.hide()}}]})}a.show(Ext.get("winabout-btn"))},sendEmail:function(b,a){var c,d;c=new Ext.form.FormPanel({baseCls:"x-plain",labelWidth:55,url:"save-form.php",defaultType:"textfield",items:[{fieldLabel:"Send To",name:"to",readOnly:true,anchor:"100%",value:'"'+b+'" <'+a+">"},{fieldLabel:"Subject",name:"subject",anchor:"100%"},{xtype:"textarea",hideLabel:true,name:"msg",anchor:"100% -53"}]});d=new Ext.Window({title:"Send an email",width:500,height:300,minWidth:300,minHeight:200,layout:"fit",plain:t! rue,bodyStyle:"padding:5px;",buttonAlign:"center",items:c,iconCls:"iconSendEmail",buttons:[{text:"Send",handler:function(){var e=c.getForm().getValues();Ext.Ajax.request({url:"./php/controller.php",params:{task:"send-email",to:e.to,subject:e.subject,msg:e.msg},success:function(f){var g=Ext.util.JSON.decode(f.responseText);if(g.success){d.close();Ext.MessageBox.alert("Status","Email sent to "+b+" with success!")}},failure:function(){}})}},{text:"Cancel",handler:function(){d.close()}}]});d.show()},drawInterface:function(){var j,l,a,c,h,g,f,i,e,k,b,d;this.TaskPing=new Ext.util.DelayedTask(function(){Ext.Ajax.request({url:"./php/controller.php",params:{task:"ping"},success:function(m){if(m.responseText!=="pong"){window.location.href="/login.php"}},failure:function(){window.location.href="/login.php"}});this.TaskPing.delay(30000)},this);this.TaskPing.delay(30000);j=new Ext.grid.GridPanel({store:this.storeFilesError,loadMask:true,columns:[{id:"name",header:"Files",sortable:true,d! ataIndex:"name"},{header:"Maintainer",width:45,sortable:true,dataIndex :"maintainer"},{header:"Type",width:45,sortable:true,dataIndex:"type"},{header:"Path",dataIndex:"path",hidden:true}],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(m,p,o,n){if(m.data.needcommit){return"file-need-commit"}}}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,render:function(m){j.view.refresh()},rowdblclick:function(o,y,u){var n,p,v,t,w,m,s,r,q,z,x;n=this.storeFilesError.getAt(y).data.path;p=this.storeFilesError.getAt(y).data.name;v=Ext.util.md5("FE-"+this.userLang+n+p);t=this.storeFilesError.getAt(y).data.needcommit;if(!Ext.getCmp("main-panel").findById("FE-"+v)){w=[];this.storeFilesError.each(function(A){if(A.data.path===n&&A.data.name===p){if(!w[A.data.type]){w.push(A.data.type)}}});m=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php! /controller.php"}),baseParams:{task:"get-log",Path:this.userLang+n,File:p},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});m.setDefaultSort("date","desc");s=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-log",Path:"en"+n,File:p},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});s.setDefaultSort("date","desc");r=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(B){var A=B.getCount();if(A===2){retur! n false}},rowselect:function(B){var A=B.getCount();if(A===2){Ext.getCm p("FE-PANEL-btn-logLang-"+v).enable();Ext.get("FE-PANEL-btn-logLang-"+v).frame("3F8538")}else{Ext.getCmp("FE-PANEL-btn-logLang-"+v).disable()}},rowdeselect:function(B){var A=B.getCount();if(A===2){Ext.getCmp("FE-PANEL-btn-logLang-"+v).enable();Ext.get("FE-PANEL-btn-logLang-"+v).frame("3F8538")}else{Ext.getCmp("FE-PANEL-btn-logLang-"+v).disable()}}}});q=new Ext.grid.GridPanel({store:m,loadMask:true,columns:[r,{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")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:r,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"FE-PANEL-btn-logLang-"+v,disabled:true,handler:function(){var C,B,A;C=r.getSelections();B=C[0].! data.revision;A=C[1].data.revision;this.winDiff(this.userLang+n,p,B,A)}}]});z=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",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("FE-PANEL-btn-logEn-"+v).enable();Ext.get("FE-PANEL-btn-logEn-"+v).frame("3F8538")}else{Ext.getCmp("FE-PANEL-btn-logEn-"+v).disable()}},rowdeselect:function(B){var A=B.getCount();if(A===2){Ext.getCmp("FE-PANEL-btn-logEn-"+v).enable();Ext.get("FE-PANEL-btn-logEn-"+v).frame("3F8538")}else{Ext.getCmp("FE-PANEL-btn-logEn-"+v).disable()}}}});x=new Ext.grid.GridPanel({store:s,loadMask:true,columns:[z,{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! ")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:z, view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"FE-PANEL-btn-logEn-"+v,disabled:true,handler:function(){var C,B,A;C=z.getSelections();B=C[0].data.revision;A=C[1].data.revision;this.winDiff("en"+n,p,B,A)}}]});Ext.getCmp("main-panel").add({closable:true,title:p,originTitle:p,tabTip:"File with error : in "+n,iconCls:"iconTabError",id:"FE-"+v,isModifiedLang:false,isModifiedEn:false,layout:"border",defaults:{collapsible:true,split:true},items:[{xtype:"panel",layout:"fit",region:"north",title:"Error description",id:"FE-error-desc-"+v,height:150,collapsed:true,items:{xtype:"iframepanel",id:"FE-error-type-"+v,loadMask:true,defaultSrc:"/error_type.php?dir="+n+"&file="+p}},{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:this.userLang,items:[q]},{layout:"f! it",title:"En",items:[x]}]}},{title:this.userLang+" File: "+n+p,originTitle:this.userLang+" File: "+n+p,collapsible:false,id:"FE-LANG-PANEL-"+v,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"FE-LANG-"+v,listeners:{scope:this,initialize:function(A){this.getFile(v,this.userLang+n,p,"FE-LANG-PANEL-","FE-LANG-")},cmcursormove:function(){var A=Ext.util.JSON.decode(Ext.getCmp("FE-LANG-"+v).getCursorPosition());Ext.get("FE-LANG-status-line-"+v).dom.innerHTML=A.line;Ext.get("FE-LANG-status-col-"+v).dom.innerHTML=A.caracter},cmchange:function(D,B,C){var A=Ext.util.JSON.decode(Ext.getCmp("FE-LANG-"+v).getCursorPosition());Ext.get("FE-LANG-status-line-"+v).dom.innerHTML=A.line;Ext.get("FE-LANG-status-col-"+v).dom.innerHTML=A.caracter;if(D!==27&&D!==33&&D!==34&&D!==37&&D!==38&&D!==39&&D!==40&&D!==17&&D!==16&&D!==67){if(!Ext.getCmp("FE-"+v).isModifiedLang){Ext.getCmp("FE-LANG-PANEL-"+v).setTitle(Ext.getCmp("FE-LANG-PANEL-"+v).originTitle+' <span s! tyle="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCm p("FE-"+v).setTitle(Ext.getCmp("FE-"+v).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FE-LANG-PANEL-btn-save-"+v).enable();Ext.get("FE-LANG-PANEL-btn-save-"+v).frame("3F8538");Ext.getCmp("FE-LANG-PANEL-btn-saveas-"+v).enable();Ext.get("FE-LANG-PANEL-btn-saveas-"+v).frame("3F8538");Ext.getCmp("FE-"+v).isModifiedLang=true}}},cmscroll:function(A){if(this.userConf.conf_error_scrollbars==="true"){Ext.getCmp("FE-EN-"+v).scrollTo(A)}}}}],bbar:[{scope:this,xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_error_scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_error_scrollbars",listeners:{scope:this,check:function(A){this.confUpdate("conf_error_scrollbars",A.getValue())},render:function(A){Ext.DomHelper.insertHtml("beforeBegin",A.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">Line: <span id="FE-LANG-status-line-'+v+'">-</span></span> <span class="x-status-te! xt-panel">Col: <span id="FE-LANG-status-col-'+v+'">-</span></span></div> ')}}}],tbar:[{scope:this,tooltip:"<b>Save</b> this file",iconCls:"saveFile",id:"FE-LANG-PANEL-btn-save-"+v,disabled:true,handler:function(){this.saveLangFile(v,n,p,"FE",y,this)}},{scope:this,tooltip:"<b>Save as</b> a patch",iconCls:"saveAsFile",id:"FE-LANG-PANEL-btn-saveas-"+v,disabled:true,handler:function(){this.savePatch(this.userLang,v,n,p,"FE",this)}},"->",{tooltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:function(){Ext.getCmp("FE-LANG-"+v).reIndentAll()}}]},{title:"En File: "+n+p,originTitle:"En File: "+n+p,collapsible:false,id:"FE-EN-PANEL-"+v,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"FE-EN-"+v,listeners:{scope:this,initialize:function(A){this.getFile(v,"en"+n,p,"FE-EN-PANEL-","FE-EN-")},cmchange:function(D,B,C){var A=Ext.util.JSON.decode(Ext.getCmp("FE-EN-"+v).getCursorPosition());Ext.get("FE-EN-status-line-"+v).dom.innerHT! ML=A.line;Ext.get("FE-EN-status-col-"+v).dom.innerHTML=A.caracter;if(D !==27&&D!==33&&D!==34&&D!==37&&D!==38&&D!==39&&D!==40&&D!==17&&D!==16&&D!==67){if(!Ext.getCmp("FE-"+v).isModifiedEn){Ext.getCmp("FE-EN-PANEL-"+v).setTitle(Ext.getCmp("FE-EN-PANEL-"+v).originTitle+' <span style="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCmp("FE-"+v).setTitle(Ext.getCmp("FE-"+v).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FE-EN-PANEL-btn-save-"+v).enable();Ext.get("FE-EN-PANEL-btn-save-"+v).frame("3F8538");Ext.getCmp("FE-EN-PANEL-btn-saveas-"+v).enable();Ext.get("FE-EN-PANEL-btn-saveas-"+v).frame("3F8538");Ext.getCmp("FE-"+v).isModifiedEn=true}}},cmscroll:function(A){if(this.userConf.conf_error_scrollbars==="true"){Ext.getCmp("FE-LANG-"+v).scrollTo(A)}},cmcursormove:function(B){var A=Ext.util.JSON.decode(Ext.getCmp("FE-EN-"+v).getCursorPosition());Ext.get("FE-EN-status-line-"+v).dom.innerHTML=A.line;Ext.get("FE-EN-status-col-"+v).dom.innerHTML=A.caracter}}}],bbar:[{scope:this,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="FE-EN-status-line-'+v+'">-</span></span> <span class="x-status-text-panel">Col: <span id="FE-EN-status-col-'+v+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:"<b>Save</b> this file",iconCls:"saveFile",id:"FE-EN-PANEL-btn-save-"+v,disabled:true,handler:function(){this.saveEnFile(v,n,p,"FE",y,this)}},{scope:this,tooltip:"<b>Save as</b> a patch",iconCls:"saveAsFile",id:"FE-EN-PANEL-btn-saveas-"+v,disabled:true,handler:function(){this.savePatch("en",v,n,p,"FE",this)}},"->",{tooltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:function(){Ext.getCmp("FE-EN-"+v).reIndentAll()}}]}]});Ext.getCmp("main-panel").setActiveTab("FE-"+v);if(Ext.getCmp("FE-"+v).getLayout().north.collapsedEl){Ext.getCmp("FE-"+v).getLayout().north.collapsedEl.addClass("x-layout-collapsed-east-error-desc")}}else{Ext.getCmp("ma! in-panel").setActiveTab("FE-"+v)}},rowcontextmenu:function(o,t,r){var p,m,q,n="",s;o.getSelectionModel().selectRow(t);p=this.storeFilesError.getAt(t).data.path;m=this.storeFilesError.getAt(t).data.name;q=Ext.util.md5("FE-"+p+m);if(this.storeFilesError.getAt(t).data.needcommit){n={text:"View Diff",iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+t,title:"Diff",tabTip:"Diff",closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+t+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+t);Ext.get("diff_panel_"+t).mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Please, Wait...');Ext.Ajax.request({scope:this,url:"./php/controller.php",params:{task:"get-diff",FilePath:this.userLang+p,FileName:m},success:function(u){var v=Ext.util.JSON.decode(u.responseText);if(v.success){Ext.get("diff_content_"+t).dom.innerHTML=v.content;Ext.get("diff_panel_"+t).unmask()}},failure:function(){}})}}}s=new Ext.menu.Menu({items:! [{text:"<b>Edit in a new Tab</b>",iconCls:"FilesError",scope:this,handler:function(){j.fireEvent("rowdblclick",o,t,r)}},n,"-",{text:"About error type",iconCls:"iconHelp",scope:this,handler:function(){Ext.getCmp("main-panel").add({closable:true,title:"About error type",iconCls:"iconHelp",id:"FE-help-"+q,autoScroll:true,autoLoad:"/error_type.php"});Ext.getCmp("main-panel").setActiveTab("FE-help-"+q)}}]});s.showAt(r.getXY())}}});l=new Ext.grid.GridPanel({store:this.storeFilesNeedUpdate,loadMask:true,columns:[{id:"name",header:"Files",sortable:true,dataIndex:"name"},{header:"EN revision",width:45,sortable:true,dataIndex:"en_revision"},{header:Ext.util.Format.uppercase(this.userLang)+" revision",width:45,sortable:true,dataIndex:"revision"},{header:"Maintainer",width:45,sortable:true,dataIndex:"maintainer"},{header:"Path",dataIndex:"path",hidden:true}],view:new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.lengt! h > 1 ? "Files" : "File"]})',getRowClass:function(m,p,o,n){if(m.data.n eedcommit){return"file-need-commit"}if(m.data.isCritical){return"file-critical"}},emptyText:'<div style="text-align: center;">No Files</div>'}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,rowcontextmenu:function(o,s,q){var p,m,n="",r;p=this.storeFilesNeedUpdate.getAt(s).data.path;m=this.storeFilesNeedUpdate.getAt(s).data.name;o.getSelectionModel().selectRow(s);if(this.storeFilesNeedUpdate.getAt(s).data.needcommit){n={text:"View Diff",iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+s,title:"Diff",tabTip:"Diff",closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+s+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+s);Ext.get("diff_panel_"+s).mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Please, Wait...');Ext.Ajax.request({url:"./php/controller.php",params:{task:"get-diff",FilePath:this.userLang+p,FileName:m! },success:function(t){var u=Ext.util.JSON.decode(t.responseText);if(u.success){Ext.get("diff_content_"+s).dom.innerHTML=u.content;Ext.get("diff_panel_"+s).unmask()}},failure:function(){}})}}}r=new Ext.menu.Menu({items:[{text:"<b>Edit in a new Tab</b>",iconCls:"iconTabNeedUpdate",scope:this,handler:function(){l.fireEvent("rowdblclick",o,s,q)}},n]});q.stopEvent();r.showAt(q.getXY())},rowdblclick:function(o,x,v){var n,p,z,y,t,u,m,s,r,q,B,w,A;n=this.storeFilesNeedUpdate.getAt(x).data.path;p=this.storeFilesNeedUpdate.getAt(x).data.name;z=this.storeFilesNeedUpdate.getAt(x).data.en_revision;y=this.storeFilesNeedUpdate.getAt(x).data.revision;t=this.storeFilesNeedUpdate.getAt(x).data.needcommit;u=Ext.util.md5("FNU-"+this.userLang+n+p);if(!Ext.getCmp("main-panel").findById("FNU-"+u)){m=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-log",Path:this.userLang+n,File:p},reader:new Ext.data.JsonReader({root:"Items",totalPro! perty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"revision",ma pping:"revision"},{name:"date",mapping:"date",type:"date",dateFormat:"Y/m/d H:i:s"},{name:"author",mapping:"author"},{name:"content",mapping:"content"}])});m.setDefaultSort("date","desc");s=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-log",Path:"en"+n,File:p},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});s.setDefaultSort("date","desc");r=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(D){var C=D.getCount();if(C===2){return false}},rowselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNU-PANEL-btn-logLang-"+u).enable();Ext.get("FNU-PANEL-btn-logLang-"+u).frame("3F8538")}else{Ext.getCmp("FNU-PANEL-btn-logLang! -"+u).disable()}},rowdeselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNU-PANEL-btn-logLang-"+u).enable();Ext.get("FNU-PANEL-btn-logLang-"+u).frame("3F8538")}else{Ext.getCmp("FNU-PANEL-btn-logLang-"+u).disable()}}}});q=new Ext.grid.GridPanel({store:m,loadMask:true,columns:[r,{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")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:r,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"FNU-PANEL-btn-logLang-"+u,disabled:true,handler:function(){var E,D,C;E=r.getSelections();D=E[0].data.revision;C=E[1].data.revision;this.winDiff(this.userLang+n,p,D,C)}}]});B=new Ext.grid.CheckboxSelectionModel({single! Select:false,width:22,header:"",listeners:{beforerowselect:function(D) {var C=D.getCount();if(C===2){return false}},rowselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNU-PANEL-btn-logEn-"+u).enable();Ext.get("FNU-PANEL-btn-logEn-"+u).frame("3F8538")}else{Ext.getCmp("FNU-PANEL-btn-logEn-"+u).disable()}},rowdeselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNU-PANEL-btn-logEn-"+u).enable();Ext.get("FNU-PANEL-btn-logEn-"+u).frame("3F8538")}else{Ext.getCmp("FNU-PANEL-btn-logEn-"+u).disable()}}}});w=new Ext.grid.GridPanel({store:s,loadMask:true,columns:[B,{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")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:B,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",! id:"FNU-PANEL-btn-logEn-"+u,disabled:true,handler:function(){var E,D,C;E=B.getSelections();D=E[0].data.revision;C=E[1].data.revision;this.winDiff("en"+n,p,D,C)}}]});if(this.userConf.conf_needupdate_diff==="using-viewvc"){A={xtype:"panel",layout:"fit",region:"north",title:"Diff From cvs",height:150,collapsed:true,items:{xtype:"iframepanel",id:"FNU-diff-"+u,loadMask:true,defaultSrc:"http://cvs.php.net/viewvc.cgi/phpdoc/en"+n+p+"?r1="+y+"&r2="+z}}}else{if(this.userConf.conf_needupdate_diff==="using-exec"){A={xtype:"panel",layout:"fit",region:"north",title:"Diff From cvs",height:150,autoScroll:true,collapsed:true,html:'<div id="FNU-diff-'+u+'" class="diff-content"></div>',listeners:{render:function(){Ext.Ajax.request({url:"./php/controller.php",params:{task:"get-diff2",FilePath:"en"+n,FileName:p,Rev2:y,Rev1:z},success:function(C){var D=Ext.util.JSON.decode(C.responseText);if(D.success){Ext.get("FNU-diff-"+u).dom.innerHTML=D.content}},failure:function(){}})}}}}}Ext.getCmp("main-! panel").add({closable:true,title:p,originTitle:p,tabTip:"Need Update : in "+n,iconCls:"iconTabNeedUpdate",id:"FNU-"+u,isModifiedLang:false,isModifiedEn:false,layout:"border",defaults:{collapsible:true,split:true},items:[A,{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:this.userLang,items:[q]},{layout:"fit",title:"En",items:[w]}]}},{scope:this,title:this.userLang+" File: "+n+p,originTitle:this.userLang+" File: "+n+p,collapsible:false,id:"FNU-LANG-PANEL-"+u,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"FNU-LANG-"+u,listeners:{scope:this,initialize:function(){this.getFile(u,this.userLang+n,p,"FNU-LANG-PANEL-","FNU-LANG-")},cmcursormove:function(){var C=Ext.util.JSON.decode(Ext.getCmp("FNU-LANG-"+u).getCursorPosition());Ext.get("FNU-LANG-status-line-"+u).dom.innerHTML=C.line;Ext.get("FNU-LANG-status-col-"+u).dom.innerHTML=C.caracter},cmchange:func! tion(F,D,E){var C=Ext.util.JSON.decode(Ext.getCmp("FNU-LANG-"+u).getCursorPosition());Ext.get("FNU-LANG-status-line-"+u).dom.innerHTML=C.line;Ext.get("FNU-LANG-status-col-"+u).dom.innerHTML=C.caracter;if(F!==27&&F!==33&&F!==34&&F!==37&&F!==38&&F!==39&&F!==40&&F!==17&&F!==16&&F!==67){if(!Ext.getCmp("FNU-"+u).isModifiedLang){Ext.getCmp("FNU-LANG-PANEL-"+u).setTitle(Ext.getCmp("FNU-LANG-PANEL-"+u).originTitle+' <span style="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCmp("FNU-"+u).setTitle(Ext.getCmp("FNU-"+u).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNU-LANG-PANEL-btn-save-"+u).enable();Ext.get("FNU-LANG-PANEL-btn-save-"+u).frame("3F8538");Ext.getCmp("FNU-LANG-PANEL-btn-saveas-"+u).enable();Ext.get("FNU-LANG-PANEL-btn-saveas-"+u).frame("3F8538");Ext.getCmp("FNU-"+u).isModifiedLang=true}}},cmscroll:function(C){if(this.userConf.conf_needupdate_scrollbars==="true"){Ext.getCmp("FNU-EN-"+u).scrollTo(C)}}}}],bbar:[{scope:this,! xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_needupdate _scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_needupdate_scrollbars",listeners:{scope:this,check:function(C){this.confUpdate("conf_needupdate_scrollbars",C.getValue())},render:function(C){Ext.DomHelper.insertHtml("beforeBegin",C.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">Line: <span id="FNU-LANG-status-line-'+u+'">-</span></span> <span class="x-status-text-panel">Col: <span id="FNU-LANG-status-col-'+u+'">-</span></span></div> ')}}}],tbar:[{scope:this,tooltip:"<b>Save</b> this file",iconCls:"saveFile",id:"FNU-LANG-PANEL-btn-save-"+u,disabled:true,handler:function(){this.saveLangFile(u,n,p,"FNU",x,this)}},{scope:this,tooltip:"<b>Save as</b> a patch",iconCls:"saveAsFile",id:"FNU-LANG-PANEL-btn-saveas-"+u,disabled:true,handler:function(){this.savePatch(this.userLang,u,n,p,"FNU",this)}},"->",{tooltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:function(){Ext.g! etCmp("FNU-LANG-"+u).reIndentAll()}},{tooltip:"Insert <b>Reviewed</b> tag",text:"Reviewed tag",iconCls:"iconInsertCode",handler:function(){Ext.getCmp("FNU-LANG-"+u).insertIntoLine(2,"end","\n<!-- Reviewed: no -->");Ext.getCmp("FNU-LANG-"+u).focus()}},{tooltip:"Insert <b>Revcheck</b> tag",text:"Rev tag",iconCls:"iconInsertCode",handler:function(){Ext.getCmp("FNU-LANG-"+u).insertIntoLine(2,"end","\n<!-- EN-Revision: 1.XX Maintainer: "+this.userLoggin+" Status: ready -->");Ext.getCmp("FNU-LANG-"+u).focus()}}]},{title:"En File: "+n+p,originTitle:"En File: "+n+p,collapsible:false,id:"FNU-EN-PANEL-"+u,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"FNU-EN-"+u,listeners:{scope:this,initialize:function(){this.getFile(u,"en"+n,p,"FNU-EN-PANEL-","FNU-EN-")},cmchange:function(F,D,E){var C=Ext.util.JSON.decode(Ext.getCmp("FNU-EN-"+u).getCursorPosition());Ext.get("FNU-EN-status-line-"+u).dom.innerHTML=C.line;Ext.get("FNU-EN-status-col-"+u).dom.innerHTML! =C.caracter;if(F!==27&&F!==33&&F!==34&&F!==37&&F!==38&&F!==39&&F!==40& &F!==17&&F!==16&&F!==67){if(!Ext.getCmp("FNU-"+u).isModifiedEn){Ext.getCmp("FNU-EN-PANEL-"+u).setTitle(Ext.getCmp("FNU-EN-PANEL-"+u).originTitle+' <span style="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCmp("FNU-"+u).setTitle(Ext.getCmp("FNU-"+u).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNU-EN-PANEL-btn-save-"+u).enable();Ext.get("FNU-EN-PANEL-btn-save-"+u).frame("3F8538");Ext.getCmp("FNU-EN-PANEL-btn-saveas-"+u).enable();Ext.get("FNU-EN-PANEL-btn-saveas-"+u).frame("3F8538");Ext.getCmp("FNU-"+u).isModifiedEn=true}}},cmscroll:function(C){if(this.userConf.conf_needupdate_scrollbars==="true"){Ext.getCmp("FNU-LANG-"+u).scrollTo(C)}},cmcursormove:function(D){var C=Ext.util.JSON.decode(Ext.getCmp("FNU-EN-"+u).getCursorPosition());Ext.get("FNU-EN-status-line-"+u).dom.innerHTML=C.line;Ext.get("FNU-EN-status-col-"+u).dom.innerHTML=C.caracter}}}],bbar:[{scope:this,xtype:"panel",height:21,baseCls:"",bodyStyle:"padding-top:5px;",h! tml:'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">Line: <span id="FNU-EN-status-line-'+u+'">-</span></span> <span class="x-status-text-panel">Col: <span id="FNU-EN-status-col-'+u+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:"<b>Save</b> this file",iconCls:"saveFile",id:"FNU-EN-PANEL-btn-save-"+u,disabled:true,handler:function(){this.saveEnFile(u,n,p,"FNU",x,this)}},{scope:this,tooltip:"<b>Save as</b> a patch",iconCls:"saveAsFile",id:"FNU-EN-PANEL-btn-saveas-"+u,disabled:true,handler:function(){this.savePatch("en",u,n,p,"FNU",this)}},"->",{tooltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:function(){Ext.getCmp("FNU-EN-"+u).reIndentAll()}}]}]});Ext.getCmp("main-panel").setActiveTab("FNU-"+u)}else{Ext.getCmp("main-panel").setActiveTab("FNU-"+u)}}}});a=new Ext.grid.GridPanel({store:this.storePendingPatch,loadMask:true,columns:[{id:"name",header:"Files",sortable:true,dataIndex:"name"},{hea! der:"Posted by",width:45,sortable:true,dataIndex:"by"},{header:"Date", width:45,sortable:true,dataIndex:"date"},{header:"Path",dataIndex:"path",hidden:true}],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>'}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,rowcontextmenu:function(n,t,r){var o,m,p,q,s;o=this.storePendingPatch.getAt(t).data.path;m=this.storePendingPatch.getAt(t).data.name;p=this.storePendingPatch.getAt(t).data.uniqID;q=Ext.util.md5("PP-"+p+o+m);n.getSelectionModel().selectRow(t);s=new Ext.menu.Menu({items:[{text:"<b>Edit in a new Tab</b>",iconCls:"PendingPatch",scope:this,handler:function(){a.fireEvent("rowdblclick",n,t,r)}},"-",{text:"Reject this patch",iconCls:"iconPageDelete",scope:this,handler:function(){this.rejectPatch(q,o,m,p,t,this)}}]});s.showAt(r.getXY())},rowdblclick:function(n,u,s){var m,o,v,t,r,q,p;m=this.storePendingPatch.getAt! (u).data.path;o=this.storePendingPatch.getAt(u).data.name;v=this.storePendingPatch.getAt(u).data.uniqID;t=Ext.util.md5("PP-"+v+m+o);if(!Ext.getCmp("main-panel").findById("FE-"+t)){r=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-log",Path:m,File:o},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});r.setDefaultSort("date","desc");q=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(x){var w=x.getCount();if(w===2){return false}},rowselect:function(x){var w=x.getCount();if(w===2){Ext.getCmp("PP-PANEL-btn-log-"+t).enable();Ext.get("PP-PANEL-btn-log-"+t).frame("3F8538")}else{Ext.getCmp("PP-PANEL-btn-log-"+t).disable()}},rowdesele! ct:function(x){var w=x.getCount();if(w===2){Ext.getCmp("PP-PANEL-btn-l og-"+t).enable();Ext.get("PP-PANEL-btn-log-"+t).frame("3F8538")}else{Ext.getCmp("PP-PANEL-btn-log-"+t).disable()}}}});p=new Ext.grid.GridPanel({store:r,loadMask:true,columns:[q,{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")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:q,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"PP-PANEL-btn-log-"+t,disabled:true,handler:function(){var y,x,w;y=q.getSelections();x=y[0].data.revision;w=y[1].data.revision;this.winDiff(m,o,x,w)}}]});Ext.getCmp("main-panel").add({closable:true,title:o,originTitle:o,tabTip:"Patch for "+m+o,iconCls:"PendingPatch",id:"PP-"+t,layout:"border",defaults:{collapsible:true,split:true! },items:[{xtype:"panel",layout:"fit",region:"north",title:"Patch content",id:"PP-patch-desc-"+t,height:150,autoScroll:true,collapsed:true,html:'<div id="diff_content_'+t+'" class="diff-content"></div>',listeners:{render:function(){Ext.Ajax.request({scope:this,url:"./php/controller.php",params:{task:"get-diff",FilePath:m,FileName:o,type:"patch",uniqID:v},success:function(w){var x=Ext.util.JSON.decode(w.responseText);if(x.success){Ext.get("diff_content_"+t).dom.innerHTML=x.content}},failure:function(){}})}}},{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:"Log",items:[p]}]}},{title:"Proposed Patch for "+m+o,originTitle:"Proposed Patch for "+m+o,collapsible:false,id:"PP-PATCH-PANEL-"+t,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"PP-PATCH-"+t,isModified:false,listeners:{scope:! this,initialize:function(w){this.getFile(t,m,o+"."+v+".patch","PP-PATC H-PANEL-","PP-PATCH-")},cmcursormove:function(){var w=Ext.util.JSON.decode(Ext.getCmp("PP-PATCH-"+t).getCursorPosition());Ext.get("PP-PATCH-status-line-"+t).dom.innerHTML=w.line;Ext.get("PP-PATCH-status-col-"+t).dom.innerHTML=w.caracter},cmchange:function(z,x,y){var w=Ext.util.JSON.decode(Ext.getCmp("PP-PATCH-"+t).getCursorPosition());Ext.get("PP-PATCH-status-line-"+t).dom.innerHTML=w.line;Ext.get("PP-PATCH-status-col-"+t).dom.innerHTML=w.caracter;if(z!==27&&z!==33&&z!==34&&z!==37&&z!==38&&z!==39&&z!==40&&z!==17&&z!==16&&z!==67){if(!Ext.getCmp("PP-PATCH-"+t).isModified){Ext.getCmp("PP-PATCH-PANEL-"+t).setTitle(Ext.getCmp("PP-PATCH-PANEL-"+t).originTitle+' <span style="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCmp("PP-"+t).setTitle(Ext.getCmp("PP-"+t).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("PP-PATCH-"+t).isModified=true}}},cmscroll:function(w){if(this.userConf.conf_patch_scrollbars==="true"){Ext.getCmp("PP-ORIGIN-"+t)! .scrollTo(w)}}}}],bbar:[{scope:this,xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_patch_scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_patch_scrollbars",listeners:{scope:this,check:function(w){this.confUpdate("conf_patch_scrollbars",w.getValue())},render:function(w){Ext.DomHelper.insertHtml("beforeBegin",w.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">Line: <span id="PP-PATCH-status-line-'+t+'">-</span></span> <span class="x-status-text-panel">Col: <span id="PP-PATCH-status-col-'+t+'">-</span></span></div> ')}}}],tbar:[{scope:this,tooltip:"<b>Accept</b> this patch and <b>Save</b> the file",iconCls:"saveFile",id:"PP-PATCH-PANEL-btn-save-"+t,handler:function(){this.saveFileViaPatch(t,m,o,v,u,this)}},{scope:this,tooltip:"<b>Reject</b> this patch",iconCls:"iconPageDelete",id:"PP-PATCH-PANEL-btn-reject-"+t,handler:function(){this.rejectPatch(t,m,o,v,u,this)}},"->",{to! oltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:fu nction(){Ext.getCmp("PP-PATCH-"+t).reIndentAll()}}]},{title:"Original File: "+m+o,originTitle:"Original File: "+m+o,collapsible:false,id:"PP-ORIGIN-PANEL-"+t,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"PP-ORIGIN-"+t,readOnly:true,listeners:{scope:this,initialize:function(w){this.getFile(t,m,o,"PP-ORIGIN-PANEL-","PP-ORIGIN-")},cmscroll:function(w){if(this.userConf.conf_patch_scrollbars==="true"){Ext.getCmp("PP-PATCH-"+t).scrollTo(w)}},cmcursormove:function(x){var w=Ext.util.JSON.decode(Ext.getCmp("PP-ORIGIN-"+t).getCursorPosition());Ext.get("PP-ORIGIN-status-line-"+t).dom.innerHTML=w.line;Ext.get("PP-ORIGIN-status-col-"+t).dom.innerHTML=w.caracter}}}],bbar:[{scope:this,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="PP-ORIGIN-status-line-'+t+'">-</span></span> <span class="x-status-text-panel">Col: <span id=! "PP-ORIGIN-status-col-'+t+'">-</span></span></div> '}],tbar:[{}]}]});Ext.getCmp("main-panel").setActiveTab("PP-"+t);if(Ext.getCmp("PP-"+t).getLayout().north.collapsedEl){Ext.getCmp("PP-"+t).getLayout().north.collapsedEl.addClass("x-layout-collapsed-east-patch-desc")}}}}});c=new Ext.grid.GridPanel({store:this.storePendingCommit,loadMask:true,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"},{header:"Path",dataIndex:"path",hidden:true}],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>'}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,rowcontextmenu:function(n,r,p){var o,m,q;o=this.storePendingCommit.getAt(r).data.path;m=this.storePendingCom! mit.getAt(r).data.name;n.getSelectionModel().selectRow(r);q=new Ext.me nu.Menu({items:[{text:"<b>Edit in a new Tab</b>",iconCls:"PendingCommit",scope:this,handler:function(){c.fireEvent("rowdblclick",n,r,p)}},"-",{text:"View Diff",iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+r,title:"Diff",tabTip:"Diff",closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+r+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+r);Ext.get("diff_panel_"+r).mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Please, Wait...');Ext.Ajax.request({url:"./php/controller.php",params:{task:"get-diff",FilePath:o,FileName:m},success:function(s){var t=Ext.util.JSON.decode(s.responseText);if(t.success){Ext.get("diff_content_"+r).dom.innerHTML=t.content;Ext.get("diff_panel_"+r).unmask()}},failure:function(){}})}},{text:"Download the diff as a patch",iconCls:"iconCommitFileCvs",scope:this,handler:function(){window.location.href="./d! l_Patch.php?FilePath="+o+"&FileName="+m}},"-",{text:"Clear this change",iconCls:"iconPageDelete",scope:this,handler:function(){function s(t){if(t==="yes"){if(Ext.getCmp("main-panel").findById("FNU-"+Ext.util.md5("FNU-"+o+m))){Ext.getCmp("main-panel").remove("FNU-"+Ext.util.md5("FNU-"+o+m))}Ext.Ajax.request({scope:this,url:"./php/controller.php",params:{task:"clear-local-change",FilePath:o,FileName:m},success:function(u){var v=Ext.util.JSON.decode(u.responseText);if(v.success){this.storeFilesNeedUpdate.reload();this.storeFilesError.reload();this.storeFilesNeedReviewed.reload();this.storePendingCommit.remove(this.storePendingCommit.getAt(r));this.storePendingCommit.fireEvent("add",this.storePendingCommit)}},failure:function(){}})}}Ext.MessageBox.confirm("Confirm","This action will clear your local modification and take back this file from his original stats.<br/>You need confirm.",s,this)}},"-",{text:"Commit...",iconCls:"iconCommitFileCvs",scope:this,menu:new Ext.menu.Menu({i! tems:[{text:"...this file",iconCls:"iconCommitFileCvs",scope:this,hand ler:function(){this.WinCommit(true,r)}},{text:"...all files modified by me",iconCls:"iconCommitFileCvs",scope:this,handler:function(){this.WinCommit(false,"","by me")}},{text:"...all files modified",iconCls:"iconCommitFileCvs",scope:this,handler:function(){this.WinCommit(false)}}]})}]});q.showAt(p.getXY())},rowdblclick:function(n,q,p){var o,m;o=this.storePendingCommit.getAt(q).data.path;m=this.storePendingCommit.getAt(q).data.name;this.openFile(o,m)}}});h=new Ext.grid.GridPanel({store:this.storeFilesNeedReviewed,loadMask:true,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}],view:new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "Files" : "File"]})',getRowClass:function(m,p,o,n){if(m.data.needcommit){re! turn"file-need-commit"}},emptyText:'<div style="text-align: center;">No files</div>'}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,rowcontextmenu:function(n,t,r){var m,p,s,o="",v="",u,q;n.getSelectionModel().selectRow(t);m=this.storeFilesNeedReviewed.getAt(t).data.path;p=this.storeFilesNeedReviewed.getAt(t).data.name;s=Ext.util.md5("FNR-"+this.userLang+m+p);if(this.storeFilesNeedReviewed.getAt(t).data.needcommit){o={text:"View Diff",iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+t,title:"Diff",tabTip:"Diff",closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+t+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+t);Ext.get("diff_panel_"+t).mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Please, Wait...');Ext.Ajax.request({scope:this,url:"./php/controller.php",params:{task:"get-diff",FilePath:this.userLang+m! ,FileName:p},success:function(w){var x=Ext.util.JSON.decode(w.response Text);if(x.success){Ext.get("diff_content_"+t).dom.innerHTML=x.content;Ext.get("diff_panel_"+t).unmask()}},failure:function(){}})}}}u=m.split("/");if(u[1]==="reference"){v={text:"Open all files about "+u[2]+" extension",iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getBody().mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Open all files about '+u[2]+" extension. Please, wait...");Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"all-files-about-extension",ExtName:u[2]},success:function(y,x){var z,w;z=Ext.util.JSON.decode(y.responseText);this.filePendingOpen=[];for(w=0;w<z.files.length;w=w+1){this.filePendingOpen[w]=[this.userLang+z.files[w].path,z.files[w].name]}this.openFile(this.filePendingOpen[0][0],this.filePendingOpen[0][1]);Ext.getBody().unmask()}})}}}q=new Ext.menu.Menu({scope:this,items:[{text:"<b>Edit in a new Tab</b>",iconCls:"FilesNeedReviewed",scope:this,handler:function(){h.fireEvent("rowdblclick",n,t,r)}},o,"! -",v]});r.stopEvent();q.showAt(r.getXY())},rowdblclick:function(o,y,v){var n,p,s,u,w,m,t,r,q,z,x;n=this.storeFilesNeedReviewed.getAt(y).data.path;p=this.storeFilesNeedReviewed.getAt(y).data.name;s=this.storeFilesNeedReviewed.getAt(y).data.reviewed;u=this.storeFilesNeedReviewed.getAt(y).data.needcommit;w=Ext.util.md5("FNR-"+this.userLang+n+p);if(!Ext.getCmp("main-panel").findById("FNR-"+w)){m=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-log",Path:this.userLang+n,File:p},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});m.setDefaultSort("date","desc");t=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-log",Path:"en"+n,F! ile:p},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbI tems",id:"id"},[{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"}])});t.setDefaultSort("date","desc");r=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",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("FNR-PANEL-btn-logLang-"+w).enable();Ext.get("FNR-PANEL-btn-logLang-"+w).frame("3F8538")}else{Ext.getCmp("FNR-PANEL-btn-logLang-"+w).disable()}},rowdeselect:function(B){var A=B.getCount();if(A===2){Ext.getCmp("FNR-PANEL-btn-logLang-"+w).enable();Ext.get("FNR-PANEL-btn-logLang-"+w).frame("3F8538")}else{Ext.getCmp("FNR-PANEL-btn-logLang-"+w).disable()}}}});q=new Ext.grid.GridPanel({store:m,loadMask:true,columns:[r,{id:"id",header:"Rev.",width:40,sortable:false,dataIndex:"revision"},{header:"Content",width:130,sortab! le: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")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:r,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"FNR-PANEL-btn-logLang-"+w,disabled:true,handler:function(){var C,B,A;C=r.getSelections();B=C[0].data.revision;A=C[1].data.revision;this.winDiff(this.userLang+n,p,B,A)}}]});z=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",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("FNR-PANEL-btn-logEn-"+w).enable();Ext.get("FNR-PANEL-btn-logEn-"+w).frame("3F8538")}else{Ext.getCmp("FNR-PANEL-btn-logEn-"+w).disable()}},rowdeselect:function(B){var A=B.getCount();if(A===2){Ext.getCmp("FNR-PANEL-b! tn-logEn-"+w).enable();Ext.get("FNR-PANEL-btn-logEn-"+w).frame("3F8538 ")}else{Ext.getCmp("FNR-PANEL-btn-logEn-"+w).disable()}}}});x=new Ext.grid.GridPanel({store:t,loadMask:true,columns:[z,{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")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:z,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"FNR-PANEL-btn-logEn-"+w,disabled:true,handler:function(){var C,B,A;C=z.getSelections();B=C[0].data.revision;A=C[1].data.revision;this.winDiff("en"+n,p,B,A)}}]});Ext.getCmp("main-panel").add({closable:true,title:p,originTitle:p,tabTip:"Need Reviewed : in "+n,iconCls:"iconTabNeedReviewed",id:"FNR-"+w,isModifiedLang:false,isModifiedEn:false,layout:"border",defaults:{collapsible:true,split! :true},items:[{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:this.userLang,items:[q]},{layout:"fit",title:"En",items:[x]}]}},{title:this.userLang+" File: "+n+p,originTitle:this.userLang+" File: "+n+p,collapsible:false,id:"FNR-LANG-PANEL-"+w,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"FNR-LANG-"+w,listeners:{scope:this,initialize:function(){this.getFile(w,this.userLang+n,p,"FNR-LANG-PANEL-","FNR-LANG-")},cmcursormove:function(B){var A=Ext.util.JSON.decode(Ext.getCmp("FNR-LANG-"+w).getCursorPosition());Ext.get("FNR-LANG-status-line-"+w).dom.innerHTML=A.line;Ext.get("FNR-LANG-status-col-"+w).dom.innerHTML=A.caracter},cmchange:function(D,B,C){var A=Ext.util.JSON.decode(Ext.getCmp("FNR-LANG-"+w).getCursorPosition());Ext.get("FNR-LANG-status-line-"+w).dom.innerHTML=A.line;Ext.g! et("FNR-LANG-status-col-"+w).dom.innerHTML=A.caracter;if(D!==27&&D!==3 3&&D!==34&&D!==37&&D!==38&&D!==39&&D!==40&&D!==17&&D!==16&&D!==67){if(!Ext.getCmp("FNR-"+w).isModifiedLang){Ext.getCmp("FNR-LANG-PANEL-"+w).setTitle(Ext.getCmp("FNR-LANG-PANEL-"+w).originTitle+' <span style="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCmp("FNR-"+w).setTitle(Ext.getCmp("FNR-"+w).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNR-LANG-PANEL-btn-save-"+w).enable();Ext.get("FNR-LANG-PANEL-btn-save-"+w).frame("3F8538");Ext.getCmp("FNR-LANG-PANEL-btn-saveas-"+w).enable();Ext.get("FNR-LANG-PANEL-btn-saveas-"+w).frame("3F8538");Ext.getCmp("FNR-"+w).isModifiedLang=true}}},cmscroll:function(A){if(this.userConf.conf_reviewed_scrollbars==="true"){Ext.getCmp("FNR-EN-"+w).scrollTo(A)}}}}],bbar:[{scope:this,xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_reviewed_scrollbars==="true")?true:false,boxLabel:"Synchronize scroll bars",name:"conf_reviewed_scrollbars",listeners:{scope:this,check:function(A){this.confUpd! ate("conf_reviewed_scrollbars",A.getValue())},render:function(A){Ext.DomHelper.insertHtml("beforeBegin",A.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">Line: <span id="FNR-LANG-status-line-'+w+'">-</span></span> <span class="x-status-text-panel">Col: <span id="FNR-LANG-status-col-'+w+'">-</span></span></div> ')}}}],tbar:[{scope:this,tooltip:"<b>Save</b> this file",iconCls:"saveFile",id:"FNR-LANG-PANEL-btn-save-"+w,disabled:true,handler:function(){this.saveLangFile(w,n,p,"FNR",y,this)}},{scope:this,tooltip:"<b>Save as</b> a patch",iconCls:"saveAsFile",id:"FNR-LANG-PANEL-btn-saveas-"+w,disabled:true,handler:function(){this.savePatch(this.userLang,w,n,p,"FNR",this)}},"->",{tooltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:function(){Ext.getCmp("FNR-LANG-"+w).reIndentAll()}},{tooltip:"Insert <b>Reviewed</b> tag",text:"Reviewed tag",iconCls:"iconInsertCode",handler:function(){Ext.getCmp("FNR-! LANG-"+w).insertIntoLine(2,"end","\n<!-- Reviewed: no -->");Ext.getCmp ("FNR-LANG-"+w).focus()}},{tooltip:"Insert <b>Revcheck</b> tag",text:"Rev tag",iconCls:"iconInsertCode",handler:function(){Ext.getCmp("FNR-LANG-"+w).insertIntoLine(2,"end","\n<!-- EN-Revision: 1.XX Maintainer: "+this.userLoggin+" Status: ready -->");Ext.getCmp("FNR-LANG-"+w).focus()}}]},{title:"En File: "+n+p,originTitle:"En File: "+n+p,collapsible:false,id:"FNR-EN-PANEL-"+w,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"FNR-EN-"+w,listeners:{scope:this,initialize:function(){this.getFile(w,"en"+n,p,"FNR-EN-PANEL-","FNR-EN-")},cmchange:function(D,B,C){var A=Ext.util.JSON.decode(Ext.getCmp("FNR-EN-"+w).getCursorPosition());Ext.get("FNR-EN-status-line-"+w).dom.innerHTML=A.line;Ext.get("FNR-EN-status-col-"+w).dom.innerHTML=A.caracter;if(D!==27&&D!==33&&D!==34&&D!==37&&D!==38&&D!==39&&D!==40&&D!==17&&D!==16&&D!==67){if(!Ext.getCmp("FNR-"+w).isModifiedEn){Ext.getCmp("FNR-EN-PANEL-"+w).setTitle(Ext.getCmp("FNR-EN-PANEL-"+w).originTitle+' <span sty! le="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCmp("FNR-"+w).setTitle(Ext.getCmp("FNR-"+w).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNR-EN-PANEL-btn-save-"+w).enable();Ext.get("FNR-EN-PANEL-btn-save-"+w).frame("3F8538");Ext.getCmp("FNR-EN-PANEL-btn-saveas-"+w).enable();Ext.get("FNR-EN-PANEL-btn-saveas-"+w).frame("3F8538");Ext.getCmp("FNR-"+w).isModifiedEn=true}}},cmscroll:function(A){if(this.userConf.conf_reviewed_scrollbars==="true"){Ext.getCmp("FNR-LANG-"+w).scrollTo(A)}},cmcursormove:function(B){var A=Ext.util.JSON.decode(Ext.getCmp("FNR-EN-"+w).getCursorPosition());Ext.get("FNR-EN-status-line-"+w).dom.innerHTML=A.line;Ext.get("FNR-EN-status-col-"+w).dom.innerHTML=A.caracter}}}],bbar:[{scope:this,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="FNR-EN-status-line-'+w+'">-</span></span>  ! ;<span class="x-status-text-panel">Col: <span id="FNR-EN-status-col-'+ w+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:"<b>Save</b> this file",iconCls:"saveFile",id:"FNR-EN-PANEL-btn-save-"+w,disabled:true,handler:function(){this.saveEnFile(w,n,p,"FNR",y,this)}},{scope:this,tooltip:"<b>Save as</b> a patch",iconCls:"saveAsFile",id:"FNR-EN-PANEL-btn-saveas-"+w,disabled:true,handler:function(){this.savePatch("en",w,n,p,"FNR",this)}},"->",{tooltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:function(){Ext.getCmp("FNR-EN-"+w).reIndentAll()}}]}]});Ext.getCmp("main-panel").setActiveTab("FNR-"+w)}else{Ext.getCmp("main-panel").setActiveTab("FNR-"+w)}}}});g=new Ext.grid.GridPanel({title:"Summary",iconCls:"flag-"+this.userLang,store:this.storeSummary,loadMask:true,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:"per! centFiles"},{header:"Size of files (kB)",width:110,sortable:true,dataIndex:"sizeFiles"},{header:"Percent of size",width:110,sortable:true,dataIndex:"percentSize"}],autoScroll:true,height:400,width:800,view:new Ext.grid.GridView({getRowClass:function(m,p,o,n){if(m.data.id===1){return"summary_1"}if(m.data.id===2){return"summary_2"}if(m.data.id===3){return"summary_3"}if(m.data.id===4){return"summary_4"}if(m.data.id===5){return"summary_5"}}}),listeners:{scope:this,render:function(m){m.store.load()}}});f=new Ext.grid.GridPanel({title:"Translators",iconCls:"iconTranslator",store:this.storeTranslators,loadMask:true,columns:[new Ext.grid.RowNumberer(),{id:"GridTransName",header:"Name",sortable:true,dataIndex:"name",summaryType:"count",summaryRenderer:this.rendererTotalTranslator},{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:this.rendererNumUptodate,dataIndex:"uptodate",summaryTy pe:"sum"},{header:"Old",width:45,sortable:true,renderer:this.rendererSum,dataIndex:"old",summaryType:"sum"},{header:"Critical",width:60,sortable:true,renderer:this.rendererNumCritical,dataIndex:"critical",summaryType:"sum"},{header:"Sum",width:50,sortable:true,renderer:this.rendererSum,dataIndex:"sum",summaryType:"sum"}],plugins:[new Ext.ux.grid.GridSummary()],autoScroll:true,autoExpandColumn:"GridTransName",height:400,width:800,listeners:{scope:this,render:function(){this.storeTranslators.load()},rowdblclick:function(o,q,p){var m,n;o.getSelectionModel().selectRow(q);m=this.storeTranslators.getAt(q).data.email;n=this.storeTranslators.getAt(q).data.name;this.sendEmail(n,m)},rowcontextmenu:function(o,r,p){var m,n,q;o.getSelectionModel().selectRow(r);m=this.storeTranslators.getAt(r).data.email;n=this.storeTranslators.getAt(r).data.name;q=new Ext.menu.Menu({id:"submenu",items:[{scope:this,text:"<b>Send an email to "+n+"</b>",iconCls:"iconSendEmail",handler:function(){this.sendEm! ail(n,m)}},"-",{scope:this,text:"Send an email to the doc-"+this.userLang+"@lists.php.net",iconCls:"iconSendEmail",handler:function(){this.sendEmail("Php Doc Team "+this.userLang,"doc-"+this.userLang+"@lists.php.net")}}]});q.showAt(p.getXY())}}});i=new Ext.grid.GridPanel({store:this.storeMailing,title:"Mails from doc-"+this.userLang,iconCls:"home-mailing-title",loadMask:true,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")}],autoScroll:true,height:400,width:800,autoExpandColumn:"GridMailingTitle",sm:new Ext.grid.RowSelectionModel({singleSelect:true}),tbar:[{scope:this,tooltip:"Refresh this grid",iconCls:"refresh",handler:function(){this.storeMailing.reload()}}],listeners:{scope:this,render:function(){this.storeMailing.load()},rowcontextmenu:functi! on(m,p,n){var o;m.getSelectionModel().selectRow(p);o=new Ext.menu.Menu ({id:"submenu",items:[{text:"<b>Open in a new Tab</b>",iconCls:"openInTab",scope:this,handler:function(){i.fireEvent("rowdblclick",m,p,n)}},"-",{text:"Refresh this grid",iconCls:"refresh",scope:this,handler:function(){this.storeMailing.reload()}}]});o.showAt(n.getXY())},rowdblclick:function(n,r,p){var m,q,o;m=this.storeMailing.getAt(r).data.pubDate;q=this.storeMailing.getAt(r).data.link;o=this.storeMailing.getAt(r).data.title;this.NewTabMailing(m,q,o)}}});e=new Ext.grid.GridPanel({store:this.storeBugs,title:"Open bugs for doc-"+this.userLang,iconCls:"iconBugs",loadMask:true,columns:[{id:"GridBugTitle",header:"Title",sortable:true,dataIndex:"title"}],stripeRows:true,autoHeight:true,viewConfig:{emptyText:"No open Bugs",forceFit:true,enableRowBody:true,getRowClass:function(m,q,o,n){o.body='<p class="bug-desc">'+m.data.description+"</p>";return"x-grid3-row-expanded"}},autoExpandColumn:"GridBugTitle",sm:new Ext.grid.RowSelectionModel({singleSelect:true}),width:800,tbar:[{scope:th! is,tooltip:"Refresh this grid",iconCls:"refresh",handler:function(){this.storeBugs.reload()}}],listeners:{scope:this,render:function(){this.storeBugs.load()},rowcontextmenu:function(m,p,n){var o;m.getSelectionModel().selectRow(p);o=new Ext.menu.Menu({id:"submenu",items:[{text:"<b>Open in a new Tab</b>",iconCls:"openInTab",scope:this,handler:function(){e.fireEvent("rowdblclick",m,p,n)}},"-",{text:"Refresh this grid",iconCls:"refresh",scope:this,handler:function(){this.storeBugs.reload()}}]});o.showAt(n.getXY())},rowdblclick:function(o,r,q){var m,n,p;m=this.storeBugs.getAt(r).data.id;n=this.storeBugs.getAt(r).data.link;p=this.storeBugs.getAt(r).data.title;this.NewTabBugs(m,n,p)}}});k={title:"Graphics",layout:"fit",autoHeight:true,iconCls:"home-graphic-title",html:'<div align="center" id="graph_container" style="width: 530px; height: 302px"><img id="graph_picture" src="" height="300"></div>',listeners:{afterlayout:function(){var m,o,n;m=Ext.get("graph_picture");o=Ext.get("grap! h_container");m.setVisibilityMode(Ext.Element.VISIBILITY);n=new Ext.Lo adMask(o);m.on("load",function(){m.stopFx();n.hide();m.fadeIn({duration:2})});n.show();m.hide();m.dom.src="/php/image_info.php"}}};this.treeAllFiles=new Ext.tree.TreePanel({animate:true,autoScroll:true,useArrows:true,loader:new Ext.tree.TreeLoader({dataUrl:"./php/controller.php",baseParams:{task:"getAllFiles"}}),enableDD:false,containerScroll:true,bodyBorder:false,listeners:{scope:this,dblclick:function(q,v){var n,m,w,y,u,r,p,o,s,x;if(q.attributes.type==="file"){n=q.attributes.text;m=q.attributes.id;w=Ext.util.md5("AF-"+m+n);if(!Ext.getCmp("main-panel").findById("AF-"+w)){y=m.split("/");y.shift();y.shift();y.pop();m=y.join("/")+"/";u="xml";if(q.attributes.extension==="xml"){u="xml"}if(q.attributes.extension==="html"){u="html"}if(q.attributes.extension==="php"){u="php"}r=new Ext.data.Store({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"/php/controller.php"}),baseParams:{task:"get-log",Path:m,File:n},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"i! d"},[{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"}])});r.setDefaultSort("date","desc");p=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(z){var t=z.getCount();if(t===2){return false}},rowselect:function(z){var t=z.getCount();if(t===2){Ext.getCmp("AF-PANEL-btn-log-"+w).enable();Ext.get("AF-PANEL-btn-log-"+w).frame("3F8538")}else{Ext.getCmp("AF-PANEL-btn-log-"+w).disable()}},rowdeselect:function(z){var t=z.getCount();if(t===2){Ext.getCmp("AF-PANEL-btn-log-"+w).enable();Ext.get("AF-PANEL-btn-log-"+w).frame("3F8538")}else{Ext.getCmp("AF-PANEL-btn-log-"+w).disable()}}}});o=new Ext.grid.GridPanel({store:r,id:"AF-PANEL-log-"+w,loadMask:true,columns:[p,{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"},{hea der:"Date",width:85,sortable:true,dataIndex:"date",renderer:Ext.util.Format.dateRenderer("Y/m/d, H:i")}],autoHeight:true,autoExpandColumn:"content",bodyBorder:false,sm:p,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"AF-PANEL-btn-log-"+w,disabled:true,handler:function(){var A,z,t;A=p.getSelections();z=A[0].data.revision;t=A[1].data.revision;this.winDiff(m,n,z,t)}}]});s={region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{scope:this,xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:"Log",items:[o]}]}};x={title:"File: "+m+n,originTitle:"File: "+m+n,collapsible:false,id:"AF-PANEL-"+w,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"AF-FILE-"+w,isModified:false,parser:u,listeners:{scope:this,initialize:function(){this.getFile(w,m,n,"AF-PANEL-","AF-FILE-")},cmchange! :function(B,z,A){var t=Ext.util.JSON.decode(Ext.getCmp("AF-FILE-"+w).getCursorPosition());Ext.get("AF-status-line-"+w).dom.innerHTML=t.line;Ext.get("AF-status-col-"+w).dom.innerHTML=t.caracter;if(B!==27&&B!==33&&B!==34&&B!==37&&B!==38&&B!==39&&B!==40&&B!==17&&B!==16&&B!==67){if(!Ext.getCmp("AF-FILE-"+w).isModified){Ext.getCmp("AF-PANEL-"+w).setTitle(Ext.getCmp("AF-PANEL-"+w).originTitle+' <span style="color:#ff0000; font-weight: bold;">[modified]</span>');Ext.getCmp("AF-"+w).setTitle(Ext.getCmp("AF-"+w).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("AF-PANEL-btn-save-"+w).enable();Ext.get("AF-PANEL-btn-save-"+w).frame("3F8538");Ext.getCmp("AF-PANEL-btn-saveas-"+w).enable();Ext.get("AF-PANEL-btn-saveas-"+w).frame("3F8538");Ext.getCmp("AF-FILE-"+w).isModified=true}}},cmcursormove:function(){var t=Ext.util.JSON.decode(Ext.getCmp("AF-FILE-"+w).getCursorPosition());Ext.get("AF-status-line-"+w).dom.innerHTML=t.line;Ext.get("AF-status-col-"+w).dom.i! nnerHTML=t.caracter}}}],bbar:[{scope:this,xtype:"panel",height:21,base Cls:"",bodyStyle:"padding-top:5px;",html:'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">Line: <span id="AF-status-line-'+w+'">-</span></span> <span class="x-status-text-panel">Col: <span id="AF-status-col-'+w+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:"<b>Save</b> this file",iconCls:"saveFile",id:"AF-PANEL-btn-save-"+w,disabled:true,handler:function(){Ext.getCmp("AF-PANEL-btn-save-"+w).disable();Ext.getCmp("AF-FILE-"+w).isModified=false;Ext.getCmp("AF-PANEL-"+w).setTitle(Ext.getCmp("AF-PANEL-"+w).originTitle);Ext.getCmp("AF-"+w).setTitle(Ext.getCmp("AF-"+w).originTitle);var t=Ext.MessageBox.wait("Saving data...");Ext.Ajax.request({scope:this,url:"../php/controller.php",params:{task:"save-file",filePath:m,fileName:n,fileLang:"all",fileContent:Ext.getCmp("AF-FILE-"+w).getCode()},success:function(A,z){var B=Ext.util.JSON.decode(A.responseText);if(B.success){this.addToPendingCommit(m,n);t.hide()}}})}},{scope! :this,tooltip:"<b>Save as</b> a patch",iconCls:"saveAsFile",id:"AF-PANEL-btn-saveas-"+w,disabled:true,handler:function(){this.savePatch("all",w,m,n,"AF",this)}},"->",{tooltip:"<b>Re-indent</b> all this file",iconCls:"iconIndent",handler:function(){Ext.getCmp("AF-FILE-"+w).reIndentAll()}}]};if(q.attributes.extension==="gif"||q.attributes.extension==="png"){x={xtype:"panel",layout:"fit",bodyStyle:"padding:5px 5px 0",html:'<img src="/data/'+this.userLoggin+"/phpdoc-"+this.userLang+m+'" />'};s={}}Ext.getCmp("main-panel").add({closable:true,title:n,originTitle:n,tabTip:"in "+m,iconCls:"AllFiles",id:"AF-"+w,layout:"border",defaults:{collapsible:true,split:true},items:[x,s]});Ext.getCmp("main-panel").setActiveTab("AF-"+w)}else{Ext.getCmp("main-panel").setActiveTab("AF-"+w)}}}}});this.treeSort=new Ext.tree.TreeSorter(this.treeAllFiles,{folderSort:true});this.treeAllFilesRoot=new Ext.tree.AsyncTreeNode({text:"Repository",draggable:false,id:"/"});this.treeAllFiles.setRootNode(this.tr! eeAllFilesRoot);b=new Ext.menu.Menu({id:"mainMenu",items:[{scope:this, text:"Refresh all data",iconCls:"refresh",tooltip:"<b>Refresh all data</b><br>Cvs update & apply all tools",handler:this.WinUpdate},{scope:this,text:"Check Build",iconCls:"checkBuild",tooltip:"<b>Check your build</b> using configure.php script",handler:this.WinCheckBuild},"-",{scope:this,text:"Configure",iconCls:"iconConf",tooltip:"<b>Configure</b> this tool",id:"winconf-btn",handler:this.WinConf},"-",{scope:this,text:"Erase my personal data",iconCls:"iconErasePersonalData",tooltip:"<b>Log out</b>",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(m){if(m==="yes"){Ext.getBody().mask('<img src="/img/loading.gif" style="vertical-align: middle;" /> Please, wait...');Ext.Ajax.request({url:"./php/controller.php",params:{task:"erase-personal-data"},success:function(n){Ext.getBody().unmask();var p=Ext.util.JSON.decode(n.responseText! );if(p.success){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="/logout.php"}})}}})}})}},"-",{text:"Log out",iconCls:"iconLogOut",tooltip:"<b>Log out</b>",handler:function(){Ext.MessageBox.confirm("Confirm","Are you sure you want to logout?",function(m){if(m==="yes"){window.location.href="/logout.php"}})}},"-",{scope:this,text:"About",iconCls:"iconHelp",tooltip:"<b>About</b><br/>"+this.appName,id:"winabout-btn",handler:function(){this.WinAbout()}}]});d=new Ext.Viewport({layout:"border",items:[{region:"north",html:'<h1 class="x-panel-header"><img src="/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,b! order:false,tbar:[{text:"Main Menu",iconCls:"MainMenu",menu:b}],items: [{title:'Files Need Update - <em id="acc-need-update-nb">0</em>',id:"acc-need-update",layout:"fit",iconCls:"FilesNeedUpdate",items:[l],collapsed:true},{title:'Error in current translation - <em id="acc-error-nb">0</em>',id:"acc-error",layout:"fit",iconCls:"FilesError",items:[j],collapsed:true},{title:'Files Need Reviewed - <em id="acc-need-reviewed-nb">0</em>',id:"acc-need-reviewed",layout:"fit",iconCls:"FilesNeedReviewed",items:[h],collapsed:true},{title:"All files",id:"acc-all-files",layout:"fit",iconCls:"AllFiles",items:[this.treeAllFiles],collapsed:true},{title:'Pending for commit - <em id="acc-pendingCommit-nb">0</em>',id:"acc-need-pendingCommit",layout:"fit",iconCls:"PendingCommit",items:[c],collapsed:true},{title:'Pending Patch - <em id="acc-pendingPatch-nb">0</em>',id:"acc-need-pendingPatch",layout:"fit",iconCls:"PendingPatch",items:[a],collapsed:true}]}]},{region:"center",xtype:"tabpanel",id:"main-panel",activeTab:0,enableTabScroll:true,plugins:new Ext.ux.TabCloseMe! nu(),listeners:{scope:this,beforeremove:this.removeTabEvent},items:[{title:"Home",baseCls:"MainInfoTabPanel",xtype:"panel",autoScroll:true,id:"MainInfoTabPanel",plain:true,items:[{xtype:"panel",border:false,html:'<div class="res-block"><div class="res-block-inner"><h3>Connected as <em>'+this.userLoggin+"</em></h3></div></div>"},{xtype:"tabpanel",activeTab:0,plain:true,autoScroll:true,height:400,border:false,defaults:{border:true},items:[g,f,i,e,k]}]}]}]})}}}();Ext.EventManager.onDocumentReady(phpDoc.init,phpDoc,true); +function log(a){if(console){console.log(a)}}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.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:functio n(a){a.store.load.defer(20,a.store)}}});Ext.namespace("ui","ui.component","ui.component._CheckDoc");ui.component._CheckDoc.ds=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getCheckDocData"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"extension",mapping:"extension"},{name:"check_oldstyle",mapping:"check_oldstyle",type:"int"},{name:"check_undoc",mapping:"check_undoc",type:"int"},{name:"check_roleerror",mapping:"check_roleerror",type:"int"},{name:"check_badorder",mapping:"check_badorder",type:"int"},{name:"check_noseealso",mapping:"check_noseealso",type:"int"},{name:"check_noreturnvalues",mapping:"check_noreturnvalues",type:"int"},{name:"check_noparameters",mapping:"check_noparameters",type:"int"},{name:"check_noexamples",mapping:"check_noexamples",type:"int"},{name:"check_noerrors",mapping:"check_noerrors",typ! e:"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.compo! nent._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-selected-files").enable()}}}),columns:[new Ext.grid.RowNumberer(),{id:"file",header:"Files",sortable:true,dataIndex:"file"}],listeners:{rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c)},rowdblclick:function(a,c,b){phpDoc.openFile("en"+a.filepath,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=[];for(var b=0;b<a.getCount();++b){phpDoc.filePendingOpen[b]=["en"+c.filepath,a.getAt(b).data.file]}phpDoc.openFile(phpDoc.filePendingOpen[0][0],phpDoc.filePendingOpen[0][1]);c.close()}},{text:"Open selected files",id:"check-doc-btn-open-selected-files",disabled:true,handler:function(){var c=Ext.getCmp("check-doc-file-win"),b=Ext.getCmp("check-doc-file-grid").getSelectionModel().getSelections();phpDoc.filePendingOpen=[];for(var a=0;a<b.length;++a){phpDoc.filePendingOpen[a]=["en"+c.filepath,b[a].data.file]}phpDoc.openFile(phpDoc.filePendingOpen[0][0],phpDoc.filePendingOpen[0][1]);c.close()}}]});ui.component.CheckDoc=Ext.extend! (Ext.grid.GridPanel,{loadMask:true,bodyBorder:false,store:ui.component .._CheckDoc.ds,columns:ui.component._CheckDoc.columns,autoExpandColumn:"extension",sm:new Ext.grid.CellSelectionModel({singleSelect:true}),view:new Ext.grid.GridView({forceFit:true}),listeners:{render:function(a){a.store.load.defer(20,a.store)},celldblclick:function(b,i,c,h){var a=b.getStore().getAt(i),g=b.getColumnModel().getDataIndex(c),f=a.get(g),d=a.data.path;if(Ext.num(f,false)&&f!=0){XHR({url:"./php/controller.php",params:{task:"getCheckDocFiles",path:d,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({filepath:d,items:[new ui.component._CheckDoc.FileGrid({filepath:d})]}).show()}})}}}});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,singleSele! ct:true,overClass:"x-view-over",itemSelector:"div.thumb-wrap",store:ui ..component._EditorConf.menuStore,listeners:{selectionchange:function(b,a){var c=b.getSelectedRecords();Ext.getCmp("confCard").layout.setActiveItem("conf-card-"+c[0].data.id)}}});ui.component._EditorConf.themeStore=new Ext.data.SimpleStore({fields:["themeFile",{name:"themeName",type:"string"}],data:[["themes/black/css/xtheme-black.css",_("Black")],["themes/empty.css",_("Default")],["themes/darkgray/css/xtheme-darkgray.css",_("DarkGray")],["js/extjs/resources/css/xtheme-gray.css",_("Gray")],["themes/gray-extend/css/xtheme-gray-extend.css",_("Gray Extend")],["themes/indigo/css/xtheme-indigo.css",_("Indigo")],["themes/midnight/css/xtheme-midnight.css",_("Midnight")],["themes/olive/css/xtheme-olive.css",_("Olive")],["themes/purple/css/xtheme-purple.css",_("Purple")],["js/extjs/resources/css/xtheme-slate.css",_("Slate")],["themes/silverCherry/css/xtheme-silverCherry.css",_("SilverCherry")]]});ui.component._EditorConf.card1=Ext.extend(Ext.form.FormPanel,{id:"conf-card-1",bodyStyle:! "padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Themes"),autoHeight:true,defaults:{hideLabel:true},items:[{xtype:"combo",id:"conf-combo-theme",valueField:"themeFile",displayField:"themeName",triggerAction:"all",mode:"local",forceSelection:true,editable:false,value:phpDoc.userConf.conf_theme,store:ui.component._EditorConf.themeStore,listeners:{render:function(){Ext.getCmp("conf-combo-theme").store.sort("themeName")},select:function(e,a,b){var d=e.getValue();Ext.get("appTheme").dom.href=d;phpDoc.confUpdate("conf_theme",d)}}}]}]});ui.component._EditorConf.card1.superclass.initComponent.call(this)}});ui.component._EditorConf.card2=Ext.extend(Ext.form.FormPanel,{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){phpDoc.confUpdate("conf_needupdate_diff",a.getRawValue())}}}},{name:"conf_needupdate_diff",checked:(phpDoc.userConf.conf_needupdate_diff==="using-exec")?true:false,boxLabel:_("Using diff -kk -u command line"),inputValue:"using-exec",listeners:{check:function(a){if(a.checked){phpDoc.confUpdate("conf_needupdate_diff",a.getRawValue())}}}}]},{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_needupdate_scrollbars",checked:(phpDoc.userConf.conf_needupdate_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){phpDoc.confUpdate("conf_needupdate_scrollbars",a.getValue())}}},{name:"conf_needupdate_displaylog",checked:(phpDoc.userConf.conf_needupdate_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_needu! pdate_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card2.superclass.initComponent.call(this)}});ui.component._EditorConf.card3=Ext.extend(Ext.form.FormPanel,{id:"conf-card-3",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Error type"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_error_skipnbliteraltag",checked:(phpDoc.userConf.conf_error_skipnbliteraltag==="true")?true:false,boxLabel:_("Skip nbLiteralTag error"),listeners:{check:function(a){phpDoc.confUpdate("conf_error_skipnbliteraltag",a.getValue())}}}]},{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_error_scrollbars",checked:(phpDoc.userConf.conf_error_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){phpDoc.confUpdate("conf_error_scrollbars",a.getValue())}}},{name:"conf_error_displaylog",checke! d:(phpDoc.userConf.conf_error_displaylog==="true")?true:false,boxLabel :_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_error_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card3.superclass.initComponent.call(this)}});ui.component._EditorConf.card4=Ext.extend(Ext.form.FormPanel,{id:"conf-card-4",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_reviewed_scrollbars",checked:(phpDoc.userConf.conf_reviewed_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){phpDoc.confUpdate("conf_reviewed_scrollbars",a.getValue())}}},{name:"conf_reviewed_displaylog",checked:(phpDoc.userConf.conf_reviewed_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_reviewed_displaylog",a.getValue())}}}]}]});ui.comp! onent._EditorConf.card4.superclass.initComponent.call(this)}});ui.component._EditorConf.card5=Ext.extend(Ext.form.FormPanel,{id:"conf-card-5",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_allfiles_displaylog",checked:(phpDoc.userConf.conf_allfiles_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_allfiles_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card5.superclass.initComponent.call(this)}});ui.component._EditorConf.card6=Ext.extend(Ext.form.FormPanel,{id:"conf-card-6",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_patch_scrollbars",checked:(phpDoc.userConf.conf_patch! _scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars") ,listeners:{check:function(a){phpDoc.confUpdate("conf_patch_scrollbars",a.getValue())}}},{name:"conf_patch_displaylog",checked:(phpDoc.userConf.conf_patch_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_patch_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card6.superclass.initComponent.call(this)}});ui.component.EditorConf=Ext.extend(Ext.Window,{id:"win-conf",layout:"border",width:550,height:400,iconCls:"iconConf",title:_("Configuration"),modal:true,plain:true,buttons:[{text:_("Close"),handler:function(){Ext.getCmp("win-conf").close()}}],listeners:{show:function(){var a=Ext.getCmp("conf-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,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)}});var phpDoc=function(){Ext.QuickTips.init();Ext.BLANK_IMAGE_URL="js/extjs/resources/images/default/s.gif";return{TaskPing:"",storeCommitLogMessage:"",storeFilesError:"",storeFilesNeedUpdate:"",storeFilesNeedReviewed:"",storeNotInEn:"",storePendingCommit:"",storePendingPatch:"",storeMailing:"",storeBugs:"",storeTranslators:"",storeSummary:"",userLogin:"",userLang:"",appName:"PhpDocumentation Onli! ne Editor",appVer:"0.2",uiRevision:"$Revision: 1.3 $",userConf:{conf_n eedupdate_diff:"using-exec",conf_needupdate_scrollbars:true,conf_needupdate_displaylog:false,conf_error_skipnbliteraltag:true,conf_error_scrollbars:true,conf_error_displaylog:false,conf_reviewed_scrollbars:true,conf_reviewed_displaylog:false,conf_allfiles_displaylog:false,conf_patch_scrollbars:true,conf_patch_displaylog:false,conf_theme:"themes/empty.css"},treeAllFiles:"",treeSort:"",treeAllFilesRoot:"",filePendingOpen:"",init:function(){Ext.getBody().on("contextmenu",function(a){a.stopEvent()},this);XHR({url:"./php/controller.php",params:{task:"getConf"},scope:this,success:function(a){var b=Ext.decode(a.responseText);this.userLogin=b.mess.userLogin;this.userLang=b.mess.userLang;this.userConf.conf_needupdate_diff=b.mess.userConf.conf_needupdate_diff;this.userConf.conf_needupdate_scrollbars=b.mess.userConf.conf_needupdate_scrollbars;this.userConf.conf_needupdate_displaylog=b.mess.userConf.conf_needupdate_displaylog;this.userConf.conf_error_skipnbliteraltag=b.mess.userConf.con! f_error_skipnbliteraltag;this.userConf.conf_error_scrollbars=b.mess.userConf.conf_error_scrollbars;this.userConf.conf_error_displaylog=b.mess.userConf.conf_error_displaylog;this.userConf.conf_reviewed_scrollbars=b.mess.userConf.conf_reviewed_scrollbars;this.userConf.conf_reviewed_displaylog=b.mess.userConf.conf_reviewed_displaylog;this.userConf.conf_allfiles_displaylog=b.mess.userConf.conf_allfiles_displaylog;this.userConf.conf_patch_scrollbars=b.mess.userConf.conf_patch_scrollbars;this.userConf.conf_patch_displaylog=b.mess.userConf.conf_patch_displaylog;this.userConf.conf_theme=b.mess.userConf.conf_theme;Ext.get("appTheme").dom.href=this.userConf.conf_theme;this.loadDataStore();this.drawInterface()}})},winForbidden:function(){Ext.MessageBox.alert(_("Forbidden"),_("You can't do this action as cvsread user."))},menuMarkupLANG:function(a,c){var d,b;b=new Ext.menu.Menu({items:[{text:_("Reviewed tag"),handler:function(){Ext.getCmp(a).insertIntoLine(2,"end","\n<!-- Reviewed: no ! -->");Ext.getCmp(a).focus()}},{text:_("Revcheck tag"),handler:function (){Ext.getCmp(a).insertIntoLine(2,"end","\n<!-- EN-Revision: 1.XX Maintainer: "+c.userLogin+" Status: ready -->");Ext.getCmp(a).focus()}}]});d={text:_("MarkUp"),iconCls:"iconInsertCode",menu:b};return d},menuMarkupEN:function(a){var c,b;b=new Ext.menu.Menu({items:[{text:_("Description section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,' <refsect1 role="description"><!-- {{{ -->\r\n &reftitle.description;\r\n <methodsynopsis>\r\n <!-- Example: All functions have this -->\r\n <type>thereturned type</type><methodname>func_name</methodname>\r\n <!-- Example: Required parameter -->\r\n <methodparam><type>param1type</type><parameter>firstparameter</parameter></methodparam>\r\n <!-- Example: Optional parameter, also by reference -->\r\n <methodparam choice="opt"><type>int</type><parameter role="reference">secondparameter</parameter></methodparam>\r\n <!-- Example: If no methodparams 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(a).focus()}},{text:_("Parameters section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="parameters"><!-- {{{ -->\r\n&reftitle.parameters;\r\n<para>\r\n<variablelist>\r\n<varlistentry>\r\n<term><parameter>firstparameter</parameter></term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n<varlistentry>\r\n<term>\r\n<parameter>secondparameter</parameter>\r\n</term>\r\n<listitem>\r\n<para>\r\nIts description\r\n</para>\r\n</listitem>\r\n</varlistentry>\r\n</variablelist>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Return section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r! \n<refsect1 role="returnvalues"><!-- {{{ -->\r\n&reftitle.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(a).focus()}},{text:_("Error section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="errors"><!-- {{{ -->\r\n&reftitle.errors;\r\n<para>\r\nWhen does this function issue E_* level errors, and/or throw exceptions.\r\n</para>\r\n</refsect1><!-- }}} -->\r\n');Ext.getCmp(a).focus()}},{text:_("Unicode section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="unicode"><!-- {{{ -->\r\n&reftitle.unicode;\r\n<para>\r\nInformation specific to unicode, from the PHP 6 changes.\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Changelog section"),handler:function(){var d=Ext.uti! l.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="changelog"><!-- {{{ -->\r\n&reftitle.changelog;\r\n<para>\r\n<informaltable>\r\n<tgroup cols="2">\r\n<thead>\r\n<row>\r\n<entry>&Version;</entry>\r\n<entry>&Description;</entry>\r\n</row>\r\n</thead>\r\n<tbody>\r\n<row>\r\n<entry>Enter the version of change here</entry>\r\n<entry>\r\nDescribe the change\r\n</entry>\r\n</row>\r\n</tbody>\r\n</tgroup>\r\n</informaltable>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Examples section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,"\r\n<refsect1 role=\"examples\"><!-- {{{ -->\r\n&reftitle.examples;\r\n<para>\r\n<example xml:id=\"function-name.example.basic\"><!-- {{{ -->\r\n<title><function>function-name</function> example</title>\r\n<para>\r\nAny text that describes the purpose of the example, or what\r\ngoes on in the ex! ample 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(a).focus()}},{text:_("Notes section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="notes"><!-- {{{ -->\r\n&reftitle.notes;\r\n<caution>\r\n<para>\r\nAny notes that don\'t fit anywhere else should go here.\r\n90% of the time, notes, warnings or cautions are better placed in the\r\nparameters section. Consider that before using this section!\r\n</para>\r\n</caution>\r\n¬e.language-construct;\r\n¬e.not! -bin-safe;\r\n¬e.registerglobals;\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("SeeAlso section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="seealso"><!-- {{{ -->\r\n&reftitle.seealso;\r\n<para>\r\n<simplelist>\r\n<member><function>somefunc</function></member>\r\n<member><function>another_func</function></member>\r\n<member>The <link linkend="something">something appendix</link></member>\r\n</simplelist>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}}]});c={text:_("MarkUp"),iconCls:"iconInsertCode",menu:b};return c},loadDataStore:function(){this.storeCommitLogMessage=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getCommitLogMessage"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"text",mapping:"text"}])});this.storeFilesError=new E! xt.data.GroupingStore({autoLoad:(this.userLang==="en")?false:true,prox y:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesError"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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()}}});this.storeFilesNeedUpdate=new Ext.data.GroupingStore({autoLoad:(this.userLang==="en")?false:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNeedUpdate"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"name",mapping:"name"},{name:"revision",mapping:"revision"},{name:! "en_revision",mapping:"en_revision"},{name:"maintainer",mapping:"maintainer"},{name:"needcommit",mapping:"needcommit"},{name:"isCritical",mapping:"isCritical"}]),sortInfo:{field:"path",direction:"ASC"},groupField:"path",listeners:{datachanged:function(a){Ext.getDom("acc-need-update-nb").innerHTML=a.getCount()}}});this.storeFilesNeedReviewed=new Ext.data.GroupingStore({autoLoad:(this.userLang==="en")?false:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNeedReviewed"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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()}}});this.storeNotInEn=new Ext.data.Group! ingStore({autoLoad:(this.userLang==="en")?false:true,proxy:new Ext.dat a.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesNotInEn"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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()},add:function(a){Ext.getDom("acc-notInEn-nb").innerHTML=a.getCount()}}});this.storePendingCommit=new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesPendingCommit"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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:{datachanged:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()},add:function(a){Ext.getDom("acc-pendingCommit-nb").innerHTML=a.getCount()}}});this.storePendingPatch=new Ext.data.GroupingStore({autoLoad:true,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getFilesPendingPatch"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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:{datachanged:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()},add:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()}}});this.storeMailing=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:! "getLastNews"},reader:new Ext.data.JsonReader({root:"Items",totalPrope rty:"nbItems",id:"id"},[{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"}])});this.storeMailing.setDefaultSort("pubDate","desc");this.storeBugs=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"},[{name:"id",mapping:"id"},{name:"title",mapping:"title"},{name:"link",mapping:"link"},{name:"description",mapping:"description"}])});this.storeTranslators=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"},[{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"}])});this.storeTranslators.setDefaultSort("nick","asc");this.storeSummary=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"},[{name:"id",mapping:"id"},{name:"libel",mapping:"libel"},{name:"nbFiles",mapping:"nbFiles"},{name:"percentFiles",mapping:"percentFiles"},{name:"sizeFiles",mapping:"sizeFiles"},{name:"percentSize",mapping:"percentSize"}])});this.storeSummary.on("load",function(){this.storeSummary.each(function(a){if(a.id===1){a.set("libel",_("Up to date files"))}if(a.id===2){a.set("libel",_("Old files"))}if(a.id===3){a.set("libel",_("Critical files"))}if(a.id===4){a.set("libel",_("Files without revision tag"))}if(a.id===5){a.set("libel",_("Files available for translation"))}if(! a.id===6){a.set("libel",_("Total"))}a.commit()},this)},this)},newTabCh eckDoc: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")},newTabBuildStatus:function(){var a=Ext.getCmp("tab-build-status");if(a===undefined){Ext.getCmp("main-panel").add({id:"tab-build-status",title:_("Translation build status"),iconCls:"BuildStatus",layout:"fit",closable:true,html:"nothing"});a=Ext.getCmp("tab-build-status")}if(a.items){a.removeAll(true)}a.add(new ui.component.BuildStatus());a.doLayout();Ext.getCmp("main-panel").setActiveTab("tab-build-status")},openFile:function(d,a){Ext.getCmp("acc-all-files").expand();var c=d.split("/");function b(f,e){f.expand(false,true,function(h){var g;h.ensureVisible();if(c[0]&&c[0]!==""){for(g=0;g<h.childNodes.length;g=g+1){if(h.c! hildNodes[g].text===c[0]){c.shift();b(h.childNodes[g],e)}}}else{for(g=0;g<h.childNodes.length;g=g+1){if(h.childNodes[g].text===a){h.childNodes[g].ensureVisible();h.childNodes[g].ui.highlight();e.treeAllFiles.fireEvent("dblclick",h.childNodes[g])}}}})}b(this.treeAllFilesRoot,this)},clearLocalChange:function(b,e,a,f,d){if(d.userLogin==="cvsread"){d.winForbidden();return}function c(g){if(g==="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-"+e+a))){Ext.getCmp("main-panel").remove("FNU-"+Ext.util.md5("FNU-"+e+a))}XHR({url:"./php/controller.php",params:{task:"clearLocalChange",FileType:b,FilePath:e,FileName:a},scope:d,success:function(h){if(this.userLang==="en"){this.storeFilesNeedUpdate.reload();this.storeFilesError.reload();this.storeFilesNeedReviewed.reload()}this.storePendingCommit.remove(this.storePendingCommit.getAt(f));this.storePendingCommi! t.fireEvent("add",this.storePendingCommit);this.storeNotInEn.each(func tion(j){if((this.userLang+j.data.path)===e&&j.data.name===a){j.set("needcommit",false)}},this);this.storeFilesNeedReviewed.each(function(j){if((this.userLang+j.data.path)===e&&j.data.name===a){j.set("needcommit",false)}},this);this.storeFilesNeedUpdate.each(function(j){if((this.userLang+j.data.path)===e&&j.data.name===a){j.set("needcommit",false)}},this);this.storeFilesError.each(function(j){if((this.userLang+j.data.path)===e&&j.data.name===a){j.set("needcommit",false)}},this);var i=this.treeAllFiles.getNodeById("//"+e+a);if(i){i.getUI().removeClass("modified")}Ext.getBody().unmask()},failure:function(h){Ext.getBody().unmask();this.winForbidden()}})}}Ext.MessageBox.confirm(_("Confirm"),_("This action will clear your local modification and take back this file from his original stats.<br/>You need confirm."),c,d)},rejectPatch:function(f,d,a,e,g,c){if(c.userLogin==="cvsread"){this.winForbidden();return}function b(h){if(h==="yes"){var i=Ext.MessageBox.wait(_("Please, wait..."));! XHR({scope:c,url:"./php/controller.php",params:{task:"afterPatchReject",PatchUniqID:e},success:function(j){this.storePendingPatch.remove(this.storePendingPatch.getAt(g));this.storePendingPatch.fireEvent("add",this.storePendingPatch);Ext.getCmp("main-panel").remove("PP-"+f);i.hide()},failure:function(j){i.hide();this.winForbidden()}})}}Ext.MessageBox.confirm(_("Confirm"),_("This action will <b>reject</b> this patch, send an email to his author and close this tab."),b,c)},saveFileViaPatch:function(e,c,a,d,g,b){function f(h){if(h==="yes"){Ext.getCmp("PP-PATCH-PANEL-btn-save-"+e).disable();Ext.getCmp("PP-PATCH-"+e).isModified=false;Ext.getCmp("PP-PATCH-PANEL-"+e).setTitle(Ext.getCmp("PP-PATCH-PANEL-"+e).originTitle);Ext.getCmp("PP-"+e).setTitle(Ext.getCmp("PP-"+e).originTitle);var i=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:b,url:"./php/controller.php",params:{task:"saveFile",filePath:c,fileName:a,fileLang:"all",fileContent:Ext.getCmp("PP-PATCH-"+e).getCode()},success! :function(j){var k=Ext.util.JSON.decode(j.responseText);this.addToPend ingCommit(k.id,c,a,"update");this.storePendingPatch.remove(this.storePendingPatch.getAt(g));this.storePendingPatch.fireEvent("add",this.storePendingPatch);XHR({scope:b,url:"./php/controller.php",params:{task:"afterPatchAccept",PatchUniqID:d}});i.hide();Ext.getCmp("main-panel").remove("PP-"+e)},failure:function(j){i.hide();this.winForbidden()}})}}Ext.MessageBox.confirm(_("Confirm"),_("This action will accept this patch, send an email to his author, save the file and close this tab."),f,b)},saveEnFile:function(e,c,a,d,g,b){if(b.userLogin==="cvsread"){b.winForbidden();return}Ext.getCmp(d+"-EN-PANEL-btn-save-"+e).disable();Ext.getCmp(d+"-"+e).isModifiedEn=false;Ext.getCmp(d+"-EN-PANEL-"+e).setTitle(Ext.getCmp(d+"-EN-PANEL-"+e).originTitle);if(!Ext.getCmp(d+"-"+e).isModifiedEn&&!Ext.getCmp(d+"-"+e).isModifiedLang){Ext.getCmp(d+"-"+e).setTitle(Ext.getCmp(d+"-"+e).originTitle)}var f=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:b,url:"./php/controller.php",params:{task:"saveF! ile",filePath:c,fileName:a,fileLang:"en",fileContent:Ext.getCmp(d+"-EN-"+e).getCode()},success:function(h){var i=Ext.util.JSON.decode(h.responseText);if(d==="FNU"){this.storeFilesNeedUpdate.getAt(g).set("en_revision","1."+i.en_revision);this.storeFilesNeedUpdate.getAt(g).set("needcommit",true)}if(d==="FE"){this.storeFilesError.getAt(g).set("needcommit",true)}if(d==="FNR"){this.storeFilesNeedReviewed.getAt(g).set("needcommit",true)}this.addToPendingCommit(i.id,"en"+c,a,"update");f.hide()},failure:function(h){f.hide();this.winForbidden()}})},savePatch:function(d,g,a,c,h,i){var b,f,e;if(d==="en"){b="-EN"}else{if(d==="all"){b=""}else{b="-LANG"}}if(i.userLogin!=="cvsread"){f=i.userLogin+"@php.net"}e=new Ext.Window({title:_("Do you want to be alerted ?"),iconCls:"patchAlert",width:350,height:150,resizable:false,modal:true,autoScroll:true,bodyStyle:"padding: 5px;",layout:"form",labelWidth:50,items:[{xtype:"panel",baseCls:"x-plain",bodyStyle:"padding-bottom: 10px;",html:_("If you w! ant to be notified when your patch will be dealt with, thank you to le ave an email address below.")},{xtype:"textfield",fieldLabel:_("Email"),name:"patch-email-alert",anchor:"100%",value:f}],buttons:[{text:_("Save"),handler:function(){var j,k;j=this.ownerCt.items.items[1].getValue();k=Ext.MessageBox.wait(_("Saving data as a patch..."));e.close();if(d!=="all"){Ext.getCmp(h+b+"-PANEL-btn-saveas-"+g).disable();Ext.getCmp(h+b+"-"+g).isModifiedLang=false;Ext.getCmp(h+b+"-PANEL-"+g).setTitle(Ext.getCmp(h+b+"-PANEL-"+g).originTitle);Ext.getCmp(h+"-"+g).setTitle(Ext.getCmp(h+"-"+g).originTitle)}else{Ext.getCmp("AF-PANEL-btn-saveas-"+g).disable();Ext.getCmp("AF-FILE-"+g).isModified=false;Ext.getCmp("AF-PANEL-"+g).setTitle(Ext.getCmp("AF-PANEL-"+g).originTitle);Ext.getCmp("AF-"+g).setTitle(Ext.getCmp("AF-"+g).originTitle)}XHR({scope:i,url:"./php/controller.php",params:{task:"saveFile",filePath:a,fileName:c,fileLang:d,fileContent:(d!=="all")?Ext.getCmp(h+b+"-"+g).getCode():Ext.getCmp("AF-FILE-"+g).getCode(),type:"patch",emailAlert:j},success:function(l){! var m=Ext.util.JSON.decode(l.responseText);if(d!=="all"){this.addToPendingPatch(d+a,c,m.uniqId)}else{this.addToPendingPatch(a,c,m.uniqId)}k.hide()}})}},{text:_("Cancel"),handler:function(){e.close()}}]});e.show()},saveLangFile:function(f,d,b,e,g,c){if(c.userLogin==="cvsread"){c.winForbidden();return}function a(h){if(h==="no"){Ext.getCmp(e+"-LANG-PANEL-btn-save-"+f).disable();Ext.getCmp(e+"-"+f).isModifiedLang=false;Ext.getCmp(e+"-LANG-PANEL-"+f).setTitle(Ext.getCmp(e+"-LANG-PANEL-"+f).originTitle);if(!Ext.getCmp(e+"-"+f).isModifiedEn&&!Ext.getCmp(e+"-"+f).isModifiedLang){Ext.getCmp(e+"-"+f).setTitle(Ext.getCmp(e+"-"+f).originTitle)}var i=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:d,fileName:b,fileLang:this.userLang,fileContent:Ext.getCmp(e+"-LANG-"+f).getCode()},success:function(j){var k=Ext.util.JSON.decode(j.responseText);if(e==="FE"){this.storeFilesError.getAt(g).set("needcommit",true);this.storeFi! lesError.getAt(g).set("maintainer",k.maintainer);this.storeFilesError. getAt(g).commit()}if(e==="FNU"){this.storeFilesNeedUpdate.getAt(g).set("revision","1."+k.new_revision);this.storeFilesNeedUpdate.getAt(g).set("needcommit",true);this.storeFilesNeedUpdate.getAt(g).set("maintainer",k.maintainer);this.storeFilesNeedUpdate.getAt(g).commit()}if(e==="FNR"){this.storeFilesNeedReviewed.getAt(g).set("needcommit",true);this.storeFilesNeedReviewed.getAt(g).set("maintainer",k.maintainer);this.storeFilesNeedReviewed.getAt(g).set("reviewed",k.reviewed);this.storeFilesNeedReviewed.getAt(g).commit()}this.addToPendingCommit(k.id,this.userLang+d,b,"update");i.hide()},failure:function(j){i.hide();this.winForbidden()}})}else{if(h==="yes"){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Checking for error. Please, wait..."));Ext.getCmp(e+"-LANG-PANEL-btn-save-"+f).disable();Ext.getCmp(e+"-"+f).isModifiedLang=false;Ext.getCmp(e+"-LANG-PANEL-"+f).setTitle(Ext.getCmp(e+"-LANG-PANEL-"+f).originTitle);if(!Ext.getCmp(e+"-"! +f).isModifiedEn&&!Ext.getCmp(e+"-"+f).isModifiedLang){Ext.getCmp(e+"-"+f).setTitle(Ext.getCmp(e+"-"+f).originTitle)}XHR({scope:this,url:"./php/controller.php",params:{task:"checkFileError",FilePath:d,FileName:b,FileLang:this.userLang,FileContent:Ext.getCmp(e+"-LANG-"+f).getCode()},success:function(j){Ext.getBody().unmask();var k=Ext.util.JSON.decode(j.responseText);if(k.error&&k.error_first!=="-No error-"){Ext.getCmp("main-panel").add({closable:true,title:"Error in "+b,iconCls:"FilesError",id:"FE-help-"+f,autoScroll:true,autoLoad:"./error_type.php?dir="+d+"&file="+b});Ext.getCmp("main-panel").setActiveTab("FE-help-"+f)}else{Ext.MessageBox.show({title:_("Check for errors"),msg:_("There is no error."),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO})}XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:d,fileName:b,fileLang:this.userLang,fileContent:Ext.getCmp(e+"-LANG-"+f).getCode()},success:function(l){var m=Ext.util.JSON.decode(l.responseText);if! (e==="FE"){this.storeFilesError.getAt(g).set("needcommit",true);this.s toreFilesError.getAt(g).set("maintainer",m.maintainer);this.storeFilesError.getAt(g).commit()}if(e==="FNU"){this.storeFilesNeedUpdate.getAt(g).set("revision","1."+m.new_revision);this.storeFilesNeedUpdate.getAt(g).set("needcommit",true);this.storeFilesNeedUpdate.getAt(g).set("maintainer",m.maintainer);this.storeFilesNeedUpdate.getAt(g).commit()}if(e==="FNR"){this.storeFilesNeedReviewed.getAt(g).set("needcommit",true);this.storeFilesNeedReviewed.getAt(g).set("maintainer",m.maintainer);this.storeFilesNeedReviewed.getAt(g).set("reviewed",m.reviewed);this.storeFilesNeedReviewed.getAt(g).commit()}this.addToPendingCommit(m.id,this.userLang+d,b,"update")},failure:function(l){this.winForbidden()}});if(e==="FE"){Ext.getCmp(e+"-error-type-"+f).setSrc("./error_type.php?dir="+d+"&file="+b+"&nocache="+new Date().getTime())}}})}}}Ext.MessageBox.show({scope:c,title:_("Confirm"),msg:_("Do you want to check for error before saving?"),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCE! L,fn:a})},getFile:function(e,d,a,c,b){Ext.get(c+e).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Loading..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getFile",FilePath:d,FileName:a},success:function(f){var h=Ext.util.JSON.decode(f.responseText);Ext.getCmp(b+e).setCode(h.content);Ext.get(c+e).unmask();if(c==="FE-LANG-PANEL-"||c==="FNR-LANG-PANEL-"||c==="FNR-EN-PANEL-"||c==="AF-PANEL-"){var g=Ext.getCmp(c+e).getSize();g.height=g.height+1;Ext.getCmp(c+e).setSize(g);Ext.getCmp(c+e).fireEvent("resize")}},callback:function(){if(this.filePendingOpen[0]){this.filePendingOpen.shift();if(this.filePendingOpen[0]){if(this.filePendingOpen[0][0]){this.openFile(this.filePendingOpen[0][0],this.filePendingOpen[0][1])}}}}})},addToPendingPatch:function(b,a,e){var d,c;d=new Date();c=new this.storePendingPatch.recordType({id:Ext.id("",""),path:b,name:a,by:this.userLogin,uniqID:e,date:d});this.storePendingPatch.insert(0,c)},addToPendingCommit:f! unction(g,e,a,d){var c,f,b;c=false;this.storePendingCommit.each(functi on(h){if(h.data.path===e&&h.data.name===a){c=true}});if(!c){f=new Date();b=new this.storePendingCommit.recordType({id:g,path:e,name:a,by:this.userLogin,date:f,type:d});this.storePendingCommit.insert(0,b);this.storePendingCommit.groupBy("path",true)}},rendererNumUptodate:function(a){if(a==="0"){return}else{return'<span style="color:green; font-weight: bold;">'+a+"</span>"}},rendererNumCritical:function(a){if(a==="0"){return}else{return'<span style="color:red; font-weight: bold;">'+a+"</span>"}},rendererTotalTranslator:function(a,c,b){return a?((a===0||a>1)?"("+a+" Translators)":"(1 Translator)"):""},rendererSum:function(a){return(a==="0")?"":a},NewTabBugs:function(a,b,c){Ext.getCmp("main-panel").add({xtype:"iframepanel",id:"mifp_bugs_"+a,title:_("Loading..."),tabTip:c,iconCls:"iconBugs",loadMask:true,defaultSrc:b,listeners:{documentloaded:function(d){d.ownerCt.setTitle(Ext.util.Format.substr(c,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_bugs_"+a)},NewTabMaili! ng:function(a,c,b){Ext.getCmp("main-panel").add({xtype:"iframepanel",id:"mifp_"+a,title:_("Loading..."),tabTip:b,iconCls:"home-mailing-title",loadMask:true,defaultSrc:c,listeners:{documentloaded:function(d){d.ownerCt.setTitle(Ext.util.Format.substr(b,0,20)+"...")}}});Ext.getCmp("main-panel").setActiveTab("mifp_"+a)},winDiff:function(d,b,c,a){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Finding the diff. Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getDiff2",FilePath:d,FileName:b,Rev1:c,Rev2:a},success:function(f){var g=Ext.util.JSON.decode(f.responseText);Ext.getBody().unmask();var e=new Ext.Window({title:String.format(_("Diff between {0} & {1}"),c,a),width:650,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:'<div class="diff-content">'+g.content+"</div>",buttons:[{text:"Close",handler:function(){e.close()}}]});e.show()}})},removeTabEvent:functi! on(d,e){var b,c,f,a;a=e.id.split("-");if((a[0]==="FE"||a[0]==="FNU"||a [0]==="FNR"||a[0]==="PP"||a[0]==="AF")&&a[1]!=="help"){if(a[0]==="FE"){b=Ext.getCmp("FE-"+a[1]).isModifiedLang}if(a[0]==="FNU"){b=Ext.getCmp("FNU-"+a[1]).isModifiedLang}if(a[0]==="FNR"){b=Ext.getCmp("FNR-"+a[1]).isModifiedLang}if(a[0]==="FE"){c=Ext.getCmp("FE-"+a[1]).isModifiedEn}if(a[0]==="FNU"){c=Ext.getCmp("FNU-"+a[1]).isModifiedEn}if(a[0]==="FNR"){c=Ext.getCmp("FNR-"+a[1]).isModifiedEn}if(a[0]==="PP"){f=Ext.getCmp("PP-PATCH-"+a[1]).isModified}if(a[0]==="AF"){f=Ext.getCmp("AF-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)}}})}else{return true}return false}else{return true}},WinCommit:function(j,i,e){var f,c,k,g,a,b,d,h;c=Ext.get("acc-need-update");if(!f){f=new Ext.W! indow({scope:this,id:"winCvsCommit",title:_("CVS commit"),closable:false,layout:"form",width:400,height:480,resizable:false,modal:true,bodyStyle:"padding:5px 5px 0",labelAlign:"top",items:[{xtype:"checktreepanel",id:"tree-panel",anchor:"100%",height:180,autoScroll:true,rootVisible:false,root:{text:"root",expanded:true,children:[]}},{scope:this,xtype:"combo",fieldLabel:_("Older messages"),editable:false,name:"first2",anchor:"100%",store:this.storeCommitLogMessage,triggerAction:"all",tpl:'<tpl for="."><div class="x-combo-list-item">{[values.text.split("\n").join("<br/>")]}</div></tpl>',valueField:"id",displayField:"text",listeners:{scope:this,render:function(){this.storeCommitLogMessage.load()},select:function(n,l,m){Ext.getCmp("form-commit-message-log").setValue(l.data.text)}}},{xtype:"textarea",id:"form-commit-message-log",fieldLabel:_("Log message"),name:"first3",anchor:"100%",height:150,value:""}],tools:[{scope:this,id:"gear",qtip:_("Configure this tools"),handler:functio! n(){var o,m,n;function l(p){return p.split("\n").join("<br/>")}o=new E xt.form.TextArea({grow:true,growMin:120});m=new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),{id:"GridManageLog",header:_("Log message"),dataIndex:"text",renderer:l,editor:new Ext.Editor(o,{shadow:false,autoSize:true,listeners:{scope:this,complete:function(r,s,q){var p=r.record.data.id;XHR({scope:this,url:"./php/controller.php",params:{task:"saveLogMessage",messID:p,mess:s},success:function(t){this.storeCommitLogMessage.getById(p).commit()},failure:function(t){this.winForbidden()}})}}})}]);n=new Ext.Window({title:_("Manage Log Message"),iconCls:"winManageLog",width:650,height:350,layout:"fit",resizable:false,modal:true,autoScroll:true,html:'<div class="diff-content"></div>',items:[{xtype:"editorgrid",store:this.storeCommitLogMessage,loadMask:true,cm:m,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),autoExpandColumn:"GridManageLog",listeners:{scope:this,rowcontextmenu:function(p,s,q){p.getSelectionModel().selectRow(s);var r=new Ext.menu.Menu({items:[{text:_("Delete! this Log Message"),iconCls:"iconDelete",scope:this,handler:function(){XHR({scope:this,url:"./php/controller.php",params:{task:"deleteLogMessage",messID:this.storeCommitLogMessage.getAt(s).data.id},success:function(t){this.storeCommitLogMessage.remove(this.storeCommitLogMessage.getAt(s))},failure:function(t){this.winForbidden()}})}}]});r.showAt(q.getXY())}}}],buttons:[{text:_("Close"),handler:function(){n.close()}}],listeners:{scope:this,close:function(){this.storeCommitLogMessage.reload()}}});n.show()}}],buttons:[{scope:this,text:_("Submit"),id:"win-commit-btn-submit",handler:function(){var l,p,s,u,m,n,q=[],t,r="",o;if(this.userLogin==="cvsread"){f.close();this.winForbidden();return}l=Ext.getCmp("tree-panel").getValue();p=[];for(o=0;o<l.length;o=o+1){s=Ext.getCmp("tree-panel").getNodeById(l[o]).attributes;u="FE-"+Ext.util.md5("FE-"+s.FilePath+s.FileName);m="FNU-"+Ext.util.md5("FNU-"+s.FilePath+s.FileName);n="FNR-"+Ext.util.md5("FNR-"+s.FilePath+s.FileName);if(Ext.getCmp("m! ain-panel").findById(u)||Ext.getCmp("main-panel").findById(m)||Ext.get Cmp("main-panel").findById(n)){if(Ext.getCmp("main-panel").findById(u)){t=u}if(Ext.getCmp("main-panel").findById(m)){t=m}if(Ext.getCmp("main-panel").findById(n)){t=n}q[0]=t;q[1]=s.FileName;p.push(q)}}if(p.length>0){for(o=0;o<p.length;o=o+1){r+=p[o][1]+"<br/>"}Ext.MessageBox.show({scope:this,title:"Warning",msg:(p.length>1)?String.format(_("There is {0} files to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?"),p.length,r):String.format(_("There is {0} file to close before commit.<br><br>{1}<br/><br/>Would you like I close it for you ?"),p.length,r),icon:Ext.MessageBox.INFO,buttons:Ext.MessageBox.YESNOCANCEL,fn:function(v){if(v==="yes"){for(o=0;o<p.length;o=o+1){Ext.getCmp("main-panel").remove(p[o][0])}this.WinCommitLastStep(l,this)}else{return}}})}else{this.WinCommitLastStep(l,this)}return}},{text:_("Close"),id:"win-commit-btn-close",handler:function(){f.close()}}]})}f.show(c);if(j){k=this.storePendingCommit.getAt(i).data.id;a=this.storePendingCo! mmit.getAt(i).data.path;b=this.storePendingCommit.getAt(i).data.name;g=Ext.util.md5(a+b);d=new Ext.tree.TreeNode({id:"need-commit-"+g,text:a+b,FileDBID:k,FilePath:a,FileName:b,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(d)}else{this.storePendingCommit.each(function(l){if(e&&e==="by me"&&l.data.by!==this.userLogin){}else{k=l.data.id;a=l.data.path;b=l.data.name;g=Ext.util.md5(a+b);d=new Ext.tree.TreeNode({id:"need-commit-"+g,text:a+b,FileDBID:k,FilePath:a,FileName:b,leaf:true,checked:true,uiProvider:Ext.ux.tree.CheckTreeNodeUI});Ext.getCmp("tree-panel").getRootNode().appendChild(d)}},this);h=new Ext.tree.TreeSorter(Ext.getCmp("tree-panel"),{});h.doSort(Ext.getCmp("tree-panel").getRootNode())}},WinCommitLastStep:function(f,c){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait until commit..."));var a=[],e,d,b;for(b=0;b<f.length;b=b+1){e=Ext.getCmp("tre! e-panel").getNodeById(f[b]);a.push(e.attributes.FileDBID)}d=Ext.getCmp ("form-commit-message-log").getValue();Ext.getCmp("winCvsCommit").close();XHR({url:"./php/controller.php",params:{task:"cvsCommit",nodes:Ext.util.JSON.encode(a),logMessage:d},success:function(h){var i=Ext.util.JSON.decode(h.responseText);Ext.getBody().unmask();var g=new Ext.Window({title:_("Status"),width:450,height:350,resizable:false,modal:true,autoScroll:true,bodyStyle:"background-color: white; padding: 5px;",html:i.mess.join("<br/>"),buttons:[{text:_("Close"),handler:function(){g.close()}}]});g.show();Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"onSuccesCommit",nodes:Ext.util.JSON.encode(a),logMessage:d},success:function(j){if(c.userLang!="en"){c.storeFilesError.reload();c.storeFilesNeedReviewed.reload();c.storeFilesNeedUpdate.reload()}c.storePendingCommit.reload();c.storeTranslators.reload();c.storeSummary.reload();Ext.getBody().unmask()}})}})},WinUpdate:fun! ction(){var e,d;function c(f){f.TaskPing.cancel();Ext.get("wizard-step-1").replaceClass("wizard-step-before","wizard-step-working");Ext.get("wizard-step-1.1").replaceClass("wizard-wait","wizard-show");XHR({scope:f,url:"./php/controller.php",params:{task:"updateRepository"},success:function(g){Ext.get("wizard-step-1").replaceClass("wizard-step-working","wizard-step-done");Ext.get("wizard-step-1.1").replaceClass("wizard-show","wizard-wait");b(f)},failure:function(h){var j=Ext.util.JSON.decode(h.responseText);if(j.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.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)}}})}va! r g=new Ext.util.DelayedTask(function(){i()});g.delay(5000)}}})}functi on 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.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-working");if(f.userLang!="en"){f.storeFilesNeedUpdate.reload();f.storeTranslators.reload();f.storeFilesError.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();f.TaskPing.delay(30000);e.tools.close.setVisible(true)}d=Ext.get("acc-need-update");if(!e){e=new Ext.Window({title:_("Refresh all data"),layout:"form",width:300,height:200,resizable:false,modal:true,bodyStyle:"padding:15px 15px 0",iconCls:"refresh",html:'<div id="wizard-step-1" class="wizard-step-before">'+_("Update all files from Cvs")+'</div><div id="wizard-step-1.1" class="wizard-wait">'+_("This may take time. Thank you for your patience...")+'</div><div id="wizard-step-2" class="wizard-step-before">'+_("Apply all tools")+'</div><div id="wizard-step-3" class="wizard-step-before">'+_("Reload data")+"</div>",buttons:[{scope:this,text:_("Start"),id:"btn-start-refresh",iconCls:"startRefresh",handler:function(){Ext.getCmp("btn-start-refresh").disable();e.tools.close.s! etVisible(false);Ext.getDom("lastUpdateTime").innerHTML=_("update in p rogress...");c(this)}}]})}Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Verify if there is an update in progress. Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getLastUpdate"},success:function(f){Ext.getBody().unmask();var g=Ext.util.JSON.decode(f.responseText);if(g.lastupdate==="in_progress"){Ext.MessageBox.show({title:_("Status"),msg:_("There is currently an update in progress.<br/>You can't perform an update now."),buttons:Ext.MessageBox.OK,icon:Ext.MessageBox.INFO})}else{e.show(d)}}})},WinCheckBuild:function(){var c,a;a=Ext.get("acc-need-update");function b(d){XHR({scope:d,url:"./php/controller.php",params:{task:"getLogFile",file:"log_check_build"},success:function(e){var f=Ext.util.JSON.decode(e.responseText);this.TaskPing.delay(30000);if(Ext.getCmp("main-panel").findById("check_build_panel")){Ext.getCmp("main-panel").remove("check_build_panel")}Ext.getCmp("main-panel").add({xtype:"panel",id:"check_build! _panel",title:_("Check Build Result"),closable:true,autoScroll:true,iconCls:"checkBuild",html:'<div class="check-build-content">'+f.mess+"</div>"});Ext.getCmp("main-panel").setActiveTab("check_build_panel")}})}if(!c){c=new Ext.Window({title:_("Check Build"),iconCls:"checkBuild",layout:"form",width:350,height:200,resizable:false,modal:true,bodyStyle:"padding:5px 5px 0",labelAlign:"top",buttons:[{scope:this,text:_("Go !"),id:"win-check-build-btn-submit",handler:function(){var d=Ext.getCmp("option-xml-details").checked;c.close();Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait until the build is checked..."));this.TaskPing.cancel();XHR({scope:this,url:"./php/controller.php",params:{task:"checkBuild",xmlDetails:d},success:function(e){Ext.getBody().unmask();b(this)},failure:function(e){var h=Ext.util.JSON.decode(e.responseText);if(h.success===false){this.TaskPing.delay(30000);Ext.getBody().unmask();this.winForbidden()}els! e{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.success===false){Ext.getBody().unmask();b(this)}else{g.delay(5000)}}})}var g=new Ext.util.DelayedTask(function(){f(this)},this);g.delay(5000)}}})}}],items:[{xtype:"panel",baseCls:"x-plain",bodyStyle:"padding:5px 5px 0",html:_("You're about to check the build via this command:")+"<br/><br/>/usr/bin/php configure.php --with-lang="+this.userLang+"<br><br>",modal:false},{xtype:"checkbox",hideLabel:true,checked:false,boxLabel:_("Enable detailed XML error messages"),name:"option-xml-details",id:"option-xml-details"}]})}c.show(a)},WinConf:function(){new ui.component.EditorConf().show(Ext.get("winconf-btn"))},confUpdate:function(b,a){XHR({scope:this,url:"./php/controller.php",params:{task:"confUpdate",item:b,value:a},success:function(c){if(b==="conf_theme"){this.userConf.conf_theme=a}if(b==="conf_needupdate_diff"){this.userConf.conf_needu! pdate_diff=a}if(b==="conf_needupdate_scrollbars"){this.userConf.conf_needupdate_scrollbars=""+a+""}if(b==="conf_needupdate_displaylog"){this.userConf.conf_needupdate_displaylog=""+a+""}if(b==="conf_error_skipnbliteraltag"){this.userConf.conf_error_skipnbliteraltag=""+a+"";this.storeFilesError.reload()}if(b==="conf_error_scrollbars"){this.userConf.conf_error_scrollbars=""+a+""}if(b==="conf_error_displaylog"){this.userConf.conf_error_displaylog=""+a+""}if(b==="conf_reviewed_scrollbars"){this.userConf.conf_reviewed_scrollbars=""+a+""}if(b==="conf_reviewed_displaylog"){this.userConf.conf_reviewed_displaylog=""+a+""}if(b==="conf_allfiles_displaylog"){this.userConf.conf_allfiles_displaylog=""+a+""}if(b==="conf_patch_scrollbars"){this.userConf.conf_patch_scrollbars=""+a+""}if(b==="conf_patch_displaylog"){this.userConf.conf_patch_displaylog=""+a+""}}})},WinAbout:function(){var a;if(!a){a=new Ext.Window({layout:"fit",width:515,height:320,iconCls:"iconHelp",modal:true,title:String.fo! rmat(_("About {0}"),this.appName),closeAction:"hide",plain:true,bodySt yle:"color:#000",items:new Ext.TabPanel({autoTabs:true,activeTab:0,border:false,defaults:{autoScroll:true},items:[{title:_("About"),html:'<div id="phd-oe-about"><img src="themes/img/logo.png" alt="'+this.appName+'" /></div><div id="phd-oe-about-info">'+this.appName+" ver "+this.appVer+"<br/>UI: "+this.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-cr! edit-info">'+_("Icon pack")+"</div></li></ul></div>"},{title:_("License"),autoLoad:{url:"./LICENSE"}}]}),buttons:[{text:_("Close"),handler:function(){a.hide()}}]})}a.show(Ext.get("winabout-btn"))},sendEmail:function(b,a){var c,d;c=new Ext.form.FormPanel({baseCls:"x-plain",labelWidth:55,url:"save-form.php",defaultType:"textfield",items:[{fieldLabel:_("Send To"),name:"to",readOnly:true,anchor:"100%",value:'"'+b+'" <'+a+">"},{fieldLabel:_("Subject"),name:"subject",anchor:"100%"},{xtype:"textarea",hideLabel:true,name:"msg",anchor:"100% -53"}]});d=new Ext.Window({title:_("Send an email"),width:500,height:300,minWidth:300,minHeight:200,layout:"fit",plain:true,bodyStyle:"padding:5px;",buttonAlign:"center",items:c,iconCls:"iconSendEmail",buttons:[{text:_("Send"),handler:function(){var e=c.getForm().getValues();XHR({url:"./php/controller.php",params:{task:"sendEmail",to:e.to,subject:e.subject,msg:e.msg},success:function(f){d.close();Ext.MessageBox.alert(_("Status"),String.format(_("! Email sent to {0} with success!"),b))}})}},{text:_("Cancel"),handler:f unction(){d.close()}}]});d.show()},drawInterface:function(){var l,n,a,c,j,i,g,k,h,f,m,b,d,e;this.TaskPing=new Ext.util.DelayedTask(function(){XHR({url:"./php/controller.php",params:{task:"ping"},success:function(p){var r=Ext.util.JSON.decode(p.responseText);if(r.ping!=="pong"){window.location.href="./"}else{if(r.lastupdate==="in_progress"){Ext.getDom("lastUpdateTime").innerHTML=_("update in progress...")}else{var q=Date.parseDate(r.lastupdate,"Y-m-d H:i:s");Ext.getDom("lastUpdateTime").innerHTML=q.format(_("Y-m-d, H:i"))}}},failure:function(){window.location.href="./"}});this.TaskPing.delay(30000)},this);this.TaskPing.delay(30000);l=new Ext.grid.GridPanel({store:this.storeFilesError,loadMask:true,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}],view:new Ext.grid.GroupingView({em! ptyText:'<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(o,r,q,p){if(o.data.needcommit){return"file-need-commit"}}}),autoExpandColumn:"name",bodyBorder:false,tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FE-filter",validationEvent:false,validateOnBlur:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",hideTrigger1:true,width:180,scope:this,enableKeyEvents:true,listeners:{keypress:function(p,o){if(o.getKey()==o.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();this.scope.storeFilesError.clearFilter()},onTrigger2Click:function(){var o=this.getValue();if(o==""||o.length<3){this.markInvalid(_("Your filter must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();this.scope.storeFile! sError.filter("maintainer",o)}})],listeners:{scope:this,render:functio n(o){l.view.refresh()},rowdblclick:function(q,A,w){var p,r,x,v,y,o,u,t,s,B,z;p=this.storeFilesError.getAt(A).data.path;r=this.storeFilesError.getAt(A).data.name;x=Ext.util.md5("FE-"+this.userLang+p+r);v=this.storeFilesError.getAt(A).data.needcommit;if(!Ext.getCmp("main-panel").findById("FE-"+x)){y=[];this.storeFilesError.each(function(C){if(C.data.path===p&&C.data.name===r){if(!y[C.data.type]){y.push(C.data.type)}}});o=new Ext.data.Store({autoLoad:(this.userConf.conf_error_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:this.userLang+p,File:r},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});o.setDefaultSort("date","desc");u=new Ext.data.Store({autoLoad:(this.userConf.conf_err! or_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:"en"+p,File:r},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});u.setDefaultSort("date","desc");t=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(D){var C=D.getCount();if(C===2){return false}},rowselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FE-PANEL-btn-logLang-"+x).enable();Ext.get("FE-PANEL-btn-logLang-"+x).frame("3F8538")}else{Ext.getCmp("FE-PANEL-btn-logLang-"+x).disable()}},rowdeselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FE-PANEL-btn-logLang-"+x).enable();Ext.get("FE-PANEL-btn-logLang-"+x).frame("3F8538")}else{Ext.getCmp("FE-PA! NEL-btn-logLang-"+x).disable()}}}});s=new Ext.grid.GridPanel({store:o, loadMask:true,columns:[t,{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"))}],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:t,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:_("<b>View</b> the diff"),iconCls:"iconViewDiff",id:"FE-PANEL-btn-logLang-"+x,disabled:true,handler:function(){var E,D,C;E=t.getSelections();D=E[0].data.revision;C=E[1].data.revision;this.winDiff(this.userLang+p,r,D,C)}},{scope:this,tooltip:_("<b>Load/Refresh</b> revisions"),iconCls:"refresh",id:"FE-PANEL-btn-refreshlogLang-"+x,handler:function(){o.reload()}}]});B=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(D){var C=D.getCount();if(C===2){return ! false}},rowselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FE-PANEL-btn-logEn-"+x).enable();Ext.get("FE-PANEL-btn-logEn-"+x).frame("3F8538")}else{Ext.getCmp("FE-PANEL-btn-logEn-"+x).disable()}},rowdeselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FE-PANEL-btn-logEn-"+x).enable();Ext.get("FE-PANEL-btn-logEn-"+x).frame("3F8538")}else{Ext.getCmp("FE-PANEL-btn-logEn-"+x).disable()}}}});z=new Ext.grid.GridPanel({store:u,loadMask:true,columns:[B,{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"))}],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:B,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:_("<b>View</b> the diff"),iconCls:"iconViewDiff",id:"FE-PANEL-btn-logEn-"! +x,disabled:true,handler:function(){var E,D,C;E=B.getSelections();D=E[ 0].data.revision;C=E[1].data.revision;this.winDiff("en"+p,r,D,C)}},{scope:this,tooltip:_("<b>Load/Refresh</b> revisions"),iconCls:"refresh",id:"FE-PANEL-btn-refreshlogEn-"+x,handler:function(){u.reload()}}]});Ext.getCmp("main-panel").add({closable:true,title:r,originTitle:r,tabTip:String.format(_("File with error : in {0}"),p),iconCls:"iconTabError",id:"FE-"+x,isModifiedLang:false,isModifiedEn:false,layout:"border",defaults:{collapsible:true,split:true},items:[{xtype:"panel",layout:"fit",region:"north",title:_("Error description"),id:"FE-error-desc-"+x,height:150,collapsed:true,items:{xtype:"iframepanel",id:"FE-error-type-"+x,loadMask:true,defaultSrc:"./error_type.php?dir="+p+"&file="+r}},{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:this.userLang,items:[s]},{layout:"fit",title:"En",items:[z]}]}},{title:String.for! mat(_("{0} File: "),this.userLang)+p+r,originTitle:String.format(_("{0} File: "),this.userLang)+p+r,collapsible:false,id:"FE-LANG-PANEL-"+x,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"FE-LANG-"+x,listeners:{scope:this,initialize:function(C){this.getFile(x,this.userLang+p,r,"FE-LANG-PANEL-","FE-LANG-")},cmcursormove:function(){var C=Ext.util.JSON.decode(Ext.getCmp("FE-LANG-"+x).getCursorPosition());Ext.get("FE-LANG-status-line-"+x).dom.innerHTML=C.line;Ext.get("FE-LANG-status-col-"+x).dom.innerHTML=C.caracter},cmchange:function(F,D,E){var C=Ext.util.JSON.decode(Ext.getCmp("FE-LANG-"+x).getCursorPosition());Ext.get("FE-LANG-status-line-"+x).dom.innerHTML=C.line;Ext.get("FE-LANG-status-col-"+x).dom.innerHTML=C.caracter;if(F!==27&&F!==33&&F!==34&&F!==37&&F!==38&&F!==39&&F!==40&&F!==17&&F!==16&&F!==67){if(!Ext.getCmp("FE-"+x).isModifiedLang){Ext.getCmp("FE-LANG-PANEL-"+x).setTitle(Ext.getCmp("FE-LANG-PANEL-"+x).originTitle+' <span style! ="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext. getCmp("FE-"+x).setTitle(Ext.getCmp("FE-"+x).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FE-LANG-PANEL-btn-save-"+x).enable();Ext.get("FE-LANG-PANEL-btn-save-"+x).frame("3F8538");Ext.getCmp("FE-LANG-PANEL-btn-saveas-"+x).enable();Ext.get("FE-LANG-PANEL-btn-saveas-"+x).frame("3F8538");Ext.getCmp("FE-"+x).isModifiedLang=true}}},cmscroll:function(C){if(this.userConf.conf_error_scrollbars==="true"){Ext.getCmp("FE-EN-"+x).scrollTo(C)}}}}],bbar:[{scope:this,xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_error_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),name:"conf_error_scrollbars",listeners:{scope:this,check:function(C){this.confUpdate("conf_error_scrollbars",C.getValue())},render:function(C){Ext.DomHelper.insertHtml("beforeBegin",C.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="FE-LANG-status-line-'+x+'">-</span></span> <span c! lass="x-status-text-panel">'+_("Col: ")+'<span id="FE-LANG-status-col-'+x+'">-</span></span></div> ')}}}],tbar:[{scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",id:"FE-LANG-PANEL-btn-save-"+x,disabled:true,handler:function(){this.saveLangFile(x,p,r,"FE",A,this)}},{scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",id:"FE-LANG-PANEL-btn-saveas-"+x,disabled:true,handler:function(){this.savePatch(this.userLang,x,p,r,"FE",this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("FE-LANG-"+x).reIndentAll()}},this.menuMarkupLANG("FE-LANG-"+x,this)]},{title:_("En File: ")+p+r,originTitle:_("En File: ")+p+r,collapsible:false,id:"FE-EN-PANEL-"+x,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"FE-EN-"+x,listeners:{scope:this,initialize:function(C){this.getFile(x,"en"+p,r,"FE-EN-PANEL-","FE-EN-")},cmchange:function(F,D,E){var C=Ext.util.JSON.decode(Ext.getC! mp("FE-EN-"+x).getCursorPosition());Ext.get("FE-EN-status-line-"+x).do m.innerHTML=C.line;Ext.get("FE-EN-status-col-"+x).dom.innerHTML=C.caracter;if(F!==27&&F!==33&&F!==34&&F!==37&&F!==38&&F!==39&&F!==40&&F!==17&&F!==16&&F!==67){if(!Ext.getCmp("FE-"+x).isModifiedEn){Ext.getCmp("FE-EN-PANEL-"+x).setTitle(Ext.getCmp("FE-EN-PANEL-"+x).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp("FE-"+x).setTitle(Ext.getCmp("FE-"+x).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FE-EN-PANEL-btn-save-"+x).enable();Ext.get("FE-EN-PANEL-btn-save-"+x).frame("3F8538");Ext.getCmp("FE-EN-PANEL-btn-saveas-"+x).enable();Ext.get("FE-EN-PANEL-btn-saveas-"+x).frame("3F8538");Ext.getCmp("FE-"+x).isModifiedEn=true}}},cmscroll:function(C){if(this.userConf.conf_error_scrollbars==="true"){Ext.getCmp("FE-LANG-"+x).scrollTo(C)}},cmcursormove:function(D){var C=Ext.util.JSON.decode(Ext.getCmp("FE-EN-"+x).getCursorPosition());Ext.get("FE-EN-status-line-"+x).dom.innerHTML=C.line;Ext.get("FE-EN-statu! s-col-"+x).dom.innerHTML=C.caracter}}}],bbar:[{scope:this,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="FE-EN-status-line-'+x+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="FE-EN-status-col-'+x+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",id:"FE-EN-PANEL-btn-save-"+x,disabled:true,handler:function(){this.saveEnFile(x,p,r,"FE",A,this)}},{scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",id:"FE-EN-PANEL-btn-saveas-"+x,disabled:true,handler:function(){this.savePatch("en",x,p,r,"FE",this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("FE-EN-"+x).reIndentAll()}},this.menuMarkupEN("FE-EN-"+x)]}]});Ext.getCmp("main-panel").setActiveTab("FE-"+x);if(Ext.getCmp("FE-"+x).getL! ayout().north.collapsedEl){Ext.getCmp("FE-"+x).getLayout().north.colla psedEl.addClass("x-layout-collapsed-east-error-desc")}}else{Ext.getCmp("main-panel").setActiveTab("FE-"+x)}},rowcontextmenu:function(q,v,t){var r,o,s,p="",u;q.getSelectionModel().selectRow(v);r=this.storeFilesError.getAt(v).data.path;o=this.storeFilesError.getAt(v).data.name;s=Ext.util.md5("FE-"+r+o);if(this.storeFilesError.getAt(v).data.needcommit){p={text:_("View Diff"),iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+v,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+v+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+v);Ext.get("diff_panel_"+v).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.userLang+r,FileName:o},success:function(w){var x=Ext.util.JSON.decode(w.responseText);Ex! t.get("diff_content_"+v).dom.innerHTML=x.content;Ext.get("diff_panel_"+v).unmask()}})}}}u=new Ext.menu.Menu({items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"FilesError",scope:this,handler:function(){l.fireEvent("rowdblclick",q,v,t)}},p,"-",{text:_("About error type"),iconCls:"iconHelp",scope:this,handler:function(){if(!Ext.getCmp("main-panel").findById("FE-help")){Ext.getCmp("main-panel").add({closable:true,title:_("About error type"),iconCls:"iconHelp",id:"FE-help",autoScroll:true,autoLoad:"./error_type.php"});Ext.getCmp("main-panel").setActiveTab("FE-help")}else{Ext.getCmp("main-panel").setActiveTab("FE-help")}}}]});u.showAt(t.getXY())}}});n=new Ext.grid.GridPanel({store:this.storeFilesNeedUpdate,loadMask:true,columns:[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("EN revision"),width:45,sortable:true,dataIndex:"en_revision"},{header:String.format(_("{0} revision"),Ext.util.Format.uppercase(this.userLang)),width:45,sortable:true,dataInde! x:"revision"},{header:_("Maintainer"),width:45,sortable:true,dataIndex :"maintainer"},{header:_("Path"),dataIndex:"path",hidden:true}],view:new Ext.grid.GroupingView({forceFit:true,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',getRowClass:function(o,r,q,p){if(o.data.needcommit){return"file-need-commit"}if(o.data.isCritical){return"file-critical"}},emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>"}),autoExpandColumn:"name",bodyBorder:false,tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FNU-filter",validationEvent:false,validateOnBlur:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",hideTrigger1:true,width:180,scope:this,enableKeyEvents:true,listeners:{keypress:function(p,o){if(o.getKey()==o.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();this.scope.storeFilesNeedUpdate.clearFilter()},onTrigger2Click:function(){var o=this.getValue();if(o==""||o.leng! th<3){this.markInvalid(_("Your filter must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();this.scope.storeFilesNeedUpdate.filter("maintainer",o)}})],listeners:{scope:this,rowcontextmenu:function(q,u,s){var r,o,p="",t;r=this.storeFilesNeedUpdate.getAt(u).data.path;o=this.storeFilesNeedUpdate.getAt(u).data.name;q.getSelectionModel().selectRow(u);if(this.storeFilesNeedUpdate.getAt(u).data.needcommit){p={text:"View Diff",iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+u,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+u+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+u);Ext.get("diff_panel_"+u).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getDiff",FilePath:this.userLang+r,File! Name:o},success:function(v){var w=Ext.util.JSON.decode(v.responseText) ;Ext.get("diff_content_"+u).dom.innerHTML=w.content;Ext.get("diff_panel_"+u).unmask()}})}}}t=new Ext.menu.Menu({items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"iconTabNeedUpdate",scope:this,handler:function(){n.fireEvent("rowdblclick",q,u,s)}},p]});t.showAt(s.getXY())},rowdblclick:function(q,z,x){var p,r,B,A,v,w,o,u,t,s,D,y,C;p=this.storeFilesNeedUpdate.getAt(z).data.path;r=this.storeFilesNeedUpdate.getAt(z).data.name;B=this.storeFilesNeedUpdate.getAt(z).data.en_revision;A=this.storeFilesNeedUpdate.getAt(z).data.revision;v=this.storeFilesNeedUpdate.getAt(z).data.needcommit;w=Ext.util.md5("FNU-"+this.userLang+p+r);if(!Ext.getCmp("main-panel").findById("FNU-"+w)){o=new Ext.data.Store({autoLoad:(this.userConf.conf_needupdate_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:this.userLang+p,File:r},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});o.setDefaultSort("date","desc");u=new Ext.data.Store({autoLoad:(this.userConf.conf_needupdate_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:"en"+p,File:r},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});u.setDefaultSort("date","desc");t=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(F){var E=F.getCount();if(E===2){return false}},rowselect:function(F){var E=F.getCount();if(E===2){Ext.getCmp("FNU-PANEL-btn-logLang-"+w).enable();Ext.get("! FNU-PANEL-btn-logLang-"+w).frame("3F8538")}else{Ext.getCmp("FNU-PANEL- btn-logLang-"+w).disable()}},rowdeselect:function(F){var E=F.getCount();if(E===2){Ext.getCmp("FNU-PANEL-btn-logLang-"+w).enable();Ext.get("FNU-PANEL-btn-logLang-"+w).frame("3F8538")}else{Ext.getCmp("FNU-PANEL-btn-logLang-"+w).disable()}}}});s=new Ext.grid.GridPanel({store:o,loadMask:true,columns:[t,{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"))}],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:t,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:_("<b>View</b> the diff"),iconCls:"iconViewDiff",id:"FNU-PANEL-btn-logLang-"+w,disabled:true,handler:function(){var G,F,E;G=t.getSelections();F=G[0].data.revision;E=G[1].data.revision;this.winDiff(this.userLang+p,r,F,E)}},{scope:this,tooltip:! _("<b>Load/Refresh</b> revisions"),iconCls:"refresh",id:"FNU-PANEL-btn-refreshlogLang-"+w,handler:function(){o.reload()}}]});D=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(F){var E=F.getCount();if(E===2){return false}},rowselect:function(F){var E=F.getCount();if(E===2){Ext.getCmp("FNU-PANEL-btn-logEn-"+w).enable();Ext.get("FNU-PANEL-btn-logEn-"+w).frame("3F8538")}else{Ext.getCmp("FNU-PANEL-btn-logEn-"+w).disable()}},rowdeselect:function(F){var E=F.getCount();if(E===2){Ext.getCmp("FNU-PANEL-btn-logEn-"+w).enable();Ext.get("FNU-PANEL-btn-logEn-"+w).frame("3F8538")}else{Ext.getCmp("FNU-PANEL-btn-logEn-"+w).disable()}}}});y=new Ext.grid.GridPanel({store:u,loadMask:true,columns:[D,{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,da! taIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))} ],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:D,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:_("<b>View</b> the diff"),iconCls:"iconViewDiff",id:"FNU-PANEL-btn-logEn-"+w,disabled:true,handler:function(){var G,F,E;G=D.getSelections();F=G[0].data.revision;E=G[1].data.revision;this.winDiff("en"+p,r,F,E)}},{scope:this,tooltip:_("<b>Load/Refresh</b> revisions"),iconCls:"refresh",id:"FNU-PANEL-btn-refreshlogEn-"+w,handler:function(){u.reload()}}]});if(this.userConf.conf_needupdate_diff==="using-viewvc"){C={xtype:"panel",layout:"fit",region:"north",title:_("Diff From cvs"),height:150,collapsed:true,items:{xtype:"iframepanel",id:"FNU-diff-"+w,loadMask:true,defaultSrc:"http://cvs.php.net/viewvc.cgi/phpdoc/en"+p+r+"?r1="+A+"&r2="+B}}}else{if(this.userConf.conf_needupdate_diff==="using-exec"){C={xtype:"panel",layout:"fit",region:"north",title:_("Diff From cvs"),height:150,autoScroll:true,collapsed:true,html:'<div id="FNU-diff-'+w+'" class="di! ff-content"></div>',listeners:{render:function(){XHR({url:"./php/controller.php",params:{task:"getDiff2",FilePath:"en"+p,FileName:r,Rev2:A,Rev1:B},success:function(E){var F=Ext.util.JSON.decode(E.responseText);Ext.get("FNU-diff-"+w).dom.innerHTML=F.content}})}}}}}Ext.getCmp("main-panel").add({closable:true,title:r,originTitle:r,tabTip:String.format(_("Need Update: in {0}"),p),iconCls:"iconTabNeedUpdate",id:"FNU-"+w,isModifiedLang:false,isModifiedEn:false,layout:"border",defaults:{collapsible:true,split:true},items:[C,{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:_("CvsLog"),collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:this.userLang,items:[s]},{layout:"fit",title:"En",items:[y]}]}},{scope:this,title:String.format(_("{0} File: "),this.userLang)+p+r,originTitle:String.format(_("{0} File: "),this.userLang)+p+r,collapsible:false,id:"FNU-LANG-PANEL-"+w,region:"center",xty! pe:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"FN U-LANG-"+w,listeners:{scope:this,initialize:function(){this.getFile(w,this.userLang+p,r,"FNU-LANG-PANEL-","FNU-LANG-")},cmcursormove:function(){var E=Ext.util.JSON.decode(Ext.getCmp("FNU-LANG-"+w).getCursorPosition());Ext.get("FNU-LANG-status-line-"+w).dom.innerHTML=E.line;Ext.get("FNU-LANG-status-col-"+w).dom.innerHTML=E.caracter},cmchange:function(H,F,G){var E=Ext.util.JSON.decode(Ext.getCmp("FNU-LANG-"+w).getCursorPosition());Ext.get("FNU-LANG-status-line-"+w).dom.innerHTML=E.line;Ext.get("FNU-LANG-status-col-"+w).dom.innerHTML=E.caracter;if(H!==27&&H!==33&&H!==34&&H!==37&&H!==38&&H!==39&&H!==40&&H!==17&&H!==16&&H!==67){if(!Ext.getCmp("FNU-"+w).isModifiedLang){Ext.getCmp("FNU-LANG-PANEL-"+w).setTitle(Ext.getCmp("FNU-LANG-PANEL-"+w).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp("FNU-"+w).setTitle(Ext.getCmp("FNU-"+w).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNU-LANG-PANEL-btn-save! -"+w).enable();Ext.get("FNU-LANG-PANEL-btn-save-"+w).frame("3F8538");Ext.getCmp("FNU-LANG-PANEL-btn-saveas-"+w).enable();Ext.get("FNU-LANG-PANEL-btn-saveas-"+w).frame("3F8538");Ext.getCmp("FNU-"+w).isModifiedLang=true}}},cmscroll:function(E){if(this.userConf.conf_needupdate_scrollbars==="true"){Ext.getCmp("FNU-EN-"+w).scrollTo(E)}}}}],bbar:[{scope:this,xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_needupdate_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),name:"conf_needupdate_scrollbars",listeners:{scope:this,check:function(E){this.confUpdate("conf_needupdate_scrollbars",E.getValue())},render:function(E){Ext.DomHelper.insertHtml("beforeBegin",E.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="FNU-LANG-status-line-'+w+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="FNU-LANG-status-col-'+w+'">-</span></span></div> ')}}}],t! bar:[{scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile" ,id:"FNU-LANG-PANEL-btn-save-"+w,disabled:true,handler:function(){this.saveLangFile(w,p,r,"FNU",z,this)}},{scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",id:"FNU-LANG-PANEL-btn-saveas-"+w,disabled:true,handler:function(){this.savePatch(this.userLang,w,p,r,"FNU",this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("FNU-LANG-"+w).reIndentAll()}},this.menuMarkupLANG("FNU-LANG-"+w,this)]},{title:_("En File: ")+p+r,originTitle:_("En File: ")+p+r,collapsible:false,id:"FNU-EN-PANEL-"+w,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"FNU-EN-"+w,listeners:{scope:this,initialize:function(){this.getFile(w,"en"+p,r,"FNU-EN-PANEL-","FNU-EN-")},cmchange:function(H,F,G){var E=Ext.util.JSON.decode(Ext.getCmp("FNU-EN-"+w).getCursorPosition());Ext.get("FNU-EN-status-line-"+w).dom.innerHTML=E.line;Ext.get("FNU-EN-status-col-"+w).dom.innerHTML=E.caracter;if(H!==27&&H!==33&&H!==34&&H!==3! 7&&H!==38&&H!==39&&H!==40&&H!==17&&H!==16&&H!==67){if(!Ext.getCmp("FNU-"+w).isModifiedEn){Ext.getCmp("FNU-EN-PANEL-"+w).setTitle(Ext.getCmp("FNU-EN-PANEL-"+w).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp("FNU-"+w).setTitle(Ext.getCmp("FNU-"+w).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNU-EN-PANEL-btn-save-"+w).enable();Ext.get("FNU-EN-PANEL-btn-save-"+w).frame("3F8538");Ext.getCmp("FNU-EN-PANEL-btn-saveas-"+w).enable();Ext.get("FNU-EN-PANEL-btn-saveas-"+w).frame("3F8538");Ext.getCmp("FNU-"+w).isModifiedEn=true}}},cmscroll:function(E){if(this.userConf.conf_needupdate_scrollbars==="true"){Ext.getCmp("FNU-LANG-"+w).scrollTo(E)}},cmcursormove:function(F){var E=Ext.util.JSON.decode(Ext.getCmp("FNU-EN-"+w).getCursorPosition());Ext.get("FNU-EN-status-line-"+w).dom.innerHTML=E.line;Ext.get("FNU-EN-status-col-"+w).dom.innerHTML=E.caracter}}}],bbar:[{scope:this,xtype:"panel",height:21,baseC! ls:"",bodyStyle:"padding-top:5px;",html:'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="FNU-EN-status-line-'+w+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="FNU-EN-status-col-'+w+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",id:"FNU-EN-PANEL-btn-save-"+w,disabled:true,handler:function(){this.saveEnFile(w,p,r,"FNU",z,this)}},{scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",id:"FNU-EN-PANEL-btn-saveas-"+w,disabled:true,handler:function(){this.savePatch("en",w,p,r,"FNU",this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("FNU-EN-"+w).reIndentAll()}},this.menuMarkupEN("FNU-EN-"+w)]}]});Ext.getCmp("main-panel").setActiveTab("FNU-"+w)}else{Ext.getCmp("main-panel").setActiveTab("FNU-"+w)}}}});a=new Ext.grid.GridPanel({store:this.storePendingPatch,loadMask:true,columns:[{id:"name",header:_("Files"),sortable:tr! ue,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}],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>"}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,rowcontextmenu:function(p,v,t){var q,o,r,s,u;q=this.storePendingPatch.getAt(v).data.path;o=this.storePendingPatch.getAt(v).data.name;r=this.storePendingPatch.getAt(v).data.uniqID;s=Ext.util.md5("PP-"+r+q+o);p.getSelectionModel().selectRow(v);u=new Ext.menu.Menu({items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"PendingPatch",scope:this,handler:function(){a.fireEvent("rowdblclick",p,v,t)}},"-",{text:_("Reject this! patch"),iconCls:"iconPageDelete",scope:this,handler:function(){this.r ejectPatch(s,q,o,r,v,this)}}]});u.showAt(t.getXY())},rowdblclick:function(p,w,u){var o,q,x,v,t,s,r;o=this.storePendingPatch.getAt(w).data.path;q=this.storePendingPatch.getAt(w).data.name;x=this.storePendingPatch.getAt(w).data.uniqID;v=Ext.util.md5("PP-"+x+o+q);if(!Ext.getCmp("main-panel").findById("PP-"+v)){t=new Ext.data.Store({autoLoad:(this.userConf.conf_patch_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:o,File:q},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});t.setDefaultSort("date","desc");s=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(z){var y=z.getCount();if(y===2){return false}},rowselect:function(z! ){var y=z.getCount();if(y===2){Ext.getCmp("PP-PANEL-btn-log-"+v).enable();Ext.get("PP-PANEL-btn-log-"+v).frame("3F8538")}else{Ext.getCmp("PP-PANEL-btn-log-"+v).disable()}},rowdeselect:function(z){var y=z.getCount();if(y===2){Ext.getCmp("PP-PANEL-btn-log-"+v).enable();Ext.get("PP-PANEL-btn-log-"+v).frame("3F8538")}else{Ext.getCmp("PP-PANEL-btn-log-"+v).disable()}}}});r=new Ext.grid.GridPanel({store:t,loadMask:true,columns:[s,{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"))}],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:s,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:_("<b>View</b> the diff"),iconCls:"iconViewDiff",id:"PP-PANEL-btn-log-"+v,disabled:true,handler:function(){var A,! z,y;A=s.getSelections();z=A[0].data.revision;y=A[1].data.revision;this ..winDiff(o,q,z,y)}},{scope:this,tooltip:_("<b>Load/Refresh</b> revisions"),iconCls:"refresh",id:"PP-PANEL-btn-refreshlog-"+v,handler:function(){t.reload()}}]});Ext.getCmp("main-panel").add({closable:true,title:q,originTitle:q,tabTip:String.format(_("Patch for {0}"),o+q),iconCls:"PendingPatch",id:"PP-"+v,layout:"border",defaults:{collapsible:true,split:true},items:[{xtype:"panel",layout:"fit",region:"north",title:_("Patch content"),id:"PP-patch-desc-"+v,height:150,autoScroll:true,collapsed:true,html:'<div id="diff_content_'+v+'" class="diff-content"></div>',listeners:{render:function(){XHR({scope:this,url:"./php/controller.php",params:{task:"getDiff",FilePath:o,FileName:q,type:"patch",uniqID:x},success:function(y){var z=Ext.util.JSON.decode(y.responseText);Ext.get("diff_content_"+v).dom.innerHTML=z.content}})}}},{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:_("CvsLog"),collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",default! s:{autoScroll:true},items:[{layout:"fit",title:"Log",items:[r]}]}},{title:String.format(_("Proposed Patch for {0}"),o+q),originTitle:String.format(_("Proposed Patch for {0}"),o+q),collapsible:false,id:"PP-PATCH-PANEL-"+v,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"PP-PATCH-"+v,isModified:false,listeners:{scope:this,initialize:function(y){this.getFile(v,o,q+"."+x+".patch","PP-PATCH-PANEL-","PP-PATCH-")},cmcursormove:function(){var y=Ext.util.JSON.decode(Ext.getCmp("PP-PATCH-"+v).getCursorPosition());Ext.get("PP-PATCH-status-line-"+v).dom.innerHTML=y.line;Ext.get("PP-PATCH-status-col-"+v).dom.innerHTML=y.caracter},cmchange:function(B,z,A){var y=Ext.util.JSON.decode(Ext.getCmp("PP-PATCH-"+v).getCursorPosition());Ext.get("PP-PATCH-status-line-"+v).dom.innerHTML=y.line;Ext.get("PP-PATCH-status-col-"+v).dom.innerHTML=y.caracter;if(B!==27&&B!==33&&B!==34&&B!==37&&B!==38&&B!==39&&B!==40&&B!==17&&B!==16&&B!==67){if(!Ext.getCmp("PP-PATCH-"+v! ).isModified){Ext.getCmp("PP-PATCH-PANEL-"+v).setTitle(Ext.getCmp("PP- PATCH-PANEL-"+v).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp("PP-"+v).setTitle(Ext.getCmp("PP-"+v).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("PP-PATCH-"+v).isModified=true}}},cmscroll:function(y){if(this.userConf.conf_patch_scrollbars==="true"){Ext.getCmp("PP-ORIGIN-"+v).scrollTo(y)}}}}],bbar:[{scope:this,xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_patch_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),name:"conf_patch_scrollbars",listeners:{scope:this,check:function(y){this.confUpdate("conf_patch_scrollbars",y.getValue())},render:function(y){Ext.DomHelper.insertHtml("beforeBegin",y.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="PP-PATCH-status-line-'+v+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="PP-PATCH-status-col-'+v+'">-</span></s! pan></div> ')}}}],tbar:[{scope:this,tooltip:_("<b>Accept</b> this patch and <b>Save</b> the file"),iconCls:"saveFile",id:"PP-PATCH-PANEL-btn-save-"+v,handler:function(){this.saveFileViaPatch(v,o,q,x,w,this)}},{scope:this,tooltip:_("<b>Reject</b> this patch"),iconCls:"iconPageDelete",id:"PP-PATCH-PANEL-btn-reject-"+v,handler:function(){this.rejectPatch(v,o,q,x,w,this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("PP-PATCH-"+v).reIndentAll()}}]},{title:_("Original File: ")+o+q,originTitle:_("Original File: ")+o+q,collapsible:false,id:"PP-ORIGIN-PANEL-"+v,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"PP-ORIGIN-"+v,readOnly:true,listeners:{scope:this,initialize:function(y){this.getFile(v,o,q,"PP-ORIGIN-PANEL-","PP-ORIGIN-")},cmscroll:function(y){if(this.userConf.conf_patch_scrollbars==="true"){Ext.getCmp("PP-PATCH-"+v).scrollTo(y)}},cmcursormove:function(z){var y=Ext.util.JSO! N.decode(Ext.getCmp("PP-ORIGIN-"+v).getCursorPosition());Ext.get("PP-O RIGIN-status-line-"+v).dom.innerHTML=y.line;Ext.get("PP-ORIGIN-status-col-"+v).dom.innerHTML=y.caracter}}}],bbar:[{scope:this,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="PP-ORIGIN-status-line-'+v+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="PP-ORIGIN-status-col-'+v+'">-</span></span></div> '}],tbar:[{}]}]});Ext.getCmp("main-panel").setActiveTab("PP-"+v);if(Ext.getCmp("PP-"+v).getLayout().north.collapsedEl){Ext.getCmp("PP-"+v).getLayout().north.collapsedEl.addClass("x-layout-collapsed-east-patch-desc")}}else{Ext.getCmp("main-panel").setActiveTab("PP-"+v)}}}});h=new Ext.grid.GridPanel({store:this.storeNotInEn,loadMask:true,columns:[{id:"name",header:_("Files"),sortable:true,dataIndex:"name"},{header:_("Path"),dataIndex:"path",hidden:true}],view:new Ext.grid.GroupingView({forceFit:true,groupT! extTpl:'{[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(o,r,q,p){if(o.data.needcommit){return"file-need-commit"}}}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,rowcontextmenu:function(o,r,p){o.getSelectionModel().selectRow(r);if(!this.storeNotInEn.getAt(r).data.needcommit){var q=new Ext.menu.Menu({items:[{text:_("Remove this file"),iconCls:"iconDelete",scope:this,handler:function(){h.fireEvent("rowdblclick",o,r,p)}}]});q.showAt(p.getXY())}},rowdblclick:function(q,u,t){var r,o,s;r=this.storeNotInEn.getAt(u).data.path;o=this.storeNotInEn.getAt(u).data.name;function p(v){if(v==="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:r,FileName:o},success:fun! ction(w){var x=Ext.util.JSON.decode(w.responseText);Ext.getBody().unma sk();this.addToPendingCommit(x.id,this.userLang+r,o,"delete");this.storeNotInEn.getAt(u).set("needcommit",true)}})}}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."),p,this)}}});c=new Ext.grid.GridPanel({store:this.storePendingCommit,loadMask:true,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}],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(o,r,q,p){if(o.data.type==="upda! te"){return"file-needcommit-update"}if(o.data.type==="delete"){return"file-needcommit-delete"}if(o.data.type==="new"){return"file-needcommit-new"}}}),autoExpandColumn:"name",bodyBorder:false,listeners:{scope:this,rowcontextmenu:function(r,v,t){var q,s,o,u,p;q=this.storePendingCommit.getAt(v).data.type;s=this.storePendingCommit.getAt(v).data.path;o=this.storePendingCommit.getAt(v).data.name;r.getSelectionModel().selectRow(v);p={text:_("Commit..."),iconCls:"iconCommitFileCvs",scope:this,handler:function(){return false},disabled:(this.userLogin==="cvsread")?true:false,menu:new Ext.menu.Menu({items:[{text:_("...this file"),iconCls:"iconCommitFileCvs",scope:this,handler:function(){this.WinCommit(true,v)}},{text:_("...all files modified by me"),iconCls:"iconCommitFileCvs",scope:this,handler:function(){this.WinCommit(false,"","by me")}},{text:_("...all files modified"),iconCls:"iconCommitFileCvs",scope:this,handler:function(){this.WinCommit(false)}}]})};if(q==="delete"){u=new Ext.! menu.Menu({items:[{text:"<b>"+_("Cancel")+"<b>",iconCls:"iconPageDelet e",disabled:(this.userLogin==="cvsread")?true:false,scope:this,handler:function(){c.fireEvent("rowdblclick",r,v,t)}},"-",p]})}if(q==="update"){u=new Ext.menu.Menu({items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"PendingCommit",scope:this,handler:function(){c.fireEvent("rowdblclick",r,v,t)}},"-",{text:_("View Diff"),iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+v,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+v+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+v);Ext.get("diff_panel_"+v).mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Please, wait..."));XHR({url:"./php/controller.php",params:{task:"getDiff",FilePath:s,FileName:o},success:function(w){var x=Ext.util.JSON.decode(w.responseText);Ext.get("diff_content_"+v).dom.innerHTML=x.content;Ext.get("diff_panel_"+v)! .unmask()}})}},{text:_("Download the diff as a patch"),iconCls:"iconCommitFileCvs",scope:this,handler:function(){window.location.href="./php/controller.php?task=downloadPatch&FilePath="+s+"&FileName="+o}},"-",{text:_("Clear this change"),iconCls:"iconPageDelete",disabled:(this.userLogin==="cvsread")?true:false,scope:this,handler:function(){this.clearLocalChange(q,s,o,v,this)}},"-",p]})}u.showAt(t.getXY())},rowdblclick:function(q,t,s){var p,r,o;p=this.storePendingCommit.getAt(t).data.type;r=this.storePendingCommit.getAt(t).data.path;o=this.storePendingCommit.getAt(t).data.name;if(p==="update"){this.openFile(r,o)}if(p==="delete"){this.clearLocalChange(p,r,o,t,this)}}}});j=new Ext.grid.GridPanel({store:this.storeFilesNeedReviewed,loadMask:true,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}],view:new Ext.grid.GroupingView({forceFit:true,grou pTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',getRowClass:function(o,r,q,p){if(o.data.needcommit){return"file-need-commit"}},emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>"}),autoExpandColumn:"name",bodyBorder:false,tbar:[_("Filter: ")," ",new Ext.form.TwinTriggerField({id:"FNR-filter",validationEvent:false,validateOnBlur:false,trigger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",hideTrigger1:true,width:180,scope:this,enableKeyEvents:true,listeners:{keypress:function(p,o){if(o.getKey()==o.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();this.scope.storeFilesNeedReviewed.clearFilter()},onTrigger2Click:function(){var o=this.getValue();if(o==""||o.length<3){this.markInvalid(_("Your filter must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();this.scope.storeFilesNeedRevi! ewed.filter("maintainer",o)}})],listeners:{scope:this,rowcontextmenu:function(p,v,t){var o,r,u,q="",x="",w,s;p.getSelectionModel().selectRow(v);o=this.storeFilesNeedReviewed.getAt(v).data.path;r=this.storeFilesNeedReviewed.getAt(v).data.name;u=Ext.util.md5("FNR-"+this.userLang+o+r);if(this.storeFilesNeedReviewed.getAt(v).data.needcommit){q={text:_("View Diff"),iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getCmp("main-panel").add({xtype:"panel",id:"diff_panel_"+v,title:_("Diff"),tabTip:_("Diff"),closable:true,autoScroll:true,iconCls:"iconTabLink",html:'<div id="diff_content_'+v+'" class="diff-content"></div>'});Ext.getCmp("main-panel").setActiveTab("diff_panel_"+v);Ext.get("diff_panel_"+v).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.userLang+o,FileName:r},success:function(y){var z=Ext.util.JSON.decode(y.responseText);Ext.get("diff! _content_"+v).dom.innerHTML=z.content;Ext.get("diff_panel_"+v).unmask( )}})}}}w=o.split("/");if(w[1]==="reference"){x={text:String.format(_("Open all files about {0} extension"),w[2]),iconCls:"iconViewDiff",scope:this,handler:function(){Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+String.format(_("Open all files about {0} extension"),w[2])+". "+_("Please, wait..."));XHR({scope:this,url:"./php/controller.php",params:{task:"getAllFilesAboutExtension",ExtName:w[2]},success:function(y){var A=Ext.util.JSON.decode(y.responseText);this.filePendingOpen=[];for(var z=0;z<A.files.length;z=z+1){this.filePendingOpen[z]=[this.userLang+A.files[z].path,A.files[z].name]}this.openFile(this.filePendingOpen[0][0],this.filePendingOpen[0][1]);Ext.getBody().unmask()}})}}}s=new Ext.menu.Menu({scope:this,items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"FilesNeedReviewed",scope:this,handler:function(){j.fireEvent("rowdblclick",p,v,t)}},q,"-",x]});s.showAt(t.getXY())},rowdblclick:function(q,A,x){var p,r,u,w,y,o,v,t,s! ,B,z;p=this.storeFilesNeedReviewed.getAt(A).data.path;r=this.storeFilesNeedReviewed.getAt(A).data.name;u=this.storeFilesNeedReviewed.getAt(A).data.reviewed;w=this.storeFilesNeedReviewed.getAt(A).data.needcommit;y=Ext.util.md5("FNR-"+this.userLang+p+r);if(!Ext.getCmp("main-panel").findById("FNR-"+y)){o=new Ext.data.Store({autoLoad:(this.userConf.conf_reviewed_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:this.userLang+p,File:r},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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"}])});o.setDefaultSort("date","desc");v=new Ext.data.Store({autoLoad:(this.userConf.conf_reviewed_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"g! etLog",Path:"en"+p,File:r},reader:new Ext.data.JsonReader({root:"Items ",totalProperty:"nbItems",id:"id"},[{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"}])});v.setDefaultSort("date","desc");t=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(D){var C=D.getCount();if(C===2){return false}},rowselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNR-PANEL-btn-logLang-"+y).enable();Ext.get("FNR-PANEL-btn-logLang-"+y).frame("3F8538")}else{Ext.getCmp("FNR-PANEL-btn-logLang-"+y).disable()}},rowdeselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNR-PANEL-btn-logLang-"+y).enable();Ext.get("FNR-PANEL-btn-logLang-"+y).frame("3F8538")}else{Ext.getCmp("FNR-PANEL-btn-logLang-"+y).disable()}}}});s=new Ext.grid.GridPanel({store:o,loadMask:true,columns:[t,{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"))}],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:t,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:_("<b>View</b> the diff"),iconCls:"iconViewDiff",id:"FNR-PANEL-btn-logLang-"+y,disabled:true,handler:function(){var E,D,C;E=t.getSelections();D=E[0].data.revision;C=E[1].data.revision;this.winDiff(this.userLang+p,r,D,C)}},{scope:this,tooltip:_("<b>Load/Refresh</b> revisions"),iconCls:"refresh",id:"FNR-PANEL-btn-refreshlogLang-"+y,handler:function(){o.reload()}}]});B=new Ext.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(D){var C=D.getCount();if(C===2){return false}},rowselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNR-PANEL-btn-logEn-"+y).enable();! Ext.get("FNR-PANEL-btn-logEn-"+y).frame("3F8538")}else{Ext.getCmp("FNR -PANEL-btn-logEn-"+y).disable()}},rowdeselect:function(D){var C=D.getCount();if(C===2){Ext.getCmp("FNR-PANEL-btn-logEn-"+y).enable();Ext.get("FNR-PANEL-btn-logEn-"+y).frame("3F8538")}else{Ext.getCmp("FNR-PANEL-btn-logEn-"+y).disable()}}}});z=new Ext.grid.GridPanel({store:v,loadMask:true,columns:[B,{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"))}],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:B,view:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:_("<b>View</b> the diff"),iconCls:"iconViewDiff",id:"FNR-PANEL-btn-logEn-"+y,disabled:true,handler:function(){var E,D,C;E=B.getSelections();D=E[0].data.revision;C=E[1].data.revision;this.winDiff("en"+p,r,D,C)}},{scope:this,tooltip:_("<b>Load/R! efresh</b> revisions"),iconCls:"refresh",id:"FNR-PANEL-btn-refreshlogEn-"+y,handler:function(){v.reload()}}]});Ext.getCmp("main-panel").add({closable:true,title:r,originTitle:r,tabTip:String.format(_("Need Reviewed in: {0}"),p),iconCls:"iconTabNeedReviewed",id:"FNR-"+y,isModifiedLang:false,isModifiedEn:false,layout:"border",defaults:{collapsible:true,split:true},items:[{region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:this.userLang,items:[s]},{layout:"fit",title:"En",items:[z]}]}},{title:String.format(_("{0} File: "),this.userLang)+p+r,originTitle:String.format(_("{0} File: "),this.userLang)+p+r,collapsible:false,id:"FNR-LANG-PANEL-"+y,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"FNR-LANG-"+y,listeners:{scope:this,initialize:function(){this.getFile(y,this.userLang+p,r,"FNR-LA! NG-PANEL-","FNR-LANG-")},cmcursormove:function(D){var C=Ext.util.JSON. decode(Ext.getCmp("FNR-LANG-"+y).getCursorPosition());Ext.get("FNR-LANG-status-line-"+y).dom.innerHTML=C.line;Ext.get("FNR-LANG-status-col-"+y).dom.innerHTML=C.caracter},cmchange:function(F,D,E){var C=Ext.util.JSON.decode(Ext.getCmp("FNR-LANG-"+y).getCursorPosition());Ext.get("FNR-LANG-status-line-"+y).dom.innerHTML=C.line;Ext.get("FNR-LANG-status-col-"+y).dom.innerHTML=C.caracter;if(F!==27&&F!==33&&F!==34&&F!==37&&F!==38&&F!==39&&F!==40&&F!==17&&F!==16&&F!==67){if(!Ext.getCmp("FNR-"+y).isModifiedLang){Ext.getCmp("FNR-LANG-PANEL-"+y).setTitle(Ext.getCmp("FNR-LANG-PANEL-"+y).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp("FNR-"+y).setTitle(Ext.getCmp("FNR-"+y).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNR-LANG-PANEL-btn-save-"+y).enable();Ext.get("FNR-LANG-PANEL-btn-save-"+y).frame("3F8538");Ext.getCmp("FNR-LANG-PANEL-btn-saveas-"+y).enable();Ext.get("FNR-LANG-PANEL-btn-saveas-"+y).fra! me("3F8538");Ext.getCmp("FNR-"+y).isModifiedLang=true}}},cmscroll:function(C){if(this.userConf.conf_reviewed_scrollbars==="true"){Ext.getCmp("FNR-EN-"+y).scrollTo(C)}}}}],bbar:[{scope:this,xtype:"checkbox",hideLabel:true,checked:(this.userConf.conf_reviewed_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),name:"conf_reviewed_scrollbars",listeners:{scope:this,check:function(C){this.confUpdate("conf_reviewed_scrollbars",C.getValue())},render:function(C){Ext.DomHelper.insertHtml("beforeBegin",C.el.dom,'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="FNR-LANG-status-line-'+y+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="FNR-LANG-status-col-'+y+'">-</span></span></div> ')}}}],tbar:[{scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",id:"FNR-LANG-PANEL-btn-save-"+y,disabled:true,handler:function(){this.saveLangFile(y,p,r,"FNR",A,this! )}},{scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFil e",id:"FNR-LANG-PANEL-btn-saveas-"+y,disabled:true,handler:function(){this.savePatch(this.userLang,y,p,r,"FNR",this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("FNR-LANG-"+y).reIndentAll()}},this.menuMarkupLANG("FNR-LANG-"+y,this)]},{title:_("En File: ")+p+r,originTitle:_("En File: ")+p+r,collapsible:false,id:"FNR-EN-PANEL-"+y,region:"east",xtype:"form",height:"auto",width:575,items:[{xtype:"codemirror",id:"FNR-EN-"+y,listeners:{scope:this,initialize:function(){this.getFile(y,"en"+p,r,"FNR-EN-PANEL-","FNR-EN-")},cmchange:function(F,D,E){var C=Ext.util.JSON.decode(Ext.getCmp("FNR-EN-"+y).getCursorPosition());Ext.get("FNR-EN-status-line-"+y).dom.innerHTML=C.line;Ext.get("FNR-EN-status-col-"+y).dom.innerHTML=C.caracter;if(F!==27&&F!==33&&F!==34&&F!==37&&F!==38&&F!==39&&F!==40&&F!==17&&F!==16&&F!==67){if(!Ext.getCmp("FNR-"+y).isModifiedEn){Ext.getCmp("FNR-EN-PANEL-"+y).setTitle(Ext.getCmp("FNR-EN-PANEL-"+y).originTitle+'! <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp("FNR-"+y).setTitle(Ext.getCmp("FNR-"+y).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("FNR-EN-PANEL-btn-save-"+y).enable();Ext.get("FNR-EN-PANEL-btn-save-"+y).frame("3F8538");Ext.getCmp("FNR-EN-PANEL-btn-saveas-"+y).enable();Ext.get("FNR-EN-PANEL-btn-saveas-"+y).frame("3F8538");Ext.getCmp("FNR-"+y).isModifiedEn=true}}},cmscroll:function(C){if(this.userConf.conf_reviewed_scrollbars==="true"){Ext.getCmp("FNR-LANG-"+y).scrollTo(C)}},cmcursormove:function(D){var C=Ext.util.JSON.decode(Ext.getCmp("FNR-EN-"+y).getCursorPosition());Ext.get("FNR-EN-status-line-"+y).dom.innerHTML=C.line;Ext.get("FNR-EN-status-col-"+y).dom.innerHTML=C.caracter}}}],bbar:[{scope:this,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="FNR-EN-status-line-'+y+'! ">-</span></span> <span class="x-status-text-panel">'+_("Co l: ")+'<span id="FNR-EN-status-col-'+y+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",id:"FNR-EN-PANEL-btn-save-"+y,disabled:true,handler:function(){this.saveEnFile(y,p,r,"FNR",A,this)}},{scope:this,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",id:"FNR-EN-PANEL-btn-saveas-"+y,disabled:true,handler:function(){this.savePatch("en",y,p,r,"FNR",this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("FNR-EN-"+y).reIndentAll()}},this.menuMarkupEN("FNR-EN-"+y)]}]});Ext.getCmp("main-panel").setActiveTab("FNR-"+y)}else{Ext.getCmp("main-panel").setActiveTab("FNR-"+y)}}}});i=new Ext.grid.GridPanel({title:_("Summary"),iconCls:"flag-"+this.userLang,store:this.storeSummary,loadMask:true,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,d! ataIndex:"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"}],autoScroll:true,height:400,width:800,view:new Ext.grid.GridView({getRowClass:function(o,r,q,p){if(o.data.id===1){return"summary_1"}if(o.data.id===2){return"summary_2"}if(o.data.id===3){return"summary_3"}if(o.data.id===4){return"summary_4"}if(o.data.id===5){return"summary_5"}}}),listeners:{scope:this,render:function(o){o.store.load.defer(20,o.store)},rowdblclick:function(o,r,p){var q=o.store.getAt(r).data.id;if(q===1||q===2||q===3){Ext.getCmp("acc-need-update").expand()}}}});g=new Ext.grid.GridPanel({title:_("Translators"),iconCls:"iconTranslator",store:this.storeTranslators,loadMask:true,columns:[new Ext.grid.RowNumberer(),{id:"GridTransName",header:_("Name"),sortable:true,dataIndex:"name",summaryType:"count",summaryRend! erer:this.rendererTotalTranslator},{header:_("Email"),width:110,sortab le: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:this.rendererNumUptodate,dataIndex:"uptodate",summaryType:"sum"},{header:_("Old"),width:45,sortable:true,renderer:this.rendererSum,dataIndex:"old",summaryType:"sum"},{header:_("Critical"),width:60,sortable:true,renderer:this.rendererNumCritical,dataIndex:"critical",summaryType:"sum"},{header:_("Sum"),width:50,sortable:true,renderer:this.rendererSum,dataIndex:"sum",summaryType:"sum"}],plugins:[new Ext.ux.grid.GridSummary()],autoScroll:true,autoExpandColumn:"GridTransName",height:400,width:800,listeners:{scope:this,render:function(){this.storeTranslators.load.defer(20,this.storeTranslators)},rowdblclick:function(q,s,r){var o,p;q.getSelectionModel().selectRow(s);o=this.storeTranslators.getAt(s).data.email;p=this.storeTranslators.getAt(s).data.name;this.sendEmail(p,o)},rowcontextmenu:f! unction(q,t,r){var o,p,s;q.getSelectionModel().selectRow(t);o=this.storeTranslators.getAt(t).data.email;p=this.storeTranslators.getAt(t).data.name;s=new Ext.menu.Menu({id:"submenu",items:[{scope:this,text:"<b>"+String.format(_("Send an email to {0}"),p)+"</b>",iconCls:"iconSendEmail",handler:function(){this.sendEmail(p,o)}},"-",{scope:this,text:String.format(_("Send an email to the {0}"),"doc-"+this.userLang+"@lists.php.net"),iconCls:"iconSendEmail",handler:function(){this.sendEmail("Php Doc Team "+this.userLang,"doc-"+this.userLang+"@lists.php.net")}}]});s.showAt(r.getXY())}}});k=new Ext.grid.GridPanel({store:this.storeMailing,title:String.format(_("Mails from {0}"),"doc-"+this.userLang),iconCls:"home-mailing-title",loadMask:true,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:E! xt.util.Format.dateRenderer(_("Y-m-d, H:i"))}],autoScroll:true,height: 400,width:800,autoExpandColumn:"GridMailingTitle",sm:new Ext.grid.RowSelectionModel({singleSelect:true}),tbar:[{scope:this,tooltip:_("Refresh this grid"),iconCls:"refresh",handler:function(){this.storeMailing.reload()}}],listeners:{scope:this,render:function(){this.storeMailing.load.defer(20,this.storeMailing)},rowcontextmenu:function(o,r,p){var q;o.getSelectionModel().selectRow(r);q=new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+_("Open in a new Tab")+"</b>",iconCls:"openInTab",scope:this,handler:function(){k.fireEvent("rowdblclick",o,r,p)}},"-",{text:_("Refresh this grid"),iconCls:"refresh",scope:this,handler:function(){this.storeMailing.reload()}}]});q.showAt(p.getXY())},rowdblclick:function(p,t,r){var o,s,q;o=this.storeMailing.getAt(t).data.pubDate;s=this.storeMailing.getAt(t).data.link;q=this.storeMailing.getAt(t).data.title;this.NewTabMailing(o,s,q)}}});f=new Ext.grid.GridPanel({store:this.storeBugs,title:String.format(_("Open bugs for {0}"),"doc-"+this.userLang),i! conCls:"iconBugs",loadMask:true,columns:[{id:"GridBugTitle",header:"Title",sortable:true,dataIndex:"title"}],stripeRows:true,autoHeight:true,viewConfig:{emptyText:_("No open Bugs"),forceFit:true,enableRowBody:true,getRowClass:function(o,s,r,q){r.body='<p class="bug-desc">'+o.data.description+"</p>";return"x-grid3-row-expanded"}},autoExpandColumn:"GridBugTitle",sm:new Ext.grid.RowSelectionModel({singleSelect:true}),width:800,tbar:[{scope:this,tooltip:_("Refresh this grid"),iconCls:"refresh",handler:function(){this.storeBugs.reload()}}],listeners:{scope:this,render:function(){this.storeBugs.load.defer(20,this.storeBugs)},rowcontextmenu:function(o,r,p){var q;o.getSelectionModel().selectRow(r);q=new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+_("Open in a new Tab")+"</b>",iconCls:"openInTab",scope:this,handler:function(){f.fireEvent("rowdblclick",o,r,p)}},"-",{text:_("Refresh this grid"),iconCls:"refresh",scope:this,handler:function(){this.storeBugs.reload()}}]});q.showAt(p.! getXY())},rowdblclick:function(q,t,s){var o,p,r;o=this.storeBugs.getAt (t).data.id;p=this.storeBugs.getAt(t).data.link;r=this.storeBugs.getAt(t).data.title;this.NewTabBugs(o,p,r)}}});m={title:_("Graphics"),layout:"fit",autoHeight:true,iconCls:"home-graphic-title",html:'<div align="center" id="graph_container" style="width: 530px; height: 302px"><img id="graph_picture" src="" height="300"></div>',listeners:{afterlayout:function(){var o,q,p;o=Ext.get("graph_picture");q=Ext.get("graph_container");o.setVisibilityMode(Ext.Element.VISIBILITY);p=new Ext.LoadMask(q);o.on("load",function(){o.stopFx();p.hide();o.fadeIn({duration:2})});p.show();o.hide();o.dom.src="./php/controller.php?task=translationGraph"}}};this.treeAllFiles=new Ext.tree.TreePanel({animate:true,autoScroll:true,useArrows:true,loader:new Ext.tree.TreeLoader({dataUrl:"./php/controller.php",baseParams:{task:"getAllFiles"}}),enableDD:false,containerScroll:true,bodyBorder:false,tbar:[_("Search: ")," ",new Ext.form.TwinTriggerField({id:"AF-search",validationEvent:false,validateOnBlur:false,tr! igger1Class:"x-form-clear-trigger",trigger2Class:"x-form-search-trigger",hideTrigger1:true,width:180,scope:this,enableKeyEvents:true,listeners:{keypress:function(p,o){if(o.getKey()==o.ENTER){this.onTrigger2Click()}}},onTrigger1Click:function(){this.setValue("");this.triggers[0].hide();this.scope.treeAllFiles.root.setText(_("Repository"));this.scope.treeAllFiles.loader=new Ext.tree.TreeLoader({baseParams:{task:"getAllFiles"},dataUrl:"./php/controller.php"});this.scope.treeAllFiles.root.reload()},onTrigger2Click:function(){var o=this.getValue();if(o==""||o.length<3){this.markInvalid(_("Your search must contain at least 3 characters"));return}this.clearInvalid();this.triggers[0].show();this.scope.treeAllFiles.loader=new Ext.tree.TreeLoader({baseParams:{search:o,task:"getAllFiles"},dataUrl:"./php/controller.php"});this.scope.treeAllFiles.root.reload(function(){this.phpDoc.treeAllFiles.root.setText(String.format(_("Search result: {0}"),this.phpDoc.treeAllFiles.root.childNodes.le! ngth))})}})],listeners:{scope:this,contextmenu:function(u,x){var r,p,q ,o,z,s,y,w,v;u.select();if(u.attributes.type==="folder"||u.isRoot){if(u.isExpanded()){p={text:"<b>"+_("Collapse")+"</b>",iconCls:"iconFolderClose",scope:this,handler:function(){u.collapse()}}}else{p={text:"<b>"+_("Expand")+"</b>",iconCls:"iconFolderClose",scope:this,handler:function(){u.expand()}}}r=new Ext.menu.Menu({items:[p]});r.showAt(x.getXY())}else{if(u.attributes.type==="file"){if(u.attributes.from!=="search"){q=u.attributes.text;o=u.attributes.id;z=o.split("/");z.shift();z.shift();z.pop();s=z[0];z.shift();o=z.join("/")+"/";if(s==="en"){w=String.format(_("Open the same file in <b>{0}</b>"),Ext.util.Format.uppercase(this.userLang));v=this.userLang+"/"+o}else{w=String.format(_("Open the same file in <b>{0}</b>"),"EN");v="en/"+o}y={text:w,iconCls:"iconTabNeedReviewed",scope:this,handler:function(){this.openFile(v,q)}}}else{y=""}r=new Ext.menu.Menu({items:[{text:"<b>"+_("Edit in a new Tab")+"</b>",iconCls:"iconTabNeedReviewed",scope:this,handler:function(){this.treeAllFil! es.fireEvent("dblclick",u)}},y]});r.showAt(x.getXY())}}},dblclick:function(u,z){var r,p,o,A,C,y,w,s,q,x,B,v="";if(u.attributes.type==="file"){o=u.attributes.id;A=Ext.util.md5("AF-"+o);if(!Ext.getCmp("main-panel").findById("AF-"+A)){C=o.split("/");C.shift();C.shift();p=C[C.length-1];C.pop();r=C[0];o=C.join("/")+"/";if(r!=="en"){v=this.menuMarkupLANG("AF-FILE-"+A,this)}else{v=this.menuMarkupEN("AF-FILE-"+A)}y="xml";if(u.attributes.extension==="xml"){y="xml"}if(u.attributes.extension==="html"){y="html"}if(u.attributes.extension==="php"){y="php"}w=new Ext.data.Store({autoLoad:(this.userConf.conf_allfiles_displaylog==="true")?true:false,proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLog",Path:o,File:p},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},[{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:"c! ontent",mapping:"content"}])});w.setDefaultSort("date","desc");s=new E xt.grid.CheckboxSelectionModel({singleSelect:false,width:22,header:"",listeners:{beforerowselect:function(D){var t=D.getCount();if(t===2){return false}},rowselect:function(D){var t=D.getCount();if(t===2){Ext.getCmp("AF-PANEL-btn-log-"+A).enable();Ext.get("AF-PANEL-btn-log-"+A).frame("3F8538")}else{Ext.getCmp("AF-PANEL-btn-log-"+A).disable()}},rowdeselect:function(D){var t=D.getCount();if(t===2){Ext.getCmp("AF-PANEL-btn-log-"+A).enable();Ext.get("AF-PANEL-btn-log-"+A).frame("3F8538")}else{Ext.getCmp("AF-PANEL-btn-log-"+A).disable()}}}});q=new Ext.grid.GridPanel({store:w,id:"AF-PANEL-log-"+A,loadMask:true,columns:[s,{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"))}],autoScroll:true,autoExpandColumn:"content",bodyBorder:false,sm:s,vi! ew:new Ext.grid.GridView({forceFit:true}),tbar:[{scope:this,tooltip:"<b>View</b> the diff",iconCls:"iconViewDiff",id:"AF-PANEL-btn-log-"+A,disabled:true,handler:function(){var E,D,t;E=s.getSelections();D=E[0].data.revision;t=E[1].data.revision;this.winDiff(o,p,D,t)}},{scope:this,tooltip:"<b>Load/Refresh</b> revisions",iconCls:"refresh",id:"AF-PANEL-btn-refreshlog-"+A,handler:function(){w.reload()}}]});x={region:"west",xtype:"panel",layout:"fit",bodyBorder:false,title:"CvsLog",collapsed:true,width:375,items:{scope:this,xtype:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{autoScroll:true},items:[{layout:"fit",title:"Log",items:[q]}]}};B={title:_("File: ")+o+p,originTitle:_("File: ")+o+p,collapsible:false,id:"AF-PANEL-"+A,region:"center",xtype:"form",height:"auto",width:"auto",items:[{xtype:"codemirror",id:"AF-FILE-"+A,isModified:false,parser:y,listeners:{scope:this,initialize:function(){this.getFile(A,o,p,"AF-PANEL-","AF-FILE-")},cmchange:function(F,D,E){var t=Ext.util! .JSON.decode(Ext.getCmp("AF-FILE-"+A).getCursorPosition());Ext.get("AF -status-line-"+A).dom.innerHTML=t.line;Ext.get("AF-status-col-"+A).dom.innerHTML=t.caracter;if(F!==27&&F!==33&&F!==34&&F!==37&&F!==38&&F!==39&&F!==40&&F!==17&&F!==16&&F!==67){if(!Ext.getCmp("AF-FILE-"+A).isModified){Ext.getCmp("AF-PANEL-"+A).setTitle(Ext.getCmp("AF-PANEL-"+A).originTitle+' <span style="color:#ff0000; font-weight: bold;">['+_("modified")+"]</span>");Ext.getCmp("AF-"+A).setTitle(Ext.getCmp("AF-"+A).originTitle+' <t style="color:#ff0000; font-weight: bold;">*</t>');Ext.getCmp("AF-PANEL-btn-save-"+A).enable();Ext.get("AF-PANEL-btn-save-"+A).frame("3F8538");Ext.getCmp("AF-PANEL-btn-saveas-"+A).enable();Ext.get("AF-PANEL-btn-saveas-"+A).frame("3F8538");Ext.getCmp("AF-FILE-"+A).isModified=true}}},cmcursormove:function(){var t=Ext.util.JSON.decode(Ext.getCmp("AF-FILE-"+A).getCursorPosition());Ext.get("AF-status-line-"+A).dom.innerHTML=t.line;Ext.get("AF-status-col-"+A).dom.innerHTML=t.caracter}}}],bbar:[{scope:this,xtype:"panel",height:21,baseCls:"",bodyStyle:"paddi! ng-top:5px;",html:'<div style="display: inline;" class="x-statusbar"><span class="x-status-text-panel">'+_("Line: ")+'<span id="AF-status-line-'+A+'">-</span></span> <span class="x-status-text-panel">'+_("Col: ")+'<span id="AF-status-col-'+A+'">-</span></span></div> '}],tbar:[{scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",id:"AF-PANEL-btn-save-"+A,disabled:true,handler:function(){Ext.getCmp("AF-PANEL-btn-save-"+A).disable();Ext.getCmp("AF-FILE-"+A).isModified=false;Ext.getCmp("AF-PANEL-"+A).setTitle(Ext.getCmp("AF-PANEL-"+A).originTitle);Ext.getCmp("AF-"+A).setTitle(Ext.getCmp("AF-"+A).originTitle);var t=Ext.MessageBox.wait(_("Saving data..."));XHR({scope:this,url:"./php/controller.php",params:{task:"saveFile",filePath:o,fileName:p,fileLang:"all",fileContent:Ext.getCmp("AF-FILE-"+A).getCode()},success:function(D){var E=Ext.util.JSON.decode(D.responseText);u.getUI().addClass("modified");this.addToPendingCommit(E.id,o,p,"update");t.hid! e()},failure:function(D){t.hide();this.winForbidden()}})}},{scope:this ,tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",id:"AF-PANEL-btn-saveas-"+A,disabled:true,handler:function(){this.savePatch("all",A,o,p,"AF",this)}},"-",{tooltip:_("<b>Re-indent</b> all this file"),iconCls:"iconIndent",handler:function(){Ext.getCmp("AF-FILE-"+A).reIndentAll()}},v]};if(u.attributes.extension==="gif"||u.attributes.extension==="png"){B={xtype:"panel",layout:"fit",bodyStyle:"padding:5px 5px 0",html:'<img src="/data/'+this.userLogin+"/phpdoc-"+this.userLang+o+'" />'};x={}}Ext.getCmp("main-panel").add({closable:true,title:p,originTitle:p,tabTip:String.format(_("in {0}"),o),iconCls:"AllFiles",id:"AF-"+A,layout:"border",defaults:{collapsible:true,split:true},items:[B,x]});Ext.getCmp("main-panel").setActiveTab("AF-"+A)}else{Ext.getCmp("main-panel").setActiveTab("AF-"+A)}}}}});this.treeSort=new Ext.tree.TreeSorter(this.treeAllFiles,{folderSort:true});this.treeAllFilesRoot=new Ext.tree.AsyncTreeNode({text:_("Repository"),draggable:false,id:"/"});this.treeAllF! iles.setRootNode(this.treeAllFilesRoot);b=new Ext.menu.Menu({id:"mainMenu",items:[{scope:this,text:_("Refresh all data"),disabled:(this.userLogin==="cvsread")?true:false,iconCls:"refresh",handler:this.WinUpdate},{scope:this,text:_("Check Build"),disabled:(this.userLogin==="cvsread")?true:false,iconCls:"checkBuild",handler:this.WinCheckBuild},{scope:this,text:_("EN tools"),handler:function(){return false},menu:new Ext.menu.Menu({items:[{scope:this,text:_("Translation build status"),iconCls:"BuildStatus",handler:this.newTabBuildStatus},{scope:this,text:_("Script Check doc"),iconCls:"CheckDoc",handler:this.newTabCheckDoc}]})},"-",{scope:this,text:_("Configure"),iconCls:"iconConf",tooltip:"<b>Configure</b> this tool",id:"winconf-btn",handler:this.WinConf},"-",{scope:this,text:_("Erase my personal data"),disabled:(this.userLogin==="cvsread")?true:false,iconCls:"iconErasePersonalData",handler:function(){Ext.MessageBox.confirm(_("Confirm"),_("This action will erase your personal d! ata. All content about this account will be deleted definitively. Are you sure you want to do that ?"),function(o){if(o==="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:"erasePersonalData"},success:function(p){Ext.getBody().unmask();var q=Ext.util.JSON.decode(p.responseText);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(p){this.winForbidden()}})}},this)}},"-",{text:_("Log out"),iconCls:"iconLogOut",handler:function(){Ext.MessageBox.confirm(_("Confirm"),_("Are you sure you want to logout?"),function(o){if(o==="yes"){window.location.href="./php/controller.php?task=logout"}})}},"-",{scope:this,text:_("About"),iconCls:"iconHelp",id:"winabout-btn",handler:function(){this.WinAbout()}}]});if(this.userLang==="en"){e=[k]}else{e=[i,g,k,f,m]}d=ne! w 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:[{title:_("Files Need Update")+' - <em id="acc-need-update-nb">0</em>',id:"acc-need-update",layout:"fit",iconCls:"FilesNeedUpdate",hidden:(this.userLang==="en")?true:false,items:[n],collapsed:true,listeners:{expand:function(o){Ext.getCmp("FNU-filter").wrap.setWidth(200)}}},{title:_("Error in current translation")+' - <em id="acc-error-nb">0</em>',id:"acc-error",layout:"fit",iconCls:"FilesError",hidden:(this.userLang==="en")?true:false,items:[l],collapsed:true,listeners:{expand:function(o){Ext.getC! mp("FE-filter").wrap.setWidth(200)}}},{title:_("Files Need Reviewed")+ ' - <em id="acc-need-reviewed-nb">0</em>',id:"acc-need-reviewed",layout:"fit",iconCls:"FilesNeedReviewed",hidden:(this.userLang==="en")?true:false,items:[j],collapsed:true,listeners:{expand:function(o){Ext.getCmp("FNR-filter").wrap.setWidth(200)}}},{title:_("Not in EN tree")+' - <em id="acc-notInEn-nb">0</em>',id:"acc-notInEn",layout:"fit",iconCls:"NotInEn",hidden:(this.userLang==="en")?true:false,items:[h],collapsed:true},{title:_("All files"),id:"acc-all-files",layout:"fit",iconCls:"AllFiles",items:[this.treeAllFiles],collapsed:true,listeners:{expand:function(o){Ext.getCmp("AF-search").wrap.setWidth(200)}}},{title:_("Pending for commit")+' - <em id="acc-pendingCommit-nb">0</em>',id:"acc-need-pendingCommit",layout:"fit",iconCls:"PendingCommit",items:[c],collapsed:true},{title:_("Pending Patch")+' - <em id="acc-pendingPatch-nb">0</em>',id:"acc-need-pendingPatch",layout:"fit",iconCls:"PendingPatch",items:[a],collapsed:true}]}]},{region:"center",xtype:"tabpanel",id:"main-panel! ",activeTab:0,enableTabScroll:true,layoutOnTabChange:true,plugins:new Ext.ux.TabCloseMenu(),listeners:{scope:this,beforeremove:this.removeTabEvent},items:[{title:_("Home"),baseCls:"MainInfoTabPanel",xtype:"panel",autoScroll:true,id:"MainInfoTabPanel",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,defaults:{border:true},items:e}]}]}]});Ext.get("loading").remove();Ext.fly("loading-mask").fadeOut({remove:true});if(directAccess){this.openFile(directAccess.lang+directAccess.path,directAccess.name)}}}}();Ext.EventManager.onDocumentReady(phpDoc.init,phpDoc,true); \ No newline at end of file http://cvs.php.net/viewvc.cgi/doc-editor/index.php?r1=1.12&r2=1.13&diff_format=u Index: doc-editor/index.php diff -u doc-editor/index.php:1.12 doc-editor/index.php:1.13 --- doc-editor/index.php:1.12 Tue Apr 14 21:31:34 2009 +++ doc-editor/index.php Tue Jun 2 05:08:35 2009 @@ -14,6 +14,7 @@ echo jsCallTemplate('document.getElementById("loading-msg").innerHTML = "Loading UI Components...";'); echo jsLoadTemplate('js/extjs/ext-all.js'); echo jsCallTemplate('document.getElementById("loading-msg").innerHTML = "Initializing...";'); + echo jsLoadTemplate('js/util.js'); // TODO: REMOVE AFTER USING YUI-COMPRESSOR echo jsLoadTemplate('js/login_override.js'); echo jsLoadTemplate('js/login.js'); echo footerTemplate(); @@ -43,7 +44,8 @@ // Main app echo jsLoadi18nTemplate(); echo jsLoadTemplate('js/main_override.js'); -echo jsLoadTemplate('js/main.js'); +//~ echo jsLoadTemplate('js/main.js'); +echo jsLoadTemplate('js/main_min.js'); if (isset($_SESSION['directAccess']) && is_object($_SESSION['directAccess'])) { $directAccess = 'var directAccess = {"lang":"'.$_SESSION['directAccess']->lang.'", "path":"'.$_SESSION['directAccess']->path.'", "name":"'.$_SESSION['directAccess']->name.'"}'; @@ -53,4 +55,5 @@ } echo jsCallTemplate($directAccess); -echo footerTemplate(); \ No newline at end of file +echo footerTemplate(); + http://cvs.php.net/viewvc.cgi/doc-editor/TODO?r1=1.8&r2=1.9&diff_format=u Index: doc-editor/TODO diff -u doc-editor/TODO:1.8 doc-editor/TODO:1.9 --- doc-editor/TODO:1.8 Sat Apr 18 09:18:45 2009 +++ doc-editor/TODO Tue Jun 2 05:08:35 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.8 $ keyword (in comments, about popup, ..) +* Use the $Revision: 1.9 $ 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) @@ -45,6 +45,7 @@ * Clean up the namespaces * Split main.js to several objects & files (to be discussed) +* Use Object in FilePendingOpen Queue instead of Array * Implement RTL where appropriate USER INTERFACE: http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/BuildStatus.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/BuildStatus.js +++ doc-editor/js/ui/component/BuildStatus.js Ext.namespace('ui','ui.component','ui.component._BuildStatus'); //------------------------------------------------------------------------------ // BuildStatus Internals // BuildStatus Grid datastore 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'); // BuildStatus Grid language cell renderer ui.component._BuildStatus.rendererLanguage = function(value) { return '<div class="flag flag-' + value + '">' + value + '</div>'; } // BuildStatus Grid status cell renderer ui.component._BuildStatus.rendererStatus = function(value) { if (value === 0) { return 'Nok'; } else { return 'Ok'; } } // BuildStatus Grid columns definition 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 } ]; //------------------------------------------------------------------------------ // BuildStatus Grid 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(record, numIndex, rowParams, store) { if (record.data.status === 0) { return 'summary_3'; } } }), listeners : { scope : this, render : function(grid) { grid.store.load.defer(20, grid.store); } } }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/CheckDoc.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/CheckDoc.js +++ doc-editor/js/ui/component/CheckDoc.js Ext.namespace('ui','ui.component','ui.component._CheckDoc'); //------------------------------------------------------------------------------ // CheckDoc Internals // CheckDoc Grid datastore ui.component._CheckDoc.ds = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ url : './php/controller.php' }), baseParams : { task : 'getCheckDocData' }, reader : new Ext.data.JsonReader( { root : 'Items', totalProperty : 'nbItems', id : 'id' }, Ext.data.Record.create([ { name : 'id', mapping : 'id' }, { name : 'path', mapping : 'path' }, { name : 'extension', mapping : 'extension' }, { name : 'check_oldstyle', mapping : 'check_oldstyle', type : 'int' }, { name : 'check_undoc', mapping : 'check_undoc', type : 'int' }, { name : 'check_roleerror', mapping : 'check_roleerror', type : 'int' }, { name : 'check_badorder', mapping : 'check_badorder', type : 'int' }, { name : 'check_noseealso', mapping : 'check_noseealso', type : 'int' }, { name : 'check_noreturnvalues', mapping : 'check_noreturnvalues', type : 'int' }, { name : 'check_noparameters', mapping : 'check_noparameters', type : 'int' }, { name : 'check_noexamples', mapping : 'check_noexamples', type : 'int' }, { name : 'check_noerrors', mapping : 'check_noerrors', type : 'int' } ]) ) }); ui.component._CheckDoc.ds.setDefaultSort('extension', 'asc'); // CheckDoc Grid non-extension cell renderer ui.component._CheckDoc.renderer = function(value, metadata) { if (value > 0) { metadata.css = 'check_doc_cell'; return value; } else { return; } } // CheckDoc Grid columns definition 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 } ]; // CheckDoc File-Win Grid datastore ui.component._CheckDoc.fs = new Ext.data.SimpleStore({ fields: [{ name: 'id' }, { name: 'file' }] }); // CheckDoc Internal File-Win Grid // config::filepath - path to files in File-Win 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(sm, rowIndex, record) { 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(grid, rowIndex, e) { grid.getSelectionModel().selectRow(rowIndex); }, rowdblclick : function(grid, rowIndex, e) { phpDoc.openFile( 'en' + grid.filepath, grid.store.getAt(rowIndex).data.file ); Ext.getCmp('check-doc-file-win').close(); } } }); // CheckDoc Internal File-Win // config::filepath - path to files in File-Win 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 : [{ /* scope : this, Note: scope does not work here */ text : 'Open all files', handler : function() { var win = Ext.getCmp('check-doc-file-win'), store = ui.component._CheckDoc.fs; //~ TODO - use Object in FilePendingOpen-Queue instead of Array phpDoc.filePendingOpen = []; for (var i = 0; i < store.getCount(); ++i) { phpDoc.filePendingOpen[i] = [ 'en' + win.filepath, store.getAt(i).data.file ]; } phpDoc.openFile( phpDoc.filePendingOpen[0][0], phpDoc.filePendingOpen[0][1] ); win.close(); } }, { /* scope : this, Note: scope does not work here */ text : 'Open selected files', id : 'check-doc-btn-open-selected-files', disabled : true, handler : function() { var win = Ext.getCmp('check-doc-file-win'), r = Ext.getCmp('check-doc-file-grid') .getSelectionModel() .getSelections(); phpDoc.filePendingOpen = []; for (var i = 0; i < r.length; ++i) { phpDoc.filePendingOpen[i] = [ 'en' + win.filepath, r[i].data.file ]; } phpDoc.openFile( phpDoc.filePendingOpen[0][0], phpDoc.filePendingOpen[0][1] ); win.close(); } }] }); //------------------------------------------------------------------------------ // CheckDoc Grid 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(grid) { // on render, load data grid.store.load.defer(20, grid.store); }, celldblclick : function(grid, rowIndex, columnIndex, e) { var record = grid.getStore().getAt(rowIndex), errorType = grid.getColumnModel().getDataIndex(columnIndex), data = record.get(errorType), filepath = record.data.path; if (Ext.num(data, false) && data != 0) { // get checkdoc file via XHR // TODO - may change to use HttpProxy for DataStore // remove XHR, win.open() and load from proxy XHR({ url : './php/controller.php', params : { task : 'getCheckDocFiles', path : filepath, errorType : errorType }, success : function(response) { // Must choose the file var o = Ext.decode(response.responseText); // file store ui.component._CheckDoc.fs.removeAll(); for (var i = 0; i < o.files.length; ++i) { ui.component._CheckDoc.fs.insert( 0, new ui.component._CheckDoc.fs.recordType({ id : i, file : o.files[i].name }) ); } ui.component._CheckDoc.fs.sort('file', 'asc'); new ui.component._CheckDoc.FileWin({ filepath : filepath, items : [ new ui.component._CheckDoc.FileGrid({ filepath : filepath }) ] }).show(); } }); } // data is not empty } } }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/EditorConf.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/EditorConf.js +++ doc-editor/js/ui/component/EditorConf.js Ext.namespace('ui','ui.component','ui.component._EditorConf'); //------------------------------------------------------------------------------ // EditorConf Win internals // EditorConf Win-Menu template 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(); // EditorConf Win-Menu items definition for EN 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"')] ]; // EditorConf Win-Menu items definition for Non-EN 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"')] ]; // EditorConf Win-Menu items store ui.component._EditorConf.menuStore = new Ext.data.SimpleStore({ id : 0, fields : [ { name : 'id' }, { name : 'img' }, { name : 'label' } ] }); // EditorConf Win-Menu view 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(view, select) { var r = view.getSelectedRecords(); Ext.getCmp('confCard').layout.setActiveItem('conf-card-' + r[0].data.id); } } }); // doc-editor Theme datastore 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')] ] }); // EditorConf card1 - Theme Config ui.component._EditorConf.card1 = Ext.extend(Ext.form.FormPanel, { id : 'conf-card-1', bodyStyle : 'padding: 10px;', initComponent : function() { Ext.apply(this, { items : [{ xtype : 'fieldset', title : _('Themes'), autoHeight : true, defaults : { hideLabel: true }, items : [{ xtype : 'combo', id : 'conf-combo-theme', valueField : 'themeFile', displayField : 'themeName', triggerAction : 'all', mode : 'local', forceSelection : true, editable : false, value : phpDoc.userConf.conf_theme, store : ui.component._EditorConf.themeStore, listeners : { render : function() { Ext.getCmp('conf-combo-theme').store.sort('themeName'); }, select : function(c, record, numIndex) { var hrefTheme = c.getValue(); Ext.get('appTheme').dom.href = hrefTheme; phpDoc.confUpdate('conf_theme', hrefTheme); } } }] }] }); ui.component._EditorConf.card1.superclass.initComponent.call(this); } }); // EditorConf card2 - Module "Files Need Update" Config 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(field) { if (field.checked) { phpDoc.confUpdate('conf_needupdate_diff', field.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(field) { if (field.checked) { phpDoc.confUpdate('conf_needupdate_diff', field.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(field) { phpDoc.confUpdate('conf_needupdate_scrollbars', field.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(field) { phpDoc.confUpdate('conf_needupdate_displaylog', field.getValue()); } } }] }] }); ui.component._EditorConf.card2.superclass.initComponent.call(this); } }); // EditorConf card3 - Module "Files with Error" Config ui.component._EditorConf.card3 = Ext.extend(Ext.form.FormPanel, { id : 'conf-card-3', bodyStyle : 'padding: 10px;', initComponent : function() { Ext.apply(this, { items : [{ xtype : 'fieldset', title : _('Error type'), autoHeight : true, defaults : { hideLabel: true }, defaultType : 'checkbox', items : [{ name : 'conf_error_skipnbliteraltag', checked : (phpDoc.userConf.conf_error_skipnbliteraltag === "true") ? true : false, boxLabel : _('Skip nbLiteralTag error'), listeners : { check : function(field) { phpDoc.confUpdate('conf_error_skipnbliteraltag', field.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(field) { phpDoc.confUpdate('conf_error_scrollbars', field.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(field) { phpDoc.confUpdate('conf_error_displaylog', field.getValue()); } } }] }] }); ui.component._EditorConf.card3.superclass.initComponent.call(this); } }); // EditorConf card4 - Module "Files need Reviewed" Config 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(field) { phpDoc.confUpdate('conf_reviewed_scrollbars', field.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(field) { phpDoc.confUpdate('conf_reviewed_displaylog', field.getValue()); } } }] }] }); ui.component._EditorConf.card4.superclass.initComponent.call(this); } }); // EditorConf card5 - Module "All files" Config 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(field) { phpDoc.confUpdate('conf_allfiles_displaylog', field.getValue()); } } }] }] }); ui.component._EditorConf.card5.superclass.initComponent.call(this); } }); // EditorConf card6 - Module "Pending Patch" Config 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(field) { phpDoc.confUpdate('conf_patch_scrollbars', field.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(field) { phpDoc.confUpdate('conf_patch_displaylog', field.getValue()); } } }] }] }); ui.component._EditorConf.card6.superclass.initComponent.call(this); } }); //------------------------------------------------------------------------------ // EditorConf Win 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 view = Ext.getCmp('conf-menu-view'); view.select(view.getNode(0)); } }, initComponent : function() { if (phpDoc.userLang === 'en') { ui.component._EditorConf.menuStore.loadData(ui.component._EditorConf.menuDefEn); } else { ui.component._EditorConf.menuStore.loadData(ui.component._EditorConf.menuDefNonEn); } Ext.apply(this, { items : [{ id : 'confMenu', region : 'west', width : 190, autoScroll : true, items : [new ui.component._EditorConf.viewMenu()] }, { id : 'confCard', region : 'center', layout : 'slide', width : 375, frame : true, activeItem : 0, bbar : new Ext.StatusBar({ defaultText : _('All changes take effect immediately'), defaultIconCls : 'confStatusBar' }), items : [ new ui.component._EditorConf.card1(), new ui.component._EditorConf.card2(), new ui.component._EditorConf.card3(), new ui.component._EditorConf.card4(), new ui.component._EditorConf.card5(), new ui.component._EditorConf.card6() ] }] }); ui.component.EditorConf.superclass.initComponent.call(this); } }); http://cvs.php.net/viewvc.cgi/doc-editor/scripts/utils/compress-js.sh?view=markup&rev=1.1 Index: doc-editor/scripts/utils/compress-js.sh +++ doc-editor/scripts/utils/compress-js.sh pushd ../.. cat js/util.js js/ui/component/*.js js/main.js | java -jar scripts/utils/yuicompressor.jar --type js --verbose -o js/main_min.js popd