2014-03-08 13:04 GMT+01:00 Emma <delesco...@gmail.com>: > > > > On Saturday, 8 March 2014 12:40:35 UTC+1, Albert Cervera Areny wrote: >> >> 2014-03-08 8:19 GMT+01:00 Emma <deles...@gmail.com>: >> >>> >> >>> I think this is the kind of things Cédric was trying to note which are >> >>> going to give bug reports. You cannot safely link labels to fields >> >>> automatically because Tryton allows much more complex configurations >> >>> than "label - field" structure. You'll maybe end up with something >> >>> that renders correctly in many cases but not in all cases, and Cédric >> >>> is trying to find a solution that works always correctly. I think this >> >>> is the main point here. >> >> >> >> >> >> I don't really see what's complicated or can bring bugs in there. Two >> >> fields cannot have the same name, so if two elements have the same name >> >> attribute, it's a label and a widget. All widgets don't have labels in >> >> front of them, there are strings, notebooks and more, but 2 form items, >> >> one >> >> next to each other, with the same name attribute are bound to be widget >> >> and >> >> label, that's how I determine what can be gathered in a same HTML element. >> >> If I'm wrong, please explain to me because I don't see any other possible >> >> case. >> >>> >> >>> >> > >> > Well... actually there one case it can be different: two consecutive >> > representation on the same field with 2 different widgets (like a treeview >> > and calendar widget of an agenda) Those will usually be in different >> > "sub-items" but i'll add a check to make sure this is not the case. >> >> The things I had in mind were something like the tax form view in the >> account module (see view/tax_form.xml): >> >> <group col="1" id="label_amount_rate"> >> <label name="amount" yfill="1" xexpand="1" yexpand="1"/> >> <label name="rate" yfill="1" xexpand="1" yexpand="1"/> >> </group> >> <group col="1" id="amount_rate"> >> <field name="amount"/> >> <group col="2" id="rate"> >> <field name="rate" factor="100" xexpand="0"/> >> <label name="rate" string="%" xalign="0.0" xexpand="1"/> >> </group> >> </group> > > > Well, in this very particular case (which I don't think is ever going to be > looked at on a tablet or smart phone since it's part of configuration)
Given that Tryton is mainly a framework it does not matter if this specific case is going to be used in a tablet or not because developers should be able to create whatever views they want with the security that they will render correctly in both GTK and Web client. > label and field will stay 2 distinct identities (no grouping inside a single > div) > which means in "small mode" the label will be on top of the field instead of > next to it (see screenshots lg,md,sm and xs below). This grouping is a > feature, this particular form doesn't take advantage of it, it doesn't bother > me, > it doesn't break anything. I agree it looks pretty well. Specially because the Desktop-size and the PDA-size modes look like the GTK client. -- Albert Cervera i Areny Tel. 93 553 18 03 @albertnan www.NaN-tic.com