Friday, 2009-07-31

*** tpb has joined #melange00:00
*** madrazr has joined #melange03:12
*** ChanServ sets mode: +v madrazr03:12
*** Merio has joined #melange03:13
*** ChanServ sets mode: +v Merio03:13
*** madrazr has left #melange03:42
*** tansell has quit IRC04:15
*** tansell has joined #melange04:21
*** Merio has quit IRC05:24
*** Merio has joined #melange05:27
*** ChanServ sets mode: +v Merio05:27
*** florinciu has joined #melange05:31
*** dhans has joined #melange06:10
*** ChanServ sets mode: +v dhans06:10
*** madrazr has joined #melange07:12
*** ChanServ sets mode: +v madrazr07:12
dhansMerio: ping? :)07:14
Meriodhans: pong! :)07:14
dhansMerio: hey. about those visualization types for each statistic. I added it to JSON responses for a statistic. it may be helpful for browser to actually know which kind of visualizations apply to a particular statistic :-)07:15
*** dr__house has joined #melange07:16
dhansMerio: just want to let you know that a response has one additional key: visualization_types07:16
dhansMerio: with a list of possibilities07:16
Meriodhans: great! I can see the commit in the RSS07:18
Meriodhans: you rock ^__^07:18
dhansMerio: :P07:18
dhansMerio: btw. how to deal with lists in JS?07:18
dhansMerio: using jQuery.each() ?07:18
Meriodhans: hmm... where is the list?07:19
Meriodhans: I can see "visualizations" with ["Table"]... should be it?07:19
Meriodhans: just to be sure where to edit if I need it07:19
dhansMerio: yes, there is a list07:19
Meriodhans: they've all only "Table" for the moment?07:20
Meriodhans: it's just to be sure, because I'm going to add support for Google Chart API with visualizations, which is not that easy07:20
dhansMerio: it was easier to just copy/paste one option which applies to every stat :P07:20
Meriodhans: yeah, we can decide it later on, it's just to be sure where to edit, as told you before :)07:21
Meriodhans: to deal with lists (arrays) in Javascript you can use jQuery.each(my_array, function() {var current_element=this;});07:22
dhansMerio: cool, thanks :-)07:22
Meriodhans: var current_element=this it's just to tell you that you can access the element in the current iteration using "this"07:23
MerioHowever I'm going to work right today on that07:23
Meriodhans: So don't worry, I'm going to deal now with google chart api and make a thickbox to edit options for every chart07:23
dhansMerio: yeah, I would not guess that this is for a current element, thanks :-)07:24
Meriodhans: that will include also readings from the visualizations allowed, and the combobox should go in that options page07:24
Meriodhans: You can also use jQuery.each(my_array, function(index, element) {});07:24
Meriodhans: IIRC07:25
dhansMerio: and there is another thing that I think we should add (but quite simple)07:25
Meriodhans: but if you don't need the index it's better looking :D07:25
Meriodhans: yep, tellme07:25
dhansMerio: currently there are sometimes 3 different statistics in one entity. I mean for example, we have students per degree: "undergraduate": [120, 70, 50] which means that there are 120 undergraduate students, 70 undergrads with projects and 50 without projects07:27
dhansMerio: which is good, because we can visualize all three stats in one visualization07:27
Meriodhans: yes07:27
dhansMerio: but sometimes someone could prefer visualization only for one statistic (for example students without projects per degree)07:28
dhansMerio: so there are two options on how to do that: (easier) we can store 4 different entities for each statistic: all, with projects, without projects, all three together07:30
Meriodhans: that should be something that deals with jLinq IIUC07:30
dhansMerio: hmm but having data_table JSON isn't it difficult to make any queries?07:31
*** jamtoday has quit IRC07:31
Meriodhans: and if it's not a requirement for final terms I would prefer to leave it open when I/you/we/they'll integrate jLinq (after GSoC I guess) rather than do something hard coded like that07:31
Meriodhans: that's where "half-cooked JSONs" come into place :)07:31
dhansMerio: yes, but as we both do not really wanna go into it...07:32
dhansMerio: I am looking for a simple workaround :-)07:32
Meriodhans: well... Actually in this very moment I'm more worried (but perhaps I'm worried only because I don't know in depth how that works) about access rights and different stats/dashboards for user/admin/sponsor07:33
dhansMerio: so as I said: the first option: 4 entities. good: easy, bad: you need different widgets for different stats07:34
Meriodhans: and ... well... I would prefer to go directly with the good solution rather than workarounds... but it's a "deviation" of mine, and sometimes this attitude could lead "doing nothing" because you don't have time to "do all"... so well.. I think it's a good workaround for the moment, but I think we should go for something more needed for final terms perhaps07:35
dhansMerio: I think we need to talk to mentors on what they exactly mean by different dashboards, because it is not clear for me07:35
Meriodhans: perhaps different access to available statistics... perhaps :P07:35
dhansMerio: perhaps :P07:36
Meriodhans: ehehehh ^__^07:36
dhansMerio: so you can ping svere but later. he can be asleep now :P07:37
Meriodhans: ehehe yes, I guess so :)07:39
Meriodhans: I'll try asking Pawel too (can't remember if he's already on vacation)07:39
*** mithro has quit IRC08:05
*** tansell--laptop has quit IRC08:22
*** Merio has quit IRC09:38
*** dr__house has quit IRC10:50
*** Merio has joined #melange10:51
*** Merio has joined #melange10:52
*** ChanServ sets mode: +v Merio10:52
dhansMerio: ping?10:52
*** madrazr has quit IRC10:57
*** Merio1 has joined #melange11:11
Merio1dhans: now proper ping :P11:12
Merio1dhans: well, proper pong :P11:12
dhansMerio: I am having some little problems with passing context to JS11:12
dhansMerio: but during the time you was not around I managed to discover where is the problem :-)11:13
*** Merio has quit IRC11:13
Merio1dhans: ah ok do you need any help now?11:14
dhansMerio1: hmm ok11:14
dhansMerio1: the problem is that we have something like melangeContext=" { json: {{ json }} ... "11:15
Merio1dhans: yes11:15
dhansMerio1: it works as long as there is no " in context. the problem is that I have an argument which has it :P11:15
Merio1have you tried to use escapejs in Django?11:16
dhansMerio1: no, but it may work :-)11:17
Merio1dhans: just try :)11:18
dhansMerio1: do you know how to use it?11:24
dhansMerio1: I tried: {% '{ json: {{ json }} }'| escapejs %}11:25
Merio1try: {json {{ json|escapejs }} }11:26
Merio1sorry  {json: {{ json|escapejs }} }11:26
*** Lennie has joined #melange11:27
*** ChanServ sets mode: +o Lennie11:27
dhansMerio1: thanks it worked :-) but evel still crashes ;_(11:31
Merio1dhans: do you know why?11:32
dhansMerio1: nope, but I will work on it11:32
Merio1dhans: just a question => do you have " inside a single variable? I mean like "text" : "he said "hello""?11:33
dhansMerio1: yeap11:33
dhansMerio1: and it is escaped well11:34
Merio1dhans: so you have "he said \"hello\""11:34
*** Lennie sets mode: +v Merio111:34
dhansMerio1: I have: visualization_types: [\x22Table\x22]11:35
Merio1thx Lennie ^__^11:35
Merio1dhans: hmm... let me see11:36
Merio1dhans: can you give me the string that it's written inside melangeContext?11:50
Merio1(why do you want to put it in melangeContext? We can retrieve it when we retrieve the single statistic from background)11:50
dhansMerio1:  melangeContext="{% autoescape off %} { json: {{ json|escapejs }}, visualization_types: {{ visualization_types|escapejs }} } {% endautoescape %}"11:51
Merio1dhans: what string all these produces?11:51
dhans<script type="text/javascript" src="/soc/content/js/templates/soc/statistic/show.js" melangecontext=" { json: {cols:[{id:\x27program\x27,label:\x27Program\x27,type:\x27string\x27},{id:\x27number\x27,label:\x27Number\x27,type:\x27number\x27}],rows:[{c:[{v:\x27gsoc2009\x27},{v:0}]},{c:[{v:\x27ghop2009\x27},{v:0}]}]}, visualization_types: [\x22Table\x22] } ">11:52
dhans</script>11:52
Merio1hmm it works in Firebug console11:54
Merio1dhans: which error do you see?11:54
dhansMerio1: I don't see any errors :P11:55
Merio1dhans: .. so what? :P11:55
Merio1dhans: you can't find the stuff loaded?11:56
Merio1dhans: try ... melangecontext => melangeContext11:56
dhansMerio1:  our debugging techniques in JS differ :P11:56
dhansMerio1: I have like: eval("var configuration_object = "+configuration);11:56
dhans          alert(configuration_object) and dont see the alert :P11:56
dhansMerio1: but one of the problems was caused by escapejs I think11:57
dhansMerio1: now, I have simply melangeContext="{% autoescape off %} { json: {{ json|escape}} }{% endautoescape %} and it works11:57
Merio1hmm... I don't know, in Firebug console it works flawlessly11:58
dhansMerio1: ok. it works with regular escape12:01
Merio1dhans: great :)12:01
dhansMerio1: on safari Web Inspector I got SyntaxError: Parse error with escapejs12:08
Merio1dhans... well if escape works just let it be :)12:09
dhansMerio1: of course I am happy :-)12:10
Merio1^__^12:10
dhansMerio1: but I am also happy with debugging my first script without alerts() :P12:10
Merio1dhans: great ^__^12:10
*** madrazr has joined #melange12:28
*** ChanServ sets mode: +v madrazr12:28
*** dr__house has joined #melange12:29
*** dhans has quit IRC12:56
*** dhaun has joined #melange13:41
*** Shaan7 has joined #melange14:09
*** Shaan7_ has joined #melange14:32
*** Shaan7 has quit IRC14:48
*** Shaan7_ is now known as Shaan714:59
*** dr__house has quit IRC15:28
*** Shaan7 has quit IRC15:31
*** Shaan7 has joined #melange15:32
*** r0bby has quit IRC15:41
*** r0bby has joined #melange15:41
*** Shaan7 has quit IRC15:45
*** Lennie_ has joined #melange16:42
*** Lennie_ has quit IRC16:44
*** Lennie has quit IRC16:58
*** florinciu has quit IRC17:27
*** dhaun has quit IRC18:23
*** madrazr has quit IRC18:35
*** Merio1 has quit IRC20:04

Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!