Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
6db30a5b5a
@ -31,8 +31,8 @@ MyProfile = function(wrapper) {
|
|||||||
|
|
||||||
this.tab = make_table($a(this.wrapper, 'div', '', {marginTop:'19px'}),
|
this.tab = make_table($a(this.wrapper, 'div', '', {marginTop:'19px'}),
|
||||||
1, 2, '90%', ['50%', '50%'], {padding:'11px'})
|
1, 2, '90%', ['50%', '50%'], {padding:'11px'})
|
||||||
this.img = $a($td(this.tab, 0, 0), 'img');
|
this.img = $a($td(this.tab, 0, 0), 'img', '', {width: '120px', maxHeight:'200px'});
|
||||||
set_user_img(this.img, user);
|
this.img.src = wn.user_info(user).image;
|
||||||
|
|
||||||
$btn($a($td(this.tab, 0, 0), 'div', '', {marginTop:'11px'}), 'Change Image', this.change_image);
|
$btn($a($td(this.tab, 0, 0), 'div', '', {marginTop:'11px'}), 'Change Image', this.change_image);
|
||||||
|
|
||||||
@ -135,14 +135,18 @@ MyProfile = function(wrapper) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pscript.background_change = function(fid) {
|
pscript.background_change = function(fid) {
|
||||||
//erpnext.set_background_image(fid);
|
msgprint('File Uploaded');
|
||||||
pscript.open_dialog.hide();
|
if(fid) {
|
||||||
|
erpnext.set_user_background(fid);
|
||||||
|
pscript.open_dialog.hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pscript.user_image_upload = function(fid) {
|
pscript.user_image_upload = function(fid) {
|
||||||
msgprint('File Uploaded');
|
msgprint('File Uploaded');
|
||||||
if(fid) {
|
if(fid) {
|
||||||
pscript.open_dialog.hide();
|
pscript.open_dialog.hide();
|
||||||
set_user_img(pscript.myprofile.img, user, null, fid);
|
wn.boot.user_info[user].image = 'files/' + fid;
|
||||||
|
pscript.myprofile.img.src = 'files/' + fid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ erpnext.startup.set_periodic_updates = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
erpnext.set_user_background = function(src) {
|
erpnext.set_user_background = function(src) {
|
||||||
set_style(repl('body { background: url("files/%(src)s") repeat !important;}', {src:src}))
|
set_style(repl('body { background: url("files/%(src)s") repeat;}', {src:src}))
|
||||||
}
|
}
|
||||||
|
|
||||||
// start
|
// start
|
||||||
|
@ -197,7 +197,7 @@ $.extend(wn.pages.users, {
|
|||||||
btn.pwd_dialog.hide();
|
btn.pwd_dialog.hide();
|
||||||
args.sys_admin_pwd = btn.pwd_dialog.get_values().sys_admin_pwd;
|
args.sys_admin_pwd = btn.pwd_dialog.get_values().sys_admin_pwd;
|
||||||
btn.set_working();
|
btn.set_working();
|
||||||
me.update_security(args);
|
me.update_security(btn, args);
|
||||||
btn.done_working();
|
btn.done_working();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ def update_security(args=''):
|
|||||||
webnotes.conn.set_value('Profile', args['user'], 'login_before', args.get('login_before'))
|
webnotes.conn.set_value('Profile', args['user'], 'login_before', args.get('login_before'))
|
||||||
webnotes.conn.set_value('Profile', args['user'], 'enabled', int(args.get('enabled',0)) or 0)
|
webnotes.conn.set_value('Profile', args['user'], 'enabled', int(args.get('enabled',0)) or 0)
|
||||||
|
|
||||||
if 'new_password' in args:
|
if args.get('new_password') and args.get('sys_admin_pwd'):
|
||||||
if cint(webnotes.conn.get_value('Control Panel',None,'sync_with_gateway')):
|
if cint(webnotes.conn.get_value('Control Panel',None,'sync_with_gateway')):
|
||||||
import server_tools.gateway_utils
|
import server_tools.gateway_utils
|
||||||
res = server_tools.gateway_utils.change_password('', args['new_password'],
|
res = server_tools.gateway_utils.change_password('', args['new_password'],
|
||||||
|
@ -2233,7 +2233,7 @@ if(!reset){$c_page('home','event_updates','get_unread_messages',null,function(r,
|
|||||||
if(circle){if(r.message.length){circle.find('span:first').text(r.message.length);circle.toggle(true);}else{circle.toggle(false);}}}else{clearInterval(wn.updates.id);}});}else{page_body.wntoolbar.set_new_comments(0);$('#msg_count').toggle(false);}}
|
if(circle){if(r.message.length){circle.find('span:first').text(r.message.length);circle.toggle(true);}else{circle.toggle(false);}}}else{clearInterval(wn.updates.id);}});}else{page_body.wntoolbar.set_new_comments(0);$('#msg_count').toggle(false);}}
|
||||||
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
|
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
|
||||||
wn.updates.id=setInterval(update_messages,60000);}
|
wn.updates.id=setInterval(update_messages,60000);}
|
||||||
erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat !important;}',{src:src}))}
|
erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat;}',{src:src}))}
|
||||||
$(document).bind('startup',function(){erpnext.startup.start();});
|
$(document).bind('startup',function(){erpnext.startup.start();});
|
||||||
/*
|
/*
|
||||||
* erpnext/startup/js/modules.js
|
* erpnext/startup/js/modules.js
|
||||||
|
@ -1081,7 +1081,7 @@ if(!reset){$c_page('home','event_updates','get_unread_messages',null,function(r,
|
|||||||
if(circle){if(r.message.length){circle.find('span:first').text(r.message.length);circle.toggle(true);}else{circle.toggle(false);}}}else{clearInterval(wn.updates.id);}});}else{page_body.wntoolbar.set_new_comments(0);$('#msg_count').toggle(false);}}
|
if(circle){if(r.message.length){circle.find('span:first').text(r.message.length);circle.toggle(true);}else{circle.toggle(false);}}}else{clearInterval(wn.updates.id);}});}else{page_body.wntoolbar.set_new_comments(0);$('#msg_count').toggle(false);}}
|
||||||
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
|
erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
|
||||||
wn.updates.id=setInterval(update_messages,60000);}
|
wn.updates.id=setInterval(update_messages,60000);}
|
||||||
erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat !important;}',{src:src}))}
|
erpnext.set_user_background=function(src){set_style(repl('body { background: url("files/%(src)s") repeat;}',{src:src}))}
|
||||||
$(document).bind('startup',function(){erpnext.startup.start();});
|
$(document).bind('startup',function(){erpnext.startup.start();});
|
||||||
/*
|
/*
|
||||||
* erpnext/website/js/topbar.js
|
* erpnext/website/js/topbar.js
|
||||||
|
@ -1 +1 @@
|
|||||||
814
|
816
|
||||||
|
Loading…
x
Reference in New Issue
Block a user