cvs: doc-editor / README TODO /js main.js main_min.js /js/ui PingTask.js /js/ui/component About.js BugsGrid.js LocalMailGrid.js SummaryGrid.js
TranslationGraph.js TranslatorGrid.js

From: Date: Thu, 04 Jun 2009 07:12:32 +0000
Subject: cvs: doc-editor / README TODO /js main.js main_min.js /js/ui PingTask.js /js/ui/component About.js BugsGrid.js LocalMailGrid.js SummaryGrid.js
TranslationGraph.js TranslatorGrid.js
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-4111@lists.php.net to get a copy of this message
mrkschan Thu Jun 4 07:12:32 2009 UTC Added files: /doc-editor/js/ui/component About.js BugsGrid.js LocalMailGrid.js SummaryGrid.js TranslationGraph.js TranslatorGrid.js /doc-editor/js/ui PingTask.js Modified files: /doc-editor/js main.js main_min.js /doc-editor README TODO Log: modification/fix: * included js/ui/*.js for compression * added GDLib as requirement for using jpgraph * inserted todo list item - decide whether using XHR abstraction main.js cleanup: * the keep-session-alive task ping is now wrapped in js/ui/PingTask.js * the doc-editor about box is now wrapped in js/ui/component/About.js * main-panel summary grid is now wrapped in js/ui/component/SummaryGrid.js * main-panel translator grid is now wrapped in js/ui/component/TranslatorGrid.js * main-panel local mailing list grid is now wrapped in js/ui/component/LocalMailGrid.js * main-panel php-doc bugs grid is now wrapped in js/ui/component/BugsGrid.js * main-panel translation summary graph is now wrapped in js/ui/component/TranslationGraph.js * cleanup phpDoc namespace - storeMailing is now under LocalMailGrid namespace - storeBugs is now under BugsGrid namespace - storeTranslators is now under TranslatorGrid namespace + reflect changes in script that depends on storeTranslators - storeSummary is now under SummaryGrid namespace + reflect changes in script that depends on storeSummary

http://cvs.php.net/viewvc.cgi/doc-editor/js/main.js?r1=1.60&r2=1.61&diff_format=u Index: doc-editor/js/main.js diff -u doc-editor/js/main.js:1.60 doc-editor/js/main.js:1.61 --- doc-editor/js/main.js:1.60 Tue Jun 2 05:08:35 2009 +++ doc-editor/js/main.js Thu Jun 4 07:12:32 2009 @@ -16,17 +16,12 @@ storePendingCommit: '', storePendingPatch: '', - storeMailing: '', - storeBugs: '', - storeTranslators: '', - storeSummary: '', - // Variable userLogin: '', userLang: '', appName: 'PhpDocumentation Online Editor', appVer: '0.2', - uiRevision: '$Revision: 1.60 $', + uiRevision: '$Revision: 1.61 $', userConf: { 'conf_needupdate_diff': 'using-exec', @@ -55,8 +50,8 @@ filePendingOpen: '', - init: function(){ - + init : function() + { // Stop default contextmenu on all this app Ext.getBody().on('contextmenu', function(e){ e.stopEvent(); @@ -531,178 +526,6 @@ } } }); - - // Store : Mailing with Informations about phpdoc-LANG mailing - this.storeMailing = new Ext.data.Store({ - //autoLoad: true, - proxy: new Ext.data.HttpProxy({ - url: './php/controller.php' - }), - baseParams: { - task: 'getLastNews' - }, - 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'); - - // Store : All open bugs for documentation - 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' - }]) - }); - - // Store : Translator with Informations like Revcheck first table - 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'); - - // Store : storeSummary with Informations like Revcheck second table - 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(record) { - - if( record.id === 1 ) { - record.set('libel', _('Up to date files')); - } - if( record.id === 2 ) { - record.set('libel', _('Old files')); - } - if( record.id === 3 ) { - record.set('libel', _('Critical files')); - } - if( record.id === 4 ) { - record.set('libel', _('Files without revision tag')); - } - if( record.id === 5 ) { - record.set('libel', _('Files available for translation')); - } - if( record.id === 6 ) { - record.set('libel', _('Total')); - } - record.commit(); - - }, this); - - - }, this); - - },// loadDataStore newTabCheckDoc : function() @@ -1492,53 +1315,29 @@ } }, //addToPendingCommit - // Custom renderer - rendererNumUptodate: function(val){ - if (val === '0') { - return; - } - else { - return '<span style="color:green; font-weight: bold;">' + val + '</span>'; - } - }, - - rendererNumCritical: function(val){ - if (val === '0') { - return; - } - else { - return '<span style="color:red; font-weight: bold;">' + val + '</span>'; - } - }, - - rendererTotalTranslator: function(v, params, data){ - return v ? ((v === 0 || v > 1) ? '(' + v + ' Translators)' : '(1 Translator)') : ''; - }, - - rendererSum: function(v){ - return (v === '0') ? '' : v; - }, - - NewTabBugs: function(BugsId, BugsUrl, BugsTitle){ + NewTabBugs : function(BugsId, BugsUrl, BugsTitle) + { Ext.getCmp('main-panel').add({ - xtype: 'iframepanel', - id: 'mifp_bugs_' + BugsId, - title: _('Loading...'), - tabTip: BugsTitle, - iconCls: 'iconBugs', - loadMask: true, - defaultSrc: BugsUrl, - listeners: { - 'documentloaded': function(frame){ + id : 'mifp_bugs_' + BugsId, + xtype : 'iframepanel', + title : _('Loading...'), + tabTip : BugsTitle, + iconCls : 'iconBugs', + loadMask : true, + defaultSrc : BugsUrl, + listeners : { + 'documentloaded' : function(frame) + { frame.ownerCt.setTitle(Ext.util.Format.substr(BugsTitle, 0, 20) + '...'); } } }); Ext.getCmp('main-panel').setActiveTab('mifp_bugs_' + BugsId); - }, //NewTabBugs - NewTabMailing: function(MailId, MailUrl, MailTitle){ + }, + NewTabMailing: function(MailId, MailUrl, MailTitle) + { Ext.getCmp('main-panel').add({ xtype: 'iframepanel', id: 'mifp_' + MailId, @@ -2088,10 +1887,10 @@ scope.storePendingCommit.reload(); // Reload translators data - scope.storeTranslators.reload(); + ui.component.TranslatorGrid.reload(); // Reload summary data - scope.storeSummary.reload(); + ui.component.SummaryGrid.reload(); Ext.getBody().unmask(); } @@ -2237,7 +2036,7 @@ if (scope.userLang != 'en') { // Reload all data on this page scope.storeFilesNeedUpdate.reload(); - scope.storeTranslators.reload(); + ui.component.TranslatorGrid.reload(); scope.storeFilesError.reload(); } @@ -2543,56 +2342,12 @@ }); }, //confUpdate - WinAbout: function(){ - - var winAbout; - - if (!winAbout) { - winAbout = new Ext.Window({ - layout: 'fit', - width: 515, - height: 320, - iconCls: 'iconHelp', - modal: true, - title: String.format(_('About {0}'),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="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 &copy; 2008-2009 The PHP Group<br/>'+_('Author:')+' <a href="mailto:yannick@php.net">Yannick Torr&egrave;s</a> '+ _('and <a href="http://cvs.php.net/viewvc.cgi/doc-editor/" target="_blank">others</a>')+'</div>' - }, { - title: _('Credits'), - bodyStyle: 'padding:15px', - html: '<div id="phd-oe-credit"><ul>' + - '<li><a href="http://extjs.com" target="_blank">ExtJs Team</a><div class="phd-oe-credit-info">'+_('Javascript FrameWork')+'</div></li>' + - '<li><a href="http://marijn.haverbeke.nl/codemirror/" target="_blank">CodeMirror</a><div class="phd-oe-credit-info">'+_('Code editor')+'</div></li>' + - '<li><a href="http://famfamfam.com" target="_blank">famfamfam.com</a><div class="phd-oe-credit-info">'+_('Icon pack')+'</div></li>' + - '</ul></div>' - }, { - title: _('License'), - autoLoad: { - url: './LICENSE' - } - }] - }), - buttons: [{ - text: _('Close'), - handler: function(){ - winAbout.hide(); - } - }] - }); - } - winAbout.show(Ext.get('winabout-btn')); + WinAbout : function() + { + new ui.component.About() + .show(Ext.get('winabout-btn')); }, //WinAbout + sendEmail: function(TranslatorName, TranslatorEmail){ var form, win; @@ -2667,43 +2422,13 @@ win.show(); }, //sendEmail - drawInterface: function(){ + drawInterface: function() + { var gridFilesError, gridFilesNeedUpdate, gridPendingPatch, gridPendingCommit, gridFilesNeedReviewed, gridSummary, gridTranslators, gridMailing, gridNotInEn, gridBugs, graphPanel, mainMenu, MainWindow, mainContent; // We keel alive our session by sending a ping every minute - this.TaskPing = new Ext.util.DelayedTask(function(){ - - XHR({ - url : './php/controller.php', - params : { - task : 'ping' - }, - success : function(response) - { - var o = Ext.util.JSON.decode(response.responseText); - if (o.ping !== 'pong') { - window.location.href = './'; - } else { - - if( o.lastupdate === 'in_progress' ) { - Ext.getDom('lastUpdateTime').innerHTML = _('update in progress...'); - } else { - var dt = Date.parseDate(o.lastupdate, "Y-m-d H:i:s"); - - // We update the lastupdate date/time - Ext.getDom('lastUpdateTime').innerHTML = dt.format(_('Y-m-d, H:i')); - } - } - }, - failure: function() - { - window.location.href = './'; - } - }); - - this.TaskPing.delay(30000); - }, this); + this.TaskPing = new ui.PingTask(); this.TaskPing.delay(30000); // start after 1 minute. @@ -5625,383 +5350,11 @@ } }); - gridSummary = 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: '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(record, numIndex, rowParams, store){ - if (record.data.id === 1) { - return 'summary_1'; - } - if (record.data.id === 2) { - return 'summary_2'; - } - if (record.data.id === 3) { - return 'summary_3'; - } - if (record.data.id === 4) { - return 'summary_4'; - } - if (record.data.id === 5) { - return 'summary_5'; - } - } - }), - listeners: { - scope: this, - render: function(grid){ - grid.store.load.defer(20, grid.store); - }, - rowdblclick: function ( grid, rowIndex, e ) { - var id = grid.store.getAt(rowIndex).data.id; - - //Up to date files, Old files, Criticals files - if( id === 1 || id === 2 || id === 3) { - Ext.getCmp('acc-need-update').expand(); - } - - } - } - }); - - gridTranslators = 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', - 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(grid, rowIndex, e){ - - var TranslatorEmail, TranslatorName; - - grid.getSelectionModel().selectRow(rowIndex); - - TranslatorEmail = this.storeTranslators.getAt(rowIndex).data.email; - TranslatorName = this.storeTranslators.getAt(rowIndex).data.name; - - this.sendEmail(TranslatorName, TranslatorEmail); - }, - rowcontextmenu: function(grid, rowIndex, e){ - - var TranslatorEmail, TranslatorName, menu; - - grid.getSelectionModel().selectRow(rowIndex); - - TranslatorEmail = this.storeTranslators.getAt(rowIndex).data.email; - TranslatorName = this.storeTranslators.getAt(rowIndex).data.name; - - menu = new Ext.menu.Menu({ - id: 'submenu', - items: [{ - scope: this, - text: '<b>'+String.format(_('Send an email to {0}'), TranslatorName) + '</b>', - iconCls: 'iconSendEmail', - handler: function(){ - this.sendEmail(TranslatorName, TranslatorEmail); - } - }, '-', { - 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'); - } - }] - }); - - menu.showAt(e.getXY()); - } - } - }); - - gridMailing = 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: 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.defer(20, this.storeMailing); - }, - rowcontextmenu: function(grid, rowIndex, e){ - - var menu; - - grid.getSelectionModel().selectRow(rowIndex); - - menu = new Ext.menu.Menu({ - id: 'submenu', - items: [{ - text: '<b>'+_('Open in a new Tab')+'</b>', - iconCls: 'openInTab', - scope: this, - handler: function(){ - gridMailing.fireEvent('rowdblclick', grid, rowIndex, e); - } - }, '-', { - text: _('Refresh this grid'), - iconCls: 'refresh', - scope: this, - handler: function(){ - this.storeMailing.reload(); - } - }] - }); - - menu.showAt(e.getXY()); - - }, - rowdblclick: function(grid, rowIndex, e){ - - var MailId, MailUrl, MailTitle; - - MailId = this.storeMailing.getAt(rowIndex).data.pubDate; - MailUrl = this.storeMailing.getAt(rowIndex).data.link; - MailTitle = this.storeMailing.getAt(rowIndex).data.title; - - this.NewTabMailing(MailId, MailUrl, MailTitle); - } - } - }); - - gridBugs = new Ext.grid.GridPanel({ - store: this.storeBugs, - title: String.format(_('Open bugs for {0}'), '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(record, rowIndex, p, store){ - p.body = '<p class="bug-desc">' + record.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(grid, rowIndex, e){ - - var menu; - - grid.getSelectionModel().selectRow(rowIndex); - - menu = new Ext.menu.Menu({ - id: 'submenu', - items: [{ - text: '<b>'+_('Open in a new Tab')+'</b>', - iconCls: 'openInTab', - scope: this, - handler: function(){ - gridBugs.fireEvent('rowdblclick', grid, rowIndex, e); - } - }, '-', { - text: _('Refresh this grid'), - iconCls: 'refresh', - scope: this, - handler: function(){ - this.storeBugs.reload(); - } - }] - }); - - menu.showAt(e.getXY()); - - }, - rowdblclick: function(grid, rowIndex, e){ - - var BugsId, BugsUrl, BugsTitle; - - BugsId = this.storeBugs.getAt(rowIndex).data.id; - BugsUrl = this.storeBugs.getAt(rowIndex).data.link; - BugsTitle = this.storeBugs.getAt(rowIndex).data.title; - - this.NewTabBugs(BugsId, BugsUrl, BugsTitle); - } - } - }); - - graphPanel = { - 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 img, imgdiv, loadMask; - - img = Ext.get('graph_picture'); - imgdiv = Ext.get('graph_container'); - img.setVisibilityMode(Ext.Element.VISIBILITY); - loadMask = new Ext.LoadMask(imgdiv); - - img.on('load', function(){ - img.stopFx(); - loadMask.hide(); - img.fadeIn({ - duration: 2 - }); - }); - - loadMask.show(); - img.hide(); - img.dom.src = "./php/controller.php?task=translationGraph"; - } //AfterLayout - } // Listeners - }; + gridSummary = new ui.component.SummaryGrid(); + gridTranslators = new ui.component.TranslatorGrid(); + gridMailing = new ui.component.LocalMailGrid(); + gridBugs = new ui.component.BugsGrid(); + graphPanel = new ui.component.TranslationGraph(); this.treeAllFiles = new Ext.tree.TreePanel({ animate: true, @@ -6806,6 +6159,7 @@ defaults: { border: true }, + layoutOnTabChange : true, items: mainContent }] }] http://cvs.php.net/viewvc.cgi/doc-editor/js/main_min.js?r1=1.3&r2=1.4&diff_format=u Index: doc-editor/js/main_min.js diff -u doc-editor/js/main_min.js:1.3 doc-editor/js/main_min.js:1.4 --- doc-editor/js/main_min.js:1.3 Tue Jun 2 05:08:35 2009 +++ doc-editor/js/main_min.js Thu Jun 4 07:12:32 2009 @@ -1 +1 @@ -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&note.language-construct;\r\n&note.not! -bin-safe;\r\n&note.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 &copy; 2008-2009 The PHP Group<br/>"+_("Author:")+' <a href="mailto:yannick@php.net">Yannick Torr&egrave;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>&nbsp;&nbsp;<span c! lass="x-status-text-panel">'+_("Col: ")+'<span id="FE-LANG-status-col-'+x+'">-</span></span></div>&nbsp;&nbsp;')}}}],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>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col: ")+'<span id="FE-EN-status-col-'+x+'">-</span></span></div>&nbsp;&nbsp;'}],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>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col: ")+'<span id="FNU-LANG-status-col-'+w+'">-</span></span></div>&nbsp;&nbsp;')}}}],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>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col: ")+'<span id="FNU-EN-status-col-'+w+'">-</span></span></div>&nbsp;&nbsp;'}],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>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col: ")+'<span id="PP-PATCH-status-col-'+v+'">-</span></s! pan></div>&nbsp;&nbsp;')}}}],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>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col: ")+'<span id="PP-ORIGIN-status-col-'+v+'">-</span></span></div>&nbsp;&nbsp;'}],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>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col: ")+'<span id="FNR-LANG-status-col-'+y+'">-</span></span></div>&nbsp;&nbsp;')}}}],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>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Co l: ")+'<span id="FNR-EN-status-col-'+y+'">-</span></span></div>&nbsp;&nbsp;'}],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>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col: ")+'<span id="AF-status-col-'+A+'">-</span></span></div>&nbsp;&nbsp;'}],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;" />&nbsp;&nbsp;'+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 +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.PingTask=function(){this.task=new Ext.util.DelayedTask(function(){XHR({url:"./php/controller.php",params:{task:"ping"},success:function(a){var c=Ext.util.JSON.decode(a.responseText);if(c.ping!=="pong"){window.location.href="./"}else{if(c.lastupdate==="in_progress"){Ext.getDom("lastUpdateTime").innerHTML=_("update in progress...")}else{var b=Date.parseDate(c.lastupdate,"Y-m-! d H:i:s");Ext.getDom("lastUpdateTime").innerHTML=b.format(_("Y-m-d, H:i"))}}},failure:function(){window.location.href="./"}});this.task.delay(30000)},this);this.delay=function(b,d,c,a){this.task.delay(b,d,c,a)};this.cancel=function(){this.task.cancel()}};Ext.namespace("ui","ui.component");ui.component.About=Ext.extend(Ext.Window,{id:"win-about",iconCls:"iconHelp",layout:"fit",width:515,height:320,modal:true,plain:true,bodyStyle:"color:#000",buttons:[{text:_("Close"),handler:function(){Ext.getCmp("win-about").close()}}],initComponent:function(){Ext.apply(this,{title:String.format(_("About {0}"),phpDoc.appName),items:{xtype:"tabpanel",activeTab:0,autoTabs:true,border:false,defaults:{autoScroll:true},items:[{title:_("About"),html:'<div id="phd-oe-about"><img src="themes/img/logo.png" alt="'+phpDoc.appName+'" /></div><div id="phd-oe-about-info">'+phpDoc.appName+" ver "+phpDoc.appVer+"<br/>UI: "+phpDoc.uiRevision+"<br/> Copyright &copy; 2008-2009 The PHP Group<br/>"+_("Author:")! +' <a href="mailto:yannick@php.net">Yannick Torr&egrave;s</a> '+_('and <a href="http://cvs.php.net/viewvc.cgi/doc-editor/" target="_blank">others</a>')+"</div>"},{title:_("Credits"),bodyStyle:"padding:15px",html:'<div id="phd-oe-credit"><ul><li><a href="http://extjs.com" target="_blank">ExtJs Team</a><div class="phd-oe-credit-info">'+_("Javascript FrameWork")+'</div></li><li><a href="http://marijn.haverbeke.nl/codemirror/" target="_blank">CodeMirror</a><div class="phd-oe-credit-info">'+_("Code editor")+'</div></li><li><a href="http://famfamfam.com" target="_blank">famfamfam.com</a><div class="phd-oe-credit-info">'+_("Icon pack")+"</div></li></ul></div>"},{title:_("License"),autoLoad:{url:"./LICENSE"}}]}});ui.component.About.superclass.initComponent.call(this)}});Ext.namespace("ui","ui.component","ui.component._BugsGrid");ui.component._BugsGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getOpenBugs"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data! .Record.create([{name:"id",mapping:"id"},{name:"title",mapping:"title"},{name:"link",mapping:"link"},{name:"description",mapping:"description"}]))});ui.component._BugsGrid.columns=[{id:"GridBugTitle",header:"Title",sortable:true,dataIndex:"title"}];ui.component._BugsGrid.view=new Ext.grid.GridView({forceFit:true,emptyText:_("No open Bugs"),enableRowBody:true,getRowClass:function(a,d,c,b){c.body='<p class="bug-desc">'+a.data.description+"</p>";return"x-grid3-row-expanded"}});ui.component.BugsGrid=Ext.extend(Ext.grid.GridPanel,{iconCls:"iconBugs",loadMask:true,stripeRows:true,autoHeight:true,width:800,autoExpandColumn:"GridBugTitle",store:ui.component._BugsGrid.store,columns:ui.component._BugsGrid.columns,view:ui.component._BugsGrid.view,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),listeners:{render:function(a){a.store.load.defer(20,a.store)},rowcontextmenu:function(a,c,b){a.getSelectionModel().selectRow(c);new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+_("Open ! in a new Tab")+"</b>",iconCls:"openInTab",handler:function(){var d=a.s tore.getAt(c).data.id,e=a.store.getAt(c).data.link,f=a.store.getAt(c).data.title;phpDoc.NewTabBugs(d,e,f)}},"-",{text:_("Refresh this grid"),iconCls:"refresh",handler:function(){a.store.reload()}}]}).showAt(b.getXY())},rowdblclick:function(c,g,f){var a=c.store.getAt(g).data.id,b=c.store.getAt(g).data.link,d=c.store.getAt(g).data.title;phpDoc.NewTabBugs(a,b,d)}},initComponent:function(){Ext.apply(this,{title:String.format(_("Open bugs for {0}"),"doc-"+phpDoc.userLang),tbar:[{tooltip:_("Refresh this grid"),iconCls:"refresh",handler:function(){ui.component.BugsGrid.reload()}}]});ui.component.BugsGrid.superclass.initComponent.call(this)}});ui.component.BugsGrid.reload=function(){ui.component._BugsGrid.store.reload()};Ext.namespace("ui","ui.component","ui.component._BuildStatus");ui.component._BuildStatus.ds=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getBuildStatusData"},reader:new Ext.data.JsonReader({root:"Items",totalProper! ty:"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._BuildS! tatus.ds,columns:ui.component._BuildStatus.columns,view:new Ext.grid.G ridView({forceFit:true,getRowClass:function(a,d,c,b){if(a.data.status===0){return"summary_3"}}}),listeners:{scope:this,render:function(a){a.store.load.defer(20,a.store)}}});Ext.namespace("ui","ui.component","ui.component._CheckDoc");ui.component._CheckDoc.ds=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getCheckDocData"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"path",mapping:"path"},{name:"extension",mapping:"extension"},{name:"check_oldstyle",mapping:"check_oldstyle",type:"int"},{name:"check_undoc",mapping:"check_undoc",type:"int"},{name:"check_roleerror",mapping:"check_roleerror",type:"int"},{name:"check_badorder",mapping:"check_badorder",type:"int"},{name:"check_noseealso",mapping:"check_noseealso",type:"int"},{name:"check_noreturnvalues",mapping:"check_noreturnvalues",type:"int"},{name:"check_noparameters",mapping:"check_noparame! ters",type:"int"},{name:"check_noexamples",mapping:"check_noexamples",type:"int"},{name:"check_noerrors",mapping:"check_noerrors",type:"int"}]))});ui.component._CheckDoc.ds.setDefaultSort("extension","asc");ui.component._CheckDoc.renderer=function(b,a){if(b>0){a.css="check_doc_cell";return b}else{return}};ui.component._CheckDoc.columns=[new Ext.grid.RowNumberer(),{id:"extension",header:"Extension",sortable:true,dataIndex:"extension"},{header:"Not documented",width:45,sortable:true,dataIndex:"check_undoc",renderer:ui.component._CheckDoc.renderer},{header:"Old style",width:45,sortable:true,dataIndex:"check_oldstyle",renderer:ui.component._CheckDoc.renderer},{header:"Bad refsect1 order",width:45,sortable:true,dataIndex:"check_badorder",renderer:ui.component._CheckDoc.renderer},{header:"No parameters",width:45,sortable:true,dataIndex:"check_noparameters",renderer:ui.component._CheckDoc.renderer},{header:"No return values",width:45,sortable:true,dataIndex:"check_noreturnvalues",! renderer:ui.component._CheckDoc.renderer},{header:"No examples",width: 45,sortable:true,dataIndex:"check_noexamples",renderer:ui.component._CheckDoc.renderer},{header:"No errors section",width:45,sortable:true,dataIndex:"check_noerrors",renderer:ui.component._CheckDoc.renderer},{header:"No see also",width:45,sortable:true,dataIndex:"check_noseealso",renderer:ui.component._CheckDoc.renderer},{header:"Refsect1 role error",width:45,sortable:true,dataIndex:"check_roleerror",renderer:ui.component._CheckDoc.renderer}];ui.component._CheckDoc.fs=new Ext.data.SimpleStore({fields:[{name:"id"},{name:"file"}]});ui.component._CheckDoc.FileGrid=Ext.extend(Ext.grid.GridPanel,{id:"check-doc-file-grid",store:ui.component._CheckDoc.fs,loadMask:true,bodyBorder:false,autoExpandColumn:"file",sm:new Ext.grid.RowSelectionModel({listeners:{rowselect:function(c,b,a){Ext.getCmp("check-doc-btn-open-selected-files").enable()}}}),columns:[new Ext.grid.RowNumberer(),{id:"file",header:"Files",sortable:true,dataIndex:"file"}],listeners:{rowcontextmenu:function(a,c,b){a.getSel! ectionModel().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.filePen dingOpen[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:"labe! l"}]});ui.component._EditorConf.viewMenu=Ext.extend(Ext.DataView,{id:" conf-menu-view",tpl:ui.component._EditorConf.tplMenu,singleSelect:true,overClass:"x-view-over",itemSelector:"div.thumb-wrap",store:ui.component._EditorConf.menuStore,listeners:{selectionchange:function(b,a){var c=b.getSelectedRecords();Ext.getCmp("confCard").layout.setActiveItem("conf-card-"+c[0].data.id)}}});ui.component._EditorConf.themeStore=new Ext.data.SimpleStore({fields:["themeFile",{name:"themeName",type:"string"}],data:[["themes/black/css/xtheme-black.css",_("Black")],["themes/empty.css",_("Default")],["themes/darkgray/css/xtheme-darkgray.css",_("DarkGray")],["js/extjs/resources/css/xtheme-gray.css",_("Gray")],["themes/gray-extend/css/xtheme-gray-extend.css",_("Gray Extend")],["themes/indigo/css/xtheme-indigo.css",_("Indigo")],["themes/midnight/css/xtheme-midnight.css",_("Midnight")],["themes/olive/css/xtheme-olive.css",_("Olive")],["themes/purple/css/xtheme-purple.css",_("Purple")],["js/extjs/resources/css/xtheme-slate.css",_("Slate")],["themes/silverCherry/css/xth! eme-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:tru! e,defaults:{hideLabel:true},defaultType:"radio",items:[{name:"conf_nee dupdate_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")?tr! ue:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_needupdate_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card2.superclass.initComponent.call(this)}});ui.component._EditorConf.card3=Ext.extend(Ext.form.FormPanel,{id:"conf-card-3",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Error type"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_error_skipnbliteraltag",checked:(phpDoc.userConf.conf_error_skipnbliteraltag==="true")?true:false,boxLabel:_("Skip nbLiteralTag error"),listeners:{check:function(a){phpDoc.confUpdate("conf_error_skipnbliteraltag",a.getValue())}}}]},{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_error_scrollbars",checked:(phpDoc.userConf.conf_error_scrollbars==="true")?true:false,boxLabel:_("Synchronize scrol! l bars"),listeners:{check:function(a){phpDoc.confUpdate("conf_error_sc rollbars",a.getValue())}}},{name:"conf_error_displaylog",checked:(phpDoc.userConf.conf_error_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_error_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card3.superclass.initComponent.call(this)}});ui.component._EditorConf.card4=Ext.extend(Ext.form.FormPanel,{id:"conf-card-4",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_reviewed_scrollbars",checked:(phpDoc.userConf.conf_reviewed_scrollbars==="true")?true:false,boxLabel:_("Synchronize scroll bars"),listeners:{check:function(a){phpDoc.confUpdate("conf_reviewed_scrollbars",a.getValue())}}},{name:"conf_reviewed_displaylog",checked:(phpDoc.userConf.conf_reviewed_displaylog==="true")?true:false,boxLabel:_("Automatically load the l! og when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_reviewed_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card4.superclass.initComponent.call(this)}});ui.component._EditorConf.card5=Ext.extend(Ext.form.FormPanel,{id:"conf-card-5",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),autoHeight:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{name:"conf_allfiles_displaylog",checked:(phpDoc.userConf.conf_allfiles_displaylog==="true")?true:false,boxLabel:_("Automatically load the log when displaying the file"),listeners:{check:function(a){phpDoc.confUpdate("conf_allfiles_displaylog",a.getValue())}}}]}]});ui.component._EditorConf.card5.superclass.initComponent.call(this)}});ui.component._EditorConf.card6=Ext.extend(Ext.form.FormPanel,{id:"conf-card-6",bodyStyle:"padding: 10px;",initComponent:function(){Ext.apply(this,{items:[{xtype:"fieldset",title:_("Editor"),auto! Height:true,defaults:{hideLabel:true},defaultType:"checkbox",items:[{n ame:"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)}});Ext.namespace("ui","ui.component","ui.component._LocalMailGrid");ui.component._LocalMailGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getLastNews"},reader:new Ext.data.JsonReader({root:"Items",totalProp! erty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id "},{name:"title",mapping:"title"},{name:"link",mapping:"link"},{name:"description",mapping:"description"},{name:"pubDate",mapping:"pubDate",type:"date",dateFormat:"Y/m/d H:i:s"}]))});ui.component._LocalMailGrid.store.setDefaultSort("pubDate","desc");ui.component._LocalMailGrid.columns=[new Ext.grid.RowNumberer(),{id:"GridMailingTitle",header:_("Title"),sortable:true,dataIndex:"title"},{header:_("By"),width:110,sortable:true,dataIndex:"description"},{header:_("Date"),width:140,sortable:true,dataIndex:"pubDate",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))}];ui.component.LocalMailGrid=Ext.extend(Ext.grid.GridPanel,{iconCls:"home-mailing-title",height:400,width:800,loadMask:true,autoScroll:true,autoExpandColumn:"GridMailingTitle",store:ui.component._LocalMailGrid.store,columns:ui.component._LocalMailGrid.columns,sm:new Ext.grid.RowSelectionModel({singleSelect:true}),listeners:{render:function(a){a.store.load.defer(20,a.store)},rowcontextmenu:function(b,g,d){var a=b.sto! re.getAt(g).data.pubDate,f=b.store.getAt(g).data.link,c=b.store.getAt(g).data.title;b.getSelectionModel().selectRow(g);new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+_("Open in a new Tab")+"</b>",iconCls:"openInTab",handler:function(){phpDoc.NewTabMailing(a,f,c)}},"-",{text:_("Refresh this grid"),iconCls:"refresh",handler:function(){b.store.reload()}}]}).showAt(d.getXY())},rowdblclick:function(b,g,d){var a=b.store.getAt(g).data.pubDate,f=b.store.getAt(g).data.link,c=b.store.getAt(g).data.title;phpDoc.NewTabMailing(a,f,c)}},initComponent:function(){Ext.apply(this,{title:String.format(_("Mails from {0}"),"doc-"+phpDoc.userLang),tbar:[{tooltip:_("Refresh this grid"),iconCls:"refresh",handler:function(){ui.component.LocalMailGrid.reload()}}]});ui.component.LocalMailGrid.superclass.initComponent.call(this)}});ui.component.LocalMailGrid.reload=function(){ui.component._LocalMailGrid.store.reload()};Ext.namespace("ui","ui.component","ui.component._SummaryGrid");ui.component._Su! mmaryGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url: "./php/controller.php"}),baseParams:{task:"getSummaryInfo"},reader:new Ext.data.JsonReader({root:"Items",totalProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"libel",mapping:"libel"},{name:"nbFiles",mapping:"nbFiles"},{name:"percentFiles",mapping:"percentFiles"},{name:"sizeFiles",mapping:"sizeFiles"},{name:"percentSize",mapping:"percentSize"}])),listeners:{load:function(){this.each(function(a){switch(a.id){case 1:a.set("libel",_("Up to date files"));break;case 2:a.set("libel",_("Old files"));break;case 3:a.set("libel",_("Critical files"));break;case 4:a.set("libel",_("Files without revision tag"));break;case 5:a.set("libel",_("Files available for translation"));break;case 6:a.set("libel",_("Total"));break;default:a.set("libel","");break}a.commit()})}}});ui.component._SummaryGrid.columns=[new Ext.grid.RowNumberer(),{id:"StatusType",header:_("File status type"),width:180,sortable:true,dataIndex:"libel"},{header:_("Number of files"),width:110,! sortable:true,dataIndex:"nbFiles"},{header:_("Percent of files"),width:110,sortable:true,dataIndex:"percentFiles"},{header:_("Size of files (kB)"),width:110,sortable:true,dataIndex:"sizeFiles"},{header:_("Percent of size"),width:110,sortable:true,dataIndex:"percentSize"}];ui.component._SummaryGrid.view=new Ext.grid.GridView({getRowClass:function(a,d,c,b){switch(a.data.id){case 1:return"summary_1";case 2:return"summary_2";case 3:return"summary_3";case 4:return"summary_4";case 5:return"summary_5";default:return""}}});ui.component.SummaryGrid=Ext.extend(Ext.grid.GridPanel,{title:_("Summary"),loadMask:true,autoScroll:true,height:400,width:800,store:ui.component._SummaryGrid.store,columns:ui.component._SummaryGrid.columns,view:ui.component._SummaryGrid.view,listeners:{render:function(a){a.store.load.defer(20,a.store)},rowdblclick:function(a,d,b){var c=a.store.getAt(d).data.id;if(c===1||c===2||c===3){Ext.getCmp("acc-need-update").expand()}}},initComponent:function(){Ext.apply(thi! s,{iconCls:"flag-"+phpDoc.userLang,});ui.component.SummaryGrid.supercl ass.initComponent.call(this)}});ui.component.SummaryGrid.reload=function(){ui.component._SummaryGrid.store.reload()};Ext.namespace("ui","ui.component");ui.component.TranslationGraph=Ext.extend(Ext.Panel,{title:_("Graphics"),layout:"fit",iconCls:"home-graphic-title",autoHeight:true,html:'<div align="center" id="graph_container" style="width: 530px; height: 302px"><img id="graph_picture" src="" height="300"></div>',listeners:{afterlayout:function(){var a=Ext.get("graph_picture"),c=Ext.get("graph_container"),b=new Ext.LoadMask(c);a.setVisibilityMode(Ext.Element.VISIBILITY);a.on("load",function(){a.stopFx();b.hide();a.fadeIn({duration:2})});b.show();a.hide();a.dom.src="./php/controller.php?task=translationGraph"}}});Ext.namespace("ui","ui.component","ui.component._TranslatorGrid");ui.component._TranslatorGrid.store=new Ext.data.Store({proxy:new Ext.data.HttpProxy({url:"./php/controller.php"}),baseParams:{task:"getTranslatorInfo"},reader:new Ext.data.JsonReader({root:"Items",tota! lProperty:"nbItems",id:"id"},Ext.data.Record.create([{name:"id",mapping:"id"},{name:"name",mapping:"name"},{name:"email",mapping:"mail"},{name:"nick",mapping:"nick"},{name:"cvs",mapping:"cvs"},{name:"uptodate",mapping:"uptodate",type:"int"},{name:"old",mapping:"old",type:"int"},{name:"critical",mapping:"critical",type:"int"},{name:"sum",mapping:"sum",type:"int"}]))});ui.component._TranslatorGrid.store.setDefaultSort("nick","asc");ui.component._TranslatorGrid.translatorSumRenderer=function(b){if(b){var a=(b===0||b>1)?b:1;return"("+a+" Translators)"}else{return}};ui.component._TranslatorGrid.uptodateRenderer=function(a){if(a==="0"){return}else{return'<span style="color:green; font-weight: bold;">'+a+"</span>"}};ui.component._TranslatorGrid.old_sumRenderer=function(a){return(a==="0")?"":a};ui.component._TranslatorGrid.criticalRenderer=function(a){if(a==="0"){return}else{return'<span style="color:red; font-weight: bold;">'+a+"</span>"}};ui.component._TranslatorGrid.columns=[new! Ext.grid.RowNumberer(),{id:"GridTransName",header:_("Name"),sortable: true,dataIndex:"name",summaryType:"count",summaryRenderer:ui.component._TranslatorGrid.translatorSumRenderer},{header:_("Email"),width:110,sortable:true,dataIndex:"email"},{header:_("Nick"),width:70,sortable:true,dataIndex:"nick"},{header:_("Cvs"),width:45,sortable:true,dataIndex:"cvs"},{header:_("UptoDate"),width:60,sortable:true,renderer:ui.component._TranslatorGrid.uptodateRenderer,dataIndex:"uptodate",summaryType:"sum"},{header:_("Old"),width:45,sortable:true,renderer:ui.component._TranslatorGrid.old_sumRenderer,dataIndex:"old",summaryType:"sum"},{header:_("Critical"),width:60,sortable:true,renderer:ui.component._TranslatorGrid.criticalRenderer,dataIndex:"critical",summaryType:"sum"},{header:_("Sum"),width:50,sortable:true,renderer:ui.component._TranslatorGrid.old_sumRenderer,dataIndex:"sum",summaryType:"sum"}];ui.component.TranslatorGrid=Ext.extend(Ext.grid.GridPanel,{title:_("Translators"),iconCls:"iconTranslator",loadMask:true,autoScroll:true,height:400,width:800,plug! ins:[new Ext.ux.grid.GridSummary()],store:ui.component._TranslatorGrid.store,columns:ui.component._TranslatorGrid.columns,autoExpandColumn:"GridTransName",listeners:{render:function(a){a.store.load.defer(20,a.store)},rowdblclick:function(c,f,d){var a=c.store.getAt(f).data.email,b=c.store.getAt(f).data.name;c.getSelectionModel().selectRow(f);phpDoc.sendEmail(b,a)},rowcontextmenu:function(c,f,d){var a=c.store.getAt(f).data.email,b=c.store.getAt(f).data.name;c.getSelectionModel().selectRow(f);new Ext.menu.Menu({id:"submenu",items:[{text:"<b>"+String.format(_("Send an email to {0}"),b)+"</b>",iconCls:"iconSendEmail",handler:function(){phpDoc.sendEmail(b,a)}},"-",{text:String.format(_("Send an email to the {0}"),"doc-"+phpDoc.userLang+"@lists.php.net"),iconCls:"iconSendEmail",handler:function(){phpDoc.sendEmail("Php Doc Team "+phpDoc.userLang,"doc-"+phpDoc.userLang+"@lists.php.net")}}]}).showAt(d.getXY())}}});ui.component.TranslatorGrid.reload=function(){ui.component._Translator! Grid.store.reload()};var phpDoc=function(){Ext.QuickTips.init();Ext.BL ANK_IMAGE_URL="js/extjs/resources/images/default/s.gif";return{TaskPing:"",storeCommitLogMessage:"",storeFilesError:"",storeFilesNeedUpdate:"",storeFilesNeedReviewed:"",storeNotInEn:"",storePendingCommit:"",storePendingPatch:"",userLogin:"",userLang:"",appName:"PhpDocumentation Online Editor",appVer:"0.2",uiRevision:"$Revision: 1.4 $",userConf:{conf_needupdate_diff:"using-exec",conf_needupdate_scrollbars:true,conf_needupdate_displaylog:false,conf_error_skipnbliteraltag:true,conf_error_scrollbars:true,conf_error_displaylog:false,conf_reviewed_scrollbars:true,conf_reviewed_displaylog:false,conf_allfiles_displaylog:false,conf_patch_scrollbars:true,conf_patch_displaylog:false,conf_theme:"themes/empty.css"},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.userL! ogin=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.conf_error_skipnbliteraltag;this.userConf.conf_error_scrollbars=b.mess.userConf.conf_error_scrollbars;this.userConf.conf_error_displaylog=b.mess.userConf.conf_error_displaylog;this.userConf.conf_reviewed_scrollbars=b.mess.userConf.conf_reviewed_scrollbars;this.userConf.conf_reviewed_displaylog=b.mess.userConf.conf_reviewed_displaylog;this.userConf.conf_allfiles_displaylog=b.mess.userConf.conf_allfiles_displaylog;this.userConf.conf_patch_scrollbars=b.mess.userConf.conf_patch_scrollbars;this.userConf.conf_patch_displaylog=b.mess.userConf.conf_patch_displaylog;this.userConf.conf_theme=b.mess.userConf.conf_theme;Ext.get("appTheme").do! m.href=this.userConf.conf_theme;this.loadDataStore();this.drawInterfac e()}})},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>secon! dparameter</parameter>\r\n</term>\r\n<listitem>\r\n<para>\r\nIts descr iption\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=E! xt.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.util.JSON.decode(Ext.getCmp(a).getCursorPosition());Ext.getCmp(a).insertIntoLine(d.line,0,'\r\n<refsect1 role="changelog"><!-- {{{ -->\r\n&reftitle.changelog;\r\n<para>\r\n<informaltable>\r\n<tgroup cols="2">\r\n<thead>\r\n<row>\r\n<entry>&Version;</entry>\r\n<entry>&Description;</entry>\r\n</row>\r\n</thead>\r\n<tbody>\r\n<row>\r\n<entry>Enter the version of change here</entry>\r\n<entry>\r\nDescribe the change\r\n</entry>\r\n</row>\r\n</tbody>\r\n</tgroup>\r\n</informaltable>\r\n</para>\r\n</refsect1><!-- }}} -->');Ext.getCmp(a).focus()}},{text:_("Examples section"),handler:function(){var d=Ext.util.JSON.decode(Ext.getCmp(a).get! CursorPosition());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 example should be here. (Inside the <example> tag, not out).\r\n</para>\r\n<programlisting role=\"php\">\r\n<![CDATA[\r\n<?php\r\nif ($anexample === true) {\r\necho 'Use the PEAR Coding standards';\r\n}\r\nif ($thereisoutput === 'and it is multiple lines') {\r\necho 'Use a screen like we did below';\r\n}\r\n?>\r\n]]>\r\n</programlisting>\r\n&example.outputs.similar;\r\n<screen>\r\n<![CDATA[\r\nUse the PEAR Coding standards\r\nUse a screen like we did below\r\n]]>\r\n</screen>\r\n</example><!-- }}} -->\r\n</para>\r\n</refsect1><!-- }}} -->");Ext.getCmp(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&note.language-construct;\r\n&note.not-bin-safe;\r\n&note.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 Ext.data.GroupingStore({autoLoad:(this.userLang==="en")?false:true,proxy: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.Grouping! Store({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",mapp! ing:"path"},{name:"name",mapping:"name"},{name:"reviewed",mapping:"rev iewed"},{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.GroupingStore({autoLoad:(this.userLang==="en")?false:true,proxy:new Ext.data.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",l isteners:{datachanged:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()},add:function(a){Ext.getDom("acc-pendingPatch-nb").innerHTML=a.getCount()}}})},newTabCheckDoc: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("a! cc-all-files").expand();var c=d.split("/");function b(f,e){f.expand(false,true,function(h){var g;h.ensureVisible();if(c[0]&&c[0]!==""){for(g=0;g<h.childNodes.length;g=g+1){if(h.childNodes[g].text===c[0]){c.shift();b(h.childNodes[g],e)}}}else{for(g=0;g<h.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.storeF! ilesNeedUpdate.reload();this.storeFilesError.reload();this.storeFilesN eedReviewed.reload()}this.storePendingCommit.remove(this.storePendingCommit.getAt(f));this.storePendingCommit.fireEvent("add",this.storePendingCommit);this.storeNotInEn.each(function(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 conf! irm."),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:{t ask:"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.addToPendingCommit(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).isModi! fiedLang){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:"saveFile",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:"fo rm",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)}XHR({scope:i,url:"./php/controller.php",params:{task:"sav! eFile",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.uti l.JSON.decode(j.responseText);if(e==="FE"){this.storeFilesError.getAt(g).set("needcommit",true);this.storeFilesError.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+"-LA! NG-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",para! ms:{task:"saveFile",filePath:d,fileName:b,fileLang:this.userLang,fileC ontent: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.storeFilesError.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.YESNOCANCEL,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:function(g,e,a,d){var c,f,b;c=false;this.storePendingCommit.each(function(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)}},NewTabBugs:function(a,b,c){Ext.getCmp("main-panel").add({id:"mifp_bugs_"+a,xtype:"iframepanel",title:_("Loading..."),tabTip:c,iconCls:"iconBugs",loadMask:true,defaultSrc:b,listeners:{documentloaded:function(d){d.ownerCt.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:"mifp_"+a,title:_("Loading..."),tabTip:b,iconCls:"home-mailing-title",loadMask:true,defaultSrc:c,listeners:{documentloaded:function(d){d.ownerCt.setTit! le(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:function(d,e){var b,c,f,a;a=e.id.split("-");if((a[0]==="FE"||a[0]==="FNU"||a[0]==="FNR"||a[0]==="PP"||a[0]==="AF")&&a[1]!=="help"){if(a[0]==="FE"){b=Ext.getCmp("FE-"+a[1]).isModifiedLang}if(a[0]==="FNU"){b=Ext.getCmp("FNU-"+a[1])! .isModifiedLang}if(a[0]==="FNR"){b=Ext.getCmp("FNR-"+a[1]).isModifiedL ang}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.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-p! anel",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:function(){var o,m,n;function l(p){return p.split("\n").join("<br/>")}o=new Ext.form.TextArea({grow:true,growMin:120});m=new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(),{id:"GridManageLog",header:_("Log message"),dataIndex:"t! ext",renderer:l,editor:new Ext.Editor(o,{shadow:false,autoSize:true,li steners:{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("main-panel").findById(u)||Ext.getCmp("main-panel").findById(m)||Ext.getCmp("main-panel").findById(n)){if(Ext.getCmp("main-panel").findById(u)){t=u}if(Ext.getCmp("main-panel").findById(m)){t=m}if(Ext.getCmp("main-panel").find! ById(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.storePendingCommit.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.C! heckTreeNodeUI});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("tree-panel").getNodeById(f[b]);a.push(e.attributes.FileDBID)}d=Ext.getCmp("form-commit-message-log").getValue();Ext.getCmp("winCvsCommit").close();XHR({url:"./php/controller.php",params:{task:"cvsCommit",nodes:Ext.util.JSON.en! code(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();ui.component.TranslatorGrid.reload();ui.component.SummaryGrid.reload();Ext.getBody().unmask()}})}})},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");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)}}})}var g=new Ext.util.DelayedTask(function(){i()});g.delay(5000)}}})}function b(f){Ext.get("wizard-step-2").replaceClass("wizard-step-before","wizard-step-working");XHR({scope:f,url:"./php/controller.php",para! ms:{task:"applyTools"},success:function(g){Ext.get("wizard-step-2").re placeClass("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();ui.component.TranslatorGrid.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-re! fresh").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.setVisible(false);Ext.getDom("lastUpdateTime").innerHTML=_("update in progress...");c(this)}}]})}Ext.getBody().mask('<img src="themes/img/loading.gif" style="vertical-align: middle;" /> '+_("Verif! y if there is an update in progress. Please, wait..."));XHR({url:"./ph p/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_bu! ild_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()}else{function f(i){XHR({scope:i,url:"./php/controller.php",params:{task:"checkLockFile",lockFile:"lock_check_build"},success:function(j){g.delay(5000)},failure:function(j){var k=Ext.util.JSON.decode! (j.responseText);if(k.success===false){Ext.getBody().unmask();b(this)} else{g.delay(5000)}}})}var g=new Ext.util.DelayedTask(function(){f(this)},this);g.delay(5000)}}})}}],items:[{xtype:"panel",baseCls:"x-plain",bodyStyle:"padding:5px 5px 0",html:_("You're about to check the build via this command:")+"<br/><br/>/usr/bin/php configure.php --with-lang="+this.userLang+"<br><br>",modal:false},{xtype:"checkbox",hideLabel:true,checked:false,boxLabel:_("Enable detailed XML error messages"),name:"option-xml-details",id:"option-xml-details"}]})}c.show(a)},WinConf:function(){new ui.component.EditorConf().show(Ext.get("winconf-btn"))},confUpdate:function(b,a){XHR({scope:this,url:"./php/controller.php",params:{task:"confUpdate",item:b,value:a},success:function(c){if(b==="conf_theme"){this.userConf.conf_theme=a}if(b==="conf_needupdate_diff"){this.userConf.conf_needupdate_diff=a}if(b==="conf_needupdate_scrollbars"){this.userConf.conf_needupdate_scrollbars=""+a+""}if(b==="conf_needupdate_displaylog"){this.userConf.conf_needupdate_displaylog=""+a+""}if(b==="co! nf_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(){new ui.component.About().show(Ext.get("winabout-btn"))},sendEmail:function(b,a){var c,d;c=new Ext.form.FormPanel({baseCls:"x-plain",labelWidth:55,url:"save-form.php",defaultType:"textfield",items:[{fieldLabel:_("Send To"),name:"to",readOnly:true,anchor:"100%",value:'"'+b+'" <'+a+">"},{fieldLabel:_("Subje! ct"),name:"subject",anchor:"100%"},{xtype:"textarea",hideLabel:true,na me:"msg",anchor:"100% -53"}]});d=new Ext.Window({title:_("Send an email"),width:500,height:300,minWidth:300,minHeight:200,layout:"fit",plain:true,bodyStyle:"padding:5px;",buttonAlign:"center",items:c,iconCls:"iconSendEmail",buttons:[{text:_("Send"),handler:function(){var e=c.getForm().getValues();XHR({url:"./php/controller.php",params:{task:"sendEmail",to:e.to,subject:e.subject,msg:e.msg},success:function(f){d.close();Ext.MessageBox.alert(_("Status"),String.format(_("Email sent to {0} with success!"),b))}})}},{text:_("Cancel"),handler:function(){d.close()}}]});d.show()},drawInterface:function(){var l,n,a,c,j,i,g,k,h,f,m,b,d,e;this.TaskPing=new ui.PingTask();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({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(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.clear! Invalid();this.triggers[0].show();this.scope.storeFilesError.filter("m aintainer",o)}})],listeners:{scope:this,render:function(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_error_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-b! tn-logLang-"+x).frame("3F8538")}else{Ext.getCmp("FE-PANEL-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:{beforerows! elect: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]},{l! ayout:"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:"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(Ex! t.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>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col: ")+'<span id="FE-LANG-status-col-'+x+'">-</span></span></div>&nbsp;&nbsp;')}}}],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-")},cmchan! ge:function(F,D,E){var C=Ext.util.JSON.decode(Ext.getCmp("FE-EN-"+x).g etCursorPosition());Ext.get("FE-EN-status-line-"+x).dom.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-stat! us-line-"+x).dom.innerHTML=C.line;Ext.get("FE-EN-status-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>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col: ")+'<span id="FE-EN-status-col-'+x+'">-</span></span></div>&nbsp;&nbsp;'}],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-pan! el").setActiveTab("FE-"+x);if(Ext.getCmp("FE-"+x).getLayout().north.co llapsedEl){Ext.getCmp("FE-"+x).getLayout().north.collapsedEl.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:fun! ction(w){var x=Ext.util.JSON.decode(w.responseText);Ext.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.upp! ercase(this.userLang)),width:45,sortable:true,dataIndex:"revision"},{h eader:_("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()},onTrigger2C! lick: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.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,FileName: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",to! talProperty:"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-lo gLang-"+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,dataIndex:"date",r enderer: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,c! ollapsed:true,html:'<div id="FNU-diff-'+w+'" class="diff-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,collap! sible:false,id:"FNU-LANG-PANEL-"+w,region:"center",xtype:"form",height :"auto",width:"auto",items:[{xtype:"codemirror",id:"FNU-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-weig! ht: 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>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col: ")+'<span id="FNU-LANG-statu! s-col-'+w+'">-</span></span></div>&nbsp;&nbsp;')}}}],tbar:[{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!==37&&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.caract! er}}}],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="FNU-EN-status-line-'+w+'">-</span></span>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col: ")+'<span id="FNU-EN-status-col-'+w+'">-</span></span></div>&nbsp;&nbsp;'}],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:true,dataIndex:"name"},{header:_("Posted by"),width:45,sortable:true,dataIndex:"by"},{header:_("Date"),width:45,sortable:true,dataIndex:"date",renderer:Ext.util.Format.dateRenderer(_("Y-m-d, H:i"))},{header:_("Path"),dataIndex:"path",hidden:true}],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.fir! eEvent("rowdblclick",p,v,t)}},"-",{text:_("Reject this patch"),iconCls :"iconPageDelete",scope:this,handler:function(){this.rejectPatch(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.ge! tCount();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-PAN! EL-btn-log-"+v,disabled:true,handler:function(){var A,z,y;A=s.getSelec tions();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:{xty! pe:"tabpanel",activeTab:0,tabPosition:"bottom",defaults:{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){Ex t.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>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col! : ")+'<span id="PP-PATCH-status-col-'+v+'">-</span></span></div>&nbsp;&nbsp;')}}}],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).scr! ollTo(y)}},cmcursormove:function(z){var y=Ext.util.JSON.decode(Ext.get Cmp("PP-ORIGIN-"+v).getCursorPosition());Ext.get("PP-ORIGIN-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>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col: ")+'<span id="PP-ORIGIN-status-col-'+v+'">-</span></span></div>&nbsp;&nbsp;'}],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,groupTextTpl:'{[values.rs[0].data["path"]]} ({[values.rs.length]} {[values.rs.length > 1 ? "'+_("Files")+'" : "'+_("File")+'"]})',emptyText:'<div style="text-align: center;">'+_("No Files")+"</div>",getRowClass:function(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:function(w){var x=E xt.util.JSON.decode(w.responseText);Ext.getBody().unmask();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==="update"){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(){t! his.WinCommit(false)}}]})};if(q==="delete"){u=new Ext.menu.Menu({items :[{text:"<b>"+_("Cancel")+"<b>",iconCls:"iconPageDelete",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:tru e}],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"}},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.storeFilesNeedReviewed.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){va! r z=Ext.util.JSON.decode(y.responseText);Ext.get("diff_content_"+v).do m.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.HttpP! roxy({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"}])});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."),wid! th: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-PAN EL-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.wi! nDiff("en"+p,r,D,C)}},{scope:this,tooltip:_("<b>Load/Refresh</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,initiali! ze:function(){this.getFile(y,this.userLang+p,r,"FNR-LANG-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).frame("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>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col: ")+'<span id="FNR-LANG-status-col-'+y+'">-</span></span></div>&nbsp;&nbsp;')}}}],tbar:[{scope:this,tooltip:_("<b>Save</b> this file"),iconCls:"saveFile",id:"FNR-LANG-PANEL-btn-save-"+y,disabled:true,h! andler:function(){this.saveLangFile(y,p,r,"FNR",A,this)}},{scope:this, tooltip:_("<b>Save as</b> a patch"),iconCls:"saveAsFile",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-pa! nel">'+_("Line: ")+'<span id="FNR-EN-status-line-'+y+'">-</span></span >&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col: ")+'<span id="FNR-EN-status-col-'+y+'">-</span></span></div>&nbsp;&nbsp;'}],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 ui.component.SummaryGrid();g=new ui.component.TranslatorGrid();k=new ui.component.LocalMailGrid();f=new ui.component.BugsGrid();m=new ui.component.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,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.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.length))})}})],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 sam! e 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.treeAllFiles.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"}),base! Params:{task:"getLog",Path:o,File:p},reader:new Ext.data.JsonReader({r oot:"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"}])});w.setDefaultSort("date","desc");s=new Ext.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:"Cont! ent",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:"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,co! llapsible: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).isModif! ied=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:"padding-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>&nbsp;&nbsp;<span class="x-status-text-panel">'+_("Col: ")+'<span id="AF-status-col-'+A+'">-</span></span></div>&nbsp;&nbsp;'}],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({scop! e:this,url:"./php/controller.php",params:{task:"saveFile",filePath:o,f ileName: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.hide()},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.treeAllFiles.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>Confi! gure</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 data. 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=new Ext.Viewport({layout:"border",items:[{region:"north",html:'<h1 class="x-panel-header"><img src="themes/img/mini_php.png" style="vertical-align: middle;" />&nbsp;&nbsp;'+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:fu! nction(o){Ext.getCmp("FNU-filter").wrap.setWidth(200)}}},{title:_("Err or 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.getCmp("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-p! endingCommit",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},layoutOnTabChange:true,items:e}]}]}]});Ext.get("loading").remove();E! xt.fly("loading-mask").fadeOut({remove:true});if(directAccess){this.op enFile(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/README?r1=1.5&r2=1.6&diff_format=u Index: doc-editor/README diff -u doc-editor/README:1.5 doc-editor/README:1.6 --- doc-editor/README:1.5 Sun Mar 29 21:09:22 2009 +++ doc-editor/README Thu Jun 4 07:12:32 2009 @@ -3,6 +3,7 @@ == Requirements == * PHP 5.2.0+ * The MySQLi extension +* The PHP-GDLib module * Shell exec privileges == Configuration == http://cvs.php.net/viewvc.cgi/doc-editor/TODO?r1=1.9&r2=1.10&diff_format=u Index: doc-editor/TODO diff -u doc-editor/TODO:1.9 doc-editor/TODO:1.10 --- doc-editor/TODO:1.9 Tue Jun 2 05:08:35 2009 +++ doc-editor/TODO Thu Jun 4 07:12:32 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.9 $ keyword (in comments, about popup, ..) +* Use the $Revision: 1.10 $ 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) @@ -47,6 +47,7 @@ * Split main.js to several objects & files (to be discussed) * Use Object in FilePendingOpen Queue instead of Array * Implement RTL where appropriate +* Decide whether XHR abstraction could be used (refer bug report from yannick) USER INTERFACE: =============== http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/About.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/About.js +++ doc-editor/js/ui/component/About.js Ext.namespace('ui','ui.component'); ui.component.About = Ext.extend(Ext.Window, { id : 'win-about', iconCls : 'iconHelp', layout : 'fit', width : 515, height : 320, modal : true, plain : true, bodyStyle : 'color:#000', buttons : [{ text : _('Close'), handler : function() { Ext.getCmp('win-about').close(); } }], initComponent : function() { Ext.apply(this, { title : String.format(_('About {0}'), phpDoc.appName), items : { xtype : 'tabpanel', activeTab : 0, autoTabs : true, border : false, defaults : { autoScroll: true }, items : [{ title : _('About'), html : '<div id="phd-oe-about">' + '<img src="themes/img/logo.png" alt="' + phpDoc.appName + '" />' + '</div>' + '<div id="phd-oe-about-info">' + phpDoc.appName + ' ver ' + phpDoc.appVer + '<br/>' + 'UI: ' + phpDoc.uiRevision + '<br/>' + ' Copyright &copy; 2008-2009 The PHP Group<br/>' + _('Author:') + ' <a href="mailto:yannick@php.net">Yannick Torr&egrave;s</a> ' + _('and <a href="http://cvs.php.net/viewvc.cgi/doc-editor/" target="_blank">others</a>') + '</div>' }, { title : _('Credits'), bodyStyle : 'padding:15px', html : '<div id="phd-oe-credit"><ul>' + '<li><a href="http://extjs.com" target="_blank">ExtJs Team</a><div class="phd-oe-credit-info">' + _('Javascript FrameWork') + '</div></li>' + '<li><a href="http://marijn.haverbeke.nl/codemirror/" target="_blank">CodeMirror</a><div class="phd-oe-credit-info">' + _('Code editor') + '</div></li>' + '<li><a href="http://famfamfam.com" target="_blank">famfamfam.com</a><div class="phd-oe-credit-info">' + _('Icon pack') + '</div></li>' + '</ul></div>' }, { title : _('License'), autoLoad : { url : './LICENSE' } }] } }); ui.component.About.superclass.initComponent.call(this); } }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/BugsGrid.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/BugsGrid.js +++ doc-editor/js/ui/component/BugsGrid.js Ext.namespace('ui','ui.component','ui.component._BugsGrid'); //------------------------------------------------------------------------------ // BugsGrid internals // Store : All open bugs for documentation ui.component._BugsGrid.store = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ url : './php/controller.php' }), baseParams : { task : 'getOpenBugs' }, reader : new Ext.data.JsonReader( { root : 'Items', totalProperty : 'nbItems', id : 'id' }, Ext.data.Record.create([ { name : 'id', mapping : 'id' }, { name : 'title', mapping : 'title' }, { name : 'link', mapping : 'link' }, { name : 'description', mapping : 'description' } ]) ) }); // BugsGrid columns definition ui.component._BugsGrid.columns = [{ id : 'GridBugTitle', header : "Title", sortable : true, dataIndex : 'title' }]; ui.component._BugsGrid.view = new Ext.grid.GridView({ forceFit : true, emptyText : _('No open Bugs'), enableRowBody : true, getRowClass : function(record, rowIndex, p, store) { p.body = '<p class="bug-desc">' + record.data.description + '</p>'; return 'x-grid3-row-expanded'; } }); //------------------------------------------------------------------------------ // BugsGrid ui.component.BugsGrid = Ext.extend(Ext.grid.GridPanel, { iconCls : 'iconBugs', loadMask : true, stripeRows : true, autoHeight : true, width : 800, autoExpandColumn : 'GridBugTitle', store : ui.component._BugsGrid.store, columns : ui.component._BugsGrid.columns, view : ui.component._BugsGrid.view, sm : new Ext.grid.RowSelectionModel({ singleSelect: true }), listeners : { render : function(grid) { grid.store.load.defer(20, grid.store); }, rowcontextmenu : function(grid, rowIndex, e) { grid.getSelectionModel().selectRow(rowIndex); new Ext.menu.Menu({ id : 'submenu', items : [{ text : '<b>'+_('Open in a new Tab')+'</b>', iconCls : 'openInTab', handler : function() { var BugsId = grid.store.getAt(rowIndex).data.id, BugsUrl = grid.store.getAt(rowIndex).data.link, BugsTitle = grid.store.getAt(rowIndex).data.title; phpDoc.NewTabBugs(BugsId, BugsUrl, BugsTitle); } }, '-', { text : _('Refresh this grid'), iconCls : 'refresh', handler : function() { grid.store.reload(); } }] }).showAt(e.getXY()); }, rowdblclick : function(grid, rowIndex, e) { var BugsId = grid.store.getAt(rowIndex).data.id, BugsUrl = grid.store.getAt(rowIndex).data.link, BugsTitle = grid.store.getAt(rowIndex).data.title; phpDoc.NewTabBugs(BugsId, BugsUrl, BugsTitle); } }, initComponent : function() { Ext.apply(this, { title : String.format(_('Open bugs for {0}'), 'doc-' + phpDoc.userLang), tbar : [{ tooltip : _('Refresh this grid'), iconCls : 'refresh', handler : function() { ui.component.BugsGrid.reload(); } }] }); ui.component.BugsGrid.superclass.initComponent.call(this); } }); ui.component.BugsGrid.reload = function() { ui.component._BugsGrid.store.reload(); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/LocalMailGrid.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/LocalMailGrid.js +++ doc-editor/js/ui/component/LocalMailGrid.js Ext.namespace('ui','ui.component','ui.component._LocalMailGrid'); //------------------------------------------------------------------------------ // LocalMailGrid internals // Store : Mailing with Informations about phpdoc-LANG mailing ui.component._LocalMailGrid.store = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ url : './php/controller.php' }), baseParams : { task : 'getLastNews' }, reader : new Ext.data.JsonReader( { root : 'Items', totalProperty : 'nbItems', id : 'id' }, Ext.data.Record.create([ { name : 'id', mapping : 'id' }, { name : 'title', mapping : 'title' }, { name : 'link', mapping : 'link' }, { name : 'description', mapping : 'description' }, { name : 'pubDate', mapping : 'pubDate', type : 'date', dateFormat : 'Y/m/d H:i:s' } ]) ) }); ui.component._LocalMailGrid.store.setDefaultSort('pubDate', 'desc'); // LocalMailGrid columns definition ui.component._LocalMailGrid.columns = [ new Ext.grid.RowNumberer(), { id : 'GridMailingTitle', header : _('Title'), sortable : true, dataIndex : 'title' }, { header : _('By'), width : 110, sortable : true, dataIndex : 'description' }, { header : _('Date'), width : 140, sortable : true, dataIndex : 'pubDate', renderer : Ext.util.Format.dateRenderer(_('Y-m-d, H:i')) } ]; //------------------------------------------------------------------------------ // LocalMailGrid ui.component.LocalMailGrid = Ext.extend(Ext.grid.GridPanel, { iconCls : 'home-mailing-title', height : 400, width : 800, loadMask : true, autoScroll : true, autoExpandColumn : 'GridMailingTitle', store : ui.component._LocalMailGrid.store, columns : ui.component._LocalMailGrid.columns, sm : new Ext.grid.RowSelectionModel({ singleSelect: true }), listeners : { render : function(grid) { grid.store.load.defer(20, grid.store); }, rowcontextmenu : function(grid, rowIndex, e) { var MailId = grid.store.getAt(rowIndex).data.pubDate, MailUrl = grid.store.getAt(rowIndex).data.link, MailTitle = grid.store.getAt(rowIndex).data.title; grid.getSelectionModel().selectRow(rowIndex); new Ext.menu.Menu({ id : 'submenu', items : [{ text : '<b>'+_('Open in a new Tab')+'</b>', iconCls : 'openInTab', handler : function() { phpDoc.NewTabMailing(MailId, MailUrl, MailTitle); } }, '-', { text : _('Refresh this grid'), iconCls : 'refresh', handler : function() { grid.store.reload(); } }] }).showAt(e.getXY()); }, rowdblclick : function(grid, rowIndex, e) { var MailId = grid.store.getAt(rowIndex).data.pubDate, MailUrl = grid.store.getAt(rowIndex).data.link, MailTitle = grid.store.getAt(rowIndex).data.title; phpDoc.NewTabMailing(MailId, MailUrl, MailTitle); } }, initComponent : function() { Ext.apply(this, { title : String.format(_('Mails from {0}'), 'doc-' + phpDoc.userLang), tbar : [{ tooltip : _('Refresh this grid'), iconCls : 'refresh', handler : function() { ui.component.LocalMailGrid.reload(); } }] }); ui.component.LocalMailGrid.superclass.initComponent.call(this); } }); ui.component.LocalMailGrid.reload = function() { ui.component._LocalMailGrid.store.reload(); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/SummaryGrid.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/SummaryGrid.js +++ doc-editor/js/ui/component/SummaryGrid.js Ext.namespace('ui','ui.component','ui.component._SummaryGrid'); //------------------------------------------------------------------------------ // SummaryGrid Internals // Store : storeSummary with Informations like Revcheck second table ui.component._SummaryGrid.store = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ url : './php/controller.php' }), baseParams : { task : 'getSummaryInfo' }, reader : new Ext.data.JsonReader( { root : 'Items', totalProperty : 'nbItems', id : 'id' }, Ext.data.Record.create([ { name : 'id', mapping : 'id' }, { name : 'libel', mapping : 'libel' }, { name : 'nbFiles', mapping : 'nbFiles' }, { name : 'percentFiles', mapping : 'percentFiles' }, { name : 'sizeFiles', mapping : 'sizeFiles' }, { name : 'percentSize', mapping : 'percentSize' } ]) ), listeners : { load : function() { this.each(function(record) { switch (record.id) { case 1: record.set('libel', _('Up to date files')); break; case 2: record.set('libel', _('Old files')); break; case 3: record.set('libel', _('Critical files')); break; case 4: record.set('libel', _('Files without revision tag')); break; case 5: record.set('libel', _('Files available for translation')); break; case 6: record.set('libel', _('Total')); break; default: record.set('libel', ''); break; } record.commit(); }); } } }); // SummaryGrid columns definition ui.component._SummaryGrid.columns = [ new Ext.grid.RowNumberer(), { id : 'StatusType', header : _('File status type'), width : 180, sortable : true, dataIndex : 'libel' }, { header : _('Number of files'), width : 110, sortable : true, dataIndex : 'nbFiles' }, { header : _('Percent of files'), width : 110, sortable : true, dataIndex : 'percentFiles' }, { header : _('Size of files (kB)'), width : 110, sortable : true, dataIndex : 'sizeFiles' }, { header : _('Percent of size'), width : 110, sortable : true, dataIndex : 'percentSize' } ]; // SummaryGrid gridview ui.component._SummaryGrid.view = new Ext.grid.GridView({ getRowClass : function(record, numIndex, rowParams, store) { switch (record.data.id) { case 1: return 'summary_1'; case 2: return 'summary_2'; case 3: return 'summary_3'; case 4: return 'summary_4'; case 5: return 'summary_5'; default: return ''; } } }); //------------------------------------------------------------------------------ // SummaryGrid ui.component.SummaryGrid = Ext.extend(Ext.grid.GridPanel, { title : _('Summary'), loadMask : true, autoScroll : true, height : 400, width : 800, store : ui.component._SummaryGrid.store, columns : ui.component._SummaryGrid.columns, view : ui.component._SummaryGrid.view, listeners : { render : function(grid) { grid.store.load.defer(20, grid.store); }, rowdblclick : function ( grid, rowIndex, e ) { var id = grid.store.getAt(rowIndex).data.id; // Up to date files, Old files, Criticals files if( id === 1 || id === 2 || id === 3) { Ext.getCmp('acc-need-update').expand(); } } }, initComponent : function() { Ext.apply(this, { iconCls : 'flag-' + phpDoc.userLang, }); ui.component.SummaryGrid.superclass.initComponent.call(this); } }); ui.component.SummaryGrid.reload = function() { ui.component._SummaryGrid.store.reload(); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/TranslationGraph.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/TranslationGraph.js +++ doc-editor/js/ui/component/TranslationGraph.js Ext.namespace('ui','ui.component'); ui.component.TranslationGraph = Ext.extend(Ext.Panel, { title : _('Graphics'), layout : 'fit', iconCls : 'home-graphic-title', autoHeight : true, html : '<div align="center" id="graph_container" style="width: 530px; height: 302px">' + '<img id="graph_picture" src="" height="300">' + '</div>', listeners : { afterlayout : function() { var img = Ext.get('graph_picture'), imgdiv = Ext.get('graph_container'), loadMask = new Ext.LoadMask(imgdiv); img.setVisibilityMode(Ext.Element.VISIBILITY); img.on('load', function() { img.stopFx(); loadMask.hide(); img.fadeIn({ duration : 2 }); }); loadMask.show(); img.hide(); img.dom.src = "./php/controller.php?task=translationGraph"; } } }); http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/component/TranslatorGrid.js?view=markup&rev=1.1 Index: doc-editor/js/ui/component/TranslatorGrid.js +++ doc-editor/js/ui/component/TranslatorGrid.js Ext.namespace('ui','ui.component','ui.component._TranslatorGrid'); //------------------------------------------------------------------------------ // TranslatorGrid internals // Store : Translator with Informations like Revcheck first table ui.component._TranslatorGrid.store = new Ext.data.Store({ proxy : new Ext.data.HttpProxy({ url: './php/controller.php' }), baseParams : { task : 'getTranslatorInfo' }, reader : new Ext.data.JsonReader( { root : 'Items', totalProperty : 'nbItems', id : 'id' }, Ext.data.Record.create([ { name : 'id', mapping : 'id' }, { name : 'name', mapping : 'name' }, { name : 'email', mapping : 'mail' }, { name : 'nick', mapping : 'nick' }, { name : 'cvs', mapping : 'cvs' }, { name : 'uptodate', mapping : 'uptodate', type : 'int' }, { name : 'old', mapping : 'old', type : 'int' }, { name : 'critical', mapping : 'critical', type : 'int' }, { name : 'sum', mapping : 'sum', type : 'int' } ]) ) }); ui.component._TranslatorGrid.store.setDefaultSort('nick', 'asc'); // TranslatorGrid cell renderer for translator count ui.component._TranslatorGrid.translatorSumRenderer = function(value) { if (value) { var v = (value === 0 || value > 1) ? value : 1; return '(' + v + ' Translators)'; } else { return; } } // TranslatorGrid cell renderer for up-to-date column ui.component._TranslatorGrid.uptodateRenderer = function(value) { if (value === '0') { return; } else { return '<span style="color:green; font-weight: bold;">' + value + '</span>'; } } // TranslatorGrid cell renderer for old/sum column ui.component._TranslatorGrid.old_sumRenderer = function(value) { return (value === '0') ? '' : value; } // TranslatorGrid cell renderer for critical column ui.component._TranslatorGrid.criticalRenderer = function(value) { if (value === '0') { return; } else { return '<span style="color:red; font-weight: bold;">' + value + '</span>'; } } // TranslatorGrid columns definition ui.component._TranslatorGrid.columns = [ new Ext.grid.RowNumberer(), { id : 'GridTransName', header : _('Name'), sortable : true, dataIndex : 'name', summaryType : 'count', summaryRenderer : ui.component._TranslatorGrid.translatorSumRenderer }, { header : _('Email'), width : 110, sortable : true, dataIndex : 'email' }, { header : _('Nick'), width : 70, sortable : true, dataIndex : 'nick' }, { header : _('Cvs'), width : 45, sortable : true, dataIndex : 'cvs' }, { header : _('UptoDate'), width : 60, sortable : true, renderer : ui.component._TranslatorGrid.uptodateRenderer, dataIndex : 'uptodate', summaryType : 'sum' }, { header : _('Old'), width : 45, sortable : true, renderer : ui.component._TranslatorGrid.old_sumRenderer, dataIndex : 'old', summaryType : 'sum' }, { header : _('Critical'), width : 60, sortable : true, renderer : ui.component._TranslatorGrid.criticalRenderer, dataIndex : 'critical', summaryType : 'sum' }, { header : _('Sum'), width : 50, sortable : true, renderer : ui.component._TranslatorGrid.old_sumRenderer, dataIndex : 'sum', summaryType : 'sum' } ]; //------------------------------------------------------------------------------ // TranslatorGrid ui.component.TranslatorGrid = Ext.extend(Ext.grid.GridPanel, { title : _('Translators'), iconCls : 'iconTranslator', loadMask : true, autoScroll : true, height : 400, width : 800, plugins : [new Ext.ux.grid.GridSummary()], store : ui.component._TranslatorGrid.store, columns : ui.component._TranslatorGrid.columns, autoExpandColumn : 'GridTransName', listeners : { render : function(grid) { grid.store.load.defer(20, grid.store); }, rowdblclick : function(grid, rowIndex, e) { var TranslatorEmail = grid.store.getAt(rowIndex).data.email, TranslatorName = grid.store.getAt(rowIndex).data.name; grid.getSelectionModel().selectRow(rowIndex); phpDoc.sendEmail(TranslatorName, TranslatorEmail); }, rowcontextmenu: function(grid, rowIndex, e) { var TranslatorEmail = grid.store.getAt(rowIndex).data.email, TranslatorName = grid.store.getAt(rowIndex).data.name; grid.getSelectionModel().selectRow(rowIndex); new Ext.menu.Menu({ id : 'submenu', items : [{ text : '<b>' + String.format(_('Send an email to {0}'), TranslatorName) + '</b>', iconCls : 'iconSendEmail', handler : function() { phpDoc.sendEmail(TranslatorName, TranslatorEmail); } }, '-', { text : String.format(_('Send an email to the {0}'), 'doc-' + phpDoc.userLang + '@lists.php.net'), iconCls : 'iconSendEmail', handler : function() { phpDoc.sendEmail('Php Doc Team ' + phpDoc.userLang, 'doc-' + phpDoc.userLang + '@lists.php.net'); } }] }).showAt(e.getXY()); } } }); ui.component.TranslatorGrid.reload = function() { ui.component._TranslatorGrid.store.reload(); } http://cvs.php.net/viewvc.cgi/doc-editor/js/ui/PingTask.js?view=markup&rev=1.1 Index: doc-editor/js/ui/PingTask.js +++ doc-editor/js/ui/PingTask.js Ext.namespace('ui'); ui.PingTask = function() { this.task = new Ext.util.DelayedTask(function() { XHR({ url : './php/controller.php', params : { task : 'ping' }, success : function(response) { var o = Ext.util.JSON.decode(response.responseText); if (o.ping !== 'pong') { window.location.href = './'; } else { if( o.lastupdate === 'in_progress' ) { Ext.getDom('lastUpdateTime').innerHTML = _('update in progress...'); } else { var dt = Date.parseDate(o.lastupdate, "Y-m-d H:i:s"); // We update the lastupdate date/time Ext.getDom('lastUpdateTime').innerHTML = dt.format(_('Y-m-d, H:i')); } } }, failure: function() { window.location.href = './'; } }); this.task.delay(30000); }, this); // delegate this.delay = function(delay, newFn, newScope, newArgs) { this.task.delay(delay, newFn, newScope, newArgs); }; // delegate this.cancel = function() { this.task.cancel(); }; }
« previous php.doc.cvs (#4111) next »