IRC log of #schooltool for Thursday, 2011-07-07

*** aks has joined #schooltool06:21
*** aks has joined #schooltool06:21
*** th1a has quit IRC07:11
*** aks has quit IRC14:18
*** replaceafill has joined #schooltool16:15
*** th1a has joined #schooltool16:29
th1ahi yvl, aelkner, replaceafill.16:31
th1aIs menesis on vacation?16:31
replaceafillgood morning/afternoon16:31
yvlgood morning!16:32
yvlyes, th1a16:32
th1aThanks yvl.16:32
yvlsorry, I guess we missed some communication again16:32
th1ayvl: How was your day?16:33
yvlvery productive, thanks16:33
yvlit was a plumbing day, but I finished what I wanted16:33
yvlI guess I need to update you guys on what has changed and how to use it16:34
yvlas I'm away on vacation until 13th I think16:34
aelknerwell, then definitely, yes16:34
yvlalso, I'm taking a day off tomorrow, but I'll be available at meeting time16:35
yvlso, please update your branches and let's go over some code16:35
aelknerok, my branch is updated16:36
yvlreplaceafill, are you in a semi-alive state?16:36
replaceafillyvl, better than yesterday :)16:37
yvlor in other words, are you feeling better? :)16:37
yvlgood to hear!16:37
replaceafilli had 38.8 temperature yesterday :(16:37
replaceafillbut i'm alive ;)16:37
replaceafillgo ahead yvl16:37
yvlfirst, skin.flourish.from gained Dialog and DialogForm base classes16:38
yvlDialog is for porting old formlib forms to modal dialogs16:38
yvlDialogForm is for porting z3c.form forms to modal dialogs16:38
yvlso, the most basic usage: person preferences form16:39
yvlyou can see dialog_submit_actions16:40
yvland dialog_close_actions16:40
yvlthese are lists of z3c.form buttons, that you want to behave "ajaxy"16:40
yvl*_close_actions will make the buttons simply close the dialog on click16:40
yvlwithout sending a request to the server16:40
yvldialog_submit_actions will, well, submit the form16:41
yvland load the result into modal dialog16:41
yvlyou may choose to omit some buttons from those lists16:41
yvlif you do, it will work like simple form buttons:16:42
yvlsubmit the form and reload everything (the page)16:42
yvlthis preferences dialog is quite interesting:16:42
yvlwe do not want to reload the parent page after hitting "apply"16:42
yvlbecause preferences do not change any content on person index page16:43
yvlso, I added to the "apply" action16:43
yvlself.reload_parent = False16:43
yvlthe base class does some magic16:44
yvlif you use self.request.response.redirect() in your form16:44
yvlit detects that and reloads the *whole page*16:44
yvlbut - if you specify self.reload_parent = False, it reloads only the dialog16:44
yvland then there is one more interesting thing16:45
yvlafter we hit apply, and process the form successfully, we want to close the modal dialog16:45
yvlso, we add self.ajax_settings['dialog'] = 'close'16:46
yvlself.ajax_settings['dialog'] is basically the same dict you pass to jquery ui dialog16:46
yvlplease look briefly at16:47
yvlself.ajax_settings currently passes these settings to the $.ajax callback:16:48
yvlajax_settings['html'] - calculated automatically, no need to set that manually - this is the new html to be put in modal dialog16:49
yvlajax_settings['dialog'] - this is the manually set dict to be passed to: $(form).dialog()16:49
yvlso you can control exciting things, like16:49
yvlajax_settings['dialog']['title'] = u'Hello world!'16:50
yvlajax_settings['dialog']['width'] = 51216:50
yvlfinally, it also has autmatic ajax_settings['redirect']16:50
yvlif you set it (or it is set by self.request.response.redirect() and self.reload_parent == True)16:51
yvlthe modal dialog will reload the whole page to the location specified there16:51
yvlnow, to the timetabling wizard16:52
yvl(I kept it as a dialog for now)16:52
yvl(to be used as an example of porting, until I get back from vacation :) )16:52
yvlif you looked at timetable/browser/ttwizard.py16:53
yvlyou could see, that apart from viewstate magic (that is uset to simulate getSession) - and please ignore that part16:54
yvlapart from that, it's modal behaviour is done by two things16:54
yvlinherit from flourish.form.Dialog (it's an old non-z3c form)16:54
yvland def updateDialog16:55
yvlwhere it changes the modal dialog's width16:55
yvland since it is an old form16:55
yvlthe buttons are rendered in templates, manually16:56
yvl<input type="submit" ... onclick="return ST.dialogs.submit(this, this);" />16:56
yvland the final change16:56
yvlI made a SimpleModalLinkViewlet16:57
yvlyou cannot specify the dialog_title to it now16:57
yvl(simply it was not enough time)16:57
yvlit shows off the new ST API feature:16:58
yvlif you have a link, that has an HTML id set16:58
yvlyou can do this to call up a modal dialog:16:58
yvl<a id="my_unique_id" href="something/modal_form_link.html" onclick="return ST.dialogs.open_modal_dialog(this);" > Link </a>16:59
yvlsimple as that16:59
th1aaelkner, replaceafill:  You guys following this?16:59
replaceafillth1a kind of (lots of things to digest) :)17:00
yvlwell, that's the news :)17:00
yvlbut I wanted to put them on IRC17:00
yvlso you could at least look at the logs17:00
aelkneryeah, i wold need time to look over the code, but the explanation helps17:00
aelkneryvl, so the idea is not to have to write much js, right?17:01
aelknerthat's good17:01
yvlalso - so we could control the dialog from the python forms17:01
yvlthose simplest settings17:01
yvllike width and so on17:01
replaceafillno more title hacks :)17:01
yvlalso to have working form validation and so on :)17:01
aelknersince we usually would need the same type of blcks of js, this deinitely helps17:01
yvlreplaceafill, only the big hacks from now on!17:02
yvlunless I forgot something17:02
yvlmaking a form modal should be way easier now17:03
th1aI guess today would be a good time to do some gratuitous dialogs.17:03
th1afor aelkner.17:03
yvlor at least to try out one modal dialog with form validation17:03
yvlreplaceafill - if you manage, please just take a short look at this before tomorrow17:04
yvljust a brief one :)17:04
replaceafillyvl will do17:04
yvlalso - stepping over JS with firebug may help17:05
yvlflourish.js is not very big17:05
yvland hopefully - readable17:05
aelkneryvl, i'm assuming th1a is going to give me a modal dialog task, so i'll email you if i have a question17:05
th1areplaceafill:  Can you give aelkner a quick primer on using the jquery icons?17:06
* yvl would like to run off early today, if you guys are ok with it17:07
replaceafillth1a ah sure17:07
th1aAlso, for all of you, we should replace all the LP icons with jquery ones.17:07
th1aFor the sake of consistency.17:07
replaceafillyvl in which package is your image column getter?17:08
replaceafilli dont remember right now...17:08
replaceafillresourceDirectory's are also registered like adapters on request, correct?17:10
replaceafilli ask this because jquery-ui directory is registered like one17:10
yvlI think so17:10
yvlI'm not sure about "deep" folders though17:11
yvlnever tried any17:11
replaceafillit's just that i'd like to use the jquery icons without the extra markup jquery ui needs17:11
replaceafilllike inserting empty spans with appropriate classes17:11
yvlyou can make copies of them17:11
yvlthe images17:12
yvlif you need to of course17:12
* yvl didn't look at that either :)17:12
* aelkner takes a quick break, please go on17:12
replaceafillok, i'll look into that17:13
yvlit should "just work" IMHO17:13
yvlor you can copy them to a decent place and make them "just work" ;)17:13
yvlso - anything else you guys need from me today?17:14
replaceafillnot me, thanks yvl17:14
* aelkner is back17:15
aelkneri can't think of anything, but then again, i haven't had a chance to digest anything :)17:16
aelknerbut your timetable dialogs work, right?17:16
yvland the person preferences dialog also17:17
aelknerso they should provide ample examples17:17
aelknerbetween replaceafill and myself, we should be able to work it out17:17
yvlI hope so17:17
* yvl is quite confident in you guys :)17:18
aelkneryour confidence is inspirational :)17:18
yvlI think we'll chat more on this tomorrow17:18
yvl*if* you have questions - it may as well be quite straightforward17:19
yvlth1a... so... is there some spare gravel by any chance? ;)17:20
th1ayou are excused, yvl.17:20
yvlthanks, th1a17:20
yvlsee you guys tomorrow!17:20
aelknerthanks yvl17:20
aelknercya then17:20
th1areplaceafill:  I need your invoice today.17:22
th1aWhether or not you're able to do any other work.17:22
replaceafillth1a will send it right away17:22
th1aaelkner:  What's your status now?  Ready for something new?17:23
aelknerthat's p to you, do you consider my previous task as completed?17:24
aelknerit's loaded in my instance17:25
aelknerif so, i would suggest a modal dialog task17:26
th1aWell, let's change the icons before we go any further.17:26
th1aJust to have that squared away.17:26
th1amake the 'x' into a jquery check box.17:26
aelknerreplaceafill, can you explain what th1a means by tat?17:27
replaceafillth1a can i take that task?17:27
aelkneris there an example i can look at?17:27
aelknerth1a, perhaps that would be best17:27
th1aOK, replaceafill can do it.17:27
th1aChange the delete icon too.17:27
replaceafilli mean, since we're chaning all the icons17:27
replaceafillin all the views17:27
th1aIn both person and resource "demographics."17:28
replaceafilland the pencil too, right?17:28
th1aLet's not change the pencil yet.17:30
th1aI don't like that pencil as well.17:30
th1aI think it would need to have a circle added or something.17:30
th1aaelkner:  Is the terminology we use for resources "types?"17:31
th1aWhat are location/equipment/resource?17:31
aelkneri suppose we should call then that17:32
aelkneras it is, they are interfaces17:32
aelknerbut that is not interesting to you17:32
aelknerand all resources have subtypes17:32
aelknerso yes, let's call them types17:32
th1aTypes and subtypes?17:32
aelknerok, so the types are fixed by us17:33
aelknerbecause we define the separate interfaces and those drive the views17:33
aelknerthe subtypes are for the user17:33
aelknerso that they can sub-devide the resources into subtypes17:33
th1aSubtypes is actually probably clearest.17:33
aelknerbut i don't now why the user wants that as yet17:34
aelknerso you?17:34
aelknerdo you?17:34
aelkneractually, now i remember something17:34
th1aWell, all of resources is stuck at the point of being not *quite* useful.17:34
th1aNot quite.17:34
th1aBut if you were tracking resources, you'd eventually want to filter by subtype, cameras, computers, etc.17:35
aelkneri remember subtypes being something the user defined at the time of adding a resource17:35
aelknerth1a, right17:35
aelknerso in reports or something it becomes useful17:35
th1aOK, so anyway thse resource attribute add and edit forms should substitute "type" for "groups" in the limit part.17:36
aelknerth1a, ok, but if you are having replaceafill work on resources, i think now would be17:36
th1aActually, can we just get rid of subtype and let people add their own selection field?17:37
aelknera good time to split me off onto somthing unrelated17:37
th1aaelkner:  Switch the damn terminology and then you're done.17:37
th1aBut the larger question for resources is how are these equipment fields defined now?17:38
th1aThey aren't actually custom attributes, right?17:39
replaceafillth1a you mean the subtypes?17:39
aelknerno, he means the types17:39
th1aLIke "manufacturer"17:39
aelkneryes, each interface has different attribites17:39
th1aSo really, we should have a evolution script to port existing instances to have these as "custom demographics" fields.17:40
th1areplaceafill can do this.17:41
replaceafilli like that idea :)17:41
replaceafillof using custom attributes for that17:41
th1aIn new instances there should just be Title and Description (as text area).17:42
th1aIf people want the other stuff in the future they can add it themselves.17:42
aelknerso, preset demos for resources like we have for persons17:42
th1aI think Title and Descriptions as the only new ones by default is fine.17:43
th1aWe just can't disappear the old ones in existing instances.  They need to be ported.17:44
aelknerah, yes, makes sense17:44
th1aThat should be enough for a sick man, replaceafill.17:44
aelknerth1a, so you want me to change the interface for demo fields so that the form says type instead of group, yes?17:45
aelknerLimit to group(s) -> Limit to type(s)?17:45
aelknerIf you select one or more groups below, this field will only be displayed in forms and reports for17:46
aelknermembers of the selected groups17:46
aelkneri'm not sure if substituting type for group there makes sense17:46
aelknerwe would need to restate that sentence17:46
th1a"for resources of the selected types."17:47
aelknerthe interface is not defined for resources17:47
aelknerso the sentence has to make sense for persons and resources17:47
aelknerand whatever other object we add demos to in the future17:47
th1aSee, these abstractions that damage the UI are not helpful.17:49
th1aWe're at best saving hypothetical developer time at the expense of users.17:50
th1aAnd I don't think we're saving developer time.17:50
aelkneryou make it sound like i decided to add an abstraction that was unnecessary17:52
aelknerbut i didn't, the abstraction was created when we only had demos for persons17:52
aelknerthen we decided to add demos to resources17:52
aelknerwe didn't feel the need to clone IFieldDescription at that point17:52
aelknerjust to change some text that would appear on a form17:53
th1aOK, so how can we change this text?17:53
aelknerDo you really want me to change many lines of code in many places just to17:54
aelkneravoid coming up with a general term for the user to understand types?17:54
aelkneri think we could save time just thinking this out anyway17:54
aelknerwhat about demos for all objects?17:54
aelknerwhat would the text be for app demos17:54
aelknerdo we need to clone IFieldDescription each time we add demos to other objects?17:55
aelkneri recommend investing the time coming p with a general set of terms for the user17:55
th1aShould we subclass IFieldDescription and override the text?17:55
th1aNo... the problem isn't coming up with a better abstraction.17:56
aelknerlet me look at code a sec....17:56
th1aIt is being able to modify the text to be helpful to the user in each specific case.17:56
aelknerwell, we have a number of views that are written to handle adding IFieldDescription17:58
aelknerobjects to IDemographicsFields containers17:58
aelknerclass IResourceDemographicsFields(IDemographicsFields):17:58
aelknerthat exists so that we can have two different container views, one for person demo fields17:59
aelknerand one for resource demo fields17:59
aelknerfor the /demographics and /resource_demographics views18:00
aelknerbut we don't subclass IFieldDescription18:00
aelknerand all the views for adding those objects to their containers already work as they are18:00
aelknerthere was no need to subclass there18:00
aelknerif we were to, we would need to create a whole new set of views18:01
aelknerit seems like a lot of wasted effort to change text in one form18:01
aelknerwe could hack the form18:01
aelknerto programatically override the widget text based on the container that we are adding/editing the demo field for18:02
th1aBut we're really talking about a whole new set of really simple views, right?18:02
aelknerand an evolution script to change all IFieldDescription objects to IResourceFieldDescription18:03
aelkneragain, i don't see the use of it18:04
th1aThe purpose is to make the application clear to users.18:04
aelkneryeah, so let's make the sentence clear and be done with it18:05
aelknerone line of code to change in iinterfaces.py18:05
aelknerinstead of saying 'member of group'18:05
aelknersay, 'type of object'?18:05
th1aNo... that's the point.18:05
aelknertype of (fill in object name)18:06
aelknerso type of person18:06
aelknertype of resource18:06
aelknersee, student, teacher, admin is not a flexible group list18:06
aelknerit's really a type of person18:06
aelknerthe toehr groups that uses can set up for clubs, etc.18:07
aelknerare not even relavent to demos18:07
aelknerso what's the harm in saying type of person?18:07
th1aHow would you implement that?18:08
aelknertype of resource18:08
aelknerhack the form18:08
aelkneri think i can update the widget text18:09
th1aIf you can do that you can also just have it select "group" vs. "type" too, right?18:09
aelknerso in the case of persons, it wold still be group, but for resources (or other objects) it would be type18:10
aelkneris that you would want?18:10
aelknerok, let me try that then18:10
aelknerbut can we discuss my next task now18:11
aelknersomething to do with modal dialogs18:11
aelknerso that i have questions for yvl tomorrow18:11
th1aOK, looking...18:12
th1aOf course now I won't be able to think of one...18:13
th1ahow about /calendar/add.html ?18:14
th1aThat's one that feels like it should be modal.18:14
th1aBut it is a little extra-complicated.18:15
aelknersorry, can we pick something that doesn't involve timetables?18:15
th1aThere's lots in the gradebook, but we probably need some kind of rudimentary basic gradebook view first.18:15
th1aCan you hack that in quickly?18:15
th1aJust move the action buttons to the sidebar?18:16
aelknersorry, again, i'm not being helpful, but that task is also going to take away from groking the modal stuff18:16
aelknercan't we do something for course/section?18:17
th1aWe still need those basic views right?18:17
aelknersomething where the other parts of the problem don't introduce complexity on their own18:17
th1aI'm not really seeing low-hanging fruit.18:18
aelknerwe could think about this another way18:18
aelknerperhaps i don't need to worry about modals for now18:18
aelknerif that's the case, i can work on any task you like and not worry about groking the modal stuff18:19
aelkneri could shift my focus to the gradebook, for instance18:19
th1aLet's go through the manage pages.18:20
aelknerwhat about course container vew?18:20
aelkner\we don't have that yet18:20
aelknerthat would probably involve links for modals18:20
aelknergranted, we don't have a schoolyear view yet18:20
th1aDo we have /years?18:21
replaceafill(sorry to interrupt)18:21
aelknerth1a, perfect /schooyears18:21
aelkneradd schoolyear18:21
aelknerthat would be a modal, right?18:21
th1aWell, it could be.18:22
th1aDoesn't really need to be.18:22
th1aSchool years.18:23
aelknerit's cetainly a good task in its own right18:23
th1a- make it a table18:23
aelknerforget the modal links?18:24
th1a- move "delete" to an action on the year itself -- you can do a confirmation dialog for that.18:24
aelknerare you saying have the delete pencil in the schoolyears view next to each year?18:25
aelknerand have that call up the modal confirmation dialog?18:26
th1aFor one delete is not a pencil.18:26
aelknerwell, the icom that we have in person container view18:26
th1aI am saying it is an action in the sidebar (under "Action") on the view of the year itself.18:26
th1aAll these deletes on the containers are in the wrong place, essentially.18:27
th1aWell, most.18:27
th1aIn the wrong place for things you rarely delete.18:27
th1aIt can just be an action on the object, not the container.18:27
th1a(from the user's perspective, at least)18:28
aelknerhow does one call up the persons view?18:28
aelkneri tried localhost7080:/persons:18:28
aelknerbut it says the page is not found18:28
aelknerwait, it works in the demo instance18:29
aelknerok, never mind, i'm at the person view18:30
replaceafillth1a is this checkbox ok?
aelknerno delete icon like i thought for some reason18:30
th1areplaceafill:  Yes.18:30
aelknerno delete or hide of person, either18:30
replaceafillth1a there's another checkbox with a circle around18:30
th1areplaceafill: Can we center that?18:30
th1aNo circle here.18:30
th1aaelkner:  Yeah, we need to do the same thing in person.18:31
aelknerth1a, so, we need to add a Delete link to the Actions section when viewing a particular person18:32
aelknerwith confirmation dialog?18:33
aelknerthat would be a perfect task18:33
aelknerit wold get me quickly to groking the modal stuff18:33
aelknercan we leave the demo field help task until tomorrow so i can discuss the best way18:34
aelknerto handle that with yvl?18:34
th1aYou can also start on /schoolyears18:34
th1aDon't do the activate school year part yet though.18:35
aelknerwell, adding the delete link to person view is first, right?18:35
th1aJust get the basic table and link view in.18:35
aelknerthat should keep me busy18:35
th1aI have to try to renew my driver's license this afternoon.18:36
th1aIt could take... a long time.18:36
aelknerreplaceafill, can you push your change to trunk so that i can see it?18:36
aelkneri'm curious what you did to get the checkoxes going18:36
replaceafillaelkner i'm still in the middle, but i can show you the diff18:37
replaceafillhold on18:37
aelknerreplaceafill, thanks18:39
replaceafillbasically, it's just the empty spans i was talking about in the meeting18:39
replaceafillwith the UI classes18:39
aelknerand no more bool_dict :)18:41
replaceafillaelkner shouldn't we change /resource_demographics to /resource_attributes or something?18:43
aelknerit's just a url, not important to the user18:43
replaceafillhhmm ok18:44
aelknerwe call everything demographics in our code, so there's no point changing that now18:44
* th1a goes to the DMV.18:49
replaceafilli think Reorder demographics needs a subtitle18:59
* replaceafill doesnt like the new "delete" button :(19:26
replaceafillth1a add/remove icons
* th1a is back.19:52
th1areplaceafill:  Can we adjust the colors?19:52
replaceafillth1a sure19:52
th1aI don't want to do it now, but that'll help.19:53
replaceafillok, i'll push these changes to trunk then19:54
replaceafillif you change the new=.... parameter you get new colors19:54
replaceafillwe can play with 'w' and 'h' too if we want bigger icons19:54
th1aThis is one of the things I'm finalizing with Schwa -- making sure we get a palette for this stuff.19:55
replaceafillchanges pushed "Changed X to jQuery UI checkboxes in demographics/resource attributes views. Also updated add/remove icons"19:57
replaceafillaelkner did you change the group/type terminology in the resource attributes views?20:16
replaceafillth1a what resource attributes should we set in init?20:19
replaceafill(like the default demographics)20:19
th1aTitle and description.20:19
replaceafilli thought those were the only core attributes on resources?20:20
replaceafilland others like manufacturer would be resource attributes20:20
replaceafillmodel, serialNumber20:20
th1aPeople can add those if they want.20:21
th1aI don't really think we need examples.20:21
replaceafillah ok, so no default resource attributes then20:21
replaceafillbut evolution should create some, correct? depending on the existing data20:22
replaceafillgot it20:22
th1aFor resources I think the built in attributes are as likely to confuse people as anything.20:23
th1aNot that they don't have a purpose.20:23
th1aBut since we don't have to add them ourselves, we can just leave it up to the user.20:23
replaceafillwhat if they already have Locations defined, but with no capacity for instance, should we create the custom attribute for capacity?20:24
th1aYou mean if it is blank?20:29
th1aI don't think we need to bother checking.20:29
th1aAlso, I we don't need to surprise people by removing things even if they aren't using them.20:30
*** menesis has joined #schooltool20:45
replaceafillth1a are we keeping the Book button functionality in the /resources view20:56
replaceafillbasically, you mark one or several resources, click Book and put them on your session21:10
replaceafillso, next tiime you add/edit an event, the resources are already listed21:10
th1aOh... it needs to be different.21:10
th1aMake it an action on the resource.21:11
replaceafillah ok21:11
th1aAlso, you should make leaders a table on the resource index.21:14
replaceafilli'm making /resources kind of like /persons21:15
replaceafillis that ok?21:15
th1aThat's the idea.21:15
replaceafillit seemed appropriate now that all resources have only two core attrbiutes21:15
th1aNone of these things are different for a reason.  It is just inconsistency.21:15
th1aWhich should be replaced with consistency.21:16
*** menesis has quit IRC21:16
*** menesis has joined #schooltool22:05
*** menesis has quit IRC22:47
th1aHow we coming, aelkner?22:54
replaceafillnow i need to add existing resources :/22:58
replaceafillor better fix the add resource forms :)22:59
th1aYes.  Looks good.23:00
replaceafillfor the sidebar:23:00
replaceafill- Equipment23:00
replaceafill- Location23:00
replaceafill- Resource?23:00
replaceafillth1a should i get rid of these hints?

Generated by 2.15.1 by Marius Gedminas - find it at!