IRC log of #schooltool for Wednesday, 2011-05-18

*** jelkner has quit IRC00:31
*** alga has quit IRC02:37
*** klausade has quit IRC03:31
*** th1a has quit IRC05:43
*** aks has joined #schooltool06:10
*** aks has joined #schooltool06:10
*** replaceafill has joined #schooltool08:46
*** alga has joined #schooltool09:34
*** alga has quit IRC09:54
*** yvl has joined #schooltool11:00
replaceafillyvl do you have a moment after you drink your coffee? :)11:06
yvlsure replaceafill :)11:06
replaceafill(asumming it's coffee time...)11:06
yvlbullseye ;)11:07
replaceafilli just want to report my "findings" on jquery-ui and have your suggestions11:07
yvlplease go ahead :)11:07
replaceafillactually, i have more questions than findings11:08
yvlgimme 5 mins to get more coffee11:09
replaceafillok11:09
replaceafillyvl http://69.164.203.135:7080/schoolyears/2011/groups11:12
replaceafillclick New Group11:12
replaceafilljust a hack to see how those modal dialogs work11:12
yvllooking...11:15
yvlcool11:18
replaceafillso, now that i know how the dialogs work, here are some questions:11:18
replaceafill1. how do we sync validation?11:18
replaceafillwe need client-side and server-side validations, right?11:19
replaceafillwe have the second11:19
replaceafillall i can think of has remote calls involved11:19
yvlI guess we should keep just the server-side validation11:20
replaceafillme 211:20
replaceafillbut if the user doesn't fill the "title" for groups, he should receive the "required input missing" message, right?11:21
replaceafilli mean, in the jquery dialog11:21
yvlbasically it should reload contnent of the dialog11:21
yvlwe will still need to style it with our CSS11:21
yvland an ability to display additional HTML there11:22
yvllike labels, additional information text and so on11:22
replaceafillok, let me get it straight11:23
replaceafillwe have the typical add form11:23
replaceafill(what we have now)11:23
replaceafillz3c.form, etc11:24
replaceafillwe code this jquery-ui dialog11:24
replaceafillin this case, add it to the groups container view11:24
replaceafilland fill the "values": labels, input names, hints, from the z3c.form?11:25
yvlmaybe even the whole html content of the dialog11:26
yvlthink of it this way11:26
replaceafillsure, i tried that11:26
yvlsay, we have 5 complex add forms in a page11:26
replaceafilluse the z3c.form macros11:26
* replaceafill listens11:26
yvlif we load them all (hidden) each time somebody looks at the page...11:26
yvlI would prefer the "pre-loading" optional11:26
yvlas in: click button, do http request, fill the dialog with response html11:27
replaceafillajaxy11:27
yvlyes :|11:27
replaceafill:(11:27
yvldon't know how much trouble that is11:27
replaceafillok, i tried that11:28
replaceafillcreate a z3c.form version of the add course form11:28
replaceafillbtw, these old zope.app.form.... :'''(11:28
yvlI feel your pain11:28
replaceafillanyway, i created a form with a template with only two macros11:28
replaceafillthe header and the widgets of the form11:29
yvlit renders only <form>...</form>, right?11:29
replaceafillyes11:29
replaceafillbut without the form buttons11:29
replaceafillbecause those have to live in the jquery side11:29
replaceafillfor the dialog to work11:29
replaceafillthe problem there was that i couldnt find a way to submit the form11:30
replaceafilla clean way11:30
replaceafillbut i tried to load the whole <form></form> tag11:31
replaceafillmaybe if i take only pieces could work11:31
replaceafillincluding the "action" attribute of the form11:31
replaceafilland setting that in the jquery-ui side11:31
yvlby the way, maybe you can get away with "rendered" form buttons?11:32
replaceafilli guess i just wanted your confirmation on my belief that we need to rebuild the form in the jquery-ui side11:32
yvland bind JS to them?11:32
replaceafilli thought of that11:32
yvland skip jquery buttons altogether11:32
yvlwell, if we can avoid rebuilding the form on jquery side, we should11:33
yvlif we can't, then I'm sad, but oh well - life goes on11:33
replaceafillthen we'd be using only modal dialogs, and not modal forms in jquery-ui11:34
replaceafill:D11:34
yvlthat's also a reasonable option11:34
replaceafillok, i've confirmed my thoughts :)11:35
replaceafilli'm going to try that today11:35
yvlthere's also that thing with pre-loading11:35
yvlon one hand - it's nice to pre-load the forms11:35
replaceafillah, what did you mean by "optional"11:35
yvlinsta-feedback after clicking a button is cool11:36
yvlon the other hand - extra payload each time people look at the page11:36
yvland we also need to keep in mind, that if page submits something ajaxy that changes the data model11:37
yvlpre-loaded things should be reloaded11:37
yvlso - extra pain11:37
replaceafillyes11:37
yvlumm, regarding "optional"... I think I said "option" :)11:38
replaceafillwell, that experiment i showed you is not so ajaxy, because it re-renders the groups page after submitting11:38
yvlthat is good11:38
yvlit could re-render part of the page11:38
replaceafill<yvl> I would prefer the "pre-loading" optional11:38
yvloh11:38
replaceafillbut im clear what you meant now11:38
yvlyes, that ;)11:39
replaceafillah last thing11:39
replaceafillthe New Group button11:39
replaceafillit's an action button11:39
replaceafilland we have to bind the jquery stuff to it11:39
yvl"$('div.content-nav a:first').click" made me giggle :)11:39
replaceafill:P11:39
replaceafillwe need id's for those, right?11:39
yvlgood point11:40
yvlI'll keep it in mind11:40
replaceafillnew navigationviewlet directive ;)11:40
yvlbasically when the action button is rendered in manager11:40
yvlif it should also render it's own script somewhere11:41
yvlthat binds the click actions and so on11:41
replaceafill:/ ?11:41
* yvl is talking to himself here :D11:41
* replaceafill tries to interpret that11:41
replaceafill:D11:42
yvlsay we render a simple action button in the new UI11:42
yvlsomewhere in the page there should be javascript11:42
yvlthat says $('mynewactionbutton').click( ....11:42
yvlthat opens the pop-up dialog with something11:42
yvlthat something, by the way could be (for example)11:43
yvlhttp://..../persons/add.html/@@js-popup11:43
replaceafillview on view!?!?11:43
yvlor 'http://.../persons/add.html/js-popup'11:43
yvlthe view can be traversable, why not? ;)11:44
*** aks has quit IRC11:44
yvlthough I'm just throwing random ideas here11:44
* replaceafill trusts yvl's magic for this11:44
yvlno magic, just zope11:44
replaceafillin the meantime i'll keep testing with :first, :last, n-child, etc11:44
replaceafill;)11:44
yvl:D11:44
yvlthat was a nice hack, btw11:45
replaceafillok, i guess that's all i had11:45
replaceafillthanks yvl11:45
replaceafilli'll let you know how today's experimenting goes11:45
yvlthanks replaceafill11:46
replaceafillah!!!11:46
replaceafilllast one!11:46
replaceafill(i promise)11:46
replaceafillthe calendar widget11:47
replaceafillthe datepicker11:47
replaceafillit has js translations files11:47
replaceafilli noticed zc.datetimewidget has logic for knowing which translation file to use11:47
replaceafillwe will need something like that11:47
replaceafill        lang = self.request.locale.id.language11:48
replaceafill        lang = lang in LANGS and lang or 'en'11:48
replaceafill        if lang != 'en':11:48
replaceafill            # en is always loaded via the resourcelibrary, so that all11:48
replaceafill            # variables are defined in js11:48
replaceafill            # TODO: do not hardcode this11:48
replaceafill            langFile = '/++resource++zc.datetimewidget/'\11:48
replaceafill                    'languages/calendar-%s.js' % lang11:48
replaceafill            langDef = "dateTimeWidgetLoadLanguageFile('%s');" % langFile11:48
replaceafill        else:11:48
replaceafill            langDef = ''11:48
replaceafilloops11:48
replaceafillsorry11:48
*** menesis has joined #schooltool11:49
*** aks has joined #schooltool11:49
replaceafillagain, i'll test and report :)11:49
yvlI wonder if it has decent fallbacks from unknown languages11:50
replaceafillit fallbacks to english11:50
replaceafillif i say $(".date-field").datepicker($.datepicker.regional['km']);11:51
replaceafilland the khmer file is not there, it displays english11:51
yvljust out of curiosity, can it accept a list of preferred languages?11:51
replaceafill:|11:51
yvl'km', 'ru', 'en'11:51
* yvl kind of got used looking at schooltool in 3-4 languages ;)11:52
yvlsimultaneously :)11:52
replaceafillah?!?!?11:53
replaceafillsimultaneously?11:53
replaceafillyou mean changing the locale of the browser?11:53
yvlwell, I have a preferred list in FFox11:53
yvlincluding Lithuanian, English, Russian and Khmer11:54
replaceafilli've always looked for an extension that can switch between languages easily11:54
replaceafilla firefox extension11:54
yvloh11:54
yvlbtw - schooltool's switcher is not good enough for you? ;)11:54
replaceafill?!?!?11:55
replaceafillam i missing a feature?!?!?11:55
yvlif you specify more than one language in schooltool.conf11:56
yvlyou get a small switcher near your login name11:56
replaceafillyes...?11:56
yvllang en, ru11:56
replaceafillah?!?!?111:56
replaceafillcome on!!!11:56
replaceafillreally?11:56
yvlyou can select the language11:56
yvlalso!11:56
yvllang test, en11:56
yvltry this one, you will like it ;)11:56
* replaceafill tries intantaneously11:56
replaceafillI DON'T F***ING BELIEVE THIS!11:58
replaceafilli've been here for 2 years, started translating this stuff...11:58
replaceafilland i just realized about this!?!?!?11:59
yvlwell, we are very good at documenting features ;)11:59
replaceafill:D11:59
* replaceafill goes to be thinking "how is this possible?"11:59
replaceafillthanks for the tip11:59
replaceafill:)11:59
replaceafillwell, bed time, see you yvl12:00
yvloh, and try the test translation12:00
yvlyou can reload it at http://localhost/schooltool/control/TranslationDomain.html12:00
replaceafillso, test is an actual language?12:00
yvlyes12:01
replaceafilli thought you wrote as an example12:01
yvlit shows translation domains!12:01
yvlif you ever wondered if a string comes from gradebook or journal12:01
yvlthis is the thing to use12:01
* replaceafill cries his eyes out!12:01
replaceafillhow long has this been around?12:02
replaceafillsince the beginning?12:02
yvlsince the last ice age :|12:02
replaceafill:(12:02
yvlI somewhat thought you knew12:02
replaceafillwell, better to find it later than never12:02
yvltrue :)12:02
yvlwell, good night to you :)12:02
*** replaceafill has quit IRC12:03
*** aks has quit IRC12:33
*** aks has joined #schooltool12:34
*** aks has quit IRC12:59
*** yvl has quit IRC13:00
*** yvl has joined #schooltool13:01
*** aks has joined #schooltool13:04
*** aks has quit IRC14:20
*** alga has joined #schooltool15:05
*** th1a has joined #schooltool15:37
*** th1a has quit IRC15:47
*** th1a has joined #schooltool15:48
*** alga has quit IRC17:17
*** replaceafill has joined #schooltool17:55
*** alga has joined #schooltool18:56
th1a13 weeks until feature freeze!19:14
*** yvl has quit IRC19:22
*** jelkner has joined #schooltool20:54
*** fsufitch has joined #schooltool21:09
fsufitchaelkner: ping21:09
fsufitchim here, but i havent had anything to eat yet today21:09
fsufitchso i need to go grab a bit21:09
fsufitch*bite21:09
aelknerfsufitch, hey21:12
fsufitchso, bbiab21:12
aelkneri'll be here21:14
th1aHey aelkner.21:43
aelknerth1a, hey21:49
th1aHow's it going?21:50
aelknerfine, working on the section linkage during xls import21:50
fsufitchaelkner: ping22:23
fsufitchjust got back22:23
fsufitchgot food and talked to dwelsh about some stuff that he needs us to do in the sprint this weekend22:23
aelkneris he going to be around on Friday at 11:00?22:23
aelkneralso, could you please have him call me?22:24
fsufitchhe might be around22:27
fsufitchhe will *probably* be around22:28
fsufitchill go downstairs and have him call you22:28
aelknerthanks22:28
replaceafillth1a zyt?22:42
th1aI'm just sitting here tweaking PIL cropping coordinates.22:42
replaceafill:D22:42
replaceafillyou can get the exact form region in the screenshot?22:43
th1aThinking about how I'll still have to redo this again.22:43
th1aI have some standard coordinates at this point and tweak from there.22:43
replaceafillhttp://69.164.203.135:7080/schoolyears/2011/courses22:43
replaceafillif it appears in spanish you can change the language next to the log out button22:44
* replaceafill learned that last night!22:44
th1aI let Google do it.  :-D22:45
replaceafill:))22:45
replaceafillso, there's a forth button22:45
replaceafillNew Course (Popup)22:45
replaceafillclick on it and then Add22:45
replaceafillyou will see validation take place inside the form22:46
replaceafillwithout reloading the page22:46
replaceafilland if you change the language of the app to spanish22:46
replaceafilleverything works in spanish also22:46
replaceafillthere's no client-side validation22:46
replaceafillit's server-side, and refreshed using jquery's post mechanism22:47
th1aOK... I was interrupted.22:47
th1aThis is another good reason to tone down the boxes.22:48
replaceafill:)22:48
th1aYeah, that's fine.22:49
th1aThis could get rid of a lot of our dead ends.22:50
replaceafillwe should definitely consider to move older forms to z3c.form22:50
* replaceafill has a love/hate relationship with z3c.form...22:50
th1az3c.forms would work better with the pop-ups?22:51
replaceafillyes, because you can use the same class to render the whole html page or just the form tag22:51
th1aThis looks like the right way to do it.22:51
replaceafillthat example is using only the form tag22:51
th1aWhat other gotchas are there?22:51
*** jelkner has quit IRC22:52
replaceafillnot many really, because all the logic is in a python class22:52
replaceafillless javascript22:52
replaceafillif you see, it's only a dialog22:52
replaceafillnot a form dialog22:52
replaceafilli mean, jquery-ui22:52
th1aAh... nice.22:53
replaceafillso, we dont worry about synching translations, etc22:53
replaceafilli have to refine it, but that's the direction i guess22:54
th1aIt seems very doable.22:54
th1aWe've used z3c.forms in new development for a while, right?22:54
replaceafillyes, since our 2009 sprint22:55
replaceafillwell, before, but that date i remember ;)22:55
th1aSo everyone knows how to write them.22:55
replaceafilli think so22:55
th1aIt doesn't seem like a lot of new stuff to learn.22:55
replaceafillyvl made some points during the sprint why it's hard to work with it, but it's still a powerful library22:55
replaceafillno, just the javascript parts22:56
th1aWhich is actually pretty minimal.22:56
replaceafillah, last night i told yvl we also need to be able to mark the action buttons22:56
replaceafillin that example i'm saying "add this behaviour to the forth button"22:57
replaceafillwe need id's or something on them22:57
th1aWell, yes, those need love anyhow.22:57
replaceafillyes and i think yvl has an idea on how to do it22:57
replaceafillnext, i'll experiment with the datepicker and it's translations22:58
replaceafillif that's ok22:58
th1aWould you go so far as to say Zope's form machinery is actually helping us in this case?  ;-)22:58
replaceafillagain, love/hate :P22:58
replaceafilllove it for this22:58
replaceafillhate it when i try to do subforms!22:59
th1aRight, but it is giving us *something* to love here.22:59
replaceafillyep22:59
replaceafillok, back to work22:59
th1aThanks!22:59
replaceafilli'll have to check the cambodia error too23:00
th1aCan you post a branch or mail a diff for that dialog?23:00
th1aTo the developer list?23:00
replaceafillah, yes i'll push my two examples (groups and courses) and tell the story of what i've done23:01
th1aThanks!23:01
th1areplaceafill:  A completed image update -- http://book.schooltool.org/htmlhelp/courses.html23:04
replaceafill!! those images are generated with your script?23:04
th1aum... yes?23:04
replaceafillcool!23:05
* replaceafill notices the number of questions about schooltool is increasing :)23:07
th1aYes.23:07
th1aThis is a difficult one.23:08
*** alga has quit IRC23:41

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!