Merge branch 'latest' of github.com:webnotes/wnframework into latest
This commit is contained in:
commit
264c76e7ec
11 changed files with 86 additions and 45 deletions
|
|
@ -58,7 +58,7 @@ div.comment { color: #444; }
|
|||
div#body_div {
|
||||
position: relative;
|
||||
display: none;
|
||||
margin-top: 48px;
|
||||
margin-top: 56px;
|
||||
}
|
||||
|
||||
div.no_script {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ div.comment { color: #444; }
|
|||
div#body_div {
|
||||
position: relative;
|
||||
display: none;
|
||||
margin-top: 48px;
|
||||
margin-top: 56px;
|
||||
}
|
||||
|
||||
div.no_script {
|
||||
|
|
@ -1586,18 +1586,23 @@ div.psidebar-head {
|
|||
}
|
||||
|
||||
div.psidebar-section {
|
||||
background-color: #f7f7f5;
|
||||
border: 2px solid #b2b2b7;
|
||||
background-color: #fff;
|
||||
border: 1px solid #b2b2b7;
|
||||
margin-bottom: 11px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.psidebar-section-head {
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
color: #222;
|
||||
background-color: #d8d8d4;
|
||||
margin-bottom: 7px;
|
||||
padding: 3px 11px;
|
||||
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 */
|
||||
}
|
||||
|
||||
div.psidebar-section-body {
|
||||
|
|
|
|||
|
|
@ -10,18 +10,23 @@ div.psidebar-head {
|
|||
}
|
||||
|
||||
div.psidebar-section {
|
||||
background-color: #f7f7f5;
|
||||
border: 2px solid #b2b2b7;
|
||||
background-color: #fff;
|
||||
border: 1px solid #b2b2b7;
|
||||
margin-bottom: 11px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div.psidebar-section-head {
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
color: #222;
|
||||
background-color: #d8d8d4;
|
||||
margin-bottom: 7px;
|
||||
padding: 3px 11px;
|
||||
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 */
|
||||
}
|
||||
|
||||
div.psidebar-section-body {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ wn.widgets.PageSidebarSection = function(sidebar, opts) {
|
|||
this.wrapper = $a(sidebar.wrapper, 'div', 'psidebar-section');
|
||||
this.head = $a(this.wrapper, 'div', 'psidebar-section-head', '', opts.title);
|
||||
this.body = $a(this.wrapper, 'div', 'psidebar-section-body');
|
||||
$br(this.wrapper, '3px');
|
||||
$br(this.wrapper, '5px');
|
||||
this.opts = opts;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -853,7 +853,7 @@ this.make_head();for(var i=0;i<this.opts.sections.length;i++){var section=this.o
|
|||
if(this.opts.onrefresh){this.opts.onrefresh(this)}}
|
||||
this.make_head=function(){this.head=$a(this.wrapper,'div','psidebar-head','',this.opts.title);}
|
||||
this.refresh();}
|
||||
wn.widgets.PageSidebarSection=function(sidebar,opts){this.items=[];this.sidebar=sidebar;this.wrapper=$a(sidebar.wrapper,'div','psidebar-section');this.head=$a(this.wrapper,'div','psidebar-section-head','',opts.title);this.body=$a(this.wrapper,'div','psidebar-section-body');$br(this.wrapper,'3px');this.opts=opts;this.make_items=function(){for(var i=0;i<this.opts.items.length;i++){var item=this.opts.items[i];if((item.display&&item.display())||!item.display){var div=$a(this.body,'div','psidebar-section-item');this.make_one_item(item,div);}}}
|
||||
wn.widgets.PageSidebarSection=function(sidebar,opts){this.items=[];this.sidebar=sidebar;this.wrapper=$a(sidebar.wrapper,'div','psidebar-section');this.head=$a(this.wrapper,'div','psidebar-section-head','',opts.title);this.body=$a(this.wrapper,'div','psidebar-section-body');$br(this.wrapper,'5px');this.opts=opts;this.make_items=function(){for(var i=0;i<this.opts.items.length;i++){var item=this.opts.items[i];if((item.display&&item.display())||!item.display){var div=$a(this.body,'div','psidebar-section-item');this.make_one_item(item,div);}}}
|
||||
this.make_one_item=function(item,div){if(item.type.toLowerCase()=='link')
|
||||
this.items[item.label]=new wn.widgets.PageSidebarLink(this,item,div);else if(item.type.toLowerCase()=='button')
|
||||
this.items[item.label]=new wn.widgets.PageSidebarButton(this,this.opts.items[i],div);else if(item.type.toLowerCase()=='html')
|
||||
|
|
|
|||
|
|
@ -5,23 +5,23 @@
|
|||
{
|
||||
'creation': '2009-05-12 11:19:11',
|
||||
'docstatus': 0,
|
||||
'modified': '2010-12-16 23:46:03',
|
||||
'modified_by': 'yogesh@webnotestech.com',
|
||||
'modified': '2012-01-24 16:05:50',
|
||||
'modified_by': 'Administrator',
|
||||
'owner': 'Administrator'
|
||||
},
|
||||
|
||||
# These values are common for all DocType
|
||||
{
|
||||
'_last_update': '1307624201',
|
||||
'_last_update': '1323345145',
|
||||
'allow_copy': 0,
|
||||
'allow_email': 0,
|
||||
'allow_print': 0,
|
||||
'autoname': 'field:page_name',
|
||||
'colour': 'White:FFF',
|
||||
'default_print_format': 'Standard',
|
||||
'doctype': 'DocType',
|
||||
'hide_heading': 0,
|
||||
'hide_toolbar': 0,
|
||||
'idx': 0,
|
||||
'issingle': 0,
|
||||
'istable': 0,
|
||||
'module': 'Core',
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
'section_style': 'Tabbed',
|
||||
'server_code_error': ' ',
|
||||
'show_in_menu': 0,
|
||||
'version': 8
|
||||
'version': 9
|
||||
},
|
||||
|
||||
# These values are common for all DocField
|
||||
|
|
@ -49,7 +49,6 @@
|
|||
'create': 1,
|
||||
'doctype': 'DocPerm',
|
||||
'execute': 0,
|
||||
'idx': 1,
|
||||
'name': '__common__',
|
||||
'parent': 'Page',
|
||||
'parentfield': 'permissions',
|
||||
|
|
@ -72,12 +71,19 @@
|
|||
'doctype': 'DocPerm'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'label': 'Page HTML',
|
||||
'oldfieldtype': 'Section Break'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'page_name',
|
||||
'fieldtype': 'Data',
|
||||
'idx': 2,
|
||||
'label': 'Page Name',
|
||||
'oldfieldname': 'page_name',
|
||||
'oldfieldtype': 'Data',
|
||||
|
|
@ -89,7 +95,6 @@
|
|||
'doctype': 'DocField',
|
||||
'fieldname': 'module',
|
||||
'fieldtype': 'Select',
|
||||
'idx': 3,
|
||||
'label': 'Module',
|
||||
'oldfieldname': 'module',
|
||||
'oldfieldtype': 'Select',
|
||||
|
|
@ -102,7 +107,6 @@
|
|||
'doctype': 'DocField',
|
||||
'fieldname': 'standard',
|
||||
'fieldtype': 'Select',
|
||||
'idx': 4,
|
||||
'label': 'Standard',
|
||||
'oldfieldname': 'standard',
|
||||
'oldfieldtype': 'Select',
|
||||
|
|
@ -115,23 +119,43 @@
|
|||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'HTML',
|
||||
'idx': 5,
|
||||
'label': 'Help HTML',
|
||||
'oldfieldtype': 'HTML',
|
||||
'options': '<div class="comment" style="margin: 8px 0px">To add images, use <b>$image(<i>filename</i>)</b><br>Where file name is the ID or Name of the File record</div>'
|
||||
'options': '<div class="help-box">To add images, use <b>$image(<i>filename</i>)</b><br>Where file name is the ID or Name of the File record</div>'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'content',
|
||||
'fieldtype': 'Text Editor',
|
||||
'fieldtype': 'Code',
|
||||
'hidden': 0,
|
||||
'idx': 6,
|
||||
'label': 'Content',
|
||||
'oldfieldname': 'content',
|
||||
'oldfieldtype': 'Text Editor',
|
||||
'reqd': 0,
|
||||
'search_index': 0
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldtype': 'Section Break',
|
||||
'label': 'Permissions',
|
||||
'oldfieldtype': 'Section Break'
|
||||
},
|
||||
|
||||
# DocField
|
||||
{
|
||||
'doctype': 'DocField',
|
||||
'fieldname': 'roles',
|
||||
'fieldtype': 'Table',
|
||||
'hidden': 0,
|
||||
'label': 'Roles',
|
||||
'oldfieldname': 'roles',
|
||||
'oldfieldtype': 'Table',
|
||||
'options': 'Page Role',
|
||||
'reqd': 0,
|
||||
'search_index': 0
|
||||
}
|
||||
]
|
||||
|
|
@ -1,3 +1,8 @@
|
|||
#login_wrapper {
|
||||
width: 300px !important;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.login-banner {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
<div class="layout_wrapper" id='login_wrapper'>
|
||||
<div class="login-banner"></div>
|
||||
<h1 style="margin-left: 8px; margin-bottom: 24px;">Login</h1>
|
||||
<table border="0" cellspacing="8">
|
||||
<tbody>
|
||||
|
|
|
|||
|
|
@ -1,21 +1,19 @@
|
|||
pscript['onload_Login Page'] = function(){
|
||||
|
||||
var lw = $i('login_wrapper');
|
||||
$bs(lw, '1px 1px 3px #888');
|
||||
$bg(document.getElementsByTagName('body')[0], '#DDD');
|
||||
|
||||
pscript.login_btn = $btn('login_btn', 'Login', pscript.doLogin)
|
||||
pscript.login_btn = $btn('login_btn', 'Login', pscript.doLogin);
|
||||
$(pscript.login_btn).addClass('primary');
|
||||
|
||||
keypress_observers.push(new function() {
|
||||
this.notify_keypress = function(kc) { if(kc==13 && $i("password").value) pscript.doLogin(); }
|
||||
}
|
||||
);
|
||||
$('#login_wrapper').keyup(function(ev){
|
||||
if(ev.which==13 && $('#password').value)
|
||||
pscript.doLogin();
|
||||
})
|
||||
}
|
||||
|
||||
pscript['onshow_Login Page'] = function() {
|
||||
// set banner
|
||||
var bannerhtml = wn.control_panel.client_name;
|
||||
if(bannerhtml) $('.login-banner').html(bannerhtml);
|
||||
}
|
||||
|
||||
// Login Callback
|
||||
|
|
|
|||
|
|
@ -79,7 +79,9 @@ class DbTable:
|
|||
parentfield varchar(120),
|
||||
parenttype varchar(120),
|
||||
idx int(8),
|
||||
%sindex parent(parent)) ENGINE=InnoDB""" % (self.name, add_text))
|
||||
%sindex parent(parent))
|
||||
ENGINE=InnoDB
|
||||
CHARACTER SET=utf8""" % (self.name, add_text))
|
||||
|
||||
def get_columns_from_docfields(self):
|
||||
fl = webnotes.conn.sql("SELECT * FROM tabDocField WHERE parent = '%s'" % self.doctype, as_dict = 1)
|
||||
|
|
|
|||
|
|
@ -71,7 +71,10 @@ def update_patch_log(patchmodule):
|
|||
|
||||
def executed(patchmodule):
|
||||
"""return True if is executed"""
|
||||
return webnotes.conn.sql("""select patch from __PatchLog where patch=%s""", patchmodule)
|
||||
done = webnotes.conn.sql("""select patch from __PatchLog where patch=%s""", patchmodule)
|
||||
if done:
|
||||
print "Patch %s executed in %s" % (patchmodule, webnotes.conn.cur_db_name)
|
||||
return done
|
||||
|
||||
def block_user(block):
|
||||
"""stop/start execution till patch is run"""
|
||||
|
|
@ -83,7 +86,7 @@ def block_user(block):
|
|||
|
||||
def setup():
|
||||
webnotes.conn.sql("""CREATE TABLE IF NOT EXISTS `__PatchLog` (
|
||||
patch TEXT, applied_on DATETIME)""")
|
||||
patch TEXT, applied_on DATETIME) engine=InnoDB""")
|
||||
|
||||
log_list = []
|
||||
has_errors = False
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue