use of yo-yoify

pull/7/head
yann300 9 years ago
parent 474e68bdee
commit 3d4e5c0af0
  1. 8
      ci/browser_tests.sh
  2. 7
      package.json
  3. 19
      src/ButtonNavigator.js
  4. 4
      src/CalldataPanel.js
  5. 4
      src/CallstackPanel.js
  6. 4
      src/MemoryPanel.js
  7. 12
      src/Slider.js
  8. 4
      src/StackPanel.js
  9. 4
      src/StoragePanel.js

@ -16,9 +16,9 @@ while [ ! -f $SAUCECONNECT_READYFILE ]; do
sleep .5
done
#npm run nightwatch_remote_firefox
#npm run nightwatch_remote_chrome
npm run nightwatch_remote_firefox
npm run nightwatch_remote_chrome
#npm run nightwatch_remote_safari
npm run nightwatch_remote_ie
#npm run nightwatch_remote_ie
curl "https://saucelabs.com/rest/v1/${SAUCECONNECT_USERNAME}/tunnels/${SAUCECONNECT_JOBIDENTIFIER}" -u "${SAUCECONNECT_USERNAME}:${SAUCECONNECT_ACCESSKEY}" -X DELETE
curl "http://saucelabs.com/rest/v1/${SAUCECONNECT_USERNAME}/tunnels/${SAUCECONNECT_JOBIDENTIFIER}" -u "${SAUCECONNECT_USERNAME}:${SAUCECONNECT_ACCESSKEY}" -X DELETE

@ -23,18 +23,19 @@
"nightwatch": "^0.9.5",
"standard": "^7.0.1",
"standard-reporter": "^1.0.5",
"tape": "^4.6.0"
"tape": "^4.6.0",
"yo-yoify": "^3.1.0"
},
"scripts": {
"start_node": "eth --rpccorsdomain \"*\" -j -v 0",
"build": "mkdir -p build; browserify src/index.js -o build/app.js",
"build": "mkdir -p build; browserify src/index.js -g yo-yoify -o build/app.js",
"test": "standard && tape ./test/tests.js",
"serve": "http-server .",
"nightwatch_local": "nightwatch --config nightwatch.js --env local",
"nightwatch_remote_firefox": "nightwatch --config nightwatch.js --env default",
"nightwatch_remote_chrome": "nightwatch --config nightwatch.js --env chrome",
"nightwatch_remote_safari": "nightwatch --config nightwatch.js --env safari",
"nightwatch_remote_ie": "nightwatch --config nightwatch.js --env ie"
"nightwatch_remote_ie": "nightwatch --config nightwatch.js --env ie"
},
"repository": {
"type": "git",

@ -65,9 +65,26 @@ ButtonNavigator.prototype.stepChanged = function (step) {
self.overForwardDisabled = step >= length - 1
self.nextCallDisabled = step >= length - 1
}
self.updateAll()
})
}
yo.update(this.view, this.render())
this.updateAll()
}
ButtonNavigator.prototype.updateAll = function () {
this.updateDisabled('intoback', this.intoBackDisabled)
this.updateDisabled('overback', this.overBackDisabled)
this.updateDisabled('overforward', this.overForwardDisabled)
this.updateDisabled('intoforward', this.intoForwardDisabled)
this.updateDisabled('nextcall', this.nextCallDisabled)
}
ButtonNavigator.prototype.updateDisabled = function (id, disabled) {
if (disabled) {
document.getElementById(id).setAttribute('disabled', true)
} else {
document.getElementById(id).removeAttribute('disabled')
}
}
module.exports = ButtonNavigator

@ -10,9 +10,7 @@ function CalldataPanel (_parent, _traceManager) {
}
CalldataPanel.prototype.render = function () {
return (
yo`${this.basicPanel.render()}`
)
return yo`<div>${this.basicPanel.render()}</div>`
}
CalldataPanel.prototype.init = function () {

@ -10,9 +10,7 @@ function CallstackPanel (_parent, _traceManager) {
}
CallstackPanel.prototype.render = function () {
return (
yo`${this.basicPanel.render()}`
)
return yo`<div>${this.basicPanel.render()}</div>`
}
CallstackPanel.prototype.init = function () {

@ -11,9 +11,7 @@ function MemoryPanel (_parent, _traceManager) {
}
MemoryPanel.prototype.render = function () {
return (
yo`${this.basicPanel.render()}`
)
return yo`<div>${this.basicPanel.render()}</div>`
}
MemoryPanel.prototype.init = function () {

@ -34,9 +34,11 @@ Slider.prototype.render = function () {
}
Slider.prototype.init = function (length) {
var slider = document.getElementById('slider')
slider.setAttribute('max', length)
this.max = length
this.updateDisabled(length === 0)
this.disabled = length === 0
yo.update(this.view, this.render())
this.setValue(0)
}
@ -55,4 +57,12 @@ Slider.prototype.setValue = function (value) {
}
}
Slider.prototype.updateDisabled = function (disabled) {
if (disabled) {
document.getElementById('slider').setAttribute('disabled', true)
} else {
document.getElementById('slider').removeAttribute('disabled')
}
}
module.exports = Slider

@ -11,9 +11,7 @@ function StackPanel (_parent, _traceManager) {
}
StackPanel.prototype.render = function () {
return (
yo`${this.basicPanel.render()}`
)
return yo`<div>${this.basicPanel.render()}</div>`
}
StackPanel.prototype.init = function () {

@ -10,9 +10,7 @@ function StoragePanel (_parent, _traceManager) {
}
StoragePanel.prototype.render = function () {
return (
yo`${this.basicPanel.render()}`
)
return yo`<div>${this.basicPanel.render()}</div>`
}
StoragePanel.prototype.init = function () {

Loading…
Cancel
Save