From b2ea39ccfe1c9435a5d1a485fafcf1d9dbd58ce5 Mon Sep 17 00:00:00 2001 From: serapath Date: Sat, 19 May 2018 01:45:46 -0400 Subject: [PATCH] CompileTab: remove jQuery --- src/app/tabs/compile-tab.js | 10 ++++------ src/app/ui/renderer.js | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index abbd006027..02d7e8979e 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -1,5 +1,3 @@ -/* global */ -var $ = require('jquery') var yo = require('yo-yo') var csjs = require('csjs-inject') @@ -93,25 +91,25 @@ class CompileTab { var error = false if (data['error']) { error = true - self._opts.renderer.error(data['error'].formattedMessage, $(errorContainer), {type: data['error'].severity}) + self._opts.renderer.error(data['error'].formattedMessage, errorContainer, {type: data['error'].severity}) } if (data['errors']) { if (data['errors'].length) error = true data['errors'].forEach(function (err) { - self._opts.renderer.error(err.formattedMessage, $(errorContainer), {type: err.severity}) + self._opts.renderer.error(err.formattedMessage, errorContainer, {type: err.severity}) }) } if (!error) { if (data.contracts) { self._opts.compiler.visitContracts((contract) => { - self._opts.renderer.error(contract.name, $(errorContainer), {type: 'success'}) + self._opts.renderer.error(contract.name, errorContainer, {type: 'success'}) }) } } }) self._events.staticAnalysis.register('staticAnaysisWarning', (count) => { if (count) { - self._opts.renderer.error(`Static Analysis raised ${count} warning(s) that requires your attention.`, $(errorContainer), { + self._opts.renderer.error(`Static Analysis raised ${count} warning(s) that requires your attention.`, errorContainer, { type: 'warning', click: () => self._api.switchTab('staticanalysisView') }) diff --git a/src/app/ui/renderer.js b/src/app/ui/renderer.js index 22f08bf4ec..404ca550cd 100644 --- a/src/app/ui/renderer.js +++ b/src/app/ui/renderer.js @@ -56,7 +56,7 @@ Renderer.prototype.error = function (message, container, opt) { var $pre = $(opt.useSpan ? yo`` : yo`
`).html(message)
 
   var $error = $(yo`
`).prepend($pre) - container.append($error) + $(container).append($error) $error.click((ev) => { if (opt.errFile && opt.errLine) {