[MERGE] Merge with trunk upto revision no 1218.
authorYogesh (OpenERP) <ysa@tinyerp.com>
Wed, 12 Oct 2011 05:09:18 +0000 (10:39 +0530)
committerYogesh (OpenERP) <ysa@tinyerp.com>
Wed, 12 Oct 2011 05:09:18 +0000 (10:39 +0530)
bzr revid: ysa@tinyerp.com-20111012050918-c83f2y42ocshk6e6

1  2 
addons/web/static/src/css/base.css
addons/web/static/src/js/core.js
addons/web/static/src/xml/base.xml

@@@ -300,7 -300,7 +300,7 @@@ label.error 
      text-shadow: 0 1px 0 #333;
      text-align: center;
      font-size: 18px;
-     line-height: 14px;
+     line-height: 18px;
      right: 0;
  }
  .openerp .secondary_menu.oe_folded .oe_toggle_secondary_menu {
      background: #5A5858;
      vertical-align: top;
      height: 100%;
+     display: block;
      position: relative;
  }
  .openerp .secondary_menu.oe_folded {
  .openerp .oe-listview .oe-field-cell {
      cursor: pointer;
  }
+ .openerp .oe-listview .oe-field-cell progress {
+     width: 100%;
+ }
  .openerp .oe-listview .oe-field-cell button {
+     margin: 0;
      padding: 0;
      border: none;
      background: none;
-     width: 100%;
+     width: 16px;
  }
  .openerp .oe-listview .oe-field-cell button:active {
      opacity: 0.5;
  .openerp .oe-listview .oe-list-footer span {
      margin: 0 1em;
  }
+ .openerp .oe-listview .oe-list-footer progress {
+     vertical-align:-10% !important;
+     width: 100%;
+ }
  
  /** list rounded corners
  
  }
  
  /* Form */
+ .openerp .oe_frame.oe_forms {
+     clear: both;
+ }
  .openerp table.oe_frame td {
      color: #4c4c4c;
  }
@@@ -1391,12 -1403,3 +1403,12 @@@ ul.oe-arrow-list li.oe-arrow-list-selec
      border-color: rgba(0,0,0,0);
      border-left-color: #CFCCCC;
  }
 +.openerp .view_editor{
 +    font-size: 90%;
 +    font-weight: normal;
 +    height : 10%;
 +    padding: 0;
 +    border-bottom: 1px solid #CFCCCC;
 +}
 +
 +
@@@ -74,6 -74,7 +74,7 @@@ openerp.web.qweb.debug = (window.locati
              }
              return this;
          }
+         // This should NOT be used, like callbackenable it's too hackish not enough javasish
          Class.include = function (properties) {
              for (var name in properties) {
                  if (typeof properties[name] !== 'function'
@@@ -604,8 -605,7 +605,8 @@@ openerp.web.Session = openerp.web.Callb
                  tag.onload_done = true;
                  self.do_load_js(files);
              };
 -            document.head.appendChild(tag);
 +            $('head').append(tag);
 +            self.do_load_js(files);
          } else {
              this.on_modules_loaded();
          }
      <td t-foreach="fields_view" t-as="field"
          t-if="!field.attrs.modifiers.tree_invisible"
          t-att-data-id="record.id"
-         t-att-style="!field_index ? 'background-position: ' + 19*level + 'px; padding-left: ' + 19*level + 'px' : undefined"
+         t-att-style="color_for(record) + (!field_index ? 'background-position: ' + 19*level + 'px; padding-left: ' + 19*level + 'px;' : '')"
          t-att-class="!field_index and has_children ? 'treeview-tr' : 'treeview-td'">
          <span t-if="!field.attrs.modifiers.invisible">
              <t t-esc="render(record[field.attrs.name], fields[field.attrs.name])" />
  
          </td>
      </t>
 -    <th t-if="options.selectable" class="oe-record-selector" width="1">
 -        <input type="checkbox"/>
 -    </th>
 +    <t t-if="options.radio">
 +        <th t-if="options.selectable" class="oe-record-selector" width="1">
 +            <input type="radio" name ="radiogroup"/>
 +        </th>
 +    </t>
 +    <t t-if="!options.radio">
 +        <th t-if="options.selectable" class="oe-record-selector" width="1">
 +            <input type="checkbox"/>
 +        </th>
 +    </t>
 +
 +
      <t t-foreach="columns" t-as="column">
          <t t-set="align" t-value="column.type === 'integer' or column.type == 'float'"/>
          <td t-if="!column.meta and column.invisible !== '1'" t-att-title="column.help"
          <td t-attf-class="oe_form_frame_cell oe_form_selection #{widget.selection.element_class}">
              <t t-raw="widget.selection.render()"/>
          </td>
-         <td class="oe_form_frame_cell oe_form_many2one #{widget.selection.element_class}" nowrap="true">
+         <td t-attf-class="oe_form_frame_cell oe_form_many2one #{widget.m2o.element_class}" nowrap="true" style="display: none">
              <t t-raw="widget.m2o.render()"/>
          </td>
      </tr>
              .unwrap();
      </t>
  </t>
 +<t t-name="view_editor">
 +    <table align="left" width= "100%" >
 +        <t t-call="view_editor.row"/>
 +    </table>
 +</t>
 +<tr t-name="view_editor.row" t-att-id="'viewedit-' + rec.id"  t-att-level="rec.level" t-foreach="data" t-as="rec">
 +    <td class="view_editor"  width="85%">
 +        <table>
 +            <tr>
 +                <td width="16px" t-att-style="'background-position: ' + 20*rec.level + 'px; padding-left: ' + 20*rec.level + 'px'">
 +                    <img t-if="rec.child_id.length" t-att-id="'parentimg-' + rec.id"  
 +                src="/web/static/src/img/collapse.gif" width="16" height="16" border="0"/>
 +                </td>
 +                <td style="cursor: pointer;">
 +                    <a style="text-decoration:none" href="javascript:void(0);"> <t t-esc="rec.name"/> </a>
 +                </td>
 +            </tr>
 +        </table>
 +    </td>
 +    <td align="left" class="view_editor"  width="15%">
 +        <table  cellspacing="0" cellpadding ="0" width="100%">
 +            <tr>
 +                <td> 
 +                    <img  id="side-add" src="/web/static/src/img/icons/gtk-add.png" style="cursor: pointer;"/>
 +                </td>
 +                <td> 
 +                    <img  id="side-remove" src="/web/static/src/img/icons/gtk-remove.png" style="cursor: pointer;"/> 
 +                </td>
 +                <td> 
 +                    <img  id="side-edit" src="/web/static/src/img/icons/gtk-edit.png" style="cursor: pointer;"/> 
 +                </td>
 +                <td> 
 +                    <img  id="side-up" src="/web/static/src/img/icons/gtk-go-up.png" style="cursor: pointer;"/> 
 +                </td>
 +                <td> 
 +                    <img  id="side-down" src="/web/static/src/img/icons/gtk-go-down.png" style="cursor: pointer;"/> 
 +                </td>
 +            </tr>
 +        </table>
 +    </td>
 +        <t t-if="rec.child_id.length">
 +            <t t-set="data" t-value="rec.child_id"/>
 +            <t t-call="view_editor.row"/>
 +        </t>
 +    </tr>
  
  <t t-name="ExportView">
      <a id="exportview" href="javascript: void(0)" style="text-decoration: none;color: #3D3D3D;">Export</a>
      </tr>
  </table>
  
 +
  <table t-name="ExportTreeView-Secondary"
         id="field-tree-structure" class="oe_export_fields_selector_export"
         cellspacing="0" cellpadding="0">