(properties)
| 45 | |
| 46 | // Define new themes |
| 47 | var addTheme = function(properties) { |
| 48 | if (!properties.id || themes[properties.id]) return false; |
| 49 | logger.log("add theme", properties.id, properties); |
| 50 | themes[properties.id] = _.defaults(properties, { |
| 51 | 'styles': {}, |
| 52 | 'description': "", |
| 53 | 'editor': {} |
| 54 | }); |
| 55 | updateThemeSettings(); |
| 56 | |
| 57 | if (!currentTheme) { |
| 58 | changeTheme(properties.id); |
| 59 | } |
| 60 | }; |
| 61 | |
| 62 | // Change theme |
| 63 | var changeTheme = function(themeId) { |
no test coverage detected