alchemy-chimera 0.5.4 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -4
- package/assets/scripts/chimera/chimera.js +13 -288
- package/assets/stylesheets/chimera/chimera.scss +451 -0
- package/bootstrap.js +6 -302
- package/config/routes.js +53 -5
- package/controller/00-chimera_controller.js +16 -0
- package/controller/chimera_editor_controller.js +159 -614
- package/controller/chimera_static_controller.js +102 -9
- package/lib/chimera_config.js +138 -163
- package/model/model.js +1 -1
- package/package.json +8 -12
- package/view/chimera/dashboard.hwk +8 -0
- package/view/chimera/editor/index.hwk +20 -0
- package/view/chimera/sidebar.hwk +4 -0
- package/view/chimera/widgets.hwk +8 -0
- package/view/layouts/chimera_base.hwk +15 -0
- package/view/layouts/chimera_basics.hwk +15 -0
- package/view/layouts/chimera_body.hwk +24 -0
- package/assets/scripts/chimera/assoc_field.js +0 -311
- package/assets/scripts/chimera/boolean_field.js +0 -53
- package/assets/scripts/chimera/chimera_field.js +0 -622
- package/assets/scripts/chimera/chimera_field_wrapper.js +0 -558
- package/assets/scripts/chimera/date_field.js +0 -170
- package/assets/scripts/chimera/geopoint_field.js +0 -147
- package/assets/scripts/chimera/medium-button.js +0 -6
- package/assets/scripts/chimera/object_field.js +0 -51
- package/assets/scripts/chimera/page-editor.js +0 -3
- package/assets/scripts/chimera/password_field.js +0 -73
- package/assets/scripts/chimera/schema_field.js +0 -300
- package/assets/scripts/chimera/text_field.js +0 -119
- package/assets/scripts/rome/rome.js +0 -4978
- package/assets/scripts/vex/vex.dialog.js +0 -151
- package/assets/scripts/vex/vex.js +0 -193
- package/assets/stylesheets/chimera/chimera.less +0 -1075
- package/assets/stylesheets/chimera_old/chimera.less +0 -351
- package/assets/stylesheets/chimera_old/core.less +0 -315
- package/assets/stylesheets/chimera_old/font.less +0 -38
- package/assets/stylesheets/chimera_old/mixins.less +0 -35
- package/assets/stylesheets/chimera_old/page-editor.less +0 -23
- package/assets/stylesheets/rome/rome.less +0 -130
- package/assets/stylesheets/vex/vex-theme-bottom-right-corner.less +0 -613
- package/assets/stylesheets/vex/vex.default.less +0 -501
- package/assets/stylesheets/vex/vex.flat.less +0 -443
- package/assets/stylesheets/vex/vex.less +0 -320
- package/controller/chimera_page_controller.js +0 -14
- package/controller/chimera_settings_controller.js +0 -129
- package/controller/tasks_chimera_controller.js +0 -106
- package/helper/chimera_helper.js +0 -202
- package/lib/chimera_action_fields.js +0 -292
- package/lib/chimera_field/belongsto_chimera_field.js +0 -160
- package/lib/chimera_field/boolean_chimera_field.js +0 -19
- package/lib/chimera_field/date_chimera_field.js +0 -20
- package/lib/chimera_field/datetime_chimera_field.js +0 -20
- package/lib/chimera_field/enum_chimera_field.js +0 -131
- package/lib/chimera_field/geopoint_chimera_field.js +0 -20
- package/lib/chimera_field/habtm_chimera_field.js +0 -55
- package/lib/chimera_field/hasoneparent_chimera_field.js +0 -18
- package/lib/chimera_field/html_chimera_field.js +0 -20
- package/lib/chimera_field/object_chimera_field.js +0 -18
- package/lib/chimera_field/password_chimera_field.js +0 -18
- package/lib/chimera_field/schema_chimera_field.js +0 -149
- package/lib/chimera_field/text_chimera_field.js +0 -20
- package/lib/chimera_field/time_chimera_field.js +0 -18
- package/lib/chimera_field.js +0 -208
- package/model/setting_model.js +0 -51
- package/public/chimera/codedor.svg +0 -28
- package/view/chimera/dashboard.ejs +0 -5
- package/view/chimera/editor/add.ejs +0 -32
- package/view/chimera/editor/edit.ejs +0 -33
- package/view/chimera/editor/index.ejs +0 -87
- package/view/chimera/editor/remove.ejs +0 -23
- package/view/chimera/editor/view.ejs +0 -54
- package/view/chimera/elements/editor_actions.ejs +0 -4
- package/view/chimera/elements/empty +0 -0
- package/view/chimera/field_wrappers/_entries.ejs +0 -91
- package/view/chimera/field_wrappers/_wrapper.ejs +0 -82
- package/view/chimera/field_wrappers/date_edit.ejs +0 -23
- package/view/chimera/field_wrappers/date_list.ejs +0 -3
- package/view/chimera/field_wrappers/date_view.ejs +0 -16
- package/view/chimera/field_wrappers/default_edit.ejs +0 -22
- package/view/chimera/field_wrappers/default_list.ejs +0 -3
- package/view/chimera/field_wrappers/default_peek.ejs +0 -3
- package/view/chimera/field_wrappers/default_view.ejs +0 -14
- package/view/chimera/field_wrappers/geopoint_edit.ejs +0 -25
- package/view/chimera/field_wrappers/geopoint_list.ejs +0 -5
- package/view/chimera/field_wrappers/geopoint_view.ejs +0 -18
- package/view/chimera/field_wrappers/schema_edit.ejs +0 -19
- package/view/chimera/field_wrappers/text_edit.ejs +0 -22
- package/view/chimera/field_wrappers/text_list.ejs +0 -1
- package/view/chimera/fields/belongsto_edit.ejs +0 -4
- package/view/chimera/fields/belongsto_list.ejs +0 -1
- package/view/chimera/fields/belongsto_peek.ejs +0 -1
- package/view/chimera/fields/boolean_edit.ejs +0 -17
- package/view/chimera/fields/boolean_list.ejs +0 -3
- package/view/chimera/fields/boolean_view.ejs +0 -3
- package/view/chimera/fields/date_edit.ejs +0 -14
- package/view/chimera/fields/date_list.ejs +0 -9
- package/view/chimera/fields/date_peek.ejs +0 -9
- package/view/chimera/fields/date_view.ejs +0 -9
- package/view/chimera/fields/datetime_edit.ejs +0 -24
- package/view/chimera/fields/datetime_list.ejs +0 -9
- package/view/chimera/fields/datetime_view.ejs +0 -10
- package/view/chimera/fields/default_edit.ejs +0 -10
- package/view/chimera/fields/default_list.ejs +0 -15
- package/view/chimera/fields/default_view.ejs +0 -1
- package/view/chimera/fields/enum_edit.ejs +0 -10
- package/view/chimera/fields/geopoint_edit.ejs +0 -10
- package/view/chimera/fields/geopoint_list.ejs +0 -9
- package/view/chimera/fields/geopoint_view.ejs +0 -9
- package/view/chimera/fields/habtm_edit.ejs +0 -5
- package/view/chimera/fields/hasoneparent_edit.ejs +0 -6
- package/view/chimera/fields/hasoneparent_list.ejs +0 -1
- package/view/chimera/fields/object_edit.ejs +0 -8
- package/view/chimera/fields/password_edit.ejs +0 -12
- package/view/chimera/fields/schema_edit.ejs +0 -14
- package/view/chimera/fields/text_edit.ejs +0 -5
- package/view/chimera/fields/text_list.ejs +0 -9
- package/view/chimera/fields/text_view.ejs +0 -3
- package/view/chimera/fields/time_edit.ejs +0 -15
- package/view/chimera/fields/time_list.ejs +0 -9
- package/view/chimera/fields/time_view.ejs +0 -9
- package/view/chimera/page/edit.ejs +0 -18
- package/view/chimera/page_editor.ejs +0 -5
- package/view/chimera/sidebar.ejs +0 -40
- package/view/chimera/tasks/index.ejs +0 -114
- package/view/layouts/chimera.ejs +0 -12
- package/view/layouts/chimera_base.ejs +0 -11
- package/view/layouts/chimera_body.ejs +0 -43
package/bootstrap.js
CHANGED
|
@@ -1,309 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
options;
|
|
3
|
-
|
|
4
|
-
alchemy.requirePlugin(['acl', 'menu']);
|
|
1
|
+
alchemy.requirePlugin('widget');
|
|
5
2
|
|
|
6
3
|
// Define the default options
|
|
7
|
-
options = {
|
|
8
|
-
|
|
9
|
-
// Extra classes
|
|
10
|
-
extra_class: '',
|
|
11
|
-
|
|
12
|
-
// The name of the base layout
|
|
13
|
-
baselayout: 'admin_base',
|
|
14
|
-
|
|
15
|
-
// The name of the body layout
|
|
16
|
-
bodylayout: 'admin_body',
|
|
17
|
-
|
|
18
|
-
// The name of the body block
|
|
19
|
-
bodyblock: 'admin-body',
|
|
20
|
-
|
|
21
|
-
// The name of the main block
|
|
22
|
-
mainblock: 'admin-main',
|
|
23
|
-
|
|
24
|
-
// The name of the content block
|
|
25
|
-
contentblock: 'admin-content',
|
|
26
|
-
|
|
4
|
+
let options = {
|
|
27
5
|
// The name to use in the routing
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// The default theme to use
|
|
31
|
-
theme: 'ajatar',
|
|
6
|
+
base_path: 'chimera',
|
|
32
7
|
|
|
33
|
-
//
|
|
34
|
-
|
|
8
|
+
// Use a custom theme?
|
|
9
|
+
theme : false
|
|
35
10
|
};
|
|
36
11
|
|
|
37
12
|
// Inject the user-overridden options
|
|
38
|
-
alchemy.plugins.chimera = Object.merge(options, alchemy.plugins.chimera);
|
|
39
|
-
global.chimera = alchemy.plugins.chimera;
|
|
40
|
-
|
|
41
|
-
if (options.hide_translate_buttons) {
|
|
42
|
-
options.extra_class += ' hide-translate-buttons';
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (!alchemy.plugins.acl) {
|
|
46
|
-
alchemy.plugins.acl = {placeholders: {}}
|
|
47
|
-
log.todo('Acl settings for Chimera');
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Set the acl placeholder variable
|
|
51
|
-
//alchemy.plugins.acl.placeholders.chimeraRouteName = alchemy.plugins.chimera.routename;
|
|
52
|
-
|
|
53
|
-
// Construct the view settings
|
|
54
|
-
options.view_settings = {
|
|
55
|
-
baselayout : 'layouts/' + options.baselayout,
|
|
56
|
-
bodylayout : 'layouts/' + options.bodylayout,
|
|
57
|
-
bodyblock : options.bodyblock,
|
|
58
|
-
mainblock : options.mainblock,
|
|
59
|
-
contentblock : options.contentblock,
|
|
60
|
-
theme : options.theme,
|
|
61
|
-
title : options.title
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
if (options.theme == 'ajatar') {
|
|
65
|
-
alchemy.usePlugin('ajatar-theme');
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Function to asynchronously get the menu item
|
|
70
|
-
*
|
|
71
|
-
* @author Jelle De Loecker <jelle@develry.be>
|
|
72
|
-
* @since 0.3.0
|
|
73
|
-
* @version 0.3.0
|
|
74
|
-
*
|
|
75
|
-
* @param {Function} callback
|
|
76
|
-
*/
|
|
77
|
-
alchemy.plugins.chimera.getMenu = function getMenu(callback) {
|
|
78
|
-
alchemy.plugins.menu.getDefault('chimera_menu', callback);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Backwards compatibility for synchronously adding items
|
|
83
|
-
*
|
|
84
|
-
* @author Jelle De Loecker <jelle@develry.be>
|
|
85
|
-
* @since 0.3.0
|
|
86
|
-
* @version 0.3.0
|
|
87
|
-
*/
|
|
88
|
-
alchemy.plugins.chimera.menu = {
|
|
89
|
-
set : function set(name, options, weight) {
|
|
90
|
-
alchemy.plugins.chimera.getMenu(function gotMenu(err, menu) {
|
|
91
|
-
|
|
92
|
-
var config = {
|
|
93
|
-
title : name,
|
|
94
|
-
settings : options,
|
|
95
|
-
weight : weight
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
if (options.icon) {
|
|
99
|
-
options.decoration = options.icon;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
menu.addItem('route', config);
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Get the chimera menu and add some entries
|
|
109
|
-
*
|
|
110
|
-
* @author Jelle De Loecker <jelle@develry.be>
|
|
111
|
-
* @since 0.3.0
|
|
112
|
-
* @version 0.3.0
|
|
113
|
-
*/
|
|
114
|
-
alchemy.plugins.chimera.getMenu(function gotMenu(err, menu) {
|
|
115
|
-
|
|
116
|
-
// Set the position name
|
|
117
|
-
menu.position_name = 'chimera_main_sidebar';
|
|
118
|
-
|
|
119
|
-
// Set the title
|
|
120
|
-
menu.title = __('chimera', 'Chimera');
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Add the dashboard to the menu
|
|
124
|
-
*
|
|
125
|
-
* @author Jelle De Loecker <jelle@develry.be>
|
|
126
|
-
* @since 0.2.0
|
|
127
|
-
* @version 0.4.0
|
|
128
|
-
*/
|
|
129
|
-
menu.addItem('route', {
|
|
130
|
-
weight : 9999,
|
|
131
|
-
settings : {
|
|
132
|
-
name : 'dashboard',
|
|
133
|
-
title : __('chimera', 'Dashboard'),
|
|
134
|
-
route : 'chimera@Dashboard',
|
|
135
|
-
icon : {
|
|
136
|
-
svg : 'chimera/home',
|
|
137
|
-
fa : 'tachometer-alt'
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* Add the users model to the menu
|
|
144
|
-
*
|
|
145
|
-
* @author Jelle De Loecker <jelle@develry.be>
|
|
146
|
-
* @since 0.2.0
|
|
147
|
-
* @version 0.4.0
|
|
148
|
-
*/
|
|
149
|
-
menu.addItem('route', {
|
|
150
|
-
weight : 9900,
|
|
151
|
-
settings : {
|
|
152
|
-
name : 'users',
|
|
153
|
-
title : __('chimera', 'Users'),
|
|
154
|
-
route : 'chimera@ModelAction',
|
|
155
|
-
parameters : {
|
|
156
|
-
controller : 'Editor',
|
|
157
|
-
subject : 'user',
|
|
158
|
-
action : 'index'
|
|
159
|
-
},
|
|
160
|
-
icon : {
|
|
161
|
-
svg : 'chimera/office-worker',
|
|
162
|
-
fa : 'user'
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
});
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
chimera.menu.set('i18n', {
|
|
169
|
-
title: 'I18n',
|
|
170
|
-
route: 'chimera@ModelAction',
|
|
171
|
-
name : 'i18n',
|
|
172
|
-
parameters: {
|
|
173
|
-
controller: 'Editor',
|
|
174
|
-
subject: 'i18n',
|
|
175
|
-
action: 'index'
|
|
176
|
-
},
|
|
177
|
-
icon : {
|
|
178
|
-
fa: 'language'
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
var ChimeraController = Function.inherits('Alchemy.Controller', 'Alchemy.Controller.Chimera', function Chimera(conduit, options) {
|
|
183
|
-
|
|
184
|
-
Chimera.super.call(this, conduit, options);
|
|
185
|
-
|
|
186
|
-
// Set the theme
|
|
187
|
-
this.view_render.setTheme(alchemy.plugins.chimera.theme);
|
|
188
|
-
|
|
189
|
-
// Set the chimera options
|
|
190
|
-
this.set('chimera_options', alchemy.plugins.chimera);
|
|
191
|
-
this.expose('chimera_options', alchemy.plugins.chimera);
|
|
192
|
-
|
|
193
|
-
this.actions = {};
|
|
194
|
-
});
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Add a chimera action
|
|
198
|
-
*
|
|
199
|
-
* @author Jelle De Loecker <jelle@develry.be>
|
|
200
|
-
* @since 0.2.0
|
|
201
|
-
* @version 0.2.0
|
|
202
|
-
*/
|
|
203
|
-
ChimeraController.setMethod(function addAction(type, fncname, options) {
|
|
204
|
-
|
|
205
|
-
var obj;
|
|
206
|
-
|
|
207
|
-
if (options == null) {
|
|
208
|
-
options = {};
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
obj = this.getActions(type);
|
|
212
|
-
|
|
213
|
-
options.type = type;
|
|
214
|
-
|
|
215
|
-
if (options.title == null) {
|
|
216
|
-
options.title = fncname.humanize();
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
if (options.controller == null) {
|
|
220
|
-
options.controller = this.name.underscore();
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
options.name = fncname;
|
|
224
|
-
|
|
225
|
-
obj.set(fncname, options);
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
/**
|
|
229
|
-
* Get all chimera actions
|
|
230
|
-
*
|
|
231
|
-
* @author Jelle De Loecker <jelle@develry.be>
|
|
232
|
-
* @since 0.2.0
|
|
233
|
-
* @version 0.2.0
|
|
234
|
-
*/
|
|
235
|
-
ChimeraController.setMethod(function getActions(type) {
|
|
236
|
-
|
|
237
|
-
if (this.actions == null) {
|
|
238
|
-
this.actions = {};
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
if (type == null) {
|
|
242
|
-
return this.actions;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
if (this.actions[type] == null) {
|
|
246
|
-
this.actions[type] = new Deck();
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
return this.actions[type];
|
|
250
|
-
});
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Ensure Chimera ACL rules are set,
|
|
254
|
-
* don't start the server before it's done
|
|
255
|
-
*/
|
|
256
|
-
alchemy.sputnik.beforeSerial('startServer', function beforeStartServer(done) {
|
|
257
|
-
|
|
258
|
-
var AclRule = Model.get('AclRule'),
|
|
259
|
-
rules;
|
|
260
|
-
|
|
261
|
-
rules = [
|
|
262
|
-
{
|
|
263
|
-
// Deny "everyone" group access to chimera section
|
|
264
|
-
_id : '52efff0000a1c00002000000',
|
|
265
|
-
type : 'route_acl_rule_type',
|
|
266
|
-
target_groups_id : [alchemy.plugins.acl.EveryoneGroupId],
|
|
267
|
-
settings : {
|
|
268
|
-
section : 'chimera',
|
|
269
|
-
allow : false,
|
|
270
|
-
weight : 9999
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
// Allow "everyone" group access to chimera section
|
|
275
|
-
_id : '52efff0000a1c00002000001',
|
|
276
|
-
type : 'route_acl_rule_type',
|
|
277
|
-
target_groups_id : [alchemy.plugins.acl.SuperUserGroupId],
|
|
278
|
-
settings : {
|
|
279
|
-
section : 'chimera',
|
|
280
|
-
allow : true,
|
|
281
|
-
weight : 100
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
];
|
|
285
|
-
|
|
286
|
-
AclRule.ensureIds(rules, function doneEnsuring(err) {
|
|
287
|
-
|
|
288
|
-
if (err) {
|
|
289
|
-
return log.error('Can not start server, error ensuring ACL rules.', {err: err});
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
done();
|
|
293
|
-
});
|
|
294
|
-
});
|
|
295
|
-
|
|
296
|
-
/*
|
|
297
|
-
{
|
|
298
|
-
"_id" : ObjectId("58457c242ceac61b95d09e19"),
|
|
299
|
-
"created" : ISODate("2016-12-05T14:39:39.641Z"),
|
|
300
|
-
"updated" : ISODate("2016-12-05T22:35:32.593Z"),
|
|
301
|
-
"type" : "route_acl_rule_type",
|
|
302
|
-
"settings" : {
|
|
303
|
-
"section" : "chimera"
|
|
304
|
-
},
|
|
305
|
-
"target_groups_id" : [
|
|
306
|
-
ObjectId("52efff000001000001000000")
|
|
307
|
-
]
|
|
308
|
-
}
|
|
309
|
-
*/
|
|
13
|
+
alchemy.plugins.chimera = Object.merge(options, alchemy.plugins.chimera);
|
package/config/routes.js
CHANGED
|
@@ -1,8 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// Create a new chimera section.
|
|
2
|
+
// By default this will be /chimera
|
|
3
|
+
let chimera_section = Router.section('chimera', '/' + alchemy.plugins.chimera.base_path);
|
|
3
4
|
|
|
4
|
-
//
|
|
5
|
-
chimera_section
|
|
5
|
+
// Link to the dashboard
|
|
6
|
+
chimera_section.add({
|
|
7
|
+
title : __('chimera', 'Dashboard'),
|
|
8
|
+
name : 'Dashboard',
|
|
9
|
+
methods : 'get',
|
|
10
|
+
paths : '/',
|
|
11
|
+
handler : 'Chimera.Static#dashboard',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
// Editor index action
|
|
15
|
+
chimera_section.add({
|
|
16
|
+
name : 'Chimera.Editor#index',
|
|
17
|
+
methods : 'get',
|
|
18
|
+
paths : '/editor/{model}/index',
|
|
19
|
+
breadcrumb : 'chimera.editor.{model}.index'
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// Editor add action
|
|
23
|
+
chimera_section.add({
|
|
24
|
+
name : 'Chimera.Editor#add',
|
|
25
|
+
methods : ['get', 'post'],
|
|
26
|
+
paths : '/editor/{model}/add',
|
|
27
|
+
breadcrumb : 'chimera.editor.{model}.add'
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Editor edit action
|
|
31
|
+
chimera_section.add({
|
|
32
|
+
name : 'Chimera.Editor#edit',
|
|
33
|
+
methods : ['get', 'post'],
|
|
34
|
+
paths : '/editor/{model}/edit/{pk}',
|
|
35
|
+
breadcrumb : 'chimera.editor.{model}.edit.{pk}'
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Editor data action
|
|
39
|
+
chimera_section.add({
|
|
40
|
+
name : 'Chimera.Editor#records',
|
|
41
|
+
methods : ['post'],
|
|
42
|
+
paths : '/api/editor/{model}/records',
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// Sidebar
|
|
46
|
+
chimera_section.add({
|
|
47
|
+
name : 'Chimera.Static#sidebar',
|
|
48
|
+
methods : ['get'],
|
|
49
|
+
paths : '/api/content/sidebar',
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
return
|
|
53
|
+
var chimera_menu;
|
|
6
54
|
|
|
7
55
|
// Link to the dashboard
|
|
8
56
|
chimera_section.add({
|
|
@@ -73,7 +121,7 @@ chimera_section.use(function setChimeraData(req, res, next) {
|
|
|
73
121
|
req.conduit.internal('UserData', req.conduit.session('UserData') || {});
|
|
74
122
|
|
|
75
123
|
// Set the theme to use
|
|
76
|
-
req.conduit.
|
|
124
|
+
req.conduit.renderer.setTheme(alchemy.plugins.chimera.view_settings.theme);
|
|
77
125
|
|
|
78
126
|
// Skip the rest if it's an ajax call
|
|
79
127
|
if (req.conduit.ajax) {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The base Chimera Controller class
|
|
3
|
+
*
|
|
4
|
+
* @author Jelle De Loecker <jelle@elevenways.be>
|
|
5
|
+
* @since 0.1.0
|
|
6
|
+
* @version 1.0.0
|
|
7
|
+
*/
|
|
8
|
+
let ChimeraController = Function.inherits('Alchemy.Controller', 'Alchemy.Controller.Chimera', function Chimera(conduit, options) {
|
|
9
|
+
|
|
10
|
+
Chimera.super.call(this, conduit, options);
|
|
11
|
+
|
|
12
|
+
// Set the theme
|
|
13
|
+
if (alchemy.plugins.chimera.theme) {
|
|
14
|
+
this.view_render.setTheme(alchemy.plugins.chimera.theme);
|
|
15
|
+
}
|
|
16
|
+
});
|