diff --git a/static/plugin_dbui/CHANGELOG b/static/plugin_dbui/CHANGELOG index 47ef55636b273e0ce02bd9302e4e1b93da48f5f6..f00201572b168f6866dc8bfac9c2c94c7f032acc 100644 --- a/static/plugin_dbui/CHANGELOG +++ b/static/plugin_dbui/CHANGELOG @@ -1,6 +1,8 @@ --------------------------------- CHANGE LOG ---------------------------------- HEAD + - Deploy the javascript statement "use strict" in order + to comply with JSLINT. 0.4.11.0 (Mar 2013) - Upgrade to run with alias table. diff --git a/static/plugin_dbui/src/base.js b/static/plugin_dbui/src/base.js index 89f0721dc3a71ca8df898fb18e652e23a0e35a66..9ffaeb82b53d32a495677e3ca3e38d853092e82f 100644 --- a/static/plugin_dbui/src/base.js +++ b/static/plugin_dbui/src/base.js @@ -29,6 +29,7 @@ App.version = '0.4.11.0'; * @param {String} field */ App.encodeField = function (table, field) { + "use strict"; var t, f; t = table[0].toUpperCase() + table.slice(1, table.length); f = field[0].toUpperCase() + field.slice(1, field.length); @@ -51,6 +52,8 @@ App.encodeField = function (table, field) { */ App.getStore = function (storeId) { + "use strict"; + var cfg, store, table; @@ -92,7 +95,6 @@ App.getStore = function (storeId) { default: throw new Error('Fail to instanciate the object: "' + cfg.xtype + '"'); - break; } } return store; @@ -105,6 +107,7 @@ App.getStore = function (storeId) { * @param {App.data.DirectStore} store */ App.getTableName = function (store) { + "use strict"; return store.baseParams.tableName; }; @@ -116,6 +119,8 @@ App.getTableName = function (store) { */ App.isPlugin = function (component, ptype) { + "use strict"; + var i, plugin; diff --git a/static/plugin_dbui/src/basepanelwithselector.js b/static/plugin_dbui/src/basepanelwithselector.js index a6f6643212403acf57d9309986907bd18a3171dd..a5db6db4b12fe9ca61f4d5fbd8b2dbae0faf9381 100644 --- a/static/plugin_dbui/src/basepanelwithselector.js +++ b/static/plugin_dbui/src/basepanelwithselector.js @@ -56,6 +56,8 @@ App.BasePanelWithSelector = Ext.extend(Ext.Panel, { */ constructor: function(config) { + "use strict"; + var cfg, itemPanel, itemSelector, @@ -104,7 +106,7 @@ App.BasePanelWithSelector = Ext.extend(Ext.Panel, { Ext.apply(this, cfg); - // instanciate the panel + // instantiate the panel App.BasePanelWithSelector.superclass.constructor.call(this); } }); diff --git a/static/plugin_dbui/src/buttondownload.js b/static/plugin_dbui/src/buttondownload.js index 628a285ffa62f9fa6017a070ec26cca1ee3038cc..6550dce18130f986e2340c8b962bf5d184fc05d2 100644 --- a/static/plugin_dbui/src/buttondownload.js +++ b/static/plugin_dbui/src/buttondownload.js @@ -21,6 +21,8 @@ App.ButtonDownload = Ext.extend(Ext.Button, { */ initComponent: function () { + "use strict"; + // initialize the underlying class App.ButtonDownload.superclass.initComponent.call(this); @@ -34,13 +36,15 @@ App.ButtonDownload = Ext.extend(Ext.Button, { * * NOTE: this method add and iframe at the end of the DOM document * the source of the iframe is the url pointing on the server conroller. - * The latter returun a document which is automatically loaded. + * The latter return a document which is automatically loaded. * * Method suggested on the sencha forum: * www.sencha.com/forum/showthread.php?26471-Download-File-on%28-click-%29 */ onDownload: function (button, event) { + "use strict"; + // remove existing iframe try { Ext.destroy(Ext.get('downloadIframe')); diff --git a/static/plugin_dbui/src/combobox.js b/static/plugin_dbui/src/combobox.js index 6ca93a8abe2cc1abe0476f01d02d5d896cdf6f2a..ae36adc8d999cf56a9fd0ecda4361c380854cf23 100644 --- a/static/plugin_dbui/src/combobox.js +++ b/static/plugin_dbui/src/combobox.js @@ -26,6 +26,8 @@ App.form.ComboBox = Ext.extend(Ext.form.ComboBox, { */ initComponent: function () { + "use strict"; + // defined the empty text from the field label if (this.fieldLabel && !this.emptyText) { this.emptyText = "Select a " + this.fieldLabel + " ..."; diff --git a/static/plugin_dbui/src/form.js b/static/plugin_dbui/src/form.js index e10098620701641acef9997dbd94ba62d114b1f8..a1ddaa92327de3da2799e6c21fab590c75176359 100644 --- a/static/plugin_dbui/src/form.js +++ b/static/plugin_dbui/src/form.js @@ -63,6 +63,8 @@ App.form.FormPanel = Ext.extend(Ext.form.FormPanel, { */ initComponent: function () { + "use strict"; + // helper function to reset the form // the scope is Ext.data.BasicStore function resetForm() { @@ -92,6 +94,8 @@ App.form.FormPanel = Ext.extend(Ext.form.FormPanel, { */ disableFields: function (bool) { + "use strict"; + var form = this.getForm(); form.items.each(function (field) { @@ -108,6 +112,8 @@ App.form.FormPanel = Ext.extend(Ext.form.FormPanel, { */ doAction: function () { + "use strict"; + var form = this.getForm(), newRecord; @@ -159,6 +165,9 @@ App.form.FormPanel = Ext.extend(Ext.form.FormPanel, { * */ hardReset: function () { + + "use strict"; + var form = this.getForm(); form.items.each(function (field) { @@ -180,6 +189,8 @@ App.form.FormPanel = Ext.extend(Ext.form.FormPanel, { */ onStoreException: function (proxy, type, action, options, response, arg) { + "use strict"; + var i, field, fieldName, @@ -251,6 +262,8 @@ App.form.FormPanel = Ext.extend(Ext.form.FormPanel, { */ setAction: function (action, record) { + "use strict"; + var form = this.getForm(), table, tableId; @@ -305,6 +318,8 @@ App.form.FormPanel = Ext.extend(Ext.form.FormPanel, { */ updateRecord: function (record) { + "use strict"; + var combo, field, fields = [], @@ -313,6 +328,10 @@ App.form.FormPanel = Ext.extend(Ext.form.FormPanel, { rec, value; + function pushToFields(key, value) { + fields.push(value); + } + // get the list of dirty fields items = this.findByType('field'); for (i = 0; i < items.length; i += 1) { @@ -325,9 +344,7 @@ App.form.FormPanel = Ext.extend(Ext.form.FormPanel, { // include dirty fields embedded in composite fields items = this.findByType('compositefield'); for (i = 0; i < items.length; i += 1) { - items[i].items.eachKey(function(key, subfield) { - fields.push(subfield); - }); + items[i].items.eachKey(pushToFields); } // update the record diff --git a/static/plugin_dbui/src/grid.js b/static/plugin_dbui/src/grid.js index c74cc41b5fbe206462a26e41f1ff1b0266306a0e..2eb62a56e4d9f5696a375901c8bc019f5a1939cf 100644 --- a/static/plugin_dbui/src/grid.js +++ b/static/plugin_dbui/src/grid.js @@ -41,6 +41,8 @@ App.grid.Grid = Ext.extend(Ext.grid.GridPanel, { */ constructor: function (config) { + "use strict"; + var first_column = config.columns[0]; if ('xtype' in first_column && first_column.xtype === 'rownumberer') { @@ -55,6 +57,8 @@ App.grid.Grid = Ext.extend(Ext.grid.GridPanel, { */ initComponent: function () { + "use strict"; + // link the grid to the data store this.store = App.getStore(this.store); @@ -85,6 +89,8 @@ App.grid.Grid = Ext.extend(Ext.grid.GridPanel, { */ reset: function () { + "use strict"; + var action; // private function to emit the resetgrid event diff --git a/static/plugin_dbui/src/gridfilter.js b/static/plugin_dbui/src/gridfilter.js index 00fb8cb08be794f9300f2349b7539432065d52f1..1f423d8f65aa7b8b584e8a10cccf931601f1bde8 100644 --- a/static/plugin_dbui/src/gridfilter.js +++ b/static/plugin_dbui/src/gridfilter.js @@ -46,6 +46,8 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, { */ initComponent: function () { + "use strict"; + var field, fields, i; @@ -80,6 +82,8 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, { */ bind: function (grid) { + "use strict"; + this.store = grid.getStore(); // paging toolbar ? @@ -98,6 +102,8 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, { */ onChange: function (field) { + "use strict"; + // setup the filter conditions this.setupCondition(field); @@ -110,6 +116,8 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, { */ onReset: function () { + "use strict"; + // reset field values and filter conditions this.reset(); @@ -125,6 +133,8 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, { */ reset: function () { + "use strict"; + var fields = this.findByType('field'), i; @@ -143,6 +153,8 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, { */ setupCondition: function (field) { + "use strict"; + var conditions = [], i, k, @@ -193,6 +205,8 @@ App.grid.GridFilter = Ext.extend(Ext.form.FieldSet, { */ updateStore: function () { + "use strict"; + var bbar = this.pagingToolbar, nRows, slider; diff --git a/static/plugin_dbui/src/gridwithfilter.js b/static/plugin_dbui/src/gridwithfilter.js index 4a42cdfad958886865e784bad1f631fefa646a7b..fffee4db62d37fba058ff08ad2fc3397ec23e380 100644 --- a/static/plugin_dbui/src/gridwithfilter.js +++ b/static/plugin_dbui/src/gridwithfilter.js @@ -12,6 +12,8 @@ App.grid.GridWithFilter = Ext.extend(App.BasePanelWithSelector, { initComponent: function() { + "use strict"; + var filter, grid; diff --git a/static/plugin_dbui/src/jsonstore.js b/static/plugin_dbui/src/jsonstore.js index 17243dfeb30719b2be27e6252702aeea30cb887b..b7ecce54219686814dd59d18b1d4061af562ab99 100644 --- a/static/plugin_dbui/src/jsonstore.js +++ b/static/plugin_dbui/src/jsonstore.js @@ -55,6 +55,8 @@ App.data.DirectStore = Ext.extend(Ext.data.DirectStore, { */ constructor: function (config) { + "use strict"; + var cfg, cfgWrt, i; @@ -106,6 +108,8 @@ App.data.DirectStore = Ext.extend(Ext.data.DirectStore, { */ onWrite: function (store, action) { + "use strict"; + switch (action) { case 'create': store.totalLength += 1; @@ -123,6 +127,8 @@ App.data.DirectStore = Ext.extend(Ext.data.DirectStore, { */ restoreWhere: function () { + "use strict"; + var i; if ('where' in this.baseParams) { diff --git a/static/plugin_dbui/src/linkedcombobox.js b/static/plugin_dbui/src/linkedcombobox.js index d3fc68be8db3e34277662183ef428e1e377488fd..dc280a52bf824ec7428795f0b54f4004ca1b438d 100644 --- a/static/plugin_dbui/src/linkedcombobox.js +++ b/static/plugin_dbui/src/linkedcombobox.js @@ -39,6 +39,8 @@ App.form.LinkedComboBox = Ext.extend(Ext.form.ComboBox, { */ initComponent: function () { + "use strict"; + // common configuration this.triggerAction = 'all'; @@ -95,6 +97,7 @@ App.form.LinkedComboBox = Ext.extend(Ext.form.ComboBox, { * @param {Integer} index */ filterMasterStore: function (combo, record, index) { + "use strict"; this.masterStore.filter(this.valueField, combo.getValue()); }, @@ -105,6 +108,8 @@ App.form.LinkedComboBox = Ext.extend(Ext.form.ComboBox, { */ initSlave: function () { + "use strict"; + // Reset and disable the combobox. // // NOTE @@ -146,6 +151,8 @@ App.form.LinkedComboBox = Ext.extend(Ext.form.ComboBox, { */ loadMasterData: function () { + "use strict"; + var data = [], key, keys = [], @@ -171,7 +178,10 @@ App.form.LinkedComboBox = Ext.extend(Ext.form.ComboBox, { */ onDataChanged: function () { + "use strict"; + var value = this.store.getAt(0).get(this.valueField); + this.setValue(value); this.enable(); } diff --git a/static/plugin_dbui/src/panelwithurlselector.js b/static/plugin_dbui/src/panelwithurlselector.js index d93ded3b41f5492a4ecca79f03fc8c7b1fba5582..5923b888f943128bce80104da1f9d64840e23df9 100644 --- a/static/plugin_dbui/src/panelwithurlselector.js +++ b/static/plugin_dbui/src/panelwithurlselector.js @@ -69,6 +69,8 @@ App.PanelWithUrlSelector = Ext.extend(App.BasePanelWithSelector, { */ initComponent: function () { + "use strict"; + App.PanelWithUrlSelector.superclass.initComponent.call(this); // connect the buttons @@ -81,6 +83,8 @@ App.PanelWithUrlSelector = Ext.extend(App.BasePanelWithSelector, { */ onGo: function() { + "use strict"; + var fields, i, mainPanel = this.getComponent('mainPanel'), @@ -91,6 +95,10 @@ App.PanelWithUrlSelector = Ext.extend(App.BasePanelWithSelector, { urlFunc = null, urlExt = null; + function extract(key, subfield) { + params[subfield.getName()] = subfield.getValue(); + } + // activate the auto scrolling mainPanel.setAutoScroll(true); @@ -114,9 +122,7 @@ App.PanelWithUrlSelector = Ext.extend(App.BasePanelWithSelector, { // extract parameters embedded in composite fields fields = this.findByType('compositefield'); for (i = 0; i < fields.length; i += 1) { - fields[i].items.eachKey(function(key, subfield) { - params[subfield.getName()] = subfield.getValue(); - }); + fields[i].items.eachKey(extract); } // build the URL @@ -156,6 +162,8 @@ App.PanelWithUrlSelector = Ext.extend(App.BasePanelWithSelector, { */ onLoad: function(el, success, response, options) { + "use strict"; + var panelWithSelector = this; // errors detection @@ -176,6 +184,8 @@ App.PanelWithUrlSelector = Ext.extend(App.BasePanelWithSelector, { */ onReset: function () { + "use strict"; + var fields, i, selector = this.getComponent('selectorPanel'); diff --git a/static/plugin_dbui/src/pformtooltip.js b/static/plugin_dbui/src/pformtooltip.js index 962a2ac8d4cc59f0dcecfb49102f94b467162bda..55d194bde9dd4084591f93bc4f8ea9a7e139b3f7 100644 --- a/static/plugin_dbui/src/pformtooltip.js +++ b/static/plugin_dbui/src/pformtooltip.js @@ -25,6 +25,8 @@ App.form.ToolTip = Ext.extend(Object, { */ init: function (basicform) { + "use strict"; + var form = basicform; function createToolTip(c) { diff --git a/static/plugin_dbui/src/pgridexpertmenu.js b/static/plugin_dbui/src/pgridexpertmenu.js index 2ea70f297d201b47a3ee2c5e4274080829994f37..48a7eee10cb11d9b4d567ddfb2d9466b68f0ff88 100644 --- a/static/plugin_dbui/src/pgridexpertmenu.js +++ b/static/plugin_dbui/src/pgridexpertmenu.js @@ -23,6 +23,8 @@ App.grid.ExpertMenu = Ext.extend(Object, { */ init: function(grid) { + "use strict"; + var bbar = grid.getBottomToolbar(), menu; @@ -46,6 +48,7 @@ App.grid.ExpertMenu = Ext.extend(Object, { * Handler to reset grid, its filters and its paging options */ onReset: function () { + "use strict"; var grid = this; grid.reset(); } diff --git a/static/plugin_dbui/src/pgridmathjax.js b/static/plugin_dbui/src/pgridmathjax.js index cf81631278c2e77c0acf9831a8dd9c4f9d75358b..a689de5a12be861a3d95141ce717f11decf1f3e0 100644 --- a/static/plugin_dbui/src/pgridmathjax.js +++ b/static/plugin_dbui/src/pgridmathjax.js @@ -13,6 +13,8 @@ App.grid.MathJax = Ext.extend(Object, { init: function (grid) { + "use strict"; + function processMath(gridView) { var domEl = Ext.getDom(gridView.el); MathJax.Hub.Queue(["Typeset", MathJax.Hub, domEl]); diff --git a/static/plugin_dbui/src/pgridpaging.js b/static/plugin_dbui/src/pgridpaging.js index f77a6210fea10a572816e9fde5fb1eca864326d1..61c42d56672b769229b2afb3b7c0a23ce8a5b86e 100644 --- a/static/plugin_dbui/src/pgridpaging.js +++ b/static/plugin_dbui/src/pgridpaging.js @@ -28,6 +28,8 @@ App.grid.Paging = Ext.extend(Object, { */ init: function (grid) { + "use strict"; + var bbar; // create the paging bar @@ -80,6 +82,7 @@ App.grid.Paging = Ext.extend(Object, { * the scope is the bottom tool bar */ onChangePageSize: function (slider, newValue, thumb) { + "use strict"; var bbar = this; bbar.pageSize = newValue; bbar.moveFirst(); @@ -91,6 +94,8 @@ App.grid.Paging = Ext.extend(Object, { */ onInit: function (store, records, options) { + "use strict"; + var bbar, grid = this, nRecords = store.getTotalCount(), @@ -111,6 +116,9 @@ App.grid.Paging = Ext.extend(Object, { * The scope is the grid */ onReset: function() { + + "use strict"; + var bbar, grid = this, slider; @@ -131,6 +139,8 @@ App.grid.Paging = Ext.extend(Object, { */ onWrite: function () { + "use strict"; + var bbar, grid = this, slider; diff --git a/static/plugin_dbui/src/pgridroweditorbase.js b/static/plugin_dbui/src/pgridroweditorbase.js index c3985316b0baf204757ce98e279c976b8337ff92..f4bce0f2db683a5a006d568f9ea25bd40d19e091 100644 --- a/static/plugin_dbui/src/pgridroweditorbase.js +++ b/static/plugin_dbui/src/pgridroweditorbase.js @@ -51,6 +51,8 @@ App.grid.RowEditor = Ext.extend(Ext.Window, { */ init: function (grid) { + "use strict"; + var table; this.grid = grid; @@ -81,6 +83,9 @@ App.grid.RowEditor = Ext.extend(Ext.Window, { * @param {Object} response */ addFormPanel: function (provider, response) { + + "use strict"; + var formCfg = response.result; // instantiate the form @@ -101,6 +106,8 @@ App.grid.RowEditor = Ext.extend(Ext.Window, { */ getSelected: function () { + "use strict"; + var record = this.grid.getSelectionModel().getSelected(); if (!record) { @@ -118,6 +125,8 @@ App.grid.RowEditor = Ext.extend(Ext.Window, { */ onAddRow: function () { + "use strict"; + this.formPanel.setAction('create'); this.setTitle(this.addTitle); this.show(); @@ -130,6 +139,8 @@ App.grid.RowEditor = Ext.extend(Ext.Window, { */ onDeleteRow: function () { + "use strict"; + var record = this.getSelected(); if (!record) {return; } @@ -145,6 +156,8 @@ App.grid.RowEditor = Ext.extend(Ext.Window, { */ onDuplicateRow: function () { + "use strict"; + var record = this.getSelected(); if (!record) {return; } @@ -160,6 +173,8 @@ App.grid.RowEditor = Ext.extend(Ext.Window, { */ onEditRow: function () { + "use strict"; + var record = this.getSelected(); if (!record) {return; } @@ -174,6 +189,7 @@ App.grid.RowEditor = Ext.extend(Ext.Window, { * The form handle the exception and take action. */ onException: function () { + "use strict"; this.hide(); }, @@ -184,6 +200,8 @@ App.grid.RowEditor = Ext.extend(Ext.Window, { */ onViewRow: function () { + "use strict"; + var record = this.getSelected(); if (!record) {return; } @@ -202,6 +220,7 @@ App.grid.RowEditor = Ext.extend(Ext.Window, { * @param {Object} record */ onWrite: function (store, action, result, transaction, record) { + "use strict"; this.hide(); } }); diff --git a/static/plugin_dbui/src/pgridroweditorconfirmdelete.js b/static/plugin_dbui/src/pgridroweditorconfirmdelete.js index b9690845d5457685a082d92049f19caf1ea3ec90..c8eb6ec0fb3b4ba16218de7424c87215917f0ad0 100644 --- a/static/plugin_dbui/src/pgridroweditorconfirmdelete.js +++ b/static/plugin_dbui/src/pgridroweditorconfirmdelete.js @@ -31,6 +31,8 @@ App.grid.RowEditorConfirmDelete = Ext.extend(App.grid.RowEditor, { */ onDeleteRow: function () { + "use strict"; + var record = this.getSelected(); if (!record) {return; } diff --git a/static/plugin_dbui/src/pgridroweditorcontextmenu.js b/static/plugin_dbui/src/pgridroweditorcontextmenu.js index 899a673e66390b12fbd199d602a85163bd86f778..f29b70127cce0c70b7fcacc4efade90dccc1705a 100644 --- a/static/plugin_dbui/src/pgridroweditorcontextmenu.js +++ b/static/plugin_dbui/src/pgridroweditorcontextmenu.js @@ -38,6 +38,8 @@ App.grid.RowEditorContextMenu = Ext.extend(Object, { */ init: function (grid) { + "use strict"; + var menu = new Ext.menu.Menu(); // protection @@ -81,6 +83,9 @@ App.grid.RowEditorContextMenu = Ext.extend(Object, { * Prvate handler displaying the row context menu in an empty grid */ onContainerContextMenu: function (grid, event) { + + "use strict"; + var menu = this; event.stopEvent(); @@ -92,6 +97,7 @@ App.grid.RowEditorContextMenu = Ext.extend(Object, { * Nothing is display in that case. */ onHeaderContextMenu: function (grid, columIndex, event) { + "use strict"; event.stopEvent(); }, /** @@ -100,6 +106,8 @@ App.grid.RowEditorContextMenu = Ext.extend(Object, { */ onRowContextMenu: function (grid, rowIndex, event) { + "use strict"; + var menu = this; event.stopEvent(); diff --git a/static/plugin_dbui/src/pgridroweditordblclick.js b/static/plugin_dbui/src/pgridroweditordblclick.js index ac28e4e5cf677c92ed401e025a0b27944fa67cc4..87310238d2b3cf9594b2aae74808204a0ffd957a 100644 --- a/static/plugin_dbui/src/pgridroweditordblclick.js +++ b/static/plugin_dbui/src/pgridroweditordblclick.js @@ -27,6 +27,8 @@ App.grid.RowEditorDblClick = Ext.extend(Object, { */ init: function(grid) { + "use strict"; + // protection if (!grid.rowEditor) { throw new Error('no grid row editor !!!'); diff --git a/static/plugin_dbui/src/pgridroweditortoolbar.js b/static/plugin_dbui/src/pgridroweditortoolbar.js index 581b6c9155fd24f609883226b95d21e690b0aa9c..28c1f9824b8f4f80f3fd1a4b411608f28983a02e 100644 --- a/static/plugin_dbui/src/pgridroweditortoolbar.js +++ b/static/plugin_dbui/src/pgridroweditortoolbar.js @@ -22,6 +22,8 @@ App.grid.RowEditorToolbar = Ext.extend(Object, { */ init: function (grid) { + "use strict"; + var toolbar; // protection diff --git a/static/plugin_dbui/src/ppanelmathjax.js b/static/plugin_dbui/src/ppanelmathjax.js index 9af99215eb8590e0f3903469cad575cb7b966a99..ea102f487b6e2f5de93dda9be04440507fbbdf08 100644 --- a/static/plugin_dbui/src/ppanelmathjax.js +++ b/static/plugin_dbui/src/ppanelmathjax.js @@ -13,6 +13,8 @@ App.panel.MathJax = Ext.extend(Object, { init: function (panel) { + "use strict"; + // register an handler which is activated only once // when the panel is rendered for the first time panel.on('render', this.onPanelRender, this, {single: true}); @@ -25,6 +27,7 @@ App.panel.MathJax = Ext.extend(Object, { * @param {Ext.Panel} panel */ onPanelRender: function (panel) { + "use strict"; var updater = panel.body.getUpdater(); updater.on('update', this.onProcess); }, @@ -35,6 +38,7 @@ App.panel.MathJax = Ext.extend(Object, { * @param {Object} o the response object */ onProcess: function (e, o) { + "use strict"; MathJax.Hub.PreProcess(); MathJax.Hub.Process(); } diff --git a/static/plugin_dbui/src/pregexp.js b/static/plugin_dbui/src/pregexp.js index a65767dbdb91189c05070b9d88981a0588a3889b..9a57f9494cf2730c05d8ca0f153cbb147f56e07a 100644 --- a/static/plugin_dbui/src/pregexp.js +++ b/static/plugin_dbui/src/pregexp.js @@ -16,6 +16,8 @@ App.PRegExp = Ext.extend(Object, { init: function (component) { + "use strict"; + if (component.regex && typeof (component.regex) === "string") { component.regex = new RegExp(component.regex); } diff --git a/static/plugin_dbui/src/pviewportlogin.js b/static/plugin_dbui/src/pviewportlogin.js index 9b33944b92fdfda8e60597ddaf9c6a4545a7758f..12c2aeb577e9d2a19b8be0338cd4ee41eb376601 100644 --- a/static/plugin_dbui/src/pviewportlogin.js +++ b/static/plugin_dbui/src/pviewportlogin.js @@ -35,6 +35,8 @@ App.ViewportLogin = Ext.extend(Object, { */ init: function(viewport) { + "use strict"; + var inhibit_login = false, inhibit_logout = true, menu, diff --git a/static/plugin_dbui/src/viewport.js b/static/plugin_dbui/src/viewport.js index 50873faf5f2cf241af6e1e1279eb5adf01476494..0338e227b7e12757f244c977e54c160e1d03aee6 100644 --- a/static/plugin_dbui/src/viewport.js +++ b/static/plugin_dbui/src/viewport.js @@ -28,11 +28,11 @@ App.Viewport = Ext.extend(Ext.Viewport, { */ constructor: function (config) { + "use strict"; + var cfg, loader, - root, - treePanel, - viewport; + root; Ext.apply(this, config); @@ -116,11 +116,12 @@ App.Viewport = Ext.extend(Ext.Viewport, { */ onCreateTab: function(node, event) { + "use strict"; + var cfg, parent = node.parentNode, panel, tabId, - viewport = this, wdgcfg = node.attributes.cfg, wdgtype = node.attributes.cfg.xtype;