Skip to content

Commit

Permalink
Missed some references to $$jiwidget.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Mar 21, 2012
1 parent fae3fa9 commit c732e6d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
20 changes: 10 additions & 10 deletions tw2/jit/widgets/ajax.py
Expand Up @@ -32,20 +32,20 @@ def prepare(self):
""" TODO """, attribute=True,
default=JSSymbol(src="""
(function(json) {
json.id = jitwidget.root;
json.id = $$jitwidget.root;
})"""))

requestGraph = twc.Param(
""" TODO """, attribute=True,
default=JSSymbol(src="""
(function() {
var that = this, id = jitwidget.clickedNodeId;
var that = this, id = $$jitwidget.clickedNodeId;
var jsonRequest = $.ajax({
url: '$$base_url?key=' + encodeURIComponent(id),
dataType: 'json',
success: function (json) {
that.preprocessTree(json);
jitwidget.op.morph(json, {
$$jitwidget.op.morph(json, {
id: id,
type: 'fade',
duration: $$duration,
Expand All @@ -63,7 +63,7 @@ def prepare(self):
return false;
}
var old = jitwidget.graph.getNode(jitwidget.root);
var old = $$jitwidget.graph.getNode($$jitwidget.root);
if ( !old ) return;
var subnodes = old.getSubnodes(1);
var map = [];
Expand All @@ -73,7 +73,7 @@ def prepare(self):
}
}
jitwidget.op.removeNode(map.reverse(), {
$$jitwidget.op.removeNode(map.reverse(), {
type: 'fade:seq',
duration: $$duration,
onBeforeCompute: (function(){}),
Expand All @@ -84,10 +84,10 @@ def prepare(self):

onBeforeCompute = JSSymbol(src="""
(function (node) {
jitwidget.oldRootToRemove = node.getParents()[0].id;
jitwidget.clickedNodeId = node.id;
if ( jitwidget.deep_linking ) {
window.location.hash = jitwidget.clickedNodeId;
$$jitwidget.oldRootToRemove = node.getParents()[0].id;
$$jitwidget.clickedNodeId = node.id;
if ( $$jitwidget.deep_linking ) {
window.location.hash = $$jitwidget.clickedNodeId;
}
})""")

Expand All @@ -97,7 +97,7 @@ def prepare(self):
var that = this;
jQuery(domElement).html(node.name);
jQuery(domElement).click(function() {
jitwidget.onClick(domElement.id, {
$$jitwidget.onClick(domElement.id, {
onComplete: function() {
that.requestGraph();
}
Expand Down
4 changes: 2 additions & 2 deletions tw2/jit/widgets/sqla.py
Expand Up @@ -110,8 +110,8 @@ def prepare(self):
}
return false;
}
json.id = jitwidget.root;
var root = jitwidget.graph.getNode(jitwidget.root);
json.id = $$jitwidget.root;
var root = $$jitwidget.graph.getNode($$jitwidget.root);
$jit.Graph.Util.eachAdjacency(root, function(elem) {
var nodeTo = elem.nodeTo, jsonNode = getNode(nodeTo.id);
if(jsonNode) jsonNode.id = nodeTo.id;
Expand Down

0 comments on commit c732e6d

Please sign in to comment.