svn: /web/doc-editor/trunk/js/ui/component/ BuildStatus.js CheckBuildPrompt.js CheckDoc.js ErrorFileGrid.js FilePanel.js LocalMailGrid.js PatchPrompt.js PendingCommitGrid.js RepositoryTree.js SummaryGrid.js TranslatorGrid.js
[email protected] (Yannick Torres)
| Newsgroups | php.doc.web |
|---|---|
| Message-ID | <[email protected]> |
yannick Mon, 19 Oct 2009 05:29:25 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=289739
Log:
exec jsLint on component/ui
Changed paths:
U web/doc-editor/trunk/js/ui/component/BuildStatus.js
U web/doc-editor/trunk/js/ui/component/CheckBuildPrompt.js
U web/doc-editor/trunk/js/ui/component/CheckDoc.js
U web/doc-editor/trunk/js/ui/component/ErrorFileGrid.js
U web/doc-editor/trunk/js/ui/component/FilePanel.js
U web/doc-editor/trunk/js/ui/component/LocalMailGrid.js
U web/doc-editor/trunk/js/ui/component/PatchPrompt.js
U web/doc-editor/trunk/js/ui/component/PendingCommitGrid.js
U web/doc-editor/trunk/js/ui/component/RepositoryTree.js
U web/doc-editor/trunk/js/ui/component/SummaryGrid.js
U web/doc-editor/trunk/js/ui/component/TranslatorGrid.js
svn-diffs-289739.txt
(text/x-diff, 30.1 KB)
Modified: web/doc-editor/trunk/js/ui/component/BuildStatus.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/BuildStatus.js 2009-10-19 05:27:59 UTC (rev 289738)
+++ web/doc-editor/trunk/js/ui/component/BuildStatus.js 2009-10-19 05:29:25 UTC (rev 289739)
@@ -39,7 +39,7 @@
ui.component._BuildStatus.rendererLanguage = function(value)
{
return '<div class="flag flag-' + value + '">' + value + '</div>';
-}
+};
// BuildStatus Grid status cell renderer
ui.component._BuildStatus.rendererStatus = function(value)
@@ -49,7 +49,7 @@
} else {
return 'Ok';
}
-}
+};
// BuildStatus Grid columns definition
ui.component._BuildStatus.columns = [
Modified: web/doc-editor/trunk/js/ui/component/CheckBuildPrompt.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/CheckBuildPrompt.js 2009-10-19 05:27:59 UTC (rev 289738)
+++ web/doc-editor/trunk/js/ui/component/CheckBuildPrompt.js 2009-10-19 05:29:25 UTC (rev 289739)
@@ -16,7 +16,7 @@
text : _('Go !'),
handler : function()
{
- new ui.task.CheckBuildTask();
+ var tmp = new ui.task.CheckBuildTask();
this.ownerCt.close();
}
}],
Modified: web/doc-editor/trunk/js/ui/component/CheckDoc.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/CheckDoc.js 2009-10-19 05:27:59 UTC (rev 289738)
+++ web/doc-editor/trunk/js/ui/component/CheckDoc.js 2009-10-19 05:29:25 UTC (rev 289739)
@@ -74,7 +74,7 @@
} else {
return;
}
-}
+};
// CheckDoc Grid columns definition
ui.component._CheckDoc.columns = [
@@ -211,7 +211,7 @@
var win = Ext.getCmp('check-doc-file-win'),
store = ui.component._CheckDoc.fs;
- phpDoc.filePendingOpen = new Array();
+ phpDoc.filePendingOpen = [];
for (var i = 0; i < store.getCount(); ++i) {
phpDoc.filePendingOpen[i] = {
@@ -238,7 +238,7 @@
.getSelectionModel()
.getSelections();
- phpDoc.filePendingOpen = new Array();
+ phpDoc.filePendingOpen = [];
for (var i = 0; i < r.length; ++i) {
phpDoc.filePendingOpen[i] = {
@@ -283,7 +283,7 @@
data = record.get(errorType),
fpath = record.data.path;
- if (Ext.num(data, false) && data != 0) {
+ if (Ext.num(data, false) && data !== 0) {
// get checkdoc file via XHR
// TODO - may change to use HttpProxy for DataStore
// remove XHR, win.open() and load from proxy
@@ -296,11 +296,12 @@
success : function(response)
{
// Must choose the file
- var o = Ext.decode(response.responseText);
+ var o = Ext.decode(response.responseText),
+ i, tmp;
// file store
ui.component._CheckDoc.fs.removeAll();
- for (var i = 0; i < o.files.length; ++i) {
+ for (i = 0; i < o.files.length; ++i) {
ui.component._CheckDoc.fs.insert(
0, new ui.component._CheckDoc.fs.recordType({
@@ -311,7 +312,7 @@
}
ui.component._CheckDoc.fs.sort('file', 'asc');
- new ui.component._CheckDoc.FileWin({
+ tmp = new ui.component._CheckDoc.FileWin({
fpath : fpath,
items : [
new ui.component._CheckDoc.FileGrid({
Modified: web/doc-editor/trunk/js/ui/component/ErrorFileGrid.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/ErrorFileGrid.js 2009-10-19 05:27:59 UTC (rev 289738)
+++ web/doc-editor/trunk/js/ui/component/ErrorFileGrid.js 2009-10-19 05:29:25 UTC (rev 289739)
@@ -96,7 +96,7 @@
Ext.apply(this, config);
this.init();
ui.component._ErrorFileGrid.menu.superclass.constructor.call(this);
-}
+};
Ext.extend(ui.component._ErrorFileGrid.menu, Ext.menu.Menu,
{
init : function()
@@ -202,11 +202,12 @@
rowcontextmenu : function(grid, rowIndex, e)
{
var FilePath = grid.store.getAt(rowIndex).data.path,
- FileName = grid.store.getAt(rowIndex).data.name;
+ FileName = grid.store.getAt(rowIndex).data.name,
+ tmp;
grid.getSelectionModel().selectRow(rowIndex);
- new ui.component._ErrorFileGrid.menu({
+ tmp = new ui.component._ErrorFileGrid.menu({
hideCommit : (grid.store.getAt(rowIndex).data.needcommit === false),
grid : grid,
event : e,
@@ -232,10 +233,7 @@
grid.store.each(function(record)
{
- if ( record.data.path === FilePath
- && record.data.name === FileName
- && !error[record.data.type]
- ) {
+ if ( record.data.path === FilePath && record.data.name === FileName && !error[record.data.type] ) {
error.push(record.data.type);
}
});
@@ -381,7 +379,7 @@
listeners : {
keypress : function(field, e)
{
- if (e.getKey() == e.ENTER) {
+ if (e.getKey() === e.ENTER) {
this.onTrigger2Click();
}
}
@@ -396,7 +394,7 @@
{
var v = this.getValue();
- if (v == '' || v.length < 3) {
+ if (v === '' || v.length < 3) {
this.markInvalid(
_('Your filter must contain at least 3 characters')
);
@@ -418,8 +416,10 @@
ui.component.ErrorFileGrid.getInstance = function(config)
{
if (!ui.component._ErrorFileGrid.instance) {
- if (!config) config = {};
+ if (!config) {
+ config = {};
+ }
ui.component._ErrorFileGrid.instance = new ui.component.ErrorFileGrid(config);
}
return ui.component._ErrorFileGrid.instance;
-}
+};
\ No newline at end of file
Modified: web/doc-editor/trunk/js/ui/component/FilePanel.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/FilePanel.js 2009-10-19 05:27:59 UTC (rev 289738)
+++ web/doc-editor/trunk/js/ui/component/FilePanel.js 2009-10-19 05:29:25 UTC (rev 289739)
@@ -10,7 +10,7 @@
Ext.apply(this, config);
this.init();
ui.component._FilePanel.tbar.menu.lang.superclass.constructor.call(this);
-}
+};
Ext.extend(ui.component._FilePanel.tbar.menu.lang, Ext.Toolbar.Button,
{
text : _('MarkUp'),
@@ -55,7 +55,7 @@
Ext.apply(this, config);
this.init();
ui.component._FilePanel.tbar.menu.en.superclass.constructor.call(this);
-}
+};
Ext.extend(ui.component._FilePanel.tbar.menu.en, Ext.Toolbar.Button,
{
text : _('MarkUp'),
@@ -406,7 +406,7 @@
iconCls : 'saveFile',
handler : function()
{
- new ui.task.AcceptPatchTask({
+ var tmp = new ui.task.AcceptPatchTask({
fid : this.fid,
fpath : this.fpath,
fname : this.fname,
@@ -421,7 +421,7 @@
iconCls : 'iconPageDelete',
handler : function()
{
- new ui.task.RejectPatchTask({
+ var tmp = new ui.task.RejectPatchTask({
fid : this.fid,
fuid : this.fuid,
storeRecord : this.storeRecord
@@ -446,9 +446,11 @@
disabled : true,
handler : function()
{
+ var tmp;
+
if (this.lang === 'en') {
- new ui.task.SaveENFileTask({
+ tmp = new ui.task.SaveENFileTask({
prefix : this.prefix,
ftype : this.ftype,
fid : this.fid,
@@ -460,7 +462,7 @@
} else {
if (this.prefix === 'AF') {
- new ui.task.SaveLangFileTask({
+ tmp = new ui.task.SaveLangFileTask({
prefix : this.prefix,
ftype : this.ftype,
fid : this.fid,
@@ -481,7 +483,7 @@
{
if (btn === 'no') {
- new ui.task.SaveLangFileTask({
+ tmp = new ui.task.SaveLangFileTask({
prefix : this.prefix,
ftype : this.ftype,
fid : this.fid,
@@ -493,7 +495,7 @@
} else if (btn === 'yes') {
- new ui.task.CheckFileTask({
+ tmp = new ui.task.CheckFileTask({
prefix : this.prefix,
ftype : this.ftype,
fid : this.fid,
@@ -515,15 +517,14 @@
disabled : true,
handler : function()
{
- new ui.component.PatchPrompt({
+ var tmp = new ui.component.PatchPrompt({
prefix : this.prefix,
ftype : this.ftype,
fid : this.fid,
fpath : this.fpath,
fname : this.fname,
lang : this.lang,
- defaultEmail : (phpDoc.userLogin !== 'cvsread')
- ? phpDoc.userLogin + '@php.net' : ''
+ defaultEmail : (phpDoc.userLogin !== 'cvsread') ? phpDoc.userLogin + '@php.net' : ''
}).show();
}
}, '-', {
@@ -534,9 +535,7 @@
{
Ext.getCmp(id_prefix + '-FILE-' + this.fid).reIndentAll();
}
- }, (this.lang === 'en')
- ? new ui.component._FilePanel.tbar.menu.en({ comp_id : id_prefix + '-FILE-' + this.fid })
- : new ui.component._FilePanel.tbar.menu.lang({ comp_id : id_prefix + '-FILE-' + this.fid })
+ }, (this.lang === 'en') ? new ui.component._FilePanel.tbar.menu.en({ comp_id : id_prefix + '-FILE-' + this.fid }) : new ui.component._FilePanel.tbar.menu.lang({ comp_id : id_prefix + '-FILE-' + this.fid })
];
} else {
this.tbar = [{}]; // empty tbar for readonly file
@@ -555,21 +554,19 @@
scope : this,
initialize : function()
{
- new ui.task.GetFileTask({
+ var tmp = new ui.task.GetFileTask({
prefix : this.prefix,
ftype : this.ftype,
fid : this.fid,
- fpath : (this.isPatch)
- ? this.fpath
- : this.lang + this.fpath,
- fname : (this.isPatch)
- ? this.fname + '.' + this.fuid + '.patch'
- : this.fname
+ fpath : (this.isPatch) ? this.fpath : this.lang + this.fpath,
+ fname : (this.isPatch) ? this.fname + '.' + this.fuid + '.patch' : this.fname
});
},
cmchange : function(keyCode, charCode, obj)
{
- if ( keyCode === 116 ) return; // 116 = f5
+ if (keyCode === 116) {
+ return;
+ } // 116 = f5
var cursorPosition = Ext.util.JSON.decode(
Ext.getCmp(id_prefix + '-FILE-' + this.fid)
@@ -582,19 +579,7 @@
// 38 = arrow up; 40 = arrow down; 37 = arrow left; 39 = arrow right;
// 34 = pageDown; 33 = pageUp; 27 = esc; 17 = CRTL; 16 = ALT; 67 = CTRL+C
// 35 = end; 36 = home
- if ( keyCode !== 27
- && keyCode !== 33
- && keyCode !== 34
- && keyCode !== 37
- && keyCode !== 38
- && keyCode !== 39
- && keyCode !== 40
- && keyCode !== 17
- && keyCode !== 16
- && keyCode !== 67
- && keyCode !== 35
- && keyCode !== 36
- ) {
+ if ( keyCode !== 27 && keyCode !== 33 && keyCode !== 34 && keyCode !== 37 && keyCode !== 38 && keyCode !== 39 && keyCode !== 40 && keyCode !== 17 && keyCode !== 16 && keyCode !== 67 && keyCode !== 35 && keyCode !== 36 ) {
if (!Ext.getCmp(id_prefix + '-FILE-' + this.fid).isModified) {
// Add an [modified] in title
Ext.getCmp(id_prefix + '-PANEL-' + this.fid).setTitle(
Modified: web/doc-editor/trunk/js/ui/component/LocalMailGrid.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/LocalMailGrid.js 2009-10-19 05:27:59 UTC (rev 289738)
+++ web/doc-editor/trunk/js/ui/component/LocalMailGrid.js 2009-10-19 05:29:25 UTC (rev 289739)
@@ -81,7 +81,7 @@
{
grid.getSelectionModel().selectRow(rowIndex);
- new Ext.menu.Menu({
+ var tmp = new Ext.menu.Menu({
id : 'submenu',
items : [{
text : '<b>'+_('Open in a new Tab')+'</b>',
@@ -151,8 +151,10 @@
ui.component.LocalMailGrid.getInstance = function(config)
{
if (!ui.component._LocalMailGrid.instance) {
- if (!config) config = {};
+ if (!config) {
+ config = {};
+ }
ui.component._LocalMailGrid.instance = new ui.component.LocalMailGrid(config);
}
return ui.component._LocalMailGrid.instance;
-}
+};
\ No newline at end of file
Modified: web/doc-editor/trunk/js/ui/component/PatchPrompt.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/PatchPrompt.js 2009-10-19 05:27:59 UTC (rev 289738)
+++ web/doc-editor/trunk/js/ui/component/PatchPrompt.js 2009-10-19 05:29:25 UTC (rev 289739)
@@ -37,7 +37,7 @@
text : _('Save'),
handler : function()
{
- new ui.task.SavePatchTask({
+ var tmp = new ui.task.SavePatchTask({
prefix : this.prefix,
fid : this.fid,
ftype : this.ftype,
Modified: web/doc-editor/trunk/js/ui/component/PendingCommitGrid.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/PendingCommitGrid.js 2009-10-19 05:27:59 UTC (rev 289738)
+++ web/doc-editor/trunk/js/ui/component/PendingCommitGrid.js 2009-10-19 05:29:25 UTC (rev 289739)
@@ -104,7 +104,7 @@
Ext.apply(this, config);
this.init();
ui.component._PendingCommitGrid.menu.common.superclass.constructor.call(this);
-}
+};
Ext.extend(ui.component._PendingCommitGrid.menu.common, Ext.menu.Item,
{
init : function()
@@ -126,9 +126,10 @@
fdbid = record.data.id,
fpath = record.data.path,
fname = record.data.name,
- fid = Ext.util.md5(fpath + fname);
+ fid = Ext.util.md5(fpath + fname),
+ tmp;
- new ui.component.CommitPrompt({
+ tmp = new ui.component.CommitPrompt({
files : [{
fid : fid,
fpath : fpath,
@@ -144,7 +145,8 @@
handler : function()
{
var files = [],
- grid = ui.component.PendingCommitGrid.getInstance();
+ grid = ui.component.PendingCommitGrid.getInstance(),
+ tmp;
grid.store.each(function(record)
{
@@ -162,7 +164,7 @@
}
});
- new ui.component.CommitPrompt({
+ tmp = new ui.component.CommitPrompt({
files : files
}).show();
}
@@ -173,7 +175,8 @@
handler : function()
{
var files = [],
- grid = ui.component.PendingCommitGrid.getInstance();
+ grid = ui.component.PendingCommitGrid.getInstance(),
+ tmp;
grid.store.each(function(record)
{
@@ -189,7 +192,7 @@
});
});
- new ui.component.CommitPrompt({
+ tmp = new ui.component.CommitPrompt({
files : files
}).show();
}
@@ -206,7 +209,7 @@
Ext.apply(this, config);
this.init();
ui.component._PendingCommitGrid.menu.update.superclass.constructor.call(this);
-}
+};
Ext.extend(ui.component._PendingCommitGrid.menu.update, Ext.menu.Menu,
{
init : function()
@@ -283,7 +286,7 @@
disabled : (phpDoc.userLogin === 'cvsread'),
handler : function()
{
- new ui.task.ClearLocalChangeTask({
+ var tmp = new ui.task.ClearLocalChangeTask({
storeRecord : this.grid.store.getAt(this.rowIdx),
ftype : 'update',
fpath : this.fpath,
@@ -305,7 +308,7 @@
Ext.apply(this, config);
this.init();
ui.component._PendingCommitGrid.menu.del.superclass.constructor.call(this);
-}
+};
Ext.extend(ui.component._PendingCommitGrid.menu.del, Ext.menu.Menu,
{
init : function()
@@ -348,13 +351,14 @@
var storeRecord = grid.store.getAt(rowIndex),
FileType = storeRecord.data.type,
FilePath = storeRecord.data.path,
- FileName = storeRecord.data.name;
+ FileName = storeRecord.data.name,
+ tmp;
grid.getSelectionModel().selectRow(rowIndex);
if (FileType === 'delete') {
- new ui.component._PendingCommitGrid.menu.del({
+ tmp = new ui.component._PendingCommitGrid.menu.del({
grid : grid,
rowIdx : rowIndex,
event : e
@@ -362,7 +366,7 @@
}
if (FileType === 'update') {
- new ui.component._PendingCommitGrid.menu.update({
+ tmp = new ui.component._PendingCommitGrid.menu.update({
fpath : FilePath,
fname : FileName,
grid : grid,
@@ -376,14 +380,15 @@
var storeRecord = grid.store.getAt(rowIndex),
FileType = storeRecord.data.type,
FilePath = storeRecord.data.path,
- FileName = storeRecord.data.name;
+ FileName = storeRecord.data.name,
+ tmp;
if (FileType === 'update') {
ui.component.RepositoryTree.getInstance().openFile(FilePath, FileName);
}
if (FileType === 'delete') {
- new ui.task.ClearLocalChangeTask({
+ tmp = new ui.task.ClearLocalChangeTask({
storeRecord : storeRecord,
ftype : FileType,
fpath : FilePath,
@@ -440,8 +445,10 @@
ui.component.PendingCommitGrid.getInstance = function(config)
{
if (!ui.component._PendingCommitGrid.instance) {
- if (!config) config = {};
+ if (!config) {
+ config = {};
+ }
ui.component._PendingCommitGrid.instance = new ui.component.PendingCommitGrid(config);
}
return ui.component._PendingCommitGrid.instance;
-}
+};
\ No newline at end of file
Modified: web/doc-editor/trunk/js/ui/component/RepositoryTree.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/RepositoryTree.js 2009-10-19 05:27:59 UTC (rev 289738)
+++ web/doc-editor/trunk/js/ui/component/RepositoryTree.js 2009-10-19 05:29:25 UTC (rev 289739)
@@ -23,7 +23,7 @@
Ext.apply(this, config);
this.init();
ui.component._RepositoryTree.menu.folder.superclass.constructor.call(this);
-}
+};
Ext.extend(ui.component._RepositoryTree.menu.folder, Ext.menu.Menu,
{
init : function()
@@ -31,15 +31,17 @@
Ext.apply(this,
{
items : [{
- text : (this.node.isExpanded())
- ? '<b>' + _('Collapse') + '</b>'
- : '<b>' + _('Expand') + '</b>',
+ text : (this.node.isExpanded()) ? '<b>' + _('Collapse') + '</b>' : '<b>' + _('Expand') + '</b>',
iconCls : 'iconFolderClose',
scope : this,
handler : function()
{
- if (this.node.isExpanded()) this.node.collapse();
- else this.node.expand();
+ if (this.node.isExpanded()) {
+ this.node.collapse();
+ }
+ else {
+ this.node.expand();
+ }
}
}]
});
@@ -53,7 +55,7 @@
Ext.apply(this, config);
this.init();
ui.component._RepositoryTree.menu.file.superclass.constructor.call(this);
-}
+};
Ext.extend(ui.component._RepositoryTree.menu.file, Ext.menu.Menu,
{
init : function()
@@ -81,12 +83,7 @@
}
}, {
hidden : (this.node.attributes.from === 'search'),
- text : (FileLang === 'en')
- ? String.format(
- _('Open the same file in <b>{0}</b>'),
- Ext.util.Format.uppercase(phpDoc.userLang))
- : String.format(
- _('Open the same file in <b>{0}</b>'), 'EN'),
+ text : (FileLang === 'en') ? String.format( _('Open the same file in <b>{0}</b>'), Ext.util.Format.uppercase(phpDoc.userLang)) : String.format( _('Open the same file in <b>{0}</b>'), 'EN'),
iconCls : 'iconTabNeedReviewed',
scope : this,
handler : function()
@@ -123,14 +120,15 @@
listeners: {
contextmenu : function(node, e)
{
+ var tmp;
node.select();
if (node.attributes.type === 'folder' || node.isRoot) {
- new ui.component._RepositoryTree.menu.folder({
+ tmp = new ui.component._RepositoryTree.menu.folder({
node : node
}).showAt(e.getXY());
} else if (node.attributes.type === 'file') {
- new ui.component._RepositoryTree.menu.file({
+ tmp = new ui.component._RepositoryTree.menu.file({
node : node
}).showAt(e.getXY());
}
@@ -294,7 +292,7 @@
var instance = ui.component._RepositoryTree.instance,
v = this.getValue();
- if( v == '' || v.length < 3) {
+ if( v === '' || v.length < 3) {
this.markInvalid(_('Your search must contain at least 3 characters'));
return;
}
@@ -320,7 +318,7 @@
});
ui.component.RepositoryTree.superclass.initComponent.call(this);
- new Ext.tree.TreeSorter(this, {
+ var tmp = new Ext.tree.TreeSorter(this, {
folderSort : true
});
},
@@ -334,10 +332,10 @@
node.ensureVisible();
if (t[0] && t[0] !== '') {
// walk into childs
- for (var i = 0; i < node.childNodes.length; ++i) {
- if (node.childNodes[i].text === t[0]) {
+ for (var j = 0; j < node.childNodes.length; ++j) {
+ if (node.childNodes[j].text === t[0]) {
t.shift();
- node.childNodes[i].expand(false, true, cb.createDelegate(this));
+ node.childNodes[j].expand(false, true, cb.createDelegate(this));
}
}
} else {
@@ -350,7 +348,7 @@
}
}
}
- }
+ };
this.root.expand(false, true, cb.createDelegate(this));
}
});
@@ -360,8 +358,10 @@
ui.component.RepositoryTree.getInstance = function(config)
{
if (!ui.component._RepositoryTree.instance) {
- if (!config) config = {};
+ if (!config) {
+ config = {};
+ }
ui.component._RepositoryTree.instance = new ui.component.RepositoryTree(config);
}
return ui.component._RepositoryTree.instance;
-}
+};
\ No newline at end of file
Modified: web/doc-editor/trunk/js/ui/component/SummaryGrid.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/SummaryGrid.js 2009-10-19 05:27:59 UTC (rev 289738)
+++ web/doc-editor/trunk/js/ui/component/SummaryGrid.js 2009-10-19 05:29:25 UTC (rev 289739)
@@ -135,7 +135,7 @@
{
Ext.apply(this,
{
- iconCls : 'flag-' + phpDoc.userLang,
+ iconCls : 'flag-' + phpDoc.userLang
});
ui.component.SummaryGrid.superclass.initComponent.call(this);
}
@@ -146,8 +146,10 @@
ui.component.SummaryGrid.getInstance = function(config)
{
if (!ui.component._SummaryGrid.instance) {
- if (!config) config = {};
+ if (!config) {
+ config = {};
+ }
ui.component._SummaryGrid.instance = new ui.component.SummaryGrid(config);
}
return ui.component._SummaryGrid.instance;
-}
+};
Modified: web/doc-editor/trunk/js/ui/component/TranslatorGrid.js
===================================================================
--- web/doc-editor/trunk/js/ui/component/TranslatorGrid.js 2009-10-19 05:27:59 UTC (rev 289738)
+++ web/doc-editor/trunk/js/ui/component/TranslatorGrid.js 2009-10-19 05:29:25 UTC (rev 289739)
@@ -60,7 +60,7 @@
} else {
return;
}
-}
+};
// TranslatorGrid cell renderer for up-to-date column
ui.component._TranslatorGrid.uptodateRenderer = function(value)
@@ -70,13 +70,13 @@
} 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)
@@ -86,7 +86,7 @@
} else {
return '<span style="color:red; font-weight: bold;">' + value + '</span>';
}
-}
+};
// TranslatorGrid columns definition
ui.component._TranslatorGrid.columns = [
@@ -170,7 +170,7 @@
grid.getSelectionModel().selectRow(rowIndex);
- new ui.component.EmailPrompt({
+ var tmp = new ui.component.EmailPrompt({
name : TranslatorName,
email : TranslatorEmail
}).show();
@@ -182,14 +182,14 @@
grid.getSelectionModel().selectRow(rowIndex);
- new Ext.menu.Menu({
+ var tmp = new Ext.menu.Menu({
id : 'submenu',
items : [{
text : '<b>' + String.format(_('Send an email to {0}'), TranslatorName) + '</b>',
iconCls : 'iconSendEmail',
handler : function()
{
- new ui.component.EmailPrompt({
+ var tmp = new ui.component.EmailPrompt({
name : TranslatorName,
email : TranslatorEmail
}).show();
@@ -199,7 +199,7 @@
iconCls : 'iconSendEmail',
handler : function()
{
- new ui.component.EmailPrompt({
+ var tmp = new ui.component.EmailPrompt({
name : 'Php Doc Team ' + phpDoc.userLang,
email : 'doc-' + phpDoc.userLang + '@lists.php.net'
}).show();
@@ -215,8 +215,10 @@
ui.component.TranslatorGrid.getInstance = function(config)
{
if (!ui.component._TranslatorGrid.instance) {
- if (!config) config = {};
+ if (!config) {
+ config = {};
+ }
ui.component._TranslatorGrid.instance = new ui.component.TranslatorGrid(config);
}
return ui.component._TranslatorGrid.instance;
-}
+};