*** tpb has joined #melange | 00:00 | |
*** madrazr has joined #melange | 03:12 | |
*** ChanServ sets mode: +v madrazr | 03:12 | |
*** Merio has joined #melange | 03:13 | |
*** ChanServ sets mode: +v Merio | 03:13 | |
*** madrazr has left #melange | 03:42 | |
*** tansell has quit IRC | 04:15 | |
*** tansell has joined #melange | 04:21 | |
*** Merio has quit IRC | 05:24 | |
*** Merio has joined #melange | 05:27 | |
*** ChanServ sets mode: +v Merio | 05:27 | |
*** florinciu has joined #melange | 05:31 | |
*** dhans has joined #melange | 06:10 | |
*** ChanServ sets mode: +v dhans | 06:10 | |
*** madrazr has joined #melange | 07:12 | |
*** ChanServ sets mode: +v madrazr | 07:12 | |
dhans | Merio: ping? :) | 07:14 |
---|---|---|
Merio | dhans: pong! :) | 07:14 |
dhans | Merio: 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 #melange | 07:16 | |
dhans | Merio: just want to let you know that a response has one additional key: visualization_types | 07:16 |
dhans | Merio: with a list of possibilities | 07:16 |
Merio | dhans: great! I can see the commit in the RSS | 07:18 |
Merio | dhans: you rock ^__^ | 07:18 |
dhans | Merio: :P | 07:18 |
dhans | Merio: btw. how to deal with lists in JS? | 07:18 |
dhans | Merio: using jQuery.each() ? | 07:18 |
Merio | dhans: hmm... where is the list? | 07:19 |
Merio | dhans: I can see "visualizations" with ["Table"]... should be it? | 07:19 |
Merio | dhans: just to be sure where to edit if I need it | 07:19 |
dhans | Merio: yes, there is a list | 07:19 |
Merio | dhans: they've all only "Table" for the moment? | 07:20 |
Merio | dhans: it's just to be sure, because I'm going to add support for Google Chart API with visualizations, which is not that easy | 07:20 |
dhans | Merio: it was easier to just copy/paste one option which applies to every stat :P | 07:20 |
Merio | dhans: yeah, we can decide it later on, it's just to be sure where to edit, as told you before :) | 07:21 |
Merio | dhans: to deal with lists (arrays) in Javascript you can use jQuery.each(my_array, function() {var current_element=this;}); | 07:22 |
dhans | Merio: cool, thanks :-) | 07:22 |
Merio | dhans: var current_element=this it's just to tell you that you can access the element in the current iteration using "this" | 07:23 |
Merio | However I'm going to work right today on that | 07:23 |
Merio | dhans: So don't worry, I'm going to deal now with google chart api and make a thickbox to edit options for every chart | 07:23 |
dhans | Merio: yeah, I would not guess that this is for a current element, thanks :-) | 07:24 |
Merio | dhans: that will include also readings from the visualizations allowed, and the combobox should go in that options page | 07:24 |
Merio | dhans: You can also use jQuery.each(my_array, function(index, element) {}); | 07:24 |
Merio | dhans: IIRC | 07:25 |
dhans | Merio: and there is another thing that I think we should add (but quite simple) | 07:25 |
Merio | dhans: but if you don't need the index it's better looking :D | 07:25 |
Merio | dhans: yep, tellme | 07:25 |
dhans | Merio: 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 projects | 07:27 |
dhans | Merio: which is good, because we can visualize all three stats in one visualization | 07:27 |
Merio | dhans: yes | 07:27 |
dhans | Merio: but sometimes someone could prefer visualization only for one statistic (for example students without projects per degree) | 07:28 |
dhans | Merio: 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 together | 07:30 |
Merio | dhans: that should be something that deals with jLinq IIUC | 07:30 |
dhans | Merio: hmm but having data_table JSON isn't it difficult to make any queries? | 07:31 |
*** jamtoday has quit IRC | 07:31 | |
Merio | dhans: 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 that | 07:31 |
Merio | dhans: that's where "half-cooked JSONs" come into place :) | 07:31 |
dhans | Merio: yes, but as we both do not really wanna go into it... | 07:32 |
dhans | Merio: I am looking for a simple workaround :-) | 07:32 |
Merio | dhans: 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/sponsor | 07:33 |
dhans | Merio: so as I said: the first option: 4 entities. good: easy, bad: you need different widgets for different stats | 07:34 |
Merio | dhans: 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 perhaps | 07:35 |
dhans | Merio: I think we need to talk to mentors on what they exactly mean by different dashboards, because it is not clear for me | 07:35 |
Merio | dhans: perhaps different access to available statistics... perhaps :P | 07:35 |
dhans | Merio: perhaps :P | 07:36 |
Merio | dhans: ehehehh ^__^ | 07:36 |
dhans | Merio: so you can ping svere but later. he can be asleep now :P | 07:37 |
Merio | dhans: ehehe yes, I guess so :) | 07:39 |
Merio | dhans: I'll try asking Pawel too (can't remember if he's already on vacation) | 07:39 |
*** mithro has quit IRC | 08:05 | |
*** tansell--laptop has quit IRC | 08:22 | |
*** Merio has quit IRC | 09:38 | |
*** dr__house has quit IRC | 10:50 | |
*** Merio has joined #melange | 10:51 | |
*** Merio has joined #melange | 10:52 | |
*** ChanServ sets mode: +v Merio | 10:52 | |
dhans | Merio: ping? | 10:52 |
*** madrazr has quit IRC | 10:57 | |
*** Merio1 has joined #melange | 11:11 | |
Merio1 | dhans: now proper ping :P | 11:12 |
Merio1 | dhans: well, proper pong :P | 11:12 |
dhans | Merio: I am having some little problems with passing context to JS | 11:12 |
dhans | Merio: but during the time you was not around I managed to discover where is the problem :-) | 11:13 |
*** Merio has quit IRC | 11:13 | |
Merio1 | dhans: ah ok do you need any help now? | 11:14 |
dhans | Merio1: hmm ok | 11:14 |
dhans | Merio1: the problem is that we have something like melangeContext=" { json: {{ json }} ... " | 11:15 |
Merio1 | dhans: yes | 11:15 |
dhans | Merio1: it works as long as there is no " in context. the problem is that I have an argument which has it :P | 11:15 |
Merio1 | have you tried to use escapejs in Django? | 11:16 |
dhans | Merio1: no, but it may work :-) | 11:17 |
Merio1 | dhans: just try :) | 11:18 |
dhans | Merio1: do you know how to use it? | 11:24 |
dhans | Merio1: I tried: {% '{ json: {{ json }} }'| escapejs %} | 11:25 |
Merio1 | try: {json {{ json|escapejs }} } | 11:26 |
Merio1 | sorry {json: {{ json|escapejs }} } | 11:26 |
*** Lennie has joined #melange | 11:27 | |
*** ChanServ sets mode: +o Lennie | 11:27 | |
dhans | Merio1: thanks it worked :-) but evel still crashes ;_( | 11:31 |
Merio1 | dhans: do you know why? | 11:32 |
dhans | Merio1: nope, but I will work on it | 11:32 |
Merio1 | dhans: just a question => do you have " inside a single variable? I mean like "text" : "he said "hello""? | 11:33 |
dhans | Merio1: yeap | 11:33 |
dhans | Merio1: and it is escaped well | 11:34 |
Merio1 | dhans: so you have "he said \"hello\"" | 11:34 |
*** Lennie sets mode: +v Merio1 | 11:34 | |
dhans | Merio1: I have: visualization_types: [\x22Table\x22] | 11:35 |
Merio1 | thx Lennie ^__^ | 11:35 |
Merio1 | dhans: hmm... let me see | 11:36 |
Merio1 | dhans: 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 |
dhans | Merio1: melangeContext="{% autoescape off %} { json: {{ json|escapejs }}, visualization_types: {{ visualization_types|escapejs }} } {% endautoescape %}" | 11:51 |
Merio1 | dhans: 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 |
Merio1 | hmm it works in Firebug console | 11:54 |
Merio1 | dhans: which error do you see? | 11:54 |
dhans | Merio1: I don't see any errors :P | 11:55 |
Merio1 | dhans: .. so what? :P | 11:55 |
Merio1 | dhans: you can't find the stuff loaded? | 11:56 |
Merio1 | dhans: try ... melangecontext => melangeContext | 11:56 |
dhans | Merio1: our debugging techniques in JS differ :P | 11:56 |
dhans | Merio1: I have like: eval("var configuration_object = "+configuration); | 11:56 |
dhans | alert(configuration_object) and dont see the alert :P | 11:56 |
dhans | Merio1: but one of the problems was caused by escapejs I think | 11:57 |
dhans | Merio1: now, I have simply melangeContext="{% autoescape off %} { json: {{ json|escape}} }{% endautoescape %} and it works | 11:57 |
Merio1 | hmm... I don't know, in Firebug console it works flawlessly | 11:58 |
dhans | Merio1: ok. it works with regular escape | 12:01 |
Merio1 | dhans: great :) | 12:01 |
dhans | Merio1: on safari Web Inspector I got SyntaxError: Parse error with escapejs | 12:08 |
Merio1 | dhans... well if escape works just let it be :) | 12:09 |
dhans | Merio1: of course I am happy :-) | 12:10 |
Merio1 | ^__^ | 12:10 |
dhans | Merio1: but I am also happy with debugging my first script without alerts() :P | 12:10 |
Merio1 | dhans: great ^__^ | 12:10 |
*** madrazr has joined #melange | 12:28 | |
*** ChanServ sets mode: +v madrazr | 12:28 | |
*** dr__house has joined #melange | 12:29 | |
*** dhans has quit IRC | 12:56 | |
*** dhaun has joined #melange | 13:41 | |
*** Shaan7 has joined #melange | 14:09 | |
*** Shaan7_ has joined #melange | 14:32 | |
*** Shaan7 has quit IRC | 14:48 | |
*** Shaan7_ is now known as Shaan7 | 14:59 | |
*** dr__house has quit IRC | 15:28 | |
*** Shaan7 has quit IRC | 15:31 | |
*** Shaan7 has joined #melange | 15:32 | |
*** r0bby has quit IRC | 15:41 | |
*** r0bby has joined #melange | 15:41 | |
*** Shaan7 has quit IRC | 15:45 | |
*** Lennie_ has joined #melange | 16:42 | |
*** Lennie_ has quit IRC | 16:44 | |
*** Lennie has quit IRC | 16:58 | |
*** florinciu has quit IRC | 17:27 | |
*** dhaun has quit IRC | 18:23 | |
*** madrazr has quit IRC | 18:35 | |
*** Merio1 has quit IRC | 20:04 |
Generated by irclog2html.py 2.17.2 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!