*** aks has joined #schooltool | 06:12 | |
*** aks has joined #schooltool | 06:12 | |
*** menesis has joined #schooltool | 10:08 | |
aks | menesis, yvl: ping | 14:01 |
---|---|---|
yvl | hey aks | 14:01 |
aks | yvl, menesis: the second phase of schooltool training started today | 14:01 |
aks | yvl, menesis: the first session (focussed on administrative side) just completed | 14:02 |
aks | yvl, menesis: tomorrow's session would be targeted at gradebook, attendance, and calendar | 14:02 |
aks | yvl, menesis: we are running training for three of our schooltool pilot schools from among our OLPC deployments | 14:03 |
aks | yvl, menesis: just to share the information with you guys | 14:03 |
yvl | aks, great! | 14:04 |
yvl | will forward this to Tom Hoffman today | 14:05 |
yvl | how's the training going overall? | 14:05 |
*** menesis has quit IRC | 14:10 | |
aks | yvl: the training is going good, and we'll be closely monitoring the schools for support | 14:17 |
aks | yvl: 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 schools | 14:17 |
yvl | cool :) | 14:18 |
yvl | aks, can you please remind me, how many schools participate in pilot deployment? | 14:18 |
aks | yvl: 3 schools are in the SchoolTool pilot | 14:19 |
yvl | great, we'll wait for further news :) | 14:20 |
yvl | good luck! ;) | 14:20 |
aks | yvl: thanks | 14:20 |
aks | yvl: we have 34 schools in total | 14:21 |
aks | yvl: 34 schools as of now, we keep on adding though | 14:22 |
yvl | sure :) | 14:22 |
aks | yvl: see you next day | 14:23 |
yvl | well - if there are any show-stoppers, bugs, etc. - don't hesitate to put them in Launchpad | 14:23 |
yvl | see you soon! :) | 14:23 |
aks | yvl: sure | 14:24 |
*** aks has quit IRC | 14:24 | |
*** alga has joined #schooltool | 14:26 | |
*** menesis has joined #schooltool | 14:44 | |
*** menesis has quit IRC | 15:21 | |
*** menesis1 has joined #schooltool | 15:21 | |
*** menesis1 is now known as menesis | 15:21 | |
*** replaceafill has joined #schooltool | 16:14 | |
*** th1a has joined #schooltool | 16:19 | |
th1a | hi aelkner, replaceafill, yvl, menesis. | 16:31 |
replaceafill | good morning/afternoon | 16:31 |
aelkner | morning | 16:31 |
menesis | hi | 16:31 |
yvl | morning guys :) | 16:31 |
th1a | OK, getting back in the game after a long weekend... | 16:32 |
th1a | replaceafill and I made a lot of small changes in the person pages last Friday. | 16:32 |
th1a | So you should check those out. | 16:32 |
th1a | Filled out the contact pages. | 16:32 |
aelkner | already did | 16:32 |
* yvl too | 16:33 | |
aelkner | i noticed some jquery changes, too, what were they for? | 16:33 |
yvl | which ones? | 16:33 |
aelkner | there were changes to the jquery source | 16:33 |
aelkner | replaceafill? | 16:34 |
replaceafill | aelkner i changed the file resources we use | 16:34 |
replaceafill | image backgrounds, etc | 16:34 |
replaceafill | overlay | 16:34 |
aelkner | did you download those changes or make them yourself? | 16:34 |
replaceafill | created them using the jquery theme roller | 16:35 |
aelkner | oh, ok | 16:35 |
aelkner | didn't know you could do that | 16:35 |
replaceafill | http://jqueryui.com/themeroller/ | 16:36 |
th1a | It still isn't quite the right shade. | 16:36 |
th1a | But I don't want to work on it right now. | 16:36 |
aelkner | i thought that third party source was supposed to be downloaded and used as is, so i was confused | 16:36 |
aelkner | anyway, i also noticed you commented out the action buttons | 16:37 |
replaceafill | aelkner where? | 16:38 |
th1a | So basically the "actions" for an object should only be visible on that object's index page. | 16:38 |
aelkner | parge.pt and page_expanded.pt | 16:38 |
th1a | If you're on a specific form or sub-doo hickey, you should only see actions relevant to *that object or form*. | 16:38 |
aelkner | yvl, why is it called page_expanded.pt when it seems like page.pt with stuff taken out? | 16:38 |
th1a | e.g., when you're managing contacts, there is just an add new contact action. | 16:39 |
yvl | aelkner - it's larger | 16:39 |
yvl | content area is expanded and there are no left/right bards | 16:39 |
yvl | bars | 16:39 |
aelkner | larger space, thus the name, expanded, i see | 16:40 |
replaceafill | aelkner i didnt touch those templates | 16:40 |
aelkner | th1a, ok, so reports needs to do something to get the action buttons to come back | 16:40 |
th1a | Hm? | 16:40 |
th1a | Well, part II of this is not done: adding "Done" links. | 16:41 |
aelkner | replaceafill, did you pll core and gradebook trunk and restart the server? | 16:41 |
replaceafill | yes | 16:41 |
aelkner | if you goto a person's reports page, the links on the left are now gone | 16:41 |
th1a | That's the idea, aelkner. | 16:42 |
th1a | Although there shouldn't also be an empty box there. | 16:42 |
* th1a wonders if aelkner has blacklisted my nick. | 16:43 | |
aelkner | hm? | 16:43 |
th1a | I just explained why those links shouldn't be there. | 16:44 |
aelkner | i should ask you to explain why that is | 16:44 |
th1a | They're a distraction. | 16:44 |
aelkner | i mean, navigationally, the user is forced to use the breadcrums? | 16:44 |
th1a | I also explained above that there is supposed to be a "Done" button. | 16:45 |
aelkner | so the reports view needs a Done button | 16:45 |
th1a | replaceafill and I will deal with that. | 16:45 |
aelkner | what if the view is long enough that the Done button needs to be scrolled to? | 16:46 |
th1a | But also, a "preferences" link on the reports page suggests that it is report preferences. | 16:46 |
th1a | Then the user will have to scroll. | 16:46 |
th1a | The sidebar does not address that problem. | 16:46 |
aelkner | well, the view has 'John Doe' then 'Reports' as subtitle | 16:46 |
aelkner | i would thing that preferences would imply Jphn Doe preferences, but perhaps that's ust me | 16:47 |
yvl | Are 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 |
yvl | or make "$(PERSON)" title itself a link? | 16:47 |
th1a | Well, maybe. | 16:47 |
th1a | I have been thinking about making $(PERSON) a link. | 16:48 |
yvl | on one hand - it's quite common | 16:48 |
th1a | There is no reason not to. | 16:48 |
th1a | Unless yvl is thinking of one. | 16:48 |
yvl | on another - it may be a little bit less obvious than it could be | 16:48 |
th1a | It can't be the main route. | 16:48 |
th1a | But it can be a side route. | 16:48 |
* yvl thinks the main title could be the link | 16:48 | |
yvl | sorry - a link :) | 16:49 |
th1a | OK... | 16:49 |
th1a | The main point here is that the sidebar is not going to be automatically passed down to sub-objects. | 16:50 |
th1a | Understood? | 16:50 |
yvl | +1 | 16:50 |
yvl | parts of it can be passed explicitly where it makes sense, of course - if we end up with places were it makes sense | 16:51 |
th1a | Yes. | 16:52 |
th1a | Also, it make the modals and regular forms work more similarly (since there is no sidebar for modals). | 16:52 |
aelkner | perhaps instead of having html comments in page.pt and page_expanded.pt | 16:52 |
aelkner | we should get rid of those blocks? | 16:52 |
yvl | it might be time | 16:53 |
th1a | I don't think they will be permanent, aelkner. | 16:53 |
th1a | OK, moving on... | 16:54 |
th1a | yvl: What are you up to? | 16:54 |
yvl | did some groundwork for our "ST javascript API" | 16:55 |
yvl | finished the serialize: and json: tal expressions | 16:55 |
yvl | cleaned up flourish.js a bit | 16:55 |
yvl | added ModalFormLinkViewlet | 16:55 |
yvl | (a link that opens a modal form) | 16:56 |
yvl | remade person preferences to use that | 16:56 |
yvl | remade report link manager to use serialize: | 16:56 |
yvl | that's it | 16:57 |
yvl | plumbing :) | 16:57 |
th1a | Does that require further explanation for aelkner and replaceafill to use it? | 16:57 |
yvl | I guess so | 16:57 |
yvl | we can do that after the meeting | 16:57 |
replaceafill | "var title_hack" :D | 16:57 |
yvl | it's a nasty hack | 16:58 |
yvl | not mine :D | 16:58 |
replaceafill | ;) | 16:58 |
yvl | ah, right | 16:58 |
yvl | also spent some time looking at the jquery "bug" | 16:58 |
yvl | with modal dialog auto position | 16:58 |
yvl | seems like it's a known bug, nobody is going to fix that and everybody works around | 16:59 |
aelkner | did you see how i added the line to calculate the width first? | 16:59 |
yvl | yes | 16:59 |
yvl | bad! | 16:59 |
yvl | very bad | 16:59 |
yvl | at least if I got it right | 16:59 |
yvl | I think you pre-loaded the form | 16:59 |
yvl | we should not do this! | 16:59 |
aelkner | no | 17:00 |
aelkner | i don't prelead the form | 17:00 |
aelkner | i explained that last week | 17:00 |
aelkner | that is part of what i changed, to ot preload the form | 17:00 |
aelkner | not | 17:00 |
yvl | $(document).ready(function() { | 17:00 |
yvl | $(person_preferences_form_id).load( | 17:00 |
yvl | guess what this does | 17:00 |
aelkner | that's for preferences | 17:01 |
aelkner | i was talking about reports | 17:01 |
yvl | unless I forgot something again | 17:01 |
yvl | oh | 17:01 |
yvl | right, reports :) | 17:01 |
aelkner | preferences doesn't use my new flourish.js function call | 17:01 |
yvl | then I withdraw my comments | 17:01 |
aelkner | call_dialog | 17:01 |
aelkner | that's where i put the new line to calculcate the width | 17:01 |
aelkner | it doesn't work for some reason, except, and get this | 17:02 |
aelkner | if you put a breakpoint in firebug at the width calc | 17:02 |
yvl | right! | 17:02 |
aelkner | and then step over it | 17:02 |
yvl | guess what | 17:02 |
aelkner | then it works | 17:02 |
yvl | if you added setTimeout in a right place it would also work | 17:02 |
yvl | or, if you look at it second time | 17:03 |
aelkner | that's what i was going to ask | 17:03 |
yvl | f-ing jquery | 17:03 |
yvl | well, since we load after clikc | 17:03 |
aelkner | \jquery requires some kind of setTimeout hack? | 17:03 |
yvl | something like that | 17:03 |
aelkner | i had a feeling some call to jquery was necessary to make it wait or someting | 17:04 |
yvl | and they didnt fix that yet, at least in 1.8.3 of... jquery.dialog or whatever | 17:04 |
yvl | anyway, I did the set up of dialog after the form is loaded | 17:04 |
yvl | that's what people seem to usually | 17:04 |
yvl | do | 17:04 |
yvl | see flourish.js | 17:04 |
yvl | drawback - nothing happens until the form is loaded | 17:05 |
yvl | so you get a "what is happening" with no dialog until it's loaded | 17:05 |
yvl | that is ok, I think | 17:05 |
yvl | because this is a place where we should hook a spinner or something | 17:05 |
yvl | and handle errors | 17:05 |
yvl | so that's a big TODO | 17:06 |
th1a | Yes to spinner. | 17:06 |
yvl | that also includes some work so that "ajax" calls should not display log-in dialog, or render it correctly | 17:07 |
yvl | same for timeouts, exceptions and other stuff | 17:07 |
yvl | that's another TODO :) | 17:08 |
yvl | basically - if we do correct spinner and error handling, we don't need to deal with that jquery bug | 17:09 |
yvl | ok, let's move along, shall we? :) | 17:10 |
th1a | Yes. | 17:10 |
th1a | Sorry, distracted here. | 17:10 |
th1a | OK. | 17:10 |
th1a | menesis: We've been ignoring you. Any issues from your end? | 17:11 |
menesis | th1a: no issues | 17:11 |
yvl | [btw, aks from OLPC dropped by today (on IRC) - 3 school pilots are going fine, see today's IRC logs] | 17:11 |
menesis | sorry I did not join you in the flourish work | 17:11 |
th1a | Ah, thanks menesis! | 17:12 |
th1a | menesis: No problem. | 17:12 |
th1a | OK, aelkner, how's your queue look? | 17:12 |
aelkner | empty i think | 17:13 |
th1a | OK. | 17:13 |
th1a | One of the last person tasks is to make the "add another person" functionality part of all the add pages. | 17:13 |
th1a | So... | 17:14 |
replaceafill | and "Need empty message for accordions" | 17:14 |
th1a | Submit | Submit and add | Cancel | 17:14 |
th1a | Did you start the additional empty messages, aelkner? | 17:14 |
aelkner | don't understand | 17:15 |
th1a | Which? | 17:16 |
aelkner | so i guess i didn't | 17:16 |
th1a | OK. | 17:16 |
th1a | Do you understand the add another person issue? | 17:16 |
aelkner | no, i don't, | 17:17 |
aelkner | i must have lost track of the email about that | 17:17 |
th1a | Currently there is a separate form if you want to add multiple people. | 17:17 |
*** ignas has joined #schooltool | 17:17 | |
aelkner | how does the user call up that form? | 17:17 |
th1a | It should just be integrated into all the add person (student, etc) pages. | 17:17 |
th1a | It should just be a separate submit button on each form. | 17:18 |
th1a | Submit and add | 17:18 |
aelkner | so it's just a case where Submit and add does what Submit does | 17:19 |
aelkner | but does not redirect back to index.html view? | 17:19 |
aelkner | but instead to add view again? | 17:19 |
yvl | yes | 17:19 |
th1a | Yes. | 17:19 |
aelkner | ok, understood | 17:19 |
replaceafill | but it also shows the persons you just added | 17:20 |
replaceafill | are we keeping that? | 17:20 |
aelkner | how would it do that? | 17:20 |
th1a | Where does it show them? | 17:20 |
th1a | Should we use some jquery confirmation something? | 17:20 |
replaceafill | it doesnt anymore, it used to do it in the old UI? :) | 17:20 |
yvl | it used to show a list of persons you added in old UI | 17:21 |
yvl | it does not anymore | 17:21 |
replaceafill | ah | 17:21 |
replaceafill | ok then :) | 17:21 |
yvl | http://69.164.203.135:6660/persons/add_multiple.html still does that | 17:21 |
th1a | Oh, we do have a message space. | 17:22 |
th1a | also, replaceafill, we need to fix that "there were some errors" message! | 17:22 |
replaceafill | yes! | 17:22 |
replaceafill | and "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 |
aelkner | ah, the Added Persons fieldset | 17:23 |
yvl | right | 17:23 |
th1a | Should there just be a notification space there? | 17:24 |
yvl | by the way, are we meeting tomorrow? | 17:24 |
th1a | For errors or added persons? | 17:24 |
th1a | yvl: I'd like to keep doing this one more week. | 17:24 |
yvl | ok | 17:24 |
th1a | But if you can't make one or two, just let me know. | 17:24 |
yvl | sure | 17:24 |
th1a | menesis is probably not required. | 17:25 |
* yvl likes the increased communication | 17:25 | |
th1a | We should always do this, really... | 17:25 |
th1a | Can we make a quick decision about where these messages go? | 17:25 |
th1a | Is there already a space defined in the template? | 17:26 |
yvl | I don't think so... but I'm not sure | 17:26 |
yvl | well, there are "info" and "status" slots | 17:27 |
th1a | replaceafill: Can we look at that first today? | 17:27 |
replaceafill | sure | 17:27 |
yvl | but it is more of a styling issue | 17:27 |
th1a | OK, we'll let aelkner know where to put his messages. | 17:27 |
th1a | aelkner, you have enough to get started? | 17:27 |
replaceafill | th1a also, Chandara replied | 17:28 |
replaceafill | i need to work on that too | 17:29 |
th1a | Yes, how about if we work for a bit and then you work on Cambodia later in the day? | 17:29 |
replaceafill | maybe tomorrow | 17:29 |
replaceafill | cool | 17:29 |
aelkner | th1a, i wouldn't know what to do next at this point | 17:29 |
aelkner | except the Submit and add thing | 17:29 |
aelkner | but that's not a day's worth of work | 17:30 |
th1a | OK, I'll get back to you. | 17:30 |
yvl | it depends :) | 17:30 |
yvl | if you want to just implement "add and add more" button | 17:30 |
yvl | it's not a days work | 17:30 |
yvl | if you want to add a list of recently added persons | 17:30 |
yvl | that's more work | 17:31 |
th1a | We don't need a list. | 17:31 |
aelkner | by the way, Add and Add More seems clearer than Submit and Submit and Add | 17:31 |
aelkner | but that's just me perhaps | 17:31 |
th1a | Just a "You just added this person." | 17:31 |
yvl | sounds good | 17:31 |
th1a | Well, I'm leaning away from different labels for every submit button. | 17:31 |
th1a | I think consistency on the whole is better. | 17:31 |
aelkner | +1 | 17:32 |
th1a | So without a good reason use "Submit" | 17:32 |
yvl | well | 17:32 |
yvl | I wouldn't like a lot of seeing "submit"s everywhere | 17:32 |
yvl | it's bad style, if you ask me | 17:32 |
yvl | a lot of UI people mocked that approach | 17:32 |
aelkner | How about Add | Add and Done | Cancel | 17:33 |
th1a | Lets say "Submit" for now. | 17:33 |
th1a | If yvl would like to submit the mocking to me, I'll consider it. | 17:34 |
* yvl does not remember in which books he read that | 17:35 | |
th1a | I will consult mine. | 17:35 |
th1a | OK, lets wrap this up. | 17:35 |
yvl | sure | 17:35 |
* th1a drops the bag of gravel. | 17:35 | |
*** alga has quit IRC | 17:35 | |
* th1a goes to grab a quick bite. | 17:36 | |
yvl | right | 17:36 |
* replaceafill too | 17:36 | |
aelkner | yvl, you were going to explain stuff | 17:36 |
yvl | wait, replaceafill! :) | 17:36 |
replaceafill | oh sure | 17:36 |
replaceafill | sorry | 17:36 |
yvl | let's just take a quick look at what's there | 17:36 |
yvl | and see if there are questions | 17:36 |
aelkner | shoot | 17:36 |
yvl | first, skin/flrourish/templates/modal_form_link.pt | 17:37 |
yvl | it's a link that opens a modal form - used for preferences at the moment | 17:37 |
yvl | notice the "push" and "pop" wrappers at the beginning/end of the template | 17:38 |
yvl | this is exposed wiring at the moment | 17:38 |
yvl | and is mandatory for all templates that use "scriptlocal" directive | 17:38 |
yvl | then there's <tal:script replace="sctucture scriptlocal: ... | 17:39 |
yvl | it simply uses JSON to put some tal variables to javascript local variables | 17:39 |
yvl | syntax is similar to that of tal:attributes | 17:39 |
yvl | if you looked at http://69.164.203.135:6660/persons/manager | 17:40 |
yvl | rendered page source | 17:40 |
yvl | at the preferences link source | 17:40 |
yvl | you 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 |
yvl | this is the result of "scriptlocal:" | 17:41 |
yvl | it allows to access those variables as | 17:41 |
yvl | ST.local.url | 17:41 |
yvl | ST.local.form_id and so on | 17:41 |
yvl | next, there's the actual dialog binding | 17:42 |
yvl | ST.dialogs.modal_form | 17:42 |
yvl | I think that part is self-explanatory | 17:42 |
replaceafill | is the escaping automatically done? | 17:43 |
yvl | yes | 17:43 |
yvl | you can look at | 17:43 |
replaceafill | do we have to escape "/"? | 17:43 |
yvl | </script> | 17:43 |
replaceafill | ah | 17:43 |
replaceafill | :D | 17:43 |
yvl | probably should limit to that, but... :) | 17:43 |
replaceafill | always miss that one :D | 17:43 |
replaceafill | sorry yvl go on | 17:44 |
yvl | if you're interested, you can look at flourish/tests/test_tal.py at some point | 17:44 |
yvl | these are doctests | 17:44 |
yvl | but they kind of show off the syntax of scriptlocal: | 17:44 |
replaceafill | hey! we can get rid of the title_hack with this, right? | 17:44 |
replaceafill | passing the title from the view to js | 17:44 |
replaceafill | before building the dialog | 17:45 |
yvl | well, do you mean - the link viewlet title? :) | 17:45 |
yvl | but yes, we can | 17:45 |
yvl | ok, now comes the fun stuff :) | 17:45 |
yvl | please look at schooltool/report/templates/f_report_link_manager.pt | 17:46 |
yvl | (the class that renders is report/report.py FlourishReportLinkViewletManager) | 17:46 |
yvl | I overdid it a bit there | 17:47 |
yvl | serializing too much info | 17:47 |
yvl | but it shows how we can use that functionality | 17:47 |
yvl | replace="structure scriptlocal: groups view/table" | 17:47 |
yvl | view/table is a big dict of all reports, links, url | 17:48 |
replaceafill | we should only serialize basic types, correct? | 17:48 |
yvl | yes! | 17:48 |
yvl | you'll get errors if you serialize objects | 17:48 |
yvl | so there, view/table is re-used | 17:49 |
yvl | it's used for html | 17:49 |
yvl | and then the data is serialized for use in javascript | 17:49 |
aelkner | why do we need to do this? | 17:49 |
aelkner | oh, wait | 17:50 |
aelkner | so the modal forms are rendered for each report link? | 17:50 |
yvl | yes | 17:51 |
yvl | you are right, that could actually be improved :) | 17:51 |
yvl | we could use only one "container" div for all the modal forms | 17:52 |
yvl | since they are modal dialogs, and only one will be displayed at a time | 17:52 |
aelkner | a question: | 17:52 |
aelkner | why have we had this in the past? | 17:52 |
aelkner | <metal:block tal:replace='structure string:<script type="text/javascript">' /> | 17:52 |
yvl | ok | 17:53 |
yvl | tal does not interpret inside <script> tag | 17:53 |
yvl | it explicitly ignores the contents | 17:53 |
yvl | so replaceafill put metal block, that renders "<script>" string | 17:53 |
aelkner | well, that was done in the gradebook years ago, but... | 17:54 |
yvl | oh, ok | 17:54 |
yvl | sorry, didn't remember that :) | 17:54 |
aelkner | so the reason is that <metal:block> would not owkr inside <script> | 17:54 |
aelkner | work | 17:54 |
aelkner | is that it? | 17:54 |
yvl | tal:block would not work inside <script> | 17:54 |
aelkner | ok, got it | 17:55 |
yvl | also, putting <tal:block> directly to javascript variables can easily break them | 17:55 |
yvl | unsafe symbols, and so on | 17:55 |
yvl | current mechanism uses JSON, which sorts that stuff our | 17:56 |
yvl | out | 17:56 |
yvl | there is one very nasty catch you should remember while using ST.local | 17:56 |
aelkner | where's the JSON, what line of code? | 17:57 |
yvl | oh, ok | 17:57 |
yvl | one moment | 17:57 |
yvl | skin/flourish/tal.py | 17:57 |
yvl | JSONEncoder is the one we use | 17:57 |
yvl | ScriptLocalExpression.__call__ does the encoding | 17:58 |
yvl | self.encoder.encode(vars) | 17:58 |
yvl | so, the nasty catch to remember: | 17:59 |
yvl | Javascript is a language of closures | 17:59 |
yvl | meaning you have to make it make a copy of your "global" variables here | 18:00 |
yvl | if you put something like ST.local.groups | 18:00 |
yvl | directly in a function in the script | 18:00 |
yvl | in the template | 18:00 |
yvl | it will look up ST.local.groups only after the page is loaded | 18:00 |
yvl | we have to make wrappers for such cases | 18:01 |
yvl | ST.dialogs.modal_form is such a wrapper: | 18:01 |
yvl | since you pass arguments to it, | 18:01 |
yvl | ST.dialogs.modal_form(ST.local.form_id, ...) | 18:01 |
yvl | the function makes a copy of them | 18:01 |
yvl | I'm just saying this because I didn't get used to this style of coding yet | 18:02 |
yvl | aelkner, 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 |
yvl | well, actually that's all I wanted to say today | 18:03 |
aelkner | +1 on not being used to this style of coding :) | 18:04 |
yvl | :) | 18:04 |
yvl | just wanted to point at the places that might be interesting | 18:04 |
aelkner | there's a lot to digest here before i can even ask a meaningful question | 18:04 |
aelkner | also, at some point we need to nail down a pattern that we can all follow | 18:04 |
aelkner | and come to the end of 'an that part will change, etc.' | 18:05 |
yvl | I think we're getting closer to that point | 18:05 |
yvl | UI remake is a serious matter! ;) | 18:06 |
aelkner | question: did you create the scriptlocal directive? | 18:06 |
yvl | replaceafill, sorry I kept you from your breakfast(?) | 18:06 |
yvl | aelkner - yes | 18:06 |
replaceafill | yvl np | 18:06 |
aelkner | so tales:expressiontype is all you need to do that? | 18:07 |
yvl | yes :) | 18:07 |
aelkner | replaceafill, yvl, a quick nitpik | 18:07 |
yvl | sure | 18:07 |
aelkner | i remember ignas nailing into my head that files must end with newlines | 18:07 |
aelkner | we seem to have stayed from that rule | 18:08 |
yvl | right, I've noticed some commits without new lines! | 18:08 |
yvl | bad replaceafill! :) | 18:08 |
aelkner | bad yvl :) | 18:08 |
replaceafill | sorry :( | 18:08 |
aelkner | see tal.py | 18:08 |
replaceafill | i didnt care too much :P | 18:08 |
aelkner | tal.zcml | 18:09 |
yvl | wait | 18:09 |
aelkner | jjust about every file it seems | 18:09 |
replaceafill | i see new lines there | 18:09 |
yvl | they end with newline | 18:09 |
aelkner | nope | 18:09 |
yvl | but they do | 18:09 |
replaceafill | and where did i miss newlines? | 18:09 |
*** ignas has quit IRC | 18:09 | |
aelkner | go to the end of any one of those files | 18:09 |
aelkner | the cursor should be on a blank line at the end of the file | 18:09 |
yvl | aelkner, there are newlines at the end of the last string | 18:10 |
aelkner | instead, 'it's on the last line | 18:10 |
* yvl is quite sure | 18:10 | |
aelkner | just go to any one of the files and go to the end | 18:10 |
aelkner | where is the cursor | 18:10 |
replaceafill | aelkner they *have* newlines | 18:10 |
aelkner | at the end of the line | 18:10 |
yvl | print open('tal.py').readlines()[-1] | 18:10 |
aelkner | there should be a blank line with newline then | 18:10 |
replaceafill | cat tal.py | 18:10 |
replaceafill | the prompt is in a new line | 18:11 |
aelkner | i misstated the rule then | 18:11 |
aelkner | the rule is: all files end with a blank line wth newline | 18:12 |
aelkner | this allows the next person to start editing | 18:12 |
replaceafill | ¬¬ | 18:12 |
yvl | well, actually this is not according to pep-8 | 18:12 |
yvl | run "pep8 src/schooltool/skin/flourish.py" | 18:12 |
yvl | sorry "pep8 src/schooltool/skin/flourish" | 18:12 |
yvl | it passes, apart for some other quirks | 18:12 |
aelkner | well, ignas is not here anymore, so i'll get used to the new rule | 18:12 |
yvl | pep-8 states that there should be a newline symbol at the end of the last line in a file | 18:13 |
yvl | but only one | 18:13 |
yvl | or else you get: W391 blank line at end of file | 18:13 |
aelkner | i'm confused though | 18:13 |
yvl | what editor are you using, aelkner? | 18:14 |
yvl | just curious | 18:14 |
aelkner | i use gedit because emacs is horrible | 18:14 |
* yvl is forgetful | 18:14 | |
replaceafill | i use notepad.exe | 18:14 |
aelkner | so in emacs, when you go to the end of the file, where is the cursor? | 18:14 |
aelkner | at the end of the last line? | 18:14 |
aelkner | replaceafill, i thought you used emacs | 18:15 |
yvl | aelkner, gedit eats up that end-of-line for some reason | 18:15 |
aelkner | ah, weird | 18:16 |
aelkner | anyway, i'll get used to the change, np | 18:16 |
replaceafill | we should have a Makefile rule for pep-8 checking :) | 18:16 |
aelkner | only thing is, most of the existing code is different than the new code you have been adding | 18:17 |
aelkner | but whatever | 18:17 |
yvl | aelkner, that happened when we started using "pep8" tool | 18:17 |
yvl | to check if the code is according to pep-8 | 18:17 |
aelkner | replaceafill, +1 on makefile applying rule | 18:18 |
yvl | aelkner, we need to get you a decent IDE that is not emacs ;) | 18:20 |
yvl | preferably something simple-but-working, like PyCharm | 18:20 |
yvl | or IDLE | 18:20 |
aelkner | i love gedit, it's easy to use and has the horizontal line for column 80p | 18:20 |
aelkner | and IDEs have issues with zope anyway | 18:20 |
yvl | yep | 18:21 |
aelkner | i don't need to change the editor, just get used to you guys not adding blank lines at end of files | 18:21 |
aelkner | like we did in the past with ignas | 18:22 |
yvl | well the thing is that we do add newlines | 18:22 |
yvl | and I don't know if gedit does that | 18:22 |
aelkner | not after blank lines | 18:22 |
aelkner | basically two newlines was the convention | 18:22 |
aelkner | now you changed it, i accept it, i'll get used to it | 18:23 |
yvl | ah, ok | 18:23 |
yvl | sorry, I didn't knew that | 18:23 |
yvl | or maybe forgott | 18:23 |
aelkner | yeah, well, you came to the project after ignas, and he didn't pass along that to you | 18:23 |
yvl | happens... | 18:24 |
yvl | probably my choice is to go with pep8 | 18:24 |
yvl | because it kind of solves a lot of coding style discussions | 18:24 |
yvl | "do like the python world does" | 18:24 |
aelkner | so when you go to the end of the file, where is the cursor? | 18:24 |
aelkner | is it at the end of the last line? | 18:24 |
yvl | no, it's in the next line | 18:25 |
aelkner | ah | 18:25 |
yvl | emacs follow file quite literally | 18:25 |
yvl | there is \n at the end of the line | 18:25 |
yvl | and emacs display the cursor after the last symbol | 18:25 |
yvl | hence - in a new line | 18:25 |
aelkner | i see, and gedit doesn't want to work that way | 18:26 |
aelkner | let's move on, i'll deal with it | 18:26 |
yvl | thanks, aelkner | 18:26 |
yvl | sorry for the trouble | 18:26 |
aelkner | np | 18:26 |
yvl | as far as the scriptlocal goes - I think I'll leave the topic open at this point | 18:27 |
yvl | oh, and flourish.js currently has a style I plan on using further on | 18:27 |
yvl | for "API" part of our javascript | 18:28 |
yvl | "public" and "private" functions | 18:28 |
yvl | might be interesting to look at, but not very important now | 18:28 |
aelkner | could you explain? | 18:29 |
yvl | in flourish.js | 18:29 |
yvl | modal_form function is "visible from outside" | 18:30 |
*** ignas has joined #schooltool | 18:30 | |
yvl | you can do ST.dialogs.modal_form(...) | 18:30 |
* th1a goes to take a shower. | 18:30 | |
yvl | but call_modal_form is not visible | 18:30 |
yvl | only functions inside ST.dialogs can use it | 18:30 |
yvl | this way we avoid duplicate names in the global namespace | 18:31 |
yvl | and have at least some consistency | 18:31 |
yvl | also - it is visible in debugger like firebug | 18:31 |
yvl | you should see modal_dialog in ST.dialogs expression | 18:31 |
yvl | but not the call_modal_form, which is really a helper | 18:31 |
yvl | that should make the work easier in the long run | 18:32 |
yvl | well, it's time for me to go | 18:33 |
yvl | I'll be here tomorrow as usual | 18:33 |
yvl | good luck guys, and happy coding! ;) | 18:33 |
aelkner | thanks | 18:33 |
aelkner | cya | 18:33 |
th1a | hi replaceafill. | 18:47 |
replaceafill | hey th1a | 18:47 |
th1a | One 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 |
th1a | Or maybe it needs breadcrumbs. | 18:48 |
th1a | Well, it does need breadcrumbs. | 18:49 |
th1a | But the breadcrumbs won't help you get back in that case. | 18:49 |
th1a | And the "Back" button might be tricky. | 18:49 |
th1a | I guess the "Submit" button on edit knows where to put you. | 18:50 |
th1a | So "Back" might be easy too. | 18:50 |
th1a | I guess we need breadcrumbs for all the contact views. | 18:50 |
replaceafill | yes, edit uses the request to know how to redirect | 18:51 |
aelkner | we certainly don't want the user to have to use the back button | 18:52 |
th1a | Of course not. | 18:53 |
th1a | Maybe I should just give aelkner the task of adding "Done" buttons. | 18:54 |
th1a | OK, how about this: | 18:54 |
th1a | (for aelkner today) | 18:54 |
th1a | 1) the multiple person add buttons; | 18:55 |
aelkner | what was our final agreement on the buttons? | 18:55 |
th1a | 2) the "This person has no..." text in all the accordions as needed (like contacts). | 18:55 |
aelkner | Submit | Submit and add | Cancel? | 18:56 |
th1a | Yes. | 18:56 |
aelkner | ok | 18:56 |
aelkner | i'll need a 3) | 18:56 |
th1a | 3) "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 |
th1a | To take you back to the person view. | 18:57 |
aelkner | ok | 18:57 |
th1a | e.g. http://69.164.203.135:6660/persons/ad/@@advisors.html | 18:58 |
th1a | Actually, maybe that does need to be at the top. | 18:58 |
th1a | Try both. | 18:58 |
th1a | Align left, top and bottom. | 18:58 |
aelkner | Done at both top and bottom? | 18:58 |
th1a | We'll see how it looks. | 18:58 |
th1a | Sure. | 18:58 |
aelkner | ok | 18:58 |
aelkner | always, or in special cases? | 18:58 |
th1a | Top and bottom always? | 18:59 |
aelkner | yes | 18:59 |
th1a | aelkner, this is just a draft. | 18:59 |
aelkner | ok, case by case | 18:59 |
th1a | No... we'll do it the same, just probably the final version will be different. | 18:59 |
th1a | So yes "always." | 18:59 |
aelkner | usually, if the view is allowed to grow too big, then buttons at the top are important | 19:00 |
th1a | We just need to take a look at it. | 19:00 |
th1a | The final version will be different. | 19:00 |
aelkner | ok | 19:00 |
th1a | Actually, put the top one under current advisors. | 19:01 |
th1a | Well, put it all three places and we'll decide which to get rid of. | 19:01 |
th1a | Just do one now and we'll decide, how about that? | 19:02 |
aelkner | yes | 19:02 |
th1a | I need to get you working replaceafill-style. | 19:02 |
th1a | Speaking of which... | 19:02 |
th1a | OK, replaceafill error messages. | 19:02 |
replaceafill | just a comment on mine | 19:02 |
* th1a gets his form book. | 19:03 | |
replaceafill | -1 on Done links, +1 on making the person title "the" link | 19:03 |
replaceafill | ok th1a error messages | 19:03 |
th1a | No... there has to be some "right" way to leave the page. | 19:03 |
replaceafill | ok | 19:04 |
replaceafill | th1a by book you mean "Web Form Design" correct? | 19:04 |
th1a | Yes. | 19:05 |
replaceafill | p187? | 19:05 |
th1a | Do you have it? | 19:05 |
replaceafill | yep, the pdf | 19:05 |
th1a | "Please correct the marked fields below." | 19:05 |
th1a | I like that one. | 19:06 |
replaceafill | are we going to use the "status" space of forms for error and success messages? | 19:06 |
th1a | We just need to pick one. | 19:06 |
aelkner | Web Form Design: Filling in the Blanks? | 19:06 |
th1a | Yes. | 19:06 |
aelkner | ordering on amazon... | 19:06 |
th1a | And we do need a positive and negative style. | 19:07 |
th1a | Ohh... | 19:07 |
th1a | No.... | 19:07 |
th1a | oh, yes. | 19:07 |
th1a | OK, that is the subtitle. | 19:07 |
replaceafill | th1a that's why i was asking | 19:07 |
th1a | Yes. | 19:07 |
replaceafill | forms only have a "status" div | 19:07 |
replaceafill | and the class a "status" property | 19:07 |
th1a | Great minds think alike... | 19:07 |
th1a | especially when they're reading the same book! | 19:07 |
replaceafill | :D | 19:08 |
th1a | We'll need a little more mojo then. | 19:08 |
replaceafill | let me do a little change in the css | 19:09 |
* replaceafill has been hiding stuff again... | 19:09 | |
replaceafill | ok, http://69.164.203.135:6660/persons/add.html | 19:10 |
replaceafill | get any error | 19:10 |
replaceafill | like submitting without data | 19:10 |
th1a | Yes? | 19:11 |
replaceafill | the template puts some of the errors at that space | 19:11 |
th1a | We don't need an exclamation point in "This username is already in use!" | 19:11 |
replaceafill | :D | 19:11 |
th1a | Anyhow... | 19:11 |
replaceafill | fixed | 19:13 |
replaceafill | (removed the "!") | 19:13 |
replaceafill | so, i was saying | 19:13 |
replaceafill | the template puts some of the errors above | 19:13 |
replaceafill | and sometimes doesnt use the fields for that | 19:14 |
replaceafill | for example... | 19:14 |
replaceafill | try to add a person, but enter different passwords | 19:14 |
replaceafill | (and confirmation) | 19:14 |
th1a | Well, that's a bug, right? | 19:16 |
replaceafill | it's because the interface uses an invariant | 19:16 |
replaceafill | to check that | 19:16 |
th1a | So... | 19:17 |
replaceafill | more z3c.form hacking :) | 19:17 |
th1a | If it has to be done it has to be done. | 19:18 |
replaceafill | k | 19:19 |
aelkner | well, yes, always the hack | 19:19 |
replaceafill | th1a i'll start changing the error message to: "Please correct the marked fields below. | 19:20 |
th1a | kk | 19:20 |
replaceafill | i'd like to use jquery to mark the fields too, like in the guidelines | 19:21 |
replaceafill | (with red borders) | 19:21 |
replaceafill | too much? | 19:21 |
th1a | We might need more shades, but red for now is ok. | 19:21 |
replaceafill | message changed for person forms | 19:30 |
replaceafill | we probably need a base class for all our forms... | 19:30 |
aelkner | of course we do | 19:32 |
aelkner | but only if our discussion thread is geared to plumbing | 19:36 |
aelkner | replaceafill, also, when you say you did something, i'm not sure what that implies | 19:37 |
aelkner | change to trunk? | 19:37 |
replaceafill | no, i'm working on the test server | 19:38 |
aelkner | or are you just changing your own branch and restarting your server | 19:38 |
replaceafill | i say when i do something so th1a can check | 19:38 |
aelkner | ok, i'll steer clear then | 19:39 |
aelkner | if you want to talk plumbing, i'm all ears though | 19:39 |
aelkner | but i'll need the latest code to do that | 19:39 |
aelkner | replaceafill, a quick question: | 19:44 |
aelkner | how does FlourishPersonAddView add view work even though it has no flourish base class? | 19:45 |
aelkner | template = InheritTemplate()? | 19:45 |
aelkner | oh, maybe yvl made that change | 19:46 |
aelkner | i think i like that | 19:46 |
aelkner | less confusion with the base classes that way | 19:46 |
th1a | We can discuss form base classes tomorrow. | 19:50 |
replaceafill | th1a http://69.164.203.135:6660/persons/alvaro/@@edit.html | 19:51 |
replaceafill | remove first name and last name | 19:51 |
replaceafill | and hit apply | 19:51 |
th1a | Yes? | 19:52 |
replaceafill | see the style of inputs with errors? | 19:52 |
th1a | Oh. I had to reload to get the style. | 19:52 |
*** ignas has quit IRC | 19:53 | |
replaceafill | :) | 19:53 |
th1a | What shade of red is that? | 19:53 |
th1a | Brighter? | 19:53 |
replaceafill | it's a border | 19:53 |
th1a | Same shade as the text? | 19:53 |
replaceafill | it's the same style we use for ":focus" | 19:53 |
replaceafill | it's orange!!! 2px solid #DD4814 | 19:53 |
replaceafill | :) | 19:53 |
replaceafill | from the guidelines | 19:53 |
replaceafill | change it to "dark red" or to "light red" | 19:54 |
th1a | Well, light red for now. | 19:54 |
th1a | #DD4814 = light red. | 19:55 |
replaceafill | hhmm i thought that was orange | 19:56 |
replaceafill | and light red: #aa0000; | 19:56 |
th1a | I don't mean that literally. ;-) | 19:56 |
th1a | When you read #DD4814 in the spec, think light red. | 19:56 |
replaceafill | ah! | 19:56 |
replaceafill | got it :) | 19:56 |
replaceafill | changed http://69.164.203.135:6660/persons/alvaro/@@edit.html | 19:57 |
*** menesis has quit IRC | 20:00 | |
th1a | That's ok. | 20:01 |
replaceafill | changing the message above the form... | 20:02 |
replaceafill | i mean, styling | 20:02 |
th1a | oh... | 20:04 |
replaceafill | th1a refresh | 20:04 |
th1a | I'd like it to look more like in the book. | 20:04 |
th1a | Different background color, etc. | 20:04 |
replaceafill | ah ok | 20:05 |
replaceafill | background icon? | 20:05 |
replaceafill | like in the book | 20:05 |
th1a | I like having an icon. | 20:05 |
* replaceafill goes to see the LP sprite | 20:05 | |
replaceafill | th1a refresh | 20:23 |
replaceafill | i don't like the icon though :( | 20:23 |
th1a | What about a jquery icon? | 20:26 |
replaceafill | http://jqueryui.com/themeroller/ | 20:26 |
replaceafill | .ui-icon-alert | 20:26 |
th1a | Yeah. | 20:28 |
th1a | I think the jquery icons are more consistent with our overall look. | 20:28 |
aelkner | replaceafill, you have a minute? | 20:32 |
replaceafill | yes aelkner? | 20:33 |
aelkner | i'm trying to add butons to the person add page | 20:33 |
aelkner | so i added just one method to the FlourishPersonAddView class | 20: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 |
aelkner | it just does what cancel does for now | 20:34 |
aelkner | but the weid thing is it breaks the add button for some reason | 20:34 |
aelkner | i can't figure out why adding one button would break another | 20:34 |
aelkner | have you ever added button handlers on multiple class levels before? | 20:35 |
replaceafill | yes | 20:35 |
replaceafill | have you pushed your code? | 20:35 |
aelkner | or more specifically, was it you who reworked this view? | 20:35 |
aelkner | i can push it | 20:36 |
replaceafill | i worked on it, yes | 20:36 |
replaceafill | to add the fieldset functionality | 20:36 |
aelkner | and remove the flourish base class? | 20:36 |
aelkner | replaceafill? | 20:38 |
replaceafill | i'm checking what i did | 20:38 |
replaceafill | nah, the only change i made was: | 20:39 |
replaceafill | page_template = InheritTemplate(flourish.page.ExpandedPage.page_template) | 20:39 |
replaceafill | i added fieldset behaviour to edit person | 20:39 |
replaceafill | not add | 20:39 |
aelkner | ah, ok, just asking because i thought you could explain it | 20:41 |
aelkner | it'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 | |
aelkner | replaceafill, can you reproduce the crash? | 20:44 |
replaceafill | branching | 20:44 |
aelkner | creating an instance directly from my branch? | 20:45 |
replaceafill | yes | 20:45 |
aelkner | cool | 20:45 |
aelkner | replaceafill, i found a way to fix it | 20:47 |
replaceafill | ah ok | 20:48 |
aelkner | i copied the add and apply handlers from the base classes | 20:48 |
replaceafill | :S | 20:48 |
aelkner | but it's stupid that i would have to do that | 20:48 |
aelkner | what do you think? | 20:48 |
replaceafill | try adding form.extends(baseclass) | 20:48 |
aelkner | oh | 20:48 |
replaceafill | finished branching :) | 20:49 |
replaceafill | starting to build | 20:49 |
replaceafill | extends() works right? | 20:51 |
aelkner | yes | 20:51 |
replaceafill | the thing is that when you define actions in your subclass, you get rid of the parent's | 20:51 |
aelkner | well that wasn't obvious | 20:51 |
aelkner | a bit of z3c magic hell | 20:52 |
aelkner | glad you've been through it lately :) | 20:52 |
replaceafill | :) | 20:52 |
aelkner | i don't think i'll forget that next time | 20:52 |
replaceafill | you're ok if you dont add handlers and buttons | 20:53 |
replaceafill | but if you modify actions somehow you have to extend | 20:53 |
aelkner | good, i'll keep that in mind | 20:54 |
aelkner | i can override updateActions to get rid of the add button | 20:54 |
replaceafill | :| | 20:54 |
aelkner | as long as i call the base class i think | 20:54 |
replaceafill | uh | 20:54 |
replaceafill | ? | 20:54 |
aelkner | there i'll need to remove the add button from self.actions | 20:54 |
aelkner | i'm replacing it with Submit | 20:55 |
* replaceafill scratches his head... | 20:55 | |
replaceafill | well, ok :) | 20:55 |
aelkner | the old skin will still have Add, thus the base class | 20:55 |
aelkner | but the new skin will have Submit instead | 20:55 |
aelkner | you'll see the diff | 20:56 |
replaceafill | k | 20:56 |
replaceafill | back to css... | 20:56 |
aelkner | replaceafill, thanks for the extends trick | 20:58 |
replaceafill | np | 20:58 |
*** menesis has joined #schooltool | 21:23 | |
replaceafill | th1a refresh | 21:27 |
replaceafill | th1a and here's how simple notifications would look like: http://img15.imageshack.us/img15/1527/1309199684984.png | 21:36 |
replaceafill | (dummy text btw) | 21:37 |
* th1a is back. | 21:43 | |
aelkner | th1a, a couple of things | 21:47 |
th1a | That looks pretty good, replaceafill. | 21:47 |
replaceafill | th1a :) | 21:47 |
th1a | I'm not going to go nuts about colors at this point. | 21:47 |
aelkner | th1a, first, do you want the person add views to have the same buttons at the top as the bottom? | 21:48 |
aelkner | you may have answered, but i want to check before asking the second question | 21:48 |
th1a | No. | 21:48 |
th1a | I mean, the buttons should be at the bottom where they always were. | 21:49 |
aelkner | i asked because i remembered the discussions in Portugal | 21:49 |
aelkner | and testing out my changes reminds me what a pain it is to use the forms | 21:50 |
aelkner | if you jsut want ot cancel, you have to scroll | 21:50 |
aelkner | and the critical guy said buttons should be easy to find | 21:50 |
aelkner | i.e., at the top | 21:50 |
aelkner | but if ow is not the time for that, i'll move on | 21:51 |
th1a | I don't think that applies for regular forms. | 21:51 |
aelkner | ok | 21:51 |
aelkner | replaceafill, in a couple of minutes i'll push my changes all the way to trunk so th1a can look | 21:52 |
replaceafill | ok... | 21:52 |
replaceafill | one of us will have to wait, because i changed basicperson/browser/person.py too | 21:53 |
replaceafill | so, conflicts ahead... | 21:53 |
replaceafill | i'll wait | 21:53 |
aelkner | oh | 21:53 |
aelkner | can th1a use the instance you made with my branch? | 21:54 |
replaceafill | nah, push to trunk, i'll solve the conflicts | 21:54 |
aelkner | ok | 21:54 |
aelkner | replaceafill, pushed to trunk | 21:57 |
replaceafill | aelkner k, pulling | 21:57 |
replaceafill | instance updated | 22:00 |
replaceafill | with aelkner changes | 22:00 |
replaceafill | and mine | 22:00 |
th1a | What should I be looking at? | 22:01 |
aelkner | person add | 22:01 |
replaceafill | http://69.164.203.135:6660/persons/add.html | 22:01 |
aelkner | if you hit submit, it works as before, taking you to the newly added person | 22:01 |
aelkner | if you hit submit and add, it returns a blank add form | 22:02 |
th1a | aelkner, should cancel be first? | 22:02 |
aelkner | so that's the other thing | 22:02 |
aelkner | changing button order is a reall pain | 22:02 |
replaceafill | i'd suggest: | 22:03 |
th1a | Well, it has to be done. | 22:03 |
aelkner | replaceafill, go on | 22:03 |
replaceafill | copy the cancel action, and remove updateActions | 22:03 |
replaceafill | that "del ..." statement scares me ;) | 22:03 |
aelkner | tried that, didn't work | 22:03 |
aelkner | how do i remove the add button otherwise? | 22:04 |
replaceafill | set your own actions | 22:04 |
replaceafill | remove form.extends | 22:04 |
aelkner | i'll try that | 22:04 |
replaceafill | if you only care about one action in the base class, it's better to duplicate | 22:04 |
replaceafill | than to erase... imho | 22:05 |
replaceafill | and you have control over sorting that way too | 22:05 |
replaceafill | aelkner hold on | 22:05 |
replaceafill | let me push to trunk | 22:05 |
replaceafill | before you change | 22:05 |
replaceafill | so no more conflicts | 22:05 |
replaceafill | aelkner pushed | 22:06 |
*** alga has joined #schooltool | 22:07 | |
aelkner | replaceafill, updateActions in base class crashes on self.actions['add'].addClass('button-ok') | 22:07 |
*** menesis has quit IRC | 22:08 | |
aelkner | that's why i removed it | 22:08 |
replaceafill | ah, why dont you name your submit action 'add' | 22:09 |
replaceafill | so you wont have that problem | 22:09 |
aelkner | ok, trying that | 22:09 |
replaceafill | @button.buttonAndHandler(_('Submit'), name='add') | 22:10 |
aelkner | got it, and it worked | 22:10 |
replaceafill | :) | 22:10 |
aelkner | one hack replacing another, don't you think | 22:10 |
replaceafill | come on, z3c.form is the best form library every :D | 22:10 |
replaceafill | ever | 22:11 |
aelkner | :) | 22:11 |
replaceafill | yeah right... | 22:11 |
aelkner | but your hack is definitely cleaner | 22:11 |
aelkner | and now i know to definitely not rely on class inheritance with buttons | 22:12 |
aelkner | replaceafill, you see how i hacked the _finishedAdd attribute to get it to not redirect to nextURL? | 22:13 |
replaceafill | what's the point of doing: | 22:14 |
replaceafill | self._finishedAdd = False | 22:14 |
replaceafill | after redirect? | 22:14 |
aelkner | to avoid the z3c base class from redirecting later | 22:16 |
aelkner | to prevent | 22:16 |
replaceafill | but you just set the redirect... | 22:16 |
replaceafill | how is going to redirect later? | 22:17 |
aelkner | form.py(AddForm.render()) | 22:17 |
aelkner | in z3c.form lib | 22:17 |
aelkner | self._finishedAdd is only true if all validation passes and the object has been added | 22:17 |
aelkner | we could change nextURL, but i think it is used in the base classes, so that would be dangerous | 22:18 |
replaceafill | aelkner Form.__call__ | 22:20 |
aelkner | yes? | 22:21 |
aelkner | oh, you're saying it wouldn't reach the other test | 22:22 |
aelkner | let me check | 22:22 |
* th1a suspected this button issue would take a while... | 22:23 | |
aelkner | yeah z3c form heaven | 22:24 |
replaceafill | th1a i'll go back to cambodia now | 22:26 |
th1a | Have a good trip. | 22:26 |
replaceafill | :D | 22:26 |
replaceafill | did you see they changed to month-by-month gradebooks everywhere... | 22:27 |
replaceafill | and i'll use the score adapters now that they're in trunk | 22:27 |
replaceafill | i wish i could use flourish there ;) | 22:27 |
aelkner | replaceafill, pushed to trunk | 22:30 |
replaceafill | server updated | 22:31 |
th1a | Should I be looking at something? | 22:31 |
replaceafill | http://69.164.203.135:6660/persons/add.html | 22:32 |
replaceafill | aelkner paste the urls for th1a to look at ;) | 22:32 |
* replaceafill goes to get lunch | 22:33 | |
th1a | That'll do until we come up with something better than "Submit and add" | 22:36 |
th1a | Do buttons have tooltips? | 22:36 |
th1a | replaceafill, can you give the buttons a title? | 22:37 |
th1a | I meant, aelkner, can you give the buttons a title? | 22:40 |
aelkner | you mean for the rollover, the title attribute, right? | 22:45 |
aelkner | i'll check the z3c form source | 22:46 |
* replaceafill is back | 23:02 | |
aelkner | th1a, at first i got confused thinking we were talking about an <a> tag that has a title attribute for mouseover | 23:07 |
aelkner | but our form buttons are <input> tags | 23:07 |
aelkner | the mouseover property for those tags is tied to a script | 23:08 |
aelkner | i don't think you were suggesting we write jx for button mouseover, were you? | 23:08 |
aelkner | replaceafill, have you done anything like that yet, like for cambodia or something? | 23:09 |
replaceafill | uh? | 23:10 |
aelkner | sorry, i should have just answered th1a's question as 'no, no tooltips for buttons' | 23:10 |
th1a | thanks, aelkner. | 23:17 |
* th1a is cooking dinner. | 23:17 | |
aelkner | replaceafill, can you explain this: | 23:29 |
aelkner | $('form fieldset .row .error').prev().find('input').addClass('error'); | 23:30 |
replaceafill | hack to highlight errors on forms | 23:30 |
aelkner | wow, you really are getting into selector tricks in form.css | 23:31 |
replaceafill | child selectors give you more control applying styles | 23:32 |
aelkner | it looks like xpath syntax | 23:33 |
aelkner | well, except for the @ | 23:33 |
aelkner | and the //s | 23:33 |
aelkner | but it's pretty close | 23:33 |
aelkner | why did you have to reverse the order of the base classes? | 23:34 |
replaceafill | z3c.form declares the status message | 23:35 |
replaceafill | and i wanted to apply it to just one class | 23:35 |
replaceafill | we have to move it out to a nicer class | 23:35 |
replaceafill | with all the logic for extra fields and fieldsets, etc | 23:36 |
aelkner | it looks nice when you get errors now | 23:36 |
aelkner | that red outline helps the eye find the field | 23:37 |
replaceafill | and you still can use self.status | 23:37 |
replaceafill | for example | 23:37 |
replaceafill | in your Submit and add | 23:37 |
replaceafill | you could set the status to "Tom Hoffman was successfully added" | 23:37 |
replaceafill | and it would look like: http://img15.imageshack.us/img15/1527/1309199684984.png | 23:38 |
replaceafill | if there are errors, then you get the red message | 23:38 |
aelkner | in the case of errors, there is no redirect | 23:38 |
aelkner | in the case of submit and add, i redirect back to the same view | 23:38 |
replaceafill | i know | 23:38 |
aelkner | so wouldn't any setting of self.status be ignored? | 23:39 |
replaceafill | i'm just saying, it's possible :) | 23:39 |
aelkner | i was wondering how i could do it though, you know, have that message when the user hits submit and add | 23:39 |
replaceafill | i liked the way the old add multiple persons form used to do it | 23:41 |
replaceafill | with a temporary list | 23:41 |
replaceafill | but 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!