Merge branch 'handlerupdate' of github.com:webnotes/wnframework into handlerupdate

This commit is contained in:
Rushabh Mehta 2012-03-22 07:41:00 +01:00
commit ccd442f180
2 changed files with 9 additions and 6 deletions

View file

@ -120,9 +120,11 @@ _f.Grid.prototype.insert_column = function(doctype, fieldname, fieldtype, label,
_f.Grid.prototype.reset_table_width = function() {
var w = 0;
for(var i=0, len=this.head_row.cells.length; i<len; i++) {
w += cint(this.head_row.cells[i].style.width);
}
$.each(this.head_row.cells, function(i, cell) {
if((cell.style.display || '').toLowerCase()!='none')
w += cint(cell.style.width);
})
this.head_tab.style.width = w + 'px';
this.tab.style.width = w + 'px';
}

View file

@ -283,10 +283,11 @@ class _DocType:
def _add_code(self, doc):
"""add js, css code"""
import os
from webnotes.defs import modules_path
from webnotes.modules import scrub
from webnotes.modules import scrub, get_module_path
path = os.path.join(modules_path, scrub(doc.module), 'doctype', scrub(doc.name))
modules_path = get_module_path(doc.module)
path = os.path.join(modules_path, 'doctype', scrub(doc.name))
fpath = os.path.join(path, scrub(doc.name) + '.js')
if os.path.exists(fpath):