[FIX] Some minor improvements.
bzr revid: noz@tinyerp.com-20110614092556-3w7wbm9uv92x4hl9
This commit is contained in:
@@ -377,6 +377,7 @@ class DataSet(openerpweb.Controller):
|
||||
@openerpweb.jsonrequest
|
||||
def get(self, request, model, ids, fields=False):
|
||||
return self.do_get(request, model, ids, fields)
|
||||
|
||||
def do_get(self, request, model, ids, fields=False):
|
||||
""" Fetches and returns the records of the model ``model`` whose ids
|
||||
are in ``ids``.
|
||||
@@ -402,8 +403,8 @@ class DataSet(openerpweb.Controller):
|
||||
record_map = dict((record['id'], record) for record in records)
|
||||
|
||||
return [record_map[id] for id in ids if record_map.get(id)]
|
||||
|
||||
@openerpweb.jsonrequest
|
||||
|
||||
def load(self, req, model, id, fields):
|
||||
m = req.session.model(model)
|
||||
value = {}
|
||||
|
||||
@@ -1055,7 +1055,7 @@ background: linear-gradient(top, #ffffff 0%,#ebe9e9 100%); /* W3C */
|
||||
.openerp div.m2o_contextmenu span.disabled {
|
||||
color: #C0C0C0;
|
||||
}
|
||||
.top{
|
||||
.parent_top {
|
||||
vertical-align: text-top;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ openerp.base.TreeView = openerp.base.View.extend({
|
||||
textoftd = $('tr #treerow_' + response[i].id).find('td:eq('+ (childlen - 1) +')').text();
|
||||
if ($('tr #treerow_' + response[i].id).find('td:eq('+ (childlen - 2) +')').find('#parentimg').length > 0) {
|
||||
$('tr #treerow_' + response[i].id).find('td:eq('+ (childlen - 2) +')').css({ paddingLeft : '2px' });
|
||||
$('tr #treerow_' + response[i].id).find('td:eq('+ (childlen - 2) +')').find('#parentimg').addClass("top");
|
||||
$('tr #treerow_' + response[i].id).find('td:eq('+ (childlen - 2) +')').find('#parentimg').addClass("parent_top");
|
||||
} else {
|
||||
$('tr #treerow_' + response[i].id).find('td:eq('+ (childlen - 2) +')').css({ paddingLeft : '35px' });
|
||||
}
|
||||
|
||||
@@ -239,18 +239,18 @@
|
||||
</t>
|
||||
<t t-name="TreeView_Secondry">
|
||||
<t t-foreach="child_data" t-as="field" >
|
||||
<tr t-att-id="'treerow_'+field.id">
|
||||
<td valign="top" align="left" style="cursor:pointer;">
|
||||
<t t-if="(field.child_id).length>=1">
|
||||
<tr t-att-id="'treerow_' + field.id">
|
||||
<td valign="top" align="left" style="cursor: pointer;">
|
||||
<t t-if="(field.child_id).length >= 1">
|
||||
<img id="parentimg" src="/base/static/src/img/expand.gif" width="16" height="16" border="0"/>
|
||||
</t>
|
||||
</td>
|
||||
<t t-if="(field.child_id).length>=1">
|
||||
<td style="cursor:pointer;" align="left">
|
||||
<t t-if="(field.child_id).length >= 1">
|
||||
<td style="cursor: pointer;" align="left">
|
||||
<t t-esc="field.name"/>
|
||||
</td>
|
||||
</t>
|
||||
<t t-if="(field.child_id).length==0">
|
||||
<t t-if="(field.child_id).length == 0">
|
||||
<td align="left">
|
||||
<t t-esc="field.name"/>
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user