brotherton-erpnext/public/js/themes.js

69 lines
1.7 KiB
JavaScript
Raw Normal View History

// 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
2012-09-28 10:41:57 +00:00
erpnext.themes = {
"Default": {
2012-09-28 10:41:57 +00:00
sidebar: "#f2f2f2",
titlebar: "#dfdfdf",
toolbar: "#e9e9e9"
},
Desert: {
2012-09-28 10:41:57 +00:00
sidebar: "#FFFDF7",
titlebar: "#DAD4C2",
toolbar: "#FAF6E9"
},
Tropic: {
2012-09-28 10:41:57 +00:00
sidebar: "#FAFFF7",
toolbar: "#EEFAE9",
titlebar: "#D7ECD1"
},
Sky: {
2012-09-28 10:41:57 +00:00
sidebar: "#F7FFFE",
toolbar: "#E9F9FA",
titlebar: "#D7F5F7"
},
Snow: {
2012-09-28 10:41:57 +00:00
sidebar: "#fff",
titlebar: "#fff",
toolbar: "#fff"
},
Sunny: {
2012-09-28 10:41:57 +00:00
sidebar: "#FFFFEF",
titlebar: "#FFFDCA",
toolbar: "lightYellow"
},
Floral: {
sidebar: "#FFF7F7",
titlebar: "#F7CBCB",
toolbar: "#FAE9EA"
},
Ocean: {
sidebar: "#F2FFFE",
titlebar: "#8ACFC7",
toolbar: "#C3F3EE"
2012-09-28 10:41:57 +00:00
}
}
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]));
}