IRC log of #schooltool for Monday, 2011-06-27

*** aks has joined #schooltool06:12
*** aks has joined #schooltool06:12
*** menesis has joined #schooltool10:08
aksmenesis, yvl: ping14:01
yvlhey aks14:01
aksyvl, menesis: the second phase of schooltool training started today14:01
aksyvl, menesis: the first session (focussed on administrative side) just completed14:02
aksyvl, menesis: tomorrow's session would be targeted at gradebook, attendance, and calendar14:02
aksyvl, menesis: we are running training for three of our schooltool pilot schools from among our OLPC deployments14:03
aksyvl, menesis: just to share the information with you guys14:03
yvlaks, great!14:04
yvlwill forward this to Tom Hoffman today14:05
yvlhow's the training going overall?14:05
*** menesis has quit IRC14:10
aksyvl: the training is going good, and we'll be closely monitoring the schools for support14:17
aksyvl: Depending on how SchoolTool is used at the schools (which we would get data after the pilot period is over), we'll be rolling out SchoolTool for all our deployment schools14:17
yvlcool :)14:18
yvlaks, can you please remind me, how many schools participate in pilot deployment?14:18
aksyvl: 3 schools are in the SchoolTool pilot14:19
yvlgreat, we'll wait for further news :)14:20
yvlgood luck! ;)14:20
aksyvl: thanks14:20
aksyvl: we have 34 schools in total14:21
aksyvl: 34 schools as of now, we keep on adding though14:22
yvlsure :)14:22
aksyvl: see you next day14:23
yvlwell - if there are any show-stoppers, bugs, etc. - don't hesitate to put them in Launchpad14:23
yvlsee you soon! :)14:23
aksyvl: sure14:24
*** aks has quit IRC14:24
*** alga has joined #schooltool14:26
*** menesis has joined #schooltool14:44
*** menesis has quit IRC15:21
*** menesis1 has joined #schooltool15:21
*** menesis1 is now known as menesis15:21
*** replaceafill has joined #schooltool16:14
*** th1a has joined #schooltool16:19
th1ahi aelkner, replaceafill, yvl, menesis.16:31
replaceafillgood morning/afternoon16:31
aelknermorning16:31
menesishi16:31
yvlmorning guys :)16:31
th1aOK, getting back in the game after a long weekend...16:32
th1areplaceafill and I made a lot of small changes in the person pages last Friday.16:32
th1aSo you should check those out.16:32
th1aFilled out the contact pages.16:32
aelkneralready did16:32
* yvl too16:33
aelkneri noticed some jquery changes, too, what were they for?16:33
yvlwhich ones?16:33
aelknerthere were changes to the jquery source16:33
aelknerreplaceafill?16:34
replaceafillaelkner i changed the file resources we use16:34
replaceafillimage backgrounds, etc16:34
replaceafilloverlay16:34
aelknerdid you download those changes or make them yourself?16:34
replaceafillcreated them using the jquery theme roller16:35
aelkneroh, ok16:35
aelknerdidn't know you could do that16:35
replaceafillhttp://jqueryui.com/themeroller/16:36
th1aIt still isn't quite the right shade.16:36
th1aBut I don't want to work on it right now.16:36
aelkneri thought that third party source was supposed to be downloaded and used as is, so i was confused16:36
aelkneranyway, i also noticed you commented out the action buttons16:37
replaceafillaelkner where?16:38
th1aSo basically the "actions" for an object should only be visible on that object's index page.16:38
aelknerparge.pt and page_expanded.pt16:38
th1aIf you're on a specific form or sub-doo hickey, you should only see actions relevant to *that object or form*.16:38
aelkneryvl, why is it called page_expanded.pt when it seems like page.pt with stuff taken out?16:38
th1ae.g., when you're managing contacts, there is just an add new contact action.16:39
yvlaelkner - it's larger16:39
yvlcontent area is expanded and there are no left/right bards16:39
yvlbars16:39
aelknerlarger space, thus the name, expanded, i see16:40
replaceafillaelkner i didnt touch those templates16:40
aelknerth1a, ok, so reports needs to do something to get the action buttons to come back16:40
th1aHm?16:40
th1aWell, part II of this is not done: adding "Done" links.16:41
aelknerreplaceafill, did you pll core and gradebook trunk and restart the server?16:41
replaceafillyes16:41
aelknerif you goto a person's reports page, the links on the left are now gone16:41
th1aThat's the idea, aelkner.16:42
th1aAlthough there shouldn't also be an empty box there.16:42
* th1a wonders if aelkner has blacklisted my nick.16:43
aelknerhm?16:43
th1aI just explained why those links shouldn't be there.16:44
aelkneri should ask you to explain why that is16:44
th1aThey're a distraction.16:44
aelkneri mean, navigationally, the user is forced to use the breadcrums?16:44
th1aI also explained above that there is supposed to be a "Done" button.16:45
aelknerso the reports view needs a Done button16:45
th1areplaceafill and I will deal with that.16:45
aelknerwhat if the view is long enough that the Done button needs to be scrolled to?16:46
th1aBut also, a "preferences" link on the reports page suggests that it is report preferences.16:46
th1aThen the user will have to scroll.16:46
th1aThe sidebar does not address that problem.16:46
aelknerwell, the view has 'John Doe'  then 'Reports' as subtitle16:46
aelkneri would thing that preferences would imply Jphn Doe preferences, but perhaps that's ust me16:47
yvlAre you sure you don't want to put the done/back/whatever link at the left column, at the top, without a containing box?16:47
yvlor make "$(PERSON)" title itself a link?16:47
th1aWell, maybe.16:47
th1aI have been thinking about making $(PERSON) a link.16:48
yvlon one hand - it's quite common16:48
th1aThere is no reason not to.16:48
th1aUnless yvl is thinking of one.16:48
yvlon another - it may be a little bit less obvious than it could be16:48
th1aIt can't be the main route.16:48
th1aBut it can be a side route.16:48
* yvl thinks the main title could be the link16:48
yvlsorry - a link :)16:49
th1aOK...16:49
th1aThe main point here is that the sidebar is not going to be automatically passed down to sub-objects.16:50
th1aUnderstood?16:50
yvl+116:50
yvlparts of it can be passed explicitly where it makes sense, of course - if we end up with places were it makes sense16:51
th1aYes.16:52
th1aAlso, it make the modals and regular forms work more similarly (since there is no sidebar for modals).16:52
aelknerperhaps instead of having html comments in page.pt and page_expanded.pt16:52
aelknerwe should get rid of those blocks?16:52
yvlit might be time16:53
th1aI don't think they will be permanent, aelkner.16:53
th1aOK, moving on...16:54
th1ayvl: What are you up to?16:54
yvldid some groundwork for our "ST javascript API"16:55
yvlfinished the serialize: and json: tal expressions16:55
yvlcleaned up flourish.js a bit16:55
yvladded ModalFormLinkViewlet16:55
yvl(a link that opens a modal form)16:56
yvlremade person preferences to use that16:56
yvlremade report link manager to use serialize:16:56
yvlthat's it16:57
yvlplumbing :)16:57
th1aDoes that require further explanation for aelkner and replaceafill to use it?16:57
yvlI guess so16:57
yvlwe can do that after the meeting16:57
replaceafill"var title_hack" :D16:57
yvlit's a nasty hack16:58
yvlnot mine :D16:58
replaceafill;)16:58
yvlah, right16:58
yvlalso spent some time looking at the jquery "bug"16:58
yvlwith modal dialog auto position16:58
yvlseems like it's a known bug, nobody is going to fix that and everybody works around16:59
aelknerdid you see how i added the line to calculate the width first?16:59
yvlyes16:59
yvlbad!16:59
yvlvery bad16:59
yvlat least if I got it right16:59
yvlI think you pre-loaded the form16:59
yvlwe should not do this!16:59
aelknerno17:00
aelkneri don't prelead the form17:00
aelkneri explained that last week17:00
aelknerthat is part of what i changed, to ot preload the form17:00
aelknernot17:00
yvl$(document).ready(function() {17:00
yvl$(person_preferences_form_id).load(17:00
yvlguess what this does17:00
aelknerthat's for preferences17:01
aelkneri was talking about reports17:01
yvlunless I forgot something again17:01
yvloh17:01
yvlright, reports :)17:01
aelknerpreferences doesn't use my new flourish.js function call17:01
yvlthen I withdraw my comments17:01
aelknercall_dialog17:01
aelknerthat's where i put the new line to calculcate the width17:01
aelknerit doesn't work for some reason, except, and get this17:02
aelknerif you put a breakpoint in firebug at the width calc17:02
yvlright!17:02
aelknerand then step over it17:02
yvlguess what17:02
aelknerthen it works17:02
yvlif you added setTimeout in a right place it would also work17:02
yvlor, if you look at it second time17:03
aelknerthat's what i was going to ask17:03
yvlf-ing jquery17:03
yvlwell, since we load after clikc17:03
aelkner\jquery requires some kind of setTimeout hack?17:03
yvlsomething like that17:03
aelkneri had a feeling some call to jquery was necessary to make it wait or someting17:04
yvland they didnt fix that yet, at least in 1.8.3 of... jquery.dialog or whatever17:04
yvlanyway, I did the set up of dialog after the form is loaded17:04
yvlthat's what people seem to usually17:04
yvldo17:04
yvlsee flourish.js17:04
yvldrawback - nothing happens until the form is loaded17:05
yvlso you get a "what is happening" with no dialog until it's loaded17:05
yvlthat is ok, I think17:05
yvlbecause this is a place where we should hook a spinner or something17:05
yvland handle errors17:05
yvlso that's a big TODO17:06
th1aYes to spinner.17:06
yvlthat also includes some work so that "ajax" calls should not display log-in dialog, or render it correctly17:07
yvlsame for timeouts, exceptions and other stuff17:07
yvlthat's another TODO :)17:08
yvlbasically - if we do correct spinner and error handling, we don't need to deal with that jquery bug17:09
yvlok, let's move along, shall we? :)17:10
th1aYes.17:10
th1aSorry, distracted here.17:10
th1aOK.17:10
th1amenesis:  We've been ignoring you.  Any issues from your end?17:11
menesisth1a: no issues17:11
yvl[btw, aks from OLPC dropped by today (on IRC) - 3 school pilots are going fine, see today's IRC logs]17:11
menesissorry I did not join you in the flourish work17:11
th1aAh, thanks menesis!17:12
th1amenesis:  No problem.17:12
th1aOK, aelkner, how's your queue look?17:12
aelknerempty i think17:13
th1aOK.17:13
th1aOne of the last person tasks is to make the "add another person" functionality part of all the add pages.17:13
th1aSo...17:14
replaceafilland "Need empty message for accordions"17:14
th1aSubmit | Submit and add | Cancel17:14
th1aDid you start the additional empty messages, aelkner?17:14
aelknerdon't understand17:15
th1aWhich?17:16
aelknerso i guess i didn't17:16
th1aOK.17:16
th1aDo you understand the add another person issue?17:16
aelknerno, i don't,17:17
aelkneri must have lost track of the email about that17:17
th1aCurrently there is a separate form if you want to add multiple people.17:17
*** ignas has joined #schooltool17:17
aelknerhow does the user call up that form?17:17
th1aIt should just be integrated into all the add person (student, etc) pages.17:17
th1aIt should just be a separate submit button on each form.17:18
th1aSubmit and add17:18
aelknerso it's just a case where Submit and add does what Submit does17:19
aelknerbut does not redirect back to index.html view?17:19
aelknerbut instead to add view again?17:19
yvlyes17:19
th1aYes.17:19
aelknerok, understood17:19
replaceafillbut it also shows the persons you just added17:20
replaceafillare we keeping that?17:20
aelknerhow would it do that?17:20
th1aWhere does it show them?17:20
th1aShould we use some jquery confirmation something?17:20
replaceafillit doesnt anymore, it used to do it in the old UI? :)17:20
yvlit used to show a list of persons you added in old UI17:21
yvlit does not anymore17:21
replaceafillah17:21
replaceafillok then :)17:21
yvlhttp://69.164.203.135:6660/persons/add_multiple.html still does that17:21
th1aOh, we do have a message space.17:22
th1aalso, replaceafill, we need to fix that "there were some errors" message!17:22
replaceafillyes!17:22
replaceafilland "You are not allowed to access this page. You can click on the back button in your browser to go back, or ask a more privileged user to log in. "17:23
aelknerah, the Added Persons fieldset17:23
yvlright17:23
th1aShould there just be a notification space there?17:24
yvlby the way, are we meeting tomorrow?17:24
th1aFor errors or added persons?17:24
th1ayvl:  I'd like to keep doing this one more week.17:24
yvlok17:24
th1aBut if you can't make one or two, just let me know.17:24
yvlsure17:24
th1amenesis is probably not required.17:25
* yvl likes the increased communication17:25
th1aWe should always do this, really...17:25
th1aCan we make a quick decision about where these messages go?17:25
th1aIs there already a space defined in the template?17:26
yvlI don't think so... but I'm not sure17:26
yvlwell, there are "info" and "status" slots17:27
th1areplaceafill:  Can we look at that first today?17:27
replaceafillsure17:27
yvlbut it is more of a styling issue17:27
th1aOK, we'll let aelkner know where to put his messages.17:27
th1aaelkner, you have enough to get started?17:27
replaceafillth1a also, Chandara replied17:28
replaceafilli need to work on that too17:29
th1aYes, how about if we work for a bit and then you work on Cambodia later in the day?17:29
replaceafillmaybe tomorrow17:29
replaceafillcool17:29
aelknerth1a, i wouldn't know what to do next at this point17:29
aelknerexcept the Submit and add thing17:29
aelknerbut that's not a day's worth of work17:30
th1aOK, I'll get back to you.17:30
yvlit depends :)17:30
yvlif you want to just implement "add and add more" button17:30
yvlit's not a days work17:30
yvlif you want to add a list of recently added persons17:30
yvlthat's more work17:31
th1aWe don't need a list.17:31
aelknerby the way, Add and Add More seems clearer than Submit and Submit and Add17:31
aelknerbut that's just me perhaps17:31
th1aJust a "You just added this person."17:31
yvlsounds good17:31
th1aWell, I'm leaning away from different labels for every submit button.17:31
th1aI think consistency on the whole is better.17:31
aelkner+117:32
th1aSo without a good reason use "Submit"17:32
yvlwell17:32
yvlI wouldn't like a lot of seeing "submit"s everywhere17:32
yvlit's bad style, if you ask me17:32
yvla lot of UI people mocked that approach17:32
aelknerHow about Add | Add and Done | Cancel17:33
th1aLets say "Submit" for now.17:33
th1aIf yvl would like to submit the mocking to me, I'll consider it.17:34
* yvl does not remember in which books he read that17:35
th1aI will consult mine.17:35
th1aOK, lets wrap this up.17:35
yvlsure17:35
* th1a drops the bag of gravel.17:35
*** alga has quit IRC17:35
* th1a goes to grab a quick bite.17:36
yvlright17:36
* replaceafill too17:36
aelkneryvl, you were going to explain stuff17:36
yvlwait, replaceafill! :)17:36
replaceafilloh sure17:36
replaceafillsorry17:36
yvllet's just take a quick look at what's there17:36
yvland see if there are questions17:36
aelknershoot17:36
yvlfirst, skin/flrourish/templates/modal_form_link.pt17:37
yvlit's a link that opens a modal form - used for preferences at the moment17:37
yvlnotice the "push" and "pop" wrappers at the beginning/end of the template17:38
yvlthis is exposed wiring at the moment17:38
yvland is mandatory for all templates that use "scriptlocal" directive17:38
yvlthen there's <tal:script replace="sctucture scriptlocal: ...17:39
yvlit simply uses JSON to put some tal variables to javascript local variables17:39
yvlsyntax is similar to that of tal:attributes17:39
yvlif you looked at http://69.164.203.135:6660/persons/manager17:40
yvlrendered page source17:40
yvlat the preferences link source17:40
yvlyou would notice this:17:40
yvl<script>$.extend(true,ST.local,{"form_id":"#LinkIdViewlet-page_refine-person-settings-links-preferences--container","link_id":"#LinkIdViewlet-page_refine-person-settings-links-preferences-","url":"http:\/\/69.164.203.135:6660\/persons\/manager\/preferences"});</script>17:41
yvlthis is the result of "scriptlocal:"17:41
yvlit allows to access those variables as17:41
yvlST.local.url17:41
yvlST.local.form_id and so on17:41
yvlnext, there's the actual dialog binding17:42
yvlST.dialogs.modal_form17:42
yvlI think that part is self-explanatory17:42
replaceafillis the escaping automatically done?17:43
yvlyes17:43
yvlyou can look at17:43
replaceafilldo we have to escape "/"?17:43
yvl</script>17:43
replaceafillah17:43
replaceafill:D17:43
yvlprobably should limit to that, but... :)17:43
replaceafillalways miss that one :D17:43
replaceafillsorry yvl go on17:44
yvlif you're interested, you can look at flourish/tests/test_tal.py at some point17:44
yvlthese are doctests17:44
yvlbut they kind of show off the syntax of scriptlocal:17:44
replaceafillhey! we can get rid of the title_hack with this, right?17:44
replaceafillpassing the title from the view to js17:44
replaceafillbefore building the dialog17:45
yvlwell, do you mean - the link viewlet title? :)17:45
yvlbut yes, we can17:45
yvlok, now comes the fun stuff :)17:45
yvlplease look at schooltool/report/templates/f_report_link_manager.pt17:46
yvl(the class that renders is report/report.py FlourishReportLinkViewletManager)17:46
yvlI overdid it a bit there17:47
yvlserializing too much info17:47
yvlbut it shows how we can use that functionality17:47
yvlreplace="structure scriptlocal: groups view/table"17:47
yvlview/table is a big dict of all reports, links, url17:48
replaceafillwe should only serialize basic types, correct?17:48
yvlyes!17:48
yvlyou'll get errors if you serialize objects17:48
yvlso there, view/table is re-used17:49
yvlit's used for html17:49
yvland then the data is serialized for use in javascript17:49
aelknerwhy do we need to do this?17:49
aelkneroh, wait17:50
aelknerso the modal forms are rendered for each report link?17:50
yvlyes17:51
yvlyou are right, that could actually be improved :)17:51
yvlwe could use only one "container" div for all the modal forms17:52
yvlsince they are modal dialogs, and only one will be displayed at a time17:52
aelknera question:17:52
aelknerwhy have we had this in the past?17:52
aelkner<metal:block tal:replace='structure string:&lt;script type="text/javascript"&gt;' />17:52
yvlok17:53
yvltal does not interpret inside <script> tag17:53
yvlit explicitly ignores the contents17:53
yvlso replaceafill put metal block, that renders "<script>" string17:53
aelknerwell, that was done in the gradebook years ago, but...17:54
yvloh, ok17:54
yvlsorry, didn't remember that :)17:54
aelknerso the reason is that <metal:block> would not owkr inside <script>17:54
aelknerwork17:54
aelkneris that it?17:54
yvltal:block would not work inside <script>17:54
aelknerok, got it17:55
yvlalso, putting <tal:block> directly to javascript variables can easily break them17:55
yvlunsafe symbols, and so on17:55
yvlcurrent mechanism uses JSON, which sorts that stuff our17:56
yvlout17:56
yvlthere is one very nasty catch you should remember while using ST.local17:56
aelknerwhere's the JSON, what line of code?17:57
yvloh, ok17:57
yvlone moment17:57
yvlskin/flourish/tal.py17:57
yvlJSONEncoder is the one we use17:57
yvlScriptLocalExpression.__call__ does the encoding17:58
yvlself.encoder.encode(vars)17:58
yvlso, the nasty catch to remember:17:59
yvlJavascript is a language of closures17:59
yvlmeaning you have to make it make a copy of your "global" variables here18:00
yvlif you put something like ST.local.groups18:00
yvldirectly in a function in the script18:00
yvlin the template18:00
yvlit will look up ST.local.groups only after the page is loaded18:00
yvlwe have to make wrappers for such cases18:01
yvlST.dialogs.modal_form is such a wrapper:18:01
yvlsince you pass arguments to it,18:01
yvlST.dialogs.modal_form(ST.local.form_id, ...)18:01
yvlthe function makes a copy of them18:01
yvlI'm just saying this because I didn't get used to this style of coding yet18:02
yvlaelkner, if the last part is unclear, it's ok - just know that if you set ST.local.something and while debugging you notice that it's not there - contact me :)18:03
yvlwell, actually that's all I wanted to say today18:03
aelkner+1 on not being used to this style of coding :)18:04
yvl:)18:04
yvljust wanted to point at the places that might be interesting18:04
aelknerthere's a lot to digest here before i can even ask a meaningful question18:04
aelkneralso, at some point we need to nail down a pattern that we can all follow18:04
aelknerand come to the end of 'an that part will change, etc.'18:05
yvlI think we're getting closer to that point18:05
yvlUI remake is a serious matter! ;)18:06
aelknerquestion: did you create the scriptlocal directive?18:06
yvlreplaceafill, sorry I kept you from your breakfast(?)18:06
yvlaelkner - yes18:06
replaceafillyvl np18:06
aelknerso tales:expressiontype is all you need to do that?18:07
yvlyes :)18:07
aelknerreplaceafill, yvl, a quick nitpik18:07
yvlsure18:07
aelkneri remember ignas nailing into my head that files must end with newlines18:07
aelknerwe seem to have stayed from that rule18:08
yvlright, I've noticed some commits without new lines!18:08
yvlbad replaceafill! :)18:08
aelknerbad yvl :)18:08
replaceafillsorry :(18:08
aelknersee tal.py18:08
replaceafilli didnt care too much :P18:08
aelknertal.zcml18:09
yvlwait18:09
aelknerjjust about every file it seems18:09
replaceafilli see new lines there18:09
yvlthey end with newline18:09
aelknernope18:09
yvlbut they do18:09
replaceafilland where did i miss newlines?18:09
*** ignas has quit IRC18:09
aelknergo to the end of any one of those files18:09
aelknerthe cursor should be on a blank line at the end of the file18:09
yvlaelkner, there are newlines at the end of the last string18:10
aelknerinstead, 'it's on the last line18:10
* yvl is quite sure18:10
aelknerjust go to any one of the files and go to the end18:10
aelknerwhere is the cursor18:10
replaceafillaelkner they *have* newlines18:10
aelknerat the end of the line18:10
yvlprint open('tal.py').readlines()[-1]18:10
aelknerthere should be a blank line with newline then18:10
replaceafillcat tal.py18:10
replaceafillthe prompt is in a new line18:11
aelkneri misstated the rule then18:11
aelknerthe rule is: all files end with a blank line wth newline18:12
aelknerthis allows the next person to start editing18:12
replaceafill¬¬18:12
yvlwell, actually this is not according to pep-818:12
yvlrun "pep8 src/schooltool/skin/flourish.py"18:12
yvlsorry "pep8 src/schooltool/skin/flourish"18:12
yvlit passes, apart for some other quirks18:12
aelknerwell, ignas is not here anymore, so i'll get used to the new rule18:12
yvlpep-8 states that there should be a newline symbol at the end of the last line in a file18:13
yvlbut only one18:13
yvlor else you get: W391 blank line at end of file18:13
aelkneri'm confused though18:13
yvlwhat editor are you using, aelkner?18:14
yvljust curious18:14
aelkneri use gedit because emacs is horrible18:14
* yvl is forgetful18:14
replaceafilli use notepad.exe18:14
aelknerso in emacs, when you go to the end of the file, where is the cursor?18:14
aelknerat the end of the last line?18:14
aelknerreplaceafill, i thought you used emacs18:15
yvlaelkner, gedit eats up that end-of-line for some reason18:15
aelknerah, weird18:16
aelkneranyway, i'll get used to the change, np18:16
replaceafillwe should have a Makefile rule for pep-8 checking :)18:16
aelkneronly thing is, most of the existing code is different than the new code you have been adding18:17
aelknerbut whatever18:17
yvlaelkner, that happened when we started using "pep8" tool18:17
yvlto check if the code is according to pep-818:17
aelknerreplaceafill, +1 on makefile applying rule18:18
yvlaelkner, we need to get you a decent IDE that is not emacs ;)18:20
yvlpreferably something simple-but-working, like PyCharm18:20
yvlor IDLE18:20
aelkneri love gedit, it's easy to use and has the horizontal line for column 80p18:20
aelknerand IDEs have issues with zope anyway18:20
yvlyep18:21
aelkneri don't need to change the editor, just get used to you guys not adding blank lines at end of files18:21
aelknerlike we did in the past with ignas18:22
yvlwell the thing is that we do add newlines18:22
yvland I don't know if gedit does that18:22
aelknernot after blank lines18:22
aelknerbasically two newlines was the convention18:22
aelknernow you changed it, i accept it, i'll get used to it18:23
yvlah, ok18:23
yvlsorry, I didn't knew that18:23
yvlor maybe forgott18:23
aelkneryeah, well, you came to the project after ignas, and he didn't pass along that to you18:23
yvlhappens...18:24
yvlprobably my choice is to go with pep818:24
yvlbecause it kind of solves a lot of coding style discussions18:24
yvl"do like the python world does"18:24
aelknerso when you go to the end of the file, where is the cursor?18:24
aelkneris it at the end of the last line?18:24
yvlno, it's in the next line18:25
aelknerah18:25
yvlemacs follow file quite literally18:25
yvlthere is \n at the end of the line18:25
yvland emacs display the cursor after the last symbol18:25
yvlhence - in a new line18:25
aelkneri see, and gedit doesn't want to work that way18:26
aelknerlet's move on, i'll deal with it18:26
yvlthanks, aelkner18:26
yvlsorry for the trouble18:26
aelknernp18:26
yvlas far as the scriptlocal goes - I think I'll leave the topic open at this point18:27
yvloh, and flourish.js currently has a style I plan on using further on18:27
yvlfor "API" part of our javascript18:28
yvl"public" and "private" functions18:28
yvlmight be interesting to look at, but not very important now18:28
aelknercould you explain?18:29
yvlin flourish.js18:29
yvlmodal_form function is "visible from outside"18:30
*** ignas has joined #schooltool18:30
yvlyou can do ST.dialogs.modal_form(...)18:30
* th1a goes to take a shower.18:30
yvlbut call_modal_form is not visible18:30
yvlonly functions inside ST.dialogs can use it18:30
yvlthis way we avoid duplicate names in the global namespace18:31
yvland have at least some consistency18:31
yvlalso - it is visible in debugger like firebug18:31
yvlyou should see modal_dialog in ST.dialogs expression18:31
yvlbut not the call_modal_form, which is really a helper18:31
yvlthat should make the work easier in the long run18:32
yvlwell, it's time for me to go18:33
yvlI'll be here tomorrow as usual18:33
yvlgood luck guys, and happy coding! ;)18:33
aelknerthanks18:33
aelknercya18:33
th1ahi replaceafill.18:47
replaceafillhey th1a18:47
th1aOne task for aelkner:  I think the contact view view would be better as a modal since it throws you far out of context.18:48
th1aOr maybe it needs breadcrumbs.18:48
th1aWell, it does need breadcrumbs.18:49
th1aBut the breadcrumbs won't help you get back in that case.18:49
th1aAnd the "Back" button might be tricky.18:49
th1aI guess the "Submit" button on edit knows where to put you.18:50
th1aSo "Back" might be easy too.18:50
th1aI guess we need breadcrumbs for all the contact views.18:50
replaceafillyes, edit uses the request to know how to redirect18:51
aelknerwe certainly don't want the user to have to use the back button18:52
th1aOf course not.18:53
th1aMaybe I should just give aelkner the task of adding "Done" buttons.18:54
th1aOK, how about this:18:54
th1a(for aelkner today)18:54
th1a1) the multiple person add buttons;18:55
aelknerwhat was our final agreement on the buttons?18:55
th1a2) the "This person has no..." text in all the accordions as needed (like contacts).18:55
aelknerSubmit | Submit and add | Cancel?18:56
th1aYes.18:56
aelknerok18:56
aelkneri'll need a 3)18:56
th1a3) "Done" links (h3's) at the bottom of the relationship-based views and other person-related views that don't have a "Submit"18:56
th1aTo take you back to the person view.18:57
aelknerok18:57
th1ae.g. http://69.164.203.135:6660/persons/ad/@@advisors.html18:58
th1aActually, maybe that does need to be at the top.18:58
th1aTry both.18:58
th1aAlign left, top and bottom.18:58
aelknerDone at both top and bottom?18:58
th1aWe'll see how it looks.18:58
th1aSure.18:58
aelknerok18:58
aelkneralways, or in special cases?18:58
th1aTop and bottom always?18:59
aelkneryes18:59
th1aaelkner, this is just a draft.18:59
aelknerok, case by case18:59
th1aNo... we'll do it the same, just probably the final version will be different.18:59
th1aSo yes "always."18:59
aelknerusually, if the view is allowed to grow too big, then buttons at the top are important19:00
th1aWe just need to take a look at it.19:00
th1aThe final version will be different.19:00
aelknerok19:00
th1aActually, put the top one under current advisors.19:01
th1aWell, put it all three places and we'll decide which to get rid of.19:01
th1aJust do one now and we'll decide, how about that?19:02
aelkneryes19:02
th1aI need to get you working replaceafill-style.19:02
th1aSpeaking of which...19:02
th1aOK, replaceafill error messages.19:02
replaceafilljust a comment on mine19:02
* th1a gets his form book.19:03
replaceafill-1 on Done links, +1 on making the person title "the" link19:03
replaceafillok th1a error messages19:03
th1aNo... there has to be some "right" way to leave the page.19:03
replaceafillok19:04
replaceafillth1a by book you mean "Web Form Design" correct?19:04
th1aYes.19:05
replaceafillp187?19:05
th1aDo you have it?19:05
replaceafillyep, the pdf19:05
th1a"Please correct the marked fields below."19:05
th1aI like that one.19:06
replaceafillare we going to use the "status" space of forms for error and success messages?19:06
th1aWe just need to pick one.19:06
aelknerWeb Form Design: Filling in the Blanks?19:06
th1aYes.19:06
aelknerordering on amazon...19:06
th1aAnd we do need a positive and negative style.19:07
th1aOhh...19:07
th1aNo....19:07
th1aoh, yes.19:07
th1aOK, that is the subtitle.19:07
replaceafillth1a that's why i was asking19:07
th1aYes.19:07
replaceafillforms only have a "status" div19:07
replaceafilland the class a "status" property19:07
th1aGreat minds think alike...19:07
th1aespecially when they're reading the same book!19:07
replaceafill:D19:08
th1aWe'll need a little more mojo then.19:08
replaceafilllet me do a little change in the css19:09
* replaceafill has been hiding stuff again...19:09
replaceafillok, http://69.164.203.135:6660/persons/add.html19:10
replaceafillget any error19:10
replaceafilllike submitting without data19:10
th1aYes?19:11
replaceafillthe template puts some of the errors at that space19:11
th1aWe don't need an exclamation point in "This username is already in use!"19:11
replaceafill:D19:11
th1aAnyhow...19:11
replaceafillfixed19:13
replaceafill(removed the "!")19:13
replaceafillso, i was saying19:13
replaceafillthe template puts some of the errors above19:13
replaceafilland sometimes doesnt use the fields for that19:14
replaceafillfor example...19:14
replaceafilltry to add a person, but enter different passwords19:14
replaceafill(and confirmation)19:14
th1aWell, that's a bug, right?19:16
replaceafillit's because the interface uses an invariant19:16
replaceafillto check that19:16
th1aSo...19:17
replaceafillmore z3c.form hacking :)19:17
th1aIf it has to be done it has to be done.19:18
replaceafillk19:19
aelknerwell, yes, always the hack19:19
replaceafillth1a i'll start changing the error message to: "Please correct the marked fields below.19:20
th1akk19:20
replaceafilli'd like to use jquery to mark the fields too, like in the guidelines19:21
replaceafill(with red borders)19:21
replaceafilltoo much?19:21
th1aWe might need more shades, but red for now is ok.19:21
replaceafillmessage changed for person forms19:30
replaceafillwe probably need a base class for all our forms...19:30
aelknerof course we do19:32
aelknerbut only if our discussion thread is geared to plumbing19:36
aelknerreplaceafill, also, when you say you did something, i'm not sure what that implies19:37
aelknerchange to trunk?19:37
replaceafillno, i'm working on the test server19:38
aelkneror are you just changing your own branch and restarting your server19:38
replaceafilli say when i do something so th1a can check19:38
aelknerok, i'll steer clear then19:39
aelknerif you want to talk plumbing, i'm all ears though19:39
aelknerbut i'll need the latest code to do that19:39
aelknerreplaceafill, a quick question:19:44
aelknerhow does FlourishPersonAddView add view work even though it has no flourish base class?19:45
aelknertemplate = InheritTemplate()?19:45
aelkneroh, maybe yvl made that change19:46
aelkneri think i like that19:46
aelknerless confusion with the base classes that way19:46
th1aWe can discuss form base classes tomorrow.19:50
replaceafillth1a http://69.164.203.135:6660/persons/alvaro/@@edit.html19:51
replaceafillremove first name and last name19:51
replaceafilland hit apply19:51
th1aYes?19:52
replaceafillsee the style of inputs with errors?19:52
th1aOh.  I had to reload to get the style.19:52
*** ignas has quit IRC19:53
replaceafill:)19:53
th1aWhat shade of red is that?19:53
th1aBrighter?19:53
replaceafillit's a border19:53
th1aSame shade as the text?19:53
replaceafillit's the same style we use for ":focus"19:53
replaceafillit's orange!!! 2px solid #DD481419:53
replaceafill:)19:53
replaceafillfrom the guidelines19:53
replaceafillchange it to "dark red" or to "light red"19:54
th1aWell, light red for now.19:54
th1a#DD4814 = light red.19:55
replaceafillhhmm i thought that was orange19:56
replaceafilland light red: #aa0000;19:56
th1aI don't mean that literally.  ;-)19:56
th1aWhen you read #DD4814 in the spec, think light red.19:56
replaceafillah!19:56
replaceafillgot it :)19:56
replaceafillchanged http://69.164.203.135:6660/persons/alvaro/@@edit.html19:57
*** menesis has quit IRC20:00
th1aThat's ok.20:01
replaceafillchanging the message above the form...20:02
replaceafilli mean, styling20:02
th1aoh...20:04
replaceafillth1a refresh20:04
th1aI'd like it to look more like in the book.20:04
th1aDifferent background color, etc.20:04
replaceafillah ok20:05
replaceafillbackground icon?20:05
replaceafilllike in the book20:05
th1aI like having an icon.20:05
* replaceafill goes to see the LP sprite20:05
replaceafillth1a refresh20:23
replaceafilli don't like the icon though :(20:23
th1aWhat about a jquery icon?20:26
replaceafillhttp://jqueryui.com/themeroller/20:26
replaceafill.ui-icon-alert20:26
th1aYeah.20:28
th1aI think the jquery icons are more consistent with our overall look.20:28
aelknerreplaceafill, you have a minute?20:32
replaceafillyes aelkner?20:33
aelkneri'm trying to add butons to the person add page20:33
aelknerso i added just one method to the FlourishPersonAddView class20:33
aelkner    @button.buttonAndHandler(_('Submit'), name='submit')20:34
aelkner    def handleSubmit(self, action):20:34
aelkner        url = absoluteURL(self.context, self.request)20:34
aelkner        self.request.response.redirect(url)20:34
aelknerit just does what cancel does for now20:34
aelknerbut the weid thing is it breaks the add button for some reason20:34
aelkneri can't figure out why adding one button would break another20:34
aelknerhave you ever added button handlers on multiple class levels before?20:35
replaceafillyes20:35
replaceafillhave you pushed your code?20:35
aelkneror more specifically, was it you who reworked this view?20:35
aelkneri can push it20:36
replaceafilli worked on it, yes20:36
replaceafillto add the fieldset functionality20:36
aelknerand remove the flourish base class?20:36
aelknerreplaceafill?20:38
replaceafilli'm checking what i did20:38
replaceafillnah, the only change i made was:20:39
replaceafillpage_template = InheritTemplate(flourish.page.ExpandedPage.page_template)20:39
replaceafilli added fieldset behaviour to edit person20:39
replaceafillnot add20:39
aelknerah, ok, just asking because i thought you could explain it20:41
aelknerit's interesting that we don't need the flourish base class anymore ins't it?20:41
* th1a goes out for a bit.20:43
aelknerreplaceafill, can you reproduce the crash?20:44
replaceafillbranching20:44
aelknercreating an instance directly from my branch?20:45
replaceafillyes20:45
aelknercool20:45
aelknerreplaceafill, i found a way to fix it20:47
replaceafillah ok20:48
aelkneri copied the add and apply handlers from the base classes20:48
replaceafill:S20:48
aelknerbut it's stupid that i would have to do that20:48
aelknerwhat do you think?20:48
replaceafilltry adding form.extends(baseclass)20:48
aelkneroh20:48
replaceafillfinished branching :)20:49
replaceafillstarting to build20:49
replaceafillextends() works right?20:51
aelkneryes20:51
replaceafillthe thing is that when you define actions in your subclass, you get rid of the parent's20:51
aelknerwell that wasn't obvious20:51
aelknera bit of z3c magic hell20:52
aelknerglad you've been through it lately :)20:52
replaceafill:)20:52
aelkneri don't think i'll forget that next time20:52
replaceafillyou're ok if you dont add handlers and buttons20:53
replaceafillbut if you modify actions somehow you have to extend20:53
aelknergood, i'll keep that in mind20:54
aelkneri can override updateActions to get rid of the add button20:54
replaceafill:|20:54
aelkneras long as i call the base class i think20:54
replaceafilluh20:54
replaceafill?20:54
aelknerthere i'll need to remove the add button from self.actions20:54
aelkneri'm replacing it with Submit20:55
* replaceafill scratches his head...20:55
replaceafillwell, ok :)20:55
aelknerthe old skin will still have Add, thus the base class20:55
aelknerbut the new skin will have Submit instead20:55
aelkneryou'll see the diff20:56
replaceafillk20:56
replaceafillback to css...20:56
aelknerreplaceafill, thanks for the extends trick20:58
replaceafillnp20:58
*** menesis has joined #schooltool21:23
replaceafillth1a refresh21:27
replaceafillth1a and here's how simple notifications would look like: http://img15.imageshack.us/img15/1527/1309199684984.png21:36
replaceafill(dummy text btw)21:37
* th1a is back.21:43
aelknerth1a, a couple of things21:47
th1aThat looks pretty good, replaceafill.21:47
replaceafillth1a :)21:47
th1aI'm not going to go nuts about colors at this point.21:47
aelknerth1a, first, do you want the person add views to have the same buttons at the top as the bottom?21:48
aelkneryou may have answered, but i want to check before asking the second question21:48
th1aNo.21:48
th1aI mean, the buttons should be at the bottom where they always were.21:49
aelkneri asked because i remembered the discussions in Portugal21:49
aelknerand testing out my changes reminds me what a pain it is to use the forms21:50
aelknerif you jsut want ot cancel, you have to scroll21:50
aelknerand the critical guy said buttons should be easy to find21:50
aelkneri.e., at the top21:50
aelknerbut if ow is not the time for that, i'll move on21:51
th1aI don't think that applies for regular forms.21:51
aelknerok21:51
aelknerreplaceafill, in a couple of minutes i'll push my changes all the way to trunk so th1a can look21:52
replaceafillok...21:52
replaceafillone of us will have to wait, because i changed basicperson/browser/person.py too21:53
replaceafillso, conflicts ahead...21:53
replaceafilli'll wait21:53
aelkneroh21:53
aelknercan th1a use the instance you made with my branch?21:54
replaceafillnah, push to trunk, i'll solve the conflicts21:54
aelknerok21:54
aelknerreplaceafill, pushed to trunk21:57
replaceafillaelkner k, pulling21:57
replaceafillinstance updated22:00
replaceafillwith aelkner changes22:00
replaceafilland mine22:00
th1aWhat should I be looking at?22:01
aelknerperson add22:01
replaceafillhttp://69.164.203.135:6660/persons/add.html22:01
aelknerif you hit submit, it works as before, taking you to the newly added person22:01
aelknerif you hit submit and add, it returns a blank add form22:02
th1aaelkner, should cancel be first?22:02
aelknerso that's the other thing22:02
aelknerchanging button order is a reall pain22:02
replaceafilli'd suggest:22:03
th1aWell, it has to be done.22:03
aelknerreplaceafill, go on22:03
replaceafillcopy the cancel action, and remove updateActions22:03
replaceafillthat "del ..." statement scares me ;)22:03
aelknertried that, didn't work22:03
aelknerhow do i remove the add button otherwise?22:04
replaceafillset your own actions22:04
replaceafillremove form.extends22:04
aelkneri'll try that22:04
replaceafillif you only care about one action in the base class, it's better to duplicate22:04
replaceafillthan to erase... imho22:05
replaceafilland you have control over sorting that way too22:05
replaceafillaelkner hold on22:05
replaceafilllet me push to trunk22:05
replaceafillbefore you change22:05
replaceafillso no more conflicts22:05
replaceafillaelkner pushed22:06
*** alga has joined #schooltool22:07
aelknerreplaceafill, updateActions in base class crashes on self.actions['add'].addClass('button-ok')22:07
*** menesis has quit IRC22:08
aelknerthat's why i removed it22:08
replaceafillah, why dont you name your submit action 'add'22:09
replaceafillso you wont have that problem22:09
aelknerok, trying that22:09
replaceafill@button.buttonAndHandler(_('Submit'), name='add')22:10
aelknergot it, and it worked22:10
replaceafill:)22:10
aelknerone hack replacing another, don't you think22:10
replaceafillcome on, z3c.form is the best form library every :D22:10
replaceafillever22:11
aelkner:)22:11
replaceafillyeah right...22:11
aelknerbut your hack is definitely cleaner22:11
aelknerand now i know to definitely not rely on class inheritance with buttons22:12
aelknerreplaceafill, you see how i hacked the _finishedAdd attribute to get it to not redirect to nextURL?22:13
replaceafillwhat's the point of doing:22:14
replaceafill            self._finishedAdd = False22:14
replaceafillafter redirect?22:14
aelknerto avoid the z3c base class from redirecting later22:16
aelknerto prevent22:16
replaceafillbut you just set the redirect...22:16
replaceafillhow is going to redirect later?22:17
aelknerform.py(AddForm.render())22:17
aelknerin z3c.form lib22:17
aelknerself._finishedAdd is only true if all validation passes and the object has been added22:17
aelknerwe could change nextURL, but i think it is used in the base classes, so that would be dangerous22:18
replaceafillaelkner Form.__call__22:20
aelkneryes?22:21
aelkneroh, you're saying it wouldn't reach the other test22:22
aelknerlet me check22:22
* th1a suspected this button issue would take a while...22:23
aelkneryeah z3c form heaven22:24
replaceafillth1a i'll go back to cambodia now22:26
th1aHave a good trip.22:26
replaceafill:D22:26
replaceafilldid you see they changed to month-by-month gradebooks everywhere...22:27
replaceafilland i'll use the score adapters now that they're in trunk22:27
replaceafilli wish i could use flourish there ;)22:27
aelknerreplaceafill, pushed to trunk22:30
replaceafillserver updated22:31
th1aShould I be looking at something?22:31
replaceafillhttp://69.164.203.135:6660/persons/add.html22:32
replaceafillaelkner paste the urls for th1a to look at ;)22:32
* replaceafill goes to get lunch22:33
th1aThat'll do until we come up with something better than "Submit and add"22:36
th1aDo buttons have tooltips?22:36
th1areplaceafill, can you give the buttons a title?22:37
th1aI meant, aelkner, can you give the buttons a title?22:40
aelkneryou mean for the rollover, the title attribute, right?22:45
aelkneri'll check the z3c form source22:46
* replaceafill is back23:02
aelknerth1a, at first i got confused thinking we were talking about an <a> tag that has a title attribute for mouseover23:07
aelknerbut our form buttons are <input> tags23:07
aelknerthe mouseover property for those tags is tied to a script23:08
aelkneri don't think you were suggesting we write jx for button mouseover, were you?23:08
aelknerreplaceafill, have you done anything like that yet, like for cambodia or something?23:09
replaceafilluh?23:10
aelknersorry, i should have just answered th1a's question as 'no, no tooltips for buttons'23:10
th1athanks, aelkner.23:17
* th1a is cooking dinner.23:17
aelknerreplaceafill, can you explain this:23:29
aelkner$('form fieldset .row .error').prev().find('input').addClass('error');23:30
replaceafillhack to highlight errors on forms23:30
aelknerwow, you really are getting into selector tricks in form.css23:31
replaceafillchild selectors give you more control applying styles23:32
aelknerit looks like xpath syntax23:33
aelknerwell, except for the @23:33
aelknerand the //s23:33
aelknerbut it's pretty close23:33
aelknerwhy did you have to reverse the order of the base classes?23:34
replaceafillz3c.form declares the status message23:35
replaceafilland i wanted to apply it to just one class23:35
replaceafillwe have to move it out to a nicer class23:35
replaceafillwith all the logic for extra fields and fieldsets, etc23:36
aelknerit looks nice when you get errors now23:36
aelknerthat red outline helps the eye find the field23:37
replaceafilland you still can use self.status23:37
replaceafillfor example23:37
replaceafillin your Submit and add23:37
replaceafillyou could set the status to "Tom Hoffman was successfully added"23:37
replaceafilland it would look like: http://img15.imageshack.us/img15/1527/1309199684984.png23:38
replaceafillif there are errors, then you get the red message23:38
aelknerin the case of errors, there is no redirect23:38
aelknerin the case of submit and add, i redirect back to the same view23:38
replaceafilli know23:38
aelknerso wouldn't any setting of self.status be ignored?23:39
replaceafilli'm just saying, it's possible :)23:39
aelkneri was wondering how i could do it though, you know, have that message when the user hits submit and add23:39
replaceafilli liked the way the old add multiple persons form used to do it23:41
replaceafillwith a temporary list23:41
replaceafillbut we're not doing that now, so...23:42

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