Rushabh Mehta | 9d1faea | 2012-10-02 14:56:41 +0530 | [diff] [blame] | 1 | // ERPNext - web based ERP (http://erpnext.com) |
| 2 | // Copyright (C) 2012 Web Notes Technologies Pvt Ltd |
| 3 | // |
| 4 | // This program is free software: you can redistribute it and/or modify |
| 5 | // it under the terms of the GNU General Public License as published by |
| 6 | // the Free Software Foundation, either version 3 of the License, or |
| 7 | // (at your option) any later version. |
| 8 | // |
| 9 | // This program is distributed in the hope that it will be useful, |
| 10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | // GNU General Public License for more details. |
| 13 | // |
| 14 | // You should have received a copy of the GNU General Public License |
| 15 | // along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 16 | |
| 17 | // theme setter |
| 18 | |
Rushabh Mehta | b0d32b7 | 2012-09-28 16:11:57 +0530 | [diff] [blame] | 19 | erpnext.themes = { |
Rushabh Mehta | 9d1faea | 2012-10-02 14:56:41 +0530 | [diff] [blame] | 20 | "Default": { |
Rushabh Mehta | b0d32b7 | 2012-09-28 16:11:57 +0530 | [diff] [blame] | 21 | sidebar: "#f2f2f2", |
| 22 | titlebar: "#dfdfdf", |
| 23 | toolbar: "#e9e9e9" |
| 24 | }, |
Rushabh Mehta | 9d1faea | 2012-10-02 14:56:41 +0530 | [diff] [blame] | 25 | Desert: { |
Rushabh Mehta | b0d32b7 | 2012-09-28 16:11:57 +0530 | [diff] [blame] | 26 | sidebar: "#FFFDF7", |
| 27 | titlebar: "#DAD4C2", |
| 28 | toolbar: "#FAF6E9" |
| 29 | }, |
Rushabh Mehta | 9d1faea | 2012-10-02 14:56:41 +0530 | [diff] [blame] | 30 | Tropic: { |
Rushabh Mehta | b0d32b7 | 2012-09-28 16:11:57 +0530 | [diff] [blame] | 31 | sidebar: "#FAFFF7", |
| 32 | toolbar: "#EEFAE9", |
| 33 | titlebar: "#D7ECD1" |
| 34 | }, |
Rushabh Mehta | 9d1faea | 2012-10-02 14:56:41 +0530 | [diff] [blame] | 35 | Sky: { |
Rushabh Mehta | b0d32b7 | 2012-09-28 16:11:57 +0530 | [diff] [blame] | 36 | sidebar: "#F7FFFE", |
| 37 | toolbar: "#E9F9FA", |
| 38 | titlebar: "#D7F5F7" |
| 39 | }, |
Rushabh Mehta | 9d1faea | 2012-10-02 14:56:41 +0530 | [diff] [blame] | 40 | Snow: { |
Rushabh Mehta | b0d32b7 | 2012-09-28 16:11:57 +0530 | [diff] [blame] | 41 | sidebar: "#fff", |
| 42 | titlebar: "#fff", |
| 43 | toolbar: "#fff" |
| 44 | }, |
Rushabh Mehta | 9d1faea | 2012-10-02 14:56:41 +0530 | [diff] [blame] | 45 | Sunny: { |
Rushabh Mehta | b0d32b7 | 2012-09-28 16:11:57 +0530 | [diff] [blame] | 46 | sidebar: "#FFFFEF", |
Rushabh Mehta | 9d1faea | 2012-10-02 14:56:41 +0530 | [diff] [blame] | 47 | titlebar: "#FFFDCA", |
| 48 | toolbar: "lightYellow" |
| 49 | }, |
| 50 | Floral: { |
| 51 | sidebar: "#FFF7F7", |
| 52 | titlebar: "#F7CBCB", |
| 53 | toolbar: "#FAE9EA" |
| 54 | }, |
| 55 | Ocean: { |
| 56 | sidebar: "#F2FFFE", |
| 57 | titlebar: "#8ACFC7", |
| 58 | toolbar: "#C3F3EE" |
Rushabh Mehta | b0d32b7 | 2012-09-28 16:11:57 +0530 | [diff] [blame] | 59 | } |
| 60 | } |
| 61 | |
| 62 | erpnext.set_theme = function(theme) { |
| 63 | wn.dom.set_style(repl(".layout-wrapper-background { \ |
| 64 | background-color: %(sidebar)s !important; }\ |
| 65 | .appframe-toolbar { \ |
| 66 | background-color: %(toolbar)s !important; }\ |
| 67 | .appframe-titlebar { \ |
| 68 | background-color: %(titlebar)s !important; }", erpnext.themes[theme])); |
| 69 | } |