diff options
author | shefali shetty <sshefali44@gmail.com> | 2012-06-05 12:30:30 +0530 |
---|---|---|
committer | shefali shetty <sshefali44@gmail.com> | 2012-06-05 12:30:30 +0530 |
commit | 82569b9cb412b509d88de55bd3f15a9499dfe76e (patch) | |
tree | 0cc683df6fb76a4a4970d40de31a7009ee4f9b9d /objectapp | |
parent | 0b68a79e273b2bb876eaa38a1739e94d3db8c3d2 (diff) | |
download | gnowsys-82569b9cb412b509d88de55bd3f15a9499dfe76e.tar.gz |
collapsing done with ctrl+click event
Diffstat (limited to 'objectapp')
-rw-r--r-- | objectapp/models.py | 6 | ||||
-rw-r--r-- | objectapp/templates/objectapp/skeleton.html | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/objectapp/models.py b/objectapp/models.py index 2673d1a..495ac82 100644 --- a/objectapp/models.py +++ b/objectapp/models.py @@ -480,6 +480,7 @@ class Gbobject(Node): g_json["node_metadata"].append({"_id":str(predicate_id[key]),"screen_name":key}) g_json["relations"].append({"from":self.id ,"type":str(key),"value":1,"to":predicate_id[key] }) + if not isinstance(nbh[key],basestring): for item in nbh[key]: if isinstance(item,unicode): @@ -516,8 +517,9 @@ class Gbobject(Node): g_json["relations"].append({"from":predicate_id[key] ,"type":str(key) ,"value":1,"to":(str(attr_counter)+"b") }) attr_counter-=1 - except: - pass + except EOFError: + print "Oops! That was no valid number. Try again..." + #print g_json return json.dumps(g_json) diff --git a/objectapp/templates/objectapp/skeleton.html b/objectapp/templates/objectapp/skeleton.html index d60b9ec..78baf08 100644 --- a/objectapp/templates/objectapp/skeleton.html +++ b/objectapp/templates/objectapp/skeleton.html @@ -405,7 +405,7 @@ $(window).bind('keydown',function(event) { metadata=_.union(new_metadata,metadata); relations=_.union(new_relations,relations); - check_Relation(metadata,relations); + relations= check_Relation(metadata,relations); }}); @@ -446,7 +446,7 @@ $(window).bind('keydown',function(event) { metadata=_.union(new_metadata,metadata); relations=_.union(new_relations,relations); - check_Relation(metadata,relations); + relations= check_Relation(metadata,relations); _.each(metadata, function(m){ @@ -592,6 +592,7 @@ function check_Relation(metadata,relations) } }); + return relations; } |