increased height of grid head

This commit is contained in:
Rushabh Mehta 2012-01-16 12:09:58 +05:30
parent 38f16b64fb
commit f38fbd8dfb
5 changed files with 10 additions and 13 deletions

View file

@ -520,7 +520,7 @@ div.sidebar-comment-info {
.grid_tab_wrapper {
position: absolute;
top: 30px;
top: 40px;
border-bottom: 1px solid #DDD;
}
@ -539,7 +539,7 @@ div.sidebar-comment-info {
.grid_head_wrapper {
position: absolute;
z-index: 1;
height: 30px;
height: 40px;
padding: 0px;
overflow: hidden;
/*background-color: #fff;*/
@ -549,7 +549,7 @@ div.sidebar-comment-info {
background-color: #EEE;
border-right: 1px solid #AAA;
border-bottom: 1px solid #AAA;
height: 30px;
height: 40px;
padding: 0px;
}

View file

@ -45,7 +45,7 @@
.grid_tab_wrapper {
position: absolute;
top: 30px;
top: 40px;
border-bottom: 1px solid #DDD;
}
@ -64,7 +64,7 @@
.grid_head_wrapper {
position: absolute;
z-index: 1;
height: 30px;
height: 40px;
padding: 0px;
overflow: hidden;
/*background-color: #fff;*/
@ -74,7 +74,7 @@
background-color: #EEE;
border-right: 1px solid #AAA;
border-bottom: 1px solid #AAA;
height: 30px;
height: 40px;
padding: 0px;
}

View file

@ -305,7 +305,7 @@ this.append_rows(data.length-this.tab.rows.length);if(data.length<this.tab.rows.
this.truncate_rows(this.tab.rows.length-data.length);for(var ridx=0;ridx<data.length;ridx++){this.refresh_row(ridx,data[ridx]);}
if(this.can_add_rows&&this.make_newrow){this.make_newrow();}
this.set_ht();if(this.wrapper.onscroll)this.wrapper.onscroll();}
_f.Grid.prototype.set_ht=function(ridx,docname){var ht=((cint(this.row_height)+10)*(((this.tab&&this.tab.rows)?this.tab.rows.length:0)+1));if(ht<100)ht=100;if(ht>cint(0.3*screen.width))ht=cint(0.3*screen.width);ht+=4;$y(this.wrapper,{height:ht+'px'});}
_f.Grid.prototype.set_ht=function(ridx,docname){var ht=$(this.tab).height()+$(this.head_tab).height()+30;console.log(ht);if(ht<100)ht=100;if(ht>cint(0.3*screen.width))ht=cint(0.3*screen.width);ht+=4;$y(this.wrapper,{height:ht+'px'});}
_f.Grid.prototype.refresh_row=function(ridx,docname){var row=this.tab.rows[ridx];row.docname=docname;row.is_newrow=false;for(var cidx=0;cidx<row.cells.length;cidx++){this.set_cell_value(row.cells[cidx]);}}
_f.FormGrid=function(field){this.field=field;this.doctype=field.df.options;if(!this.doctype){show_alert('No Options for table '+field.df.label);}
this.col_break_width=cint(this.field.col_break_width);if(!this.col_break_width)this.col_break_width=100;$y(field.parent,{marginTop:'8px'});this.init(field.parent,field.df.width);this.setup();}

View file

@ -431,7 +431,8 @@ _f.Grid.prototype.set_data = function(data) {
}
_f.Grid.prototype.set_ht = function(ridx, docname) {
var ht = ((cint(this.row_height) + 10) * (((this.tab && this.tab.rows) ? this.tab.rows.length : 0) + 1));
var ht = $(this.tab).height() + $(this.head_tab).height() + 30;
if(ht < 100)ht=100;
if(ht > cint(0.3 * screen.width))ht=cint(0.3 * screen.width);
ht += 4;

View file

@ -66,13 +66,9 @@ class Database:
Connect to a database
"""
self._conn = MySQLdb.connect(user=self.user, host=self.host, passwd=self.password)
try:
self._conn.set_character_set('utf8')
except:
pass
self._conn.set_character_set('utf8')
self._cursor = self._conn.cursor()
return self._cursor
def use(self, db_name):