2 col layout in form, docbrowser and home

This commit is contained in:
Rushabh Mehta
2012-02-20 15:40:29 +05:30
parent 13531b73eb
commit 3f29b85f5d
8 changed files with 64 additions and 37 deletions

View File

@@ -39,7 +39,7 @@
"lib/css/legacy/menus.css",
"lib/css/legacy/messages.css",
"lib/css/legacy/dialog.css",
"lib/css/legacy/bootstrap-buttons.css",
"lib/css/bootstrap/bootstrap-buttons.css",
"lib/css/bootstrap/bootstrap-topbar.css",
"erpnext/startup/startup.css",
"erpnext/website/css/website.css"
@@ -61,7 +61,7 @@
"lib/css/legacy/tabs.css",
"lib/css/legacy/bw-icons.css",
"lib/css/legacy/sidebar.css",
"lib/css/legacy/bootstrap-buttons.css",
"lib/css/bootstrap/bootstrap-buttons.css",
"lib/css/bootstrap/bootstrap-topbar.css",
"erpnext/startup/startup.css"
]

View File

@@ -12,6 +12,7 @@ body {
font-family: Arial, Helvetica, Sans;
font-size: 12px;
color: #000;
background-color: #e2e2e2;
}
/* heading from bootstrap */
@@ -225,12 +226,30 @@ div.std-footer-item {
color: #FFF;
}
.layout_wrapper {
padding: 15px;
.layout_wrapper, .layout-wrapper {
-moz-box-shadow: 1px 1px 6px #AAA;
-webkit-box-shadow: 1px 1px 6px #AAA;
box-shadow: 1px 1px 6px #AAA;
background-color: #fff;
padding: 15px;
}
.layout-main-section {
width: 68%;
float: left;
padding: 13px;
background-color: #FFF;
min-height: 450px;
}
.layout-side-section {
width: 24%;
float: right;
margin-right: 15px;
color: #606060;
overflow-x: hidden;
padding: 13px;
min-height: 450px;
}
/* from bootstrap */
@@ -1612,8 +1631,6 @@ div.psidebar-head {
}
div.psidebar-section {
background-color: #fff;
border: 1px solid #b2b2b7;
margin-bottom: 11px;
overflow: hidden;
}
@@ -1621,14 +1638,7 @@ div.psidebar-section {
div.psidebar-section-head {
font-size: 12px;
padding: 5px 11px;
background: #eeeeee; /* Old browsers */
background: -moz-linear-gradient(top, #eeeeee 0%, #cccccc 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eeeeee), color-stop(100%,#cccccc)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* IE10+ */
background: linear-gradient(top, #eeeeee 0%,#cccccc 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */
border-bottom: 2px solid #444;
}
div.psidebar-section-body {
@@ -1650,7 +1660,7 @@ div.follower-list {
font-size: 11px;
}
/*
* lib/css/legacy/bootstrap-buttons.css
* lib/css/bootstrap/bootstrap-buttons.css
*/.btn.danger,
.alert-message.danger,
.btn.danger:hover,
@@ -2222,7 +2232,6 @@ span, div, td, input, textarea, button, select {
}
body {
background-color: #e2e2e2;
}
.erpnext-footer {

View File

@@ -12,6 +12,7 @@ body {
font-family: Arial, Helvetica, Sans;
font-size: 12px;
color: #000;
background-color: #e2e2e2;
}
/* heading from bootstrap */
@@ -225,12 +226,30 @@ div.std-footer-item {
color: #FFF;
}
.layout_wrapper {
padding: 15px;
.layout_wrapper, .layout-wrapper {
-moz-box-shadow: 1px 1px 6px #AAA;
-webkit-box-shadow: 1px 1px 6px #AAA;
box-shadow: 1px 1px 6px #AAA;
background-color: #fff;
padding: 15px;
}
.layout-main-section {
width: 68%;
float: left;
padding: 13px;
background-color: #FFF;
min-height: 450px;
}
.layout-side-section {
width: 24%;
float: right;
margin-right: 15px;
color: #606060;
overflow-x: hidden;
padding: 13px;
min-height: 450px;
}
/* from bootstrap */
@@ -433,7 +452,7 @@ div.dialog_row table td textarea {
}
/*
* lib/css/legacy/bootstrap-buttons.css
* lib/css/bootstrap/bootstrap-buttons.css
*/.btn.danger,
.alert-message.danger,
.btn.danger:hover,
@@ -1005,7 +1024,6 @@ span, div, td, input, textarea, button, select {
}
body {
background-color: #e2e2e2;
}
.erpnext-footer {

View File

@@ -16,12 +16,14 @@ pscript.home_make_body = function() {
var wrapper = page_body.pages['Event Updates'];
// body
wrapper.main_tab = make_table(wrapper,1,2,'100%',['70%','30%']);
$y(wrapper.main_tab, {tableLayout:'fixed'});
wrapper.body = $a($td(wrapper.main_tab, 0, 0), 'div', 'layout_wrapper');
$(wrapper).addClass('layout-wrapper')
.css('background-color', wn.sidebar_background).css('padding', '0px');
wrapper.style.backgroud
wrapper.body = $a(wrapper, 'div', 'layout-main-section');
wrapper.head = $a(wrapper.body, 'div');
wrapper.side_section =$a(wrapper, 'div', 'layout-side-section');
$a(wrapper, 'div', '', {clear:'both'});
wrapper.banner_area = $a(wrapper.head, 'div');
@@ -46,7 +48,7 @@ pscript.home_set_banner = function(wrapper) {
pscript.home_make_widgets = function() {
var wrapper = page_body.pages['Event Updates'];
var cell = $td(wrapper.main_tab, 0, 1);
var cell = wrapper.side_section;
// sidebar
sidebar = new wn.widgets.PageSidebar(cell, {
@@ -580,7 +582,7 @@ FeedItem.prototype.render_references = function(div, det) {
HomeStatusBar = function() {
var me = this;
var parent = page_body.pages['Event Updates'];
this.wrapper = $a($td(parent.main_tab, 0, 1), 'div', 'home-status', {}, 'Loading...');
this.wrapper = $a(parent.sidebar_section, 'div', 'home-status', {}, 'Loading...');
$br(this.wrapper, '3px');
this.render = function(r) {

View File

@@ -13,7 +13,6 @@ span, div, td, input, textarea, button, select {
}
body {
background-color: #e2e2e2;
}
.erpnext-footer {

View File

@@ -148,7 +148,7 @@ var sep=((args&&args.indexOf('?'))==-1)?'?':'&';var u=args?(url+sep+args):url;re
*/
wn.xmlhttp={request:function(){if(window.XMLHttpRequest)
return new XMLHttpRequest();else if(window.ActiveXObject)
return new ActiveXObject("MsXml2.XmlHttp");},complete:function(req,callback,url){if(req.status==200||req.status==304){callback(req.responseText);}else{alert(url+' request error: '+req.statusText+' ('+req.status+')');}},get:function(url,callback,args,async){if(async===null)async=true;var req=wn.xmlhttp.request();req.onreadystatechange=function(){if(req.readyState==4){wn.xmlhttp.complete(req,callback,url)}}
return new ActiveXObject("MsXml2.XmlHttp");},complete:function(req,callback,url){if(req.status==200||req.status==304){callback(req.responseText);}else{alert(url+' request error: '+req.statusText+' ('+req.status+')');}},get:function(url,callback,args,async){if(async===null)async=true;var req=wn.xmlhttp.request();req.onreadystatechange=function(){if(req.readyState==4){wn.xmlhttp.complete(req,callback,url)}}
var sep=((args&&args.indexOf('?'))==-1)?'?':'&';var u=args?(url+sep+args):url;req.open('GET',u,async);req.send(null);if(!async){wn.xmlhttp.complete(req,callback,url)}}}
/*
* lib/js/wn/versions.js
@@ -1161,8 +1161,8 @@ $c('webnotes.widgets.page.getpage',{'name':page_name,stylesheets:JSON.stringify(
if(pdoc.stylesheet){set_style(locals.Stylesheet[pdoc.stylesheet].stylesheet);stylesheets.push(pdoc.stylesheet);}
var p=new Page(page_name,pdoc._Page__content?pdoc._Page__content:pdoc.content);var script=pdoc.__script?pdoc.__script:pdoc.script;p.doc=pdoc;if(script){eval(script);}
page_body.change_to(page_name);return p;}
function refresh_page(page_name){var fn=function(r,rt){render_page(page_name)}
$c('webnotes.widgets.page.getpage',{'name':page_name,stylesheets:JSON.stringify(stylesheets)},fn);}
function refresh_page(page_name){var fn=function(r,rt){render_page(page_name)}
$c('webnotes.widgets.page.getpage',{'name':page_name,stylesheets:JSON.stringify(stylesheets)},fn);}
/*
* lib/js/legacy/wn/page_layout.js
*/
@@ -2163,8 +2163,7 @@ CommentItem.prototype.cmt_delete=function(cell,ri,ci,d){var me=this;if(d[ri][2]=
CommentItem.prototype.show_cmt=function(cell,ri,ci,d){if(d[ri][4]){hr=d[ri][12];min=d[ri][13];sec=d[ri][14];if(parseInt(hr)>12){time=(parseInt(hr)-12)+':'+min+' PM'}
else{time=hr+':'+min+' AM'}}
this.cmt_dtl.innerHTML='On '+d[ri][10].substring(0,3)+' '+d[ri][9]+', '+d[ri][11]+' at '+time;this.cmt.innerHTML=replace_newlines(d[ri][1]);}
CommentItem.prototype.cmt_delete=function(cell,ri,ci,d){var me=this;if(d[ri][2]==user||d[ri][3]==user){del=$a(cell,'div','wn-icon ic-trash',{cursor:'pointer'});del.cmt_id=d[ri][0];del.onclick=function(){wn.widgets.form.comments.remove(cur_frm.doctype,cur_frm.docname,this.cmt_id,function(){me.comment.lst.run();})}}}
/*
CommentItem.prototype.cmt_delete=function(cell,ri,ci,d){var me=this;if(d[ri][2]==user||d[ri][3]==user){del=$a(cell,'div','wn-icon ic-trash',{cursor:'pointer'});del.cmt_id=d[ri][0];del.onclick=function(){wn.widgets.form.comments.remove(cur_frm.doctype,cur_frm.docname,this.cmt_id,function(){me.comment.lst.run();})}}}
/*
* lib/js/legacy/wn/widgets/form/sidebar.js
*/

View File

@@ -74,7 +74,7 @@ var sep=((args&&args.indexOf('?'))==-1)?'?':'&';var u=args?(url+sep+args):url;re
/*
* lib/js/wn/versions.js
*/
wn.versions={check:function(){if(localStorage){if(window._version_number==-1||parseInt(localStorage._version_number)!=parseInt(window._version_number)){var localversion=localStorage._version_number;localStorage.clear();console.log("Cache cleared - version: "+localversion
wn.versions={check:function(){if(window.localStorage){if(window._version_number==-1||parseInt(localStorage._version_number)!=parseInt(window._version_number)){var localversion=localStorage._version_number;localStorage.clear();console.log("Cache cleared - version: "+localversion
+' to '+_version_number)}
localStorage.setItem('_version_number',window._version_number);}}}
/*
@@ -884,8 +884,8 @@ $c('webnotes.widgets.page.getpage',{'name':page_name,stylesheets:JSON.stringify(
/*
* lib/js/legacy/wn/page_layout.js
*/
wn.PageLayout=function(args){$.extend(this,args)
this.wrapper=$a(this.parent,'div');this.wtab=make_table(this.wrapper,1,2,'100%',[this.main_width,this.sidebar_width]);this.main=$a($td(this.wtab,0,0),'div','layout_wrapper');this.sidebar_area=$a($td(this.wtab,0,1),'div');this.head=$a(this.main,'div');this.toolbar_area=$a(this.main,'div');this.body=$a(this.main,'div');this.footer=$a(this.main,'div');if(this.heading){this.page_head=new PageHeader(this.head,this.heading);}}
wn.sidebar_background='#f2f2f2';wn.PageLayout=function(args){$.extend(this,args)
this.wrapper=$a(this.parent,'div','layout-wrapper',{backgroundColor:wn.sidebar_background,padding:'0px'});this.main=$a(this.wrapper,'div','layout-main-section');this.sidebar_area=$a(this.wrapper,'div','layout-side-section');$a(this.wrapper,'div','',{clear:'both'});this.head=$a(this.main,'div');this.toolbar_area=$a(this.main,'div');this.body=$a(this.main,'div');this.footer=$a(this.main,'div');if(this.heading){this.page_head=new PageHeader(this.head,this.heading);}}
/*
* lib/js/legacy/wn/widgets/footer.js
*/

View File

@@ -1 +1 @@
478
513