profile: form is now my settings page, removed (Page, profile-settings)

This commit is contained in:
Rushabh Mehta
2012-11-28 15:19:51 +05:30
parent d5bf5153fa
commit bd919caa9b
14 changed files with 22 additions and 426 deletions

View File

@@ -12,7 +12,6 @@
],
"public/js/all-app.js": [
"app/public/js/modules.js",
"app/public/js/themes.js",
"app/public/js/toolbar.js",
"app/public/js/feature_setup.js",
"app/public/js/utils.js"

View File

@@ -27,17 +27,9 @@ erpnext.startup.start = function() {
console.log('Starting up...');
$('#startup_div').html('Starting up...').toggle(true);
erpnext.startup.set_globals();
if(user != 'Guest'){
if(wn.boot.user_background) {
erpnext.set_user_background(wn.boot.user_background);
}
if(wn.boot.profile.defaults.theme) {
erpnext.set_theme(wn.boot.profile.defaults.theme[0]);
}
if(user != 'Guest'){
erpnext.setup_mousetrap();
// always allow apps
@@ -143,11 +135,6 @@ erpnext.startup.set_periodic_updates = function() {
wn.updates.id = setInterval(erpnext.update_messages, 60000);
}
erpnext.set_user_background = function(src) {
set_style(repl('#body_div { background: url("files/%(src)s") repeat fixed;}',
{src:src}))
}
// subject, sender, description
erpnext.send_message = function(opts) {
if(opts.btn) {

View File

@@ -1,69 +0,0 @@
// ERPNext - web based ERP (http://erpnext.com)
// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// theme setter
erpnext.themes = {
"Default": {
sidebar: "#f2f2f2",
titlebar: "#dfdfdf",
toolbar: "#e9e9e9"
},
Desert: {
sidebar: "#FFFDF7",
titlebar: "#DAD4C2",
toolbar: "#FAF6E9"
},
Tropic: {
sidebar: "#FAFFF7",
toolbar: "#EEFAE9",
titlebar: "#D7ECD1"
},
Sky: {
sidebar: "#F7FFFE",
toolbar: "#E9F9FA",
titlebar: "#D7F5F7"
},
Snow: {
sidebar: "#fff",
titlebar: "#fff",
toolbar: "#fff"
},
Sunny: {
sidebar: "#FFFFEF",
titlebar: "#FFFDCA",
toolbar: "lightYellow"
},
Floral: {
sidebar: "#FFF7F7",
titlebar: "#F7CBCB",
toolbar: "#FAE9EA"
},
Ocean: {
sidebar: "#F2FFFE",
titlebar: "#8ACFC7",
toolbar: "#C3F3EE"
}
}
erpnext.set_theme = function(theme) {
wn.dom.set_style(repl(".layout-wrapper-background { \
background-color: %(sidebar)s !important; }\
.appframe-toolbar { \
background-color: %(toolbar)s !important; }\
.appframe-titlebar { \
background-color: %(titlebar)s !important; }", erpnext.themes[theme]));
}

View File

@@ -22,7 +22,7 @@ erpnext.toolbar.setup = function() {
erpnext.toolbar.add_modules();
// profile
$('#toolbar-user').append('<li><a href="#!profile-settings">My Settings...</a></li>');
$('#toolbar-user').append('<li><a href="#Form/Profile/'+user+'">My Settings...</a></li>');
$('.navbar .pull-right').append('\
<li><a href="#!messages" title="Unread Messages"><span class="navbar-new-comments"></span></a></li>');