Unverified Commit 5f087838 authored by yann300's avatar yann300 Committed by GitHub

Merge pull request #1396 from ethereum/refactor8

Clean app.js (8)
parents 2d24d2c9 36ed68fa
This diff is collapsed.
......@@ -120,7 +120,6 @@ var css = csjs`
}`
/**
* This just export a function that register to `newTransaction` and forward them to the logger.
* Emit debugRequested
*
*/
class TxLogger {
......@@ -141,7 +140,8 @@ class TxLogger {
editorPanel: this._components.registry.get('editorpanel').api,
txListener: this._components.registry.get('txlistener').api,
eventsDecoder: this._components.registry.get('eventsdecoder').api,
compiler: this._components.registry.get('compiler').api
compiler: this._components.registry.get('compiler').api,
app: this._components.registry.get('app').api
}
this.logKnownTX = this._deps.editorPanel.registerCommand('knownTransaction', (args, cmds, append) => {
......@@ -205,7 +205,7 @@ function debug (e, data, self) {
if (data.tx.isCall && data.tx.envMode !== 'vm') {
modalDialog.alert('Cannot debug this call. Debugging calls is only possible in JavaScript VM mode.')
} else {
self.event.trigger('debugRequested', [data.tx.hash])
self._deps.app.startdebugging(data.tx.hash)
}
}
......
......@@ -85,6 +85,7 @@ class FileManager {
self._deps.editor.discardCurrentSession()
delete this.tabbedFiles[path]
this.refreshTabs()
this.switchFile()
}
// Display files that have already been selected
......
......@@ -127,7 +127,7 @@ module.exports = class CompileTab {
var error = false
if (data['error']) {
error = true
self._deps.renderer.error(data['error'].formattedMessage, self._view.errorContainer, {type: data['error'].severity})
self._deps.renderer.error(data['error'].formattedMessage, self._view.errorContainer, {type: data['error'].severity || 'error'})
}
if (data.errors && data.errors.length) {
error = true
......
......@@ -111,7 +111,7 @@ module.exports = class SettingsTab {
<span class="${css.checkboxText}">Always use Ethereum VM at Load</span>
</div>
<div class="${css.crow}">
<div><input id="editorWrap" type="checkbox"></div>
<div><input id="editorWrap" type="checkbox" onchange=${function () { self._deps.editor.resize(this.checked) }}></div>
<span class="${css.checkboxText}">Text Wrap</span>
</div>
<div class="${css.crow}">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment