js: avoid var name reuse
This commit is contained in:
parent
d704990b14
commit
be6b15b93e
2 changed files with 4 additions and 5 deletions
|
|
@ -66,9 +66,9 @@ module.exports = {
|
|||
var data = preset[i],
|
||||
widgets = widgetManager.getWidgetById(data[0])
|
||||
if (widgets.length) {
|
||||
for (var i=widgets.length-1;i>=0;i--) {
|
||||
if (widgets[i].setValue) {
|
||||
widgets[i].setValue(data[1],{send:send,sync:true})
|
||||
for (var j=widgets.length-1;j>=0;j--) {
|
||||
if (widgets[j].setValue) {
|
||||
widgets[j].setValue(data[1],{send:send,sync:true})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,11 +24,10 @@ var updateDom = function(container,data, remote) {
|
|||
// save state
|
||||
var scroll = $('#sidepanel').scrollTop(),
|
||||
state = actions.stateGet(),
|
||||
parentContainer = container[0].abstract.parentNode,
|
||||
purge = container[0].abstract.hashes || [container[0].abstract.hash]
|
||||
|
||||
// widget
|
||||
var newContainer = parsewidgets([data], parentContainer, container[0].abstract.parent)
|
||||
var newContainer = parsewidgets([data], container[0].abstract.parentNode, container[0].abstract.parent)
|
||||
container.replaceWith(newContainer)
|
||||
|
||||
if (data.type == 'tab') newContainer.trigger('tab-created')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue